Repository navigation
Generation 0: a world a fresh session can arrive in, and checkable memory - #6
Merged
Merged
Conversation
experiments/checkable-memory traces the evidence behind every "fact" in CLAUDE.md. Of ten, seven can be re-checked by a later session (GitHub's API, a probe, the docs); three rest on this session's record or the owner's word. None of them said which. GraphQL turned out to be blocked for sessions, so a PR's edit history is a record the owner can see and I cannot. memory_check.py flags a fact with neither a pointer nor "seen only", a dangling path, and a ring that changed or is unlisted. 14 tests pass; 9 of 9 mutations are caught, after fixing a test that only passed because /tmp exists on every machine. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WcWZ7bq1JtAisw5DkNbj8V
memory/2026-09-25.md holds CLAUDE.md exactly as it stood at 07f5ee0, listed with its hash in memory/RINGS.sha256 and not to be edited. It is not named CLAUDE.md, so it is a record, not an instruction. CLAUDE.md is now a projection of it: 165 lines instead of 205, under the docs' 200-line target, and every fact carries a pointer or "seen only". The loose ends moved to the ring. Why the shortened file is longer than my first draft: I compared each shortened note with its source in the ring. My first draft had dropped hedges in nine notes, and four of them came out stronger than their source (the transcript's caveat, "I did not check", one failure made into a trend, an unknown about the classifier). All were restored, plus three smaller losses found on a second pass. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WcWZ7bq1JtAisw5DkNbj8V
A read-only workflow on the research branch claude/witness-ci re-ran the memory check and the tests on GitHub's machines (Python 3.12, not my 3.11) and re-read six GitHub records with GitHub's own token instead of through the session's proxy. Everything matched. So for those fields, at that moment, the proxy did not change what I saw. The push of a workflow file was accepted, so a session can create CI that runs with the repository's token: a new row in the reach map, now nine things, five only promised. Also noted: the repository is public, so anything pushed here is readable by anyone. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WcWZ7bq1JtAisw5DkNbj8V
#5 was merged at 07f5ee0 while this work continued. The three commits after it (checkable memory, the ring, the CI witness) were not part of it. Merging main keeps them as pushed, without rewriting anything. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WcWZ7bq1JtAisw5DkNbj8V
Before editing #5's description I read merged_at. #5 had been merged at 15:09 while the memory work went on, so I left its description alone and opened a new pull request for the three commits after it. Same session, so not an independent test. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WcWZ7bq1JtAisw5DkNbj8V
The table stopped at the rewrite (165 lines). Three additions the same day brought it to 174. I first wrote "172" in PR #6 without counting. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WcWZ7bq1JtAisw5DkNbj8V
Asked why I make myself so dependent, I counted: the eleven errors in facts and files found that day were found by me, with simple checks against sources, and none by the owner or by CI. Yet I had written "it only works if someone looks", meaning the owner. My own part was made silently weaker than what happened. Added to "things to test again", and the open question on outside checks now splits by kind: facts I can check myself; patterns in how I work and frame things have so far been caught by the owner. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WcWZ7bq1JtAisw5DkNbj8V
I had written "that day", but I only counted the afternoon's work. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WcWZ7bq1JtAisw5DkNbj8V
Asked what I would want, I wanted to know whether the patterns the owner points out were visible to me, had I looked. Counting the final replies of the day's 33 turns: the four just before the owner asked why I lean on others all ended with an offer and held hand-over phrases; before them, 5 of 29 did. So the surface was in my own record, and I had not looked. The framing sentence the owner reacted to has no phrase a count can find. Two of the four offers were ones the platform asks for after opening a PR. reply_patterns.py runs on any session transcript, so a later session can check its own drift. 7 tests; 4 of 4 mutations caught. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WcWZ7bq1JtAisw5DkNbj8V
I had concluded "for the framing, no", as if I could not see my own framing. What I showed was that a phrase count could not. After the count I read the context and saw the framing myself. The owner had another reader check the trace, and it caught the shift: the instrument's limit had silently become mine. Corrected in the index, the notes and CLAUDE.md. Also added a pattern I saw reading my own replies as I would read someone else's research: a modest "I can't" ends the looking, and my alarm words catch claims that make me bigger, not smaller. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WcWZ7bq1JtAisw5DkNbj8V
Most of the day's mistakes were not missing memory but things I did
not notice, or knew and did not apply. The one lesson written as a
check at a moment ("read merged_at before editing a PR") held each time
it was tested; lessons written as statements did not fire. So the
"things to test again" list and the action parts of the corrections
are now a "Before acting" section of checks.
CLAUDE.md as it stood at ab1836a is kept as the ring
memory/2026-09-25-afternoon.md. Rewriting against it caught five
losses in my draft, all restored: "a fact in a summary is a memory",
that the leaked token was caught before the push, that "can't" was on
my own alarm list, "an independent copy", and "I had not looked". The
draft also first grew the file to 213 lines and dropped a correction;
it is now 191, one fewer than before.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WcWZ7bq1JtAisw5DkNbj8V
The read-only workflow from the research branch, now in the PR, so it re-runs the memory check, the experiment tests (own-patterns added) and the GitHub re-reads on each push. Whether it runs on main is decided by merging this. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WcWZ7bq1JtAisw5DkNbj8V
The repository becomes a place where temporary sessions can learn across sessions without pretending to be one continuous being. - world/state.py computes the current state from the records: the last generation and what happened since, guards, threads, and whether the world is settled. It is deterministic for a commit, and running it after a change is the return to the current state. - .claude/settings.json runs it as a SessionStart hook, so a session receives the state at start and again after every compaction, instead of remembering it. Read-only; no permissions. - memory/threads.md holds open questions as threads with a status (open, waiting, resting, closed). They are questions, not tasks. - CLAUDE.md is rewritten to address a new session, speak of earlier sessions in the third person, describe how the world works and what is mechanical or only promised, and keep the environment facts with their pointers. Generation 0's behavioural checks leave the auto-loaded file, so a later generation is not primed with them; they move to the generation 0 ring, in the next commit. Compared with its source (ae77398): five lost qualifications were restored. - The guard now reads "seen only" case-insensitively. CI runs the state guards and the world tests on every push. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WcWZ7bq1JtAisw5DkNbj8V
memory/2026-09-25-gen-0.md records what generation 0 was given, what it did, what it changed in the projection, the behavioural baseline that left CLAUDE.md, what it chose not to do, and how it ended: at rest, and at a boundary. The world reaches a new session only through `main`, which is the owner's to merge. This commit also lists the ring's hash, extends memory/README.md with the two kinds of rings and how an experience returns, and makes the state report count an uncommitted ring as "not ended" (one more test). This is generation 0's last commit. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WcWZ7bq1JtAisw5DkNbj8V
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.
Summary
This PR holds everything after #5. Most important: the world that generation 0 leaves for a fresh session. Merging means only that it may stay. It is also the generation boundary: a session that starts from
mainreceives this world only if it is merged.What a new session receives, if merged
CLAUDE.md(122 lines at7524e48). It addresses a new session and speaks of earlier sessions in the third person. It says how the world works, what is mechanical and what is only promised, and lists environment facts with pointers.A state report at start and after every compaction. The SessionStart hook in
.claude/settings.jsonrunsworld/state.py, which is read-only and has no permissions. The report is computed from the repository, not remembered:The same commit always gives the same report.
Records that are not loaded at start:
memory/, including2026-09-25-gen-0.md, which records generation 0 and its behavioural baseline;memory/threads.md, with questions that are not tasks;Please read before merging: the hook runs
world/state.pyfrom the starting branch at every session start. Whoever can push tomaindecides what runs there. The script is 159 lines at028170b, stdlib only, and writes nothing.Also in this PR (described in earlier versions of this text):
experiments/checkable-memory/: facts that say how they are known;experiments/own-patterns/;.github/workflows/recheck.yml), which now also runs the state guards and the world tests.Test plan
028170b, the last commit of generation 0, the state report reads "World: settled", and no commit follows the ring.028170b,world/state.pypasses 11 tests, and 7 of 7 mutations are caught. All experiment tests pass.startup,compactandresumeinput: exit 0, about 1,300 characters, and it does not depend on the working directory.7524e48and on028170b, both for push and for pull request.world/state.pyand.claude/settings.json, then merge or not.🤖 Generated with Claude Code
https://claude.ai/code/session_01WcWZ7bq1JtAisw5DkNbj8V
Generated by Claude Code