Execute a PRP with validation loop, TDD workflow, and quality gates
Executes PRPs with systematic TDD workflow, validation gates, and quality checks.
/plugin marketplace add laurigates/claude-plugins/plugin install blueprint-plugin@lgates-claude-pluginsExecute a PRP (Product Requirement Prompt) with systematic implementation and validation.
Usage: /blueprint:prp-execute [prp-name]
Prerequisites:
docs/prps/[prp-name].md/blueprint:prp-create refinement)Execution Phases:
cat docs/prps/$PRP_NAME.md
Load all referenced ai_docs entries for context:
ai_docs/libraries/*.mdai_docs/project/patterns.mdBased on the Implementation Blueprint:
Run validation gates to establish baseline:
# Gate 1: Ensure linting passes before changes
[linting command from PRP]
# Gate 2: Ensure existing tests pass
[test command from PRP]
Expected: All gates pass (clean starting state)
If gates fail:
For each task in Implementation Blueprint:
Following TDD Requirements from PRP:
# Create test file if needed
# Write test case as specified in PRP
Run tests:
[test command]
Expected: New test FAILS (proves test is meaningful)
Write minimum code to pass the test:
Run tests:
[test command]
Expected: Test PASSES
Improve code while keeping tests green:
Run tests:
[test command]
Expected: Tests STILL PASS
After each significant change:
# Gate 1: Linting
[linting command]
# Gate 2: Type checking
[type check command]
# Gate 3: Unit tests
[test command]
If any gate fails:
Mark task as complete in TodoWrite:
✅ Task N: [Description]
Execute every gate from the PRP:
# Gate 1: Linting
[linting command]
# Expected: No errors
# Gate 2: Type Checking
[type check command]
# Expected: No errors
# Gate 3: Unit Tests
[unit test command]
# Expected: All pass
# Gate 4: Integration Tests (if applicable)
[integration test command]
# Expected: All pass
# Gate 5: Coverage Check
[coverage command]
# Expected: Meets threshold
# Gate 6: Security Scan (if applicable)
[security command]
# Expected: No high/critical issues
Check each success criterion from PRP:
If performance baselines defined:
# Run performance test
[performance command]
Compare results to baseline targets.
Generate completion report:
## PRP Execution Complete: [Feature Name]
### Implementation Summary
- **Tasks completed**: X/Y
- **Tests added**: N
- **Files modified**: [list]
### Validation Results
| Gate | Command | Result |
|------|---------|--------|
| Linting | `[cmd]` | ✅ Pass |
| Type Check | `[cmd]` | ✅ Pass |
| Unit Tests | `[cmd]` | ✅ Pass (N tests) |
| Integration | `[cmd]` | ✅ Pass |
| Coverage | `[cmd]` | ✅ 85% (target: 80%) |
### Success Criteria
- [x] Criterion 1: Verified via [method]
- [x] Criterion 2: Verified via [method]
- [x] Criterion 3: Verified via [method]
### New Gotchas Discovered
[Document any new gotchas for future reference]
### Recommendations
- [Any follow-up work suggested]
- [Updates to ai_docs recommended]
### Ready for:
- [ ] Code review
- [ ] Merge to main branch
If new patterns or gotchas discovered:
Move or annotate PRP as executed:
## Status: EXECUTED
**Executed on**: [date]
**Commit**: [hash]
**Notes**: [any notes]
If stuck in RED phase (test keeps failing):
When encountering areas not covered by PRP:
If unable to proceed:
question: "PRP execution complete. What would you like to do next?"
options:
- label: "Commit changes (Recommended)"
description: "Create a commit with conventional message for this feature"
- label: "Create work-order for follow-up"
description: "Package remaining work or enhancements"
- label: "Update ai_docs"
description: "Document new patterns or gotchas discovered"
- label: "Continue to next PRP"
description: "If there are more PRPs to execute"
- label: "I'm done for now"
description: "Exit - changes are saved locally"
Based on selection:
/git:commit or guide through commit/blueprint:work-order/blueprint:curate-docs for relevant patterns/blueprint:prp-execute [next]Tips: