Answer prose round 1: 1 🔴, 10 🟡 (1 misread); give rule-hook's 30 seconds, reword the drop rule, its comments and the changelog, note in this title that three readers picked the Drop item spelling 3-0, rename two tests; the fork 🔀 went to the security pass, which ruled it below its bar

This commit is contained in:
2026-11-09 01:19:34 +01:00
parent 560bf4f50b
commit 54b239d7f3
8 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
- This setup's own plan now ranks items by `Score = 100 * V / (2**S + 32)`, up from 8: F, a chunk's fixed cost, is 32, about one size-5 change, fitted to ten finished chunks' tokens, so small items rank lower against large ones. `docs/decisions.md` holds the fit.
- `loop-claude` now keeps the cycle it last measured the routing figures at, and each routing call it raised, in `routing-state.json` at the archive's root, and reads them back from there in place of `routing-figures.md` and `routing-calls-raised.md`. The two markdown files hold what they held before. From them, loop-claude now reads only a `Reset` line in `routing-calls-raised.md`, which still resets the figures. The first loop to close a cycle after the upgrade measures the figures at once. If the figures still make a call raised since the latest reset, it puts that call to you once more.
- `loop-claude` and the routing figures no longer read a `Worker:` line written as a sentence, as versions before 0.4.0 archived. A rerun routes a chunk whose archive still ends in one afresh, and the figures leave it out of the routed chunks and charge its dollars to a row named by the sentence.
- `score-outcomes` no longer credits an item a chunk removed from `todo.md` without building it with that chunk's measurements. Remove such an item in a commit whose title opens `Drop item 69: <why>`, or `Drop items 69, 70 and 71: <why>`, and `score-outcomes` leaves it out. Items dropped before this release still count as shipped.
- `score-outcomes` no longer credits a chunk's measurements to an item the chunk removed from `todo.md` without building it. Remove such an item in a commit whose title opens `Drop item 69: <why>`, or `Drop items 69, 70 and 71: <why>`, and `score-outcomes` leaves it out. Items dropped before this release still count as shipped.
- rule-hook's `todo-rank-check` now checks a branch of this setup's repo with that branch's own `bin/rank_todo.py`, so a branch that changes `todo.md`'s shape commits without an override. Any other repo is still checked with `~/.claude`'s.
## 0.6.0
+3 -3
View File
@@ -14,7 +14,7 @@ NOT_WORK = ("todo.md", HISTORY, RECORD)
LOG = ("log", "--format=%x00%H %ct %at %P%x1f%h%x1f%s", "--name-only", "--diff-merges=first-parent")
# One commit's record in LOG's output, without the NUL that opens it.
LOG_RECORD = re.compile(r"([0-9a-f]+) ([0-9]+) ([0-9]+) ([0-9a-f ]*)\x1f([0-9a-f]+)\x1f(.*)", re.DOTALL)
# A commit title that drops items unbuilt opens so: `Drop item 69: <why>`, or `Drop items 69, 70 and 71: <why>`. A panel of three readers seated as the audience picked it 3-0, over the words anywhere in a title and over a trailer, since a log skimmed by its titles shows it first.
# A title opening `Drop item 69: <why>` or `Drop items 69, 70 and 71: <why>` removes those items unbuilt; only at the start, where a log skimmed by its titles shows it.
DROP = re.compile(r"Drop items? ([0-9]+(?:, [0-9]+)*(?: and [0-9]+)?):")
# How a chunk reached the default branch; rebase and push leave no merge commit to bound it.
Landing = typing.Literal["merge", "rebase", "push"]
@@ -45,7 +45,7 @@ class Span:
@dataclasses.dataclass(frozen=True)
class BranchChunk(Span):
"""A Span with two more fields: shipped holds each todo.md item its change removed and no title of it dropped, as scored before the change; fixed_by names the later chunks that fixed code it shipped, newest first."""
"""A Span with two more fields: shipped holds each todo.md item its change removed, as scored before the change, less any item one of its commit titles drops; fixed_by names the later chunks that fixed code it shipped, newest first."""
shipped: tuple[Item, ...]
fixed_by: tuple[str, ...]
@@ -163,7 +163,7 @@ def plan_revisions(branch: Branch) -> list[str]:
def shipped_by(branch: Branch, plans: dict[str, str]) -> list[tuple[Item, ...]]:
"""The items each of the branch's chunks shipped, in the order of its chunks. plans holds todo.md's text at each revision plan_revisions names. A chunk with a revision plans lacks changed no plan, so it shipped none; an item a title of the chunk drops it did not ship either."""
"""The items each of the branch's chunks shipped, in the order of its chunks. plans holds todo.md's text at each revision plan_revisions names. A chunk with a revision plans lacks changed no plan, so it shipped none, nor an item one of its titles drops."""
found: list[tuple[Item, ...]] = []
for chunk in branch.chunks:
if chunk.before is not None and chunk.before in plans and chunk.tip in plans:
+1 -1
View File
@@ -290,7 +290,7 @@ class BranchChunks(unittest.TestCase):
self.assertEqual((found[1].tip, found[2].tip), (self.git("rev-parse", "HEAD^").strip(), self.git("rev-parse", "HEAD^^").strip()))
self.assertEqual((found[1].before, found[2].before), (found[2].tip, None))
def test_a_chunk_that_drops_an_item_by_a_commit_title_ships_it_not(self):
def test_a_chunk_that_drops_an_item_by_a_commit_title_does_not_ship_it(self):
self.merge("four", "Do four", {"b.py": "x\ny\n", "todo.md": todo(SECOND, FIX)}, "2026-10-13T10:00:00Z")
self.merge("six", "Drop item 6: item 4 fixed it", {"b.py": "x\nY\n", "todo.md": todo(SECOND)}, "2026-10-14T10:00:00Z")
found = self.read()
-1
View File
@@ -240,7 +240,6 @@ class Main(unittest.TestCase):
self.assertIn("The reference reviewer, claude-opus-5-5 at medium effort, found 2 of them.", out)
self.assertIn(f" {self.checkout} 2026-10-14T10:00:00Z: 🟡 slow", out)
self.assertTrue(out.endswith("finds: none below the project's rung\n"), out)
# Claude matches each replay's findings in the round's checkout, and the report names the model replayed.
self.assertEqual(set(self.matched_in), {str(self.checkout)})
self.assertTrue(out.startswith("Replayed 1 stability rounds of claude-opus-5-5 projects,"), out)
+1 -1
View File
@@ -886,7 +886,7 @@ class TodoRankCheck(unittest.TestCase):
def test_its_own_rank_todo_passing_passes(self):
self.assertEqual(self.details(self.changed_plan(f"{self.folder}/clone", "")), [])
def test_its_own_rank_todo_failing_silently_is_named(self):
def test_its_own_rank_todo_failing_silently_names_the_script_and_exit(self):
checkout = self.changed_plan(f"{self.folder}/clone", "import sys\nsys.exit(3)\n")
self.assertEqual(self.details(checkout), [f"{checkout}/bin/rank_todo.py --check failed with exit 3 and printed nothing"])
+1 -1
View File
@@ -11,7 +11,7 @@ from release_plan import ranking
# The checkout this hook runs from: bin/rule_hook/ sits two folders below it.
OWN = pathlib.Path(__file__).resolve().parents[2]
# rank_todo.py --check takes about a tenth of a second; the hook must answer well within Claude Code's minute.
# settings.json gives rule-hook 30 seconds; rank_todo.py --check takes about a tenth of one.
OWN_CHECK_SECONDS = 20
+6 -5
View File
@@ -8,11 +8,12 @@ reads origin as last fetched and says so on stderr.
Git history is the record. The default branch's first-parent line is cut into chunks by one rule: a
merge commit is a chunk of its own, and any other commit joins the run of the newer commit above it when
both share a commit time, else starts a chunk. A chunk whose change removed items from todo.md, and changed more
than todo.md and the records below, shipped those items, less any a commit title of the chunk drops by
opening `Drop item 69: <why>` or `Drop items 69, 70 and 71: <why>`. Each item's guess is the scores it held in
the todo.md the chunk started from: L, E, I, R and S. An item scored before L, E and I replaced C
holds R and S, and C too where its table also had A, G and Goals. The chunk measures:
both share a commit time, else starts a chunk. A chunk whose change removed items from todo.md, and
changed more than todo.md and the records below, shipped those items. A commit title in the chunk that
opens `Drop item 69: <why>` or `Drop items 69, 70 and 71: <why>` takes those items out, since the chunk
did not build them. Each item's guess is the scores it held in the todo.md the chunk started from: L, E,
I, R and S. An item scored before L, E and I replaced C holds R and S, and C too where its table also
had A, G and Goals. The chunk measures:
- lines changed: lines added plus lines deleted against the first parent, leaving out todo.md and
the records tools append to, docs/comprehension-history.md and docs/reading-cost.md;
+1 -1
View File
@@ -28,4 +28,4 @@ paths:
- **An item scoring under the bar is deleted, with every item that needs it, and a finding under the bar is not filed.** The chunk's summary names each, with its score.
- **The Exempt cell keeps an item whatever its score:** `security` for a security finding, `defect` for a 🔴 finding or an item that restores a maintain goal the project breaks today, `question` for a question only the human can answer, which ranks first in its release, `decision` for an item `docs/decisions.md` cites, `owner` for an item the human told you to keep, and, where no other reason fits, `principle` for a 🟡 finding against a file under `~/.claude/principles/`, whose item's detail names that principle. Every item `docs/decisions.md` cites carries one of these reasons.
- **A maintain goal vetoes an item that breaks it,** whatever the item scores: redesign the item so it holds the goal, or drop it.
- **Remove an item that no chunk built in a commit titled `Drop item <ID>: <why>`,** or `Drop items 12, 14 and 15: <why>`. Otherwise `score-outcomes` counts it as shipped by the chunk that removed it, measured by that chunk's work. A deleted, vetoed, superseded or moot item is such an item; a finished one is not.
- **When you remove an item that no chunk built, title the commit `Drop item <ID>: <why>`,** or `Drop items 12, 14 and 15: <why>` for several. Such an item was deleted under the bar, vetoed, superseded or moot; a finished item is not one. Without the title, `score-outcomes` credits the item with the work of the chunk that removed it, where that chunk changed more than `todo.md`.