Initial commit
This commit is contained in:
65
commands/cndoc.md
Normal file
65
commands/cndoc.md
Normal file
@@ -0,0 +1,65 @@
|
||||
---
|
||||
description: Generate comprehensive Chinese documentation by analyzing code directly
|
||||
argument-hint: [optional: specific file or module to document]
|
||||
model: inherit
|
||||
---
|
||||
|
||||
# Generate Chinese Documentation
|
||||
|
||||
## Target
|
||||
|
||||
$ARGUMENTS
|
||||
|
||||
If no target specified, document the entire project.
|
||||
|
||||
## Process
|
||||
|
||||
### Step 1: Analyze Codebase (You do this)
|
||||
|
||||
Understand the project structure:
|
||||
- Main features and functionality
|
||||
- API endpoints (if backend)
|
||||
- Key components (if frontend)
|
||||
- Configuration requirements
|
||||
- Project architecture
|
||||
|
||||
### Step 2: Use doc-writer Agent (REQUIRED)
|
||||
|
||||
Use the **doc-writer** agent to generate comprehensive Chinese (中文) documentation.
|
||||
|
||||
Provide the agent with:
|
||||
- Target scope (entire project or specific module)
|
||||
- Language requirement: Chinese (中文)
|
||||
- Clear instruction: Read code directly, ignore existing docs
|
||||
|
||||
The agent should generate:
|
||||
|
||||
**For Backend Projects:**
|
||||
- API-REFERENCE-zh.md (API 参考文档)
|
||||
- 所有端点的详细说明
|
||||
- 请求/响应格式和示例
|
||||
- 认证要求和错误代码
|
||||
|
||||
**For Frontend Projects:**
|
||||
- 组件文档
|
||||
- 组件功能说明、Props、使用示例
|
||||
|
||||
**For All Projects:**
|
||||
- README-zh.md (项目概述、安装、快速开始、配置)
|
||||
- 关键函数的中文 JSDoc/Docstring 注释
|
||||
- USAGE-zh.md (使用指南) if needed
|
||||
|
||||
**Requirements:**
|
||||
- 使用清晰、专业的中文术语
|
||||
- 提供实际可运行的代码示例
|
||||
- 确保文档准确反映当前代码功能
|
||||
- 列出所有创建/修改的文件
|
||||
|
||||
### Step 3: Report to User (You do this)
|
||||
|
||||
Summarize in Chinese:
|
||||
- 已创建/修改的文件列表
|
||||
- 文档覆盖范围
|
||||
- 生成文档的示例片段
|
||||
|
||||
Make sure to use the doc-writer agent - do not generate documentation yourself!
|
||||
65
commands/endoc.md
Normal file
65
commands/endoc.md
Normal file
@@ -0,0 +1,65 @@
|
||||
---
|
||||
description: Generate comprehensive English documentation by analyzing code directly
|
||||
argument-hint: [optional: specific file or module to document]
|
||||
model: inherit
|
||||
---
|
||||
|
||||
# Generate English Documentation
|
||||
|
||||
## Target
|
||||
|
||||
$ARGUMENTS
|
||||
|
||||
If no target specified, document the entire project.
|
||||
|
||||
## Process
|
||||
|
||||
### Step 1: Analyze Codebase (You do this)
|
||||
|
||||
Understand the project structure:
|
||||
- Main features and functionality
|
||||
- API endpoints (if backend)
|
||||
- Key components (if frontend)
|
||||
- Configuration requirements
|
||||
- Project architecture
|
||||
|
||||
### Step 2: Use doc-writer Agent (REQUIRED)
|
||||
|
||||
Use the **doc-writer** agent to generate comprehensive English documentation.
|
||||
|
||||
Provide the agent with:
|
||||
- Target scope (entire project or specific module)
|
||||
- Language requirement: English
|
||||
- Clear instruction: Read code directly, ignore existing docs
|
||||
|
||||
The agent should generate:
|
||||
|
||||
**For Backend Projects:**
|
||||
- API-REFERENCE.md (API Reference Documentation)
|
||||
- Detailed endpoint descriptions
|
||||
- Request/response formats with examples
|
||||
- Authentication requirements and error codes
|
||||
|
||||
**For Frontend Projects:**
|
||||
- Component Documentation
|
||||
- Component functionality, props, usage examples
|
||||
|
||||
**For All Projects:**
|
||||
- README.md (project overview, installation, quick start, configuration)
|
||||
- JSDoc/Docstring comments for key functions
|
||||
- USAGE.md (Usage Guide) if needed
|
||||
|
||||
**Requirements:**
|
||||
- Use clear, professional English
|
||||
- Provide realistic, working code examples
|
||||
- Ensure documentation accurately reflects current code
|
||||
- List all files created/modified
|
||||
|
||||
### Step 3: Report to User (You do this)
|
||||
|
||||
Summarize:
|
||||
- List of files created/modified
|
||||
- Documentation coverage
|
||||
- Sample snippets of generated docs
|
||||
|
||||
Make sure to use the doc-writer agent - do not generate documentation yourself!
|
||||
94
commands/start.md
Normal file
94
commands/start.md
Normal file
@@ -0,0 +1,94 @@
|
||||
---
|
||||
description: Start intelligent coding workflow with automated testing and code review
|
||||
argument-hint: <your coding requirement>
|
||||
model: inherit
|
||||
---
|
||||
|
||||
# Droids Coding Workflow
|
||||
|
||||
## User Requirement
|
||||
|
||||
$ARGUMENTS
|
||||
|
||||
## Workflow Overview
|
||||
|
||||
You will coordinate specialized agents to complete this coding task with quality assurance. After implementing the core functionality yourself, you MUST use the following agents:
|
||||
|
||||
1. **test-engineer** agent - For comprehensive testing
|
||||
2. **code-reviewer** agent - For quality and security review
|
||||
3. **doc-writer** agent (optional) - For documentation
|
||||
|
||||
## Step-by-Step Process
|
||||
|
||||
### Step 1: Analyze & Plan (You do this)
|
||||
|
||||
1. Read CLAUDE.md if it exists to understand project standards
|
||||
2. Analyze the codebase structure relevant to the requirement
|
||||
3. Create a clear implementation plan
|
||||
4. Use TodoWrite to track your plan
|
||||
|
||||
### Step 2: Implement Core Functionality (You do this)
|
||||
|
||||
1. Implement the required functionality directly
|
||||
2. Make necessary file changes
|
||||
3. Follow coding standards from CLAUDE.md
|
||||
4. Handle edge cases and errors properly
|
||||
|
||||
### Step 3: Use test-engineer Agent (REQUIRED)
|
||||
|
||||
After implementation, use the **test-engineer** agent to write and run comprehensive tests.
|
||||
|
||||
Provide the agent with:
|
||||
- The implemented code/feature
|
||||
- Test requirements: backend tests (unit, integration, API), frontend tests (component, E2E), contract tests
|
||||
|
||||
The agent should:
|
||||
- Write tests following project patterns
|
||||
- Run all tests
|
||||
- Report coverage and results
|
||||
|
||||
### Step 4: Use code-reviewer Agent (REQUIRED)
|
||||
|
||||
After tests pass, use the **code-reviewer** agent to assess code quality.
|
||||
|
||||
Provide the agent with:
|
||||
- The implemented code
|
||||
- Test results from step 3
|
||||
|
||||
The agent should check:
|
||||
- Security vulnerabilities
|
||||
- Code quality and maintainability
|
||||
- Performance issues
|
||||
- Standards compliance with CLAUDE.md
|
||||
|
||||
### Step 5: Iterate if Needed
|
||||
|
||||
- If tests fail: Fix the code and re-run test-engineer agent
|
||||
- If review finds critical issues: Address them, then re-test and re-review
|
||||
- Maximum 3 iterations
|
||||
|
||||
### Step 6: Use doc-writer Agent (Optional)
|
||||
|
||||
If documentation is needed, use the **doc-writer** agent.
|
||||
|
||||
The agent should:
|
||||
- Add inline comments (JSDoc/docstring) for key functions
|
||||
- Create/update API documentation
|
||||
- Update README if needed
|
||||
|
||||
### Step 7: Report Completion
|
||||
|
||||
Provide a summary to the user including:
|
||||
- What was implemented
|
||||
- Test results (all passing)
|
||||
- Code review results (approved)
|
||||
- Any documentation created
|
||||
|
||||
## Important Notes
|
||||
|
||||
- **You must use the agents** - Don't skip the test-engineer and code-reviewer steps
|
||||
- Detect user's language and respond in the same language (Chinese/中文 or English)
|
||||
- Keep the user informed with clear progress updates
|
||||
- Follow CLAUDE.md standards throughout
|
||||
|
||||
Start now by analyzing the requirement and creating your implementation plan!
|
||||
Reference in New Issue
Block a user