From 1a83c13eb98a3a0841512b428f871656fe081c90 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 04:15:52 +0200 Subject: [PATCH 1/6] Have rule-hook refuse a round commit past round 3 unless an override quotes the human answer --- CHANGELOG.md | 1 + bin/round_titles.py | 7 +++++++ bin/rule_hook/rules.py | 10 ++++++++-- bin/rule_hook/test_rule_hook.py | 8 +++++++- bin/test_round_titles.py | 10 +++++++++- docs/decisions.md | 2 ++ docs/reading-cost.md | 4 ++++ skills/larv-review/SKILL.md | 2 +- todo.md | 5 ----- 9 files changed, 39 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ce8aa3a..968331e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- rule-hook now blocks a larv-review round commit titled past round 3, `Answer stability round 4: โ€ฆ`, unless a `round-cap` override quotes the human's yes, so a program holds the three-round cap. - loop-claude's first prompt for a chunk that no plan item routed now also names the rung on which the worker launches its reviews for an item it takes in, as the prompt after a step-up or an unfinished verdict already did. - `loop-claude --help` now describes routing in two short paragraphs for the person running the loop. The rules it used to repeat are now stated once, in the code that enforces them. - loop-claude now archives the route on each `Worker:` line as a JSON record, such as `{"model": "claude-opus-5-5", "effort": "high", "item": 3, "likelihood": 4, "escape_and_impact": 5, "escalated_at": 12}`, and reads it back field by field. The line used to be a sentence, such as `claude-opus-5-5 at high effort, routed by item 3's L of 4 and E + I of 5`, which loop-claude parsed back word for word: rewording the sentence in the code would have made every archived line unreadable, and a rerun would have routed the open chunk afresh. A rerun and the routing figures still read the sentences archived since loop-claude routed on L. A rerun that finds a `Worker:` line it can't read now says so on stderr. The judge's reply now names the levels the worker took in `highest_likelihood_taken_in` and `highest_escape_and_impact_taken_in`, in place of `bundled` and `bundled_escape_and_impact`. diff --git a/bin/round_titles.py b/bin/round_titles.py index 83795168..14a3c006 100644 --- a/bin/round_titles.py +++ b/bin/round_titles.py @@ -3,6 +3,7 @@ import re from review_passes import PASSES +# The most rounds a pass takes before the run asks the human, per `docs/decisions.md` โ†’ `review: a pass gets at most three rounds per chunk; โ€ฆ`. rule-hook's `round-cap` refuses a round title past it, and `larv-review round-count` marks a pass at it. CAP = 3 ROUND = re.compile(r"^Answer (.+?) round ([0-9]+):", re.IGNORECASE) # What follows a round title's colon: the round's ๐Ÿ”ด and ๐ŸŸก counts, then `;` and its summary, if any. @@ -27,6 +28,12 @@ def lacks_counts(title: str) -> bool: return named is not None and not FINDINGS.match(title, named.end()) +def past_cap(title: str) -> bool: + """Whether title is a round title numbered past CAP.""" + named = ROUND.match(title) + return named is not None and int(named.group(2)) > CAP + + def round_findings(titles: list[str]) -> tuple[int, int] | None: """The ๐Ÿ”ด and ๐ŸŸก counts summed over the round titles among titles; None where a round title lacks them, or no title is a round.""" counts = [] diff --git a/bin/rule_hook/rules.py b/bin/rule_hook/rules.py index 9a3c9a81..5a298075 100644 --- a/bin/rule_hook/rules.py +++ b/bin/rule_hook/rules.py @@ -3,12 +3,12 @@ import posixpath import re import typing +from round_titles import CAP, lacks_counts, past_cap from git_command import commits -from round_titles import lacks_counts from review_folder import REPORTS from shell_command import Simple -RuleName = typing.Literal["action-pin", "commit-one-line", "ignorefile-sorted", "image-pin", "no-ai-attribution", "reviewer-report", "reviewer-rung", "round-title-counts", "todo-rank-check"] +RuleName = typing.Literal["action-pin", "commit-one-line", "ignorefile-sorted", "image-pin", "no-ai-attribution", "reviewer-report", "reviewer-rung", "round-cap", "round-title-counts", "todo-rank-check"] @dataclasses.dataclass(frozen=True) @@ -52,6 +52,10 @@ RULES: dict[RuleName, Rule] = { "an Agent call, in a claude loop-claude started, whose subagent type is an agent under agents/, or whose prompt opens with seat-prompts.md's opening sentence or the one larv-review's Security section sets", overridable=False, ), + "round-cap": Rule( + f"a larv-review pass takes at most {CAP} rounds per chunk, so a commit titled `Answer round :` with past {CAP} waits for the human's yes, which the override reason quotes", + "a git commit whose message opens `Answer round :`", + ), "round-title-counts": Rule( "a larv-review round's commit title gives the counts of ๐Ÿ”ด and ๐ŸŸก findings the round reported, such as `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก; flag a deleted test`, since score-outcomes counts them", "a git commit whose message opens `Answer round :`", @@ -124,6 +128,8 @@ def command_breaches(command: str, simples: list[Simple], home: str) -> list[Bre breaches.append(Breach("commit-one-line", "pass the message as one -m '', not from a file", commit.directory)) elif len(commit.messages) > 1 or any("\n" in message.strip() for message in commit.messages): breaches.append(Breach("commit-one-line", "pass the message as one -m '', with no heredoc, second -m or newline", commit.directory)) + if any(past_cap(message) for message in commit.messages): + breaches.append(Breach("round-cap", f"the pass has had its {CAP} rounds; ask the human, and quote the yes in the override", commit.directory)) if any(lacks_counts(message) for message in commit.messages): breaches.append(Breach("round-title-counts", "open the summary after the round's colon with ` ๐Ÿ”ด, ๐ŸŸก;`", commit.directory)) return breaches diff --git a/bin/rule_hook/test_rule_hook.py b/bin/rule_hook/test_rule_hook.py index ec245253..363b5d1c 100644 --- a/bin/rule_hook/test_rule_hook.py +++ b/bin/rule_hook/test_rule_hook.py @@ -105,6 +105,12 @@ class CommandBreaches(unittest.TestCase): self.assertEqual(checked("git commit -m 'Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก; fix the parser'"), []) self.assertEqual(checked("git commit -m 'Answer the question in the README'"), []) + def test_a_round_title_past_round_3_breaks_round_cap(self): + self.assertEqual(checked("git commit -m 'Answer stability round 4: 0 ๐Ÿ”ด, 1 ๐ŸŸก; fix the parser'"), ["round-cap"]) + self.assertEqual(checked("git commit -m 'Answer stability round 3: 0 ๐Ÿ”ด, 1 ๐ŸŸก; fix the parser'"), []) + command = "git commit -m 'Answer stability round 4: 0 ๐Ÿ”ด, 1 ๐ŸŸก; fix' # rule-override round-cap: the human answered 'yes, one more'" + self.assertFalse(verdict(command_breaches(command, simple_commands(command, "/r", "/h"), "/h"), command, False, True).blocked) + def test_an_attribution_breaks_only_in_a_git_gh_or_tea_command(self): self.assertEqual(checked(f"tea pr create --description '{TRAILER}'"), ["no-ai-attribution"]) self.assertEqual(checked(f"grep -rn '{TRAILER}' ."), []) @@ -444,7 +450,7 @@ class Hook(unittest.TestCase): def test_help_lists_every_rule(self): helped = subprocess.run([str(HOOK), "--help"], capture_output=True, check=True, env=isolated_env(), text=True).stdout - for rule in ["action-pin", "commit-one-line", "ignorefile-sorted", "image-pin", "no-ai-attribution", "reviewer-report", "reviewer-rung", "round-title-counts", "todo-rank-check"]: + for rule in ["action-pin", "commit-one-line", "ignorefile-sorted", "image-pin", "no-ai-attribution", "reviewer-report", "reviewer-rung", "round-cap", "round-title-counts", "todo-rank-check"]: self.assertIn(f" {rule}\n The rule: ", helped) self.assertIn("reviewer-report\n The rule: a reviewer writes nothing but its report", helped) self.assertRegex(helped, r" reviewer-report\n( .*\n){2} Takes no override\.\n") diff --git a/bin/test_round_titles.py b/bin/test_round_titles.py index 3fc6bf4f..441b3579 100644 --- a/bin/test_round_titles.py +++ b/bin/test_round_titles.py @@ -4,7 +4,7 @@ import unittest sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent)) -from round_titles import lacks_counts, round_counts, round_findings +from round_titles import lacks_counts, past_cap, round_counts, round_findings class Rounds(unittest.TestCase): @@ -22,6 +22,14 @@ class Rounds(unittest.TestCase): self.assertIn("principles", round_counts([])) +class Cap(unittest.TestCase): + def test_finds_a_round_title_past_round_3(self): + self.assertTrue(past_cap("Answer stability round 4: 0 ๐Ÿ”ด, 1 ๐ŸŸก; fix")) + self.assertTrue(past_cap("answer full scan round 10: x")) + self.assertFalse(past_cap("Answer stability round 3: 0 ๐Ÿ”ด, 1 ๐ŸŸก; fix")) + self.assertFalse(past_cap("Answer the 4 questions")) + + class RoundFindings(unittest.TestCase): def test_sums_the_counts_each_round_title_opens_with(self): self.assertEqual(round_findings(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก; flag a deleted test", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก", "Merge origin/main"]), (1, 5)) diff --git a/docs/decisions.md b/docs/decisions.md index 38d1defa..75148c6c 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -60,6 +60,8 @@ 2026-10-15, lilleman through todo item 144: a rerun one rung up belongs to the round it reruns, so it counts toward no cap: `review: a reviewer or comprehension seat that rules the work below standard`. +2026-10-23, lilleman through todo item 214, implemented by claude: rule-hook's `round-cap` refuses a round commit titled past round 3, so a program holds the cap; the override reason quotes the human's yes. It reads the title's number, so a fourth commit titled round 3 passes it, and `larv-review round-count` still marks that pass past the cap. + ## review: a reviewer or comprehension seat that rules the work below standard may ask to rerun once, one rung up, in the same round; the ruling that stands is an escalation trigger for the worker, never for the judge 2026-10-15, lilleman asked for it through todo item 144, implemented by claude. Serves goal 1.1: a cheap reviewer that finds the work below standard can have a more capable one check that ruling, and work below standard gets a more capable rung to fix it. diff --git a/docs/reading-cost.md b/docs/reading-cost.md index 42cf969c..c5536501 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -807,3 +807,7 @@ Read most (opens and searches): Read most (opens and searches): - `skills/larv-review/SKILL.md` 1 + +## Reading cost, chunk 1bc51e408577, finished 2026-10-23T02:06:21Z + +126580 new input tokens before the first commit. diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index 1bd6fede..576301a6 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -68,7 +68,7 @@ Give a reviewer without Bash the branch diff and `git ls-files`'s output in its - **Count.** Close each round with one commit that holds the round's fixes. Title it `Answer round : ๐Ÿ”ด, ๐ŸŸก; โ€ฆ`: `` is the pass's name in lower case, such as `full scan`, and `` and `` are the ๐Ÿ”ด and ๐ŸŸก findings all the round's reviewers reported. Example: `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก; flag a deleted test`. A round that changed nothing gets an empty commit (`git commit --allow-empty`). Push the commits when ยง4 runs next, where there is a remote. `~/.claude/bin/larv-review round-count` prints each pass's count and marks a pass at the cap. The auto-reviewer's count is the number of its reviews on the PR, less its reviews of a `Record the comprehension check:` commit. - **Done.** A pass is done when its latest round leaves no ๐Ÿ”ด or ๐ŸŸก standing: none was reported, or each was shown factually wrong, declined, filed, or named under the bar per "Findings", or settled in the PR summary per "Comprehension check" โ†’ "Places", or, for the prose pass, fixed. Resolve that round's ๐ŸŸขs and โ“s per "Findings" too. - **Cap.** A pass takes at most three rounds per chunk. Instead of a fourth, list what is open and ask the user. For the auto-reviewer, ask before the push that would summon its fourth, and hold the fixes unpushed until the answer. -- **Answer.** A yes grants that pass one more round, after which the ask repeats; a no leaves the PR unmerged. +- **Answer.** A yes grants that pass one more round, after which the ask repeats; a no leaves the PR unmerged. rule-hook refuses a round commit titled past round 3 unless its `round-cap` override quotes the yes. **Re-entry.** A fix is a change no pass has seen. A fix for a ๐ŸŸข, a โ“ or a prose finding reruns no pass, whatever it changes. A round's fixes for ๐Ÿ”ด and ๐ŸŸก findings re-enter together: run, in the pass table's order, every pass that a row below names for any of them, a done pass included, then ยง4. A pass at its cap gets "Round cap" โ†’ "Cap"'s ask instead. diff --git a/todo.md b/todo.md index ee714d4f..5b603ee8 100644 --- a/todo.md +++ b/todo.md @@ -12,7 +12,6 @@ | ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score | |---|---|---|---|---|---|---|---|---|---|---|---| -| 214 | 0.4.0 | | | **Have rule-hook refuse a round commit past round 3 of its pass, unless an override quotes the human's answer, so a program holds the round cap.** | 2 | 1 | 3 | 4 | 3 | code health by 3, 1.1 by 3 | 16.6 | | 210 | 0.4.0 | | | **Hold the escalation mark in one module that states that one trigger buys one step, so a reader changes it without opening four files.** | 3 | 2 | 3 | 6 | 5 | code health by 9 | 16.2 | | 190 | 0.4.0 | | | **Rewrite the `docs/decisions.md` entries `todo.md: one table โ€ฆ`, `loop-claude: a judge decides โ€ฆ` and `loop-claude: before it opens claude โ€ฆ` as the current state, so a reader no longer replays superseded paragraphs to learn what holds.** | 2 | 2 | 1 | 3 | 3 | code health by 3, 1.4 by 2 | 15.5 | | 82 | 0.4.0 | | principle | **Sort `AGENTS.md`'s decision titles and `docs/decisions.md`'s entries by title.** | 2 | 2 | 1 | 3 | 4 | code health by 4, 1.4 by 4 | 14.6 | @@ -74,10 +73,6 @@ ## Details -### 214. Have rule-hook refuse a round commit past round 3 of its pass, unless an override quotes the human's answer, so a program holds the round cap. - -Release 0.3.0's inherited architect named `bin/round_titles.py:4` `CAP` in the first run (PR #324 at c713910): "no program loops the reviewers; the cap lives in SKILL.md prose and the code only counts rounds and prints a note". The same seat named `bin/rule_hook/rules.py:55` `round-title-counts` in the rerun: "no program blocks a fourth review round; rule-hook checks only the counts inside a round's title". This lowers Self-sufficiency: a reader of `CAP` must know larv-review's "Round cap" to learn what holds it. The cap is `docs/decisions.md` โ†’ `review: a pass gets at most three rounds per chunk; instead of a fourth, the run asks the human`. Make `CAP` and `round-title-counts` easier to read. - ### 210. Hold the escalation mark in one module that states that one trigger buys one step, so a reader changes it without opening four files. Release 0.3.0's scoring runs found the mark spread out (first run: PR #324 at c713910; rerun: PR #324 rerun at c713910). `bin/model_routing/route.py:66` `Route.escalated_at`: "the escalation mark lives in six units across four files" (Junior A, first run), "one concept spread over five files" (Mid A, rerun). `bin/loop_claude/cycle/judge.py:153` `escalation_mark`: "no single place states that one trigger buys one step" (Maintainability senior, rerun). `bin/loop_claude/cycle/run.py:45` `Cycle.stepped_from` and `:69` `escalated`: "state outside the state machine, cleared on every event but HumanTyped" (Mid A, rerun). `bin/loop_claude/cycle/judge.py:216` `quotes_checked` checks the escalation against `Grounds.since_step` beside the quoted answer: "three quote checks follow different rules" (Junior A, rerun). This lowers Locality: changing the mark means opening `route.py`, `judge.py`, `run.py` and `routing.py` together. Move the mark's stamping, `STEP_LINE`, the since-step grounds and their check, and the step's state into one module, and make `stepped_from` part of the cycle's state machine. Make `Route.escalated_at`, `escalation_mark`, `Cycle.stepped_from`, `escalated` and `quotes_checked` easier to read. The archive's `Worker:` record holds the mark as `escalated_at`, so a rerun keeps it; the move keeps that field. `escalation_mark` now lives in `bin/loop_claude/verdicts.py`. From dceff3c985cad2de79126cc0359f3919ee66c2e1 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 04:23:52 +0200 Subject: [PATCH 2/6] =?UTF-8?q?Answer=20principles=20round=201:=201=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1;=20file=20the=20title-only=20c?= =?UTF-8?q?ount=20as=20item=20220=20and=20cite=20it=20in=20the=20decision?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/decisions.md | 2 +- todo.md | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/decisions.md b/docs/decisions.md index 75148c6c..7e607764 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -60,7 +60,7 @@ 2026-10-15, lilleman through todo item 144: a rerun one rung up belongs to the round it reruns, so it counts toward no cap: `review: a reviewer or comprehension seat that rules the work below standard`. -2026-10-23, lilleman through todo item 214, implemented by claude: rule-hook's `round-cap` refuses a round commit titled past round 3, so a program holds the cap; the override reason quotes the human's yes. It reads the title's number, so a fourth commit titled round 3 passes it, and `larv-review round-count` still marks that pass past the cap. +2026-10-23, lilleman through todo item 214, implemented by claude: rule-hook's `round-cap` refuses a round commit titled past round 3, so a program holds the cap; the override reason quotes the human's yes. It reads the title's number, so a fourth commit titled round 3 passes it, and `larv-review round-count` still marks that pass past the cap; `todo.md` item 220 closes the gap. ## review: a reviewer or comprehension seat that rules the work below standard may ask to rerun once, one rung up, in the same round; the ruling that stands is an escalation trigger for the worker, never for the judge diff --git a/todo.md b/todo.md index 5b603ee8..b5d76958 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 0.1` -`Next ID = 220` +`Next ID = 221` ## Items @@ -58,6 +58,7 @@ | 77 | 0.5.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 | 3.2 | | 4 | 0.5.0 | | | **Name each chunk's archive folder by the chunk's start time, so `/` lists chunks in the order they ran.** | 3 | 2 | 3 | 6 | 3 | 1.1 by 3 | 3.2 | | 187 | 0.5.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 | 3.0 | +| 220 | 0.5.0 | | decision | **Have rule-hook also count a pass's earlier round commits on the branch, so a fourth commit titled round 3 is refused too.** | 3 | 2 | 3 | 6 | 3 | 1.4 by 3 | 3.0 | | 149 | 0.5.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 | 3.0 | | 165 | 0.5.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 | 2.9 | | 151 | 0.5.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 | 2.9 | @@ -293,6 +294,10 @@ 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/measure.py`), so neither sees the report reads. Found by the architecture review of PR #310. +### 220. Have rule-hook also count a pass's earlier round commits on the branch, so a fourth commit titled round 3 is refused too. + +Found by the principles pass of PR #360 (item 214). rule-hook's `round-cap` reads only the number in the title being committed (`bin/round_titles.py` `past_cap`), while `larv-review round-count` (`round_counts`) also counts repeated numbers, so a fourth commit titled `Answer stability round 3: โ€ฆ` passes the hook. Have `command_breaches`' caller in `bin/rule_hook/main.py` read the titles of `..HEAD` in each round commit's checkout, with the hook's guarded git (`bin/rule_hook/git.py`), and refuse the commit when `round_counts(titles)` already holds 3 for its pass. The hook must not fetch from origin, as `git_repo.default_branch` does, and a `git commit --amend` must not count the commit it replaces. Hard part: the hook runs on every commit, so a slow or failing lookup must not block it. The change touches `bin/round_titles.py:4` `CAP`, which the comprehension seats found hard; make it easier to read. + ### 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. From a99a98c504ec3b4f092a0770c15930f002bf9cbf Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 04:23:52 +0200 Subject: [PATCH 3/6] =?UTF-8?q?Answer=20stability=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1;=20test=20the=20checkout=20a?= =?UTF-8?q?=20round-cap=20breach=20names?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/rule_hook/test_rule_hook.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/rule_hook/test_rule_hook.py b/bin/rule_hook/test_rule_hook.py index 363b5d1c..47ce8e23 100644 --- a/bin/rule_hook/test_rule_hook.py +++ b/bin/rule_hook/test_rule_hook.py @@ -108,6 +108,12 @@ class CommandBreaches(unittest.TestCase): def test_a_round_title_past_round_3_breaks_round_cap(self): self.assertEqual(checked("git commit -m 'Answer stability round 4: 0 ๐Ÿ”ด, 1 ๐ŸŸก; fix the parser'"), ["round-cap"]) self.assertEqual(checked("git commit -m 'Answer stability round 3: 0 ๐Ÿ”ด, 1 ๐ŸŸก; fix the parser'"), []) + + def test_a_round_cap_breach_names_the_commit_s_checkout(self): + command = "git -C /x commit -m 'Answer stability round 4: 0 ๐Ÿ”ด, 1 ๐ŸŸก; fix'" + self.assertEqual([(breach.rule, breach.directory) for breach in command_breaches(command, simple_commands(command, "/r", "/h"), "/h")], [("round-cap", "/x")]) + + def test_an_override_quoting_the_human_s_yes_lets_a_round_past_the_cap_through(self): command = "git commit -m 'Answer stability round 4: 0 ๐Ÿ”ด, 1 ๐ŸŸก; fix' # rule-override round-cap: the human answered 'yes, one more'" self.assertFalse(verdict(command_breaches(command, simple_commands(command, "/r", "/h"), "/h"), command, False, True).blocked) From a85b0a44d5a2bc91a4840ccee18c948e3cf0c942 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 04:27:25 +0200 Subject: [PATCH 4/6] =?UTF-8?q?Answer=20principles=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1;=20approved?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From 9f044044abd78afda0ab8e13c26d156b30d02875 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 04:27:25 +0200 Subject: [PATCH 5/6] =?UTF-8?q?Answer=20stability=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1;=20approved?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From ef12b17d8bdbd44ec716aad98fc4fdc9a7a0d2fb Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 04:29:37 +0200 Subject: [PATCH 6/6] =?UTF-8?q?Answer=20prose=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1;=20tighten=20the=20changelog,?= =?UTF-8?q?=20decision=20and=20item=20220=20wording?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 +- bin/round_titles.py | 2 +- docs/decisions.md | 2 +- todo.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 968331e1..5ab9609a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -- rule-hook now blocks a larv-review round commit titled past round 3, `Answer stability round 4: โ€ฆ`, unless a `round-cap` override quotes the human's yes, so a program holds the three-round cap. +- rule-hook now blocks a larv-review round commit titled past round 3, such as `Answer stability round 4: โ€ฆ`, unless a `round-cap` override quotes the human's yes. - loop-claude's first prompt for a chunk that no plan item routed now also names the rung on which the worker launches its reviews for an item it takes in, as the prompt after a step-up or an unfinished verdict already did. - `loop-claude --help` now describes routing in two short paragraphs for the person running the loop. The rules it used to repeat are now stated once, in the code that enforces them. - loop-claude now archives the route on each `Worker:` line as a JSON record, such as `{"model": "claude-opus-5-5", "effort": "high", "item": 3, "likelihood": 4, "escape_and_impact": 5, "escalated_at": 12}`, and reads it back field by field. The line used to be a sentence, such as `claude-opus-5-5 at high effort, routed by item 3's L of 4 and E + I of 5`, which loop-claude parsed back word for word: rewording the sentence in the code would have made every archived line unreadable, and a rerun would have routed the open chunk afresh. A rerun and the routing figures still read the sentences archived since loop-claude routed on L. A rerun that finds a `Worker:` line it can't read now says so on stderr. The judge's reply now names the levels the worker took in `highest_likelihood_taken_in` and `highest_escape_and_impact_taken_in`, in place of `bundled` and `bundled_escape_and_impact`. diff --git a/bin/round_titles.py b/bin/round_titles.py index 14a3c006..a640a6dd 100644 --- a/bin/round_titles.py +++ b/bin/round_titles.py @@ -3,7 +3,7 @@ import re from review_passes import PASSES -# The most rounds a pass takes before the run asks the human, per `docs/decisions.md` โ†’ `review: a pass gets at most three rounds per chunk; โ€ฆ`. rule-hook's `round-cap` refuses a round title past it, and `larv-review round-count` marks a pass at it. +# The most rounds a pass takes before the run asks the human, per `docs/decisions.md` โ†’ `review: a pass gets at most three rounds per chunk; โ€ฆ`. rule-hook's `round-cap` refuses a round title past it, and `larv-review round-count` marks a pass at or past it. CAP = 3 ROUND = re.compile(r"^Answer (.+?) round ([0-9]+):", re.IGNORECASE) # What follows a round title's colon: the round's ๐Ÿ”ด and ๐ŸŸก counts, then `;` and its summary, if any. diff --git a/docs/decisions.md b/docs/decisions.md index 7e607764..a8bfcbc0 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -60,7 +60,7 @@ 2026-10-15, lilleman through todo item 144: a rerun one rung up belongs to the round it reruns, so it counts toward no cap: `review: a reviewer or comprehension seat that rules the work below standard`. -2026-10-23, lilleman through todo item 214, implemented by claude: rule-hook's `round-cap` refuses a round commit titled past round 3, so a program holds the cap; the override reason quotes the human's yes. It reads the title's number, so a fourth commit titled round 3 passes it, and `larv-review round-count` still marks that pass past the cap; `todo.md` item 220 closes the gap. +2026-10-23, lilleman through todo item 214, implemented by claude: rule-hook's `round-cap` refuses a round commit titled past round 3 unless its override reason quotes the human's yes. It reads only the title's number, so a fourth commit titled round 3 passes it, while `larv-review round-count` marks that pass past the cap; `todo.md` item 220 closes the gap. ## review: a reviewer or comprehension seat that rules the work below standard may ask to rerun once, one rung up, in the same round; the ruling that stands is an escalation trigger for the worker, never for the judge diff --git a/todo.md b/todo.md index b5d76958..9d3cc4de 100644 --- a/todo.md +++ b/todo.md @@ -296,7 +296,7 @@ Before PR #310, reports reached the worker as the Agent call's result, a median ### 220. Have rule-hook also count a pass's earlier round commits on the branch, so a fourth commit titled round 3 is refused too. -Found by the principles pass of PR #360 (item 214). rule-hook's `round-cap` reads only the number in the title being committed (`bin/round_titles.py` `past_cap`), while `larv-review round-count` (`round_counts`) also counts repeated numbers, so a fourth commit titled `Answer stability round 3: โ€ฆ` passes the hook. Have `command_breaches`' caller in `bin/rule_hook/main.py` read the titles of `..HEAD` in each round commit's checkout, with the hook's guarded git (`bin/rule_hook/git.py`), and refuse the commit when `round_counts(titles)` already holds 3 for its pass. The hook must not fetch from origin, as `git_repo.default_branch` does, and a `git commit --amend` must not count the commit it replaces. Hard part: the hook runs on every commit, so a slow or failing lookup must not block it. The change touches `bin/round_titles.py:4` `CAP`, which the comprehension seats found hard; make it easier to read. +Found by the principles pass of PR #360 (item 214). rule-hook's `round-cap` reads only the number in the title being committed (`bin/round_titles.py` `past_cap`), while `larv-review round-count` (`round_counts`) also counts repeated numbers, so a fourth commit titled `Answer stability round 3: โ€ฆ` passes the hook. Have `bash_breaches` in `bin/rule_hook/main.py` read the titles of `..HEAD` in each round commit's checkout, with the hook's guarded git (`bin/rule_hook/git.py`), and refuse the commit when `round_counts(titles)` already holds 3 for its pass. The hook must not fetch from origin, as `git_repo.default_branch` does; it already has a lookup that needs no fetch, `local_default_branch` in `bin/rule_hook/override_log.py`. A `git commit --amend` must not count the commit it replaces. Hard part: the hook runs on every commit, so a slow or failing lookup must not block the commit. The change touches `bin/round_titles.py` `CAP`, which the comprehension seats found hard; make it easier to read. ### 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.