From bff8872e9b30b71d32b1fa6c6a17891700e740b3 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 19:02:33 +0200 Subject: [PATCH 1/8] Append the reading-cost figure of the last finished chunk --- docs/reading-cost.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/reading-cost.md b/docs/reading-cost.md index 2a64d35f..5e3c4762 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -677,3 +677,7 @@ Read most (opens and searches): Read most (opens and searches): - `rules/decisions.md` 1 + +## Reading cost, chunk 299b4aa74f32, finished 2026-10-21T16:53:41Z + +250555 new input tokens before the first commit. -- 2.52.0 From 1a1da8f94dd593d3788babacdce823248a97a466 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 19:02:38 +0200 Subject: [PATCH 2/8] Retitle the comprehension-floor decision to say the floor doesn't block anything, define the comprehension terms and explain OVERRIDE --- AGENTS.md | 2 +- CLAUDE.md | 5 +++++ bin/rule_hook/rules.py | 2 ++ docs/decisions.md | 2 +- todo.md | 23 ++++------------------- 5 files changed, 13 insertions(+), 21 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 67c7940b..f15753ee 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,7 @@ Decisions live in `docs/decisions.md`: -- larv-review: a project lifting itself to the comprehension floor starts at the lowest dimension +- larv-review: a chunk lifting a project towards the comprehension floor works first on the project's lowest-scoring dimension, and the floor blocks nothing - loop-claude: a judge decides each interrupt and each quoted answer from the transcript, the README's premises, `AGENTS.md`, `docs/decisions.md`, `~/.claude/CLAUDE.md`, `~/.claude/rules/` and larv-review's standards, and holds a chunk open while an answer the human typed in it is recorded nowhere; the worker's own account of which goal settles a choice decides nothing - loop-claude: one session per project, its id derived from the checkout's path relative to `~/code`, or to `/` outside it - loop-claude: before it opens claude on the terminal, it marks the checkout and each of its worktrees trusted in `~/.claude.json` diff --git a/CLAUDE.md b/CLAUDE.md index c2d75402..3dabd138 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -109,13 +109,18 @@ The rules only reviewers apply, for quality, comments, READMEs and prose, live i - **gate** — the merge gate: the checks a PR passes before it merges. - **interrupt** — `loop-claude` asking the human, on its terminal, for a decision that is theirs. They type a one-line answer, or `/talk` to open the worker's session with `claude --resume`; a release ready to cut opens that session at once, and a routing call opens claude in `~/.claude`. - **judge** — the headless claude that reads a worker's transcript each cycle and decides whether to interrupt and whether the chunk is finished. +- **judge's records** — the files the judge reads beside the README's premises: the project's `AGENTS.md` and `docs/decisions.md`, then the human's `CLAUDE.md` and the `.md` files in `rules/` and `skills/larv-review/standards/`. +- **paired ruling** — each simulated reader votes whether the project reads better, the same or worse at the branch's head than at the base commit, the last measured one. A ruling needs a lead of two or more votes, else it is same. - **pass** — one kind of review a chunk may take, run in rounds by its reviewers until clean; `larv-review` §3 lists them. +- **place** — the smallest unit a simulated reader names as hard to read: a function or a section heading, with its `path:line`. - **plan** — `todo.md`. - **premises** — the goals and audience under `## Goals` and `## Audience` in the project's `README.md`, with code health ("Shared goal") first among the goals unless the README voids it. - **project's rung** — the cheapest rung on loop-claude's routing ladder of the project's model, which is the model loop-claude's prompt names as the project's, or else your own. - **release** — a semver version the human cuts. - **reviewer** — a reporter of findings: an agent under `~/.claude/agents/`, `/security-review` or a forge's auto-reviewer. - **round cap** — the rounds one pass may take per chunk; `larv-review` §3 → "Round cap". +- **scoring run** — four simulated readers (Junior A, Mid A, the maintainability senior and the inherited architect) each score the project from 1 to 10, overall and on four dimensions: Navigation, Locality, Shape and Self-sufficiency. `larv-review needs-scoring-run` says when one is due. +- **seat** — one simulated reader of the comprehension panel, launched per `~/.claude/skills/comprehension-panel/SKILL.md`, that reads the whole project, not the diff. - **session** — a Claude Code session: one id, what `claude --resume` continues. - **trigger** — the condition under which a review pass runs on a change it has not seen; `larv-review` §3 lists them. - **worker** — the headless claude that runs the task in a cycle, in the chunk's session. diff --git a/bin/rule_hook/rules.py b/bin/rule_hook/rules.py index f8822339..0fd2f4d7 100644 --- a/bin/rule_hook/rules.py +++ b/bin/rule_hook/rules.py @@ -61,6 +61,8 @@ RULES: dict[RuleName, Rule] = { "a git commit in a checkout whose todo.md has changes", ), } +# The lookahead ends each reason at the next marker on its line, or at the line's end. The reason is lazy, so it stops there rather than at the last marker. +# An HTML marker's closing `-->` stays in its reason; `overrides` strips it. OVERRIDE = re.compile(r"(?:#|` is stripped.** | 1 | 2 | 1 | 2 | 1 | code health by 4, 1.4 by 4 | 35.1 | | 114 | 0.3.0 | | decision | **Run git through `git_repo.py` in `rule_hook`, `metric_bench`, `reading_cost`, `review_replay` and `loop_claude`, keeping rule-hook's guards as an option, so one module owns how a tool runs git.** | 3 | 1 | 3 | 5 | 4 | code health by 9, 1.4 by 9 | 32.9 | | 120 | 0.3.0 | | | **Rewrite larv-review §3's "Round cap" and "Re-entry" as one table that says, for each kind of fix, which passes rerun and what a round reviews.** | 2 | 2 | 3 | 5 | 4 | code health by 6, 1.2 by 6, 1.4 by 6 | 26.0 | | 21 | 0.3.0 | | defect | **Give `settings.json`'s model one writer, and sort its keys.** | 3 | 3 | 3 | 7 | 3 | 2 by 5 | 22.5 | @@ -94,21 +91,9 @@ ## Details -### 119. Retitle the comprehension-floor decision so it says a chunk lifting a project towards the floor works first on its lowest-scoring dimension, and that the floor blocks nothing. - -Today's title, "a project lifting itself to the comprehension floor starts at the lowest dimension", reads as either where the project scores or where work begins. Beside the title saying the check blocks no merge, a reader cannot tell whether `Floor:` means stop; a seat named `AGENTS.md:5` among the places it found hard. "First" means within such a chunk, not across a release: since the decision's 2026-10-16 line, items that lift the lowest dimension compete with the others like any item. - -### 127. Define seat, place, paired ruling, scoring run and the judge's records in `CLAUDE.md` → "Vocabulary". - -Two seats of PR #257's scoring run assembled these terms from four files: `bin/larv_review/main.py`'s help, `skills/larv-review/SKILL.md:99`, `bin/comprehension_history.py:82` and `skills/comprehension-panel/seat-prompts.md`. "Records" is defined only in a comment at `bin/loop_claude/project/records.py:6`. - -### 129. Explain `bin/rule_hook/rules.py`'s `OVERRIDE` pattern beside it: why the reason is lazy, what the lookahead splits and why `-->` is stripped. - -The maintainability senior of PR #257's scoring run named `bin/rule_hook/rules.py:49` `OVERRIDE`: nothing in the code explains the pattern. Make `OVERRIDE` easier to read. - ### 114. Run git through `git_repo.py` in `rule_hook`, `metric_bench`, `reading_cost`, `review_replay` and `loop_claude`, keeping rule-hook's guards as an option, so one module owns how a tool runs git. -Shape is the lowest dimension, so this item moves code health by 9, per `docs/decisions.md` → `larv-review: a project lifting itself to the comprehension floor starts at the lowest dimension`. +Shape is the lowest dimension, so this item moves code health by 9, per `docs/decisions.md` → `larv-review: a chunk lifting a project towards the comprehension floor works first on the project's lowest-scoring dimension, and the floor blocks nothing`. The comprehension seats on PR #254 found five git runners with different contracts: `git_repo.git`, `rule_hook/git.py`'s guarded one, `metric_bench/main.py`'s, `reading_cost/main.py`'s `located` and `loop_claude/effects.py`'s. PR #276 added a sixth, `review_replay/main.py`'s `git`. The inherited architect of PR #257's scoring run named `bin/git_repo.py:8` `git` again. Make `git_repo.git` easier to read. @@ -216,7 +201,7 @@ The README line covers the bench's transcripts in `workflow-bench/logs/` too (go ### 125. Give "record", "outcome" and "places" one meaning each across `bin/`, and rename `bin/larv_review/git.py` by what it holds. -Shape is the lowest dimension, so this item moves code health by 9, per `docs/decisions.md` → `larv-review: a project lifting itself to the comprehension floor starts at the lowest dimension`. +Shape is the lowest dimension, so this item moves code health by 9, per `docs/decisions.md` → `larv-review: a chunk lifting a project towards the comprehension floor works first on the project's lowest-scoring dimension, and the floor blocks nothing`. The inherited architect of PR #257's scoring run named `bin/reading_cost/measure.py:16` `Reading` and `bin/larv_review/git.py:6` `history_changes`, and found each word used for several concepts. "Record": the history writer `larv_review/record.py`, the judge's `loop_claude/project/records.py`, and `reading_cost/figures.py`'s `RECORD`. "Outcome": `transcript_archive/outcomes.py`, `score_outcomes/outcomes.py` `Outcome` and `rule_hook/rules.py` `Outcome`. "Places": `comprehension_history.Place` and `Reading.places`. `larv_review/git.py` holds history logic, not a git runner. Make `Reading` and `history_changes` easier to read. @@ -242,7 +227,7 @@ Three seats of PR #257's scoring run named `bin/comprehension_history.py:106` `l ### 124. Group the shared modules at `bin/`'s root into packages named by purpose, so the root holds only launchers and stand-alone tools. -Shape is the lowest dimension, so this item moves code health by 9, per `docs/decisions.md` → `larv-review: a project lifting itself to the comprehension floor starts at the lowest dimension`. +Shape is the lowest dimension, so this item moves code health by 9, per `docs/decisions.md` → `larv-review: a chunk lifting a project towards the comprehension floor works first on the project's lowest-scoring dimension, and the floor blocks nothing`. PR #257's scoring run put Shape at 6.25, the lowest dimension. `bin/` holds about 30 entries: 6 launchers, 6 tool packages, 3 shared packages and 15 root modules. Two root modules are tools (`rank_todo.py`, `statusline.py`) and 13 are shared libraries, and nothing in the layout tells them apart; only README's import-root paragraph maps them. Candidate packages: git running and parsing, the todo table with `rank_todo.py`'s formula language and goal weighing, and the comprehension history with round titles. `rank_todo.py` keeps its path, which every project's rules name. The `.gitignore` allowlist and README follow the move. @@ -442,7 +427,7 @@ The key names the project's session, archive folder and models entry. `project_k ### 155. Lower the reading cost of the files a chunk reads most before its first commit. -`bin/reading-cost` on 2026-10-18: the median of the last 5 chunks is 163,028 new input tokens before their first commit, up from 100,998 for the 5 before them. Read most over the last 5, by opens and searches: `rules/decisions.md` 1. The chunk that ships this item runs `bin/reading-cost --reset`. +`bin/reading-cost` on 2026-10-21: the median of the last 5 chunks is 163,028 new input tokens before their first commit, up from 133,110 for the 5 before them. Read most over the last 5, by opens and searches: `rules/decisions.md` 1. The chunk that ships this item runs `bin/reading-cost --reset`. ### 51. Hand loop-claude's terminal output to an injected effect, so no storage or retry function prints. -- 2.52.0 From b20dc28f5b5759b1e5e9415f580c6f1119ae6849 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 19:19:59 +0200 Subject: [PATCH 3/8] =?UTF-8?q?Answer=20principles=20round=201:=201=20?= =?UTF-8?q?=F0=9F=94=B4,=206=20=F0=9F=9F=A1;=20correct=20the=20OVERRIDE=20?= =?UTF-8?q?comment,=20scope=20the=20floor=20title=20to=20the=20chunk=20and?= =?UTF-8?q?=20file=20the=20citation=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 2 +- CLAUDE.md | 12 ++++++------ bin/rule_hook/rules.py | 2 +- docs/decisions.md | 2 +- todo.md | 13 +++++++++---- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index f15753ee..522a3988 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,7 @@ Decisions live in `docs/decisions.md`: -- larv-review: a chunk lifting a project towards the comprehension floor works first on the project's lowest-scoring dimension, and the floor blocks nothing +- larv-review: within a chunk lifting a project towards the comprehension floor, work on the project's lowest-scoring dimension comes first, and the floor doesn't block anything - loop-claude: a judge decides each interrupt and each quoted answer from the transcript, the README's premises, `AGENTS.md`, `docs/decisions.md`, `~/.claude/CLAUDE.md`, `~/.claude/rules/` and larv-review's standards, and holds a chunk open while an answer the human typed in it is recorded nowhere; the worker's own account of which goal settles a choice decides nothing - loop-claude: one session per project, its id derived from the checkout's path relative to `~/code`, or to `/` outside it - loop-claude: before it opens claude on the terminal, it marks the checkout and each of its worktrees trusted in `~/.claude.json` diff --git a/CLAUDE.md b/CLAUDE.md index 3dabd138..f9eba8c8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -105,22 +105,22 @@ The rules only reviewers apply, for quality, comments, READMEs and prose, live i ## Vocabulary - **chunk** — the unit of work, shipped as one PR; "Working loop" says what it holds. -- **cycle** — in `loop-claude`, worker runs and the judge's verdict on each, until the chunk closes or is left for the next cycle. In between, the human answers any interrupt, or the worker resumes with an answer the judge quoted from `README.md`, `AGENTS.md`, `docs/decisions.md`, `~/.claude/CLAUDE.md`, `~/.claude/rules/` or `~/.claude/skills/larv-review/standards/`. +- **cycle** — in `loop-claude`, worker runs and the judge's verdict on each, until the chunk closes or is left for the next cycle. In between, the human answers any interrupt, or the worker resumes with an answer the judge quoted from `README.md` or the judge's records. - **gate** — the merge gate: the checks a PR passes before it merges. - **interrupt** — `loop-claude` asking the human, on its terminal, for a decision that is theirs. They type a one-line answer, or `/talk` to open the worker's session with `claude --resume`; a release ready to cut opens that session at once, and a routing call opens claude in `~/.claude`. - **judge** — the headless claude that reads a worker's transcript each cycle and decides whether to interrupt and whether the chunk is finished. -- **judge's records** — the files the judge reads beside the README's premises: the project's `AGENTS.md` and `docs/decisions.md`, then the human's `CLAUDE.md` and the `.md` files in `rules/` and `skills/larv-review/standards/`. -- **paired ruling** — each simulated reader votes whether the project reads better, the same or worse at the branch's head than at the base commit, the last measured one. A ruling needs a lead of two or more votes, else it is same. +- **judge's records** — the files the judge reads beside the README's premises: the project's `AGENTS.md` and `docs/decisions.md`, then the human's `~/.claude/CLAUDE.md` and the `.md` files in `~/.claude/rules/` and `~/.claude/skills/larv-review/standards/`. +- **paired ruling** — the seats vote whether the project reads better, the same or worse at the branch's head than at the base, the commit `larv-review ruling-base` prints; `larv-review --help` says how the votes make the ruling. - **pass** — one kind of review a chunk may take, run in rounds by its reviewers until clean; `larv-review` §3 lists them. -- **place** — the smallest unit a simulated reader names as hard to read: a function or a section heading, with its `path:line`. +- **place** — the smallest addressable unit, such as a function or a section heading, that a seat names with its `path:line` when it judges how hard the project is to read there. - **plan** — `todo.md`. - **premises** — the goals and audience under `## Goals` and `## Audience` in the project's `README.md`, with code health ("Shared goal") first among the goals unless the README voids it. - **project's rung** — the cheapest rung on loop-claude's routing ladder of the project's model, which is the model loop-claude's prompt names as the project's, or else your own. - **release** — a semver version the human cuts. - **reviewer** — a reporter of findings: an agent under `~/.claude/agents/`, `/security-review` or a forge's auto-reviewer. - **round cap** — the rounds one pass may take per chunk; `larv-review` §3 → "Round cap". -- **scoring run** — four simulated readers (Junior A, Mid A, the maintainability senior and the inherited architect) each score the project from 1 to 10, overall and on four dimensions: Navigation, Locality, Shape and Self-sufficiency. `larv-review needs-scoring-run` says when one is due. -- **seat** — one simulated reader of the comprehension panel, launched per `~/.claude/skills/comprehension-panel/SKILL.md`, that reads the whole project, not the diff. +- **scoring run** — each seat scores the project from 1 to 10, overall and on each dimension. `larv-review` §3 → "Comprehension check" says which seats score and when one is due. +- **seat** — one simulated reader of the comprehension panel, launched per `~/.claude/skills/comprehension-panel/SKILL.md`. - **session** — a Claude Code session: one id, what `claude --resume` continues. - **trigger** — the condition under which a review pass runs on a change it has not seen; `larv-review` §3 lists them. - **worker** — the headless claude that runs the task in a cycle, in the chunk's session. diff --git a/bin/rule_hook/rules.py b/bin/rule_hook/rules.py index 0fd2f4d7..9a3c9a81 100644 --- a/bin/rule_hook/rules.py +++ b/bin/rule_hook/rules.py @@ -61,7 +61,7 @@ RULES: dict[RuleName, Rule] = { "a git commit in a checkout whose todo.md has changes", ), } -# The lookahead ends each reason at the next marker on its line, or at the line's end. The reason is lazy, so it stops there rather than at the last marker. +# The lookahead ends each reason at the next marker on its line, or at the line's end. The reason is lazy, so it stops at the next marker instead of running on and swallowing the markers after it. # An HTML marker's closing `-->` stays in its reason; `overrides` strips it. OVERRIDE = re.compile(r"(?:#|