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
Open
nonreagent wants to merge 4 commits into
nonreagent wants to merge 4 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.mdfor working on this repo, plus.gitattributesand a clean filter that strips themodelkey fromsettings.jsonon the way into git (configured byinstall.shandbuild.sh; the committed copy loses its model line here). Five VM-facts and conduct bullets appended toexe.md. Two playbook ground rules for the review watcher: pin the PR head SHA, and read merged state via REST before acting. Amemory-sweepskill 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
modelfrom 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 carriesdisable-model-invocation, so it runs only as/memory-sweep. Companion PRs: the cross-project lessons went upstream as nonrational/dotfiles#60.