Skip to main content
Give one model a brief and a model from a different family the job of checking it. Use it when one reviewer is enough and the test command does most of the judging. When one opinion isn’t enough, use a review panel with a threshold. Anthropic calls this shape evaluator-optimizer: one model produces, another evaluates, and the producer runs again with the evaluation in hand.

Shape

The team

Two roles and three stages. The writer is a Claude seat, the reviewer a Codex seat, and the test between them is a command:
examples/teams/writer-reviewer-pair.ts (excerpt)
The writer produces the files the brief names. writes is checked after the stage: a missing or empty file fails it by name, and so does a change to another declared file. Node runs the test, and a red run carries its output to write, which runs again with it. The reviewer reads the code, the test and its result only after the test passes, and a rejection goes the same way. retry: 1 on the writer bounds how many times the pair goes round. The two seats must come from different model families; workflow() refuses the team before any model runs when they share one, so a model never approves its own work.
Run the file in a directory you’re happy for a model to change. The Claude seat runs with permission prompts off, so it can run any command the process can.

What the run did

The brief is briefs/add.md beside the file: its body is the task, and its front matter names the files the writer must produce. Run the file from the directory the work belongs in, with the Claude Code and Codex command line tools signed in. One real run printed:
Output
All three stages passed first time. The writer left src/add.mjs:
src/add.mjs
and test/add.test.mjs:
test/add.test.mjs
Each seat comes from its plugin. claude('claude-sonnet-4-5') and codex('gpt-5.6-luna') carry the identity the plugin records, and the record and the family check read it. The Codex seat runs sandboxed to the workspace with approvals off. Each helper takes an options object to choose otherwise.
examples/teams/writer-reviewer-pair.ts

Next steps

  • Feature delivery: the same writer, test and reviewer inside a nine-stage team, from brief to a person’s decision.
  • Runtime: workflow, stage, briefFromFile and the keys of a stage.
  • Feedback loops: the shapes a review can take and the limit that stops the loop.