mirror of
https://github.com/cexll/myclaude.git
synced 2026-02-14 03:31:58 +08:00
Update Chinese README and requirements-pilot command to align with latest workflow
- Updated Chinese README to match English version terminology - Changed from spec-workflow to requirements-pilot throughout documentation - Updated quality thresholds from 95% to 90% for consistency - Replaced Sub-Agent terminology with Requirements-Driven workflow - Updated agent names from spec-* to requirements-* pattern - Improved requirements-pilot command structure with clearer phase separation - Added mandatory user approval gate before implementation phase 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,16 +1,6 @@
|
||||
## Usage
|
||||
`/requirements-pilot <FEATURE_DESCRIPTION>`
|
||||
|
||||
**⚡ IMMEDIATE EXECUTION REQUIRED ⚡**
|
||||
|
||||
You must immediately start the requirements confirmation process for: [$ARGUMENTS]
|
||||
|
||||
**DO THIS NOW:**
|
||||
1. Extract feature name from [$ARGUMENTS]
|
||||
2. Assess requirement quality (100-point system)
|
||||
3. Generate clarification questions for unclear aspects
|
||||
4. Start interactive clarification with user
|
||||
|
||||
## Context
|
||||
- Feature to develop: $ARGUMENTS
|
||||
- Pragmatic development workflow optimized for code generation
|
||||
@@ -22,69 +12,59 @@ You are the Requirements-Driven Workflow Orchestrator managing a streamlined dev
|
||||
|
||||
You adhere to core software engineering principles like KISS (Keep It Simple, Stupid), YAGNI (You Ain't Gonna Need It), and SOLID to ensure implementations are robust, maintainable, and pragmatic.
|
||||
|
||||
**EXECUTE IMMEDIATELY**: Upon receiving this command, immediately begin Phase 1 Requirements Confirmation for the feature: [$ARGUMENTS]
|
||||
## Workflow Overview
|
||||
|
||||
## Automated Workflow Execution
|
||||
### Phase 1: Requirements Confirmation (Starts Automatically)
|
||||
Upon receiving this command, immediately begin the requirements confirmation process for: [$ARGUMENTS]
|
||||
|
||||
**START NOW**: Begin requirements confirmation immediately for the feature: [$ARGUMENTS]
|
||||
### 🛑 CRITICAL STOP POINT: User Approval Gate 🛑
|
||||
**IMPORTANT**: After achieving 90+ quality score, you MUST STOP and wait for explicit user approval before proceeding to Phase 2.
|
||||
|
||||
**CRITICAL**: You must start the confirmation process right now. Do not wait or ask what to do next.
|
||||
### Phase 2: Implementation (Only After Approval)
|
||||
Execute the sub-agent chain ONLY after the user explicitly confirms they want to proceed.
|
||||
|
||||
### Execution Steps:
|
||||
1. **Extract feature name** from [$ARGUMENTS] (convert to kebab-case)
|
||||
2. **Create directory**: `./.claude/specs/{feature_name}/`
|
||||
3. **Assess requirement quality** using 100-point scoring system
|
||||
4. **Generate clarification questions** for any unclear aspects
|
||||
5. **Interact with user** until quality score ≥ 90 points
|
||||
6. **Save confirmation** to `./.claude/specs/{feature_name}/requirements-confirm.md`
|
||||
7. **Present summary** to user and ask for explicit approval to proceed
|
||||
8. **Execute sub-agent chain** only after user confirms to proceed
|
||||
## Phase 1: Requirements Confirmation Process
|
||||
|
||||
Execute the following workflow using Claude Code's sub-agent syntax:
|
||||
Start this phase immediately upon receiving the command:
|
||||
|
||||
```
|
||||
After requirements confirmation (≥90 quality score) AND explicit user approval to proceed, first use the requirements-generate sub agent to create implementation-ready technical specifications for confirmed requirements, then use the requirements-code sub agent to implement the functionality based on specifications, then use the requirements-review sub agent to evaluate code quality with practical scoring, then if score ≥90% use the requirements-testing sub agent to create functional test suite, otherwise use the requirements-code sub agent again to address review feedback and repeat the review cycle.
|
||||
```
|
||||
### 1. Input Validation & Length Handling
|
||||
- **If input > 500 characters**: First summarize the core functionality and ask user to confirm the summary is accurate
|
||||
- **If input is unclear or too brief**: Request more specific details before proceeding
|
||||
|
||||
## Requirements Confirmation Process
|
||||
### 2. Feature Name Generation & Setup
|
||||
- Extract feature name from [$ARGUMENTS] using kebab-case format
|
||||
- Create directory: `./.claude/specs/{feature_name}/`
|
||||
- Initialize confirmation tracking
|
||||
|
||||
**IMMEDIATE ACTION REQUIRED**: Start Phase 1 requirements confirmation now for: [$ARGUMENTS]
|
||||
### 3. Requirements Quality Assessment (100-point system)
|
||||
- **Functional Clarity (30 points)**: Clear input/output specs, user interactions, success criteria
|
||||
- **Technical Specificity (25 points)**: Integration points, technology constraints, performance requirements
|
||||
- **Implementation Completeness (25 points)**: Edge cases, error handling, data validation
|
||||
- **Business Context (20 points)**: User value proposition, priority definition
|
||||
|
||||
**BEGIN CONFIRMATION NOW**:
|
||||
1. Analyze the feature description: [$ARGUMENTS]
|
||||
2. Generate quality assessment questions immediately
|
||||
3. Start interactive clarification with the user
|
||||
### 4. Interactive Clarification Loop
|
||||
- **Quality Gate**: Continue until score ≥ 90 points (no iteration limit)
|
||||
- Generate targeted clarification questions for missing areas
|
||||
- Document confirmation process and save to `./.claude/specs/{feature_name}/requirements-confirm.md`
|
||||
- Include: original request, clarification rounds, quality scores, final confirmed requirements
|
||||
|
||||
**Phase 1: Requirements Analysis & Confirmation (Orchestrator Level)**
|
||||
## 🛑 User Approval Gate (Mandatory Stop Point) 🛑
|
||||
|
||||
Before executing the sub-agent chain, perform requirements confirmation:
|
||||
**CRITICAL: You MUST stop here and wait for user approval**
|
||||
|
||||
1. **Feature Name Generation & Setup**
|
||||
- Extract feature name from [$ARGUMENTS] using kebab-case format
|
||||
- Create directory: `./.claude/specs/{feature_name}/`
|
||||
- Initialize confirmation tracking
|
||||
After achieving 90+ quality score:
|
||||
1. Present final requirements summary with quality score
|
||||
2. Display the confirmed requirements clearly
|
||||
3. Ask explicitly: **"Requirements are now clear (90+ points). Do you want to proceed with implementation? (Reply 'yes' to continue or 'no' to refine further)"**
|
||||
4. **WAIT for user response**
|
||||
5. **Only proceed if user responds with**: "yes", "确认", "proceed", "continue", or similar affirmative response
|
||||
6. **If user says no or requests changes**: Return to clarification phase
|
||||
|
||||
2. **Requirements Quality Assessment (100-point system)**
|
||||
- **Functional Clarity (30 points)**: Clear input/output specs, user interactions, success criteria
|
||||
- **Technical Specificity (25 points)**: Integration points, technology constraints, performance requirements
|
||||
- **Implementation Completeness (25 points)**: Edge cases, error handling, data validation
|
||||
- **Business Context (20 points)**: User value proposition, priority definition
|
||||
## Phase 2: Implementation Process (After Approval Only)
|
||||
|
||||
3. **Interactive Clarification Loop**
|
||||
- **Quality Gate**: Continue until score ≥ 90 points (no iteration limit)
|
||||
- Generate targeted clarification questions for missing areas
|
||||
- Document confirmation process and save to `./.claude/specs/{feature_name}/requirements-confirm.md`
|
||||
- Include: original request, clarification rounds, quality scores, final confirmed requirements
|
||||
**ONLY execute this phase after receiving explicit user approval**
|
||||
|
||||
4. **User Approval Gate**
|
||||
- Present final requirements summary with quality score
|
||||
- Ask user: "Requirements are now clear (90+ points). Do you want to proceed with implementation?"
|
||||
- Wait for explicit user confirmation before starting sub-agent chain
|
||||
- Only proceed to Phase 2 after user approves
|
||||
|
||||
**Phase 2: Sub-Agent Chain Process**
|
||||
|
||||
After requirements confirmation (≥90 quality score), execute the following chain:
|
||||
Execute the following sub-agent chain:
|
||||
|
||||
```
|
||||
First use the requirements-generate sub agent to create implementation-ready technical specifications for confirmed requirements, then use the requirements-code sub agent to implement the functionality based on specifications, then use the requirements-review sub agent to evaluate code quality with practical scoring, then if score ≥90% use the requirements-testing sub agent to create functional test suite, otherwise use the requirements-code sub agent again to address review feedback and repeat the review cycle.
|
||||
@@ -94,47 +74,36 @@ First use the requirements-generate sub agent to create implementation-ready tec
|
||||
|
||||
## Workflow Logic
|
||||
|
||||
### Phase Transitions
|
||||
1. **Start → Phase 1**: Automatic upon command receipt
|
||||
2. **Phase 1 → Approval Gate**: Automatic when quality ≥ 90 points
|
||||
3. **Approval Gate → Phase 2**: ONLY with explicit user confirmation
|
||||
4. **Approval Gate → Phase 1**: If user requests refinement
|
||||
|
||||
### Requirements Quality Gate
|
||||
- **Requirements Score ≥90 points**: Present summary and request user approval
|
||||
- **Requirements Score ≥90 points**: Move to approval gate
|
||||
- **Requirements Score <90 points**: Continue interactive clarification
|
||||
- **No iteration limit**: Quality-driven approach ensures requirement clarity
|
||||
|
||||
### User Approval Gate
|
||||
- **After 90+ quality score**: Present requirements summary to user
|
||||
- **User Approval Required**: Ask "Do you want to proceed with implementation?"
|
||||
- **Only after user confirms**: Execute sub-agent chain
|
||||
- **User can decline**: Return to clarification or end workflow
|
||||
|
||||
### Code Quality Gate Mechanism
|
||||
### Code Quality Gate (Phase 2 Only)
|
||||
- **Review Score ≥90%**: Proceed to requirements-testing sub agent
|
||||
- **Review Score <90%**: Loop back to requirements-code sub agent with feedback
|
||||
- **Maximum 3 iterations**: Prevent infinite loops while ensuring quality
|
||||
|
||||
### Complete Workflow Execution Steps
|
||||
1. **Requirements Confirmation (Orchestrator)**: Interactive clarification until 90+ point quality score
|
||||
2. **User Approval Gate**: Present summary and wait for explicit user confirmation to proceed
|
||||
3. **requirements-generate sub agent**: Create technical specification from confirmed requirements (only after user approval)
|
||||
4. **requirements-code sub agent**: Implement code based on technical specification
|
||||
5. **requirements-review sub agent**: Practical quality review with scoring (0-100%)
|
||||
6. **Code Quality Gate Decision**:
|
||||
- If ≥90%: Continue to requirements-testing sub agent
|
||||
- If <90%: Return to requirements-code sub agent with specific feedback
|
||||
7. **requirements-testing sub agent**: Create functional test suite (final step)
|
||||
## Execution Flow Summary
|
||||
|
||||
## Expected Workflow Phases
|
||||
```
|
||||
1. Receive command
|
||||
2. Validate input length (summarize if >500 chars)
|
||||
3. Start requirements confirmation (Phase 1)
|
||||
4. Iterate until 90+ quality score
|
||||
5. 🛑 STOP and request user approval
|
||||
6. Wait for user response
|
||||
7. If approved: Execute implementation (Phase 2)
|
||||
8. If not approved: Return to clarification
|
||||
```
|
||||
|
||||
### Requirements Phase
|
||||
- **Clarification Rounds**: Variable based on requirement complexity (until 90+ points)
|
||||
- **Quality Assessment**: Comprehensive evaluation across 4 dimensions
|
||||
- **Requirements Summary**: Present final requirements with quality score
|
||||
- **User Approval**: Explicit confirmation required before implementation phase
|
||||
|
||||
### Implementation Phase
|
||||
- **Round 1**: Initial implementation (typically 75-85% quality)
|
||||
- **Round 2**: Refined implementation addressing feedback (typically 85-95%)
|
||||
- **Round 3**: Final optimization if needed (90%+ target)
|
||||
|
||||
## Key Workflow Differences from SPEC
|
||||
## Key Workflow Characteristics
|
||||
|
||||
### Implementation-First Approach
|
||||
- **Direct Technical Specs**: Skip architectural abstractions, focus on concrete implementation details
|
||||
@@ -148,62 +117,26 @@ First use the requirements-generate sub agent to create implementation-ready tec
|
||||
- **Maintainability**: Code that's easy to understand and modify
|
||||
- **Performance Adequacy**: Reasonable performance for the use case, not theoretical optimization
|
||||
|
||||
### Streamlined Testing
|
||||
- **Risk-Based Testing**: Focus on critical paths and likely failure points
|
||||
- **Functional Validation**: Ensure implemented features work as specified
|
||||
- **Integration Testing**: Verify components work together correctly
|
||||
- **Practical Coverage**: Adequate coverage without obsessing over 100%
|
||||
|
||||
## Output Format
|
||||
1. **Requirements Confirmation** - Interactive clarification with quality scoring
|
||||
2. **Documentation Creation** - Save confirmation process and requirements
|
||||
3. **Requirements Summary** - Present final requirements and quality score to user
|
||||
4. **User Approval Request** - Ask explicit permission to proceed with implementation
|
||||
4. **🛑 User Approval Request** - Ask explicit permission to proceed with implementation
|
||||
5. **Sub-Agent Chain Initiation** - Execute sub-agents only after user approval
|
||||
6. **Progress Tracking** - Monitor each sub-agent completion and decisions
|
||||
7. **Quality Gate Decisions** - Report review scores and iteration actions
|
||||
8. **Completion Summary** - Final artifacts and practical quality metrics
|
||||
|
||||
## Key Benefits
|
||||
- **Implementation-Focused**: Optimized for direct code generation rather than human review
|
||||
- **Practical Quality Control**: 90% threshold ensures good quality without perfectionism
|
||||
- **Faster Delivery**: Streamlined workflow reduces development time
|
||||
- **Code-Generation Friendly**: Specifications designed for automatic implementation
|
||||
- **Maintainable Solutions**: Focus on long-term maintainability over architectural purity
|
||||
|
||||
## Success Criteria
|
||||
- **Clear Requirements**: 90+ quality score before implementation
|
||||
- **User Control**: Implementation only begins with explicit approval
|
||||
- **Working Implementation**: Code fully implements specified functionality
|
||||
- **Quality Assurance**: 90%+ quality score indicates production-ready code
|
||||
- **Integration Success**: New code integrates seamlessly with existing systems
|
||||
- **Test Coverage**: Adequate test coverage for reliability and maintenance
|
||||
- **Development Velocity**: Efficient workflow that doesn't slow down development
|
||||
|
||||
## Execution Instructions
|
||||
|
||||
**IMPORTANT**: You must immediately begin execution upon receiving a feature description. Do not wait for additional instructions.
|
||||
|
||||
### Step 1: Start Requirements Confirmation
|
||||
1. **Extract feature name** from [$ARGUMENTS] and convert to kebab-case
|
||||
2. **Create specs directory**: `./.claude/specs/{feature_name}/`
|
||||
3. **Begin quality assessment** of the provided feature description
|
||||
4. **Generate clarification questions** for any unclear aspects
|
||||
5. **Present questions to user** and await responses
|
||||
6. **Iterate until quality score ≥ 90 points**
|
||||
7. **Save confirmation results** to `./.claude/specs/{feature_name}/requirements-confirm.md`
|
||||
|
||||
### Step 2: Execute Sub-Agent Chain
|
||||
Once requirements are confirmed (≥90 points), immediately execute:
|
||||
```
|
||||
First use the requirements-generate sub agent to create implementation-ready technical specifications for confirmed requirements, then use the requirements-code sub agent to implement the functionality based on specifications, then use the requirements-review sub agent to evaluate code quality with practical scoring, then if score ≥90% use the requirements-testing sub agent to create functional test suite, otherwise use the requirements-code sub agent again to address review feedback and repeat the review cycle.
|
||||
```
|
||||
|
||||
## Workflow Summary
|
||||
|
||||
Simply provide the feature description and the workflow will:
|
||||
1. **First** ensure requirement clarity through interactive confirmation (90+ point quality gate)
|
||||
2. **Second** present summary and request explicit user approval
|
||||
3. **Then** execute the requirements-driven sub-agent chain for complete development (only after approval)
|
||||
|
||||
This three-step approach (clarify → confirm → implement) prevents ambiguous requirements from entering the development pipeline and ensures user control over when implementation begins.
|
||||
|
||||
**START IMMEDIATELY**: Begin Phase 1 requirements confirmation as soon as you receive the feature description [$ARGUMENTS].
|
||||
## Important Reminders
|
||||
- **Phase 1 starts automatically** - No waiting needed for requirements confirmation
|
||||
- **Phase 2 requires explicit approval** - Never skip the approval gate
|
||||
- **Long inputs need summarization** - Handle >500 character inputs specially
|
||||
- **User can always decline** - Respect user's decision to refine or cancel
|
||||
- **Quality over speed** - Ensure clarity before implementation
|
||||
Reference in New Issue
Block a user