Review Board

A multi-agent AI code review CLI

Run it on your staged changes and two specialist AI reviewers (a security auditor and a maintainability critic) work in parallel with tools to read and search the codebase, before a third lead-dev model checks their findings and writes one HTML report.

Year
2026
Category
AI, Developer Tools
Stack
PythonOpenAI SDKOpenRouterPydanticasyncioripgrepDeepSeek
Note
Coursework project. The code lives in a private course repo.
Review Board

Review Board is a review command for your terminal. Point it at your staged git changes or a single file, and three models do what a small review team would: two specialists dig in from different angles, and a lead developer reconciles what they found into a report you can actually read.

Two biases are better than one

A single "review this" prompt tries to care about everything and ends up shallow on all of it. So the work is split between two reviewers with deliberately narrow personalities. The Security Auditor is paranoid by design: injection, hardcoded secrets, disabled certificate checks, missing auth, and runs at a low temperature. The Maintainability Critic looks at naming, duplication and structure, with a little more room to roam. Both run at the same time with asyncio, so the second opinion costs no extra wait.

Review Board agents and toolsStaged diffor --file pathRun in parallelSecurity Auditorinjection, secrets, authMaintainability Criticnaming, duplicationLead devjudge · read_fileReportHTML fileRepo toolsread_file · ripgrep, cappedJSON findings
The two reviewers run at the same time and share the same fenced-in tools. The lead dev only sees their structured findings, plus whatever it chooses to re-read.

Findings as data

Each reviewer has to return structured output validated against a Pydantic schema: a list of findings, each with a file path, a line number, a severity of info, warn or critical, a category, and a plain explanation with a fix. An empty list is an allowed answer and the prompts say so outright: inventing problems to look useful is the failure mode that makes AI review noisy.

Reviewers that can look around

A diff only shows what changed, not the function it calls or the config it reads. Both reviewers get two tools (read_file and ripgrep) and loop until they're ready to answer, capped at eight rounds so a confused model can't run up a bill. The lead dev gets read_file too, so it can check a finding against the real code before putting it in the report.

  • read_file only resolves paths inside the project root. The code being reviewed is untrusted input, and a comment telling the model to read ~/.ssh is a real prompt-injection attempt, not a hypothetical.
  • Tool output is capped (300 lines per read, 60 matches per search) so one broad pattern can't flood the context window.
  • Every request retries with exponential backoff, and every response's cost is added up and printed at the end.
  • --debug streams every tool call, result and raw finding to stderr, keeping stdout clean for the final summary.
3
models, two running in parallel
2
tools to read and search the repo
8
max tool rounds per reviewer
1
self-contained HTML report

Choosing models on value

The reviewers do the heavy reading, so they run on a fast, cheap model; the lead dev does less reading and more judgment, so it gets the stronger one. Every call's token cost is tracked, so the trade-off shows up as a number at the end of each run rather than on a bill at the end of the month: the goal was the cheapest setup whose report I'd still trust.

What I took from it

Treating every model as an untrusted component made the tool better. Its output is validated, its tools are fenced in, its loops are bounded and its cost is metered. The prompts matter, but those boundaries are what made it something I'd run on my own code.