diff --git a/AGENTS.md b/AGENTS.md index 16101795..69953bfe 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -11,7 +11,7 @@ Decisions live in `docs/decisions.md`: - comprehension floor: every dimension and the overall at 7.0 or above is the target, and blocks no merge or release - loop-claude: each project's model lives in `~/.claude/loop-claude-models.json`, which only loop-claude writes - review: a pass gets at most three rounds per chunk; instead of a fourth, the run asks the human -- review: a fix for a πŸ”΄ or 🟑 reruns the pass that found it and each pass whose trigger names fixes like it; a fix for a 🟒, a ❓ or a prose finding reruns none +- review: a fix for a πŸ”΄ or 🟑 reruns the pass that found it and each pass whose trigger names fixes like it; from round 2 a pass reviews only the answers to its last round's findings and any other pass's fix that re-entered it; a fix for a 🟒, a ❓ or a prose finding reruns none - review: the comprehension check records how hard a project is to read and blocks no merge: a paired ruling against the last measured commit where the architecture pass ran, and the four-seat scoring run when a release's items run out or an item names the floor - review: a project decision may suspend the comprehension check for the plan items it names - review: a project decision may opt every chunk out of the architect, the product-owner pass or the comprehension check @@ -31,6 +31,7 @@ Decisions live in `docs/decisions.md`: - rule-hook: a PreToolUse hook enforces each rule a program can check, a `# rule-override : ` marker overrides one, and larv-review's overrides pass rules on each override before merge - rules/: `CLAUDE.md` holds the worker's rules that no file path can scope, and each topic's rules for the worker live in a `rules/` file that Claude Code loads by its `paths:` frontmatter - worker: a chunk's worker writes the simplest change that solves its item, test first wherever a test can check the change, and reads a technical principle only where the item, a finding or its own record names it; larv-review's reviewers hold the change to the principles and to the standards in `skills/larv-review/standards/` +- 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 - review: the stability pass mutation-tests the lines a chunk changes, in place of measuring test coverage ## Working rules diff --git a/CHANGELOG.md b/CHANGELOG.md index 6007c214..4c1ff570 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- larv-review's stability and product-owner reviewers report only a defect, a requirement of the plan or the goals that the change breaks, a breach of a technical principle, or for stability a hard place the change touches; the stability reviewer leaves the style of comments to the prose reviewer, which now also reads help and error text. Each architect finding names a concrete later change the PR makes harder, and one that names none is dropped. The prose pass runs only on a chunk that changes prose a reader reads, such as docs, comments, help text or `todo.md`, and skips a code-only chunk. Expect fewer findings and fewer review rounds. - Every `todo.md` item carries a C score, 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 the next commit that changes a project's `todo.md`, add the column 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. It always reports, for each score, the median outcome at each guessed value, once 10 chunks that each shipped one item record 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 round commits now carry 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. @@ -21,7 +22,7 @@ - larv-review's mechanical rules run in the new, tested `bin/larv-review`: the paired ruling's base (`ruling-base`), each pass's round count (`round-count`, which ignores case in a round's commit title, counts a repeated round number as a round of its own, and says to ask you before another round once a pass is at or past the cap), the scoring run's trigger (`needs-scoring-run ...`), and the vote count, means and history format (`record-ruling ` and `record-scoring [...]`, which append to `docs/comprehension-history.md` and refuse a second entry on what a seats file's first line reads; `record-scoring` refuses a run the plan does not call, and prints `Floor:` naming each mean under the comprehension floor of 7.0), and the places seats found hard since the newest scoring run (`places`). The skill says when to run each and what its answer means. A seats file line the tool cannot read fails the run, so a mistyped vote never counts as same. The base search compares the history before and after each merged change, so it no longer depends on how a line is worded. A release whose last plan item moves to another release is due a scoring run too, once work has landed towards it. A seats file must name commits the checkout holds. When origin cannot be fetched, the tool reads it as last fetched and says so. - The new `bin/metric-bench` benches cheap static metrics of a project's Python against the places its comprehension history names as hardest: cognitive complexity, length, shared state and change spread, each scored by how well it ranks the named functions above the rest. No metric enters review yet. - larv-review runs a comprehension check, which records how hard the project is to read and blocks no merge. It runs once per chunk, after every pass, on the branch as review left it. Where the architecture pass ran, Mid A and the inherited architect read that commit beside the last measured commit: the default branch's newest merged change that added a ruling or a scoring run to `docs/comprehension-history.md`. They vote better, same or worse on each dimension and overall: `Navigation same, Locality worse, Shape same, Self-sufficiency same, Overall better`. When their overall votes differ, the maintainability senior and Junior A vote too. A ruling needs a lead of two or more votes, else it is same. Each place a seat names opens with the dimensions it moves, such as `Locality, Shape: `, or the run fails, and a vote that no place opens with counts as same. Four seats score the project from 1 to 10 when a chunk ships or removes a release's last plan item, or ships an item naming the comprehension floor of 7.0. A project whose own `docs/decisions.md` or `AGENTS.md` still says the floor or a worse ruling blocks a merge keeps that rule; edit it there to stop blocking. -- larv-review reruns fewer passes after a fix. A fix reruns the pass whose πŸ”΄ or 🟑 it answers, plus stability when the fix changes behaviour, security when it opens an untrusted-input boundary or touches authn/authz, secrets or crypto, and architecture when it carries an architectural decision. A rerun reviews only what changed since that pass last reviewed. A fix for a 🟒, a ❓ or any prose finding reruns no pass, and prose takes one round. +- larv-review reruns fewer passes after a fix. A fix reruns the pass whose πŸ”΄ or 🟑 it answers, plus stability when the fix changes behaviour, security when it opens an untrusted-input boundary or touches authn/authz, secrets or crypto, and architecture when it carries an architectural decision. From round 2, a reviewer agent reviews only the answers to its previous round's findings: each fix, and each dismissal with its reason. A fix from another pass that re-enters it gets a first-round review, limited to the fix's lines. On those answers it reports only a fix or a dismissal that is plainly wrong or worse than the change it answered, so a pass should converge in its second round. A fix for a 🟒, a ❓ or any prose finding reruns no pass, and prose takes one round. - larv-review runs one security pass on each change: the full scan alone when it runs, else `/security-review`. - larv-review runs the new `bin/reading-cost`, which measures each chunk `loop-claude` finished from its archive: the new input tokens the worker and its subagents took in before the worker's first commit, and the files git tracks that they read most. It appends each figure the project's `docs/reading-cost.md` lacks. Once 10 chunks are measured, and the last 5 chunks' median is above the 5 before them, larv-review files one plan item naming the files read most, or refreshes it. The chunk that ships it runs `reading-cost --reset`, so the trend counts only chunks that finished after it. - larv-review appends every paired ruling and scoring run to the project's `docs/comprehension-history.md`: the commit the seats read, a ruling's base, each seat's vote or scores, and the places each seat named. The PR summary gives each ruling with its base and votes. The seats do not read the history. diff --git a/agents/product-owner-reviewer.md b/agents/product-owner-reviewer.md index 23438512..dd5b281b 100644 --- a/agents/product-owner-reviewer.md +++ b/agents/product-owner-reviewer.md @@ -25,7 +25,7 @@ Before anything else, **read the shared principles** at `~/.claude/principles/`. 2. **Identify the personas**: Who uses this? Check the README and any docs for documented personas. If personas are missing or unclear for the affected surface, review against your best-guess personas (e.g., "end customer", "tenant admin", "integrator/developer", "internal support", "CLI power user"), labelled as assumptions, and raise the persona question as a ❓. -3. **Walk the happy path** for each persona. Is it obvious? Discoverable? Does the naming match mental models? Is the minimum required input actually minimum? +3. **Walk the happy path** for each persona. Is it obvious? Does the naming match mental models? Is the minimum required input actually minimum? 4. **Hunt edge cases** systematically: - Empty / null / missing inputs @@ -42,10 +42,12 @@ Before anything else, **read the shared principles** at `~/.claude/principles/`. - Is the response shape predictable and self-describing? - Could a new user accomplish the task without reading docs? If docs are needed, do they exist and are they findable? -6. **Assess reasonableness of usage paths**: Are there paths that exist but no real persona would use? Are there obvious paths that *don't* exist but should? +6. **Assess reasonableness of usage paths**: Are there paths that exist but no real persona would use? ## Your Output Format +Report only a defect a persona hits, a requirement of the plan or the README's goals that the change breaks, or a breach of a technical principle. Friction that is none of these is not a finding. + Verdict, severities and rounds: ~/.claude/skills/larv-review/review-findings.md. After the verdict: **Surface affected**: @@ -59,6 +61,5 @@ Verdict, severities and rounds: ~/.claude/skills/larv-review/review-findings.md. ## Operating Principles - Be specific. "The error message is unclear" is useless; "When the customer hits POST /x with a missing `email`, the response says 'validation failed' with no field name β€” they won't know what to fix" is useful. -- Be honest about severity. Don't pad with nits if the change is solid. - Don't review code style, internal naming, or test coverage β€” that's for other reviewers. - If you don't have enough context (e.g., you can't tell what surface changed), raise it as a ❓. diff --git a/agents/prose-reviewer.md b/agents/prose-reviewer.md index c3879f2d..e1f1a6b3 100644 --- a/agents/prose-reviewer.md +++ b/agents/prose-reviewer.md @@ -33,6 +33,6 @@ Report the lines each file gained and lost. A line an earlier pass's fix added t The prompt hands you these. Beyond them, read only what a finding needs checking against. -1. **What the diff touched**: every markdown line and comment it adds or changes. +1. **What the diff touched**: every markdown line, comment and printed text, such as help or an error, that the diff adds or changes. 2. **What the review cited**: each section the prompt names, with the code it governs. 3. **Every prose file the repo owns**, when the prompt says the architecture pass ran. This sweep catches files that grew a paragraph per chunk, which no single diff shows. diff --git a/agents/stability-reviewer.md b/agents/stability-reviewer.md index deb0b4a2..4d10a49d 100644 --- a/agents/stability-reviewer.md +++ b/agents/stability-reviewer.md @@ -111,9 +111,7 @@ Every PR gets at least this sweep. - Is naming precise and unambiguous? - **Does every name in the diff still match its (possibly changed) contents?** When a change meaningfully shifts what a file/folder/package/service/variable does, its name must be updated in the same change β€” flag a stale name left behind by a content/purpose shift (e.g. a `webhook` test helper reworked into a JWT verifier but still called `webhook`/`WEBHOOK_URL`). The rename belongs in the PR, not "later." - Are magic numbers/strings replaced with named constants? -- **Judge every comment and prose line the diff adds against `~/.claude/skills/larv-review/standards/comments.md`, against `readme.md` beside it for a README, and against every file under `~/.claude/rules/` whose `paths:` frontmatter matches its file**; report a density breach with the ratio and the files driving it. - **Flag a caveat the diff has outlived**, anywhere in the repo: report the sentence's `file:line` and the behaviour that replaced it. -- **Flag a pointer standing where a definition belongs** β€” `~/.claude/skills/larv-review/standards/comments.md` β†’ "Links and pointers", "A pointer is not a definition". - **Never propose new documentation as a "nice to have".** Suggesting a doc paragraph is proposing bulk someone must maintain. Raise it as a 🟑 only when its absence would actively mislead someone, and say which mistake it prevents; otherwise don't raise it at all. Deleting redundant prose is always the cheaper fix. - **Never let documentation stand in for a fix.** A finding is not closed by describing the defect in a README, and neither is one of yours: if the only available remedy is telling the reader, say so and mark it a decision for the human, so it lands in the PR or ticket where a decision record belongs. Naming a residual risk is your job; choosing to publish it in the repo is not yours to hand out. @@ -131,6 +129,8 @@ Every PR gets at least this sweep. ## Output Format +Report only a defect, a requirement of the plan or the README's goals that the change breaks, a breach of a technical principle, and the places the prompt hands you. A finding that is none of these is noise, however true: leave it out. + Verdict, severities and rounds: ~/.claude/skills/larv-review/review-findings.md. After the verdict, a short **Coverage & Verification** block: what you ran (tests, static analysis, mutation β€” and their results), what you could not verify and why, and any files that got a lighter pass β€” never let silence imply coverage. Then the findings, most severe first, each with: - **Location**: File and line/function - **Issue**: Clear description of the problem diff --git a/agents/systems-architect.md b/agents/systems-architect.md index f8aac6ac..06a052dc 100644 --- a/agents/systems-architect.md +++ b/agents/systems-architect.md @@ -153,6 +153,8 @@ You are not a per-PR reviewer. The **stability-reviewer** runs on every change f **Verdict and severities: ~/.claude/skills/larv-review/review-findings.md.** A violation of a non-negotiable fundamental β€” functional-core/shell entanglement, a unit past a Fits in a head threshold without a stated reason, a method or file carrying more than one responsibility, unreasoned duplication of a core concept, or a broken/leaky external contract β€” is a πŸ”΄: lead with it, and name the concrete restructuring. The most common instance: a pure transformation (a deterministic inputβ†’output computation) entangled inside an imperative-shell or orchestration method, where it could be a named, separately-testable function. The architectural defect being real, not its line count or "how much it works today," sets the severity; rate a non-fundamental finding by its eventual cost β€” the recorded horizon sets that cost; fundamentals stay πŸ”΄ at every horizon (Core Philosophy: rigor follows the horizon). +Every finding, except a place the prompt hands you, names a concrete later change this PR makes harder, such as "a second forge needs edits in four modules"; a concern that names none is too vague to check, so leave it out. + Focus on architectural alignment: - Does it still serve the project's goals and priorities, or has it quietly drifted from them? - Does it change the external contract? If so, scrutinize that first and hardest. diff --git a/docs/decisions.md b/docs/decisions.md index 120f5115..40da2317 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -50,10 +50,14 @@ 2026-09-28, lilleman. Serves goal 1. One counter per pass per chunk, so no fix bounces between two passes without end. Valid while one human answers the ask, in the session or from the unmerged PR. -## review: a fix for a πŸ”΄ or 🟑 reruns the pass that found it and each pass whose trigger names fixes like it; a fix for a 🟒, a ❓ or a prose finding reruns none +2026-10-13, lilleman through todo item 97, implemented by claude: the cap stays at three after later rounds were narrowed, since a lower cap would ask the human more often, against goal 1, and a third round reviews only the answers to round 2's findings, so it costs little. + +## review: a fix for a πŸ”΄ or 🟑 reruns the pass that found it and each pass whose trigger names fixes like it; from round 2 a pass reviews only the answers to its last round's findings and any other pass's fix that re-entered it; a fix for a 🟒, a ❓ or a prose finding reruns none 2026-10-08, lilleman, replacing the 2026-09-30 rule that every fix, a nit's included, re-enters review. Serves goal 1.4. An audit of the four costliest archived chunks (2026-10-08) found nearly every finding that mattered in a pass's first round; later rounds mostly re-checked the last fix, reworded what an earlier round wrote, or contradicted another round on the same line. A round 2 caught real bugs only where a fix changed behaviour, so stability still reruns on every fix that does, and security on every fix that opens an untrusted-input boundary or touches authn/authz, secrets or crypto. Valid while round-2 reviews of nit and prose fixes keep changing nothing a user would notice. +2026-10-13, lilleman through todo item 97, implemented by claude: from round 2 a pass reviews only how the chunk answered its previous round, each fix and each dismissal with its reason, and reports only one that is plainly wrong or worse than the change it answered. A fix from another pass that re-enters it is still reviewed as a first round would review it, limited to its lines. Reviewing all that changed had a reviewer find new gaps in each round's fixes, so a pass ran to its cap. Serves goals 1.4 and 1.5. Valid while round-2 findings outside a round's answers keep changing nothing a user would notice. + ## review: the comprehension check records how hard a project is to read and blocks no merge: a paired ruling against the last measured commit where the architecture pass ran, and the four-seat scoring run when a release's items run out or an item names the floor 2026-10-08, lilleman. Serves goals 1.1 and 1.4. Two independent four-seat runs moved up to 0.4 on near-identical code, so a fall within that noise forced rounds that changed nothing (PR #224). A seat reading both versions judges the difference on the same material, so the noise the versions share cancels. No conventional significance level lets a sign test settle with four votes, so the human chose a lead of two votes over every other ruling, same included. Two seats that agree settle it, so a PR that leaves the reading as it was costs two seats. A third seat alone can never settle it, so the third and fourth launch together. The human chose the last measured commit on the architect's finding that with a merge base as the base, chunks without an architecture pass, and a suspended restructure's steps, could each lower comprehension unseen. Reading the default branch one merged change at a time keeps the rule working for merge commits and squash merges alike. The scoring run also runs on a chunk shipping an item that names the floor, so the chunk that lifts a project to the floor can prove it. A chunk that removes a release's last item without shipping it runs it too, so no release ends unmeasured. Valid while seats reading both versions agree more often than two absolute runs do. @@ -140,7 +144,7 @@ Valid while Claude Code loads `~/.claude/rules/*.md` in every project, a path-sc 2026-10-13, lilleman through todo item 104, implemented by claude. Serves goals 1.4 and 1.5. Like red, green, refactor: the worker makes the item work, and the review passes raise it to the bar. A loop-claude worker loaded `CLAUDE.md` and every file under `rules/`, 4,247 words, and `CLAUDE.md` told it to read `technical-principles.md` too, 2,426 words more. The reviewers read the principles anyway, and a finding against one names it. -The worker keeps what it needs to write its own work. Each project's decision titles stay in its `AGENTS.md`, since a worker that misses a decision builds the wrong behaviour. A core of "Prose" stays in `CLAUDE.md`, since no reviewer reads the worker's chat. lilleman chose both on 2026-10-13. The rules for writing Goals and Audience, `todo.md` items and decisions stay in `rules/`, since writing those is the worker's job. `bin/rule-hook` stays: it blocks what a program can check, at no context cost. "Quality", the rules for comments and READMEs, and the examples behind "Prose" moved to `skills/larv-review/standards/`, which no path loads. The prose and stability reviewers read them, and so does loop-claude's judge. They sit beside larv-review, whose passes apply them; `principles/` stays where it is, since the principles auditor reads it per file. +The worker keeps what it needs to write its own work. Each project's decision titles stay in its `AGENTS.md`, since a worker that misses a decision builds the wrong behaviour. A core of "Prose" stays in `CLAUDE.md`, since no reviewer reads the worker's chat. lilleman chose both on 2026-10-13. The rules for writing Goals and Audience, `todo.md` items and decisions stay in `rules/`, since writing those is the worker's job. `bin/rule-hook` stays: it blocks what a program can check, at no context cost. "Quality", the rules for comments and READMEs, and the examples behind "Prose" moved to `skills/larv-review/standards/`, which no path loads. loop-claude's judge and the prose reviewer read them, and the stability reviewer reads "Quality". They sit beside larv-review, whose passes apply them; `principles/` stays where it is, since the principles auditor reads it per file. A finding against a principle names it, so the worker reads only that one when it fixes or declines the finding. The worker still writes a failing test first wherever a test can check the change, since no reviewer can make a test come first. On 2026-10-13 lilleman widened it from code changes to anything there is to test. A chunk that changes no code, config or test, such as one that only plans, meets no principles review; the chunk that implements its items does. The prose reviewer checks that a doc sorts a list whose order carries no meaning. @@ -148,6 +152,10 @@ The item also cut the rule that a session proposes new rules for `CLAUDE.md` and Valid while review rounds per pass do not rise. A principle found late, such as functional core, can cost a rewrite within a pass's three rounds. `todo.md` item 105 compares rounds per pass and reading cost in loop-claude's archive for the five chunks before and after this one. +## 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 + +2026-10-13, lilleman through todo item 97, implemented by claude. Serves goals 1.4 and 1.5. Anthropic's Claude Code best practices: "A reviewer prompted to find gaps will usually report some, even when the work is sound… Chasing every finding leads to over-engineering." 320 of this repo's 876 commits answered a review round. So stability and product-owner drop a finding that is none of these, and stability leaves the style of comments to prose, which reads every comment a chunk touches. An architect finding that names no later change it makes harder cannot be checked, so it is dropped. The architecture pass and the comprehension check keep their whole-project view, which guards goal 1.1 as a project grows. Valid while the findings these rules drop keep changing nothing a user would notice. + ## review: the stability pass mutation-tests the lines a chunk changes, in place of measuring test coverage 2026-10-13, lilleman through todo item 108, implemented by claude. Serves goals 1.1 and 1.4. Coverage counts the lines a test runs, so a test without a meaningful assertion still raises it. A surviving mutant shows a test that would let behaviour break. Every mutant of an untested changed line survives, so mutation testing of the changed lines also shows what a coverage drop on them would. Coverage would also catch a deleted test; the stability reviewer sees one in the diff without it. Measuring coverage beside it would add cost without raising quality, so todo item 69 was dropped and `principles/technical-principles.md` replaced "Test coverage should not decline" with the mutant rule. diff --git a/docs/reading-cost.md b/docs/reading-cost.md index 52f11ee4..6b435ad5 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -212,3 +212,20 @@ Read most (opens and searches): - `CLAUDE.md` 2 - `README.md` 2 - `bin/rank_todo.py` 2 + +## Reading cost, chunk 209d36718bca, finished 2026-10-13T14:51:06Z + +140161 new input tokens before the first commit. + +Read most (opens and searches): + +- `todo.md` 12 +- `docs/decisions.md` 7 +- `bin/larv_review/test_larv_review.py` 6 +- `skills/larv-review/SKILL.md` 4 +- `CHANGELOG.md` 3 +- `README.md` 3 +- `docs/comprehension-history.md` 3 +- `bin/comprehension_history.py` 2 +- `bin/larv_review/record.py` 2 +- `bin/larv_review/ruling.py` 2 diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index 6b0f8d4a..c8a5070f 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -38,7 +38,7 @@ A pass is one kind of review, a row of the table, named by its first column. Its | Overrides | override-reviewer | `~/.claude/bin/rule-hook overrides`, run in the chunk's worktree, prints a line no round of this pass has ruled on; a fix, only where the hook logged an override for it | | Stability | stability-reviewer | changes code, config or tests; a fix, only where it changes behaviour: what the code or its tests do | | Product-owner | product-owner-reviewer | changes an external surface: API, CLI, UI, error or deprecation text a consumer reads, README and docs an outside reader lands on | -| Prose | prose-reviewer | every chunk, one round | +| Prose | prose-reviewer | changes prose a reader reads, such as docs, comments, help or error text, or the plan; one round | A comment is prose, not code. Passes run in this order: line-level polish on code the architect wants restructured, or on a call the security pass will rewrite, is wasted work. @@ -66,7 +66,7 @@ Give a reviewer without Bash the branch diff and `git ls-files`'s output in its - **Architecture round.** The architecture pass's first round is the architect (unless skipped) and the principles audit. A later round relaunches each reviewer whose πŸ”΄ or 🟑 the previous round's fixes answer. 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. Title it `Answer round : πŸ”΄, 🟑; …`: `` is the pass's name in lower case, such as `full scan`, and `` and `` are the πŸ”΄ and 🟑 findings all the round's reviewers reported. Example: `Answer stability round 1: 1 πŸ”΄, 2 🟑; flag a deleted test`. A round that changed nothing gets an empty commit (`git commit --allow-empty`). Push the commits when Β§4 runs next, where there is a remote. `~/.claude/bin/larv-review round-count` prints each pass's count and marks a pass at the cap. The auto-reviewer's count is the number of its reviews on the PR, less its reviews of a `Record the comprehension check:` commit. -- **Later rounds.** A rerun pass reviews only what changed since it last reviewed: `git diff HEAD`, since the fixes may be unpushed. From round 2, prompt an agent under `~/.claude/agents/` with its own last round's findings verbatim too. +- **Later rounds.** From round 2, an agent under `~/.claude/agents/` reviews only the answers to its last round's findings, and each fix from another pass that re-entered its pass. Prompt it with its last round's findings verbatim, each with its answer: the fix's diff, or the reason it was dismissed. Give it each other pass's fix as `git diff `, since the fixes may be unpushed, with the finding it answered. It reports only an answer that is plainly wrong or worse than the change it answered, so its pass converges in its second round. Other reviewers review the branch as their tool does. - **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. @@ -89,7 +89,7 @@ Give a reviewer without Bash the branch diff and `git ls-files`'s output in its ### Architecture -Launch systems-architect: review the system as a whole entered through this change; the decision log carries previously accepted decisions to honor, the README the goals and Stage 0 artifacts. Give it the places per "Comprehension check" β†’ "Places". +Launch systems-architect: review the system as a whole entered through this change; the decision log carries previously accepted decisions to honor, the README the goals and Stage 0 artifacts. Give it the places per "Comprehension check" β†’ "Places". Each of its other findings names a concrete later change the PR makes harder, such as "a second forge needs edits in four modules"; drop one that names none. - **Stage 0 questions returned**: relay them to the user, record the answers in the README, re-run once. - **BLOCK** β†’ confirm with the user first when the restructure materially reshapes their PR; until confirmed, no later pass runs. @@ -130,7 +130,7 @@ Launch override-reviewer with each line `rule-hook overrides` prints that no ear ### Stability and product-owner -Launch the reviewer with the change β€” stability-reviewer also with the places per "Comprehension check" β†’ "Places", product-owner-reviewer with the external surface it touches. Fix along the reviewer's Fix guidance (delete > simplify > modify > add). Product-owner findings are about the consumer's experience β€” wording, discoverability, upgrade path, the edge case a persona hits β€” so the fix is as often a message or a doc as it is code. +Launch the reviewer with the change β€” stability-reviewer also with the places per "Comprehension check" β†’ "Places", product-owner-reviewer with the external surface it touches. Each reports only a defect, a requirement of the plan or the goals the change breaks, a breach of a technical principle, or, for stability-reviewer, a place per "Comprehension check" β†’ "Places"; drop any other finding. Fix along the reviewer's Fix guidance (delete > simplify > modify > add). The defect a persona hits is as often in wording or an upgrade path as in code, so a product-owner fix is as often a message or a doc. ### Prose diff --git a/skills/larv-review/review-findings.md b/skills/larv-review/review-findings.md index 946a18b4..3eef07fa 100644 --- a/skills/larv-review/review-findings.md +++ b/skills/larv-review/review-findings.md @@ -7,7 +7,7 @@ A reviewer reads and reports; it edits nothing. Read `docs/decisions.md` and `to ## Severity - πŸ”΄ **must fix** β€” a goal, a principle or correctness broken. -- 🟑 **should fix** β€” worse than it needs to be. +- 🟑 **should fix** β€” worse than it needs to be, or a πŸ”΄ where a sound reason may outweigh its fix. - 🟒 **nit**. - ❓ **question** for the author: a finding you could not confirm goes here, not above. - πŸ”€ **escalation** β€” names the reviewer whose concern it is (`product-owner-reviewer`, `systems-architect` or `/security-review`) and why, in one line. @@ -24,5 +24,6 @@ A review's first line, derived from the findings: ## Rounds -- Handed no earlier findings: surface everything. -- Handed an earlier round's findings: verify each πŸ”΄ and 🟑 is resolved β€” re-run the scenario, never trust the claim β€” then review what changed. A fix raises a new finding only where the fix itself introduced a real problem. +- Handed neither earlier findings nor another pass's fix: surface everything. +- Handed an earlier round's findings, each with its fix or the reason it was dismissed: review only those answers. Check each fix β€” re-run the scenario, never trust the claim β€” and each dismissal's reason. Report only a fix or a dismissal that is plainly wrong, or worse than the change it answered; a fix you would have written differently is not a finding. +- Handed a fix from another pass: review its diff as a first round would, limited to its lines. diff --git a/todo.md b/todo.md index dc621f15..33e98b6e 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 9` -`Next ID = 118` +`Next ID = 120` | Goal | W | |---|---| @@ -24,7 +24,6 @@ | ID | Release | Exempt | Item | R | S | C | A | G | Goals | Score | |---|---|---|---|---|---|---|---|---|---|---| -| 97 | 0.1.0 | | **Narrow each review pass to the findings worth a fix, so a pass converges in its second round.** | 5 | 4 | 6 | 7 | 7 | 1.1, 1.4, 1.5 | 21.9 | | 109 | 0.1.0 | | **Lower the reading cost of the files a chunk reads most before its first commit.** | 2 | 4 | 4 | 5 | 6 | 1.4 | 18.5 | | 93 | 0.2.0 | | **Let a chunk's worker start below the project's model, once the archive shows chunks on a lower rung took no more review rounds than chunks on the project's model.** | 3 | 2 | 6 | 6 | 7 | 1.1, 1.4 | 22.4 | | 94 | 0.2.0 | | **Every 20th cycle, have loop-claude measure token spend and routing outcomes, file them here, and interrupt the human only when they call for a routing change.** | 3 | 5 | 6 | 6 | 7 | 1.1, 1.4 | 21.6 | @@ -40,6 +39,7 @@ | 116 | 0.2.0 | | **Report R by the share of chunks with a πŸ”΄, once 10 chunks that each shipped 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 | +| 118 | 0.2.0 | | **Have `score-outcomes` count review rounds only from chunks merged after 2026-10-13, when review passes were narrowed, so C's medians compare chunks reviewed under one rule.** | 2 | 2 | 3 | 3 | 4 | 1.4 | 11.2 | | 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 | | 21 | 0.3.0 | | **Give `settings.json`'s model one writer, and sort its keys.** | 3 | 3 | 4 | 6 | 7 | 1.3 | 21.8 | | 49 | 0.3.0 | principle | **Check that `AGENTS.md` lists exactly the titles of `docs/decisions.md`.** | 1 | 2 | 2 | 5 | 6 | 1.3 | 20.1 | @@ -55,6 +55,7 @@ | 101 | 0.3.0 | principle | **Have `larv_review/record.py`'s `read_seats` take the time, the commit check and the history as inputs, so it parses and decides without effects.** | 3 | 3 | 3 | 4 | 5 | 1.1 | 14.2 | | 29 | 0.3.0 | | **Make the contributor a standing member of every project's audience, unless its `## Audience` says maintainability does not matter.** | 2 | 2 | 3 | 3 | 5 | 1.1, 1.4 | 13.4 | | 68 | 0.3.0 | principle | **Test `workflow-bench/compare.py`'s blinding and `bench.py`'s run plan.** | 2 | 4 | 4 | 3 | 5 | 1.1 | 12.9 | +| 119 | 0.3.0 | | **Retitle the comprehension-floor decision so it says a chunk lifting a project towards the floor works first on its lowest-scoring dimension, and that the floor blocks nothing.** | 1 | 1 | 1 | 3 | 4 | 1.1 | 12.7 | | 65 | 0.3.0 | | **Archive each judge reply the loop rejects.** | 3 | 4 | 3 | 4 | 5 | 3 | 12.5 | | 82 | 0.3.0 | principle | **Sort `AGENTS.md`'s decision titles and `docs/decisions.md`'s entries by title.** | 1 | 2 | 2 | 3 | 4 | 1.3 | 12.3 | | 114 | 0.3.0 | | **Run git through `git_repo.py` in `rule_hook`, `metric_bench`, `reading_cost` and `loop_claude`, keeping rule-hook's guards as an option, so one module owns how a tool runs git.** | 3 | 4 | 4 | 3 | 5 | 1.1 | 11.9 | @@ -71,17 +72,9 @@ ## Details -### 97. Narrow each review pass to the findings worth a fix, so a pass converges in its second round. - -Anthropic's best-practices page: "A reviewer prompted to find gaps will usually report some, even when the work is sound… Chasing every finding leads to over-engineering." 320 of this repo's 876 commits answer a review round. - -Stability and product-owner report a defect, a broken requirement from the plan or the goals, or a breach of a technical principle, and nothing else. Prose runs when a chunk changes prose a reader reads, such as docs, comments, help text and the plan, and skips a code-only chunk. The architecture pass and the comprehension check keep their whole-project view, which guards goal 1.1 as a project grows. Each architecture finding names a concrete later change the PR makes harder, such as "a second forge needs edits in four modules", so a finding is checkable and a vague one is dropped. - -From its second round on, a pass reviews only how the chunk answered the round before. Each finding should be fixed correctly or dismissed with a good reason, and the reviewer reports only a fix or a dismissal that is plainly wrong or worse than the change it answered. The pass then converges in its second round. This revises the decisions on reruns and the round cap in `docs/decisions.md`. A fix that opens an untrusted-input boundary still triggers the security pass. - ### 109. Lower the reading cost of the files a chunk reads most before its first commit. -`bin/reading-cost` found a rise: the last 5 chunks' median is 106562 new input tokens before their first commit, the 5 before them 50762. Files read most in those 5 chunks (opens and searches): `todo.md` 26, `CLAUDE.md` 18, `docs/decisions.md` 16, `README.md` 11, `CHANGELOG.md` 10, `skills/larv-review/SKILL.md` 10, `bin/loop_claude/loop/main.py` 9, `agents/stability-reviewer.md` 5, `bin/loop_claude/test_loop_claude.py` 5, `bin/test_rank_todo.py` 5. The chunk that ships this item runs `reading-cost --reset`. +`bin/reading-cost` found a rise: the last 5 chunks' median is 136132 new input tokens before their first commit, the 5 before them 56802. Files read most in those 5 chunks (opens and searches): `todo.md` 31, `docs/decisions.md` 20, `CHANGELOG.md` 11, `README.md` 11, `bin/larv_review/test_larv_review.py` 10, `skills/larv-review/SKILL.md` 9, `CLAUDE.md` 7, `agents/stability-reviewer.md` 5, `bin/loop_claude/loop/main.py` 5, `bin/test_rank_todo.py` 5. The chunk that ships this item runs `reading-cost --reset`. ### 93. Let a chunk's worker start below the project's model, once the archive shows chunks on a lower rung took no more review rounds than chunks on the project's model. @@ -151,6 +144,10 @@ Needs 88. `score-outcomes` grounds R, S and C in finished chunks only. Where an item names files or units, their size bounds what the change can touch. +### 118. Have `score-outcomes` count review rounds only from chunks merged after 2026-10-13, when review passes were narrowed, so C's medians compare chunks reviewed under one rule. + +Since 2026-10-13 (`docs/decisions.md` β†’ "review: stability and product-owner report only…"), reviewers report fewer findings and later rounds review only the answers to earlier ones, to cut rounds. A chunk merged before it took more rounds for the same C, so mixing both eras skews C's medians and item 93's comparison of rungs. + ### 1. Say in README β†’ Install how the transcript archive is backed up, once bender-infra backs up ai-sandbox's data volume. It lives under `~/.claude`, which `.gitignore` keeps from the remote, so a lost disk loses every unattended run's record. Back it up only to a destination private to me and encrypted at rest: the worker runs with permissions bypassed, so the archived tool results can hold credentials it read. @@ -223,6 +220,10 @@ State that in `~/.claude/rules/goals-and-audience.md` β†’ "Goals and Audience", "Most, if not all, code should have automated tests", in `principles/technical-principles.md`: `compare.blind()` keeps the comparison blind, and a version name it misses invalidates the bench silently. +### 119. Retitle the comprehension-floor decision so it says a chunk lifting a project towards the floor works first on its lowest-scoring dimension, and that the floor blocks nothing. + +Today's title, "a project lifting itself to the comprehension floor starts at the lowest dimension", reads as either where the project scores or where work begins. Beside the title saying the check blocks no merge, a reader cannot tell whether `Floor:` means stop; a seat named `AGENTS.md:5` among the places it found hard. + ### 65. Archive each judge reply the loop rejects. Goal 3, raised by the principles audit of PR #215: the judge runs with `--no-session-persistence`, and the first two rejected replies reach only stderr, so the archive cannot answer the 3am question of why the loop rejected a verdict.