Karpathy LLM persistent-memory method

Inspired by Andrej Karpathy’s Obsidian vault workflow for LLM context continuity.

Goal

Every Claude session resumes with full project context. No re-explaining. Knowledge grows monotonically across sessions.

Structure

.wiki/
  index.md         ← catalog, read FIRST every session
  log.md           ← chronological history, append on every working session
  sources/         ← raw source docs (paste-in artifacts)
  pages/
    entities/      ← people, projects, systems, repos
    concepts/      ← decisions, architecture, rules
    summaries/     ← per-source distilled summaries
    synthesis/     ← cross-source reasoning + cross-vault sync

Naming + linking

  • File names: kebab-case.md
  • Cross-refs: [[../entities/r-goto]] Obsidian-style wikilinks
  • Front-matter YAML: title, type, tags

Lifecycle per session

  1. Boot — read index.md, tail 10 entries of log.md, MemorySearch
  2. Work — answer user
  3. Persist — append log.md, update touched pages, refresh index.md if pages added
  4. Mirror — sync changes to sibling vault when applicable

Ops vocabulary (log.md)

opmeaning
ingestnew info captured from conversation
queryuser asked, answered from vault
lintaudit / cleanup / drift fix
updateexisting page edited
decisionrule / policy / pref established
incidentbug, outage, post-mortem

See session-start-protocol for boot enforcement.