From 0b8d5ac39689c8bb2dbcb5e1ef41bf1c805ea883 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 04:05:58 +0100 Subject: [PATCH 01/19] Ignore only what the repo generates, in place of the allowlist --- .gitignore | 232 +----------------------------- README.md | 9 -- bin/build_epic/test_main.py | 2 +- bin/repo_checks/test_gitignore.py | 41 +++--- 4 files changed, 23 insertions(+), 261 deletions(-) diff --git a/.gitignore b/.gitignore index 7ff73b1a..50ac1cb0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,227 +1,5 @@ -# Allowlist: Claude Code writes credentials (.credentials.json), full session -# transcripts (projects/, history.jsonl), memory files and shell env dumps -# into this directory, and each release adds more. Ignore everything, then -# un-ignore authored config only. -* - -!.gitignore -!CHANGELOG.md -!CLAUDE.md -!LICENSE.md -!README.md -!ci.sh -!settings.json -!todo.md - -!.claude/ -!.claude/rules/ -!.claude/rules/*.md -!.claude/settings.json -!.gitea/ -!.gitea/workflows/ -!.gitea/workflows/*.yml -!agents/ -!agents/*.md -!bin/ -!bin/adf_codec/ -!bin/adf_codec/*.py -!bin/adf_codec/node_shim/ -!bin/adf_codec/node_shim/Dockerfile -!bin/adf_codec/node_shim/package-lock.json -!bin/adf_codec/node_shim/package.json -!bin/adf_codec/node_shim/shim.mjs -!bin/agent_cycle/ -!bin/agent_cycle/*.py -!bin/atlassian/ -!bin/atlassian/*.py -!bin/branch_chunks/ -!bin/branch_chunks/*.py -!bin/build-epic -!bin/build-epic-e2e -!bin/build-release -!bin/build_epic/ -!bin/build_epic/*.py -!bin/build_epic/backend/ -!bin/build_epic/backend/*.py -!bin/build_epic/e2e/ -!bin/build_epic/e2e/*.py -!bin/build_release/ -!bin/build_release/**/ -!bin/build_release/**/*.py -!bin/chunk-pr -!bin/chunk-preflight -!bin/chunk_driver/ -!bin/chunk_driver/*.py -!bin/chunk_driver/project/ -!bin/chunk_driver/project/*.py -!bin/chunk_pr/ -!bin/chunk_pr/*.py -!bin/chunk_preflight/ -!bin/chunk_preflight/*.py -!bin/claude_code/ -!bin/claude_code/*.py -!bin/claude_home/ -!bin/claude_home/*.py -!bin/command-patterns -!bin/command_lines/ -!bin/command_lines/*.py -!bin/command_patterns/ -!bin/command_patterns/*.py -!bin/compress-archives -!bin/compress_archives/ -!bin/compress_archives/*.py -!bin/cut-release -!bin/cut_release/ -!bin/cut_release/*.py -!bin/failure.py -!bin/forge/ -!bin/forge/*.py -!bin/git_cli/ -!bin/git_cli/*.py -!bin/judge-replay -!bin/judge_replay/ -!bin/judge_replay/*.py -!bin/larv-review -!bin/larv_review/ -!bin/larv_review/*.py -!bin/loop_effects/ -!bin/loop_effects/*.py -!bin/loop_state/ -!bin/loop_state/*.py -!bin/machine_load/ -!bin/machine_load/*.py -!bin/markdown-section -!bin/markdown_section/ -!bin/markdown_section/*.py -!bin/metric-bench -!bin/metric_bench/ -!bin/metric_bench/*.py -!bin/model_routing/ -!bin/model_routing/*.py -!bin/model_routing/routing-ladder.json -!bin/mutate-changes -!bin/mutate_changes/ -!bin/mutate_changes/*.py -!bin/notifier/ -!bin/notifier/*.py -!bin/notify -!bin/plan/ -!bin/plan/*.py -!bin/plan_store/ -!bin/plan_store/*.py -!bin/project-config -!bin/project-record -!bin/project_config/ -!bin/project_config/*.py -!bin/project_record/ -!bin/project_record/*.py -!bin/rank_todo.py -!bin/reading-cost -!bin/reading_cost/ -!bin/reading_cost/*.py -!bin/record_store/ -!bin/record_store/*.py -!bin/release_plan/ -!bin/release_plan/*.py -!bin/repo_checks/ -!bin/repo_checks/*.py -!bin/rest_client/ -!bin/rest_client/*.py -!bin/review-replay -!bin/review_replay/ -!bin/review_replay/*.py -!bin/review_rules/ -!bin/review_rules/*.py -!bin/routing_figures/ -!bin/routing_figures/*.py -!bin/rule-hook -!bin/rule_hook/ -!bin/rule_hook/*.py -!bin/run-heavy -!bin/run-tests -!bin/run_heavy/ -!bin/run_heavy/*.py -!bin/run_heavy/path_entry/ -!bin/run_heavy/path_entry/docker -!bin/run_tests/ -!bin/run_tests/*.py -!bin/rung_replay/ -!bin/rung_replay/*.py -!bin/score-outcomes -!bin/score_outcomes/ -!bin/score_outcomes/*.py -!bin/self-update -!bin/self_update/ -!bin/self_update/*.py -!bin/setup.cfg -!bin/statusline.py -!bin/subagent-rung -!bin/subagent_rung/ -!bin/subagent_rung/*.py -!bin/task-bench -!bin/task_bench/ -!bin/task_bench/**/ -!bin/task_bench/**/*.py -!bin/task_bench/figures/gather-prompt.md -!bin/test_*.py -!bin/text_files/ -!bin/text_files/*.py -!bin/todo-item -!bin/todo_item/ -!bin/todo_item/*.py -!bin/touch-predictions -!bin/touch_predictions/ -!bin/touch_predictions/*.py -!bin/transcript_archive/ -!bin/transcript_archive/*.py -!bin/wait-for -!bin/wait_for/ -!bin/wait_for/*.py -!docs/ -!docs/*.md -!judge-field-trials/ -!judge-field-trials/*.py -!judge-field-trials/README.md -!presentation/ -!presentation/README.md -!presentation/build-pdf.py -!presentation/index.html -!presentation/render-pdf.js -!principles/ -!principles/*.md -!reviewer-merge-trials/ -!reviewer-merge-trials/*-reviewer.md -!reviewer-merge-trials/*.py -!reviewer-merge-trials/README.md -!reviewer-merge-trials/cases-*.json -!rules/ -!rules/*.md -!skills/ -!skills/comprehension-panel/ -!skills/comprehension-panel/*.md -!skills/larv-review/ -!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 -!task-bench-image/ -!task-bench-image/Dockerfile -!workflow-bench/ -!workflow-bench/advisor-judge-prompt.md -!workflow-bench/advisor-run-prompt.md -!workflow-bench/advisor_bench.py -!workflow-bench/bench.py -!workflow-bench/compare-prompt.md -!workflow-bench/compare.py -!workflow-bench/handoff-brief-prompt.md -!workflow-bench/handoff-resume-prompt.md -!workflow-bench/handoff_bench.py -!workflow-bench/review_git.py -!workflow-bench/run-prompt.md -!workflow-bench/setup.cfg -!workflow-bench/test_advisor_bench.py -!workflow-bench/test_bench.py -!workflow-bench/test_handoff_bench.py -!workflow-bench/test_review_git.py +# What the repo's own tools generate: Python bytecode, and the clones, reports, +# logs and rulings a workflow-bench run leaves in its folder. +__pycache__/ +workflow-bench/*-[0-9]*.md +workflow-bench/*/ diff --git a/README.md b/README.md index 5bf0b96b..0128dc92 100644 --- a/README.md +++ b/README.md @@ -328,12 +328,3 @@ The commands in this section name their tools bare, as Tools says. CI runs `ci.s To mutation-test the lines a branch changes, run `run-heavy mutate-changes --prefix 'uvx --python "$(command -v python3)" --with pytest==9.2.0 --from "mutmut>=3,<4"'` in its checkout. To bench how hard the code is to fix a bug in, build the image first, with `run-heavy docker build --quiet --memory 2g --memory-swap 2g -t claude-config-task-bench task-bench-image`. Then run `task-bench --image claude-config-task-bench --prefix 'uvx --python "$(command -v python3)" --with pytest==9.2.0 --from "mutmut>=3,<4"' --test 'python -m pytest -q -p no:cacheprovider -n 4 bin --ignore=bin/adf_codec --ignore=bin/run_tests --ignore=bin/repo_checks/test_types.py --deselect bin/plan/test_touches.py::PredictedTest --deselect bin/loop_effects/test_effects.py::ChildShells'` in this checkout, under `run-heavy`. A scoring run starts it with `--record-figures` added. The bench runs the tests with no network, so the image holds everything they need. The `--test` leaves out the tests that need docker or `uvx`, and `ChildShells`, which needs `docker run --init` to reap its processes: `bin/run-tests` on the host runs those. - -## Tracking a new file - -`.gitignore` is an allowlist. Track a file by negating it and its parent directories, then confirm with `git check-ignore -v `: - -``` -!docs/ -!docs/*.md -``` diff --git a/bin/build_epic/test_main.py b/bin/build_epic/test_main.py index d8b97048..c2773403 100644 --- a/bin/build_epic/test_main.py +++ b/bin/build_epic/test_main.py @@ -124,7 +124,7 @@ class TheLauncher(unittest.TestCase): ran = subprocess.run([str(launcher), "--help"], capture_output=True, text=True, timeout=60) self.assertEqual((ran.returncode, ran.stdout.split(" ", 2)[2]), (0, main.HELP + "\n")) tracked = subprocess.run(["git", "ls-files", "--error-unmatch", launcher.name], capture_output=True, cwd=launcher.parent) - self.assertEqual(tracked.returncode, 0, "bin/build-epic is not in the repo; .gitignore lists what it keeps") + self.assertEqual(tracked.returncode, 0, "bin/build-epic is not in the repo") class TheCommand(BuildEpicTest): diff --git a/bin/repo_checks/test_gitignore.py b/bin/repo_checks/test_gitignore.py index 90c8991f..8d30d549 100644 --- a/bin/repo_checks/test_gitignore.py +++ b/bin/repo_checks/test_gitignore.py @@ -7,33 +7,22 @@ sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) from repo_checks import ROOT -PRIVATE = [ - ".claude/settings.local.json", - ".credentials.json", - "auto-mode-transcripts/a.jsonl", - "backups/.claude.json.backup.1", - "daemon-auth-status.json", - "daemon.log", - "daemon/control.key", - "debug/a.txt", - "file-history/a/b.md", - "history.jsonl", - "jobs/a/b.json", - "memory/MEMORY.md", - "paste-cache/a.txt", - "projects/-home-a/a.jsonl", - "projects/-home-a/memory/MEMORY.md", - "projects/-home-a/memory/a.md", - "session-env/a/b.sh", - "sessions/a.json", - "shell-snapshots/a.sh", - "tasks/a/b.json", +GENERATED = [ + "bin/__pycache__/a.cpython-313.pyc", + "bin/agent_cycle/__pycache__/a.cpython-313.pyc", "workflow-bench/a-1-1.md", "workflow-bench/a-1-1/README.md", "workflow-bench/compare/a/A1/fixes.diff", "workflow-bench/logs/a.jsonl", ] +AUTHORED = [ + "bin/agent_cycle/run.py", + "workflow-bench/advisor-judge-prompt.md", + "workflow-bench/bench.py", + "workflow-bench/setup.cfg", +] + class Gitignore(unittest.TestCase): def test_ignores_no_tracked_file(self): @@ -44,6 +33,10 @@ class Gitignore(unittest.TestCase): ignored = subprocess.run(["git", "ls-files", "-oi", "--exclude-standard", "--", "bin/*.py", "bin/**/*.py"], capture_output=True, check=True, cwd=ROOT, text=True).stdout self.assertEqual(ignored, "") - def test_ignores_every_private_file(self): - ignored = subprocess.run(["git", "check-ignore", "--no-index", "--stdin"], capture_output=True, cwd=ROOT, input="\n".join(PRIVATE), text=True).stdout - self.assertEqual(ignored.splitlines(), PRIVATE) + def test_ignores_every_generated_file(self): + ignored = subprocess.run(["git", "check-ignore", "--no-index", "--stdin"], capture_output=True, cwd=ROOT, input="\n".join(GENERATED), text=True).stdout + self.assertEqual(ignored.splitlines(), GENERATED) + + def test_ignores_no_authored_file(self): + ignored = subprocess.run(["git", "check-ignore", "--no-index", "--stdin"], capture_output=True, cwd=ROOT, input="\n".join(AUTHORED), text=True).stdout + self.assertEqual(ignored, "") From cafa9dd61c9368fa0b1a28f3da02ede8e77fd73d Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 04:05:58 +0100 Subject: [PATCH 02/19] Record reading cost --- docs/reading-cost.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/reading-cost.md b/docs/reading-cost.md index 249b4837..d26cbb3c 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -4078,3 +4078,20 @@ Read most (opens and searches): - `bin/cut_release/patch.py` 3 - `CLAUDE.md` 2 - `bin/cut_release/trace.py` 2 + +## Reading cost, chunk 81ec393bb45c, finished 2026-12-04T03:05:01Z + +305346 new input tokens before the first commit. + +Read most (opens and searches): + +- `README.md` 35 +- `docs/decisions.md` 13 +- `bin/build_release/test_black_box.py` 12 +- `bin/self_update/test_self_update.py` 9 +- `CLAUDE.md` 6 +- `bin/build_epic/main.py` 6 +- `bin/larv_review/reviewer_header.py` 6 +- `bin/review_replay/replay.py` 6 +- `todo.md` 6 +- `bin/build-release` 5 From 9d2f5b92535fde3c3d955214783dc2b1ea970856 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 04:06:38 +0100 Subject: [PATCH 03/19] Write the review folder under the state folder into the generated settings.json --- README.md | 2 +- bin/claude_home/home.py | 28 ++++++++++++++++------------ bin/claude_home/test_home.py | 23 +++++++++++++++++++---- bin/loop_effects/effects.py | 3 ++- docs/reading-cost.md | 17 +++++++++++++++++ settings.json | 2 +- 6 files changed, 56 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 5bf0b96b..9f2363f2 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ build-release and build-epic run every claude in the loop's Claude home, `~/.loc Sign in to the loop's home once. Until you have, build-release and build-epic stop and print the line to run, `CLAUDE_CONFIG_DIR=~/.local/share/build-release/claude-home claude`: type `/login` in the claude it opens. A model you pick there with `/model` stays in the generated `settings.json`. The loop's home has no theme or status line of yours: those stay in your own `~/.claude`, for the claude you start yourself. build-release or build-epic builds the home again once the clone holds another commit, as after `self-update`, and keeps the sign-in, the model and the sessions. The home follows the clone whose build-release or build-epic ran last, so run only the release clone's, never the development clone's: that one would point every running loop at unreleased rules. -The setup keeps each project's config, and what you choose for a project, in the config folder, `~/.config/build-release/`. Its tools keep their own state, such as transcripts, review reports and locks, in the state folder, `~/.local/state/build-release/`. The loop's Claude home is in the data folder, `~/.local/share/build-release/`, which holds what build-release builds again and what Claude Code writes. Where `XDG_CONFIG_HOME` holds an absolute path, the config folder is `build-release/` under that path instead, and likewise the state folder under `XDG_STATE_HOME` and the data folder under `XDG_DATA_HOME`; this README spells the defaults. Set such a variable in the environment Claude Code starts in, since rule-hook reads it there. `settings.json` names only the default review folder, `~/.local/state/build-release/larv-review`, in `additionalDirectories`: where `XDG_STATE_HOME` moves that folder, add it to the loop's home's `settings.json` yourself, and again each time build-release or build-epic builds the home, or an interactive session asks before a reviewer writes its report. Back up these four folders: +The setup keeps each project's config, and what you choose for a project, in the config folder, `~/.config/build-release/`. Its tools keep their own state, such as transcripts, review reports and locks, in the state folder, `~/.local/state/build-release/`. The loop's Claude home is in the data folder, `~/.local/share/build-release/`, which holds what build-release builds again and what Claude Code writes. Where `XDG_CONFIG_HOME` holds an absolute path, the config folder is `build-release/` under that path instead, and likewise the state folder under `XDG_STATE_HOME` and the data folder under `XDG_DATA_HOME`; this README spells the defaults. Set such a variable in the environment Claude Code starts in, since rule-hook reads it there. The loop's home lets a session write the review folder, `larv-review/` in the state folder, wherever `XDG_STATE_HOME` puts it. Back up these four folders: - `~/.config/build-release/`: each project's config, a client project's plan and records, and `models.json`, the model of each project, which build-release and build-epic write. A project's `env-file`, if you keep it here as below, puts credentials in the backup, so keep the backup private. - `~/.local/state/build-release/transcripts`: every transcript build-release keeps. Where you set `BUILD_RELEASE_TRANSCRIPTS`, back up the folder it names instead. diff --git a/bin/claude_home/home.py b/bin/claude_home/home.py index fb101d3f..e32f12b6 100644 --- a/bin/claude_home/home.py +++ b/bin/claude_home/home.py @@ -17,6 +17,8 @@ from text_files.file_writes import replace_file LINKED = ("CLAUDE.md", "agents", "rules", "skills") # Stands for the clone's folder in the clone's settings.json. Every value that holds it is a shell command, such as a hook's. CLONE = "{clone}" +# Stands for the review folder, the one under the state folder where each reviewer writes its report, which a session may write. +REVIEWS = "{reviews}" # The file in the home that names the clone and the commit the home was built from. BUILT_FROM = "built-from" @@ -28,10 +30,10 @@ class Git(typing.Protocol): def __call__(self, *args: str, cwd: str | None = None) -> str | Failure: ... -def unready(home: pathlib.Path, clone: pathlib.Path, claude: Claude, git: Git) -> str | None: +def unready(home: pathlib.Path, clone: pathlib.Path, reviews: pathlib.Path, claude: Claude, git: Git) -> str | None: """Builds the home from clone, or refreshes it where the clone's commit changed since. Then why a claude cannot run in the home yet, said for the person to act on; None where one can.""" try: - built = refreshed(home, clone, claude, git) + built = refreshed(home, clone, reviews, claude, git) if isinstance(built, Failure): return f"could not build the loop's Claude home, {home}: {built.reason}" status = claude(["auth", "status"]) @@ -61,11 +63,11 @@ def printed(done: subprocess.CompletedProcess[str]) -> str: return " ".join((done.stderr or done.stdout).split()) or f"it printed nothing and exited {done.returncode}" -def refreshed(home: pathlib.Path, clone: pathlib.Path, claude: Claude, git: Git) -> Failure | None: +def refreshed(home: pathlib.Path, clone: pathlib.Path, reviews: pathlib.Path, claude: Claude, git: Git) -> Failure | None: commit = git("rev-parse", "HEAD", cwd=str(clone)) if isinstance(commit, Failure): return commit - built_from = f"{clone} at {commit.strip()}\n" + built_from = f"{clone} at {commit.strip()}, reviews in {reviews}\n" home.mkdir(parents=True, exist_ok=True) # Several loops start at once after an update: one refreshes the home, and the others wait and find it done. with open(home / ".refresh-lock", "w", encoding="utf-8") as lock: @@ -74,7 +76,7 @@ def refreshed(home: pathlib.Path, clone: pathlib.Path, claude: Claude, git: Git) if stamp.is_file() and stamp.read_text(encoding="utf-8") == built_from: return None # The stamp is written last, so a refresh that failed halfway runs again. - return linked(home, clone) or settings_written(home, clone) or plugins_installed(clone, claude) or replace_file(stamp, built_from.encode()) + return linked(home, clone) or settings_written(home, clone, reviews) or plugins_installed(clone, claude) or replace_file(stamp, built_from.encode()) def linked(home: pathlib.Path, clone: pathlib.Path) -> Failure | None: @@ -87,9 +89,9 @@ def linked(home: pathlib.Path, clone: pathlib.Path) -> Failure | None: return None -def settings_written(home: pathlib.Path, clone: pathlib.Path) -> Failure | None: - """Writes the home's settings.json: the clone's, with the clone's folder in place of CLONE, and the model the home's file holds.""" - settings = placed(json.loads((clone / "settings.json").read_text(encoding="utf-8")), shlex.quote(str(clone))) +def settings_written(home: pathlib.Path, clone: pathlib.Path, reviews: pathlib.Path) -> Failure | None: + """Writes the home's settings.json: the clone's, with the clone's folder in place of CLONE and the review folder in place of REVIEWS, and the model the home's file holds.""" + settings = placed(json.loads((clone / "settings.json").read_text(encoding="utf-8")), {CLONE: shlex.quote(str(clone)), REVIEWS: str(reviews)}) generated = home / "settings.json" try: old = json.loads(generated.read_text(encoding="utf-8")) if generated.is_file() else {} @@ -103,13 +105,15 @@ def settings_written(home: pathlib.Path, clone: pathlib.Path) -> Failure | None: return replace_file(generated, (json.dumps(settings, indent=2, sort_keys=True) + "\n").encode()) -def placed(value: typing.Any, clone: str) -> typing.Any: +def placed(value: typing.Any, stand_for: dict[str, str]) -> typing.Any: if isinstance(value, str): - return value.replace(CLONE, clone) + for name, replacement in stand_for.items(): + value = value.replace(name, replacement) + return value if isinstance(value, list): - return [placed(each, clone) for each in value] + return [placed(each, stand_for) for each in value] if isinstance(value, dict): - return {key: placed(each, clone) for key, each in value.items()} + return {key: placed(each, stand_for) for key, each in value.items()} return value diff --git a/bin/claude_home/test_home.py b/bin/claude_home/test_home.py index af2d7f35..9396ea72 100644 --- a/bin/claude_home/test_home.py +++ b/bin/claude_home/test_home.py @@ -14,6 +14,7 @@ SETTINGS = { "enabledPlugins": {"code-review@official": True, "frontend-design@official": False, "lsp@other": True}, "extraKnownMarketplaces": {"official": {"source": {"repo": "anthropics/official", "source": "github"}}, "other": {"source": {"repo": "someone/other", "source": "github"}}, "unused": {"source": {"repo": "someone/unused", "source": "github"}}}, "hooks": {"PreToolUse": [{"hooks": [{"command": "{clone}/bin/rule-hook", "type": "command"}]}]}, + "permissions": {"additionalDirectories": ["{reviews}", "~/code"], "defaultMode": "bypassPermissions"}, "tui": "fullscreen", } SIGNED_IN = json.dumps({"loggedIn": True, "authMethod": "claude.ai"}) @@ -31,6 +32,7 @@ class Home(unittest.TestCase): (self.clone / "settings.json").write_text(json.dumps(SETTINGS), encoding="utf-8") self.home = self.temp / "share" / "claude-home" self.commit: str | Failure = "1a2b3c\n" + self.reviews = self.temp / "state" / "build-release" / "larv-review" self.status = SIGNED_IN # The exit code of each `claude plugin` command, by its last argument; 0 for one not named. self.exits: dict[str, int] = {} @@ -43,7 +45,7 @@ class Home(unittest.TestCase): return subprocess.CompletedProcess(args, self.exits.get(args[-1], 0), "", f"no {args[-1]}\nin the marketplace\n") def unready(self) -> str | None: - return unready(self.home, self.clone, self.claude, lambda *args, cwd=None: self.commit if (args, cwd) == (("rev-parse", "HEAD"), str(self.clone)) else Failure(f"unexpected git {args} in {cwd}")) + return unready(self.home, self.clone, self.reviews, self.claude, lambda *args, cwd=None: self.commit if (args, cwd) == (("rev-parse", "HEAD"), str(self.clone)) else Failure(f"unexpected git {args} in {cwd}")) def settings(self) -> dict[str, object]: read: dict[str, object] = json.loads((self.home / "settings.json").read_text(encoding="utf-8")) @@ -64,6 +66,19 @@ class Home(unittest.TestCase): self.assertEqual(self.settings()["tui"], "fullscreen") self.assertEqual(json.loads((self.clone / "settings.json").read_text(encoding="utf-8")), SETTINGS) + def test_the_generated_settings_let_a_session_write_the_review_folder_wherever_the_state_folder_is(self) -> None: + self.unready() + + self.assertEqual(self.settings()["permissions"], {"additionalDirectories": [str(self.reviews), "~/code"], "defaultMode": "bypassPermissions"}) + + def test_a_moved_review_folder_refreshes_the_home(self) -> None: + self.unready() + self.reviews = self.temp / "elsewhere" / "build-release" / "larv-review" + + self.assertIsNone(self.unready()) + + self.assertEqual(self.settings()["permissions"]["additionalDirectories"][0], str(self.reviews)) # type: ignore[index] + def test_it_adds_each_enabled_plugins_marketplace_then_installs_each_enabled_plugin(self) -> None: self.unready() @@ -133,7 +148,7 @@ class Home(unittest.TestCase): def claude(args: list[str]) -> subprocess.CompletedProcess[str]: return subprocess.CompletedProcess(args, 1, stdout, stderr) if args == ["auth", "status"] else subprocess.CompletedProcess(args, 0, "", "") - reason = unready(self.home, self.clone, claude, lambda *args, cwd=None: "1a2b3c\n") + reason = unready(self.home, self.clone, self.reviews, claude, lambda *args, cwd=None: "1a2b3c\n") self.assertEqual(reason, f"could not ask claude who is signed in to the loop's Claude home, {self.home}: {said}") @@ -174,7 +189,7 @@ class Home(unittest.TestCase): def missing(args: list[str]) -> subprocess.CompletedProcess[str]: raise FileNotFoundError(2, "No such file or directory", "claude") - reason = unready(self.home, self.clone, missing, lambda *args, cwd=None: "1a2b3c\n") + reason = unready(self.home, self.clone, self.reviews, missing, lambda *args, cwd=None: "1a2b3c\n") self.assertEqual(reason, f"could not build the loop's Claude home, {self.home}: [Errno 2] No such file or directory: 'claude'") @@ -182,7 +197,7 @@ class Home(unittest.TestCase): def stalled(args: list[str]) -> subprocess.CompletedProcess[str]: raise subprocess.TimeoutExpired(["claude", *args], 600) - reason = unready(self.home, self.clone, stalled, lambda *args, cwd=None: "1a2b3c\n") + reason = unready(self.home, self.clone, self.reviews, stalled, lambda *args, cwd=None: "1a2b3c\n") self.assertEqual(reason, f"could not build the loop's Claude home, {self.home}: Command '['claude', 'plugin', 'marketplace', 'add', 'anthropics/official']' timed out after 600 seconds") diff --git a/bin/loop_effects/effects.py b/bin/loop_effects/effects.py index 722d92f8..463b0cb1 100644 --- a/bin/loop_effects/effects.py +++ b/bin/loop_effects/effects.py @@ -25,6 +25,7 @@ from text_files.file_writes import replace_file from forge.commands import Run, runner from machine_load.slots import slot_folder from claude_home.home import unready +from review_rules.review_folder import reports_folder # Seconds before a Python script build-release runs is stopped, so a hung one, such as chunk-preflight, cannot hold the loop. PYTHON_TIMEOUT = 600 @@ -127,7 +128,7 @@ def system_effects(home: pathlib.Path, env: typing.Mapping[str, str], backends: """ return Effects( claude=lambda args, cwd, stdin: subprocess.run(["claude", *args], capture_output=True, cwd=cwd, env=claude_environment(env, home), input=stdin, text=True), - claude_home=lambda: unready(claude_home(env, home), RELEASE_ROOT, lambda args: subprocess.run(["claude", *args], capture_output=True, env=claude_environment(env, home), stdin=subprocess.DEVNULL, text=True, timeout=home_timeout), git_repo.git), + claude_home=lambda: unready(claude_home(env, home), RELEASE_ROOT, reports_folder(home, env), lambda args: subprocess.run(["claude", *args], capture_output=True, env=claude_environment(env, home), stdin=subprocess.DEVNULL, text=True, timeout=home_timeout), git_repo.git), claude_on_terminal=claude_on_terminal, discard_typed=lambda: termios.tcflush(sys.stdin, termios.TCIFLUSH), dm=lambda text, directory: notify(text, directory, home, env, backends), diff --git a/docs/reading-cost.md b/docs/reading-cost.md index 249b4837..d26cbb3c 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -4078,3 +4078,20 @@ Read most (opens and searches): - `bin/cut_release/patch.py` 3 - `CLAUDE.md` 2 - `bin/cut_release/trace.py` 2 + +## Reading cost, chunk 81ec393bb45c, finished 2026-12-04T03:05:01Z + +305346 new input tokens before the first commit. + +Read most (opens and searches): + +- `README.md` 35 +- `docs/decisions.md` 13 +- `bin/build_release/test_black_box.py` 12 +- `bin/self_update/test_self_update.py` 9 +- `CLAUDE.md` 6 +- `bin/build_epic/main.py` 6 +- `bin/larv_review/reviewer_header.py` 6 +- `bin/review_replay/replay.py` 6 +- `todo.md` 6 +- `bin/build-release` 5 diff --git a/settings.json b/settings.json index 7d337e83..4800ac73 100644 --- a/settings.json +++ b/settings.json @@ -56,7 +56,7 @@ }, "permissions": { "additionalDirectories": [ - "~/.local/state/build-release/larv-review", + "{reviews}", "~/code" ], "defaultMode": "bypassPermissions" From 3fe6c64480b2c952cbe92081c87885d3907a3d59 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 04:09:43 +0100 Subject: [PATCH 04/19] Say why a checkout in ~/.claude stays on 0.17.0 for its ignore file too --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0128dc92..161b43c7 100644 --- a/README.md +++ b/README.md @@ -194,7 +194,7 @@ It prints `CHANGELOG.md`'s section for each version it moved past: do what each It refuses while a file the clone tracks has an uncommitted change. Claude Code keeps its own files in the loop's home, not in the clone. The home's four links lead into the clone, though, so a rule, an agent or a skill changed at user level in that home changes the clone's file. Carry such a change into `~/code/claude-config` on a branch of its own, merge it through a PR, and cut a release. -A release up to 0.17.0 was a checkout in `~/.claude`, and `self-update` doesn't move one out of there. Finish each open chunk first: its session stays in `~/.claude`, where the new release doesn't look for it. Then clone the newest release as Install says, and sign in to the loop's home. In each project's config, write the new clone in place of `~/.claude` in `principles` and `standards`, and likewise in the crontab line. build-release and build-epic don't read `~/.claude` after that, so the checkout there is yours to keep or remove. Keep it on 0.17.0 if you keep it: a later `settings.json` names its hooks by a placeholder that only the loop's home fills in, so in `~/.claude` the hooks would not run. +A release up to 0.17.0 was a checkout in `~/.claude`, and `self-update` doesn't move one out of there. Finish each open chunk first: its session stays in `~/.claude`, where the new release doesn't look for it. Then clone the newest release as Install says, and sign in to the loop's home. In each project's config, write the new clone in place of `~/.claude` in `principles` and `standards`, and likewise in the crontab line. build-release and build-epic don't read `~/.claude` after that, so the checkout there is yours to keep or remove. Keep it on 0.17.0 if you keep it: a later `settings.json` names its hooks by a placeholder that only the loop's home fills in, so in `~/.claude` the hooks would not run. A later release's `.gitignore` also no longer keeps Claude Code's credentials, transcripts and memory files out of a clone, so in `~/.claude` a `git add .` would stage them. ## Release From 3b990d8884f3178118f48c329f383ba41765f882 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 04:09:47 +0100 Subject: [PATCH 05/19] =?UTF-8?q?Answer=20security=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20warn=20in?= =?UTF-8?q?=20the=20README=20that=20an=20old=20~/.claude=20checkout=20shou?= =?UTF-8?q?ldn't=20take=20this=20release's=20ignore=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From a375cb8515983a6c3968d38750db37893f75dbd6 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 04:14:39 +0100 Subject: [PATCH 06/19] =?UTF-8?q?Answer=20stability=20round=201:=201=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20ignore=20wh?= =?UTF-8?q?at=20the=20trial=20and=20presentation=20tools=20write,=20and=20?= =?UTF-8?q?drop=20the=20test=20that=20repeats=20another?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 9 +++++++-- bin/repo_checks/test_gitignore.py | 15 +++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 50ac1cb0..dc63c101 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,10 @@ -# What the repo's own tools generate: Python bytecode, and the clones, reports, -# logs and rulings a workflow-bench run leaves in its folder. +# What the repo's own tools generate: the runs of workflow-bench and +# reviewer-merge-trials, and the presentation's PDF. __pycache__/ +presentation/build-release-explained.pdf +reviewer-merge-trials/agents-*.json +reviewer-merge-trials/clones/ +reviewer-merge-trials/results/ +reviewer-merge-trials/runs.pkl workflow-bench/*-[0-9]*.md workflow-bench/*/ diff --git a/bin/repo_checks/test_gitignore.py b/bin/repo_checks/test_gitignore.py index 8d30d549..a4f89c47 100644 --- a/bin/repo_checks/test_gitignore.py +++ b/bin/repo_checks/test_gitignore.py @@ -10,19 +10,17 @@ from repo_checks import ROOT GENERATED = [ "bin/__pycache__/a.cpython-313.pyc", "bin/agent_cycle/__pycache__/a.cpython-313.pyc", + "presentation/build-release-explained.pdf", + "reviewer-merge-trials/agents-wave3.json", + "reviewer-merge-trials/clones/rm-a/b.py", + "reviewer-merge-trials/results/a/b.json", + "reviewer-merge-trials/runs.pkl", "workflow-bench/a-1-1.md", "workflow-bench/a-1-1/README.md", "workflow-bench/compare/a/A1/fixes.diff", "workflow-bench/logs/a.jsonl", ] -AUTHORED = [ - "bin/agent_cycle/run.py", - "workflow-bench/advisor-judge-prompt.md", - "workflow-bench/bench.py", - "workflow-bench/setup.cfg", -] - class Gitignore(unittest.TestCase): def test_ignores_no_tracked_file(self): @@ -37,6 +35,3 @@ class Gitignore(unittest.TestCase): ignored = subprocess.run(["git", "check-ignore", "--no-index", "--stdin"], capture_output=True, cwd=ROOT, input="\n".join(GENERATED), text=True).stdout self.assertEqual(ignored.splitlines(), GENERATED) - def test_ignores_no_authored_file(self): - ignored = subprocess.run(["git", "check-ignore", "--no-index", "--stdin"], capture_output=True, cwd=ROOT, input="\n".join(AUTHORED), text=True).stdout - self.assertEqual(ignored, "") From 028fd3e3ce5cc12af8f563abe7a9725edb4c25b3 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 04:14:39 +0100 Subject: [PATCH 07/19] =?UTF-8?q?Answer=20product-owner=20round=201:=200?= =?UTF-8?q?=20=F0=9F=94=B4,=202=20=F0=9F=9F=A1=20(0=20misread);=20the=20ig?= =?UTF-8?q?nore=20patterns=20are=20in=20the=20stability=20answer,=20and=20?= =?UTF-8?q?the=20README=20says=20how=20to=20protect=20a=20moved=20~/.claud?= =?UTF-8?q?e=20checkout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 161b43c7..53a906ef 100644 --- a/README.md +++ b/README.md @@ -194,7 +194,7 @@ It prints `CHANGELOG.md`'s section for each version it moved past: do what each It refuses while a file the clone tracks has an uncommitted change. Claude Code keeps its own files in the loop's home, not in the clone. The home's four links lead into the clone, though, so a rule, an agent or a skill changed at user level in that home changes the clone's file. Carry such a change into `~/code/claude-config` on a branch of its own, merge it through a PR, and cut a release. -A release up to 0.17.0 was a checkout in `~/.claude`, and `self-update` doesn't move one out of there. Finish each open chunk first: its session stays in `~/.claude`, where the new release doesn't look for it. Then clone the newest release as Install says, and sign in to the loop's home. In each project's config, write the new clone in place of `~/.claude` in `principles` and `standards`, and likewise in the crontab line. build-release and build-epic don't read `~/.claude` after that, so the checkout there is yours to keep or remove. Keep it on 0.17.0 if you keep it: a later `settings.json` names its hooks by a placeholder that only the loop's home fills in, so in `~/.claude` the hooks would not run. A later release's `.gitignore` also no longer keeps Claude Code's credentials, transcripts and memory files out of a clone, so in `~/.claude` a `git add .` would stage them. +A release up to 0.17.0 was a checkout in `~/.claude`, and `self-update` doesn't move one out of there. Finish each open chunk first: its session stays in `~/.claude`, where the new release doesn't look for it. Then clone the newest release as Install says, and sign in to the loop's home. In each project's config, write the new clone in place of `~/.claude` in `principles` and `standards`, and likewise in the crontab line. build-release and build-epic don't read `~/.claude` after that, so the checkout there is yours to keep or remove. Keep it on 0.17.0 if you keep it: a later `settings.json` names its hooks by a placeholder that only the loop's home fills in, so in `~/.claude` the hooks would not run. A later release's `.gitignore` doesn't ignore Claude Code's credentials, transcripts and memory files, so in `~/.claude` a `git add .` would stage them. Where that checkout has moved past 0.17.0, run `echo '*' >> .git/info/exclude` in it. ## Release From 76869883beefb216ee0cb2ed5319cc60879920b3 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 04:14:39 +0100 Subject: [PATCH 08/19] =?UTF-8?q?Answer=20prose=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20the=20READM?= =?UTF-8?q?E=20sentence=20is=20reworded=20in=20the=20product-owner=20answe?= =?UTF-8?q?r,=20and=20the=20opening=20comment=20of=20.gitignore=20no=20lon?= =?UTF-8?q?ger=20repeats=20the=20pattern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From 6828218dec13ed6df91fd6ed937f703815690a6c Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 04:15:57 +0100 Subject: [PATCH 09/19] =?UTF-8?q?Answer=20stability=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1=20(0=20misread);=20nothing=20t?= =?UTF-8?q?o=20change?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From 3ca72509f00b586c14880212b14e372491b6f7cc Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 04:15:57 +0100 Subject: [PATCH 10/19] =?UTF-8?q?Answer=20prose=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1=20(0=20misread);=20nothing=20t?= =?UTF-8?q?o=20change?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From 97e862869f45c7490c97d17792c015e43db30571 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 04:18:35 +0100 Subject: [PATCH 11/19] Finish item 583 in the plan --- CHANGELOG.md | 1 + todo.md | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95f2dacb..062fafa1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- `.gitignore` ignores only what the repo generates, in place of an allowlist that kept a Claude home's files out of the clone. A checkout in `~/.claude` that moves past 0.17.0 would list its credentials, transcripts and memory files as untracked: run `echo '*' >> .git/info/exclude` in it, or leave it on 0.17.0. - **build-release and build-epic run every claude in a Claude home of their own, `~/.local/share/build-release/claude-home`, and a release is cloned anywhere, no longer into `~/.claude`.** Take this release as `README.md` → Update says for a checkout in `~/.claude`: finish each open chunk first, clone the release, and change each path into `~/.claude` that a project config or a crontab names, such as `principles` and `standards`, to the new clone. The commands build the home from the clone they ship in, with links to its `CLAUDE.md`, `rules/`, `agents/` and `skills/`, a `settings.json` generated from the clone's, and each plugin that file enables; they build it again when the clone moves to another release. Sign in there once: until you have, a command stops and prints the line to run, `CLAUDE_CONFIG_DIR=~/.local/share/build-release/claude-home claude`, where you type `/login`. Your own `~/.claude` is yours again: the loop doesn't run a claude there, and only `task-bench gather` still does. The settings filter and its Install step are gone, and `self-update` no longer asks you to pick a model with `/model`. - **`deploy-release` is gone, with no alias: `self-update` moves a clone of a release, and `cut-release` cuts one.** Take this release by cloning it, as `README.md` → Update says for a checkout in `~/.claude`, not with `deploy-release`. From then on, update with the new clone's `bin/self-update`. It takes no argument, moves the clone it ships in and names that clone in what it prints, so never run the development clone's copy. In the development clone, run `bin/cut-release` where you ran `deploy-release --cut`, and `bin/cut-release --patch ` where you ran `--cut-patch `; neither takes a ``. A cut no longer moves `~/.claude`: its stdout is the one `Done:` line, and each machine runs `self-update` afterwards. `cut-release` cuts the clone it ships in, whatever the directory it is run from, and no longer checks an origin. Its traces go to `~/.local/state/build-release/cut-release/`, and older traces stay where they are. Install no longer links `build-release` onto `PATH`: run it as `/bin/build-release`. Remove a link made earlier: it leads into `~/.claude`, to the old release. - Renamed `do-epic` to `build-epic`, with no alias. Before you update, finish your open `do-epic` chunks, since a chunk left open starts a fresh session, and stop every running `do-epic`, since one that runs across the update can't reload. Then, in each Jira project, relabel every issue that carries `do-epic-claude`, `do-epic-human` or `do-epic-release-review`, done issues included, to `build-epic-claude`, `build-epic-human` or `build-epic-release-review`, since a finished release review that keeps the old label isn't counted and `build-epic` files another. Rename each `DO_EPIC_E2E_*` variable you set to `BUILD_EPIC_E2E_*`. Nothing reads the old names. The next bullet moves the folders. diff --git a/todo.md b/todo.md index a33f00e2..5d8c5d45 100644 --- a/todo.md +++ b/todo.md @@ -15,7 +15,6 @@ | 581 | 0.18.0 | | | **Name each file of the setup, in everything a model or a person reads, by a path that holds wherever the clone lies, never by `~/.claude`.** | 3 | 2 | 3 | 6 | 6 | 2 by 8 | 0.8 | | 486 | 0.18.0 | | owner | **Open an interactive claude with the setup loaded through one wrapper command, which sets the generated home and `PATH` and passes every argument on to claude.** | 2 | 1 | 1 | 2 | 3 | 2 by 2 | 0.5 | | 577 | 0.18.0 | 486, 581 | owner | **Test in the gate that a container holding only a stock Claude Code runs a chunk from a clone, against a mock Messages API, and that the run leaves the container's own `~/.claude` as it was.** | 3 | 1 | 2 | 4 | 6 | 3 by 9, 2 by 5 | 5.2 | -| 583 | 0.18.0 | | | **Ignore only what the repo generates, in place of the allowlist that kept a Claude home's files out of the clone.** | 1 | 1 | 2 | 2 | 1 | code health by 2 | 2.9 | | 576 | 0.18.0 | | owner | **Name the project `dev-factory` in the README, the prose and the tools, and say in the changelog that the repo moved.** | 2 | 2 | 2 | 4 | 4 | 2 by 1, 6 by 1 | 0.4 | | 578 | 0.18.0 | 576, 577 | owner | **Ship one chunk of this repo, to a merged pull request, from a clone of `main` that runs in the generated home, beside the untouched `~/.claude`.** | 1 | 2 | 1 | 2 | 1 | 2 by 4 | 1.2 | | 582 | 0.18.0 | | | **Write the review folder under the state folder into the generated `settings.json`'s `additionalDirectories`, so a moved `XDG_STATE_HOME` needs no hand edit.** | 1 | 1 | 2 | 2 | 1 | 2 by 2 | 0.6 | @@ -171,13 +170,6 @@ Touches: - `.gitignore` - `README.md`: `## Test` (small) -### 583. Ignore only what the repo generates, in place of the allowlist that kept a Claude home's files out of the clone. - -Since item 483 no Claude home is a clone of this repo, so Claude Code no longer writes credentials, transcripts or memory files into it. The ignore file still ignores everything and un-ignores each authored path, and its opening comment says Claude Code writes into this directory. Replace the allowlist with the few patterns the repo needs, such as `__pycache__/`. Keep the `ignorefile-sorted` rule as it is: other projects use it. - -Touches: -- `.gitignore` - ### 576. Name the project `dev-factory` in the README, the prose and the tools, and say in the changelog that the repo moved. Part of the standalone-install plan lilleman approved on 2026-11-20, as reshaped on 2026-12-03 when 0.18.0 was planned. Split from item 496, which keeps the renames that wait for the harness interface, such as `CLAUDE.md`. Renaming the repo on the forge is lilleman's, and it changes every clone's remote. A project's key comes from its clone's folder name, and tmux session names from the key, so say in the changelog what renaming the clone's folder changes. Revise the decision "names", which still says the code keeps today's names and calls harness independence an open aim: it is goal 6. From 82b933af0000163d2c8ab631edeae5c0b459b521 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 04:20:38 +0100 Subject: [PATCH 12/19] Test that the home build writes the review folder under the given state folder --- bin/loop_effects/test_effects.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/bin/loop_effects/test_effects.py b/bin/loop_effects/test_effects.py index 01240239..31cad752 100644 --- a/bin/loop_effects/test_effects.py +++ b/bin/loop_effects/test_effects.py @@ -1,6 +1,7 @@ import contextlib import dataclasses import io +import json import os import pathlib import signal @@ -153,6 +154,20 @@ class ClaudeHomeEffect(unittest.TestCase): self.assertEqual(ran[-1], f"{built} auth status") self.assertIn(f"{built} plugin install code-review@claude-plugins-official", ran) + def test_lets_a_session_write_the_review_folder_under_the_state_folder_it_is_given(self): + with tempfile.TemporaryDirectory() as folder: + claude = pathlib.Path(folder, "claude") + claude.write_text('#!/bin/sh\necho \'{"loggedIn": true}\'\n') + claude.chmod(0o755) + home = pathlib.Path(folder, "home") + state = pathlib.Path(folder, "moved state") + + reason = system_effects(home, without_xdg_folders(os.environ) | {"PATH": f"{folder}:{os.environ['PATH']}", "XDG_STATE_HOME": str(state)}).claude_home() + + self.assertIsNone(reason) + written = json.loads((home / ".local" / "share" / "build-release" / "claude-home" / "settings.json").read_text()) + self.assertIn(str(state / "build-release" / "larv-review"), written["permissions"]["additionalDirectories"]) + def test_a_plugin_that_does_not_install_stops_naming_the_command_and_what_claude_said(self): with tempfile.TemporaryDirectory() as folder: claude = pathlib.Path(folder, "claude") From 1552b15fc6ee999e9fc8148bb91335b27c496ad5 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 04:39:09 +0100 Subject: [PATCH 13/19] =?UTF-8?q?Answer=20security=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1=20(0=20misread);=20no=20findin?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From 2b5a6a63d8cbeed726fe92c06cf9624ab86d0d97 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 04:39:09 +0100 Subject: [PATCH 14/19] =?UTF-8?q?Answer=20product-owner=20round=201:=200?= =?UTF-8?q?=20=F0=9F=94=B4,=200=20=F0=9F=9F=A1=20(0=20misread);=20no=20fin?= =?UTF-8?q?ding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From d478e5d47680454536af37c30145a0f727cb01e2 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 04:39:09 +0100 Subject: [PATCH 15/19] =?UTF-8?q?Answer=20stability=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1=20(0=20misread);=20the=20one?= =?UTF-8?q?=20nit,=20the=20stale=20built-from=20comment,=20is=20fixed=20in?= =?UTF-8?q?=20the=20commit=20that=20answers=20prose=20round=201,=20which?= =?UTF-8?q?=20raised=20it=20too?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From 980418abf8f4ffc3066897b9aab8474b42defa5c Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 04:39:09 +0100 Subject: [PATCH 16/19] =?UTF-8?q?Answer=20prose=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=205=20=F0=9F=9F=A1=20(0=20misread);=20name=20the?= =?UTF-8?q?=20folder=20the=20reports=20folder,=20mend=20the=20stale=20comm?= =?UTF-8?q?ents,=20and=20drop=20the=20README=20sentence=20nobody=20acts=20?= =?UTF-8?q?on?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- bin/claude_home/home.py | 24 ++++++++++++------------ bin/claude_home/test_home.py | 20 ++++++++++---------- settings.json | 2 +- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 9f2363f2..01397515 100644 --- a/README.md +++ b/README.md @@ -68,9 +68,9 @@ build-release and build-epic run every claude in the loop's Claude home, `~/.loc - every plugin the clone's `settings.json` enables, which build-release or build-epic installs; - what Claude Code keeps in its home: your sign-in there, the sessions and the memory files. -Sign in to the loop's home once. Until you have, build-release and build-epic stop and print the line to run, `CLAUDE_CONFIG_DIR=~/.local/share/build-release/claude-home claude`: type `/login` in the claude it opens. A model you pick there with `/model` stays in the generated `settings.json`. The loop's home has no theme or status line of yours: those stay in your own `~/.claude`, for the claude you start yourself. build-release or build-epic builds the home again once the clone holds another commit, as after `self-update`, and keeps the sign-in, the model and the sessions. The home follows the clone whose build-release or build-epic ran last, so run only the release clone's, never the development clone's: that one would point every running loop at unreleased rules. +Sign in to the loop's home once. Until you have, build-release and build-epic stop and print the line to run, `CLAUDE_CONFIG_DIR=~/.local/share/build-release/claude-home claude`: type `/login` in the claude it opens. A model you pick there with `/model` stays in the generated `settings.json`. The loop's home has no theme or status line of yours: those stay in your own `~/.claude`, for the claude you start yourself. build-release or build-epic builds the home again once the clone holds another commit, as after `self-update`, or `XDG_STATE_HOME` moves, and keeps the sign-in, the model and the sessions. The home follows the clone whose build-release or build-epic ran last, so run only the release clone's, never the development clone's: that one would point every running loop at unreleased rules. -The setup keeps each project's config, and what you choose for a project, in the config folder, `~/.config/build-release/`. Its tools keep their own state, such as transcripts, review reports and locks, in the state folder, `~/.local/state/build-release/`. The loop's Claude home is in the data folder, `~/.local/share/build-release/`, which holds what build-release builds again and what Claude Code writes. Where `XDG_CONFIG_HOME` holds an absolute path, the config folder is `build-release/` under that path instead, and likewise the state folder under `XDG_STATE_HOME` and the data folder under `XDG_DATA_HOME`; this README spells the defaults. Set such a variable in the environment Claude Code starts in, since rule-hook reads it there. The loop's home lets a session write the review folder, `larv-review/` in the state folder, wherever `XDG_STATE_HOME` puts it. Back up these four folders: +The setup keeps each project's config, and what you choose for a project, in the config folder, `~/.config/build-release/`. Its tools keep their own state, such as transcripts, review reports and locks, in the state folder, `~/.local/state/build-release/`. The loop's Claude home is in the data folder, `~/.local/share/build-release/`, which holds what build-release builds again and what Claude Code writes. Where `XDG_CONFIG_HOME` holds an absolute path, the config folder is `build-release/` under that path instead, and likewise the state folder under `XDG_STATE_HOME` and the data folder under `XDG_DATA_HOME`; this README spells the defaults. Set such a variable in the environment Claude Code starts in, since rule-hook reads it there. Back up these four folders: - `~/.config/build-release/`: each project's config, a client project's plan and records, and `models.json`, the model of each project, which build-release and build-epic write. A project's `env-file`, if you keep it here as below, puts credentials in the backup, so keep the backup private. - `~/.local/state/build-release/transcripts`: every transcript build-release keeps. Where you set `BUILD_RELEASE_TRANSCRIPTS`, back up the folder it names instead. diff --git a/bin/claude_home/home.py b/bin/claude_home/home.py index e32f12b6..faa387c6 100644 --- a/bin/claude_home/home.py +++ b/bin/claude_home/home.py @@ -17,9 +17,9 @@ from text_files.file_writes import replace_file LINKED = ("CLAUDE.md", "agents", "rules", "skills") # Stands for the clone's folder in the clone's settings.json. Every value that holds it is a shell command, such as a hook's. CLONE = "{clone}" -# Stands for the review folder, the one under the state folder where each reviewer writes its report, which a session may write. -REVIEWS = "{reviews}" -# The file in the home that names the clone and the commit the home was built from. +# Stands for the reports folder in the clone's settings.json: the folder under the state folder that holds each chunk's review reports, so a session may write there. Unlike CLONE, its value is a path, not part of a shell command. +REPORTS = "{reports}" +# The file in the home that names the clone, its commit and the reports folder the home was built from. BUILT_FROM = "built-from" # Runs `claude` with these arguments in the home. @@ -30,10 +30,10 @@ class Git(typing.Protocol): def __call__(self, *args: str, cwd: str | None = None) -> str | Failure: ... -def unready(home: pathlib.Path, clone: pathlib.Path, reviews: pathlib.Path, claude: Claude, git: Git) -> str | None: - """Builds the home from clone, or refreshes it where the clone's commit changed since. Then why a claude cannot run in the home yet, said for the person to act on; None where one can.""" +def unready(home: pathlib.Path, clone: pathlib.Path, reports: pathlib.Path, claude: Claude, git: Git) -> str | None: + """Builds the home from clone, or refreshes it where the clone's commit or the reports folder changed since. Then why a claude cannot run in the home yet, said for the person to act on; None where one can.""" try: - built = refreshed(home, clone, reviews, claude, git) + built = refreshed(home, clone, reports, claude, git) if isinstance(built, Failure): return f"could not build the loop's Claude home, {home}: {built.reason}" status = claude(["auth", "status"]) @@ -63,11 +63,11 @@ def printed(done: subprocess.CompletedProcess[str]) -> str: return " ".join((done.stderr or done.stdout).split()) or f"it printed nothing and exited {done.returncode}" -def refreshed(home: pathlib.Path, clone: pathlib.Path, reviews: pathlib.Path, claude: Claude, git: Git) -> Failure | None: +def refreshed(home: pathlib.Path, clone: pathlib.Path, reports: pathlib.Path, claude: Claude, git: Git) -> Failure | None: commit = git("rev-parse", "HEAD", cwd=str(clone)) if isinstance(commit, Failure): return commit - built_from = f"{clone} at {commit.strip()}, reviews in {reviews}\n" + built_from = f"{clone} at {commit.strip()}, reports in {reports}\n" home.mkdir(parents=True, exist_ok=True) # Several loops start at once after an update: one refreshes the home, and the others wait and find it done. with open(home / ".refresh-lock", "w", encoding="utf-8") as lock: @@ -76,7 +76,7 @@ def refreshed(home: pathlib.Path, clone: pathlib.Path, reviews: pathlib.Path, cl if stamp.is_file() and stamp.read_text(encoding="utf-8") == built_from: return None # The stamp is written last, so a refresh that failed halfway runs again. - return linked(home, clone) or settings_written(home, clone, reviews) or plugins_installed(clone, claude) or replace_file(stamp, built_from.encode()) + return linked(home, clone) or settings_written(home, clone, reports) or plugins_installed(clone, claude) or replace_file(stamp, built_from.encode()) def linked(home: pathlib.Path, clone: pathlib.Path) -> Failure | None: @@ -89,9 +89,9 @@ def linked(home: pathlib.Path, clone: pathlib.Path) -> Failure | None: return None -def settings_written(home: pathlib.Path, clone: pathlib.Path, reviews: pathlib.Path) -> Failure | None: - """Writes the home's settings.json: the clone's, with the clone's folder in place of CLONE and the review folder in place of REVIEWS, and the model the home's file holds.""" - settings = placed(json.loads((clone / "settings.json").read_text(encoding="utf-8")), {CLONE: shlex.quote(str(clone)), REVIEWS: str(reviews)}) +def settings_written(home: pathlib.Path, clone: pathlib.Path, reports: pathlib.Path) -> Failure | None: + """Writes the home's settings.json: the clone's, with the clone's folder in place of CLONE and the reports folder in place of REPORTS, and the model the home's file holds.""" + settings = placed(json.loads((clone / "settings.json").read_text(encoding="utf-8")), {CLONE: shlex.quote(str(clone)), REPORTS: str(reports)}) generated = home / "settings.json" try: old = json.loads(generated.read_text(encoding="utf-8")) if generated.is_file() else {} diff --git a/bin/claude_home/test_home.py b/bin/claude_home/test_home.py index 9396ea72..26db91b1 100644 --- a/bin/claude_home/test_home.py +++ b/bin/claude_home/test_home.py @@ -14,7 +14,7 @@ SETTINGS = { "enabledPlugins": {"code-review@official": True, "frontend-design@official": False, "lsp@other": True}, "extraKnownMarketplaces": {"official": {"source": {"repo": "anthropics/official", "source": "github"}}, "other": {"source": {"repo": "someone/other", "source": "github"}}, "unused": {"source": {"repo": "someone/unused", "source": "github"}}}, "hooks": {"PreToolUse": [{"hooks": [{"command": "{clone}/bin/rule-hook", "type": "command"}]}]}, - "permissions": {"additionalDirectories": ["{reviews}", "~/code"], "defaultMode": "bypassPermissions"}, + "permissions": {"additionalDirectories": ["{reports}", "~/code"], "defaultMode": "bypassPermissions"}, "tui": "fullscreen", } SIGNED_IN = json.dumps({"loggedIn": True, "authMethod": "claude.ai"}) @@ -32,7 +32,7 @@ class Home(unittest.TestCase): (self.clone / "settings.json").write_text(json.dumps(SETTINGS), encoding="utf-8") self.home = self.temp / "share" / "claude-home" self.commit: str | Failure = "1a2b3c\n" - self.reviews = self.temp / "state" / "build-release" / "larv-review" + self.reports = self.temp / "state" / "build-release" / "larv-review" self.status = SIGNED_IN # The exit code of each `claude plugin` command, by its last argument; 0 for one not named. self.exits: dict[str, int] = {} @@ -45,7 +45,7 @@ class Home(unittest.TestCase): return subprocess.CompletedProcess(args, self.exits.get(args[-1], 0), "", f"no {args[-1]}\nin the marketplace\n") def unready(self) -> str | None: - return unready(self.home, self.clone, self.reviews, self.claude, lambda *args, cwd=None: self.commit if (args, cwd) == (("rev-parse", "HEAD"), str(self.clone)) else Failure(f"unexpected git {args} in {cwd}")) + return unready(self.home, self.clone, self.reports, self.claude, lambda *args, cwd=None: self.commit if (args, cwd) == (("rev-parse", "HEAD"), str(self.clone)) else Failure(f"unexpected git {args} in {cwd}")) def settings(self) -> dict[str, object]: read: dict[str, object] = json.loads((self.home / "settings.json").read_text(encoding="utf-8")) @@ -69,15 +69,15 @@ class Home(unittest.TestCase): def test_the_generated_settings_let_a_session_write_the_review_folder_wherever_the_state_folder_is(self) -> None: self.unready() - self.assertEqual(self.settings()["permissions"], {"additionalDirectories": [str(self.reviews), "~/code"], "defaultMode": "bypassPermissions"}) + self.assertEqual(self.settings()["permissions"], {"additionalDirectories": [str(self.reports), "~/code"], "defaultMode": "bypassPermissions"}) - def test_a_moved_review_folder_refreshes_the_home(self) -> None: + def test_a_moved_reports_folder_refreshes_the_home(self) -> None: self.unready() - self.reviews = self.temp / "elsewhere" / "build-release" / "larv-review" + self.reports = self.temp / "elsewhere" / "build-release" / "larv-review" self.assertIsNone(self.unready()) - self.assertEqual(self.settings()["permissions"]["additionalDirectories"][0], str(self.reviews)) # type: ignore[index] + self.assertEqual(self.settings()["permissions"]["additionalDirectories"][0], str(self.reports)) # type: ignore[index] def test_it_adds_each_enabled_plugins_marketplace_then_installs_each_enabled_plugin(self) -> None: self.unready() @@ -148,7 +148,7 @@ class Home(unittest.TestCase): def claude(args: list[str]) -> subprocess.CompletedProcess[str]: return subprocess.CompletedProcess(args, 1, stdout, stderr) if args == ["auth", "status"] else subprocess.CompletedProcess(args, 0, "", "") - reason = unready(self.home, self.clone, self.reviews, claude, lambda *args, cwd=None: "1a2b3c\n") + reason = unready(self.home, self.clone, self.reports, claude, lambda *args, cwd=None: "1a2b3c\n") self.assertEqual(reason, f"could not ask claude who is signed in to the loop's Claude home, {self.home}: {said}") @@ -189,7 +189,7 @@ class Home(unittest.TestCase): def missing(args: list[str]) -> subprocess.CompletedProcess[str]: raise FileNotFoundError(2, "No such file or directory", "claude") - reason = unready(self.home, self.clone, self.reviews, missing, lambda *args, cwd=None: "1a2b3c\n") + reason = unready(self.home, self.clone, self.reports, missing, lambda *args, cwd=None: "1a2b3c\n") self.assertEqual(reason, f"could not build the loop's Claude home, {self.home}: [Errno 2] No such file or directory: 'claude'") @@ -197,7 +197,7 @@ class Home(unittest.TestCase): def stalled(args: list[str]) -> subprocess.CompletedProcess[str]: raise subprocess.TimeoutExpired(["claude", *args], 600) - reason = unready(self.home, self.clone, self.reviews, stalled, lambda *args, cwd=None: "1a2b3c\n") + reason = unready(self.home, self.clone, self.reports, stalled, lambda *args, cwd=None: "1a2b3c\n") self.assertEqual(reason, f"could not build the loop's Claude home, {self.home}: Command '['claude', 'plugin', 'marketplace', 'add', 'anthropics/official']' timed out after 600 seconds") diff --git a/settings.json b/settings.json index 4800ac73..0abea0af 100644 --- a/settings.json +++ b/settings.json @@ -56,7 +56,7 @@ }, "permissions": { "additionalDirectories": [ - "{reviews}", + "{reports}", "~/code" ], "defaultMode": "bypassPermissions" From d483a1d8c2ea069b2db2c6f0504ff665481040d6 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 04:40:48 +0100 Subject: [PATCH 17/19] =?UTF-8?q?Answer=20prose=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20reword=20th?= =?UTF-8?q?e=20reports-folder=20comment,=20split=20the=20README=20sentence?= =?UTF-8?q?=20and=20rename=20the=20two=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- bin/claude_home/home.py | 2 +- bin/claude_home/test_home.py | 2 +- bin/loop_effects/test_effects.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 01397515..1b630b27 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ build-release and build-epic run every claude in the loop's Claude home, `~/.loc - every plugin the clone's `settings.json` enables, which build-release or build-epic installs; - what Claude Code keeps in its home: your sign-in there, the sessions and the memory files. -Sign in to the loop's home once. Until you have, build-release and build-epic stop and print the line to run, `CLAUDE_CONFIG_DIR=~/.local/share/build-release/claude-home claude`: type `/login` in the claude it opens. A model you pick there with `/model` stays in the generated `settings.json`. The loop's home has no theme or status line of yours: those stay in your own `~/.claude`, for the claude you start yourself. build-release or build-epic builds the home again once the clone holds another commit, as after `self-update`, or `XDG_STATE_HOME` moves, and keeps the sign-in, the model and the sessions. The home follows the clone whose build-release or build-epic ran last, so run only the release clone's, never the development clone's: that one would point every running loop at unreleased rules. +Sign in to the loop's home once. Until you have, build-release and build-epic stop and print the line to run, `CLAUDE_CONFIG_DIR=~/.local/share/build-release/claude-home claude`: type `/login` in the claude it opens. A model you pick there with `/model` stays in the generated `settings.json`. The loop's home has no theme or status line of yours: those stay in your own `~/.claude`, for the claude you start yourself. build-release or build-epic builds the home again once the clone holds another commit, as after `self-update`, and keeps the sign-in, the model and the sessions. It builds the home again when you change `XDG_STATE_HOME`, too. The home follows the clone whose build-release or build-epic ran last, so run only the release clone's, never the development clone's: that one would point every running loop at unreleased rules. The setup keeps each project's config, and what you choose for a project, in the config folder, `~/.config/build-release/`. Its tools keep their own state, such as transcripts, review reports and locks, in the state folder, `~/.local/state/build-release/`. The loop's Claude home is in the data folder, `~/.local/share/build-release/`, which holds what build-release builds again and what Claude Code writes. Where `XDG_CONFIG_HOME` holds an absolute path, the config folder is `build-release/` under that path instead, and likewise the state folder under `XDG_STATE_HOME` and the data folder under `XDG_DATA_HOME`; this README spells the defaults. Set such a variable in the environment Claude Code starts in, since rule-hook reads it there. Back up these four folders: diff --git a/bin/claude_home/home.py b/bin/claude_home/home.py index faa387c6..7fca1847 100644 --- a/bin/claude_home/home.py +++ b/bin/claude_home/home.py @@ -17,7 +17,7 @@ from text_files.file_writes import replace_file LINKED = ("CLAUDE.md", "agents", "rules", "skills") # Stands for the clone's folder in the clone's settings.json. Every value that holds it is a shell command, such as a hook's. CLONE = "{clone}" -# Stands for the reports folder in the clone's settings.json: the folder under the state folder that holds each chunk's review reports, so a session may write there. Unlike CLONE, its value is a path, not part of a shell command. +# Stands for the reports folder, which holds every chunk's review folder, in the clone's settings.json. Every value that holds it is a path, so unlike CLONE it isn't shell-quoted. REPORTS = "{reports}" # The file in the home that names the clone, its commit and the reports folder the home was built from. BUILT_FROM = "built-from" diff --git a/bin/claude_home/test_home.py b/bin/claude_home/test_home.py index 26db91b1..bbcfec54 100644 --- a/bin/claude_home/test_home.py +++ b/bin/claude_home/test_home.py @@ -66,7 +66,7 @@ class Home(unittest.TestCase): self.assertEqual(self.settings()["tui"], "fullscreen") self.assertEqual(json.loads((self.clone / "settings.json").read_text(encoding="utf-8")), SETTINGS) - def test_the_generated_settings_let_a_session_write_the_review_folder_wherever_the_state_folder_is(self) -> None: + def test_the_generated_settings_let_a_session_write_the_reports_folder_wherever_the_state_folder_is(self) -> None: self.unready() self.assertEqual(self.settings()["permissions"], {"additionalDirectories": [str(self.reports), "~/code"], "defaultMode": "bypassPermissions"}) diff --git a/bin/loop_effects/test_effects.py b/bin/loop_effects/test_effects.py index 31cad752..877ba9bd 100644 --- a/bin/loop_effects/test_effects.py +++ b/bin/loop_effects/test_effects.py @@ -154,7 +154,7 @@ class ClaudeHomeEffect(unittest.TestCase): self.assertEqual(ran[-1], f"{built} auth status") self.assertIn(f"{built} plugin install code-review@claude-plugins-official", ran) - def test_lets_a_session_write_the_review_folder_under_the_state_folder_it_is_given(self): + def test_lets_a_session_write_the_reports_folder_under_the_state_folder_it_is_given(self): with tempfile.TemporaryDirectory() as folder: claude = pathlib.Path(folder, "claude") claude.write_text('#!/bin/sh\necho \'{"loggedIn": true}\'\n') From 54cbcd53917653f9798d59f8269dfba5ee2b7191 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 04:43:20 +0100 Subject: [PATCH 18/19] Sort the reports_folder import by its first binding --- bin/loop_effects/effects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/loop_effects/effects.py b/bin/loop_effects/effects.py index 463b0cb1..4c2cf8c7 100644 --- a/bin/loop_effects/effects.py +++ b/bin/loop_effects/effects.py @@ -22,10 +22,10 @@ from git_cli import git_repo from machine_load.memory import Memory, read_memory from project_config.settings import Notifier from text_files.file_writes import replace_file +from review_rules.review_folder import reports_folder from forge.commands import Run, runner from machine_load.slots import slot_folder from claude_home.home import unready -from review_rules.review_folder import reports_folder # Seconds before a Python script build-release runs is stopped, so a hung one, such as chunk-preflight, cannot hold the loop. PYTHON_TIMEOUT = 600 From 7d38116d9e87fbac854a54b5405ff63f7e4b0a5e Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 04:43:32 +0100 Subject: [PATCH 19/19] Finish item 582 in the plan --- todo.md | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/todo.md b/todo.md index 5d8c5d45..84e07e7d 100644 --- a/todo.md +++ b/todo.md @@ -17,7 +17,6 @@ | 577 | 0.18.0 | 486, 581 | owner | **Test in the gate that a container holding only a stock Claude Code runs a chunk from a clone, against a mock Messages API, and that the run leaves the container's own `~/.claude` as it was.** | 3 | 1 | 2 | 4 | 6 | 3 by 9, 2 by 5 | 5.2 | | 576 | 0.18.0 | | owner | **Name the project `dev-factory` in the README, the prose and the tools, and say in the changelog that the repo moved.** | 2 | 2 | 2 | 4 | 4 | 2 by 1, 6 by 1 | 0.4 | | 578 | 0.18.0 | 576, 577 | owner | **Ship one chunk of this repo, to a merged pull request, from a clone of `main` that runs in the generated home, beside the untouched `~/.claude`.** | 1 | 2 | 1 | 2 | 1 | 2 by 4 | 1.2 | -| 582 | 0.18.0 | | | **Write the review folder under the state folder into the generated `settings.json`'s `additionalDirectories`, so a moved `XDG_STATE_HOME` needs no hand edit.** | 1 | 1 | 2 | 2 | 1 | 2 by 2 | 0.6 | | 585 | 0.19.0 | | | **Give this repo an `AGENTS.md` like any project, and drop the decision and the rule that say it keeps none.** | 3 | 1 | 3 | 5 | 4 | code health by 3 | 3.1 | | 580 | 0.19.0 | | | **Call no scoring run for a release already cut whose last item the chunk moved to a later release.** | 2 | 2 | 3 | 5 | 3 | 1.4 by 3, 1.5 by 3 | 1.6 | | 487 | 0.20.0 | | owner | **Run larv-review's passes from a program that picks them from the diff and the item, counts rounds against the cap and decides each rerun, with each reviewer returning its findings as JSON against a schema.** | 4 | 2 | 3 | 7 | 8 | 1.1 by 5, 1.4 by 5 | 0.4 | @@ -214,17 +213,6 @@ Touches: - `README.md` -### 582. Write the review folder under the state folder into the generated `settings.json`'s `additionalDirectories`, so a moved `XDG_STATE_HOME` needs no hand edit. - -Found while shipping the loop's generated Claude home. The tracked `settings.json` names the default review folder, `~/.local/state/build-release/larv-review`, in `additionalDirectories`. Where `XDG_STATE_HOME` moves the state folder, README.md → Install asks the person to add the moved folder to the generated `settings.json` by hand, again after each build of the home. The code that builds the home can find the state folder through `loop_state.paths`, and write it. - -Touches: - -- `bin/claude_home/home.py`: `settings_written`, `unready` (small) -- `bin/loop_effects/effects.py`: `system_effects` (small) -- `settings.json`: lines 56-61 -- `README.md`: `## Install` (small) - ### 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.