No code makes my AI reviewers take turns
In claude-agentic-kit, the framework Trusq is built with, Claude Opus and Claude Sonnet take turns reviewing every specification and every plan before any code is written: Opus in the odd rounds, Sonnet in the even ones. Claude Haiku applies the fixes, and a shell script decides when the loop is done. Last week I went through the kit to check which of these rules the code actually enforces. The model for each role and the decision to stop are backed by code, but the switch between Opus and Sonnet is only an instruction in a prompt, and nothing checks that the main model follows it.
Why one reviewer is not enough
Earlier this month, four Trusq pull requests passed our review loop with "No new findings", after three to six rounds each. A second reviewer from a different model family, an open-weight model running on my home server, then left 33 comments. One was serious: an integration suite that could never finish within CI's twelve minutes.
A reviewer that looks at the same work again with the same prompt keeps finding the same things and keeps missing the same things. More rounds do not fix that, but a reviewer from another model family can. That is why the kit's review of specifications and plans has alternated between two model families since 9 July. Before that, every round ran on Opus.
How the loop works
The review of a specification or a plan is adversarial: a reviewer with a fresh context looks for problems, a fix agent applies the fixes, and the next round starts.
- Odd rounds run a deep reviewer on Opus at the highest effort level. The first round is the most thorough pass.
- Even rounds run Sonnet, mostly to check that the previous fixes landed, and to bring a second model's view.
- Fixes are applied by Claude Haiku from an explicit list, with the smallest change that resolves each item. A cheaper model is enough, because it decides nothing: the next round reviews its work with a fresh context.
- The stop is decided by a script that reads the round's counts. Zero open issues means the loop converged. More open issues than the round before stops it as oscillation, unless none of the new issues came from the fix. And after eight rounds it stops as exhausted.
What code enforces
The model for each role. Each reviewer and the fix agent has its own definition file with its model pinned. A test fails if a pin changes, so nobody "simplifies" the loop to one model by accident.
The stop decision. Whether to stop, continue or give up is a few lines of shell, not the judgment of the model that runs the loop. I can test those lines, and they behave the same on a day when the model reasons badly. The counts the script reads still come from the reviewer itself, but the loop checks them against the review log.
What is still a prompt
Which model reviews which round. The loop is run by a main model, and the instruction to launch the deep reviewer in odd rounds and the second one in even rounds is text it reads. No script checks it, and the stop script never learns which model ran. If the main model launched the same reviewer twice, nothing would notice.
Two smaller gaps sit next to it. One clean round from either model ends the loop, so a Sonnet round can close it without Opus seeing the final version. And an environment variable in the operator's shell overrides every model pin without a trace. The kit documents that, but nothing prevents it.
The pull request review, where the four PRs above went through, does not alternate at all. Every round runs the same mix: Opus for correctness, Sonnet for security, design and tests. Different families in the same round, but the same ones every time.
The fix follows the pattern
The stop decision became trustworthy when it moved from the prompt into a script. The same move works here. The script that already knows the round number can name the reviewer for that round, record which model actually answered and refuse to accept a round from the wrong one. It can also require both families to pass the final version before the loop converges. And an unattended run can check for the override variable before its first round, instead of a warning in the docs.
What carries over
As long as "independent reviewer" only appears in a prompt, it is a request to the model. It becomes a guarantee once a pinned model, a test that fails when the pin changes and a gate that refuses the wrong reviewer back it up. Read your own pipeline the way an auditor would: for every guarantee you rely on, find the line of code that would fail if it broke. Where you cannot find one, the guarantee depends on the model following its instructions.