Execute an implementation plan with rigorous validation loops
Executes implementation plans with rigorous validation loops and automated testing.
/plugin marketplace add Wirasm/PRPs-agentic-eng/plugin install prp-core@prp-marketplace<path/to/plan.md>Plan: $ARGUMENTS
Execute the plan end-to-end with rigorous self-validation. You are autonomous.
Core Philosophy: Validation loops catch mistakes early. Run checks after every change. Fix issues immediately. The goal is a working implementation, not just code that exists.
Golden Rule: If a validation fails, fix it before moving on. Never accumulate broken state.
cat $ARGUMENTS
Locate and understand:
If plan not found:
Error: Plan not found at $ARGUMENTS
Create a plan first: /prp-plan "feature description"
PHASE_1_CHECKPOINT:
git branch --show-current
git status --porcelain
git worktree list
| Current State | Action |
|---|---|
| In worktree | Use it (log: "Using worktree") |
| On main, clean | Create branch: git checkout -b feature/{plan-slug} |
| On main, dirty | STOP: "Stash or commit changes first" |
| On feature branch | Use it (log: "Using existing branch") |
git fetch origin
git pull --rebase origin main 2>/dev/null || true
PHASE_2_CHECKPOINT:
For each task in the plan's Step-by-Step Tasks section:
After EVERY file change, run:
bun run type-check
If types fail:
Log each task as you complete it:
Task 1: CREATE src/features/x/models.ts ✅
Task 2: CREATE src/features/x/service.ts ✅
Task 3: UPDATE src/routes/index.ts ✅
Deviation Handling: If you must deviate from the plan:
PHASE_3_CHECKPOINT:
bun run type-check && bun run lint
Must pass with zero errors.
If lint errors:
bun run lint:fixYou MUST write or update tests for new code. This is not optional.
Test requirements:
Write tests, then run:
bun test
If tests fail:
bun run build
Must complete without errors.
If the plan involves API/server changes:
# Start server in background
bun run dev &
SERVER_PID=$!
sleep 3
# Test endpoints
curl -s http://localhost:3000/health | jq
curl -s http://localhost:3000/test/message \
-X POST \
-H "Content-Type: application/json" \
-d '{"conversationId":"test","message":"/status"}'
# Stop server
kill $SERVER_PID
Run any edge case tests specified in the plan.
PHASE_4_CHECKPOINT:
bun run type-check passesbun run lint passes (0 errors)bun test passes (all green)bun run build succeedsmkdir -p .claude/PRPs/reports
Path: .claude/PRPs/reports/{plan-name}-report.md
# Implementation Report
**Plan**: `$ARGUMENTS`
**Source Issue**: #{number} (if applicable)
**Branch**: `{branch-name}`
**Date**: {YYYY-MM-DD}
**Status**: {COMPLETE | PARTIAL}
---
## Summary
{Brief description of what was implemented}
---
## Assessment vs Reality
Compare the original investigation's assessment with what actually happened:
| Metric | Predicted | Actual | Reasoning |
| ---------- | ----------- | -------- | ------------------------------------------------------------------------------ |
| Complexity | {from plan} | {actual} | {Why it matched or differed - e.g., "discovered additional integration point"} |
| Confidence | {from plan} | {actual} | {e.g., "root cause was correct" or "had to pivot because X"} |
**If implementation deviated from the plan, explain why:**
- {What changed and why - based on what you discovered during implementation}
---
## Tasks Completed
| # | Task | File | Status |
| --- | ------------------ | ---------- | ------ |
| 1 | {task description} | `src/x.ts` | ✅ |
| 2 | {task description} | `src/y.ts` | ✅ |
---
## Validation Results
| Check | Result | Details |
| ----------- | ------ | --------------------- |
| Type check | ✅ | No errors |
| Lint | ✅ | 0 errors, N warnings |
| Unit tests | ✅ | X passed, 0 failed |
| Build | ✅ | Compiled successfully |
| Integration | ✅/⏭️ | {result or "N/A"} |
---
## Files Changed
| File | Action | Lines |
| ---------- | ------ | --------- |
| `src/x.ts` | CREATE | +{N} |
| `src/y.ts` | UPDATE | +{N}/-{M} |
---
## Deviations from Plan
{List any deviations with rationale, or "None"}
---
## Issues Encountered
{List any issues and how they were resolved, or "None"}
---
## Tests Written
| Test File | Test Cases |
| --------------- | ------------------------ |
| `src/x.test.ts` | {list of test functions} |
---
## Next Steps
- [ ] Review implementation
- [ ] Create PR: `gh pr create` (if applicable)
- [ ] Merge when approved
Check if plan was generated from a PRD:
Source PRD: referenceIf PRD source exists:
in-progress to completemkdir -p .claude/PRPs/plans/completed
mv $ARGUMENTS .claude/PRPs/plans/completed/
PHASE_5_CHECKPOINT:
.claude/PRPs/reports/## Implementation Complete
**Plan**: `$ARGUMENTS`
**Source Issue**: #{number} (if applicable)
**Branch**: `{branch-name}`
**Status**: ✅ Complete
### Validation Summary
| Check | Result |
| ---------- | --------------- |
| Type check | ✅ |
| Lint | ✅ |
| Tests | ✅ ({N} passed) |
| Build | ✅ |
### Files Changed
- {N} files created
- {M} files updated
- {K} tests written
### Deviations
{If none: "Implementation matched the plan."}
{If any: Brief summary of what changed and why}
### Artifacts
- Report: `.claude/PRPs/reports/{name}-report.md`
- Plan archived to: `.claude/PRPs/plans/completed/`
{If from PRD:}
### PRD Progress
**PRD**: `{prd-file-path}`
**Phase Completed**: #{number} - {phase name}
| # | Phase | Status |
|---|-------|--------|
{Updated phases table showing progress}
**Next Phase**: {next pending phase, or "All phases complete!"}
{If next phase can parallel: "Note: Phase {X} can also start now (parallel)"}
To continue: `/prp-plan {prd-path}`
### Next Steps
1. Review the report (especially if deviations noted)
2. Create PR: `gh pr create` or `/prp-pr`
3. Merge when approved
{If more phases: "4. Continue with next phase: `/prp-plan {prd-path}`"}
bun run type-checkbun run lint:fix for auto-fixable issuesbun run type-check exits 0bun run lint exits 0 (warnings OK)bun test all greenbun run build succeeds