diff --git a/CHANGELOG.md b/CHANGELOG.md index d70c46c1..3989906b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- Added the project config folder and the models file to the install's backup step, and worded goal 3 to point at that list. - Worded goal 1 for any agent harness and model, and goal 3 for the setup's files with this repo as their copy. - Added a goal that the setup doesn't depend on any one model vendor or agent harness, and worded goals 1, 1.2 and 3 for whoever runs the setup. - prose-reviewer checks a decision or plan item a change records against the decision log and the CI checks that list a published package's files, and reports a contradiction or a check the text leaves out. diff --git a/README.md b/README.md index 7e2d2cfb..11ef7974 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ My personal `~/.claude`, version controlled: `CLAUDE.md` and `rules/` for instru - Signal: the steps a person takes from a release's tag to their first finished chunk fall, and the changes an install or a run makes to their own `~/.claude` fall to none. - Counter-signal: defects that show up only on a machine other than mine rise. - Why: fewer steps and an install that leaves their `~/.claude` alone count only where the setup then works on machines that aren't mine. -3. **Maintain:** Keep the setup's files backed up, with this repo as their copy, and the transcripts of unattended runs too. A bench's transcripts are the exception: they stay only until `task-bench gather` has filed plan items from their digest, or the next bench starts. +3. **Maintain:** Keep the setup's files backed up: this repo is the copy of those it tracks, and Install lists the rest, which includes the transcripts of unattended runs. A bench's transcripts are the exception: they stay only until `task-bench gather` has filed plan items from their digest, or the next bench starts. 4. **Maintain:** Don't leak anything: no credentials, transcripts or memory files to this repo's remote, and no client's code, transcripts or credentials to another client or to this repo. 5. **Achieve:** The setup doesn't depend on any one model vendor or agent harness: what lives in the `.claude` folder is split into parts that each run on their own, and Claude Code is one harness among others. - Signal: the harnesses the loop can run a chunk on rise. @@ -80,7 +80,15 @@ Then pick a model with `/model`. Link `loop-claude` onto `PATH`: `ln -s ~/.claude/bin/loop-claude ~/.local/bin/loop-claude`. Every claude it starts, the interactive ones included, skips every permission prompt. loop-claude runs each chunk in its own window of a tmux session per project, so it needs tmux 3.2 or later. -Back up three folders: `~/.claude/loop-claude-transcripts`, where loop-claude keeps every transcript, `~/.claude/do-epic-transcripts`, where do-epic keeps its chunks' transcripts, and `~/.local/state/larv-review`, where larv-review keeps each chunk's reports. To keep loop-claude's transcripts and the reports small, add a crontab line that gzips each transcript and review file 30 days after it last changed, and logs each run with its date: +Back up these four folders and one file: + +- `~/.claude-projects/`: each project's config, and a client project's plan and records. A project's `env-file`, if you keep it here as below, puts credentials in the backup, so keep the backup private. +- `~/.claude/loop-claude-models.json`: the model of each project, which loop-claude and do-epic write. +- `~/.claude/loop-claude-transcripts`: every transcript loop-claude keeps. Where you set `LOOP_CLAUDE_TRANSCRIPTS`, back up the folder it names instead. +- `~/.claude/do-epic-transcripts`: the transcripts of do-epic's chunks. +- `~/.local/state/larv-review`: each chunk's review reports. + +To keep loop-claude's transcripts and the reports small, add a crontab line that gzips each transcript and review file 30 days after it last changed, and logs each run with its date: ```sh 17 4 * * * { date; $HOME/.claude/bin/compress-archives; } >> $HOME/.local/state/compress-archives.log 2>&1 diff --git a/todo.md b/todo.md index 57ee9be7..87ad5c48 100644 --- a/todo.md +++ b/todo.md @@ -6,13 +6,13 @@ `Bar = 0.1` -`Next ID = 565` +`Next ID = 566` ## Items | ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score | |---|---|---|---|---|---|---|---|---|---|---|---| -| 562 | 0.17.0 | | question | **Decide which of the files the setup keeps outside this repo goal 3 and the Install section's backup step cover.** | 1 | 2 | 1 | 2 | 1 | | 0.0 | +| 565 | 0.17.0 | | question | **Decide whether Install's backup step covers the agents' memory files under `~/.claude/projects/`, and whether the plan item that lists `~/.claude/rules/this-machine/` names a folder anything writes.** | 1 | 2 | 1 | 2 | 2 | | 0.0 | | 480 | 0.18.0 | | owner | **Resolve every path the tools use in one module: the release root (the folder the running code ships in), the config folder, the state folder and the Claude home. Then only that module names `~/.claude`, and the loop still runs from `~/.claude`.** | 3 | 2 | 3 | 6 | 6 | 1.6 by 3, code health by 3 | 1.9 | | 481 | 0.18.0 | 480 | owner | **Put the release's tools on `PATH` for every session the loop starts and every hook it runs, name them bare in the prose in place of `~/.claude/bin/`, and refuse the old spelling in new prose.** | 3 | 2 | 3 | 6 | 6 | 1.4 by 2, 2 by 2, code health by 2 | 1.5 | | 561 | 0.18.0 | | | **Clean up a do-epic chunk whose pull request has merged without waiting for a running slot, and close its window.** | 2 | 2 | 2 | 4 | 3 | 1.5 by 2 | 0.5 | @@ -107,22 +107,18 @@ ## Details -### 562. Decide which of the files the setup keeps outside this repo goal 3 and the Install section's backup step cover. +### 565. Decide whether Install's backup step covers the agents' memory files under `~/.claude/projects/`, and whether the plan item that lists `~/.claude/rules/this-machine/` names a folder anything writes. -README.md's goal 3 reads "Keep the setup's files backed up, with this repo as their copy, and the transcripts of unattended runs too." This repo is the copy of every file it tracks, but three places hold state of the setup that it doesn't track, and goal 3 may leave them out: +Two questions for the human. The chunk that takes this item writes each answer once: in `README.md` → `## Install`, and in item 484's detail. -- `~/.claude/loop-claude-models.json`: the models loop-claude routes to on this machine. `.gitignore` is an allowlist that doesn't list it, so it stays out of this repo. Install doesn't mention backing it up. -- `~/.local/state/larv-review`: each chunk's review reports. Install's "Back up three folders" step already names it, beside `~/.claude/loop-claude-transcripts` and `~/.claude/do-epic-transcripts`. -- `~/.claude-projects//`: a client project's config, plan, records and `goals.md`, in a local git repo with no remote. Goal 4 keeps a client's files out of this repo, so this repo can't be their copy. Install's "Set up a project" describes the folder, but the backup step doesn't name it. +(a) Should Install's backup list hold the agents' memory files? `README.md`'s goal 3 says Install lists every file of the setup that lives outside this repo. Install's step "Back up these four folders and one file" lists `~/.claude-projects/`, `~/.claude/loop-claude-models.json`, `~/.claude/loop-claude-transcripts`, `~/.claude/do-epic-transcripts` and `~/.local/state/larv-review`. Claude Code keeps each agent's memory in `~/.claude/projects//memory/`, one folder per project. Those files belong to one machine too: `.gitignore` keeps them out of this repo (`git check-ignore -v projects/x/memory/MEMORY.md` names `.gitignore`'s `*` rule). They may hold private details, such as where a secret is kept, which `CLAUDE.md` → "Handoffs" keeps out of the repo. +Recommendation: add `~/.claude/projects/*/memory/` to the list, since losing it loses facts the repo may not hold, and goal 3 asks for every such file. Say beside it that its backup must stay private, as goal 4 asks, since it may name where secrets live. Leave out the rest of `~/.claude/projects/`: it holds session transcripts that Claude Code writes, not this setup. -Question: should Install's "Back up three folders" step add `~/.claude/loop-claude-models.json` and `~/.claude-projects/`, and should goal 3 say that the setup's files outside this repo are backed up too? - -Recommendation: yes to both for `~/.claude-projects/`, since it holds a client project's only copy of its plan and records, and losing it loses the loop's memory of that project. Add `~/.claude/loop-claude-models.json` to the step too: it is one small file, and rebuilding it by hand costs an interrupt. Word goal 3 as "the setup's files, with this repo as the copy of those it tracks, and the folders Install names backed up", so the list lives once, in Install. - -The chunk that takes this writes the answer once, in README.md. +(b) Should item 484 drop `~/.claude/rules/this-machine/`? Item 484's detail says the setup's state lives today in `~/.claude-projects/`, `~/.claude/rules/this-machine/`, `~/.claude/*-transcripts` and `~/.local/state/larv-review`. No file in this repo reads or writes `~/.claude/rules/this-machine/`. +Recommendation: drop it from item 484's detail, unless the human keeps files there by hand. The edit is a change to a filed item, so it runs on the plan rung. Touches: -- `README.md`: `## Goals` (small), `## Install` (small) +- `README.md`: `## Install` (small) ### 480. Resolve every path the tools use in one module: the release root (the folder the running code ships in), the config folder, the state folder and the Claude home. Then only that module names `~/.claude`, and the loop still runs from `~/.claude`.