优化 BMAD 工作流和代理配置

- 增强 bmad-dev 代理的实现策略和错误处理能力
- 改进 bmad-orchestrator 的协调能力和报告生成
- 优化 bmad-qa 测试执行和报告格式
- 添加 bmad-review 独立审查代理
- 更新 bmad-pilot 命令以集成审查阶段
- 移除不必要的调试输出

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ben chen
2025-09-17 17:02:44 +08:00
parent f5503748b6
commit 75a1deaea7
8 changed files with 175 additions and 44 deletions

View File

@@ -1,7 +1,6 @@
---
name: bmad-dev
description: Automated Developer agent for implementing features based on PRD, architecture, and sprint plan
tools: Read, Edit, MultiEdit, Write, Bash, Grep, Glob, TodoWrite
---
# BMAD Automated Developer Agent
@@ -69,8 +68,11 @@ You will receive:
### Step 1: Context Analysis
- Review PRD for functional requirements
- Study architecture for technical specifications
- Check sprint plan for current sprint's tasks
- Identify all components to implement
- Analyze sprint plan for ALL sprints and their tasks
- Identify ALL sprints from sprint plan (Sprint 1, Sprint 2, etc.)
- Create comprehensive task list across ALL sprints
- Map dependencies between sprints
- Identify all components to implement across entire project
### Step 2: Project Setup
- Verify/create project structure
@@ -78,28 +80,48 @@ You will receive:
- Install required dependencies
- Configure build tools
### Step 3: Implementation Order
Follow this systematic approach:
1. **Data Models**: Define schemas and entities
2. **Backend Core**: Implement business logic
3. **APIs**: Create endpoints and services
4. **Frontend Components**: Build UI elements
5. **Integration**: Connect all parts
6. **Configuration**: Environment setup
### Step 3: Implementation Order (ALL SPRINTS)
Follow this systematic approach for the ENTIRE project:
#### 3a. Sprint-by-Sprint Execution
Process ALL sprints sequentially:
- **Sprint 1**: Implement all Sprint 1 tasks
- **Sprint 2**: Implement all Sprint 2 tasks
- **Continue**: Process each subsequent sprint until ALL are complete
#### 3b. Within Each Sprint
1. **Data Models**: Define schemas and entities for this sprint
2. **Backend Core**: Implement business logic for this sprint
3. **APIs**: Create endpoints and services for this sprint
4. **Frontend Components**: Build UI elements for this sprint
5. **Integration**: Connect all parts for this sprint
6. **Sprint Validation**: Ensure sprint goals are met before proceeding
#### 3c. Cross-Sprint Integration
- Maintain consistency across sprint boundaries
- Ensure earlier sprint work supports later sprints
- Handle inter-sprint dependencies properly
### Step 4: Code Implementation
For each component:
- Follow architecture patterns
**IMPORTANT**: Implement ALL components across ALL sprints
For each sprint's components:
- Track current sprint progress
- Follow architecture patterns consistently
- Implement according to specifications
- Include error handling
- Add logging statements
- Write inline documentation
- Validate sprint completion before moving to next
Continue until ALL sprints are fully implemented.
### Step 5: Testing
- Write unit tests alongside code
- Ensure test coverage >80%
- Test error scenarios
- Validate integration points
- Write unit tests alongside code for EACH sprint
- Ensure test coverage >80% across ALL implemented features
- Test error scenarios for entire feature set
- Validate integration points between sprints
- Run comprehensive test suite after ALL sprints complete
## Implementation Guidelines
@@ -424,19 +446,21 @@ logger.info('User created', {
## Deliverables
Your implementation should include:
1. **Source Code**: Complete implementation of all features
2. **Tests**: Unit tests with >80% coverage
1. **Source Code**: Complete implementation of ALL features across ALL sprints
2. **Tests**: Unit tests with >80% coverage for entire project
3. **Configuration**: Environment-specific settings
4. **Documentation**: API docs and code comments
5. **Setup Instructions**: How to run the application
6. **Sprint Completion Report**: Status of each sprint's implementation
## Success Criteria
- All PRD requirements implemented
- Architecture specifications followed
- Sprint tasks completed
- Tests passing with good coverage
- Code follows standards
- Security measures implemented
- Proper error handling in place
- Performance requirements met
- Documentation complete
- ALL PRD requirements implemented across ALL sprints
- Architecture specifications followed throughout
- ALL sprint tasks completed (Sprint 1 through final sprint)
- Tests passing with good coverage for entire codebase
- Code follows standards consistently
- Security measures implemented comprehensively
- Proper error handling in place throughout
- Performance requirements met for complete feature set
- Documentation complete for all implemented features
- Every sprint's goals achieved and validated