From bb152a19640888a55b179d117d69fa31a55b4608 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 22 Oct 2026 20:36:47 +0200 Subject: [PATCH 01/11] File item 216: bundle items of one release that fire the same passes, whatever their purpose, and ship each item above R 5 alone --- todo.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/todo.md b/todo.md index a3e7a81b..6e657c20 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 0.1` -`Next ID = 216` +`Next ID = 217` ## Items @@ -22,6 +22,7 @@ | 210 | 0.4.0 | | | **Hold the escalation mark in one module that states that one trigger buys one step, so a reader changes it without opening four files.** | 3 | 2 | 3 | 6 | 5 | code health by 9 | 16.2 | | 190 | 0.4.0 | | | **Rewrite the `docs/decisions.md` entries `todo.md: one table …`, `loop-claude: a judge decides …` and `loop-claude: before it opens claude …` as the current state, so a reader no longer replays superseded paragraphs to learn what holds.** | 2 | 2 | 1 | 3 | 3 | code health by 3, 1.4 by 2 | 15.5 | | 82 | 0.4.0 | | principle | **Sort `AGENTS.md`'s decision titles and `docs/decisions.md`'s entries by title.** | 2 | 2 | 1 | 3 | 4 | code health by 4, 1.4 by 4 | 14.6 | +| 216 | 0.4.0 | | | **Let a chunk take every unblocked item of its release that fires the same review passes, whatever its purpose, and ship each item above R 5 alone.** | 2 | 2 | 3 | 5 | 2 | 1.4 by 6, 1.5 by 3 | 11.8 | | 170 | 0.4.0 | | decision | **Re-tune `WORKER_STEPS` and `REVIEW_STEPS` once 10 chunks have shipped under them, from how well L, E and I order their review rounds and πŸ”΄ findings.** | 2 | 2 | 3 | 5 | 2 | 1.1 by 3, 1.4 by 5 | 10.9 | | 125 | 0.4.0 | | decision | **Give "record", "outcome" and "places" one meaning each across `bin/`, and rename `bin/larv_review/git.py` by what it holds.** | 3 | 1 | 3 | 5 | 5 | code health by 5, 1.4 by 3 | 10.2 | | 198 | 0.4.0 | | decision | **Count, per finished chunk, the findings that arose from misreading code that had already shipped, so code health's counter-signal shows.** | 3 | 2 | 2 | 5 | 5 | code health by 3, 1.1 by 2 | 6.2 | @@ -117,6 +118,10 @@ Found by the prose review of PR #312, which judged both entries to read as amend "Deterministic order", in `principles/technical-principles.md`, raised by the principles audit of PR #224: their order carries no meaning, so two chunks adding a decision conflict at the end, and a reader cannot find a title by scanning. +### 216. Let a chunk take every unblocked item of its release that fires the same review passes, whatever its purpose, and ship each item above R 5 alone. + +Each review has a fixed cost: across the 165 finished chunks loop-claude archived up to 2026-10-22, a chunk took a median of 1.3M tokens with one item and 1.33M with two, so a second item halves the cost per item. Three in four chunks shipped one item. Drop the rule that one PR title must state what the items achieve together; keep same release, same review passes and no blocker outside the chunk. Above R 5, a chunk's median rose from 0.9–1.5M tokens to 2.7M and its 90th percentile to 8.8M, so `todo_table.bundle_candidates` lists no item above R 5, and none joins a first item above R 5. + ### 170. Re-tune `WORKER_STEPS` and `REVIEW_STEPS` once 10 chunks have shipped under them, from how well L, E and I order their review rounds and πŸ”΄ findings. `docs/decisions.md` β†’ `routing: one ladder…` calls the steps lilleman approved on 2026-10-16 a first guess. Once 10 chunks that each shipped one item scored with L, E and I have merged, read `score-outcomes`' rank correlations for L, E and I and the routed-chunks table of `routing-figures.md`, and propose new steps to lilleman, whose call they are. Only chunks merged since PR #339 set today's steps count: 7 so far, those of items 117, 126, 131, 122, 207, 130 and 154. Start this item when there are 10. -- 2.52.0 From 8468cc8ee03aeb7c153500a80b43a702a461458b Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 22 Oct 2026 20:47:52 +0200 Subject: [PATCH 02/11] Bundle every unblocked item of a release that fires the same review passes, whatever its purpose, and ship each item above R 5 alone --- AGENTS.md | 1 + CHANGELOG.md | 1 + CLAUDE.md | 2 +- bin/chunk_preflight/test_chunk_preflight.py | 5 +++-- bin/test_rank_todo.py | 9 ++++++++- bin/todo_table.py | 8 ++++++-- docs/decisions.md | 6 ++++++ todo.md | 5 ----- 8 files changed, 26 insertions(+), 11 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index a1d9aa73..d2894680 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -50,6 +50,7 @@ Decisions live in `docs/decisions.md`: - routing: on a model judge-replay covered, the judge runs on the rung a review would get from the highest E + I among its chunk's items, never below the project's rung - routing: a review pass runs below the project's rung only on a rung that a replay of its rounds shows finding every πŸ”΄ and 🟑 the project's rung finds, and only where the E + I steps no review up and the worker runs no higher than the project's rung, then even below the worker's; no pass has such a rung - principles: about seven things per level, four or five where they act on each other, more where a reader finds them by name; crossing a limit asks for a grouping or a recorded reason +- chunks: a chunk takes every unblocked item of its release that fires the same review passes, whatever its purpose, and an item above R 5 ships alone ## Working rules diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f2af1df..98d1a9e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- A chunk now takes every unblocked item of its release that fires the same review passes, whatever its purpose: one PR title no longer has to state what the items achieve together. An item with R above 5 ships alone, and `chunk-preflight` no longer lists it as one that may join, or lists any item to join it. - A branch whose name is not UTF-8 now shows no branch in the status line, in place of a name with replacement characters. - A new technical principle, "About seven things per level", sets soft limits on what a reader takes in at once: the parameters and branches of a function, the methods of a class, the files and folders in a folder, the sections of a document and the components of a system. Aim for four or five of the things that act on each other, such as parameters. Things found by name, such as files named by locale, may run far past seven. Crossing a limit asks you to group the things or record why they stay. The systems-architect reviewer now reads its limits from this principle. It rates a unit that crosses a limit with no recorded reason a 🟑, where it used to be a πŸ”΄, and no longer asks for the limits as merge-gate rules. diff --git a/CLAUDE.md b/CLAUDE.md index d93e4594..a0b96df5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -11,7 +11,7 @@ How work proceeds in any repo, unless the repo's `AGENTS.md` says otherwise. The - **Open every chunk with one line:** the last version cut, how many changes are unreleased (the entries under `CHANGELOG.md` β†’ `## Unreleased`, or else the commits 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 chunk's items set its scope. The goals choose between ways to deliver those items, and never add to them. - **Read the plan and the decisions only as far as the chunk needs.** Where your prompt quotes `chunk-preflight`'s facts, they hold the next item's L, E + I, tagline and detail, and the items that may join it; read further only what they leave out. Otherwise run `grep -n '^## Details' todo.md`, then read `todo.md` with the Read tool up to the line it prints, or whole when it prints none. Then read the details of only the items the chunk takes. `AGENTS.md` lists every decision's title. Read the entry under a title in `docs/decisions.md` only where the title leaves open what the chunk or the review needs. -- **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 four things hold: one PR title states what they achieve together, without listing them; they name one release; they fire the same review passes (`larv-review` Β§3); and no item outside the chunk blocks one of them. The next plan item is the first that does not wait: an item waits while it is marked `question`, until the human answers, or while an item that blocks it is still in the plan. 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, and that no item outside the chunk blocks, 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`. +- **Work one chunk at a time, and make it as large as the review passes allow.** Every review has a fixed cost, so a chunk takes the next plan item plus every other item for which three things hold: they name one release; they fire the same review passes (`larv-review` Β§3); and no item outside the chunk blocks one of them. The items need not share a purpose. An item with R above 5 ships alone: it joins no chunk, and none joins it. The next plan item is the first that does not wait: an item waits while it is marked `question`, until the human answers, or while an item that blocks it is still in the plan. Tiny items, a few lines of change each, need not fire the same passes: bundle up to ten that name one release, that no item outside the chunk blocks, and that have R 5 or less, 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`. - **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. - **Implement the simplest change that solves the item, and ship it with `/larv-review`.** Whenever a test can check the change, write that test first and see it fail. Take its expected values from the item, never from the code. larv-review's reviewers hold the change to the technical principles, and a finding against one names it. Read a file under `~/.claude/principles/` only when the item changes it, a finding or a record you write names it, or you decline a finding. diff --git a/bin/chunk_preflight/test_chunk_preflight.py b/bin/chunk_preflight/test_chunk_preflight.py index 9aa3a59f..9452a062 100644 --- a/bin/chunk_preflight/test_chunk_preflight.py +++ b/bin/chunk_preflight/test_chunk_preflight.py @@ -313,9 +313,10 @@ def rendered(item, release=CUT, note=None): class Render(unittest.TestCase): def test_states_the_earliest_releases_first_item_its_levels_and_detail_and_each_item_that_may_join_its_chunk(self): - said = rendered(item_facts()) + # At R 7, item 3 would ship alone; at R 5, item 7 may join it. + said = rendered(item_facts(TODO.replace("| 4 | 2 | 3 | 7 | 3 |", "| 2 | 2 | 3 | 5 | 3 |"))) self.assertIn("origin/main's todo.md: 0.2.0", said) - self.assertIn("item 3, L 4, E + I 5", said) + self.assertIn("item 3, L 2, E + I 5", said) self.assertIn("> Change `src/app.py`'s `run` and the files under `src`, not `gone.py`.", said) self.assertIn("item 7, L 1, E + I 2, S 1: **Do the thing after.**", said) self.assertNotIn("item 8,", said) diff --git a/bin/test_rank_todo.py b/bin/test_rank_todo.py index b1fe0e74..f592fd92 100644 --- a/bin/test_rank_todo.py +++ b/bin/test_rank_todo.py @@ -472,7 +472,14 @@ class Blockers(unittest.TestCase): waits = todo_table.items(TODO.replace("| 3 | 0.1.0 | |", "| 3 | 0.1.0 | 5 |").replace("| 4 | 0.1.0 | | security |", "| 4 | 0.1.0 | 3 | security |").replace("| 5 | 0.1.0 | | decision |", "| 5 | 0.1.0 | | question |")) self.assertEqual(todo_table.bundle_candidates(waits, todo_table.next_item(waits)), []) answered = todo_table.items(TODO.replace("| 3 | 0.1.0 | |", "| 3 | 0.1.0 | 5 |").replace("| 4 | 0.1.0 | | security |", "| 4 | 0.1.0 | 3 | security |")) - self.assertEqual([item.id for item in todo_table.bundle_candidates(answered, todo_table.next_item(answered))], [3, 4, 5]) + self.assertEqual([item.id for item in todo_table.bundle_candidates(answered, todo_table.next_item(answered))], [3, 5]) + + def test_ships_an_item_above_r_5_alone(self): + # Item 4 has R 9: it joins no chunk, and none joins it. Item 5, at R 5, still joins. + found = todo_table.items(TODO) + self.assertNotIn(4, [item.id for item in todo_table.bundle_candidates(found, todo_table.next_item(found))]) + self.assertIn(5, [item.id for item in todo_table.bundle_candidates(found, todo_table.next_item(found))]) + self.assertEqual(todo_table.bundle_candidates(found, next(item for item in found if item.id == 4)), []) def test_drops_a_blocker_the_table_no_longer_holds_as_finished(self): finished = TODO.replace("| 4 | 0.1.0 | | security | **Rotate the leaked key.** | 3 | 3 | 5 | 9 | 2 | 2.1 by 1 | 0 |\n", "").replace("| 2 | 0.1.0 | |", "| 2 | 0.1.0 | 4 |") diff --git a/bin/todo_table.py b/bin/todo_table.py index b70513d3..55489e49 100644 --- a/bin/todo_table.py +++ b/bin/todo_table.py @@ -10,6 +10,8 @@ TOP_SCORE = 10 LEVELS = {"L": 4, "E": 3, "I": 5} # The least R each impact level I allows, since a severe enough consequence outranks how unlikely it is. RISK_FLOOR = {4: 5, 5: 7} +# The highest R an item may have and still share a chunk; `docs/decisions.md` β†’ `chunks:` says why 5. +BUNDLE_MAX_R = 5 EXEMPTIONS = ("", "decision", "defect", "owner", "principle", "question", "security") # The column naming the items that block an item: each must be done before the item starts. BLOCKED_BY = "Blocked by" @@ -201,8 +203,10 @@ def renames(todo: str) -> set[tuple[int, int, int]] | Failure: def bundle_candidates(found: list[Item], first: Item) -> list[Item]: - """The items of first's release, in the table's order, that a chunk taking first may take too: those that do not wait once the chunk's own items count as done.""" - chunk = {item.id for item in found if item.release == first.release} + """The items of first's release, in the table's order, that a chunk taking first may take too: those that do not wait once the chunk's own items count as done. An item above BUNDLE_MAX_R ships alone.""" + if first.scores.get("R", 0) > BUNDLE_MAX_R: + return [] + chunk = {item.id for item in found if item.release == first.release and item.scores.get("R", 0) <= BUNDLE_MAX_R} # Dropping an item that waits may make another wait on it, so drop until none waits. while waits := waiting(found, chunk) & chunk: chunk -= waits diff --git a/docs/decisions.md b/docs/decisions.md index f55a595e..bb993dda 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -383,3 +383,9 @@ Valid until a new model joins the ladder, which calls for a replay of every pass - A grouping or a recorded reason, never a split at any cost: no study supports a fixed cut-off for function length, parameter count or nesting. Re-analysis of the cited data finds no optimal function length ([Derek Jones, 2023](https://shape-of-code.com/2023/09/10/optimal-function-length-an-analysis-of-the-cited-data/)),. So a limit holds only while the comprehension panel's readers find the code it flags hard, and `agents/systems-architect.md` β†’ "Fits in a head" says how its reviewer rates a unit past one. Valid while the comprehension panel measures how hard a project is to read. + +## chunks: a chunk takes every unblocked item of its release that fires the same review passes, whatever its purpose, and an item above R 5 ships alone + +2026-10-22, lilleman, through todo item 216. Serves goal 1.4: each review has a fixed cost, so more items per chunk cost less per item. Across the 165 finished chunks loop-claude archived up to that day, a chunk took a median of 1.30M tokens with one item and 1.33M with two, and three in four chunks shipped one item. The old rule also asked one PR title to state what the items achieve together; lilleman dropped it, since unrelated items that fire the same passes cost one review. + +The cap is 5, `bin/todo_table.py`'s `BUNDLE_MAX_R`, from the same chunks: by the highest R among a chunk's items, the median was 0.9M to 1.5M tokens at R 1 to 5, and 2.7M at R 6, with a 90th percentile of 8.8M. A risky item that runs long re-runs review over every item bundled with it. R 5 is also the least R an I 4 item gets, so no item that could take everything down shares a chunk unless both its L and E are 1. Valid while a review's cost is mostly fixed per chunk; revisit once 30 chunks have shipped bundles under it. diff --git a/todo.md b/todo.md index 6e657c20..b78af6ea 100644 --- a/todo.md +++ b/todo.md @@ -22,7 +22,6 @@ | 210 | 0.4.0 | | | **Hold the escalation mark in one module that states that one trigger buys one step, so a reader changes it without opening four files.** | 3 | 2 | 3 | 6 | 5 | code health by 9 | 16.2 | | 190 | 0.4.0 | | | **Rewrite the `docs/decisions.md` entries `todo.md: one table …`, `loop-claude: a judge decides …` and `loop-claude: before it opens claude …` as the current state, so a reader no longer replays superseded paragraphs to learn what holds.** | 2 | 2 | 1 | 3 | 3 | code health by 3, 1.4 by 2 | 15.5 | | 82 | 0.4.0 | | principle | **Sort `AGENTS.md`'s decision titles and `docs/decisions.md`'s entries by title.** | 2 | 2 | 1 | 3 | 4 | code health by 4, 1.4 by 4 | 14.6 | -| 216 | 0.4.0 | | | **Let a chunk take every unblocked item of its release that fires the same review passes, whatever its purpose, and ship each item above R 5 alone.** | 2 | 2 | 3 | 5 | 2 | 1.4 by 6, 1.5 by 3 | 11.8 | | 170 | 0.4.0 | | decision | **Re-tune `WORKER_STEPS` and `REVIEW_STEPS` once 10 chunks have shipped under them, from how well L, E and I order their review rounds and πŸ”΄ findings.** | 2 | 2 | 3 | 5 | 2 | 1.1 by 3, 1.4 by 5 | 10.9 | | 125 | 0.4.0 | | decision | **Give "record", "outcome" and "places" one meaning each across `bin/`, and rename `bin/larv_review/git.py` by what it holds.** | 3 | 1 | 3 | 5 | 5 | code health by 5, 1.4 by 3 | 10.2 | | 198 | 0.4.0 | | decision | **Count, per finished chunk, the findings that arose from misreading code that had already shipped, so code health's counter-signal shows.** | 3 | 2 | 2 | 5 | 5 | code health by 3, 1.1 by 2 | 6.2 | @@ -118,10 +117,6 @@ Found by the prose review of PR #312, which judged both entries to read as amend "Deterministic order", in `principles/technical-principles.md`, raised by the principles audit of PR #224: their order carries no meaning, so two chunks adding a decision conflict at the end, and a reader cannot find a title by scanning. -### 216. Let a chunk take every unblocked item of its release that fires the same review passes, whatever its purpose, and ship each item above R 5 alone. - -Each review has a fixed cost: across the 165 finished chunks loop-claude archived up to 2026-10-22, a chunk took a median of 1.3M tokens with one item and 1.33M with two, so a second item halves the cost per item. Three in four chunks shipped one item. Drop the rule that one PR title must state what the items achieve together; keep same release, same review passes and no blocker outside the chunk. Above R 5, a chunk's median rose from 0.9–1.5M tokens to 2.7M and its 90th percentile to 8.8M, so `todo_table.bundle_candidates` lists no item above R 5, and none joins a first item above R 5. - ### 170. Re-tune `WORKER_STEPS` and `REVIEW_STEPS` once 10 chunks have shipped under them, from how well L, E and I order their review rounds and πŸ”΄ findings. `docs/decisions.md` β†’ `routing: one ladder…` calls the steps lilleman approved on 2026-10-16 a first guess. Once 10 chunks that each shipped one item scored with L, E and I have merged, read `score-outcomes`' rank correlations for L, E and I and the routed-chunks table of `routing-figures.md`, and propose new steps to lilleman, whose call they are. Only chunks merged since PR #339 set today's steps count: 7 so far, those of items 117, 126, 131, 122, 207, 130 and 154. Start this item when there are 10. -- 2.52.0 From b189e797fc24612d0a61cc6e8ea08e9593e400b2 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 22 Oct 2026 20:51:24 +0200 Subject: [PATCH 03/11] Record the last chunk's reading cost, and refresh item 155 on the rise --- docs/reading-cost.md | 9 +++++++++ todo.md | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/reading-cost.md b/docs/reading-cost.md index 0c6a4d2a..87619da7 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -778,3 +778,12 @@ Read most (opens and searches): ## Reading cost, chunk 796f17403d2e, finished 2026-10-22T17:58:21Z 122986 new input tokens before the first commit. + +## Reading cost, chunk a91c10247935, finished 2026-10-22T18:13:46Z + +183925 new input tokens before the first commit. + +Read most (opens and searches): + +- `skills/larv-review/SKILL.md` 3 +- `rules/todo-items.md` 2 diff --git a/todo.md b/todo.md index b78af6ea..a9d130cf 100644 --- a/todo.md +++ b/todo.md @@ -349,7 +349,7 @@ The key names the project's session, archive folder and models entry. `project_k ### 155. Lower the reading cost of the files a chunk reads most before its first commit. -`bin/reading-cost` on 2026-10-22: the median of the last 5 chunks is 73,910 new input tokens before their first commit, up from 63,554 for the 5 before them. Its list of the files read most over the last 5 was empty, so the chunk that takes this item first finds which files those chunks read. The chunk that ships this item runs `bin/reading-cost --reset`. +`bin/reading-cost` on 2026-10-22, refreshed by the chunk of item 216: the median of the last 5 chunks is 81,812 new input tokens before their first commit, up from 71,637 for the 5 before them. The files read most over the last 5 were `skills/larv-review/SKILL.md`, 3 times, and `rules/todo-items.md`, 2 times. The chunk that ships this item runs `bin/reading-cost --reset`. ### 51. Hand loop-claude's terminal output to an injected effect, so no storage or retry function prints. -- 2.52.0 From 64d399f7f5abd488098b7f6e8e784125a79537d5 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 22 Oct 2026 20:52:16 +0200 Subject: [PATCH 04/11] =?UTF-8?q?Answer=20security=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1;=20no=20finding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From 8c3298f673e6fed7ef9b73de2bfbf891f51bf9d9 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 22 Oct 2026 20:55:02 +0200 Subject: [PATCH 05/11] =?UTF-8?q?Answer=20principles=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=202=20=F0=9F=9F=A1;=20state=20the=20R=20cap=20in?= =?UTF-8?q?=20chunk-preflight's=20help=20and=20output,=20correct=20the=20d?= =?UTF-8?q?ecision's=20I=204=20claim,=20and=20pin=20the=20cap=20at=205=20i?= =?UTF-8?q?n=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/chunk_preflight/facts.py | 4 +++- bin/chunk_preflight/main.py | 3 ++- bin/chunk_preflight/test_chunk_preflight.py | 18 +++++++++++------- bin/test_rank_todo.py | 3 +++ bin/todo_table.py | 4 ++-- docs/decisions.md | 2 +- 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/bin/chunk_preflight/facts.py b/bin/chunk_preflight/facts.py index 39d8af65..5bcbb8d7 100644 --- a/bin/chunk_preflight/facts.py +++ b/bin/chunk_preflight/facts.py @@ -1,5 +1,5 @@ """The lines the preflight prints, stated from what it gathered.""" -from todo_table import bundle_candidates, Item, version +from todo_table import BUNDLE_MAX_R, bundle_candidates, Item, version from failure import Failure from chunk_preflight.gathered import Forge, Gathered, ItemFacts, NamedPath, NoItem, Plan, Ran from chunk_pick import LastCut, unreleased_entries @@ -66,6 +66,8 @@ def open_pulls(stdout: str, forge: Forge, branch: str) -> list[str]: def bundled(plan: Plan) -> list[str]: first, candidates = plan.first, bundle_candidates(plan.items, plan.first) + if first.scores.get("R", 0) > BUNDLE_MAX_R: + return [f"- Item {first.id} has R above {BUNDLE_MAX_R}, so it ships alone."] if not candidates: return [f"- No other item of release {version(first.release)} may join item {first.id}'s chunk."] listed = [f" - item {item.id}, {levels(item)}, S {item.scores['S']}: {item.tagline}" for item in candidates] diff --git a/bin/chunk_preflight/main.py b/bin/chunk_preflight/main.py index 2b9f67c3..0a927a24 100644 --- a/bin/chunk_preflight/main.py +++ b/bin/chunk_preflight/main.py @@ -26,7 +26,8 @@ holds it, the plan loop-claude routes on. It prints: - the open pull requests whose head is the item's branch, each by its number and URL, as gh lists them on a github.com origin, and else as tea does. No title reaches the output; - the items of that release that a chunk taking the item may take too: those that are not - questions and that no item outside the chunk blocks; + questions, that have R 5 or less, and that no item outside the chunk blocks; none where the + item's own R is above 5; - each file or folder git tracks that the item's tagline or detail names in backticks, with a file's lines or a folder's files, and the item's tagline and detail; - what `rank_todo.py --check todo.md`, `larv-review needs-scoring-run `, `reading-cost` and diff --git a/bin/chunk_preflight/test_chunk_preflight.py b/bin/chunk_preflight/test_chunk_preflight.py index 9452a062..7c4a4998 100644 --- a/bin/chunk_preflight/test_chunk_preflight.py +++ b/bin/chunk_preflight/test_chunk_preflight.py @@ -34,7 +34,7 @@ TODO = """# todo | ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score | |---|---|---|---|---|---|---|---|---|---|---|---| | 5 | 0.2.0 | | question | **Ask first.** | 1 | 1 | 1 | 1 | 1 | 1 by 9 | 90.0 | -| 3 | 0.2.0 | | | **Do the next thing.** | 4 | 2 | 3 | 7 | 3 | 1 by 9 | 56.2 | +| 3 | 0.2.0 | | | **Do the next thing.** | 2 | 2 | 3 | 5 | 3 | 1 by 9 | 56.2 | | 7 | 0.2.0 | 3 | | **Do the thing after.** | 1 | 1 | 1 | 1 | 1 | 1 by 1 | 10.0 | | 8 | 0.2.0 | 5 | | **Do the answered thing.** | 1 | 1 | 1 | 1 | 1 | 1 by 1 | 10.0 | | 9 | 0.3.0 | | | **Do a later thing.** | 1 | 1 | 1 | 1 | 1 | 1 by 9 | 90.0 | @@ -46,7 +46,7 @@ TODO = """# todo Change `src/app.py`'s `run` and the files under `src`, not `gone.py`. """ # The plan once item 3 has shipped: item 7 no longer waits, and its detail names the files. -SHIPPED = TODO.replace("| 3 | 0.2.0 | | | **Do the next thing.** | 4 | 2 | 3 | 7 | 3 | 1 by 9 | 56.2 |\n", "").replace("| 7 | 0.2.0 | 3 |", "| 7 | 0.2.0 | |").replace("### 3. Do the next thing.", "### 7. Do the thing after.") +SHIPPED = TODO.replace("| 3 | 0.2.0 | | | **Do the next thing.** | 2 | 2 | 3 | 5 | 3 | 1 by 9 | 56.2 |\n", "").replace("| 7 | 0.2.0 | 3 |", "| 7 | 0.2.0 | |").replace("### 3. Do the next thing.", "### 7. Do the thing after.") # The plan once release 0.2.0 has shipped all its items: only release 0.3.0's item 9 is left. LATER = TODO[:TODO.index("| 5 |")] + "| 9 | 0.3.0 | | | **Do a later thing.** | 1 | 1 | 1 | 1 | 1 | 1 by 9 | 90.0 |\n" # An items table that holds no row. @@ -260,7 +260,7 @@ class ChunkPreflightTool(unittest.TestCase): done = repo.preflight(CHUNK_PREFLIGHT_TIMEOUT="1") self.assertEqual(done.returncode, 0, done.stderr) self.assertIn("as last fetched", done.stdout) - self.assertIn("item 3, L 4, E + I 5", done.stdout) + self.assertIn("item 3, L 2, E + I 5", done.stdout) self.assertIn("`reading-cost` exited 0", done.stdout) def test_lists_the_open_pull_requests_with_gh_on_a_github_origin(self): @@ -313,8 +313,7 @@ def rendered(item, release=CUT, note=None): class Render(unittest.TestCase): def test_states_the_earliest_releases_first_item_its_levels_and_detail_and_each_item_that_may_join_its_chunk(self): - # At R 7, item 3 would ship alone; at R 5, item 7 may join it. - said = rendered(item_facts(TODO.replace("| 4 | 2 | 3 | 7 | 3 |", "| 2 | 2 | 3 | 5 | 3 |"))) + said = rendered(item_facts()) self.assertIn("origin/main's todo.md: 0.2.0", said) self.assertIn("item 3, L 2, E + I 5", said) self.assertIn("> Change `src/app.py`'s `run` and the files under `src`, not `gone.py`.", said) @@ -330,8 +329,13 @@ class Render(unittest.TestCase): self.assertIn("No other item", said) self.assertNotIn("item 7,", said) + def test_states_that_an_item_above_r_5_ships_alone(self): + said = rendered(item_facts(TODO.replace("| 2 | 2 | 3 | 5 | 3 |", "| 3 | 2 | 3 | 6 | 3 |"))) + self.assertIn("Item 3 has R above 5, so it ships alone.", said) + self.assertNotIn("item 7,", said) + def test_states_an_unscored_level_as_unscored(self): - unscored = TODO.replace("| L | E | I | R | S |", "| R | S |").replace("|---|---|---|---|---|---|---|---|---|---|---|---|", "|---|---|---|---|---|---|---|---|---|").replace("| 4 | 2 | 3 | 7 | 3 |", "| 7 | 3 |").replace("| 1 | 1 | 1 | 1 | 1 |", "| 1 | 1 |") + unscored = TODO.replace("| L | E | I | R | S |", "| R | S |").replace("|---|---|---|---|---|---|---|---|---|---|---|---|", "|---|---|---|---|---|---|---|---|---|").replace("| 2 | 2 | 3 | 5 | 3 |", "| 5 | 3 |").replace("| 1 | 1 | 1 | 1 | 1 |", "| 1 | 1 |") self.assertIn("item 3, L unscored, E + I unscored", rendered(item_facts(unscored))) def test_states_the_unreleased_entries_and_else_the_commits_since_the_last_cut(self): @@ -411,7 +415,7 @@ class Plans(unittest.TestCase): self.assertIn("waits", waits.why) self.assertIn("0.2.0", waits.why) self.assertIn("Permission denied", planned(Failure("Permission denied"), CUT, "origin/main").why) - self.assertIn("L 'x'", planned(TODO.replace("| 4 | 2 | 3 |", "| x | 2 | 3 |"), CUT, "origin/main").why) + self.assertIn("L 'x'", planned(TODO.replace("| 2 | 2 | 3 | 5 |", "| x | 2 | 3 | 5 |"), CUT, "origin/main").why) self.assertIn("details cannot be read", planned(TODO + "```\n", CUT, "origin/main").text) def test_tells_a_plan_with_no_items_table_from_one_whose_table_holds_no_item(self): diff --git a/bin/test_rank_todo.py b/bin/test_rank_todo.py index f592fd92..9264228e 100644 --- a/bin/test_rank_todo.py +++ b/bin/test_rank_todo.py @@ -480,6 +480,9 @@ class Blockers(unittest.TestCase): self.assertNotIn(4, [item.id for item in todo_table.bundle_candidates(found, todo_table.next_item(found))]) self.assertIn(5, [item.id for item in todo_table.bundle_candidates(found, todo_table.next_item(found))]) self.assertEqual(todo_table.bundle_candidates(found, next(item for item in found if item.id == 4)), []) + # At R 6, item 3 ships alone too. + riskier = todo_table.items(TODO.replace("| 2 | 1 | 2 | 3 | 7 |", "| 3 | 2 | 3 | 6 | 7 |")) + self.assertNotIn(3, [item.id for item in todo_table.bundle_candidates(riskier, todo_table.next_item(riskier))]) def test_drops_a_blocker_the_table_no_longer_holds_as_finished(self): finished = TODO.replace("| 4 | 0.1.0 | | security | **Rotate the leaked key.** | 3 | 3 | 5 | 9 | 2 | 2.1 by 1 | 0 |\n", "").replace("| 2 | 0.1.0 | |", "| 2 | 0.1.0 | 4 |") diff --git a/bin/todo_table.py b/bin/todo_table.py index 55489e49..8f849a7c 100644 --- a/bin/todo_table.py +++ b/bin/todo_table.py @@ -204,9 +204,9 @@ def renames(todo: str) -> set[tuple[int, int, int]] | Failure: def bundle_candidates(found: list[Item], first: Item) -> list[Item]: """The items of first's release, in the table's order, that a chunk taking first may take too: those that do not wait once the chunk's own items count as done. An item above BUNDLE_MAX_R ships alone.""" - if first.scores.get("R", 0) > BUNDLE_MAX_R: - return [] chunk = {item.id for item in found if item.release == first.release and item.scores.get("R", 0) <= BUNDLE_MAX_R} + if first.id not in chunk: + return [] # Dropping an item that waits may make another wait on it, so drop until none waits. while waits := waiting(found, chunk) & chunk: chunk -= waits diff --git a/docs/decisions.md b/docs/decisions.md index bb993dda..8ab6ea90 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -388,4 +388,4 @@ Valid while the comprehension panel measures how hard a project is to read. 2026-10-22, lilleman, through todo item 216. Serves goal 1.4: each review has a fixed cost, so more items per chunk cost less per item. Across the 165 finished chunks loop-claude archived up to that day, a chunk took a median of 1.30M tokens with one item and 1.33M with two, and three in four chunks shipped one item. The old rule also asked one PR title to state what the items achieve together; lilleman dropped it, since unrelated items that fire the same passes cost one review. -The cap is 5, `bin/todo_table.py`'s `BUNDLE_MAX_R`, from the same chunks: by the highest R among a chunk's items, the median was 0.9M to 1.5M tokens at R 1 to 5, and 2.7M at R 6, with a 90th percentile of 8.8M. A risky item that runs long re-runs review over every item bundled with it. R 5 is also the least R an I 4 item gets, so no item that could take everything down shares a chunk unless both its L and E are 1. Valid while a review's cost is mostly fixed per chunk; revisit once 30 chunks have shipped bundles under it. +The cap is 5, `bin/todo_table.py`'s `BUNDLE_MAX_R`, from the same chunks: by the highest R among a chunk's items, the median was 0.9M to 1.5M tokens at R 1 to 5, and 2.7M at R 6, with a 90th percentile of 8.8M. A risky item that runs long re-runs review over every item bundled with it. R 5 is also the least R an I 4 item gets, so an item that could take everything down shares a chunk only where its L + E is 3 or less, and an irreversible I 5 item, at R 7 or more, never does. Valid while a review's cost is mostly fixed per chunk; revisit once 30 chunks have shipped bundles under it. -- 2.52.0 From 6150c5289e4f97d854534c7be79796815d4b8bcc Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 22 Oct 2026 20:55:02 +0200 Subject: [PATCH 06/11] =?UTF-8?q?Answer=20product-owner=20round=201:=200?= =?UTF-8?q?=20=F0=9F=94=B4,=200=20=F0=9F=9F=A1;=20no=20finding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From fbdb6c9f086e1236ca8aba17bd5d9b70b4667a4d Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 22 Oct 2026 20:56:45 +0200 Subject: [PATCH 07/11] =?UTF-8?q?Answer=20principles=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1;=20decide=20ships-alone=20in?= =?UTF-8?q?=20one=20predicate=20both=20modules=20call?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/chunk_preflight/facts.py | 4 ++-- bin/todo_table.py | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/bin/chunk_preflight/facts.py b/bin/chunk_preflight/facts.py index 5bcbb8d7..4d8f172f 100644 --- a/bin/chunk_preflight/facts.py +++ b/bin/chunk_preflight/facts.py @@ -1,5 +1,5 @@ """The lines the preflight prints, stated from what it gathered.""" -from todo_table import BUNDLE_MAX_R, bundle_candidates, Item, version +from todo_table import BUNDLE_MAX_R, bundle_candidates, Item, ships_alone, version from failure import Failure from chunk_preflight.gathered import Forge, Gathered, ItemFacts, NamedPath, NoItem, Plan, Ran from chunk_pick import LastCut, unreleased_entries @@ -66,7 +66,7 @@ def open_pulls(stdout: str, forge: Forge, branch: str) -> list[str]: def bundled(plan: Plan) -> list[str]: first, candidates = plan.first, bundle_candidates(plan.items, plan.first) - if first.scores.get("R", 0) > BUNDLE_MAX_R: + if ships_alone(first): return [f"- Item {first.id} has R above {BUNDLE_MAX_R}, so it ships alone."] if not candidates: return [f"- No other item of release {version(first.release)} may join item {first.id}'s chunk."] diff --git a/bin/todo_table.py b/bin/todo_table.py index 8f849a7c..c96ea3cc 100644 --- a/bin/todo_table.py +++ b/bin/todo_table.py @@ -202,11 +202,16 @@ def renames(todo: str) -> set[tuple[int, int, int]] | Failure: return marked +def ships_alone(item: Item) -> bool: + """An item above BUNDLE_MAX_R joins no chunk, and none joins it.""" + return item.scores.get("R", 0) > BUNDLE_MAX_R + + def bundle_candidates(found: list[Item], first: Item) -> list[Item]: - """The items of first's release, in the table's order, that a chunk taking first may take too: those that do not wait once the chunk's own items count as done. An item above BUNDLE_MAX_R ships alone.""" - chunk = {item.id for item in found if item.release == first.release and item.scores.get("R", 0) <= BUNDLE_MAX_R} - if first.id not in chunk: + """The items of first's release, in the table's order, that a chunk taking first may take too: those that do not ship alone, and do not wait once the chunk's own items count as done.""" + if ships_alone(first): return [] + chunk = {item.id for item in found if item.release == first.release and not ships_alone(item)} # Dropping an item that waits may make another wait on it, so drop until none waits. while waits := waiting(found, chunk) & chunk: chunk -= waits -- 2.52.0 From 682181bc3bb6a520d7d2268804fdbf7d2d19e299 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 22 Oct 2026 21:07:27 +0200 Subject: [PATCH 08/11] =?UTF-8?q?Answer=20stability=20round=201:=201=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1;=20restore=20the=20import=20or?= =?UTF-8?q?der,=20and=20decide=20ships-alone=20from=20L,=20E=20and=20I=20s?= =?UTF-8?q?o=20an=20unranked=20row=20counts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/chunk_preflight/facts.py | 2 +- bin/test_rank_todo.py | 3 +++ bin/todo_table.py | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/chunk_preflight/facts.py b/bin/chunk_preflight/facts.py index 4d8f172f..0d9fe3ed 100644 --- a/bin/chunk_preflight/facts.py +++ b/bin/chunk_preflight/facts.py @@ -1,5 +1,5 @@ """The lines the preflight prints, stated from what it gathered.""" -from todo_table import BUNDLE_MAX_R, bundle_candidates, Item, ships_alone, version +from todo_table import bundle_candidates, BUNDLE_MAX_R, Item, ships_alone, version from failure import Failure from chunk_preflight.gathered import Forge, Gathered, ItemFacts, NamedPath, NoItem, Plan, Ran from chunk_pick import LastCut, unreleased_entries diff --git a/bin/test_rank_todo.py b/bin/test_rank_todo.py index 9264228e..e910b2bb 100644 --- a/bin/test_rank_todo.py +++ b/bin/test_rank_todo.py @@ -483,6 +483,9 @@ class Blockers(unittest.TestCase): # At R 6, item 3 ships alone too. riskier = todo_table.items(TODO.replace("| 2 | 1 | 2 | 3 | 7 |", "| 3 | 2 | 3 | 6 | 7 |")) self.assertNotIn(3, [item.id for item in todo_table.bundle_candidates(riskier, todo_table.next_item(riskier))]) + # Before rank_todo.py fills its R cell, item 3's L 3, E 2 and I 3 still make R 6. + unranked = todo_table.items(TODO.replace("| 2 | 1 | 2 | 3 | 7 |", "| 3 | 2 | 3 | | 7 |")) + self.assertNotIn(3, [item.id for item in todo_table.bundle_candidates(unranked, todo_table.next_item(unranked))]) def test_drops_a_blocker_the_table_no_longer_holds_as_finished(self): finished = TODO.replace("| 4 | 0.1.0 | | security | **Rotate the leaked key.** | 3 | 3 | 5 | 9 | 2 | 2.1 by 1 | 0 |\n", "").replace("| 2 | 0.1.0 | |", "| 2 | 0.1.0 | 4 |") diff --git a/bin/todo_table.py b/bin/todo_table.py index c96ea3cc..638d71df 100644 --- a/bin/todo_table.py +++ b/bin/todo_table.py @@ -203,8 +203,9 @@ def renames(todo: str) -> set[tuple[int, int, int]] | Failure: def ships_alone(item: Item) -> bool: - """An item above BUNDLE_MAX_R joins no chunk, and none joins it.""" - return item.scores.get("R", 0) > BUNDLE_MAX_R + """An item above BUNDLE_MAX_R joins no chunk, and none joins it. R comes from L, E and I, so an R cell rank_todo.py has yet to fill counts too; a table without them, in the old shape, ships nothing alone.""" + scores = item.scores + return all(level in scores for level in ("L", "E", "I")) and risk(scores["L"], scores["E"], scores["I"]) > BUNDLE_MAX_R def bundle_candidates(found: list[Item], first: Item) -> list[Item]: -- 2.52.0 From 77ef932576bc9037150656ab0e7cd7264dbb31cf Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 22 Oct 2026 21:08:01 +0200 Subject: [PATCH 09/11] =?UTF-8?q?Answer=20principles=20round=203:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1;=20no=20finding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From b37f34b2114d1556d3d16417295e82b0a96a8479 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 22 Oct 2026 21:08:49 +0200 Subject: [PATCH 10/11] =?UTF-8?q?Answer=20stability=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1;=20no=20finding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From 88d21b38a5536353e095eec855c8542b72d6ae94 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 22 Oct 2026 21:14:49 +0200 Subject: [PATCH 11/11] =?UTF-8?q?Answer=20prose=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=202=20=F0=9F=9F=A1;=20renumber=20the=20chunk's=20?= =?UTF-8?q?item=20to=20217=20after=20main=20took=20216,=20define=20R=20whe?= =?UTF-8?q?re=20CLAUDE.md=20first=20uses=20it,=20and=20reword=20the=20chan?= =?UTF-8?q?gelog,=20decision=20and=20docstring?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 +- CLAUDE.md | 2 +- bin/todo_table.py | 2 +- docs/decisions.md | 4 ++-- todo.md | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98d1a9e4..841e57bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -- A chunk now takes every unblocked item of its release that fires the same review passes, whatever its purpose: one PR title no longer has to state what the items achieve together. An item with R above 5 ships alone, and `chunk-preflight` no longer lists it as one that may join, or lists any item to join it. +- A chunk now takes every unblocked item of its release that fires the same review passes, whatever its purpose: one PR title no longer has to state what the items achieve together. An item with R above 5 ships alone. `chunk-preflight` says so for such an item, and never lists one as an item that may join another. - A branch whose name is not UTF-8 now shows no branch in the status line, in place of a name with replacement characters. - A new technical principle, "About seven things per level", sets soft limits on what a reader takes in at once: the parameters and branches of a function, the methods of a class, the files and folders in a folder, the sections of a document and the components of a system. Aim for four or five of the things that act on each other, such as parameters. Things found by name, such as files named by locale, may run far past seven. Crossing a limit asks you to group the things or record why they stay. The systems-architect reviewer now reads its limits from this principle. It rates a unit that crosses a limit with no recorded reason a 🟑, where it used to be a πŸ”΄, and no longer asks for the limits as merge-gate rules. diff --git a/CLAUDE.md b/CLAUDE.md index a0b96df5..41b1b081 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -11,7 +11,7 @@ How work proceeds in any repo, unless the repo's `AGENTS.md` says otherwise. The - **Open every chunk with one line:** the last version cut, how many changes are unreleased (the entries under `CHANGELOG.md` β†’ `## Unreleased`, or else the commits 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 chunk's items set its scope. The goals choose between ways to deliver those items, and never add to them. - **Read the plan and the decisions only as far as the chunk needs.** Where your prompt quotes `chunk-preflight`'s facts, they hold the next item's L, E + I, tagline and detail, and the items that may join it; read further only what they leave out. Otherwise run `grep -n '^## Details' todo.md`, then read `todo.md` with the Read tool up to the line it prints, or whole when it prints none. Then read the details of only the items the chunk takes. `AGENTS.md` lists every decision's title. Read the entry under a title in `docs/decisions.md` only where the title leaves open what the chunk or the review needs. -- **Work one chunk at a time, and make it as large as the review passes allow.** Every review has a fixed cost, so a chunk takes the next plan item plus every other item for which three things hold: they name one release; they fire the same review passes (`larv-review` Β§3); and no item outside the chunk blocks one of them. The items need not share a purpose. An item with R above 5 ships alone: it joins no chunk, and none joins it. The next plan item is the first that does not wait: an item waits while it is marked `question`, until the human answers, or while an item that blocks it is still in the plan. Tiny items, a few lines of change each, need not fire the same passes: bundle up to ten that name one release, that no item outside the chunk blocks, and that have R 5 or less, 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`. +- **Work one chunk at a time, and put every item that can share its review into it.** Every review has a fixed cost, so a chunk takes the next plan item plus every other item for which three things hold: they name one release; they fire the same review passes (`larv-review` Β§3); and no item outside the chunk blocks one of them. The items need not share a purpose. An item whose risk R, in `todo.md`, is above 5 ships alone: it joins no chunk, and none joins it. The next plan item is the first that does not wait: an item waits while it is marked `question`, until the human answers, or while an item that blocks it is still in the plan. Tiny items, a few lines of change each, need not fire the same passes: bundle up to ten that name one release, and that no item outside the chunk blocks, 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`. - **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. - **Implement the simplest change that solves the item, and ship it with `/larv-review`.** Whenever a test can check the change, write that test first and see it fail. Take its expected values from the item, never from the code. larv-review's reviewers hold the change to the technical principles, and a finding against one names it. Read a file under `~/.claude/principles/` only when the item changes it, a finding or a record you write names it, or you decline a finding. diff --git a/bin/todo_table.py b/bin/todo_table.py index 638d71df..618d0d8a 100644 --- a/bin/todo_table.py +++ b/bin/todo_table.py @@ -203,7 +203,7 @@ def renames(todo: str) -> set[tuple[int, int, int]] | Failure: def ships_alone(item: Item) -> bool: - """An item above BUNDLE_MAX_R joins no chunk, and none joins it. R comes from L, E and I, so an R cell rank_todo.py has yet to fill counts too; a table without them, in the old shape, ships nothing alone.""" + """An item above BUNDLE_MAX_R joins no chunk, and none joins it. R is worked out from L, E and I, so a row whose R cell rank_todo.py has not filled yet still counts. An old-shape table has no L, E or I, so none of its items ships alone.""" scores = item.scores return all(level in scores for level in ("L", "E", "I")) and risk(scores["L"], scores["E"], scores["I"]) > BUNDLE_MAX_R diff --git a/docs/decisions.md b/docs/decisions.md index 8ab6ea90..38d1defa 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -386,6 +386,6 @@ Valid while the comprehension panel measures how hard a project is to read. ## chunks: a chunk takes every unblocked item of its release that fires the same review passes, whatever its purpose, and an item above R 5 ships alone -2026-10-22, lilleman, through todo item 216. Serves goal 1.4: each review has a fixed cost, so more items per chunk cost less per item. Across the 165 finished chunks loop-claude archived up to that day, a chunk took a median of 1.30M tokens with one item and 1.33M with two, and three in four chunks shipped one item. The old rule also asked one PR title to state what the items achieve together; lilleman dropped it, since unrelated items that fire the same passes cost one review. +2026-10-22, lilleman, through todo item 217. Serves goal 1.4: each review has a fixed cost, so more items per chunk cost less per item. Across the 165 finished chunks loop-claude archived up to that day, a chunk took a median of 1.30M tokens with one item and 1.33M with two, and three in four chunks shipped one item. The old rule also asked one PR title to state what the items achieve together; lilleman dropped it, since unrelated items that fire the same passes cost one review. -The cap is 5, `bin/todo_table.py`'s `BUNDLE_MAX_R`, from the same chunks: by the highest R among a chunk's items, the median was 0.9M to 1.5M tokens at R 1 to 5, and 2.7M at R 6, with a 90th percentile of 8.8M. A risky item that runs long re-runs review over every item bundled with it. R 5 is also the least R an I 4 item gets, so an item that could take everything down shares a chunk only where its L + E is 3 or less, and an irreversible I 5 item, at R 7 or more, never does. Valid while a review's cost is mostly fixed per chunk; revisit once 30 chunks have shipped bundles under it. +The cap is 5, `bin/todo_table.py`'s `BUNDLE_MAX_R`, from the same chunks: by the highest R among a chunk's items, the median was 0.9M to 1.5M tokens at R 1 to 5, and 2.7M at R 6, where the 90th percentile was 8.8M. A risky item that runs long re-runs review over every item bundled with it. R 5 is also the least R an I 4 item gets, so an item that could take everything down shares a chunk only where its L + E is 3 or less, and an irreversible I 5 item, at R 7 or more, never does. Valid while a review's cost is mostly fixed per chunk; revisit once 30 chunks have shipped bundles under it. diff --git a/todo.md b/todo.md index 343a0dba..a5f1ea5d 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 0.1` -`Next ID = 217` +`Next ID = 218` ## Items @@ -349,7 +349,7 @@ The key names the project's session, archive folder and models entry. `project_k ### 155. Lower the reading cost of the files a chunk reads most before its first commit. -`bin/reading-cost` on 2026-10-22, refreshed by the chunk of item 216: the median of the last 5 chunks is 81,812 new input tokens before their first commit, up from 71,637 for the 5 before them. The files read most over the last 5 were `skills/larv-review/SKILL.md`, 3 times, and `rules/todo-items.md`, 2 times. The chunk that ships this item runs `bin/reading-cost --reset`. +`bin/reading-cost` on 2026-10-22: the median of the last 5 chunks is 81,812 new input tokens before their first commit, up from 71,637 for the 5 before them. The files read most over the last 5 were `skills/larv-review/SKILL.md`, 3 times, and `rules/todo-items.md`, 2 times. The chunk that ships this item runs `bin/reading-cost --reset`. ### 51. Hand loop-claude's terminal output to an injected effect, so no storage or retry function prints. -- 2.52.0