From b00158157383f6cdca7ece7530227c3d87c06c93 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 10:57:55 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20prose=20round=201:=200=20=F0=9F=94=B4,?= =?UTF-8?q?=2014=20=F0=9F=9F=A1=20(0=20misread);=20correct=20the=20plan=20?= =?UTF-8?q?items'=20principle=20names=20and=20paths,=20narrow=20the=20deci?= =?UTF-8?q?sions'=20wording,=20and=20state=20the=20no-clone=20routing=20ru?= =?UTF-8?q?le?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/agent_cycle/judge.py | 4 ++-- bin/build_epic/chunk_prompt.py | 2 +- bin/chunk_driver/project/records.py | 2 +- bin/claude_code/output_limits.py | 2 +- docs/decisions.md | 8 ++++---- todo.md | 23 +++++++++++++---------- 6 files changed, 22 insertions(+), 19 deletions(-) diff --git a/bin/agent_cycle/judge.py b/bin/agent_cycle/judge.py index ee5d2a14..5fff7c38 100644 --- a/bin/agent_cycle/judge.py +++ b/bin/agent_cycle/judge.py @@ -60,8 +60,8 @@ FINISHED_RULES = ( "The chunk is the piece of work the worker is on, shipped as one pull request.\n\n" "finished=true when the chunk is complete: merged, or nothing remains that the worker could do on " "its own. Even then, it is finished only once {answers_recorded}.\n\n" - "An answer counts as recorded where the premises or the records above already hold it, the setup's rules " - "(the setup's CLAUDE.md, the setup's rules/, the project's review standards, each headed by its name) included. " + "An answer counts as recorded where the premises or the records above already hold it, or one of the files " + "the judge reads after them: the setup's CLAUDE.md, the setup's rules/, the project's review standards, each headed by its name. " "It also counts where the transcript shows the worker writing it into {answer_destinations}, " "but not into one of the setup's rules.\n\n" "finished=false when work remains that a further run can " diff --git a/bin/build_epic/chunk_prompt.py b/bin/build_epic/chunk_prompt.py index d235fa59..18b20183 100644 --- a/bin/build_epic/chunk_prompt.py +++ b/bin/build_epic/chunk_prompt.py @@ -57,7 +57,7 @@ def fresh(task: str, premises: str, route: Route, project: ProjectRung | None, f # The worker names no plan items: the chunk's one item is its issue. -# The epic's records come first, as its goals do; a chunk without a repo is handed only those and the setup's rules, so the names that mention a repo's then name nothing it reads. +# The epic's records come first, as its goals do; a chunk without a repo is handed only those and the setup's rules, so the names that mention a repo's then don't name anything it reads. NAMES = prompts.RecordNames( quote_sources=listed(("the epic's description", "the repo's goals file's Goals and Audience", *RECORD_FILES, *SETUP_RULE_NAMES), "or"), answer_destinations="the epic's description under ## Decisions, the repo's goals file's Goals or Audience, " + ", ".join(RECORD_FILES) + ", the repo's plan or a comment", diff --git a/bin/chunk_driver/project/records.py b/bin/chunk_driver/project/records.py index 63c1d276..87aa7a16 100644 --- a/bin/chunk_driver/project/records.py +++ b/bin/chunk_driver/project/records.py @@ -11,7 +11,7 @@ from record_store.stores import store WORKING_RULES = ("AGENTS.md", "working-rules") DECISIONS = ("docs/decisions.md", "decisions") RECORD_FILES = (WORKING_RULES[0], DECISIONS[0]) -# The setup's rules, in the order the judge reads them: the setup's CLAUDE.md, each .md file in its rules/, +# The rules the judge reads after the records, in order: the setup's CLAUDE.md, each .md file in the setup's rules/, # then each .md file in the review standards folder the project's config sets. SETUP_RULES_FILE = "CLAUDE.md" SETUP_RULE_DIR = "rules" diff --git a/bin/claude_code/output_limits.py b/bin/claude_code/output_limits.py index 02382da4..0d35ebad 100644 --- a/bin/claude_code/output_limits.py +++ b/bin/claude_code/output_limits.py @@ -2,7 +2,7 @@ A subagent inherits both variables, so the ceiling reaches every reviewer the worker launches.""" -# Claude Code saves a Bash result longer than this many characters to a file, and hands the model the file's path and the first 2,000 characters. The file sits under projects///tool-results/ in the claude's home. +# Claude Code saves a Bash result longer than this many characters to a file, and hands the model the file's path and the first 2,000 characters. The file sits under projects///tool-results/ in the Claude home. BASH_CEILING = "BASH_MAX_OUTPUT_LENGTH" BASH_CEILING_CHARACTERS = 6_000 # A Read of more than this many tokens fails and asks for an offset and a limit; Claude Code's default is 25,000. diff --git a/docs/decisions.md b/docs/decisions.md index 2cb009ca..7b94ef78 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -143,7 +143,7 @@ The cap is 5, `bin/plan/todo_table.py`'s `BUNDLE_MAX_R`, from the same chunks: b 2026-12-04, lilleman's plan for 0.18.0. Serves goal 3. `bin/claude_home` builds the home in the data folder, `~/.local/share/build-release/claude-home`, so the clone stays a clean checkout: the files Claude Code keeps in its home never reach a commit. Only a change made through one of the six links below reaches the clone. `bin/claude_home` links `agents/`, `bin/`, `CLAUDE.md`, `principles/`, `rules/` and `skills/` to the clone's, `bin/` and `principles/` since `setup files: …` below, and writes `settings.json` from the clone's with the clone's path in place of `{clone}`, since the clone may lie anywhere and the tracked file can't hold its path. It builds the home again when the clone's commit or path changes, which covers a release's tag and a development clone alike. Probed on 2.1.336, once, while the home was built: `claude plugin install` finds a plugin only after `claude plugin marketplace add` of its marketplace; each exits 0 where its work is already done; and an install rewrites the home's `settings.json` in Claude Code's key order. Not tested: that a session loads `agents/`, `CLAUDE.md`, `rules/` and `skills/` through links, which needs a model request. -2026-12-04, the release review of 0.18.0, declining the architect's finding that two clones can rebuild one home, with only the README keeping the development clone from repointing a running loop. Serves goal 2. One home per machine is what lets the person sign in once. A program-held guard would have to know which clone is the development one and whether a loop is running, and pass both into `claude_home`. The cost of the README's rule is a chunk that runs on unreleased rules after someone ran the development clone's tool. Valid while one person runs the setup on a machine; two clones that run loops at once would each need a home. +2026-12-04, the release review of 0.18.0, declining the architect's finding that two clones can rebuild one home. Only the README keeps the development clone's `claude_home` from repointing a running loop's home. Serves goal 2. One home per machine is what lets the person sign in once. A program-held guard would have to know which clone is the development one and whether a loop is running, and pass both into `claude_home`. The cost of the README's rule is a chunk that runs on unreleased rules after someone ran the development clone's tool. Valid while one person runs the setup on a machine; two clones that run loops at once would each need a home. ## comprehension floor: every dimension and the overall at the project's readability floor or above is the target, and no score blocks a merge or release @@ -157,7 +157,7 @@ The cap is 5, `bin/plan/todo_table.py`'s `BUNDLE_MAX_R`, from the same chunks: b 2026-11-11, lilleman through item 314. Serves goal 1.4. Claude Code loaded `~/.claude/AGENTS.md` into every other project's sessions, and each 1,000 tokens every thread starts with cost $68.60 of the $9,154 spent from 2026-09-30 to 2026-11-11: the 14.4 KB file cost about 2.1% of spend, and put this repo's rules in front of other projects. Other projects keep the name `AGENTS.md`, so the setup stays portable to other harnesses. The working rules sit there too, rather than in `.claude/rules/`, since build-release's judge reads the decision log and no project's `.claude/rules/`. In the clone, the release's `~/.claude/CLAUDE.md` and the clone's both loaded, about 0.9% of spend; the exclude drops the release's, so a chunk runs under the rules it is changing. A session working in `~/.claude` itself loads no `CLAUDE.md`, since there both are the same file; none works there, as the entry above says. -Valid while `~/.claude` is a checkout of this repo. Item 585 ends it: from 0.18.0 `~/.claude` is an install and the loop's Claude home links no `AGENTS.md`, so the reason is gone, and the item gives this repo an `AGENTS.md` and drops this entry. +Valid while `~/.claude` is a checkout of this repo. Item 585 ends it: from 0.18.0 `~/.claude` is the person's own Claude home, not a checkout of this repo, so the reason is gone. ## deploy: `cut-release` cuts a release through a pull request merged fast-forward only, then tags the merged commit, and `--patch` tags a patch of the newest tag beside `main`, then merges the tag back; the human runs both @@ -689,7 +689,7 @@ Valid while the worker reports in its transcript the triggers that fired, and wh 2026-10-15, lilleman. Serves goals 1.2 and 1.4. -The cost of a cheaper worker shows as extra review rounds and unfinished verdicts. Every 20 cycles across the archive, build-release measures them in code, with no model run (goal 1.4), and interrupts lilleman with the calls not raised before, when chunks routed onto a rung took more of either than chunks routed onto the next rung up, each rung with 5 chunks or more. Five keeps one odd chunk from calling for a change (goal 1.2). It also calls when the reports of 5 or more subagents of one type were longer than the tool results they read, so a delegated search cost the worker more context than it saved. `bin/routing_figures/` measures and words the calls. A loop on another project cannot commit here, so it writes the figures and the calls raised at the archive's root, and this repo's next chunk files the plan item, as `AGENTS.md` says. Off a terminal, a call is said on stderr and the loop goes on: it is about this setup, not the running project's chunk. A reset line in the calls file restarts the figures after a routing change, so they show whether the change worked. +The cost of a cheaper worker shows as extra review rounds and unfinished verdicts. Every 20 cycles across the archive, build-release measures them in code, with no model run (goal 1.4), and interrupts lilleman with the calls not raised before, when chunks routed onto a rung took more of either than chunks routed onto the next rung up, each rung with 5 chunks or more. Five keeps one odd chunk from calling for a change (goal 1.2). It also calls when the reports of 5 or more subagents of one type were longer than the tool results they read, so a delegated search cost the worker more context than it saved. `bin/routing_figures/` measures and words the calls. A loop on another project cannot commit here, so it writes the figures and the calls raised at the archive's root, and this repo's next chunk files the plan item, as `AGENTS.md` says. Off a terminal, a call is said on stderr and the loop goes on: it is about this setup, not the running project's chunk. A machine without the development clone, such as a release-only install, has nowhere to change the decision, so a DM that went out is the last word there and marks the calls raised, and one that failed leaves them to come again; where the project's config names no notifier, the DM is skipped and stderr is what the human gets, since the project asked for no DMs. A reset line in the calls file restarts the figures after a routing change, so they show whether the change worked. Since 2026-10-16 the reviewers may run above the worker's rung, on the one the highest E + I among their chunk's items picks, so chunks whose worker ran on a lower rung may take more rounds from stronger reviewers, and a call could blame the worker's rung for them; `todo.md` item 171 groups the rounds by the reviewers' rung too. Valid while build-release's archive holds every finished chunk's review rounds and unfinished verdicts. @@ -922,7 +922,7 @@ Valid while task-bench's figures are unproven against the panel's scores. The protection lives in Gitea's settings, outside the repo: rule `main`, required status check `CI / tests (pull_request)`. A pull request has no status until CI queues its run, so `cut-release` waits for each check the protection requires rather than reading no status as no checks, for 30 minutes at most. CI runs no rule-hook check, so a `rule-override` in the PR body doesn't have anything to override. Whoever adds a rule check to CI must also let it read the PR body's `rule-override`. Valid while gitea.larvit.se runs a runner labelled `docker-host`. -2026-12-04, the release review of 0.18.0, taking the architect's finding that the first-chunk e2e makes the gate depend on the network. Serves goal 2. `ci.sh` also runs `first-chunk-e2e/run`, which adds two waits of at most 300 s each and needs the network: apt for git and tmux, and `claude plugin marketplace add` for the plugins the setup's `settings.json` enables, taken at the marketplace's head. The e2e keeps both, since it runs a first chunk as a newcomer's install does, and `plugin marketplace add` pins a GitHub source only to a branch or tag with `#`, refuses a commit for the reserved name `claude-plugins-official`, and that repository has no tags, so a ref could only name a branch that moves. A red gate that the network or the marketplace caused is rerun, not fixed. Valid while `anthropics/claude-plugins-official` publishes no tags; once it does, add the marketplace at a tag. +2026-12-04, the release review of 0.18.0, recording the architect's finding that the first-chunk e2e makes the gate depend on the network, and keeping the dependency. Serves goal 2. `ci.sh` also runs `first-chunk-e2e/run`, which adds two waits of at most 300 s each and needs the network: apt for git and tmux, and `claude plugin marketplace add` for the plugins the setup's `settings.json` enables, taken at the marketplace's head. The e2e keeps the apt install and the marketplace head, since it runs a first chunk as a newcomer's install does. Claude Code's documentation says `plugin marketplace add` pins a GitHub source only to a branch or tag with `#`, and refuses a commit for the reserved name `claude-plugins-official`, and that repository has no tags, so a ref could only name a branch that moves. A red gate that the network or the marketplace caused is rerun, not fixed. Valid while `anthropics/claude-plugins-official` publishes no tags; once it does, add the marketplace at a tag. ## 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 diff --git a/todo.md b/todo.md index 9fccb8ae..bfacd14b 100644 --- a/todo.md +++ b/todo.md @@ -118,7 +118,7 @@ Touches: ### 594. Return a `Failure` from the loop's Claude home build where the clone's `settings.json` is malformed or lacks a marketplace, or a file stands where a link belongs, so `unready` prints one line instead of a traceback. -Principle: `principles/technical-principles.md` → "Errors as values, with one error channel". From the principles pass of 0.18.0's release review. +Principle: `principles/technical-principles.md` → "Handle errors explicitly, as values — avoid the exception path", whose third bullet says a function that both returns a result and throws has two error channels. From the principles pass of 0.18.0's release review. Evidence, in `bin/claude_home/home.py`: @@ -135,7 +135,7 @@ Touches: ### 585. Give this repo an `AGENTS.md` like any project, and drop the decision and the rule that say it keeps none. -Answer to question item 584: the decision "deploy: this repo keeps no `AGENTS.md`, since `~/.claude` is its checkout" lost its reason with item 483. A release is a clone anywhere, and the loop's Claude home links only `CLAUDE.md`, `rules/`, `agents/` and `skills/`, so an `AGENTS.md` here no longer loads into another project's session. Without the reason, the special case only costs: each rule that names a project's `AGENTS.md` needs a second reading for this repo. The loop took the recommended option, as "Ask, don't guess" allows for a choice the goals don't reserve; the human unmarks or drops this item to reverse it. +Answer to question item 584: the decision "deploy: this repo keeps no `AGENTS.md`, since `~/.claude` is its checkout" lost its reason with item 483. A release is a clone anywhere, and the loop's Claude home links six files and folders of the clone, none of them `AGENTS.md`, so an `AGENTS.md` here no longer loads into another project's session. Without the reason, the special case only costs: each rule that names a project's `AGENTS.md` needs a second reading for this repo. The loop took the recommended option, as "Ask, don't guess" allows for a choice the goals don't reserve; the human unmarks or drops this item to reverse it. Move the head of `docs/decisions.md`, before `# Decisions`, into a new `AGENTS.md`: the project principles, the decision titles and the working rules. Move "dev-factory's values" there from `skills/comprehension-panel/seat-prompts.md` as the scoring-run values. Drop the decision and `.claude/rules/this-repo-keeps-no-agents-md.md`, and let the tools read this repo as any project. The item waits for 0.18.0's cut: until then this repo is developed beside a `~/.claude` checkout on 0.17.0. @@ -163,7 +163,7 @@ Evidence: - `bin/mutate_changes/test_mutate_changes.py:372-386`: `interrupted` and `assert_ends` poll with sleeps. - `bin/mutate_changes/test_mutate_changes_runs.py:299, 306` poll with sleeps. -The tests are slow and flake on a loaded runner. Wait on an event instead: `os.pidfd_open` with `select`, or a pipe the child writes to, and `Popen.wait(timeout=...)` only as the backstop that fails the test. Items 102 and 456 cover other places: test_black_box.py's `sitecustomize` swaps and the `ChildShells` race. +A wait that polls, or a bound on elapsed time, fails on a loaded runner without a defect in the code. Wait on an event instead: `os.pidfd_open` with `select`, or a pipe the child writes to, and `Popen.wait(timeout=...)` only as the backstop that fails the test. Items 102 and 456 cover other places: test_black_box.py's `sitecustomize` swaps and the `ChildShells` race. L 3, since the change spans three packages and brings a new waiting pattern. E 2, since a wait that still races shows only under load. @@ -176,9 +176,9 @@ Touches: ### 591. Let an environment variable name the setup's development clone, with `~/code/dev-factory` as its default, documented in README's Install and build-release's `--help`. -Principle: `principles/technical-principles.md` → "Sane defaults": config is never hardcoded, and a documented option changes it. From the principles pass of 0.18.0's release review. +Principle: `principles/technical-principles.md` → "Sane defaults, where a default serves better than an explicit ask": a default is one the caller can change through a `--help` line or a documented option. From the principles pass of 0.18.0's release review. -Evidence: `bin/loop_state/paths.py:92` sets `config_clone=home / "code" / "dev-factory"` with no override. README's Install says only to develop "in a clone under ~/code", and `usage.py:162` names the path. A clone kept under another name or folder reads as absent, so `routing_check.py` never puts its routing calls to a claude. +Evidence: `bin/loop_state/paths.py:92` sets `config_clone=home / "code" / "dev-factory"` with no override. README's Install clones it to `~/code/dev-factory` and names no option, and `usage.py:162` names the path. A clone kept under another name or folder reads as absent, so `routing_check.py` never puts its routing calls to a claude. Read the path from an environment variable, as `paths.py` reads the XDG folders, and name the variable where the path is named today. The variable's name is a spelling users write: a panel picks it, as `CLAUDE.md` → "Working loop", "Bench a syntax with the people who write it" asks. @@ -188,12 +188,15 @@ Touches: - `bin/loop_state/test_paths.py`: `SetupFolders` (small) - `bin/build_release/loop/usage.py`: `HELP` (small) - `README.md`: `## Install` (small) +- `README.md`: `lines 211-217` (small) +- `CLAUDE.md`: `## Vocabulary` (small) +- `bin/self_update/main.py`: `lines 5-9` (small) ### 595. Move the five dated study folders at the repo's root under one folder named for what it holds, so the root shows the entry points first. -Principle: `principles/technical-principles.md` → "About seven things per level" and "Entry point first". From the principles pass of 0.18.0's release review. +Principle: `principles/technical-principles.md` → "About seven things per level, so a reader new to the project can take in each level at once" and "Make the entry point the first thing a newcomer finds". From the principles pass of 0.18.0's release review. -Evidence: the root holds about 14 folders and 9 files. Five are dated one-off studies: `workflow-bench/`, `reviewer-merge-trials/`, `judge-field-trials/`, `stability-skip-count/` and `presentation/`. A newcomer sorts past them to reach `bin/`, `ci.sh` and the README. +Evidence: the root holds about 14 folders and 9 files. Five are dated, one-off material: four studies, `workflow-bench/`, `reviewer-merge-trials/`, `judge-field-trials/` and `stability-skip-count/`, and the talk's page `presentation/`. A newcomer sorts past them to reach `bin/`, `ci.sh` and the README. Move the five under one folder named for what is inside, such as `studies/`, and update every path that names them. Item 392 regroups only `bin/`, and item 68 only tests workflow-bench. @@ -201,7 +204,7 @@ L 3, since the paths are named across several packages, and I 2, since `review_p Touches: -- `README.md`: `(top)` (small) +- `README.md`: `lines 17-17`, `lines 271-271`, `lines 294-294`, `lines 339-339` (small) - `.gitignore` - `bin/review_rules/review_passes.py`: `INSTRUCTION_FILES` (small) - `bin/review_rules/test_review_passes.py` @@ -246,7 +249,7 @@ Evidence: `bin/repo_checks/test_settings.py:20` requires `json.dumps(indent=2, s Pin `indent="\t"` and re-indent `settings.json`. Where something needs the spaces, such as a tool that rewrites the file, keep them and record that decision instead. -The report's 🟢 goes with it: the tests at :22 and :34 loop over cases without `subTest`, so the first failure hides the rest. +The same file's tests at :22 and :34 loop over cases without `subTest`, so the first failure hides the rest. Touches: @@ -353,7 +356,7 @@ Name the entry and the Dockerfile line. Source the secret-name list from a widel ### 462. Run under `mutate-changes` the tests that today fail in mutmut's copy of the tree, so a mutant of a line only they cover is killed. -Found while shipping item 461: `mutate-changes` printed `23 mutants on changed lines, 18 not killed. Left out the tests that fail without a mutant, in build_epic/test_main.py, larv_review/test_larv_review.py, larv_review/test_scoring_setup.py, plan/test_ranking.py, repo_checks/…, review_rules/test_review_passes.py, review_rules/test_reviewer_context.py, rule_hook/test_rule_hook.py, test_settings_filter.py`. All 18 survivors were in `bin/larv_review/scoring_setup.py`: `prepare_scoring`, whose tests are among those left out, so the chunk checked four of them by hand and left 14 unchecked. Find why each left-out test fails in mutmut's copy, such as a path to `skills/` or a git checkout it expects, and make it pass there, or report under the count which changed lines no remaining test covers. +Found while shipping item 461: `mutate-changes` printed `23 mutants on changed lines, 18 not killed. Left out the tests that fail without a mutant, in do_epic/test_main.py, larv_review/test_larv_review.py, larv_review/test_scoring_setup.py, plan/test_ranking.py, repo_checks/…, review_rules/test_review_passes.py, review_rules/test_reviewer_context.py, rule_hook/test_rule_hook.py, test_settings_filter.py` (`do_epic/` is `build_epic/` since 0.18.0). All 18 survivors were in `bin/larv_review/scoring_setup.py`: `prepare_scoring`, whose tests are among those left out, so the chunk checked four of them by hand and left 14 unchecked. Find why each left-out test fails in mutmut's copy, such as a path to `skills/` or a git checkout it expects, and make it pass there, or report under the count which changed lines no remaining test covers. Item 536 met the same gap: `deploy_release/test_deploy_release.py` runs `deploy-release` as a subprocess, and those tests fail in mutmut's copy, so only its in-process tests ran, and 530 of 590 mutants of `bin/deploy_release/` went unchecked.