Lesson 7 of 7 · Individual agent
The Code Reviewer agent
Sometimes we want a review of what we've been working on — including what the AI has produced. The Code Reviewer is built exactly for this: a structured quality check before treating work as complete. In the Orchestrator stream, this same review step becomes the final SDLC stage.
When to use the Code Reviewer
- Giving an overall quality summary plus a clear decision: APPROVED or REQUEST CHANGES.
- Ranking findings by severity — High, Medium, Low — each with file, line number, rule violated, and a copy-paste-ready fix.
- Cross-file consistency checks across a whole change set, not just one file at a time.
- Assessing breaking changes and their impact on existing consumers.
- Flagging dependencies with known CVEs (CVSS ≥ 7.0) or more than one major version behind.
How to use the Code Reviewer
- Give a short summary of the feature or change.
- Point the Code Reviewer at the changed files, or a git diff.
- State the intended behaviour and include test results if you have them.
- Call out any known concerns or areas you specifically want reviewed.
- Expect back: quality summary, APPROVED/REQUEST CHANGES verdict, standards discovered, severity-ranked findings, cross-file notes, breaking-change assessment, CVE flags.
"I've just added authentication middleware and role-based route guards across the API. The changed files are src/middleware/auth.ts, src/middleware/roleGuard.ts, and src/routes/admin.ts. Can you review for security issues, standard compliance, and any breaking changes to existing API consumers?"
Where the Code Reviewer fits in the Orchestrator: the Code Reviewer runs as Stage 5, using the changed files from the Coder and test results from the Unit Tester. Blocking issues bounce back to the Coder for remediation, then the Code Reviewer re-runs — up to two cycles before escalating to you. Stage 6 is the Orchestrator's own consolidated report.
Things to avoid
- Using the Code Reviewer before there's a concrete change to review — the Code Reviewer needs actual modified files, not ideas or plans.
- Asking the Code Reviewer to write or fix code; the Code Reviewer only reviews and suggests.
- If you need the change implemented, use the Coder first, then come back to the reviewer.
Test your knowledge
"I merged a coder-written auth middleware and want a second opinion before opening the PR." Which agent?
Source: documentation.md, "Code Reviewer".