From 56f49c1a19e3a495ba4ae944e768daf268e6d775 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 25 Sep 2026 00:00:54 +0200 Subject: [PATCH 1/4] Merge project_path into project: one path relative to ~/code, or to / outside it --- bin/loop-claude | 21 +++++++-------------- bin/test_loop_claude.py | 13 ++++++------- todo.md | 1 - 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/bin/loop-claude b/bin/loop-claude index 4c23eaa5..baf685f3 100755 --- a/bin/loop-claude +++ b/bin/loop-claude @@ -15,9 +15,10 @@ Exit 2: the human is needed and stdin or stdout is not a terminal, or the interr them typing anything. Rerunning resumes the session after either exit. Before an interrupt every worktree is marked trusted in ~/.claude.json. -Each project has one session, "A ~/code/ auto-mode" (the absolute path outside ~/code), -deleted when the chunk finishes. Its transcript is archived under $AUTO_MODE_TRANSCRIPTS (default -~/.claude/auto-mode-transcripts//) whenever the human is asked and when the chunk finishes. +Each project has one session, "A auto-mode", being the checkout relative to ~/code, +or to / outside it, deleted when the chunk finishes. Its transcript is archived under +$AUTO_MODE_TRANSCRIPTS (default ~/.claude/auto-mode-transcripts//) whenever the human is asked +and when the chunk finishes. JUDGE_MODEL and WORKER_MODEL override the model the project's Claude Code settings pick. A change to this file takes effect at the next cycle boundary, once the new file answers --help. @@ -105,15 +106,7 @@ def read_premises(): def project(): - root = os.path.expanduser("~/code") - cwd = os.getcwd() - if cwd == root or cwd.startswith(f"{root}/"): - return "~/" + os.path.relpath(cwd, os.path.dirname(root)) - return cwd - - -def project_path(): - return project().removeprefix("~/code").lstrip("/") or "code" + return os.getcwd().removeprefix(os.path.expanduser("~/code/")).lstrip("/") def session_name(): @@ -188,14 +181,14 @@ def make_private(folder): def archive(path, note): - folder = os.path.join(ARCHIVE, project_path()) + folder = os.path.join(ARCHIVE, project()) try: stamp = time.strftime("%Y-%m-%dT%H-%M-%SZ", time.gmtime(os.path.getmtime(path))) make_private(folder) dest = os.path.join(folder, f"{stamp}.md") if not os.path.exists(dest): with open(os.open(dest, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), "w", encoding="utf-8") as copy: - copy.write(f"# {stamp} {project_path()}\n\n{note}\n\n{render(entries(path))}\n") + copy.write(f"# {stamp} {project()}\n\n{note}\n\n{render(entries(path))}\n") print(f"transcript: {dest}", file=sys.stderr) except OSError as failure: print(f"could not archive the transcript: {failure}", file=sys.stderr) diff --git a/bin/test_loop_claude.py b/bin/test_loop_claude.py index 9c22643f..941c54ed 100644 --- a/bin/test_loop_claude.py +++ b/bin/test_loop_claude.py @@ -56,17 +56,16 @@ class HumanTurns(unittest.TestCase): class Project(unittest.TestCase): - def test_names_a_checkout_under_code_by_its_relative_path_and_any_other_by_its_absolute_one(self): + def test_names_a_checkout_relative_to_code_and_any_other_relative_to_root(self): with unittest.mock.patch.dict(os.environ, {"HOME": "/h"}): with unittest.mock.patch("os.getcwd", return_value="/h/code/a/b"): - self.assertEqual(loop.session_name(), "A ~/code/a/b auto-mode") - self.assertEqual(loop.project_path(), "a/b") + self.assertEqual(loop.project(), "a/b") + self.assertEqual(loop.session_name(), "A a/b auto-mode") with unittest.mock.patch("os.getcwd", return_value="/h/code"): - self.assertEqual(loop.session_name(), "A ~/code auto-mode") - self.assertEqual(loop.project_path(), "code") + self.assertEqual(loop.project(), "h/code") with unittest.mock.patch("os.getcwd", return_value="/srv/x"): - self.assertEqual(loop.session_name(), "A /srv/x auto-mode") - self.assertEqual(loop.project_path(), "srv/x") + self.assertEqual(loop.project(), "srv/x") + self.assertEqual(loop.session_name(), "A srv/x auto-mode") class WorkerArgs(unittest.TestCase): diff --git a/todo.md b/todo.md index 0e82289f..fd13e85b 100644 --- a/todo.md +++ b/todo.md @@ -4,7 +4,6 @@ Ordered by how many seats of the 2026-09-24 scoring panel (`docs/decisions.md`) named the place; each is one chunk. -- Merge `project` and `project_path` into one name and one shape for the project's path. - Name the session, the archive folder and its env var `loop-claude`; today they say `auto-mode`. - Pin every `CLAUDE.md` heading the agents and skills cite with a test that resolves each citation. - Define chunk, plan and release inside `JUDGE_RULES`; the judge reads nothing else. -- 2.52.0 From baa68ed1c363035627645f666f4c4570bc3cfcd7 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 25 Sep 2026 00:04:45 +0200 Subject: [PATCH 2/4] Record that a session-name change orphans the sessions open under the old name --- AGENTS.md | 1 + docs/decisions.md | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 7668f1de..99c1c1c3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -5,6 +5,7 @@ Decisions live in `docs/decisions.md`: - loop-claude: a judge decides interrupts, not the worker's self-report - loop-claude: one session per project, at a fixed id - loop-claude: the trust file is rewritten before an interrupt +- loop-claude: a session-name change orphans the sessions open under the old name - bin/: host python, no container - comprehension floor: the 2026-09-24 four-seat score is the ratchet, and 0.1.0 waits on what caps it - larv-review: a re-entered loop takes a fresh round cap diff --git a/docs/decisions.md b/docs/decisions.md index 98294ea8..e2850a20 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -27,3 +27,7 @@ ## larv-review: a re-entered loop takes a fresh round cap 2026-09-24, larv-review. Serves goal 4. The cap stops a loop that does not converge on one set of findings; a re-entry is a new set. A cap shared across the whole flow would skip §6.5's closing round exactly when §5 ran long. Valid while the protocol caps rounds per loop. + +## loop-claude: a session-name change orphans the sessions open under the old name + +2026-09-25, larv-review. Serves goal 4. The id derives from the name, so a rename leaves each project's open transcript under the old id, listed in the picker until the human deletes it, and the next cycle restarts from the task prompt, which tells the worker to continue any open PR or worktree. A migration would be code for a one-human audience with five checkouts; the plan orders a second rename (`auto-mode` → `loop-claude`) on the same terms. A checkout outside `~/code` mirroring a path inside it shares that path's name; checkouts live in `~/code`. Valid while the id derives from the name. -- 2.52.0 From d047e7eb785d0b7d9e7acfe2ffe751eb905428d5 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 25 Sep 2026 00:06:28 +0200 Subject: [PATCH 3/4] State the true premise for the mirrored-path case --- docs/decisions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/decisions.md b/docs/decisions.md index e2850a20..05ad8e10 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -30,4 +30,4 @@ ## loop-claude: a session-name change orphans the sessions open under the old name -2026-09-25, larv-review. Serves goal 4. The id derives from the name, so a rename leaves each project's open transcript under the old id, listed in the picker until the human deletes it, and the next cycle restarts from the task prompt, which tells the worker to continue any open PR or worktree. A migration would be code for a one-human audience with five checkouts; the plan orders a second rename (`auto-mode` → `loop-claude`) on the same terms. A checkout outside `~/code` mirroring a path inside it shares that path's name; checkouts live in `~/code`. Valid while the id derives from the name. +2026-09-25, larv-review. Serves goal 4. The id derives from the name, so a rename leaves each project's open transcript under the old id, listed in the picker until the human deletes it, and the next cycle restarts from the task prompt, which tells the worker to continue any open PR or worktree. A migration would be code for a one-human audience; the plan orders a second rename (`auto-mode` → `loop-claude`) on the same terms. A checkout outside `~/code` mirroring a path inside it shares that path's name; none does. Valid while the id derives from the name. -- 2.52.0 From 3326c464c574f77e42d56fea62f336dee2a15e91 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 25 Sep 2026 00:09:45 +0200 Subject: [PATCH 4/4] Fold the rename cost into the fixed-id decision; file the false-claim rule's four spellings --- AGENTS.md | 1 - docs/decisions.md | 6 +----- todo.md | 1 + 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 99c1c1c3..7668f1de 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -5,7 +5,6 @@ Decisions live in `docs/decisions.md`: - loop-claude: a judge decides interrupts, not the worker's self-report - loop-claude: one session per project, at a fixed id - loop-claude: the trust file is rewritten before an interrupt -- loop-claude: a session-name change orphans the sessions open under the old name - bin/: host python, no container - comprehension floor: the 2026-09-24 four-seat score is the ratchet, and 0.1.0 waits on what caps it - larv-review: a re-entered loop takes a fresh round cap diff --git a/docs/decisions.md b/docs/decisions.md index 05ad8e10..58ed9f40 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -6,7 +6,7 @@ ## loop-claude: one session per project, at a fixed id -2026-09-21, lilleman. Serves goal 4. One fixed id per project keeps the session picker at one entry per project and makes any transcript under that id the script's own to delete. Valid while the picker lists sessions by id. +2026-09-21, lilleman; the rename and mirrored-path costs accepted 2026-09-25 by larv-review. Serves goal 4. One fixed id per project keeps the session picker at one entry per project and makes any transcript under that id the script's own to delete. The id derives from the checkout's path, so a rename migrates nothing: transcripts open under the old id stay in the picker until the human deletes them, a one-human audience not being worth the code, and the `auto-mode` → `loop-claude` rename in the plan ships on the same terms. A checkout outside `~/code` mirroring a path inside it would share its id; none does. Valid while the picker lists sessions by id. ## loop-claude: the trust file is rewritten before an interrupt @@ -27,7 +27,3 @@ ## larv-review: a re-entered loop takes a fresh round cap 2026-09-24, larv-review. Serves goal 4. The cap stops a loop that does not converge on one set of findings; a re-entry is a new set. A cap shared across the whole flow would skip §6.5's closing round exactly when §5 ran long. Valid while the protocol caps rounds per loop. - -## loop-claude: a session-name change orphans the sessions open under the old name - -2026-09-25, larv-review. Serves goal 4. The id derives from the name, so a rename leaves each project's open transcript under the old id, listed in the picker until the human deletes it, and the next cycle restarts from the task prompt, which tells the worker to continue any open PR or worktree. A migration would be code for a one-human audience; the plan orders a second rename (`auto-mode` → `loop-claude`) on the same terms. A checkout outside `~/code` mirroring a path inside it shares that path's name; none does. Valid while the id derives from the name. diff --git a/todo.md b/todo.md index fd13e85b..7a6574f8 100644 --- a/todo.md +++ b/todo.md @@ -13,4 +13,5 @@ Ordered by how many seats of the 2026-09-24 scoring panel (`docs/decisions.md`) - Give the comprehension floor in `larv-review` its own heading and move its six-project calibration sentence to `docs/decisions.md`; today it sits under §2 "Trigger". - Cut what `review-protocol.md` → "Documenting decisions" restates from `CLAUDE.md`: the decision kinds, the create-or-fix line and the record-nothing default. - Make the missing-premises exit name what is missing: `README.md` itself, a `## Goals` or `## Audience` heading, or a body under one; today all three print the same line. +- Spell the false-claim rule once under `CLAUDE.md` → "Comments and documentation" with its tie-break, the doc corrected unless consumers rely on what it promises, and cite it from "Working with the codebase", "Working loop" and the README paragraph; today four spellings, two of which disagree on which side to fix. - Re-run the four-seat scoring panel and record the score in `docs/decisions.md`; the target is every dimension at 7.0 or above. -- 2.52.0