Run it
Set the project up as Installation describes, putbriefs/translation.md, source/article.md, glossary/en-fr.md and
judge.json from examples/use-cases/other/ 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
nuance with the
translation in fr/article.md and the terms note in fr/terms.md, and the
editor’s yes on the page finished it. A no goes to translate with the editor’s note as the
finding.
The file
The brief’s front matter names the source and the glossary as workspace files, so every seat knows they exist and the translating seat can’t write them. The brief holds the translator to the glossary even where another word reads better, and asks for each such place in the terms note, so the person decides with the trade-off in front of them.examples/use-cases/other/translate-reflect.ts (excerpt)
refine: judge(judgeSeat) asks the judge
whether another round is worth it. With no cap, the loop ends when the
judge stops it or the reviewer accepts the translation. The terms note has no reviewer, so
only its own seat judges whether every glossary term is on the list. Then
the run waits for the editor:
examples/use-cases/other/translate-reflect.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/other/translate-reflect.ts
The team’s shape
When the loop stops
A translation that honours a glossary and still reads naturally has many defensible answers, so the reviewer and the translator need room to meet, and no count says how much. After each round the reviewer did not accept, the judge reads the use case from the brief, the reviewer’s findings and every round so far, and answers whether the translation holds, whether the findings are worth acting on, and whether another round is worth it. The loop goes round again on continue and stops when the judge chooses a reason to stop. The judge decides a finding tagged block too. 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
translation stand. The judge’s recorded answers
for the offline run are in judge.json, one set per round.
A judge stops the loop has the questions
and the rule.
Next steps
- A writer and a reviewer: the translator and editor pair on its own.
- A judge stops the loop: the judge’s questions, and the same loop as plain graph nodes.
- A person decides: the publish question as a step, and how the answer reaches a paused run.