PRP Implement
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.
Phase 0 — DETECT
Package Manager Detection
| 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 |
Validation Scripts
Check package.json (or equivalent) for available scripts:
bash
# For Node.js projects
cat package.json | grep -A 20 '"scripts"'Note available commands for: type-check, lint, test, build.
Phase 1 — LOAD
Read the plan file:
bash
cat "$ARGUMENTS"Extract these sections from the plan:
- Summary — What is being built
- Patterns to Mirror — Code conventions to follow
- Files to Change — What to create or modify
- Step-by-Step Tasks — Implementation sequence
- Validation Commands — How to verify correctness
- Acceptance Criteria — Definition of done
If the file doesn't exist or isn't a valid plan:
Error: Plan file not found or invalid.