Report L by the share of chunks with a 🔴 in score-outcomes where most hold none #447
@@ -2,6 +2,7 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
- `score-outcomes` now gives, where most of the chunks it counts for L hold no 🔴, the share of chunks with a 🔴 at each L in place of L's rank correlation by 🔴 findings.
|
||||
- `todo-item add` now files an item in `todo.md` with one command. It takes `Next ID` as the item's ID, raises `Next ID`, writes the row and the detail it reads from stdin, and ranks the file.
|
||||
- `todo-item finish <ID>` now removes a finished item's row and detail from `todo.md`. With `--changelog <bullet>`, it also adds that bullet first under `CHANGELOG.md` → `## Unreleased`. Where a `CHANGELOG.md` exists, it refuses to run without `--changelog <bullet>` or `--no-changelog`, so no bullet is left out by mistake.
|
||||
- A worker whose review rules its work below standard now fixes it on its own rung where the fix changes only prose, a comment or docstring included. It hands the fix to a higher rung only where code, config or tests change.
|
||||
|
||||
@@ -66,7 +66,8 @@ each pass's first and by 🔴 findings: Spearman's rank correlation, from -1 to
|
||||
them exactly; none where every chunk held the same level, or the same outcome. It counts only chunks
|
||||
that shipped one item, since a chunk measures all its items at once. It leaves out the chunks never
|
||||
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.
|
||||
it counts hold it and its outcomes. Where more than half of the chunks it counts for L hold no 🔴, L's
|
||||
line gives its rank correlation by review rounds alone. A second line gives the share of chunks with a 🔴 at each L.
|
||||
|
||||
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
|
||||
|
||||
@@ -104,9 +104,12 @@ def report(results: list[Result]) -> list[str]:
|
||||
lines.append(opening + too_few(len(rows), name, "both outcomes"))
|
||||
continue
|
||||
guesses, rounds, red = ([row[column] for row in rows] for column in range(3))
|
||||
found = [rank_correlation(guesses, rounds), rank_correlation(guesses, red)]
|
||||
undefined = ", since every chunk held one value" if None in found else ""
|
||||
lines.append(opening + f"rank correlation {listed(['none' if value is None else f'{value:+.2f}' for value in found], 'and')}{undefined} ({plural(len(rows), 'chunk')})")
|
||||
if name == "L" and red.count(0) * 2 > len(red):
|
||||
# Where most chunks hold no 🔴, the rank by 🔴 findings rests on the few that have one, so L is read by how often a chunk has one.
|
||||
lines.append(f"- {name}, by review rounds past each pass's first: rank correlation {correlations([rank_correlation(guesses, rounds)])} ({plural(len(rows), 'chunk')})")
|
||||
lines.append(f"- {name}, by the share of chunks with a 🔴, since most of the {len(rows)} chunks hold none: " + ", ".join(f"{guess} → {sum(1 for at, count in zip(guesses, red) if at == guess and count)} of {plural(guesses.count(guess), 'chunk')}" for guess in sorted(set(guesses))))
|
||||
continue
|
||||
lines.append(opening + f"rank correlation {correlations([rank_correlation(guesses, rounds), rank_correlation(guesses, red)])} ({plural(len(rows), 'chunk')})")
|
||||
return lines
|
||||
|
||||
|
||||
@@ -137,6 +140,12 @@ def too_few(held: int, name: str, what: str) -> str:
|
||||
return f"{held} {chunks} {name} and {what}; the report needs {ENOUGH}."
|
||||
|
||||
|
||||
def correlations(found: list[float | None]) -> str:
|
||||
"""Each rank correlation as a signed number with two decimals, or `none` where it is undefined, then the reason a correlation is undefined once if any is."""
|
||||
undefined = ", since every chunk held one value" if None in found else ""
|
||||
return listed(["none" if value is None else f"{value:+.2f}" for value in found], "and") + undefined
|
||||
|
||||
|
||||
def rank_correlation(guesses: list[int], results: list[int]) -> float | None:
|
||||
"""Spearman's rank correlation, tied values sharing their mean rank; None where either side holds one value, which no order can rank."""
|
||||
if len(set(guesses)) < 2 or len(set(results)) < 2:
|
||||
|
||||
@@ -106,6 +106,26 @@ class Report(unittest.TestCase):
|
||||
self.assertIn("- I, by review rounds past each pass's first and 🔴 findings: rank correlation +1.00 and -1.00 (10 chunks)", lines)
|
||||
self.assertIn("- E, by review rounds past each pass's first and 🔴 findings: rank correlation none and none, since every chunk held one value (10 chunks)", lines)
|
||||
|
||||
def test_gives_l_by_the_share_of_chunks_with_a_red_finding_where_most_hold_none(self):
|
||||
levels = [1, 1, 2, 2, 2, 3, 3, 3, 4, 4]
|
||||
red = [0, 0, 0, 0, 0, 0, 0, 1, 2, 1]
|
||||
found = [result(id_, 2, 2, None, rounds=level, findings=(count, 0), levels={"L": level, "E": 2, "I": level}) for id_, (level, count) in enumerate(zip(levels, red), 1)]
|
||||
lines = report(found)
|
||||
self.assertIn("- L, by review rounds past each pass's first: rank correlation +1.00 (10 chunks)", lines)
|
||||
self.assertIn("- L, by the share of chunks with a 🔴, since most of the 10 chunks hold none: 1 → 0 of 2 chunks, 2 → 0 of 3 chunks, 3 → 1 of 3 chunks, 4 → 2 of 2 chunks", lines)
|
||||
self.assertTrue(any(line.startswith("- I, by review rounds past each pass's first and 🔴 findings: rank correlation +1.00 and +") for line in lines))
|
||||
|
||||
def test_keeps_the_rank_correlation_by_red_findings_where_half_the_chunks_hold_none(self):
|
||||
levels = [1, 1, 2, 2, 2, 3, 3, 3, 4, 4]
|
||||
red = [0, 0, 0, 0, 0, 1, 1, 1, 2, 2]
|
||||
found = [result(id_, 2, 2, None, rounds=level, findings=(count, 0), levels={"L": level, "E": 2, "I": level}) for id_, (level, count) in enumerate(zip(levels, red), 1)]
|
||||
self.assertTrue(any(line.startswith("- L, by review rounds past each pass's first and 🔴 findings: rank correlation +1.00 and +") for line in report(found)))
|
||||
|
||||
def test_says_when_l_rounds_have_one_value_beside_the_share_of_chunks_with_a_red_finding(self):
|
||||
levels = [1, 1, 2, 2, 2, 3, 3, 3, 4, 4]
|
||||
found = [result(id_, 2, 2, None, rounds=1, findings=(int(id_ == 10), 0), levels={"L": level, "E": 2, "I": 2}) for id_, level in enumerate(levels, 1)]
|
||||
self.assertIn("- L, by review rounds past each pass's first: rank correlation none, since every chunk held one value (10 chunks)", report(found))
|
||||
|
||||
|
||||
class Render(unittest.TestCase):
|
||||
def test_shows_an_items_l_e_and_i_before_its_r_and_s(self):
|
||||
|
||||
@@ -1361,3 +1361,20 @@ Read most (opens and searches):
|
||||
- `CLAUDE.md` 2
|
||||
- `docs/decisions.md` 2
|
||||
- `README.md` 1
|
||||
|
||||
## Reading cost, chunk f41e952086c5, finished 2026-11-09T00:54:09Z
|
||||
|
||||
193190 new input tokens before the first commit.
|
||||
|
||||
Read most (opens and searches):
|
||||
|
||||
- `README.md` 8
|
||||
- `bin/release_plan/ranking.py` 8
|
||||
- `bin/rank_todo.py` 5
|
||||
- `bin/release_plan/todo_table.py` 5
|
||||
- `CHANGELOG.md` 4
|
||||
- `todo.md` 4
|
||||
- `AGENTS.md` 3
|
||||
- `bin/release_plan/test_ranking.py` 3
|
||||
- `CLAUDE.md` 2
|
||||
- `rules/todo-items.md` 2
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ paths:
|
||||
- **I's reach counts every project and session that runs the change.** A change to a hook or a tool that every session runs is I level 3, every consumer affected, even where one person uses it.
|
||||
- **Name in Moves each achieve goal in `README.md` → `## Goals` the item moves, and how far,** from 1 to 10, judged by its value to the audience in `## Audience`: `1.1 by 8, 1.2 by 5`. Where the item moves code health, the goal in `CLAUDE.md` → "Shared goal", name it as in `code health by 6`, unless the README voids it. Name the most specific goal it moves, and a parent goal only for a move none of its sub-goals covers, never beside its own sub-goal. Leave out every maintain goal, which vetoes, except on an item marked `defect` that restores it: name that goal, and how much of it is broken. `rank_todo.py --help` says how it weighs each goal.
|
||||
- **A table with C, A, G and Goals in place of L, E, I and Moves is in the old shape.** Reshaping it is the project's only work until done, as `CLAUDE.md` → "Working loop" says, and `rank_todo.py` says how. Until then, A is the item's value to the audience and G its value to the goals it cites.
|
||||
- **Score L, E and I against the project's anchors, and check every score against finished chunks.** Guess the scores, then run `~/.claude/bin/score-outcomes <L> <E> <I> <S>` in the project. It lists the finished items guessed nearest and the project's anchors, the shipped items its `docs/score-anchors.md` names for each level, 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. Compare the item with each anchor in turn: is it more or less likely to hold a defect, to let one escape, or to do damage? Give it the level whose anchors it matches; where a level has no anchor, judge by the level's words in the table above. Set S to the value guessed for the finished items whose outcome matches what you expect of this one. Keep your guess when no listed item resembles the one you are scoring.
|
||||
- **Score L, E and I against the project's anchors, and check every score against finished chunks.** Guess the scores, then run `~/.claude/bin/score-outcomes <L> <E> <I> <S>` in the project. It lists the finished items guessed nearest and the project's anchors, the shipped items its `docs/score-anchors.md` names for each level, 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, L by the share of chunks with a 🔴 instead where most hold none. Compare the item with each anchor in turn: is it more or less likely to hold a defect, to let one escape, or to do damage? Give it the level whose anchors it matches; where a level has no anchor, judge by the level's words in the table above. Set S to the value guessed for the finished items whose outcome matches what you expect of this one. Keep your guess when no listed item resembles the one you are scoring.
|
||||
- **Anchor each level of L, E and I with two or three items the project shipped,** in `docs/score-anchors.md`: a table whose Level column names a level, such as `L 1`, and whose Items column lists the anchors' IDs, such as `12, 14`. Choose an L anchor whose chunk, as `score-outcomes` measured it, fits the level's words: its lines changed and the components it touched. Choose an E anchor by the level's words and the later fixes `score-outcomes` counts for its chunk, the defects that escaped it. Choose an I anchor by the level's words and what followed its release, since no tool measures I yet. Leave out a level no shipped item shows. Replace a level's anchors when the items scored at it turn out about ten times more likely, or ten times less likely, than its words say: to hold a defect, to let one escape, or to do damage.
|
||||
- **Read the places the comprehension seats found hard before filing an item.** `~/.claude/bin/larv-review places`, run in the project, prints them. Where the item's change touches one, its detail says to make that place easier to read.
|
||||
- **An item scoring under the bar is deleted, with every item that needs it, and a finding under the bar is not filed.** The chunk's summary names each, with its score.
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||
| 277 | 0.7.0 | | question | **Map the size of the code an item names onto S, on a scale the human picks, and have `score-outcomes` print that S for the item being scored and for each finished item it lists.** | 3 | 2 | 2 | 5 | 4 | 1.1 by 4, 1.4 by 3 | 2.4 |
|
||||
| 1 | 0.7.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 |
|
||||
| 116 | 0.7.0 | | | **Report L by the share of chunks with a 🔴, once 10 chunks that each shipped one item record finding counts and most record no 🔴.** | 1 | 1 | 2 | 2 | 2 | 1.1 by 5 | 2.3 |
|
||||
| 280 | 0.7.0 | | | **Open the chunk's pull request as a draft, mark it ready and merge it with one command per step that picks `tea` or `gh` from the remote, so no worker looks up `tea`'s or `gh`'s flags.** | 3 | 2 | 3 | 6 | 4 | 1.4 by 4, 1.5 by 3 | 2.3 |
|
||||
| 282 | 0.7.0 | | | **Write the branch diff and what `larv-review places` prints into the chunk's review folder, and print each reviewer's prompt header, with one `larv-review` command.** | 3 | 2 | 3 | 6 | 4 | 1.4 by 4, 1.5 by 3 | 2.3 |
|
||||
| 12 | 0.7.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 | 2.1 |
|
||||
@@ -77,10 +76,6 @@ It lives under `~/.claude`, which `.gitignore` keeps from the remote, so a lost
|
||||
|
||||
The README line covers the bench's transcripts in `workflow-bench/logs/` too (goal 3).
|
||||
|
||||
### 116. Report L by the share of chunks with a 🔴, once 10 chunks that each shipped one item record finding counts and most record no 🔴.
|
||||
|
||||
`score-outcomes` reports the median 🔴 count at each guessed R, and how well L orders chunks by 🔴 findings; the part of R a 🔴 tests is L. Where most chunks have no 🔴, every median reads 0 and the rank correlation rests on the few that have one, which tells a scorer little. No round title held counts before PR #254, so how often a chunk has a 🔴 is not yet known.
|
||||
|
||||
### 280. Open the chunk's pull request as a draft, mark it ready and merge it with one command per step that picks `tea` or `gh` from the remote, so no worker looks up `tea`'s or `gh`'s flags.
|
||||
|
||||
Audit of release 0.2.0's chunks (item 162): 37 chunks ran `tea pr` or `gh pr` create, ready, edit or merge, 106 calls, about 12.6k command tokens and 13.9k result tokens. 20 chunks spent 49 calls on `--help` lookups of those flags. The title follows `CLAUDE.md` → "Git, commits, and PRs"; the merge runs only where the caller says the gate passed.
|
||||
@@ -139,7 +134,7 @@ goal is still redesigned or dropped.
|
||||
|
||||
### 286. Lower the reading cost of the files a chunk reads most before its first commit.
|
||||
|
||||
`reading-cost` reports Rising: the last five chunks' median is 152,018 new input tokens before the first commit, against 84,028 for the five before them. Those five chunks opened or searched these files most: `todo.md` 48 times, `docs/decisions.md` 11, `README.md` 9, `bin/review_replay/test_review_replay.py` 9, `bin/routing_figures/test_routing_figures.py` 9, `docs/reading-cost.md` 8, `bin/rule_hook/repeat_read.py` 7, `AGENTS.md` 6, `bin/loop_claude/test_loop_claude.py` 6 and `bin/routing_figures/chunk.py` 6.
|
||||
`reading-cost` reports Rising: the last five chunks' median is 151,930 new input tokens before the first commit, against 103,215 for the five before them. Those five chunks opened or searched these files most: `todo.md` 42 times, `README.md` 16, `docs/decisions.md` 12, `AGENTS.md` 10, `bin/rank_todo.py` 9, `bin/release_plan/ranking.py` 8, `docs/reading-cost.md` 8, `CHANGELOG.md` 7, `rules/todo-items.md` 7 and `bin/rule_hook/test_rule_hook.py` 6.
|
||||
|
||||
Item 285 takes the `todo.md` reads; this item takes the rest. Find why a worker opens each of them before its first commit, and cut that cause, such as a test file too large to read in parts.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user