11 KiB
11 KiB
BMad-PRP Integration Expansion Pack
Overview
The BMad-PRP Integration Expansion Pack combines the structured planning and team coordination of BMad-Method with the optimized single-agent execution of PRPs-agentic-eng. This integration provides the best of both approaches: systematic planning with one-pass implementation success.
Features
🔄 Hybrid Workflow
- BMad Planning: Use PM, Architect, and SM agents for comprehensive planning
- PRP Execution: Convert stories to PRP format for optimized implementation
- Seamless Integration: Maintain traceability between frameworks
- Quality Gates: Comprehensive validation at each phase
🤖 Specialized Agents
- PRP Converter: Transforms BMad stories to PRP format
- PRP Executor: Manages PRP execution using PRPs-agentic-eng
- PRP Validator: Validates results and maps back to BMad format
- Hybrid Orchestrator: Coordinates the complete workflow
📋 Workflow Phases
- Planning Phase (BMad): Create PRD, architecture, and detailed stories
- PRP Generation: Convert stories to PRP format with comprehensive context
- Execution Phase (PRP): Execute PRPs for one-pass implementation
- Validation & Integration: Validate results and integrate back to BMad
Installation
Prerequisites
- BMad-Method v4.0+ installed
- Python 3.8+ (for PRP runner)
- PRPs-agentic-eng repository (for PRP runner)
Install the Expansion Pack
# Install BMad with PRP integration
npx bmad-method install --expansion-packs bmad-prp-integration
# Or install separately
npx bmad-method install-expansion bmad-prp-integration
Setup PRP Runner
# Clone PRPs-agentic-eng repository
git clone https://github.com/Wirasm/PRPs-agentic-eng.git
cd PRPs-agentic-eng
# Install Python dependencies
pip install -r requirements.txt
# Copy PRP runner to your project
cp PRPs/scripts/prp_runner.py /path/to/your/project/tools/
Usage
Basic Workflow
-
Start with BMad Planning:
@pm Create a PRD for user authentication system @architect Design the system architecture @sm Create detailed stories for authentication features -
Convert Stories to PRPs:
@prp-converter Convert story 1.1 to PRP format -
Execute PRPs:
@prp-executor Execute PRP for user authentication -
Validate Results:
@prp-validator Validate execution results @qa Review implementation quality
Advanced Workflow
Hybrid Orchestration
@hybrid-orchestrator Run complete hybrid workflow
Parallel Execution
@hybrid-orchestrator Run parallel workflow mode
Adaptive Execution
@hybrid-orchestrator Run adaptive workflow mode
Command Reference
PRP Converter Commands
@prp-converter convert-story <story-id>- Convert story to PRP@prp-converter validate-prp <prp-file>- Validate PRP format@prp-converter enhance-context <prp-file>- Enhance PRP context
PRP Executor Commands
@prp-executor execute <prp-file>- Execute PRP@prp-executor execute-interactive <prp-file>- Interactive execution@prp-executor execute-headless <prp-file>- Headless execution@prp-executor validate-environment- Validate execution environment
PRP Validator Commands
@prp-validator validate-results <execution-results>- Validate results@prp-validator map-to-story <results>- Map results to BMad format@prp-validator quality-assessment <results>- Quality assessment
Hybrid Orchestrator Commands
@hybrid-orchestrator run-workflow <mode>- Run complete workflow@hybrid-orchestrator status- Check workflow status@hybrid-orchestrator pause- Pause workflow@hybrid-orchestrator resume- Resume workflow
Configuration
Core Configuration
Add to your core-config.yaml:
prp:
enabled: true
runner-path: ./tools/prp_runner.py
templates-path: ./PRPs/templates
output-dir: ./PRPs
validation:
auto-validate: true
quality-gates: true
context-completeness: true
execution:
default-mode: interactive
timeout: 300000
verbose: false
Environment Setup
# Set up PRP environment
export PRP_RUNNER_PATH=./tools/prp_runner.py
export PRP_OUTPUT_DIR=./PRPs
export PRP_TEMPLATES_DIR=./PRPs/templates
Workflow Modes
Sequential Mode
- Execute phases in sequence
- Validation gates between phases
- Suitable for complex projects
Parallel Mode
- Execute compatible phases in parallel
- Dependency management
- Faster execution for simple projects
Adaptive Mode
- Dynamic workflow adjustment
- Context-aware decision making
- Intelligent error recovery
Quality Gates
Planning Quality Gate
- PRD complete and validated
- Architecture designed and documented
- Stories created with acceptance criteria
- All requirements captured
PRP Quality Gate
- PRP format valid
- Context complete and comprehensive
- Validation loops executable
- Traceability maintained
Execution Quality Gate
- Execution successful
- Code quality acceptable
- Tests passing
- Requirements met
Validation Quality Gate
- Acceptance criteria met
- Integration tests passing
- Quality standards met
- Documentation complete
Error Handling
Common Issues
PRP Runner Not Found
# Check if PRP runner is installed
ls tools/prp_runner.py
# Install PRP runner
cp /path/to/PRPs-agentic-eng/PRPs/scripts/prp_runner.py tools/
Python Environment Issues
# Check Python version
python --version
# Install dependencies
pip install -r requirements.txt
Context Completeness Issues
# Enhance PRP context
@prp-converter enhance-context <prp-file>
# Add missing documentation
@prp-converter add-documentation <prp-file> <doc-path>
Recovery Procedures
Execution Failures
- Check execution environment
- Validate PRP format and context
- Debug execution issues
- Fall back to BMad development workflow if needed
Validation Failures
- Address quality issues
- Fix failing tests
- Resolve integration problems
- Re-run validation phase
Testing
Run Tests
# Run unit tests
npm test -- expansion-packs/bmad-prp-integration/tests/unit/
# Run integration tests
npm test -- expansion-packs/bmad-prp-integration/tests/integration/
# Run end-to-end tests
npm test -- expansion-packs/bmad-prp-integration/tests/e2e/
Test Coverage
# Generate coverage report
npm run test:coverage -- expansion-packs/bmad-prp-integration/
Examples
Simple Feature Implementation
-
Create Story:
Story 1.1: User Login As a user, I want to login with email and password, so that I can access the application. Acceptance Criteria: - User can enter email and password - System validates credentials - User receives JWT token on success - Error message shown for invalid credentials -
Convert to PRP:
@prp-converter convert-story 1.1 -
Execute PRP:
@prp-executor execute PRPs/1.1.user-login.md -
Validate Results:
@prp-validator validate-results
Complex System Implementation
-
Planning Phase:
@pm Create PRD for e-commerce platform @architect Design microservices architecture @sm Create stories for all features -
PRP Generation:
@prp-converter convert-all-stories -
Parallel Execution:
@hybrid-orchestrator run-workflow parallel -
Integration Validation:
@prp-validator validate-integration @qa review-complete-system
Best Practices
PRP Creation
- Start with BMad Story: Use BMad story as foundation
- Enhance Context: Add comprehensive context and examples
- Validate Completeness: Ensure context completeness check passes
- Test Validation Loops: Verify validation loops are executable
- Maintain Traceability: Keep links to original BMad story
PRP Execution
- Environment Setup: Ensure proper execution environment
- Context Validation: Verify all context is available
- Progressive Validation: Run validation loops progressively
- Error Handling: Handle errors and provide recovery options
- Result Collection: Collect and validate execution results
Result Integration
- Quality Validation: Validate results against BMad standards
- Context Mapping: Map results back to BMad story format
- Documentation Update: Update story with execution results
- Workflow Continuation: Prepare for next BMad workflow phase
Troubleshooting
Debug Mode
# Enable debug logging
export PRP_DEBUG=true
export BMAD_DEBUG=true
# Run with verbose output
@prp-executor execute --verbose <prp-file>
Log Files
- PRP execution logs:
logs/prp-execution.log - BMad workflow logs:
logs/bmad-workflow.log - Integration logs:
logs/integration.log
Common Solutions
Context Issues
- Add missing documentation to PRP
- Enhance code examples and patterns
- Include known gotchas and constraints
Execution Issues
- Check Python environment and dependencies
- Validate PRP runner installation
- Verify file permissions and paths
Integration Issues
- Check BMad configuration
- Validate story format compatibility
- Ensure traceability is maintained
Contributing
Development Setup
# Clone the repository
git clone https://github.com/bmadcode/bmad-method.git
cd bmad-method
# Install dependencies
npm install
# Set up development environment
npm run setup:dev
Running Tests
# Run all tests
npm test
# Run specific test suite
npm test -- expansion-packs/bmad-prp-integration/
# Run with coverage
npm run test:coverage
Code Style
# Format code
npm run format
# Lint code
npm run lint
# Fix linting issues
npm run lint:fix
Support
Documentation
Community
Getting Help
- Check the documentation and examples
- Search existing issues and discussions
- Ask questions in the Discord community
- Create a new issue with detailed information
License
This expansion pack is licensed under the MIT License. See the LICENSE file for details.
Acknowledgments
- BMad-Method Team: For the core framework and support
- PRPs-agentic-eng Team: For the PRP methodology and runner
- Community Contributors: For feedback and improvements
Happy coding with BMad-PRP Integration! 🚀