From fb4f8161cbbbb0337b7e8972eced45e2395f6ba3 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 16 Oct 2026 07:07:12 +0200 Subject: [PATCH] =?UTF-8?q?Answer=20prose=20round=201:=200=20=F0=9F=94=B4,?= =?UTF-8?q?=203=20=F0=9F=9F=A1;=20say=20what=20the=20rule=20checks=20and?= =?UTF-8?q?=20what=20the=20decision=20question=20names,=20and=20tighten=20?= =?UTF-8?q?the=20help=20and=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/loop_claude/cycle/interrupt.py | 2 +- bin/model_routing/ladder.py | 2 +- bin/rule_hook/main.py | 2 +- bin/rule_hook/reviewer_rung.py | 2 +- bin/rule_hook/rules.py | 4 ++-- skills/larv-review/SKILL.md | 2 +- todo.md | 10 +++++----- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bin/loop_claude/cycle/interrupt.py b/bin/loop_claude/cycle/interrupt.py index c9dde9b3..9408f0fc 100644 --- a/bin/loop_claude/cycle/interrupt.py +++ b/bin/loop_claude/cycle/interrupt.py @@ -30,7 +30,7 @@ def interrupt(root: str, session_id: uuid.UUID, worker: Rung, path: str, questio def hand_over(rung: Rung, args: list[str], root: str, paths: Paths, env: dict[str, str], effects: Effects) -> Failure | None: - """Runs claude on the terminal in root on rung with env added to its environment, the checkout and each of its worktrees first marked trusted; the failure is why claude could not start.""" + """Marks the checkout and each of its worktrees trusted, then runs claude on the terminal in root, on rung, with env added to its environment; the failure is why claude could not start.""" trust(paths.claude_json, worktrees(root, effects)) try: effects.claude_on_terminal([*rung.flags(), "--permission-mode", "bypassPermissions", *args], root, env) diff --git a/bin/model_routing/ladder.py b/bin/model_routing/ladder.py index 0d7593b5..dbddeb89 100644 --- a/bin/model_routing/ladder.py +++ b/bin/model_routing/ladder.py @@ -34,7 +34,7 @@ class Rung: return Rung(model, effort) return Rung(family.model, effort) if effort else family - # The one spelling of a rung. The archive and the worker's environment store it, and parse reads it back, so a change re-routes archived chunks. + # The one spelling of a rung. The archive and the worker's environment store it, and parse reads it back. Changing it routes every archived chunk afresh, since parse no longer reads their rungs. def __str__(self) -> str: return f"{self.model} at {self.effort} effort" if self.effort else self.model diff --git a/bin/rule_hook/main.py b/bin/rule_hook/main.py index 39b6319a..8b3d72ef 100644 --- a/bin/rule_hook/main.py +++ b/bin/rule_hook/main.py @@ -8,7 +8,7 @@ subagent. The rules: {rules} -A file a Bash command writes, such as through `cat > Dockerfile`, is not checked. An Agent call takes no override. +A file a Bash command writes, such as through `cat > Dockerfile`, is not checked. The reviewer-rung rule takes no override. A call overrides a rule with `# rule-override : `: diff --git a/bin/rule_hook/reviewer_rung.py b/bin/rule_hook/reviewer_rung.py index d150efc1..27cd85e8 100644 --- a/bin/rule_hook/reviewer_rung.py +++ b/bin/rule_hook/reviewer_rung.py @@ -1,4 +1,4 @@ -"""Hold each Agent call that launches a review to the rung loop-claude hands its worker: docs/decisions.md → `routing:`.""" +"""Refuse an Agent call that launches a review below the rung it needs, worked out from the two rungs loop-claude hands its worker: docs/decisions.md → `routing:`.""" import pathlib import typing diff --git a/bin/rule_hook/rules.py b/bin/rule_hook/rules.py index 17631129..75a17154 100644 --- a/bin/rule_hook/rules.py +++ b/bin/rule_hook/rules.py @@ -14,7 +14,7 @@ RuleName = typing.Literal["action-pin", "commit-one-line", "ignorefile-sorted", class Rule: holds: str checked: str - # False where no marker can waive the rule, since its call's text is not scanned for one. + # False where no marker waives the rule: overrides() grants none for it. overridable: bool = True @@ -42,7 +42,7 @@ RULES: dict[RuleName, Rule] = { # A rung is not a judgment call, and the refusal names the arguments to pass, so no marker waives it. "reviewer-rung": Rule( "a reviewer, a comprehension seat or the security pass's subagent runs on the rung loop-claude names for it: the project's rung, or for a reviewer the worker's rung where that is higher, so a worker below the project's rung cannot hand a review to its own cheaper model", - "an Agent call that launches a reviewer type, a comprehension seat, or the security pass, whose prompt opens with the sentence larv-review's Security section sets, in a worker loop-claude started", + "an Agent call, in a claude loop-claude started, whose subagent type is an agent under agents/, or whose prompt opens with seat-prompts.md's opening sentence or the one larv-review's Security section sets", overridable=False, ), "round-title-counts": Rule( diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index 771c91d2..70625d6e 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -122,7 +122,7 @@ The comprehension check records how hard the project is to read, and blocks no m ### Security -`/security-review` over the branch diff is the pass of record, except where the full scan runs on the same change and replaces it. Where the full scan fires but does not run — skipped on a precedent, declined at its cost prompt, or unavailable — `/security-review` runs. Launch a general-purpose subagent that invokes it through the Skill tool, edits nothing, and replies with the skill's report, or that the skill is unavailable. Open its prompt, and that of any subagent that runs the full scan, with `You are the security pass for this chunk.`: rule-hook reads that sentence as a security launch. Invoked in your own context, the skill ends your turn on that report. +`/security-review` over the branch diff is the pass of record, except where the full scan runs on the same change and replaces it. Where the full scan fires but does not run — skipped on a precedent, declined at its cost prompt, or unavailable — `/security-review` runs. Launch a general-purpose subagent that invokes it through the Skill tool, edits nothing, and replies with the skill's report, or that the skill is unavailable. Invoked in your own context, the skill ends your turn on that report. Open its prompt, and that of any subagent that runs the full scan, with `You are the security pass for this chunk.`: rule-hook reads that sentence as a security launch. A verified HIGH inside this chunk's blast radius is fixed here, outside it on its own branch and PR with this chunk waiting behind it. Say which. diff --git a/todo.md b/todo.md index 72ad0a99..aba65258 100644 --- a/todo.md +++ b/todo.md @@ -12,7 +12,7 @@ | ID | Release | Blocked by | Exempt | Item | R | S | C | Moves | Score | |---|---|---|---|---|---|---|---|---|---| -| 166 | 0.2.0 | | question | **Decide whether `docs/decisions.md` → `routing:` names rule-hook's refusal of a review launched below its rung.** | 1 | 1 | 1 | 1.2 by 3 | 4.4 | +| 166 | 0.2.0 | | question | **Decide whether `docs/decisions.md` names rule-hook's refusal of a review launched below its rung, in `routing:` and in `rule-hook:`.** | 1 | 1 | 1 | 1.2 by 3 | 4.4 | | 146 | 0.2.0 | | decision | **Score R as L + E + I − 2 from anchored levels, at least 7 at I5 and 5 at I4, with L, E and I in their own columns and `rank_todo.py` computing R, drop C, and route a task's model and effort on its R alone.** | 6 | 7 | 7 | 1.1 by 8, 1.2 by 8, 1.4 by 8 | 2.8 | | 152 | 0.2.0 | 146 | decision | **Anchor each score level in `rules/todo-items.md` with words, and each project's with two or three items it shipped, and have a scorer compare a new item against them.** | 2 | 4 | 3 | 1.1 by 7 | 6.4 | | 50 | 0.2.0 | | principle | **Grant the bench's runs only the tools a review needs, in place of skipping every permission.** | 2 | 2 | 3 | 1.1 by 3 | 5.5 | @@ -41,7 +41,7 @@ | 157 | 0.3.0 | | | **Split `docs/decisions.md` → `todo.md: one table of items …`'s 2026-10-02 paragraph into one paragraph per choice.** | 1 | 2 | 1 | 1.1 by 4, 1.4 by 4 | 10.9 | | 106 | 0.3.0 | | | **Make larv-review's "Do not over-read a clean result" cite a rule that says Renovate or Dependabot owns dependency CVEs, or drop the citation.** | 1 | 1 | 1 | 1.1 by 5 | 10.9 | | 165 | 0.3.0 | | | **Make this repo's tests assert the facts a prompt or help text carries in place of its sentences, and drop the tests that scan source or assert a constant.** | 2 | 3 | 2 | 1.1 by 4, 1.4 by 3 | 7.5 | -| 167 | 0.3.0 | | | **Hold a `/security-review` or `/claude-security` run in the worker's own context to the rung the security pass runs on, as rule-hook holds an Agent call that launches one.** | 2 | 2 | 3 | 1.1 by 4 | 7.3 | +| 167 | 0.3.0 | | | **Refuse a `/security-review` or `/claude-security` Skill call below the project's rung, as rule-hook refuses such an Agent call.** | 2 | 2 | 3 | 1.1 by 4 | 7.3 | | 162 | 0.3.0 | | owner | **Script each step that 0.2.0's chunks repeated by hand and a program can compute, filing one item per step, and file this audit again for the next release.** | 1 | 2 | 3 | 1.4 by 4, 1.5 by 4 | 6.6 | | 139 | 0.4.0 | | | **Split `bin/routing_figures/measure.py` by concern, and keep the figures' measured cycle and each raised call as fields loop-claude reads back, not as the prose it renders.** | 2 | 3 | 3 | 1.1 by 5, 1.4 by 5 | 10.3 | | 158 | 0.4.0 | | decision | **Measure the fixed cost of a chunk from loop-claude's archive, in tokens and hours against its items' S, and set F in `Score = 100 * V / (2**S + F)` to it.** | 1 | 3 | 4 | 1.1 by 5, 1.4 by 5 | 10.3 | @@ -81,9 +81,9 @@ ## Details -### 166. Decide whether `docs/decisions.md` → `routing:` names rule-hook's refusal of a review launched below its rung. +### 166. Decide whether `docs/decisions.md` names rule-hook's refusal of a review launched below its rung, in `routing:` and in `rule-hook:`. -Item 163 (PR #295) has rule-hook refuse a review launch below the rung loop-claude gives its worker. The routing decision still says loop-claude's prompt has the worker launch reviewers, comprehension seats and the security pass on the project's rung, and does not name the hook. Recommendation: amend that paragraph to say rule-hook refuses a launch below the rung too. The decision was held before the chunk began, so the human decides. The reason no marker waives the reviewer-rung rule is already recorded in code, above the reviewer-rung entry in RULES in bin/rule_hook/rules.py. +Item 163 (PR #295) has rule-hook refuse a review launch below the rung loop-claude gives its worker. The routing decision still says loop-claude's prompt has the worker launch reviewers, comprehension seats and the security pass on the project's rung, and does not name the hook. Recommendation: amend that paragraph to say rule-hook refuses a launch below the rung too. The decision was held before the chunk began, so the human decides. The `rule-hook:` entry's title says a marker overrides one rule, and `reviewer-rung` takes none. The amendment need not give the reason no marker waives the rule: the comment above `reviewer-rung` in bin/rule_hook/rules.py records it. ### 146. Score R as L + E + I − 2 from anchored levels, at least 7 at I5 and 5 at I4, with L, E and I in their own columns and `rank_todo.py` computing R, drop C, and route a task's model and effort on its R alone. @@ -234,7 +234,7 @@ Found by the goals audit of PR #245. `skills/larv-review/SKILL.md` §3 → "Secu A test audit across lilleman's projects on 2026-10-16 found 10 of 33 sampled tests in this repo pinning wording that is not the contract. Examples of these and other weak tests: `bin/loop_claude/test_loop_claude.py:165`, `:271` and most asserts in `:664` to `:687` pin whole sentences of the question, archive or prompt text, up to about 750 characters, and `:864` asserts help-text wording. `:906` and `:936` parse the source with `ast` and list each `Stop(...)` and `Failure(...)` call by function name. `bin/model_routing/test_ladder.py:16` asserts `len(LADDER) == 11`. Rewrite each to the technical principles' test bullet: assert the facts the text must carry, such as an item ID, a rung or a model argument, and delete a test no real bug could fail. Before and after rewriting a test, run the mutation tool on the code it covers: every mutant the old test killed, the new one kills. -### 167. Hold a `/security-review` or `/claude-security` run in the worker's own context to the rung the security pass runs on, as rule-hook holds an Agent call that launches one. +### 167. Refuse a `/security-review` or `/claude-security` Skill call below the project's rung, as rule-hook refuses such an Agent call. rule-hook checks Agent calls (item 163) but no Skill calls. A worker that invokes `/security-review` in its own context, instead of in a subagent, runs the pass on its own rung, and nothing blocks it. Check Skill calls too: `breaches_of` in bin/rule_hook/main.py takes a Skill call whose skill is `security-review` or `claude-security` as a review launch, and settings.json's PreToolUse matcher gains Skill. Found by the systems-architect's review of PR #295.