diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c1ff570..22b6227d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- A session reads `todo.md`'s items table and the details of only the items its chunk takes, counts `CHANGELOG.md`'s unreleased entries for the chunk's opening line instead of reading them, and reads a `docs/decisions.md` entry only to question, revise or add that decision, as `CLAUDE.md` now says. The last rule moved from `rules/decisions.md`, which loads only once a session opens that file. Expect fewer tokens read before a chunk's first commit. - larv-review's stability and product-owner reviewers report only a defect, a requirement of the plan or the goals that the change breaks, a breach of a technical principle, or for stability a hard place the change touches; the stability reviewer leaves the style of comments to the prose reviewer, which now also reads help and error text. Each architect finding names a concrete later change the PR makes harder, and one that names none is dropped. The prose pass runs only on a chunk that changes prose a reader reads, such as docs, comments, help text or `todo.md`, and skips a code-only chunk. Expect fewer findings and fewer review rounds. - Every `todo.md` item carries a C score, how hard the change is to get right, from 1 to 10, in a column after S. C stays out of the score. `rank_todo.py` fails on an items table without the column, and the rule hook then blocks committing that `todo.md`. Before the next commit that changes a project's `todo.md`, add the column and score every item's C, as `rank_todo.py --help` shows. - The new `bin/score-outcomes` shows what finished chunks measured beside the R, S and C their items were guessed at: lines and files changed, review rounds, and ๐Ÿ”ด and ๐ŸŸก findings. It reads them from the default branch's merge commits, so a project that merges by squash or fast-forward shows none. Given a guess, it lists the 5 finished items guessed nearest. It always reports, for each score, the median outcome at each guessed value, once 10 chunks that each shipped one item record it: R against ๐Ÿ”ด findings, S against lines changed, C against review rounds past each pass's first. A session filing or editing an item runs it and scores R, S and C from what it shows. diff --git a/CLAUDE.md b/CLAUDE.md index 45f6fba2..aa6d6c84 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -10,6 +10,7 @@ How work proceeds in any repo, unless the repo's `AGENTS.md` says otherwise. The - **When the next release has no items left and work has landed towards it, it is finished: stop.** Report what it holds and that it is ready to cut. Under `/loop`, this ends the loop. Until the human cuts it, only a security fix lands, into that release; never start a later release's items or plan a new one. - **Open every chunk with one line:** the last version cut, what is unreleased (`CHANGELOG.md` โ†’ `## Unreleased`, or else the log since the last tag), and the release this chunk ships into. A repo that publishes nothing says so once. - **Read the README's `## Goals` and `## Audience` before starting a chunk, unless your prompt quotes them.** The chunk's items set its scope. The goals choose between ways to deliver those items, and never add to them. +- **Read the plan and the records only as far as the chunk needs.** Of `todo.md`, read the `## Items` table, `sed -n '/^## Items/,/^## Details/p' todo.md`, then the details of only the items the chunk takes. Of `CHANGELOG.md`, the opening line needs only how many entries `## Unreleased` holds. Read an entry of `docs/decisions.md` only to question, revise or add the decision under its title; `AGENTS.md` lists every title. - **Work one chunk at a time, and make it as large as one purpose allows.** Every review has a fixed cost, so a chunk takes the next plan item plus every other item for which three things hold: one PR title states what they achieve together, without listing them; they name one release; and they fire the same review passes (`larv-review` ยง3). Tiny items, a few lines of change each, need neither a shared purpose nor the same passes: bundle up to ten that name one release into one chunk. Split a milestone into items in `todo.md` before starting it. Fix a finding in the chunk's own change within the chunk. File a finding about anything else in `todo.md`. An item marked `question` waits for the human; take the next item. - **Ask, don't guess.** First check whether the goals already answer the question. If they nearly do, propose a change to the goals and show how it answers this case: an answer settles one question, a goal settles every question like it. Write every answer once, where it belongs, never only in chat: a goal in `README.md`, a working rule in `AGENTS.md`, a standing choice in a comment at the one place it governs, or in `docs/decisions.md` once made in more than one place. When an answer holds a goal and a choice, write the goal in the README, and record as a choice only what the goal leaves open. - **Bench a syntax with the people who write it.** Before a new or changed spelling of something users read or write ships โ€” markdown, HTML, a config key, a CLI flag โ€” a panel of fresh-context readers, seated as those users from the README's `## Audience`, picks it. diff --git a/rules/decisions.md b/rules/decisions.md index 8cffaa71..98ed37ee 100644 --- a/rules/decisions.md +++ b/rules/decisions.md @@ -6,6 +6,6 @@ paths: # Decisions: one home, each linked to a goal or a technical principle -**The decision log has one home: `docs/decisions.md`**. A title states the whole decision in one line: what holds at the commit it ships in, in words a reader finds in the code or the plan. `AGENTS.md` lists every title, so a session works by the decisions without loading their background. A session reads the entry under a title only to question, revise or add a decision. The entry holds the background: its date, who made it, the reasoning, and the premise it rests on ("valid while X") so it can expire honestly when that premise dies. +**The decision log has one home: `docs/decisions.md`**. A title states the whole decision in one line: what holds at the commit it ships in, in words a reader finds in the code or the plan. `AGENTS.md` lists every title, so a session works by the decisions without loading their background. The entry holds the background: its date, who made it, the reasoning, and the premise it rests on ("valid while X") so it can expire honestly when that premise dies. **Every decision links to a goal or a technical principle.** An entry names the goal it serves or the technical principle under `~/.claude/principles/` it applies; one that can do neither is a missing goal, and an entry already in the repo with neither behind it is a finding. Propose the goal, never a reason of your own โ€” `~/.claude/CLAUDE.md` โ†’ "Working loop", "Ask, don't guess" says how. An entry working against a goal or a technical principle stands only while it names the `todo.md` item that ends it. diff --git a/todo.md b/todo.md index 33e98b6e..2871568b 100644 --- a/todo.md +++ b/todo.md @@ -24,7 +24,6 @@ | ID | Release | Exempt | Item | R | S | C | A | G | Goals | Score | |---|---|---|---|---|---|---|---|---|---|---| -| 109 | 0.1.0 | | **Lower the reading cost of the files a chunk reads most before its first commit.** | 2 | 4 | 4 | 5 | 6 | 1.4 | 18.5 | | 93 | 0.2.0 | | **Let a chunk's worker start below the project's model, once the archive shows chunks on a lower rung took no more review rounds than chunks on the project's model.** | 3 | 2 | 6 | 6 | 7 | 1.1, 1.4 | 22.4 | | 94 | 0.2.0 | | **Every 20th cycle, have loop-claude measure token spend and routing outcomes, file them here, and interrupt the human only when they call for a routing change.** | 3 | 5 | 6 | 6 | 7 | 1.1, 1.4 | 21.6 | | 88 | 0.2.0 | | **Define one routing ladder of (model, effort) rungs ordered by a published ranking of their competence, and map a task's R + C to a rung relative to the project's model.** | 3 | 4 | 5 | 6 | 7 | 1.4 | 21.4 | @@ -72,10 +71,6 @@ ## Details -### 109. Lower the reading cost of the files a chunk reads most before its first commit. - -`bin/reading-cost` found a rise: the last 5 chunks' median is 136132 new input tokens before their first commit, the 5 before them 56802. Files read most in those 5 chunks (opens and searches): `todo.md` 31, `docs/decisions.md` 20, `CHANGELOG.md` 11, `README.md` 11, `bin/larv_review/test_larv_review.py` 10, `skills/larv-review/SKILL.md` 9, `CLAUDE.md` 7, `agents/stability-reviewer.md` 5, `bin/loop_claude/loop/main.py` 5, `bin/test_rank_todo.py` 5. The chunk that ships this item runs `reading-cost --reset`. - ### 93. Let a chunk's worker start below the project's model, once the archive shows chunks on a lower rung took no more review rounds than chunks on the project's model. Goal 1.1 asks for proven quality, so stepping down waits on the archive's evidence.