refactor: Reorganize repository structure for optimal learning path
Reorder folders based on learning dependencies, complexity, and frequency of use: - 01-slash-commands (unchanged) - Quick wins for beginners - 02-memory (was 03) - Essential foundation - 03-skills (was 05) - Auto-invoked capabilities - 04-subagents (was 02) - Task delegation - 05-mcp (was 04) - External integration - 06-hooks (was 07) - Event automation - 07-plugins (was 06) - Bundled solutions - 08-checkpoints (unchanged) - Safe experimentation - 09-advanced-features (unchanged) - Power user tools Documentation improvements: - Add LEARNING-ROADMAP.md with detailed milestones and exercises - Simplify README.md for better scannability - Consolidate Quick Start and Getting Started sections - Combine Feature Comparison and Use Case Matrix tables - Reorder README sections: Learning Path → Quick Reference → Getting Started - Update all cross-references across module READMEs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
116
07-plugins/documentation/README.md
Normal file
116
07-plugins/documentation/README.md
Normal file
@@ -0,0 +1,116 @@
|
||||

|
||||
|
||||
# Documentation Plugin
|
||||
|
||||
Comprehensive documentation generation and maintenance for your project.
|
||||
|
||||
## Features
|
||||
|
||||
✅ API documentation generation
|
||||
✅ README creation and updates
|
||||
✅ Documentation synchronization
|
||||
✅ Code comment improvements
|
||||
✅ Example generation
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
/plugin install documentation
|
||||
```
|
||||
|
||||
## What's Included
|
||||
|
||||
### Slash Commands
|
||||
- `/generate-api-docs` - Generate API documentation
|
||||
- `/generate-readme` - Create or update README
|
||||
- `/sync-docs` - Sync docs with code changes
|
||||
- `/validate-docs` - Validate documentation
|
||||
|
||||
### Subagents
|
||||
- `api-documenter` - API documentation specialist
|
||||
- `code-commentator` - Code comment improvements
|
||||
- `example-generator` - Code example creation
|
||||
|
||||
### Templates
|
||||
- `api-endpoint.md` - API endpoint documentation template
|
||||
- `function-docs.md` - Function documentation template
|
||||
- `adr-template.md` - Architecture Decision Record template
|
||||
|
||||
### MCP Servers
|
||||
- GitHub integration for documentation syncing
|
||||
|
||||
## Usage
|
||||
|
||||
### Generate API Documentation
|
||||
```
|
||||
/generate-api-docs
|
||||
```
|
||||
|
||||
### Create README
|
||||
```
|
||||
/generate-readme
|
||||
```
|
||||
|
||||
### Sync Documentation
|
||||
```
|
||||
/sync-docs
|
||||
```
|
||||
|
||||
### Validate Documentation
|
||||
```
|
||||
/validate-docs
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
||||
- Claude Code 1.0+
|
||||
- GitHub access (optional)
|
||||
|
||||
## Example Workflow
|
||||
|
||||
```
|
||||
User: /generate-api-docs
|
||||
|
||||
Claude:
|
||||
1. Scans all API endpoints in /src/api/
|
||||
2. Delegates to api-documenter subagent
|
||||
3. Extracts function signatures and JSDoc
|
||||
4. Organizes by module/endpoint
|
||||
5. Uses api-endpoint.md template
|
||||
6. Generates comprehensive markdown docs
|
||||
7. Includes curl, JavaScript, and Python examples
|
||||
|
||||
Result:
|
||||
✅ API documentation generated
|
||||
📄 Files created:
|
||||
- docs/api/users.md
|
||||
- docs/api/auth.md
|
||||
- docs/api/products.md
|
||||
📊 Coverage: 23/23 endpoints documented
|
||||
```
|
||||
|
||||
## Templates Usage
|
||||
|
||||
### API Endpoint Template
|
||||
Use for documenting REST API endpoints with full examples.
|
||||
|
||||
### Function Documentation Template
|
||||
Use for documenting individual functions/methods.
|
||||
|
||||
### ADR Template
|
||||
Use for documenting architectural decisions.
|
||||
|
||||
## Configuration
|
||||
|
||||
Set up GitHub token for documentation syncing:
|
||||
```bash
|
||||
export GITHUB_TOKEN="your_github_token"
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
- Keep documentation close to code
|
||||
- Update docs with code changes
|
||||
- Include practical examples
|
||||
- Validate regularly
|
||||
- Use templates for consistency
|
||||
14
07-plugins/documentation/agents/api-documenter.md
Normal file
14
07-plugins/documentation/agents/api-documenter.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
name: api-documenter
|
||||
description: API documentation specialist
|
||||
tools: read, write, grep
|
||||
---
|
||||
|
||||
# API Documenter
|
||||
|
||||
Creates comprehensive API documentation:
|
||||
- Endpoint documentation
|
||||
- Parameter descriptions
|
||||
- Response schemas
|
||||
- Code examples (curl, JS, Python)
|
||||
- Error codes
|
||||
14
07-plugins/documentation/agents/code-commentator.md
Normal file
14
07-plugins/documentation/agents/code-commentator.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
name: code-commentator
|
||||
description: Code comment and inline documentation specialist
|
||||
tools: read, write, edit
|
||||
---
|
||||
|
||||
# Code Commentator
|
||||
|
||||
Improves code documentation:
|
||||
- JSDoc/docstring comments
|
||||
- Inline explanations
|
||||
- Parameter descriptions
|
||||
- Return type documentation
|
||||
- Usage examples
|
||||
14
07-plugins/documentation/agents/example-generator.md
Normal file
14
07-plugins/documentation/agents/example-generator.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
name: example-generator
|
||||
description: Code example and tutorial specialist
|
||||
tools: read, write
|
||||
---
|
||||
|
||||
# Example Generator
|
||||
|
||||
Creates practical code examples:
|
||||
- Getting started guides
|
||||
- Common use cases
|
||||
- Integration examples
|
||||
- Best practices
|
||||
- Troubleshooting scenarios
|
||||
15
07-plugins/documentation/commands/generate-api-docs.md
Normal file
15
07-plugins/documentation/commands/generate-api-docs.md
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
name: Generate API Documentation
|
||||
description: Generate comprehensive API documentation from source code
|
||||
---
|
||||
|
||||
# API Documentation Generator
|
||||
|
||||
Generate complete API documentation:
|
||||
|
||||
1. Scan API endpoints
|
||||
2. Extract function signatures and JSDoc
|
||||
3. Organize by module/endpoint
|
||||
4. Create markdown with examples
|
||||
5. Include request/response schemas
|
||||
6. Add error documentation
|
||||
15
07-plugins/documentation/commands/generate-readme.md
Normal file
15
07-plugins/documentation/commands/generate-readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
name: Generate README
|
||||
description: Create or update project README
|
||||
---
|
||||
|
||||
# README Generator
|
||||
|
||||
Generate comprehensive README:
|
||||
|
||||
1. Project overview and description
|
||||
2. Installation instructions
|
||||
3. Usage examples
|
||||
4. API documentation links
|
||||
5. Contributing guidelines
|
||||
6. License information
|
||||
14
07-plugins/documentation/commands/sync-docs.md
Normal file
14
07-plugins/documentation/commands/sync-docs.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
name: Sync Documentation
|
||||
description: Sync documentation with code changes
|
||||
---
|
||||
|
||||
# Documentation Sync
|
||||
|
||||
Synchronize documentation with codebase:
|
||||
|
||||
1. Detect code changes
|
||||
2. Identify outdated documentation
|
||||
3. Update affected docs
|
||||
4. Verify examples still work
|
||||
5. Update version numbers
|
||||
14
07-plugins/documentation/commands/validate-docs.md
Normal file
14
07-plugins/documentation/commands/validate-docs.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
name: Validate Documentation
|
||||
description: Validate documentation for completeness and accuracy
|
||||
---
|
||||
|
||||
# Documentation Validation
|
||||
|
||||
Validate documentation quality:
|
||||
|
||||
1. Check for broken links
|
||||
2. Verify code examples
|
||||
3. Ensure completeness
|
||||
4. Check formatting
|
||||
5. Validate against actual code
|
||||
11
07-plugins/documentation/mcp/github-docs-config.json
Normal file
11
07-plugins/documentation/mcp/github-docs-config.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"mcpServers": {
|
||||
"github": {
|
||||
"command": "npx",
|
||||
"args": ["@modelcontextprotocol/server-github"],
|
||||
"env": {
|
||||
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
28
07-plugins/documentation/plugin.yaml
Normal file
28
07-plugins/documentation/plugin.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
name: documentation
|
||||
version: "1.0.0"
|
||||
description: Comprehensive documentation generation and maintenance
|
||||
author: Community
|
||||
license: MIT
|
||||
tags:
|
||||
- documentation
|
||||
- api
|
||||
- guides
|
||||
|
||||
requires:
|
||||
- claude-code: ">=1.0.0"
|
||||
|
||||
components:
|
||||
- type: commands
|
||||
path: commands/
|
||||
- type: agents
|
||||
path: agents/
|
||||
- type: mcp
|
||||
path: mcp/
|
||||
- type: templates
|
||||
path: templates/
|
||||
|
||||
config:
|
||||
auto_load: true
|
||||
enabled_by_default: true
|
||||
---
|
||||
39
07-plugins/documentation/templates/adr-template.md
Normal file
39
07-plugins/documentation/templates/adr-template.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# ADR [Number]: [Title]
|
||||
|
||||
## Status
|
||||
[Proposed | Accepted | Deprecated | Superseded]
|
||||
|
||||
## Context
|
||||
What is the issue that we're seeing that is motivating this decision or change?
|
||||
|
||||
## Decision
|
||||
What is the change that we're proposing and/or doing?
|
||||
|
||||
## Consequences
|
||||
What becomes easier or more difficult to do because of this change?
|
||||
|
||||
### Positive
|
||||
- Benefit 1
|
||||
- Benefit 2
|
||||
|
||||
### Negative
|
||||
- Drawback 1
|
||||
- Drawback 2
|
||||
|
||||
### Neutral
|
||||
- Consideration 1
|
||||
- Consideration 2
|
||||
|
||||
## Alternatives Considered
|
||||
What other options were considered and why were they not chosen?
|
||||
|
||||
### Alternative 1
|
||||
Description and reason for not choosing.
|
||||
|
||||
### Alternative 2
|
||||
Description and reason for not choosing.
|
||||
|
||||
## References
|
||||
- Related ADRs
|
||||
- External documentation
|
||||
- Discussion links
|
||||
101
07-plugins/documentation/templates/api-endpoint.md
Normal file
101
07-plugins/documentation/templates/api-endpoint.md
Normal file
@@ -0,0 +1,101 @@
|
||||
# [METHOD] /api/v1/[endpoint]
|
||||
|
||||
## Description
|
||||
Brief explanation of what this endpoint does.
|
||||
|
||||
## Authentication
|
||||
Required authentication method (e.g., Bearer token).
|
||||
|
||||
## Parameters
|
||||
|
||||
### Path Parameters
|
||||
| Name | Type | Required | Description |
|
||||
|------|------|----------|-------------|
|
||||
| id | string | Yes | Resource ID |
|
||||
|
||||
### Query Parameters
|
||||
| Name | Type | Required | Description |
|
||||
|------|------|----------|-------------|
|
||||
| page | integer | No | Page number (default: 1) |
|
||||
| limit | integer | No | Items per page (default: 20) |
|
||||
|
||||
### Request Body
|
||||
```json
|
||||
{
|
||||
"field": "value"
|
||||
}
|
||||
```
|
||||
|
||||
## Responses
|
||||
|
||||
### 200 OK
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"id": "123",
|
||||
"name": "Example"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 400 Bad Request
|
||||
```json
|
||||
{
|
||||
"success": false,
|
||||
"error": {
|
||||
"code": "VALIDATION_ERROR",
|
||||
"message": "Invalid input"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 404 Not Found
|
||||
```json
|
||||
{
|
||||
"success": false,
|
||||
"error": {
|
||||
"code": "NOT_FOUND",
|
||||
"message": "Resource not found"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### cURL
|
||||
```bash
|
||||
curl -X GET "https://api.example.com/api/v1/endpoint" \
|
||||
-H "Authorization: Bearer YOUR_TOKEN" \
|
||||
-H "Content-Type: application/json"
|
||||
```
|
||||
|
||||
### JavaScript
|
||||
```javascript
|
||||
const response = await fetch('/api/v1/endpoint', {
|
||||
headers: {
|
||||
'Authorization': 'Bearer token',
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
const data = await response.json();
|
||||
```
|
||||
|
||||
### Python
|
||||
```python
|
||||
import requests
|
||||
|
||||
response = requests.get(
|
||||
'https://api.example.com/api/v1/endpoint',
|
||||
headers={'Authorization': 'Bearer token'}
|
||||
)
|
||||
data = response.json()
|
||||
```
|
||||
|
||||
## Rate Limits
|
||||
- 1000 requests per hour for authenticated users
|
||||
- 100 requests per hour for public endpoints
|
||||
|
||||
## Related Endpoints
|
||||
- [GET /api/v1/related](#)
|
||||
- [POST /api/v1/related](#)
|
||||
50
07-plugins/documentation/templates/function-docs.md
Normal file
50
07-plugins/documentation/templates/function-docs.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Function: `functionName`
|
||||
|
||||
## Description
|
||||
Brief description of what the function does.
|
||||
|
||||
## Signature
|
||||
```typescript
|
||||
function functionName(param1: Type1, param2: Type2): ReturnType
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|-----------|------|----------|-------------|
|
||||
| param1 | Type1 | Yes | Description of param1 |
|
||||
| param2 | Type2 | No | Description of param2 |
|
||||
|
||||
## Returns
|
||||
**Type**: `ReturnType`
|
||||
|
||||
Description of what is returned.
|
||||
|
||||
## Throws
|
||||
- `Error`: When invalid input is provided
|
||||
- `TypeError`: When wrong type is passed
|
||||
|
||||
## Examples
|
||||
|
||||
### Basic Usage
|
||||
```typescript
|
||||
const result = functionName('value1', 'value2');
|
||||
console.log(result);
|
||||
```
|
||||
|
||||
### Advanced Usage
|
||||
```typescript
|
||||
const result = functionName(
|
||||
complexParam1,
|
||||
{ option: true }
|
||||
);
|
||||
```
|
||||
|
||||
## Notes
|
||||
- Additional notes or warnings
|
||||
- Performance considerations
|
||||
- Best practices
|
||||
|
||||
## See Also
|
||||
- [Related Function](#)
|
||||
- [API Documentation](#)
|
||||
Reference in New Issue
Block a user