Answer architecture round 1: 0 🔴, 7 🟡; move the reports to a durable review folder under ~/.local/state, carry the yardstick, the named reviewer and the test status in each reply line, read an entry by Grep, name the folder once, print which rules take no override, and file items 185 and 186

This commit is contained in:
2026-10-18 00:20:13 +02:00
parent 9207566328
commit 8df46e3a85
11 changed files with 42 additions and 28 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ Decisions live in `docs/decisions.md`:
- rules/: `CLAUDE.md` holds the worker's rules that no file path can scope, and each topic's rules for the worker live in a `rules/` file that Claude Code loads by its `paths:` frontmatter
- worker: a chunk's worker writes the simplest change that solves its item, test first wherever a test can check the change, and reads a technical principle only where the item, a finding or its own record names it; larv-review's reviewers hold the change to the principles and to the standards in `skills/larv-review/standards/`
- tests: each test earns its keep as the technical principles' test bullet says, and the worker takes a test's expected values from its item, never from the code
- review: each reviewer under `agents/` writes its full report under `/tmp/larv-review/` and returns the worker its verdict and one line per finding; rule-hook refuses any other file call from it
- review: each reviewer under `agents/` writes its full report into the chunk's review folder under `~/.local/state/larv-review/` and returns the worker its verdict and one line per finding; rule-hook refuses any other file call from it
- review: stability and product-owner report only a defect, a broken requirement of the plan or the goals, a breach of a technical principle, or for stability a hard place the change touches; each architect finding names a later change the PR makes harder; prose runs only on a chunk that changes prose
- review: the stability pass mutation-tests the lines a chunk changes, in place of measuring test coverage
- routing: one ladder of (model, effort) rungs, ordered by the Artificial Analysis Intelligence Index with Fable 5.1 at max on top; a task's L picks its worker's rung and its E + I its reviewers', by fixed steps counted from the cheapest rung of the project's model
+1 -1
View File
@@ -2,7 +2,7 @@
## Unreleased
- Each reviewer under `agents/` writes its full report to a file under `/tmp/larv-review/`, which larv-review names in its prompt, and returns only its verdict and one line per finding, so a review takes less of the worker's context. The worker reads a finding's full entry before it fixes or answers a 🔴 or 🟡. Each reviewer now holds Write. `rule-hook` refuses a reviewer's Edit and MultiEdit, and any Write outside that folder, and takes no override.
- Each reviewer under `agents/` writes its full report to a file under `~/.local/state/larv-review/`, which larv-review names in its prompt, and returns only its verdict and one line per finding, so a review takes less of the worker's context. The worker reads a finding's full entry before it fixes or answers a 🔴 or 🟡. Each reviewer now holds Write. `rule-hook` refuses a reviewer's Edit and MultiEdit, and any Write outside that folder, and takes no override.
- `loop-claude` asks an interrupt's question on its own terminal and resumes the worker headless with your one-line answer, so the loop no longer waits for you to leave a claude session. Type `/talk` instead to open the worker's session in claude, as every interrupt did before, to read the diff or discuss first. A release ready to cut opens that session at once. Pressing Enter on an empty answer stops the loop, exit 2. Keys typed before the question shows are dropped, and a pasted answer keeps only its first line; type `/talk` for a longer one. The judge counts that answer as yours, like one typed in claude: the chunk stays open until the answer is recorded, where a later chunk could need it.
- When a worker's run ends with a question and a request for a higher rung, `loop-claude` now steps the worker one rung up as the judge interrupts, or as it answers the question with a quote from `README.md` or another file it may quote. The judge must quote a passage showing that the escalation trigger the run cites fired. Before, the step was lost for an answered question, and the worker carried on from the answer on its old rung. The step has the same limits as the step on an unfinished verdict, and no later ruling of that cycle carries a second escalation. The archive's interrupt and quoted-answer outcomes now name the worker's rung.
- A scoring run due because a release's items ran out costs four more seats: it is done twice on one head. `larv-review agreement` compares how often Mid A and the inherited architect vote alike in paired rulings with how often their overall scores move the same way between the two runs. After 10 such pairs it gives a verdict, and on `Assumption fails:` larv-review asks you whether to keep the paired ruling.
+1 -1
View File
@@ -66,7 +66,7 @@ The rules only reviewers apply, for quality, comments, READMEs and prose, live i
4. A review rules the work below standard: systems-architect's BLOCK, a finding against larv-review's `standards/quality.md`, or a vote `record-ruling` counts as worse, in the report that stands after any relaunch one rung up (`larv-review` §3 → "Rung up").
When one fires, hand the hard part, edits included, to a subagent on the rung loop-claude's prompt names, one above yours. Open the subagent's prompt with the marker loop-claude's prompt gives, then the trigger's evidence. Each later subagent on that task runs on that rung or higher, and each further escalation trigger moves the task one rung higher, up to the highest rung loop-claude's prompt names. Ask the human before going higher. Where loop-claude's prompt names no escalation, as on the ladder's top rung or off it, keep the task in your own thread.
- Give a subagent only the access its job needs, and state the limits in its prompt. One that only reads, such as a prose review, gets no shell and no edits; a reviewer under `agents/` also writes its report, under `/tmp/larv-review/`, where rule-hook confines it. One that probes a build tags the image as throwaway and removes it afterwards, writes only to the session scratchpad, and removes no image or file it did not create.
- Give a subagent only the access its job needs, and state the limits in its prompt. One that only reads, such as a prose review, gets no shell and no edits; a reviewer under `agents/` also writes its report to the file larv-review names, and rule-hook refuses it any other write. One that probes a build tags the image as throwaway and removes it afterwards, writes only to the session scratchpad, and removes no image or file it did not create.
- Check `README.md` first for build, test, install, and codegen commands, and fix one that misbehaves in the same change. Refresh `README.md` whenever you change what it describes, keeping it true, not longer.
- Where `~/.claude/bin/rule-hook` does not check it, such as an image named in test code, a Kubernetes manifest, a `docker run` line or a file a Bash command writes, pin a container image to its full patch version and a GitHub Action to a semver tag.
+2 -2
View File
@@ -8,7 +8,7 @@ subagent. The rules:
{rules}
A file a Bash command writes, such as through `cat > Dockerfile`, is not checked. The reviewer-rung rule takes no override.
A file a Bash command writes, such as through `cat > Dockerfile`, is not checked.
A call overrides a rule with `# rule-override <rule>: <reason>`:
@@ -82,7 +82,7 @@ def breaches_of(call: Call, home: str, environ: typing.Mapping[str, str]) -> tup
return None
before = read(path)
added, after = applied(call, before)
return added, path, report_breaches(call, path) + file_breaches(path, before, added, after)
return added, path, report_breaches(call, path, home) + file_breaches(path, before, added, after)
def answer(judged: Outcome, what: str, now: float) -> int:
+6 -8
View File
@@ -3,17 +3,15 @@ import os
from rule_hook.call import Call
from rule_hook.reviewer_rung import REVIEWERS
from rule_hook.rules import Breach
# Outside every checkout, so no project sees a report. A fixed path, since a headless session has no scratchpad.
REPORTS = "/tmp/larv-review"
from rule_hook.rules import Breach, REPORTS
def report_breaches(call: Call, path: str) -> list[Breach]:
"""The breach of a file call from a reviewer that is not a Write under REPORTS; none from any other agent."""
def report_breaches(call: Call, path: str, home: str) -> list[Breach]:
"""The breach of a file call from a reviewer that is not a Write under REPORTS in home; none from any other agent."""
if call.agent not in REVIEWERS:
return []
written = os.path.realpath(os.path.join(call.cwd, path))
if call.tool == "Write" and written.startswith(os.path.realpath(REPORTS) + "/"):
reports = os.path.realpath(os.path.join(home, REPORTS))
if call.tool == "Write" and written.startswith(reports + "/"):
return []
return [Breach("reviewer-report", f"{call.agent} would {call.tool.lower()} {written}; write your report with Write to the path your prompt names, under {REPORTS}/", call.cwd)]
return [Breach("reviewer-report", f"{call.agent} would {call.tool.lower()} {written}; write your report with Write to the path your prompt names, under {reports}/", call.cwd)]
+4 -2
View File
@@ -18,6 +18,8 @@ class Rule:
overridable: bool = True
# The reviewers' reports folder, under the home folder: outside every checkout, so no project sees a report, and kept across a reboot, so a resumed chunk still reads its rounds. A fixed path, since a headless session has no scratchpad.
REPORTS = ".local/state/larv-review"
RULES: dict[RuleName, Rule] = {
"action-pin": Rule(
"a GitHub or Gitea Action is pinned to a semver tag, such as @v3 or @v3.1.2, never to a branch, and to a commit SHA only in a pipeline that tests our own specific builds",
@@ -41,7 +43,7 @@ RULES: dict[RuleName, Rule] = {
),
# A reviewer only reports, so no marker waives it.
"reviewer-report": Rule(
"a reviewer writes nothing but its report, with Write, into a file under /tmp/larv-review/, outside every checkout",
f"a reviewer writes nothing but its report, with Write, into a file under ~/{REPORTS}/",
"a Write, Edit or MultiEdit call from inside an agent under agents/",
overridable=False,
),
@@ -186,4 +188,4 @@ def blocks(written: str) -> list[list[str]]:
def rules_help() -> str:
return "\n".join(f" {name}\n The rule: {rule.holds}.\n Checked in: {rule.checked}." for name, rule in RULES.items())
return "\n".join(f" {name}\n The rule: {rule.holds}.\n Checked in: {rule.checked}." + ("" if rule.overridable else "\n Takes no override.") for name, rule in RULES.items())
+8 -5
View File
@@ -240,16 +240,16 @@ class ReviewerReport(unittest.TestCase):
return rules(found[2]) if found else []
def test_a_reviewer_writes_its_report_into_the_reports_folder(self):
self.assertEqual(self.breached("Write", "/tmp/larv-review/.claude-item-73/prose-round-1.md"), [])
self.assertEqual(self.breached("Write", "prose-round-1.md", cwd="/tmp/larv-review/x"), [], "a relative path resolves against the call's cwd")
self.assertEqual(self.breached("Write", "/h/.local/state/larv-review/.claude-item-73/prose-round-1.md"), [])
self.assertEqual(self.breached("Write", "prose-round-1.md", cwd="/h/.local/state/larv-review/x"), [], "a relative path resolves against the call's cwd")
def test_a_reviewer_writing_anywhere_else_is_refused(self):
for path in ["/r/README.md", "/tmp/larv-review", "/tmp/larv-review-x/a.md", "/tmp/larv-review/../etc/a.md", "/tmp/a.md"]:
for path in ["/r/README.md", "/h/.local/state/larv-review", "/h/.local/state/larv-review-x/a.md", "/h/.local/state/larv-review/../a.md", "/tmp/larv-review/a.md"]:
with self.subTest(path):
self.assertEqual(self.breached("Write", path), ["reviewer-report"])
def test_a_reviewer_edits_no_file_even_in_the_reports_folder(self):
self.assertEqual(self.breached("Edit", "/tmp/larv-review/x/prose-round-1.md"), ["reviewer-report"])
self.assertEqual(self.breached("Edit", "/h/.local/state/larv-review/x/prose-round-1.md"), ["reviewer-report"])
self.assertEqual(self.breached("MultiEdit", "/r/a.py", "stability-reviewer"), ["reviewer-report"])
def test_the_worker_and_other_subagents_write_anywhere(self):
@@ -336,7 +336,7 @@ class Hook(unittest.TestCase):
ran = hook(call, self.repo)
self.assertEqual(ran.returncode, 2)
self.assertIn("Blocked by rule reviewer-report: prose-reviewer would write ", ran.stderr)
self.assertIn("/tmp/larv-review/", ran.stderr)
self.assertIn("/.local/state/larv-review/", ran.stderr)
self.assertNotIn("rule-override", ran.stderr)
def test_a_commit_override_is_logged_in_the_commit_s_checkout(self):
@@ -404,3 +404,6 @@ class Hook(unittest.TestCase):
helped = subprocess.run([str(HOOK), "--help"], capture_output=True, check=True, env=isolated_env(), text=True).stdout
for rule in ["action-pin", "commit-one-line", "ignorefile-sorted", "image-pin", "no-ai-attribution", "reviewer-report", "round-title-counts", "todo-rank-check"]:
self.assertIn(f" {rule}\n The rule: ", helped)
self.assertIn("reviewer-report\n The rule: a reviewer writes nothing but its report", helped)
self.assertRegex(helped, r" reviewer-report\n( .*\n){2} Takes no override\.\n")
self.assertRegex(helped, r" image-pin\n( .*\n){2} ", "a rule a marker waives says nothing of overrides")
+2 -2
View File
@@ -218,11 +218,11 @@ The decision `worker: a chunk's worker writes the simplest change…` has the wo
Valid while the worker writes the tests that larv-review's reviewers hold to the principles.
## review: each reviewer under `agents/` writes its full report under `/tmp/larv-review/` and returns the worker its verdict and one line per finding; rule-hook refuses any other file call from it
## review: each reviewer under `agents/` writes its full report into the chunk's review folder under `~/.local/state/larv-review/` and returns the worker its verdict and one line per finding; rule-hook refuses any other file call from it
2026-10-18, the agent, shipping lilleman's plan item. Serves goal 1.4: a report the worker does not need line by line no longer fills its context. Goal 1.1 holds because the worker reads a finding's full entry before it answers a 🔴 or 🟡.
The worker names each report's file in the reviewer's prompt, per `skills/larv-review/SKILL.md` → "Reports", and `skills/larv-review/review-findings.md` → "Report" sets what the reviewer returns. Each reviewer holds Write for that. Claude Code passes a subagent's type to a PreToolUse hook as `agent_type`, so `bin/rule_hook/reviewer_report.py` refuses a reviewer's Edit, MultiEdit, and Write outside the folder; no marker overrides it. A reviewer's Bash, as stability-reviewer holds, is not confined. The folder is fixed, since loop-claude's headless sessions have no scratchpad, and sits outside every checkout, so no project sees a report. A general-purpose wrapper that launches the reviewer was not tried: Claude Code's documentation says a subagent cannot start another.
The worker names each report's file in the reviewer's prompt, per `skills/larv-review/SKILL.md` → "Reports", and `skills/larv-review/review-findings.md` → "Report" sets what the reviewer returns. Each reviewer holds Write for that. Claude Code passes a subagent's type to a PreToolUse hook as `agent_type`, so `bin/rule_hook/reviewer_report.py` refuses a reviewer's Edit, MultiEdit, and Write outside the folder; no marker overrides it. A reviewer's Bash, as stability-reviewer holds, is not confined. The folder is fixed, since loop-claude's headless sessions have no scratchpad. It sits outside every checkout, so no project sees a report. It survives a reboot, unlike `/tmp`, so a resumed chunk still reads its earlier rounds. And it is in the user's home, so no other local user reads a report, which may quote a secret, or plants a symlink that widens the folder. A general-purpose wrapper that launches the reviewer was not tried: Claude Code's documentation says a subagent cannot start another.
Before this change, reports took a median 19k tokens per chunk, 8% of the worker's peak context, and lines carrying a severity mark were 9–24% of a report (2026-10-08, over 68 archived transcripts). `stability-replay` still counts each 🔴 and 🟡 by its line in the reviewer's reply.
+3 -3
View File
@@ -45,7 +45,7 @@ A comment is prose, not code. Passes run in this order: line-level polish on cod
Give a reviewer without Bash the branch diff and `git ls-files`'s output in its prompt: some harnesses grant it Read alone.
**Reports.** Name in each prompt to an agent under `~/.claude/agents/` the file its full report goes to: `/tmp/larv-review/<the worktree's folder name>/<pass>-round-<n>.md`, with the yardstick's name after the pass's for a principles-auditor, and `-rerun` before `.md` for a relaunch one rung up. It writes the report there and returns only its verdict and one line per finding. Read the report's entry for each 🔴 and 🟡 before you answer it. rule-hook refuses a reviewer's write anywhere else.
**Reports.** The chunk's review folder is `~/.local/state/larv-review/<the worktree's path relative to ~, or to / outside it>/`. Name in each prompt to an agent under `~/.claude/agents/` the file there that its full report goes to: `<pass>-round-<n>.md`, with the yardstick's name after the pass's for a principles-auditor, and `-rerun` before `.md` for a relaunch one rung up. It writes the report there and returns only its verdict and one line per finding. Before you answer a 🔴 or 🟡, read its entry: Grep the report for the finding's place, with the lines after it, rather than Read the whole report. rule-hook refuses a reviewer's write anywhere else.
`~/.claude/bin/larv-review` holds this section's mechanical rules: the round count, the paired ruling's base and vote count, the scoring run's trigger, and the history's format and latest places, and its count of how often seats agree. Run it in the chunk's worktree; `~/.claude/bin/larv-review --help` states each rule. On exit 1, repair what its message names and run it again; when you cannot, ask the user.
@@ -112,7 +112,7 @@ The comprehension check records how hard the project is to read, and blocks no m
- **Base.** The last measured commit, which `~/.claude/bin/larv-review ruling-base` prints.
- **Head.** The head holds `origin/<default branch>`, merged in at §4 step 1, so it differs from the default branch only by this branch's change.
- **Seats.** Mid A and the inherited architect. Write what they read and their replies into a votes file in your scratchpad, in the shape `~/.claude/bin/larv-review --help` shows, and run `~/.claude/bin/larv-review record-ruling <votes file>`. On `Split:`, launch the maintainability senior and Junior A together, add their lines, and run it again.
- **Seats.** Mid A and the inherited architect. Write what they read and their replies into a votes file in the chunk's review folder, in the shape `~/.claude/bin/larv-review --help` shows, and run `~/.claude/bin/larv-review record-ruling <votes file>`. On `Split:`, launch the maintainability senior and Junior A together, add their lines, and run it again.
**Scoring run**, when `~/.claude/bin/larv-review needs-scoring-run <the IDs of the items the chunk ships, if any>` prints `Scoring run due:`. Run `needs-scoring-run` before removing the chunk's items from `todo.md`.
@@ -163,7 +163,7 @@ Launch prose-reviewer with what the diff touched and every section this review c
1. Read the finished PR against the README goals: does anything in it work against one? It breaks a maintain goal → do not merge; redesign the change or drop its item. It works against an achieve goal → do not merge; ask the human, stating the conflict.
2. Run the comprehension check (§3) where it runs; it runs once. When `origin/<default branch>` moves after that, return to §4, and keep the ruling and scoring run already recorded.
3. Aligned, every pass done and everything green → **merge**. Follow the repo's merge method (`AGENTS.md`; ff-only where that is the convention). A repo withholds this in its `AGENTS.md` → leave the PR ready and unmerged, and say which line withheld it.
4. Merged → remove the chunk's items from `todo.md` per `~/.claude/CLAUDE.md` → "Working loop", and the chunk's folder under `/tmp/larv-review/`.
4. Merged → remove the chunk's items from `todo.md` per `~/.claude/CLAUDE.md` → "Working loop", and the chunk's review folder.
5. Stop. The next chunk gets a fresh session.
## 6. Wrap up
+3 -2
View File
@@ -16,10 +16,11 @@ A finding against a technical principle names it and the file under `~/.claude/p
## Report
Write your full report with the Write tool to the file your prompt names, under `/tmp/larv-review/`: the verdict, then every finding with its place, its evidence and its fix, as your agent file shapes them. Then return only:
Write your full report with the Write tool to the file your prompt names: the verdict, then every finding with its place, its evidence and its fix, as your agent file shapes them. Then return only:
- the verdict line
- one line per finding: its severity mark, its place, and what is wrong in one sentence, such as `🟡 bin/rank_todo.py:311 place: a cycle among blockers recurses forever`
- one line per finding: its severity mark, its place, what is wrong in one sentence, and the file it breaks where that is `standards/quality.md` or a file under `~/.claude/principles/`, or for a 🔀 the reviewer it names, such as `🟡 bin/rank_todo.py:311 place: a cycle among blockers recurses forever (technical-principles.md)`
- for stability-reviewer, whether the tests passed, and at which commit
- `Rerun one rung up`, where your report ends with it
- the report's path
+11 -1
View File
@@ -6,7 +6,7 @@
`Bar = 0.1`
`Next ID = 185`
`Next ID = 187`
## Items
@@ -33,6 +33,7 @@
| 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 | 2 | 1 | 2 | 1 | 1.1 by 5 | 10.9 |
| 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.** | 3 | 2 | 3 | 6 | 2 | 1.1 by 4 | 7.3 |
| 176 | 0.3.0 | | | **Give `loop-claude --help`'s routing paragraph sub-headings, such as Routing, Judge rung and Routing figures, so a reader finds a rule without reading 39 lines.** | 1 | 2 | 1 | 2 | 2 | 1.1 by 3, 1.4 by 2 | 7.3 |
| 185 | 0.3.0 | | | **Point every file a session parks outside its checkout, such as the comprehension panel's detached worktree and a build probe's output, at a folder a headless session has, since loop-claude's sessions have no scratchpad.** | 1 | 2 | 2 | 3 | 2 | 1.1 by 3, 1.5 by 2 | 6.9 |
| 172 | 0.3.0 | | | **Name the project's rung `project` across `bin/loop_claude`, in place of `anchor`, as `bin/model_routing/ladder.py` names it.** | 2 | 1 | 3 | 4 | 3 | 1.1 by 3, 1.4 by 3 | 6.2 |
| 82 | 0.3.0 | | principle | **Sort `AGENTS.md`'s decision titles and `docs/decisions.md`'s entries by title.** | 2 | 2 | 1 | 3 | 4 | 1.1 by 4, 1.4 by 4 | 5.5 |
| 173 | 0.3.0 | | | **Have rule-hook's `todo-rank-check` run a worktree's own `bin/rank_todo.py` when the worktree is of this repo, so a branch that changes `todo.md`'s shape commits without an override.** | 2 | 1 | 3 | 4 | 2 | 1.1 by 2, 1.4 by 2 | 5.5 |
@@ -46,6 +47,7 @@
| 169 | 0.3.0 | | | **Have rule-hook's `todo-rank-check` catch a `todo.md` that the same Bash call edits and then commits.** | 3 | 1 | 3 | 5 | 3 | 1.1 by 2 | 2.7 |
| 183 | 0.3.0 | | | **Merge the two 2026-10-13 paragraphs of `docs/decisions.md` → `loop-claude: a judge decides each interrupt …` into one.** | 1 | 1 | 1 | 1 | 1 | 1.1 by 1 | 2.2 |
| 184 | 0.3.0 | | | **Rewrap the lines of `loop-claude --help` that run past the column the rest of it wraps at.** | 1 | 1 | 1 | 1 | 1 | 1.1 by 1 | 2.2 |
| 186 | 0.3.0 | | | **Count the tokens a worker spends reading reviewers' reports, so goal 1.4's signal shows whether report files lowered what a review costs the worker's context.** | 2 | 2 | 1 | 3 | 3 | 1.4 by 3 | 2.1 |
| 174 | 0.3.0 | | | **In a chunk no item routed, ask the worker to name each todo.md item it takes, with its L and E + I, so loop-claude can route on an item it takes in.** | 1 | 2 | 3 | 4 | 2 | 1.1 by 1 | 1.8 |
| 122 | 0.4.0 | | | **Assemble the judge's prompt in `bin/loop_claude/cycle/judge.py`, importing only wording the worker also sees, and call the worker "the worker" in it.** | 2 | 2 | 3 | 5 | 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.** | 2 | 2 | 1 | 3 | 3 | 1.1 by 5, 1.4 by 5 | 10.3 |
@@ -183,6 +185,10 @@ rule-hook checks Agent calls (item 163) but no Skill calls. A worker that invoke
Raised by the prose pass of PR #302: the help, the docstring of `bin/loop_claude/loop/main.py`, is 145 lines, and its routing paragraph one block of 39, from the ladder through the judge's rung to the routing figures. A reader looking for one rule, such as when the worker steps up, reads it all. The comprehension seats already found the help hard (`larv-review places`: "loop-claude --help": a 120-line contract with no pointers to the modules it maps onto).
### 185. Point every file a session parks outside its checkout, such as the comprehension panel's detached worktree and a build probe's output, at a folder a headless session has, since loop-claude's sessions have no scratchpad.
`skills/comprehension-panel/SKILL.md` puts the base version's detached worktree "in your scratchpad", and `CLAUDE.md` → "Working with the codebase" lets a build-probing subagent write "only to the session scratchpad". A probe on 2026-10-18 found no `scratchpad_dir` in a headless `claude -p` session's hook input, and neither the session nor its subagent knew a scratchpad path. larv-review now parks its reports and votes file in the chunk's review folder under `~/.local/state/larv-review/`, per `docs/decisions.md` → `review: each reviewer under agents/ writes its full report into the chunk's review folder`. Found by the architecture review of PR #310.
### 172. Name the project's rung `project` across `bin/loop_claude`, in place of `anchor`, as `bin/model_routing/ladder.py` names it.
The architecture pass of PR #296 found one rung under two names: `bin/model_routing/ladder.py` calls it `project`, while `bin/loop_claude/routing.py`, `cycle/prompts.py`, `cycle/run.py`'s `Cycle.anchor` and `loop/main.py` call it `anchor`, and gloss it as "anchor, the project's rung" in docstring after docstring. A reader works out that the two are one rung each time. Make `bin/loop_claude/routing.py`'s `first_route` easier to read.
@@ -243,6 +249,10 @@ They say the same thing for `~/.claude/rules/` (item 95) and `~/.claude/skills/l
In `bin/loop_claude/loop/main.py`'s docstring, the line holding "of one PR, is finished" and the one ending "Each of these opens with its UTC time." run to 107 and 159 columns. Raised by the prose review of PR #308.
### 186. Count the tokens a worker spends reading reviewers' reports, so goal 1.4's signal shows whether report files lowered what a review costs the worker's context.
Before PR #310, reports reached the worker as the Agent call's result, a median 19k tokens per chunk (2026-10-08, 68 archived transcripts). Now a reviewer returns its verdict and one line per finding, and the worker reads a 🔴 or 🟡 finding's entry from the report file. `reading-cost` counts only tracked files (`bin/reading_cost/measure.py`), and `routing-figures` counts only the Agent call's result (`bin/routing_figures/measure.py`), so neither sees the report reads. Found by the architecture review of PR #310.
### 174. In a chunk no item routed, ask the worker to name each todo.md item it takes, with its L and E + I, so loop-claude can route on an item it takes in.
The principles pass of PR #301 found that only `routed_by` in `bin/loop_claude/cycle/prompts.py` asks the worker to name each item it takes with its L and E + I, and `fresh` uses it only where an item routed the chunk. In an unrouted chunk the judge has no levels to report, so neither the taken-in L nor the taken-in E + I lifts the worker, the reviewers or the judge, and the first prompt names no reviewers' rung for a higher E + I.