Compare commits

...

23 Commits

Author SHA1 Message Date
lilleman 1fa03973a3 Plan item 302: call a scoring run only for an item that targets the comprehension floor
CI / tests (pull_request) Successful in 2m2s
2026-11-11 13:59:40 +01:00
lilleman 329f0fd3a0 Record the comprehension check: PR #475 at 52da15e means 6.38 overall, run late for item 301; refresh floor item 300
CI / tests (pull_request) Successful in 2m3s
2026-11-11 13:56:30 +01:00
lilleman 52da15ea2b Answer prose round 1: 0 🔴, 3 🟡 (0 misread); reword the paragraph, keep the floor entry's body, say no ruling blocks either
CI / tests (pull_request) Successful in 2m3s
2026-11-11 13:46:27 +01:00
lilleman 09caf3576f Answer stability round 1: 0 🔴, 1 🟡 (0 misread); move the 2026-11-11 paragraph to the end of the entry 2026-11-11 13:46:27 +01:00
lilleman 7fb019914e Reword the blocks-no-merge decision titles to say no score blocks a merge
CI / tests (pull_request) Successful in 2m3s
2026-11-11 13:43:15 +01:00
lilleman 5c08bc34d6 Plan item 301: reword the blocks-no-merge decision titles, a question for the human
CI / tests (pull_request) Successful in 2m10s
2026-11-11 00:26:17 +01:00
lilleman 0fdaf926c5 Finish item 296
CI / tests (pull_request) Successful in 2m50s
2026-11-11 00:22:33 +01:00
lilleman 87273e94a4 Record the comprehension check: PR #473 at 13d1550 means 6.00 overall; file floor item 300
CI / tests (pull_request) Successful in 2m22s
2026-11-11 00:12:57 +01:00
lilleman 13d1550299 Name plan_reasons' first argument ref, since it can be a commit, and pin the emptied-release words in SKILL.md
CI / tests (pull_request) Successful in 2m7s
2026-11-11 00:11:20 +01:00
lilleman 58402083cb Name the second run's title only where two runs are owed
CI / tests (pull_request) Successful in 2m13s
2026-11-11 00:06:23 +01:00
lilleman 567ff471ec Answer stability round 2: 0 🔴, 3 🟡 (0 misread); say the gate reads the checkout's todo.md, and test main's runs, and an unreadable plan
CI / tests (pull_request) Successful in 2m20s
2026-11-11 00:05:20 +01:00
lilleman 538fbc52b9 Answer prose round 1: 0 🔴, 7 🟡 (0 misread); reword the help, SKILL.md and docstrings
CI / tests (pull_request) Successful in 2m20s
2026-11-10 23:59:10 +01:00
lilleman ac98e0e4a7 Answer product-owner round 1: 0 🔴, 4 🟡 (0 misread); the merge-base fix answers the behind-main and no-table findings, the opt-out check moves into plan_reasons, and the title and AGENTS.md lines that say the check blocks no merge stay: the decision's body bars only a score from blocking 2026-11-10 23:59:10 +01:00
lilleman e69eb982bc Answer stability round 1: 1 🔴, 6 🟡 (0 misread); read the owed runs against the merge base and committed history, skip a project with no plan table, cover the surviving mutants 2026-11-10 23:59:10 +01:00
lilleman 1c6e04c8b8 Answer security round 1: 0 🔴, 0 🟡 (0 misread); no finding 2026-11-10 23:45:35 +01:00
lilleman 92867f64cd Refuse chunk-pr merge while a scoring run the plan calls is unrecorded, and call one for a release cut with none
CI / tests (pull_request) Successful in 2m15s
2026-11-10 23:45:06 +01:00
lilleman 0301ca01c4 Move items 284 and 270 to 0.8.0
CI / tests (pull_request) Successful in 2m34s
2026-11-10 23:33:07 +01:00
lilleman 3ee136ae44 Drop item 269: answered, a verdict costs about $0.76 at every rung, and item 298 cuts the judge's cost
CI / tests (pull_request) Successful in 2m21s
2026-11-10 23:26:16 +01:00
lilleman 5b230fd013 Plan items 293 to 299 for 0.8.0: mutation tests before review, commit-time file rules, judge facts in code, a smaller judge prompt, waiting in chunk-pr, the owed scoring run and judge-verdict replays; raise 264, 268 and 270 2026-11-10 23:26:10 +01:00
lilleman d2ad46c9cb Cite the Working loop heading before its bold lead in item 292
CI / tests (pull_request) Successful in 2m22s
2026-11-10 23:08:43 +01:00
lilleman 03ee7a4a75 Answer prose round 1: 0 🔴, 0 🟡 (0 misread); no finding
CI / tests (pull_request) Failing after 2m15s
2026-11-10 23:04:04 +01:00
lilleman 79d764e682 Shift 0.8.0 to 0.9.0 and 0.9.0 to 0.10.0, plan the Fable 5.2 ladder for 0.8.0, and refresh ten stale details
CI / tests (pull_request) Failing after 2m34s
2026-11-10 23:03:05 +01:00
lilleman 6440824f27 Drop item 52: obsolete 2026-11-10 23:03:05 +01:00
14 changed files with 561 additions and 101 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ Decisions live in `docs/decisions.md`:
- bin/: the tools run on the host's Python, with no container, and so do their tests outside CI
- bin/: the tools support only the latest stable Python, and the tests, written in plain unittest, run on it in four pytest-xdist workers
- 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
- comprehension floor: every dimension and the overall at 7.0 or above is the target, and blocks no merge or release
- comprehension floor: every dimension and the overall at 7.0 or above is the target, and no score blocks a merge or release
- deploy: `deploy-release --cut` cuts a release through a pull request merged fast-forward only, then tags the merged commit and moves `~/.claude` to it; the human runs it
- deploy: `~/.claude` holds only a release, which `deploy-release` moves it to; this repo is developed in `~/code/claude-config`, where loop-claude runs its chunks like any project's
- larv-review: within a chunk lifting a project towards the comprehension floor, work on the project's lowest-scoring dimension comes first, and the floor doesn't block anything
@@ -40,7 +40,7 @@ Decisions live in `docs/decisions.md`:
- review: each reviewer under `agents/` writes its full report into the chunk's review folder under `~/.local/state/larv-review/` and returns the worker its verdict and one line per finding; rule-hook refuses its Edit and MultiEdit, and any Write outside `~/.local/state/larv-review/`
- review: stability and product-owner report only a defect, a broken requirement of the plan or the goals, a breach of a technical principle, or for stability a hard place the change touches; each architect finding names a later change the PR makes harder; prose runs only on a chunk that changes prose
- review: the architecture and principles passes run only in the release review, a release's last chunk, which must land before the release is ready to cut; between releases the product-owner pass reviews changes to what consumers rely on
- review: the comprehension check records how hard a project is to read and blocks no merge: a paired ruling against the last measured commit in the release review, and the four-seat scoring run, once when an item names the floor and twice on one head when a release's items run out
- review: the comprehension check records how hard a project is to read, and no score blocks a merge: a paired ruling against the last measured commit in the release review, and the four-seat scoring run, once when an item names the floor and twice on one head when a release's items run out
- review: the premises chunk's whole review is the human's approval
- review: the principles audit runs only in the release review, and reads the project whole with one auditor checking the goals and every principles file that applies
- review: the stability pass mutation-tests the lines a chunk changes, in place of measuring test coverage
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## Unreleased
- `chunk-pr merge` now refuses while a scoring run the plan calls is unrecorded on the branch, and `larv-review needs-scoring-run` calls one after a release is cut with none.
## 0.7.0
- README's test, CI and mutation-test commands now have their own section, README → Test.
+8 -1
View File
@@ -18,7 +18,9 @@ merge merges the pull request, and only while its head is still the commit ch
push after the gate is never merged. It takes the first method the repository allows of:
a merge commit, fast-forward only, a rebase followed by a merge commit, a rebase, a squash.
GitHub offers only the merge commit, the rebase and the squash. --gate-passed says the
merge gate passed on that commit; without it, chunk-pr refuses.
merge gate passed on that commit; without it, chunk-pr refuses. It also refuses where
`larv-review scoring-run-owed` exits 1, because the chunk owes a scoring run it has not
recorded; no flag waives that.
clean acts once the forge reports the branch's pull request merged at the commit checked out,
by any merge method. It fetches origin, fast-forwards the main checkout to origin's
default branch, removes the chunk's worktree, then deletes the local branch; origin's
@@ -32,6 +34,7 @@ It prints what it did, exit 0, or why it failed, exit 1.
import dataclasses
import json
import os
import pathlib
import sys
import typing
@@ -40,6 +43,7 @@ from chunk_preflight.gathered import Forge
from chunk_preflight.choices import forge_of
from deploy_release.forge import gitea, merged_pull, open_pull, Run, runner
BIN = pathlib.Path(__file__).resolve().parents[1]
USAGE = "usage: chunk-pr open <title> [<body>] | chunk-pr ready | chunk-pr merge --gate-passed | chunk-pr clean"
# Each forge's merge methods in the order merge prefers them, as the repository setting that allows the method and the method's name in the forge's merge call. A merge commit and a fast-forward keep the branch's commits as they are; a rebase or a squash rewrites them.
@@ -157,6 +161,9 @@ def merged(run: Run) -> str | Failure:
if isinstance(found, Failure):
return found
forge, number, head = found
owed = run([str(BIN / "larv-review"), "scoring-run-owed"])
if isinstance(owed, Failure):
return owed
method = merge_method(forge, run)
if isinstance(method, Failure):
return method
+10 -1
View File
@@ -21,6 +21,7 @@ GH_LIST = ["gh", "pr", "list", "--head", "item-7", "--json", "number,headRefOid,
TEA_LIST = ["tea", "api", "repos/{owner}/{repo}/pulls?state=open&limit=50"]
GH_SETTINGS = ["gh", "repo", "view", "--json", "mergeCommitAllowed,rebaseMergeAllowed,squashMergeAllowed"]
TEA_SETTINGS = ["tea", "api", "repos/{owner}/{repo}"]
OWED = [str(pathlib.Path(__file__).resolve().parents[1] / "larv-review"), "scoring-run-owed"]
class Checkout:
@@ -58,7 +59,7 @@ class Checkout:
def acted(self) -> list[list[str]]:
"""What it ran beyond reading the checkout, the pull requests and the repository's settings."""
reads = [GH_LIST, TEA_LIST, GH_SETTINGS, TEA_SETTINGS]
reads = [GH_LIST, TEA_LIST, GH_SETTINGS, TEA_SETTINGS, OWED]
return [command for command in self.ran if tuple(command) not in self.answers and command not in reads]
@@ -137,6 +138,14 @@ class Merge(unittest.TestCase):
self.assertIsInstance(step(["merge"], checkout), Failure)
self.assertEqual(checkout.ran, [])
def test_a_scoring_run_the_chunk_owes_and_has_not_recorded_refuses_the_merge(self):
for origin in (GITHUB, GITEA):
with self.subTest(origin=origin):
checkout = Checkout(origin, open=True)
checkout.answers[tuple(OWED)] = Failure("larv-review scoring-run-owed: the chunk owes 2 scoring runs")
self.assertEqual(step(["merge", "--gate-passed"], checkout), Failure("larv-review scoring-run-owed: the chunk owes 2 scoring runs"))
self.assertEqual(checkout.acted(), [])
def test_github_merges_with_a_merge_commit_pinned_to_the_head(self):
checkout = Checkout(GITHUB, open=True, allowed=("squashMergeAllowed", "mergeCommitAllowed"))
self.assertEqual(step(["merge", "--gate-passed"], checkout), "Merged pull request #12 (merge).")
+27 -5
View File
@@ -1,8 +1,8 @@
"""Hold larv-review's mechanical rules: the chunk's review folder, the paired ruling's base and vote count, each pass's rounds, the scoring run's trigger; the comprehension history's format, its latest places and its count of how often seats agree; and the header of each reviewer's prompt.
usage: larv-review review-folder | ruling-base | round-count | needs-scoring-run [<item ID>...] | record-ruling <votes file> | record-scoring <scores file> [<item ID>...] | places | agreement | reviewer-header <pass> [--rerun]
usage: larv-review review-folder | ruling-base | round-count | needs-scoring-run [<item ID>...] | scoring-run-owed | record-ruling <votes file> | record-scoring <scores file> [<item ID>...] | places | agreement | reviewer-header <pass> [--rerun]
The comprehension check records how hard a project is to read, two ways, and blocks no merge. In a
The comprehension check records how hard a project is to read, two ways, and no score blocks a merge. In a
paired ruling, simulated readers, the seats, read the branch's head beside a base and vote better,
same or worse, overall and on each dimension. In a scoring run, four seats score the project from 1
to 10. Each seat names the places it found hard.
@@ -11,7 +11,7 @@ Run it inside a project checkout or one of its worktrees. Each command but revie
record-ruling, places and agreement first fetches origin, when the checkout has that remote, and
takes origin's default branch, or else the local main or master, as the default branch. When the
fetch fails, round-count and reviewer-header read origin as last fetched and say so on stderr; the
other three exit 1.
other four exit 1.
The history is docs/comprehension-history.md in the checkout.
review-folder makes the chunk's review folder, where each reviewer writes its report, and prints its
@@ -36,6 +36,18 @@ an item whose tagline names the comprehension floor. It is also due when the chu
with no item in the checkout's todo.md, once the shipped items are set aside, and work has landed
towards that release; bin/larv_review/plan.py's `work_landed` and `landed_towards` say when. A release the checkout's
todo.md marks renamed in its ## Renamed section, as `- 0.2.1 renamed to 0.3.0`, is due none.
A chunk is also due one while no scoring run in the default branch's history is newer than the
commit of its second-newest v* tag, so a release cut unmeasured is caught up by the next chunk. A project whose
docs/decisions.md opts out of the comprehension check is never due one.
scoring-run-owed prints `No scoring run owed.` or exits 1 naming the runs the chunk owes and has
not recorded. chunk-pr merge runs it and refuses to merge on exit 1, so a due line read earlier in
the chunk can't stand in for it. It applies needs-scoring-run's rule to the checkout's todo.md and the committed history, against the
merge base with the default branch, so a default branch that has moved on adds nothing: the items
the merge base's todo.md holds and the checkout's does not count as shipped. A chunk that empties a
release owes two runs, any other due chunk one. The chunk has recorded the scoring runs that its
committed docs/comprehension-history.md holds beyond the merge base's. A project that opts out or
has no todo.md items table owes none.
A second scoring run of one head names itself `<PR or branch> rerun at <commit>`, so record-scoring
does not refuse it as a repeat of the first.
@@ -110,7 +122,7 @@ missing.
Exit 1, saying why, on unknown arguments, an unknown item ID, a seats file it cannot read or that
breaks the shape above, a todo.md that fails rank_todo.py after record-scoring records a run, or
when git cannot start, finds no checkout or no default branch, cannot fetch origin for ruling-base,
needs-scoring-run or record-scoring, or cannot read or write the history, todo.md or the review
needs-scoring-run, scoring-run-owed or record-scoring, or cannot read or write the history, todo.md or the review
folder.
"""
import pathlib
@@ -126,12 +138,13 @@ from larv_review.history_changes import history_changes
from review_rules.review_folder import made_review_folder
from larv_review.ruling_base import measured_commit
from larv_review.agreement import MIN_PAIRS
from larv_review.owed import owed_scoring_run
from review_rules.review_passes import PASSES, REVIEWERS
from larv_review.plan import plan_reasons
from larv_review.history_commands import record_ruling, record_scoring, show_agreement, show_places
from larv_review.reviewer_header import reviewer_header
USAGE = "usage: larv-review review-folder | ruling-base | round-count | needs-scoring-run [<item ID>...] | record-ruling <votes file> | record-scoring <scores file> [<item ID>...] | places | agreement | reviewer-header <pass> [--rerun]"
USAGE = "usage: larv-review review-folder | ruling-base | round-count | needs-scoring-run [<item ID>...] | scoring-run-owed | record-ruling <votes file> | record-scoring <scores file> [<item ID>...] | places | agreement | reviewer-header <pass> [--rerun]"
def main(argv: list[str]) -> int:
@@ -147,6 +160,8 @@ def main(argv: list[str]) -> int:
done = with_default_branch(round_count, stale_ok=True)
elif command == "needs-scoring-run" and all(re.fullmatch(r"[0-9]+", id_) for id_ in given):
done = with_default_branch(lambda default: needs_scoring_run(default, [int(id_) for id_ in given]), stale_ok=False)
elif command == "scoring-run-owed" and not given:
done = with_default_branch(owed, stale_ok=False)
elif command == "record-ruling" and len(given) == 1:
done = record_ruling(pathlib.Path(given[0]))
elif command == "record-scoring" and given and all(re.fullmatch(r"[0-9]+", id_) for id_ in given[1:]):
@@ -223,6 +238,13 @@ def cap_note(count: int, most: int) -> str:
return f", {'at' if count == most else 'past'} the cap: no more rounds"
def owed(default: str) -> Failure | None:
unrecorded = owed_scoring_run(default)
if unrecorded is None:
print("No scoring run owed.")
return unrecorded
def needs_scoring_run(default: str, ids: list[int]) -> Failure | None:
reasons = plan_reasons(default, ids)
if isinstance(reasons, Failure):
+56
View File
@@ -0,0 +1,56 @@
import pathlib
from larv_review.plan import EMPTIED_WORDS, plan_reasons
from review_rules.comprehension_history import entries, HISTORY
from failure import Failure
from git_cli.git_repo import file_at, git, top
from release_plan.todo_table import items, NoItemsTable
def owed_scoring_run(default: str) -> Failure | None:
"""A Failure saying which scoring runs the chunk owes and has not recorded; None where it owes none.
The chunk owes the runs `plan_reasons` calls, two where it empties a release, else one. It has recorded the scoring runs its committed history holds beyond those at the merge base, so a default branch that has moved on since the branch began counts for nothing. A project with no plan owes none. A missing run blocks the merge and a low score never does, which keeps the decision `review: the comprehension check records …`: it bars only scores from blocking.
"""
checkout = top()
if isinstance(checkout, Failure):
return checkout
if not has_plan(checkout):
return None
base = git("merge-base", default, "HEAD", cwd=checkout)
if isinstance(base, Failure):
return base
reasons = plan_reasons(base.strip(), None)
if isinstance(reasons, Failure):
return reasons
if not reasons:
return None
before = file_at(base.strip(), HISTORY, checkout)
if isinstance(before, Failure):
return before
after = file_at("HEAD", HISTORY, checkout)
if isinstance(after, Failure):
return after
return shortfall(reasons, len(scoring_runs(after)) - len(scoring_runs(before)))
def shortfall(reasons: list[str], recorded: int) -> Failure | None:
"""Which scoring runs the plan's reasons call that recorded, the count the branch added to the history, leaves unrecorded; None where it holds them all."""
needed = 2 if any(reason.endswith(EMPTIED_WORDS) for reason in reasons) else 1
if recorded >= needed:
return None
return Failure(f"the chunk owes {needed} scoring run{'s' if needed > 1 else ''} and the branch's committed history records {max(recorded, 0)}: it {' and '.join(reasons)}. larv-review's SKILL.md → 'Scoring run' says how to run and record {'them' if needed > 1 else 'it'}{"; → 'Second run' says how the second is titled" if needed > 1 else ""}")
def has_plan(checkout: str) -> bool:
"""Whether the checkout has a todo.md holding an items table. A file that can't be read counts, so `plan_reasons` reports it."""
try:
return not isinstance(items(pathlib.Path(checkout, "todo.md").read_text(encoding="utf-8")), NoItemsTable)
except FileNotFoundError:
return False
except (OSError, UnicodeDecodeError):
return True
def scoring_runs(history: str) -> list[str]:
return [entry.heading for entry in entries(history) if not entry.paired]
+28 -10
View File
@@ -2,28 +2,36 @@ import pathlib
from release_plan.release_standing import Cut, default_plan, LastCut, next_release, Unknown
from failure import Failure
from git_cli.git_repo import file_at, top
from larv_review.scoring import FLOOR_ITEM
from release_plan.todo_table import Item, items, NoItemsTable, renames
from release_plan.ranking import OPTED_OUT
from release_plan.release import Release, version
from git_cli.git_repo import top
from larv_review.unmeasured import unmeasured_cut
def scoring_run_due(before: list[Item], after: list[Item], ships: list[int], landed_release: Release | None, renamed: set[Release]) -> list[str] | Failure:
# The words that end the reason a chunk empties a release. Such a chunk is due two scoring runs; a chunk with any other reason, one.
EMPTIED_WORDS = "with no plan item"
def scoring_run_due(before: list[Item], after: list[Item], ships: list[int], landed_release: Release | None, renamed: set[Release], unmeasured: str | None = None) -> list[str] | Failure:
"""Why the plan calls a scoring run, empty when it does not.
A chunk that ships an item naming the floor is due one, so it can prove the floor met. So is a chunk that empties a release after work has landed towards it, so no release ends unmeasured. A release the chunk's plan marks renamed is due none.
A chunk that ships an item naming the floor is due one, so it can prove the floor met. So is a chunk that empties a release after work has landed towards it, so no release ends unmeasured. A release the chunk's plan marks renamed is due none. A chunk after a release `unmeasured_cut` names is due one too, so a release cut with no scoring run is caught up.
before is the default branch's plan and after the chunk's. ships holds the IDs of the items the chunk ships. landed_release is the next release where work has landed towards it, else None (`landed_towards`). renamed holds the releases the chunk's plan marks renamed.
before is the default branch's plan and after the chunk's. ships holds the IDs of the items the chunk ships. landed_release is the next release where work has landed towards it, else None (`landed_towards`). renamed holds the releases the chunk's plan marks renamed. unmeasured is `unmeasured_cut`'s answer.
"""
plan = {item.id: item for item in before + after}
if unknown := sorted(set(ships) - set(plan)):
return Failure(f"neither plan holds item {', '.join(map(str, unknown))}")
shipped = [plan[id_] for id_ in ships]
reasons = [f"ships item {item.id}, which names the comprehension floor" for item in shipped if FLOOR_ITEM in item.tagline.lower()]
if unmeasured:
reasons.append(f"follows {unmeasured}")
for release in emptied(before, after, shipped, renamed):
if work_landed(release, shipped, landed_release):
# SKILL.md → "Second run" keys on this wording.
reasons.append(f"leaves release {version(release)} with no plan item")
reasons.append(f"leaves release {version(release)} {EMPTIED_WORDS}")
return reasons
@@ -55,12 +63,17 @@ def emptied(before: list[Item], after: list[Item], shipped: list[Item], renamed:
return sorted(named - {item.release for item in kept} - renamed)
def plan_reasons(default: str, ids: list[int]) -> list[str] | Failure:
"""Why the plan calls a scoring run, from the default branch's todo.md and the checkout's."""
def plan_reasons(ref: str, ids: list[int] | None) -> list[str] | Failure:
"""Why the plan calls a scoring run, from todo.md at ref and the checkout's; empty where the project opts out of the comprehension check. ref is the default branch, or the commit where the chunk began. Where ids is None, the chunk ships each item the plan at ref holds and the checkout's does not."""
checkout = top()
if isinstance(checkout, Failure):
return checkout
held = default_plan(checkout, default)
decisions = file_at(ref, "docs/decisions.md", checkout)
if isinstance(decisions, Failure):
return decisions
if OPTED_OUT.search(decisions):
return []
held = default_plan(checkout, ref)
before = held.todo
if isinstance(before, Failure):
return before
@@ -73,14 +86,19 @@ def plan_reasons(default: str, ids: list[int]) -> list[str] | Failure:
if isinstance(planned, NoItemsTable):
planned = []
if isinstance(planned, Failure):
return Failure(f"{default}'s todo.md: {planned.reason}")
return Failure(f"{ref}'s todo.md: {planned.reason}")
renamed = renames(after)
if isinstance(renamed, Failure):
return Failure(f"the checkout's todo.md: {renamed.reason}")
landed_release = landed_towards(planned, held.cut)
if isinstance(landed_release, Failure):
return landed_release
return scoring_run_due(planned, chunk, ids, landed_release, renamed)
unmeasured = unmeasured_cut(ref, checkout)
if isinstance(unmeasured, Failure):
return unmeasured
if ids is None:
ids = sorted({item.id for item in planned} - {item.id for item in chunk})
return scoring_run_due(planned, chunk, ids, landed_release, renamed, unmeasured)
def checkout_plan(checkout: str) -> tuple[str, list[Item]] | Failure:
+138 -1
View File
@@ -12,7 +12,7 @@ sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
from larv_review.agreement import agreement_report, ruling_agreement, run_agreement
from review_rules.comprehension_history import appended, entries, HistoryChange, latest_places, Place, recorded, ruling_entry, scoring_entry, ScoringRun, Seat
from larv_review.plan import checkout_plan, landed_towards, plan_reasons, scoring_run_due
from larv_review.plan import checkout_plan, EMPTIED_WORDS, landed_towards, plan_reasons, scoring_run_due
from review_rules import comprehension_history
from larv_review.ruling import counted, ruling, split, surplus, votes
from larv_review.history_commands import decided
@@ -23,6 +23,7 @@ from release_plan.todo_table import Item, items, NoItemsTable
from release_plan.release_standing import LastCut
from larv_review.ruling_base import measured_commit
from larv_review.seats import score_line, scores, seats_file, SeatsFile
from larv_review.owed import shortfall
TOOL = pathlib.Path(__file__).resolve().parents[1] / "larv-review"
SCORING = "## 2026-10-08T12:00:00Z, PR #1 at aaaaaaa\n\n| Seat | Overall |\n|---|---|\n| Mean | 7.00 |\n"
@@ -425,6 +426,20 @@ class LandedTowards(unittest.TestCase):
self.assertEqual(landed_towards(plan, LastCut(Failure("fatal: bad object"), "", 3, [])), Failure("could not tell the next release: the default branch's tags cannot be read: fatal: bad object"))
class Shortfall(unittest.TestCase):
def test_skill_md_names_the_words_that_end_the_reason_a_release_empties(self):
self.assertIn(EMPTIED_WORDS, (pathlib.Path(__file__).resolve().parents[2] / "skills" / "larv-review" / "SKILL.md").read_text(encoding="utf-8"))
def test_a_chunk_that_empties_a_release_owes_two_runs_and_any_other_reason_one(self):
emptied = ["leaves release 0.1.0 with no plan item"]
floor = ["ships item 2, which names the comprehension floor"]
self.assertIn("owes 2 scoring runs and the branch's committed history records 1", shortfall(emptied + floor, 1).reason)
self.assertIn("owes 1 scoring run and", shortfall(floor, 0).reason)
self.assertIn("records 0:", shortfall(floor, -1).reason)
self.assertIsNone(shortfall(emptied, 2))
self.assertIsNone(shortfall(floor, 1))
class LarvReviewTool(unittest.TestCase):
def setUp(self):
temp = tempfile.TemporaryDirectory()
@@ -502,6 +517,128 @@ class LarvReviewTool(unittest.TestCase):
self.assertEqual(self.run_tool("needs-scoring-run").stdout, "No scoring run due.\n")
self.assertIn("todo.md's ID column", self.run_tool("needs-scoring-run", "item-85").stderr)
def test_a_scoring_run_that_a_release_ending_chunk_owes_is_refused_until_the_branch_records_two(self):
rest = ("| 2 | 0.2.0 | | **Then this.** | 1 | 1 | 3 | 1 | 1 | 1 | 9.0 |", "| 3 | 0.2.0 | | **And this.** | 1 | 1 | 3 | 1 | 1 | 1 | 9.0 |")
self.commit("Ship item 1", {"todo.md": todo(*rest)})
owed = self.run_tool("scoring-run-owed")
self.assertEqual(owed.returncode, 1)
self.assertIn("leaves release 0.1.0 with no plan item", owed.stderr)
self.assertIn("records 0:", owed.stderr)
history = "# Comprehension history\n\n" + SCORING
self.commit("Record a run", {"docs/comprehension-history.md": history})
self.assertIn("records 1:", self.run_tool("scoring-run-owed").stderr)
self.commit("Record a rerun", {"docs/comprehension-history.md": history + "\n" + SCORING.replace("PR #1 at", "PR #1 rerun at")})
done = self.run_tool("scoring-run-owed")
self.assertEqual((done.returncode, done.stdout), (0, "No scoring run owed.\n"), done.stderr)
def test_a_scoring_run_the_floor_calls_is_owed_once(self):
row = "| 1 | 0.1.0 | | **Do it.** | 1 | 1 | 3 | 1 | 1 | 1 | 9.0 |"
other = "| 3 | 0.2.0 | | **And this.** | 1 | 1 | 3 | 1 | 1 | 1 | 9.0 |"
self.commit("Plan the floor item", {"todo.md": todo(row, "| 2 | 0.2.0 | | **Reach the comprehension floor.** | 1 | 1 | 3 | 1 | 1 | 1 | 9.0 |", other)})
self.git("push", "-q", "origin", "HEAD:main")
self.commit("Ship it", {"todo.md": todo(row, other)})
self.assertIn("names the comprehension floor", self.run_tool("scoring-run-owed").stderr)
self.commit("Record a run", {"docs/comprehension-history.md": "# Comprehension history\n\n" + SCORING})
self.assertEqual(self.run_tool("scoring-run-owed").returncode, 0)
ROW = "| 3 | 0.2.0 | | **And this.** | 1 | 1 | 3 | 1 | 1 | 1 | 9.0 |"
def ship_item_1(self):
self.commit("Ship item 1", {"todo.md": todo(self.ROW)})
def test_no_scoring_run_is_owed_where_none_is_due(self):
self.commit("Ship item 2", {"todo.md": todo("| 1 | 0.1.0 | | **Do it.** | 1 | 1 | 3 | 1 | 1 | 1 | 9.0 |", self.ROW)})
self.assertEqual(self.run_tool("scoring-run-owed").stdout, "No scoring run owed.\n")
self.ship_item_1()
self.assertEqual(self.run_tool("scoring-run-owed").returncode, 1)
def test_a_run_counts_only_as_committed_and_a_ruling_is_no_run(self):
self.ship_item_1()
(self.checkout / "docs").mkdir()
(self.checkout / "docs" / "comprehension-history.md").write_text("# Comprehension history\n\n" + SCORING)
self.assertIn("records 0", self.run_tool("scoring-run-owed").stderr)
self.commit("Record a ruling", {"docs/comprehension-history.md": "# Comprehension history\n\n" + paired("2026-10-08T12:00:00Z", "better")})
self.assertIn("records 0", self.run_tool("scoring-run-owed").stderr)
def test_a_project_that_opts_out_owes_none_and_is_never_due_one_but_a_branch_cannot_opt_itself_out(self):
self.ship_item_1()
self.commit("Opt out on the branch", {"docs/decisions.md": "## review opt-out: the comprehension check\n\n2026-11-10, lilleman.\n"})
self.assertEqual(self.run_tool("scoring-run-owed").returncode, 1)
self.git("switch", "-q", "main")
self.commit("Opt out", {"docs/decisions.md": "## review opt-out: the comprehension check\n\n2026-11-10, lilleman.\n"})
self.git("push", "-q", "origin", "HEAD:main")
self.git("switch", "-q", "chunk")
self.git("merge", "-q", "main")
self.assertEqual(self.run_tool("scoring-run-owed").stdout, "No scoring run owed.\n")
self.assertEqual(self.run_tool("needs-scoring-run", "1").stdout, "No scoring run due.\n")
def test_a_project_with_no_plan_or_no_items_table_owes_none(self):
self.ship_item_1()
self.assertEqual(self.run_tool("scoring-run-owed").returncode, 1)
self.commit("Reshape the plan", {"todo.md": "# Plan\n"})
self.assertEqual(self.run_tool("scoring-run-owed").stdout, "No scoring run owed.\n")
self.git("rm", "-q", "todo.md")
self.commit("Drop the plan")
self.assertEqual(self.run_tool("scoring-run-owed").stdout, "No scoring run owed.\n")
(self.checkout / "todo.md").write_bytes(b"\xff\xfe")
self.git("add", "todo.md")
self.commit("Break the plan")
self.assertEqual(self.run_tool("scoring-run-owed").returncode, 1, "a plan that can't be read is no plan the gate may skip")
def test_a_default_branch_that_moved_on_since_the_branch_began_adds_no_owed_run(self):
self.git("switch", "-q", "main")
self.commit("Plan release 0.3.0", {"todo.md": todo("| 1 | 0.1.0 | | **Do it.** | 1 | 1 | 3 | 1 | 1 | 1 | 9.0 |", "| 2 | 0.2.0 | | **Then this.** | 1 | 1 | 3 | 1 | 1 | 1 | 9.0 |", self.ROW, "| 4 | 0.3.0 | | **Later.** | 1 | 1 | 3 | 1 | 1 | 1 | 9.0 |"), "docs/comprehension-history.md": "# Comprehension history\n\n" + SCORING})
self.git("push", "-q", "origin", "HEAD:main")
self.git("switch", "-q", "chunk")
self.commit("Do some work")
self.assertEqual(self.run_tool("needs-scoring-run").stdout, "No scoring run due.\n")
self.assertEqual(self.run_tool("scoring-run-owed").stdout, "No scoring run owed.\n")
self.ship_item_1()
self.commit("Ship item 1 and record a run", {"docs/comprehension-history.md": "# Comprehension history\n\n" + SCORING.replace("PR #1", "PR #7")})
self.assertIn("owes 2 scoring runs and the branch's committed history records 1:", self.run_tool("scoring-run-owed").stderr, "main's own run is no credit to the branch")
def release(self, tag, date, files=None):
"""Cut tag on the default branch at a commit dated date."""
self.env["GIT_COMMITTER_DATE"] = date
self.addCleanup(self.env.pop, "GIT_COMMITTER_DATE", None)
self.commit(f"Release {tag}", files)
self.git("tag", tag)
self.git("push", "-q", "origin", "HEAD:main")
def test_a_release_cut_with_no_scoring_run_since_the_one_before_it_calls_one_and_a_later_run_ends_that(self):
self.release("v0.0.1", "2026-10-09T12:00:00Z")
self.release("v0.0.2", "2026-10-20T12:00:00Z", {"docs/comprehension-history.md": "# Comprehension history\n\n" + SCORING})
self.assertEqual(self.run_tool("needs-scoring-run", "2").stdout, "Scoring run due: the chunk follows v0.0.2, cut with no scoring run since v0.0.1.\n")
self.assertEqual(self.run_tool("scoring-run-owed").returncode, 1)
self.commit("Record a run", {"docs/comprehension-history.md": "# Comprehension history\n\n" + SCORING + "\n" + SCORING.replace("PR #1 at", "PR #2 at")})
self.assertEqual(self.run_tool("scoring-run-owed").returncode, 0)
self.release("v0.0.3", "2026-10-21T12:00:00Z", {"docs/comprehension-history.md": "# Comprehension history\n\n" + SCORING.replace("2026-10-08T12", "2026-10-20T18")})
self.assertEqual(self.run_tool("needs-scoring-run", "2").stdout, "No scoring run due.\n")
def test_a_run_ends_an_unmeasured_release_only_when_it_is_a_scoring_run_newer_than_the_tag_with_a_time_that_reads(self):
self.release("v0.0.1", "2026-10-09T12:00:00Z")
history = "# Comprehension history\n\n"
due = "Scoring run due: the chunk follows v0.0.2, cut with no scoring run since v0.0.1.\n"
self.release("v0.0.2", "2026-10-20T12:00:00Z", {"docs/comprehension-history.md": history + paired("2026-10-21T12:00:00Z", "better") + "\n" + SCORING.replace("2026-10-08T12:00:00Z", "2026-10-09T12:00:00Z")})
self.assertEqual(self.run_tool("needs-scoring-run", "2").stdout, due, "a ruling, and a run at the earlier tag's own second, end nothing")
self.release("v0.0.3", "2026-10-21T12:00:00Z", {"docs/comprehension-history.md": history + SCORING.replace("2026-10-08T12:00:00Z", "2026-10-30")})
self.assertEqual(self.run_tool("needs-scoring-run", "2").stdout, due.replace("v0.0.2", "v0.0.3").replace("v0.0.1", "v0.0.2"), "a run whose time doesn't parse ends nothing")
def test_an_unmeasured_release_is_judged_by_the_default_branch_alone_and_names_a_release_over_its_candidate(self):
self.release("v0.0.1", "2026-10-09T12:00:00Z")
self.release("v0.0.2-rc.1", "2026-10-10T12:00:00Z")
self.release("v0.0.2", "2026-10-20T12:00:00Z")
self.git("switch", "-q", "-c", "side")
self.commit("Tag a side branch")
self.git("tag", "v0.9.0")
self.git("switch", "-q", "chunk")
self.commit("Record a run on the branch", {"docs/comprehension-history.md": "# Comprehension history\n\n" + SCORING.replace("2026-10-08T12", "2026-10-25T12")})
self.assertEqual(self.run_tool("needs-scoring-run", "2").stdout, "Scoring run due: the chunk follows v0.0.2, cut with no scoring run since v0.0.2-rc.1.\n")
def test_one_release_alone_calls_no_scoring_run_for_lacking_one(self):
self.release("v0.0.1", "2026-10-09T12:00:00Z")
self.assertEqual(self.run_tool("needs-scoring-run", "2").stdout, "No scoring run due.\n")
def test_calls_a_scoring_run_for_a_deferred_release_and_none_for_one_the_checkouts_plan_marks_renamed(self):
rows = ("| 1 | 0.2.0 | | **Do it.** | 1 | 1 | 3 | 1 | 1 | 1 | 9.0 |", "| 2 | 0.2.0 | | **Then this.** | 1 | 1 | 3 | 1 | 1 | 1 | 9.0 |", "| 3 | 0.2.0 | | **And this.** | 1 | 1 | 3 | 1 | 1 | 1 | 9.0 |")
self.commit("Move 0.1.0's item to 0.2.0", {"todo.md": todo(*rows)})
+36
View File
@@ -0,0 +1,36 @@
import datetime
from review_rules.comprehension_history import entries, HISTORY
from failure import Failure
from git_cli.git_repo import file_at, git
def unmeasured_cut(default: str, checkout: str) -> str | None | Failure:
"""Whether the default branch's newest release was cut unmeasured, as `v0.7.0, cut with no scoring run since v0.6.0`. It was where no scoring run in the default branch's history is newer than the second-newest v* tag. None where the branch holds fewer than two such tags, or a run since the earlier one.
The reason ends once a run follows the earlier tag, so it asks only after a release was cut with none; it lets the chunk that finds the gap record the run.
A scoring run counts by the time its history heading records, against the tag's commit time; a heading whose time doesn't parse counts for nothing, so the run is asked for again.
"""
# Sorts v1.0.0-rc.1 below v1.0.0, as release.newest_tag does.
tags = git("-c", "versionsort.suffix=-", "tag", "--list", "v*", "--merged", default, "--sort=-v:refname", cwd=checkout)
if isinstance(tags, Failure):
return tags
newest, earlier, *_ = [*tags.split(), None, None]
if earlier is None:
return None
since = git("log", "-1", "--format=%ct", earlier, cwd=checkout)
history = file_at(default, HISTORY, checkout)
if isinstance(since, Failure) or isinstance(history, Failure):
return since if isinstance(since, Failure) else history
if any(at > int(since) for at in (seconds(entry.time) for entry in entries(history) if not entry.paired)):
return None
return f"{newest}, cut with no scoring run since {earlier}"
def seconds(heading_time: str) -> float:
"""A history heading's UTC time as seconds since the epoch; 0 where it doesn't parse."""
try:
return datetime.datetime.strptime(heading_time, "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=datetime.timezone.utc).timestamp()
except ValueError:
return 0
+93
View File
@@ -3435,3 +3435,96 @@ Inherited architect, decided by:
- Locality, Shape: `bin/loop_claude/routing.py:84` `next_route`: each verdict kind has its own function, and `steps` and `below_cap` name the two conditions
- Locality: `bin/model_routing/route.py:88` `route_of`: the archive line and the reload hand-over decode a Route through one decoder
- Shape: `bin/loop_claude/loop/main.py:66` `next_cycle`: signatures of seven or eight positional parameters shrink to `(loop_run, loop)`
## 2026-11-10T23:11:34Z, PR #473 at 13d1550
| Seat | Navigation | Locality | Shape | Self-sufficiency | Overall |
|---|---|---|---|---|---|
| Junior A | 7 | 5.5 | 6 | 6 | 6 |
| Mid A | 7 | 5.5 | 6 | 6.5 | 6 |
| Maintainability senior | 7 | 5.5 | 6 | 6 | 6 |
| Inherited architect | 7 | 5.5 | 6 | 7 | 6 |
| Mean | 7.00 | 5.50 | 6.00 | 6.38 | 6.00 |
Junior A, hardest first:
- Locality, Shape: `bin/loop_claude/routing.py:93` `unfinished_route`: the floor rung, the escalation mark, the unfinished count and the cap are held at once, with escalation_mark.py open beside it
- Locality, Shape: `bin/larv_review/plan.py:66` `plan_reasons`: eight failure branches mix git reads, file reads and logic, and a parameter named `default` receives a merge-base commit
- Locality: `bin/larv_review/owed.py:37` `shortfall`: whether one or two runs are owed hangs on the wording of an English sentence that SKILL.md also keys on
- Shape: `bin/loop_claude/cycle/run.py:59` `run_cycle`: four near-identical archive helpers and a route replaced partway through the loop
- Shape: `bin/release_plan/ranking.py:56` `rank`: nearly every function forks on the table's two shapes
- Self-sufficiency: `skills/larv-review/SKILL.md:147` "Scoring run": dense rule prose with many cross-references, three sections to rebuild one rule
Mid A, hardest first:
- Locality, Shape: `bin/larv_review/plan.py:66` `plan_reasons`: `default` holds a merge-base commit on one call path and `after` means the checkout's text, then its items
- Locality: `bin/loop_claude/routing.py:93` `unfinished_route`: six concepts meet in about twelve lines and need four modules open beside it
- Locality: `bin/larv_review/owed.py:37` `shortfall`: a rule keyed on the text of a sentence that plan.py builds, and `scoring_runs` defines a scoring run differently from `Entry.scored`
- Locality: `bin/loop_claude/cycle/judge.py:211` `quotes_checked`: a verdict is rewritten four times, half the behaviour in prompt prose and half in code
- Shape: `bin/release_plan/ranking.py:304` `score`: every function branches on the old and the current table shape
Maintainability senior, hardest first:
- Locality, Shape: `bin/larv_review/plan.py:66` `plan_reasons`: a merge-base commit enters the parameter named for the default branch, and its error text would print the commit as a branch
- Locality: `bin/larv_review/owed.py:37` `shortfall`: the one-run-or-two rule is spread over three files and a skill document
- Locality, Shape: `bin/loop_claude/routing.py:93` `unfinished_route`: the six inputs interlock and a wrong answer runs the worker on the wrong rung without failing
- Locality: `bin/model_routing/route.py:88` `route_of`: a route has two serializations, a flat archive line and a nested handover
- Self-sufficiency: `bin/larv_review/plan.py:66` `plan_reasons`: its docstring doesn't say the first argument may be a commit
Inherited architect, would restructure first:
- Navigation, Shape: `bin/larv_review/owed.py:10` `owed_scoring_run`: the name gives the merge gate's question, not the module's subject, and the scoring-run logic sits in three files whose imports read as circular
- Locality: `bin/larv_review/plan.py:14` `EMPTIED_WORDS`: prose and code share an exact string that SKILL.md keys on
- Locality: `bin/loop_claude/routing.py:93` `unfinished_route`: routing logic spreads over about eight places, so a new trigger touches five files in three packages
- Shape: `bin/rule_hook/rules.py:25` `RULES`: rules sit inline in one module while five others have a module each
- Navigation: `bin/` README.md:116 "bin/": 56 entries in one flat list, the worst fan-out level
## 2026-11-11T12:55:06Z, PR #475 at 52da15e
| Seat | Navigation | Locality | Shape | Self-sufficiency | Overall |
|---|---|---|---|---|---|
| Junior A | 7 | 5.5 | 6 | 6 | 6 |
| Mid A | 7.5 | 6 | 6.5 | 6.5 | 6.5 |
| Maintainability senior | 7 | 6 | 6.5 | 6 | 6.5 |
| Inherited architect | 7 | 6.5 | 6 | 7 | 6.5 |
| Mean | 7.13 | 6.00 | 6.25 | 6.38 | 6.38 |
Junior A, hardest first:
- Locality, Shape: `bin/loop_claude/routing.py:93` `unfinished_route`: the floor, the escalation cap, the escalation mark, the unfinished count and the taken-in E + I are held at once
- Locality: `bin/loop_claude/cycle/judge.py:211` `quotes_checked`: the judge's contract is split over prose constants, schema descriptions and post-hoc checks that change a verdict's type
- Locality: `bin/loop_claude/cycle/run.py:146` `rule`: archive order carries meaning across `run_cycle` and `loop/close.py:18` `closed_cycle`
- Shape: `bin/release_plan/release_standing.py:145` `next_release`: tag, changelog, before-first-release and renamed branches meet in the `is_earliest` expression
- Shape: `bin/release_plan/ranking.py:56` `rank`: `OLD_SHAPE` and `SHAPE` forks run through nearly every function
- Self-sufficiency: `bin/loop_claude/cycle/prompts.py:59` `review_launches`: the worker's prompt is built from about ten conditional sentence builders
- Locality: `skills/larv-review/SKILL.md:76` "Round cap": the cap is enforced in four units in two places
Mid A, hardest first:
- Locality, Shape: `bin/loop_claude/routing.py:93` `unfinished_route`: five things applied in a fixed order across about six helpers; the reason for the floor and cap sits in the decision log
- Locality: `bin/loop_claude/cycle/run.py:146` `rule`: the order of ruling, rejection and step-up archive writes is stated piecemeal
- Shape: `bin/release_plan/ranking.py:315` `weight_of`: old-shape branches double the module, and the constants are magic until rules/todo-items.md is open
- Shape: `bin/release_plan/release_standing.py:145` `next_release`: a three-way boolean on line 167 with no comment for the `None` and `nothing_cut` case
- Locality: `bin/rule_hook/repeat_read.py:119` `shown_lines`: rebuilds which lines are in the agent's context from transcript entries
- Locality: `bin/loop_claude/cycle/judge.py:211` `quotes_checked`: half of the judge's rules are English constants edited in step with Python
- Locality: `bin/loop_claude/cycle/prompts.py:119` `escalation`: about 20 sentence builders restate the routing logic
Maintainability senior, hardest first:
- Shape, Locality: `bin/release_plan/release_standing.py:145` `next_release`: four fallbacks held at once, and `is_earliest` took three reads
- Locality: `bin/loop_claude/routing.py:93` `unfinished_route`: the escalation mark's meaning lives in `escalation_mark.py`, which has to stay open beside it
- Locality: `bin/loop_claude/cycle/judge.py:211` `quotes_checked`: a bad quote silently changes the verdict's type
- Shape: `bin/release_plan/ranking.py:304` `score`: every path forks on `SHAPE` versus `OLD_SHAPE`
- Locality: `bin/rule_hook/reviewer_rung.py:40` `skill_breaches`: three cases rest on assumptions made in another function
- Locality: `bin/loop_claude/cycle/run.py:146` `rule`: order-dependent archive writes that nothing enforces
- Shape: `bin/review_rules/comprehension_history.py:127` `entries`: a line-by-line parser that tolerates two legacy formats
- Self-sufficiency: `skills/larv-review/SKILL.md:76` "Round cap": dense cross-referencing rules, with the enforcing code in other modules
Inherited architect, would restructure first:
- Navigation, Shape: `README.md:116` `bin/`: 55 entries at one level, about 31 packages, the worst fan-out level
- Locality: `bin/larv_review/reviewer_header.py:49` `unanswered_round`: the round cap counts answer commits, so a worker that relaunches without committing gets the same round number, and the rule is split over SKILL.md and three modules
- Locality, Shape: `bin/loop_claude/routing.py:93` `unfinished_route`: seven counters and limits across five files, with field names frozen by the reload handover
- Locality: `bin/chunk_pr/main.py:42` `forge`: the forge helpers live in `chunk_preflight` and `deploy_release`, so a second forge needs edits in four packages
- Shape: `bin/records/__init__.py:1` `records`: one name for three concepts, as `cut` and `Plan` also name several
- Locality: `bin/loop_claude/cycle/run.py:86` `archived`: the archive helpers that `loop/close.py` imports sit in the cycle runner
+5 -3
View File
@@ -24,7 +24,7 @@ Valid while the archive's file names, the Vocabulary and the panel keep these wo
The cap is 5, `bin/release_plan/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.
## comprehension floor: every dimension and the overall at 7.0 or above is the target, and blocks no merge or release
## comprehension floor: every dimension and the overall at 7.0 or above is the target, and no score blocks a merge or release
2026-09-27, lilleman, restating the 2026-09-24 target and extending it to the overall. Serves goal 1. 2026-10-13, lilleman: the floor blocks nothing, and `review: the comprehension check records …` says why. Valid while the scoring run keeps its four seats.
@@ -103,7 +103,7 @@ The trials: four stability rounds and five principles rounds archived on 2026-10
- A cap on tool results. Claude Code caps a Bash result at about 30k characters already. A PostToolUse hook capping it at 12k, which `updatedToolOutput` allows, left the stability reviewers 3 of 6 findings, two lost in one round. Read results, 59.9M characters in subagents' threads with 58% of their characters in results over 12k, are out of such a hook's reach. Not worth an item.
- A scout: Haiku 5.5 reading raw content, whole files or long output, and returning facts as path:line and the ranges worth reading, so the agent's own context holds the summary and the chosen lines. In session, as an agent under `agents/`, its first request writes 37k tokens, $0.005, and a read of a 38KB file costs $0.008 in 8 seconds. As a slim headless `claude -p` with its own system prompt, no setting sources and no dynamic sections, which keeps the subscription login, it starts at 6k tokens and $0.0003 in 3 to 5 seconds, its prefix cached across calls, and the same read costs $0.004 in 7 seconds; a direct API call and `claude --bare` need an API key, so they are out. Stability reviewers with the agent scout found 5 of 6 findings and read 29% fewer characters at 6% less cost and 14% more time; with the CLI scout 4 of 6, 38% fewer, 17% less and 39% more; the auditors with the agent scout 3 of 6, the 🔴 among the lost, at the same cost and twice the time. Workers offered the scout never called it.
- What a reviewer reads: the auditors read the project whole by design. Of their 🔴 and 🟡 findings since the reset, 47% named a file the chunk edited and 51% another file, so reading only the change would drop half of them (`review: the principles audit runs only in the release review, and reads the project whole with one auditor checking the goals and every principles file that applies`).
- The base context: every thread starts with `~/.claude/CLAUDE.md` (19k characters), `~/.claude/AGENTS.md` (11k, this repo's decisions, which Claude Code loads as user instructions into every project's sessions; `todo.md` item 52), the project's `AGENTS.md`, and, for the worker and general-purpose subagents, the skill listing (18k) and the agent listing (12k). Subagents' first messages wrote $97 of it. Trimming the listings would save about $20, 2%, and is not worth an item: `disableBundledSkills` would also drop `/security-review`, the security pass of record.
- The base context: every thread starts with `~/.claude/CLAUDE.md` (19k characters), `~/.claude/AGENTS.md` (11k, this repo's decisions, which Claude Code loads as user instructions into every project's sessions), the project's `AGENTS.md`, and, for the worker and general-purpose subagents, the skill listing (18k) and the agent listing (12k). Subagents' first messages wrote $97 of it. Trimming the listings would save about $20, 2%, and is not worth an item: `disableBundledSkills` would also drop `/security-review`, the security pass of record.
Quality. Under the 200k window, every figure's mean per chunk fell. Measured on 2026-11-04, the first 20 chunks whose worker started under it, from 2026-10-28, took a mean 4.0 review rounds past each pass's first against 5.8 for the 20 before them, from 2026-10-23 to 2026-10-26; 0.20 unfinished verdicts against 0.30; 1.15 🔴 against 1.90; 11.9 🟡 against 19.4; 0.11 misread findings against 0.25; $22 against $34; and 9.6 hours against 42. Only the median dollars went up, $15.17 against $11.72: the 20 before held four chunks of $94 to $167, and the 20 after none above $76. This decision weighs all spend, so the mean is the figure that counts. The two groups also differ in projects and routing, so how much of the fall the window caused is unknown. Before the window, 19 chunks compacted between 2026-10-10 and 2026-10-22, at the compaction points Claude Code set then, 214k to 972k tokens. Per 100 worker messages they took a median 3.6 review rounds past each pass's first against 4.0 for the 68 uncompacted chunks of 100 messages or more, and 13.9 🔴 and 🟡 findings against 16.6. 4 of 19 had an unfinished verdict against 3 of 68, each 8 to 10 hours after the compaction and followed by a finished verdict within minutes; in those four verdicts the judge quoted the worker's own passages and the human's typed answers, never a summary. One cause was possible and is closed here: Claude Code writes the summary as a user entry, which `bin/claude_code/entries.py` read as the human's words, so the judge would see a `[human]` line of thousands of words and `/talk` would count it as typed; it now reads as Claude Code's. Two summaries read whole kept the chunk's intent, files, errors and next step in 12k to 20k characters, and the worker resumed without re-reading.
@@ -254,7 +254,7 @@ Valid while Claude Code passes `agent_type` to hooks inside a subagent. Without
2026-10-28, lilleman: prose findings stay, since Claude's prose needs them, though prose's 105 first rounds since 2026-10-21 raised 498 🟡 and only 3 🔴.
## review: the comprehension check records how hard a project is to read and blocks no merge: a paired ruling against the last measured commit in the release review, and the four-seat scoring run, once when an item names the floor and twice on one head when a release's items run out
## review: the comprehension check records how hard a project is to read, and no score blocks a merge: a paired ruling against the last measured commit in the release review, and the four-seat scoring run, once when an item names the floor and twice on one head when a release's items run out
2026-10-08, lilleman. Serves goals 1.1 and 1.4. Two independent four-seat runs moved up to 0.4 on near-identical code, so a fall within that noise forced rounds that changed nothing (PR #224). A seat reading both versions judges the difference on the same material, so the noise the versions share cancels. No conventional significance level lets a sign test settle with four votes, so the human chose a lead of two votes over every other ruling, same included. Two seats that agree settle it, so a PR that leaves the reading as it was costs two seats. A third seat alone can never settle it, so the third and fourth launch together. The scoring run also runs on a chunk shipping an item that names the floor, so the chunk that lifts a project to the floor can prove it. A chunk that removes a release's last item without shipping it runs the scoring run too, so no release ends unmeasured, unless `todo.md` marks that release renamed in a `## Renamed` section (`bin/release_plan/todo_table.py` → `renames`). Valid while seats reading both versions agree more often than two absolute runs do.
@@ -264,6 +264,8 @@ The base is the last measured commit: the default branch's newest merged change
2026-10-17, lilleman. Serves goal 1.1. Nothing checked the 2026-10-08 validity condition. The history's successive scoring runs of one PR read changed code, not near-identical code, so they cannot stand for two absolute runs. So each release's scoring run is done twice on the same head, the second recorded under `<PR> rerun at <commit>`, and `larv-review agreement` compares two rates: how often Mid A and the inherited architect vote alike overall in paired rulings, and how often their overall scores move alike between two scoring runs on one commit. It gives no verdict until the history holds 10 such pairs of runs, as `score-outcomes` waits for 10 chunks before it shows a median. The human chose the second run's cost, four more seats per release (goal 1.4), over a weaker check on the old pairs.
2026-11-11, lilleman. Serves goal 1.1. Item 296 made `chunk-pr merge` refuse while a scoring run the plan calls is unrecorded on the branch, so a missing run can block a merge. No score or ruling does, and the titles say so: "no score blocks a merge".
## review: the premises chunk's whole review is the human's approval
2026-09-20, lilleman. Serves goal 1.1. A reviewer's finding on that chunk could only be declined by citing the goals the chunk exists to write. Valid while every decline must name a goal or a technical principle.
+8
View File
@@ -1528,3 +1528,11 @@ Read most (opens and searches):
Read most (opens and searches):
- `todo.md` 5
## Reading cost, chunk 31a25a029608, finished 2026-11-10T22:36:58Z
40731 new input tokens before the first commit.
Read most (opens and searches):
- `todo.md` 1
+3 -3
View File
@@ -136,7 +136,7 @@ Launch one principles-auditor on the trigger in §3, so the project is read once
### Comprehension check
The comprehension check records how hard the project is for its contributor to read (`~/.claude/rules/goals-and-audience.md`), and blocks no merge. Simulated readers, the seats, launched per `~/.claude/skills/comprehension-panel/SKILL.md`, each read the whole project, not the diff. It reports no findings and is no pass: it runs once, in §5, after every pass is done, the auto-reviewer included, so it reads the branch as review left it. It runs a paired ruling in the release review, even where an opt-out skips its architect, and a scoring run where one is due. It skips only as "Opt-out" or "Suspended" below says.
The comprehension check records how hard the project is for its contributor to read (`~/.claude/rules/goals-and-audience.md`), and no score blocks a merge; only a run the plan calls and the branch lacks does, per "Scoring run". Simulated readers, the seats, launched per `~/.claude/skills/comprehension-panel/SKILL.md`, each read the whole project, not the diff. It reports no findings and is no pass: it runs once, in §5, after every pass is done, the auto-reviewer included, so it reads the branch as review left it. It runs a paired ruling in the release review, even where an opt-out skips its architect, and a scoring run where one is due. It skips only as "Opt-out" or "Suspended" below says.
**Paired ruling.** Each seat votes whether the project reads better, the same or worse at this branch's head than at the base.
@@ -144,7 +144,7 @@ The comprehension check records how hard the project is for its contributor to r
- **Head.** The head holds `origin/<default branch>`, merged in at §4 step 1, so it differs from the default branch only by this branch's change.
- **Seats.** Mid A and the inherited architect. Write what they read and their replies into a votes file in the chunk's review folder, in the shape `~/.claude/bin/larv-review --help` shows, and run `~/.claude/bin/larv-review record-ruling <votes file>`. On `Split:`, launch the maintainability senior and Junior A together, add their lines, and run it again.
**Scoring run**, when `~/.claude/bin/larv-review needs-scoring-run <the IDs of the items the chunk ships, if any>` prints `Scoring run due:`. Run `needs-scoring-run` before removing the chunk's items from `todo.md`.
**Scoring run**, when `~/.claude/bin/larv-review needs-scoring-run <the IDs of the items the chunk ships, if any>` prints `Scoring run due:`. Run `needs-scoring-run` before removing the chunk's items from `todo.md`. `chunk-pr merge` refuses until the branch's committed history records every run the plan calls, which `larv-review scoring-run-owed` counts at merge time from the merge base; an earlier due line is only a snapshot.
- **Seats.** Junior A, Mid A, the maintainability senior and the inherited architect each score the project at the head from 1 to 10 overall and on four dimensions: Navigation, Locality, Shape and Self-sufficiency. Write their lines into a scores file and run `~/.claude/bin/larv-review record-scoring <scores file> <the same item IDs>`, which appends the run to the history and prints the four seats' means.
- **Floor item.** Where `record-scoring` prints `Floor:`, a `Next:` line follows: file one floor item, or refresh the open one. A floor item is a plan item meant to bring every mean to 7.0. File it as one ambitious refactor, not touch-ups. It restructures the area behind the places `larv-review places` prints for this run, chosen where they bear on the lowest dimension, sized to bring every mean to 7.0, and quotes those places. Its tagline holds the words `comprehension floor`, so its own chunk runs a scoring run; while a mean stays under 7.0, that run's `Next:` line asks for the next floor item. Mark it `owner`, since the human asked that such a project always hold one, so no score deletes it. Put it in the earliest release the plan names after the one the chunk ships into, or else in the next version after that one that `~/.claude/rules/todo-items.md` allows, so the floor doesn't hold up any release. While one is open, refresh its places and aim from the newest run instead of filing another; the item the chunk ships doesn't count as open. Commit it with the run, as "Record" says.
@@ -194,7 +194,7 @@ Launch prose-reviewer with what the diff touched and every section this review c
1. Read the finished PR against the README goals and code health, unless the README voids it: does anything in it work against one? It breaks a maintain goal → do not merge; redesign the change or drop its item. It works against an achieve goal → do not merge; ask the human, stating the conflict.
2. Run the comprehension check (§3) where it runs; it runs once. When `origin/<default branch>` moves after that, return to §4, and keep the ruling and scoring run already recorded.
3. Remove the chunk's items from `todo.md` per `~/.claude/CLAUDE.md` → "Working loop" in the branch, commit and push that, and wait for the forge's checks (§4 step 4); the commit re-enters no pass.
4. Aligned, every pass done and everything green → **merge** with `~/.claude/bin/chunk-pr merge --gate-passed`, which takes the first merge method the repository allows on its forge. A repo whose `AGENTS.md` names another method merges that way with the forge's CLI instead. A repo withholds this in its `AGENTS.md` → leave the PR ready and unmerged, and say which line withheld it.
4. Aligned, every pass done and everything green → **merge** with `~/.claude/bin/chunk-pr merge --gate-passed`, which takes the first merge method the repository allows on its forge. A repo whose `AGENTS.md` names another method merges that way with the forge's CLI instead, after `~/.claude/bin/larv-review scoring-run-owed` exits 0. A repo withholds this in its `AGENTS.md` → leave the PR ready and unmerged, and say which line withheld it.
5. Merged → run `~/.claude/bin/chunk-pr clean` in the chunk's worktree, and put a failure it prints in the summary.
6. Stop. The next chunk gets a fresh session.
+143 -75
View File
@@ -6,66 +6,117 @@
`Bar = 0.1`
`Next ID = 292`
`Next ID = 303`
## Items
| ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 287 | 0.8.0 | | | **Move the forge helpers `Forge`, `forge_of`, `runner`, `open_pull`, `merged_pull`, `pull_at` and `gitea` into one module that `chunk_preflight`, `chunk_pr`, `deploy_release` and `larv_review` all import from, so no tool imports another tool's internals for them.** | 3 | 1 | 3 | 5 | 5 | code health by 3 | 3.4 |
| 294 | 0.8.0 | | | **Check the files a commit stages against rule-hook's file rules, so a file a Bash command wrote is held to them as an Edit or Write is.** | 2 | 2 | 3 | 5 | 4 | 1.3 by 5 | 5.2 |
| 297 | 0.8.0 | | | **Have loop-claude compute the judge's taken-in items, release-ready and escalation fields from `chunk-preflight`, git and the worker's structured lines, and leave the judge only the verdict kind.** | 3 | 2 | 3 | 6 | 4 | 1.4 by 2, code health by 2 | 3.7 |
| 302 | 0.8.0 | | | **Call a scoring run for an item whose tagline makes the comprehension floor its target, and not for one that only names the floor, such as in a quoted decision title.** | 2 | 2 | 3 | 5 | 3 | code health by 2 | 3.6 |
| 293 | 0.8.0 | | | **Run mutation tests on a chunk's changed lines in the worker's pre-review gate, through one command that picks the tool by language, and hand stability-reviewer the surviving mutants.** | 3 | 2 | 3 | 6 | 5 | 1.1 by 5, 1.4 by 4, 1.5 by 2 | 2.8 |
| 284 | 0.8.0 | | owner | **Script each step that 0.7.0's chunks repeated by hand and a program can compute, filing one item per step, and file this audit again for the next release.** | 1 | 2 | 1 | 2 | 2 | 1.4 by 3, 1.5 by 3 | 2.6 |
| 288 | 0.8.0 | | | **Point the two reading-cost decisions at code health and goal 1.4's counter-signal, in place of the goal 1.1 they cite.** | 1 | 2 | 1 | 2 | 1 | code health by 1, 1.4 by 1 | 2.6 |
| 77 | 0.8.0 | | | **Teach `bin/metric-bench` Go and TypeScript, rerun it once two projects' comprehension histories name places, and bring into review only a metric that tracks the panel.** | 4 | 2 | 1 | 5 | 6 | 1.1 by 7, 1.4 by 7 | 2.4 |
| 273 | 0.8.0 | | decision | **Re-tune the E + I steps of `REVIEW_STEPS` for 6 to 8 once 10 finished chunks have scored an E + I of 6 or more, from how well E + I orders their review rounds and 🔴 findings.** | 1 | 2 | 2 | 3 | 2 | 1.1 by 2, 1.4 by 3 | 2.3 |
| 171 | 0.8.0 | | decision | **Group the routing figures' review rounds by the reviewers' rung as well as the worker's, so a call blames a rung only for rounds its own reviews raised.** | 3 | 2 | 2 | 5 | 4 | 1.2 by 3, 1.4 by 3 | 2.0 |
| 149 | 0.8.0 | | decision | **Fill each release by priority up to a capacity it states, in place of the bar, and move what does not fit to a later release.** | 4 | 2 | 3 | 7 | 5 | 1.1 by 7 | 1.8 |
| 165 | 0.8.0 | | | **Make this repo's tests assert the facts a prompt or help text carries in place of its sentences, and drop the tests that scan source or assert a constant.** | 3 | 2 | 1 | 4 | 5 | 1.1 by 4, 1.4 by 3 | 1.8 |
| 151 | 0.8.0 | | decision | **Keep 10 to 20 settled decisions per project as its goals' test set, and rerun them after a goal changes.** | 3 | 2 | 2 | 5 | 5 | 1.2 by 7 | 1.8 |
| 68 | 0.8.0 | | principle | **Test `workflow-bench/compare.py`'s blinding and `bench.py`'s run plan.** | 2 | 1 | 1 | 2 | 4 | 1.1 by 5 | 1.8 |
| 102 | 0.8.0 | | | **Give loop-claude's retry delay, and the file it reads the machine's memory from, environment overrides, so the black-box test stops replacing `time.sleep` and `machine_load.memory.MEMINFO` through `sitecustomize`.** | 1 | 1 | 2 | 2 | 3 | 1.1 by 4 | 1.7 |
| 135 | 0.8.0 | | | **Fingerprint only the modules loop-claude imports, so editing another tool's code no longer reloads a running loop.** | 2 | 2 | 3 | 5 | 3 | 1.1 by 4 | 1.7 |
| 270 | 0.8.0 | | | **Compare each review pass's share of chunks that go to a second round, and move each check stability repeats across chunks into the worker's pre-review gate.** | 2 | 2 | 3 | 5 | 3 | 1.1 by 2, 1.4 by 2 | 1.6 |
| 5 | 0.8.0 | | decision | **Key a project on its checkout's full path, and refuse to start while another session uses that key.** | 4 | 2 | 3 | 7 | 5 | 1.1 by 6 | 1.6 |
| 291 | 0.8.0 | | owner | **Let `principles/technical-principles.md` → "Sane defaults" allow a library whose README goals ask that it work with no config to default the clock and randomness in its public constructor, where a documented option overrides each.** | 1 | 2 | 3 | 4 | 1 | 1.2 by 3 | 1.4 |
| 156 | 0.8.0 | | decision | **Drop `rank_todo.py`'s ranking of an old-shape table once no project under `~/code` holds one.** | 2 | 1 | 3 | 4 | 4 | 1.1 by 4 | 1.4 |
| 196 | 0.8.0 | | decision | **Replay the architecture, principles, overrides and product-owner passes with `review-replay` on Opus 5.5 projects, record each run in the review-replay routing decision, and, where a run qualifies a rung, add back the code that lowers a pass to it.** | 2 | 2 | 3 | 5 | 2 | 1.4 by 3 | 1.3 |
| 260 | 0.8.0 | | decision | **Compare the first 20 chunks whose worker got the reading rule with the 20 before them, on review rounds past each pass's first, unfinished verdicts, 🔴, 🟡 and misread findings, dollars and hours per chunk, and drop the rule where any rose.** | 1 | 2 | 1 | 2 | 2 | 1.4 by 3 | 1.3 |
| 269 | 0.8.0 | | | **Measure the judge's cost per rung from the `Judge cost:` lines once 20 chunks hold them, and file an item where an xhigh verdict costs more than the interrupts it avoids.** | 1 | 2 | 1 | 2 | 2 | 1.4 by 3 | 1.3 |
| 51 | 0.8.0 | | principle | **Hand loop-claude's terminal output to an injected effect, so no storage or retry function prints.** | 2 | 1 | 3 | 4 | 5 | 1.1 by 5 | 1.3 |
| 268 | 0.8.0 | | | **End a run whose release is ready to cut with a notice on loop-claude's terminal, in place of an interrupt that waits for an answer.** | 2 | 2 | 3 | 5 | 3 | 1 by 3 | 1.3 |
| 201 | 0.8.0 | | owner | **Save the human's tmux setups and restore them after a reboot, so work is up and running again quickly.** | 3 | 2 | 1 | 4 | 4 | 1.5 by 4 | 1.3 |
| 267 | 0.8.0 | | | **Keep waiting when an interrupt gets an empty answer, at the terminal or in the claude opened for it, in place of stopping the loop.** | 2 | 1 | 3 | 4 | 2 | 1.5 by 3 | 1.3 |
| 4 | 0.8.0 | | | **Name each chunk's archive folder by the chunk's start time, so `<key>/` lists chunks in the order they ran.** | 3 | 2 | 3 | 6 | 3 | 1.1 by 3 | 1.3 |
| 187 | 0.8.0 | | | **Count the tokens a worker spends reading reviewers' reports, so goal 1.4's signal shows whether report files lowered what a review costs the worker's context.** | 2 | 2 | 1 | 3 | 3 | 1.4 by 3 | 1.2 |
| 264 | 0.8.0 | | | **Report the comprehension seats and the escalated subagents as subagent types of their own in `routing-figures.md`, with their dollars.** | 2 | 2 | 1 | 3 | 3 | 1.4 by 3 | 1.2 |
| 266 | 0.8.0 | | | **Move the chunks archived under the key `home/lilleman/.claude` to the key `claude-config`, so the routing figures and `score-outcomes` count this repo's chunks as one project.** | 3 | 2 | 2 | 5 | 3 | 1.4 by 3 | 1.2 |
| 52 | 0.8.0 | | principle | **Move this checkout out of Claude Code's own directory, or record why it stays, since Claude Code loads the checkout's `AGENTS.md` as the user's instructions into every project's sessions.** | 4 | 3 | 4 | 9 | 6 | 1.1 by 4, 1.4 by 2 | 1.0 |
| 181 | 0.8.0 | | principle | **Have the test of a quoted answer's step-up assert the stepped rung's facts as literals, not through `prompts.rungs_held`.** | 1 | 1 | 1 | 1 | 1 | 1.1 by 2 | 1.0 |
| 192 | 0.8.0 | | principle | **Sort `.gitignore`'s allowlist block, from `!.claude/` to `!workflow-bench/test_review_git.py`, by code point, so rule-hook's `ignorefile-sorted` checks later edits to it again.** | 1 | 1 | 1 | 1 | 1 | 1.1 by 2 | 1.0 |
| 193 | 0.8.0 | | | **Narrow `readme_goals`'s mark to `Mark` by a typed lookup in place of `typing.cast`, so a mark added to the regex but not the lookup fails at run time, and one added to the lookup but not `Mark` fails mypy.** | 1 | 1 | 3 | 3 | 1 | 1.1 by 2 | 1.0 |
| 194 | 0.8.0 | | | **Make `test_waits_out_a_usage_limit_which_ends_a_run_of_failures` expect a usage-limit wait independent of the wall-clock time that passes during the run.** | 1 | 1 | 1 | 1 | 1 | 1.1 by 2 | 1.0 |
| 202 | 0.8.0 | | | **Add `CLAUDE.md` → "Prose"'s rule "Write negations as people say them", with its examples, to `skills/larv-review/standards/prose.md`, so the prose reviewer holds prose to it.** | 1 | 2 | 2 | 3 | 1 | 1.1 by 2 | 1.0 |
| 265 | 0.8.0 | | | **Archive each wait that costs a chunk wall time, for a usage limit, low memory, a failed worker start or a heavy slot, with its start and end stamps, so goal 1.5's hours split waiting from work.** | 3 | 2 | 2 | 5 | 4 | 1.5 by 3 | 1.0 |
| 169 | 0.8.0 | | | **Have rule-hook's `todo-rank-check` catch a `todo.md` that the same Bash call edits and then commits.** | 3 | 1 | 3 | 5 | 3 | 1.1 by 2 | 0.8 |
| 174 | 0.8.0 | | | **In a chunk no item routed, ask the worker to name each todo.md item it takes, with its L and E + I, so loop-claude can route on an item it takes in.** | 1 | 2 | 3 | 4 | 1 | 1.1 by 1 | 0.5 |
| 197 | 0.8.0 | | | **Let the human edit what they type at loop-claude's terminal questions with the arrow keys, so Left moves the cursor in place of printing `^[[D`.** | 2 | 2 | 3 | 5 | 2 | 1.5 by 1 | 0.4 |
| 1 | 0.9.0 | | question | **Say in README → Install how the transcript archive is backed up, once bender-infra backs up ai-sandbox's data volume.** | 1 | 2 | 1 | 2 | 1 | | 0.0 |
| 270 | 0.8.0 | | | **Move each check a review pass repeats across chunks, other than the mutation tests item 293 moves, into the worker's pre-review gate, starting with the passes most often taken to a second round.** | 2 | 2 | 3 | 5 | 3 | 1.1 by 3, 1.4 by 3 | 2.5 |
| 292 | 0.8.0 | | owner | **Rebuild the routing ladder for Fable 5.2, placing each of its efforts by the Artificial Analysis Intelligence Index beside Opus 5.5's and Sonnet 5.5's, and replace Fable 5.1 wherever it is named.** | 3 | 2 | 3 | 6 | 4 | 1.1 by 4, 1.4 by 3 | 2.4 |
| 295 | 0.8.0 | | | **Have `chunk-pr merge` wait for the forge's required checks itself, and give workers one command that waits for a background log or report file.** | 2 | 2 | 3 | 5 | 3 | 1.4 by 2, 1.5 by 2 | 1.6 |
| 299 | 0.8.0 | | | **Replay the archived judge verdicts through code rules and a classifier trained locally on the archive, and file an item for each verdict kind one of them decides with no missed interrupt.** | 2 | 2 | 2 | 4 | 3 | 1.4 by 3 | 1.2 |
| 298 | 0.8.0 | 297 | | **Send the judge only the decision entries and the transcript tail a verdict needs, and keep the cut only where `judge-replay` changes no verdict kind.** | 3 | 3 | 3 | 7 | 4 | 1.4 by 2, 1.5 by 1 | 1.0 |
| 287 | 0.9.0 | | | **Move the forge helpers `Forge`, `forge_of`, `runner`, `open_pull`, `merged_pull`, `pull_at` and `gitea` into one module that `chunk_preflight`, `chunk_pr`, `deploy_release` and `larv_review` all import from, so no tool imports another tool's internals for them.** | 3 | 1 | 3 | 5 | 5 | code health by 3 | 3.4 |
| 288 | 0.9.0 | | | **Point the two reading-cost decisions at code health and goal 1.4's counter-signal, in place of the goal 1.1 they cite.** | 1 | 2 | 1 | 2 | 1 | code health by 1, 1.4 by 1 | 2.6 |
| 77 | 0.9.0 | | | **Teach `bin/metric-bench` Go and TypeScript, rerun it once two projects' comprehension histories name places, and bring into review only a metric that tracks the panel.** | 4 | 2 | 1 | 5 | 6 | 1.1 by 7, 1.4 by 7 | 2.4 |
| 273 | 0.9.0 | | decision | **Re-tune the E + I steps of `REVIEW_STEPS` for 6 to 8 once 10 finished chunks have scored an E + I of 6 or more, from how well E + I orders their review rounds and 🔴 findings.** | 1 | 2 | 2 | 3 | 2 | 1.1 by 2, 1.4 by 3 | 2.3 |
| 268 | 0.9.0 | | | **End a run whose release is ready to cut with a notice on loop-claude's terminal, in place of an interrupt that waits for an answer.** | 2 | 2 | 3 | 5 | 3 | 1 by 5 | 2.2 |
| 171 | 0.9.0 | | decision | **Group the routing figures' review rounds by the reviewers' rung as well as the worker's, so a call blames a rung only for rounds its own reviews raised.** | 3 | 2 | 2 | 5 | 4 | 1.2 by 3, 1.4 by 3 | 2.0 |
| 300 | 0.9.0 | | owner | **Restructure the places the comprehension seats found hardest to follow, so the project reads at 7.0 or above on every dimension, Locality first: today the comprehension floor run at 52da15e scored Locality 6.00, Shape 6.25, Self-sufficiency 6.38 and Overall 6.38.** | 4 | 2 | 3 | 7 | 8 | code health by 8 | 2.0 |
| 264 | 0.9.0 | | | **Report the comprehension seats and the escalated subagents as subagent types of their own in `routing-figures.md`, with their dollars.** | 2 | 2 | 1 | 3 | 3 | 1.4 by 5 | 2.0 |
| 149 | 0.9.0 | | decision | **Fill each release by priority up to a capacity it states, in place of the bar, and move what does not fit to a later release.** | 4 | 2 | 3 | 7 | 5 | 1.1 by 7 | 1.8 |
| 165 | 0.9.0 | | | **Make this repo's tests assert the facts a prompt or help text carries in place of its sentences, and drop the tests that scan source or assert a constant.** | 3 | 2 | 1 | 4 | 5 | 1.1 by 4, 1.4 by 3 | 1.8 |
| 151 | 0.9.0 | | decision | **Keep 10 to 20 settled decisions per project as its goals' test set, and rerun them after a goal changes.** | 3 | 2 | 2 | 5 | 5 | 1.2 by 7 | 1.8 |
| 68 | 0.9.0 | | principle | **Test `workflow-bench/compare.py`'s blinding and `bench.py`'s run plan.** | 2 | 1 | 1 | 2 | 4 | 1.1 by 5 | 1.8 |
| 102 | 0.9.0 | | | **Give loop-claude's retry delay, and the file it reads the machine's memory from, environment overrides, so the black-box test stops replacing `time.sleep` and `machine_load.memory.MEMINFO` through `sitecustomize`.** | 1 | 1 | 2 | 2 | 3 | 1.1 by 4 | 1.7 |
| 135 | 0.9.0 | | | **Fingerprint only the modules loop-claude imports, so editing another tool's code no longer reloads a running loop.** | 2 | 2 | 3 | 5 | 3 | 1.1 by 4 | 1.7 |
| 5 | 0.9.0 | | decision | **Key a project on its checkout's full path, and refuse to start while another session uses that key.** | 4 | 2 | 3 | 7 | 5 | 1.1 by 6 | 1.6 |
| 291 | 0.9.0 | | owner | **Let `principles/technical-principles.md` → "Sane defaults" allow a library whose README goals ask that it work with no config to default the clock and randomness in its public constructor, where a documented option overrides each.** | 1 | 2 | 3 | 4 | 1 | 1.2 by 3 | 1.4 |
| 156 | 0.9.0 | | decision | **Drop `rank_todo.py`'s ranking of an old-shape table once no project under `~/code` holds one.** | 2 | 1 | 3 | 4 | 4 | 1.1 by 4 | 1.4 |
| 196 | 0.9.0 | | decision | **Replay the architecture, principles, overrides and product-owner passes with `review-replay` on Opus 5.5 projects, record each run in the review-replay routing decision, and, where a run qualifies a rung, add back the code that lowers a pass to it.** | 2 | 2 | 3 | 5 | 2 | 1.4 by 3 | 1.3 |
| 260 | 0.9.0 | | decision | **Compare the first 20 chunks whose worker got the reading rule with the 20 before them, on review rounds past each pass's first, unfinished verdicts, 🔴, 🟡 and misread findings, dollars and hours per chunk, and drop the rule where any rose.** | 1 | 2 | 1 | 2 | 2 | 1.4 by 3 | 1.3 |
| 51 | 0.9.0 | | principle | **Hand loop-claude's terminal output to an injected effect, so no storage or retry function prints.** | 2 | 1 | 3 | 4 | 5 | 1.1 by 5 | 1.3 |
| 201 | 0.9.0 | | owner | **Save the human's tmux setups and restore them after a reboot, so work is up and running again quickly.** | 3 | 2 | 1 | 4 | 4 | 1.5 by 4 | 1.3 |
| 267 | 0.9.0 | | | **Keep waiting when an interrupt gets an empty answer, at the terminal or in the claude opened for it, in place of stopping the loop.** | 2 | 1 | 3 | 4 | 2 | 1.5 by 3 | 1.3 |
| 4 | 0.9.0 | | | **Name each chunk's archive folder by the chunk's start time, so `<key>/` lists chunks in the order they ran.** | 3 | 2 | 3 | 6 | 3 | 1.1 by 3 | 1.3 |
| 187 | 0.9.0 | | | **Count the tokens a worker spends reading reviewers' reports, so goal 1.4's signal shows whether report files lowered what a review costs the worker's context.** | 2 | 2 | 1 | 3 | 3 | 1.4 by 3 | 1.2 |
| 266 | 0.9.0 | | | **Move the chunks archived under the key `home/lilleman/.claude` to the key `claude-config`, so the routing figures and `score-outcomes` count this repo's chunks as one project.** | 3 | 2 | 2 | 5 | 3 | 1.4 by 3 | 1.2 |
| 181 | 0.9.0 | | principle | **Have the test of a quoted answer's step-up assert the stepped rung's facts as literals, not through `prompts.rungs_held`.** | 1 | 1 | 1 | 1 | 1 | 1.1 by 2 | 1.0 |
| 192 | 0.9.0 | | principle | **Sort `.gitignore`'s allowlist block, from `!.claude/` to `!workflow-bench/test_review_git.py`, by code point, so rule-hook's `ignorefile-sorted` checks later edits to it again.** | 1 | 1 | 1 | 1 | 1 | 1.1 by 2 | 1.0 |
| 193 | 0.9.0 | | | **Narrow `readme_goals`'s mark to `Mark` by a typed lookup in place of `typing.cast`, so a mark added to the regex but not the lookup fails at run time, and one added to the lookup but not `Mark` fails mypy.** | 1 | 1 | 3 | 3 | 1 | 1.1 by 2 | 1.0 |
| 194 | 0.9.0 | | | **Make `test_waits_out_a_usage_limit_which_ends_a_run_of_failures` expect a usage-limit wait independent of the wall-clock time that passes during the run.** | 1 | 1 | 1 | 1 | 1 | 1.1 by 2 | 1.0 |
| 202 | 0.9.0 | | | **Add `CLAUDE.md` → "Prose"'s rule "Write negations as people say them", with its examples, to `skills/larv-review/standards/prose.md`, so the prose reviewer holds prose to it.** | 1 | 2 | 2 | 3 | 1 | 1.1 by 2 | 1.0 |
| 265 | 0.9.0 | | | **Archive each wait that costs a chunk wall time, for a usage limit, low memory, a failed worker start or a heavy slot, with its start and end stamps, so goal 1.5's hours split waiting from work.** | 3 | 2 | 2 | 5 | 4 | 1.5 by 3 | 1.0 |
| 169 | 0.9.0 | | | **Have rule-hook's `todo-rank-check` catch a `todo.md` that the same Bash call edits and then commits.** | 3 | 1 | 3 | 5 | 3 | 1.1 by 2 | 0.8 |
| 174 | 0.9.0 | | | **In a chunk no item routed, ask the worker to name each todo.md item it takes, with its L and E + I, so loop-claude can route on an item it takes in.** | 1 | 2 | 3 | 4 | 1 | 1.1 by 1 | 0.5 |
| 197 | 0.9.0 | | | **Let the human edit what they type at loop-claude's terminal questions with the arrow keys, so Left moves the cursor in place of printing `^[[D`.** | 2 | 2 | 3 | 5 | 2 | 1.5 by 1 | 0.4 |
| 1 | 0.10.0 | | question | **Say in README → Install how the transcript archive is backed up, once bender-infra backs up ai-sandbox's data volume.** | 1 | 2 | 1 | 2 | 1 | | 0.0 |
## Details
### 294. Check the files a commit stages against rule-hook's file rules, so a file a Bash command wrote is held to them as an Edit or Write is.
From 2026-11-08 to 2026-11-10, workers in other projects wrote 1,266 files through Bash (a python heredoc, `sed -i`, `cat >`) against 260 through Edit and Write, and `rule-hook --help` says it doesn't check a file a Bash command writes. So `action-pin`, `image-pin`, `ignorefile-sorted` and the attribution check miss most edits. rule-hook already checks at `git commit` for `todo-rank-check`, so checking staged files there follows a pattern the repo has. Ship item 192 in the same chunk: its unsorted `.gitignore` block is one symptom of this gap.
### 297. Have loop-claude compute the judge's taken-in items, release-ready and escalation fields from `chunk-preflight`, git and the worker's structured lines, and leave the judge only the verdict kind.
`bin/loop_claude/cycle/judge.py` already checks quotes in code (`quotes_checked`, `grounded`, `re_ask_checked`). The `Reply` fields `items_taken_in`, `release_ready` and `escalation` state facts the plan and git already hold, so code can derive them with certainty, and the judge's prompt shrinks to what needs judgement. Before switching, recompute each field for the 668 archived verdicts offline and count where code and judge disagree; read each disagreement and keep the judge for a field where code is wrong. Seats found `quotes_checked` hard to read (PR #397's scoring run: the misquote rule is split across `judge.py` and `escalation_mark.py`); make it easier to read where the change touches it.
### 302. Call a scoring run for an item whose tagline makes the comprehension floor its target, and not for one that only names the floor, such as in a quoted decision title.
`bin/larv_review/scoring.py` sets `FLOOR_ITEM = "comprehension floor"` (line 7) and tests it as a substring of the tagline at line 35 and in `bin/larv_review/plan.py:28`. So any item whose tagline holds those words counts as a floor item. Item 301's tagline quoted the title of the decision "comprehension floor: …", so its chunk was due a scoring run it did not need. The deployed `chunk-pr` (release 0.7.0) did not refuse the merge, so it merged without one, and the run was recorded late, in PR #476.
Recommendation: a floor item's tagline opens with one fixed phrase, `Reach the comprehension floor:`, and both checks test that the tagline, with its leading `**` stripped, starts with it, in place of the substring test. Reason: a quoted title or a passing mention never sits at a tagline's start, so the check needs no parsing and keeps one constant. An Exempt reason such as `floor` was the alternative; it would change `rank_todo.py`'s schema and every project's table for the same effect.
The same chunk names the phrase where a floor item is filed: `skills/larv-review/SKILL.md` → "Floor item", the `Next:` lines `floor_step` prints, and `larv-review --help` (`bin/larv_review/main.py`, lines 35 and 89). It rewords open floor item 300's tagline to open with the phrase, and updates the tests in `bin/larv_review/test_larv_review.py` that use floor taglines (lines 120, 361, 435, 537), adding one where a tagline quotes the floor mid-sentence and is due no run.
### 293. Run mutation tests on a chunk's changed lines in the worker's pre-review gate, through one command that picks the tool by language, and hand stability-reviewer the surviving mutants.
Of stability-reviewer's 428 round-1 findings from 2026-11-02 to 2026-11-10, 223 (52%) were test gaps, such as a surviving mutant or an unpinned boundary, and 31 of its 50 round 2s held one. 133 of its 144 reports ran mutation tests by hand: today the reviewer picks and runs mutmut, Stryker, cargo-mutants or Infection itself, per `agents/stability-reviewer.md` step 5. A command run once before review, on the lines the branch changed, finds the same survivors deterministically, so the worker kills them before review and the reviewer judges only what remains. This takes over the stability half of item 270. Ship it alone: the nearest finished items, 227, 210, 180 and 73, changed 261 to 402 lines and took 3 to 8 rounds past the first.
### 284. Script each step that 0.7.0's chunks repeated by hand and a program can compute, filing one item per step, and file this audit again for the next release.
lilleman asked, on 2026-10-16, for a standing audit each release, so the loop keeps moving work a program does as well from the model to scripts (goals 1.4 and 1.5). This audit reads the archived transcripts of the chunks that shipped release 0.7.0 for every step that chunks repeated by hand, before, during or after review. It keeps the steps whose answer a program computes the same way each time, such as a lookup, a check, a prompt assembled for a reviewer, a cleanup. File one item per such step, with the time and tokens it cost, into the next release with items left. Leave a step that needs judgement with the model. Run item 283's tool first, once it has shipped.
The chunk that ships this item files a copy of this audit in the release after this item's own, to audit this item's release, rewording "0.7.0" to the release that copy audits, and marks the copy `owner`, so the audit recurs each release until lilleman drops it.
### 270. Move each check a review pass repeats across chunks, other than the mutation tests item 293 moves, into the worker's pre-review gate, starting with the passes most often taken to a second round.
The review folders under `~/.local/state/larv-review/`, review replays left out, hold a stability round 2 beside 137 of 211 round-1 reports (65%), product-owner 73 of 173 (42%) and prose 8 of 277 (3%), on 2026-11-08. The architecture and principles passes run up to five rounds in a release review, so they don't compare. From 2026-11-02 to 2026-11-10, 223 of stability's 428 round-1 findings (52%) were test gaps, and 31 of its 50 round 2s held one; item 293 moves the mutation tests that find most of them. Check which kinds of finding the other round 2s repeat, such as an unhandled error or a product-owner wording fix. Move only a check a program or the worker can run before review; leave judgement with the reviewer.
### 292. Rebuild the routing ladder for Fable 5.2, placing each of its efforts by the Artificial Analysis Intelligence Index beside Opus 5.5's and Sonnet 5.5's, and replace Fable 5.1 wherever it is named.
Fable 5.2 (`claude-fable-5-2`) has been released. The ladder in `bin/model_routing/ladder.py` tops out at `Rung("claude-fable-5-1", "max")`, and the decision `routing: one ladder of (model, effort) rungs` holds "while no newer model joins the catalog", so it is due for a rebuild.
Read the index again (https://artificialanalysis.ai/leaderboards/models), at each effort it scores, with its cost per task. Rebuild the ladder by the decision's cut: a rung stays only where no cheaper rung scores as high. Fable 5.2 may earn more than one rung, and a cheaper effort of it may push an Opus 5.5 rung off. Where the order changes which rung a project's model starts on, or how far the L and E + I steps reach, say so in the decision. The rungs are the human's choice (`CLAUDE.md` → "Working loop", "Ask, don't guess"), so propose the new ladder with the index's figures and get the human's approval before changing code.
Then replace `claude-fable-5-1` where it is named: `ladder.py`, `bin/routing_figures/prices.py` (Fable 5.2's prices), `settings.json` → `modelSettings`, the tests in `bin/model_routing/`, `bin/loop_claude/`, `bin/judge_replay/` and `bin/rule_hook/`, `AGENTS.md`, `docs/decisions.md` and `presentation/index.html`. Keep Fable 5.1 in `prices.py` while archived chunks that ran on it are still priced from there.
### 295. Have `chunk-pr merge` wait for the forge's required checks itself, and give workers one command that waits for a background log or report file.
In 0.7.0's 35 chunks, workers made 65 `tea api` calls in 26 chunks, mostly polling commit status and trying merge methods in turn, and ran 25 `until … sleep` loops that took 1,744 seconds. `chunk-pr merge` takes `--gate-passed` on the worker's word; waiting for the required checks itself makes that flag a fact, not a claim. This is the kind of step item 284 files, and can count as its first.
### 299. Replay the archived judge verdicts through code rules and a classifier trained locally on the archive, and file an item for each verdict kind one of them decides with no missed interrupt.
The judge's verdict kind is the one judge decision that item 297 leaves an LLM. No single rule found so far separates interrupts: a "?" in the worker's final message appears in 48 interrupts and misses 66. A smaller LLM already failed the replay (`docs/decisions.md` → `routing: on a model judge-replay covered, …`: Sonnet returned another kind on 3 interrupts, Haiku missed 7). Untested are combined code rules, a decision table, and a small classifier trained and run on this machine on the archived verdicts (372 finished, 234 interrupt, 42 unfinished, 20 quoted). Run each offline, nothing sent to an outside service (goal 4), and count disagreements by kind; the bar is zero missed interrupts. A hosted decision model is out of scope, since it would send transcripts to an outside service.
### 298. Send the judge only the decision entries and the transcript tail a verdict needs, and keep the cut only where `judge-replay` changes no verdict kind.
153 `Judge cost:` entries total $109.76, a median of about $0.76 a verdict at every rung, and the cost follows the size of the records, not the transcript: about 76k characters in log and 188k in claude-config. In 224 of 251 recent verdicts (89%) the evidence sits in the worker's final message. A missed interrupt is the costly error, so the bar is zero changed interrupts and zero new rejections across the replay. It waits for item 297, which moves the judge's factual fields into code, since that shrinks the prompt first and changes what this cut measures. The judge is about 4.5% of dollars, so the saving is small; each cycle also gets faster.
### 287. Move the forge helpers `Forge`, `forge_of`, `runner`, `open_pull`, `merged_pull`, `pull_at` and `gitea` into one module that `chunk_preflight`, `chunk_pr`, `deploy_release` and `larv_review` all import from, so no tool imports another tool's internals for them.
Today the helpers live in two tools. `Forge` is defined in `bin/chunk_preflight/gathered.py` and imported by `bin/chunk_preflight/choices.py`, `bin/chunk_preflight/facts.py`, `bin/chunk_preflight/main.py` and `bin/chunk_pr/main.py`, and again through `choices` by `bin/deploy_release/forge.py`. `forge_of` lives in `choices.py`, which `bin/chunk_pr/main.py`, `bin/deploy_release/cut.py` and `bin/larv_review/reviewer_header.py` import. `open_pull`, `runner` and `gitea` live in `bin/deploy_release/forge.py`, which `bin/chunk_pr/main.py` and `bin/larv_review/reviewer_header.py` import. So `deploy_release` imports `chunk_preflight`, and `chunk_pr` and `larv_review` import both.
Both comprehension seats of PR #453's paired ruling (2026-11-09) named this web as a place that cost them time, and neither saw a reason for it: a second forge would need edits in `chunk_preflight`, `deploy_release`, `chunk_pr` and `larv_review`.
Put the five helpers in a folder named by what it holds, such as `bin/forge/`, and import them from there. Keep each helper's behaviour and its tests. `chunk_preflight/choices.py` keeps `pulls_command`, which is preflight's own. Check `AGENTS.md` and `docs/decisions.md` for a mention of where a helper lives, and update it.
### 284. Script each step that 0.7.0's chunks repeated by hand and a program can compute, filing one item per step, and file this audit again for the next release.
lilleman asked, on 2026-10-16, for a standing audit each release, so the loop keeps moving work a program does as well from the model to scripts (goals 1.4 and 1.5). This audit reads the archived transcripts of the chunks that shipped release 0.7.0 for every step that chunks repeated by hand, before, during or after review. It keeps the steps whose answer a program computes the same way each time, such as a lookup, a check, a prompt assembled for a reviewer, a cleanup. File one item per such step, with the time and tokens it cost, into the next release with items left. Leave a step that needs judgement with the model. Run item 283's tool first, once it has shipped.
The chunk that ships this item files a copy of this audit in the release after this item's own, to audit this item's release, rewording "0.7.0" to the release that copy audits, and marks the copy `owner`, so the audit recurs each release until lilleman drops it.
Put the seven helpers in a folder named by what it holds, such as `bin/forge/`, and import them from there. Keep each helper's behaviour and its tests. `chunk_preflight/choices.py` keeps `pulls_command`, which is preflight's own. Check `AGENTS.md` and `docs/decisions.md` for a mention of where a helper lives, and update it.
### 288. Point the two reading-cost decisions at code health and goal 1.4's counter-signal, in place of the goal 1.1 they cite.
@@ -105,17 +156,56 @@ Claude's answers overlapped the truth by a median Jaccard index of 0.76. A run t
`docs/decisions.md` → `routing: one ladder…` records why lilleman kept the steps on 2026-11-08. Of the 36 chunks it measured, 1 scored an E + I of 6 or more and none 7 or more, so the steps for 6 to 8 are untested. Start once `score-outcomes` shows 10 finished chunks with an E + I of 6 or more. Then read its rank correlation for E + I, and the routed-chunks table of `routing-figures.md` in loop-claude's archive (`$LOOP_CLAUDE_TRANSCRIPTS`, default `~/.claude/loop-claude-transcripts`). Propose new steps to lilleman, whose call they are.
### 268. End a run whose release is ready to cut with a notice on loop-claude's terminal, in place of an interrupt that waits for an answer.
On 2026-11-08 the human answered notice only: the loop prints that the release is ready to cut and ends; no interrupt, and nothing waits in loop-inbox.
Releases are the human's, and `CLAUDE.md` → "Working loop" already ends the loop once a release is ready to cut, so the ask settles nothing. 15 interrupts in the archive ask whether the human will cut a release, and about 6 of the 45 interrupts from 2026-11-02 to 2026-11-10 said a release was ready to cut; log's 2.5.0 was asked twice within an hour on 2026-11-10. On 2026-11-08 one of the 4 questions waiting in `~/.local/state/loop-claude/` is such an ask, plainpages-plugin-fastjira's 0.3.0 since 2026-11-03. Today a release ready to cut opens claude's session at once (`bin/loop_claude/cycle/run.py` `ask`), and the loop stops if the human leaves it with nothing typed. The change also touches what an interrupt covers in `CLAUDE.md` → "Vocabulary". Where the change touches `ask`, make it easier to read, as the seats named it.
### 171. Group the routing figures' review rounds by the reviewers' rung as well as the worker's, so a call blames a rung only for rounds its own reviews raised.
Raised by the goals audit of PR #296. `bin/routing_figures/calls.py` groups a chunk's review rounds by the rung its worker started on, and calls for a routing change when a lower rung took more of them. Since PR #296 the reviewers may run above the worker's rung, on the one their item's E + I picks, and no figure groups rounds by it, though the archived worker line names the E + I it follows from. A cheap worker on an item of high E + I gets stronger reviewers, who may raise more rounds, and a call could then blame the worker's rung for them: an interrupt of lilleman that settles nothing (goal 1.2).
### 300. Restructure the places the comprehension seats found hardest to follow, so the project reads at 7.0 or above on every dimension, Locality first: today the comprehension floor run at 52da15e scored Locality 6.00, Shape 6.25, Self-sufficiency 6.38 and Overall 6.38.
Filed by the comprehension check of PR #473 at 13d1550 (`larv-review record-scoring`), which printed `Floor:` and `Next:`, and refreshed from the run of PR #475 at 52da15e. The lowest mean is Locality, 6.00. Refresh this item's places and aim from the newest run before the chunk starts; do not file a second floor item.
Aim: one ambitious refactor of the areas below, sized so every mean reaches 7.0 on the chunk's own scoring run. Where a place is already easier to read when the chunk starts, drop it.
Places the seats named, hardest first (`larv-review places`):
- Locality, Shape: `bin/loop_claude/routing.py:93` `unfinished_route`: the floor rung, the escalation cap, the escalation mark, the unfinished count and the taken-in E + I are held at once, across about six helpers in five files. The mark's meaning lives in `escalation_mark.py`, and the reason for the floor and the cap sits in the decision log.
- Locality, Shape: `bin/release_plan/release_standing.py:145` `next_release`: the tag, changelog, before-first-release and renamed branches meet in the `is_earliest` expression, which took a senior three reads. Nothing comments the `None` and `nothing_cut` case.
- Locality: `bin/loop_claude/cycle/judge.py:211` `quotes_checked`: the judge's contract is split over prose constants, schema descriptions and checks after the fact. A bad quote silently changes the verdict's type.
- Locality, Shape: `bin/loop_claude/cycle/run.py:146` `rule`, with `loop/close.py:18` `closed_cycle`: the order of the ruling, rejection and step-up archive writes carries meaning, and nothing enforces it. Four near-identical archive helpers, `run.py:86` `archived` among them, sit in the cycle runner though `loop/close.py` imports them, and `run_cycle` replaces the route partway through its loop.
- Locality, Self-sufficiency: `bin/larv_review/reviewer_header.py:49` `unanswered_round` and `skills/larv-review/SKILL.md:76` "Round cap": the cap counts answer commits, so a worker that relaunches without committing gets the same round number. The cap is enforced in four units, split over SKILL.md and three modules.
- Locality, Shape: `bin/larv_review/plan.py:66` `plan_reasons`: a merge-base commit enters the parameter that item 296's chunk renamed `ref`, eight failure branches mix git reads, file reads and logic, and `after` means the checkout's text and then its items.
- Locality: `bin/larv_review/owed.py:37` `shortfall`: the one-run-or-two rule is keyed on the wording `EMPTIED_WORDS` that plan.py builds and SKILL.md quotes, and `scoring_runs` defines a scoring run differently from `Entry.scored`. Give the scoring-run logic one module, and have the number of runs owed come from a value, not from a sentence.
- Locality: `bin/chunk_pr/main.py:42` `forge`: the forge helpers live in `chunk_preflight` and `deploy_release`, so a second forge needs edits in four packages.
- Locality: `bin/rule_hook/reviewer_rung.py:40` `skill_breaches`: three cases rest on assumptions made in another function.
- Locality: `bin/rule_hook/repeat_read.py:119` `shown_lines`: it rebuilds from transcript entries which lines are in the agent's context.
- Locality: `bin/model_routing/route.py:88` `route_of`: a route has two serializations, a flat archive line and a nested handover.
- Self-sufficiency, Locality: `bin/loop_claude/cycle/prompts.py:59` `review_launches` and `:119` `escalation`: the worker's prompt is built from about 20 conditional sentence builders, which restate the routing logic.
- Shape: `bin/release_plan/ranking.py:56` `rank`, `:304` `score` and `:315` `weight_of`: nearly every function forks on `SHAPE` versus `OLD_SHAPE`, which doubles the module; item 156 removes the old shape. The constants read as magic until `rules/todo-items.md` is open.
- Shape: `bin/review_rules/comprehension_history.py:127` `entries`: a line-by-line parser that tolerates two legacy formats.
- Shape: `bin/records/__init__.py:1` `records`: one name for three concepts, as `cut` and `Plan` also name several.
- Shape: `bin/rule_hook/rules.py:25` `RULES`: rules sit inline in one module while five others have a module each.
- Navigation, Shape: `README.md:116` `bin/`: about 55 entries in one flat list, some 31 of them packages, the worst fan-out level.
- Self-sufficiency: `skills/larv-review/SKILL.md:147` "Scoring run": dense rule prose with many cross-references; three sections rebuild one rule.
Scored L 4 because the refactor touches several components that hold known defects, E 2 because review and a manual check see a regression, I 3 because every session runs these tools. The chunk runs a scoring run, since its tagline names the comprehension floor.
### 264. Report the comprehension seats and the escalated subagents as subagent types of their own in `routing-figures.md`, with their dollars.
Seats launch as `general-purpose`, so they hide inside that type: $301.24 of the $962.17 the figures of 2026-11-04 count, from 221 subagents. By 2026-11-10 general-purpose was the second-largest spend, $585 of about $2,385, and by transcript size about two thirds of it were seats (291 launches), then 177 security passes. Escalations are counted by trigger only, never in dollars. `bin/routing_figures/chunk.py` groups subagents by their `subagent_type`; a seat is told apart by its prompt, and an escalated subagent by the escalation marker its prompt opens with.
### 149. Fill each release by priority up to a capacity it states, in place of the bar, and move what does not fit to a later release.
A release's capacity is a sum of its items' cost, as the formula counts it. Each project states its own; the human sets the first value per project. Nothing is deleted by score.
### 165. Make this repo's tests assert the facts a prompt or help text carries in place of its sentences, and drop the tests that scan source or assert a constant.
A test audit across lilleman's projects on 2026-10-16 found 10 of 33 sampled tests in this repo pinning wording that is not the contract. Examples of these and other weak tests: `bin/loop_claude/test_loop_claude.py:165`, `:271` and most asserts in `:664` to `:687` pin whole sentences of the question, archive or prompt text, up to about 750 characters, and `:864` asserts help-text wording. `:906` and `:936` parse the source with `ast` and list each `Stop(...)` and `Failure(...)` call by function name. `bin/model_routing/test_ladder.py:16` asserts `len(LADDER) == 11`. Rewrite each to the technical principles' test bullet: assert the facts the text must carry, such as an item ID, a rung or a model argument, and delete a test no real bug could fail. Before and after rewriting a test, run the mutation tool on the code it covers: every mutant the old test killed, the new one kills.
A test audit across lilleman's projects on 2026-10-16 found 10 of 33 sampled tests in this repo pinning wording that is not the contract. Examples of these and other weak tests: many tests in `bin/loop_claude/test_loop_claude.py` pin whole sentences of the question, archive, prompt or help text, up to about 750 characters. `test_every_exit_1_stop_has_its_clause_in_help` and `test_every_failed_judge_run_has_its_clause_in_help` parse the source with `ast` and list each `Stop(...)` and `Failure(...)` call by function name. `bin/model_routing/test_ladder.py` asserts `len(LADDER) == 6`. Rewrite each to the technical principles' test bullet: assert the facts the text must carry, such as an item ID, a rung or a model argument, and delete a test no real bug could fail. Before and after rewriting a test, run the mutation tool on the code it covers: every mutant the old test killed, the new one kills.
### 151. Keep 10 to 20 settled decisions per project as its goals' test set, and rerun them after a goal changes.
@@ -129,19 +219,15 @@ The tests also cover `workflow-bench/bench.py`'s `permission_flags`, with a prob
### 102. Give loop-claude's retry delay, and the file it reads the machine's memory from, environment overrides, so the black-box test stops replacing `time.sleep` and `machine_load.memory.MEMINFO` through `sitecustomize`.
Found by the principles audit of PR #242. `bin/loop_claude/test_black_box.py:117-118` swaps the global `time.sleep`, the shape "Functional core, imperative shell" bans, and the audit of PR #376 found the same block swapping `machine_load.memory.MEMINFO` at lines 120-123. An override of each lets the test run the code as production runs it.
Found by the principles audit of PR #242. The `SITECUSTOMIZE` block in `bin/loop_claude/test_black_box.py` swaps the global `time.sleep`, the shape "Functional core, imperative shell" bans, and the audit of PR #376 found the same block swapping `machine_load.memory.MEMINFO`, the constant in `bin/machine_load/memory.py`. An override of each lets the test run the code as production runs it.
### 135. Fingerprint only the modules loop-claude imports, so editing another tool's code no longer reloads a running loop.
The maintainability senior and the inherited architect of PR #257's scoring run named `bin/loop_claude/loop/reload.py:38` `fingerprint` and `:50` `exec_if_edited`: the fingerprint covers every `bin/**/*.py`, so editing `statusline.py` or `rank_todo.py` re-execs a running loop. Make `fingerprint` easier to read.
### 270. Compare each review pass's share of chunks that go to a second round, and move each check stability repeats across chunks into the worker's pre-review gate.
Weak evidence: the review folders under `~/.local/state/larv-review/`, review replays left out, hold a stability round 2 beside 137 of 211 round-1 reports (65%), product-owner 73 of 173 (42%) and prose 8 of 277 (3%), on 2026-11-08. The architecture and principles passes run up to five rounds in a release review, so they don't compare. First check whether stability's round 2s repeat the same kinds of finding, such as a missing test or an unhandled error. Move only a check a program or the worker can run before review; leave judgement with the reviewer.
The maintainability senior and the inherited architect of PR #257's scoring run named `fingerprint` and `exec_if_edited` in `bin/loop_claude/loop/reload.py`: the fingerprint covers every `bin/**/*.py`, so editing `statusline.py` or `rank_todo.py` re-execs a running loop. Make `fingerprint` easier to read.
### 5. Key a project on its checkout's full path, and refuse to start while another session uses that key.
The key names the project's session, archive folder and models entry. `project_key` drops the leading `/`, so `~/code/a` and `/a` share all three, and one loop can resume or delete the other's session.
The key names the project's session, archive folder and models entry. `project_key`, in `bin/transcript_archive/project_key.py`, strips `~/code/` and then any leading `/`, so `~/code/a` and `/a` share all three, and one loop can resume or delete the other's session.
`bin/reading-cost` keys the archive by the main checkout, the parent of git's common dir, since it runs in a chunk's worktree; `loop-claude` keys it by `--show-toplevel`, so a loop started inside a worktree archives where `reading-cost` never looks. Derive both keys one way.
@@ -163,19 +249,9 @@ Item 159's chunk, PR #322, replayed only the prose and stability passes. Sonnet
Start once 20 chunks have run under the rule. The rule is `READING_RULE` in `bin/loop_claude/cycle/prompts.py`, which every fresh worker prompt holds; `git log --first-parent -S READING_RULE` on the default branch finds the merge that added it. A chunk got it when its first worker started after that merge. Measure as `docs/decisions.md` → `loop-claude: the worker's claude compacts its context before it fills a 200k window…` measured the window: rounds past each pass's first and the 🔴, 🟡 and misread counts from the round commit titles, unfinished verdicts from the outcomes files, hours from the worker's first message to its last, and dollars from the chunk's `cost-state` entry. Compare means, since the decision weighs the rule by all spend.
### 269. Measure the judge's cost per rung from the `Judge cost:` lines once 20 chunks hold them, and file an item where an xhigh verdict costs more than the interrupts it avoids.
The `Judge cost:` line is new under `CHANGELOG.md` → "Unreleased", and no outcomes file in the archive holds one yet (2026-11-08). Of the 460 verdicts that name their judge, 48 ran on opus at xhigh, 78 at high and 310 at medium. In this repo the judge reads about 175k characters of records each time: `AGENTS.md`, `docs/decisions.md`, `CLAUDE.md`, `rules/` and larv-review's standards. `bin/routing_figures/dollars.py` already adds the lines to the dollars by rung.
### 51. Hand loop-claude's terminal output to an injected effect, so no storage or retry function prints.
"Functional core, imperative shell", in `principles/technical-principles.md`: `retried`, the worker, `first_answer`, `model_choice` and `say` print to stderr themselves, and the tests swap the global stream.
### 268. End a run whose release is ready to cut with a notice on loop-claude's terminal, in place of an interrupt that waits for an answer.
On 2026-11-08 the human answered notice only: the loop prints that the release is ready to cut and ends; no interrupt, and nothing waits in loop-inbox.
Releases are the human's, and `CLAUDE.md` → "Working loop" already ends the loop once a release is ready to cut, so the ask settles nothing. 15 interrupts in the archive ask whether the human will cut a release. On 2026-11-08 one of the 4 questions waiting in `~/.local/state/loop-claude/` is such an ask, plainpages-plugin-fastjira's 0.3.0 since 2026-11-03. Today a release ready to cut opens claude's session at once (`bin/loop_claude/cycle/run.py` `ask`), and the loop stops if the human leaves it with nothing typed. The change also touches what an interrupt covers in `CLAUDE.md` → "Vocabulary". Where the change touches `ask`, make it easier to read, as the seats named it.
"Functional core, imperative shell", in `principles/technical-principles.md`: `say` and `input_or` in `bin/loop_effects/effects.py` take the effects but print to stderr or stdout themselves, and `retried` and the rest print through `say`. Two bare `print(file=sys.stderr)` calls remain outside them, in `bin/loop_claude/cycle/interrupt.py` and `bin/loop_claude/project/model_choice.py`. The tests swap the global stream.
### 201. Save the human's tmux setups and restore them after a reboot, so work is up and running again quickly.
@@ -201,17 +277,9 @@ Today the folder is the SHA-256 of the transcript's first timestamped line, whic
Before PR #310, reports reached the worker as the Agent call's result, a median 19k tokens per chunk (2026-10-08, 68 archived transcripts). Now a reviewer returns its verdict and one line per finding, and the worker reads a 🔴 or 🟡 finding's entry from the report file. `reading-cost` counts only tracked files (`bin/reading_cost/measure.py`), and `routing-figures` counts only the Agent call's result (`bin/routing_figures/chunk.py`), so neither sees the report reads. Found by the architecture review of PR #310.
### 264. Report the comprehension seats and the escalated subagents as subagent types of their own in `routing-figures.md`, with their dollars.
Seats launch as `general-purpose`, so they hide inside that type: $301.24 of the $962.17 the figures of 2026-11-04 count, from 221 subagents. Escalations are counted by trigger only, never in dollars. `bin/routing_figures/chunk.py` groups subagents by their `subagent_type`; a seat is told apart by its prompt, and an escalated subagent by the escalation marker its prompt opens with.
### 266. Move the chunks archived under the key `home/lilleman/.claude` to the key `claude-config`, so the routing figures and `score-outcomes` count this repo's chunks as one project.
The archive holds 98 chunk folders under `home/lilleman/.claude`, from 2026-10-03 to 2026-10-29, and 4 under `claude-config`, from 2026-10-30 on. The routing figures of 2026-11-04 list no project `home/lilleman/.claude`. They find a chunk's later fixes on the default branch of the checkout its key names (`bin/routing_figures/archive.py` `measure_project`), and `/home/lilleman/.claude` is a release checkout on a detached HEAD. Item 5 fixes how keys are derived, not the chunks already archived. `~/.claude/loop-claude-models.json` still holds a `home/lilleman/.claude` entry; it is machine state outside the repo, so removing it is a one-off step on each machine, not part of the change.
### 52. Move this checkout out of Claude Code's own directory, or record why it stays, since Claude Code loads the checkout's `AGENTS.md` as the user's instructions into every project's sessions.
"One owner per value" and "Prefer the vendor-neutral option", in `principles/technical-principles.md`: git, Claude Code and loop-claude all write `~/.claude`, kept apart only by the `.gitignore` allowlist, and the repo's records live in a vendor directory. Claude Code also loads `~/.claude/AGENTS.md`, this checkout's decision titles, as the user's instructions into every session of every project, so a worker on another project reads this repo's decisions as if they held there. That cost about $25 of cache writes and reads at list prices since 2026-10-21: 10.7k characters, about 2.7k tokens, in each of 1,084 threads.
The archive holds 277 chunk folders under `home/lilleman/.claude`, from 2026-09-24 on, and 39 under `claude-config` (2026-11-10). The routing figures of 2026-11-04 list no project `home/lilleman/.claude`. They find a chunk's later fixes on the default branch of the checkout its key names (`bin/routing_figures/archive.py` `measure_project`), and `/home/lilleman/.claude` is a release checkout on a detached HEAD. Item 5 fixes how keys are derived, not the chunks already archived. `~/.claude/loop-claude-models.json` still holds a `home/lilleman/.claude` entry; it is machine state outside the repo, so removing it is a one-off step on each machine, not part of the change.
### 181. Have the test of a quoted answer's step-up assert the stepped rung's facts as literals, not through `prompts.rungs_held`.
@@ -219,7 +287,7 @@ The archive holds 98 chunk folders under `home/lilleman/.claude`, from 2026-10-0
### 192. Sort `.gitignore`'s allowlist block, from `!.claude/` to `!workflow-bench/test_review_git.py`, by code point, so rule-hook's `ignorefile-sorted` checks later edits to it again.
Found by review of PR #317. `.gitignore:56-58` holds `!bin/rule-hook` above `!bin/routing_figures/` and `!bin/routing_figures/*.py`, but `o` sorts before `u`. `ignore_breaches` in `bin/rule_hook/rules.py` skips a block that was already unsorted before an edit, so while this one stays unsorted no later edit to it is checked. The unsorted block breaches the technical principle "Deterministic order wherever order carries no meaning".
Found by review of PR #317. The block, `.gitignore:17-142` on 2026-11-10, is out of order in several places: `!bin/chunk-preflight` sits below `!bin/chunk_pr/`, and `!bin/loop-inbox` below `!bin/loop_claude/`, though `-` sorts before `_`. `LC_ALL=C sort -c` on the block names the first one. `ignore_breaches` in `bin/rule_hook/rules.py` skips a block that was already unsorted before an edit, so while this one stays unsorted no later edit to it is checked. The unsorted block breaches the technical principle "Deterministic order wherever order carries no meaning".
### 193. Narrow `readme_goals`'s mark to `Mark` by a typed lookup in place of `typing.cast`, so a mark added to the regex but not the lookup fails at run time, and one added to the lookup but not `Mark` fails mypy.
@@ -227,7 +295,7 @@ Found by review of PR #317. `bin/release_plan/ranking.py`'s `readme_goals` write
### 194. Make `test_waits_out_a_usage_limit_which_ends_a_run_of_failures` expect a usage-limit wait independent of the wall-clock time that passes during the run.
Found by review of PR #317. `bin/loop_claude/test_black_box.py:569-575` sets `resets_at` from the test's `time.time()` and expects the wait, rounded to tens, to be 3720. When more than about 5 s pass between that read and the loop's, the wait rounds to 3710 and the test fails with no bug. Item 102 covers only replacing the `time.sleep` swap; this item changes the expected value, for example by asserting the wait against `resets_at + 120` minus the time the loop read, or a bound on it.
Found by review of PR #317. The black-box test, `bin/loop_claude/test_black_box.py:609`, not the unit test of the same name in `test_loop_claude.py`, which runs on a fake clock, sets `resets_at` from the test's `time.time()` and expects the wait, rounded to tens, to be 3720. When more than about 5 s pass between that read and the loop's, the wait rounds to 3710 and the test fails with no bug. Item 102 covers only replacing the `time.sleep` swap; this item changes the expected value, for example by asserting the wait against `resets_at + 120` minus the time the loop read, or a bound on it.
### 202. Add `CLAUDE.md` → "Prose"'s rule "Write negations as people say them", with its examples, to `skills/larv-review/standards/prose.md`, so the prose reviewer holds prose to it.