| name | 04-review |
| description | Review code changes across five axes with evidence-first findings. Use after implementation is complete and before committing. |
Review
Use this skill after implementation to review changes against the diff, plan, and prior learnings.
See shared pipeline instructions for model routing and pipeline behavior.
Core rules
- Load project rules (4 steps):
- Load
rules/common/code-review.md
- Detect language from changed files via language detection
- Load matching language-specific rules (e.g.,
rules/typescript/)
- If frontend/browser changes, also load
rules/web/ files
- Priority: project-level
{repo-root}/rules/ overrides package defaults
- Determine diff scope before selecting reviewers
- Use
review_router tool to select reviewer personas based on diff metadata
- Read relevant plan artifact when exists
- Run solution search (see
references/solution-search.md):
- Extract keywords →
grep -rl "tags:.*keyword" docs/solutions/ ~/.pi/agent/docs/solutions/
- Read frontmatter only (first 15 lines) of matches → score by severity + tag relevance
- Fully read top 3 candidates
- Spec axis: when a plan artifact exists, compare diff against it — report missing requirements, scope creep (unrequested behaviour), and wrong implementation (looks done but isn't). Also trace back to the user's original wording (brainstorm scope) to catch directional misunderstandings the plan itself encoded. Skip if no plan.
- Produce structured findings using
references/findings-schema.md
- Autofixable findings: apply and re-review (max 3 iterations)
Review discipline
Code review is technical evaluation, not social performance:
- Verify before implementing any suggestion
- YAGNI check: question features nothing uses
- No performative agreement: verify before concurring
- Push back with reasoning when findings are incorrect
- Evidence before assertions: cite specific code, not principles
- Architecture axis: audit module depth and seams using
../references/module-design.md
Handling findings
- Read — complete all findings without reacting
- Verify — check each against codebase reality
- Evaluate — is it sound for THIS codebase?
- Act — fix confirmed issues, push back on incorrect ones
- Test — verify each fix individually, no regressions
Workflow
- Load context: consume latest handoff before any broad file reads —
context_handoff load or read .context/compound-engineering/handoffs/latest.md. If found, use activeFiles, artifacts.plan as starting point. If not found, proceed normally. Read CONTEXT.md if it exists at root — see ../references/domain-language.md.
- Determine diff scope from branch or explicit target
- Collect stats (files, insertions, deletions) → call
review_router
- Read matching plan artifact
- Run solution search
- Apply each reviewer persona from
review_router
- Merge into structured findings
- Verify each finding against codebase
- Apply autofixes, re-run tests, re-review if needed
Optional: QA Test Mode
After code review complete, offer browser QA:
Code review done. Run browser QA?
- A) Done — stop here
- B) Browser QA — find visual/functional bugs
- C) QA + regression tests — find bugs, fix, add tests
If B or C: read references/qa-test-mode.md and execute workflow.
After QA: include findings in handoff, note fix commits/test files.
Handoff
See references/handoff.md for format.
Before finishing this skill, apply the completion checklist in shared pipeline instructions.