Memory
Memory is the instructions Command Code carries into every turn without you repeating them: conventions, architecture notes, the commands your project actually uses. It lives in plain markdown files named AGENTS.md.
Create one for your project:
That writes AGENTS.md in your project root with a starter template. Edit it like any file, or run /memory to pick which memory file to open.
Command Code reads three tiers, and every one that exists is loaded; they add up, they don't replace each other.
| Tier | Location | Use it for |
|---|---|---|
| User | ~/.commandcode/AGENTS.md | Your personal preferences, across every project |
| Project | <project>/AGENTS.md or <project>/.commandcode/AGENTS.md | Team-shared project instructions; commit this |
| Subdirectory | <subdir>/AGENTS.md or <subdir>/.commandcode/AGENTS.md | Rules for one package or area of a monorepo |
They're assembled in that order (user, project, then subdirectory), each block headed by its source path, so the model always knows which file a rule came from. Later blocks are more specific, so a package-level convention naturally reads as a refinement of the project-level one.