From 002357a576586d929515730672b20c3f6d35f136 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 24 Sep 2026 22:32:45 +0200 Subject: [PATCH 1/4] One word per concept: premises, trigger, gate, reviewer, cycle, interrupt, chunk, memory file --- AGENTS.md | 2 +- CHANGELOG.md | 3 ++- CLAUDE.md | 20 +++++++-------- README.md | 4 +-- agents/review-protocol.md | 2 +- agents/stability-reviewer.md | 10 ++++---- agents/systems-architect.md | 6 ++--- bin/loop-claude | 50 ++++++++++++++++++------------------ bin/test_loop_claude.py | 16 ++++++------ docs/decisions.md | 2 +- skills/larv-review/SKILL.md | 14 +++++----- todo.md | 1 - 12 files changed, 65 insertions(+), 65 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 4c951f08..e521152a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,6 +4,6 @@ Decisions live in `docs/decisions.md`: - loop-claude: a judge decides interrupts, not the worker's self-report - loop-claude: one session per project, at a fixed id -- loop-claude: the trust file is rewritten before a handoff +- loop-claude: the trust file is rewritten before an interrupt - bin/: host python, no container - Merged under the comprehension floor diff --git a/CHANGELOG.md b/CHANGELOG.md index 37face75..13fa53df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,11 @@ ## Unreleased - Track the authored configuration: `CLAUDE.md`, `AGENTS.md`, `settings.json`, `statusline.sh`, agents, skills and principles. Credentials, transcripts and memory stay untracked. -- `loop-claude ` runs a project's next chunk round after round, handing the session over only for a decision that is yours or a release ready to cut. +- `loop-claude ` runs a project's next chunk cycle after cycle, interrupting only for a decision that is yours or a release ready to cut. - `loop-claude --help` names the Claude Code version its transcript, session and trust handling were observed on; check it first when an upgrade breaks a round. - `loop-claude` runs the model each project's settings pick; `WORKER_MODEL` and `JUDGE_MODEL` override it. This repo runs on Fable 5.1. - Reviewers share one protocol for verdicts, severities, rounds and declines: `agents/review-protocol.md`. - Skills and agents cite `CLAUDE.md` by heading; the comment and documentation bar lives there alone. - Update a main checkout with `git pull --ff-only`, never `--autostash`. +- One word per concept across `CLAUDE.md`, the agents, the skills and `loop-claude`: the README's goals and audience are the premises, the architecture pass has a trigger, the merge gate is the gate, the stability reviewer is a reviewer, `loop-claude` runs cycles and interrupts, and a handoff is the document under `~/code/claude-handoffs/`. - `settings.json`, the agents and the status line name no machine-specific path; the status line shows reset times in the host's time zone. diff --git a/CLAUDE.md b/CLAUDE.md index f922f54c..f4c6480d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -8,7 +8,7 @@ Shorter is better, none is best — chat output, commit messages, comments, docs - **No contrastive tail.** `X rather than Y`, `not Y but X`, `instead of Y`: state X and stop. The rejected alternative is noise unless naming it stops a reader doing Y. BANNED: `verified in CI rather than asserted`. GOOD: `verified in CI`. ## Maintaining this file -- When you spot a pattern in how I work that isn't written here — a preference I've repeated, a correction I've given more than once, a convention you inferred from my code — tell me and ask me to write it up here. Don't add it silently, and don't just keep it in memory. +- When you spot a pattern in how I work that isn't written here — a preference I've repeated, a correction I've given more than once, a convention you inferred from my code — tell me and ask me to write it up here. Don't add it silently, and don't just keep it in a memory file. - After every change to this file, re-read the whole thing and restructure it: merge overlapping rules, cut prose that restates a rule, move rules to the section they belong in, drop what's now covered elsewhere. Same information, more compact. ## Web research @@ -38,10 +38,10 @@ Apply it as a question to any design that routes A through B, or has A reach int How work proceeds in any repo, unless that repo's `AGENTS.md` says otherwise. -- **`README.md` states the goals and the audience under literal `## Goals` and `## Audience` headings — and until it does, nothing else proceeds.** Two different things, both required, both public: an outside reader judges the project by where it is heading and who it is for. Goals are priority-ordered and specific enough that a design decision can be derived from them; the audience names who depends on this and what they may rely on. The check is those two headings in `README.md`, run at the start of every session: the same content in `AGENTS.md`, in `docs/`, or in a decision log does not satisfy it, and neither does an earlier session having passed it. A repo missing either, or holding a version too vague to settle a decision, gets one chunk that writes them and takes approval **before any planned work**, `todo.md` included. While the gate is unmet nothing merges and no work is reported as done: the only output is that chunk, or a statement that the gate blocks. Past the gate only: a security fix — which passes even where it alters an interface — a bot's dependency bump, and a repair restoring behaviour the repo already claims: a red gate, a failing build, a false doc, where it is the doc that gets corrected unless consumers already rely on what the doc promises. None of them decides direction. Anything else that adds capability, alters an interface, or picks between options is planned work and waits. Once written they stand; a later question they do not settle is the ask rule below, never a reopened gate. -- **`todo.md` is the plan, ordered as semver releases** — every item sits under the release that ships it. Where the earliest unreleased release names no items and nothing has shipped toward it, that chunk is planning it: weigh the unscheduled items against the goals, write the order, take approval before any code. A `todo.md` in any other shape gets that shape as the session's first chunk, approval taken. -- **A release is the human's, and a finished one stops the session.** The version bump and the publishing credentials are the human's whatever any other rule says; prepare everything around it so the release is one decision. Open every session with one line: the last version cut, what is unreleased (`CHANGELOG.md`'s `## Unreleased`, else the log since the last tag), and the release this chunk ships into; a repo that publishes nothing says so once. Where the earliest unreleased release has no items left and work has shipped toward it, that is the terminal state: report what it holds and that it is ready to cut, and stop. A security fix still lands, into the waiting release. Never roll forward into a later release's items, and never plan a new release, while a finished one waits — the bump is the next decision. Under `/loop`, that stop ends the loop. -- **One chunk per session**, the smallest PR-able unit; split a milestone into sub-items in `todo.md` before starting it. A finding inside the chunk is fixed in the chunk; outside it, it becomes a `todo.md` item under a release. +- **`README.md` states the goals and the audience under literal `## Goals` and `## Audience` headings — and until it does, nothing else proceeds.** Two different things, both required, both public: an outside reader judges the project by where it is heading and who it is for. Goals are priority-ordered and specific enough that a design decision can be derived from them; the audience names who depends on this and what they may rely on. These are the premises. The check is those two headings in `README.md`, run at the start of every chunk: the same content in `AGENTS.md`, in `docs/`, or in a decision log does not satisfy it, and neither does an earlier chunk having passed it. A repo missing either, or holding a version too vague to settle a decision, gets one chunk that writes them and takes approval **before any planned work**, `todo.md` included. While the premises are missing nothing merges and no work is reported as done: the only output is that chunk, or a statement that the premises are missing. Without them only: a security fix — which passes even where it alters an interface — a bot's dependency bump, and a repair restoring behaviour the repo already claims: a red gate, a failing build, a false doc, where it is the doc that gets corrected unless consumers already rely on what the doc promises. None of them decides direction. Anything else that adds capability, alters an interface, or picks between options is planned work and waits. Once written they stand; a later question they do not settle is the ask rule below, never reopened premises. +- **`todo.md` is the plan, ordered as semver releases** — every item sits under the release that ships it. Where the earliest unreleased release names no items and nothing has shipped toward it, that chunk is planning it: weigh the unscheduled items against the goals, write the order, take approval before any code. A `todo.md` in any other shape gets that shape as the chunk, approval taken. +- **A release is the human's, and a finished one stops all work.** The version bump and the publishing credentials are the human's whatever any other rule says; prepare everything around it so the release is one decision. Open every chunk with one line: the last version cut, what is unreleased (`CHANGELOG.md`'s `## Unreleased`, else the log since the last tag), and the release this chunk ships into; a repo that publishes nothing says so once. Where the earliest unreleased release has no items left and work has shipped toward it, that is the terminal state: report what it holds and that it is ready to cut, and stop. A security fix still lands, into the waiting release. Never roll forward into a later release's items, and never plan a new release, while a finished one waits — the bump is the next decision. Under `/loop`, that stop ends the loop. +- **One chunk at a time**, the smallest PR-able unit; split a milestone into sub-items in `todo.md` before starting it. A finding inside the chunk is fixed in the chunk; outside it, it becomes a `todo.md` item under a release. - **A done item leaves `todo.md`; its release heading stays until the version is cut.** Where the repo publishes something a consumer takes — a package, an image, an API — the line is reworded for that consumer and moves to `CHANGELOG.md` under `## Unreleased`; a CHANGELOG is written for the public, never for the next agent. Everywhere else the line is simply deleted, because git history is already the record. - **Ship every chunk with `/larv-review`.** - **Ask, don't guess — and fix the goals rather than the question.** Before asking, check whether the goals already settle it; where they nearly do, propose the goal change and show what falls out of it for the instance, because one answered question settles one instance and a goal settles the class. Every answer lands where its kind belongs, and nowhere else: a goal in `README.md`, a working rule in `AGENTS.md`, a standing choice in `docs/decisions.md`. Where an answer is more than one of these, the goal wins — write the goal, and record a decision only for what it still leaves open. Never in chat alone. @@ -54,9 +54,9 @@ How work proceeds in any repo, unless that repo's `AGENTS.md` says otherwise. - 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.) ## Handoffs -- One document per project: `~/code/claude-handoffs/_.md`, with its supporting files (scripts, probes, saved sessions) under `~/code/claude-handoffs///`, dated by the session that produced them. -- Each document stands alone — projects move in parallel, so never reference another project's handoff. A fact two of them share (a test site, where credentials live) is stated in each, or kept in memory and named there. -- Content: only what the repo cannot hold — session-local findings, probe results, where credentials live. The plan, what is done and the next step live in `todo.md`; goals, audience and decisions in `README.md`/`AGENTS.md`. A handoff never restates them: the repo's copy travels with the code and this one does not. +- One document per project: `~/code/claude-handoffs/_.md`, with its supporting files (scripts, probes, saved sessions) under `~/code/claude-handoffs///`, dated the day they were written. +- Each document stands alone — projects move in parallel, so never reference another project's handoff. A fact two of them share (a test site, where credentials live) is stated in each, or kept in a memory file and named there. +- Content: only what the repo cannot hold — the chunk's findings, probe results, where credentials live. The plan, what is done and the next step live in `todo.md`; goals, audience and decisions in `README.md`/`AGENTS.md`. A handoff never restates them: the repo's copy travels with the code and this one does not. ## Tests - Write tests first for the behaviour we want, then implement until they pass. @@ -107,7 +107,7 @@ Default to NO comment. Delete one that is any of: **A plausible "why" is not enough on its own.** Multi-line background explaining what a thing is for, or how we got here, piles up into walls a few lines of code cannot justify. Keep a comment only where it stops a real mistake or records an external constraint the code can't show, and then as ONE terse line. When unsure, delete. GOOD: `# Pinned to 7.x: hurl 8's jsonpath change breaks the nth-filter asserts.` -**No file preambles, and no rationale for how code is arranged.** A file gets no header comment saying what it holds, why it exists, or why it sits where it does — the file name and the declarations are the index. Nor may a comment explain why two things share a file, why a gate lives beside what it judges, or why an order was chosen: that choice has no effect on the running program and belongs in the commit that made it, or in the decision record. Structured doc comments a tool consumes (docstrings, godoc, JSDoc types) are not the target; prose narration is. +**No file preambles, and no rationale for how code is arranged.** A file gets no header comment saying what it holds, why it exists, or why it sits where it does — the file name and the declarations are the index. Nor may a comment explain why two things share a file, why a check lives beside what it judges, or why an order was chosen: that choice has no effect on the running program and belongs in the commit that made it, or in the decision record. Structured doc comments a tool consumes (docstrings, godoc, JSDoc types) are not the target; prose narration is. **Density is a review signal.** Set the tooling-consumed doc comments aside, then count: prose comment lines much past ~10% of a file's remaining non-blank lines mean something is wrong — narrating comments, or code that fails to carry its own meaning. A defect to investigate, not a style preference. @@ -119,7 +119,7 @@ Default to NO comment. Delete one that is any of: ### Todo items (`todo.md`, tickets, plans) - Write each item as the target state, checkable when done: an imperative verb plus what holds afterwards. A present-tense fact reads as the current state and says nothing about what to do. Add "today X" only where the direction is otherwise ambiguous. GOOD: `Accept undefined in MetadataValue and drop such keys on output`. BANNED: `MetadataValue accepts undefined; such keys are dropped on output`. -- A security finding — a leaked credential, secret or PII, an auth bypass, an injection — is filed the moment it is found, at the top of the list under its own `## Security` heading, naming the exposure and the path it reaches. Never among additive or nice-to-have items, never only in a session summary, and never as a question about where it belongs: file it, say you did, and I will move it down if I disagree. Fixing it inside an unrelated change is a separate call — say whether it is in the blast radius. +- A security finding — a leaked credential, secret or PII, an auth bypass, an injection — is filed the moment it is found, at the top of the list under its own `## Security` heading, naming the exposure and the path it reaches. Never among additive or nice-to-have items, never only in a chunk's summary, and never as a question about where it belongs: file it, say you did, and I will move it down if I disagree. Fixing it inside an unrelated change is a separate call — say whether it is in the blast radius. ### Package README (what someone finds on npm or GitHub) - The public API is the contract, so the README documents it: options, results, events, everything exported. The rule against narrating a file or test case still holds. diff --git a/README.md b/README.md index 34d51667..60a2d1b6 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ My personal `~/.claude`, version controlled. Instructions, agents, skills, princ 1. Share this configuration between my computers. 2. Keep it backed up. -3. Leak nothing — no credentials, no session transcripts, no memory. +3. Leak nothing — no credentials, no transcripts, no memory files. 4. Run work chunks unattended, interrupting me only when a decision is mine. ## Audience @@ -23,7 +23,7 @@ Rename `## Unreleased` in `CHANGELOG.md` to the version, commit, and tag that co ## Tools -- `loop-claude ` runs a project's next chunk round after round; `loop-claude --help` states its contract. +- `loop-claude ` runs a project's next chunk cycle after cycle; `loop-claude --help` states its contract. Test: `python3 -m unittest bin/test_loop_claude.py` diff --git a/agents/review-protocol.md b/agents/review-protocol.md index db1ddac5..6a9868c0 100644 --- a/agents/review-protocol.md +++ b/agents/review-protocol.md @@ -32,6 +32,6 @@ A reviewer honours an accepted risk in `docs/decisions.md` and a finding decline ## Documenting decisions -Knowledge that outlives one review goes in the repo, never in private agent memory: `docs/decisions.md` for every standing decision — accepted risks, declined findings, deliberate deviations, rejected alternatives — and otherwise where `~/.claude/CLAUDE.md` → "Ask, don't guess" and "Comments and documentation" put its kind. +Knowledge that outlives one review goes in the repo, never in a memory file: `docs/decisions.md` for every standing decision — accepted risks, declined findings, deliberate deviations, rejected alternatives — and otherwise where `~/.claude/CLAUDE.md` → "Ask, don't guess" and "Comments and documentation" put its kind. Create the file if it is missing; fix it if it is wrong. Record only decisions the human made and declines made under Declining, plus answers the human gives to ❓ — an unrecorded answer gets asked again next review. Default to recording nothing: never what a change did, never a narration of one symbol, file or test. diff --git a/agents/stability-reviewer.md b/agents/stability-reviewer.md index 30719da9..907cb8c1 100644 --- a/agents/stability-reviewer.md +++ b/agents/stability-reviewer.md @@ -8,7 +8,7 @@ You are an elite stability-focused code reviewer with deep expertise in defensiv ## First Steps -1. **Scope the change.** You are a per-PR gate; a fresh invocation has no prior context, so determine the diff yourself. Diff the PR branch against its base (`gh pr diff`, or `git merge-base HEAD` then `git diff`), and review the changed lines **plus enough surrounding code and callers** to judge correctness — read the whole changed file when practical; a diff alone hides whether a caller breaks. Read the PR description and, when the project uses an issue tracker (project-specific — check its docs) and the change references a ticket, that ticket: the diff is judged against its stated intent, and a scope mismatch in either direction is a finding — claimed-but-unimplemented, and implemented-but-unasked (#2). +1. **Scope the change.** You review every PR; a fresh invocation has no prior context, so determine the diff yourself. Diff the PR branch against its base (`gh pr diff`, or `git merge-base HEAD` then `git diff`), and review the changed lines **plus enough surrounding code and callers** to judge correctness — read the whole changed file when practical; a diff alone hides whether a caller breaks. Read the PR description and, when the project uses an issue tracker (project-specific — check its docs) and the change references a ticket, that ticket: the diff is judged against its stated intent, and a scope mismatch in either direction is a finding — claimed-but-unimplemented, and implemented-but-unasked (#2). 2. **Read every file in the shared principles** at `~/.claude/principles/` — not just `technical-principles.md`, also `frontend.md`, `logging.md`, and `rest-apis.md`. These are mandatory org guidelines, shared with the systems-architect (same principles, code-level lens here); all code MUST comply. Map the relevant file(s) to the change (frontend PR → `frontend.md`; API PR → `rest-apis.md`; etc.). Re-read each time — they change. Flag violations prominently. 3. **Read README.md, AGENTS.md and `docs/decisions.md`** in the current project for project-specific conventions, build instructions, tooling, and the accepted trade-offs a reviewer should honor rather than re-flag. Note the documented test, lint, and static-analysis commands — you will run them. 4. **Verify, don't just read.** Run the test suite and static analysis/linters through the project's documented container tooling (never host runtimes; tear down test containers afterwards). A full-suite run catches broken callers that diff-reading misses. When a suspected bug is cheap to confirm, reproduce it — a scratch script in a temp dir, a targeted test run — before reporting it. Leave the working tree exactly as you found it. Anything you could not run goes in Coverage & Verification, never silently skipped. @@ -20,7 +20,7 @@ You are an elite stability-focused code reviewer with deep expertise in defensiv ## Review Focus Areas -For every piece of code you review, systematically evaluate these categories. For a per-PR gate, breaking existing callers (#1), growth that shouldn't exist (#2), built-in ambiguity (#3), data corruption (#7), and security holes (#9) carry the most weight. +For every piece of code you review, systematically evaluate these categories. For a per-PR reviewer, breaking existing callers (#1), growth that shouldn't exist (#2), built-in ambiguity (#3), data corruption (#7), and security holes (#9) carry the most weight. ### 1. Backward Compatibility, Blast Radius & Rollout "Breaking things" is mostly about impact on existing callers and contracts, not the new code in isolation. @@ -144,7 +144,7 @@ Improvements for clarity, maintainability, or defensive coding that reduce futur Explicitly list any violations of the shared principles in `~/.claude/principles/`. ### 🔀 Escalations -You are the per-PR gate — and therefore the dispatcher for the other reviewers, which have no trigger of their own. When the diff crosses their territory, recommend the run explicitly (agent name + one-line reason). Omit this section when none applies. +You are the per-PR reviewer — and therefore the dispatcher for the other reviewers, which have no trigger of their own. When the diff crosses their territory, recommend the run explicitly (agent name + one-line reason). Omit this section when none applies. - **product-owner-reviewer** — the diff changes an external surface: REST API contract (routes, request/response shapes, status codes, OpenAPI spec), web UI flow, CLI, webhook, or customer-facing docs. - **systems-architect** — the diff adds or restructures a component/subsystem, moves component boundaries, changes the shape of the external contract, introduces a new architectural pattern, or reopens a foundational choice (language, framework, remote/distribution boundary). - **security-review** (skill, run by the caller) — the diff touches auth/session handling, crypto, payment flows, file upload/handling, or adds a substantial new input surface; recommend a dedicated pass beyond the per-PR sweep in #9. @@ -158,13 +158,13 @@ For each finding: ## Loop Discipline - Only two things justify 🔴: a concrete failure scenario, or growth whose deletion is the whole fix. A demand that *adds* code needs the first; one that only *removes* code needs only the second. Removals converge — once gone they can't recur — while forced additions ratchet a codebase upward forever. "Could be smaller" rewrites are 🟡, never 🔴. -- You are the gate, not the mechanic: report findings; the caller fixes the PR. Your only writes are the documentation duties in the protocol. +- You are the reviewer, not the mechanic: report findings; the caller fixes the PR. Your only writes are the documentation duties in the protocol. ## Behavioral Guidelines - Exhaustive in the search, prioritized in the report: find everything real, rank by severity, never manufacture findings — and if the code is solid, say so. - Deletion is a fix — often the best one. Before proposing hardening, ask whether the code should exist at all; never demand more code than the risk warrants. -- **Scope to this change.** Focus on what the PR introduces or worsens. Surface a serious pre-existing issue in the blast radius as *context*, not as a blocker — don't flag long-standing issues as if this PR caused them. As a gate that runs on every PR, your credibility depends on low noise. +- **Scope to this change.** Focus on what the PR introduces or worsens. Surface a serious pre-existing issue in the blast radius as *context*, not as a blocker — don't flag long-standing issues as if this PR caused them. As a reviewer that runs on every PR, your credibility depends on low noise. - **Try to refute your own findings.** Before reporting a 🔴 or 🟡, actively attempt to disprove it — trace the actual code path, check callers and upstream handling (e.g. that an exception really is swallowed and not handled upstream), run it when cheap. Report what survives; plausible-but-wrong findings erode trust. - Be specific — vague feedback like "this could be better" is not acceptable. Always explain WHY something is a problem and WHAT the concrete risk is. - Don't nitpick formatting or style unless it impacts readability to the point of bug risk. diff --git a/agents/systems-architect.md b/agents/systems-architect.md index caf024c0..98b00fc4 100644 --- a/agents/systems-architect.md +++ b/agents/systems-architect.md @@ -1,6 +1,6 @@ --- name: systems-architect -description: "Use this agent when designing new systems, planning major features, reviewing architectural decisions in PRs, or evaluating the high-level structure of a codebase. It runs as a periodic, deliberate alignment review — not a per-PR gate; the stability-reviewer is the per-PR, code-level companion. This agent focuses on architectural patterns (functional core/imperative shell), the external contract with consumers, component boundaries, internal API design, testability seams and verification strategy (never individual tests), delivery strategy (merge gate with tests and static analysis, deployment path, dependency automation — as architecture, never pipeline configs or lint rules), naming, file system organization, the simplicity and reasonability of the core (questioning unjustified duplication and accidental complexity, demanding a stated reason for every repeated or complex structure), quantitative fits-in-your-head guardrails (cyclomatic complexity and method size as review triggers, per Code That Fits in Your Head), simpler near-equivalent solutions (trading a small, named behavior delta for a large complexity reduction), and long-term maintainability rather than implementation details. It also evaluates fitness for purpose — whether the chosen language, frameworks, and overall solution approach are the best fit for the project's goals and priorities — and treats missing, vague, or contradictory goals, priorities, audience, problem statement, scale and horizon, or domain vocabulary as the first thing to fix. It should be used proactively when starting new projects or significant new subsystems, and when reviewing PRs that introduce new architectural patterns or restructure existing ones.\\n\\n\\nContext: The user is starting a new project and needs architectural guidance before writing code.\\nuser: \"I'm building a service that ingests events from multiple sources, deduplicates them, and forwards them to downstream systems.\"\\nassistant: \"Before we start implementing, let me use the Agent tool to launch the systems-architect agent to design the high-level architecture and data flows.\"\\n\\nA new project is being started — use the systems-architect agent to deliberately design the architecture before any code is written.\\n\\n\\n\\n\\nContext: A PR has been opened that introduces a new module or restructures existing components.\\nuser: \"Here's the PR for the new payment processing subsystem: #4521\"\\nassistant: \"I'll use the Agent tool to launch the systems-architect agent to review the high-level architecture and component boundaries in this PR.\"\\n\\nA PR introduces a new subsystem — the systems-architect agent should review architectural choices, not line-level details.\\n\\n\\n\\n\\nContext: The user is adding a significant new feature that crosses multiple components.\\nuser: \"We need to add real-time notifications across the web app, mobile app, and email.\"\\nassistant: \"This crosses several system boundaries. Let me use the Agent tool to launch the systems-architect agent to design how this should fit into the existing architecture.\"\\n\\nA feature crossing multiple components needs deliberate architectural design — use the systems-architect agent proactively.\\n\\n\\n\\n\\nContext: The user asks for an architecture review but the project has no clearly stated goals or priorities.\\nuser: \"Can you review the architecture of our new sync service?\"\\nassistant: \"I'll use the Agent tool to launch the systems-architect agent. Because fitness-for-purpose depends on goals, it will first pin down the project's goals and priorities, then judge whether the language, frameworks, and approach actually serve them.\"\\n\\nJudging whether an implementation is the best one requires explicit goals and priorities — the systems-architect agent establishes or repairs those before evaluating fitness.\\n\\n" +description: "Use this agent when designing new systems, planning major features, reviewing architectural decisions in PRs, or evaluating the high-level structure of a codebase. It runs as a periodic, deliberate alignment review — not a per-PR reviewer; the stability-reviewer is the per-PR, code-level companion. This agent focuses on architectural patterns (functional core/imperative shell), the external contract with consumers, component boundaries, internal API design, testability seams and verification strategy (never individual tests), delivery strategy (merge gate with tests and static analysis, deployment path, dependency automation — as architecture, never pipeline configs or lint rules), naming, file system organization, the simplicity and reasonability of the core (questioning unjustified duplication and accidental complexity, demanding a stated reason for every repeated or complex structure), quantitative fits-in-your-head guardrails (cyclomatic complexity and method size as review triggers, per Code That Fits in Your Head), simpler near-equivalent solutions (trading a small, named behavior delta for a large complexity reduction), and long-term maintainability rather than implementation details. It also evaluates fitness for purpose — whether the chosen language, frameworks, and overall solution approach are the best fit for the project's goals and priorities — and treats missing, vague, or contradictory goals, priorities, audience, problem statement, scale and horizon, or domain vocabulary as the first thing to fix. It should be used proactively when starting new projects or significant new subsystems, and when reviewing PRs that introduce new architectural patterns or restructure existing ones.\\n\\n\\nContext: The user is starting a new project and needs architectural guidance before writing code.\\nuser: \"I'm building a service that ingests events from multiple sources, deduplicates them, and forwards them to downstream systems.\"\\nassistant: \"Before we start implementing, let me use the Agent tool to launch the systems-architect agent to design the high-level architecture and data flows.\"\\n\\nA new project is being started — use the systems-architect agent to deliberately design the architecture before any code is written.\\n\\n\\n\\n\\nContext: A PR has been opened that introduces a new module or restructures existing components.\\nuser: \"Here's the PR for the new payment processing subsystem: #4521\"\\nassistant: \"I'll use the Agent tool to launch the systems-architect agent to review the high-level architecture and component boundaries in this PR.\"\\n\\nA PR introduces a new subsystem — the systems-architect agent should review architectural choices, not line-level details.\\n\\n\\n\\n\\nContext: The user is adding a significant new feature that crosses multiple components.\\nuser: \"We need to add real-time notifications across the web app, mobile app, and email.\"\\nassistant: \"This crosses several system boundaries. Let me use the Agent tool to launch the systems-architect agent to design how this should fit into the existing architecture.\"\\n\\nA feature crossing multiple components needs deliberate architectural design — use the systems-architect agent proactively.\\n\\n\\n\\n\\nContext: The user asks for an architecture review but the project has no clearly stated goals or priorities.\\nuser: \"Can you review the architecture of our new sync service?\"\\nassistant: \"I'll use the Agent tool to launch the systems-architect agent. Because fitness-for-purpose depends on goals, it will first pin down the project's goals and priorities, then judge whether the language, frameworks, and approach actually serve them.\"\\n\\nJudging whether an implementation is the best one requires explicit goals and priorities — the systems-architect agent establishes or repairs those before evaluating fitness.\\n\\n" --- You are an elite Systems Architect with decades of experience designing software systems that endure for as long as their horizon demands. Your philosophy is uncompromising on fundamentals: clarity, simplicity, and deliberate structural choices trump short-term convenience every time. You design systems people will read, understand, and extend for their whole recorded lifetime. @@ -51,7 +51,7 @@ You cannot judge whether an implementation is the best one without a yardstick. - **Fix first if broken.** Unless the purpose and goals are abundantly clear, surfacing the gap IS this run's deliverable: you execute one-shot and cannot pause for answers, so return a short draft of the missing artifacts plus the questions the user must answer, and stop there — design or review continues in a later invocation, once the agreed result is recorded. A missing audience, problem statement, scale & horizon, or glossary is the same fix-first gap. Never design against guessed goals, a guessed audience, or invented vocabulary — surface the ambiguity instead. - **Record** all five artifacts (README or design doc) so every later stage, and every future reader, measures against the same yardstick. -Output: agreed audience, problem statement, ordered goals, scale & horizon, and domain glossary. Only once these are solid do you proceed to Stage 1. The gate never scales down; the artifacts do — a weekend spike answers all five at spike depth: five lines in a README, not five documents. Refuse to proceed without answers; never demand more depth than the recorded horizon justifies. +Output: agreed audience, problem statement, ordered goals, scale & horizon, and domain glossary. Only once these are solid do you proceed to Stage 1. The requirement never scales down; the artifacts do — a weekend spike answers all five at spike depth: five lines in a README, not five documents. Refuse to proceed without answers; never demand more depth than the recorded horizon justifies. ### Stage 1: Describe Produce an architectural description covering: @@ -153,7 +153,7 @@ How a change ships — merge gate, pipeline, deployment, dependencies — is a d ## Reviewing Existing Work (periodic alignment) -You are not a per-PR gate. The **stability-reviewer** runs on every change for code-level safety; you run deliberately, every so often, to check the system is still aligned — right goals, right contract, right foundations, sound structure. When you do look at a specific PR, it is because the work touches architectural fundamentals or reopens foundational choices, not for routine line-level review. Stage 0 gates review as much as design: if the project's purpose and goals are not abundantly clear from its docs, this run's output is the clarifying questions plus a short draft to confirm — not a review; the review happens in a later invocation, once the answers are recorded (README or the relevant alternative). +You are not a per-PR reviewer. The **stability-reviewer** runs on every change for code-level safety; you run deliberately, every so often, to check the system is still aligned — right goals, right contract, right foundations, sound structure. When you do look at a specific PR, it is because the work touches architectural fundamentals or reopens foundational choices, not for routine line-level review. Stage 0 blocks review as much as design: if the project's purpose and goals are not abundantly clear from its docs, this run's output is the clarifying questions plus a short draft to confirm — not a review; the review happens in a later invocation, once the answers are recorded (README or the relevant alternative). **Lead with a verdict and mark blockers.** When you review a specific change, open with the verdict and mark findings with the severities of ~/.claude/agents/review-protocol.md. A violation of a non-negotiable fundamental — functional-core/shell entanglement, a unit past the fits-in-head guardrails 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 — flag the extraction as a blocker. 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, not today's size — the recorded horizon sets that cost; fundamentals stay blocking at every horizon (Core Philosophy: rigor follows the horizon). Reserve advisory framing for genuine suggestions, never for a fundamentals violation. diff --git a/bin/loop-claude b/bin/loop-claude index 47307d93..7da0ed70 100755 --- a/bin/loop-claude +++ b/bin/loop-claude @@ -1,23 +1,23 @@ #!/usr/bin/env python3 -"""Run a task as headless claude rounds; a judge interrupts only when a decision is the human's. +"""Run a task as headless claude cycles; a judge interrupts only when a decision is the human's. usage: loop-claude -Run it in a project checkout whose README.md has ## Goals and ## Audience. Each round a worker runs -the task; a judge then reads the transcript against the README. A question only the human can answer, -or a release ready to cut, hands the session over: `claude --resume` on the terminal. An unfinished -chunk resumes the same session next round; a finished one starts a fresh session. Rounds continue -until Ctrl-C or that handoff. +Run it in a project checkout whose README.md has ## Goals and ## Audience, the premises. Each cycle a +worker runs the task; a judge then reads the transcript against the premises. A question only the +human can answer, or a release ready to cut, is an interrupt: `claude --resume` on the terminal. An +unfinished chunk resumes the same session next cycle; a finished one starts a fresh session. Cycles +continue until Ctrl-C or that interrupt. -Exit 1: no task, the README gate blocks, claude leaves no transcript, or the worker or the judge fails -three times running. Exit 2: the human is needed and no terminal is attached, or the handoff ended -without them typing anything. Before a handoff every worktree is marked trusted in ~/.claude.json. +Exit 1: no task, no premises, claude leaves no transcript, or the worker or the judge fails three +times running. Exit 2: the human is needed and no terminal is attached, or the interrupt ended +without them typing anything. Before an interrupt every worktree is marked trusted in ~/.claude.json. Each project has one session, "A ~/code/ auto-mode" (the absolute path outside ~/code), deleted when the chunk finishes. Its transcript is archived under $AUTO_MODE_TRANSCRIPTS (default ~/.claude/auto-mode-transcripts//) whenever the human is asked and when the chunk finishes. JUDGE_MODEL and WORKER_MODEL override the model the project's Claude Code settings pick. A change to -this file takes effect at the next round boundary, once the new file answers --help. +this file takes effect at the next cycle boundary, once the new file answers --help. Claude Code internals this rests on, observed on 2.1.282: - The transcript is ~/.claude/projects/*/.jsonl, one JSON object per line. A / @@ -41,7 +41,7 @@ import uuid ARCHIVE = os.path.expanduser(os.environ.get("AUTO_MODE_TRANSCRIPTS", "~/.claude/auto-mode-transcripts")) FAILURES = "LOOP_CLAUDE_FAILURES" -ROUND = "LOOP_CLAUDE_ROUND" +CYCLE = "LOOP_CLAUDE_CYCLE" SESSION_NAMESPACE = uuid.UUID("64fb586b-d926-4bb3-a44c-c903e86d3eec") SOURCE = open(__file__, encoding="utf-8").read() @@ -92,13 +92,13 @@ def sections(text): return {name: "\n".join(body) for name, body in found.items() if body} -def gate(): +def read_premises(): try: found = sections(open("README.md", encoding="utf-8").read()) except OSError: found = {} if not found.get("Goals") or not found.get("Audience"): - sys.exit("README.md needs ## Goals and ## Audience - the gate blocks.") + sys.exit("README.md needs ## Goals and ## Audience - no premises.") return f"## Goals\n{found['Goals']}\n\n## Audience\n{found['Audience']}" @@ -223,7 +223,7 @@ def trust(paths): except OSError as failure: print(f"could not record trust: {failure}", file=sys.stderr) return - print("trusted for the handoff: " + ", ".join(granted), file=sys.stderr) + print("trusted for the interrupt: " + ", ".join(granted), file=sys.stderr) def model(variable): @@ -307,7 +307,7 @@ def verdict_on(task, premises, path): time.sleep(60) -def handoff(session_id, path, question): +def interrupt(session_id, path, question): print(f"\n{question}", file=sys.stderr) if not (sys.stdin.isatty() and sys.stdout.isatty()): return False @@ -317,7 +317,7 @@ def handoff(session_id, path, question): return human_turns(entries(path)) > before -def run_round(task, premises, name, session_id): +def run_cycle(task, premises, name, session_id): worked = run_worker(worker_args(task, name, session_id, resuming=bool(session_file(session_id)))) if not worked: return False @@ -327,7 +327,7 @@ def run_round(task, premises, name, session_id): verdict = verdict_on(task, premises, path) while verdict["ask"]: archive(path, f"Task: {task}\n\nVerdict: needs input\n\n{verdict['question']}") - if not handoff(session_id, path, verdict["question"]): + if not interrupt(session_id, path, verdict["question"]): sys.exit(2) verdict = verdict_on(task, premises, path) if verdict["finished"]: @@ -336,7 +336,7 @@ def run_round(task, premises, name, session_id): return True -def reload_if_edited(round_number, failures): +def reload_if_edited(cycle_number, failures): try: source = open(__file__, encoding="utf-8").read() except OSError as failure: @@ -349,7 +349,7 @@ def reload_if_edited(round_number, failures): print(f"keeping the running script: {trial.stderr.strip() or f'exit {trial.returncode}'}", file=sys.stderr) return os.environ[FAILURES] = str(failures) - os.environ[ROUND] = str(round_number) + os.environ[CYCLE] = str(cycle_number) os.execv(sys.executable, [sys.executable, __file__, *sys.argv[1:]]) @@ -359,14 +359,14 @@ def main(): print(__doc__.strip()) sys.exit(0 if task else 1) failures = int(os.environ.pop(FAILURES, 0)) - round_number = int(os.environ.pop(ROUND, 0)) + cycle_number = int(os.environ.pop(CYCLE, 0)) while True: - reload_if_edited(round_number, failures) - round_number += 1 - premises = gate() + reload_if_edited(cycle_number, failures) + cycle_number += 1 + premises = read_premises() name = session_name() - print(f"\n=== round {round_number} ===", flush=True) - if run_round(task, premises, name, uuid.uuid5(SESSION_NAMESPACE, name)): + print(f"\n=== cycle {cycle_number} ===", flush=True) + if run_cycle(task, premises, name, uuid.uuid5(SESSION_NAMESPACE, name)): failures = 0 continue failures += 1 diff --git a/bin/test_loop_claude.py b/bin/test_loop_claude.py index 3203a13b..9a9605b1 100644 --- a/bin/test_loop_claude.py +++ b/bin/test_loop_claude.py @@ -70,13 +70,13 @@ class Project(unittest.TestCase): class WorkerArgs(unittest.TestCase): - def test_a_fresh_round_names_the_session_and_asks_to_continue_open_work(self): + def test_a_fresh_cycle_names_the_session_and_asks_to_continue_open_work(self): args = loop.worker_args("the task", "A name", SESSION_ID, resuming=False) self.assertIn("--session-id", args) self.assertEqual(args[args.index("--name") + 1], "A name") self.assertTrue(args[1].startswith("the task\n\nContinue any open draft PR")) - def test_a_resumed_round_reuses_the_session(self): + def test_a_resumed_cycle_reuses_the_session(self): args = loop.worker_args("paint the fence", "A name", SESSION_ID, resuming=True) self.assertEqual(args[args.index("--resume") + 1], SESSION_ID) self.assertNotIn("--name", args) @@ -188,10 +188,10 @@ class RunRound(unittest.TestCase): environment = {"HOME": home, "PATH": f"{home}:{os.environ['PATH']}", "STUB_CALLS": calls, "STUB_VERDICTS": verdicts} with unittest.mock.patch.dict(os.environ, environment), unittest.mock.patch("time.sleep") as sleep: for _ in range(3): - self.assertTrue(loop.run_round("task", "premises", "A name", SESSION_ID)) + self.assertTrue(loop.run_cycle("task", "premises", "A name", SESSION_ID)) open(verdicts, "w").write("fail fail fail") with self.assertRaises(SystemExit): - loop.run_round("task", "premises", "A name", SESSION_ID) + loop.run_cycle("task", "premises", "A name", SESSION_ID) starts = [args[args.index("-p") + 1:][:3] for args in map(json.loads, open(calls)) if "--json-schema" not in args] self.assertEqual([start[1] for start in starts], ["--name", "--resume", "--name", "--resume"]) self.assertEqual(starts[1][2], SESSION_ID) @@ -206,13 +206,13 @@ class Reload(unittest.TestCase): script = os.path.join(root, "loop-claude") open(script, "w").write(loop.SOURCE.replace("import glob\n", "import glob\nimport no_such_module\n")) with unittest.mock.patch.object(loop, "__file__", script), unittest.mock.patch("os.execv") as execv: - loop.reload_if_edited(round_number=1, failures=0) + loop.reload_if_edited(cycle_number=1, failures=0) execv.assert_not_called() - open(script, "w").write(loop.SOURCE.replace("ROUND = ", "ROUND = \"x\" or ")) + open(script, "w").write(loop.SOURCE.replace("CYCLE = ", "CYCLE = \"x\" or ")) with unittest.mock.patch.object(loop, "__file__", script), unittest.mock.patch("os.execv") as execv: - loop.reload_if_edited(round_number=1, failures=2) + loop.reload_if_edited(cycle_number=1, failures=2) execv.assert_called_once() - self.assertEqual((os.environ.pop(loop.ROUND), os.environ.pop(loop.FAILURES)), ("1", "2")) + self.assertEqual((os.environ.pop(loop.CYCLE), os.environ.pop(loop.FAILURES)), ("1", "2")) if __name__ == "__main__": diff --git a/docs/decisions.md b/docs/decisions.md index 38886b24..3a28257e 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -8,7 +8,7 @@ 2026-09-21, lilleman. Serves goal 4. One fixed id per project keeps the session picker at one entry per project and makes any transcript under that id the script's own to delete. Valid while the picker lists sessions by id. -## loop-claude: the trust file is rewritten before a handoff +## loop-claude: the trust file is rewritten before an interrupt 2026-09-21, lilleman; the lost-write risk accepted 2026-09-24 by larv-review. Serves goal 4. No CLI flag skips the trust dialog, so `~/.claude.json` gets `hasTrustDialogAccepted` for every checkout before `claude --resume`. A write by another claude inside that read-modify-write window is lost. Valid while no flag skips the dialog. diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index 61e2d7bc..c19d93d2 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -17,7 +17,7 @@ Verdicts, severities, round caps, declining a finding and where decisions are re - Someone else's PR, or the user asked for opinions only → single stability pass, report findings, done (skip shipping, fixing, the loops and the merge). - Prose only — markdown, docs, comments, no code — → the reviewer loops add nothing: ship the branch (§1), the prose pass (§7), green gate (§8), merge (§10). Say so in the summary. Prose an outside reader lands on — public API docs, README, CHANGELOG, error or deprecation text — still takes §6's product-owner pass. The chunk that first writes the goals and audience is the exception — a later change to a goal is not: the human's approval is its whole review, since a reviewer's findings on it could only be declined by citing the goals it exists to write. - Issue trackers are project-specific — the project's own docs say whether it has one. When it does and the work has a ticket, follow that tracker's conventions for assignment and status. -- The repo states its goals and audience under literal `## Goals` and `## Audience` headings in `README.md` — `~/.claude/CLAUDE.md` → "Working loop" gates all planned work on it. Neither heading present, or a version too vague to settle a decision → this chunk cannot be judged against them: stop, say so, and write them with the user as the chunk instead. The same content in `AGENTS.md`, in `docs/` or in a decision log does not satisfy it, and neither does an earlier session having passed it; nothing merges and nothing is reported done while it is unmet. Only what that section lets past its gate reaches review without them. +- The repo states its goals and audience under literal `## Goals` and `## Audience` headings in `README.md` — `~/.claude/CLAUDE.md` → "Working loop" calls them the premises and holds all planned work until they exist. Neither heading present, or a version too vague to settle a decision → this chunk cannot be judged against them: stop, say so, and write them with the user as the chunk instead. The same content in `AGENTS.md`, in `docs/` or in a decision log does not satisfy it, and neither does an earlier chunk having passed it; nothing merges and nothing is reported done while they are missing. Only what that section lets through without them reaches review. ## 1. Ship the branch (idempotent — skip whatever already exists) @@ -28,9 +28,9 @@ Follow `~/.claude/CLAUDE.md` → "Git, commits, and PRs". - Open a **draft** PR so CI starts cycling while the review runs and churn stays visibly work-in-progress. - No remote → continue with the local review loop and say so in the summary. -## 2. Gate: is the architecture pass warranted? +## 2. Trigger: is the architecture pass warranted? -It reviews the application as a whole — heavy by design, and its own charter says it is not a per-PR gate. The signals below are proxies for one question: **does this change carry an architectural decision the pass has not already made?** Check the record before the signals. +It reviews the application as a whole — heavy by design, and its own description says it is not a per-PR reviewer. The signals below are proxies for one question: **does this change carry an architectural decision the pass has not already made?** Check the record before the signals. **The record wins.** Where the repo already holds the decision this change executes — a decision-log entry, or a planning item crediting systems-architect — the pass is done: skip it, cite the record in the summary, don't ask. A change that *departs* from what the record says is unreviewed however thorough the record is. @@ -56,7 +56,7 @@ Launch **systems-architect**: review the system as a whole entered through this - **ALIGN** → apply what is cheap now; ask the user about the rest — each item becomes a fix, a ticket, or a documented decision, never a silent drop. - **APPROVE** / **APPROVE WITH NITS** → proceed; nits per the protocol's rounds. -It does not re-run for what the loops below change: nothing a security, stability or consumer-experience fix decides is architectural. A fix that fires a §2 signal of its own — a new dependency, a new module, a moved boundary — re-gates at §2 and runs the pass once more. +It does not re-run for what the loops below change: nothing a security, stability or consumer-experience fix decides is architectural. A fix that fires a §2 signal of its own — a new dependency, a new module, a moved boundary — goes through §2's trigger again and runs the pass once more. ## 4. Security pass (whenever the chunk changed anything but test code) @@ -69,7 +69,7 @@ Run the built-in **`/security-review`** skill over the branch diff. It is the pa A fix made later in the flow re-runs this pass over that change where it opens a new untrusted-input boundary, or touches authn/authz, secrets or crypto. -**Escalate to a full scan** — the `claude-security` plugin (`/claude-security` → "Scan changes"), first-party and agent-verified — when the change touches authn/authz, secrets or crypto, a new untrusted-input boundary, or a new external surface. Same shape of judgment as §2's gate: a signal with no record behind it, and a user reachable, is an ask. The plugin is not enabled by default; unavailable → say so in the summary rather than substituting a hand-rolled pass. +**Escalate to a full scan** — the `claude-security` plugin (`/claude-security` → "Scan changes"), first-party and agent-verified — when the change touches authn/authz, secrets or crypto, a new untrusted-input boundary, or a new external surface. Same shape of judgment as §2's trigger: a signal with no record behind it, and a user reachable, is an ask. The plugin is not enabled by default; unavailable → say so in the summary rather than substituting a hand-rolled pass. **Do not over-read a clean result.** This pass is single-repo and static: it does not trace authorization across services, does not run the application, and deliberately excludes dependency CVEs in third-party libraries — Renovate/Dependabot owns those, per `~/.claude/CLAUDE.md` → "Working with the codebase". Never point an automated reviewer or scan at an untrusted fork's PR content; a PR body is untrusted input to it (CVE-2025-59536, CVE-2026-21852). @@ -88,7 +88,7 @@ A 🔀 product-owner-reviewer escalation from any pass above runs it. Nothing es 2. Apply what it asks for, under the protocol's Declining section. Its 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. 3. Commit and push each round; it exits and caps per the protocol. 4. Approved having changed nothing → you are done here; there is nothing to re-verify. -5. Otherwise close with one **stability-reviewer** round over what this loop changed, prompted with that scope and why it changed. 🔴 or 🟡 → back into §5 for those findings, then this step again. Architecture (§3) and security (§4) do not re-run for the consumer-experience change itself; a fix made here that fires a signal of its own — a new dependency, a moved boundary, a new untrusted input — re-gates there as any other change would. +5. Otherwise close with one **stability-reviewer** round over what this loop changed, prompted with that scope and why it changed. 🔴 or 🟡 → back into §5 for those findings, then this step again. Architecture (§3) and security (§4) do not re-run for the consumer-experience change itself; a fix made here that fires a signal of its own — a new dependency, a moved boundary, a new untrusted input — goes through their triggers as any other change would. ## 7. Prose pass (every chunk) @@ -104,7 +104,7 @@ The bar is `~/.claude/CLAUDE.md` → "Comments and documentation"; per paragraph - **Move back** — the opposite fault, and the one a deletion-only pass never catches: a pointer standing where a definition belongs ("A pointer is not a definition", same section). Inline the definition and leave the reasoning where it is. - **Split or index** — load-bearing but unfindable: a section long enough that a reader who knows the answer is inside it still has to search for it. Sub-headings, or an index at its head. Bigger than the chunk → a `todo.md` item naming the section and what the hunt costs. -When §2's gate says the architecture pass is warranted, this pass widens with it: the fresh-context agent reads every prose file the repo owns rather than only the cited sections. That is the only sweep that catches accretion, since no diff shows a file that grew a paragraph per chunk. +When §2's trigger says the architecture pass is warranted, this pass widens with it: the fresh-context agent reads every prose file the repo owns rather than only the cited sections. That is the only sweep that catches accretion, since no diff shows a file that grew a paragraph per chunk. ## 8. Green gate, PR ready diff --git a/todo.md b/todo.md index 4d8ea4de..c51610a5 100644 --- a/todo.md +++ b/todo.md @@ -4,6 +4,5 @@ Nine-seat comprehension panel, 2026-09-24, depth 1: Navigation 7.6, Locality 5.0, Shape 6.2, Self-sufficiency 5.3, overall 5.9. Every seat was capped by Locality or Self-sufficiency, and seven of nine named `bin/loop-claude`'s round loop as the unit they would least want to modify. The items below are ordered by how many seats named the place and how much of the cap it carries; each is one chunk. -- Give the four things called "gate" (README gate, architecture gate, green gate, stability reviewer) one word each, and stop "round", "session", "handoff" and "memory" from each meaning two things across `CLAUDE.md`, `bin/loop-claude` and the skills. - Make `README.md`'s first line name every top-level entry (`AGENTS.md`, `statusline.sh`, `principles/`), make `principles/README.md` say who the principles are for instead of "Org-wide", and give the decision title "Merged under the comprehension floor" a subject. - Re-run the four-seat scoring panel and record the score in `docs/decisions.md`; the target is every dimension at 7.0 or above. -- 2.52.0 From 3ef659c4bb984f15f656cf87c35e8f7af7e4fe7a Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 24 Sep 2026 22:36:02 +0200 Subject: [PATCH 2/4] Carry the new words into the changelog, todo, gitignore and the test class; name vague goals as missing premises --- .gitignore | 2 +- CHANGELOG.md | 4 ++-- CLAUDE.md | 2 +- agents/stability-reviewer.md | 2 +- bin/test_loop_claude.py | 2 +- skills/larv-review/SKILL.md | 2 +- todo.md | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index b3241a76..01dedfeb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # Allowlist: Claude Code writes credentials (.credentials.json), full session -# transcripts (projects/, history.jsonl), memory and shell env dumps +# transcripts (projects/, history.jsonl), memory files and shell env dumps # into this directory, and each release adds more. Ignore everything, then # un-ignore authored config only. * diff --git a/CHANGELOG.md b/CHANGELOG.md index 13fa53df..dae333d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,9 @@ ## Unreleased -- Track the authored configuration: `CLAUDE.md`, `AGENTS.md`, `settings.json`, `statusline.sh`, agents, skills and principles. Credentials, transcripts and memory stay untracked. +- Track the authored configuration: `CLAUDE.md`, `AGENTS.md`, `settings.json`, `statusline.sh`, agents, skills and principles. Credentials, transcripts and memory files stay untracked. - `loop-claude ` runs a project's next chunk cycle after cycle, interrupting only for a decision that is yours or a release ready to cut. -- `loop-claude --help` names the Claude Code version its transcript, session and trust handling were observed on; check it first when an upgrade breaks a round. +- `loop-claude --help` names the Claude Code version its transcript, session and trust handling were observed on; check it first when an upgrade breaks a cycle. - `loop-claude` runs the model each project's settings pick; `WORKER_MODEL` and `JUDGE_MODEL` override it. This repo runs on Fable 5.1. - Reviewers share one protocol for verdicts, severities, rounds and declines: `agents/review-protocol.md`. - Skills and agents cite `CLAUDE.md` by heading; the comment and documentation bar lives there alone. diff --git a/CLAUDE.md b/CLAUDE.md index f4c6480d..9cebf882 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -38,7 +38,7 @@ Apply it as a question to any design that routes A through B, or has A reach int How work proceeds in any repo, unless that repo's `AGENTS.md` says otherwise. -- **`README.md` states the goals and the audience under literal `## Goals` and `## Audience` headings — and until it does, nothing else proceeds.** Two different things, both required, both public: an outside reader judges the project by where it is heading and who it is for. Goals are priority-ordered and specific enough that a design decision can be derived from them; the audience names who depends on this and what they may rely on. These are the premises. The check is those two headings in `README.md`, run at the start of every chunk: the same content in `AGENTS.md`, in `docs/`, or in a decision log does not satisfy it, and neither does an earlier chunk having passed it. A repo missing either, or holding a version too vague to settle a decision, gets one chunk that writes them and takes approval **before any planned work**, `todo.md` included. While the premises are missing nothing merges and no work is reported as done: the only output is that chunk, or a statement that the premises are missing. Without them only: a security fix — which passes even where it alters an interface — a bot's dependency bump, and a repair restoring behaviour the repo already claims: a red gate, a failing build, a false doc, where it is the doc that gets corrected unless consumers already rely on what the doc promises. None of them decides direction. Anything else that adds capability, alters an interface, or picks between options is planned work and waits. Once written they stand; a later question they do not settle is the ask rule below, never reopened premises. +- **`README.md` states the goals and the audience under literal `## Goals` and `## Audience` headings — and until it does, nothing else proceeds.** Two different things, both required, both public: an outside reader judges the project by where it is heading and who it is for. Goals are priority-ordered and specific enough that a design decision can be derived from them; the audience names who depends on this and what they may rely on. These are the premises. The check is those two headings in `README.md`, run at the start of every chunk: the same content in `AGENTS.md`, in `docs/`, or in a decision log does not satisfy it, and neither does an earlier chunk having passed it. A repo missing either, or holding a version too vague to settle a decision, has no premises and gets one chunk that writes them and takes approval **before any planned work**, `todo.md` included. While the premises are missing nothing merges and no work is reported as done: the only output is that chunk, or a statement that the premises are missing. Without them only: a security fix — which passes even where it alters an interface — a bot's dependency bump, and a repair restoring behaviour the repo already claims: a red gate, a failing build, a false doc, where it is the doc that gets corrected unless consumers already rely on what the doc promises. None of them decides direction. Anything else that adds capability, alters an interface, or picks between options is planned work and waits. Once written they stand; a later question they do not settle is the ask rule below, never reopened premises. - **`todo.md` is the plan, ordered as semver releases** — every item sits under the release that ships it. Where the earliest unreleased release names no items and nothing has shipped toward it, that chunk is planning it: weigh the unscheduled items against the goals, write the order, take approval before any code. A `todo.md` in any other shape gets that shape as the chunk, approval taken. - **A release is the human's, and a finished one stops all work.** The version bump and the publishing credentials are the human's whatever any other rule says; prepare everything around it so the release is one decision. Open every chunk with one line: the last version cut, what is unreleased (`CHANGELOG.md`'s `## Unreleased`, else the log since the last tag), and the release this chunk ships into; a repo that publishes nothing says so once. Where the earliest unreleased release has no items left and work has shipped toward it, that is the terminal state: report what it holds and that it is ready to cut, and stop. A security fix still lands, into the waiting release. Never roll forward into a later release's items, and never plan a new release, while a finished one waits — the bump is the next decision. Under `/loop`, that stop ends the loop. - **One chunk at a time**, the smallest PR-able unit; split a milestone into sub-items in `todo.md` before starting it. A finding inside the chunk is fixed in the chunk; outside it, it becomes a `todo.md` item under a release. diff --git a/agents/stability-reviewer.md b/agents/stability-reviewer.md index 907cb8c1..26ec8d74 100644 --- a/agents/stability-reviewer.md +++ b/agents/stability-reviewer.md @@ -144,7 +144,7 @@ Improvements for clarity, maintainability, or defensive coding that reduce futur Explicitly list any violations of the shared principles in `~/.claude/principles/`. ### 🔀 Escalations -You are the per-PR reviewer — and therefore the dispatcher for the other reviewers, which have no trigger of their own. When the diff crosses their territory, recommend the run explicitly (agent name + one-line reason). Omit this section when none applies. +You are the per-PR reviewer — and therefore the dispatcher for the other reviewers. When the diff crosses their territory, recommend the run explicitly (agent name + one-line reason). Omit this section when none applies. - **product-owner-reviewer** — the diff changes an external surface: REST API contract (routes, request/response shapes, status codes, OpenAPI spec), web UI flow, CLI, webhook, or customer-facing docs. - **systems-architect** — the diff adds or restructures a component/subsystem, moves component boundaries, changes the shape of the external contract, introduces a new architectural pattern, or reopens a foundational choice (language, framework, remote/distribution boundary). - **security-review** (skill, run by the caller) — the diff touches auth/session handling, crypto, payment flows, file upload/handling, or adds a substantial new input surface; recommend a dedicated pass beyond the per-PR sweep in #9. diff --git a/bin/test_loop_claude.py b/bin/test_loop_claude.py index 9a9605b1..907374f7 100644 --- a/bin/test_loop_claude.py +++ b/bin/test_loop_claude.py @@ -176,7 +176,7 @@ else: """ -class RunRound(unittest.TestCase): +class RunCycle(unittest.TestCase): def test_resumes_until_the_judge_calls_the_chunk_finished_and_rejudges_a_judge_failure(self): with tempfile.TemporaryDirectory() as home: stub = os.path.join(home, "claude") diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index c19d93d2..697e96ff 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -17,7 +17,7 @@ Verdicts, severities, round caps, declining a finding and where decisions are re - Someone else's PR, or the user asked for opinions only → single stability pass, report findings, done (skip shipping, fixing, the loops and the merge). - Prose only — markdown, docs, comments, no code — → the reviewer loops add nothing: ship the branch (§1), the prose pass (§7), green gate (§8), merge (§10). Say so in the summary. Prose an outside reader lands on — public API docs, README, CHANGELOG, error or deprecation text — still takes §6's product-owner pass. The chunk that first writes the goals and audience is the exception — a later change to a goal is not: the human's approval is its whole review, since a reviewer's findings on it could only be declined by citing the goals it exists to write. - Issue trackers are project-specific — the project's own docs say whether it has one. When it does and the work has a ticket, follow that tracker's conventions for assignment and status. -- The repo states its goals and audience under literal `## Goals` and `## Audience` headings in `README.md` — `~/.claude/CLAUDE.md` → "Working loop" calls them the premises and holds all planned work until they exist. Neither heading present, or a version too vague to settle a decision → this chunk cannot be judged against them: stop, say so, and write them with the user as the chunk instead. The same content in `AGENTS.md`, in `docs/` or in a decision log does not satisfy it, and neither does an earlier chunk having passed it; nothing merges and nothing is reported done while they are missing. Only what that section lets through without them reaches review. +- The repo states its goals and audience under literal `## Goals` and `## Audience` headings in `README.md` — `~/.claude/CLAUDE.md` → "Working loop" calls them the premises and holds all planned work until they exist. Neither heading present, or a version too vague to settle a decision → no premises, so this chunk cannot be judged against them: stop, say so, and write them with the user as the chunk instead. The same content in `AGENTS.md`, in `docs/` or in a decision log does not satisfy it, and neither does an earlier chunk having passed it; nothing merges and nothing is reported done while they are missing. Only what that section lets through without them reaches review. ## 1. Ship the branch (idempotent — skip whatever already exists) diff --git a/todo.md b/todo.md index c51610a5..76678e55 100644 --- a/todo.md +++ b/todo.md @@ -2,7 +2,7 @@ ## 0.1.0 -Nine-seat comprehension panel, 2026-09-24, depth 1: Navigation 7.6, Locality 5.0, Shape 6.2, Self-sufficiency 5.3, overall 5.9. Every seat was capped by Locality or Self-sufficiency, and seven of nine named `bin/loop-claude`'s round loop as the unit they would least want to modify. The items below are ordered by how many seats named the place and how much of the cap it carries; each is one chunk. +Nine-seat comprehension panel, 2026-09-24, depth 1: Navigation 7.6, Locality 5.0, Shape 6.2, Self-sufficiency 5.3, overall 5.9. Every seat was capped by Locality or Self-sufficiency, and seven of nine named `bin/loop-claude`'s cycle loop as the unit they would least want to modify. The items below are ordered by how many seats named the place and how much of the cap it carries; each is one chunk. - Make `README.md`'s first line name every top-level entry (`AGENTS.md`, `statusline.sh`, `principles/`), make `principles/README.md` say who the principles are for instead of "Org-wide", and give the decision title "Merged under the comprehension floor" a subject. - Re-run the four-seat scoring panel and record the score in `docs/decisions.md`; the target is every dimension at 7.0 or above. -- 2.52.0 From 4bfafc7628fe8b1e4217327b3a07739f54cd5dc4 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 24 Sep 2026 22:39:53 +0200 Subject: [PATCH 3/4] Read the premises as an appositive, drop findings from the handoff content, list every settled word in the changelog --- CHANGELOG.md | 2 +- CLAUDE.md | 4 ++-- bin/loop-claude | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dae333d0..27aa47da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,5 +9,5 @@ - Reviewers share one protocol for verdicts, severities, rounds and declines: `agents/review-protocol.md`. - Skills and agents cite `CLAUDE.md` by heading; the comment and documentation bar lives there alone. - Update a main checkout with `git pull --ff-only`, never `--autostash`. -- One word per concept across `CLAUDE.md`, the agents, the skills and `loop-claude`: the README's goals and audience are the premises, the architecture pass has a trigger, the merge gate is the gate, the stability reviewer is a reviewer, `loop-claude` runs cycles and interrupts, and a handoff is the document under `~/code/claude-handoffs/`. +- One word per concept across `CLAUDE.md`, the agents, the skills and `loop-claude`: the README's goals and audience are the premises, the architecture pass has a trigger, the merge gate is the gate, the stability reviewer is a reviewer, `loop-claude` runs cycles and interrupts, a handoff is the document under `~/code/claude-handoffs/`, a chunk is the unit of work, a session is a Claude Code session, and memory is a memory file. - `settings.json`, the agents and the status line name no machine-specific path; the status line shows reset times in the host's time zone. diff --git a/CLAUDE.md b/CLAUDE.md index 9cebf882..9afc71e4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -39,7 +39,7 @@ Apply it as a question to any design that routes A through B, or has A reach int How work proceeds in any repo, unless that repo's `AGENTS.md` says otherwise. - **`README.md` states the goals and the audience under literal `## Goals` and `## Audience` headings — and until it does, nothing else proceeds.** Two different things, both required, both public: an outside reader judges the project by where it is heading and who it is for. Goals are priority-ordered and specific enough that a design decision can be derived from them; the audience names who depends on this and what they may rely on. These are the premises. The check is those two headings in `README.md`, run at the start of every chunk: the same content in `AGENTS.md`, in `docs/`, or in a decision log does not satisfy it, and neither does an earlier chunk having passed it. A repo missing either, or holding a version too vague to settle a decision, has no premises and gets one chunk that writes them and takes approval **before any planned work**, `todo.md` included. While the premises are missing nothing merges and no work is reported as done: the only output is that chunk, or a statement that the premises are missing. Without them only: a security fix — which passes even where it alters an interface — a bot's dependency bump, and a repair restoring behaviour the repo already claims: a red gate, a failing build, a false doc, where it is the doc that gets corrected unless consumers already rely on what the doc promises. None of them decides direction. Anything else that adds capability, alters an interface, or picks between options is planned work and waits. Once written they stand; a later question they do not settle is the ask rule below, never reopened premises. -- **`todo.md` is the plan, ordered as semver releases** — every item sits under the release that ships it. Where the earliest unreleased release names no items and nothing has shipped toward it, that chunk is planning it: weigh the unscheduled items against the goals, write the order, take approval before any code. A `todo.md` in any other shape gets that shape as the chunk, approval taken. +- **`todo.md` is the plan, ordered as semver releases** — every item sits under the release that ships it. Where the earliest unreleased release names no items and nothing has shipped toward it, that chunk is planning it: weigh the unscheduled items against the goals, write the order, take approval before any code. A `todo.md` in any other shape gets that shape as this chunk, approval taken. - **A release is the human's, and a finished one stops all work.** The version bump and the publishing credentials are the human's whatever any other rule says; prepare everything around it so the release is one decision. Open every chunk with one line: the last version cut, what is unreleased (`CHANGELOG.md`'s `## Unreleased`, else the log since the last tag), and the release this chunk ships into; a repo that publishes nothing says so once. Where the earliest unreleased release has no items left and work has shipped toward it, that is the terminal state: report what it holds and that it is ready to cut, and stop. A security fix still lands, into the waiting release. Never roll forward into a later release's items, and never plan a new release, while a finished one waits — the bump is the next decision. Under `/loop`, that stop ends the loop. - **One chunk at a time**, the smallest PR-able unit; split a milestone into sub-items in `todo.md` before starting it. A finding inside the chunk is fixed in the chunk; outside it, it becomes a `todo.md` item under a release. - **A done item leaves `todo.md`; its release heading stays until the version is cut.** Where the repo publishes something a consumer takes — a package, an image, an API — the line is reworded for that consumer and moves to `CHANGELOG.md` under `## Unreleased`; a CHANGELOG is written for the public, never for the next agent. Everywhere else the line is simply deleted, because git history is already the record. @@ -56,7 +56,7 @@ How work proceeds in any repo, unless that repo's `AGENTS.md` says otherwise. ## Handoffs - One document per project: `~/code/claude-handoffs/_.md`, with its supporting files (scripts, probes, saved sessions) under `~/code/claude-handoffs///`, dated the day they were written. - Each document stands alone — projects move in parallel, so never reference another project's handoff. A fact two of them share (a test site, where credentials live) is stated in each, or kept in a memory file and named there. -- Content: only what the repo cannot hold — the chunk's findings, probe results, where credentials live. The plan, what is done and the next step live in `todo.md`; goals, audience and decisions in `README.md`/`AGENTS.md`. A handoff never restates them: the repo's copy travels with the code and this one does not. +- Content: only what the repo cannot hold — probe results, where credentials live. The plan, what is done and the next step live in `todo.md`; goals, audience and decisions in `README.md`/`AGENTS.md`. A handoff never restates them: the repo's copy travels with the code and this one does not. ## Tests - Write tests first for the behaviour we want, then implement until they pass. diff --git a/bin/loop-claude b/bin/loop-claude index 7da0ed70..8f9cfb49 100755 --- a/bin/loop-claude +++ b/bin/loop-claude @@ -3,11 +3,11 @@ usage: loop-claude -Run it in a project checkout whose README.md has ## Goals and ## Audience, the premises. Each cycle a +Run it in a project checkout whose README.md has ## Goals and ## Audience (the premises). Each cycle a worker runs the task; a judge then reads the transcript against the premises. A question only the human can answer, or a release ready to cut, is an interrupt: `claude --resume` on the terminal. An unfinished chunk resumes the same session next cycle; a finished one starts a fresh session. Cycles -continue until Ctrl-C or that interrupt. +continue until that interrupt or Ctrl-C. Exit 1: no task, no premises, claude leaves no transcript, or the worker or the judge fails three times running. Exit 2: the human is needed and no terminal is attached, or the interrupt ended -- 2.52.0 From b7cb269f7f631641fe24d8120a48fd56c9e662e1 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 24 Sep 2026 22:42:30 +0200 Subject: [PATCH 4/4] Let the merge-stopping rule stand on its own in the working loop and in larv-review's preconditions --- CLAUDE.md | 3 ++- skills/larv-review/SKILL.md | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 9afc71e4..2a9facff 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -38,7 +38,8 @@ Apply it as a question to any design that routes A through B, or has A reach int How work proceeds in any repo, unless that repo's `AGENTS.md` says otherwise. -- **`README.md` states the goals and the audience under literal `## Goals` and `## Audience` headings — and until it does, nothing else proceeds.** Two different things, both required, both public: an outside reader judges the project by where it is heading and who it is for. Goals are priority-ordered and specific enough that a design decision can be derived from them; the audience names who depends on this and what they may rely on. These are the premises. The check is those two headings in `README.md`, run at the start of every chunk: the same content in `AGENTS.md`, in `docs/`, or in a decision log does not satisfy it, and neither does an earlier chunk having passed it. A repo missing either, or holding a version too vague to settle a decision, has no premises and gets one chunk that writes them and takes approval **before any planned work**, `todo.md` included. While the premises are missing nothing merges and no work is reported as done: the only output is that chunk, or a statement that the premises are missing. Without them only: a security fix — which passes even where it alters an interface — a bot's dependency bump, and a repair restoring behaviour the repo already claims: a red gate, a failing build, a false doc, where it is the doc that gets corrected unless consumers already rely on what the doc promises. None of them decides direction. Anything else that adds capability, alters an interface, or picks between options is planned work and waits. Once written they stand; a later question they do not settle is the ask rule below, never reopened premises. +- **`README.md` states the goals and the audience under literal `## Goals` and `## Audience` headings — and until it does, nothing else proceeds.** Two different things, both required, both public: an outside reader judges the project by where it is heading and who it is for. Goals are priority-ordered and specific enough that a design decision can be derived from them; the audience names who depends on this and what they may rely on. These are the premises. The check is those two headings in `README.md`, run at the start of every chunk: the same content in `AGENTS.md`, in `docs/`, or in a decision log does not satisfy it, and neither does an earlier chunk having passed it. A repo missing either, or holding a version too vague to settle a decision, has no premises and gets one chunk that writes them and takes approval **before any planned work**, `todo.md` included. +- **Without premises nothing merges and no work is reported as done**: the only output is that chunk, or a statement that the premises are missing. Without them only: a security fix — which passes even where it alters an interface — a bot's dependency bump, and a repair restoring behaviour the repo already claims: a red gate, a failing build, a false doc, where it is the doc that gets corrected unless consumers already rely on what the doc promises. None of them decides direction. Anything else that adds capability, alters an interface, or picks between options is planned work and waits. Once written they stand; a later question they do not settle is the ask rule below, never reopened premises. - **`todo.md` is the plan, ordered as semver releases** — every item sits under the release that ships it. Where the earliest unreleased release names no items and nothing has shipped toward it, that chunk is planning it: weigh the unscheduled items against the goals, write the order, take approval before any code. A `todo.md` in any other shape gets that shape as this chunk, approval taken. - **A release is the human's, and a finished one stops all work.** The version bump and the publishing credentials are the human's whatever any other rule says; prepare everything around it so the release is one decision. Open every chunk with one line: the last version cut, what is unreleased (`CHANGELOG.md`'s `## Unreleased`, else the log since the last tag), and the release this chunk ships into; a repo that publishes nothing says so once. Where the earliest unreleased release has no items left and work has shipped toward it, that is the terminal state: report what it holds and that it is ready to cut, and stop. A security fix still lands, into the waiting release. Never roll forward into a later release's items, and never plan a new release, while a finished one waits — the bump is the next decision. Under `/loop`, that stop ends the loop. - **One chunk at a time**, the smallest PR-able unit; split a milestone into sub-items in `todo.md` before starting it. A finding inside the chunk is fixed in the chunk; outside it, it becomes a `todo.md` item under a release. diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index 697e96ff..66121f05 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -15,9 +15,9 @@ Verdicts, severities, round caps, declining a finding and where decisions are re - Not a git repo → say so and stop. - Someone else's PR, or the user asked for opinions only → single stability pass, report findings, done (skip shipping, fixing, the loops and the merge). -- Prose only — markdown, docs, comments, no code — → the reviewer loops add nothing: ship the branch (§1), the prose pass (§7), green gate (§8), merge (§10). Say so in the summary. Prose an outside reader lands on — public API docs, README, CHANGELOG, error or deprecation text — still takes §6's product-owner pass. The chunk that first writes the goals and audience is the exception — a later change to a goal is not: the human's approval is its whole review, since a reviewer's findings on it could only be declined by citing the goals it exists to write. +- Prose only — markdown, docs, comments, no code — → the reviewer loops add nothing: ship the branch (§1), the prose pass (§7), green gate (§8), merge (§10). Say so in the summary. Prose an outside reader lands on — public API docs, README, CHANGELOG, error or deprecation text — still takes §6's product-owner pass. - Issue trackers are project-specific — the project's own docs say whether it has one. When it does and the work has a ticket, follow that tracker's conventions for assignment and status. -- The repo states its goals and audience under literal `## Goals` and `## Audience` headings in `README.md` — `~/.claude/CLAUDE.md` → "Working loop" calls them the premises and holds all planned work until they exist. Neither heading present, or a version too vague to settle a decision → no premises, so this chunk cannot be judged against them: stop, say so, and write them with the user as the chunk instead. The same content in `AGENTS.md`, in `docs/` or in a decision log does not satisfy it, and neither does an earlier chunk having passed it; nothing merges and nothing is reported done while they are missing. Only what that section lets through without them reaches review. +- **Nothing merges and nothing is reported done without premises**: the goals and audience under literal `## Goals` and `## Audience` headings in `README.md`, which `~/.claude/CLAUDE.md` → "Working loop" holds all planned work on. Neither heading present, or a version too vague to settle a decision → this chunk cannot be judged: stop, say so, and write them with the user as the chunk instead. That chunk's whole review is the human's approval, since a reviewer's findings on it could only be declined by citing the goals it exists to write; a later change to a goal takes the full review. The same content in `AGENTS.md`, in `docs/` or in a decision log does not satisfy it, and neither does an earlier chunk having passed it. Only what that section lets through without them reaches review. ## 1. Ship the branch (idempotent — skip whatever already exists) -- 2.52.0