From 9d68fd79f6873202579e755ae729c5b75b960384 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 16 Oct 2026 13:08:13 +0200 Subject: [PATCH] =?UTF-8?q?Answer=20product-owner=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1;=20write=20R=20into=20a=20blan?= =?UTF-8?q?k=20cell,=20a=20task=20that=20changes=20no=20file=20is=20L=201,?= =?UTF-8?q?=20and=20say=20where=20the=20judge=20runs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 +- CLAUDE.md | 2 +- bin/rank_todo.py | 5 +++-- bin/test_rank_todo.py | 4 ++++ bin/todo_table.py | 8 +++++--- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c26546dc..c1b96d52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ - Reshape every project's `todo.md` to the new shape below: until it is reshaped, that is the project's only work, as it is while README.md lacks Goals and Audience, and `rank_todo.py` says so. First move every machine to this release: an older release rejects the new formula, so it fails on every reshaped `todo.md`. Then mark the README's goals `**Maintain:**` or `**Achieve:**`, score each item's L, E and I, and set a bar on the new scale below the score of every item to keep, since the old bar would drop most items. Until then, an old-shape `todo.md` still ranks by its own formula and weights. - `todo.md` ranks items by value per cost: this setup's own plan uses `Score = 100 * V / (2**S + 8)`, where 8 is a chunk's fixed cost, about one size-3 change, and `rank_todo.py --help` shows it. A Moves column replaces A, G and Goals, naming each achieve goal an item moves and how far, such as `1.1 by 8, 1.2 by 5`. V sums each named goal's weight times its move. `rank_todo.py` weighs each achieve goal by its position in README.md, the first heaviest, so the goal weights table goes. An item names the most specific goal it moves, never a goal beside its own sub-goal. `rules/todo-items.md` and `rank_todo.py --help` show the new shape. - L, E and I replace C, and set R. L is the chance the change holds a defect, from 1 to 4; E the chance a defect escapes tests and review, from 1 to 3; I the damage it would do, from 1 to 5, counting every project and session that runs the change. `rules/todo-items.md` anchors each level in words, and `rank_todo.py` writes R as L + E + I − 2, at least 7 when I is 5 and at least 5 when I is 4. The table's score columns are `| L | E | I | R | S |`. `score-outcomes` takes `L E I S`, and reports how well L, E and I each order finished chunks by review rounds and 🔴 findings. -- `loop-claude` routes a chunk's worker on its item's L, from two rungs below the project's rung at L 1 to one above it at L 4. It routes the reviewers on the item's E + I, one rung above the project's for each point past 4, never below the worker's rung, and runs the judge on that rung too. The comprehension seats and the security pass stay on the project's rung. rule-hook holds each reviewer launch to the reviewers' rung, which `loop-claude` hands the worker in `LOOP_CLAUDE_REVIEWER_RUNG`. A delegated task's subagent takes the rung its L picks: `subagent-rung` takes L in place of R + C. Until a project reshapes its `todo.md`, every chunk there runs on the project's rung. Expect reviews of items whose defects would escape far or break much to cost more, and escalation from an item of L 4 to reach Fable 5.1 only with your yes. +- `loop-claude` routes a chunk's worker on its item's L, from two rungs below the project's rung at L 1 to one above it at L 4. It routes the reviewers on the item's E + I, one rung above the project's for each point past 4, never below the worker's rung. It runs the judge of an Opus 5.5 project on the rung E + I picks, never below the project's, and keeps it there when the worker steps up. The comprehension seats and the security pass stay on the project's rung. rule-hook holds each reviewer launch to the reviewers' rung, which `loop-claude` hands the worker in `LOOP_CLAUDE_REVIEWER_RUNG`. A delegated task's subagent takes the rung its L picks: `subagent-rung` takes L in place of R + C. Until a project reshapes its `todo.md`, every chunk there runs on the project's rung. Expect reviews of items whose defects would escape far or break much to cost more, and escalation from an item of L 4 to reach Fable 5.1 only with your yes. - An item that restores a maintain goal the project breaks today is exempt as `defect`, and its Moves may name that maintain goal, weighed as the heaviest achieve goal. A defect ranks by its score like any item. Only two kinds rank ahead of the rest of their release: questions first, since an answer may change other items, then security items. - The stability reviewer applies `principles/technical-principles.md` as written, in place of its own copies of it. Its test-data check now asks for UUID v7, where it asked for randomised UUIDs. - larv-review's principles audit is a pass of its own, and runs on every chunk that changes code, config or tests, not only on one with an architectural decision. A chunk of prose or planning alone skips it. diff --git a/CLAUDE.md b/CLAUDE.md index 3e94d112..6c1f692a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -52,7 +52,7 @@ The rules only reviewers apply, for quality, comments, READMEs and prose, live i - Keep the project's main checkout (e.g. `~/code/log`, never a worktree) current: when it is behind `origin` — a merge landed, or a fetch shows it — run `git pull --ff-only` there instead of reporting the lag, never with `--autostash`: a dirty checkout is a finding to report, not to carry along. - Run a project's language runtime, package manager, and task runner through its container/tooling setup, never directly on the host unless a decision puts them there. Example: `docker compose run --rm app …`. - Tear down test containers after a run. -- Delegate a task to a subagent only when you need just its conclusion: a search or read across many files, or work independent enough to run in parallel. Keep edits, and whatever you must check line by line, in your own thread: you would read a delegated diff again to check it. Score the task's L as for a `todo.md` item. `` below is the project's model id, such as `claude-opus-5-5`: the one loop-claude's prompt names as the project's, or else your own. Launch the subagent with the model and effort of the first case that fits: +- Delegate a task to a subagent only when you need just its conclusion: a search or read across many files, or work independent enough to run in parallel. Keep edits, and whatever you must check line by line, in your own thread: you would read a delegated diff again to check it. Score the task's L as for a `todo.md` item; a task that changes no file, such as a search, is L 1. `` below is the project's model id, such as `claude-opus-5-5`: the one loop-claude's prompt names as the project's, or else your own. Launch the subagent with the model and effort of the first case that fits: 1. A reviewer, a comprehension seat or the security pass: those loop-claude's prompt gives it. Given none, pass no model or effort, so it runs on your model. 2. An escalated task, below: the rung loop-claude's prompt names for escalation, or case 3's rung where the subagent files or scores `todo.md` items and that rung is higher. 3. A subagent that files or scores `todo.md` items: what `~/.claude/bin/subagent-rung --plan ` prints, which is never below the project's rung. diff --git a/bin/rank_todo.py b/bin/rank_todo.py index e823f376..064e8784 100755 --- a/bin/rank_todo.py +++ b/bin/rank_todo.py @@ -7,8 +7,9 @@ Reads todo.md (default: ./todo.md), the README.md beside it, and docs/decisions. one. Rewrites each item's Score from the formula and sorts the items by release; within a release, question rows come first, then security rows, then the rest, each group 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. +it blocks to just above the first such item. Orders the details to match. Writes each item's R, and +adds the Blocked by and R columns to a table without them. --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: diff --git a/bin/test_rank_todo.py b/bin/test_rank_todo.py index f95db2fc..12c06fe7 100644 --- a/bin/test_rank_todo.py +++ b/bin/test_rank_todo.py @@ -241,6 +241,10 @@ class Risk(unittest.TestCase): without_r = re.sub(r"(\*\* \| \d+ \| \d+ \| \d+) \| \d+ \|", r"\1 |", without_r) self.assertEqual(self.ranked(without_r).text, ranked) + def test_writes_r_into_a_blank_r_cell(self): + blank = TODO.replace("| 2 | 1 | 2 | 3 | 8 |", "| 2 | 1 | 2 | | 8 |") + self.assertEqual(self.ranked(blank).text, self.ranked(TODO).text) + def test_leaves_a_stale_r_to_ranking_so_a_reader_keeps_the_r_the_table_stored(self): stale = TODO.replace("| 2 | 1 | 2 | 3 | 8 |", "| 2 | 1 | 2 | 10 | 8 |") self.assertEqual(next(item for item in todo_table.items(stale) if item.id == 3).scores["R"], 10) diff --git a/bin/todo_table.py b/bin/todo_table.py index dc232202..01c3ed23 100644 --- a/bin/todo_table.py +++ b/bin/todo_table.py @@ -29,6 +29,8 @@ class Shape: optional: tuple[str, ...] # The columns rank_todo.py needs to rank a row, so no chunk starts on an item whose risk is unscored. risk_columns: tuple[str, ...] + # The scores rank_todo.py works out and writes, so a blank cell reads as no score yet. + derived: tuple[str, ...] # The column naming the goals an item serves; read_goals reads it, given the item's ID to name in a failure, and write_goals writes it back. goals_column: str read_goals: typing.Callable[[str, str], Moves | Failure] @@ -73,9 +75,9 @@ def write_cited(moves: Moves) -> str: # L, E and I are optional, since score_outcomes reads tables from before they replaced C out of history; R too, since rank_todo.py writes it from them. -SHAPE = Shape(("L", "E", "I", "R", "S"), (BLOCKED_BY, "L", "E", "I", "R", "Score"), ("L", "E", "I"), MOVES, parse_moves, write_moves) +SHAPE = Shape(("L", "E", "I", "R", "S"), (BLOCKED_BY, "L", "E", "I", "R", "Score"), ("L", "E", "I"), ("R",), MOVES, parse_moves, write_moves) # The shape from before MOVES replaced A, G and Goals, and L, E and I replaced C, which older todo.md files hold; one from before C joined lacks it. -OLD_SHAPE = Shape(("R", "S", "C", "A", "G"), (BLOCKED_BY, "C", "Score"), (), "Goals", parse_cited, write_cited) +OLD_SHAPE = Shape(("R", "S", "C", "A", "G"), (BLOCKED_BY, "C", "Score"), (), (), "Goals", parse_cited, write_cited) @dataclasses.dataclass(frozen=True) @@ -188,7 +190,7 @@ def parse_row(row: str, table: Table) -> Item | Failure: if misformed := check_cells(row, named): return misformed shape = shape_of(table.columns) - scores = parse_scores(named["ID"], named, shape.score_columns) + scores = parse_scores(named["ID"], {name: cell for name, cell in named.items() if cell or name not in shape.derived}, shape.score_columns) if isinstance(scores, Failure): return scores blocked_by = parse_blockers(named["ID"], named.get(BLOCKED_BY, ""))