From a79efe24299a74bfbbe1ec117cbb6d6e63a89483 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 30 Sep 2026 23:12:23 +0200 Subject: [PATCH 1/4] Audit every principle and goal over the whole project in the architecture pass, and fire it on a release's last chunk --- AGENTS.md | 1 + CLAUDE.md | 2 +- agents/principles-auditor.md | 13 +++++++++++++ agents/systems-architect.md | 2 +- docs/decisions.md | 4 ++++ skills/larv-review/SKILL.md | 8 +++++--- skills/larv-review/review-findings.md | 2 +- 7 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 agents/principles-auditor.md diff --git a/AGENTS.md b/AGENTS.md index 0ecff22d..d548d9ff 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -29,3 +29,4 @@ Decisions live in `docs/decisions.md`: - bin/: mypy checks `loop_claude`'s types in the tests - rebuild: rebuild's larv-review reviews a chunk into `rebuild` - review: an ask no user answers leaves the PR unmerged +- review: the architecture pass audits every principle and goal over the whole project, and a release's last chunk fires it diff --git a/CLAUDE.md b/CLAUDE.md index cd21517e..676742df 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -112,7 +112,7 @@ How work proceeds in any repo, unless that repo's `AGENTS.md` says otherwise. **The inversion: a decision record owns what a call site may not say.** A rejected alternative, or what something deliberately does not cover, is banned beside the code precisely because the decision record holds it — a standing choice a future reader would otherwise relitigate, where a `CHANGELOG` holds what changed in a release. **The decision log has one home: `docs/decisions.md`**, or `docs/decisions/` split by area once it outgrows one file. `AGENTS.md` carries a one-line index of the titles, so a session or a reviewer sees that a decision exists without loading its reasoning. An entry states the decision, its date, who made it, and the premise it rests on ("valid while X") so it can expire honestly when that premise dies. A decision found anywhere else — an `AGENTS.md` body, a comment, or a README section that is neither a goal nor how one is met — moves there and leaves its index line behind. A goal stays a goal in the README; the log records only what the goal leaves open. -**Every decision links to a goal or a technical principle.** An entry names the goal it serves or the principle in `~/.claude/principles/technical-principles.md` it applies; one that can do neither is a missing goal, and an entry already in the repo with neither behind it is a finding. Propose the goal, never a reason of your own — the ask rule above says how. +**Every decision links to a goal or a technical principle.** An entry names the goal it serves or the principle in `~/.claude/principles/technical-principles.md` it applies; one that can do neither is a missing goal, and an entry already in the repo with neither behind it is a finding. An entry working against a goal or a technical principle stands only while it names the `todo.md` item that ends it. Propose the goal, never a reason of your own — the ask rule above says how. **Link, don't inline — and keep the link bare.** A mechanism identical across call sites or repos is documented once in the canonical source and pointed at with a one-line bare link. Don't summarize what's behind the link or restate the identifier's own name. diff --git a/agents/principles-auditor.md b/agents/principles-auditor.md new file mode 100644 index 00000000..f48503a9 --- /dev/null +++ b/agents/principles-auditor.md @@ -0,0 +1,13 @@ +--- +name: principles-auditor +description: "Use this agent for larv-review's architecture pass: one yardstick checked against the whole project." +tools: Read, Grep, Glob +--- + +You check one yardstick against the whole project, never a diff: every principle in the file you are handed, or every goal under the project's `README.md` → `## Goals`. + +Verdict, severities, rounds and declines: ~/.claude/skills/larv-review/review-findings.md. Read the yardstick, `README.md`, `docs/decisions.md` and `todo.md` first, then all of the project's code, config, tests and CI. + +- Per principle or goal: every place the project departs from it, with file:line, the defect in one sentence and its concrete consequence. Then one line: followed, mostly, not followed, or does not apply and why. +- A departure a `todo.md` item plans away is named with that item, not raised. +- A decision in `docs/decisions.md` working against a goal or a technical principle is a 🔴 on the decision, unless it names the `todo.md` item that ends it. Weigh it hard: that it was decided is no reason. diff --git a/agents/systems-architect.md b/agents/systems-architect.md index e2dcaa39..2bc96b4d 100644 --- a/agents/systems-architect.md +++ b/agents/systems-architect.md @@ -186,7 +186,7 @@ This is where unjustified duplication and accidental complexity get caught. Run 6. **Price the reasoned complexity too.** Essential-looking complexity has a requirement behind it. For each hotspot that survives the steps above, name that requirement, then sketch the design without it. When a much simpler near-equivalent exists, report the trade as a finding: the simpler shape, the exact functionality delta, and the complexity saved. A requirement nobody has priced is not a decision — offer the trade once, plainly, and let the owner accept or reject it. 7. **Hunt the imagined requirement.** The step above prices complexity a real requirement forces; this one removes complexity no requirement forces. For every abstraction, indirection, configuration point, and layer of generality, name the present, Stage 0-recorded requirement it serves. An interface with one implementation, a plugin system with one plugin, a cache or shard — or a load-testing rig — for load nobody recorded, a canary rig for a blast radius nobody recorded, "in case we swap the database" — speculative generality is the over-engineered twin of copy-paste drift: complexity nobody's requirement chose. The future that justifies flexibility must be a recorded goal or horizon, not the author's imagination — and the shorter the horizon, the harder this step cuts. Rate removals with the same severity as unreasoned duplication. -Respect documented deliberate deviations — a stated trade-off is a valid reason (`docs/decisions.md`). Respecting it means not re-arguing the same trade with the same facts; it does not forbid offering a materially simpler alternative the decision never considered — offer it once with the exact delta, then drop it if declined. The target is the *un*reasoned: duplication, complexity, and confusion that nobody decided and nobody can defend. "Acceptable for now", "will compound later", and "converge in a future pass" are how a small drift becomes the permanent shape of the system. +Respect documented deliberate deviations — a stated trade-off is a valid reason (`docs/decisions.md`), unless it works against a goal or a technical principle and names no `todo.md` item ending it. Respecting it means not re-arguing the same trade with the same facts; it does not forbid offering a materially simpler alternative the decision never considered — offer it once with the exact delta, then drop it if declined. The target is the *un*reasoned: duplication, complexity, and confusion that nobody decided and nobody can defend. "Acceptable for now", "will compound later", and "converge in a future pass" are how a small drift becomes the permanent shape of the system. ## Communication Style diff --git a/docs/decisions.md b/docs/decisions.md index 6b1e85f2..e29fa9f0 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -99,3 +99,7 @@ ## review: an ask no user answers leaves the PR unmerged 2026-09-30, claude, for the rebuild. Serves goal 4: the round cap, a BLOCK's restructure, Stage 0's questions and a goal conflict are the human's call, and an unmerged PR is what brings it to them; merging would make the call for them. Where an option reviews more — run the pass, fix under the floor, fix a finding no goal lets the run decline — the run takes it; a ❓ or a prose fix changing a goal or a decision is filed in `todo.md`, which reaches the human without holding the chunk. Valid while a human reads every unmerged PR an unattended run leaves. + +## review: the architecture pass audits every principle and goal over the whole project, and a release's last chunk fires it + +2026-09-30, lilleman. Serves goal 4: `@larvit/log`'s chunks each passed their per-diff reviewers, and a whole-project audit that day still found its functional core and state machines not followed and two semver breaks planned; what grows over many chunks shows in no diff. Valid while the other passes review a diff. diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index 60b37e80..c3944c98 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -28,7 +28,7 @@ Follow `~/.claude/CLAUDE.md` → "Git, commits, and PRs". Never commit to the de | Pass | Reviewer | Trigger | |------|----------|----------------------------------------| -| Architecture, then the comprehension floor | systems-architect, then the `comprehension-panel` scoring run | 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); a schema change beyond an additive column | +| Architecture, then the principles audit and the comprehension floor | systems-architect, then principles-auditor and the `comprehension-panel` scoring run | 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); a schema change beyond an additive column; the chunk shipping its release's last item | | Security | `/security-review` | changes code or config; a fix, only where it opens an untrusted-input boundary or touches authn/authz, secrets or crypto | | Full security scan | the `claude-security` plugin (`/claude-security` → "Scan changes") | touches authn/authz, secrets or crypto, opens an untrusted-input boundary, or adds an external surface | | Stability | stability-reviewer | changes code, config or tests; a fix, only where it changes behaviour: what the code or its tests do | @@ -37,9 +37,9 @@ Follow `~/.claude/CLAUDE.md` → "Git, commits, and PRs". Never commit to the de 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. A 🔀 escalation runs the named pass once the current pass is done; its fixes re-enter like any other. -**Record, then ask**, for the architecture pass and the full scan: where, before the chunk began, the repo held the decision this change executes — a decision-log entry, or a planning item crediting the pass — the pass is done: cite the record and skip it, the architecture pass's scoring run excepted, since no record older than the chunk scored the code it writes. A change that *departs* from the record is unreviewed however thorough the record is. Fired and not skipped → ask the user with the evidence and your recommendation; no user reachable → run it. +**Record, then ask**, for the architecture pass and the full scan: where, before the chunk began, the repo held the decision this change executes — a decision-log entry, or a planning item crediting the pass — the pass is done: cite the record and skip it, the architecture pass's principles audit and scoring run excepted, since no record older than the chunk checked the code it writes. A change that *departs* from the record is unreviewed however thorough the record is. Fired and not skipped → ask the user with the evidence and your recommendation; no user reachable → run it. -**Round cap.** A round is one launch of a pass's reviewer, whatever launched it, a rerun after the architect's Stage 0 questions — the goals, audience, scale or domain language it found unrecorded — included. The architecture pass's round is the architect, unless skipped by record, and then the scoring run, so a floor fix reruns the whole round; the external auto-reviewer (§4) is a pass of its own, each review it posts a round. From round 2, prompt an agent under `~/.claude/agents/` with the previous round's findings verbatim and what changed since. A pass is done on no 🔴 and no 🟡, until a re-entry reruns it; the 🟢 and ❓ left are addressed in the round that finished it — fixed, answered, declined or filed in `todo.md`; a ❓ only the user can answer is asked; no user reachable → filed. 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, before any push that would summon a fourth, fixes waiting unpushed. A yes grants that pass one more round, after which the ask repeats; a no leaves the PR unmerged. +**Round cap.** A round is one launch of a pass's reviewer, whatever launched it, a rerun after the architect's Stage 0 questions — the goals, audience, scale or domain language it found unrecorded — included. The architecture pass's round is the architect, unless skipped by record, then the principles audit and the scoring run, so a floor fix reruns the whole round; the external auto-reviewer (§4) is a pass of its own, each review it posts a round. From round 2, prompt an agent under `~/.claude/agents/` with the previous round's findings verbatim and what changed since. A pass is done on no 🔴 and no 🟡, until a re-entry reruns it; the 🟢 and ❓ left are addressed in the round that finished it — fixed, answered, declined or filed in `todo.md`; a ❓ only the user can answer is asked; no user reachable → filed. 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, before any push that would summon a fourth, fixes waiting unpushed. A yes grants that pass one more round, after which the ask repeats; a no leaves the PR unmerged. **Re-entry.** A fix is a change no pass has seen, a 🟢's or ❓'s included. A round's fixes re-enter together: run, in table order, each pass whose trigger they fire and the pass whose 🔴 or 🟡 they answer, a pass at its cap getting the cap's ask; then §4. @@ -50,6 +50,8 @@ Launch systems-architect: review the system as a whole entered through this chan - **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. +Then the principles audit: one principles-auditor per file in `~/.claude/principles/` and one for the README's goals, each over the whole project. A finding outside the chunk is filed in `todo.md`; a 🔴 on a decision is asked, since the decision is the user's. + Then the comprehension floor: the `comprehension-panel` skill's scoring run (`~/.claude/skills/comprehension-panel/SKILL.md` → "The scoring run") over the whole project, not the diff. With any dimension or the overall below 7.0 the chunk does not merge: fix the places the seats name under the capping dimension, or take the user's explicit decision to ship under the floor, record it in `docs/decisions.md` with the scores, and file the places in `todo.md`. No user reachable → fix. At the floor or above, the scores are still a ratchet — a later chunk may not lower any — and the four dimension scores and the overall go in the summary so the next run can see the direction of travel. ### Security diff --git a/skills/larv-review/review-findings.md b/skills/larv-review/review-findings.md index 7a13b5c8..324fb2db 100644 --- a/skills/larv-review/review-findings.md +++ b/skills/larv-review/review-findings.md @@ -2,7 +2,7 @@ Words: `~/.claude/CLAUDE.md` → "Vocabulary". -A reviewer reads and reports; it edits nothing. Read `docs/decisions.md` and `todo.md` first: a finding declined in the one or filed in the other is not raised again. +A reviewer reads and reports; it edits nothing. Read `docs/decisions.md` and `todo.md` first: a finding declined in the one or filed in the other is not raised again, unless the decline works against a goal or a technical principle. ## Severity -- 2.52.0 From fec886273a58587f0c4d8e48e9996cb4f92fa195 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 30 Sep 2026 23:14:33 +0200 Subject: [PATCH 2/4] Carry the todo.md condition and the technical principles into review-findings, and run the audit unasked in every round --- CLAUDE.md | 4 ++-- agents/principles-auditor.md | 2 +- skills/larv-review/SKILL.md | 6 +++--- skills/larv-review/review-findings.md | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 676742df..454ce6aa 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -9,7 +9,7 @@ Shorter is better, none is best — chat output, commit messages, comments, docs - **gate** — the merge gate: the checks a PR passes before it merges. - **interrupt** — `loop-claude` handing the terminal to the human, `claude --resume`, for a decision that is theirs. - **judge** — the headless claude that reads a worker's transcript each cycle and decides whether to interrupt and whether the chunk is finished. -- **pass** — one kind of review a chunk may take, run in rounds by its reviewer until clean; `larv-review` §3 lists them. +- **pass** — one kind of review a chunk may take, run in rounds by its reviewers until clean; `larv-review` §3 lists them. - **plan** — `todo.md`. - **premises** — the goals and audience under `## Goals` and `## Audience` in the project's `README.md`. - **release** — a semver version the human cuts. @@ -112,7 +112,7 @@ How work proceeds in any repo, unless that repo's `AGENTS.md` says otherwise. **The inversion: a decision record owns what a call site may not say.** A rejected alternative, or what something deliberately does not cover, is banned beside the code precisely because the decision record holds it — a standing choice a future reader would otherwise relitigate, where a `CHANGELOG` holds what changed in a release. **The decision log has one home: `docs/decisions.md`**, or `docs/decisions/` split by area once it outgrows one file. `AGENTS.md` carries a one-line index of the titles, so a session or a reviewer sees that a decision exists without loading its reasoning. An entry states the decision, its date, who made it, and the premise it rests on ("valid while X") so it can expire honestly when that premise dies. A decision found anywhere else — an `AGENTS.md` body, a comment, or a README section that is neither a goal nor how one is met — moves there and leaves its index line behind. A goal stays a goal in the README; the log records only what the goal leaves open. -**Every decision links to a goal or a technical principle.** An entry names the goal it serves or the principle in `~/.claude/principles/technical-principles.md` it applies; one that can do neither is a missing goal, and an entry already in the repo with neither behind it is a finding. An entry working against a goal or a technical principle stands only while it names the `todo.md` item that ends it. Propose the goal, never a reason of your own — the ask rule above says how. +**Every decision links to a goal or a technical principle.** An entry names the goal it serves or the technical principle under `~/.claude/principles/` it applies; one that can do neither is a missing goal, and an entry already in the repo with neither behind it is a finding. Propose the goal, never a reason of your own — the ask rule above says how. An entry working against a goal or a technical principle stands only while it names the `todo.md` item that ends it. **Link, don't inline — and keep the link bare.** A mechanism identical across call sites or repos is documented once in the canonical source and pointed at with a one-line bare link. Don't summarize what's behind the link or restate the identifier's own name. diff --git a/agents/principles-auditor.md b/agents/principles-auditor.md index f48503a9..f64b27b5 100644 --- a/agents/principles-auditor.md +++ b/agents/principles-auditor.md @@ -4,7 +4,7 @@ description: "Use this agent for larv-review's architecture pass: one yardstick tools: Read, Grep, Glob --- -You check one yardstick against the whole project, never a diff: every principle in the file you are handed, or every goal under the project's `README.md` → `## Goals`. +You check one yardstick against the whole project, never a diff, in every round: every principle in the file you are handed, or every goal under the project's `README.md` → `## Goals`. Verdict, severities, rounds and declines: ~/.claude/skills/larv-review/review-findings.md. Read the yardstick, `README.md`, `docs/decisions.md` and `todo.md` first, then all of the project's code, config, tests and CI. diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index c3944c98..fba6ccd0 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -37,9 +37,9 @@ Follow `~/.claude/CLAUDE.md` → "Git, commits, and PRs". Never commit to the de 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. A 🔀 escalation runs the named pass once the current pass is done; its fixes re-enter like any other. -**Record, then ask**, for the architecture pass and the full scan: where, before the chunk began, the repo held the decision this change executes — a decision-log entry, or a planning item crediting the pass — the pass is done: cite the record and skip it, the architecture pass's principles audit and scoring run excepted, since no record older than the chunk checked the code it writes. A change that *departs* from the record is unreviewed however thorough the record is. Fired and not skipped → ask the user with the evidence and your recommendation; no user reachable → run it. +**Record, then ask**, for the architecture pass and the full scan: where, before the chunk began, the repo held the decision this change executes — a decision-log entry, or a planning item crediting the pass — the pass is done: cite the record and skip it, the architecture pass's principles audit and scoring run excepted: they run whenever the pass fires, unasked, since no record older than the chunk checked the code it writes. A change that *departs* from the record is unreviewed however thorough the record is. Fired and not skipped → ask the user with the evidence and your recommendation; no user reachable → run it. -**Round cap.** A round is one launch of a pass's reviewer, whatever launched it, a rerun after the architect's Stage 0 questions — the goals, audience, scale or domain language it found unrecorded — included. The architecture pass's round is the architect, unless skipped by record, then the principles audit and the scoring run, so a floor fix reruns the whole round; the external auto-reviewer (§4) is a pass of its own, each review it posts a round. From round 2, prompt an agent under `~/.claude/agents/` with the previous round's findings verbatim and what changed since. A pass is done on no 🔴 and no 🟡, until a re-entry reruns it; the 🟢 and ❓ left are addressed in the round that finished it — fixed, answered, declined or filed in `todo.md`; a ❓ only the user can answer is asked; no user reachable → filed. 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, before any push that would summon a fourth, fixes waiting unpushed. A yes grants that pass one more round, after which the ask repeats; a no leaves the PR unmerged. +**Round cap.** A round is one launch of a pass's reviewer, whatever launched it, a rerun after the architect's Stage 0 questions — the goals, audience, scale or domain language it found unrecorded — included. The architecture pass's round is the architect (unless skipped by record), the principles audit and the scoring run, so a fix to any of their findings reruns the whole round; the external auto-reviewer (§4) is a pass of its own, each review it posts a round. From round 2, prompt an agent under `~/.claude/agents/` with the previous round's findings verbatim and what changed since. A pass is done on no 🔴 and no 🟡, until a re-entry reruns it; the 🟢 and ❓ left are addressed in the round that finished it — fixed, answered, declined or filed in `todo.md`; a ❓ only the user can answer is asked; no user reachable → filed. 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, before any push that would summon a fourth, fixes waiting unpushed. A yes grants that pass one more round, after which the ask repeats; a no leaves the PR unmerged. **Re-entry.** A fix is a change no pass has seen, a 🟢's or ❓'s included. A round's fixes re-enter together: run, in table order, each pass whose trigger they fire and the pass whose 🔴 or 🟡 they answer, a pass at its cap getting the cap's ask; then §4. @@ -50,7 +50,7 @@ Launch systems-architect: review the system as a whole entered through this chan - **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. -Then the principles audit: one principles-auditor per file in `~/.claude/principles/` and one for the README's goals, each over the whole project. A finding outside the chunk is filed in `todo.md`; a 🔴 on a decision is asked, since the decision is the user's. +Then the principles audit: one principles-auditor per file in `~/.claude/principles/` and one for the README's goals, each over the whole project in every round. A finding outside the chunk is filed in `todo.md`; a 🔴 on a decision is asked, since the decision is the user's. Then the comprehension floor: the `comprehension-panel` skill's scoring run (`~/.claude/skills/comprehension-panel/SKILL.md` → "The scoring run") over the whole project, not the diff. With any dimension or the overall below 7.0 the chunk does not merge: fix the places the seats name under the capping dimension, or take the user's explicit decision to ship under the floor, record it in `docs/decisions.md` with the scores, and file the places in `todo.md`. No user reachable → fix. At the floor or above, the scores are still a ratchet — a later chunk may not lower any — and the four dimension scores and the overall go in the summary so the next run can see the direction of travel. diff --git a/skills/larv-review/review-findings.md b/skills/larv-review/review-findings.md index 324fb2db..6f40e297 100644 --- a/skills/larv-review/review-findings.md +++ b/skills/larv-review/review-findings.md @@ -2,11 +2,11 @@ Words: `~/.claude/CLAUDE.md` → "Vocabulary". -A reviewer reads and reports; it edits nothing. Read `docs/decisions.md` and `todo.md` first: a finding declined in the one or filed in the other is not raised again, unless the decline works against a goal or a technical principle. +A reviewer reads and reports; it edits nothing. Read `docs/decisions.md` and `todo.md` first: a finding declined in the one or filed in the other is not raised again, unless the decline works against a goal or a technical principle and names no `todo.md` item ending it. ## Severity -- 🔴 **must fix** — a goal, a principle or correctness broken. Fixed, or shown factually wrong, with what disproved it recorded in `docs/decisions.md`; never declined. +- 🔴 **must fix** — a goal, a principle or correctness broken. Fixed, or shown factually wrong, with what disproved it recorded in `docs/decisions.md`, or — outside the chunk — filed in `todo.md`; never declined. - 🟡 **should fix** — worse than it needs to be. Fixed, declined, or — outside the chunk — filed in `todo.md`. - 🟢 **nit** — fixed, answered, declined in the summary with its reason, or filed in `todo.md`. - ❓ **question** for the author: a finding you could not confirm goes here, not above. @@ -34,4 +34,4 @@ A review's first line, derived from the findings: ## Declining -A 🟡 may be declined where the reason is sound, consistent with the goals, and confidence is very high. The decline, its reason and the goal it rests on go to `docs/decisions.md`. A reason no goal speaks to is a gap in the goals: fix the finding, or ask per `~/.claude/CLAUDE.md` → "Working loop", "Ask, don't guess", which also says where the user's reply to a ❓ lands; no user reachable → fix. Never a silent drop, and never a decline argued from convenience or the size of the fix. +A 🟡 may be declined where the reason is sound, consistent with the goals and the technical principles, and confidence is very high. The decline, its reason and the goal it rests on go to `docs/decisions.md`. A reason no goal speaks to is a gap in the goals: fix the finding, or ask per `~/.claude/CLAUDE.md` → "Working loop", "Ask, don't guess", which also says where the user's reply to a ❓ lands; no user reachable → fix. Never a silent drop, and never a decline argued from convenience or the size of the fix. -- 2.52.0 From 080fdb94b2ccbeb27ee1a99f20e317328c263401 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 30 Sep 2026 23:16:09 +0200 Subject: [PATCH 3/4] =?UTF-8?q?Let=20a=20decline=20rest=20on=20a=20technic?= =?UTF-8?q?al=20principle,=20and=20untangle=20the=20=F0=9F=94=B4=20bullet?= =?UTF-8?q?=20and=20the=20record=20exception?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- skills/larv-review/SKILL.md | 6 +++--- skills/larv-review/review-findings.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index fba6ccd0..eed5b4a3 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -37,9 +37,9 @@ Follow `~/.claude/CLAUDE.md` → "Git, commits, and PRs". Never commit to the de 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. A 🔀 escalation runs the named pass once the current pass is done; its fixes re-enter like any other. -**Record, then ask**, for the architecture pass and the full scan: where, before the chunk began, the repo held the decision this change executes — a decision-log entry, or a planning item crediting the pass — the pass is done: cite the record and skip it, the architecture pass's principles audit and scoring run excepted: they run whenever the pass fires, unasked, since no record older than the chunk checked the code it writes. A change that *departs* from the record is unreviewed however thorough the record is. Fired and not skipped → ask the user with the evidence and your recommendation; no user reachable → run it. +**Record, then ask**, for the architecture pass and the full scan: where, before the chunk began, the repo held the decision this change executes — a decision-log entry, or a planning item crediting the pass — the pass is done: cite the record and skip it. The architecture pass's principles audit and scoring run are excepted: they run whenever the pass fires, unasked, since no record older than the chunk checked the code it writes. A change that *departs* from the record is unreviewed however thorough the record is. Fired and not skipped → ask the user with the evidence and your recommendation; no user reachable → run it. -**Round cap.** A round is one launch of a pass's reviewer, whatever launched it, a rerun after the architect's Stage 0 questions — the goals, audience, scale or domain language it found unrecorded — included. The architecture pass's round is the architect (unless skipped by record), the principles audit and the scoring run, so a fix to any of their findings reruns the whole round; the external auto-reviewer (§4) is a pass of its own, each review it posts a round. From round 2, prompt an agent under `~/.claude/agents/` with the previous round's findings verbatim and what changed since. A pass is done on no 🔴 and no 🟡, until a re-entry reruns it; the 🟢 and ❓ left are addressed in the round that finished it — fixed, answered, declined or filed in `todo.md`; a ❓ only the user can answer is asked; no user reachable → filed. 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, before any push that would summon a fourth, fixes waiting unpushed. A yes grants that pass one more round, after which the ask repeats; a no leaves the PR unmerged. +**Round cap.** A round is one launch of a pass's reviewer, whatever launched it, a rerun after the architect's Stage 0 questions — the goals, audience, scale or domain language it found unrecorded — included. The architecture pass's round is the architect (unless skipped), the principles audit and the scoring run, so a fix to any of their findings reruns the whole round; the external auto-reviewer (§4) is a pass of its own, each review it posts a round. From round 2, prompt an agent under `~/.claude/agents/` with the previous round's findings verbatim and what changed since. A pass is done on no 🔴 and no 🟡, until a re-entry reruns it; the 🟢 and ❓ left are addressed in the round that finished it — fixed, answered, declined or filed in `todo.md`; a ❓ only the user can answer is asked; no user reachable → filed. 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, before any push that would summon a fourth, fixes waiting unpushed. A yes grants that pass one more round, after which the ask repeats; a no leaves the PR unmerged. **Re-entry.** A fix is a change no pass has seen, a 🟢's or ❓'s included. A round's fixes re-enter together: run, in table order, each pass whose trigger they fire and the pass whose 🔴 or 🟡 they answer, a pass at its cap getting the cap's ask; then §4. @@ -89,4 +89,4 @@ Launch prose-reviewer with what the diff touched and every section this review c ## 6. Wrap up -Summarize: PR URL and final state, every reviewer's verdict, rounds per pass, passes skipped, findings fixed vs answered vs declined vs open — each answer with what settles it, each decline with its reason, a 🟡's with the goal it rests on — CI status, decisions recorded (file paths), `todo.md`/`CHANGELOG.md` updated, and any 🔀 escalation left for the user. +Summarize: PR URL and final state, every reviewer's verdict, rounds per pass, passes skipped, findings fixed vs answered vs declined vs open — each answer with what settles it, each decline with its reason, a 🟡's with the goal or technical principle it rests on — CI status, decisions recorded (file paths), `todo.md`/`CHANGELOG.md` updated, and any 🔀 escalation left for the user. diff --git a/skills/larv-review/review-findings.md b/skills/larv-review/review-findings.md index 6f40e297..ab25e09c 100644 --- a/skills/larv-review/review-findings.md +++ b/skills/larv-review/review-findings.md @@ -6,7 +6,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. Fixed, or shown factually wrong, with what disproved it recorded in `docs/decisions.md`, or — outside the chunk — filed in `todo.md`; never declined. +- 🔴 **must fix** — a goal, a principle or correctness broken. Fixed; outside the chunk, filed in `todo.md`; or shown factually wrong, with what disproved it recorded in `docs/decisions.md`. Never declined. - 🟡 **should fix** — worse than it needs to be. Fixed, declined, or — outside the chunk — filed in `todo.md`. - 🟢 **nit** — fixed, answered, declined in the summary with its reason, or filed in `todo.md`. - ❓ **question** for the author: a finding you could not confirm goes here, not above. @@ -34,4 +34,4 @@ A review's first line, derived from the findings: ## Declining -A 🟡 may be declined where the reason is sound, consistent with the goals and the technical principles, and confidence is very high. The decline, its reason and the goal it rests on go to `docs/decisions.md`. A reason no goal speaks to is a gap in the goals: fix the finding, or ask per `~/.claude/CLAUDE.md` → "Working loop", "Ask, don't guess", which also says where the user's reply to a ❓ lands; no user reachable → fix. Never a silent drop, and never a decline argued from convenience or the size of the fix. +A 🟡 may be declined where the reason is sound, consistent with the goals and the technical principles, and confidence is very high. The decline, its reason and the goal or technical principle it rests on go to `docs/decisions.md`. A reason neither speaks to is a gap in the goals: fix the finding, or ask per `~/.claude/CLAUDE.md` → "Working loop", "Ask, don't guess", which also says where the user's reply to a ❓ lands; no user reachable → fix. Never a silent drop, and never a decline argued from convenience or the size of the fix. -- 2.52.0 From ce21270052b9c7f00b3c211d0132619713e8309c Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 30 Sep 2026 23:20:11 +0200 Subject: [PATCH 4/4] File the rebuild's principles audit --- todo.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/todo.md b/todo.md index f299b657..93dd2dc1 100644 --- a/todo.md +++ b/todo.md @@ -24,3 +24,13 @@ The rebuild lifts every dimension, one chunk per item, until the last item opens - **Give a 🟡 shown factually wrong the 🔴's way out in `review-findings.md`.** Today it can only be fixed, declined on a goal, or filed. - **Say in `AGENTS.md` that only the rebuild's last chunk opens `rebuild`'s PR into main.** Today it reads as every chunk doing so. - **Have larv-review's prose pass fix only what the chunk touched, and file the rest per `CLAUDE.md` → "Working loop".** Its fixes land "in this chunk", cited sections and the sweep run when the architecture pass ran included. The 2026-09-30 bench's costliest rebuild runs sprawled outside the chunk: deleted README facts, 13 mypy rounds where main took 6–7 for the same fixes. On 35b, rebuild's one clear win took 6–11 agents to main's 8–16. `~/code/claude-handoffs/claude-config/2026-09-30/bench/comparison.md` +- **Give principles-auditor and prose-reviewer a way to list the project's files.** Their `tools: Read, Grep, Glob` left only Read in the 2026-09-30 audit run, so each read what imports and `.gitignore` named and said which files it could not reach. +- **Judge a cycle on more than the transcript's last 40,000 characters.** `judge.py:80` cuts the session, which spans every cycle of the chunk, so a decision made early in a long run is never judged and the human is not interrupted for it (goal 4). +- **Name `jq` and GNU `date` under README → Install, or drop them from `statusline.sh`.** Without `jq` the status line aborts; under BSD `date` the reset times vanish, so CHANGELOG's "runs on any machine unedited" is false. +- **Inject `loop-claude`'s side effects: `time.sleep`, `subprocess`, `input()`, `isatty` and `os.execv`, and split `project_model` and `interrupt` into decisions and effects.** Functional core, imperative shell; the loop's flow has no tests because nothing reaches it without the effects. +- **Test `run_cycle`, `judge_through_interrupts`, `retried`, `archive`, `trust`, `interrupt`, the models file and the worker's arguments.** Only the pure helpers are tested today. +- **Give a project's loop state named states and one transition function.** Fresh, resuming, awaiting the human and finished come today from whether a transcript exists, two verdict booleans and an open `while True` in `steps.py`. +- **Make a `Verdict` with both `interrupt` and `finished`, or a question without an interrupt, unrepresentable.** `steps.py:49` ignores `finished` when `interrupt` is set. +- **Grant an unattended worker named permissions in place of `bypassPermissions`.** `worker.py:37` and `interrupt.py:23` let it read and write anything the user can, `~/.claude/.credentials.json` included. +- **Return a `Stop` when `git` or `os.execv` fails.** `checkout.py:7,15` and `reload.py:52` end in a traceback. +- **Narrow `.gitignore`'s `!bin/*` and `skills/*/**` to the files they mean.** A stray log of `loop-claude` output in `bin/` would be committed with transcript text in it. -- 2.52.0