Compare commits

...

7 Commits

6 changed files with 126 additions and 19 deletions
+3
View File
@@ -149,6 +149,9 @@
!skills/larv-review/*.md
!skills/larv-review/standards/
!skills/larv-review/standards/*.md
!stability-skip-count/
!stability-skip-count/README.md
!stability-skip-count/count.py
!workflow-bench/
!workflow-bench/advisor-judge-prompt.md
!workflow-bench/advisor-run-prompt.md
+1 -1
View File
@@ -1,6 +1,6 @@
# Claude Code configuration
My personal `~/.claude`, version controlled: `CLAUDE.md` and `rules/` for instructions, the words under `CLAUDE.md` → "Vocabulary"; `.claude/rules/` for the rules that load in this repo alone; `agents/` and `skills/`; `principles/` and `skills/larv-review/standards/` for what the reviewer agents hold projects to; `docs/` for decisions and the comprehension history; `settings.json` for the harness and `.claude/settings.json` for the harness inside this repo; `CHANGELOG.md` and `todo.md`; the tools in `bin/`; `workflow-bench/`, the scripts and prompts of the 2026-09-30 bench of larv-review and of the 2026-11-12 bench of the advisor tool; `reviewer-merge-trials/`, the 2026-11-09 trials of merging reviewers, with their method, results and scripts; `judge-field-trials/`, the 2026-11-11 trials of which facts code could read in place of loop-claude's judge, with their results and scripts; and `presentation/`, a page that explains this setup to newcomers, with the script that prints it to PDF.
My personal `~/.claude`, version controlled: `CLAUDE.md` and `rules/` for instructions, the words under `CLAUDE.md` → "Vocabulary"; `.claude/rules/` for the rules that load in this repo alone; `agents/` and `skills/`; `principles/` and `skills/larv-review/standards/` for what the reviewer agents hold projects to; `docs/` for decisions and the comprehension history; `settings.json` for the harness and `.claude/settings.json` for the harness inside this repo; `CHANGELOG.md` and `todo.md`; the tools in `bin/`; `workflow-bench/`, the scripts and prompts of the 2026-09-30 bench of larv-review and of the 2026-11-12 bench of the advisor tool; `reviewer-merge-trials/`, the 2026-11-09 trials of merging reviewers, with their method, results and scripts; `judge-field-trials/`, the 2026-11-11 trials of which facts code could read in place of loop-claude's judge, with their results and scripts; `stability-skip-count/`, the 2026-11-12 count of archived stability rounds, with its script, from which larv-review took when to skip a stability round 2; and `presentation/`, a page that explains this setup to newcomers, with the script that prints it to PDF.
## Goals
+1 -1
View File
@@ -245,7 +245,7 @@ Valid while no published standard sets either number, the reading-cost window st
2026-10-29, lilleman. Serves goals 1.4 and 1.5. A 🟡 fix no longer reruns its pass. One project's chunk on 2026-10-29, a README paragraph and plan rows, took 10 review rounds in 45 minutes, and three of its four second rounds answered only 🟡 findings, such as the wording of a question's options. Round 2 found 12 🔴 in about 200 runs since 2026-10-21, mostly in round 1's fixes of 🔴 findings, so a 🔴 fix still reruns its pass. A 🟡 fix that breaks something merges unreviewed by its pass; another pass whose row it meets for a 🔴 fix in the same round still reviews it. Valid while 🔴 findings in later chunks, fixing code a 🟡 fix wrote, stay rare.
2026-11-12, lilleman through todo item 308. Serves goal 1.4. Since the worker runs the mutation command before each stability round, a finding that asks only that a named mutant be killed or a named failing test pass has an answer a run can check. The archive from 2026-09-30 to 2026-11-12 holds 325 stability reports of round 2 or later, from 13 projects, and 81 of those reports open with BLOCK. For each of the 325, the 🔴 and 🟡 lines of the round before were matched on mutant and test-failure wording. In 4 rounds before, every such line matched; read by hand, 1 of the 4 asked only that a failing test pass, and the round 2 after each of the 4 approved. So none of the 81 BLOCKs fell in a round this skips. The skip needs every 🟡 to be of that kind too: in one chunk on 2026-11-12, round 1's only 🔴 was a red suite, and round 2 blocked on a 🟡 whose answer was wrong, which no test or mutant showed. A fix may not edit the named failing test, since a test made to pass that way shows nothing. Fixes from such a round still rerun every other pass whose row they meet. Valid while code that such a skipped round's fixes wrote is rarely what a later chunk's 🔴 findings fix.
2026-11-12, lilleman through todo item 308. Serves goal 1.4. Since the worker runs the mutation command before each stability round, a finding that asks only that a named mutant be killed or a named failing test pass has an answer a run can check. The archive from 2026-09-30 to 2026-11-12 holds 326 stability reports of round 2 or later, from 13 projects, and 81 of those reports open with BLOCK (`stability-skip-count/`). For each of the 326, the 🔴 and 🟡 lines of the report before it were matched on mutant and test-failure wording. Every such line matched in 5 of those earlier reports. Read by hand, 1 of the 5 asked only that a failing test pass, and the round 2 after each of the 5 approved. So none of the 81 BLOCKs fell in a round this skips. The skip needs every 🟡 to be of that kind too: in one chunk on 2026-11-12, round 1's only 🔴 was a red suite, and round 2 blocked on a 🟡 whose answer was wrong, which no test or mutant showed. A fix may not edit the named failing test, since a test made to pass that way shows nothing. Fixes from such a round still rerun every other pass whose row they meet. Valid while code that such a skipped round's fixes wrote is rarely what a later chunk's 🔴 findings fix.
## review: a comment is prose in any file; a branch changing only Markdown no agent follows runs only the prose pass and, for README or docs an outside reader lands on, the product-owner pass; plan rows a chunk files from a finding, re-scores or moves get no review
+20
View File
@@ -0,0 +1,20 @@
# Stability skip count
This count asks one question: would skipping stability round 2 have skipped a round that blocked, where round 1's findings each asked only that a named mutant be killed or a named failing test pass?
It ran on 2026-11-12, over loop-claude's archive in `~/.claude/loop-claude-transcripts/`. `docs/decisions.md` → `review: a fix for a 🔴 reruns the pass that found it…` records what was decided from it, and `skills/larv-review/SKILL.md` §3 → "Re-entry" → "Mechanical answers" holds the rule.
## Terms
- **Report:** a stability-reviewer run in the archive, with the round number its launch names.
- **Report before:** the previous report in the same archived cycle.
- **Mechanical:** a finding that asks only that a named mutant be killed or a named failing test pass.
## Method
`python3 -I stability-skip-count/count.py` prints the totals, then each report of round 2 or later whose report before held a 🔴 and had every 🔴 and 🟡 line match mutant or test-failure wording, with that report's opening line and the report before's findings. The match casts wide; reading each printed round by hand decides which are mechanical. It reads only reports begun before its `UNTIL`, so a rerun on this machine prints the same counts. It needs the archive, which only the machine that ran the cycles holds.
## Results
- 326 reports of round 2 or later, from 13 projects; 81 open with BLOCK.
- 5 reports before matched, and the round 2 after each of the 5 approved, so no BLOCK falls in a round the skip could skip.
- Read by hand, 1 of the 5 is mechanical: fejkdata, 2026-11-04, a pin test that fails. The other 4 matched on wording alone: a test's structure, a workflow condition, a failing type check and a missed timing target.
+81
View File
@@ -0,0 +1,81 @@
"""Count the archived stability rounds of round 2 or later, their BLOCKs, and the rounds the skip in larv-review §3 → "Re-entry" → "Mechanical answers" could skip, printing each of those for reading by hand."""
import collections
import json
import pathlib
import re
import sys
ARCHIVE = pathlib.Path.home() / ".claude/loop-claude-transcripts"
# The count recorded in README.md and docs/decisions.md read the reports that began before this; later ones would change it.
UNTIL = "2026-11-12T10:50:00Z"
# A line that opens a 🔴 or 🟡 finding, after any list, number or heading marks.
FINDING = re.compile(r"^\s*(?:[-*]\s*|\d+\.\s*|#+\s*)*(?:\*\*)?(🔴|🟡)")
# Wording of a finding that names a surviving mutant or a failing test. It casts wide; the hand reading decides.
MECHANICAL = re.compile(r"surviv|mutant|fail(s|ing|ed)? (test|on)|test (fails|failed|failing)|tests? (still )?fail|\bred\b|suite (is red|fails)", re.I)
# A report whose verdict line, at the start of a line, says BLOCK. A verdict stated mid-sentence isn't counted, so each printed round shows its opening line too.
BLOCK = re.compile(r"^\W*(Verdict:?\s*)?\**BLOCK", re.M)
def text_of(message: dict) -> str:
"""The text parts of a transcript message."""
content = message.get("content")
if isinstance(content, str):
return content
return "\n".join(part.get("text", "") for part in content or [] if isinstance(part, dict) and part.get("type") == "text")
def parsed(transcript: str) -> list[dict]:
"""A transcript's entries, one JSON object a line. str.splitlines would also split at the U+2028 a message may hold. A transcript of a cycle still running may end in a line half written, which is left out."""
lines = [line for line in transcript.split("\n") if line.strip()]
try:
return [json.loads(line) for line in lines]
except json.JSONDecodeError:
return [json.loads(line) for line in lines[:-1]]
def rounds() -> list[dict]:
"""Each archived stability-reviewer run: its project, its cycle folder, when it began, the round its launch names, whether its last text opens with BLOCK, and its finding lines."""
found = []
for meta_path in ARCHIVE.glob("*/*/session/*/subagents/*.meta.json"):
meta = json.loads(meta_path.read_text())
if meta.get("agentType") != "stability-reviewer":
continue
entries = parsed(meta_path.with_name(meta_path.name.removesuffix(".meta.json") + ".jsonl").read_text())
users = [entry for entry in entries if entry.get("type") == "user"]
prompt = text_of(users[0]["message"]) if users else ""
texts = [text_of(entry["message"]) for entry in entries if entry.get("type") == "assistant"]
last = next((text for text in reversed(texts) if text.strip()), "")
number = re.search(r"[Rr]ound (\d+)", meta.get("description", "") + " " + prompt[:600])
found.append({
"project": meta_path.parts[-6],
"cycle": meta_path.parts[-5],
"at": entries[0].get("timestamp", "") if entries else "",
"round": int(number.group(1)) if number else 0,
"block": bool(BLOCK.search(last)),
"opens": last.strip().split("\n")[0][:120],
"findings": [line.strip() for line in last.splitlines() if FINDING.match(line)],
})
return found
def main() -> None:
"""Print the totals, then each report of round 2 or later where the report before it, in the same cycle, held a 🔴 and every 🔴 and 🟡 line of that report before reads as mechanical."""
if not ARCHIVE.is_dir():
sys.exit(f"No archive at {ARCHIVE}: the count reads loop-claude's transcripts on the machine that ran them.")
every = [run for run in rounds() if run["at"] < UNTIL]
later = [run for run in every if run["round"] >= 2]
print(f"{len(later)} reports of round 2 or later, {sum(run['block'] for run in later)} opening with BLOCK, from {len({run['project'] for run in later})} projects")
by_cycle = collections.defaultdict(list)
for run in every:
by_cycle[(run["project"], run["cycle"])].append(run)
for runs in by_cycle.values():
runs.sort(key=lambda run: run["at"])
for before, run in zip(runs, runs[1:]):
reds = [line for line in before["findings"] if "🔴" in line[:12]]
if run["round"] >= 2 and reds and all(MECHANICAL.search(line) for line in before["findings"]):
print(f"\n{run['project']} {run['at'][:16]} round {run['round']}, opening: {run['opens']}")
for line in before["findings"]:
print(f" before: {line[:300]}")
main()
+20 -17
View File
@@ -12,8 +12,7 @@
| ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 340 | 0.9.0 | | question | **Decide whether a reviewer may start without `CLAUDE.md` where its replay misses no more findings than an unchanged replay does.** | 2 | 2 | 3 | 5 | 4 | 1.4 by 5 | 1.7 |
| 331 | 0.9.0 | | question | **Reword four decisions to expire when the rungs their replays tested change, not whenever a model joins the ladder.** | 1 | 1 | 1 | 1 | 2 | 1.4 by 2 | 0.9 |
| 340 | 0.9.0 | | owner | **Let the stability reviewer start without `CLAUDE.md`, as principles-auditor does, once a replay with a control has been run on every pass and reported to lilleman.** | 2 | 2 | 3 | 5 | 4 | 1.4 by 5 | 1.7 |
| 319 | 0.9.0 | | | **Start a fresh session with a brief of the chunk when a rung step changes the worker's model, in place of resuming the old session.** | 3 | 2 | 3 | 6 | 4 | 1.1 by 2, 1.4 by 2 | 1.4 |
| 309 | 0.9.0 | | | **Run a scoring run's second pass on one head with two seats in place of four, once `larv-review agreement` shows the seats agree with each other more than a run agrees with its rerun.** | 2 | 2 | 2 | 4 | 2 | 1.4 by 3 | 1.3 |
| 299 | 0.9.0 | | | **Replay the archived judge verdicts through code rules and a classifier trained locally on the archive, and file an item for each verdict kind one of them decides with no missed interrupt.** | 2 | 2 | 2 | 4 | 3 | 1.4 by 3 | 1.2 |
@@ -23,6 +22,7 @@
| 341 | 0.9.0 | | | **Hand each worker's claude a lower Read limit through `CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS`, kept only where replays of the archived review rounds find what two unchanged replays find.** | 2 | 2 | 3 | 5 | 3 | 1.4 by 3 | 1.2 |
| 310 | 0.9.0 | | | **Compact a waiting worker's session shortly before its prompt cache expires, only when the human has not answered an interrupt by then.** | 3 | 2 | 3 | 6 | 4 | 1.4 by 3 | 1.0 |
| 298 | 0.9.0 | | | **Send the judge only the decision entries and the transcript tail a verdict needs, and keep the cut only where `judge-replay` changes no verdict kind.** | 3 | 3 | 3 | 7 | 4 | 1.4 by 2, 1.5 by 1 | 1.0 |
| 331 | 0.9.0 | | | **Reword four decisions to expire when the rungs their replays tested change, not whenever a model joins the ladder.** | 1 | 1 | 1 | 1 | 2 | 1.4 by 2 | 0.9 |
| 327 | 0.9.0 | | | **Have `larv-review` print a round commit's title prefix, counted from the round's report, and have rule-hook refuse a round title whose counts differ from it.** | 3 | 2 | 3 | 6 | 4 | 1.1 by 1, 1.4 by 1 | 0.7 |
| 303 | 0.10.0 | | defect | **Archive each judge run's prompt and json reply beside the verdict it gave, so judge cost, replays and backups cover the judge as they cover the worker.** | 2 | 2 | 3 | 5 | 3 | 1.4 by 3, 3 by 2 | 4.8 |
| 304 | 0.10.0 | 303 | defect | **Archive each review-replay and judge-replay run's transcript beside its result, so a replay that decided a rung can be checked and re-priced later.** | 2 | 2 | 2 | 4 | 3 | 1.4 by 2, 3 by 2 | 4.4 |
@@ -68,24 +68,16 @@
## Details
### 340. Decide whether a reviewer may start without `CLAUDE.md` where its replay misses no more findings than an unchanged replay does.
### 340. Let the stability reviewer start without `CLAUDE.md`, as principles-auditor does, once a replay with a control has been run on every pass and reported to lilleman.
Item 315's gate kept `omitClaudeMd` only where a replay without `CLAUDE.md` found every finding that two unchanged replays both found. Read so, five passes failed it on 2026-11-12: stability missed 1 of 11, prose 1 of 24, product-owner 1 of 4, architecture 4 of 27, and overrides had no archived round to replay. The decision `agents/: a reviewer starts without CLAUDE.md only where a replay of its pass missed none of the findings two unchanged replays both found` holds the figures.
Item 315's gate kept `omitClaudeMd` only where a replay without `CLAUDE.md` found every finding that two unchanged replays both found. Read so, five passes failed it on 2026-11-12: stability missed 1 of 11, prose 1 of 24, product-owner 1 of 4, architecture 4 of 27, and overrides had no archived round to replay. The decision `agents/: a reviewer starts without CLAUDE.md only where a replay of its pass missed none of the findings two unchanged replays both found` holds the figures. The unchanged reviewer finds only about 70% of its findings again, so that gate can't tell a loss from the reviewer's own noise.
The question for lilleman: does a miss that small show a loss, or the reviewer's own noise? The unchanged reviewer finds only about 70% of its findings again, so a third unchanged replay would also miss some that the other two found, and the gate as written can't tell the two apart.
lilleman's call, 2026-11-12: principles-auditor and stability-reviewer start without `CLAUDE.md`; the other reviewers keep it. The call is provisional until the data below is in.
Recommended: give `review-replay --omit-claude-md` a control. It replays each round three times unchanged and once without `CLAUDE.md`, and prints for each unchanged replay how many findings it missed that the other two found. The reviewer may start without `CLAUDE.md` where its own count is no higher than the highest of those three. Then run it for the five passes, and add `omitClaudeMd: true` to each agent that passes; the hook and the header already serve any agent that has it. Each run costs four replays of 10 rounds on the project's model.
### 331. Reword four decisions to expire when the rungs their replays tested change, not whenever a model joins the ladder.
The architect's 🔀 answer on PR #493 (item 292): four decisions expire "when a new model joins the ladder". Fable 5.2 joined above every project model's rung, and none of these replays tested a rung above the project's, so the event fired with nothing new to test. Every later ladder rebuild would fire all four again.
- `review: each pass keeps a reviewer of its own`: the merge trials ran on Opus 5.5 at medium. Reword the "Valid" line to name that rung.
- `review: the principles audit runs only in the release review…`: its trial ran on the project's rung. Reword the line to name that rung.
- `routing: a review pass runs below the project's rung only on a rung whose replay of its rounds finds a share of their 🔴 and 🟡 findings no more than a margin below the project's rung's own replay…`: `review-replay` tests only rungs below the project's rung. Have the line expire when those rungs change, the event item 196 names ("until a cheaper model joins the ladder").
- `routing: on a model judge-replay covered, the judge runs…`: the replays tested the project's rung and below, and each rung above it that a review climbs to. Have the line expire when those rungs change.
Recommendation: reword all four as above. They are decisions the repo held before item 292, so the rewording is lilleman's call.
1. Give `review-replay --omit-claude-md` a control. It replays each round three times unchanged and once without `CLAUDE.md`, and prints for each unchanged replay how many findings it missed that the other two found. Each run costs four replays of 10 rounds on the project's model.
2. Run it for every pass that has archived rounds: principles, stability, prose, product-owner and architecture.
3. Report each pass's figures to lilleman, saying whether they change the picture: a pass passes where its count without `CLAUDE.md` is no higher than the highest of its three unchanged counts. The picture changes where stability or principles fails, or another pass passes.
4. Where the picture holds, add `omitClaudeMd: true` to stability-reviewer, and record the figures and the call in the decision above. Where it changes, ask lilleman before changing any agent; lilleman makes the call again from the figures. The hook and the header already serve any agent that has the key.
### 319. Start a fresh session with a brief of the chunk when a rung step changes the worker's model, in place of resuming the old session.
@@ -141,6 +133,17 @@ Probe first that `claude -p "/compact" --resume <id>` compacts a session: the Ag
153 `Judge cost:` entries total $109.76, a median of about $0.76 a verdict at every rung, and the cost follows the size of the records, not the transcript: about 76k characters in log and 188k in claude-config. In 224 of 251 recent verdicts (89%) the evidence sits in the worker's final message. A missed interrupt is the costly error, so the bar is zero changed interrupts and zero new rejections across the replay. The judge is about 4.5% of dollars, so the saving is small; each cycle also gets faster.
### 331. Reword four decisions to expire when the rungs their replays tested change, not whenever a model joins the ladder.
The architect's 🔀 answer on PR #493 (item 292): four decisions expire "when a new model joins the ladder". Fable 5.2 joined above every project model's rung, and none of these replays tested a rung above the project's, so the event fired with nothing new to test. Every later ladder rebuild would fire all four again.
- `review: each pass keeps a reviewer of its own`: the merge trials ran on Opus 5.5 at medium. Reword the "Valid" line to name that rung.
- `review: the principles audit runs only in the release review…`: its trial ran on the project's rung. Reword the line to name that rung.
- `routing: a review pass runs below the project's rung only on a rung whose replay of its rounds finds a share of their 🔴 and 🟡 findings no more than a margin below the project's rung's own replay…`: `review-replay` tests only rungs below the project's rung. Have the line expire when those rungs change, the event item 196 names ("until a cheaper model joins the ladder").
- `routing: on a model judge-replay covered, the judge runs…`: the replays tested the project's rung and below, and each rung above it that a review climbs to. Have the line expire when those rungs change.
lilleman approved rewording all four as above on 2026-11-12.
### 327. Have `larv-review` print a round commit's title prefix, counted from the round's report, and have rule-hook refuse a round title whose counts differ from it.
The 0.8.0 audit (item 284) measured, over the 35 chunks that shipped 0.7.0: 72 commit calls in 33 chunks titled `Answer <pass> round <n>: R 🔴, Y 🟡 (K misread); <what changed>`, about 11k command tokens, most of them the summary. Each worker counts R, Y and K by hand. All three are in the round's report, `<pass>-round-<n>.md` in the review folder: R and Y are its finding headings, and K counts the findings the reviewer marked `[misread]`, as `bin/review_rules/round_titles.py` says. That module parses the counts for `score-outcomes`, which reports them as goal 1.1's signal, and rule-hook's `round_cap.py` checks only the round number, so nothing checks today that the counts match the report. Of the 8 titles whose report the audit could match, none miscounted; one report wrote its markers at line start rather than in `###` headings, so the reports' format varies by reviewer.