Shape
The team
One implementer and a panel of two reviewers from two other model families.agree is how many must accept:
examples/teams/threshold-panel.ts (excerpt)
agree is a whole number from one to the number of reviewers, and the
default is all of them. Set it to the number of reviewers when one dissent
must be enough to fail the step; below that, the change can pass despite a
dissent, and the dissent is still on the record. A panel below the
threshold carries its findings to implement, which runs again with them,
as many times as that stage’s retry allows.
workflow() refuses the team before any model runs if a reviewer shares a
model family with the seat it reviews, or two reviewers share one: two
reviewers from one family would be one opinion counted twice. The third seat
runs through the OpenCode command line tool, whose adapter needs an absolute
command path; resolveCommandExecutable('opencode') finds it on your PATH
when the file runs.
What the run did
Run the file from the directory the work belongs in, with the Claude Code, Codex and OpenCode command line tools signed in. One real run printed:Output
agree: 1 the change passed on the one acceptance. Set agree to two
and the same run would have paused at the panel instead, because an error
isn’t an acceptance.
The implementer wrote src/double.mjs:
src/double.mjs
test/double.test.mjs:
test/double.test.mjs
Full file
Full file
examples/teams/threshold-panel.ts
Next steps
- Feature delivery: a panel as one stage of a nine-stage team.
- Review loop: the same idea as a graph form, with
a quorum and
requireDiversityyou set yourself. - Runtime:
workflow,stage,panelandagree.