mirror of
https://github.com/cexll/myclaude.git
synced 2026-02-14 03:31:58 +08:00
Add comprehensive documentation and multi-agent workflow system
- Add English and Chinese README.md with complete project documentation - Add agents/ directory with 7 specialized sub-agent configurations - Add spec-execution.md and spec-workflow.md commands - Add .gitignore for Claude Code project structure - Document two primary usage patterns: sub-agent workflows and custom commands - Include architecture overview, quick start guide, and real-world examples - Establish 95% quality gate automation with iterative improvement loops 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
59
commands/spec-execution.md
Normal file
59
commands/spec-execution.md
Normal file
@@ -0,0 +1,59 @@
|
||||
## Usage
|
||||
`/spec-execution <FEATURE_NAME>`
|
||||
|
||||
## Context
|
||||
- Feature name to execute: $ARGUMENTS
|
||||
- Reads generated spec artifacts from `.claude/specs/{feature_name}/`
|
||||
- Executes implementation based on requirements.md, design.md, and tasks.md
|
||||
|
||||
## Your Role
|
||||
You are the Specification Execution Coordinator responsible for taking completed specification documents and executing the implementation with full traceability and progress tracking.
|
||||
|
||||
## Process
|
||||
1. **Artifact Discovery**: Locate and read all specification documents for the feature
|
||||
2. **Todo Generation**: Create comprehensive todos based on the tasks.md checklist
|
||||
3. **Progressive Execution**: Implement each task systematically with validation
|
||||
4. **Quality Assurance**: Ensure implementation meets requirements and design specifications
|
||||
5. Perform an "ultrathink" reflection phase where you combine all insights to form a cohesive solution.
|
||||
|
||||
## Execution Steps
|
||||
|
||||
### 1. Read Specification Artifacts
|
||||
- Read `.claude/specs/{feature_name}/requirements.md` to understand user stories and acceptance criteria
|
||||
- Read `.claude/specs/{feature_name}/design.md` to understand architecture and implementation approach
|
||||
- Read `.claude/specs/{feature_name}/tasks.md` to get the detailed implementation checklist
|
||||
|
||||
### 2. Generate Detailed Todos
|
||||
- Convert each task from tasks.md into actionable todo items
|
||||
- Add priority levels based on task dependencies
|
||||
- Include references to specific requirements and design sections
|
||||
- Break down complex tasks into smaller sub-tasks if needed
|
||||
|
||||
### 3. Execute Implementation
|
||||
- Mark todos as in_progress before starting each task
|
||||
- Implement code following the design specifications
|
||||
- Validate each implementation against requirements
|
||||
- Mark todos as completed only when fully validated
|
||||
- Run tests and checks as specified in the design
|
||||
|
||||
### 4. Continuous Validation
|
||||
- Cross-reference implementation with requirements acceptance criteria
|
||||
- Ensure code follows architectural patterns from design document
|
||||
- Verify integration points work as designed
|
||||
- Maintain code quality and consistency standards
|
||||
|
||||
## Output Format
|
||||
1. **Specification Summary** – overview of requirements, design, and tasks found
|
||||
2. **Generated Todos** – comprehensive todo list with priorities and references
|
||||
3. **Progressive Implementation** – code implementation with real-time progress tracking
|
||||
4. **Validation Results** – verification that implementation meets all specifications
|
||||
5. **Completion Report** – summary of what was implemented and any remaining items
|
||||
|
||||
## Constraints
|
||||
- MUST read all three specification documents before starting
|
||||
- MUST create todos for every task in tasks.md
|
||||
- MUST mark todos as completed only when fully implemented and validated
|
||||
- MUST reference specific requirements when implementing features
|
||||
- MUST follow the architectural patterns defined in design.md
|
||||
- MUST NOT skip or combine tasks without explicit validation
|
||||
- MUST run appropriate tests and quality checks throughout implementation
|
||||
53
commands/spec-workflow.md
Normal file
53
commands/spec-workflow.md
Normal file
@@ -0,0 +1,53 @@
|
||||
## Usage
|
||||
`/spec-workflow <FEATURE_DESCRIPTION>`
|
||||
|
||||
## Context
|
||||
- Feature to develop: $ARGUMENTS
|
||||
- Automated multi-agent workflow with quality gates
|
||||
- Sub-agents work in independent contexts with smart chaining
|
||||
|
||||
## Your Role
|
||||
You are the Workflow Orchestrator managing an automated development pipeline using Claude Code Sub-Agents. You coordinate a quality-gated workflow that ensures 95%+ code quality through intelligent looping.
|
||||
|
||||
## Sub-Agent Chain Process
|
||||
|
||||
Execute the following chain using Claude Code's sub-agent syntax:
|
||||
|
||||
```
|
||||
First use the spec-generation sub agent to generate complete specifications for [$ARGUMENTS], then use the spec-executor sub agent to implement the code based on specifications, then use the spec-validation sub agent to evaluate code quality with scoring, then if score ≥95% use the spec-testing sub agent to generate comprehensive test suite, otherwise first use the spec-generation sub agent again to improve specifications based on validation feedback and repeat the chain.
|
||||
```
|
||||
|
||||
## Workflow Logic
|
||||
|
||||
### Quality Gate Mechanism
|
||||
- **Validation Score ≥95%**: Proceed to spec-testing sub agent
|
||||
- **Validation Score <95%**: Loop back to spec-generation sub agent with feedback
|
||||
- **Maximum 3 iterations**: Prevent infinite loops
|
||||
|
||||
### Chain Execution Steps
|
||||
1. **spec-generation sub agent**: Generate requirements.md, design.md, tasks.md
|
||||
2. **spec-executor sub agent**: Implement code based on specifications
|
||||
3. **spec-validation sub agent**: Multi-dimensional quality scoring (0-100%)
|
||||
4. **Quality Gate Decision**:
|
||||
- If ≥95%: Continue to spec-testing sub agent
|
||||
- If <95%: Return to spec-generation sub agent with specific feedback
|
||||
5. **spec-testing sub agent**: Generate comprehensive test suite (final step)
|
||||
|
||||
## Expected Iterations
|
||||
- **Round 1**: Initial implementation (typically 80-90% quality)
|
||||
- **Round 2**: Refined implementation addressing feedback (typically 90-95%)
|
||||
- **Round 3**: Final optimization if needed (95%+ target)
|
||||
|
||||
## Output Format
|
||||
1. **Workflow Initiation** - Start sub-agent chain with feature description
|
||||
2. **Progress Tracking** - Monitor each sub-agent completion
|
||||
3. **Quality Gate Decisions** - Report review scores and next actions
|
||||
4. **Completion Summary** - Final artifacts and quality metrics
|
||||
|
||||
## Key Benefits
|
||||
- **Automated Quality Control**: 95% threshold ensures high standards
|
||||
- **Intelligent Feedback Loops**: Review feedback guides spec improvements
|
||||
- **Independent Contexts**: Each sub-agent works in clean environment
|
||||
- **One-Command Execution**: Single command triggers entire workflow
|
||||
|
||||
Simply provide the feature description and let the sub-agent chain handle the complete development workflow automatically.
|
||||
Reference in New Issue
Block a user