Skip to content

Flush a month of agent memory into this repo, the overlay, and a memory-sweep skill - #17

Open
nonreagent wants to merge 4 commits into
mainfrom
memory-sweep
Open

nonreagent wants to merge 4 commits into
mainfrom
memory-sweep

Conversation

@nonreagent

Copy link
Copy Markdown
Owner

Problem

Agent sessions on the VM wrote what they learned into ~/.claude/projects/*/memory/, which nothing commits and which dies with the box. Four of those files were about working on this repo, five were about this VM or the review watcher, and one was the operator's own scoping rule for where such facts belong.

Motivation

Each fact cost at least one session (a stale checkout diagnosed as broken upstream, a watcher session that diffed against a HEAD another session had moved, an APPROVED dispatch acted on after the human had already merged). A rule nobody loads is not a rule. And the repo has been permanently dirty because Claude Code rewrites the model key in a file that is a live symlink into it.

Proposed Solution

Four commits. A root CLAUDE.md for working on this repo, plus .gitattributes and a clean filter that strips the model key from settings.json on the way into git (configured by install.sh and build.sh; the committed copy loses its model line here). Five VM-facts and conduct bullets appended to exe.md. Two playbook ground rules for the review watcher: pin the PR head SHA, and read merged state via REST before acting. A memory-sweep skill in the overlay that encodes the sweep this came from (inventory, four-question rubric, route, scrub, gate, retire), reading the concrete tier paths from the new CLAUDE.md.

Feedback

The clean filter is the one mechanism here; check that stripping model from the committed file matches what you want (a fresh VM starts on Claude Code's default model until a session picks one). rw-merge's quirks are documented in CLAUDE.md and tracked as #16 rather than fixed. The skill carries disable-model-invocation, so it runs only as /memory-sweep. Companion PRs: the cross-project lessons went upstream as nonrational/dotfiles#60.

nonreagent and others added 4 commits September 3, 2026 07:00
The facts a session needs to work on this repo (home/ is generated and
live, ./test/run.sh is the only gate, upstream drift commits first,
upstream PRs start from a plain upstream clone, the load-bearing shims,
rw-merge's silent success) lived in per-machine agent memory. Now they
live where every session reads them.

Claude Code rewrites the model key in home/.claude/settings.json whenever
a session picks a model, and the file is a live symlink, so the repo was
permanently dirty. .gitattributes now routes the file through a clean
filter (jq 'del(.model)'), configured into local git config by install.sh
and build.sh, so the index never carries a model key while every other
key still flows in from upstream. The committed copy loses its model line
in this commit.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Concurrent sessions sharing a checkout, the auto-mode classifier gating
bulk deletion, never risk-labelling your own PR, box facts (two CPUs,
just off PATH under systemd, pnpm 11 native builds), and propagating a
backgrounded gate's exit code. Each cost a session before it was written
down, and it was written down in memory that dies with the box.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Two watcher-session failures: HEAD moved under a session because the
checkout is shared, and a diff against it reported another PR's files as
scope creep; and an APPROVED dispatch arrived after the human had already
squash-merged, so acting on it re-created the auto-deleted branch. The
playbook now pins the head SHA and reads merged state via REST before
anything else.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Per-project agent memory is per machine and uncommitted. This skill is
the periodic move-out: inventory every memory directory, verify status
claims against the tracker, route each fact to its durable tier (shared
rules, this overlay, the project repo, the tracker), scrub public
artifacts, run each destination's gate, then retire the local copies.
Written from the first full sweep; the concrete tier paths are read from
this repo's CLAUDE.md rather than hardcoded.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant