Skip to content

Use case: anyparse ​

anyparse is an open-source platform for building parsers, writers and formatters: a grammar is described as Haxe types, and a macro generates the parser and the writer. Its development runs on this engine. Work is cut into small tasks, each a line in a queue; a dispatcher admits the lines that can run together, and every admitted line goes through the same pipeline of agents, on a model chosen by how hard the line is.

This page follows one line from the queue to main. Every diagram is drawn from the project's own workflow files and every number is its ledger: a dated snapshot, written by a script in this repository, of what the pipeline's finished runs did and cost.

A line enters the queue ​

The queue is one YAML file. A line is a task small enough to be tested, reviewed and landed on its own, and its brief is written for an agent that knows nothing else: what to change, where, and why. The other fields are for the machinery. Tap one to see who reads it, and move along the ruler to see what a difficulty stands for.

difficulty is read by

  1. the pick
  2. the model table
  3. the recon
  4. the worker
  5. the review
  6. the land

1 to 10, scored by the project's anchors. The model table turns it into every stage's model and effort, and from the recon's threshold a scout reads the line first. A pending line without it is refused.

The difficulty ruler

5 a new lint rule or command on existing components. A line scored 5 is read by a recon before any worker.

An example line in the queue's shape: the fields are the engine's, the names are made up. The bars are the ledger's landed lines by the difficulty their stages ran on.

The pick admits what can run together ​

The dispatcher keeps a window of lines running at once. Whenever a slot is free the engine's pick walks the queue by priority, then in file order, and admits a line only when everything it waits for is done and it shares no file with a line that runs. Nobody decides by hand what may run in parallel: the lines' own fields do.

Each admitted line gets its own worktree, its own pipeline session, and a cheap driver agent that moves that session from step to step.

window
LINT-UNUSED-LOCALWRITER-CHAIN-BREAKCLI-HELP-FLAG
  1. LINT-UNUSED-LOCAL-FIX4after LINT-UNUSED-LOCALsrc/check/UnusedLocal.hxafter: LINT-UNUSED-LOCAL (running)
  2. WRITER-CHAIN-TESTS3src/format/Chain.hx, test/format/ChainTest.hxoverlaps WRITER-CHAIN-BREAK (touches src/format/Chain.hx ~ src/format/Chain.hx)
  3. FMT-SWEEP6exclusivesrc, testoverlaps LINT-UNUSED-LOCAL (exclusive FMT-SWEEP)
  4. DOC-GUIDE-PAGE2lowdocs/guide/lint.mdwindow full

Tap a running line to land it: its slot frees and the pick runs again.

From the ledger · hours by pipelines open at once

01.1 h
177.9 h
217.3 h
316.5 h
445.2 h
5120.1 h
60.1 h
An example queue; the verdicts are the pick's own words. By the engine's default a waiting exclusive line holds the lines behind it; anyparse's queue header turns that hold off, so here it simply waits for an empty repository. The hours are anyparse's ledger: 278 hours of the snapshot's window by the number of its pipelines open at the same moment.

Difficulty picks the path ​

A line's difficulty is a guess, made by whoever wrote the line, without the code in front of them. It still decides a lot. Every stage of the pipeline takes its model and effort from one table by that number. And from a threshold up, a read-only recon reads the code before any worker starts.

The recon is the cheap first reader. It checks the premises the line stands on and scores the work by the project's anchors, and its score replaces the line's: the engine rewrites every stage's row, so the expensive agents run on what the work is, not on what the line said.

A score at the top of the scale is not run at all: the recon proposes the smaller lines to cut it into. A premise that does not hold closes the line before a worker has spent anything.

Pick a scenario, or set the two numbers yourself.

The line says
The code says
Its premisescored by the recon
queue line · difficulty 5claimhaiku ▮▮▯▯a driver takes the lineworktreescripta branch off main · no tokensdifficulty ≥ 4 ?noyesreconsonnet ▮▮▯▯read-only · scores the workits verdictcloseda premise failssplitscore ≥ 9 · new linesplanskipped · the recon is the planexecuteopus ▮▮▮▯a new agent runs the plangatereviewland5 → 7
difficulty12345678910reconsonnet ▮▮▯▯plansonnet ▮▮▮▯executesonnet ▮▮▮▯opus ▮▮▮▯reviewopus ▮▮▮▯review_verifyopus ▮▮▮▯fixsonnet ▮▮▮▯opus ▮▮▮▯$ per land·1.52.84.65.96.97.98.1··

▮▮▯▯ effort medium, ▮▮▮▯ high. The tinted column is the difficulty the stages run on, the dashed number what the line said. The last row is the ledger's median cost of a landed line at that difficulty.

  1. claimhaiku ▮▮▯▯ mediumA driver claims the line. Difficulty 5 sets every stage's model and effort from the model table.
  2. worktreescriptThe engine makes a worktree and a branch off main. No agent, no tokens.
  3. routescriptDifficulty 5 is 4 or more: a recon reads the line before any worker.
  4. reconsonnet ▮▮▯▯ mediumThe recon reads the code and changes nothing. It checks the line's premises and scores the work by the project's anchors.
  5. scorescriptThe recon's score is 7, not 5. The engine rewrites every stage's row and the queue line's difficulty.
  6. planscriptA recon score of 7 or 8 is the plan: no plan stage runs.
  7. executeopus ▮▮▮▯ highAn executor on the execute row writes the code from the recon's findings.
  8. nextscriptThe gate, the review and the land follow.

From the ledger 221 of 393 recon scores were higher than the line's.

The thresholds are read from anyparse's workflow files; the model table is the one in force while these runs were made; the counts are its ledger from 2026-11-06 to 2026-11-18: 563 runs of the pipeline, 465 landed.

Three things to notice. Below the recon's threshold there is no scout: the plan stage is the first reader and scores the work itself. A high recon score is the plan, so no plan stage runs and an executor on the execute row starts from the recon's findings. And the two ways out on the right are the cheapest outcomes on the page: a line that should not run stops at its first reader.

Worker, gate, review rounds, land ​

The worker owns its change up to a green gate. The gate is a script, so a red row costs the worker another try and nobody else's attention.

Every line is then reviewed by a fresh agent that only reads. A FIXES verdict sends its list back to the worker that wrote the change, and the same reviewer then checks the fix alone. The land is one at a time: the branch is merged into a candidate tree, judged by the full battery, and main moves only when that is green.

Choose how the review goes, and tap a step to read what happens in it.

The review says
The gate

land One land at a time, machine-wide, under the lock anyparse-land: the branch is merged into a candidate tree, rebuilt and judged by the full battery. Main moves only on green; then the queue line is marked done.

From the ledger · a landed line by its review rounds

1 review$3.34180 lines
2 reviews$7.04235 lines
3 reviews$10.8146 lines
4 reviews$13.344 lines

This lane lands after 2 reviews: the median such line cost $7.04.

Where a landed line's cost goes

  • recon 5% $0.37
  • plan 18% $1.29
  • execute 32% $2.28
  • fix 14% $0.98
  • review 27% $1.91
  • driver 2% $0.13
  • other 2% $0.15
A line of difficulty 5. The lane's bounds are read from anyparse's workflow files: 3 fix rounds before a reject, 3 gate fixes before the worker is blocked. The stage split stands on 174 landed lines whose agents were recorded one by one; plan is the plan stage's agent, who also writes the code of a line it keeps.

Lessons become new queue lines ​

A landed line leaves more than a commit. The worker reports what it saw and did not touch; the reviewer adds notes that did not block the merge. After every land the dispatcher goes through those rows, and one rule decides where each goes, so a lesson is neither lost nor allowed to jump the queue. What a tool or a gate can hold becomes a queue line against that tool, not a note.

A landed line left behind

Where the rule sends it

  • queue · high1
  • queue · normal
  • queue · low
  • backlog
  • queue · a check
  • nothing

An enabler: it makes many later lines cheaper (one owner instead of copies). Enablers go first.

1 new line in the queue. A line queued here carries its difficulty and the files it touches like any other, and the next pick may admit it: back to the top of the loop.

Example rows; the rule is the one anyparse's dispatcher applies after every land, to the worker's open items and the reviewer's non-blocking notes.

The curator checks the rules ​

The model table and the anchors are guesses too, so they are checked against the ledger. Between two runs of a curator agent a fixed number of lines land. A run does three things, in this order, and proposes at most one change to the model table.

  1. 1calibrate the tablePer stage and difficulty band, from the ledger: the cost of a line, its review rounds, how often its score moved, on the model each stage ran on. Then at most one change to the model table, with the number it should move, that number today, the value predicted and the run that will judge it. No change is a valid answer.
  2. 2judge the last changesBefore and after for every change applied in the last two runs: keep, revert, or too few events to say. A change with no effect is taken back.
  3. 3name the frictionWhat slowed the lines down that was not their own doing. It becomes a proposal only above a measured cost in $ or in slot hours; anything smaller is one line in the report.

From the ledger · windows of 20 lands, today's cadence · the median cost of a line in each

Window 23: lands 441 to 460, what a run at today's cadence of 20 lands has in front of it. 5 more have landed after the last full window.

median cost of a line$7.17the window before $6.66 · +0.51
review rounds per line1.85the window before 1.65 · +0.20

Two neighbouring windows are the before and the after a change is judged on. 20 lines is a small sample: a difference this size is often "too few events", which is why a verdict may wait a run.

The calibration table · by the difficulty the stages ran on

bandlinesmedianroundsscore moved

Band 4-6, per landed line, by stage:

recon$0.45sonnet
plan$1.53sonnetopus
execute$1.42opus
fix$1.12sonnetopus
review$2.08opus
driver$0.17opushaikusonnet
other$0.06sonnetopushaiku
465 landed lines in the order they ended, cut into 23 full windows of 20: a cut of the ledger at today's cadence, not the runs that happened (the cadence has changed over the project's life). The bands count every landed line; a band's stages count the 174 lines whose agents were recorded one by one, with the models that ran each stage, the costliest first.

The numbers ​

Everything above in one panel. Tap a figure to read how it is counted.

How it is counted The spend of a landed line's agents, read from their transcripts and priced turn by turn at API rates: 315 of the 465 landed lines carry it (the record began after the first days). Median $5.58, mean $6.74. The top-level conversation's own turns are not in it.

The $ is what the same tokens cost at API prices. On a subscription no such bill arrives: read it as a yardstick of how much of the limit a task used. Exact limit accounting is not published.

anyparse's ledger from 2026-11-06 to 2026-11-18, one project's task pipeline, no task or session named. The file itself: use-case-anyparse.json.