From 83d1f8e4edfeb6733bb64c1d00df3f283d486963 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 28 Sep 2026 11:19:35 +0200 Subject: [PATCH] Bring the decisions and the plan in line with the package --- AGENTS.md | 3 ++- bin/loop_claude/reload.py | 1 - docs/decisions.md | 12 ++++++++---- todo.md | 9 +++++---- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 1f7171a9..9f231cdd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -13,7 +13,7 @@ Decisions live in `docs/decisions.md`: - bin/: the Python floor is README's Install prerequisite - bin/: host python, no container - comprehension floor: every dimension and the overall at 7.0 or above, and 0.1.0 waits on it -- loop-claude: the five section headers stay +- loop-claude: the section headers stay - vocabulary: the concept words are defined under `CLAUDE.md` → "Vocabulary" and cited by a bare link - larv-review: a re-entered loop takes a fresh round cap - loop-claude: a reload into an older file is unsupported @@ -25,3 +25,4 @@ Decisions live in `docs/decisions.md`: - loop-claude: the judge loads `CLAUDE.md` - loop-claude: the archive keeps the raw transcript, and a failed archive stops the loop - loop-claude: the rebuild keeps main's `--reloaded` state +- rebuild: a chunk into `rebuild` takes no comprehension scoring run diff --git a/bin/loop_claude/reload.py b/bin/loop_claude/reload.py index 788445b7..a3c75177 100644 --- a/bin/loop_claude/reload.py +++ b/bin/loop_claude/reload.py @@ -22,7 +22,6 @@ def decode_state(handed, kind): def fingerprint(launcher): - # An unreadable file hashes its error, and the --help trial judges it. digest = hashlib.sha256() for path in [launcher, *sorted((launcher.parent / "loop_claude").glob("*.py"))]: try: diff --git a/docs/decisions.md b/docs/decisions.md index c9fa0a0e..d1e1fcec 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -10,7 +10,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 session name, so moving the checkout or changing that name orphans open sessions: they stay in the picker until the human deletes them, migration code not being worth a one-human audience. A checkout outside `~/code` mirroring a path inside it would share its id. Valid while claude takes `--session-id` and resumes by it, and no checkout outside `~/code` mirrors a path inside it. +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 loop-claude's own to delete. The id derives from the session name, so moving the checkout or changing that name orphans open sessions: they stay in the picker until the human deletes them, migration code not being worth a one-human audience. A checkout outside `~/code` mirroring a path inside it would share its id. Valid while claude takes `--session-id` and resumes by it, and no checkout outside `~/code` mirrors a path inside it. ## loop-claude: the trust file is rewritten before an interrupt @@ -36,9 +36,9 @@ 2026-09-27, lilleman, restating the 2026-09-24 target and extending it to the overall. Serves goal 4. The 2026-09-28 run, Junior A, Mid A, the maintainability senior and the inherited architect at depth 1 over every non-test file, blind to `todo.md` and this log, scored Navigation 7.25, Locality 6.0, Shape 6.5, Self-sufficiency 6.25, overall 6.25; on 2026-09-26 they were 7.75, 6.25, 7.0, 6.75, 6.75. Every seat scored Locality 6, and three of four named `run_cycle`'s three-way return and larv-review's re-entry rules, split across the passes on 2026-09-28. The rebuild planned in `todo.md` under 0.1.0 answers the places named, and a later chunk may not lower any dimension. Valid until the next scoring run, which uses the same four seats. -## loop-claude: the five section headers stay +## loop-claude: the section headers stay -2026-09-26, larv-review, declining a prose-pass deletion under `CLAUDE.md` → "Comments and documentation". Serves goal 4. Two seats of the 2026-09-26 panel credit Navigation 8 to `# The transcript file` and its four siblings indexing the script by the Claude Code internal each group touches. Valid until a scoring run scores Navigation without them. +2026-09-26, larv-review, declining a prose-pass deletion under `CLAUDE.md` → "Comments and documentation". Serves goal 4. Two seats of the 2026-09-26 panel credit Navigation 8 to `# The transcript file` and its siblings, now in `bin/loop_claude/cycle.py`, indexing it by the file or format each group touches. Valid until the modules the rebuild splits out of `cycle.py` take over that index. ## vocabulary: the concept words are defined under `CLAUDE.md` → "Vocabulary" and cited by a bare link @@ -50,7 +50,7 @@ ## loop-claude: a reload into an older file is unsupported -2026-09-26, lilleman. Serves goal 4. A running loop whose `bin/loop-claude` on disk is rolled back to a version with an older handover fails in that older file, or, older than the handover itself, runs `--reloaded ` as its task; this version cannot change either; the human who rolled it back reruns `loop-claude `. Valid while nobody but the developer runs it: other team members running it while it is still developed reopens this. +2026-09-26, lilleman. Serves goal 4. A running loop whose `bin/loop-claude` or `bin/loop_claude/` on disk is rolled back to a version with an older handover fails in that older file, or, older than the handover itself, runs `--reloaded ` as its task; this version cannot change either; the human who rolled it back reruns `loop-claude `. Valid while nobody but the developer runs it: other team members running it while it is still developed reopens this. ## loop-claude: a CR-only README.md is reported at line 1 @@ -83,3 +83,7 @@ ## loop-claude: the rebuild keeps main's `--reloaded` state 2026-09-28, lilleman, for the rebuild. Serves goal 4. A loop running main's script reloads into the rebuilt one at its next cycle boundary and carries on; the state keeps main's four fields, `cycle_number`, `failures`, `root` and `task`, so no code exists only for the cut-over. Valid until the rebuild merges. + +## rebuild: a chunk into `rebuild` takes no comprehension scoring run + +2026-09-28, larv-review, reading the rebuild decision above. Serves goal 4. The floor and its ratchet gate `rebuild` into main, scored by the plan's last item; the chunks before it pass through half-moved states a per-chunk run would block. Valid until the rebuild merges. diff --git a/todo.md b/todo.md index c6b1f037..299f539b 100644 --- a/todo.md +++ b/todo.md @@ -2,12 +2,13 @@ ## 0.1.0 -**⚠️ THE REBUILD NEVER MERGES INTO MAIN WITHOUT THE HUMAN'S EXPLICIT APPROVAL.** Every rebuild chunk is a worktree based on `origin/rebuild` with its PR into `rebuild`, never into main. What remains of the rebuild is `rebuild`'s `todo.md` (`git show origin/rebuild:todo.md`), where each chunk ticks its item off; this copy stays as planned until the merge. Other sessions run on `~/.claude` main throughout; only the human merges `rebuild` into main, once they have approved the finished whole. +**⚠️ THE REBUILD NEVER MERGES INTO MAIN WITHOUT THE HUMAN'S EXPLICIT APPROVAL.** Every rebuild chunk is a worktree based on `origin/rebuild` with its PR into `rebuild`, never into main. Other sessions run on `~/.claude` main throughout; only the human merges `rebuild` into main, once they have approved the finished whole. -Ships when a four-seat scoring run puts every dimension and the overall at 7.0 or above (`docs/decisions.md`). The rebuild lifts every dimension: each item below is one chunk on a worktree based on `origin/rebuild`, its PR into `rebuild`, until the last item merges `rebuild` into main. The sketches, the judges' verdicts and what to take from each: `~/code/claude-handoffs/claude-config_2026-09-28.md`. +The rebuild lifts every dimension: each item below is one chunk on a worktree based on `origin/rebuild`, its PR into `rebuild`, until the last item merges `rebuild` into main. The sketches, the judges' verdicts and what to take from each: `~/code/claude-handoffs/claude-config_2026-09-28.md`. -- **Move the transcript, the session and the worker into their own modules.** `UserEntryKind` names each entry Claude Code writes; a malformed line is skipped; an unreadable transcript is its own error, never "typed nothing"; `session` states the lifecycle once, where the id is made. -- **Move the judge, the interrupt, trust and model resolution into their own modules.** The judge is retried alone and checks evidence on every verdict against the rendered transcript; `models` owns the whole resolution, env overrides included, with no sentinel; `trust` names a `projects` entry that is not an object; `input()` at end of file is exit 2. Every leaf spells failure one way — `Stop` where it ends the loop, else a failure its caller maps — so `ask_model`'s `Stop(2)`, `interrupt`'s string and `run_worker`'s `""` for success become one spelling; `replace_json` and `make_private` get one module shared by `models`, `trust` and the archive; each Claude Code internal `--help` lists sits beside the module relying on it, or `docs/decisions.md` says why `--help` keeps it, and "the five section headers stay" is rechecked against the module names. +- **Move the transcript, the session and the worker into their own modules.** `UserEntryKind` names each entry Claude Code writes; a malformed line is skipped; an unreadable transcript is its own error, never "typed nothing"; `session` states the lifecycle once, where the id is made; `run_worker` returns a failure its caller maps, never `""` for success. +- **Move the judge, the interrupt, trust and model resolution into their own modules.** The judge is retried alone and checks evidence on every verdict against the rendered transcript; `models` owns the whole resolution, env overrides included, with no sentinel; `trust` names a `projects` entry that is not an object; `input()` at end of file is exit 2. `ask_model` and `interrupt` spell "the human is needed" one way; `replace_json` and `make_private` get one module shared by `models`, `trust` and the archive. +- **Move each Claude Code internal `--help` lists beside the module relying on it.** Or `docs/decisions.md` says why `--help` keeps it. - **Archive the raw transcript, deduplicated by content hash, with the verdict beside it, and stop on a failed archive.** Tests first; the changelog line says what the archive now holds. - **Replace `bin/test_loop_claude.py`'s internal-function tests with the black-box tests plus unit tests of the pure parsers.** - **Hold every reviewer to one findings document, `principles/review-findings.md`.** Severity, verdict, rounds with round 2 verifying each earlier finding, the per-chunk round cap, declining, and `/security-review`'s HIGH/MEDIUM/LOW mapped onto the scale; it replaces `principles/review-protocol.md`.