Run a newcomer's first chunk in the gate, and keep the person's own Claude home out of the loop's #812
@@ -2,6 +2,7 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
- **The loop's Claude home keeps out your own `~/.claude/CLAUDE.md` and `~/.claude/rules/`, which Claude Code loaded in every project under your home folder.** The home's generated `settings.json` now names your `~/.claude` in `claudeMdExcludes`. build-release and build-epic refuse to run from a release cloned inside `~/.claude`, since that setting would drop the release's own rules: clone it elsewhere, as `README.md` → Install says. The gate now runs a first chunk as a newcomer would, in a container with a stock Claude Code and a mock Messages API (`first-chunk-e2e/run`), and fails where anything from that `~/.claude` reaches a request or the folder changes.
|
||||
- Added `claude-release`, which opens claude in the loop's Claude home with the setup loaded, in the folder you run it in, and passes every argument on to claude; `README.md` → Install says how it differs from the claude you start from your own `~/.claude`.
|
||||
- **The project and its repo are named `dev-factory`, in the README, the docs, the prose and the tools; the repo moved from `claude-config` on the forge.** Before you update, point each clone at the new URL, as `README.md` → Install clones it: `git remote set-url origin <URL>`. First finish the project's open chunks and stop its running `build-release`: neither the tmux session `loop-claude-config` nor a claude session named `A claude-config build-release <window>` is found under the new key. Then rename the setup's development clone from `~/code/claude-config` to `~/code/dev-factory`, where the tools expect it. A project's key is its clone's path relative to `~/code`, so the rename gives the project a new key. After it, set `checkout = "~/code/dev-factory"` in the project's `config.toml`, move its folder `~/.config/build-release/claude-config/` to `~/.config/build-release/dev-factory/`, move its folder under the transcripts root the same way (`~/.local/state/build-release/transcripts/`, unless `BUILD_RELEASE_TRANSCRIPTS` names another), and rename its entry in `~/.config/build-release/models.json`. The Docker image the README builds for `task-bench` is tagged `dev-factory-task-bench`, not `claude-config-task-bench`: build it again.
|
||||
- **The rules, agents, skills and each tool's text name a file of the setup as the setup's, as in the setup's `rules/todo-items.md`, and a project's config names one as `setup:<path>`, as in `standards = "setup:skills/larv-review/standards"`.** Both hold wherever the release is cloned; `CLAUDE.md` → "Vocabulary" defines the setup. The loop's Claude home links `bin/` and `principles/` too, and `task-bench gather` runs its claude in that home, where it exits 1 until someone is signed in.
|
||||
|
||||
@@ -328,6 +328,8 @@ Test on the host with `bin/run-tests`, which runs pytest through `uvx`, pinned i
|
||||
|
||||
The commands in this section name their tools bare, as Tools says. CI runs `ci.sh` on every pull request, and `main` doesn't merge anything until it passes. The script runs the same tests on the committed HEAD in a pinned Python container. Run it under `run-heavy` to reproduce a CI failure, with Docker on `PATH` and its socket at `/var/run/docker.sock`, which the container shares.
|
||||
|
||||
`ci.sh` then runs `first-chunk-e2e/run`, which checks goals 2 and 3 as a newcomer meets them. It runs a first chunk in a container, from a clone of the committed HEAD, against a mock Messages API, so it needs no sign-in. It fails unless the chunk finishes on the setup's instructions, no request holds anything from the container's `~/.claude`, and that folder and `~/.claude.json` hold what they held before. Run it under `run-heavy` too. It needs the network: the image fetches Claude Code, and `build-release` installs the plugins.
|
||||
|
||||
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 dev-factory-task-bench task-bench-image`. Then run `task-bench --image dev-factory-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.
|
||||
|
||||
+12
-7
@@ -32,10 +32,10 @@ class Git(typing.Protocol):
|
||||
def __call__(self, *args: str, cwd: str | None = None) -> str | Failure: ...
|
||||
|
||||
|
||||
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."""
|
||||
def unready(home: pathlib.Path, clone: pathlib.Path, reports: pathlib.Path, own: 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; own is the person's own Claude home, whose instructions the home keeps out. Then says 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, reports, claude, git)
|
||||
built = refreshed(home, clone, reports, own, claude, git)
|
||||
if isinstance(built, Failure):
|
||||
return f"could not build the loop's Claude home, {home}: {built.reason}"
|
||||
status = claude(["auth", "status"])
|
||||
@@ -70,7 +70,10 @@ 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, reports: pathlib.Path, claude: Claude, git: Git) -> Failure | None:
|
||||
def refreshed(home: pathlib.Path, clone: pathlib.Path, reports: pathlib.Path, own: pathlib.Path, claude: Claude, git: Git) -> Failure | None:
|
||||
# The home links to the clone's rules/, and the exclusion of own's files also drops a rule file reached through a link: a clone in own would run without its rules.
|
||||
if clone.resolve().is_relative_to(own.resolve()):
|
||||
return Failure(f"the release is cloned in your own Claude home, {own}, whose instructions the loop keeps out; clone it elsewhere, as README.md → Install says")
|
||||
commit = git("rev-parse", "HEAD", cwd=str(clone))
|
||||
if isinstance(commit, Failure):
|
||||
return commit
|
||||
@@ -83,7 +86,7 @@ def refreshed(home: pathlib.Path, clone: pathlib.Path, reports: 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, reports) or plugins_installed(clone, claude) or replace_file(stamp, built_from.encode())
|
||||
return linked(home, clone) or settings_written(home, clone, reports, own) or plugins_installed(clone, claude) or replace_file(stamp, built_from.encode())
|
||||
|
||||
|
||||
def linked(home: pathlib.Path, clone: pathlib.Path) -> Failure | None:
|
||||
@@ -96,9 +99,11 @@ def linked(home: pathlib.Path, clone: pathlib.Path) -> Failure | None:
|
||||
return None
|
||||
|
||||
|
||||
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."""
|
||||
def settings_written(home: pathlib.Path, clone: pathlib.Path, reports: pathlib.Path, own: 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, the model the home's file holds, and own's instructions kept out."""
|
||||
settings = placed(json.loads((clone / "settings.json").read_text(encoding="utf-8")), {CLONE: shlex.quote(str(clone)), REPORTS: str(reports)})
|
||||
# Claude Code reads `.claude/CLAUDE.md` and `.claude/rules/` in every folder above the one it runs in, so the person's own would load in each project under their home folder: docs/decisions.md → `Claude Code in a home of its own`.
|
||||
settings["claudeMdExcludes"] = [f"{own}/**"]
|
||||
generated = home / "settings.json"
|
||||
try:
|
||||
old = json.loads(generated.read_text(encoding="utf-8")) if generated.is_file() else {}
|
||||
|
||||
@@ -33,6 +33,7 @@ class Home(unittest.TestCase):
|
||||
self.home = self.temp / "share" / "claude-home"
|
||||
self.commit: str | Failure = "1a2b3c\n"
|
||||
self.reports = self.temp / "state" / "build-release" / "larv-review"
|
||||
self.own = self.temp / "home" / ".claude"
|
||||
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 +46,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.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}"))
|
||||
return unready(self.home, self.clone, self.reports, self.own, 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"))
|
||||
@@ -71,6 +72,19 @@ class Home(unittest.TestCase):
|
||||
|
||||
self.assertEqual(self.settings()["permissions"], {"additionalDirectories": [str(self.reports), "~/code"], "defaultMode": "bypassPermissions"})
|
||||
|
||||
def test_the_generated_settings_keep_out_the_instructions_of_the_persons_own_home(self) -> None:
|
||||
self.unready()
|
||||
|
||||
self.assertEqual(self.settings()["claudeMdExcludes"], [f"{self.own}/**"])
|
||||
|
||||
def test_a_clone_in_the_persons_own_home_stops_since_the_exclusion_would_drop_the_setups_rules(self) -> None:
|
||||
for own in (self.clone, self.clone.parent):
|
||||
with self.subTest(own=own):
|
||||
self.own = own
|
||||
|
||||
self.assertEqual(self.unready(), f"could not build the loop's Claude home, {self.home}: the release is cloned in your own Claude home, {own}, whose instructions the loop keeps out; clone it elsewhere, as README.md → Install says")
|
||||
self.assertFalse((self.home / "settings.json").exists())
|
||||
|
||||
def test_a_moved_reports_folder_refreshes_the_home(self) -> None:
|
||||
self.unready()
|
||||
self.reports = self.temp / "elsewhere" / "build-release" / "larv-review"
|
||||
@@ -102,7 +116,7 @@ class Home(unittest.TestCase):
|
||||
|
||||
self.unready()
|
||||
|
||||
self.assertEqual((self.home / "settings.json").read_text(encoding="utf-8"), '{\n "env": {\n "A": "1"\n },\n "tui": "fullscreen"\n}\n')
|
||||
self.assertEqual((self.home / "settings.json").read_text(encoding="utf-8"), f'{{\n "claudeMdExcludes": [\n "{self.own}/**"\n ],\n "env": {{\n "A": "1"\n }},\n "tui": "fullscreen"\n}}\n')
|
||||
|
||||
def test_a_home_built_from_the_clones_commit_is_left_as_it_is(self) -> None:
|
||||
self.unready()
|
||||
@@ -149,7 +163,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.reports, claude, lambda *args, cwd=None: "1a2b3c\n")
|
||||
reason = unready(self.home, self.clone, self.reports, self.own, 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}")
|
||||
|
||||
@@ -190,7 +204,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.reports, missing, lambda *args, cwd=None: "1a2b3c\n")
|
||||
reason = unready(self.home, self.clone, self.reports, self.own, 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'")
|
||||
self.assertFalse(only_signed_out(reason))
|
||||
@@ -199,7 +213,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.reports, stalled, lambda *args, cwd=None: "1a2b3c\n")
|
||||
reason = unready(self.home, self.clone, self.reports, self.own, 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")
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import typing
|
||||
|
||||
from notifier.notify import Backend, BACKENDS, notify
|
||||
from loop_effects import child_shells
|
||||
from loop_state.paths import claude_home, in_claude_home, RELEASE_ROOT, with_release_tools
|
||||
from loop_state.paths import CLAUDE_HOME, claude_home, in_claude_home, RELEASE_ROOT, with_release_tools
|
||||
from failure import Failure
|
||||
from git_cli import git_repo
|
||||
from machine_load.memory import Memory, read_memory
|
||||
@@ -128,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, 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_home=lambda: unready(claude_home(env, home), RELEASE_ROOT, reports_folder(home, env), home / CLAUDE_HOME, 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),
|
||||
|
||||
@@ -168,6 +168,19 @@ class ClaudeHomeEffect(unittest.TestCase):
|
||||
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_keeps_the_instructions_of_the_persons_own_claude_home_out_of_the_loops(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")
|
||||
|
||||
reason = system_effects(home, without_xdg_folders(os.environ) | {"PATH": f"{folder}:{os.environ['PATH']}"}).claude_home()
|
||||
|
||||
self.assertIsNone(reason)
|
||||
written = json.loads((home / ".local" / "share" / "build-release" / "claude-home" / "settings.json").read_text())
|
||||
self.assertEqual(written["claudeMdExcludes"], [f"{home}/.claude/**"])
|
||||
|
||||
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")
|
||||
|
||||
@@ -10,7 +10,7 @@ RELEASE_ROOT = pathlib.Path(__file__).resolve().parents[2]
|
||||
|
||||
# Each folder below is named relative to the person's home folder.
|
||||
|
||||
# The person's own Claude home. No claude the loop starts runs there, and neither entry point reads or writes it: its name is for prose and for rule-hook's rules that guard it.
|
||||
# The person's own Claude home. No claude the loop starts runs there, and neither entry point reads or writes it: its name is for prose, for rule-hook's rules that guard it, and for the instructions the loop's home keeps out.
|
||||
CLAUDE_HOME = ".claude"
|
||||
# The name of the setup's own folder, in the config home and in the state home.
|
||||
SETUP = "build-release"
|
||||
|
||||
@@ -18,3 +18,5 @@ git bundle create - HEAD | docker run --rm -i ${CI_CONTAINER:+--name "$CI_CONTAI
|
||||
# On a failure, the CI log shows the whole pytest output, which run-tests saved to its log file.
|
||||
PATH="$HOME/.local/bin:$PATH" bin/run-tests || { cat /tmp/run-tests-*.log; exit 1; }
|
||||
'
|
||||
# Then a newcomer's first chunk, in a container of its own: first-chunk-e2e/first_chunk.py says what it checks.
|
||||
sh first-chunk-e2e/run
|
||||
|
||||
@@ -132,6 +132,7 @@ The cap is 5, `bin/plan/todo_table.py`'s `BUNDLE_MAX_R`, from the same chunks: b
|
||||
2026-11-20, lilleman's standalone-install plan. Serves goal 3, which keeps the setup out of the human's `~/.claude`, and goal 5: a home of its own keeps the loop's transcripts and token apart from the human's. The plan therefore runs every claude the loop starts in a home of its own, and doesn't load the setup with `--plugin-dir`, `--settings` and `--append-system-prompt-file` over the human's home. The probes ran on Claude Code 2.1.330, on throwaway homes, never the human's. A mock Messages API at `ANTHROPIC_BASE_URL` recorded each request and answered the first with a tool call that reads a file, so the system prompt and the tool results show what loaded, with no real token. A bullet that names 2.1.336 was probed on that version instead. Each result holds for the version it was probed on; repeat the probes when the version changes.
|
||||
|
||||
- **Loads from `$CLAUDE_CONFIG_DIR`:** `CLAUDE.md` (in the system prompt), `rules/*.md` (one with `paths:` entered the context after the model read a matching file, not before), `agents/`, `skills/`, the hooks of `settings.json` (a `SessionStart` hook ran) and plugins. `claude plugin marketplace add` and `claude plugin install` write to `<home>/plugins`, and the installed plugin's skill is listed. `.claude.json` lands in the home too, so the human's `~/.claude.json` stays theirs.
|
||||
- **The human's own `~/.claude/CLAUDE.md` and `~/.claude/rules/` load too, unless the home's settings exclude them.** 2026-12-04, found by `first-chunk-e2e/run` on Claude Code 2.1.336: claude reads `.claude/CLAUDE.md` and `.claude/rules/` in every folder above its working folder as project instructions, and the human's home folder is above each project they keep under it. Both reached the worker's request in the loop's home. A `SessionStart` hook in the human's `~/.claude/settings.json` didn't run. So `bin/claude_home` writes `claudeMdExcludes` into the home's `settings.json`, naming everything under the human's `~/.claude`, after which neither loads. The exclusion also drops a rule file the home reaches through a link, though not a linked `CLAUDE.md`, so `bin/claude_home` refuses a release cloned in the human's `~/.claude`: none of its `rules/` would load. Not tested: a `CLAUDE.md` in the human's home folder itself, which is outside their Claude home.
|
||||
- **The loop's home signs in by `/login`.** 2026-12-03, lilleman, planning 0.18.0: the human signs in once, in a claude started with `CLAUDE_CONFIG_DIR` naming the loop's home, and makes and keeps no long-lived token file. `bin/claude_home` asks `claude auth status` before a command starts a chunk. Probed on Claude Code 2.1.336 in a throwaway home: signed out, it prints JSON with `loggedIn: false` and exits 1. Not tested: where the home keeps the sign-in. The token below stays the way a container signs in, as task-bench does.
|
||||
- **Signs in by `CLAUDE_CODE_OAUTH_TOKEN`:** the request carried `Authorization: Bearer <token>` with the `oauth-2025-04-20` beta, and `claude auth status` said `loggedIn: true, authMethod: oauth_token`. The home didn't hold a credentials file. Without the variable the home is `loggedIn: false`. Not tested: that Anthropic accepts a real token, since `claude setup-token` needs the human's browser sign-in. The authentication docs say the token lasts one year and can only make model requests; neither is tested, and the first real run shows whether it signs in.
|
||||
- **`--bare` can't use that token.** With `CLAUDE_CODE_OAUTH_TOKEN`, it says `Not logged in · Please run /login` and doesn't send a request. With `ANTHROPIC_API_KEY` it signs in, but doesn't load anything from the home (`CLAUDE.md`, rules, agents or skills) and offers only Bash, Edit and Read. So a container that signs in by a long-lived token runs without `--bare`; its fresh home is empty, so nothing of the human's loads there either. The project's `CLAUDE.md` loads from the working folder, and its `AGENTS.md` only where the project has no `CLAUDE.md`.
|
||||
|
||||
@@ -4140,3 +4140,35 @@ Read most (opens and searches):
|
||||
- `bin/claude_home/home.py` 1
|
||||
- `skills/larv-review/review-findings.md` 1
|
||||
- `todo.md` 1
|
||||
|
||||
## Reading cost, chunk 85d4c360f075, finished 2026-12-04T05:26:32Z
|
||||
|
||||
77732 new input tokens before the first commit.
|
||||
|
||||
Read most (opens and searches):
|
||||
|
||||
- `README.md` 9
|
||||
- `docs/decisions.md` 8
|
||||
- `CHANGELOG.md` 7
|
||||
- `bin/build_release/loop/usage.py` 5
|
||||
- `presentation/README.md` 2
|
||||
- `bin/loop_state/paths.py` 1
|
||||
- `presentation/index.html` 1
|
||||
- `todo.md` 1
|
||||
|
||||
## Reading cost, chunk 887a12bda0b0, finished 2026-12-04T05:37:56Z
|
||||
|
||||
160746 new input tokens before the first commit.
|
||||
|
||||
Read most (opens and searches):
|
||||
|
||||
- `README.md` 7
|
||||
- `bin/claude_home/home.py` 4
|
||||
- `bin/loop_effects/doubles.py` 4
|
||||
- `bin/build_release/loop/main.py` 3
|
||||
- `bin/loop_state/paths.py` 3
|
||||
- `bin/test_env.py` 2
|
||||
- `.gitignore` 1
|
||||
- `bin/build-epic` 1
|
||||
- `bin/build-release` 1
|
||||
- `bin/build_release/loop/test_main.py` 1
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# A newcomer's machine, with nothing of this repo. The python tag is ci.sh's. git and tmux come from Debian's current apt: the run needs no exact version.
|
||||
FROM python:3.14.8
|
||||
RUN apt-get update \
|
||||
&& apt-get install --yes --no-install-recommends git tmux \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
# Claude Code refuses to skip permission prompts as root.
|
||||
RUN useradd --create-home newcomer
|
||||
USER newcomer
|
||||
WORKDIR /home/newcomer
|
||||
ENV PATH=/home/newcomer/.local/bin:$PATH
|
||||
# The version the latest probes of docs/decisions.md → `Claude Code in a home of its own` ran on.
|
||||
RUN curl --fail --silent --show-error --location https://claude.ai/install.sh | bash -s 2.1.336
|
||||
@@ -0,0 +1,172 @@
|
||||
"""Runs a first chunk as a newcomer would, and checks that the person's own Claude home is left as it was.
|
||||
|
||||
It runs in the container of the Dockerfile beside it, from a clone of this repo: `first-chunk-e2e/run` starts it. The machine holds a stock Claude Code with its own `~/.claude`, to which this adds what a person keeps there: instructions, a rule, a skill, an agent, a command and a hook. build-release then runs a task in a small project, with claude calling the mock Messages API. The run passes where the chunk finished on the setup's instructions, no request held the person's own, and `~/.claude` and `~/.claude.json` hold what they held before.
|
||||
"""
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
import pathlib
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
|
||||
import mock_messages_api
|
||||
|
||||
CLONE = pathlib.Path(__file__).resolve().parent.parent
|
||||
HOME = pathlib.Path.home()
|
||||
# Under ~/code, so the project's key is `first-project`: bin/transcript_archive/project_key.py.
|
||||
PROJECT = HOME / "code" / "first-project"
|
||||
ARCHIVE = HOME / ".local/state/build-release/transcripts/first-project"
|
||||
CONFIG = HOME / ".config/build-release/first-project/config.toml"
|
||||
# What the person's own `~/.claude` holds beside the stock install's files. None of it loads in the loop's home, so no request may hold any of OWN_TEXTS, and the hook never runs.
|
||||
OWN_INSTRUCTION = "Sign every reply as the newcomer's own claude."
|
||||
OWN_RULE = "Open every reply with the newcomer's own greeting."
|
||||
OWN_SKILL = "Folds the newcomer's own paper cranes."
|
||||
OWN_AGENT = "Waters the newcomer's own ferns."
|
||||
OWN_COMMAND = "Winds the newcomer's own clock."
|
||||
OWN_TEXTS = (OWN_INSTRUCTION, OWN_RULE, OWN_SKILL, OWN_AGENT, OWN_COMMAND)
|
||||
OWN_HOOK_RAN = HOME / "own-hook-ran"
|
||||
OWN_FILES = {
|
||||
"CLAUDE.md": OWN_INSTRUCTION + "\n",
|
||||
# In two parts: bin/repo_checks/test_citations.py takes a rule file's path written whole for a citation of the setup's rules, and fails where the setup has no such file.
|
||||
os.path.join("rules", "greeting.md"): OWN_RULE + "\n",
|
||||
"skills/cranes/SKILL.md": f"---\nname: cranes\ndescription: {OWN_SKILL}\n---\n\nFold one.\n",
|
||||
"agents/ferns.md": f"---\nname: ferns\ndescription: {OWN_AGENT}\n---\n\nWater one.\n",
|
||||
"commands/clock.md": f"---\ndescription: {OWN_COMMAND}\n---\n\nWind it.\n",
|
||||
"settings.json": json.dumps({"hooks": {"SessionStart": [{"hooks": [{"type": "command", "command": f"touch {OWN_HOOK_RAN}"}]}]}}) + "\n",
|
||||
}
|
||||
# A heading of the setup's CLAUDE.md, which the worker's request holds where the loop's home loaded.
|
||||
SETUP_INSTRUCTION = "## Working loop"
|
||||
# What build-release asks before a project's first chunk, and the model the newcomer types: one on the shipped routing ladder.
|
||||
MODEL_QUESTION = "name claude --model takes:"
|
||||
MODEL = "claude-opus-5-5"
|
||||
# The seconds build-release may take to return, and the seconds the chunk may take after that.
|
||||
PATIENCE = 300
|
||||
README = """# first-project
|
||||
|
||||
## Goals
|
||||
|
||||
1. **Achieve:** Keep a note of what the project is for.
|
||||
- Signal: the note exists.
|
||||
- Counter-signal: the note says what the project isn't for.
|
||||
- Why: a note that misleads is worse than none.
|
||||
|
||||
## Audience
|
||||
|
||||
Whoever runs the first chunk.
|
||||
"""
|
||||
# README.md → Install → "Set up a project" gives this config for a project of one's own.
|
||||
CONFIG_TEXT = """checkout = "~/code/first-project"
|
||||
plan = "checkout:todo.md"
|
||||
working-rules = "checkout:AGENTS.md"
|
||||
decisions = "checkout:docs/decisions.md"
|
||||
score-anchors = "checkout:docs/score-anchors.md"
|
||||
comprehension-history = "checkout:docs/comprehension-history.md"
|
||||
reading-cost = "checkout:docs/reading-cost.md"
|
||||
changelog = "checkout:CHANGELOG.md"
|
||||
goals-and-audience = "checkout:README.md"
|
||||
principles = "setup:principles"
|
||||
standards = "setup:skills/larv-review/standards"
|
||||
"""
|
||||
|
||||
|
||||
def snapshot(*roots: pathlib.Path) -> dict[str, str]:
|
||||
"""What each root holds: every path under it with its mode, and a file's content hash or a link's target."""
|
||||
held = {}
|
||||
for root in roots:
|
||||
for path in [root, *sorted(root.rglob("*"))] if root.is_dir() else [root]:
|
||||
status = path.lstat()
|
||||
if path.is_symlink():
|
||||
content = f"link to {os.readlink(path)}"
|
||||
elif path.is_file():
|
||||
content = hashlib.sha256(path.read_bytes()).hexdigest()
|
||||
else:
|
||||
content = "folder"
|
||||
held[str(path)] = f"{status.st_mode:o} {content}"
|
||||
return held
|
||||
|
||||
|
||||
def git(*args: str) -> None:
|
||||
subprocess.run(["git", "-c", "user.name=Newcomer", "-c", "user.email=newcomer@example.com", "-c", "init.defaultBranch=main", *args], check=True, cwd=PROJECT, stdout=subprocess.DEVNULL)
|
||||
|
||||
|
||||
def project_made() -> None:
|
||||
"""Makes the project: a checkout with the premises in its README, a remote it is pushed to, and its config."""
|
||||
CONFIG.parent.mkdir(parents=True)
|
||||
CONFIG.write_text(CONFIG_TEXT, encoding="utf-8")
|
||||
PROJECT.mkdir(parents=True)
|
||||
(PROJECT / "README.md").write_text(README, encoding="utf-8")
|
||||
git("init", "--quiet")
|
||||
git("add", "README.md")
|
||||
git("commit", "--quiet", "-m", "State the goals and the audience")
|
||||
git("init", "--quiet", "--bare", str(HOME / "first-project.git"))
|
||||
git("remote", "add", "origin", str(HOME / "first-project.git"))
|
||||
git("push", "--quiet", "--set-upstream", "origin", "main")
|
||||
|
||||
|
||||
def chunk_finished() -> bool:
|
||||
return any("Verdict: finished" in outcomes.read_text(encoding="utf-8") for outcomes in ARCHIVE.glob("*/*.outcomes.md"))
|
||||
|
||||
|
||||
def windows() -> str:
|
||||
"""What each tmux window of the loop shows."""
|
||||
listed = subprocess.run(["tmux", "list-panes", "-a", "-F", "#{pane_id}"], capture_output=True, text=True).stdout.split()
|
||||
return "\n".join(subprocess.run(["tmux", "capture-pane", "-p", "-J", "-S", "-200", "-t", pane], capture_output=True, text=True).stdout.strip() for pane in listed)
|
||||
|
||||
|
||||
def chunk_awaited() -> None:
|
||||
"""Types the project's model into the chunk's window once build-release asks for it there, then waits until the chunk finishes or PATIENCE runs out."""
|
||||
deadline = time.monotonic() + PATIENCE
|
||||
while MODEL_QUESTION not in windows() and time.monotonic() < deadline:
|
||||
time.sleep(1)
|
||||
subprocess.run(["tmux", "send-keys", "-t", "loop-first-project:", MODEL, "Enter"], capture_output=True)
|
||||
while not chunk_finished() and time.monotonic() < deadline:
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
def failures(requests: mock_messages_api.Requests, before: dict[str, str]) -> list[str]:
|
||||
"""Each way the run broke what it checks."""
|
||||
found = []
|
||||
texts = requests.texts()
|
||||
if not chunk_finished():
|
||||
found.append(f"no chunk finished within {PATIENCE} s; the loop's tmux windows show:\n{windows()}")
|
||||
if not any(SETUP_INSTRUCTION in text for text in texts):
|
||||
found.append(f"none of claude's {len(texts)} requests held the setup's CLAUDE.md, so the loop's home did not load")
|
||||
for own in OWN_TEXTS:
|
||||
if any(own in text for text in texts):
|
||||
found.append(f"a request held the person's own `{own}`, so `~/.claude` loaded in the loop")
|
||||
if OWN_HOOK_RAN.exists():
|
||||
found.append("the hook of the person's own `~/.claude/settings.json` ran in the loop")
|
||||
after = snapshot(HOME / ".claude", HOME / ".claude.json")
|
||||
for path in sorted(before.keys() | after.keys()):
|
||||
if before.get(path) != after.get(path):
|
||||
found.append(f"the run changed the person's own {path}: {before.get(path, 'absent')} before, {after.get(path, 'absent')} after")
|
||||
return found
|
||||
|
||||
|
||||
def main() -> int:
|
||||
for name, text in OWN_FILES.items():
|
||||
(HOME / ".claude" / name).parent.mkdir(parents=True, exist_ok=True)
|
||||
(HOME / ".claude" / name).write_text(text, encoding="utf-8")
|
||||
before = snapshot(HOME / ".claude", HOME / ".claude.json")
|
||||
project_made()
|
||||
requests = mock_messages_api.Requests()
|
||||
server = mock_messages_api.serve(requests)
|
||||
# A made-up token, which doesn't grant access to anything. It signs claude in, as docs/decisions.md → `Claude Code in a home of its own` found, and the mock doesn't check it.
|
||||
env = {**os.environ, "ANTHROPIC_BASE_URL": f"http://127.0.0.1:{server.server_port}", "CLAUDE_CODE_OAUTH_TOKEN": "mock-token"}
|
||||
started = subprocess.run([str(CLONE / "bin" / "build-release"), "Write a note of what the project is for."], cwd=PROJECT, env=env, stdin=subprocess.DEVNULL, timeout=PATIENCE)
|
||||
if started.returncode:
|
||||
found = [f"build-release exited {started.returncode}"]
|
||||
else:
|
||||
chunk_awaited()
|
||||
found = failures(requests, before)
|
||||
subprocess.run(["tmux", "kill-server"], capture_output=True)
|
||||
for failure in found:
|
||||
print(f"FAILED: {failure}", file=sys.stderr)
|
||||
if not found:
|
||||
print("A first chunk finished in the loop's Claude home, and `~/.claude` is as it was.")
|
||||
return 1 if found else 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
@@ -0,0 +1,119 @@
|
||||
"""A mock of Anthropic's Messages API for claude to call at `ANTHROPIC_BASE_URL`: it keeps each request and answers as a worker that is done, or as a judge that rules the chunk finished.
|
||||
|
||||
It answers no other path of the API: claude runs a chunk without them.
|
||||
"""
|
||||
import http.server
|
||||
import json
|
||||
import threading
|
||||
import typing
|
||||
|
||||
# What the worker says, whole. The judge quotes it as its evidence, which build-release checks against the transcript.
|
||||
WORKER_REPLY = "The note is written, so the chunk is finished."
|
||||
|
||||
|
||||
class Requests:
|
||||
"""Every body posted to the Messages API so far, oldest first."""
|
||||
|
||||
def __init__(self) -> None:
|
||||
self.lock = threading.Lock()
|
||||
self.bodies: list[dict[str, typing.Any]] = []
|
||||
|
||||
def add(self, body: dict[str, typing.Any]) -> None:
|
||||
with self.lock:
|
||||
self.bodies.append(body)
|
||||
|
||||
def texts(self) -> list[str]:
|
||||
"""Each request as JSON text, to search for what claude sent."""
|
||||
with self.lock:
|
||||
return [json.dumps(body, ensure_ascii=False) for body in self.bodies]
|
||||
|
||||
|
||||
def verdict_tool(body: dict[str, typing.Any]) -> str | None:
|
||||
"""The name of the tool claude offers for a reply that fits build-release's judge schema, which is how `--json-schema` asks for one; None in any other request."""
|
||||
for tool in body.get("tools", []):
|
||||
if {"finished", "interrupt", "evidence"} <= set(tool.get("input_schema", {}).get("properties", {})):
|
||||
return tool["name"]
|
||||
return None
|
||||
|
||||
|
||||
def answered(body: dict[str, typing.Any]) -> bool:
|
||||
"""Whether the request's last message returns a tool's result, so the verdict was already given."""
|
||||
content = body["messages"][-1]["content"]
|
||||
return isinstance(content, list) and any(block.get("type") == "tool_result" for block in content)
|
||||
|
||||
|
||||
def verdict(schema: dict[str, typing.Any]) -> dict[str, typing.Any]:
|
||||
"""A reply that fits schema and rules the chunk finished on the worker's reply: every other field is empty or false."""
|
||||
empty = {name: "" if field["type"] == "string" else False if field["type"] == "boolean" else 0 for name, field in schema["properties"].items()}
|
||||
return {**empty, "finished": True, "evidence": WORKER_REPLY}
|
||||
|
||||
|
||||
def reply_block(body: dict[str, typing.Any]) -> dict[str, typing.Any]:
|
||||
"""The one content block that answers body."""
|
||||
tool = verdict_tool(body)
|
||||
if tool is None or answered(body):
|
||||
return {"type": "text", "text": WORKER_REPLY}
|
||||
schema = next(each["input_schema"] for each in body["tools"] if each["name"] == tool)
|
||||
return {"type": "tool_use", "id": "toolu_verdict", "name": tool, "input": verdict(schema)}
|
||||
|
||||
|
||||
def message(body: dict[str, typing.Any], block: dict[str, typing.Any]) -> dict[str, typing.Any]:
|
||||
return {
|
||||
"id": "msg_mock",
|
||||
"type": "message",
|
||||
"role": "assistant",
|
||||
"model": body.get("model", "mock"),
|
||||
"content": [block],
|
||||
"stop_reason": "tool_use" if block["type"] == "tool_use" else "end_turn",
|
||||
"stop_sequence": None,
|
||||
"usage": {"input_tokens": 1, "output_tokens": 1},
|
||||
}
|
||||
|
||||
|
||||
def stream(whole: dict[str, typing.Any]) -> bytes:
|
||||
"""whole as the server-sent events of a streamed reply."""
|
||||
block = whole["content"][0]
|
||||
if block["type"] == "text":
|
||||
start, delta = {"type": "text", "text": ""}, {"type": "text_delta", "text": block["text"]}
|
||||
else:
|
||||
start, delta = {**block, "input": {}}, {"type": "input_json_delta", "partial_json": json.dumps(block["input"])}
|
||||
events = [
|
||||
{"type": "message_start", "message": {**whole, "content": [], "stop_reason": None}},
|
||||
{"type": "content_block_start", "index": 0, "content_block": start},
|
||||
{"type": "content_block_delta", "index": 0, "delta": delta},
|
||||
{"type": "content_block_stop", "index": 0},
|
||||
{"type": "message_delta", "delta": {"stop_reason": whole["stop_reason"], "stop_sequence": None}, "usage": {"output_tokens": 1}},
|
||||
{"type": "message_stop"},
|
||||
]
|
||||
return "".join(f"event: {event['type']}\ndata: {json.dumps(event)}\n\n" for event in events).encode()
|
||||
|
||||
|
||||
def serve(requests: Requests) -> http.server.ThreadingHTTPServer:
|
||||
"""Starts the mock on a free port of this machine, and returns its server, whose `server_port` names the port."""
|
||||
|
||||
class Handler(http.server.BaseHTTPRequestHandler):
|
||||
def do_POST(self) -> None:
|
||||
body = json.loads(self.rfile.read(int(self.headers["Content-Length"])))
|
||||
if self.path.split("?")[0] != "/v1/messages":
|
||||
self.answer(404, "application/json", b'{"type": "error", "error": {"type": "not_found_error", "message": "the mock answers only /v1/messages"}}')
|
||||
return
|
||||
requests.add(body)
|
||||
whole = message(body, reply_block(body))
|
||||
if body.get("stream"):
|
||||
self.answer(200, "text/event-stream", stream(whole))
|
||||
else:
|
||||
self.answer(200, "application/json", json.dumps(whole).encode())
|
||||
|
||||
def answer(self, status: int, kind: str, content: bytes) -> None:
|
||||
self.send_response(status)
|
||||
self.send_header("Content-Type", kind)
|
||||
self.send_header("Content-Length", str(len(content)))
|
||||
self.end_headers()
|
||||
self.wfile.write(content)
|
||||
|
||||
def log_message(self, format: str, *args: typing.Any) -> None:
|
||||
"""Silent: the run's own output says what failed."""
|
||||
|
||||
server = http.server.ThreadingHTTPServer(("127.0.0.1", 0), Handler)
|
||||
threading.Thread(target=server.serve_forever, daemon=True).start()
|
||||
return server
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# Runs a first chunk of the committed HEAD as a newcomer would: in a container that holds only what README.md → Install asks for and a stock Claude Code, from a clone, against a mock Messages API.
|
||||
# first_chunk.py says what it checks. ci.sh runs this; run it yourself under run-heavy.
|
||||
# The repo goes in as a git bundle, as in ci.sh.
|
||||
set -eu
|
||||
cd "$(dirname "$0")/.."
|
||||
image=$(docker build --quiet --memory 2g --memory-swap 2g first-chunk-e2e)
|
||||
git bundle create - HEAD | docker run --rm -i --init --memory 4g --memory-swap 4g "$image" sh -euc '
|
||||
cat >/tmp/head.bundle
|
||||
git -c init.defaultBranch=main -c advice.detachedHead=false clone --quiet /tmp/head.bundle ~/build-release
|
||||
python3 ~/build-release/first-chunk-e2e/first_chunk.py
|
||||
'
|
||||
@@ -6,14 +6,14 @@
|
||||
|
||||
`Bar = 0.1`
|
||||
|
||||
`Next ID = 586`
|
||||
`Next ID = 588`
|
||||
|
||||
## Items
|
||||
|
||||
| ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score |
|
||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||
| 577 | 0.18.0 | | 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 |
|
||||
| 578 | 0.18.0 | 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 |
|
||||
| 578 | 0.18.0 | | 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 |
|
||||
| 586 | 0.19.0 | | | **Keep the person's own skills, agents and commands out of the loop's Claude home where `HOME` names the home folder through a symlink.** | 2 | 3 | 2 | 5 | 3 | 3 by 4 | 5.0 |
|
||||
| 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 |
|
||||
@@ -27,7 +27,7 @@
|
||||
| 493 | 0.21.0 | 490, 491 | owner | **Add a second harness adapter and run one chunk of this repo on it end to end.** | 3 | 2 | 2 | 5 | 7 | 1.4 by 3, 1.3 by 2, 6 by 8 | 1.3 |
|
||||
| 495 | 0.22.0 | | owner | **Fail the gate where shipped content names a person, a client, a private host or a private URL.** | 2 | 1 | 3 | 4 | 3 | 5 by 5 | 6.2 |
|
||||
| 497 | 0.22.0 | 498 | decision | **Compare the first 10 chunks `build-release`'s state machine drove with the 10 before them on tokens, 🔴 and 🟡 findings and interrupts per chunk, and move back to prose each step whose figures got worse.** | 1 | 2 | 1 | 2 | 3 | 1.1 by 3, 1.4 by 3 | 1.7 |
|
||||
| 494 | 0.22.0 | 577 | owner | **Let a newcomer clone a release, sign in and run a first project from the README alone, with an example config.** | 2 | 2 | 2 | 4 | 5 | 1.6 by 4, 2 by 6 | 1.6 |
|
||||
| 494 | 0.22.0 | | owner | **Let a newcomer clone a release, sign in and run a first project from the README alone, with an example config.** | 2 | 2 | 2 | 4 | 5 | 1.6 by 4, 2 by 6 | 1.6 |
|
||||
| 496 | 0.22.0 | 491 | owner | **Rename what says Claude where it means any harness, such as `CLAUDE.md`.** | 3 | 2 | 3 | 6 | 6 | 6 by 2, code health by 2 | 1.2 |
|
||||
| 446 | 0.23.0 | | question | **Kill the process a stuck check names where its verdict is `stuck`, once the human says the recorded verdicts match what they would have done.** | 2 | 2 | 3 | 5 | 3 | 1.5 by 3 | 0.8 |
|
||||
| 521 | 0.23.0 | | | **Refuse a `.dockerignore` that leaves out a secret-named entry the `.gitignore` beside it ignores, where a Dockerfile copies the whole build context.** | 2 | 2 | 3 | 5 | 3 | 5 by 4 | 5.0 |
|
||||
@@ -101,18 +101,6 @@
|
||||
|
||||
## Details
|
||||
|
||||
### 577. 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.
|
||||
|
||||
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 494, which keeps the newcomer's README. The probes behind the decision "Claude Code in a home of its own" already ran a mock Messages API at `ANTHROPIC_BASE_URL`. The test fails where goal 3 breaks: it compares `~/.claude` before and after the run. Give the container a memory and a swap limit, and run it under `run-heavy`.
|
||||
|
||||
The test's own files, such as its Dockerfile and mock Messages API, are new, and their folder is not yet named, so the list leaves them out.
|
||||
|
||||
Touches:
|
||||
|
||||
- `ci.sh`
|
||||
- `.gitignore`
|
||||
- `README.md`: `## Test` (small)
|
||||
|
||||
### 578. 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`.
|
||||
|
||||
Part of the standalone-install plan lilleman approved on 2026-11-20, as reshaped on 2026-12-03 when 0.18.0 was planned. This is the proof lilleman asked for before the cut. The chunk takes any item left in 0.18.0, or a tiny one filed for it. The machines themselves move after the cut, which is no plan item: the script that moves transcripts, archives, memory and plugins into the new home is thrown away once both machines have run it.
|
||||
@@ -125,6 +113,15 @@ Touches:
|
||||
|
||||
- `README.md`
|
||||
|
||||
### 586. Keep the person's own skills, agents and commands out of the loop's Claude home where `HOME` names the home folder through a symlink.
|
||||
|
||||
Item 577's stability review probed Claude Code 2.1.336 in a throwaway config home: with `HOME` set to a symlink to the home folder, a skill, an agent and a command under the person's `.claude` reached the request; with `HOME` as the real path none did. `claudeMdExcludes` kept `CLAUDE.md` and the rules out both ways. The probe ran outside a checkout, so first repeat it in a project, in `first-chunk-e2e/first_chunk.py`'s container. Where it holds, have `bin/claude_home` or `bin/loop_effects` name the home folder by its real path, and exclude both spellings of the person's Claude home. Record the probe in the decision that the home's settings comment in `bin/claude_home/home.py` cites.
|
||||
|
||||
Touches:
|
||||
- `bin/loop_effects/effects.py`: `system_effects` (small)
|
||||
- `bin/claude_home/home.py`: `settings_written` (small)
|
||||
- `first-chunk-e2e/first_chunk.py`
|
||||
|
||||
### 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.
|
||||
@@ -736,6 +733,8 @@ First look for a maintained mutation tool for POSIX sh and Bash, and cite what w
|
||||
|
||||
Run the repo's own gate per mutant, as for the other languages, and print each survivor.
|
||||
|
||||
Shell files a chunk in this repo changed without a mutant: `ci.sh` and `first-chunk-e2e/run`, in item 577's chunk. Both run only in the gate.
|
||||
|
||||
### 423. Skip the judge's model call on a worker's final message that the offline classifier decides is finished.
|
||||
|
||||
On 2026-11-18 lilleman ruled that the classifier's miss rate of about 1 in 100 decided is close enough to no missed interrupt (`docs/decisions.md` → `routing: the offline classifier may decide finished, since lilleman ruled a miss rate of about 1 in 100 decided close enough to none; the judge's model keeps every other verdict kind`).
|
||||
|
||||
Reference in New Issue
Block a user