diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d008e29..3f07484d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -- Every `todo.md` item scores C, how hard the change is to get right, from 1 to 10, in a column after S. C stays out of the score. `rank_todo.py` fails on an items table without the column, and the rule hook then blocks committing that `todo.md`. Add the column to each project's `todo.md` and score every item's C, as `rank_todo.py --help` shows. +- Every `todo.md` item scores C, how hard the change is to get right, from 1 to 10, in a column after S. C stays out of the score. `rank_todo.py` fails on an items table without the column, and the rule hook then blocks committing that `todo.md`. Before a project's next loop run, add the column to its `todo.md` and score every item's C, as `rank_todo.py --help` shows. - The new `bin/score-outcomes` shows what finished chunks measured beside the R, S and C their items were guessed at: lines and files changed, review rounds, and ๐Ÿ”ด and ๐ŸŸก findings. It reads them from the default branch's merge commits, so a project that merges by squash or fast-forward shows none. Given a guess, it lists the 5 finished items guessed nearest, and for each score the median outcome at each guessed value, once 10 chunks of one item hold it: R against ๐Ÿ”ด findings, S against lines changed, C against review rounds past each pass's first. A session filing or editing an item runs it and scores R, S and C from what it shows. larv-review titles each round's commit with the round's ๐Ÿ”ด and ๐ŸŸก counts, `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก; โ€ฆ`, and the rule hook's new `round-title-counts` rule blocks a round title without them, so the findings count from now on. - The stability reviewer mutation-tests the lines each change adds or modifies: it makes small changes to that code, such as flipping a comparison. For each test to add or strengthen, it reports one ๐ŸŸก naming the changes that test would catch. It uses the project's documented mutation command, or else cargo-mutants, Infection, mutmut or Stryker. The technical principles replace "Test coverage should not decline" with "Every mutant of a changed line fails a test, unless the mutant leaves behaviour unchanged", and say what a valuable test is: it checks behaviour through the unit's interface, and fails when that behaviour breaks. README โ†’ "Tools" gives the mutmut command for `bin/`. Expect longer stability passes and more ๐ŸŸกs about tests. In a project whose README documents no mutation command, the reviewer picks and installs a tool on each run; document one there to make the runs consistent. - Each new `loop-claude` worker session's prompt now quotes the README's Goals and Audience. A line above them says that the chunk's `todo.md` items, or else the task, set its scope, and that the goals only choose how to deliver it. A session outside the loop reads Goals and Audience before starting a chunk, as `CLAUDE.md` now says. diff --git a/bin/rank_todo.py b/bin/rank_todo.py index 2028a777..89840f07 100755 --- a/bin/rank_todo.py +++ b/bin/rank_todo.py @@ -187,7 +187,7 @@ def rank(text: str, readme: str, decisions: str) -> Ranked | Failure: def read_scoring(text: str, lines: list[str], readme: str) -> Scoring | Failure: if ITEMS_HEADER not in lines and "## Items" not in lines: return Failure("todo.md is not in the scored-table format; rank_todo.py --help shows a valid one") - # Item 87: a table without C fails, so no chunk starts on an unscored item; each project scores C before its next todo.md commit. + # A table without C fails, so no chunk starts on an unscored item; each project scores C before its next todo.md commit. if WITHOUT_C in lines: return Failure("todo.md's items table has no C column; add one after S, and score each item's C from 1 to 10 per rank_todo.py --help") goals = readme_goals(readme) diff --git a/bin/score_outcomes/main.py b/bin/score_outcomes/main.py index d9d56032..5b3994cb 100644 --- a/bin/score_outcomes/main.py +++ b/bin/score_outcomes/main.py @@ -62,7 +62,7 @@ def main(argv: list[str]) -> int: if argv: given = dict(zip("RSC", map(int, argv))) print(f"Finished items nearest R {given['R']}, S {given['S']}, C {given['C']}, closest first:\n") - print("\n".join(render(outcome) for outcome in nearest(outcomes, given)) or "- None: no merge commit on the default branch shipped an item from todo.md.") + print("\n".join(render(outcome) for outcome in nearest(outcomes, given)) or "- None: no merge commit on the default branch shipped an item from todo.md. A project that merges by squash or fast-forward has none.") print() print("Median outcome at each guessed score, among chunks that shipped one item:\n") print("\n".join(report(outcomes))) diff --git a/bin/score_outcomes/test_score_outcomes.py b/bin/score_outcomes/test_score_outcomes.py index 10e37fa9..b4be6d41 100644 --- a/bin/score_outcomes/test_score_outcomes.py +++ b/bin/score_outcomes/test_score_outcomes.py @@ -87,6 +87,7 @@ class Report(unittest.TestCase): class Render(unittest.TestCase): def test_names_the_items_shipped_together_and_unknown_findings(self): self.assertEqual(render(outcome(4, 2, 3, None, lines=1, rounds=2, findings=None, shipped_with=(5, 6))), "- Item 4, R 2, S 3: 1 line in 1 file, 2 rounds past each pass's first, findings unknown; merged 2026-10-13T10:00:00Z in aaaaaaa, with items 5, 6. **Item 4.**") + self.assertEqual(render(outcome(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(outcome(4, 2, 3, 4, rounds=1, shipped_with=(5,)))) diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index 92a6b86f..3bc44146 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -66,7 +66,7 @@ Give a reviewer without Bash the branch diff and `git ls-files`'s output in its - **Round.** A round is one launch of a pass's reviewer: the first, each re-entry, and the rerun after the architect returns Stage 0 questions ("Architecture" below). A rescore is a round only as "Architecture" โ†’ "Fresh" says. - **Architecture round.** The architecture pass's first round is the architect (unless skipped), the principles audit and the comprehension check, which "Opt-out" or "Architecture" โ†’ "Suspended" may skip. A later round relaunches each reviewer whose ๐Ÿ”ด or ๐ŸŸก the previous round's fixes answer, the comprehension check only as "Architecture" โ†’ "Fresh" says. Where those fixes carry an architectural decision, the architect and the principles audit run again. - **Auto-reviewer.** The external auto-reviewer (ยง4) is a pass of its own, each review it posts a round. -- **Count.** Close each round with one commit that holds the round's fixes and is titled `Answer round : ๐Ÿ”ด, ๐ŸŸก; โ€ฆ`, `` being the pass's name in lower case, such as `full scan`, and the counts the ๐Ÿ”ด and ๐ŸŸก findings the round reported, such as `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก; flag a deleted test`. `~/.claude/bin/score-outcomes` reads the counts to calibrate the plan's scores, and the rule hook blocks a round title without them. A round that changed nothing gets an empty commit (`git commit --allow-empty`). Push the commits when ยง4 runs next, where there is a remote. `~/.claude/bin/larv-review round-count` prints each pass's count and marks a pass at the cap. The auto-reviewer's count is the number of its reviews on the PR, less its reviews of a `Rescore:` commit. +- **Count.** Close each round with one commit that holds the round's fixes and is titled `Answer round : ๐Ÿ”ด, ๐ŸŸก; โ€ฆ`, `` being the pass's name in lower case, such as `full scan`, and `` and `` the ๐Ÿ”ด and ๐ŸŸก findings the round's reviewers reported, summed, such as `Answer stability round 1: 1 ๐Ÿ”ด, 2 ๐ŸŸก; flag a deleted test`. `~/.claude/bin/score-outcomes` reads the counts to calibrate the plan's scores, and the rule hook blocks a round title without them. A round that changed nothing gets an empty commit (`git commit --allow-empty`). Push the commits when ยง4 runs next, where there is a remote. `~/.claude/bin/larv-review round-count` prints each pass's count and marks a pass at the cap. The auto-reviewer's count is the number of its reviews on the PR, less its reviews of a `Rescore:` commit. - **Later rounds.** A rerun pass reviews only what changed since it last reviewed: `git diff HEAD`, since the fixes may be unpushed. The comprehension check's seats still read the whole project. From round 2, prompt an agent under `~/.claude/agents/` with its own last round's findings verbatim too. - **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, 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. diff --git a/todo.md b/todo.md index ebc8763c..754660df 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 9` -`Next ID = 116` +`Next ID = 117` | Goal | W | |---|---| @@ -38,6 +38,7 @@ | 110 | 0.2.0 | | **Count, for each finished chunk, the later changes that fixed code it wrote, and show them beside its guessed R.** | 2 | 4 | 6 | 5 | 6 | 1.1, 1.4 | 18.9 | | 89 | 0.2.0 | | **Run the judge on the rung its chunk's R + C picks, once a replay of archived transcripts shows it returns the verdicts on record.** | 3 | 4 | 7 | 5 | 6 | 1.4 | 17.5 | | 115 | 0.2.0 | question | **Confirm or set how many finished chunks of one item `score-outcomes` waits for before it shows a score's medians, today 10.** | 1 | 1 | 2 | 4 | 5 | 1.2 | 16.6 | +| 116 | 0.2.0 | | **Report R by the share of chunks with a ๐Ÿ”ด, once 10 chunks of one item record finding counts and most record no ๐Ÿ”ด.** | 1 | 2 | 2 | 4 | 5 | 1.1 | 16.4 | | 111 | 0.2.0 | | **Measure the chunks of a project that merges by squash or fast-forward, which `score-outcomes` skips today.** | 3 | 3 | 5 | 4 | 5 | 1.3 | 13.9 | | 113 | 0.2.0 | | **Compute an item's S from the code it names, where it names any, and show it beside the finished items `score-outcomes` lists.** | 3 | 4 | 6 | 4 | 5 | 1.1, 1.4 | 13.9 | | 1 | 0.3.0 | question | **Say in README โ†’ Install how the transcript archive is backed up, once bender-infra backs up ai-sandbox's data volume.** | 3 | 5 | 2 | 8 | 9 | 3, 4 | 27.0 | @@ -144,6 +145,10 @@ Needs 88. `ENOUGH` in `bin/score_outcomes/outcomes.py` reuses the 10 figures the reading-cost trend waits for. No published standard sets either, and `CLAUDE.md` โ†’ "Web research" asks the human for a threshold a consumer relies on. +### 116. Report R by the share of chunks with a ๐Ÿ”ด, once 10 chunks of one item record finding counts and most record no ๐Ÿ”ด. + +`score-outcomes` reports R as the median ๐Ÿ”ด count at each guessed R. Where most chunks have no ๐Ÿ”ด, every median reads 0 and tells a scorer nothing. No round title held counts before PR #254, so how often a chunk has a ๐Ÿ”ด is not yet known. + ### 111. Measure the chunks of a project that merges by squash or fast-forward, which `score-outcomes` skips today. `score-outcomes` reads a chunk from a merge commit: its branch's round titles, and its change against the first parent. Two of the projects under `~/code` merge without merge commits, so their scorers see no finished item.