5.0 KiB
5.0 KiB
Execute PRP with Incremental Validation
PRP File: $ARGUMENTS
Execute a PRP (Pre-Requirements Plan) in phases with validation points between each step for controlled, incremental implementation.
Execution Process
1. Load and Plan
- Read the PRP file completely to understand all requirements
- Extract research context, tech stack, and validation commands
- Create implementation plan using TodoWrite tool
- Identify the phases and validation points from the PRP
2. Phase-by-Phase Execution
For each phase in the PRP:
-
Announce Phase Start
- Clear statement of which phase is beginning
- List the specific deliverables for this phase
- Estimate time/complexity for the phase
-
Implement Phase Requirements
- Follow the PRP's instructions for this phase
- Use referenced patterns from the codebase
- Apply the documented error handling strategy
- Create only the code specified for this phase
-
Run Validation
- Execute phase-specific validation commands from PRP
- Run any automated tests defined
- Check for compilation/syntax errors
- Verify the phase deliverables are complete
-
User Checkpoint
- Show what was implemented with file paths
- Provide manual testing steps from PRP
- Report validation results clearly
- Wait for user feedback before proceeding
3. Phase Structure
Standard progression (from PRP template):
- Setup Phase: File structure, types, interfaces, configuration
- Core Phase: Main functionality implementation
- Integration Phase: Connect with existing systems
- Testing Phase: Unit and integration tests
- Polish Phase: Error handling, edge cases, documentation
Each phase should:
- Output working, testable code
- Have clear success criteria
- Include manual testing instructions
- Build incrementally on previous phases
4. Validation Protocol
# Run validation commands from PRP
npm run type-check # or project-specific command
npm run lint
npm run test
# Report results clearly
echo "✓ Type checking passed"
echo "✓ Linting passed"
echo "⚠ 2 tests pending implementation"
# Fix any failures before proceeding
# If validation fails, stop and fix before continuing
5. User Checkpoints
After completing each phase:
- Implementation Summary: List all files created/modified
- Validation Results: Show output from validation commands
- Manual Testing: Provide specific steps for user to test
- Next Phase Preview: Brief description of what comes next
Wait for user response:
- "continue" → Proceed to next phase
- "fix [issue]" → Address specific problem
- Other feedback → Incorporate before continuing
Control Commands During Execution
Navigation Commands
continue- Proceed to next phasepause- Stop for manual interventionstatus- Show current phase and progressrestart phase- Redo current phase from beginningskip to [phase]- Jump to specific phase (with warning)
Correction Commands
fix [issue]- Address specific problemrollback- Undo current phase changesvalidate- Re-run validation commandsdebug- Show detailed error information
Information Commands
show plan- Display full implementation planshow prp- Display relevant PRP sectionprogress- Show overall completion statushelp- Show available commands
Execution Modes
Standard Mode (Default)
- Stop at each checkpoint for user confirmation
- Show all validation results
- Require explicit "continue" to proceed
Auto Mode (When specified)
- Continue automatically if validation passes
- Stop only on errors or warnings
- Still show progress updates
Debug Mode
- Extra verbose output
- Show all command executions
- Detailed error traces
Error Handling
Validation Failures
- Stop execution immediately
- Show clear error message
- Suggest fix if possible
- Wait for user instruction
Missing Dependencies
- Identify what's missing
- Suggest installation command
- Pause for user to install
- Retry after installation
Ambiguous Requirements
- Flag the ambiguity
- Show PRP section in question
- Ask for clarification
- Update understanding and proceed
Completion
Final Validation
- Run complete test suite
- Verify all PRP requirements met
- Check success criteria achieved
- Generate coverage report if applicable
Deliverables
- Summary of all changes made
- Documentation updates completed
- Usage examples created
- Any remaining TODOs noted
Handoff
- Provide clear usage documentation
- List any manual steps needed
- Note any deferred items
- Suggest next steps
Important Notes
- Always wait for user confirmation between phases unless explicitly told to continue automatically
- Never skip validation even if it seems unnecessary
- Document any deviations from the PRP with clear reasoning
- Preserve existing code unless PRP specifically says to modify
- Test incrementally rather than waiting until the end
The goal is controlled, validated, incremental delivery that builds confidence at each step.