Keep every scoring run in an append-only comprehension history

This commit is contained in:
2026-10-08 14:37:48 +02:00
parent 3f5e0bb1ae
commit c14707da54
6 changed files with 32 additions and 16 deletions
+1
View File
@@ -2,6 +2,7 @@
## Unreleased
- larv-review appends every scoring run to the project's `docs/comprehension-history.md`: the commit the seats read, each seat's five scores and their mean, and the places each seat named. The ratchet compares a run with the history's last run on the default branch. The `comprehension floor:` entry in `docs/decisions.md` keeps only the decisions to ship under the floor; a project's next scoring run moves the last scores the entry still holds into the history. The seats do not read the history.
- The README's goals put quality with the fewest interrupts first, as goal 1; sharing the setup, backups and leaking nothing follow as goals 2–4.
- larv-review reruns the comprehension scoring run before merge when any commit since the last run changes more than `docs/decisions.md`, `todo.md` or `CHANGELOG.md`, so the recorded scores are the merged commit's. A score under the floor, or below the default branch's recorded scores, blocks the merge and is never filed in `todo.md`. A fix lifts either; your decision to ship under the floor lifts only a score under the floor. A rerun counts toward the three-round cap only when it reports a blocking score that no decision of yours covers.
- larv-review skips the comprehension scoring run for a chunk whose plan items a project decision names. The decision also names the later item whose scoring run ends the suspension. Neither the comprehension floor nor the ratchet can block a skipped chunk, its summary cites the decision, and a chunk shipping its release's last item is always measured.
+20
View File
@@ -0,0 +1,20 @@
# Comprehension history
## 2026-10-04, PR #215 at 5baedb5
Moved from `docs/decisions.md`, which kept only the mean and not the commit the seats read; 5baedb5 merged PR #215.
| Seat | Navigation | Locality | Shape | Self-sufficiency | Overall |
|---|---|---|---|---|---|
| Mean | 7.38 | 6.63 | 7.0 | 6.88 | 6.88 |
Places named, all seats together:
- `bin/loop_claude/cycle/judge_reply.py`, `cycle/worker.py`, `cycle/run.py`: the judge's contract, spread over three files.
- `bin/loop_claude/loop/main.py`, `loop/reload.py` `LoopRun`, `cycle/run.py`, `worker_args`: `remaining`, which is `Unfinished.evidence` under another name.
- `bin/loop_claude/cycle/states.py` `transition` and `cycle/run.py` `question_for`: the `quoted_answers` cap, held by case order and restated.
- `bin/loop_claude/cycle/run.py`: the four outcome texts built inline for `archive`.
- `skills/larv-review/SKILL.md`: needs `CLAUDE.md` → "Vocabulary" open beside it.
- `bin/loop_claude/loop/main.py` docstring: the archive layout, defined there and not at `cycle/archive.py`.
- `bin/loop_claude/cycle/judge_reply.py` `JUDGE_RULES`: its precedence, restated by `verdict_from`'s branch order and the `Reply` field descriptions.
- `bin/loop-claude`: the `sys.path` insert that the `from failure import` lines rely on, unstated at the import sites.
-2
View File
@@ -38,8 +38,6 @@
2026-09-27, lilleman, restating the 2026-09-24 target and extending it to the overall. Serves goal 1. Valid while the scoring run keeps its four seats. The decisions to ship under the floor, listed below, stand until `todo.md` item 62 lifts the project to it.
The last scoring run, which the next may not score below (`CLAUDE.md` → "Quality"): PR #215, 2026-10-04, Navigation 7.38, Locality 6.63, Shape 7.0, Self-sufficiency 6.88, overall 6.88.
lilleman decided to ship each of these under the floor on the day listed. Each line gives its last scores (Navigation, Locality, Shape, Self-sufficiency, overall):
- 2026-10-01, `rebuild`, merged at 8585257: 7.38, 6.75, 7.25, 6.5, 6.88.
+2 -2
View File
@@ -4,7 +4,7 @@ Each seat's prompt is the four parts below, in order: the opening, the seat's ba
- `{checkout}` and `{branch}`: the worktree the seats read, and its branch.
- `{main}`: the project's main checkout.
- `{files}`: every tracked non-test file but `todo.md` and `docs/decisions.md`, from `git -C {checkout} ls-files`, listed as one recursive glob per top-level source directory, such as `bin/loop_claude/**/*.py`.
- `{files}`: every tracked non-test file but `todo.md`, `docs/decisions.md` and `docs/comprehension-history.md`, from `git -C {checkout} ls-files`, listed as one recursive glob per top-level source directory, such as `bin/loop_claude/**/*.py`.
- `{preloaded}`: the files the harness pre-loads into a seat, found per `SKILL.md` → "What makes the result trustworthy".
- `{anchors}` and `{dimensions}`: the six anchor bullets and the four dimension bullets in `SKILL.md` → "The score", verbatim, without bold and each on one line.
- `{language}`, `{kind}`, `{domain}`, `{domain docs}` and `{3am question}`: the project's `AGENTS.md` → "Scoring run".
@@ -27,7 +27,7 @@ You are one seat of a comprehension panel. Tools: Read, Grep, Glob, and Bash onl
```
Target: the project checked out at {checkout} (branch `{branch}`). Read ONLY there — never {main}, which is a different version.
Depth 1, the whole project: read README.md, AGENTS.md and CLAUDE.md (the charter), then every non-test tracked file: {files}. Do NOT open todo.md or docs/decisions.md (the plan and decision log), nor any review output. You may open a test file when the code does not answer a question; say when you did.
Depth 1, the whole project: read README.md, AGENTS.md and CLAUDE.md (the charter), then every non-test tracked file: {files}. Do NOT open todo.md, docs/decisions.md or docs/comprehension-history.md (the plan, the decision log and past panels' scores), nor any review output. You may open a test file when the code does not answer a question; say when you did.
Your harness pre-loads these files into your context before your first tool call, from a DIFFERENT version (main): {preloaded}. Treat the worktree's own copies as the ones under review. A pre-loaded AGENTS.md may list decision titles; do not use them as evidence.
+6 -4
View File
@@ -85,20 +85,22 @@ Then the principles audit: one principles-auditor for the README's goals, and on
Then the comprehension floor, which the scoring run measures. Four simulated readers — Junior A, Mid A, the maintainability senior and the inherited architect — each read the whole project, not the diff, and score it from 1 to 10 overall and on four dimensions: Navigation, Locality, Shape and Self-sufficiency. A seat's overall may not exceed its lowest dimension by more than 1. Each score is the mean of the four seats, to two decimals. Launch the seats per `~/.claude/skills/comprehension-panel/SKILL.md` → "The scoring run".
The project's `docs/decisions.md` keeps one entry whose title opens `comprehension floor:`. It holds the last scoring run's scores, and each decision to ship under the floor, with its scores.
The project's `docs/decisions.md` keeps one entry whose title opens `comprehension floor:`. It holds each decision to ship under the floor, with its scores.
The project's `docs/comprehension-history.md` keeps every scoring run, appended and never edited. A run is a `## <date>, <PR or branch> at <commit>` heading naming the commit the seats read, a table of each seat's five scores and their mean, and under each seat the places it ranked hardest, or, for the architect, would restructure first, each as `path:line` and the unit's name.
The chunk does not merge while either holds:
- **Floor.** Any dimension or the overall is below 7.0.
- **Ratchet.** Any score is below the entry's last scoring run as it stands on the default branch, even within the panel's noise. An equal score passes, and so does every run while the default branch has no entry.
- **Ratchet.** Any score is below the mean of the history's last run as it stands on the default branch, even within the panel's noise. Until the history holds a run, a last scoring run that the `comprehension floor:` entry still holds stands in. An equal score passes, and so does every run while the default branch has neither.
Each score under the floor or the ratchet is a 🔴 of the scoring run. It is never filed, and stands until a later scoring run clears it or, for a score under the floor, a decision to ship answers it.
Fix the places the seats name under the lowest dimension and under each dimension that fell. When only the floor holds, the user may decide to ship instead. A decision that lets every chunk ship under the floor, held in the project's `docs/decisions.md` before the chunk began, counts as theirs while it stands. A decision to ship listed in the `comprehension floor:` entry covers only the chunk it names. No user reachable → fix. A fall never ships: after three rounds, "Round cap" → "Cap" asks the user for another round.
Put each run's five scores in the summary, and replace the entry's last scoring run with them on this branch. List in the entry each decision to ship under the floor, and file its places in `todo.md` per `~/.claude/CLAUDE.md` → "Todo items". A project without the entry gets it at its first scoring run, titled `comprehension floor: every dimension and the overall at 7.0 or above` and applying KISS (`~/.claude/principles/technical-principles.md`).
Put each run's five scores in the summary, and append the run to the history on this branch. A last scoring run that the `comprehension floor:` entry still holds moves into the history as its first run, under that run's own date and PR. List in the entry each decision to ship under the floor, and file its places in `todo.md` per `~/.claude/CLAUDE.md` → "Todo items". A project without the entry gets it at its first scoring run, titled `comprehension floor: every dimension and the overall at 7.0 or above` and applying KISS (`~/.claude/principles/technical-principles.md`).
**Fresh.** Where the chunk ran a scoring run, the architecture pass is done only once its last scoring run measured the commit to merge. That run may predate commits that change only `docs/decisions.md`, `todo.md` or `CHANGELOG.md`. Any other commit after it, a prose fix included, because the seats read the docs, calls for a rescore: the scoring run again, once every other pass is done, the auto-reviewer included. A rescore reporting a 🔴 that no decision to ship answers is an architecture round. Any other rescore is not a round: commit only its scores to the entry, titled `Rescore: …`. A `Rescore:` commit re-enters no pass: push it and wait for the forge's checks (§4 step 3), not for an auto-review.
**Fresh.** Where the chunk ran a scoring run, the architecture pass is done only once its last scoring run measured the commit to merge. That run may predate commits that change only `docs/decisions.md`, `docs/comprehension-history.md`, `todo.md` or `CHANGELOG.md`. Any other commit after it, a prose fix included, because the seats read the docs, calls for a rescore: the scoring run again, once every other pass is done, the auto-reviewer included. A rescore reporting a 🔴 that no decision to ship answers is an architecture round. Any other rescore is not a round: commit only its run, appended to the history, titled `Rescore: …`. A `Rescore:` commit re-enters no pass: push it and wait for the forge's checks (§4 step 3), not for an auto-review.
**Suspended.** A decision in the project's `docs/decisions.md`, held before the chunk began, may name plan items to ship without a scoring run. A named item counts as `todo.md` worded it before the chunk began. The decision must name the later plan item whose chunk ends the suspension with a scoring run. A chunk may ship named items only with each other. Such a chunk skips the scoring run, so neither the floor nor the ratchet can block it, and its summary cites the decision. A chunk shipping its release's last item runs the scoring run, even when every item it ships is named.
+3 -8
View File
@@ -28,7 +28,6 @@
| 72 | 0.1.0 | | **Rerun after a fix only the pass whose finding it answers, over the fix's diff alone; close a pass on a round of only 🟢, and give prose one round.** | 4 | 4 | 10 | 9 | 1.4, 1.5 | 32.3 |
| 75 | 0.1.0 | | **Decide the ratchet by a paired run: Mid A and the inherited architect read the whole project at the default branch and at the PR head, and rule whether it reads better, the same or worse once the PR lands; add seats only until the votes settle.** | 5 | 5 | 10 | 9 | 1.1, 1.4 | 31.6 |
| 73 | 0.1.0 | | **Have each reviewer write its full report to a file and return the worker only its findings' one-line summaries.** | 3 | 4 | 10 | 8 | 1.4 | 31.4 |
| 76 | 0.1.0 | | **Keep every scoring run and paired ruling in an append-only `docs/comprehension-history.md` in the project, with its commit, date, each seat's scores and the places it named.** | 2 | 3 | 9 | 8 | 1.1 | 31.1 |
| 74 | 0.1.0 | | **Run one security pass per round: the full scan alone when it triggers, else `/security-review`.** | 2 | 1 | 10 | 6 | 1.4 | 29.3 |
| 77 | 0.1.0 | | **Measure each project with cheap static metrics — cognitive complexity, how far a change spreads, state shared or mutated across methods — and keep only those the panel's history shows tracking comprehension.** | 3 | 7 | 9 | 8 | 1.1, 1.4 | 29.1 |
| 78 | 0.1.0 | | **Generate comprehension questions with deterministic scripts — from symbols, the call graph and the tests, each answer checkable by a tool — and bench the scores an agent gets on them against the panel, reading cost and static metrics.** | 3 | 7 | 9 | 8 | 1.1, 1.4 | 29.1 |
@@ -63,27 +62,23 @@ The human ranks review cost first. An audit of the four costliest archived chunk
### 75. Decide the ratchet by a paired run: Mid A and the inherited architect read the whole project at the default branch and at the PR head, and rule whether it reads better, the same or worse once the PR lands; add seats only until the votes settle.
The human ranks review cost first, and wants the project as a whole measured, since comprehension drifts across chunks that each look fine alone. Today the ratchet compares two independent absolute runs of four seats, whose scores move up to about 0.4 between runs on near-identical code, so a fall within that noise forces rounds that move nothing. A seat comparing the two commits judges the difference on the same material, so the noise the commits share cancels. Start with two seats; add one at a time until a sign test settles better or worse, and call it the same if four seats leave it unsettled. The four-seat scoring run still checks the floor, once, on each release's last item.
The human ranks review cost first, and wants the project as a whole measured, since comprehension drifts across chunks that each look fine alone. Today the ratchet compares two independent absolute runs of four seats, whose scores move up to about 0.4 between runs on near-identical code, so a fall within that noise forces rounds that move nothing. A seat comparing the two commits judges the difference on the same material, so the noise the commits share cancels. Start with two seats; add one at a time until a sign test settles better or worse, and call it the same if four seats leave it unsettled. The four-seat scoring run still checks the floor, once, on each release's last item. Append each paired ruling to `docs/comprehension-history.md`, with each seat's vote and the places it named.
### 73. Have each reviewer write its full report to a file and return the worker only its findings' one-line summaries.
The human ranks review cost first. Across 54 archived chunks the worker's own thread was 54% of spend, mostly cache reads: its context averaged about 350k tokens a turn and peaked near 700k, filled by reviewer reports, each of which arrived twice (the spawn result and the task notification).
### 76. Keep every scoring run and paired ruling in an append-only `docs/comprehension-history.md` in the project, with its commit, date, each seat's scores and the places it named.
Today the `comprehension floor:` entry in `docs/decisions.md` holds only the last run, replaced each time; earlier scores survive only in that file's git log, and the places the seats named survive only in archived transcripts. The trend across chunks, and benching item 77's metrics against the panel, both need this history. Items 77, 78 and 79 need it.
### 74. Run one security pass per round: the full scan alone when it triggers, else `/security-review`.
The human ranks review cost first. In the audited chunks two security agents started seconds apart each round and returned near-identical reports.
### 77. Measure each project with cheap static metrics — cognitive complexity, how far a change spreads, state shared or mutated across methods — and keep only those the panel's history shows tracking comprehension.
The human wants these explored and benched against the panel, with a global push toward a good state in every project. Candidates: cognitive complexity per function; how far a change spreads (files and modules a typical chunk touches, and files that change together in git history); state shared or mutated across methods (fields written by more than one method of a type, package-level variables written outside init, lack of cohesion between methods). Function and file length are warnings to look into, never limits: a plain long function can be simple, and a hard one may need five-line pieces. One harness under `bin/` serves every project; which metrics a project tracks may differ by project. Needs item 76's history to bench against.
The human wants these explored and benched against the panel, with a global push toward a good state in every project. Candidates: cognitive complexity per function; how far a change spreads (files and modules a typical chunk touches, and files that change together in git history); state shared or mutated across methods (fields written by more than one method of a type, package-level variables written outside init, lack of cohesion between methods). Function and file length are warnings to look into, never limits: a plain long function can be simple, and a hard one may need five-line pieces. One harness under `bin/` serves every project; which metrics a project tracks may differ by project.
### 78. Generate comprehension questions with deterministic scripts — from symbols, the call graph and the tests, each answer checkable by a tool — and bench the scores an agent gets on them against the panel, reading cost and static metrics.
A hand-written question bank goes stale as the project grows and leaves everything it does not ask about unmeasured. A script that samples symbols at random each run ("what calls X?", "where is Y validated?", "which test fails if Z changes?") covers the whole project over time, and the call graph, grep and the tests hold the answers, so no judge is needed. Each answer names the code it rests on, so a question whose code changed is regenerated. Keep the method only where the bench shows it tracks the panel at a lower cost. Needs item 76's history.
A hand-written question bank goes stale as the project grows and leaves everything it does not ask about unmeasured. A script that samples symbols at random each run ("what calls X?", "where is Y validated?", "which test fails if Z changes?") covers the whole project over time, and the call graph, grep and the tests hold the answers, so no judge is needed. Each answer names the code it rests on, so a question whose code changed is regenerated. Keep the method only where the bench shows it tracks the panel at a lower cost.
### 1. Say in README → Install how the transcript archive is backed up, once bender-infra backs up ai-sandbox's data volume.