From 8e6b7239b3edb29dbeb62eba02781b1eec7b3e93 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 29 Sep 2026 10:59:46 +0200 Subject: [PATCH 1/6] Give a subagent the least its job needs, stated in its prompt --- CLAUDE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CLAUDE.md b/CLAUDE.md index e53ab4bd..b96e422f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -71,6 +71,7 @@ How work proceeds in any repo, unless that repo's `AGENTS.md` says otherwise. - Run a project's language runtime, package manager, and task runner through its container/tooling setup, never directly on the host. Example: `docker compose run --rm app …`. - Check `README.md` first for build, test, install, and codegen commands; one that misbehaves is fixed per "A false claim is a bug". Refresh `README.md` whenever you change what it describes ("Refresh `README.md` to match"). - Always start a new git worktree when doing something in a codebase, and clean it up when done. Unless told otherwise, branch it off a freshly-updated default branch (`git fetch origin`, then base on `origin/main`), not whatever happens to be checked out. +- Give a subagent the least its job needs, stated in its prompt: one that only reads — a prose or doc review — uses the Read tool alone, no shell; one that probes builds under a throwaway image tag it removes, writes only to the session scratchpad, and never removes an image or file it did not create. - Pin GitHub Actions to semver tags (`@v3`, `@v3.1.2`), not commit SHAs — including third-party actions. SHA-pin only in special pipelines that test our own specific builds. - Pin container images to the **full patch version** everywhere they're referenced — Dockerfile `FROM`, compose `image:`, base images in test fixtures: `node:24.18.1-bookworm-slim`, `mysql:8.4.7`, `alpine:3.23.3`. Never a floating major or minor (`node:24`, `node:24.18`, `:latest`, `:lts`): the same commit then builds a different image on different days, so a green pipeline says nothing about the next run, a base change lands with no diff to review, and any size or performance figure measured against it silently goes stale. Let a bot (Renovate/Dependabot) raise the bumps as reviewable PRs — that is where a base change belongs. (Actions are the exception above: a semver tag is fine there, because the action's own release is the reviewable unit.) From 59ef9e209bf63b3310160b586162ac82ed378bc1 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 30 Sep 2026 16:39:33 +0200 Subject: [PATCH 2/6] Ground the judge's quote with markdown emphasis and whitespace ignored --- bin/loop-claude | 9 +++++++-- bin/test_loop_claude.py | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/bin/loop-claude b/bin/loop-claude index f4d4d6e2..bf973d13 100755 --- a/bin/loop-claude +++ b/bin/loop-claude @@ -527,8 +527,13 @@ def complete(verdict): def grounded(verdict, transcript): if not verdict["interrupt"]: return True - evidence = verdict["evidence"] - return evidence.strip() != "" and evidence in transcript + evidence = plain(verdict["evidence"]) + return evidence != "" and evidence in plain(transcript) + + +def plain(text): + # The judge drops markdown emphasis and reflows whitespace when it quotes. + return " ".join(text.replace("*", "").replace("_", "").split()) # ~/.claude.json diff --git a/bin/test_loop_claude.py b/bin/test_loop_claude.py index c031435d..2fb9da5b 100644 --- a/bin/test_loop_claude.py +++ b/bin/test_loop_claude.py @@ -348,6 +348,12 @@ class Grounded(unittest.TestCase): self.assertFalse(loop.grounded({"interrupt": True, "evidence": ""}, "the transcript")) self.assertFalse(loop.grounded({"interrupt": True, "evidence": " "}, "the transcript")) + def test_a_quote_may_drop_markdown_emphasis_and_reflow_whitespace(self): + transcript = "done.\n\n**Your step:**\n```\n./run.sh\n```\nRun it." + self.assertTrue(loop.grounded({"interrupt": True, "evidence": "Your step:\n```\n./run.sh\n```\nRun it."}, transcript)) + self.assertTrue(loop.grounded({"interrupt": True, "evidence": "Your step: ``` ./run.sh ``` Run it."}, transcript)) + self.assertFalse(loop.grounded({"interrupt": True, "evidence": "**"}, transcript)) + class Verdict(unittest.TestCase): def test_needs_every_field_the_schema_requires(self): From 3b3bf1a543734a43f5c3ffc57c9a94b1ec8e302d Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 30 Sep 2026 17:02:47 +0200 Subject: [PATCH 3/6] Run this repo on Opus 5.5 --- .claude/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.claude/settings.json b/.claude/settings.json index c0b377ed..0f085e46 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -1,3 +1,3 @@ { - "model": "claude-fable-5-1" + "model": "claude-opus-5-5" } From 093e75a9af11ee32e059c6a48220b88ed0c23862 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 30 Sep 2026 21:36:55 +0200 Subject: [PATCH 4/6] Ship a rebuild chunk with its worktree's larv-review --- AGENTS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 9ce5a71c..26cf44ca 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,6 +2,8 @@ **⚠️ THE REBUILD NEVER MERGES INTO MAIN WITHOUT THE HUMAN'S EXPLICIT APPROVAL.** Every rebuild chunk is a worktree based on `origin/rebuild` with its PR into `rebuild`, never into main. Other sessions run on `~/.claude` main throughout; only the human merges `rebuild` into main, once they have approved the finished whole. larv-review leaves a PR from `rebuild` into main ready and unmerged. +A rebuild chunk ships with its worktree's larv-review (`rebuild`'s `docs/decisions.md`): follow the worktree's `skills/larv-review/SKILL.md` in place of the installed skill, read from the worktree each `~/.claude/` it cites, and launch each agent under `agents/` as a `general-purpose` agent prompted with its body, stating its frontmatter's `tools:` as the only tools it may use. + Decisions live in `docs/decisions.md`: - larv-review: a project under the comprehension floor is fixed at the capping dimension From e99ae11f745931d6ac6cd4ad8452b65ea12ff3ab Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 30 Sep 2026 22:55:22 +0200 Subject: [PATCH 5/6] Add functional core, imperative shell to the technical principles, and let a decision link one --- CLAUDE.md | 2 +- principles/technical-principles.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index b96e422f..d2b54a26 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 not a goal — 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.** An entry names the goal it serves; one that cannot is a missing goal, and an entry already in the repo with no goal 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. 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/principles/technical-principles.md b/principles/technical-principles.md index bdcfabca..5e2ce768 100644 --- a/principles/technical-principles.md +++ b/principles/technical-principles.md @@ -32,6 +32,10 @@ - Example set order.client_firstname instead of order.client_id and fetching firstname from the clients table. * Explicit over implicit. - Avoid magic, avoid "clever" solutions, only abstract when the API can clearly describe what is happening. +* Functional core, imperative shell. + - Decisions live in pure functions, data in and data out; the shell around them performs the effects and holds no branching of its own. + - Every side effect comes from outside: output, time, randomness, network and storage are injectable, so a test runs exactly the code production runs. + - BANNED: `new Date(entry.msTimestamp ?? Date.now())` in a formatter; a test swapping `globalThis.fetch`. GOOD: the clock is a parameter, defaulted to the system clock only where the program is wired together. * Deterministic order wherever order carries no meaning. - Sort it, on a key that does not move: the name a line introduces, never where it came from. A sorted list is searchable, its diff shows only what changed, and two edits to it conflict only where they mean to. * Keep It Simple, Stupid (KISS). From 7b5fe7d78da9e2ca842af3a54db84ff8913c9aaa Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 30 Sep 2026 23:16:25 +0200 Subject: [PATCH 6/6] Let a decision name any technical principle under principles/ --- CLAUDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index d2b54a26..73b831bd 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 not a goal — 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 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. **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.