From 46fc4dde7c957c80d08d039bb372a0a653d4c4a2 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 9 Nov 2026 23:05:33 +0100 Subject: [PATCH 1/5] Keep the presentation of loop-claude, with the script that prints it to PDF and what writing it settled --- .gitignore | 5 + README.md | 2 +- presentation/README.md | 59 ++ presentation/build-pdf.sh | 25 + presentation/index.html | 1047 ++++++++++++++++++++++++++++++++++++ presentation/render-pdf.js | 14 + 6 files changed, 1151 insertions(+), 1 deletion(-) create mode 100644 presentation/README.md create mode 100755 presentation/build-pdf.sh create mode 100644 presentation/index.html create mode 100644 presentation/render-pdf.js diff --git a/.gitignore b/.gitignore index c9880a3d..76bf89e6 100644 --- a/.gitignore +++ b/.gitignore @@ -106,6 +106,11 @@ !bin/transcript_archive/*.py !docs/ !docs/*.md +!presentation/ +!presentation/README.md +!presentation/build-pdf.sh +!presentation/index.html +!presentation/render-pdf.js !principles/ !principles/*.md !reviewer-merge-trials/ diff --git a/README.md b/README.md index 9dbd93a0..e0db2139 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Claude Code configuration -My personal `~/.claude`, version controlled: `CLAUDE.md`, `AGENTS.md` and `rules/` for instructions, the words under `CLAUDE.md` → "Vocabulary"; `agents/` and `skills/`; `principles/` and `skills/larv-review/standards/` for what the reviewer agents hold projects to; `docs/` for decisions and the comprehension history; `settings.json` for the harness and `.claude/settings.json` for the harness inside this repo; `CHANGELOG.md` and `todo.md`; the tools in `bin/`; `workflow-bench/`, the scripts and prompts of the 2026-09-30 bench of larv-review; and `reviewer-merge-trials/`, the 2026-11-09 trials of merging reviewers, with their method, results and scripts. +My personal `~/.claude`, version controlled: `CLAUDE.md`, `AGENTS.md` and `rules/` for instructions, the words under `CLAUDE.md` → "Vocabulary"; `agents/` and `skills/`; `principles/` and `skills/larv-review/standards/` for what the reviewer agents hold projects to; `docs/` for decisions and the comprehension history; `settings.json` for the harness and `.claude/settings.json` for the harness inside this repo; `CHANGELOG.md` and `todo.md`; the tools in `bin/`; `workflow-bench/`, the scripts and prompts of the 2026-09-30 bench of larv-review; `reviewer-merge-trials/`, the 2026-11-09 trials of merging reviewers, with their method, results and scripts; and `presentation/`, a page that explains this setup to newcomers, with the script that prints it to PDF. ## Goals diff --git a/presentation/README.md b/presentation/README.md new file mode 100644 index 00000000..4a612958 --- /dev/null +++ b/presentation/README.md @@ -0,0 +1,59 @@ +# presentation + +`index.html` explains loop-claude, in 22 pages, to developers who have never seen an agent loop. It is published as a claude.ai artifact and printed to an A4 landscape PDF. + +## Rebuild the PDF + +```sh +presentation/build-pdf.sh +``` + +It writes `presentation/loop-claude-explained.pdf`, which stays out of git. It needs Docker and the `playwright-for-claude` image, which `~/code/playwright-for-agents/pw about:blank` builds once. + +`index.html` is an artifact body: it has no doctype, head or body of its own. `build-pdf.sh` wraps it the way the artifact host does. To publish an edited page, publish `index.html` to the same artifact. + +## Who it is for + +People in tech who want to build software factories, work with AI tools more efficiently, and stop fighting their agents. They know git, pull requests and the shell, and nothing about agent loops. Write for a tired reader on a Monday morning without coffee: one fact per sentence, each term explained before it is used, and no filler. + +## How the pages are built + +These choices were made with the human while the pages were written. + +- **Page 1 engages.** It states the problem, what loop-claude does, what it aims for, who it is for, and three real figures. +- **Pages 2 and 3 share one layout.** Page 2 is the simple chart, page 3 the full one. The section frames, the human boxes, the colours and the return arrows sit in the same places on both. Each big box on page 2 is the group of steps at the same place on page 3, so a reader translates by position. Keep it that way. +- **The full chart shows every piece.** A simpler view may group pieces, never drop them. +- **Three sections:** + - **A · Start, deterministic, no AI:** Rank the plan, Prepare, Pick the work, Pick model. + - **B · Work, the worker:** Build, Review, Gate, Goals check, Readability, Merge. The release review sits on top, and new items flow back into the plan. + - **C · Check, the judge:** its verdicts, and where each one returns. +- **The human stands outside the sections,** since a human is not deterministic. Planning a release is a chunk in B: the worker drafts it, and the human approves it. +- **Zoom pages break one section down, one page each,** with the same step names. They never cut the flow another way. +- **Colours mean roles:** amber the human, blue the worker, violet the judge, teal the reviewers, green the merge. +- **Each page fits one landscape A4 sheet.** After an edit, rebuild the PDF and check the page count: a page that spills shows up as an extra page. +- **Draw arrows after the section backgrounds,** or a section box hides them. +- **Every page ends with "Why: sources …",** linking to the numbered rows of the "Why it works this way" pages. Each row is tagged Research, Book, Vendor docs, Benchmark, Own measurement, Experience or Reasoning. + +## Where the figures come from + +The figures were current on 2026-11-09. Update them before presenting again. + +- **362 finished chunks and 17 projects:** loop-claude's archive, which starts on 2026-10-04. Count the `*.outcomes.md` files holding `Verdict: finished`, and the project folders. +- **2,526 commits:** `git log --oneline | wc -l` in this repo. +- **The readability bars:** the latest scoring run in `docs/comprehension-history.md`, the rerun on PR #397. +- **The two plan rows:** items 281 and 286 of `todo.md`. +- **Every other figure:** `docs/decisions.md`, `docs/scoring-and-goals-research.md` and `reviewer-merge-trials/README.md`. + +Two sources appear only here, as reading in support of a fresh context per chunk: Liu et al., "Lost in the Middle", TACL 2024; and Hong et al., "Context Rot", Chroma Research, 2025. + +## Checking it + +A subagent fact-checked the whole page against this repo on 2026-11-09. It found 24 errors, and all are fixed. Run such a check again after a larger edit, since the setup changes under the page. + +## What writing it changed + +Explaining the setup raised questions the repo now answers: + +- PR #455: code health holds for years, and goal 1.4 keeps lowering cost, with a rising reading cost as its first counter-signal. +- PR #456: `reviewer-merge-trials/`, and the decision `review: each pass keeps a reviewer of its own`. +- Items 288, 289 and 290 in `todo.md`. diff --git a/presentation/build-pdf.sh b/presentation/build-pdf.sh new file mode 100755 index 00000000..a5997b67 --- /dev/null +++ b/presentation/build-pdf.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# Print index.html to loop-claude-explained.pdf beside it, in the playwright-for-claude image. +# The image comes from ~/code/playwright-for-agents: its ./pw builds it on first use. +set -eu + +here=$(cd "$(dirname "$0")" && pwd) +work=$(mktemp -d) +trap 'rm -rf "$work"' EXIT + +if ! docker image inspect playwright-for-claude >/dev/null 2>&1; then + echo "No playwright-for-claude image. Build it once with: ~/code/playwright-for-agents/pw about:blank" >&2 + exit 1 +fi + +# index.html is an artifact body, without a doctype, head or body of its own, so wrap it as the artifact host does. +{ + printf '\n' + cat "$here/index.html" + printf '\n' +} > "$work/page.html" +cp "$here/render-pdf.js" "$work/" + +docker run --rm --init --memory 2g --memory-swap 2g -v "$work:/work" -w /work --entrypoint node playwright-for-claude render-pdf.js +cp "$work/out.pdf" "$here/loop-claude-explained.pdf" +echo "Wrote $here/loop-claude-explained.pdf" diff --git a/presentation/index.html b/presentation/index.html new file mode 100644 index 00000000..2871c787 --- /dev/null +++ b/presentation/index.html @@ -0,0 +1,1047 @@ +How loop-claude Works + + + + + + +
+ + + +
+
loop-claude
+

A software factory that asks you only what is yours to decide

+

You write down what you want and who it is for. An AI plans the work, writes the code, gets it reviewed and merges it, one pull request at a time, for as long as the plan holds work.

+
+
+

The problem

+
    +
  • You babysit the agent. Every few minutes it asks something, or waits for a yes.
  • +
  • It forgets. Long sessions drift, and you explain the same context again.
  • +
  • It guesses. It decides what it should ask, and asks what it could decide.
  • +
  • AI review is noise. It nitpicks forever and still misses what matters. So you review it all again, and nobody can read the code six months later.
  • +
+
+
+

What loop-claude does

+
    +
  • It runs unattended. A judge reads every run, and interrupts you only for a choice that is yours.
  • +
  • It starts fresh every chunk. The repo is the memory: goals, plan and decisions are written down.
  • +
  • It decides by your goals. An answer you give is recorded once, and never asked again.
  • +
  • Review, refined by measurement. Narrow specialist reviewers report only real defects, and stop after two rounds: 110 later rounds found no red finding. Tests are checked by breaking the code on purpose. The review is tuned by replaying past rounds.
  • +
+
+
+

What it aims for

+
    +
  • Maintainable for years. Code that stays easy to read, change and debug, tomorrow and after seven years.
  • +
  • The highest quality, with the fewest interruptions.
  • +
  • Ask only when unsure, and never the same thing twice.
  • +
  • Keep lowering cost, unless that would cut quality.
  • +
  • The same rules in every project, and fast delivery.
  • +
+

Each aim has a signal it is measured by, and a counter-signal that catches it being gamed.

+
+
+
+

For developers and teams who build with AI agents and want a software factory: work that keeps flowing without someone watching it, at a quality they would sign off on.

+
+
362chunks finished since 2026-10-04, one PR each
+
17projects run by the loop
+
2,526commits in the setup's own repo
+
+
+
+ +
+
The flow, simply
+

An AI that works through your plan, one pull request at a time

+

Three sections. A picks the work, B does it, C checks the result. The next page opens up every box, in the same places.

+ +

Why: sources 1

+
+ +
+
The flow, every piece
+

The same three sections, opened up

+

Same layout as the last page. Each big box there is the group of steps in the same place here.

+ + +

Why: sources 1, 2, 3

+
+ +
+
Who is who
+

Four roles

+

One human. Three kinds of AI, each with one job.

+
+
Human

Write the goals and the audience in the README. Approve the plan. Answer questions. Cut releases.

+
Worker

A Claude Code session with no human at the keyboard. It writes tests and code, opens the PR and runs the review.

+
Judge

A second, short AI run after each worker run. It reads the log and decides: finished, keep going, or ask you.

+
Reviewers

Specialist AIs. Each looks at the change from one angle and reports problems. They never edit code.

+
+ +
+
A fresh start every chunkEach chunk gets a new AI session with an empty context. Nothing piles up, so it can run for long stretches, as far as the plan reaches.
+
One chunk = one PREach turn of the loop ships one small, reviewed pull request.
+
Many AI reviewersSecurity, stability, product, prose. Every change is checked before merge.
+
You stay in chargeGoals, open questions and releases are yours. Nothing ships a release without you.
+
+

Why: sources 3, 4

+
+ +
+
Where things live
+

Three places

+

Your project's repo holds its own goals, plan and decisions. The setup holds the rules, reviewers and tools that every project shares.

+
+
+

Your project's repo

+

One per project. Everything the next chunk needs.

+
    +
  • README.md goals and audience
  • +
  • todo.md the plan: one scored table
  • +
  • AGENTS.md working rules, and every decision's title
  • +
  • docs/decisions.md answers given once, with the reason
  • +
  • docs/comprehension-history.md every readability score
  • +
  • docs/reading-cost.md what each chunk read
  • +
  • CHANGELOG.md what users get, if it publishes
  • +
  • the code and its tests
  • +
+
+
+

The setup: ~/.claude

+

The claude-config repo, at a tagged release. Shared by every project.

+
    +
  • CLAUDE.md rules every session follows
  • +
  • rules/ topic rules, loaded when a matching file is touched
  • +
  • agents/ the reviewers
  • +
  • skills/larv-review/ the review recipe and its standards
  • +
  • skills/comprehension-panel/ the simulated readers
  • +
  • principles/ technical principles reviewers hold code to
  • +
  • bin/ the tools: loop-claude, loop-inbox, chunk-preflight, chunk-pr, rule-hook, rank_todo.py, run-heavy and more
  • +
  • settings.json runs rule-hook before each Agent, Bash, Edit, Read, Skill and Write call
  • +
+
+
+

The machine and the forge

+

Not tracked by either repo. The archive and the models file sit inside ~/.claude, but git ignores them.

+
    +
  • ~/code/<repo>-item-<ID> a worktree per chunk; its branch item-<ID> becomes the PR
  • +
  • ~/.claude/loop-claude-transcripts/ every run's full log
  • +
  • ~/.local/state/larv-review/ every review report
  • +
  • ~/.local/state/loop-claude/ open questions, for loop-inbox
  • +
  • ~/.claude/loop-claude-models.json each project's model
  • +
  • the forge (GitHub or Gitea) the pull request and CI
  • +
+
+
+

The worker never commits to main. The setup itself is developed in ~/code/claude-config, by the same loop; ~/.claude only ever holds a release.

+

Why: sources 5, 6

+
+ +
+
Zoom in: A · Start
+

A · Start, in detail

+

Plain code, no AI. It decides what the next chunk is, and which model does it.

+
+
Before anything +

The README must hold ## Goals and ## Audience. Without them the loop refuses to start.

+

Each worker waits until a quarter of the machine's memory is free.

+
Prepare +

chunk-preflight fetches the repo and reads todo.md as main holds it.

+

It makes a worktree beside your checkout, on its own branch. There it runs four checks: the plan's ranking, whether a readability score is due, the reading cost, and the hardest places to read.

+
The first prompt +

The task, the README's goals and audience, and every fact Prepare found: the last release, unreleased changes, the item, the items that may join it, the files it names, open PRs.

+

It also names the models to review on.

+
+
+
+

Rank the plan, then pick the work

+
    +
  • Rank: rank_todo.py scores every item from its L, E, I, size and the goals it moves, and sorts the plan. A commit that changes todo.md waits until it is ranked.
  • +
  • An item waits while it is a question for the human, or while an item that blocks it is still in the plan.
  • +
  • The chunk takes the first item that doesn't wait, plus every item of the same release that needs the same reviewers.
  • +
  • An item with risk R above 5 ships alone. Up to ten tiny items can share a chunk.
  • +
+

Pick model

+
    +
  • Worker: by the item's L. L 1–2 one rung down, L 3 the project's model, L 4 one up.
  • +
  • Reviewers: the highest of the worker's model, the project's, and a step up for a high E + I. Readers and security: the project's model. The judge: never below it.
  • +
  • The worker steps up after every second unfinished verdict, or when stuck. At most two rungs without asking.
  • +
+
+
+ + + + + + + + +
When the next release…The chunk is
has a ready itema normal chunk
has no items left, but unreleased workthe release review
has had its release reviewnone: the loop stops, and the human cuts the release
has no items and no work yetplanning: the worker moves the best items in, and the human approves them
+
+
+

Why: sources 2, 25

+
+ +
+
Zoom in: B · Work
+

B · Work, in detail

+

The worker follows a fixed recipe, called larv-review. The same six steps as page 1.

+ +
+
Build +

A test comes first, and the worker sees it fail. Its expected values come from the item, never from the code.

+

Then the simplest change that makes it pass. A draft PR opens, so CI runs while review goes on.

+

Stuck? The same test fails after two fixes, or a round 2 still reports a red finding: the hard part goes to a stronger model.

+
Review +

Specialist reviewers, in waves. At most two rounds each per chunk. Only the fix for a red finding runs a reviewer again.

+

The release review adds the architect and the principles auditor on top: the whole project, up to five rounds each.

+
Gate +

Merge the latest main in. Check the plan's format. Run the tests. Wait for every CI check.

+

Mark the PR ready. Then wait up to ten minutes for the repo's own review bot, if it has one.

+
Goals check +

Does the PR break a goal the project must keep? Then it does not merge. The change is redesigned, or its item dropped.

+

Does it work against a goal the project aims for? Then the human is asked.

+
Readability +

When due, simulated readers score the project, or compare it before and after. It never blocks the merge. A low score adds a refactor item to the plan.

+
Merge +

Merge the PR. Remove its items from todo.md, and move them to CHANGELOG.md if the repo publishes something.

+

The session ends. The next chunk starts fresh.

+
+

A planning chunk follows the same steps. Its change is plan rows, and the human approves them before any code is written. Why: sources 7, 8, 19, 20, 21

+
+ +
+
Zoom in: B · Work → Review
+

The reviewers

+

Each reviewer has one narrow job: a merged reviewer loses one pass's findings. They run in waves, each once the one before is done. Wave 1 runs only in the release review.

+ +
+ + + + + + + + + + + +
ReviewerRuns whenWhy it is its own reviewer
ArchitectureOnly in the release review, the last chunk of a release.Structure drifts slowly over many small PRs; only a read of the whole project shows it. Each finding names a future change the code makes harder.
PrinciplesOnly in the release review.Holds the whole project to the goals and the written technical principles: a checklist read, not a design read.
SecurityCode or config changed. A deeper multi-agent scan instead when it touches login, permissions, secrets, crypto, untrusted input or a new outside surface.Finding holes takes an attacker's mindset. A correctness reviewer looks for what breaks, not for what can be abused.
OverridesThe worker bypassed a rule that a program enforces, with a written reason.The worker cannot judge its own exception. A second opinion keeps the rule, or accepts the reason.
StabilityCode, config or tests changed.Bugs, edge cases, error handling, line by line. It breaks the changed lines on purpose (mutation testing) to see whether the tests notice.
Product ownerSomething users see changed: an API, CLI flags or exit codes, a file format, UI, error text, docs.Reads the change as a user would. Ease of use and upgrade paths are invisible from inside the code.
ProseText changed: docs, comments, help, error messages. One round.Writing has its own rules: short, clear, most important first. A docs-only change runs just this light pass, plus product owner for docs outside readers see.
+
+

Reviewers only report; a program refuses every edit they try. The repo's own review bot, if it has one, runs at the Gate. Why: sources 14, 16, 17, 18, 26

+
+ +
+
What reviewers report
+

Findings and rounds

+

Every finding gets a colour. The colour decides what must happen.

+
+
RedMust fix. Never declined.
+
YellowFix, or decline with a written reason.
+
GreenA nit. Fix, answer, decline with a reason, or file.
+
QuestionAnswered from the repo, or asked.
+
+ + +
    +
  • Outside this change? The finding becomes a new item in todo.md, not a fix here.
  • +
  • Only red fixes re-run reviewers. A fix for yellow, green or a question re-runs nothing.
  • +
  • A decline is written down, in a code comment or in docs/decisions.md, so the next review does not raise it again.
  • +
+

Why: sources 15, 16

+
+ +
+
Zoom in: B · Work → Readability
+

The comprehension panel

+

Simulated readers, from junior to architect, read the whole project and score it from 1 to 10.

+ +
+ +
+

They score four things

+
+
Navigation
Can I find where things are?
+
Locality
Can I change one piece without holding the rest in my head?
+
Shape
Does each level have few parts, with names that tell the truth?
+
Self-sufficiency
Does the code explain itself?
+
+

Real numbers: this setup's own latest scoring run (PR #397). Under 7.0, a refactor item is filed and ranked high.

+
+
+ +

Two ways to ask

+
+
Scoring run

Four readers give a 1–10 score. Runs when a release's items run out, or when an item aims at the 7.0 target.

+
Paired ruling

Two readers compare before and after: better, same or worse? Runs in each release review.

+
+

Readability blocks no merge. It steers the plan: code health ranks first among every project's goals.

+

Why: sources 22, 23, 24

+
+ +
+
Zoom in: C · Check
+

C · Check, in detail

+

A short AI run after every worker run. It decides what happens next, and when to ask the human.

+
+
What it reads +

The end of the worker's log. The README's goals and audience. The project's AGENTS.md and docs/decisions.md. The setup's CLAUDE.md, rules/ and review standards.

+
What it may answer +

A question those files already answer. It quotes the answer word for word, and the worker goes on.

+

A quote not found word for word goes to the human instead.

+
Checks on its reply +

A reply in the wrong shape, or with a made-up quote, counts as a failure and is retried. Three failures in a row stop the loop.

+
+
+ + + + + + + + +
VerdictWhenWhat happens next
FinishedThe PR is merged, and every answer the human gave is written down.Back to A. A new session, with a fresh, clean context.
UnfinishedWork is left.Back to B. The same session goes on, told what is left.
Already settledThe worker asked something the records answer.Back to B, with the quote.
Human's callOnly the human can decide.The human types an answer, or opens /talk. Back to B with it.
+
+

Rules it follows

+
    +
  • Answers are written down. A chunk isn't finished until every answer the human typed is in the README, AGENTS.md, docs/decisions.md, todo.md or a code comment. The session is deleted at the end, so an unwritten answer would be lost.
  • +
  • The worker makes its own small choices. A choice no rule reserves for the human, the worker makes and records. The judge doesn't interrupt for it.
  • +
  • No loops. A question asked again after its answer goes to the human. So does the fourth answered question in one cycle, and the sixth unfinished verdict in a row.
  • +
+

Why: sources 3, 4, 26

+
+ +
+
What to do next
+

The plan is one scored table

+

Every item gets numbers. A program sorts them. The top item is next.

+
+ + + + + + +
IDReleaseItemLEIRSMovesScore
2810.7.0Remove a merged chunk's worktree and branch and fast-forward the main checkout with one command.323631.4 by 2, 1.5 by 21.6
2860.7.0Lower the reading cost of the files a chunk reads most before its first commit.322551.4 by 41.0
+
+

Two real rows from this setup's own todo.md.

+ + +
    +
  • Chunk = next item + every item that can share its review. Same release, same reviewers needed, nothing blocking.
  • +
  • Security findings rank first in their release. Only open questions to the human rank above them.
  • +
+

Why: sources 9, 10, 11, 12, 13

+
+ +
+
Right model for the job
+

The model ladder

+

Easy work runs on a cheaper model. Risky work gets a stronger one, and stronger reviewers.

+ +
+
+

How a rung is picked

+
    +
  • Worker: L 1–2 one rung down, L 3 the project's rung, L 4 one up.
  • +
  • Reviewers: never below the project's rung or the worker's. E + I of 5 or more steps them up, one rung per point.
  • +
  • Readers and security: always the project's rung. The judge: never below it.
  • +
+
+
+

When the worker climbs

+
    +
  • The same test fails after two fixes.
  • +
  • A reviewer still finds a red problem in round 2.
  • +
  • A review rules the work below standard.
  • +
+

At most two rungs above the start without asking you. The ladder shown is for a project on Opus 5.5.

+
+
+

Why: sources 25, 26

+
+ +
+
From chunks to a version
+

A release

+

Chunks fill a release. A final review cleans up. You cut it.

+ +
+
    +
  • Release review: the architect and the principles auditor read the whole project, up to five rounds each, and fix what they find.
  • +
  • Then the readers compare before and after.
  • +
+
    +
  • When the release is ready, the loop stops and opens a session for you. It never starts the next release on its own.
  • +
  • Version number and publishing are always yours.
  • +
+
+

Why: sources 17

+
+ + + +
+
Part 2 · In depth
+

Talking to the loop

+

You start it with one command. It interrupts you in its terminal and in a shared inbox.

+
# inside a project checkout whose README has ## Goals and ## Audience
+$ loop-claude "Do the next chunk."
+… worker running: item 12 on claude-opus-5-5 at medium effort
+… judge: unfinished; resuming the same session
+… worker running
+? The worker asks: goal 2 says the CLI stays stable, but item 12 renames a flag.
+  Keep the old name, or change goal 2?
+answer › Keep the old name. Record it in docs/decisions.md.
+… worker resumes with your answer
+✓ judge: finished · PR merged · next chunk starts in a fresh session
+

An example. Only a choice reserved for the human interrupts: a goal, a release's items and its cut, or the model ladder. Why: sources 4, 28

+ +
+ + + + + + + + +
You typeWhat happens
a line of textThe worker resumes headless with your answer. It must record it before the chunk can finish.
/talkOpens the worker's session for you (claude --resume). Read the diff, discuss, then exit.
Enter aloneStops the loop. Rerunning resumes where it was.
loop-inboxOne screen for every loop on the machine: waiting questions, oldest first, and what each loop works on. Answer there or in the loop's own terminal; the first answer counts.
+
+ +
+ +
+

When the loop stops by itself

+

It stops only when it needs you, or something is broken.

+
+ + + + + + + + +
ReasonWhat to do
Release ready to cutIt opens a session for you. Cut the release.
6 unfinished verdicts in a rowLook at what is stuck; rerun to give it 6 more.
Worker or judge failed 3 timesRead the reason it prints. A usage limit is not a failure; it waits instead.
No goals in the READMEWrite ## Goals and ## Audience first. Nothing else runs until they exist.
+
+
+ +
+

Guard rails

+

Rules a program can check are enforced by a program, not by trust.

+
+ + + + + + + + + + + +
RailWhat it does
SandboxRuns only on a dedicated machine, such as a VM, with no access to production. Claude Code skips permission prompts there.
rule-hookRuns before each Agent, Bash, Edit, Read, Skill and Write call. Blocks e.g. multi-line commit messages, unpinned images, containers without memory limits, a third review round. Some rules allow a written override; the Overrides reviewer judges each one.
run-heavyHeavy commands (builds, mutation tests, full test runs) wait for a shared slot: one per 4 CPUs on the machine.
MemoryEvery container gets a memory limit. A new worker starts only while a quarter of the machine's memory is free.
ContextEach worker session, the /talk session and their subagents compact their context at about 170k tokens, keeping what the chunk still needs.
ArchiveEvery run's full log is saved. Every 20 cycles, figures from it may ask the human to change which model does what.
Main branchNothing is pushed to main. Every change merges through a PR whose gate passed.
+
+ +

Measured, so it can improve

+
    +
  • Interrupts per chunk: should fall. Fewer questions to you.
  • +
  • Red and yellow findings per chunk: should fall. Better first drafts.
  • +
  • Later fixes to merged code: should not rise. Review is not missing things.
  • +
  • Tokens per chunk: should fall, without more review rounds or unfinished verdicts.
  • +
  • Hours per chunk: should fall, without more red findings.
  • +
+

Why: sources 5, 27

+
+ +
+

Why it works this way

+

Each choice rests on research, a book, our own measurements, or trial and error. The numbers match the "Why" line at the bottom of each page.

+

The loop

+
+ + + + + + + + +
1A fresh, clean context every chunkReasoning Every turn re-sends the whole context, and compaction loses detail. The repo holds the memory between chunks, so a new chunk loses little.
Own measurement Simulated on 90 archived chunks, compacting at about 170k tokens would save about $78, 21% of the workers' spend. 36 full rewrites of a context after a cache gap cost $61, up to 785k tokens each. Within a chunk the session goes on: a fresh context for review would save $39, which compaction already saves as part of its $78.
Research Models use facts in the middle of a long context worst: Liu et al., "Lost in the Middle", TACL 2024. Answers degrade as input grows: Hong et al., "Context Rot", Chroma Research, 2025.
2Several items per chunk; risky items aloneOwn measurement Over 165 chunks, one item cost a median 1.30M tokens and two items 1.33M. Review costs about the same per chunk, so sharing it is cheap. At risk R 6 the median rose to 2.7M, and one in ten passed 8.8M, so R above 5 ships alone.
3The worker makes its own small choicesOwn measurement 92 of 255 interrupts already held the worker's recommendation. A chunk with an interrupt took a median 7.1 hours, against 0.44 hours without one. So the worker takes its recommendation on any choice no rule reserves for the human, and records it.
4Every answer is written downReasoning A finished chunk's session is deleted. An answer kept nowhere else would be asked again in a later chunk. One goal of the setup is to never ask the same thing twice.
5A program enforces every rule it can checkVendor docs Anthropic's best-practices page calls CLAUDE.md advisory and hooks deterministic. So rule-hook blocks a rule-breaking tool call before it lands, in every project.
Own measurement The override marker's spelling was picked by a panel of three fresh readers, two to one.
6Rules load by topic, not all at onceResearch Anthropic's memory docs say a longer CLAUDE.md reduces adherence. IFScale (arXiv:2507.11538) measures adherence falling as the number of instructions grows. So each topic's rules load only when a matching file is touched.
7The worker delegates only searchesOwn measurement A subagent's report cost a median 8% of the worker's peak context. Search output (sed, grep) was 41% of its shell results. So searches go to subagents; edits stay with the worker, which would re-read a delegated diff anyway.
8A limit on how much the worker reads at onceOwn measurement Under "no more than 80 lines of a file, or 3,000 characters of output, at once", three test tasks read 45–60% less, at the same or lower cost, every task done as well.
+
+ +
+

The plan

+
+ + + + + +
9Goals with a signal and a counter-signal; achieve vs. maintainResearch Specific, hard goals beat vague ones: Locke & Latham 2002. A narrow goal makes people neglect the rest: Ordóñez et al. 2009, "Goals gone wild". A measure made a target gets gamed: Manheim & Garrabrant 2018 (arXiv:1803.04585). Goals that keep a state differ from goals that reach one: van Lamsweerde 2001 (KAOS).
Research Instruction files alone did not raise agents' success (arXiv:2602.11988). So each goal names a signal that shows it still decides cases.
10Risk = L + E + I, each level about ×10Research Multiplying 1–10 labels misleads: Stevens 1946; Cox 2008, Risk Analysis. Adding levels on a ×10 scale multiplies the real chance and cost: Kaplan & Garrick 1981. Impact is the worst case, not a sum: NIST; CVSS v4.
11What makes L high: size, spread, something new, live configResearch Size predicts a defect best: Zeng et al. 2021, ISSTA. So does spread across files: Kamei et al. 2013. About 70% of Google's outages come from changes to a live system: Google SRE book. Complexity metrics add little once size is known: El Emam et al. 2001.
12Order the plan by value over sizeBook Doing the highest value per unit of work first minimises total waiting: Smith's rule, 1956; Reinertsen, The Principles of Product Development Flow, 2009 (WSJF).
13Check every score against finished chunksResearch Compare guesses with outcomes: Brier 1950. Correct estimates against similar past cases: Flyvbjerg 2006. Anchor each level to real examples: Smith & Kendall 1963. People are overconfident: Hubbard, How to Measure Anything.
Own measurement score-outcomes shows each finished item's guessed scores beside what its chunk measured.
+
+ +
+

Review

+
+ + + + + + + + +
14Narrow, separate reviewersExperience Early on, a reviewer with too broad a responsibility found fewer issues.
Own measurement On 2026-11-09, merged reviewers were replayed on archived rounds. Stability, product owner and prose as one reviewer cost half as much, but found 15 of 34 prose findings again, against 22–23 for the prose reviewer. Architect and principles auditor as one found 5 of 17 principles findings, against 10, and lost both red ones. Even stability and product owner alone, as one, found 4–5 of 16 product-owner findings, against 7–10. In every merge, one absorbed pass lost findings, at a third to half the cost. Method and figures: reviewer-merge-trials/ in the setup's repo. Merging reviewers that check the same kind of thing did hold up: one principles auditor found as much as several.
15At most two rounds per reviewerOwn measurement Since 2026-10-21, across all projects: round 1 ran 357 times and found 59 red findings. Round 2 ran about 200 times and found 12, mostly in round 1's fixes. Rounds 3 and later ran about 110 times and found none, for about $125. Asks for more rounds were 24 of 59 interrupts.
16Reviewers report only real problemsVendor docs Anthropic's Claude Code best practices: "A reviewer prompted to find gaps will usually report some, even when the work is sound."
Own measurement 320 of this repo's 876 commits answered a review round. So stability and product owner report only defects, broken requirements or broken principles.
17Architect and principles only in the release reviewOwn measurement The principles audit was the costliest reviewer after the worker, and filed findings unrelated to the chunk. Once a release, over the whole project, catches the same drift.
18Security: /security-review, not a hand-written reviewerReasoning Its tuned exclusion list and confidence floor would be reproduced worse by hand.
Own measurement Run beside the deep scan, it returned a near-identical report, so the deep scan replaces it when both would run.
19Mutation testing instead of coverageResearch Coverage barely predicts fault detection: Inozemtseva & Holmes, ICSE 2014. Surviving mutants do predict real faults: Just et al., FSE 2014. Google runs mutation testing in code review: Petrović et al., arXiv:2102.11378.
20Test first, with expected values from the itemResearch Tests that copy the code's current output pass on a bug: Charoosaei et al., arXiv:2610.11835 (preprint); Mathews & Nagappan, arXiv:2412.14137. Agents add mocks more often than people: Hora & Robbes, MSR 2026.
Book Software Engineering at Google, ch. 11, 12, 14; Beck, "Test Desiderata"; Khorikov, Unit Testing, ch. 4.
21The worker reads a principle only when a finding names itOwn measurement Over five chunks on each side of the change, review rounds per reviewer fell from 2.26 to 1.52.
+
+ +
+

Readability

+
+ + + +
22Code that fits in your head: about seven things per levelBook Seemann, Code That Fits in Your Head, 2021. Ousterhout, A Philosophy of Software Design (deep modules).
Research Working memory holds about four chunks: Cowan 2001. A list found by name is no memory limit: Nielsen Norman Group. No study supports a fixed limit on function length: Jones 2023.
23Reader panel: before-and-after rulings, never blockingOwn measurement Two independent four-reader runs moved up to 0.4 on near-identical code (PR #224). Readers comparing before and after should cancel that noise. A check of that is still pending: it needs 10 commits each scored twice.
Research No published study validates simulated reader panels yet. So the panel steers the plan and blocks no merge.
24Reading cost: the median of five chunksOwn measurement One chunk read 2.99M tokens before its first commit, against a typical 80k–370k. An average let that one chunk decide the trend alone, so a rise is the last five chunks' median above the five before.
+

Models

+
+ + +
25The model ladder, and no HaikuBenchmark The rungs follow the Artificial Analysis Intelligence Index, except Fable 5.1 at max: the index scores it below Opus 5.5 at high, and the human put it on top for the hardest tasks.
Own measurement A chunk on Haiku 5.5 ran 2 h 17 min and wrote 3.1M tokens. The chunk before it, on Sonnet 5.5, took 29 min and 111k. Chunks on Haiku took 7.8 extra review rounds, against 2.8 on Sonnet. So Haiku left the ladder.
26Judge and reviewers never run below the project's modelOwn measurement A replay of 39 judge verdicts, 31 of which the reference judge reproduced: on those 31, Opus 5.5 at medium missed none, and Sonnet 5.5 mislabelled 3 interrupts. A replay of review rounds: Sonnet 5.5 missed 44–55% of what the project's model found.
+

The machine

+
+ + +
27Shared heavy slots and memory limitsExperience On 2026-10-22 an 8-CPU, 16 GiB machine thrashed for hours: four to six loops ran mutation tests, builds and e2e tests at once. The next day, with 7.6 GiB, it hung until a hard reset, from containers with no memory limit. So heavy commands wait for a slot, one per 4 CPUs, and every container gets a limit.
28Names and syntax picked by the people who use themOwn measurement A panel of three readers, seated as the users, picks each new name or spelling. It picked loop-inbox 3–0.
+

Most measurements come from loop-claude's archive of every run, across all projects; others from git history, review replays, the readability history and two machine incidents. The setup's own docs/decisions.md and docs/scoring-and-goals-research.md hold the full reasoning.

+
+ +
+

Words used here

+
+
Chunk
One unit of work, shipped as one pull request. One or more plan items.
+
Cycle
One worker run plus the judge's verdict on it.
+
Item
One row of todo.md, with a bold one-sentence goal and its scores.
+
Worker
The headless Claude Code session that does the chunk.
+
Judge
The short AI run that reads each worker run and gives a verdict.
+
Interrupt
A question only you can answer. Shown in the terminal and in loop-inbox.
+
Pass
One kind of review, such as Stability. It runs in rounds.
+
Round
One review by one reviewer. At most two per pass per chunk.
+
Gate
The checks a PR must pass to merge: tests, CI, plan format.
+
Rung
A model at an effort level, such as "Opus 5.5 at high".
+
Premises
The README's ## Goals and ## Audience. Nothing runs without them.
+
Release review
A release's last chunk: whole-project review before you cut it.
+
Seat
One simulated reader on the comprehension panel.
+
Worktree
A separate git checkout per chunk, so your main checkout stays untouched.
+
+ +

The two commands you use

+
$ loop-claude "Do the next chunk."   # start the loop in a project
+$ loop-inbox                         # answer every loop's questions
+
+ +
diff --git a/presentation/render-pdf.js b/presentation/render-pdf.js new file mode 100644 index 00000000..e9ae94e4 --- /dev/null +++ b/presentation/render-pdf.js @@ -0,0 +1,14 @@ +// Print /work/page.html to /work/out.pdf with Chromium, as build-pdf.sh runs it inside the playwright-for-claude image. +const { chromium } = require('/app/node_modules/playwright'); + +(async () => { + const browser = await chromium.launch({ args: ['--no-sandbox', '--disable-dev-shm-usage'] }); + const page = await browser.newPage({ viewport: { width: 1100, height: 1400 } }); + // networkidle waits for the Google Fonts the page loads; fonts.ready waits for them to apply. + await page.goto('file:///work/page.html', { waitUntil: 'networkidle' }); + await page.evaluate(() => document.fonts.ready); + await page.emulateMedia({ media: 'print' }); + // preferCSSPageSize takes the page's own @page rule: A4 landscape. + await page.pdf({ path: '/work/out.pdf', format: 'A4', printBackground: true, preferCSSPageSize: true }); + await browser.close(); +})(); -- 2.52.0 From df887fa73816db15f8081d4448beeb818d56188c Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 9 Nov 2026 23:07:19 +0100 Subject: [PATCH 2/5] =?UTF-8?q?Answer=20security=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1=20(0=20misread);=20clean?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From c2792f684a700c6497159b6c1c6ecc2fdd397ef2 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 9 Nov 2026 23:13:08 +0100 Subject: [PATCH 3/5] =?UTF-8?q?Answer=20stability=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=204=20=F0=9F=9F=A1=20(0=20misread);=20count=20chu?= =?UTF-8?q?nks=20and=20projects=20as=20the=20archive=20holds=20them,=20dat?= =?UTF-8?q?e=20the=20876=20commits,=20fail=20the=20print=20when=20a=20font?= =?UTF-8?q?=20fails=20to=20load,=20build=20the=20image=20under=20run-heavy?= =?UTF-8?q?,=20and=20print=20from=20Python?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- presentation/README.md | 6 +++--- presentation/build-pdf.py | 28 ++++++++++++++++++++++++++++ presentation/build-pdf.sh | 25 ------------------------- presentation/index.html | 8 ++++---- presentation/render-pdf.js | 11 ++++++++++- 6 files changed, 46 insertions(+), 34 deletions(-) create mode 100755 presentation/build-pdf.py delete mode 100755 presentation/build-pdf.sh diff --git a/.gitignore b/.gitignore index 76bf89e6..090b6f62 100644 --- a/.gitignore +++ b/.gitignore @@ -108,7 +108,7 @@ !docs/*.md !presentation/ !presentation/README.md -!presentation/build-pdf.sh +!presentation/build-pdf.py !presentation/index.html !presentation/render-pdf.js !principles/ diff --git a/presentation/README.md b/presentation/README.md index 4a612958..afcb3a00 100644 --- a/presentation/README.md +++ b/presentation/README.md @@ -5,12 +5,12 @@ ## Rebuild the PDF ```sh -presentation/build-pdf.sh +presentation/build-pdf.py ``` -It writes `presentation/loop-claude-explained.pdf`, which stays out of git. It needs Docker and the `playwright-for-claude` image, which `~/code/playwright-for-agents/pw about:blank` builds once. +It writes `presentation/loop-claude-explained.pdf`, which stays out of git. It needs Docker and the `playwright-for-claude` image. Build the image once with `~/.claude/bin/run-heavy docker build -t playwright-for-claude ~/code/playwright-for-agents`. -`index.html` is an artifact body: it has no doctype, head or body of its own. `build-pdf.sh` wraps it the way the artifact host does. To publish an edited page, publish `index.html` to the same artifact. +`index.html` is an artifact body: it has no doctype, head or body of its own. `build-pdf.py` wraps it the way the artifact host does. To publish an edited page, publish `index.html` to the same artifact. ## Who it is for diff --git a/presentation/build-pdf.py b/presentation/build-pdf.py new file mode 100755 index 00000000..c013ba39 --- /dev/null +++ b/presentation/build-pdf.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python3 +"""Print index.html to loop-claude-explained.pdf beside it, in the playwright-for-claude image.""" +import pathlib, shutil, subprocess, sys, tempfile + +HERE = pathlib.Path(__file__).resolve().parent +IMAGE = "playwright-for-claude" +# index.html is an artifact body, without a doctype, head or body of its own, so wrap it as the artifact host does. +HEAD = '\n' + + +def main() -> int: + if subprocess.run(["docker", "image", "inspect", IMAGE], capture_output=True).returncode != 0: + print(f"No {IMAGE} image. Build it once with: ~/.claude/bin/run-heavy docker build -t {IMAGE} ~/code/playwright-for-agents", file=sys.stderr) + return 1 + with tempfile.TemporaryDirectory() as folder: + work = pathlib.Path(folder) + (work / "page.html").write_text(HEAD + (HERE / "index.html").read_text(encoding="utf-8") + "\n", encoding="utf-8") + shutil.copy(HERE / "render-pdf.js", work) + printed = subprocess.run(["docker", "run", "--rm", "--init", "--memory", "2g", "--memory-swap", "2g", "-v", f"{work}:/work", "-w", "/work", "--entrypoint", "node", IMAGE, "render-pdf.js"]) + if printed.returncode != 0: + return printed.returncode + shutil.copy(work / "out.pdf", HERE / "loop-claude-explained.pdf") + print(f"Wrote {HERE / 'loop-claude-explained.pdf'}") + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/presentation/build-pdf.sh b/presentation/build-pdf.sh deleted file mode 100755 index a5997b67..00000000 --- a/presentation/build-pdf.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# Print index.html to loop-claude-explained.pdf beside it, in the playwright-for-claude image. -# The image comes from ~/code/playwright-for-agents: its ./pw builds it on first use. -set -eu - -here=$(cd "$(dirname "$0")" && pwd) -work=$(mktemp -d) -trap 'rm -rf "$work"' EXIT - -if ! docker image inspect playwright-for-claude >/dev/null 2>&1; then - echo "No playwright-for-claude image. Build it once with: ~/code/playwright-for-agents/pw about:blank" >&2 - exit 1 -fi - -# index.html is an artifact body, without a doctype, head or body of its own, so wrap it as the artifact host does. -{ - printf '\n' - cat "$here/index.html" - printf '\n' -} > "$work/page.html" -cp "$here/render-pdf.js" "$work/" - -docker run --rm --init --memory 2g --memory-swap 2g -v "$work:/work" -w /work --entrypoint node playwright-for-claude render-pdf.js -cp "$work/out.pdf" "$here/loop-claude-explained.pdf" -echo "Wrote $here/loop-claude-explained.pdf" diff --git a/presentation/index.html b/presentation/index.html index 2871c787..f157cb29 100644 --- a/presentation/index.html +++ b/presentation/index.html @@ -231,9 +231,9 @@ dl.gloss dt { font-weight: 700; } dl.gloss dd { margin: 0; color: var(--muted);

For developers and teams who build with AI agents and want a software factory: work that keeps flowing without someone watching it, at a quality they would sign off on.

-
362chunks finished since 2026-10-04, one PR each
-
17projects run by the loop
-
2,526commits in the setup's own repo
+
466chunks finished since 2026-10-03, one PR each
+
12projects that finished a chunk
+
2,538commits in the setup's own repo
@@ -991,7 +991,7 @@ dl.gloss dt { font-weight: 700; } dl.gloss dd { margin: 0; color: var(--muted);
- + diff --git a/presentation/render-pdf.js b/presentation/render-pdf.js index e9ae94e4..90120a1d 100644 --- a/presentation/render-pdf.js +++ b/presentation/render-pdf.js @@ -1,12 +1,21 @@ -// Print /work/page.html to /work/out.pdf with Chromium, as build-pdf.sh runs it inside the playwright-for-claude image. +// build-pdf.py runs this in the playwright-for-claude image: it prints /work/page.html to /work/out.pdf with Chromium. const { chromium } = require('/app/node_modules/playwright'); (async () => { const browser = await chromium.launch({ args: ['--no-sandbox', '--disable-dev-shm-usage'] }); const page = await browser.newPage({ viewport: { width: 1100, height: 1400 } }); + // A font that fails to load falls back to another, and the pages no longer fit their sheets, so any failed request fails the build. + const failed = []; + page.on('requestfailed', (request) => failed.push(request.url())); + page.on('response', (response) => { if (response.status() >= 400) failed.push(`${response.status()} ${response.url()}`); }); // networkidle waits for the Google Fonts the page loads; fonts.ready waits for them to apply. await page.goto('file:///work/page.html', { waitUntil: 'networkidle' }); await page.evaluate(() => document.fonts.ready); + if (failed.length) { + console.error(`Not printed, since these failed to load: ${failed.join(', ')}`); + await browser.close(); + process.exit(1); + } await page.emulateMedia({ media: 'print' }); // preferCSSPageSize takes the page's own @page rule: A4 landscape. await page.pdf({ path: '/work/out.pdf', format: 'A4', printBackground: true, preferCSSPageSize: true }); -- 2.52.0 From 6a85249d99bd8ff8f2be1b1632f0489dc51ef90a Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 9 Nov 2026 23:13:31 +0100 Subject: [PATCH 4/5] =?UTF-8?q?Answer=20product-owner=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=203=20=F0=9F=9F=A1=20(0=20misread);=20say=20where?= =?UTF-8?q?=20the=20page=20is=20published=20and=20how,=20give=20the=20comm?= =?UTF-8?q?ands=20behind=20each=20figure=20and=20the=20network=20the=20bui?= =?UTF-8?q?ld=20needs,=20point=20the=20step=20list=20at=20page=203,=20list?= =?UTF-8?q?=20MultiEdit,=20and=20name=20independent=20work=20in=20source?= =?UTF-8?q?=207;=20prose's=20README=20fixes=20ride=20along?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- presentation/README.md | 39 ++++++++++++++++++++------------------- presentation/index.html | 8 ++++---- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/presentation/README.md b/presentation/README.md index afcb3a00..a00d50b3 100644 --- a/presentation/README.md +++ b/presentation/README.md @@ -8,9 +8,13 @@ presentation/build-pdf.py ``` -It writes `presentation/loop-claude-explained.pdf`, which stays out of git. It needs Docker and the `playwright-for-claude` image. Build the image once with `~/.claude/bin/run-heavy docker build -t playwright-for-claude ~/code/playwright-for-agents`. +It writes `presentation/loop-claude-explained.pdf`, which stays out of git. It needs Docker, network access to Google Fonts, and the `playwright-for-claude` image. Build the image once with `~/.claude/bin/run-heavy docker build -t playwright-for-claude ~/code/playwright-for-agents`. When a font fails to load, the build stops without printing: fallback fonts would push pages onto a second sheet. -`index.html` is an artifact body: it has no doctype, head or body of its own. `build-pdf.py` wraps it the way the artifact host does. To publish an edited page, publish `index.html` to the same artifact. +## Publish the page + +The page lives at https://claude.ai/artifact/RJJwgRAke3viuqTYEgu1a9. To update it, ask Claude Code to publish `presentation/index.html` to that URL with its Artifact tool; the tool reads the live version first. + +`index.html` is an artifact body: it has no doctype, head or body of its own. `build-pdf.py` wraps it the way the artifact host does. ## Who it is for @@ -18,8 +22,6 @@ People in tech who want to build software factories, work with AI tools more eff ## How the pages are built -These choices were made with the human while the pages were written. - - **Page 1 engages.** It states the problem, what loop-claude does, what it aims for, who it is for, and three real figures. - **Pages 2 and 3 share one layout.** Page 2 is the simple chart, page 3 the full one. The section frames, the human boxes, the colours and the return arrows sit in the same places on both. Each big box on page 2 is the group of steps at the same place on page 3, so a reader translates by position. Keep it that way. - **The full chart shows every piece.** A simpler view may group pieces, never drop them. @@ -27,33 +29,32 @@ These choices were made with the human while the pages were written. - **A · Start, deterministic, no AI:** Rank the plan, Prepare, Pick the work, Pick model. - **B · Work, the worker:** Build, Review, Gate, Goals check, Readability, Merge. The release review sits on top, and new items flow back into the plan. - **C · Check, the judge:** its verdicts, and where each one returns. -- **The human stands outside the sections,** since a human is not deterministic. Planning a release is a chunk in B: the worker drafts it, and the human approves it. +- **The human stands outside the sections,** since the human is not a step the loop runs. Planning a release is a chunk in B: the worker drafts it, and the human approves it. - **Zoom pages break one section down, one page each,** with the same step names. They never cut the flow another way. - **Colours mean roles:** amber the human, blue the worker, violet the judge, teal the reviewers, green the merge. - **Each page fits one landscape A4 sheet.** After an edit, rebuild the PDF and check the page count: a page that spills shows up as an extra page. - **Draw arrows after the section backgrounds,** or a section box hides them. -- **Every page ends with "Why: sources …",** linking to the numbered rows of the "Why it works this way" pages. Each row is tagged Research, Book, Vendor docs, Benchmark, Own measurement, Experience or Reasoning. +- **Pages 2 to 17 each carry a "Why: sources …" line,** linking to the numbered rows of the "Why it works this way" pages. Each row is tagged Research, Book, Vendor docs, Benchmark, Own measurement, Experience or Reasoning. ## Where the figures come from -The figures were current on 2026-11-09. Update them before presenting again. +The figures were current on 2026-11-09. Refresh them before presenting again. -- **362 finished chunks and 17 projects:** loop-claude's archive, which starts on 2026-10-04. Count the `*.outcomes.md` files holding `Verdict: finished`, and the project folders. -- **2,526 commits:** `git log --oneline | wc -l` in this repo. +- **Finished chunks, 466 since 2026-10-03,** in loop-claude's archive: + + ```sh + find ~/.claude/loop-claude-transcripts -name '*.outcomes.md' -exec grep -l 'Verdict: finished' {} + | wc -l + ``` + + The first stamp in any outcomes file gives the start date. +- **Projects that finished a chunk, 12.** Each archive folder holding `.outcomes.md` files is a project key. Count the keys with a finished chunk, and count `claude-config` and `home/lilleman/.claude` as one project: the second is this repo's release checkout. +- **Commits, 2,538:** `git log --oneline | wc -l` in this repo. - **The readability bars:** the latest scoring run in `docs/comprehension-history.md`, the rerun on PR #397. - **The two plan rows:** items 281 and 286 of `todo.md`. - **Every other figure:** `docs/decisions.md`, `docs/scoring-and-goals-research.md` and `reviewer-merge-trials/README.md`. -Two sources appear only here, as reading in support of a fresh context per chunk: Liu et al., "Lost in the Middle", TACL 2024; and Hong et al., "Context Rot", Chroma Research, 2025. +Two sources in row 1 are cited nowhere else in the repo, as reading in support of a fresh context per chunk: Liu et al., "Lost in the Middle", TACL 2024; and Hong et al., "Context Rot", Chroma Research, 2025. ## Checking it -A subagent fact-checked the whole page against this repo on 2026-11-09. It found 24 errors, and all are fixed. Run such a check again after a larger edit, since the setup changes under the page. - -## What writing it changed - -Explaining the setup raised questions the repo now answers: - -- PR #455: code health holds for years, and goal 1.4 keeps lowering cost, with a rising reading cost as its first counter-signal. -- PR #456: `reviewer-merge-trials/`, and the decision `review: each pass keeps a reviewer of its own`. -- Items 288, 289 and 290 in `todo.md`. +After a larger edit, fact-check the page against the repo again: the setup changes under it. diff --git a/presentation/index.html b/presentation/index.html index f157cb29..85528fe7 100644 --- a/presentation/index.html +++ b/presentation/index.html @@ -469,7 +469,7 @@ dl.gloss dt { font-weight: 700; } dl.gloss dd { margin: 0; color: var(--muted);
  • skills/comprehension-panel/ the simulated readers
  • principles/ technical principles reviewers hold code to
  • bin/ the tools: loop-claude, loop-inbox, chunk-preflight, chunk-pr, rule-hook, rank_todo.py, run-heavy and more
  • -
  • settings.json runs rule-hook before each Agent, Bash, Edit, Read, Skill and Write call
  • +
  • settings.json runs rule-hook before each Agent, Bash, Edit, MultiEdit, Read, Skill and Write call
  • @@ -538,7 +538,7 @@ dl.gloss dt { font-weight: 700; } dl.gloss dd { margin: 0; color: var(--muted);
    Zoom in: B · Work

    B · Work, in detail

    -

    The worker follows a fixed recipe, called larv-review. The same six steps as page 1.

    +

    The worker follows a fixed recipe, called larv-review. The same six steps as page 3.

    + @@ -970,7 +970,7 @@ dl.gloss dt { font-weight: 700; } dl.gloss dd { margin: 0; color: var(--muted); - +
    14Narrow, separate reviewersExperience Early on, a reviewer with too broad a responsibility found fewer issues.
    Own measurement On 2026-11-09, merged reviewers were replayed on archived rounds. Stability, product owner and prose as one reviewer cost half as much, but found 15 of 34 prose findings again, against 22–23 for the prose reviewer. Architect and principles auditor as one found 5 of 17 principles findings, against 10, and lost both red ones. Even stability and product owner alone, as one, found 4–5 of 16 product-owner findings, against 7–10. In every merge, one absorbed pass lost findings, at a third to half the cost. Method and figures: reviewer-merge-trials/ in the setup's repo. Merging reviewers that check the same kind of thing did hold up: one principles auditor found as much as several.
    15At most two rounds per reviewerOwn measurement Since 2026-10-21, across all projects: round 1 ran 357 times and found 59 red findings. Round 2 ran about 200 times and found 12, mostly in round 1's fixes. Rounds 3 and later ran about 110 times and found none, for about $125. Asks for more rounds were 24 of 59 interrupts.
    16Reviewers report only real problemsVendor docs Anthropic's Claude Code best practices: "A reviewer prompted to find gaps will usually report some, even when the work is sound."
    Own measurement 320 of this repo's 876 commits answered a review round. So stability and product owner report only defects, broken requirements or broken principles.
    16Reviewers report only real problemsVendor docs Anthropic's Claude Code best practices: "A reviewer prompted to find gaps will usually report some, even when the work is sound."
    Own measurement 320 of the setup repo's first 876 commits, by 2026-10-13, answered a review round. So stability and product owner report only defects, broken requirements or broken principles.
    17Architect and principles only in the release reviewOwn measurement The principles audit was the costliest reviewer after the worker, and filed findings unrelated to the chunk. Once a release, over the whole project, catches the same drift.
    18Security: /security-review, not a hand-written reviewerReasoning Its tuned exclusion list and confidence floor would be reproduced worse by hand.
    Own measurement Run beside the deep scan, it returned a near-identical report, so the deep scan replaces it when both would run.
    19Mutation testing instead of coverageResearch Coverage barely predicts fault detection: Inozemtseva & Holmes, ICSE 2014. Surviving mutants do predict real faults: Just et al., FSE 2014. Google runs mutation testing in code review: Petrović et al., arXiv:2102.11378.
    Runs before each Agent, Bash, Edit, Read, Skill and Write call. Blocks e.g. multi-line commit messages, unpinned images, containers without memory limits, a third review round. Some rules allow a written override; the Overrides reviewer judges each one.
    rule-hookRuns before each Agent, Bash, Edit, MultiEdit, Read, Skill and Write call. Blocks e.g. multi-line commit messages, unpinned images, containers without memory limits, a third review round. Some rules allow a written override; the Overrides reviewer judges each one.
    run-heavyHeavy commands (builds, mutation tests, full test runs) wait for a shared slot: one per 4 CPUs on the machine.
    MemoryEvery container gets a memory limit. A new worker starts only while a quarter of the machine's memory is free.
    ContextEach worker session, the /talk session and their subagents compact their context at about 170k tokens, keeping what the chunk still needs.
    4Every answer is written downReasoning A finished chunk's session is deleted. An answer kept nowhere else would be asked again in a later chunk. One goal of the setup is to never ask the same thing twice.
    5A program enforces every rule it can checkVendor docs Anthropic's best-practices page calls CLAUDE.md advisory and hooks deterministic. So rule-hook blocks a rule-breaking tool call before it lands, in every project.
    Own measurement The override marker's spelling was picked by a panel of three fresh readers, two to one.
    6Rules load by topic, not all at onceResearch Anthropic's memory docs say a longer CLAUDE.md reduces adherence. IFScale (arXiv:2507.11538) measures adherence falling as the number of instructions grows. So each topic's rules load only when a matching file is touched.
    7The worker delegates only searchesOwn measurement A subagent's report cost a median 8% of the worker's peak context. Search output (sed, grep) was 41% of its shell results. So searches go to subagents; edits stay with the worker, which would re-read a delegated diff anyway.
    7The worker hands subagents only searches and independent workOwn measurement A subagent's report cost a median 8% of the worker's peak context. Search output (sed, grep) was 41% of its shell results. So searches, and work independent enough to run in parallel, go to subagents; edits stay with the worker, which would re-read a delegated diff anyway.
    8A limit on how much the worker reads at onceOwn measurement Under "no more than 80 lines of a file, or 3,000 characters of output, at once", three test tasks read 45–60% less, at the same or lower cost, every task done as well.
    -- 2.52.0 From 664b35e966a0fdf17b397a74117c76ea71ae3227 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 9 Nov 2026 23:14:14 +0100 Subject: [PATCH 5/5] =?UTF-8?q?Answer=20prose=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=2011=20=F0=9F=9F=A1=20(0=20misread);=20correct=20?= =?UTF-8?q?the=20rank,=20release=20review,=20round=20cap=20and=20judge-quo?= =?UTF-8?q?te=20claims,=20explain=20terms=20where=20a=20newcomer=20meets?= =?UTF-8?q?=20them,=20drop=20repeats=20and=20unused=20glossary=20words,=20?= =?UTF-8?q?and=20fix=20the=20banned=20negations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- presentation/README.md | 2 +- presentation/index.html | 57 ++++++++++++++++++----------------------- 2 files changed, 26 insertions(+), 33 deletions(-) diff --git a/presentation/README.md b/presentation/README.md index a00d50b3..a0111ad3 100644 --- a/presentation/README.md +++ b/presentation/README.md @@ -34,7 +34,7 @@ People in tech who want to build software factories, work with AI tools more eff - **Colours mean roles:** amber the human, blue the worker, violet the judge, teal the reviewers, green the merge. - **Each page fits one landscape A4 sheet.** After an edit, rebuild the PDF and check the page count: a page that spills shows up as an extra page. - **Draw arrows after the section backgrounds,** or a section box hides them. -- **Pages 2 to 17 each carry a "Why: sources …" line,** linking to the numbered rows of the "Why it works this way" pages. Each row is tagged Research, Book, Vendor docs, Benchmark, Own measurement, Experience or Reasoning. +- **Pages 2 to 15 and 17 each carry a "Why: sources …" line,** linking to the numbered rows of the "Why it works this way" pages. Each row is tagged Research, Book, Vendor docs, Benchmark, Own measurement, Experience or Reasoning. ## Where the figures come from diff --git a/presentation/index.html b/presentation/index.html index 85528fe7..8b8daf4e 100644 --- a/presentation/index.html +++ b/presentation/index.html @@ -4,7 +4,7 @@