User
Role, goals, responsibilities, expertise. "Senior Go engineer, new to React."
Memory is a folder of human-readable Markdown notes under ~/.claude/projects/<dir>/memory/. An index file (MEMORY.md) is loaded into every conversation; individual memory files are pulled in when relevant. You can read, edit, and version-control everything by hand.
Role, goals, responsibilities, expertise. "Senior Go engineer, new to React."
How to approach work — corrections AND validations. "Don't mock the database in tests; we got burned."
Active state — who's doing what, why, by when. Decays fast; refresh often.
Pointers to external systems. "Pipeline bugs are tracked in Linear project INGEST."
git log is authoritative.old_function exists" — grep before recommending it. Files get renamed.MEMORY.md entries are one line each, under 200 chars. Detail goes in topic files.The Agent SDK exposes the same memory primitives. Hand it a memory directory; it reads on start, writes throughout the run. Useful for long-running agents that revisit the same projects across sessions.