Two ways in, and they differ only in what tells you where the text is wrong:
| You have |
Start at |
What drives the writing |
| a run directory with rounds in it already — whatever else you have |
step 4, at the next round; steps 1 to 3 are not repeated |
the last round's review under reviews/NN/ |
a skeleton rethink agreed |
step 2 |
the skeleton's purpose, exclusions and budget per section |
an audit run file |
step 1 |
the named failures, each at its line, with its cause |
| neither |
say so, offer /terse:audit or /terse:rethink; if the user declines both, continue on your own guesses and say so in the report |
— |
Why it is rounds and not a pass, and the measurements behind every rule here:
loop.md and measurements.md. Neither is needed to
act; this file is.
Step 1. The measurement, where there is one
Ask the user for the run directory from audit and read audit.md there. You need two headings:
Reader profile and What broke. The contract is in ledgers.md.
Step 2. The brief
Assemble it once, for every writer, in this order; a resumed run does not reassemble it. On the
skeleton route parts 2 and 5 do not exist; say so in the report rather than inventing them.
- The skeleton, if there is one — its purpose, exclusions and budget for the section being written,
unedited.
- Who reads this — the profile from the run file, unedited.
- The writing rules — writing-rules.md, copied in as written.
- The curse of knowledge — curse-of-knowledge.md, likewise.
- Where the readers failed — the entries under What broke, each with its line, its cause and its
quote, plus the passages that worked and must not be damaged.
- The accuracy floor: every statement about behaviour must be true of the code in this checkout,
and the writer records the level of evidence it reached — the three levels are in
truth-pass.md. A claim about a lifecycle
(what stays, what is removed, what a continued or retried run sees) at level 2 is a guess: run it.
Copy the fixed parts; do not paraphrase them. The wording a critic receives is in
bake-off.md; do not write a third.
Step 3. The first candidate
On a document that already exists, the first thing that runs is the adversarial whole-document read —
lens 3 of step 4's table — with the right to run the code. On the audit route its findings are added
under What broke; on the skeleton route they become the first round's edits. Then the bake-off: three writers, one whole candidate each with a different stance, and two judges — the
briefs and the judging sheet, for both routes, are in bake-off.md. That is the
only bake-off; every round after it edits the round before.
Announce before spawning: the count, the models, and that the cost of a writer or a judge has not been
measured (the critics' costs have; see the table). Wait for the user's word. If the user refuses the
fan-out, write one candidate yourself from the same brief and report that the comparison was skipped.
Step 4. The rounds
Work in a run directory of the document's own — research/<date>-<slug>/ at the root of the
repository that holds the document; audit writes its run file elsewhere, and you copy audit.md in.
Every round is its own file, NN-<pass>.md, named for what produced it — 01-candidate, 06-water,
08-review — any name, used once; the original is 00-original.md. Set S to this skill's scripts/
directory once, as an absolute path: installed, it is $CLAUDE_PLUGIN_ROOT/skills/rewrite/scripts;
from a checkout, the scripts/ beside this file. Then:
node "$S/selftest.mjs" # once per session: every check against its planted violation
Every command below is written for the run directory as the working directory; pass absolute paths if
your shell rules forbid cd.
- Once per document, write four files and copy in
skeleton.md:
concepts.json — one regex per idea the document carries, for the duplication count;
budgets.json — every ## heading of the document mapped to the skeleton's number, or one you set
and write back into skeleton.md where a section was added later. The comparison is a report the
owner reads, not a gate: growth per section per round is the number that showed four sections
swelling while every fix made them truer;
tasks.json — two starting states and goals for lens 4, from the workflow the document most wants
a reader to perform; questions.json — the questions a reader arrives with, from the audit's key
when there is one, otherwise from the skeleton's purpose per section, one line each.
On a resumed run reuse all four; the readers are new agents and stay fresh even where the questions
repeat. ledger.json starts empty and grows from the rounds.
- Write
edits/NN.json: for each edit the exact old text, which must occur once; the new text;
claims it introduces and retire phrasings it removes as false; and check — {"level": 1|2|3, "how": "command or file:line"} — required whenever the edit carries claims. The format is the header
of round.mjs.
- Produce the round:
node "$S/round.mjs" <NN-1>-<pass>.md <NN>-<pass>.md edits/NN.json --ledger ledger.json.
- Run the checks, before any critic, with
R=<NN>-<pass>.md:
node "$S/rule1.mjs" "$R" --cut "<technical section heading>" --except "<section that may carry paths>" — the rule that keeps mechanism out of the sections a reader meets first, with the document's own headings;
node "$S/dup.mjs" "$R" concepts.json — one idea, one home;
node "$S/sections.mjs" "$R" budgets.json — words per section against the budget, reported, never blocking;
node "$S/ledger.mjs" ledger.json $(ls [0-9][0-9]-*.md | sort) — the ratchet over every round in order; exit 1 when the new round loses a verified claim or revives a retired phrase.
A failure the round introduced is fixed before the critics see it: remove the round file, fix
edits/NN.json, regenerate. A failure the previous round already had is a finding for this round's
edits, not a block. A round is frozen the moment its critics launch, not before.
- Announce the wave — the lenses, their sizes from the table, the models, the cost — and wait for
the user's word; the user may size any lens to zero, and the least that still counts as a round is
lenses 1 and 2. Then launch the critics, one agent per lens, with the briefs in
critic-briefs.md, and the dedup agent over their reports; everything
they return is kept verbatim under
reviews/NN/. The Codex lenses need the entrust plugin;
without it, run those lenses on Claude agents and say so.
- Verify every finding yourself from the check it carries — a finding without one is discarded —
and route each by the table in loop.md: a sentence to the
next round's edits, a boundary or a term back to
rethink, a code defect to the repository's
ISSUES.md, a question the document does not answer to the user. When a finding routes to stage 3,
make the structure map loop.md describes before the next round.
- Record the round in
rounds.md, one table row: | file | words | produced by | findings against it | regressions | — produced by names the pass and the wave; findings is the dedup's count by
category; regressions is the count of sentences the round introduced that its critics showed
false or overstated. That number is the round's verdict.
The lenses are fixed; the sizes are the user's, and the announcement names them. Costs are what one
wave measured on 2026-09-12 on a 1600-word README:
| Lens |
Reads |
Where it ran best |
Size |
Cost |
| 1. the code, with the right to run it |
every behavioural claim; level 3 for anything about a lifecycle |
Claude Opus |
one |
~180k tokens, 17 min |
| 2. the mechanical rules and the water |
the skeleton's rules as a grep would; words whose score does not pay |
Claude Opus |
one |
~70k tokens, 7 min |
| 3. adversarial, whole document |
every sentence a reader acts on; scope words; CLI experiments in an isolated config |
Codex gpt-6-astra |
one |
~40 commands, 5 min |
| 4. a task |
a starting state and a goal, acted on from the document alone; the resulting state |
Codex gpt-5.6-sol |
two |
~20 commands, 5 min each |
| 5. a reader's question |
one question, one cat and nothing else; where they guessed |
Codex gpt-5.6-luna |
one per question |
~1 min each |
| 6. dedup and rank |
every report above, into one list with a reproducible check per finding |
Claude Fable, after the rest |
one |
~160k tokens, 15 min |
Lenses differ; they are not disjoint, and a finding three of them raise is confirmed, not counted three
times.
Step 5. The gate, and the stop
Before the user reads a round, three things, none tradeable against another:
- no regression in the round: the ledger passes, and no sentence the round introduced was shown
false or overstated by its critics;
- the task gate: lens 4's two readers achieved their goals, and the sections no task reached are
named;
- the question readers: lens 5, one per question, answered from the document; where they guessed is
listed.
The loop stops when the user reads the round and says whether they would send it as it is. Two
consecutive rounds with no regression is the signal to hand a round over, not a finish; a cap on rounds
is set in the first announcement, and a cap reached is reported as a result. Hand over the round and
diff-NN.patch, the diff against 00-original.md, written into the run directory. Then stop: applying
the candidate to the user's files needs their word, and a diff they have read is what earns it.
Step 6. What you return
In the run directory:
- every round as its own file;
edits/NN.json, ledger.json, concepts.json, budgets.json
skeleton.md, kept current with every decision taken after it was agreed — a section added, a fact
restored, a budget changed
rounds.md, one row per round; reviews/NN/, every critic's report and the dedup, verbatim
diff-NN.patch against the original; the cut ledger — every removed passage of twenty words or more,
with its reason; the invisible-prerequisite inventory from the curse-of-knowledge pass, on rounds that
ran a writer brief; the sections no task reached; and the structure map, when a stage-3 finding called
for one
Formats for the ledgers are in ledgers.md.
The safeguards are the last lines of writing-rules.md and override the
rest of the rules wherever they collide: never cut a condition, a limit or a warning where a reader
decides; repetition at an independently read decision point is not redundancy; a dated measurement
keeps its date and its numbers.
Reference
- Why rounds, the routing of findings, the ledger, the map and the checks: loop.md.
- The measurements behind every rule here, dated: measurements.md.
- The three decisions before any sentence: stages.md.
- Writer briefs and judging sheets, both routes: bake-off.md.
- Critic briefs, one per lens, and the rights header: critic-briefs.md.
- The checks as scripts with a planted-violation self-test: scripts/.
- The rules, fixed: writing-rules.md; the third pass, fixed:
curse-of-knowledge.md.
- Run file and ledger formats: ledgers.md; evidence levels:
truth-pass.md.
1---2name: rewrite3description: Writes the text in rounds: one candidate, then critics with lenses that differ, then edits declared with the check behind each, until the owner reads a round and says whether they would send it as it is. Starts from a skeleton `rethink` agreed, or from the failures an `audit` measured. Proposes; writes into your tree only on your word.4license: MIT5---67Two ways in, and they differ only in what tells you where the text is wrong:89| You have | Start at | What drives the writing |10|---|---|---|11| a run directory with rounds in it already — whatever else you have | step 4, at the next round; steps 1 to 3 are not repeated | the last round's review under `reviews/NN/` |12| a skeleton `rethink` agreed | step 2 | the skeleton's purpose, exclusions and budget per section |13| an `audit` run file | step 1 | the named failures, each at its line, with its cause |14| neither | say so, offer `/terse:audit` or `/terse:rethink`; if the user declines both, continue on your own guesses and say so in the report | — |1516Why it is rounds and not a pass, and the measurements behind every rule here:17[loop.md](references/loop.md) and [measurements.md](references/measurements.md). Neither is needed to18act; this file is.1920## Step 1. The measurement, where there is one2122Ask the user for the run directory from `audit` and read `audit.md` there. You need two headings:23**Reader profile** and **What broke**. The contract is in [ledgers.md](../audit/references/ledgers.md).2425## Step 2. The brief2627Assemble it once, for every writer, in this order; a resumed run does not reassemble it. On the28skeleton route parts 2 and 5 do not exist; say so in the report rather than inventing them.29301. **The skeleton**, if there is one — its purpose, exclusions and budget for the section being written,31 unedited.322. **Who reads this** — the profile from the run file, unedited.333. **The writing rules** — [writing-rules.md](references/writing-rules.md), copied in as written.344. **The curse of knowledge** — [curse-of-knowledge.md](references/curse-of-knowledge.md), likewise.355. **Where the readers failed** — the entries under *What broke*, each with its line, its cause and its36 quote, plus the passages that worked and must not be damaged.376. **The accuracy floor**: every statement about behaviour must be true of the code in this checkout,38 and the writer records the level of evidence it reached — the three levels are in39 [truth-pass.md](../audit/references/truth-pass.md#three-levels-of-evidence). A claim about a lifecycle40 (what stays, what is removed, what a continued or retried run sees) at level 2 is a guess: run it.4142Copy the fixed parts; do not paraphrase them. The wording a critic receives is in43[bake-off.md](references/bake-off.md); do not write a third.4445## Step 3. The first candidate4647On a document that already exists, the first thing that runs is the adversarial whole-document read —48lens 3 of step 4's table — with the right to run the code. On the audit route its findings are added49under *What broke*; on the skeleton route they become the first round's edits. Then the bake-off: three writers, one whole candidate each with a different stance, and two judges — the50briefs and the judging sheet, for both routes, are in [bake-off.md](references/bake-off.md). That is the51only bake-off; every round after it edits the round before.5253Announce before spawning: the count, the models, and that the cost of a writer or a judge has not been54measured (the critics' costs have; see the table). Wait for the user's word. If the user refuses the55fan-out, write one candidate yourself from the same brief and report that the comparison was skipped.5657## Step 4. The rounds5859Work in a run directory of the document's own — `research/<date>-<slug>/` at the root of the60repository that holds the document; `audit` writes its run file elsewhere, and you copy `audit.md` in.61Every round is its own file, `NN-<pass>.md`, named for what produced it — `01-candidate`, `06-water`,62`08-review` — any name, used once; the original is `00-original.md`. Set `S` to this skill's `scripts/`63directory once, as an absolute path: installed, it is `$CLAUDE_PLUGIN_ROOT/skills/rewrite/scripts`;64from a checkout, the `scripts/` beside this file. Then:6566```bash67node "$S/selftest.mjs" # once per session: every check against its planted violation68```6970Every command below is written for the run directory as the working directory; pass absolute paths if71your shell rules forbid `cd`.72731. **Once per document**, write four files and copy in `skeleton.md`:74 - `concepts.json` — one regex per idea the document carries, for the duplication count;75 - `budgets.json` — every `##` heading of the document mapped to the skeleton's number, or one you set76 and write back into `skeleton.md` where a section was added later. The comparison is a report the77 owner reads, not a gate: growth per section per round is the number that showed four sections78 swelling while every fix made them truer;79 - `tasks.json` — two starting states and goals for lens 4, from the workflow the document most wants80 a reader to perform; `questions.json` — the questions a reader arrives with, from the audit's key81 when there is one, otherwise from the skeleton's purpose per section, one line each.82 On a resumed run reuse all four; the readers are new agents and stay fresh even where the questions83 repeat. `ledger.json` starts empty and grows from the rounds.842. **Write `edits/NN.json`**: for each edit the exact `old` text, which must occur once; the `new` text;85 `claims` it introduces and `retire` phrasings it removes as false; and `check` — `{"level": 1|2|3,86 "how": "command or file:line"}` — required whenever the edit carries claims. The format is the header87 of `round.mjs`.883. **Produce the round**: `node "$S/round.mjs" <NN-1>-<pass>.md <NN>-<pass>.md edits/NN.json --ledger ledger.json`.894. **Run the checks**, before any critic, with `R=<NN>-<pass>.md`:90 - `node "$S/rule1.mjs" "$R" --cut "<technical section heading>" --except "<section that may carry paths>"` — the rule that keeps mechanism out of the sections a reader meets first, with the document's own headings;91 - `node "$S/dup.mjs" "$R" concepts.json` — one idea, one home;92 - `node "$S/sections.mjs" "$R" budgets.json` — words per section against the budget, reported, never blocking;93 - `node "$S/ledger.mjs" ledger.json $(ls [0-9][0-9]-*.md | sort)` — the ratchet over every round in order; exit 1 when the new round loses a verified claim or revives a retired phrase.94 A failure the round introduced is fixed before the critics see it: remove the round file, fix95 `edits/NN.json`, regenerate. A failure the previous round already had is a finding for this round's96 edits, not a block. A round is frozen the moment its critics launch, not before.975. **Announce the wave** — the lenses, their sizes from the table, the models, the cost — and wait for98 the user's word; the user may size any lens to zero, and the least that still counts as a round is99 lenses 1 and 2. Then **launch the critics**, one agent per lens, with the briefs in100 [critic-briefs.md](references/critic-briefs.md), and the dedup agent over their reports; everything101 they return is kept verbatim under `reviews/NN/`. The Codex lenses need the `entrust` plugin;102 without it, run those lenses on Claude agents and say so.1036. **Verify every finding yourself** from the check it carries — a finding without one is discarded —104 and route each by the table in [loop.md](references/loop.md#where-a-finding-goes): a sentence to the105 next round's edits, a boundary or a term back to `rethink`, a code defect to the repository's106 `ISSUES.md`, a question the document does not answer to the user. When a finding routes to stage 3,107 make the structure map loop.md describes before the next round.1087. **Record the round** in `rounds.md`, one table row: `| file | words | produced by | findings against109 it | regressions |` — *produced by* names the pass and the wave; *findings* is the dedup's count by110 category; **regressions** is the count of sentences the round introduced that its critics showed111 false or overstated. That number is the round's verdict.112113The lenses are fixed; the sizes are the user's, and the announcement names them. Costs are what one114wave measured on 2026-09-12 on a 1600-word README:115116| Lens | Reads | Where it ran best | Size | Cost |117|---|---|---|---|---|118| 1. the code, with the right to run it | every behavioural claim; level 3 for anything about a lifecycle | Claude Opus | one | ~180k tokens, 17 min |119| 2. the mechanical rules and the water | the skeleton's rules as a grep would; words whose score does not pay | Claude Opus | one | ~70k tokens, 7 min |120| 3. adversarial, whole document | every sentence a reader acts on; scope words; CLI experiments in an isolated config | Codex gpt-6-astra | one | ~40 commands, 5 min |121| 4. a task | a starting state and a goal, acted on from the document alone; the resulting state | Codex gpt-5.6-sol | two | ~20 commands, 5 min each |122| 5. a reader's question | one question, one `cat` and nothing else; where they guessed | Codex gpt-5.6-luna | one per question | ~1 min each |123| 6. dedup and rank | every report above, into one list with a reproducible check per finding | Claude Fable, after the rest | one | ~160k tokens, 15 min |124125Lenses differ; they are not disjoint, and a finding three of them raise is confirmed, not counted three126times.127128## Step 5. The gate, and the stop129130Before the user reads a round, three things, none tradeable against another:131132- **no regression in the round**: the ledger passes, and no sentence the round introduced was shown133 false or overstated by its critics;134- **the task gate**: lens 4's two readers achieved their goals, and the sections no task reached are135 named;136- **the question readers**: lens 5, one per question, answered from the document; where they guessed is137 listed.138139**The loop stops when the user reads the round and says whether they would send it as it is.** Two140consecutive rounds with no regression is the signal to hand a round over, not a finish; a cap on rounds141is set in the first announcement, and a cap reached is reported as a result. Hand over the round and142`diff-NN.patch`, the diff against `00-original.md`, written into the run directory. Then stop: applying143the candidate to the user's files needs their word, and a diff they have read is what earns it.144145## Step 6. What you return146147In the run directory:148149- every round as its own file; `edits/NN.json`, `ledger.json`, `concepts.json`, `budgets.json`150- `skeleton.md`, kept current with every decision taken after it was agreed — a section added, a fact151 restored, a budget changed152- `rounds.md`, one row per round; `reviews/NN/`, every critic's report and the dedup, verbatim153- `diff-NN.patch` against the original; the cut ledger — every removed passage of twenty words or more,154 with its reason; the invisible-prerequisite inventory from the curse-of-knowledge pass, on rounds that155 ran a writer brief; the sections no task reached; and the structure map, when a stage-3 finding called156 for one157158Formats for the ledgers are in [ledgers.md](../audit/references/ledgers.md).159160The safeguards are the last lines of [writing-rules.md](references/writing-rules.md) and override the161rest of the rules wherever they collide: never cut a condition, a limit or a warning where a reader162decides; repetition at an independently read decision point is not redundancy; a dated measurement163keeps its date and its numbers.164165## Reference166167- Why rounds, the routing of findings, the ledger, the map and the checks: [loop.md](references/loop.md).168- The measurements behind every rule here, dated: [measurements.md](references/measurements.md).169- The three decisions before any sentence: [stages.md](../rethink/references/stages.md).170- Writer briefs and judging sheets, both routes: [bake-off.md](references/bake-off.md).171- Critic briefs, one per lens, and the rights header: [critic-briefs.md](references/critic-briefs.md).172- The checks as scripts with a planted-violation self-test: [scripts/](scripts/).173- The rules, fixed: [writing-rules.md](references/writing-rules.md); the third pass, fixed:174 [curse-of-knowledge.md](references/curse-of-knowledge.md).175- Run file and ledger formats: [ledgers.md](../audit/references/ledgers.md); evidence levels:176 [truth-pass.md](../audit/references/truth-pass.md).