Code Review and Quality
Overview
Multi-dimensional code review with quality gates. Every change gets reviewed before merge — no exceptions. Review covers five axes: correctness, readability, architecture, security, and performance.
The approval standard: Approve a change when it definitely improves overall code health, even if it isn't perfect. Perfect code doesn't exist — the goal is continuous improvement. Don't block a change because it isn't exactly how you would have written it.
Universal Rules
- Review every change before merge. No exceptions. "It's small" is not an exemption.
- Review tests first. Tests reveal intent and coverage before you read a line of implementation.
- Label every finding. Use Critical / Nit / Optional / FYI prefixes so the author knows what's required.
- Approve improvements, not perfection. If the change improves overall code health, approve it.
- Don't rubber-stamp. "LGTM" without evidence of review helps no one. Quantify problems when possible.
- Split large changes. Ask the author to split anything over ~300 lines rather than reviewing one massive changeset.
- Require cleanup before merge. Don't accept "I'll fix it later" — later never comes.
- Treat dependency additions as changes. Every new dependency needs justification: size, maintenance status, license, known vulnerabilities.
- Quote before flagging. Every finding must include the specific lines that support it. "This function looks risky" without a quote is an opinion, not a finding. If you can't quote the evidence, you don't have a finding yet.
Red Flags
- PRs merged without any review
- Review that only checks if tests pass (ignoring other axes)
- "LGTM" without evidence of actual review
- Security-sensitive changes without security-focused review
- Large PRs that are "too big to review properly" (split them)
- No regression tests with bug fix PRs
- Review comments without severity labels
- Accepting "I'll fix it later"
Verification
After review is complete:
Tier discipline
Tier definitions: review-tiers (.claude/rules/review-tiers.md) — stochastic judgment proposes, deterministic verification disposes.
- Tier 0: the CI gates themselves (tests, build, linters, validators). These hard-block on their own authority; cite them instead of re-finding what they catch.
- Tier 1 (may gate, evidence attached): correctness and security findings demonstrated by a failing test, failing command, or concrete counterexample input — the artifact is the gate, the review only chose which artifact to produce. The missing-regression-test blocker is Tier 1: the evidence is the absent test.
- Tier 2 (advisory, never gates): readability, architecture taste, "could be simpler", unevidenced performance concerns. Severity labels (Critical, blocking) on unevidenced findings are proposals to the operator, not gates — log them to findings-ledger rather than writing blocking language.
References
- references/review-axes.md — Five-axis review checklist: correctness, readability, architecture, security, performance
- references/review-process.md — Step-by-step process, change sizing, descriptions, multi-model pattern, dead code hygiene, disagreements, honesty, dependency discipline, full review checklist
- references/security-checklist.md — Detailed security review guidance
- references/performance-checklist.md — Performance review checks
Related skills
- skill-library-review — applies the same review discipline to agent and skill definitions rather than source code
- adversarial-claims-reviewer — applies the same adversarial discipline to formal/technical claims in documents rather than source code
- findings-ledger — where this skill's Tier 2 (unevidenced) findings get recorded and tallied for recurrence
1---2name: code-review-and-quality3description: Conducts multi-axis code review across correctness, readability, architecture, security, and performance. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Triggers on "review my PR", "review this diff", "code review", "review this changeset", "is this ready to merge", "pre-merge review".4---56# Code Review and Quality78## Overview910Multi-dimensional code review with quality gates. Every change gets reviewed before merge — no exceptions. Review covers five axes: correctness, readability, architecture, security, and performance.1112**The approval standard:** Approve a change when it definitely improves overall code health, even if it isn't perfect. Perfect code doesn't exist — the goal is continuous improvement. Don't block a change because it isn't exactly how you would have written it.1314## Universal Rules15161. **Review every change before merge.** No exceptions. "It's small" is not an exemption.172. **Review tests first.** Tests reveal intent and coverage before you read a line of implementation.183. **Label every finding.** Use Critical / Nit / Optional / FYI prefixes so the author knows what's required.194. **Approve improvements, not perfection.** If the change improves overall code health, approve it.205. **Don't rubber-stamp.** "LGTM" without evidence of review helps no one. Quantify problems when possible.216. **Split large changes.** Ask the author to split anything over ~300 lines rather than reviewing one massive changeset.227. **Require cleanup before merge.** Don't accept "I'll fix it later" — later never comes.238. **Treat dependency additions as changes.** Every new dependency needs justification: size, maintenance status, license, known vulnerabilities.249. **Quote before flagging.** Every finding must include the specific lines that support it. "This function looks risky" without a quote is an opinion, not a finding. If you can't quote the evidence, you don't have a finding yet.2526## Red Flags2728- PRs merged without any review29- Review that only checks if tests pass (ignoring other axes)30- "LGTM" without evidence of actual review31- Security-sensitive changes without security-focused review32- Large PRs that are "too big to review properly" (split them)33- No regression tests with bug fix PRs34- Review comments without severity labels35- Accepting "I'll fix it later"3637## Verification3839After review is complete:4041- [ ] All Critical issues are resolved42- [ ] All Important issues are resolved or explicitly deferred with justification43- [ ] Every finding is backed by a specific quoted passage from the actual code44- [ ] No findings were generated from assumed code structure — only from what was read45- [ ] Tests pass46- [ ] Build succeeds47- [ ] The verification story is documented (what changed, how it was verified)4849## Tier discipline5051Tier definitions: review-tiers (`.claude/rules/review-tiers.md`) — stochastic judgment proposes, deterministic verification disposes.5253- **Tier 0:** the CI gates themselves (tests, build, linters, validators). These hard-block on their own authority; cite them instead of re-finding what they catch.54- **Tier 1 (may gate, evidence attached):** correctness and security findings demonstrated by a failing test, failing command, or concrete counterexample input — the artifact is the gate, the review only chose which artifact to produce. The missing-regression-test blocker is Tier 1: the evidence is the absent test.55- **Tier 2 (advisory, never gates):** readability, architecture taste, "could be simpler", unevidenced performance concerns. Severity labels (Critical, blocking) on unevidenced findings are *proposals to the operator*, not gates — log them to [findings-ledger](../findings-ledger/SKILL.md) rather than writing blocking language.5657## References5859- [references/review-axes.md](references/review-axes.md) — Five-axis review checklist: correctness, readability, architecture, security, performance60- [references/review-process.md](references/review-process.md) — Step-by-step process, change sizing, descriptions, multi-model pattern, dead code hygiene, disagreements, honesty, dependency discipline, full review checklist61- [references/security-checklist.md](references/security-checklist.md) — Detailed security review guidance62- [references/performance-checklist.md](references/performance-checklist.md) — Performance review checks6364## Related skills6566- [skill-library-review](../skill-library-review/SKILL.md) — applies the same review discipline to agent and skill definitions rather than source code67- [adversarial-claims-reviewer](../adversarial-claims-reviewer/SKILL.md) — applies the same adversarial discipline to formal/technical claims in documents rather than source code68- [findings-ledger](../findings-ledger/SKILL.md) — where this skill's Tier 2 (unevidenced) findings get recorded and tallied for recurrence