From 6b8f55136bb08c0492a0c99b11077905d9d6da31 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 8 Oct 2026 19:41:35 +0200 Subject: [PATCH 1/3] Rerun after a fix only the passes it answers or fires, and run one security pass per round --- AGENTS.md | 4 ++-- CHANGELOG.md | 2 ++ docs/decisions.md | 8 +++++--- skills/larv-review/SKILL.md | 15 ++++++++------- todo.md | 10 ---------- 5 files changed, 17 insertions(+), 22 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 40f17a90..7bb0a537 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -11,14 +11,14 @@ Decisions live in `docs/decisions.md`: - comprehension floor: every dimension and the overall at 7.0 or above, and 0.1.0 waits on it - 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 โ“ re-enters review like any fix +- review: a fix reruns only the pass whose ๐Ÿ”ด or ๐ŸŸก it answers and the passes whose fix triggers it fires; a fix for a ๐ŸŸข, a โ“ or any prose finding reruns none - review: a project decision may suspend the scoring run for the plan items it names - review: a pass skips only on a precedent: a decision, or a plan item crediting the pass, that the repo held before the chunk began - loop-claude: the archive keeps the raw transcript, and a failed archive stops the loop - loop-claude: a `claude` that cannot start is a failed worker run, retried - review: an ask no user answers leaves the PR unmerged - loop-claude: every claude it starts bypasses permissions inside its sandbox -- review: `/security-review` is the security pass of record +- review: `/security-review` is the security pass of record, except in a round the full scan runs, which replaces it - review: the premises chunk's whole review is the human's approval - workflow-bench/: the remote may show the bench cases' names and commit SHAs - settings.json: Claude Code runs in auto mode with the dangerous-mode prompt skipped diff --git a/CHANGELOG.md b/CHANGELOG.md index 966255ba..d7ae4ca9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- larv-review reruns fewer passes after a fix. A fix reruns the pass whose ๐Ÿ”ด or ๐ŸŸก it answers, plus each pass whose trigger names fixes: 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. The rerun reviews the fixes' diff alone. A fix for a ๐ŸŸข, a โ“ or any prose finding reruns no pass, and prose takes one round. +- larv-review runs one security pass per round: 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 scoring run to the project's `docs/comprehension-history.md`: the commit the seats read, each seat's five scores and the seats' 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. diff --git a/docs/decisions.md b/docs/decisions.md index 50712341..76fa041c 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -59,9 +59,9 @@ lilleman decided to ship each of these under the floor on the day listed. Each l 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 โ“ re-enters review like any fix +## review: a fix reruns only the pass whose ๐Ÿ”ด or ๐ŸŸก it answers and the passes whose fix triggers it fires; a fix for a ๐ŸŸข, a โ“ or any prose finding reruns none -2026-09-30, lilleman. Serves goal 1: no human reads an unattended chunk before it merges, so every change it makes, a nit's wording included, is reviewed. In the 2026-09-30 bench this cost four of nine rounds in one run and drove two passes to the round cap. Valid while a pass is the only reader of a fix before merge. +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. ## review: a project decision may suspend the scoring run for the plan items it names @@ -87,10 +87,12 @@ lilleman decided to ship each of these under the floor on the day listed. Each l 2026-09-30, lilleman. Applies "Always grant explicit access to data": the sandbox `loop-claude` runs in is where access is granted, so the worker and the interrupt run with `bypassPermissions`. The worker may read `~/.claude/.credentials.json`: it holds Claude Code's own credentials, which claude reads to run anyway. Its one seam to production is the forge: what it pushes or merges can publish through CI. Valid while `loop-claude` runs only in the sandbox README โ†’ Install names. -## review: `/security-review` is the security pass of record +## review: `/security-review` is the security pass of record, except in a round the full scan runs, which replaces it 2026-09-20, lilleman. Serves goal 1.1. Its value is a tuned exclusion list and a โ‰ฅ0.8 confidence floor, which a hand-written reviewer would reproduce worse. Valid while `/security-review` ships both. +2026-10-08, lilleman. Serves goal 1.4: run beside the full scan, `/security-review` started seconds apart from it each round and returned a near-identical report. Valid while the full scan covers what `/security-review` reports. + ## review: the premises chunk's whole review is the human's approval 2026-09-20, lilleman. Serves goal 1.1. A reviewer's finding on that chunk could only be declined by citing the goals the chunk exists to write. Valid while every decline must name a goal or a technical principle. diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index 8ff82132..1426e079 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -32,12 +32,12 @@ A pass is one kind of review, a row of the table, named by its first column. Its | Pass | Reviewer | Trigger | |------|----------|----------------------------------------| -| Architecture | systems-architect, then principles-auditor and the scoring run | ships its release's last item, or carries an architectural decision: a new, restructured or moved component, module, service or boundary; a new dependency or first use of an infrastructure pattern (queue, cron, cache, websocket, โ€ฆ); a new or changed external contract (routes, request/response shapes, events, webhooks, published file formats, CLI flags and exit codes); a schema change beyond an additive column | -| Security | `/security-review` | changes code or config; a fix, only where it opens an untrusted-input boundary or touches authn/authz, secrets or crypto | +| Architecture | systems-architect, then principles-auditor and the scoring run | ships its release's last item, or carries an architectural decision: a new, restructured or moved component, module, service or boundary; a new dependency or first use of an infrastructure pattern (queue, cron, cache, websocket, โ€ฆ); a new or changed external contract (routes, request/response shapes, events, webhooks, published file formats, CLI flags and exit codes); a schema change beyond an additive column; a fix, only where it carries an architectural decision | | Full scan | the `claude-security` plugin at high effort: `/claude-security scan this branch's changes at high` | touches authn/authz, secrets or crypto, opens an untrusted-input boundary, or adds an external surface | +| Security | `/security-review` | changes code or config, in a round the full scan does not run; a fix, only where it opens an untrusted-input boundary or touches authn/authz, secrets or crypto | | 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; a fix, where it touches prose | +| Prose | prose-reviewer | every chunk, 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. @@ -56,15 +56,16 @@ 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), the principles audit and the scoring run, which "Architecture" โ†’ "Suspended" may skip. A later round relaunches each reviewer whose ๐Ÿ”ด or ๐ŸŸก the previous round's fixes answer, the scoring run 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`. 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. A pass's count is the highest `` among titles holding `Answer round :` in `git log origin/..HEAD` after a `git fetch`, or in `git log ..HEAD` with no remote. The auto-reviewer's count is the number of its reviews on the PR, less its reviews of a `Rescore:` commit. -- **Later rounds.** From round 2, prompt an agent under `~/.claude/agents/` with its own last round's findings verbatim and what changed since: `git diff HEAD`, since the fixes may be unpushed. +- **Later rounds.** A pass a fix reruns reviews the fixes alone: `git diff HEAD`, since the fixes may be unpushed. The scoring run'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". 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. **Re-entry.** -- **Fix.** A fix is a change no pass has seen, a ๐ŸŸข's or โ“'s included. -- **Rerun.** A round's fixes re-enter together: run, in table order, each pass whose trigger they fire, a done pass included, and each pass whose ๐Ÿ”ด or ๐ŸŸก they answer; a pass at its cap gets "Round cap" โ†’ "Cap"'s ask instead. Then ยง4. +- **Fix.** A fix is a change no pass has seen. +- **Rerun.** A round's fixes re-enter together: run, in table order, each pass whose ๐Ÿ”ด or ๐ŸŸก they answer and each pass whose trigger names a fix they fire, a done pass included; a pass at its cap gets "Round cap" โ†’ "Cap"'s ask instead. Then ยง4. +- **No rerun.** A fix for a ๐ŸŸข, a โ“ or any prose finding reruns no pass. Its commit still calls for a rescore per "Architecture" โ†’ "Fresh". **Findings.** A reviewer rates each finding ๐Ÿ”ด must fix, ๐ŸŸก should fix, ๐ŸŸข nit, โ“ question, or ๐Ÿ”€ escalation naming the reviewer whose concern it is. @@ -111,7 +112,7 @@ Put each run's five scores in the summary, and append the run to the history on ### Security -`/security-review` over the branch diff is the pass of record. Launch a general-purpose subagent that invokes it through the Skill tool, edits nothing, and replies with the skill's report, or that the skill is unavailable. Invoked in your own context, the skill ends your turn on that report. +`/security-review` over the branch diff is the pass of record, except in a round the full scan runs, which replaces it. Where the full scan fires but does not run โ€” skipped on a precedent, declined at its cost prompt, or unavailable โ€” `/security-review` runs. Launch a general-purpose subagent that invokes it through the Skill tool, edits nothing, and replies with the skill's report, or that the skill is unavailable. Invoked in your own context, the skill ends your turn on that report. A verified HIGH inside this chunk's blast radius is fixed here, outside it on its own branch and PR with this chunk waiting behind it. Say which. diff --git a/todo.md b/todo.md index 89904fcd..a71becf3 100644 --- a/todo.md +++ b/todo.md @@ -24,10 +24,8 @@ | ID | Release | Exempt | Item | R | S | A | G | Goals | Score | |---|---|---|---|---|---|---|---|---|---| -| 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 | decision | **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 | -| 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 | | 1 | 0.1.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 | 8 | 9 | 3, 4 | 27.0 | @@ -55,10 +53,6 @@ ## Details -### 72. 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. - -The human ranks review cost first. An audit of the four costliest archived chunks (adf-codec, loop-claude's quoted answers, visthus networking, fejkdata on-demand loading; 2026-10-08) found nearly every finding that mattered in round 1 of its pass. Later rounds mostly re-checked the previous fix, flipped wording that earlier rounds wrote, or reported a bug the previous fix created; reviewers contradicted each other on the same CHANGELOG line across rounds. Estimated 55โ€“75% of review effort in those chunks changed nothing a user would notice. Keep a round 2 where a fix touched behaviour: it caught real bugs the fix introduced. - ### 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. Append each paired ruling to `docs/comprehension-history.md`, with each seat's vote and the places it named. @@ -67,10 +61,6 @@ The human ranks review cost first, and wants the project as a whole measured, si 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). -### 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. -- 2.52.0 From fc3170e0ecec4ef614998a49bf413d25908b620d Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 8 Oct 2026 19:41:41 +0200 Subject: [PATCH 2/3] Record the reading cost of the chunks loop-claude finished --- docs/reading-cost.md | 113 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 docs/reading-cost.md diff --git a/docs/reading-cost.md b/docs/reading-cost.md new file mode 100644 index 00000000..d946f179 --- /dev/null +++ b/docs/reading-cost.md @@ -0,0 +1,113 @@ +# Reading cost + +## Reading cost, chunk 049a6293013b, finished 2026-10-04T10:18:42Z + +115833 new input tokens before the first commit. + +Read most (opens and searches): + +- `bin/test_loop_claude.py` 6 +- `bin/test_loop_claude_black_box.py` 6 +- `docs/decisions.md` 3 +- `todo.md` 3 +- `bin/loop_claude/loop/main.py` 2 +- `AGENTS.md` 1 +- `CHANGELOG.md` 1 +- `README.md` 1 +- `bin/loop-claude` 1 +- `bin/loop_claude/cycle/judge_reply.py` 1 + +## Reading cost, chunk 3654f457da26, finished 2026-10-04T15:04:37Z + +62197 new input tokens before the first commit. + +Read most (opens and searches): + +- `docs/decisions.md` 4 +- `skills/comprehension-panel/SKILL.md` 4 +- `CLAUDE.md` 2 +- `AGENTS.md` 1 +- `CHANGELOG.md` 1 +- `README.md` 1 +- `skills/comprehension-panel/scoring-run.md` 1 +- `skills/larv-review/SKILL.md` 1 +- `todo.md` 1 + +## Reading cost, chunk 12210530d1d1, finished 2026-10-04T15:17:47Z + +80898 new input tokens before the first commit. + +Read most (opens and searches): + +- `bin/test_loop_claude.py` 8 +- `bin/test_loop_claude_black_box.py` 5 +- `bin/loop_claude/loop/main.py` 4 +- `bin/loop-claude` 2 +- `todo.md` 2 +- `CHANGELOG.md` 1 +- `README.md` 1 +- `bin/loop_claude/cycle/judge.py` 1 +- `bin/loop_claude/cycle/judge_reply.py` 1 +- `bin/loop_claude/cycle/run.py` 1 + +## Reading cost, chunk 8f69670791e6, finished 2026-10-04T18:30:08Z + +49451 new input tokens before the first commit. + +Read most (opens and searches): + +- `docs/decisions.md` 2 +- `CHANGELOG.md` 1 +- `README.md` 1 +- `agents/principles-auditor.md` 1 +- `principles/frontend.md` 1 +- `principles/logging.md` 1 +- `principles/rest-apis.md` 1 +- `principles/technical-principles.md` 1 +- `skills/larv-review/SKILL.md` 1 +- `skills/larv-review/review-findings.md` 1 + +## Reading cost, chunk 3979e0345234, finished 2026-10-04T20:25:40Z + +56802 new input tokens before the first commit. + +Read most (opens and searches): + +- `README.md` 2 +- `docs/decisions.md` 2 +- `todo.md` 2 +- `.gitignore` 1 +- `AGENTS.md` 1 +- `CHANGELOG.md` 1 +- `agents/stability-reviewer.md` 1 +- `agents/systems-architect.md` 1 +- `principles/technical-principles.md` 1 +- `skills/larv-review/SKILL.md` 1 + +## Reading cost, chunk b4eea97f6667, finished 2026-10-07T10:37:56Z + +46081 new input tokens before the first commit. + +Read most (opens and searches): + +- `README.md` 2 +- `agents/stability-reviewer.md` 2 +- `CHANGELOG.md` 1 +- `agents/systems-architect.md` 1 +- `skills/larv-review/SKILL.md` 1 +- `todo.md` 1 + +## Reading cost, chunk 90755de2f601, finished 2026-10-08T13:29:17Z + +50762 new input tokens before the first commit. + +Read most (opens and searches): + +- `docs/decisions.md` 3 +- `.gitignore` 1 +- `AGENTS.md` 1 +- `CHANGELOG.md` 1 +- `README.md` 1 +- `skills/larv-review/SKILL.md` 1 +- `skills/larv-review/review-findings.md` 1 +- `todo.md` 1 -- 2.52.0 From a3ecbacaabf3e02713fea29a1d4067fba47ab3cc Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 8 Oct 2026 19:43:28 +0200 Subject: [PATCH 3/3] Answer prose round 1: close prose on its fixes, name which fixes rerun which pass, tie the full scan's replacement of /security-review to the change it runs on, and keep prose-reviewer's growth check within its one round --- AGENTS.md | 4 ++-- CHANGELOG.md | 4 ++-- agents/prose-reviewer.md | 2 +- docs/decisions.md | 4 ++-- skills/larv-review/SKILL.md | 10 +++++----- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 7bb0a537..96d05f12 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -11,14 +11,14 @@ Decisions live in `docs/decisions.md`: - comprehension floor: every dimension and the overall at 7.0 or above, and 0.1.0 waits on it - 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 reruns only the pass whose ๐Ÿ”ด or ๐ŸŸก it answers and the passes whose fix triggers it fires; a fix for a ๐ŸŸข, a โ“ or any 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; a fix for a ๐ŸŸข, a โ“ or a prose finding reruns none - review: a project decision may suspend the scoring run for the plan items it names - review: a pass skips only on a precedent: a decision, or a plan item crediting the pass, that the repo held before the chunk began - loop-claude: the archive keeps the raw transcript, and a failed archive stops the loop - loop-claude: a `claude` that cannot start is a failed worker run, retried - review: an ask no user answers leaves the PR unmerged - loop-claude: every claude it starts bypasses permissions inside its sandbox -- review: `/security-review` is the security pass of record, except in a round the full scan runs, which replaces it +- review: `/security-review` is the security pass of record, except where the full scan runs on the same change and replaces it - review: the premises chunk's whole review is the human's approval - workflow-bench/: the remote may show the bench cases' names and commit SHAs - settings.json: Claude Code runs in auto mode with the dangerous-mode prompt skipped diff --git a/CHANGELOG.md b/CHANGELOG.md index d7ae4ca9..d86fbab1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,8 @@ ## Unreleased -- larv-review reruns fewer passes after a fix. A fix reruns the pass whose ๐Ÿ”ด or ๐ŸŸก it answers, plus each pass whose trigger names fixes: 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. The rerun reviews the fixes' diff alone. A fix for a ๐ŸŸข, a โ“ or any prose finding reruns no pass, and prose takes one round. -- larv-review runs one security pass per round: the full scan alone when it runs, else `/security-review`. +- 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 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 scoring run to the project's `docs/comprehension-history.md`: the commit the seats read, each seat's five scores and the seats' 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. diff --git a/agents/prose-reviewer.md b/agents/prose-reviewer.md index 222bacae..52248402 100644 --- a/agents/prose-reviewer.md +++ b/agents/prose-reviewer.md @@ -21,7 +21,7 @@ Also report a sentence contradicting another, a claim the code shows false, and ## Growth -Report the lines each file gained and lost. From round 2, a fix that added words without naming what a reader could not understand without them is a finding. +Report the lines each file gained and lost. A line an earlier pass's fix added that names no reader need is a finding. ## Scopes diff --git a/docs/decisions.md b/docs/decisions.md index 76fa041c..84c13306 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -59,7 +59,7 @@ lilleman decided to ship each of these under the floor on the day listed. Each l 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 reruns only the pass whose ๐Ÿ”ด or ๐ŸŸก it answers and the passes whose fix triggers it fires; a fix for a ๐ŸŸข, a โ“ or any 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; 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. @@ -87,7 +87,7 @@ lilleman decided to ship each of these under the floor on the day listed. Each l 2026-09-30, lilleman. Applies "Always grant explicit access to data": the sandbox `loop-claude` runs in is where access is granted, so the worker and the interrupt run with `bypassPermissions`. The worker may read `~/.claude/.credentials.json`: it holds Claude Code's own credentials, which claude reads to run anyway. Its one seam to production is the forge: what it pushes or merges can publish through CI. Valid while `loop-claude` runs only in the sandbox README โ†’ Install names. -## review: `/security-review` is the security pass of record, except in a round the full scan runs, which replaces it +## review: `/security-review` is the security pass of record, except where the full scan runs on the same change and replaces it 2026-09-20, lilleman. Serves goal 1.1. Its value is a tuned exclusion list and a โ‰ฅ0.8 confidence floor, which a hand-written reviewer would reproduce worse. Valid while `/security-review` ships both. diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index 1426e079..6860e17c 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -34,7 +34,7 @@ A pass is one kind of review, a row of the table, named by its first column. Its |------|----------|----------------------------------------| | Architecture | systems-architect, then principles-auditor and the scoring run | ships its release's last item, or carries an architectural decision: a new, restructured or moved component, module, service or boundary; a new dependency or first use of an infrastructure pattern (queue, cron, cache, websocket, โ€ฆ); a new or changed external contract (routes, request/response shapes, events, webhooks, published file formats, CLI flags and exit codes); a schema change beyond an additive column; a fix, only where it carries an architectural decision | | Full scan | the `claude-security` plugin at high effort: `/claude-security scan this branch's changes at high` | touches authn/authz, secrets or crypto, opens an untrusted-input boundary, or adds an external surface | -| Security | `/security-review` | changes code or config, in a round the full scan does not run; a fix, only where it opens an untrusted-input boundary or touches authn/authz, secrets or crypto | +| Security | `/security-review` | changes code or config, unless the full scan runs on the same change; a fix, only where it opens an untrusted-input boundary or touches authn/authz, secrets or crypto, and the full scan does not rerun on 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 | @@ -56,15 +56,15 @@ 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), the principles audit and the scoring run, which "Architecture" โ†’ "Suspended" may skip. A later round relaunches each reviewer whose ๐Ÿ”ด or ๐ŸŸก the previous round's fixes answer, the scoring run 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`. 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. A pass's count is the highest `` among titles holding `Answer round :` in `git log origin/..HEAD` after a `git fetch`, or in `git log ..HEAD` with no remote. The auto-reviewer's count is the number of its reviews on the PR, less its reviews of a `Rescore:` commit. -- **Later rounds.** A pass a fix reruns reviews the fixes alone: `git diff HEAD`, since the fixes may be unpushed. The scoring run'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". Resolve that round's ๐ŸŸขs and โ“s per "Findings" too. +- **Later rounds.** A rerun pass reviews only what changed since it last reviewed: `git diff HEAD`, since the fixes may be unpushed. The scoring run'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. - **Answer.** A yes grants that pass one more round, after which the ask repeats; a no leaves the PR unmerged. **Re-entry.** - **Fix.** A fix is a change no pass has seen. -- **Rerun.** A round's fixes re-enter together: run, in table order, each pass whose ๐Ÿ”ด or ๐ŸŸก they answer and each pass whose trigger names a fix they fire, a done pass included; a pass at its cap gets "Round cap" โ†’ "Cap"'s ask instead. Then ยง4. +- **Rerun.** A round's fixes for ๐Ÿ”ด and ๐ŸŸก findings outside the prose pass re-enter together. Run, in table order, each pass whose ๐Ÿ”ด or ๐ŸŸก they answer, and each pass whose trigger has an "a fix, only where โ€ฆ" clause they meet, a done pass included. A pass at its cap gets "Round cap" โ†’ "Cap"'s ask instead. Then ยง4. - **No rerun.** A fix for a ๐ŸŸข, a โ“ or any prose finding reruns no pass. Its commit still calls for a rescore per "Architecture" โ†’ "Fresh". **Findings.** A reviewer rates each finding ๐Ÿ”ด must fix, ๐ŸŸก should fix, ๐ŸŸข nit, โ“ question, or ๐Ÿ”€ escalation naming the reviewer whose concern it is. @@ -112,7 +112,7 @@ Put each run's five scores in the summary, and append the run to the history on ### Security -`/security-review` over the branch diff is the pass of record, except in a round the full scan runs, which replaces it. Where the full scan fires but does not run โ€” skipped on a precedent, declined at its cost prompt, or unavailable โ€” `/security-review` runs. Launch a general-purpose subagent that invokes it through the Skill tool, edits nothing, and replies with the skill's report, or that the skill is unavailable. Invoked in your own context, the skill ends your turn on that report. +`/security-review` over the branch diff is the pass of record, except where the full scan runs on the same change and replaces it. Where the full scan fires but does not run โ€” skipped on a precedent, declined at its cost prompt, or unavailable โ€” `/security-review` runs. Launch a general-purpose subagent that invokes it through the Skill tool, edits nothing, and replies with the skill's report, or that the skill is unavailable. Invoked in your own context, the skill ends your turn on that report. A verified HIGH inside this chunk's blast radius is fixed here, outside it on its own branch and PR with this chunk waiting behind it. Say which. -- 2.52.0