Code Review Skill
Purpose
Review the completed implementation for quality issues before security review.
The review is read-only and tied to one approved spec.md.
Key input: .claude/specs/groups/<spec-group-id>/spec.md
Usage
/code-review <spec-group-id>
Prerequisites
Before dispatch:
- Spec group exists.
/unifyhas passed or produced a reviewable partial result.- Changed files and validation evidence are available.
- Tests relevant to the spec have run or failures are documented.
If prerequisites are missing, stop and run /unify or complete the missing
validation first.
Required Review Specialties
Every code-review report must include these four sections:
| review_specialty | Focus |
| ------------------ | ----- |
| style_naming | Redundancy, conventions, DRY, naming, API shape, local maintainability |
| test_quality | Assertion strength, vacuous truth, tautology, weak snapshots, isolation, determinism |
| adversarial | How this could pass incorrectly, false positives, happy-path bias, unproven invariants |
| holistic | Whole-change coherence, duplicate consolidation, severity normalization, final judgment |
Every finding must include review_specialty.
Process
- Load
manifest.json,spec.md, unifier output, changed-file list, and reviewer-focus metadata when present. - If a dispatch retry needs prior context, read
.claude/coordination/review-dispatch-prompt-<dispatch-id>.json. - Build review focus from reviewer-focus metadata, the spec's risk areas, contracts, edge cases, and validation evidence.
- Review changed files against the four specialties.
- Check tests for meaningful AC coverage and failure modes.
- Normalize duplicate findings and severity.
- Return pass/fail recommendation with concrete file references.
Finding Format
Each finding should include:
severity:critical,high,medium, orlowreview_specialtyfilelineissueimpactrecommendation
Output
Return:
status:pass,fail, orpartialfinding_count_by_severitytop_blockersfindingsresidual_risk
After a clean pass, update convergence:
node .claude/scripts/session-checkpoint.mjs update-convergence code_review