From e00eb558c2ed51415103bde21a99555cd1d6cb5c Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 11:23:44 +0200 Subject: [PATCH 01/19] Append the reading-cost figure --- docs/reading-cost.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/reading-cost.md b/docs/reading-cost.md index 25394451..ce7d8f41 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -847,3 +847,11 @@ Read most (opens and searches): - `docs/decisions.md` 2 - `rules/todo-items.md` 2 - `docs/score-anchors.md` 1 + +## Reading cost, chunk a4941f71602f, finished 2026-10-23T09:16:58Z + +125323 new input tokens before the first commit. + +Read most (opens and searches): + +- `skills/larv-review/SKILL.md` 2 -- 2.52.0 From 4d18b8e125f8a94bfa25f54835279359a03456b5 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 11:23:44 +0200 Subject: [PATCH 02/19] Count, per finished chunk, the findings that arose from misreading code that had already shipped --- AGENTS.md | 1 + CHANGELOG.md | 1 + bin/round_titles.py | 22 +++++++++++++---- bin/rule_hook/rules.py | 4 +-- bin/rule_hook/test_rule_hook.py | 13 +++++----- bin/score_outcomes/main.py | 13 ++++++++-- bin/score_outcomes/results.py | 23 ++++++++++++++--- bin/score_outcomes/test_score_outcomes.py | 30 ++++++++++++++++++++--- bin/test_round_titles.py | 20 +++++++++++++-- docs/decisions.md | 6 ++++- skills/larv-review/SKILL.md | 2 +- skills/larv-review/review-findings.md | 6 ++++- todo.md | 5 ---- 13 files changed, 113 insertions(+), 33 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index ae169ef8..d4fcbd04 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -26,6 +26,7 @@ Decisions live in `docs/decisions.md`: - review: a project decision may opt every chunk out of the architect, the product-owner pass or the comprehension check, and a project opting out of the comprehension check voids code health - review: a project decision may suspend the comprehension check for the plan items it names - 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 +- review: a reviewer under `agents/` marks a ๐Ÿ”ด or ๐ŸŸก `[misread]` where the implementer misread code that had already shipped, each round title counts the marked findings, and `score-outcomes` lists them per chunk - review: an ask no user answers leaves the PR unmerged - 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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f5eeb1f..6580b5d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- Reviewers now mark a ๐Ÿ”ด or ๐ŸŸก `[misread]` where it arose because the implementer misread code that had already shipped. A round's commit title now counts the marked findings, as in `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); โ€ฆ`, and rule-hook's `round-title-counts` blocks a round title without that count. `score-outcomes` shows the count on each finished item, and ends its report with each chunk's count, newest first. Chunks titled before this change read as unknown. - larv-review's skill now says a commit answering the external auto-reviewer takes no `Answer round` title, and that `larv-review round-count` doesn't list the auto-reviewer. A worker who followed the skill used to get a "not a pass" warning. - 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. diff --git a/bin/round_titles.py b/bin/round_titles.py index a640a6dd..fdd6af46 100644 --- a/bin/round_titles.py +++ b/bin/round_titles.py @@ -1,4 +1,4 @@ -"""The titles of larv-review's round commits, `Answer round : ๐Ÿ”ด, ๐ŸŸก; `: each pass's round count, and the findings the rounds reported.""" +"""The titles of larv-review's round commits, `Answer round : ๐Ÿ”ด, ๐ŸŸก ( misread); `: each pass's round count, and the findings the rounds reported. counts the ๐Ÿ”ด and ๐ŸŸก findings a reviewer marked `[misread]`, because the implementer misread code that had already shipped.""" import re from review_passes import PASSES @@ -6,8 +6,8 @@ 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 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. -FINDINGS = re.compile(r" ([0-9]+) ๐Ÿ”ด, ([0-9]+) ๐ŸŸก(?:;|$)") +# What follows a round title's colon: the round's ๐Ÿ”ด and ๐ŸŸก counts, then how many of them were misread, which titles from before the count lack, then `;` and its summary, if any. +FINDINGS = re.compile(r" ([0-9]+) ๐Ÿ”ด, ([0-9]+) ๐ŸŸก(?: \(([0-9]+) misread\))?(?:;|$)") def round_counts(titles: list[str]) -> dict[str, int]: @@ -23,9 +23,9 @@ def round_counts(titles: list[str]) -> dict[str, int]: def lacks_counts(title: str) -> bool: - """Whether title is a round title without the counts after its colon.""" + """Whether title is a round title without all three counts after its colon.""" named = ROUND.match(title) - return named is not None and not FINDINGS.match(title, named.end()) + return named is not None and ((found := FINDINGS.match(title, named.end())) is None or found.group(3) is None) def past_cap(title: str) -> bool: @@ -44,3 +44,15 @@ def round_findings(titles: list[str]) -> tuple[int, int] | None: return None counts.append((int(found.group(1)), int(found.group(2)))) return (sum(red for red, _ in counts), sum(yellow for _, yellow in counts)) if counts else None + + +def round_misreads(titles: list[str]) -> int | None: + """The misread counts summed over the round titles among titles; None where a round title lacks one, or no title is a round.""" + counts = [] + for title in titles: + if named := ROUND.match(title): + found = FINDINGS.match(title, named.end()) + if not found or found.group(3) is None: + return None + counts.append(int(found.group(3))) + return sum(counts) if counts else None diff --git a/bin/rule_hook/rules.py b/bin/rule_hook/rules.py index 42a58c10..451c2043 100644 --- a/bin/rule_hook/rules.py +++ b/bin/rule_hook/rules.py @@ -57,7 +57,7 @@ RULES: dict[RuleName, Rule] = { "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 larv-review round's commit title gives the counts of ๐Ÿ”ด and ๐ŸŸก findings the round reported, and how many of them a reviewer marked `[misread]`, such as `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); flag a deleted test`, since score-outcomes counts them", "a git commit whose message opens `Answer round :`", ), "todo-rank-check": Rule( @@ -132,7 +132,7 @@ def command_breaches(command: str, simples: list[Simple], home: str) -> list[Bre 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)) + breaches.append(Breach("round-title-counts", "open the summary after the round's colon with ` ๐Ÿ”ด, ๐ŸŸก ( misread);`", commit.directory)) return breaches diff --git a/bin/rule_hook/test_rule_hook.py b/bin/rule_hook/test_rule_hook.py index a3232462..c784d24f 100644 --- a/bin/rule_hook/test_rule_hook.py +++ b/bin/rule_hook/test_rule_hook.py @@ -101,20 +101,21 @@ class CommandBreaches(unittest.TestCase): def test_a_round_title_without_its_counts_breaks_round_title_counts(self): self.assertEqual(checked("git commit -m 'Answer stability round 1: fix the parser'"), ["round-title-counts"]) - self.assertEqual(checked("git commit --allow-empty -m 'Answer prose round 2: 0 ๐Ÿ”ด, 0 ๐ŸŸก'"), []) - self.assertEqual(checked("git commit -m 'Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก; fix the parser'"), []) + self.assertEqual(checked("git commit -m 'Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก; fix the parser'"), ["round-title-counts"]) + self.assertEqual(checked("git commit --allow-empty -m 'Answer prose round 2: 0 ๐Ÿ”ด, 0 ๐ŸŸก (0 misread)'"), []) + self.assertEqual(checked("git commit -m 'Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); 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'"), []) + self.assertEqual(checked("git commit -m 'Answer stability round 4: 0 ๐Ÿ”ด, 1 ๐ŸŸก (0 misread); fix the parser'"), ["round-cap"]) + self.assertEqual(checked("git commit -m 'Answer stability round 3: 0 ๐Ÿ”ด, 1 ๐ŸŸก (0 misread); 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'" + command = "git -C /x commit -m 'Answer stability round 4: 0 ๐Ÿ”ด, 1 ๐ŸŸก (0 misread); 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'" + command = "git commit -m 'Answer stability round 4: 0 ๐Ÿ”ด, 1 ๐ŸŸก (0 misread); fix' # rule-override round-cap: the human answered 'yes, one more'" self.assertFalse(check(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): diff --git a/bin/score_outcomes/main.py b/bin/score_outcomes/main.py index 7a1ac8c2..d681d238 100644 --- a/bin/score_outcomes/main.py +++ b/bin/score_outcomes/main.py @@ -20,7 +20,11 @@ holds R and S, and C too where its table also had A, G and Goals. The chunk meas titles, each pass's rounds as `larv-review round-count` counts them, less one, summed; - ๐Ÿ”ด and ๐ŸŸก findings: summed over those titles, each opening ` ๐Ÿ”ด, ๐ŸŸก` after the colon, such as `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก; flag a deleted test`. Unknown where a round title - lacks the counts, or the branch has no round. + lacks the counts, or the branch has no round; +- findings from misread shipped code: of those ๐Ÿ”ด and ๐ŸŸก findings, the ones a reviewer marked + `[misread]`, because the implementer misread code that had already shipped, summed over the titles' + `( misread)` after the ๐ŸŸก count, such as `1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread)`. Unknown where a round title + lacks the count, as every title from before it does, or the branch has no round. A chunk is marked `by rebase` where a commit in it has a committer time apart from its author time, since a rebase replays a pull request's commits at once, and `never replayed` where none does, since @@ -48,6 +52,10 @@ that shipped one item, since a chunk measures all its items at once. It leaves o replayed, which may hold only part of a pull request. It reports a score only once 10 of the chunks it counts hold it and its outcomes. +Last, each finished chunk's findings from misread shipped code among its ๐Ÿ”ด and ๐ŸŸก findings, newest +first, for every chunk whose round titles count them: code health's counter-signal in +~/.claude/CLAUDE.md โ†’ "Shared goal". + Exit 1, saying why, on bad arguments, when git cannot start, finds no checkout or reads a shallow clone, or the default branch cannot be read; or, after the rest of the report, when the anchors are left out. @@ -57,7 +65,7 @@ import re import sys from score_outcomes.anchors import anchor_lines, Anchors, ANCHORS_PATH, parse_anchors -from score_outcomes.results import Chunk, Landing, nearest, render, report, Result, results_of, shipped +from score_outcomes.results import Chunk, Landing, misreads, nearest, render, report, Result, results_of, shipped from git_repo import default_branch, file_at, full_history, git, top from failure import Failure from todo_table import LEVELS, risk, TOP_SCORE @@ -108,6 +116,7 @@ def report_text(results: list[Result], anchored: Anchors | Failure, given: dict[ sections.append([f"Finished items nearest L {given['L']}, E {given['E']}, I {given['I']}, so R {r}, and S {given['S']}, closest first:", "", *near]) sections.append([f"Anchors in {ANCHORS_PATH}, each level's shipped items:", "", *anchor_lines(anchored, results)]) sections.append(["Median outcome at each guessed score, among chunks that shipped one item, never-replayed ones left out:", "", *report(results)]) + sections.append(["๐Ÿ”ด and ๐ŸŸก findings from misread shipped code, per finished chunk whose round titles count them, newest first:", "", *misreads(results)]) if any(result.landed != "merge" for result in results): sections.append(UNMERGED) return "\n\n".join("\n".join(section) for section in sections) diff --git a/bin/score_outcomes/results.py b/bin/score_outcomes/results.py index 8da50edf..7e89e124 100644 --- a/bin/score_outcomes/results.py +++ b/bin/score_outcomes/results.py @@ -6,7 +6,7 @@ from comprehension_history import HISTORY from todo_table import Item, items from markdown_text import listed from reading_cost.figures import RECORD -from round_titles import round_counts, round_findings +from round_titles import round_counts, round_findings, round_misreads # Fewest single-item chunks a score needs before its medians print: the 10 figures the reading-cost trend waits for; no published standard sets either. ENOUGH = 10 @@ -22,7 +22,7 @@ Chunk = tuple[str, str, int, Landing] # The tool's name and report call a Result an outcome, a word the code keeps for an entry of a `.outcomes.md` file: docs/decisions.md โ†’ `bin/: an outcome is an entry`. @dataclasses.dataclass(frozen=True) class Result: - """What the chunk that shipped an item measured. findings holds the ๐Ÿ”ด and ๐ŸŸก counts, None where a round title lacks them or the branch has no round. landed says how the chunk reached the default branch: by a merge commit, by a rebase that replayed its commits, or by commits never replayed.""" + """What the chunk that shipped an item measured. findings holds the ๐Ÿ”ด and ๐ŸŸก counts, None where a round title lacks them or the branch has no round. landed says how the chunk reached the default branch: by a merge commit, by a rebase that replayed its commits, or by commits never replayed. misread counts the ๐Ÿ”ด and ๐ŸŸก findings that arose from misreading code that had already shipped, None where a round title lacks the count or the branch has no round.""" item: Item merge: str merged: str @@ -32,6 +32,7 @@ class Result: rounds_past_first: int findings: tuple[int, int] | None landed: Landing + misread: int | None # A measure's name and how to read it from a Result, None where the chunk did not record it. @@ -63,7 +64,7 @@ def results_of(shipped: list[Item], merge: str, merged: str, numstat: str, title lines = sum(int(count) for row in work for count in row[:2] if count.isdigit()) past_first = sum(max(0, count - 1) for count in round_counts(titles).values()) ids = [item.id for item in shipped] - return [Result(item, merge, merged, tuple(id_ for id_ in ids if id_ != item.id), lines, len(work), past_first, round_findings(titles), landed) for item in shipped] + return [Result(item, merge, merged, tuple(id_ for id_ in ids if id_ != item.id), lines, len(work), past_first, round_findings(titles), landed, round_misreads(titles)) for item in shipped] def nearest(results: list[Result], given: dict[str, int], count: int = 5) -> list[Result]: @@ -100,6 +101,19 @@ def report(results: list[Result]) -> list[str]: return lines +def misreads(results: list[Result]) -> list[str]: + """For each chunk whose round titles count them, newest first: its ๐Ÿ”ด and ๐ŸŸก findings from misread shipped code, among all its ๐Ÿ”ด and ๐ŸŸก findings.""" + # A chunk that shipped several items gives each the same Result fields but item, so one line per chunk. + chunks = {result.merge: result for result in results} + lines = [] + for result in sorted(chunks.values(), key=lambda result: result.merged, reverse=True): + if result.misread is None or result.findings is None: + continue + at_least = "" if result.landed == "merge" else "at least " + lines.append(f"- {result.merged} in {result.merge}: {at_least}{result.misread} of {result.findings[0]} ๐Ÿ”ด, {result.findings[1]} ๐ŸŸก") + return lines or ["- None: no chunk's round titles count them."] + + def too_few(held: int, name: str, what: str) -> str: chunks = "such chunk records" if held == 1 else "such chunks record" return f"{held} {chunks} {name} and {what}; the report needs {ENOUGH}." @@ -123,7 +137,8 @@ def render(result: Result) -> str: # Rebase drops a round's commit that changed no file, so history shows such a chunk's rounds and findings short. at_least = "" if result.landed == "merge" else "at least " merged = {"merge": f"merged {result.merged} in {result.merge}", "rebase": f"merged {result.merged} by rebase in {result.merge}", "push": f"committed {result.merged} in {result.merge}, never replayed, so perhaps part of a pull request"}[result.landed] - findings = f"{at_least}{result.findings[0]} ๐Ÿ”ด, {result.findings[1]} ๐ŸŸก" if result.findings else "findings unknown" + misread = "" if result.misread is None else f" ({result.misread} misread)" + findings = f"{at_least}{result.findings[0]} ๐Ÿ”ด, {result.findings[1]} ๐ŸŸก{misread}" if result.findings else "findings unknown" others = result.shipped_with together = f", with item{'s' if len(others) > 1 else ''} {', '.join(map(str, others))}" if others else "" return f"- Item {result.item.id}, {scores}: {plural(result.lines, 'line')} in {plural(result.files, 'file')}, {at_least}{plural(result.rounds_past_first, 'round')} past each pass's first, {findings}; {merged}{together}. {result.item.tagline}" diff --git a/bin/score_outcomes/test_score_outcomes.py b/bin/score_outcomes/test_score_outcomes.py index bd7486e7..3d49b392 100644 --- a/bin/score_outcomes/test_score_outcomes.py +++ b/bin/score_outcomes/test_score_outcomes.py @@ -29,8 +29,8 @@ def item(id_: int, scores: dict[str, int]) -> Item: return Item(id_, (0, 1, 0), "", f"**Item {id_}.**", scores, (("1", None),), ()) -def result(id_: int, r: int, s: int, c: int | None, lines: int = 10, rounds: int = 1, findings: tuple[int, int] | None = (0, 0), merged: str = "2026-10-13T10:00:00Z", shipped_with: tuple[int, ...] = (), levels: dict[str, int] | None = None, landed: Landing = "merge") -> Result: - return Result(item(id_, {"R": r, "S": s} | ({"C": c} if c else {}) | (levels or {})), "aaaaaaa", merged, shipped_with, lines, 1, rounds, findings, landed) +def result(id_: int, r: int, s: int, c: int | None, lines: int = 10, rounds: int = 1, findings: tuple[int, int] | None = (0, 0), merged: str = "2026-10-13T10:00:00Z", shipped_with: tuple[int, ...] = (), levels: dict[str, int] | None = None, landed: Landing = "merge", misread: int | None = None, merge: str = "aaaaaaa") -> Result: + return Result(item(id_, {"R": r, "S": s} | ({"C": c} if c else {}) | (levels or {})), merge, merged, shipped_with, lines, 1, rounds, findings, landed, misread) class Shipped(unittest.TestCase): @@ -77,9 +77,13 @@ class ResultsOf(unittest.TestCase): numstat = "3\t1\ta.py\n-\t-\tlogo.png\n0\t1\t2026\n5\t0\ttodo.md\n9\t0\tdocs/reading-cost.md\n4\t0\tdocs/comprehension-history.md\n" titles = ["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก; fix", "Answer stability round 2: 0 ๐Ÿ”ด, 1 ๐ŸŸก; fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก", "Do it"] found = results_of([item(4, {"R": 2}), item(5, {"R": 3})], "abc1234", "2026-10-13T10:00:00Z", numstat, titles, "merge") - self.assertEqual(found[0], Result(item(4, {"R": 2}), "abc1234", "2026-10-13T10:00:00Z", (5,), 5, 3, 1, (1, 6), "merge")) + self.assertEqual(found[0], Result(item(4, {"R": 2}), "abc1234", "2026-10-13T10:00:00Z", (5,), 5, 3, 1, (1, 6), "merge", None)) self.assertEqual(found[1].shipped_with, (4,)) + def test_counts_the_findings_from_misread_shipped_code_where_every_round_title_counts_them(self): + titles = ["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (2 misread); fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก (1 misread)"] + self.assertEqual(results_of([item(4, {"R": 2})], "abc1234", "2026-10-13T10:00:00Z", "3\t1\ta.py\n", titles, "merge")[0].misread, 3) + def test_measures_no_chunk_that_changed_only_the_plan(self): self.assertEqual(results_of([item(4, {"R": 2})], "abc1234", "2026-10-13T10:00:00Z", "0\t5\ttodo.md\n", [], "merge"), []) @@ -143,6 +147,10 @@ class Render(unittest.TestCase): self.assertEqual(render(result(4, 2, 3, 4, findings=(1, 2))), "- Item 4, R 2, S 3, C 4: 10 lines in 1 file, 1 round past each pass's first, 1 ๐Ÿ”ด, 2 ๐ŸŸก; merged 2026-10-13T10:00:00Z in aaaaaaa. **Item 4.**") self.assertIn("1 round past each pass's first, 0 ๐Ÿ”ด, 0 ๐ŸŸก; merged 2026-10-13T10:00:00Z in aaaaaaa, with item 5. ", render(result(4, 2, 3, 4, rounds=1, shipped_with=(5,)))) + def test_counts_the_findings_from_misread_shipped_code_where_its_round_titles_do(self): + self.assertIn("1 round past each pass's first, 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); merged", render(result(4, 2, 3, None, findings=(1, 2), misread=1))) + self.assertIn("1 round past each pass's first, 0 ๐Ÿ”ด, 0 ๐ŸŸก (0 misread); merged", render(result(4, 2, 3, None, misread=0))) + def test_gives_a_rebase_merged_chunks_rounds_and_findings_as_lower_bounds(self): self.assertEqual(render(result(4, 2, 3, None, findings=(1, 2), landed="rebase")), "- Item 4, R 2, S 3: 10 lines in 1 file, at least 1 round past each pass's first, at least 1 ๐Ÿ”ด, 2 ๐ŸŸก; merged 2026-10-13T10:00:00Z by rebase in aaaaaaa. **Item 4.**") self.assertIn("at least 1 round past each pass's first, findings unknown; merged 2026-10-13T10:00:00Z by rebase in aaaaaaa", render(result(4, 2, 3, None, findings=None, landed="rebase"))) @@ -204,7 +212,21 @@ Median outcome at each guessed score, among chunks that shipped one item, never- - S, lines changed: 2 {too_few} S and its outcome; the report needs 10. - L, by review rounds past each pass's first and ๐Ÿ”ด findings: 0 {too_few} L and both outcomes; the report needs 10. - E, by review rounds past each pass's first and ๐Ÿ”ด findings: 0 {too_few} E and both outcomes; the report needs 10. -- I, by review rounds past each pass's first and ๐Ÿ”ด findings: 0 {too_few} I and both outcomes; the report needs 10.""") +- I, by review rounds past each pass's first and ๐Ÿ”ด findings: 0 {too_few} I and both outcomes; the report needs 10. + +๐Ÿ”ด and ๐ŸŸก findings from misread shipped code, per finished chunk whose round titles count them, newest first: + +- None: no chunk's round titles count them.""") + + def test_lists_each_chunks_findings_from_misread_shipped_code_newest_first_once_per_chunk(self): + found = [result(1, 5, 3, None, findings=(1, 2), misread=1, merge="bbbbbbb", merged="2026-10-12T10:00:00Z", shipped_with=(2,)), result(2, 5, 3, None, findings=(1, 2), misread=1, merge="bbbbbbb", merged="2026-10-12T10:00:00Z", shipped_with=(1,)), result(3, 5, 3, None, findings=(0, 4), misread=0, merge="ccccccc", merged="2026-10-14T10:00:00Z", landed="rebase"), result(4, 5, 3, None)] + self.assertIn("""๐Ÿ”ด and ๐ŸŸก findings from misread shipped code, per finished chunk whose round titles count them, newest first: + +- 2026-10-14T10:00:00Z in ccccccc: at least 0 of 0 ๐Ÿ”ด, 4 ๐ŸŸก +- 2026-10-12T10:00:00Z in bbbbbbb: 1 of 1 ๐Ÿ”ด, 2 ๐ŸŸก""", report_text(found, [], None)) + self.assertIn("""๐Ÿ”ด and ๐ŸŸก findings from misread shipped code, per finished chunk whose round titles count them, newest first: + +- None: no chunk's round titles count them.""", report_text([result(4, 5, 3, None)], [], None)) def test_ends_with_how_it_reads_chunks_merged_by_rebase_only_where_it_measured_one(self): text = report_text([result(1, 5, 3, None, landed="rebase")], [], None) diff --git a/bin/test_round_titles.py b/bin/test_round_titles.py index 441b3579..51b01202 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, past_cap, round_counts, round_findings +from round_titles import lacks_counts, past_cap, round_counts, round_findings, round_misreads class Rounds(unittest.TestCase): @@ -39,12 +39,28 @@ class RoundFindings(unittest.TestCase): self.assertIsNone(round_findings(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก fix"])) self.assertIsNone(round_findings(["Do the work"])) + def test_reads_the_counts_of_a_title_that_also_counts_misread_findings(self): + self.assertEqual(round_findings(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก (0 misread)"]), (1, 5)) + def test_finds_a_round_title_without_counts(self): self.assertTrue(lacks_counts("Answer stability round 1: fix")) - self.assertFalse(lacks_counts("Answer stability round 1: 0 ๐Ÿ”ด, 1 ๐ŸŸก; fix")) + self.assertTrue(lacks_counts("Answer stability round 1: 0 ๐Ÿ”ด, 1 ๐ŸŸก; fix")) + self.assertFalse(lacks_counts("Answer stability round 1: 0 ๐Ÿ”ด, 1 ๐ŸŸก (0 misread); fix")) + self.assertFalse(lacks_counts("Answer prose round 2: 0 ๐Ÿ”ด, 0 ๐ŸŸก (0 misread)")) self.assertFalse(lacks_counts("Answer the question")) +class RoundMisreads(unittest.TestCase): + def test_sums_the_misread_findings_each_round_title_counts(self): + self.assertEqual(round_misreads(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก (2 misread)", "Merge origin/main"]), 3) + self.assertEqual(round_misreads(["Answer stability round 1: 0 ๐Ÿ”ด, 0 ๐ŸŸก (0 misread)"]), 0) + + def test_knows_no_count_when_a_round_title_or_every_round_lacks_one(self): + self.assertIsNone(round_misreads(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก; fix"])) + self.assertIsNone(round_misreads(["Answer stability round 1: fix"])) + self.assertIsNone(round_misreads(["Do the work"])) + + if __name__ == "__main__": unittest.main() diff --git a/docs/decisions.md b/docs/decisions.md index 1467c2db..9dcef27a 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -142,6 +142,10 @@ A reviewer's relaunch gets the report that asked and confirms or dismisses each Valid while the ladder orders its rungs by competence. +## review: a reviewer under `agents/` marks a ๐Ÿ”ด or ๐ŸŸก `[misread]` where the implementer misread code that had already shipped, each round title counts the marked findings, and `score-outcomes` lists them per chunk + +2026-10-23, claude. Serves code health (`CLAUDE.md` โ†’ "Shared goal"): its counter-signal, reviewers raising blockers because the implementer misunderstood the current system, had no count, since no tool recorded why a finding arose. The reviewer is the one that knows, so it marks the finding (`skills/larv-review/review-findings.md` โ†’ "Misread"). The worker counts the marked ๐Ÿ”ด and ๐ŸŸก findings in the round's commit title, `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); โ€ฆ`, which `score-outcomes` already reads for the ๐Ÿ”ด and ๐ŸŸก counts, so the count needs no record of its own. rule-hook's `round-title-counts` refuses a round title without it, so a missing count never reads as zero. Titles from before the count read as unknown. A bench of three readers seated as the audience picked both spellings, two of three each: a prefix stays at a fixed place on a skimmed line, and the parenthesis reads as a share of the ๐Ÿ”ด and ๐ŸŸก counts, not a third kind of finding. Only the reviewers under `agents/` mark findings; `/security-review` and a forge's auto-reviewer don't. Item 110's later fixes stand for the other half of the counter-signal, the defects that keep reappearing. Valid while round titles are where `score-outcomes` reads a chunk's findings. + ## review: an ask no user answers leaves the PR unmerged 2026-09-30, claude. Serves goal 1: the round cap, a BLOCK's restructure, Stage 0's questions and a goal conflict are the human's call, and an unmerged PR is what brings it to them; merging would make the call for them. Where an option reviews more โ€” run the pass, fix a finding no goal lets the run decline โ€” the run takes it; a โ“, or a fix changing a goal or a decision, is filed in `todo.md`, which reaches the human without holding the chunk. Valid while a human reads every unmerged PR an unattended run leaves. @@ -360,7 +364,7 @@ Valid while the worker writes the tests that larv-review's reviewers hold to the 2026-10-16, lilleman, answering the review of PR #283. An item that restores a maintain goal the project breaks today is a defect: exempt as `defect`. Its Moves name that maintain goal and how much of it is broken, and the goal weighs as the heaviest achieve goal, since a broken maintain goal outranks any achieve goal. Every defect ranks by its score, so a trivial one waits behind valuable work. Only questions and then security findings rank first in their release: a question's answer may change other items, and a question waits for the human anyway, so ranking it first delays no chunk. An item names the most specific goal it moves, and a parent only for a move none of its sub-goals covers, so a sub-goal's move does not count twice; `rank_todo.py` refuses a goal named beside its own sub-goal. Each project reshapes its own `todo.md`; `CLAUDE.md` โ†’ "Working loop" makes the reshape the only work until done, as it makes writing missing premises. An item that makes this project easier to read moves code health, as the paragraph below says, and goal 1.4, since reading cost is measured in tokens per chunk. -2026-10-18, lilleman. Serves goal 1.1: every project shares one achieve goal, code health, which `CLAUDE.md` โ†’ "Shared goal" states once and which replaces each project's own readability goal. It ranks first among a project's achieve goals, since lilleman rates it very important while the comprehension panel's overall is under 7.0. While that overall is under 7.0, or no scoring run has measured the project, it weighs four times its weight at 7.0 or above, as `UNDER_FLOOR` sets. The overall is the mean of the overall means of every scoring run on the newest scored commit in `docs/comprehension-history.md`, as `newest_scored` finds them. Two runs of one head measure it twice, and the newest alone would let their noise flip the weight: 7.13 and 6.88 on one head of another project would have. The review of PR #324 raised this choice. Weighing code health four times as much leaves the other achieve goals' weights as they are. So crossing 7.0 changes only the scores of the items that move code health, and of the defects, since a broken maintain goal weighs as the heaviest achieve goal. `larv-review record-scoring` re-ranks `todo.md` after it appends a run. A project that opts out of the comprehension check voids the goal, as `review: a project decision may opt every chunk out โ€ฆ` records. A README voids the goal with `**Void:** code health, since .` under `## Goals`, and an item's Moves cell names it as in `code health by 6`. A panel of three readers seated as lilleman picked both 3-0: `code health` over `code`, `health`, `C` and `0`, and the bold `Void:` line over a sentence under `## Goals` or a line under `## Audience`. The counter-signal is stated now and counted once `todo.md` item 198 ships, since no tool yet records why a finding arose. Valid while the comprehension panel's overall is how a project measures how hard it is to read. +2026-10-18, lilleman. Serves goal 1.1: every project shares one achieve goal, code health, which `CLAUDE.md` โ†’ "Shared goal" states once and which replaces each project's own readability goal. It ranks first among a project's achieve goals, since lilleman rates it very important while the comprehension panel's overall is under 7.0. While that overall is under 7.0, or no scoring run has measured the project, it weighs four times its weight at 7.0 or above, as `UNDER_FLOOR` sets. The overall is the mean of the overall means of every scoring run on the newest scored commit in `docs/comprehension-history.md`, as `newest_scored` finds them. Two runs of one head measure it twice, and the newest alone would let their noise flip the weight: 7.13 and 6.88 on one head of another project would have. The review of PR #324 raised this choice. Weighing code health four times as much leaves the other achieve goals' weights as they are. So crossing 7.0 changes only the scores of the items that move code health, and of the defects, since a broken maintain goal weighs as the heaviest achieve goal. `larv-review record-scoring` re-ranks `todo.md` after it appends a run. A project that opts out of the comprehension check voids the goal, as `review: a project decision may opt every chunk out โ€ฆ` records. A README voids the goal with `**Void:** code health, since .` under `## Goals`, and an item's Moves cell names it as in `code health by 6`. A panel of three readers seated as lilleman picked both 3-0: `code health` over `code`, `health`, `C` and `0`, and the bold `Void:` line over a sentence under `## Goals` or a line under `## Audience`. `score-outcomes` counts the counter-signal's misread findings per chunk, as `review: a reviewer under โ€ฆ` records. Valid while the comprehension panel's overall is how a project measures how hard it is to read. 2026-10-15, lilleman. Serves goal 1.4: loop-claude routes a chunk's first cycle on the item the chunk takes (`routing: a chunk's worker runs on the rung its item's L picks`). An item lists the items that must be done before it starts in a Blocked by column, and `rank_todo.py` ranks each blocker above every item it blocks. The table's order is `todo.md`'s only order: `rank_todo.py` fails on text beside the table under `## Items`, since a prose order there, "Release 0.3.0 takes items 125, 114 and 124 first", contradicted the table and loop-claude could not read it. A decision that wants an order sets the scores instead. An item waits while it is marked `question` or a blocker of it is still in the table, whatever the rows' order, so a release's first row that does not wait is the item a chunk takes. A blocker the table no longer holds was finished or deleted, and is dropped, so the cell shows what still blocks. A panel of three readers seated as lilleman picked the spelling: two ranked "Blocked by" first, as the cell lists only what still blocks, and all three chose bare IDs such as `12, 14` in a column right after Release, read before the tagline and kept apart from the scores. `rank_todo.py` adds the column to a table without it. The tools read cells by column name, so a later column leaves a reader on an older release working; `rank_todo.py`, which writes every column, fails on one it does not know rather than drop it. diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index b06c9ffc..40d466ef 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -65,7 +65,7 @@ Give a reviewer without Bash the branch diff and `git ls-files`'s output in its - **Round.** A round is one review by a pass's reviewer: the first, each re-entry, and the rerun after the architect returns Stage 0 questions ("Architecture" below). A relaunch one rung up ("Rung up" below) stays in its round. - **Auto-reviewer.** The external auto-reviewer (ยง4) is a pass of its own, each review it posts a round. Its count is the number of its reviews on the PR, less its reviews of a `Record the comprehension check:` commit, and `round-count` doesn't list it. A commit that answers one of its rounds takes an ordinary title, not an `Answer round` one, and a round that changed nothing gets no commit. -- **Count.** Close each round of a pass other than the auto-reviewer 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. +- **Count.** Close each round of a pass other than the auto-reviewer with one commit that holds the round's fixes. Title it `Answer round : ๐Ÿ”ด, ๐ŸŸก ( misread); โ€ฆ`: `` is the pass's name in lower case, such as `full scan`, `` and `` are the ๐Ÿ”ด and ๐ŸŸก findings all the round's reviewers reported, and `` is how many of those they marked `[misread]` (review-findings.md โ†’ "Misread"). Example: `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); 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. - **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. rule-hook refuses a round commit titled past round 3 unless its `round-cap` override quotes the yes. diff --git a/skills/larv-review/review-findings.md b/skills/larv-review/review-findings.md index e29a2c38..8116287e 100644 --- a/skills/larv-review/review-findings.md +++ b/skills/larv-review/review-findings.md @@ -14,6 +14,10 @@ A reviewer reads and reports; it edits nothing. It writes no file but its report A finding against a technical principle names it and the file under `~/.claude/principles/` it lives in. A finding against `~/.claude/skills/larv-review/standards/quality.md` names that file and the rule it breaks. +## Misread + +Mark a ๐Ÿ”ด or ๐ŸŸก `[misread]`, right after its severity mark, where it arose because the implementer misread code that had already shipped before this change: a wrong belief about what that code does, what a name means or what a contract promises. A defect in the change's own new code is not misread. `score-outcomes` counts the marked findings per chunk, as code health's counter-signal (`~/.claude/CLAUDE.md` โ†’ "Shared goal"). + ## Verdict A review's first line, derived from the findings: @@ -31,7 +35,7 @@ Where your report holds a finding against `~/.claude/skills/larv-review/standard Write your full report with the Write tool to the file your prompt names. The file is the worker's input, which it searches for each finding's entry, so write it even where your harness says to return findings directly. It holds the verdict, then every finding with its place, its evidence and its fix, as your agent file shapes them. Then return only: - the verdict line -- one line per finding, in this order: its severity mark, its place, and what is wrong, in one sentence. Where the finding breaks `standards/quality.md` or a file under `~/.claude/principles/`, end the line with that file's name. For a ๐Ÿ”€, end it with the reviewer it names. Example: ``๐ŸŸก `bin/example.py:42` `parse`: an empty line raises IndexError (technical-principles.md)`` +- one line per finding, in this order: its severity mark, `[misread]` where it holds, its place, and what is wrong, in one sentence. Where the finding breaks `standards/quality.md` or a file under `~/.claude/principles/`, end the line with that file's name. For a ๐Ÿ”€, end it with the reviewer it names. Example: ``๐ŸŸก `bin/example.py:42` `parse`: an empty line raises IndexError (technical-principles.md)`` - for stability-reviewer, whether the tests passed, and at which commit - `Rerun one rung up`, where your report ends with it - the report's path diff --git a/todo.md b/todo.md index 6eb14710..d4fbc2bf 100644 --- a/todo.md +++ b/todo.md @@ -12,7 +12,6 @@ | ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score | |---|---|---|---|---|---|---|---|---|---|---|---| -| 198 | 0.4.0 | | decision | **Count, per finished chunk, the findings that arose from misreading code that had already shipped, so code health's counter-signal shows.** | 3 | 2 | 2 | 5 | 5 | code health by 3, 1.1 by 2 | 6.2 | | 59 | 0.4.0 | | | **Bound a run of unfinished verdicts on one chunk, so a worker and judge that disagree cannot cycle unattended without end.** | 2 | 1 | 3 | 4 | 3 | 1.4 by 6 | 6.0 | | 167 | 0.4.0 | | | **Refuse a `/security-review` or `/claude-security` Skill call below the project's rung, as rule-hook refuses such an Agent call.** | 3 | 2 | 3 | 6 | 2 | 1.1 by 4 | 5.6 | | 6 | 0.4.0 | | decision | **Move what `loop-claude` writes out of `~/.claude.json`, and ask the human about each write that must stay.** | 3 | 3 | 3 | 7 | 3 | 1.1 by 5 | 5.3 | @@ -69,10 +68,6 @@ ## Details -### 198. Count, per finished chunk, the findings that arose from misreading code that had already shipped, so code health's counter-signal shows. - -Code health's counter-signal (`CLAUDE.md` โ†’ "Shared goal") has no count, since no tool records why a finding arose. Have each reviewer tag a finding that arose because the implementer misread code that had already shipped, and have `score-outcomes` count the tagged findings per finished chunk. Item 110's later fixes stand for the defects that keep reappearing. - ### 59. Bound a run of unfinished verdicts on one chunk, so a worker and judge that disagree cannot cycle unattended without end. Raised by the product-owner review of PR #211. The resumed worker gets the judge's quote of the work remaining, but a worker that still thinks the chunk done can answer each cycle the same way, and each cycle costs a worker and a judge run (goal 1.4). -- 2.52.0 From 80cc36e9048d5830fb13fad045c9737fd17f8d2c Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 11:30:17 +0200 Subject: [PATCH 03/19] =?UTF-8?q?Answer=20architecture=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=202=20=F0=9F=9F=A1=20(0=20misread);=20read=20a=20?= =?UTF-8?q?round=20title's=20counts=20once,=20into=20one=20Counts=20value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/round_titles.py | 45 +++++++++++++---------- bin/score_outcomes/results.py | 21 +++++------ bin/score_outcomes/test_score_outcomes.py | 7 ++-- bin/test_round_titles.py | 24 +++++------- 4 files changed, 50 insertions(+), 47 deletions(-) diff --git a/bin/round_titles.py b/bin/round_titles.py index fdd6af46..9563985f 100644 --- a/bin/round_titles.py +++ b/bin/round_titles.py @@ -1,4 +1,5 @@ """The titles of larv-review's round commits, `Answer round : ๐Ÿ”ด, ๐ŸŸก ( misread); `: each pass's round count, and the findings the rounds reported. counts the ๐Ÿ”ด and ๐ŸŸก findings a reviewer marked `[misread]`, because the implementer misread code that had already shipped.""" +import dataclasses import re from review_passes import PASSES @@ -10,6 +11,14 @@ ROUND = re.compile(r"^Answer (.+?) round ([0-9]+):", re.IGNORECASE) FINDINGS = re.compile(r" ([0-9]+) ๐Ÿ”ด, ([0-9]+) ๐ŸŸก(?: \(([0-9]+) misread\))?(?:;|$)") +@dataclasses.dataclass(frozen=True) +class Counts: + """A round title's findings: its ๐Ÿ”ด and ๐ŸŸก counts, and how many of them were misread, None for a title from before that count.""" + red: int + yellow: int + misread: int | None + + def round_counts(titles: list[str]) -> dict[str, int]: """Each pass's round count among the branch's `Answer round :` commit titles: the highest , or the number of such commits where that is more, so a repeated number still counts. A pass with none has 0, and a title naming no known pass adds its name. Case is ignored.""" highest: dict[str, int] = dict.fromkeys(PASSES, 0) @@ -24,8 +33,7 @@ def round_counts(titles: list[str]) -> dict[str, int]: def lacks_counts(title: str) -> bool: """Whether title is a round title without all three counts after its colon.""" - named = ROUND.match(title) - return named is not None and ((found := FINDINGS.match(title, named.end())) is None or found.group(3) is None) + return ROUND.match(title) is not None and ((counts := title_counts(title)) is None or counts.misread is None) def past_cap(title: str) -> bool: @@ -34,25 +42,24 @@ def past_cap(title: str) -> bool: 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 = [] - for title in titles: - if named := ROUND.match(title): - found = FINDINGS.match(title, named.end()) - if not found: - return None - counts.append((int(found.group(1)), int(found.group(2)))) - return (sum(red for red, _ in counts), sum(yellow for _, yellow in counts)) if counts else None +def title_counts(title: str) -> Counts | None: + """The counts after a round title's colon; None where title is no round title, or lacks the ๐Ÿ”ด and ๐ŸŸก counts.""" + named = ROUND.match(title) + found = FINDINGS.match(title, named.end()) if named else None + if not found: + return None + return Counts(int(found.group(1)), int(found.group(2)), None if found.group(3) is None else int(found.group(3))) -def round_misreads(titles: list[str]) -> int | None: - """The misread counts summed over the round titles among titles; None where a round title lacks one, or no title is a round.""" +def round_findings(titles: list[str]) -> Counts | None: + """The counts summed over the round titles among titles; None where a round title lacks the ๐Ÿ”ด and ๐ŸŸก counts, or no title is a round. Its misread is None where a round title lacks that count.""" counts = [] for title in titles: - if named := ROUND.match(title): - found = FINDINGS.match(title, named.end()) - if not found or found.group(3) is None: + if ROUND.match(title): + if (found := title_counts(title)) is None: return None - counts.append(int(found.group(3))) - return sum(counts) if counts else None + counts.append(found) + if not counts: + return None + misreads = [found.misread for found in counts if found.misread is not None] + return Counts(sum(found.red for found in counts), sum(found.yellow for found in counts), sum(misreads) if len(misreads) == len(counts) else None) diff --git a/bin/score_outcomes/results.py b/bin/score_outcomes/results.py index 7e89e124..e71de51c 100644 --- a/bin/score_outcomes/results.py +++ b/bin/score_outcomes/results.py @@ -2,11 +2,11 @@ import dataclasses import statistics import typing +from round_titles import Counts, round_counts, round_findings from comprehension_history import HISTORY from todo_table import Item, items from markdown_text import listed from reading_cost.figures import RECORD -from round_titles import round_counts, round_findings, round_misreads # Fewest single-item chunks a score needs before its medians print: the 10 figures the reading-cost trend waits for; no published standard sets either. ENOUGH = 10 @@ -22,7 +22,7 @@ Chunk = tuple[str, str, int, Landing] # The tool's name and report call a Result an outcome, a word the code keeps for an entry of a `.outcomes.md` file: docs/decisions.md โ†’ `bin/: an outcome is an entry`. @dataclasses.dataclass(frozen=True) class Result: - """What the chunk that shipped an item measured. findings holds the ๐Ÿ”ด and ๐ŸŸก counts, None where a round title lacks them or the branch has no round. landed says how the chunk reached the default branch: by a merge commit, by a rebase that replayed its commits, or by commits never replayed. misread counts the ๐Ÿ”ด and ๐ŸŸก findings that arose from misreading code that had already shipped, None where a round title lacks the count or the branch has no round.""" + """What the chunk that shipped an item measured. findings holds the ๐Ÿ”ด and ๐ŸŸก counts, and how many of them arose from misreading code that had already shipped, None where a round title lacks the ๐Ÿ”ด and ๐ŸŸก counts or the branch has no round; its misread is None where a round title lacks that count. landed says how the chunk reached the default branch: by a merge commit, by a rebase that replayed its commits, or by commits never replayed.""" item: Item merge: str merged: str @@ -30,15 +30,14 @@ class Result: lines: int files: int rounds_past_first: int - findings: tuple[int, int] | None + findings: Counts | None landed: Landing - misread: int | None # A measure's name and how to read it from a Result, None where the chunk did not record it. Measure = tuple[str, typing.Callable[[Result], int | None]] # The scores whose median result the report gives at each guessed value. -MEDIANS: dict[str, Measure] = {"R": ("๐Ÿ”ด findings", lambda result: result.findings[0] if result.findings else None), "S": ("lines changed", lambda result: result.lines)} +MEDIANS: dict[str, Measure] = {"R": ("๐Ÿ”ด findings", lambda result: result.findings.red if result.findings else None), "S": ("lines changed", lambda result: result.lines)} # The levels R is built from; for each, the report gives how well it orders chunks by review rounds and by ๐Ÿ”ด findings. ORDERED = ("L", "E", "I") # The scores render shows, in this order; C only on an item scored before L, E and I replaced it. @@ -64,7 +63,7 @@ def results_of(shipped: list[Item], merge: str, merged: str, numstat: str, title lines = sum(int(count) for row in work for count in row[:2] if count.isdigit()) past_first = sum(max(0, count - 1) for count in round_counts(titles).values()) ids = [item.id for item in shipped] - return [Result(item, merge, merged, tuple(id_ for id_ in ids if id_ != item.id), lines, len(work), past_first, round_findings(titles), landed, round_misreads(titles)) for item in shipped] + return [Result(item, merge, merged, tuple(id_ for id_ in ids if id_ != item.id), lines, len(work), past_first, round_findings(titles), landed) for item in shipped] def nearest(results: list[Result], given: dict[str, int], count: int = 5) -> list[Result]: @@ -89,7 +88,7 @@ def report(results: list[Result]) -> list[str]: lines.append(f"- {name}, {what}: " + ", ".join(f"{guess} โ†’ {statistics.median(found):g} ({plural(len(found), 'chunk')})" for guess, found in medians)) for name in ORDERED: # Each pass takes a first round whatever the change, so only the rounds after it measure how hard the change was to get right. - rows = [(result.item.scores[name], result.rounds_past_first, result.findings[0]) for result in single if name in result.item.scores and result.findings is not None] + rows = [(result.item.scores[name], result.rounds_past_first, result.findings.red) for result in single if name in result.item.scores and result.findings is not None] opening = f"- {name}, by review rounds past each pass's first and ๐Ÿ”ด findings: " if len(rows) < ENOUGH: lines.append(opening + too_few(len(rows), name, "both outcomes")) @@ -107,10 +106,10 @@ def misreads(results: list[Result]) -> list[str]: chunks = {result.merge: result for result in results} lines = [] for result in sorted(chunks.values(), key=lambda result: result.merged, reverse=True): - if result.misread is None or result.findings is None: + if result.findings is None or result.findings.misread is None: continue at_least = "" if result.landed == "merge" else "at least " - lines.append(f"- {result.merged} in {result.merge}: {at_least}{result.misread} of {result.findings[0]} ๐Ÿ”ด, {result.findings[1]} ๐ŸŸก") + lines.append(f"- {result.merged} in {result.merge}: {at_least}{result.findings.misread} of {result.findings.red} ๐Ÿ”ด, {result.findings.yellow} ๐ŸŸก") return lines or ["- None: no chunk's round titles count them."] @@ -137,8 +136,8 @@ def render(result: Result) -> str: # Rebase drops a round's commit that changed no file, so history shows such a chunk's rounds and findings short. at_least = "" if result.landed == "merge" else "at least " merged = {"merge": f"merged {result.merged} in {result.merge}", "rebase": f"merged {result.merged} by rebase in {result.merge}", "push": f"committed {result.merged} in {result.merge}, never replayed, so perhaps part of a pull request"}[result.landed] - misread = "" if result.misread is None else f" ({result.misread} misread)" - findings = f"{at_least}{result.findings[0]} ๐Ÿ”ด, {result.findings[1]} ๐ŸŸก{misread}" if result.findings else "findings unknown" + misread = "" if result.findings is None or result.findings.misread is None else f" ({result.findings.misread} misread)" + findings = f"{at_least}{result.findings.red} ๐Ÿ”ด, {result.findings.yellow} ๐ŸŸก{misread}" if result.findings else "findings unknown" others = result.shipped_with together = f", with item{'s' if len(others) > 1 else ''} {', '.join(map(str, others))}" if others else "" return f"- Item {result.item.id}, {scores}: {plural(result.lines, 'line')} in {plural(result.files, 'file')}, {at_least}{plural(result.rounds_past_first, 'round')} past each pass's first, {findings}; {merged}{together}. {result.item.tagline}" diff --git a/bin/score_outcomes/test_score_outcomes.py b/bin/score_outcomes/test_score_outcomes.py index 3d49b392..38123ff9 100644 --- a/bin/score_outcomes/test_score_outcomes.py +++ b/bin/score_outcomes/test_score_outcomes.py @@ -9,6 +9,7 @@ sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) from score_outcomes.anchors import anchor_lines, parse_anchors from score_outcomes.main import chunk_log, report_text +from round_titles import Counts from failure import Failure from test_env import isolated_env from todo_table import Item @@ -30,7 +31,7 @@ def item(id_: int, scores: dict[str, int]) -> Item: def result(id_: int, r: int, s: int, c: int | None, lines: int = 10, rounds: int = 1, findings: tuple[int, int] | None = (0, 0), merged: str = "2026-10-13T10:00:00Z", shipped_with: tuple[int, ...] = (), levels: dict[str, int] | None = None, landed: Landing = "merge", misread: int | None = None, merge: str = "aaaaaaa") -> Result: - return Result(item(id_, {"R": r, "S": s} | ({"C": c} if c else {}) | (levels or {})), merge, merged, shipped_with, lines, 1, rounds, findings, landed, misread) + return Result(item(id_, {"R": r, "S": s} | ({"C": c} if c else {}) | (levels or {})), merge, merged, shipped_with, lines, 1, rounds, None if findings is None else Counts(*findings, misread), landed) class Shipped(unittest.TestCase): @@ -77,12 +78,12 @@ class ResultsOf(unittest.TestCase): numstat = "3\t1\ta.py\n-\t-\tlogo.png\n0\t1\t2026\n5\t0\ttodo.md\n9\t0\tdocs/reading-cost.md\n4\t0\tdocs/comprehension-history.md\n" titles = ["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก; fix", "Answer stability round 2: 0 ๐Ÿ”ด, 1 ๐ŸŸก; fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก", "Do it"] found = results_of([item(4, {"R": 2}), item(5, {"R": 3})], "abc1234", "2026-10-13T10:00:00Z", numstat, titles, "merge") - self.assertEqual(found[0], Result(item(4, {"R": 2}), "abc1234", "2026-10-13T10:00:00Z", (5,), 5, 3, 1, (1, 6), "merge", None)) + self.assertEqual(found[0], Result(item(4, {"R": 2}), "abc1234", "2026-10-13T10:00:00Z", (5,), 5, 3, 1, Counts(1, 6, None), "merge")) self.assertEqual(found[1].shipped_with, (4,)) def test_counts_the_findings_from_misread_shipped_code_where_every_round_title_counts_them(self): titles = ["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (2 misread); fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก (1 misread)"] - self.assertEqual(results_of([item(4, {"R": 2})], "abc1234", "2026-10-13T10:00:00Z", "3\t1\ta.py\n", titles, "merge")[0].misread, 3) + self.assertEqual(results_of([item(4, {"R": 2})], "abc1234", "2026-10-13T10:00:00Z", "3\t1\ta.py\n", titles, "merge")[0].findings, Counts(1, 5, 3)) def test_measures_no_chunk_that_changed_only_the_plan(self): self.assertEqual(results_of([item(4, {"R": 2})], "abc1234", "2026-10-13T10:00:00Z", "0\t5\ttodo.md\n", [], "merge"), []) diff --git a/bin/test_round_titles.py b/bin/test_round_titles.py index 51b01202..9fcd9324 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, past_cap, round_counts, round_findings, round_misreads +from round_titles import Counts, lacks_counts, past_cap, round_counts, round_findings class Rounds(unittest.TestCase): @@ -32,7 +32,7 @@ class Cap(unittest.TestCase): 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)) + self.assertEqual(round_findings(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก; flag a deleted test", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก", "Merge origin/main"]), Counts(1, 5, None)) def test_knows_no_count_when_a_round_title_or_every_round_lacks_one(self): self.assertIsNone(round_findings(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก; fix", "Answer prose round 1: fix the README"])) @@ -40,7 +40,14 @@ class RoundFindings(unittest.TestCase): self.assertIsNone(round_findings(["Do the work"])) def test_reads_the_counts_of_a_title_that_also_counts_misread_findings(self): - self.assertEqual(round_findings(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก (0 misread)"]), (1, 5)) + self.assertEqual(round_findings(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก (0 misread)"]), Counts(1, 5, 1)) + + def test_sums_the_misread_findings_each_round_title_counts(self): + self.assertEqual(round_findings(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก (2 misread)", "Merge origin/main"]), Counts(1, 5, 3)) + self.assertEqual(round_findings(["Answer stability round 1: 0 ๐Ÿ”ด, 0 ๐ŸŸก (0 misread)"]), Counts(0, 0, 0)) + + def test_knows_no_misread_count_when_a_round_title_lacks_one(self): + self.assertEqual(round_findings(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก; fix"]), Counts(1, 5, None)) def test_finds_a_round_title_without_counts(self): @@ -51,16 +58,5 @@ class RoundFindings(unittest.TestCase): self.assertFalse(lacks_counts("Answer the question")) -class RoundMisreads(unittest.TestCase): - def test_sums_the_misread_findings_each_round_title_counts(self): - self.assertEqual(round_misreads(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก (2 misread)", "Merge origin/main"]), 3) - self.assertEqual(round_misreads(["Answer stability round 1: 0 ๐Ÿ”ด, 0 ๐ŸŸก (0 misread)"]), 0) - - def test_knows_no_count_when_a_round_title_or_every_round_lacks_one(self): - self.assertIsNone(round_misreads(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก; fix"])) - self.assertIsNone(round_misreads(["Answer stability round 1: fix"])) - self.assertIsNone(round_misreads(["Do the work"])) - - if __name__ == "__main__": unittest.main() -- 2.52.0 From 1d3b928bdb9c99a8eeba471ec0e032834e9a3885 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 11:30:54 +0200 Subject: [PATCH 04/19] =?UTF-8?q?Answer=20architecture=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1=20(0=20misread);=20nothing=20t?= =?UTF-8?q?o=20change?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From 1e225c439754381cb1e7ce8a2541f28b708c588f Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 11:40:38 +0200 Subject: [PATCH 05/19] =?UTF-8?q?Answer=20principles=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=203=20=F0=9F=9F=A1=20(0=20misread);=20refuse=20a?= =?UTF-8?q?=20misread=20count=20above=20the=20findings,=20share=20the=20lo?= =?UTF-8?q?wer-bound=20rule,=20name=20score-outcomes'=20new=20list=20in=20?= =?UTF-8?q?the=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- bin/round_titles.py | 19 ++++++------ bin/score_outcomes/results.py | 37 +++++++++++++---------- bin/score_outcomes/test_score_outcomes.py | 17 +++-------- bin/test_round_titles.py | 18 ++++++----- 5 files changed, 47 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index a149878e..f812e05a 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ Install puts only `loop-claude` on `PATH`; call the others by their path, such a - `reading-cost [--reset] [record]` appends a figure for each chunk `loop-claude` finished to a project's `docs/reading-cost.md`, and says whether the figures rise; `reading-cost --help` states the measure. - `review-replay ` replays a review pass's archived rounds from the projects run on the model, on the code each reviewed, and prints the lowest rung below the project's that, like each rung above it, finds every ๐Ÿ”ด and ๐ŸŸก the project's rung finds again; `review-replay --help` states the replay. Each replayed reviewer skips every permission prompt, stability-reviewer has Bash, and an archived prompt may name paths on the host. - `rule-hook [overrides]` blocks a tool call that breaks a rule a program can check, unless the call overrides the rule; `settings.json` โ†’ `hooks` runs it before each Bash, Edit, MultiEdit, Write and Agent call, and `rule-hook --help` states the rules and the override. -- `score-outcomes [L E I S]` lists the finished items whose guessed scores sit nearest the given ones, and the shipped items the project's `docs/score-anchors.md` names for each level of L, E and I, each with what its chunk measured; then the median outcome at each guessed R and S, and how well L, E and I each order the chunks by review rounds and ๐Ÿ”ด findings; `score-outcomes --help` states the measures. +- `score-outcomes [L E I S]` lists the finished items whose guessed scores sit nearest the given ones, and the shipped items the project's `docs/score-anchors.md` names for each level of L, E and I, each with what its chunk measured; then the median outcome at each guessed R and S, and how well L, E and I each order the chunks by review rounds and ๐Ÿ”ด findings; then each chunk's ๐Ÿ”ด and ๐ŸŸก findings with how many a reviewer marked `[misread]`, code health's counter-signal; `score-outcomes --help` states the measures. - `settings_filter.py` is git's clean filter for `settings.json`: it drops `"model"` and sorts the keys. `.gitattributes` sets the filter `settings` on `settings.json`, and Install's `git config` line makes this script that filter. - `statusline.py` renders Claude Code's status line; `settings.json` โ†’ `statusLine` runs it. - `subagent-rung [--plan] ` prints the Agent tool's model and effort for a subagent's task, picked by its L from the project's model, and with `--plan` never below the project's rung; `subagent-rung --help` states the rule. diff --git a/bin/round_titles.py b/bin/round_titles.py index 9563985f..0852e36a 100644 --- a/bin/round_titles.py +++ b/bin/round_titles.py @@ -1,4 +1,4 @@ -"""The titles of larv-review's round commits, `Answer round : ๐Ÿ”ด, ๐ŸŸก ( misread); `: each pass's round count, and the findings the rounds reported. counts the ๐Ÿ”ด and ๐ŸŸก findings a reviewer marked `[misread]`, because the implementer misread code that had already shipped.""" +"""The titles of larv-review's round commits, `Answer round : ๐Ÿ”ด, ๐ŸŸก ( misread); `: each pass's round count, and the findings the rounds reported. counts the ๐Ÿ”ด and ๐ŸŸก findings a reviewer marked `[misread]`.""" import dataclasses import re @@ -7,13 +7,13 @@ 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 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 how many of them were misread, which titles from before the count lack, then `;` and its summary, if any. +# What follows a round title's colon: the round's ๐Ÿ”ด and ๐ŸŸก counts, then how many of them a reviewer marked `[misread]`, a count that titles from before it lack, then `;` and its summary, if any. FINDINGS = re.compile(r" ([0-9]+) ๐Ÿ”ด, ([0-9]+) ๐ŸŸก(?: \(([0-9]+) misread\))?(?:;|$)") @dataclasses.dataclass(frozen=True) -class Counts: - """A round title's findings: its ๐Ÿ”ด and ๐ŸŸก counts, and how many of them were misread, None for a title from before that count.""" +class Findings: + """A round title's findings: its ๐Ÿ”ด and ๐ŸŸก counts, and how many of them a reviewer marked `[misread]`, None for a title from before that count.""" red: int yellow: int misread: int | None @@ -42,16 +42,17 @@ def past_cap(title: str) -> bool: return named is not None and int(named.group(2)) > CAP -def title_counts(title: str) -> Counts | None: - """The counts after a round title's colon; None where title is no round title, or lacks the ๐Ÿ”ด and ๐ŸŸก counts.""" +def title_counts(title: str) -> Findings | None: + """The counts after a round title's colon; None where title is no round title, lacks the ๐Ÿ”ด and ๐ŸŸก counts, or counts more misread findings than both.""" named = ROUND.match(title) found = FINDINGS.match(title, named.end()) if named else None if not found: return None - return Counts(int(found.group(1)), int(found.group(2)), None if found.group(3) is None else int(found.group(3))) + counts = Findings(int(found.group(1)), int(found.group(2)), None if found.group(3) is None else int(found.group(3))) + return None if counts.misread is not None and counts.misread > counts.red + counts.yellow else counts -def round_findings(titles: list[str]) -> Counts | None: +def round_findings(titles: list[str]) -> Findings | None: """The counts summed over the round titles among titles; None where a round title lacks the ๐Ÿ”ด and ๐ŸŸก counts, or no title is a round. Its misread is None where a round title lacks that count.""" counts = [] for title in titles: @@ -62,4 +63,4 @@ def round_findings(titles: list[str]) -> Counts | None: if not counts: return None misreads = [found.misread for found in counts if found.misread is not None] - return Counts(sum(found.red for found in counts), sum(found.yellow for found in counts), sum(misreads) if len(misreads) == len(counts) else None) + return Findings(sum(found.red for found in counts), sum(found.yellow for found in counts), sum(misreads) if len(misreads) == len(counts) else None) diff --git a/bin/score_outcomes/results.py b/bin/score_outcomes/results.py index e71de51c..01a31532 100644 --- a/bin/score_outcomes/results.py +++ b/bin/score_outcomes/results.py @@ -2,7 +2,7 @@ import dataclasses import statistics import typing -from round_titles import Counts, round_counts, round_findings +from round_titles import Findings, round_counts, round_findings from comprehension_history import HISTORY from todo_table import Item, items from markdown_text import listed @@ -22,7 +22,7 @@ Chunk = tuple[str, str, int, Landing] # The tool's name and report call a Result an outcome, a word the code keeps for an entry of a `.outcomes.md` file: docs/decisions.md โ†’ `bin/: an outcome is an entry`. @dataclasses.dataclass(frozen=True) class Result: - """What the chunk that shipped an item measured. findings holds the ๐Ÿ”ด and ๐ŸŸก counts, and how many of them arose from misreading code that had already shipped, None where a round title lacks the ๐Ÿ”ด and ๐ŸŸก counts or the branch has no round; its misread is None where a round title lacks that count. landed says how the chunk reached the default branch: by a merge commit, by a rebase that replayed its commits, or by commits never replayed.""" + """What the chunk that shipped an item measured. findings holds the ๐Ÿ”ด and ๐ŸŸก counts, and how many of them a reviewer marked `[misread]`, None where a round title lacks the ๐Ÿ”ด and ๐ŸŸก counts or the branch has no round; its misread is None where a round title lacks that count. landed says how the chunk reached the default branch: by a merge commit, by a rebase that replayed its commits, or by commits never replayed.""" item: Item merge: str merged: str @@ -30,7 +30,7 @@ class Result: lines: int files: int rounds_past_first: int - findings: Counts | None + findings: Findings | None landed: Landing @@ -101,15 +101,11 @@ def report(results: list[Result]) -> list[str]: def misreads(results: list[Result]) -> list[str]: - """For each chunk whose round titles count them, newest first: its ๐Ÿ”ด and ๐ŸŸก findings from misread shipped code, among all its ๐Ÿ”ด and ๐ŸŸก findings.""" - # A chunk that shipped several items gives each the same Result fields but item, so one line per chunk. + """Newest first, each chunk's ๐Ÿ”ด and ๐ŸŸก findings with how many of them a reviewer marked `[misread]`, for each chunk whose round titles count those.""" + # A chunk that shipped several items has a Result for each, so one line per chunk. chunks = {result.merge: result for result in results} - lines = [] - for result in sorted(chunks.values(), key=lambda result: result.merged, reverse=True): - if result.findings is None or result.findings.misread is None: - continue - at_least = "" if result.landed == "merge" else "at least " - lines.append(f"- {result.merged} in {result.merge}: {at_least}{result.findings.misread} of {result.findings.red} ๐Ÿ”ด, {result.findings.yellow} ๐ŸŸก") + newest_first = sorted(chunks.values(), key=lambda result: result.merged, reverse=True) + lines = [f"- {result.merged} in {result.merge}: {counted(result)}" for result in newest_first if result.findings is not None and result.findings.misread is not None] return lines or ["- None: no chunk's round titles count them."] @@ -133,14 +129,23 @@ def ranks(values: list[int]) -> list[float]: def render(result: Result) -> str: scores = ", ".join(f"{name} {result.item.scores[name]}" for name in SHOWN if name in result.item.scores) - # Rebase drops a round's commit that changed no file, so history shows such a chunk's rounds and findings short. - at_least = "" if result.landed == "merge" else "at least " merged = {"merge": f"merged {result.merged} in {result.merge}", "rebase": f"merged {result.merged} by rebase in {result.merge}", "push": f"committed {result.merged} in {result.merge}, never replayed, so perhaps part of a pull request"}[result.landed] - misread = "" if result.findings is None or result.findings.misread is None else f" ({result.findings.misread} misread)" - findings = f"{at_least}{result.findings.red} ๐Ÿ”ด, {result.findings.yellow} ๐ŸŸก{misread}" if result.findings else "findings unknown" others = result.shipped_with together = f", with item{'s' if len(others) > 1 else ''} {', '.join(map(str, others))}" if others else "" - return f"- Item {result.item.id}, {scores}: {plural(result.lines, 'line')} in {plural(result.files, 'file')}, {at_least}{plural(result.rounds_past_first, 'round')} past each pass's first, {findings}; {merged}{together}. {result.item.tagline}" + return f"- Item {result.item.id}, {scores}: {plural(result.lines, 'line')} in {plural(result.files, 'file')}, {at_least(result)}{plural(result.rounds_past_first, 'round')} past each pass's first, {counted(result)}; {merged}{together}. {result.item.tagline}" + + +def at_least(result: Result) -> str: + """The words that mark a chunk's rounds and findings as lower bounds: rebase drops a round's commit that changed no file, so history shows a chunk that left no merge commit short.""" + return "" if result.landed == "merge" else "at least " + + +def counted(result: Result) -> str: + """A chunk's findings as its round titles spell them: `1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread)`, the misread count left out where they lack it.""" + if result.findings is None: + return "findings unknown" + misread = "" if result.findings.misread is None else f" ({result.findings.misread} misread)" + return f"{at_least(result)}{result.findings.red} ๐Ÿ”ด, {result.findings.yellow} ๐ŸŸก{misread}" def plural(count: int, noun: str) -> str: diff --git a/bin/score_outcomes/test_score_outcomes.py b/bin/score_outcomes/test_score_outcomes.py index 38123ff9..0216297c 100644 --- a/bin/score_outcomes/test_score_outcomes.py +++ b/bin/score_outcomes/test_score_outcomes.py @@ -9,8 +9,8 @@ sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) from score_outcomes.anchors import anchor_lines, parse_anchors from score_outcomes.main import chunk_log, report_text -from round_titles import Counts from failure import Failure +from round_titles import Findings from test_env import isolated_env from todo_table import Item from score_outcomes.results import Landing, nearest, rank_correlation, render, report, Result, results_of, shipped @@ -31,7 +31,7 @@ def item(id_: int, scores: dict[str, int]) -> Item: def result(id_: int, r: int, s: int, c: int | None, lines: int = 10, rounds: int = 1, findings: tuple[int, int] | None = (0, 0), merged: str = "2026-10-13T10:00:00Z", shipped_with: tuple[int, ...] = (), levels: dict[str, int] | None = None, landed: Landing = "merge", misread: int | None = None, merge: str = "aaaaaaa") -> Result: - return Result(item(id_, {"R": r, "S": s} | ({"C": c} if c else {}) | (levels or {})), merge, merged, shipped_with, lines, 1, rounds, None if findings is None else Counts(*findings, misread), landed) + return Result(item(id_, {"R": r, "S": s} | ({"C": c} if c else {}) | (levels or {})), merge, merged, shipped_with, lines, 1, rounds, None if findings is None else Findings(*findings, misread), landed) class Shipped(unittest.TestCase): @@ -78,13 +78,9 @@ class ResultsOf(unittest.TestCase): numstat = "3\t1\ta.py\n-\t-\tlogo.png\n0\t1\t2026\n5\t0\ttodo.md\n9\t0\tdocs/reading-cost.md\n4\t0\tdocs/comprehension-history.md\n" titles = ["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก; fix", "Answer stability round 2: 0 ๐Ÿ”ด, 1 ๐ŸŸก; fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก", "Do it"] found = results_of([item(4, {"R": 2}), item(5, {"R": 3})], "abc1234", "2026-10-13T10:00:00Z", numstat, titles, "merge") - self.assertEqual(found[0], Result(item(4, {"R": 2}), "abc1234", "2026-10-13T10:00:00Z", (5,), 5, 3, 1, Counts(1, 6, None), "merge")) + self.assertEqual(found[0], Result(item(4, {"R": 2}), "abc1234", "2026-10-13T10:00:00Z", (5,), 5, 3, 1, Findings(1, 6, None), "merge")) self.assertEqual(found[1].shipped_with, (4,)) - def test_counts_the_findings_from_misread_shipped_code_where_every_round_title_counts_them(self): - titles = ["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (2 misread); fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก (1 misread)"] - self.assertEqual(results_of([item(4, {"R": 2})], "abc1234", "2026-10-13T10:00:00Z", "3\t1\ta.py\n", titles, "merge")[0].findings, Counts(1, 5, 3)) - def test_measures_no_chunk_that_changed_only_the_plan(self): self.assertEqual(results_of([item(4, {"R": 2})], "abc1234", "2026-10-13T10:00:00Z", "0\t5\ttodo.md\n", [], "merge"), []) @@ -223,11 +219,8 @@ Median outcome at each guessed score, among chunks that shipped one item, never- found = [result(1, 5, 3, None, findings=(1, 2), misread=1, merge="bbbbbbb", merged="2026-10-12T10:00:00Z", shipped_with=(2,)), result(2, 5, 3, None, findings=(1, 2), misread=1, merge="bbbbbbb", merged="2026-10-12T10:00:00Z", shipped_with=(1,)), result(3, 5, 3, None, findings=(0, 4), misread=0, merge="ccccccc", merged="2026-10-14T10:00:00Z", landed="rebase"), result(4, 5, 3, None)] self.assertIn("""๐Ÿ”ด and ๐ŸŸก findings from misread shipped code, per finished chunk whose round titles count them, newest first: -- 2026-10-14T10:00:00Z in ccccccc: at least 0 of 0 ๐Ÿ”ด, 4 ๐ŸŸก -- 2026-10-12T10:00:00Z in bbbbbbb: 1 of 1 ๐Ÿ”ด, 2 ๐ŸŸก""", report_text(found, [], None)) - self.assertIn("""๐Ÿ”ด and ๐ŸŸก findings from misread shipped code, per finished chunk whose round titles count them, newest first: - -- None: no chunk's round titles count them.""", report_text([result(4, 5, 3, None)], [], None)) +- 2026-10-14T10:00:00Z in ccccccc: at least 0 ๐Ÿ”ด, 4 ๐ŸŸก (0 misread) +- 2026-10-12T10:00:00Z in bbbbbbb: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread)""", report_text(found, [], None)) def test_ends_with_how_it_reads_chunks_merged_by_rebase_only_where_it_measured_one(self): text = report_text([result(1, 5, 3, None, landed="rebase")], [], None) diff --git a/bin/test_round_titles.py b/bin/test_round_titles.py index 9fcd9324..b4e22248 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 Counts, lacks_counts, past_cap, round_counts, round_findings +from round_titles import Findings, lacks_counts, past_cap, round_counts, round_findings class Rounds(unittest.TestCase): @@ -32,22 +32,19 @@ class Cap(unittest.TestCase): 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"]), Counts(1, 5, None)) + self.assertEqual(round_findings(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก; flag a deleted test", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก", "Merge origin/main"]), Findings(1, 5, None)) def test_knows_no_count_when_a_round_title_or_every_round_lacks_one(self): self.assertIsNone(round_findings(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก; fix", "Answer prose round 1: fix the README"])) self.assertIsNone(round_findings(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก fix"])) self.assertIsNone(round_findings(["Do the work"])) - def test_reads_the_counts_of_a_title_that_also_counts_misread_findings(self): - self.assertEqual(round_findings(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก (0 misread)"]), Counts(1, 5, 1)) - def test_sums_the_misread_findings_each_round_title_counts(self): - self.assertEqual(round_findings(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก (2 misread)", "Merge origin/main"]), Counts(1, 5, 3)) - self.assertEqual(round_findings(["Answer stability round 1: 0 ๐Ÿ”ด, 0 ๐ŸŸก (0 misread)"]), Counts(0, 0, 0)) + self.assertEqual(round_findings(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก (2 misread)", "Merge origin/main"]), Findings(1, 5, 3)) + self.assertEqual(round_findings(["Answer stability round 1: 0 ๐Ÿ”ด, 0 ๐ŸŸก (0 misread)"]), Findings(0, 0, 0)) def test_knows_no_misread_count_when_a_round_title_lacks_one(self): - self.assertEqual(round_findings(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก; fix"]), Counts(1, 5, None)) + self.assertEqual(round_findings(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); fix", "Answer prose round 1: 0 ๐Ÿ”ด, 3 ๐ŸŸก; fix"]), Findings(1, 5, None)) def test_finds_a_round_title_without_counts(self): @@ -55,6 +52,11 @@ class RoundFindings(unittest.TestCase): self.assertTrue(lacks_counts("Answer stability round 1: 0 ๐Ÿ”ด, 1 ๐ŸŸก; fix")) self.assertFalse(lacks_counts("Answer stability round 1: 0 ๐Ÿ”ด, 1 ๐ŸŸก (0 misread); fix")) self.assertFalse(lacks_counts("Answer prose round 2: 0 ๐Ÿ”ด, 0 ๐ŸŸก (0 misread)")) + + def test_takes_a_title_counting_more_misread_findings_than_findings_as_lacking_its_counts(self): + self.assertTrue(lacks_counts("Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (4 misread); fix")) + self.assertFalse(lacks_counts("Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (3 misread); fix")) + self.assertIsNone(round_findings(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (4 misread); fix"])) self.assertFalse(lacks_counts("Answer the question")) -- 2.52.0 From 779d05886b569bd751981a272554426d26cbad63 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 11:40:38 +0200 Subject: [PATCH 06/19] =?UTF-8?q?Answer=20stability=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20the=20three?= =?UTF-8?q?=20repeated=20tests=20went=20in=20the=20principles=20answer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From 13447388a2ab8b1e1549f5680200c62f8fb867cf Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 11:40:38 +0200 Subject: [PATCH 07/19] =?UTF-8?q?Answer=20security=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1=20(0=20misread);=20nothing=20t?= =?UTF-8?q?o=20change?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From bac9dd54bc88ced76e3484116d10047a9f9818bf Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 11:40:38 +0200 Subject: [PATCH 08/19] =?UTF-8?q?Answer=20overrides=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1=20(0=20misread);=20both=20over?= =?UTF-8?q?rides=20accepted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From 9d4d6ee401c839472d59ac97305bb2bfa3de71eb Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 11:40:38 +0200 Subject: [PATCH 09/19] =?UTF-8?q?Answer=20product-owner=20round=201:=200?= =?UTF-8?q?=20=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20spell=20?= =?UTF-8?q?each=20chunk's=20line=20as=20round=20titles=20do,=20and=20say?= =?UTF-8?q?=20where=20the=20list=20sits?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 +- bin/score_outcomes/main.py | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6580b5d5..6fd58ef2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -- Reviewers now mark a ๐Ÿ”ด or ๐ŸŸก `[misread]` where it arose because the implementer misread code that had already shipped. A round's commit title now counts the marked findings, as in `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); โ€ฆ`, and rule-hook's `round-title-counts` blocks a round title without that count. `score-outcomes` shows the count on each finished item, and ends its report with each chunk's count, newest first. Chunks titled before this change read as unknown. +- Reviewers now mark a ๐Ÿ”ด or ๐ŸŸก `[misread]` where it arose because the implementer misread code that had already shipped. A round's commit title now counts the marked findings, as in `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); โ€ฆ`, and rule-hook's `round-title-counts` blocks a round title without that count. `score-outcomes` shows the count on each finished item, and lists it after the medians for each chunk whose round titles carry it, newest first. A chunk whose round titles predate this change reads as unknown. - larv-review's skill now says a commit answering the external auto-reviewer takes no `Answer round` title, and that `larv-review round-count` doesn't list the auto-reviewer. A worker who followed the skill used to get a "not a pass" warning. - 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. diff --git a/bin/score_outcomes/main.py b/bin/score_outcomes/main.py index d681d238..ea1f3d12 100644 --- a/bin/score_outcomes/main.py +++ b/bin/score_outcomes/main.py @@ -19,12 +19,11 @@ holds R and S, and C too where its table also had A, G and Goals. The chunk meas - review rounds past each pass's first: among the branch's `Answer round :` commit titles, each pass's rounds as `larv-review round-count` counts them, less one, summed; - ๐Ÿ”ด and ๐ŸŸก findings: summed over those titles, each opening ` ๐Ÿ”ด, ๐ŸŸก` after the colon, - such as `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก; flag a deleted test`. Unknown where a round title - lacks the counts, or the branch has no round; -- findings from misread shipped code: of those ๐Ÿ”ด and ๐ŸŸก findings, the ones a reviewer marked - `[misread]`, because the implementer misread code that had already shipped, summed over the titles' - `( misread)` after the ๐ŸŸก count, such as `1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread)`. Unknown where a round title - lacks the count, as every title from before it does, or the branch has no round. + such as `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); flag a deleted test`. Unknown where a + round title lacks the counts, or the branch has no round; +- misread findings: how many of those ๐Ÿ”ด and ๐ŸŸก findings a reviewer marked `[misread]`, the + `( misread)` after the ๐ŸŸก count, summed over the titles. Unknown where a round title lacks + that count, as every title written before the count does, or the branch has no round. A chunk is marked `by rebase` where a commit in it has a committer time apart from its author time, since a rebase replays a pull request's commits at once, and `never replayed` where none does, since @@ -52,8 +51,8 @@ that shipped one item, since a chunk measures all its items at once. It leaves o replayed, which may hold only part of a pull request. It reports a score only once 10 of the chunks it counts hold it and its outcomes. -Last, each finished chunk's findings from misread shipped code among its ๐Ÿ”ด and ๐ŸŸก findings, newest -first, for every chunk whose round titles count them: code health's counter-signal in +Then, newest first, each finished chunk's ๐Ÿ”ด and ๐ŸŸก findings with its misread findings, for every +chunk whose round titles count them: code health's counter-signal in ~/.claude/CLAUDE.md โ†’ "Shared goal". Exit 1, saying why, on bad arguments, when git cannot start, finds no checkout or reads a shallow @@ -108,7 +107,7 @@ def main(argv: list[str]) -> int: def report_text(results: list[Result], anchored: Anchors | Failure, given: dict[str, int] | None) -> str: - """The report: the finished items nearest the given scores, where any are given, then the anchors, then the medians.""" + """The report: the finished items nearest the given scores, where any are given, then the anchors, then the medians, then each chunk's misread findings.""" sections = [] if given is not None: r = risk(given["L"], given["E"], given["I"]) -- 2.52.0 From 477772d7a5119100f3d52cf25936440be9bc12fb Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 11:40:38 +0200 Subject: [PATCH 10/19] =?UTF-8?q?Answer=20prose=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=2012=20=F0=9F=9F=A1=20(0=20misread);=20reword=20t?= =?UTF-8?q?he=20decision,=20the=20Misread=20section=20and=20the=20comments?= =?UTF-8?q?,=20mark=20item=20110=20decision,=20file=20item=20222?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/decisions.md | 2 +- skills/larv-review/SKILL.md | 2 +- skills/larv-review/review-findings.md | 4 ++-- todo.md | 9 +++++++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/decisions.md b/docs/decisions.md index 9dcef27a..b08c2960 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -144,7 +144,7 @@ Valid while the ladder orders its rungs by competence. ## review: a reviewer under `agents/` marks a ๐Ÿ”ด or ๐ŸŸก `[misread]` where the implementer misread code that had already shipped, each round title counts the marked findings, and `score-outcomes` lists them per chunk -2026-10-23, claude. Serves code health (`CLAUDE.md` โ†’ "Shared goal"): its counter-signal, reviewers raising blockers because the implementer misunderstood the current system, had no count, since no tool recorded why a finding arose. The reviewer is the one that knows, so it marks the finding (`skills/larv-review/review-findings.md` โ†’ "Misread"). The worker counts the marked ๐Ÿ”ด and ๐ŸŸก findings in the round's commit title, `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); โ€ฆ`, which `score-outcomes` already reads for the ๐Ÿ”ด and ๐ŸŸก counts, so the count needs no record of its own. rule-hook's `round-title-counts` refuses a round title without it, so a missing count never reads as zero. Titles from before the count read as unknown. A bench of three readers seated as the audience picked both spellings, two of three each: a prefix stays at a fixed place on a skimmed line, and the parenthesis reads as a share of the ๐Ÿ”ด and ๐ŸŸก counts, not a third kind of finding. Only the reviewers under `agents/` mark findings; `/security-review` and a forge's auto-reviewer don't. Item 110's later fixes stand for the other half of the counter-signal, the defects that keep reappearing. Valid while round titles are where `score-outcomes` reads a chunk's findings. +2026-10-23, claude. Serves code health (`CLAUDE.md` โ†’ "Shared goal"): its counter-signal, reviewers raising blockers because the implementer misunderstood the current system, had no count, since no tool recorded why a finding arose. The reviewer is the one that knows, so it marks the finding (`skills/larv-review/review-findings.md` โ†’ "Misread"). The worker counts the marked ๐Ÿ”ด and ๐ŸŸก findings in the round's commit title, `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); โ€ฆ`, which `score-outcomes` already reads for the ๐Ÿ”ด and ๐ŸŸก counts, so the count needs no record of its own. rule-hook's `round-title-counts` refuses a round title without the count, or with more misread findings than findings, so a title that leaves the count out never reads as zero; titles from before the count read as unknown. Only the reviewers under `agents/` mark findings. `/security-review` marks none, so its round titles count 0 misread, and the count is a floor. A bench of three readers seated as the audience chose `[misread]` right after the severity mark, which stays at a fixed place on a skimmed line, and the parenthesis `(1 misread)`, which reads as a share of the ๐Ÿ”ด and ๐ŸŸก counts rather than a third kind of finding, each two to one. The other half of the counter-signal, defects that keep reappearing, waits for the later fixes that `todo.md` item 110 counts. Valid while round titles are where `score-outcomes` reads a chunk's findings. ## review: an ask no user answers leaves the PR unmerged diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index 40d466ef..efb530f9 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -65,7 +65,7 @@ Give a reviewer without Bash the branch diff and `git ls-files`'s output in its - **Round.** A round is one review by a pass's reviewer: the first, each re-entry, and the rerun after the architect returns Stage 0 questions ("Architecture" below). A relaunch one rung up ("Rung up" below) stays in its round. - **Auto-reviewer.** The external auto-reviewer (ยง4) is a pass of its own, each review it posts a round. Its count is the number of its reviews on the PR, less its reviews of a `Record the comprehension check:` commit, and `round-count` doesn't list it. A commit that answers one of its rounds takes an ordinary title, not an `Answer round` one, and a round that changed nothing gets no commit. -- **Count.** Close each round of a pass other than the auto-reviewer with one commit that holds the round's fixes. Title it `Answer round : ๐Ÿ”ด, ๐ŸŸก ( misread); โ€ฆ`: `` is the pass's name in lower case, such as `full scan`, `` and `` are the ๐Ÿ”ด and ๐ŸŸก findings all the round's reviewers reported, and `` is how many of those they marked `[misread]` (review-findings.md โ†’ "Misread"). Example: `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); 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. +- **Count.** Close each round of a pass other than the auto-reviewer with one commit that holds the round's fixes. Title it `Answer round : ๐Ÿ”ด, ๐ŸŸก ( misread); โ€ฆ`: `` is the pass's name in lower case, such as `full scan`, `` and `` are the ๐Ÿ”ด and ๐ŸŸก findings all the round's reviewers reported, and `` is how many of those they marked `[misread]` (review-findings.md โ†’ "Misread"); a reviewer that marks none, such as `/security-review`, adds 0. Example: `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); 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. - **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. rule-hook refuses a round commit titled past round 3 unless its `round-cap` override quotes the yes. diff --git a/skills/larv-review/review-findings.md b/skills/larv-review/review-findings.md index 8116287e..dbda6e38 100644 --- a/skills/larv-review/review-findings.md +++ b/skills/larv-review/review-findings.md @@ -16,7 +16,7 @@ A finding against a technical principle names it and the file under `~/.claude/p ## Misread -Mark a ๐Ÿ”ด or ๐ŸŸก `[misread]`, right after its severity mark, where it arose because the implementer misread code that had already shipped before this change: a wrong belief about what that code does, what a name means or what a contract promises. A defect in the change's own new code is not misread. `score-outcomes` counts the marked findings per chunk, as code health's counter-signal (`~/.claude/CLAUDE.md` โ†’ "Shared goal"). +Mark a ๐Ÿ”ด or ๐ŸŸก `[misread]`, right after its severity mark, where it arose because the implementer misread code that shipped before this change: a wrong belief about what that code does, what a name means or what a contract promises. Don't mark a finding about a defect in the change's own new code. `score-outcomes` counts the marked findings per chunk, as code health's counter-signal (`~/.claude/CLAUDE.md` โ†’ "Shared goal"). ## Verdict @@ -35,7 +35,7 @@ Where your report holds a finding against `~/.claude/skills/larv-review/standard Write your full report with the Write tool to the file your prompt names. The file is the worker's input, which it searches for each finding's entry, so write it even where your harness says to return findings directly. It holds the verdict, then every finding with its place, its evidence and its fix, as your agent file shapes them. Then return only: - the verdict line -- one line per finding, in this order: its severity mark, `[misread]` where it holds, its place, and what is wrong, in one sentence. Where the finding breaks `standards/quality.md` or a file under `~/.claude/principles/`, end the line with that file's name. For a ๐Ÿ”€, end it with the reviewer it names. Example: ``๐ŸŸก `bin/example.py:42` `parse`: an empty line raises IndexError (technical-principles.md)`` +- one line per finding, in this order: its severity mark, `[misread]` where you marked the finding so, its place, and what is wrong, in one sentence. Where the finding breaks `standards/quality.md` or a file under `~/.claude/principles/`, end the line with that file's name. For a ๐Ÿ”€, end it with the reviewer it names. Example: ``๐ŸŸก `bin/example.py:42` `parse`: an empty line raises IndexError (technical-principles.md)`` - for stability-reviewer, whether the tests passed, and at which commit - `Rerun one rung up`, where your report ends with it - the report's path diff --git a/todo.md b/todo.md index d4fbc2bf..36e94f97 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 0.1` -`Next ID = 222` +`Next ID = 223` ## Items @@ -17,6 +17,7 @@ | 6 | 0.4.0 | | decision | **Move what `loop-claude` writes out of `~/.claude.json`, and ask the human about each write that must stay.** | 3 | 3 | 3 | 7 | 3 | 1.1 by 5 | 5.3 | | 1 | 0.5.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 | | 219 | 0.5.0 | | | **Name the project's rung `project` in `bin/judge_replay/main.py`, `bin/subagent_rung/main.py` and `bin/review_replay/main.py`, in place of `anchor`, as `bin/model_routing/ladder.py` and `bin/loop_claude` name it.** | 1 | 1 | 3 | 3 | 2 | code health by 2 | 12.0 | +| 222 | 0.5.0 | | | **Split `docs/decisions.md` โ†’ `todo.md: one table of items, โ€ฆ`'s 420-word scoring paragraph into one paragraph per choice, and drop the sentences that tell how the goal weights changed.** | 1 | 1 | 1 | 1 | 2 | code health by 2 | 12.0 | | 123 | 0.5.0 | | | **Have `bin/comprehension_history.py` parse each history entry once into seats, votes and places, so `latest_places`, `worse_places` and `worse_votes` neither depend on table order nor split a label to find a seat.** | 2 | 1 | 2 | 3 | 5 | code health by 5, 1.4 by 5 | 11.0 | | 139 | 0.5.0 | | | **Split `bin/routing_figures/measure.py` by concern, and keep the figures' measured cycle and each raised call as fields loop-claude reads back, not as the prose it renders.** | 3 | 1 | 2 | 4 | 5 | code health by 5, 1.4 by 5 | 11.0 | | 158 | 0.5.0 | | decision | **Measure the fixed cost of a chunk from loop-claude's archive, in tokens and hours against its items' S, and set F in `Score = 100 * V / (2**S + F)` to it.** | 2 | 2 | 1 | 3 | 3 | 1.1 by 5, 1.4 by 5 | 10.3 | @@ -36,7 +37,7 @@ | 102 | 0.5.0 | | | **Give loop-claude's retry delay an environment override, so the black-box test stops replacing `time.sleep` through `sitecustomize`.** | 1 | 1 | 2 | 2 | 2 | 1.1 by 4 | 5.6 | | 173 | 0.5.0 | | | **Have rule-hook's `todo-rank-check` run a worktree's own `bin/rank_todo.py` when the worktree is of this repo, so a branch that changes `todo.md`'s shape commits without an override.** | 2 | 1 | 3 | 4 | 2 | 1.1 by 2, 1.4 by 2 | 5.5 | | 101 | 0.5.0 | | principle | **Have `larv_review/history_commands.py`'s `read_seats` take the time, the commit check and the history as inputs, so it parses and decides without effects.** | 2 | 1 | 2 | 3 | 3 | 1.1 by 5 | 5.3 | -| 110 | 0.5.0 | | | **Count, for each finished chunk, the later changes that fixed code it wrote, and show them beside its guessed E.** | 3 | 2 | 2 | 5 | 5 | 1.1 by 6, 1.4 by 6 | 4.9 | +| 110 | 0.5.0 | | decision | **Count, for each finished chunk, the later changes that fixed code it wrote, and show them beside its guessed E.** | 3 | 2 | 2 | 5 | 5 | 1.1 by 6, 1.4 by 6 | 4.9 | | 12 | 0.5.0 | | | **Run the test suite in CI on every PR, or record in `docs/decisions.md` why the local run is enough.** | 3 | 2 | 1 | 4 | 4 | 1.1 by 6 | 4.2 | | 135 | 0.5.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 | 4.2 | | 171 | 0.5.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 | 4.0 | @@ -92,6 +93,10 @@ The README line covers the bench's transcripts in `workflow-bench/logs/` too (go Item 172 renamed `anchor` to `project` across `bin/loop_claude`, after release 0.3.0's inherited architect named `bin/loop_claude/cycle/judge.py:68` `Reply.bundled`: "the project's rung is also called anchor". Three tools outside it still call the same rung `anchor`: `bin/judge_replay/main.py:54` (`anchor = arguments_or_exit(...)`, a `Rung` parsed from the model argument), `bin/subagent_rung/main.py:26` (`anchor = project_rung(model)`), and `bin/review_replay/main.py:74`, `:100` and `:180`, with `findings_found`'s docstring. While the name differs between tools, a reader works out each time that the two are one rung. The rename keeps behaviour. `bin/score_outcomes/anchors.py` uses `anchor` for score anchors, a different thing, and keeps the name. +### 222. Split `docs/decisions.md` โ†’ `todo.md: one table of items, โ€ฆ`'s 420-word scoring paragraph into one paragraph per choice, and drop the sentences that tell how the goal weights changed. + +Found by the prose review of PR #368. The paragraph that opens `2026-10-16, PR #283: items rank by` covers the formula, F, the goal weights, the panels' spelling picks, the column order and the old shape, and grew a sentence per chunk. A reader looking for what F is, or why `2**S`, searches all of it. Its sentences on how the goal weights changed over time, such as the one on PR #319, describe past states, not what holds; git history keeps them. + ### 123. Have `bin/comprehension_history.py` parse each history entry once into seats, votes and places, so `latest_places`, `worse_places` and `worse_votes` neither depend on table order nor split a label to find a seat. Three seats of PR #257's scoring run named `bin/comprehension_history.py:106` `latest_places`; the logic it rests on is `:114` `worse_places` and `:126` `worse_votes`. They regex the markdown the module writes. `worse_votes` keeps a seat's first row through `setdefault`, because the votes table comes first. `worse_places` recovers the seat with `label.split(",")[0]`. `Entry` still holds scoring seats' places for rulings recorded before PR #255. Release 0.3.0's seats named near-synonyms left from before PR #255: `:150` `scoring_runs`, "near-synonyms scored and scoring_runs differ only on a ruling from before PR #255" (Maintainability senior), `:130` `newest_scored`, "four near-identical names over two concepts", and `:159` `scored`. Make these functions easier to read. -- 2.52.0 From 9aa174d5110ab4a7e0c90128f1597fdf97f4bc96 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 11:45:40 +0200 Subject: [PATCH 11/19] =?UTF-8?q?Answer=20principles=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20say=20in=20?= =?UTF-8?q?rule-hook's=20refusal=20that=20the=20misread=20count=20is=20at?= =?UTF-8?q?=20most=20the=20findings,=20and=20move=20a=20stray=20assertion?= =?UTF-8?q?=20back?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/round_titles.py | 2 +- bin/rule_hook/rules.py | 4 ++-- bin/test_round_titles.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/round_titles.py b/bin/round_titles.py index 0852e36a..b37c0dd2 100644 --- a/bin/round_titles.py +++ b/bin/round_titles.py @@ -32,7 +32,7 @@ def round_counts(titles: list[str]) -> dict[str, int]: def lacks_counts(title: str) -> bool: - """Whether title is a round title without all three counts after its colon.""" + """Whether title is a round title without all three counts after its colon, or with more misread findings than ๐Ÿ”ด and ๐ŸŸก findings.""" return ROUND.match(title) is not None and ((counts := title_counts(title)) is None or counts.misread is None) diff --git a/bin/rule_hook/rules.py b/bin/rule_hook/rules.py index 451c2043..56409dce 100644 --- a/bin/rule_hook/rules.py +++ b/bin/rule_hook/rules.py @@ -57,7 +57,7 @@ RULES: dict[RuleName, Rule] = { "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, and how many of them a reviewer marked `[misread]`, such as `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); flag a deleted test`, since score-outcomes counts them", + "a larv-review round's commit title gives the counts of ๐Ÿ”ด and ๐ŸŸก findings the round reported, and how many of them a reviewer marked `[misread]`, at most the two together, such as `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); flag a deleted test`, since score-outcomes counts them", "a git commit whose message opens `Answer round :`", ), "todo-rank-check": Rule( @@ -132,7 +132,7 @@ def command_breaches(command: str, simples: list[Simple], home: str) -> list[Bre 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 ` ๐Ÿ”ด, ๐ŸŸก ( misread);`", commit.directory)) + breaches.append(Breach("round-title-counts", "open the summary after the round's colon with ` ๐Ÿ”ด, ๐ŸŸก ( misread);`, where is at most + ", commit.directory)) return breaches diff --git a/bin/test_round_titles.py b/bin/test_round_titles.py index b4e22248..37769359 100644 --- a/bin/test_round_titles.py +++ b/bin/test_round_titles.py @@ -52,12 +52,12 @@ class RoundFindings(unittest.TestCase): self.assertTrue(lacks_counts("Answer stability round 1: 0 ๐Ÿ”ด, 1 ๐ŸŸก; fix")) self.assertFalse(lacks_counts("Answer stability round 1: 0 ๐Ÿ”ด, 1 ๐ŸŸก (0 misread); fix")) self.assertFalse(lacks_counts("Answer prose round 2: 0 ๐Ÿ”ด, 0 ๐ŸŸก (0 misread)")) + self.assertFalse(lacks_counts("Answer the question")) def test_takes_a_title_counting_more_misread_findings_than_findings_as_lacking_its_counts(self): self.assertTrue(lacks_counts("Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (4 misread); fix")) self.assertFalse(lacks_counts("Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (3 misread); fix")) self.assertIsNone(round_findings(["Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก (4 misread); fix"])) - self.assertFalse(lacks_counts("Answer the question")) if __name__ == "__main__": -- 2.52.0 From 73b9eec07ce9a973f189eb15536705aac447a4bd Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 11:45:40 +0200 Subject: [PATCH 12/19] =?UTF-8?q?Answer=20product-owner=20round=202:=200?= =?UTF-8?q?=20=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20head=20t?= =?UTF-8?q?he=20list=20as=20findings=20with=20their=20misread=20count?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/score_outcomes/main.py | 2 +- bin/score_outcomes/test_score_outcomes.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/score_outcomes/main.py b/bin/score_outcomes/main.py index ea1f3d12..8ba9b2d0 100644 --- a/bin/score_outcomes/main.py +++ b/bin/score_outcomes/main.py @@ -115,7 +115,7 @@ def report_text(results: list[Result], anchored: Anchors | Failure, given: dict[ sections.append([f"Finished items nearest L {given['L']}, E {given['E']}, I {given['I']}, so R {r}, and S {given['S']}, closest first:", "", *near]) sections.append([f"Anchors in {ANCHORS_PATH}, each level's shipped items:", "", *anchor_lines(anchored, results)]) sections.append(["Median outcome at each guessed score, among chunks that shipped one item, never-replayed ones left out:", "", *report(results)]) - sections.append(["๐Ÿ”ด and ๐ŸŸก findings from misread shipped code, per finished chunk whose round titles count them, newest first:", "", *misreads(results)]) + sections.append(["๐Ÿ”ด and ๐ŸŸก findings, with how many a reviewer marked `[misread]`, per finished chunk whose round titles count them, newest first:", "", *misreads(results)]) if any(result.landed != "merge" for result in results): sections.append(UNMERGED) return "\n\n".join("\n".join(section) for section in sections) diff --git a/bin/score_outcomes/test_score_outcomes.py b/bin/score_outcomes/test_score_outcomes.py index 0216297c..263f8d0b 100644 --- a/bin/score_outcomes/test_score_outcomes.py +++ b/bin/score_outcomes/test_score_outcomes.py @@ -211,13 +211,13 @@ Median outcome at each guessed score, among chunks that shipped one item, never- - E, by review rounds past each pass's first and ๐Ÿ”ด findings: 0 {too_few} E and both outcomes; the report needs 10. - I, by review rounds past each pass's first and ๐Ÿ”ด findings: 0 {too_few} I and both outcomes; the report needs 10. -๐Ÿ”ด and ๐ŸŸก findings from misread shipped code, per finished chunk whose round titles count them, newest first: +๐Ÿ”ด and ๐ŸŸก findings, with how many a reviewer marked `[misread]`, per finished chunk whose round titles count them, newest first: - None: no chunk's round titles count them.""") def test_lists_each_chunks_findings_from_misread_shipped_code_newest_first_once_per_chunk(self): found = [result(1, 5, 3, None, findings=(1, 2), misread=1, merge="bbbbbbb", merged="2026-10-12T10:00:00Z", shipped_with=(2,)), result(2, 5, 3, None, findings=(1, 2), misread=1, merge="bbbbbbb", merged="2026-10-12T10:00:00Z", shipped_with=(1,)), result(3, 5, 3, None, findings=(0, 4), misread=0, merge="ccccccc", merged="2026-10-14T10:00:00Z", landed="rebase"), result(4, 5, 3, None)] - self.assertIn("""๐Ÿ”ด and ๐ŸŸก findings from misread shipped code, per finished chunk whose round titles count them, newest first: + self.assertIn("""๐Ÿ”ด and ๐ŸŸก findings, with how many a reviewer marked `[misread]`, per finished chunk whose round titles count them, newest first: - 2026-10-14T10:00:00Z in ccccccc: at least 0 ๐Ÿ”ด, 4 ๐ŸŸก (0 misread) - 2026-10-12T10:00:00Z in bbbbbbb: 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread)""", report_text(found, [], None)) -- 2.52.0 From 222ee12e09bde851c8faedb8faac609eaca41c22 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 11:45:40 +0200 Subject: [PATCH 13/19] =?UTF-8?q?Answer=20stability=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=202=20=F0=9F=9F=A1=20(0=20misread);=20both=20answ?= =?UTF-8?q?ered=20in=20the=20principles=20and=20product-owner=20answers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From ef392502baebc743fbd67073ce20138baffbab46 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 11:45:40 +0200 Subject: [PATCH 14/19] =?UTF-8?q?Answer=20overrides=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1=20(0=20misread);=20all=20six?= =?UTF-8?q?=20overrides=20accepted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From ff08f496cbfd18e5b0fa9c274d69be17bd120776 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 11:49:30 +0200 Subject: [PATCH 15/19] =?UTF-8?q?Answer=20principles=20round=203:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1=20(0=20misread);=20rename=20tw?= =?UTF-8?q?o=20tests=20to=20what=20they=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/score_outcomes/test_score_outcomes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/score_outcomes/test_score_outcomes.py b/bin/score_outcomes/test_score_outcomes.py index 263f8d0b..c99b879e 100644 --- a/bin/score_outcomes/test_score_outcomes.py +++ b/bin/score_outcomes/test_score_outcomes.py @@ -144,7 +144,7 @@ class Render(unittest.TestCase): self.assertEqual(render(result(4, 2, 3, 4, findings=(1, 2))), "- Item 4, R 2, S 3, C 4: 10 lines in 1 file, 1 round past each pass's first, 1 ๐Ÿ”ด, 2 ๐ŸŸก; merged 2026-10-13T10:00:00Z in aaaaaaa. **Item 4.**") self.assertIn("1 round past each pass's first, 0 ๐Ÿ”ด, 0 ๐ŸŸก; merged 2026-10-13T10:00:00Z in aaaaaaa, with item 5. ", render(result(4, 2, 3, 4, rounds=1, shipped_with=(5,)))) - def test_counts_the_findings_from_misread_shipped_code_where_its_round_titles_do(self): + def test_gives_the_misread_count_where_the_round_titles_do(self): self.assertIn("1 round past each pass's first, 1 ๐Ÿ”ด, 2 ๐ŸŸก (1 misread); merged", render(result(4, 2, 3, None, findings=(1, 2), misread=1))) self.assertIn("1 round past each pass's first, 0 ๐Ÿ”ด, 0 ๐ŸŸก (0 misread); merged", render(result(4, 2, 3, None, misread=0))) @@ -215,7 +215,7 @@ Median outcome at each guessed score, among chunks that shipped one item, never- - None: no chunk's round titles count them.""") - def test_lists_each_chunks_findings_from_misread_shipped_code_newest_first_once_per_chunk(self): + def test_lists_each_chunks_findings_with_their_misread_count_newest_first_once_per_chunk(self): found = [result(1, 5, 3, None, findings=(1, 2), misread=1, merge="bbbbbbb", merged="2026-10-12T10:00:00Z", shipped_with=(2,)), result(2, 5, 3, None, findings=(1, 2), misread=1, merge="bbbbbbb", merged="2026-10-12T10:00:00Z", shipped_with=(1,)), result(3, 5, 3, None, findings=(0, 4), misread=0, merge="ccccccc", merged="2026-10-14T10:00:00Z", landed="rebase"), result(4, 5, 3, None)] self.assertIn("""๐Ÿ”ด and ๐ŸŸก findings, with how many a reviewer marked `[misread]`, per finished chunk whose round titles count them, newest first: -- 2.52.0 From 29715fcd2a610e1daa902315e1c85c92f7450520 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 11:49:30 +0200 Subject: [PATCH 16/19] =?UTF-8?q?Answer=20stability=20round=203:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1=20(0=20misread);=20nothing=20t?= =?UTF-8?q?o=20change?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From 2bbfb9093686ff5b6a0040d8b01ac81d32114075 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 11:49:30 +0200 Subject: [PATCH 17/19] =?UTF-8?q?Answer=20product-owner=20round=203:=200?= =?UTF-8?q?=20=F0=9F=94=B4,=200=20=F0=9F=9F=A1=20(0=20misread);=20nothing?= =?UTF-8?q?=20to=20change?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From 5e7e3649c68ef691dafe2095b1ff82d50fbe6586 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 11:49:30 +0200 Subject: [PATCH 18/19] =?UTF-8?q?Answer=20overrides=20round=203:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1=20(0=20misread);=20all=20four?= =?UTF-8?q?=20overrides=20accepted,=20later=20round=203=20commits=20ruled?= =?UTF-8?q?=20on=20ahead?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From 91f328e8de3ae54fdf246f28917c7dde49925462 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 11:51:12 +0200 Subject: [PATCH 19/19] Record the comprehension check: paired ruling better against 4a0ba59 --- docs/comprehension-history.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/comprehension-history.md b/docs/comprehension-history.md index d7ec848d..c7252e91 100644 --- a/docs/comprehension-history.md +++ b/docs/comprehension-history.md @@ -2626,3 +2626,25 @@ Inherited architect, decided by: - Shape, Self-sufficiency: `bin/reading_cost/measure.py:13` `Reading`: `files` no longer borrows the seats' place, and the docstring says what both fields count - Shape: `bin/judge_replay/replay.py:24` `Case.archived_kind`: says it is the kind the archive gave the verdict - Self-sufficiency: `bin/score_outcomes/results.py:22` `Result`: a reader translates between result in the code and outcome in the tool's name and report, a small cost the comment explains + +## 2026-10-23T09:51:07Z, PR #368 at 5e7e364, against 4a0ba59 + +Ruling: better + +| Seat | Navigation | Locality | Shape | Self-sufficiency | Overall | +|---|---|---|---|---|---| +| Mid A | same | better | better | same | better | +| Inherited architect | same | better | better | better | better | + +Mid A, decided by: + +- Locality, Shape: `bin/score_outcomes/results.py:40` `MEDIANS`: reads `result.findings.red` from the named `Findings` type where the base read `result.findings[0]` and sent the reader to `round_findings` to learn index 0 means ๐Ÿ”ด +- Locality, Shape: `bin/score_outcomes/results.py:138` `at_least`: the lower-bound rule and its reason now live in one named function that `render` and `misreads` share, with `counted` beside it +- Shape, Locality: `bin/round_titles.py:45` `title_counts`: one parse of a round title's counts where the base matched `FINDINGS` separately in each caller; `lacks_counts` now also means inconsistent counts, a small cost + +Inherited architect, decided by: + +- Shape, Self-sufficiency: `bin/score_outcomes/results.py:33` `Result.findings`: a named `Findings` type in place of a bare `tuple[int, int]`, so each use reads `.red` or `.yellow` with no docstring open +- Locality: `bin/round_titles.py:45` `title_counts`: one function parses the counts after a round title's colon, so a change to the title format happens in one place +- Locality: `bin/score_outcomes/results.py:143` `counted`: `render` and `misreads` share one spelling of a chunk's findings, so the two output paths cannot drift apart +- Shape: `bin/round_titles.py:34` `lacks_counts`: the name now also covers a misread count above ๐Ÿ”ด plus ๐ŸŸก, which a reader chasing a refusal learns only from the body; a cost that doesn't outweigh the gains -- 2.52.0