From a90deafd9b6b1a73d2503fa0538355f2594b0a12 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 13 Oct 2026 09:23:37 +0200 Subject: [PATCH 1/6] Put the README's Goals and Audience into every fresh worker prompt, under the item's scope --- CHANGELOG.md | 1 + CLAUDE.md | 1 + bin/loop_claude/cycle/prompts.py | 4 ++-- bin/loop_claude/cycle/run.py | 2 +- bin/loop_claude/loop/main.py | 3 ++- bin/loop_claude/test_black_box.py | 1 + bin/loop_claude/test_loop_claude.py | 2 +- todo.md | 9 --------- 8 files changed, 9 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f15fa232..e2723104 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- `loop-claude` puts the README's Goals and Audience into each new worker session's prompt, under a line saying that the item sets the chunk's scope and the goals choose between ways to meet it, never widening it. A session outside the loop reads them before starting a chunk, as `CLAUDE.md` now says. - A session no longer reads the technical principles before writing code. It writes the simplest change that solves its item, test first wherever a test can check the change, and reads a principle only when the item changes it, a finding names it, or a decision or `todo.md` item it writes cites it. larv-review's reviewers hold the change to the principles, and a finding against one names it. Expect more findings from the prose and stability reviewers, since sessions no longer load the rules for comments and READMEs. - The rules for comments and READMEs, "Quality" and the examples behind "Prose" moved to `skills/larv-review/standards/`, which the prose and stability reviewers and `loop-claude`'s judge read. `CLAUDE.md` keeps a short core of "Prose"; sorting where order carries no meaning lives only in the technical principles. - A session no longer points out a preference you have repeated or asks you to write it up, and no longer restructures `CLAUDE.md` and `rules/` after changing them. diff --git a/CLAUDE.md b/CLAUDE.md index fd39bd51..6c6adf29 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -9,6 +9,7 @@ How work proceeds in any repo, unless the repo's `AGENTS.md` says otherwise. The - **When the next release has no items and no work has landed towards it, plan it as this chunk.** Move the highest-scoring items of later releases into it, and get the human's approval of that set before writing any code. - **When the next release has no items left and work has landed towards it, it is finished: stop.** Report what it holds and that it is ready to cut. Under `/loop`, this ends the loop. Until the human cuts it, only a security fix lands, into that release; never start a later release's items or plan a new one. - **Open every chunk with one line:** the last version cut, what is unreleased (`CHANGELOG.md` → `## Unreleased`, or else the log since the last tag), and the release this chunk ships into. A repo that publishes nothing says so once. +- **Read the README's `## Goals` and `## Audience` before starting a chunk.** The item sets the chunk's scope; the goals choose between ways to meet it, and never widen it. - **Work one chunk at a time, and make it as large as one purpose allows.** Every review has a fixed cost, so a chunk takes the next plan item plus every other item for which three things hold: one PR title states what they achieve together, without listing them; they name one release; and they fire the same review passes (`larv-review` §3). Tiny items, a few lines of change each, need neither a shared purpose nor the same passes: bundle up to ten that name one release into one chunk. Split a milestone into items in `todo.md` before starting it. Fix a finding in the chunk's own change within the chunk. File a finding about anything else in `todo.md`. An item marked `question` waits for the human; take the next item. - **Ask, don't guess.** First check whether the goals already answer the question. If they nearly do, propose a change to the goals and show how it answers this case: an answer settles one question, a goal settles every question like it. Write every answer once, where it belongs, never only in chat: a goal in `README.md`, a working rule in `AGENTS.md`, a standing choice in a comment at the one place it governs, or in `docs/decisions.md` once made in more than one place. When an answer holds a goal and a choice, write the goal in the README, and record as a choice only what the goal leaves open. - **Bench a syntax with the people who write it.** Before a new or changed spelling of something users read or write ships — markdown, HTML, a config key, a CLI flag — a panel of fresh-context readers, seated as those users from the README's `## Audience`, picks it. diff --git a/bin/loop_claude/cycle/prompts.py b/bin/loop_claude/cycle/prompts.py index 6338b9d3..36426a48 100644 --- a/bin/loop_claude/cycle/prompts.py +++ b/bin/loop_claude/cycle/prompts.py @@ -13,8 +13,8 @@ ANSWER_DESTINATIONS = "README.md's Goals or Audience, " + ", ".join(RECORD_FILES ANSWERS_RECORDED = f"every answer the human typed in it that a later chunk could need is recorded in {ANSWER_DESTINATIONS} at the one place it governs" -def fresh(task: str) -> str: - return f"{task}\n\nContinue any open draft PR or worktree for the chunk before creating a new one." +def fresh(task: str, premises: str) -> str: + return f"{task}\n\nContinue any open draft PR or worktree for the chunk before creating a new one.\n\nThe item sets the chunk's scope; the goals choose between ways to meet it, and never widen it.\n\nFrom README.md:\n{premises}" def resumed(unfinished_evidence: str) -> str: diff --git a/bin/loop_claude/cycle/run.py b/bin/loop_claude/cycle/run.py index 4e4a72ab..be174727 100644 --- a/bin/loop_claude/cycle/run.py +++ b/bin/loop_claude/cycle/run.py @@ -85,7 +85,7 @@ def worker_start(cycle: Cycle, answered: QuotedAnswer | None) -> list[str]: return worker_args(cycle.session, cycle.models.worker, prompts.answered(answered.question, answered.answer), resume=True) if session_open(cycle.session): return worker_args(cycle.session, cycle.models.worker, prompts.resumed(cycle.unfinished_evidence), resume=True) - return worker_args(cycle.session, cycle.models.worker, prompts.fresh(cycle.task), resume=False) + return worker_args(cycle.session, cycle.models.worker, prompts.fresh(cycle.task, cycle.premises), resume=False) def keep_answer(cycle: Cycle, answered: QuotedAnswer) -> Stop | None: diff --git a/bin/loop_claude/loop/main.py b/bin/loop_claude/loop/main.py index 7bbf45dd..568b9e2a 100644 --- a/bin/loop_claude/loop/main.py +++ b/bin/loop_claude/loop/main.py @@ -3,7 +3,8 @@ usage: loop-claude Run it anywhere inside a project checkout whose README.md has ## Goals and ## Audience, the -premises; the task runs at the checkout root. Each cycle a worker runs the task. A judge then reads +premises; the task runs at the checkout root. Each cycle a worker runs the task, and a fresh session's +prompt adds the premises, which choose between ways to meet the item and never widen it. A judge then reads the transcript's end, the premises, and the records: the project's AGENTS.md and docs/decisions.md, and the human's ~/.claude/CLAUDE.md, ~/.claude/rules/*.md and ~/.claude/skills/larv-review/standards/*.md, where they exist. It rules whether the chunk, the work diff --git a/bin/loop_claude/test_black_box.py b/bin/loop_claude/test_black_box.py index 5785a2f6..24f5e610 100644 --- a/bin/loop_claude/test_black_box.py +++ b/bin/loop_claude/test_black_box.py @@ -348,6 +348,7 @@ class Cycles(unittest.TestCase): self.assertIsNone(argument(workers[1], "--name")) self.assertEqual(argument(workers[2], "--session-id"), session) self.assertTrue(argument(workers[0], "-p").startswith(f"{TASK}\n\nContinue any open draft PR")) + self.assertTrue(argument(workers[0], "-p").endswith("The item sets the chunk's scope; the goals choose between ways to meet it, and never widen it.\n\nFrom README.md:\n## Goals\n1. Work.\n\n## Audience\nMe.")) self.assertNotIn(TASK, argument(workers[1], "-p")) self.assertIn("Even then, it is finished only once every answer the human typed in it", argument(workers[1], "-p")) self.assertIn("as the work remaining:\n\n> started\n\n", argument(workers[1], "-p")) diff --git a/bin/loop_claude/test_loop_claude.py b/bin/loop_claude/test_loop_claude.py index 3f56ce31..50a69d18 100644 --- a/bin/loop_claude/test_loop_claude.py +++ b/bin/loop_claude/test_loop_claude.py @@ -384,7 +384,7 @@ class ModelPrompt(unittest.TestCase): class WorkerArgs(unittest.TestCase): def test_opens_a_fresh_session_by_name_and_resumes_an_open_one(self): opened = session.session_named("A proj loop-claude", pathlib.Path("/h/.claude/projects")) - fresh = worker.worker_args(opened, "m", prompts.fresh("Do it."), resume=False) + fresh = worker.worker_args(opened, "m", prompts.fresh("Do it.", "## Goals\n1. g\n\n## Audience\nme"), resume=False) self.assertEqual(fresh[fresh.index("--session-id") + 1], str(opened.id)) self.assertEqual(fresh[fresh.index("--name") + 1], "A proj loop-claude") resumed = worker.worker_args(opened, "m", prompts.resumed(""), resume=True) diff --git a/todo.md b/todo.md index a7b91eb1..5129808d 100644 --- a/todo.md +++ b/todo.md @@ -24,7 +24,6 @@ | ID | Release | Exempt | Item | R | S | A | G | Goals | Score | |---|---|---|---|---|---|---|---|---|---| -| 107 | 0.1.0 | | **Have loop-claude put the README's Goals and Audience into every fresh worker prompt, under a line that the item sets the scope and the goals choose within it.** | 3 | 3 | 8 | 8 | 1.1, 1.2 | 28.1 | | 108 | 0.1.0 | | **Mutation-test the lines each chunk changes, and make each mutant no test catches a finding of the stability pass.** | 2 | 4 | 7 | 8 | 1.1 | 26.8 | | 98 | 0.1.0 | | **Score R and S from a measurement wherever one exists, and calibrate each guessed score against the finished chunk's measured outcome.** | 2 | 5 | 6 | 7 | 1.1, 1.4 | 22.6 | | 99 | 0.1.0 | | **Drop the comprehension panel as a merge gate, and keep recording its scores and the places in the code its seats found hard, for later measurement and for other reviewers and agents to improve.** | 4 | 5 | 7 | 7 | 1.1, 1.4, 1.5 | 22.6 | @@ -68,14 +67,6 @@ ## Details -### 107. Have loop-claude put the README's Goals and Audience into every fresh worker prompt, under a line that the item sets the scope and the goals choose within it. - -Today loop-claude hands the premises only to the judge (`bin/loop_claude/cycle/judge.py`), and a worker reads them only when the typed task says to read `README.md`. A worker that implements the simplest change (`docs/decisions.md` → the `worker:` decision) needs the goals to know what it must not give up, and "Ask, don't guess" checks the goals first. The premises are short: 113 words on this repo. The human chose this on 2026-10-13. - -- Add the premises loop-claude already reads to `prompts.fresh`, with a test. -- Above them, one line: the item sets the scope, and the goals choose between ways to meet it. A worker then extends no item towards a goal. -- For a session outside the loop, add one line to `CLAUDE.md`'s working loop: read the README's Goals and Audience before starting a chunk. - ### 108. Mutation-test the lines each chunk changes, and make each mutant no test catches a finding of the stability pass. lilleman, 2026-10-13: tests should be as valuable as possible, never written to tick a box. Today the technical principles ask that most code has tests, written first, and that coverage not decline, which item 69 would measure. The stability reviewer asks, by reading, whether each test would fail if the behaviour broke. Coverage counts the lines a test runs, so a test with no meaningful assertion still raises it. -- 2.52.0 From 49febe2eb68437c56f7eb4caf60dc6fdd5533423 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 13 Oct 2026 09:23:54 +0200 Subject: [PATCH 2/6] Append the reading-cost figure and file item 109 for its rise --- docs/reading-cost.md | 17 +++++++++++++++++ todo.md | 7 ++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/reading-cost.md b/docs/reading-cost.md index 897c4a21..faf0e12f 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -145,3 +145,20 @@ Read most (opens and searches): - `docs/decisions.md` 3 - `CHANGELOG.md` 2 - `bin/loop_claude/cycle/judge.py` 2 + +## Reading cost, chunk 6b4fb1df1143, finished 2026-10-13T07:21:44Z + +136132 new input tokens before the first commit. + +Read most (opens and searches): + +- `CLAUDE.md` 5 +- `docs/decisions.md` 5 +- `bin/loop_claude/loop/main.py` 4 +- `todo.md` 4 +- `CHANGELOG.md` 3 +- `README.md` 3 +- `agents/stability-reviewer.md` 3 +- `bin/repo_checks/test_citations.py` 3 +- `.gitignore` 2 +- `AGENTS.md` 2 diff --git a/todo.md b/todo.md index 5129808d..301a57b7 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 9` -`Next ID = 109` +`Next ID = 110` | Goal | W | |---|---| @@ -29,6 +29,7 @@ | 99 | 0.1.0 | | **Drop the comprehension panel as a merge gate, and keep recording its scores and the places in the code its seats found hard, for later measurement and for other reviewers and agents to improve.** | 4 | 5 | 7 | 7 | 1.1, 1.4, 1.5 | 22.6 | | 87 | 0.1.0 | | **Score every `todo.md` item's complexity C from 1 to 10, and have `rank_todo.py` fail on an item without one.** | 3 | 4 | 6 | 7 | 1.1, 1.4 | 21.9 | | 97 | 0.1.0 | | **Narrow each review pass to the findings worth a fix, so a pass converges in its second round.** | 5 | 4 | 7 | 7 | 1.1, 1.4, 1.5 | 21.9 | +| 109 | 0.1.0 | | **Lower the reading cost of the files a chunk reads most before its first commit.** | 2 | 4 | 5 | 6 | 1.4 | 18.5 | | 93 | 0.2.0 | | **Let a chunk's worker start below the project's model, once the archive shows chunks on a lower rung took no more review rounds than chunks on the project's model.** | 3 | 2 | 6 | 7 | 1.1, 1.4 | 22.4 | | 94 | 0.2.0 | | **Every 20th cycle, have loop-claude measure token spend and routing outcomes, file them here, and interrupt the human only when they call for a routing change.** | 3 | 5 | 6 | 7 | 1.1, 1.4 | 21.6 | | 88 | 0.2.0 | | **Define one routing ladder of (model, effort) rungs ordered by a published ranking of their competence, and map a task's R + C to a rung relative to the project's model.** | 3 | 4 | 6 | 7 | 1.4 | 21.4 | @@ -100,6 +101,10 @@ Stability and product-owner report a defect, a broken requirement from the plan From its second round on, a pass reviews only how the chunk answered the round before. Each finding should be fixed correctly or dismissed with a good reason, and the reviewer reports only a fix or a dismissal that is plainly wrong or worse than the change it answered. The pass then converges in its second round. This revises the decisions on reruns and the round cap in `docs/decisions.md`. A fix that opens an untrusted-input boundary still triggers the security pass. +### 109. Lower the reading cost of the files a chunk reads most before its first commit. + +`bin/reading-cost` found a rise: the last 5 chunks' median is 106562 new input tokens before their first commit, the 5 before them 62197. Read most over the last 5 (opens and searches): `CLAUDE.md` 17, `todo.md` 13, `docs/decisions.md` 11, `README.md` 10, `skills/larv-review/SKILL.md` 9, `CHANGELOG.md` 8, `bin/loop_claude/loop/main.py` 8, `.gitignore` 5, `agents/stability-reviewer.md` 5, `AGENTS.md` 4. The chunk that ships this item runs `reading-cost --reset`. + ### 93. Let a chunk's worker start below the project's model, once the archive shows chunks on a lower rung took no more review rounds than chunks on the project's model. Goal 1.1 asks for proven quality, so stepping down waits on the archive's evidence. -- 2.52.0 From 78a72100397d58a7f421a75341eca0669761cfdd Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 13 Oct 2026 09:27:19 +0200 Subject: [PATCH 3/6] Answer security round 1: no findings -- 2.52.0 From 1ff8adb3316da33d3c9d98b13efc4304c1c49c65 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 13 Oct 2026 09:27:19 +0200 Subject: [PATCH 4/6] Answer stability round 1: the help names the chunk's todo.md item --- bin/loop_claude/loop/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/loop_claude/loop/main.py b/bin/loop_claude/loop/main.py index 568b9e2a..2d5f0cee 100644 --- a/bin/loop_claude/loop/main.py +++ b/bin/loop_claude/loop/main.py @@ -4,7 +4,8 @@ usage: loop-claude Run it anywhere inside a project checkout whose README.md has ## Goals and ## Audience, the premises; the task runs at the checkout root. Each cycle a worker runs the task, and a fresh session's -prompt adds the premises, which choose between ways to meet the item and never widen it. A judge then reads +prompt adds the premises, which choose between ways to meet the chunk's todo.md item and never +widen its scope. A judge then reads the transcript's end, the premises, and the records: the project's AGENTS.md and docs/decisions.md, and the human's ~/.claude/CLAUDE.md, ~/.claude/rules/*.md and ~/.claude/skills/larv-review/standards/*.md, where they exist. It rules whether the chunk, the work -- 2.52.0 From d4aebac6abe119a3b9283c1d07db3bc42413e238 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 13 Oct 2026 09:27:19 +0200 Subject: [PATCH 5/6] Answer product-owner round 1: the scope line falls back to the task, and a loop worker skips rereading the premises --- CLAUDE.md | 2 +- bin/loop_claude/cycle/prompts.py | 2 +- bin/loop_claude/test_black_box.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 6c6adf29..d3821297 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -9,7 +9,7 @@ How work proceeds in any repo, unless the repo's `AGENTS.md` says otherwise. The - **When the next release has no items and no work has landed towards it, plan it as this chunk.** Move the highest-scoring items of later releases into it, and get the human's approval of that set before writing any code. - **When the next release has no items left and work has landed towards it, it is finished: stop.** Report what it holds and that it is ready to cut. Under `/loop`, this ends the loop. Until the human cuts it, only a security fix lands, into that release; never start a later release's items or plan a new one. - **Open every chunk with one line:** the last version cut, what is unreleased (`CHANGELOG.md` → `## Unreleased`, or else the log since the last tag), and the release this chunk ships into. A repo that publishes nothing says so once. -- **Read the README's `## Goals` and `## Audience` before starting a chunk.** The item sets the chunk's scope; the goals choose between ways to meet it, and never widen it. +- **Read the README's `## Goals` and `## Audience` before starting a chunk, unless your prompt quotes them.** The item sets the chunk's scope; the goals choose between ways to meet it, and never widen it. - **Work one chunk at a time, and make it as large as one purpose allows.** Every review has a fixed cost, so a chunk takes the next plan item plus every other item for which three things hold: one PR title states what they achieve together, without listing them; they name one release; and they fire the same review passes (`larv-review` §3). Tiny items, a few lines of change each, need neither a shared purpose nor the same passes: bundle up to ten that name one release into one chunk. Split a milestone into items in `todo.md` before starting it. Fix a finding in the chunk's own change within the chunk. File a finding about anything else in `todo.md`. An item marked `question` waits for the human; take the next item. - **Ask, don't guess.** First check whether the goals already answer the question. If they nearly do, propose a change to the goals and show how it answers this case: an answer settles one question, a goal settles every question like it. Write every answer once, where it belongs, never only in chat: a goal in `README.md`, a working rule in `AGENTS.md`, a standing choice in a comment at the one place it governs, or in `docs/decisions.md` once made in more than one place. When an answer holds a goal and a choice, write the goal in the README, and record as a choice only what the goal leaves open. - **Bench a syntax with the people who write it.** Before a new or changed spelling of something users read or write ships — markdown, HTML, a config key, a CLI flag — a panel of fresh-context readers, seated as those users from the README's `## Audience`, picks it. diff --git a/bin/loop_claude/cycle/prompts.py b/bin/loop_claude/cycle/prompts.py index 36426a48..f2b8d4df 100644 --- a/bin/loop_claude/cycle/prompts.py +++ b/bin/loop_claude/cycle/prompts.py @@ -14,7 +14,7 @@ ANSWERS_RECORDED = f"every answer the human typed in it that a later chunk could def fresh(task: str, premises: str) -> str: - return f"{task}\n\nContinue any open draft PR or worktree for the chunk before creating a new one.\n\nThe item sets the chunk's scope; the goals choose between ways to meet it, and never widen it.\n\nFrom README.md:\n{premises}" + return f"{task}\n\nContinue any open draft PR or worktree for the chunk before creating a new one.\n\nThe chunk's todo.md item, or else the task above, sets its scope; the goals below choose between ways to meet it, and never widen it.\n\nFrom README.md:\n{premises}" def resumed(unfinished_evidence: str) -> str: diff --git a/bin/loop_claude/test_black_box.py b/bin/loop_claude/test_black_box.py index 24f5e610..c738ae87 100644 --- a/bin/loop_claude/test_black_box.py +++ b/bin/loop_claude/test_black_box.py @@ -348,7 +348,7 @@ class Cycles(unittest.TestCase): self.assertIsNone(argument(workers[1], "--name")) self.assertEqual(argument(workers[2], "--session-id"), session) self.assertTrue(argument(workers[0], "-p").startswith(f"{TASK}\n\nContinue any open draft PR")) - self.assertTrue(argument(workers[0], "-p").endswith("The item sets the chunk's scope; the goals choose between ways to meet it, and never widen it.\n\nFrom README.md:\n## Goals\n1. Work.\n\n## Audience\nMe.")) + self.assertTrue(argument(workers[0], "-p").endswith("The chunk's todo.md item, or else the task above, sets its scope; the goals below choose between ways to meet it, and never widen it.\n\nFrom README.md:\n## Goals\n1. Work.\n\n## Audience\nMe.")) self.assertNotIn(TASK, argument(workers[1], "-p")) self.assertIn("Even then, it is finished only once every answer the human typed in it", argument(workers[1], "-p")) self.assertIn("as the work remaining:\n\n> started\n\n", argument(workers[1], "-p")) -- 2.52.0 From 3a5977f63aa7a27a30813376ff7da00135d8f051 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 13 Oct 2026 09:29:58 +0200 Subject: [PATCH 6/6] Answer prose round 1: one referent per pronoun, and a chunk's items set its scope --- CHANGELOG.md | 2 +- CLAUDE.md | 2 +- bin/loop_claude/cycle/prompts.py | 2 +- bin/loop_claude/loop/main.py | 7 +++---- bin/loop_claude/test_black_box.py | 2 +- todo.md | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2723104..d27a4348 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -- `loop-claude` puts the README's Goals and Audience into each new worker session's prompt, under a line saying that the item sets the chunk's scope and the goals choose between ways to meet it, never widening it. A session outside the loop reads them before starting a chunk, as `CLAUDE.md` now says. +- Each new `loop-claude` worker session's prompt now quotes the README's Goals and Audience. A line above them says that the chunk's `todo.md` items, or else the task, set its scope, and that the goals only choose how to deliver it. A session outside the loop reads Goals and Audience before starting a chunk, as `CLAUDE.md` now says. - A session no longer reads the technical principles before writing code. It writes the simplest change that solves its item, test first wherever a test can check the change, and reads a principle only when the item changes it, a finding names it, or a decision or `todo.md` item it writes cites it. larv-review's reviewers hold the change to the principles, and a finding against one names it. Expect more findings from the prose and stability reviewers, since sessions no longer load the rules for comments and READMEs. - The rules for comments and READMEs, "Quality" and the examples behind "Prose" moved to `skills/larv-review/standards/`, which the prose and stability reviewers and `loop-claude`'s judge read. `CLAUDE.md` keeps a short core of "Prose"; sorting where order carries no meaning lives only in the technical principles. - A session no longer points out a preference you have repeated or asks you to write it up, and no longer restructures `CLAUDE.md` and `rules/` after changing them. diff --git a/CLAUDE.md b/CLAUDE.md index d3821297..45f6fba2 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -9,7 +9,7 @@ How work proceeds in any repo, unless the repo's `AGENTS.md` says otherwise. The - **When the next release has no items and no work has landed towards it, plan it as this chunk.** Move the highest-scoring items of later releases into it, and get the human's approval of that set before writing any code. - **When the next release has no items left and work has landed towards it, it is finished: stop.** Report what it holds and that it is ready to cut. Under `/loop`, this ends the loop. Until the human cuts it, only a security fix lands, into that release; never start a later release's items or plan a new one. - **Open every chunk with one line:** the last version cut, what is unreleased (`CHANGELOG.md` → `## Unreleased`, or else the log since the last tag), and the release this chunk ships into. A repo that publishes nothing says so once. -- **Read the README's `## Goals` and `## Audience` before starting a chunk, unless your prompt quotes them.** The item sets the chunk's scope; the goals choose between ways to meet it, and never widen it. +- **Read the README's `## Goals` and `## Audience` before starting a chunk, unless your prompt quotes them.** The chunk's items set its scope. The goals choose between ways to deliver those items, and never add to them. - **Work one chunk at a time, and make it as large as one purpose allows.** Every review has a fixed cost, so a chunk takes the next plan item plus every other item for which three things hold: one PR title states what they achieve together, without listing them; they name one release; and they fire the same review passes (`larv-review` §3). Tiny items, a few lines of change each, need neither a shared purpose nor the same passes: bundle up to ten that name one release into one chunk. Split a milestone into items in `todo.md` before starting it. Fix a finding in the chunk's own change within the chunk. File a finding about anything else in `todo.md`. An item marked `question` waits for the human; take the next item. - **Ask, don't guess.** First check whether the goals already answer the question. If they nearly do, propose a change to the goals and show how it answers this case: an answer settles one question, a goal settles every question like it. Write every answer once, where it belongs, never only in chat: a goal in `README.md`, a working rule in `AGENTS.md`, a standing choice in a comment at the one place it governs, or in `docs/decisions.md` once made in more than one place. When an answer holds a goal and a choice, write the goal in the README, and record as a choice only what the goal leaves open. - **Bench a syntax with the people who write it.** Before a new or changed spelling of something users read or write ships — markdown, HTML, a config key, a CLI flag — a panel of fresh-context readers, seated as those users from the README's `## Audience`, picks it. diff --git a/bin/loop_claude/cycle/prompts.py b/bin/loop_claude/cycle/prompts.py index f2b8d4df..a391d202 100644 --- a/bin/loop_claude/cycle/prompts.py +++ b/bin/loop_claude/cycle/prompts.py @@ -14,7 +14,7 @@ ANSWERS_RECORDED = f"every answer the human typed in it that a later chunk could def fresh(task: str, premises: str) -> str: - return f"{task}\n\nContinue any open draft PR or worktree for the chunk before creating a new one.\n\nThe chunk's todo.md item, or else the task above, sets its scope; the goals below choose between ways to meet it, and never widen it.\n\nFrom README.md:\n{premises}" + return f"{task}\n\nContinue any open draft PR or worktree for the chunk before creating a new one.\n\nThe chunk's todo.md items, or else the task above, set its scope. The goals below choose between ways to deliver that scope, and never widen it.\n\nFrom README.md:\n{premises}" def resumed(unfinished_evidence: str) -> str: diff --git a/bin/loop_claude/loop/main.py b/bin/loop_claude/loop/main.py index 2d5f0cee..410039b8 100644 --- a/bin/loop_claude/loop/main.py +++ b/bin/loop_claude/loop/main.py @@ -3,10 +3,9 @@ usage: loop-claude Run it anywhere inside a project checkout whose README.md has ## Goals and ## Audience, the -premises; the task runs at the checkout root. Each cycle a worker runs the task, and a fresh session's -prompt adds the premises, which choose between ways to meet the chunk's todo.md item and never -widen its scope. A judge then reads -the transcript's end, the premises, and the records: the project's AGENTS.md and docs/decisions.md, +premises; the task runs at the checkout root. Each cycle a worker runs the task. A chunk's first +worker prompt also quotes the premises, which choose between ways to deliver the chunk's todo.md +items, or else the task, and never widen them. A judge then reads the transcript's end, the premises, and the records: the project's AGENTS.md and docs/decisions.md, and the human's ~/.claude/CLAUDE.md, ~/.claude/rules/*.md and ~/.claude/skills/larv-review/standards/*.md, where they exist. It rules whether the chunk, the work of one PR, is finished. A chunk stays unfinished until each answer the human typed in it that a diff --git a/bin/loop_claude/test_black_box.py b/bin/loop_claude/test_black_box.py index c738ae87..38723244 100644 --- a/bin/loop_claude/test_black_box.py +++ b/bin/loop_claude/test_black_box.py @@ -348,7 +348,7 @@ class Cycles(unittest.TestCase): self.assertIsNone(argument(workers[1], "--name")) self.assertEqual(argument(workers[2], "--session-id"), session) self.assertTrue(argument(workers[0], "-p").startswith(f"{TASK}\n\nContinue any open draft PR")) - self.assertTrue(argument(workers[0], "-p").endswith("The chunk's todo.md item, or else the task above, sets its scope; the goals below choose between ways to meet it, and never widen it.\n\nFrom README.md:\n## Goals\n1. Work.\n\n## Audience\nMe.")) + self.assertTrue(argument(workers[0], "-p").endswith("The chunk's todo.md items, or else the task above, set its scope. The goals below choose between ways to deliver that scope, and never widen it.\n\nFrom README.md:\n## Goals\n1. Work.\n\n## Audience\nMe.")) self.assertNotIn(TASK, argument(workers[1], "-p")) self.assertIn("Even then, it is finished only once every answer the human typed in it", argument(workers[1], "-p")) self.assertIn("as the work remaining:\n\n> started\n\n", argument(workers[1], "-p")) diff --git a/todo.md b/todo.md index 301a57b7..c80332c3 100644 --- a/todo.md +++ b/todo.md @@ -103,7 +103,7 @@ From its second round on, a pass reviews only how the chunk answered the round b ### 109. Lower the reading cost of the files a chunk reads most before its first commit. -`bin/reading-cost` found a rise: the last 5 chunks' median is 106562 new input tokens before their first commit, the 5 before them 62197. Read most over the last 5 (opens and searches): `CLAUDE.md` 17, `todo.md` 13, `docs/decisions.md` 11, `README.md` 10, `skills/larv-review/SKILL.md` 9, `CHANGELOG.md` 8, `bin/loop_claude/loop/main.py` 8, `.gitignore` 5, `agents/stability-reviewer.md` 5, `AGENTS.md` 4. The chunk that ships this item runs `reading-cost --reset`. +`bin/reading-cost` found a rise: the last 5 chunks' median is 106562 new input tokens before their first commit, the 5 before them 62197. Files read most in those 5 chunks (opens and searches): `CLAUDE.md` 17, `todo.md` 13, `docs/decisions.md` 11, `README.md` 10, `skills/larv-review/SKILL.md` 9, `CHANGELOG.md` 8, `bin/loop_claude/loop/main.py` 8, `.gitignore` 5, `agents/stability-reviewer.md` 5, `AGENTS.md` 4. The chunk that ships this item runs `reading-cost --reset`. ### 93. Let a chunk's worker start below the project's model, once the archive shows chunks on a lower rung took no more review rounds than chunks on the project's model. -- 2.52.0