Review
The Review Loop Engine
Last updated July 10, 2026
Review
Review is the shared run_review_loop() engine. The pipeline and the standalone /superreview command both drive this exact function, so an improvement to the review engine lands in both at once. The loop mutates the run state and the working tree, and the caller consolidates afterward.
Lenses
The loop reviews per lens. It starts from the plan's review_lenses (default correctness, security, edge-cases, design), then always appends a standing over-engineering lens (the ponytail rubric). If frontend changed, it also appends a design lens. See Frontend and design.
Round by round
Each round runs this sequence. Everything after the reviewers is shared between the normal path and the ultra path.
- Reviewers fan out per lens. Each lens gets a
deep-reviewerrunning a model drawn from themodelRoles.reviewersdiversity set (entries alternate across lenses so different lenses get different eyes). Thedesignlens goes to thedesigneragent instead.deep-reviewercarries no native output schema, so the call-site findings schema applies cleanly, which sidesteps an intermittent schema violation with omp's bundled reviewer (oh-my-pi #3926). - The judge keeps the real findings. A
completion(model="slow")judge rules on each finding and drops nits, dupes, and false positives, then emits a per-lens verdict (cleanorissues_remain). - The numeric gate. Only actionable, high-confidence defects pass:
priority <= 1andconfidence >= 0.6. The count that survives this gate is recorded askept. - The refute-verifier gates the fixers. The judge rules on the finding text, never the code, so a plausible-but-wrong finding can survive. To close that gap, each kept finding is handed to a per-finding verifier (
taskagent) that tries to disprove it against the actual code. A finding is dropped unless it comes back confirmed with concrete evidence (file:lineplus why it is a real defect). The gate is fail-open. A verifier that errors keeps its finding, so infra noise never silently drops a real bug. Theverify_findingsknob (default on) disables it. The count that survives verification is recorded asconfirmed. - Fixers apply the confirmed findings. Findings are grouped by file and fixed in parallel across distinct files. A fix on a frontend file routes to the
designer; everything else goes through the task pool. - Re-review. Fixes land on the shared tree so they accumulate, and the next round re-reviews them.
Exit conditions
Each round records found (raw reviewer findings), kept (after the numeric gate), confirmed (after verification), and the per-lens verdicts, all in the dashboard.
The loop exits when any of these is true.
- A round finds nothing, or a round confirms nothing (everything was refuted). Both count as clean.
- The round count hits
MAX_ROUNDS(default 3) with findings still open. - The remaining budget drops below the reserve floor (checked at the top of each round).
An all-refuted round counting as clean is deliberate. It means the reviewers raised only things the verifier could not stand up against the real code.