Executes a Markdown plan file step-by-step: detects package manager, prepares git branch, implements tasks with pattern mirroring, validates after every change.
From everything-claude-codenpx claudepluginhub affaan-m/everything-claude-code --plugin everything-claude-code<path/to/plan.md>/prp-implementExecutes a Markdown implementation plan, applying file changes with validation loops after each step to catch and fix issues early.
/prp-implementExecutes a Markdown plan file step-by-step: detects package manager, prepares git branch, implements tasks with pattern mirroring, validates after every change.
/prp-implementExecutes a Markdown implementation plan, applying file changes with validation loops after each step to catch and fix issues early.
/prp-implementExecutes a Markdown plan file step-by-step: detects package manager, prepares git branch, implements tasks with pattern mirroring, validates after every change.
/prp-implementEnhanced prp-implement. Extends prp-core:prp-implement with: cross-session memory restored before execution, Context7 library verification before each task that calls external APIs, KB consultation for implementation decisions, and continuous drift-guard checks that anchor every task to the original acceptance criteria. Use exactly as prp-core:prp-implement — pass the path to a .plan.md file.
/prp-implementExecutes a Markdown plan file step-by-step: detects package manager, prepares git branch, implements tasks with pattern mirroring, validates after every change.
Adapted from PRPs-agentic-eng by Wirasm. Part of the PRP workflow series.
Execute a plan file step-by-step with continuous validation. Every change is verified immediately — never accumulate broken state.
Core Philosophy: Validation loops catch mistakes early. Run checks after every change. Fix issues immediately.
Golden Rule: If a validation fails, fix it before moving on. Never accumulate broken state.
| File Exists | Package Manager | Runner |
|---|---|---|
bun.lockb | bun | bun run |
pnpm-lock.yaml | pnpm | pnpm run |
yarn.lock | yarn | yarn |
package-lock.json | npm | npm run |
pyproject.toml or requirements.txt | uv / pip | uv run or python -m |
Cargo.toml | cargo | cargo |
go.mod | go | go |
Check package.json (or equivalent) for available scripts:
# For Node.js projects
cat package.json | grep -A 20 '"scripts"'
Note available commands for: type-check, lint, test, build.
Read the plan file:
cat "$ARGUMENTS"
Extract these sections from the plan:
If the file doesn't exist or isn't a valid plan:
Error: Plan file not found or invalid.
Run /prp-plan <feature-description> to create a plan first.
CHECKPOINT: Plan loaded. All sections identified. Tasks extracted.
git branch --show-current
git status --porcelain
| Current State | Action |
|---|---|
| On feature branch | Use current branch |
| On main, clean working tree | Create feature branch: git checkout -b feat/{plan-name} |
| On main, dirty working tree | STOP — Ask user to stash or commit first |
| In a git worktree for this feature | Use the worktree |
git pull --rebase origin $(git branch --show-current) 2>/dev/null || true
CHECKPOINT: On correct branch. Working tree ready. Remote synced.
Process each task from the plan sequentially.
For each task in Step-by-Step Tasks:
Read MIRROR reference — Open the pattern file referenced in the task's MIRROR field. Understand the convention before writing code.
Implement — Write the code following the pattern exactly. Apply GOTCHA warnings. Use specified IMPORTS.
Validate immediately — After EVERY file change:
# Run type-check (adjust command per project)
[type-check command from Phase 0]
If type-check fails → fix the error before moving to the next file.
Track progress — Log: [done] Task N: [task name] — complete
If implementation must deviate from the plan:
CHECKPOINT: All tasks executed. Deviations logged.
Run all validation levels from the plan. Fix issues at each level before proceeding.
# Type checking — zero errors required
[project type-check command]
# Linting — fix automatically where possible
[project lint command]
[project lint-fix command]
If lint errors remain after auto-fix, fix manually.
Write tests for every new function (as specified in the plan's Testing Strategy).
[project test command for affected area]
[project build command]
Build must succeed with zero errors.
# Start server, run tests, stop server
[project dev server command] &
SERVER_PID=$!
# Wait for server to be ready (adjust port as needed)
SERVER_READY=0
for i in $(seq 1 30); do
if curl -sf http://localhost:PORT/health >/dev/null 2>&1; then
SERVER_READY=1
break
fi
sleep 1
done
if [ "$SERVER_READY" -ne 1 ]; then
kill "$SERVER_PID" 2>/dev/null || true
echo "ERROR: Server failed to start within 30s" >&2
exit 1
fi
[integration test command]
TEST_EXIT=$?
kill "$SERVER_PID" 2>/dev/null || true
wait "$SERVER_PID" 2>/dev/null || true
exit "$TEST_EXIT"
Run through edge cases from the plan's Testing Strategy checklist.
CHECKPOINT: All 5 validation levels pass. Zero errors.
mkdir -p .claude/PRPs/reports
Write report to .claude/PRPs/reports/{plan-name}-report.md:
# Implementation Report: [Feature Name]
## Summary
[What was implemented]
## Assessment vs Reality
| Metric | Predicted (Plan) | Actual |
|---|---|---|
| Complexity | [from plan] | [actual] |
| Confidence | [from plan] | [actual] |
| Files Changed | [from plan] | [actual count] |
## Tasks Completed
| # | Task | Status | Notes |
|---|---|---|---|
| 1 | [task name] | [done] Complete | |
| 2 | [task name] | [done] Complete | Deviated — [reason] |
## Validation Results
| Level | Status | Notes |
|---|---|---|
| Static Analysis | [done] Pass | |
| Unit Tests | [done] Pass | N tests written |
| Build | [done] Pass | |
| Integration | [done] Pass | or N/A |
| Edge Cases | [done] Pass | |
## Files Changed
| File | Action | Lines |
|---|---|---|
| `path/to/file` | CREATED | +N |
| `path/to/file` | UPDATED | +N / -M |
## Deviations from Plan
[List any deviations with WHAT and WHY, or "None"]
## Issues Encountered
[List any problems and how they were resolved, or "None"]
## Tests Written
| Test File | Tests | Coverage |
|---|---|---|
| `path/to/test` | N tests | [area covered] |
## Next Steps
- [ ] Code review via `/code-review`
- [ ] Create PR via `/prp-pr`
If this implementation was for a PRD phase:
in-progress to completemkdir -p .claude/PRPs/plans/completed
mv "$ARGUMENTS" .claude/PRPs/plans/completed/
CHECKPOINT: Report created. PRD updated. Plan archived.
Report to user:
## Implementation Complete
- **Plan**: [plan file path] → archived to completed/
- **Branch**: [current branch name]
- **Status**: [done] All tasks complete
### Validation Summary
| Check | Status |
|---|---|
| Type Check | [done] |
| Lint | [done] |
| Tests | [done] (N written) |
| Build | [done] |
| Integration | [done] or N/A |
### Files Changed
- [N] files created, [M] files updated
### Deviations
[Summary or "None — implemented exactly as planned"]
### Artifacts
- Report: `.claude/PRPs/reports/{name}-report.md`
- Archived Plan: `.claude/PRPs/plans/completed/{name}.plan.md`
### PRD Progress (if applicable)
| Phase | Status |
|---|---|
| Phase 1 | [done] Complete |
| Phase 2 | [next] |
| ... | ... |
> Next step: Run `/prp-pr` to create a pull request, or `/code-review` to review changes first.
completed//code-review to review changes before committing/prp-commit to commit with a descriptive message/prp-pr to create a pull request/prp-plan <next-phase> if the PRD has more phases