Run it
Set the project up as Installation describes, putbriefs/playbook.md, contracts/msa.md and judge.json from
examples/use-cases/business/ beside the file, sign in to Claude Code and
Codex, and run it. Without JUDGE=jev the judge replays the answers in
judge.json; with it, and a TypeSafe endpoint and key in the environment,
the judge is Jev:
Terminal
Output, from the offline proof
negotiate with the redlines and the positions in review/, and the
lawyer’s yes on the page finished it. A no goes to redline with the lawyer’s note as the finding.
The file
Write every rule you want applied inbriefs/playbook.md. Everything a seat
knows about what’s acceptable comes from that file, and only the rules
written there are applied. files: ["contracts/msa.md"] in the brief’s
front matter names the contract as a workspace file: every seat knows it
exists, and the review seat may not write it.
examples/use-cases/business/contract-playbook.ts (excerpt)
refine: judge(judgeSeat) asks the judge
whether another round is worth it each time the checker fails the set, and
the rounds end when the judge stops them or the checker passes the set. The
negotiating note keeps a plain count of three, so the two shapes sit side by
side:
examples/use-cases/business/contract-playbook.ts (excerpt)
gate. The package doesn’t
check them itself; it checks what each stage declares. A file in writes
that’s missing or empty fails the stage, a reviewed stage passes only when
its reviewer accepts, and a person stage waits until the person answers.
Full file
Full file
examples/use-cases/business/contract-playbook.ts
The team’s shape
When the loop stops
When the checker fails the set, the judge reads the use case from the brief, the findings and every round so far, and says whether another round is worth it. A finding the checker tags block, here a never-sign clause with no redline, goes to the judge too. The judge skips a block only when the case it names is outside how the work is really used, or when the same class of finding keeps returning after it was answered. The loop goes round again on continue and stops when the judge chooses a reason to stop. With no cap, a run ends when the judge stops it or the review passes. To bound the rounds as well, passjudge(judgeSeat, { cap: 3 }): it allows three
refinements, the judge reads
the review of the last draft too, and the run fails unless it lets the
redlines stand. The judge’s recorded answer
for the offline run is in judge.json.
A judge stops the loop has the questions
and the rule.
Next steps
- A person decides: the lawyer’s question as a step, and how the answer reaches a paused run.
- A judge stops the loop: the judge’s questions, and the same loop as plain graph nodes.
- A writer and a reviewer: the writer and checker pair on its own.