Name the session, the archive folder and its env var loop-claude

This commit is contained in:
2026-09-25 00:12:45 +02:00
parent 3326c464c5
commit 6830500831
5 changed files with 8 additions and 8 deletions
+1
View File
@@ -6,6 +6,7 @@
- `loop-claude <task>` runs a project's next chunk cycle after cycle, interrupting only for a decision that is yours or a release ready to cut.
- `loop-claude` exits 1 when the judge fails three times running; a verdict missing a field or quoting nothing in the transcript is a failure.
- `loop-claude` exits 2 when an interrupt gets no answer, saying why: stdin or stdout is not a terminal, or nothing was typed. Rerunning resumes the session.
- `loop-claude` archives each session's transcript under `~/.claude/loop-claude-transcripts/<path>/`; `LOOP_CLAUDE_TRANSCRIPTS` overrides the root.
- `loop-claude --help` names the Claude Code version its transcript, session and trust handling were observed on; check it first when an upgrade breaks a cycle.
- `loop-claude` runs the model each project's settings pick; `WORKER_MODEL` and `JUDGE_MODEL` override it. This repo runs on Fable 5.1.
- Reviewers share one protocol for verdicts, severities, rounds and declines: `agents/review-protocol.md`.
+4 -4
View File
@@ -15,9 +15,9 @@ 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 <path> auto-mode", <path> being the checkout relative to ~/code,
Each project has one session, "A <path> loop-claude", <path> 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/<path>/) whenever the human is asked
$LOOP_CLAUDE_TRANSCRIPTS (default ~/.claude/loop-claude-transcripts/<path>/) 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.
@@ -42,7 +42,7 @@ import sys
import time
import uuid
ARCHIVE = os.path.expanduser(os.environ.get("AUTO_MODE_TRANSCRIPTS", "~/.claude/auto-mode-transcripts"))
ARCHIVE = os.path.expanduser(os.environ.get("LOOP_CLAUDE_TRANSCRIPTS", "~/.claude/loop-claude-transcripts"))
RELOAD_BASELINE = open(__file__, encoding="utf-8").read()
RELOAD_CYCLE = "LOOP_CLAUDE_CYCLE"
RELOAD_FAILURES = "LOOP_CLAUDE_FAILURES"
@@ -110,7 +110,7 @@ def project():
def session_name():
return f"A {project()} auto-mode"
return f"A {project()} loop-claude"
def session_file(session_id):
+2 -2
View File
@@ -60,12 +60,12 @@ class Project(unittest.TestCase):
with unittest.mock.patch.dict(os.environ, {"HOME": "/h"}):
with unittest.mock.patch("os.getcwd", return_value="/h/code/a/b"):
self.assertEqual(loop.project(), "a/b")
self.assertEqual(loop.session_name(), "A a/b auto-mode")
self.assertEqual(loop.session_name(), "A a/b loop-claude")
with unittest.mock.patch("os.getcwd", return_value="/h/code"):
self.assertEqual(loop.project(), "h/code")
with unittest.mock.patch("os.getcwd", return_value="/srv/x"):
self.assertEqual(loop.project(), "srv/x")
self.assertEqual(loop.session_name(), "A srv/x auto-mode")
self.assertEqual(loop.session_name(), "A srv/x loop-claude")
class WorkerArgs(unittest.TestCase):
+1 -1
View File
@@ -6,7 +6,7 @@
## loop-claude: one session per project, at a fixed 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.
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. 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
-1
View File
@@ -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.
- 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.
- Name the `set -u` empty-array idiom and the `@sh` eval in `statusline.sh`, one line each.