Review
Run agb review: a read-only single-pass, delta, or seam-only lens fleet over a diff, with ref forms and exit semantics.
agb review prosecutes an existing diff without building or merging anything. Point it at a repo and a ref, and a set of read-only specialist lenses reviews the diff in parallel with blast-radius risk-tiered model routing and a 3-tier hybrid Arbiter.
Run it
agb review # current directory, uncommitted changes vs HEAD
agb review /path/to/repo # another repo
agb review . main...HEAD # everything on this branch since it left main
agb review . main...HEAD --five-lens
agb review . HEAD~1 --delta HEAD~1 --prior-findings .review/last-findings.json
agb review . <pre-run-sha> --seams-only --plan-file plan.jsonBoth arguments are optional: the repo defaults to . and is resolved to an absolute path (repo default: C11). The flags are listed in the review CLI reference. Inside Antigravity the same command is available as /agb-review and the agb_review MCP tool (see Headless and MCP).
Ref forms
The ref is passed straight to git diff <ref>; without one, agb runs git diff HEAD (reviewDiff).
| You pass | Diff reviewed |
|---|---|
| (nothing) | Uncommitted changes to tracked files against HEAD (staged and unstaged; untracked files are not included) |
main...HEAD | Changes on the current branch since its merge base with main (a PR-style diff) |
A..B | Changes between two commits |
<sha> | Changes from that commit to the working tree |
If the diff is empty, agb review prints review: empty diff — nothing to prosecute and exits 0 without calling any model (empty diff).
What the fleet does
- Quota first. Quota telemetry is refreshed from
agy. If it is unavailable, the command exits1before any review runs (quota check). - Context pack & blast-radius routing.
agbstrips lockfile/snapshot noise before the180,000-char truncation check, computes a blast-radius tier (low/medium/highvia CodeGraph when.codegraph/exists, or static-AST fallback), and locks static-diff lenses to 1 turn (read_file(*)denied unlesscontextPack.truncatedContext === true). See Token efficiency. - Optional System-1 lens gating. When a System-1 Decision Engine is active (auto-detected via
GEMINI_API_KEYfor Google's Gemini Decisions API),gateReviewLenses()skips lenses only when defect probability< 0.15and confidence>= 0.85. - Lenses. Runs either 4 lenses (
correctness,security,tests,contracts) or 5 ARL lenses (--five-lens:correctness_redteam,security,simplicity,evidence_runner,anti_slop) in parallel as read-only workers with a strict JSON findings schema. - Single-pass default & 3-tier hybrid Arbiter. Static diffs run 1 pass (
dryRounds=1,maxRounds=1) by default so identical diffs are never re-billed unnecessarily. Findings are triaged via the 3-tier Arbiter cascade: System-1 typed triage (when active) → deterministic fast-path (<= 4disjoint, non-blast_radiusfindings) → System-2 LLM Arbiter. Open findings are persisted to.review/last-findings.jsonfor--deltafix rounds.
The result is printed as JSON on stdout: findings (each with lens, model and family added), rounds, requests, converged, gateVerdict, blastRadius, and telemetry (split uncached/cached/output/billable tokens, system1Calls, skippedLenses, and arbiterMode). Progress lines go to stderr.
Flags and ARL modes
--plan <spec.md>runs the 5-lens Plan Adversarial Review Loop (ARL) over a Markdown specification instead of a git diff (devils_advocate,requirements_fidelity,simplicity,evidence_strategy,dag_topology).--five-lens(or--5-lens) enables the 5-lens Code ARL (correctness_redteam,security,simplicity,evidence_runner,anti_slop).--delta <ref>and--prior-findings <path>review only the fix-round delta while embedding prior open findings for verification (preserving unresolved prior blockers if the delta is empty).--seams-only --plan-file <path>audits only cross-ticket integration seams after a fleet run (fails closed if any merged commit was unprosecuted or System-1 fast-shipped).--thoroughopts into multi-dry stochastic convergence over a static diff (dryRounds=2,maxRounds=3);--dry-rounds <n>overrides the required consecutive dry rounds (maxRounds = Math.max(1, dryRounds)). In default single-pass mode (maxRounds === 1), a clean pass converges immediately.--loopruns iterative convergence across up to3rounds (reviewPlan/reviewFleet).--no-codegraph,--no-decision-engine, and--no-arbiterdisable CodeGraph context slicing, System-1 Decision Engine gating/triage, and neutral arbiter triage respectively.
Exit semantics
| Exit | When |
|---|---|
0 | Empty diff (code mode), or converged with gateVerdict === "SHIP", no critical/high/escalated/blast_radius findings, and --plan ok: true |
1 | Quota telemetry unavailable, missing --plan value, or another error |
2 | Any critical/high/escalated/blast_radius finding, --plan ok: false, gateVerdict !== "SHIP" (including > 180,000 char payload truncation), or the fleet did not converge |
Evidence: bin/agb.mjs review exit logic. When it does not converge, agb prints review: did NOT converge — diff too large or contested; split it. Treat that as a signal to review smaller slices, not to rerun the same diff.
agb review never writes to the repo. To act on findings, fix them yourself or turn them into tickets. For prosecution inside a run, see Prosecution.