EQ eqctrl
fig. 03 · the memory system

Karpathy+

A memory your AI keeps between chats, so it learns how you work. Built on Karpathy's wiki pattern, with the checks that keep it from going stale.

by entropy / eqctrl · v2 · updated 2026-06-11 · eqctrl.io

download build guide .md Hand this to your AI to recreate the system.

Your AI forgets everything between chats. So you re-explain your projects and how you like things done, again and again. And the notes you keep for it go stale, so it works off the wrong version of reality and you don't notice until something is already wrong.

One word first: "context" just means everything the AI can see in a single conversation. It is the working memory for that chat, and it resets the moment the chat ends.

This gives your AI a shared memory that sticks between chats and stays correct over time. A handful of plain files, plus a few rules that keep them honest. You can build it in an afternoon.

New to this? The next two sections are the why. Ready to build? The download up top hands your AI everything it needs to set this up for you.

the spec plate

00The whole system, on one plate

Three kinds of files. Three habits. One rule about where things live, and a few cheap tripwires so nothing rots quietly. That's the whole thing.

field hazards · three causes of death

01Most systems like this die young

They die one of three ways. Every design choice on this page exists to dodge one of them.

01 · LOAD
Too heavy to read, so it gets skipped
The rules get too long, so the AI stops reading them. A system that only works on turn one doesn't work.
02 · DRIFT
Three files, one fact, no agreement
A rules file, a lessons file, a corrections file. Same knowledge, three places, drifting apart. Two copies of anything will drift.
03 · SILENCE
Nothing gets written down during a fire
You fix the urgent thing and capture nothing, because the session is focused on the fire. Weeks later the same problem is back.
the architecture

02Raw at the bottom, rules on top

Raw clippings at the bottom. The pages you'd hand a new assistant in the middle. House rules on top, about 50 lines of them.

The AI never reads the whole pile. It reads the rules, an index, and the two to four pages today's work needs.

the property line

03One rule about where things live

One rule prevents the three-copy drift problem before it starts:

Knowledge goes in ~/AI/. Runtime goes in ~/.claude/.
~/AI/
Knowledge + work
  • wiki/ (canonical)
  • Project repos
  • Career, personal, outputs
  • Raw sources before curation
~/.claude/
Runtime only
  • Schema (CLAUDE.md)
  • Hooks, skills, settings
  • Sessions, history, telemetry
  • Auto-memory

Inside the knowledge side, nothing sits loose at the root. Every file has a named drawer: the wiki, project folders, an inbox for the unsorted, a scratch pile for the throwaway. The archive lives outside the fence, so searches stay clean.

Principle

Decide what folders your AI's search tools can see before you file anything. Once a tool has a boundary, where you put a file is a choice, not an accident.

the daily rhythm

04Write it down, look it up, check it weekly

01 · write it down
Ingest
After anything changes: a fix, a decision, a correction. Update the page, add a line to the log.
Judgment: lines
02 · look it up
Query
At the start of every chat: read the index, pick the two to four pages that matter, work.
progressive disclosure
03 · check the field
Lint
Once a week: scan for stale pages, broken links, and things nobody wrote down.
pattern detector
repeats each session

Ingest

After a fix, a decision, or a correction, the AI updates the page and appends to the log with a Judgment: line, one sentence on why. The why is what future sessions actually use.

## 2026-06-08 -- moved the archive out of the search path
Searches kept surfacing dead drafts. Moved the archive outside
the knowledge folder; results are clean again.
Judgment: scoped tools decide where files live. State the
scope before filing anything.

Write the why, not just the what.

Query

Each session loads about 50 lines of rules, an index under 50 lines, and two to four pages. That's the whole reading list, so there's no four-hundred-line rulebook to skip when the chat gets long.

One caveat: a plan is not enough context on its own. Load the pages it references first. Details are in the build guide.

Lint

Once a week, one command runs the whole checklist: stale pages, broken links, unprocessed notes, forgotten tasks. It fixes the mechanical stuff and asks you about the rest. You answer do it, defer it, or kill it.

The full checklist is in the build guide.

Flag once via lint. Build infrastructure only when the pattern fires twice.

the safety nets

05Several small nets, not one big one

Discipline alone fails during fires. So the system stacks several independent nets, each cheap and a little dumb.

One blind spot: every net above reads files. None can see whether a scheduled job is actually running. So each scheduled job declares an expected output, and a verifier asks one dumb question: did today's file appear?

The completion gate is the last net: nothing is done until the change works and the docs say so.

field hazard · the snapshot

06Copies drift. Links don't.

The moment a fact leaves the wiki, the copy stops updating. The AI's own notes, pasted instructions, last month's plan: all snapshots. So check copies when you use them, not when you make them.

Where possible, remove duplicated facts from copies and point them to the wiki. A hardcoded page count will drift. A link cannot.

known limits

07What it can't do

Naming the gaps beats pretending the system is airtight.

LimitWhat I do about it
Hooks can't thinkA hook is a tripwire, not a brain. The weekly check and the rules file do the real reasoning.
Checks can't see running softwareEverything here reads files. A verifier closes the gap by checking that each scheduled job produced today's output.
Plans go stale faster than pagesA plan written Monday can be wrong by Friday. The fix, a reconciled-on date stamp, is designed but not built yet.
The rules file has a ceilingKeep it under about 80 lines. Knowledge goes in pages, not rules.
Every chat starts blankThe rules file points each session at the index, so there is no state to lose.
The AI keeps its own private notesThose notes live outside the wiki and drift. The boundary rule plus a weekly diff keeps them honest.
the expedition

08Build yours in an afternoon

The pattern is general. Anyone can adapt it.

Fastest Path

Hand the build guide .md to your AI. It's written for Claude (or similar) to execute with you step by step: directories, the rules file, first pages, the weekly check. Under an hour, and you answer questions instead of writing files.

Minimum viable wiki, five steps

Keep these (universal)

Three layers. The boundary rule. An index as the front door. A log with Judgment: lines. The weekly check. The completion gate.

Adapt these (local)

Page categories to your domains. The check's schedule. Your task tracker. Everything surface-specific.

The whole thing is a folder you can push to git, which is what lets scheduled agents read it from the cloud. The build guide has the step.

The system grows by use. Add a page when you catch yourself repeating context. Everything past the minimum is earned by need, not added by default.

stuck mid-build? a real human answers · I set up systems like this for individuals and small teams · entropyeq@gmail.com

the road ahead

09What's next, honestly

Planned, not built.

  • Plans will carry a freshness stamp, so a stale plan can't pass as a current one.
  • The weekly check will diff every claim in the AI's private notes against the wiki, not just the easy ones.
  • Real search lands when the wiki outgrows grep, around fifty pages.

The system stays small on purpose.

The system works, and building it taught me a lot. I'm still looking forward to replacing most of it.

The Field Kit
Tools I run this system with

No affiliates, no pitch. Just the stack as it stands this season, in case something here is the piece you're missing.

  • Claude Codethe harness everything on this page runs through
  • HipAIcontext graphs as a product; I work with the team
  • Modaagent workflows I run daily
  • Linearwhere the work queue lives
  • Obsidianthe wiki's reading room
  • Granolameeting notes that feed the wiki
  • Fathomcall recordings worth mining later
  • Discordwhere my agents check in from the field
lineage

10Where the ideas came from

The compounding principle is the spine. The wiki pattern is the skeleton. The boundary rule, the nets, and the completion gate are my answer to the failure modes each source named but didn't fully close.

See also Claude Guide Start with chats and Projects. Climb into surfaces, modes, and effort when the ground feels solid. Two chapters. See also The Karpathy memory system, explained The plain-language version of what this guide builds: what a Karpathy-style memory system is, and why file-based and model-agnostic wins. See also The CLAUDE.md wiki pattern Keep CLAUDE.md small and use it as the front door to a markdown wiki. Router, not warehouse.