A Zeroshot graph that writes one section of a paper from a section plan. One agent writes paragraph by paragraph, and three independent reviewers check each paragraph. A repair agent applies their feedback. After the last paragraph, the same three reviewers check the whole section.
for each paragraph in the plan (in order, at most 40):
writer writes the next paragraph into the target file
up to 3 rounds:
writing-assistance | simple-style | proofreading (parallel, accept or reject)
all accepted -> next paragraph, otherwise paragraph repair
progress flags the paragraph if the round limit was hit
up to 2 rounds:
section reviews (same three roles) -> section repair unless all accept
- Zeroshot:
npm install -g @the-open-engine-company/zeroshot - Claude Code or Codex, installed and signed in
- Node.js 18 or newer, only to rebuild the graph
| File | Purpose |
|---|---|
STYLE.md |
Rules for the writer and both repair agents |
reviewers/*.md |
Checklists, each with a paragraph stage and a section stage |
build-graph.js |
Builds the graph JSON from the Markdown files |
academic-writing.graph.json |
Generated graph; do not edit by hand |
plan-template.md |
Template for the section plan |
input.example.json |
Run input |
runtime.claude.json, runtime.codex.json |
Runtime configs for Claude Code and Codex |
After editing STYLE.md, a checklist, or the bounds at the top of build-graph.js, rebuild:
node build-graph.jsEach agent receives its rules inside its node instructions (at most 16 KB per node). Agents do not load the Claude Code skills.
-
The paper must be a Git repository. For a local folder,
git initis enough. -
Copy
plan-template.mdinto the paper repository, for example asplans/method.md, and fill it in. Paragraph IDs must beP1,P2, ... in order. -
In the target
.texfile, add the two marker lines where the section goes:% zeroshot:begin % zeroshot:end
The writer inserts each paragraph before
% zeroshot:end, preceded by a marker line such as% zeroshot:paragraph P1. Do not remove these markers during a run. -
Copy
input.example.jsonand setplanFileandtargetFilerelative to the paper repository root. Keep"noop": []; the graph uses this empty list for branches that do nothing.
Run from the paper repository. Agents edit the target file in the current worktree directly. Commit
the plan, input.json, and the marker lines before the run, so that git diff shows exactly what
the agents changed. Replace ZS with the path of this directory.
ZS=/path/to/zeroshot-academic-writing
zeroshot run --title "Write method section" \
--graph "$ZS/academic-writing.graph.json" \
--input input.json \
--uniform-runtime-config "$ZS/runtime.claude.json" \
--validate-onlyDrop --validate-only to start the run. Use runtime.codex.json for Codex. Zeroshot passes the
model identifier unchanged to the harness. runtime.claude.json uses the Claude Code alias opus,
which always selects the latest Opus model. Codex has no such alias, so update the model field of
runtime.codex.json when you switch models.
- Paragraphs appear between the markers, each after its
% zeroshot:paragraph P<k>line. % TODO:lines mark information the plan did not provide.% ZEROSHOT-FLAG:lines mark paragraphs whose reviewers still rejected after three rounds. The last repair of a flagged paragraph was not reviewed again.zeroshot logs RUN_IDandzeroshot uishow every reviewer verdict and message.
MIT, see LICENSE.