diff --git a/AGENTS.md b/AGENTS.md index 26c6d157..d2a6a0da 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -26,7 +26,7 @@ Decisions live in `docs/decisions.md`: - workflow-bench/: the remote may show the bench cases' names and commit SHAs - settings.json: Claude Code runs in auto mode with the dangerous-mode prompt skipped - the repo may name bender, bender-infra and ai-sandbox -- todo.md: one table of items scored by the formula and goal weights it states, held to its bar, ranked by `bin/rank_todo.py` with each blocker just above the first item it blocks, and no other order +- todo.md: one table of items scored by the formula and goal weights it states, held to its bar, ranked by `bin/rank_todo.py`, which ranks each blocker above the items it blocks; the table's order is the plan's only order - todo.md: only a session or subagent on the project's rung or above scores or reshapes the plan; one below it drafts new items and changes to filed ones for a subagent at or above that rung to apply and score, and removes finished ones - reading cost: larv-review measures each finished chunk from loop-claude's archive and appends the figure to `docs/reading-cost.md` in the next chunk's PR - reading cost: a rise is the last 5 chunks' median above the 5 before them, and files or refreshes one plan item diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f00d096..0e8bd5e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -- `todo.md`'s items table has a Blocked by column, right after Release, listing the IDs of the items that must be done before an item starts, such as `12, 14`. `rank_todo.py` moves each blocker just above the first item it blocks, drops an ID once that item leaves the table, and adds the column to a table without it; a project's plan takes the column the next time `rank_todo.py` runs on it. `rank_todo.py` now fails on text beside the table under `## Items`, such as a line naming items to take first: put an order in the scores or the column. `loop-claude` routes a chunk on the next release's first item that waits on nothing, which is the item the worker takes, so the first cycle runs on that item's rung. The tools now read the table's cells by column name, and `rank_todo.py` fails on a column it does not know rather than drop it. Move every machine to this release before any of them ranks a plan another machine shares: an older release reads the new table as no plan. `rank_todo.py` does not turn a line such as "Needs 12" in an item's detail into a Blocked by cell; move each into the column by hand. +- `todo.md`'s items table has a Blocked by column, right after Release, listing the IDs of the items that must be done before an item starts, such as `12, 14`. Move every machine to this release before any of them ranks a plan another machine shares: an older release reads the new table as no plan. `rank_todo.py` ranks each blocker above every item it blocks, drops an ID once that item leaves the table, and adds the column to a table without it. It does not turn a line such as "Needs 12" in an item's detail into a Blocked by cell; move each into the column by hand. It now fails on text beside the table under `## Items`, such as a line naming items to take first: put an order in the scores or the column. It reads the table's cells by column name, and fails on a column it does not know rather than drop it. `loop-claude` routes a chunk on the next release's first item that is neither marked `question` nor blocked by an item still in the table, which is the item the worker takes, so the first cycle runs on that item's rung. - The new `bin/stability-replay ` replays archived stability reviews of the projects run on the model, each on the code it reviewed, first on the project's rung and then on each rung below, and prints the lowest rung that, like each rung above it, finds every ๐Ÿ”ด and ๐ŸŸก finding the project's rung finds. It shares its search with `judge-replay`, which now tries rungs from the project's rung down, where it tried them from the cheapest up. Its first run, on Opus 5.5 projects, found none: Sonnet 5.5 at high missed 13 of the 29 findings the project's rung found again. So the stability reviewer stays on the project's rung while the worker runs below it. - A `todo.md` item you tell a session to keep is marked `owner` in its Exempt cell, and stays whatever its score. - A `loop-claude` worker hands a task that proves too hard for its rung to a subagent one rung up, edits included, when a trigger fires: a re-score of the item on the project's rung or above picks a higher rung, the same failing test or finding survives two fix attempts, or a review pass reports a ๐Ÿ”ด in round 2 or later. Each further trigger climbs one more rung, to at most two rungs above the rung the chunk's `todo.md` item picks, unless you agree. `CLAUDE.md` states the rule, and `loop-claude`'s prompt names the rungs a trigger opens. The worker opens the subagent's prompt with `Escalation trigger :`, and `routing-figures.md` counts the escalations by trigger. Expect a chunk that gets stuck to spend more on the stuck part, and fewer unfinished verdicts. diff --git a/CLAUDE.md b/CLAUDE.md index 70c2c953..cd0d443a 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.** 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. 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`. An item waits while it is marked `question`, which waits for the human, or while an item that blocks it is still in the plan; take the next item that does not wait. +- **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`. - **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. 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/loop_claude/loop/main.py b/bin/loop_claude/loop/main.py index 8f2cc186..0c716a8d 100644 --- a/bin/loop_claude/loop/main.py +++ b/bin/loop_claude/loop/main.py @@ -44,7 +44,7 @@ for the worker and the interrupt; with both set, nothing is asked. Where that model is on the routing ladder (bin/model_routing/ladder.py), the worker and the interrupt run on one of the ladder's rungs: a model at an effort. As a chunk starts, the R + C of todo.md's top item in the next release that does not wait picks the rung: an item waits while it is -marked question, or while an item that blocks it is still in the table. It +marked question, or while an item that blocks it is still in the table. The R + C counts from the model's cheapest rung, and an R + C of 8 or less picks a rung below it; without such an item, or with a C missing, the chunk runs on the model's cheapest rung. The worker's first prompt names the rung and the item, and asks the worker to name each item the chunk takes, with its diff --git a/bin/loop_claude/routing.py b/bin/loop_claude/routing.py index 41a69546..f321b58b 100644 --- a/bin/loop_claude/routing.py +++ b/bin/loop_claude/routing.py @@ -14,7 +14,7 @@ JUDGE_REPLAYED = ("claude-opus-5-5",) def routed_item(todo: str) -> Item | Failure | None: - """The next release's first row that waits on nothing, as todo_table.waiting says, in the table's order; None when there is none, or it has no C.""" + """The next release's first row that does not wait, as todo_table.waiting says, in the table's order; None when there is none, or it has no C.""" found = items(todo) if isinstance(found, Failure) or not found: return found if isinstance(found, Failure) else None @@ -82,9 +82,9 @@ def taken_in(anchor: Rung, route: Route, bundled: int) -> Rung: def judge_rung(judge_model: str, route: Route) -> Rung: - """item_rung counted from the judge model's cheapest rung, never below that rung, whatever rung the worker stepped to. + """The rung the route's item picks, counted from the judge model's cheapest rung and never below it, whatever rung the worker stepped to. - An item the judge reports bundled lifts the worker, through taken_in, but not the judge, until todo.md item 153 has the judge follow it. + An item the worker takes in beyond the routed one lifts the worker's rung, through taken_in, but not the judge's, until todo.md item 153 lifts the judge too. A model off the ladder, or not in JUDGE_REPLAYED, gets no effort flag, so claude runs it at the effort its settings give. """ diff --git a/bin/rank_todo.py b/bin/rank_todo.py index b97a0386..f9c0e7b3 100755 --- a/bin/rank_todo.py +++ b/bin/rank_todo.py @@ -5,9 +5,9 @@ usage: rank_todo.py [--check] [todo.md] Reads todo.md (default: ./todo.md), the README.md beside it, and docs/decisions.md when there is one. Rewrites each item's Score from the formula and sorts the items by release; within a release, -security rows come first, then the rest by score from highest, then by ID. Then it moves each item's -blockers, the items its Blocked by cell names, to just above the first item they block. The table's -order is todo.md's only order. Orders the details to match. Adds the Blocked by column to a table +security rows come first, then the rest by score from highest, then by ID. Then it moves each blocker, +an item another's Blocked by cell names, that ranks below an item it blocks to just above the first +such item. Orders the details to match. Adds the Blocked by column to a table without it. --check writes nothing and fails when the file is not ranked as it would be. A valid todo.md; ## Details and each item's detail are optional: @@ -53,8 +53,8 @@ A valid todo.md; ## Details and each item's detail are optional: loop. An ID at or above Next ID fails; one below it that the table no longer holds was finished or deleted, and is dropped. - ## Items holds the table and nothing else: an order goes in the scores or the Blocked by column. -- The table holds the columns above. A table without Blocked by gains it; one without C fails, and so - does a column this version does not know, rather than be dropped. +- The table holds the columns above. A table without Blocked by gains it. One without C fails, and so + does one with a column this version does not know, since writing it would drop that column. Exit 1, saying why, on bad arguments, a file that cannot be read or written, a todo.md, README.md or docs/decisions.md that breaks the rules above, an item that is not exempt scoring under the bar, or @@ -91,7 +91,7 @@ class Scoring: class Ranked: text: str under_bar: list[str] - # Each blocker ID the ranking dropped because the table no longer holds it, which a typo would look like too. + # Blocker IDs the ranking dropped because the table no longer holds them; printed, since a mistyped ID is dropped the same way. dropped: list[str] @@ -206,7 +206,7 @@ def blocked_through(id_: int, items: list[Item]) -> set[int]: def ordered(items: list[Item], scoring: Scoring) -> list[tuple[Item, float]] | Failure: - """Each item with its score, by release, then security first, then by score from highest, then by ID; then each blocker just above the first item it blocks.""" + """Each item with its score, by release, then security first, then by score from highest, then by ID; then each blocker above every item it blocks.""" by_score = [] for item in items: value = score(scoring.formula, item, scoring.weights) @@ -219,7 +219,7 @@ def ordered(items: list[Item], scoring: Scoring) -> list[tuple[Item, float]] | F def under_the_bar(item: Item, value: float, bar: float, items: list[Item]) -> str: blocks = [str(id_) for id_ in sorted(blocked_through(item.id, items))] - blocked = f" and the items it blocks, directly or through another, {', '.join(blocks)}" if blocks else "" + blocked = f" and the items it blocks, directly or through another ({', '.join(blocks)})" if blocks else "" return f"item {item.id} scores {value:.1f}, under the bar {bar:g}; delete it{blocked}, or mark it with a reason the bar does not apply" @@ -256,7 +256,7 @@ def read_items(lines: list[str], scoring: Scoring) -> tuple[list[Item], Table] | return Failure("todo.md's items table has no C column; add one after S, and score each item's C from 1 to 10 per rank_todo.py --help") # Ranking writes COLUMNS, so it would drop a column it does not know. if unknown := [column for column in table.columns if column not in COLUMNS]: - return Failure(f"todo.md's items table has the column {', '.join(unknown)}, which this rank_todo.py does not know; its columns are {', '.join(COLUMNS)}. Rename it, or move this machine to the release that added it") + return Failure(f"todo.md's items table has the column {', '.join(unknown)}, which this rank_todo.py does not know; the columns it knows are {', '.join(COLUMNS)}. Rename it, or move this machine to the release that added it") if misplaced := outside_items(lines, table): return misplaced items = [] @@ -279,8 +279,10 @@ def read_items(lines: list[str], scoring: Scoring) -> tuple[list[Item], Table] | def outside_items(lines: list[str], table: Table) -> Failure | None: """Why the table does not stand alone under ## Items: the table's order is todo.md's only order.""" heading = max((index for index in range(table.header) if lines[index].startswith("## ")), default=None) - if heading is None or lines[heading] != "## Items": - return Failure(f"the items table sits under {lines[heading] if heading is not None else 'no ## heading'}, not ## Items; move it under ## Items") + if heading is None: + return Failure("the items table sits under no ## heading; move it under ## Items") + if lines[heading] != "## Items": + return Failure(f"the items table sits under {lines[heading]}, not ## Items; move it under ## Items") after = lines[table.start + len(table.rows):] section = after[:next((index for index, line in enumerate(after) if line.startswith("## ")), len(after))] if any(line.strip() for line in lines[heading + 1:table.header] + section): @@ -289,14 +291,14 @@ def outside_items(lines: list[str], table: Table) -> Failure | None: def blockers_first(scored: list[tuple[Item, float]]) -> list[tuple[Item, float]] | Failure: - """scored, each blocker moved up to just above the first item it blocks; a blocker the table no longer holds was finished or deleted, and is dropped.""" + """scored, each blocker that ranks below an item it blocks moved up to just above the first such item; a blocker the table no longer holds was finished or deleted, and is dropped.""" held = {item.id: (item, value) for item, value in scored} position = {item.id: index for index, (item, _) in enumerate(scored)} for item, _ in scored: for blocker in item.blocked_by: if blocker in held and held[blocker][0].release > item.release: later, earlier = release_name(held[blocker][0]), release_name(item) - return Failure(f"item {item.id} is blocked by item {blocker}, which release {later} ships after release {earlier}; move item {blocker} to release {earlier} or earlier, or item {item.id} to release {later} or later") + return Failure(f"item {item.id}, in release {earlier}, is blocked by item {blocker}, in later release {later}; move item {blocker} to release {earlier} or earlier, or item {item.id} to release {later} or later") result: list[tuple[Item, float]] = [] for item, _ in scored: placed = place(item.id, held, position, {placed.id for placed, _ in result}, []) diff --git a/bin/test_rank_todo.py b/bin/test_rank_todo.py index f313e1ee..932faef9 100644 --- a/bin/test_rank_todo.py +++ b/bin/test_rank_todo.py @@ -85,7 +85,7 @@ class Rank(unittest.TestCase): self.assertEqual(ranked.under_bar, ["item 2 scores 10.3, under the bar 11; delete it, or mark it with a reason the bar does not apply"]) self.assertEqual(self.ranked(TODO.replace("`Bar = 9`", "`Bar = 10.3`")).under_bar, []) blocking = self.ranked(TODO.replace("`Bar = 9`", "`Bar = 11`").replace("| 3 | 0.1.0 | |", "| 3 | 0.1.0 | 2 |").replace("| 5 | 0.1.0 | |", "| 5 | 0.1.0 | 3 |")) - self.assertEqual(blocking.under_bar, ["item 2 scores 10.3, under the bar 11; delete it and the items it blocks, directly or through another, 3, 5, or mark it with a reason the bar does not apply"]) + self.assertEqual(blocking.under_bar, ["item 2 scores 10.3, under the bar 11; delete it and the items it blocks, directly or through another (3, 5), or mark it with a reason the bar does not apply"]) self.assertEqual(self.ranked(ranked.text.replace("| 2 | 0.1.0 | | |", "| 2 | 0.1.0 | | principle |")).under_bar, []) self.assertEqual(self.ranked(ranked.text.replace("| 2 | 0.1.0 | | |", "| 2 | 0.1.0 | | owner |")).under_bar, []) @@ -162,7 +162,7 @@ class Blockers(unittest.TestCase): def test_refuses_a_blocker_in_a_later_release_a_loop_and_an_id_past_next_id(self): cases = { - "| 3 | 0.1.0 | 1 |": "item 3 is blocked by item 1, which release 0.2.0 ships after release 0.1.0; move item 1 to release 0.1.0 or earlier, or item 3 to release 0.2.0 or later", + "| 3 | 0.1.0 | 1 |": "item 3, in release 0.1.0, is blocked by item 1, in later release 0.2.0; move item 1 to release 0.1.0 or earlier, or item 3 to release 0.2.0 or later", "| 3 | 0.1.0 | 3 |": "item 3 is blocked by itself; drop 3 from its Blocked by", "| 3 | 0.1.0 | 9 |": "item 3 is blocked by item 9, which is not under Next ID 6; name an item the table holds or held", "| 3 | 0.1.0 | 6 |": "item 3 is blocked by item 6, which is not under Next ID 6; name an item the table holds or held", @@ -181,7 +181,7 @@ class Blockers(unittest.TestCase): def test_refuses_a_column_it_does_not_know_rather_than_drop_it_and_asks_for_c_beside_blocked_by(self): extra = TODO.replace("| Goals | Score |\n|---|", "| Goals | Score | Later |\n|---|---|").replace(" | 0 |\n", " | 0 | x |\n") - self.assertEqual(self.ranked(extra), Failure("todo.md's items table has the column Later, which this rank_todo.py does not know; its columns are ID, Release, Blocked by, Exempt, Item, R, S, C, A, G, Goals, Score. Rename it, or move this machine to the release that added it")) + self.assertEqual(self.ranked(extra), Failure("todo.md's items table has the column Later, which this rank_todo.py does not know; the columns it knows are ID, Release, Blocked by, Exempt, Item, R, S, C, A, G, Goals, Score. Rename it, or move this machine to the release that added it")) self.assertEqual([item.id for item in todo_table.items(extra)], [1, 2, 3, 4, 5]) without_c = TODO.replace("| R | S | C |", "| R | S |").replace("|---|---|---|---|---|---|---|---|---|---|---|---|", "|---|---|---|---|---|---|---|---|---|---|---|") without_c = re.sub(r"(\*\* \| \d+ \| \d+) \| \d+ \|", r"\1 |", without_c) @@ -201,7 +201,7 @@ class Blockers(unittest.TestCase): self.assertEqual(self.ranked(outside).reason, "the items table sits under ## Rows, not ## Items; move it under ## Items") table = TODO[TODO.index("| ID | Release |"):TODO.index("\n\n## Details")] + "\n" above = table + "\n" + TODO.replace(table, "") - self.assertEqual(self.ranked(above).reason, "the items table sits under no ## heading, not ## Items; move it under ## Items") + self.assertEqual(self.ranked(above).reason, "the items table sits under no ## heading; move it under ## Items") header = "| ID | Release | Blocked by | Exempt | Item | R | S | C | A | G | Goals | Score |\n|---|---|---|---|---|---|---|---|---|---|---|---|\n" self.assertEqual(todo_table.items(TODO + "\n" + header.replace("| Score |", "| Later |")), Failure("todo.md holds 2 tables whose header opens | ID | Release |; keep one items table")) repeated = TODO.replace("| Goals | Score |\n|---|", "| Goals | Score | Exempt |\n|---|---|").replace(" | 0 |\n", " | 0 | x |\n") diff --git a/bin/todo_table.py b/bin/todo_table.py index 951ec405..ab2953dc 100644 --- a/bin/todo_table.py +++ b/bin/todo_table.py @@ -26,7 +26,6 @@ class Item: tagline: str scores: dict[str, int] goals: tuple[str, ...] - # The IDs of the items that block it. blocked_by: tuple[int, ...] @property @@ -80,7 +79,7 @@ def items_table(lines: list[str]) -> Table | None | Failure: def waiting(found: list[Item]) -> set[int]: - """The IDs of the items that wait: each marked question, or blocked by an item the table still holds. It holds in any order of the rows.""" + """The IDs of the items that wait: each marked question, or blocked by an item the table still holds. Row order does not change the result.""" held = {item.id for item in found} return {item.id for item in found if item.exempt == "question" or held.intersection(item.blocked_by)} diff --git a/docs/decisions.md b/docs/decisions.md index 1c64659b..6c3f1194 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -4,7 +4,7 @@ 2026-09-20, lilleman. Serves goal 1. Across six projects scored with the four seats, Locality or Self-sufficiency was the lowest dimension at every seat and Navigation at none, so a layout fix would not lift a project under the floor. Valid while the scoring run keeps those four seats. -2026-10-15, lilleman: an item that lifts the lowest dimension ranks first in its release, since the lowest dimension caps the overall and lifting it is worth the most to the floor. Its score does it: such an item scores G 9, which ranks it first in release 0.3.0 today. When `todo.md` item 148 replaces G, the chunk that ships it carries this rule into the new score. A line in `todo.md` used to put these items first whatever their scores; `todo.md` holds no order but its table's now (`todo.md: one table`). PR #257's scoring run found Shape lowest, at 6.25; the Shape items are `todo.md` items 114, 124 and 125, in release 0.3.0 with the other readability items. +2026-10-15, lilleman: an item that lifts the lowest dimension scores G 9, since the lowest dimension caps the overall and lifting it is worth the most to the floor. Today that ranks the Shape items, `todo.md` items 114, 124 and 125, first in release 0.3.0: PR #257's scoring run found Shape lowest, at 6.25. When `todo.md` item 148 replaces G, the chunk that ships it carries this rule into the new score. ## loop-claude: a judge decides each interrupt and each quoted answer from the transcript, the README's premises, `AGENTS.md`, `docs/decisions.md`, `~/.claude/CLAUDE.md`, `~/.claude/rules/` and larv-review's standards, and holds a chunk open while an answer the human typed in it is recorded nowhere; the worker's own account of which goal settles a choice decides nothing @@ -120,13 +120,13 @@ Valid while the ladder orders its rungs by competence. 2026-10-02, lilleman. Serves goal 4, which keeps credentials, transcripts and memory files off the remote; a private project's name and commit ids are none of those. Valid while the bench names only cases and commits, never their code or results. -## todo.md: one table of items scored by the formula and goal weights it states, held to its bar, ranked by `bin/rank_todo.py` with each blocker just above the first item it blocks, and no other order +## todo.md: one table of items scored by the formula and goal weights it states, held to its bar, ranked by `bin/rank_todo.py`, which ranks each blocker above the items it blocks; the table's order is the plan's only order 2026-10-02, lilleman. Serves goal 1: findings were filed faster than chunks closed them, so the plan grew without telling what mattered. Each item is scored as `~/.claude/rules/todo-items.md` says; this repo's formula counts value highest and size least. An item under the bar is not kept; this repo's bar started at 10 and was set to 9 the same day, purging the 17 items under it. An Exempt cell keeps a row past the bar where a rule needs it kept. lilleman retired the two decisions whose plans the purge removed: the stats line in the transcript archive, and three benches before a workflow change merges. A finding under the bar is recorded nowhere, so a later review may raise it again, and the run rescores it. That costs one scoring; a ledger of dropped findings would regrow the list the bar caps. larv-review's "Round cap" โ†’ "Done" counts a finding named under the bar as settled, so one raised again holds no pass open. `rank_todo.py --check` is part of larv-review's gate, since only a check keeps the stored Score from going stale. The format is mandatory in every project, as the premises are (goal 1.3); the formula, bar and weights are each project's own. A script ranks the table so a re-rank after each addition or edit is deterministic and cheap. A ๐ŸŸก against a technical principle is exempt as `principle`, because its audience value scores low and the bar would drop every one. A ๐ŸŸข against a principle is scored like any other finding. 2026-10-08, lilleman: the goal weights in `todo.md` depart from an even spread by position, which would weigh goal 4, leaking nothing, at 0.11. Valid while one human sets the bar and reads the ranking, and while the items marked `principle` stay few enough to rank. 2026-10-15, lilleman: the scores get a researched method, which `todo.md` items 146, 148, 149, 150, 151 and 152 build; the evidence is in `docs/scoring-and-goals-research.md`. R becomes L + E + I โˆ’ 2: the chance the change holds a defect, set first by its size; the chance the defect escapes tests, review and monitoring; and the worst impact dimension, each about ร—10 per level. I5, irreversible, holds R at 7 or more, and I4 at 5 or more, since a severe enough consequence outranks how unlikely it is. C goes from every table and tool: what it scored beyond size, spread and novelty, which L already holds, is complexity, which adds almost nothing once size is accounted for. A task's R alone then picks its rung. Items rank by V / C, value per cost: C is 2^S, and V sums each cited achieve goal's sum-reciprocal weight times how far the item moves it. A goes, and the Audience says whose value the goals serve. R stays out of the ranking and sets how carefully an item is done; an item that lowers risk scores it as value. Each release fills by priority up to a capacity it states, in place of the bar. Each README goal is `maintain`, which vetoes an item that breaks it, or `achieve`, with a signal, a counter-signal and a one-line reason, and each project keeps settled decisions to test its goals against. Until these items ship, the formula and bar above hold. -2026-10-15, lilleman. Serves goals 1.3 and 1.4: the first row that waits on nothing is the item a chunk takes, so loop-claude routes the first cycle on the right item (`routing: one ladder`). An item names the items that must be done before it starts in a Blocked by column, and `rank_todo.py` moves each blocker just above the first item it blocks. An item waits while it is marked `question` or a blocker of it is still in the table, whatever the rows' order, and loop-claude routes on the next release's first item that does not wait. A blocker in a later release, a loop and an ID at or above Next ID fail; a blocker the table no longer holds was finished or deleted, and is dropped, so the cell shows what still blocks. The table's order is `todo.md`'s only order: `rank_todo.py` fails on text beside the table under `## Items`. A prose order there, "Release 0.3.0 takes items 125, 114 and 124 first", contradicted the table and loop-claude could not read it; a decision that wants an order sets the scores instead. A panel of three readers seated as lilleman picked the spelling: two ranked "Blocked by" first, since a blocker that ships leaves the cell, and all three chose bare IDs such as `12, 14` in a column right after Release, read before the tagline and kept apart from the scores. `rank_todo.py` adds the column to a table without it, so each project takes it at its next ranking. The tools read the table's cells by column name, so a later column leaves a reader on an older release working; `rank_todo.py`, which writes every column, fails on one it does not know rather than drop it. +2026-10-15, lilleman. Serves goal 1.4: loop-claude routes a chunk's first cycle on the item the chunk takes (`routing: one ladder`). An item lists the items that must be done before it starts in a Blocked by column, and `rank_todo.py` ranks each blocker above every item it blocks. The table's order is `todo.md`'s only order: `rank_todo.py` fails on text beside the table under `## Items`, since a prose order there, "Release 0.3.0 takes items 125, 114 and 124 first", contradicted the table and loop-claude could not read it. A decision that wants an order sets the scores instead. An item waits while it is marked `question` or a blocker of it is still in the table, whatever the rows' order, so a release's first row that does not wait is the item a chunk takes. A blocker the table no longer holds was finished or deleted, and is dropped, so the cell shows what still blocks. A panel of three readers seated as lilleman picked the spelling: two ranked "Blocked by" first, as the cell lists only what still blocks, and all three chose bare IDs such as `12, 14` in a column right after Release, read before the tagline and kept apart from the scores. `rank_todo.py` adds the column to a table without it. The tools read cells by column name, so a later column leaves a reader on an older release working; `rank_todo.py`, which writes every column, fails on one it does not know rather than drop it. ## todo.md: only a session or subagent on the project's rung or above scores or reshapes the plan; one below it drafts new items and changes to filed ones for a subagent at or above that rung to apply and score, and removes finished ones @@ -204,7 +204,7 @@ A model off the ladder routes nothing: claude runs it at the effort its settings The worker delegates a task only when it needs just the task's conclusion: a search or read across many files, or work independent enough to run in parallel. Edits, and whatever it must check line by line, stay in its own thread, since it would read a delegated diff again to check it. Measured over archived worker transcripts, subagent reports cost a median 8% of the worker's peak context, and `sed -n` and `grep` output made up 41% of its Bash results, so delegated searches save the most context. It scores each delegated task's R and C as for an item, and `bin/subagent-rung` turns them into the Agent tool's model and effort, counted from the project's rung. The rule names both, because the Agent tool sets a subagent's effort only when instructions ask. `CLAUDE.md` states the rule, since it holds in every session. A task that proves too hard for the worker's rung goes one rung up instead: `routing: a worker hands a task one rung up`. -Because a model switch inside a session discards its prompt cache, the worker changes rung only as the chunk starts, after every second unfinished verdict, when the judge reports a taken-in item whose R + C picks a higher rung, or when the judge finds the escalation trigger a worker cites in asking for a higher rung (`routing: a worker whose run ends asking for a higher rung`). loop-claude routes on the first row of the next release in `todo.md`'s table that does not wait: an item waits while it is marked `question` or a blocker of it is still in the table. Since `todo.md` holds no order but its table's (`todo.md: one table`), that row is the item the worker takes. An item it takes in besides lifts it once the judge reports that item, after the first cycle. +Because a model switch inside a session discards its prompt cache, the worker changes rung only as the chunk starts, after every second unfinished verdict, when the judge reports a taken-in item whose R + C picks a higher rung, or when the judge finds the escalation trigger a worker cites in asking for a higher rung (`routing: a worker whose run ends asking for a higher rung`). loop-claude routes on the first row of the next release in `todo.md`'s table that does not wait: an item waits while it is marked `question` or a blocker of it is still in the table. Since `todo.md` holds no order but its table's (`todo.md: one table`), that row is the item the worker takes. An item the worker takes in beyond that row lifts the worker's rung once the judge reports it, after the first cycle. Valid while the index ranks these models, and while no newer model joins the catalog. @@ -238,7 +238,7 @@ On a model listed in `JUDGE_REPLAYED` in `bin/loop_claude/routing.py`, the judge On 2026-10-15, `bin/judge-replay claude-opus-5-5` replayed the latest 15 archived verdicts of each kind from the Opus 5.5 projects, 39 in all. The reference judge, Opus 5.5 at the xhigh effort `settings.json` gave every judge before, reproduced 31 of them. The other 8 may rest on records or judge rules that have changed since; either way no rung is held to them. On the 31, Haiku 5.5 missed 7 at xhigh and 8 at max. That run tried each judge once. 4 of Haiku's misses, 1 at xhigh and 3 at max, misquoted the transcript, which the loop and `judge-replay` now retry; without them it missed 6 and 5. Sonnet 5.5 at high returned another kind on 3 interrupts, and Opus 5.5 at medium missed none. A missed interrupt lets the worker settle a decision that is lilleman's (goal 1.2), so the judge never runs below the project's rung. -Only Opus 5.5 was replayed, so the judge of a project on another model keeps the effort its settings give until `judge-replay` covers that model (goal 1.1). Every routed chunk on record had an item of R + C 9, so the replay could not show that the project's rung suffices for harder items, and the judge climbs with the routed item as the worker does. For R + C 11 to 14 it still runs at or below xhigh (goal 1.4); from 15, `routing: one ladder` records that lilleman wants the highest quality at any price. An item the worker takes in besides lifts the worker, not the judge, until `todo.md` item 153 has the judge follow it. +Only Opus 5.5 was replayed, so the judge of a project on another model keeps the effort its settings give until `judge-replay` covers that model (goal 1.1). Every routed chunk on record had an item of R + C 9, so the replay could not show that the project's rung suffices for harder items, and the judge climbs with the routed item as the worker does. For R + C 11 to 14 it still runs at or below xhigh (goal 1.4); from 15, `routing: one ladder` records that lilleman wants the highest quality at any price. An item the worker takes in beyond the routed one lifts the worker's rung but not the judge's, until `todo.md` item 153 lifts the judge too. Valid while the archived verdicts show what a judge should return, and until a new model joins the ladder: replay then. diff --git a/rules/todo-items.md b/rules/todo-items.md index 53cc7c4c..7a555264 100644 --- a/rules/todo-items.md +++ b/rules/todo-items.md @@ -6,7 +6,7 @@ paths: # Todo items (`todo.md`) - **`todo.md` is mandatory in every project, in one shape**, which `~/.claude/bin/rank_todo.py` checks and ranks; its `--help` shows a valid file. `## Scoring` holds the formula, the bar and the goal weights; `## Items` is one table of every item; `## Details` holds each item's detail under its ID. Cite an item by its ID. The formula, bar and weights are the project's own to tune. -- **Order items only by score and the Blocked by column.** An item's Blocked by cell lists the IDs of the items that must be done before it starts, such as `12, 14`. `rank_todo.py` ranks each blocker just above the first item it blocks, and drops an ID the table no longer holds. No text in `todo.md` outside the table orders items: where an item must go first, score it so, and say why in its detail. +- **Order items only by score and the Blocked by column.** An item's Blocked by cell lists the IDs of the items that must be done before it starts, such as `12, 14`; `rank_todo.py --help` says how it ranks them. No text in `todo.md` outside the table orders items: where an item must go first, score it so, and say why in its detail. - **Plan only on the project's rung or above.** loop-claude's prompt tells you when you run below it. Below it, never score or re-score an item, move it between releases, split a milestone into items, delete an item under the bar, or rewrite a filed item's tagline or detail. Draft each new item, and each change to a filed item, instead. Before your next commit, launch one subagent to apply the drafts, score them and set their release. Launch it on the rung `CLAUDE.md`'s delegation rule gives a subagent that files or scores items. Keep the scores and releases it writes. For a security finding, launch it at once. Any rung may remove a finished item's row and detail, and score a delegated task's R + C. A subagent launched for another task leaves `todo.md` alone. - **An item's release allows the bump that semver read strictly asks for.** An item that changes what exists needs a major, or before 1.0.0 a minor. One that only adds needs a minor, and a fix a patch. - **Score an item when it is filed or edited.** Each of R, S, C, A and G is a whole number from 1 to 10: diff --git a/todo.md b/todo.md index 858a1de8..5d2f21de 100644 --- a/todo.md +++ b/todo.md @@ -35,7 +35,7 @@ | 110 | 0.2.0 | | | **Count, for each finished chunk, the later changes that fixed code it wrote, and show them beside its guessed E.** | 2 | 4 | 6 | 5 | 6 | 1.1, 1.4 | 18.9 | | 115 | 0.2.0 | | question | **Confirm or set how many finished chunks that each shipped one item `score-outcomes` waits for before it shows a score's medians, today 10.** | 1 | 1 | 2 | 4 | 5 | 1.2 | 16.6 | | 116 | 0.2.0 | | | **Report L by the share of chunks with a ๐Ÿ”ด, once 10 chunks that each shipped one item record finding counts and most record no ๐Ÿ”ด.** | 1 | 2 | 2 | 4 | 5 | 1.1 | 16.4 | -| 153 | 0.2.0 | | decision | **Run the judge on the rung the highest R + C in its chunk picks, an item the worker takes in included, not only the routed item's.** | 2 | 3 | 4 | 4 | 5 | 1.2 | 15.1 | +| 153 | 0.2.0 | | decision | **Run the judge on the rung the highest R + C in its chunk picks, an item the worker takes in included.** | 2 | 3 | 4 | 4 | 5 | 1.2 | 15.1 | | 111 | 0.2.0 | | | **Measure the chunks of a project that merges by squash or fast-forward, which `score-outcomes` skips today.** | 3 | 3 | 5 | 4 | 5 | 1.3 | 13.9 | | 113 | 0.2.0 | | | **Compute an item's S from the code it names, where it names any, and show it beside the finished items `score-outcomes` lists.** | 3 | 4 | 6 | 4 | 5 | 1.1, 1.4 | 13.9 | | 125 | 0.3.0 | | decision | **Give "record", "outcome" and "places" one meaning each across `bin/`, and rename `bin/larv_review/git.py` by what it holds.** | 2 | 5 | 3 | 3 | 9 | 1.1 | 20.6 | @@ -143,9 +143,9 @@ The `worker:` decision is valid while review rounds per pass do not rise. Count `score-outcomes` reports risk as the median ๐Ÿ”ด count at each guessed R; with item 146 it is L a ๐Ÿ”ด tests. Where most chunks have no ๐Ÿ”ด, every median reads 0 and tells a scorer nothing. No round title held counts before PR #254, so how often a chunk has a ๐Ÿ”ด is not yet known. -### 153. Run the judge on the rung the highest R + C in its chunk picks, an item the worker takes in included, not only the routed item's. +### 153. Run the judge on the rung the highest R + C in its chunk picks, an item the worker takes in included. -The judge reports the R + C of an item the worker takes in, and `routing.stepped` lifts the worker to the rung it picks, but `judge_rung` reads only the routed item's R + C, which the archived route line holds. A harder item taken in so leaves the judge on a lower rung than the work, where a missed interrupt lets the worker settle a decision that is lilleman's (goal 1.2). The route must carry the highest R + C taken in, archived so a rerun keeps it. +The judge reports the R + C of an item the worker takes in, and `routing.stepped` lifts the worker to the rung it picks, but `judge_rung` reads only the routed item's R + C, which the archived route line holds. So when the worker takes in a harder item, the judge stays on a lower rung than the work, where a missed interrupt lets the worker settle a decision that is lilleman's (goal 1.2). The route must carry the highest R + C taken in, archived so a rerun keeps it. ### 111. Measure the chunks of a project that merges by squash or fast-forward, which `score-outcomes` skips today.