reviewer
Phase 4 structural review agent. Reviews a change on five dimensions and writes the review verdict the change should pass before it ships.
| Source | .claude/agents/reviewer.md |
| Owner | testing |
| Runtime | claude-code |
| Risk | high |
| Writes | tasks/reviews/*-verdict.md |
The reviewer audits code structure and writes tasks/reviews/YYMMDD-name-verdict.md with a PASS, WARN or FAIL verdict. No hook blocks a commit on the verdict. The ship check runs only lint, related tests and a type-check. It does not review runtime behavior (evaluator) or security (security).
It runs on opus. Tools: Read, Grep, Glob, Bash, Write, Task, Edit. Per-runtime model pins are on Agent models.
When to use
It runs in Phase 4 after the developer finishes and the tester confirms green. Use /mk:review to call it directly on a branch diff (the default), a PR number such as #123, a commit hash or --pending for uncommitted changes.
Five dimensions
It evaluates all five on every review. An unevaluated dimension is a FAIL, never a skip.
| Dimension | What it checks |
|---|---|
| Correctness | No critical or major bugs. Logic matches requirements. Architecture fits existing patterns. |
| Maintainability | Readable, follows conventions, no any types or unsafe casts. |
| Performance | No N+1 queries, no blocking calls in async code, no needless re-renders, no unbounded fetches. |
| Security | The checklist in .claude/rules/security-rules.md. A security agent BLOCK is an automatic FAIL here. |
| Coverage | Acceptance criteria are tested, edge cases covered, tests check behavior. With TDD on, gaps are FAIL. With TDD off, gaps are WARN and a repo with no tests is permitted. Test order is never graded in default mode. |
Verdicts
| Verdict | Route |
|---|---|
| PASS | shipper |
| WARN | Shipper, with acknowledged warnings. Each WARN needs a three-part justification (what it means, why it is acceptable, what would make it a FAIL), or it becomes a FAIL. |
| FAIL | Back to developer with a required-changes checklist |
The verdict file has a section per dimension, Required Changes (on FAIL) and non-blocking Suggestions.
How it reviews
It loads the plan, ADRs, the diff, the tests, docs/project-context.md and any red-team-findings.md. mk:review runs the multi-pass flow: three base reviewers in parallel (a diff-only Blind Hunter, an Edge Case Hunter, and a Criteria Auditor that maps plan criteria to code), then adversarial persona passes. Small diffs get the Blind Hunter only. Zero findings triggers a mandatory second look. For deeper checks it uses mk:scout (changes over three files), mk:cso and mk:vulnerability-scanner (security concerns), and mk:elicit after the verdict for a second pass.
It owns tasks/reviews/*-verdict.md, not *-evalverdict.md or *-security-verdict.md. It writes no code.