Provides a systematic 9-phase requirements analysis and implementation workflow, ensuring a complete process from deep analysis to quality delivery.
Quick Start
Workflow (Phases 1-9):
需求理解 → 代码探索 → 外部资源研究 → 澄清问题 → 深度分析 → 展示计划 → 实施开发 → 代码审查 → 总结
Core Features:
- Deep Analysis: Use ultrathink for complex requirements analysis
- External Resources: Integrate context7 and exa to research best practices
- Structured Output: Detailed implementation plan + complete code implementation
- Task List Management: Progress visualization, breakpoint recovery
Differences from feat-dev:
- This skill: 9 phases,includes external resource research, suitable for complex requirements and new technology stacks
- feat-dev: 7 phases, rapid implementation process, suitable for scenarios with relatively clear requirements
Task List Management
This skill automatically manages the task list, providing progress visualization and breakpoint recovery capabilities.
Basic Mode:
# 开始阶段时
tasks = TaskList()
task = findTaskBySubject(tasks, "阶段 X: 阶段名称")
TaskUpdate(task.id, status="in_progress", owner="requirement-analysis")
# 完成阶段时
TaskUpdate(task.id, status="completed")
Conditional Execution Phases: For conditionally executed phases (such as external resource research):
# 如果跳过此阶段
TaskUpdate(task.id, status="completed", metadata={note: "不满足执行条件,已跳过"})
Breakpoint Recovery: If execution is interrupted, check TaskList() to find tasks with in_progress or pending status and continue.
Advanced Usage:Task List Management
Ultrathink Usage Guide
Tool:mcp__sequential-thinking__sequentialthinking
When to Use:
- ✅ Phase 1: Requirements involve multiple modules, complex business logic, or vague descriptions
- ✅ Phase 5: Must use (deep analysis)
- ❌ Simple CRUD or single-module requirements can skip
How to Use:
思考内容:
- 阶段1:分解需求组件、识别依赖关系、分析潜在风险
- 阶段5:设计数据结构、API端点、服务层、识别边缘情况、规划实施步骤
Workflow
Phase 1: Requirements Understanding
Goal: Fully understand user requirements
Execution Points:
- Identify core features, business entities, API endpoints, and business rules
- Decide whether to use ultrathink based on complexity
- Record a requirements understanding summary
Task Management:
task = findTaskBySubject(tasks, "阶段 1: 需求理解")
TaskUpdate(task.id, status="in_progress", owner="requirement-analysis")
# 完成时
TaskUpdate(task.id, status="completed")
Phase 2: Codebase Exploration
Goal: Comprehensively explore the codebase and understand the project architecture
Primary Task: Find and read the CLAUDE.md file
Exploration Modes:
Basic Mode(simple requirements):
- Use a single Explore agent
- Quickly locate relevant code
Parallel Mode(complex requirements):
- Launch 2-5 Explore agents simultaneously
- Decompose by architectural layer or functional module
- ⚠️ All Task calls must be initiated in a single message
- Set for each task
run_in_background: true - Use TaskOutput to collect results
What to Look For:
- CLAUDE.md conventions
- Related entities and services
- Existing patterns and conventions
Parallel Mode Example:Parallel Mode Guide
Phase 3: External Resource Research (Conditional Execution)
Objective: Research external resources to obtain the latest information and best practices
Execution Conditions(execute if any is met):
- Involves new third-party libraries or frameworks
- Need to understand the latest industry practices
- Insufficient examples in the internal codebase
Tool Priority:
- Web search: exa MCP → WebSearch
- Library documentation: context7 MCP → WebSearch + Grep + Read
Skip Scenarios:
- Completely based on existing code
- The team is already familiar with the technology
- Time is urgent and the requirements are simple
Skip Handling:
TaskUpdate(task.id, status="completed", metadata={note: "不满足执行条件,已跳过"})
Phase 4: Clarify Questions
Objective: Resolve all unclear, vague, or ambiguous requirement points
Important: Must use the AskUserQuestion tool
Clarification Content:
- Vague or underspecified requirements
- Choice among multiple valid implementation approaches
- Business rule details
- Technology selection or architecture decisions
Best Practices:
- Ask multiple related questions at once (use multiSelect)
- Provide specific options and explain the impact
- Recommend the preferred option and explain the reason
Task Management:
task = findTaskBySubject(tasks, "阶段 4: 澄清问题")
TaskUpdate(task.id, status="in_progress", owner="requirement-analysis")
# 用户回应后
TaskUpdate(task.id, status="completed")
Phase 5: In-Depth Analysis
Objective: Use ultrathink for in-depth analysis and design a complete technical solution
Must use ultrathink:mcp__sequential-thinking__sequentialthinking
Analysis Content:
-
Analyze requirement components(review the results of Phase 1)
- Break down into implementable functional modules
- Identify dependencies between modules
- Analyze potential technical and business risks
-
Design data structures(comply with CLAUDE.md specifications)
- Entity/table structure definitions
- Field types and constraints
- Associations and indexes
-
Design API endpoints(comply with CLAUDE.md specifications)
- HTTP methods and path design
- Request/response structures
- Authentication and authorization requirements
-
Design the service layer(comply with CLAUDE.md specifications)
- Service interface definitions
- Dependency relationship design
- Business logic flow
-
Identify risks and edge cases
- Consider the special cases clarified by the user in Phase 4
- Analyze potential error scenarios
- Plan exception handling strategies
-
Plan detailed implementation steps
- Integrate all the above analysis
- Formulate an executable step-by-step implementation plan
Notes: Although ultrathink can access the complete conversation history, it is recommended to explicitly reference and summarize the key findings from previous phases to ensure the coherence and accuracy of the analysis.
Phase 6: Present Implementation Plan
Objective: Present the complete implementation plan to the user and wait for confirmation
Display Content:
- Requirements Summary - Key Points Understood
- Codebase Discovery - Relevant Code and Patterns
- External Resources (if applicable) - Search Results and Library Documentation
- Technical Design - Database, API, Service Layer
- Implementation Steps - Numbered Detailed Steps
- Risks and Considerations
Important: Do not mark the task as completed before user confirmation
Ask: "How does this implementation plan look? Can I start implementing?"
After user confirmation:
TaskUpdate(task.id, status="completed")
# 阶段7自动解除阻塞,可以开始
Output Format:Output Template
Phase 7: Implementation Development
Goal: Implement functional code based on the architecture design from Phase 6
Prerequisite: Must obtain explicit user confirmation (Phase 6 complete)
Execution Principles:
- Strictly follow CLAUDE.md
- Implement features according to the architecture design
- Keep code concise and avoid over-engineering
- Verify and test promptly
- Use AskUserQuestion promptly when encountering issues
Phase Responsibilities:
- Write functional code
- Implement the designed API, data structures, and service layer
- Write unit tests (if needed)
- Does not include code review (review is in Phase 8)
Completion Criteria:
- All functional code implementation is complete
- Code passes basic tests
- Complies with project specifications
Phase 8: Code Review
Goal: An independent quality gate phase to comprehensively review code quality
Phase Responsibilities:
- Independent quality gate phase
- Check code quality and specification compliance
- Identify bugs and potential issues
- Provide improvement suggestions
Review Mode Selection:
Single Review Mode(simple requirements):
- Use 1 code-reviewer agent
- Comprehensively review all dimensions
Parallel Deep Review Mode(complex requirements):
- Launch 3-5 review tasks simultaneously
- Each focuses on a specific dimension (functional correctness, code style, specification compliance)
- ⚠️ Must initiate all Task calls in a single message
- Set for each task
run_in_background: true - Use TaskOutput to collect results
Execution Steps:
- Select review mode (based on requirement complexity)
- Launch review agents
- Collect review results (use TaskOutput)
- Consolidate issue list
- Use AskUserQuestion to ask how to handle
After review must:
- Use AskUserQuestion to ask the user how to handle the issues
- Must not auto-fix; must seek confirmation
Deliverable: Review report (issue list, severity annotations), improvement suggestions
Phase 9: Summary
Goal: Summarize the entire requirements analysis process and provide follow-up suggestions
Summary Content:
-
Requirements Summary
- Core Functionality Review
- Key Features Implemented
-
Deliverables List
- Completed Functional Modules
- Created Files
- Written Code
-
Quality Metrics
- Number of Issues Found in Review
- Fix Status
- Code Quality Score
-
Follow-up Recommendations
- Further Optimization Recommendations
- Potential Improvement Points
- Documentation Update Recommendations
-
Lessons Learned
- Challenges Encountered
- Solutions
- Best Practices
Final Progress Display:
### [完成] 所有阶段完成!
需求分析项目 - 100% 完成
📝 阶段完成情况:
[完成] 阶段 1: 需求理解
[完成] 阶段 2: 代码库探索
[跳过] 阶段 3: 外部资源研究 (跳过)
[完成] 阶段 4: 澄清问题
[完成] 阶段 5: 深度分析
[完成] 阶段 6: 展示实施计划
[完成] 阶段 7: 实施开发
[完成] 阶段 8: 代码审查
[完成] 阶段 9: 总结
项目成功完成!
Important Principles
- Adaptive Language Interaction: Communicate according to the user's Claude language setting and input language
- Strictly Follow CLAUDE.md: Must read and comply with project standards
- Ask Questions Proactively: Must clarify unclear points
- Use ultrathink Reasonably: Optional in Stage 1, required in Stage 5
- Make Good Use of External Resources: Use context7 and exa when needed (with fallback plans)
- Use Parallelization Reasonably: Use parallel exploration and review for complex requirements, and it must be initiated in a single message
- Code Review Is Required: Stage 8 must be executed after implementation is complete
- Seek Confirmation Before Review: Use AskUserQuestion; do not fix automatically
- Never Rush: Do not code before the plan is confirmed
- Stay Thorough: Consider edge cases, errors, and performance