A brain is a small git repository where an AI coding agent (GitHub Copilot, Claude Code, Cursor, …) accumulates the knowledge that lives in your head and nowhere else: business rules, the why behind decisions, internal vocabulary, team context. Code records what; the brain records why.
Every time you explain context to your agent during a conversation, that explanation is worth keeping. This repo gives the agent a place — and a process — to keep it.
- One fact per file. Each note is a small markdown file with a few lines of frontmatter and the fact itself, including the why.
- One index.
MEMORY.mdlists every note in one line each. Agents read the index first, then open only the notes relevant to the task. - Save automatically, announce loudly. The agent saves a note whenever you explain something not derivable from the code, and tells you in one line what it saved — so you keep your flow but can veto bad notes immediately.
- Explicit triggers as the backbone. Proactive capture is best-effort;
the
/remembercommand is the guarantee./gardenprunes and merges notes every few weeks.
- Use this template (button above) to create your own brain repo — private if it will contain anything sensitive.
- Clone it locally and add it to your editor workspace alongside the project you work on (in VS Code: File → Add Folder to Workspace…, then save the multi-root workspace). The agent can only read/write files inside the workspace.
- Copy the instruction block from
snippets/copilot-instructions.mdinto each work repo's.github/copilot-instructions.md(or your org-level custom instructions). Adjust the brain folder name if yours differs. - The prompt files in
.github/prompts/travel with the brain: as long as the brain folder is in your workspace,/rememberand/gardenare available in Copilot Chat.
MEMORY.md the index — one line per note, agents read this first
business/ domain rules and how the business actually works
decisions/ "we chose X over Y because…", dated
glossary/ internal vocabulary, acronyms, who-owns-what
projects/<name>/ per-project knowledge not derivable from its code
templates/note.md the note format
snippets/ instruction block to copy into work repos
---
name: short-kebab-case-slug
description: one-line summary used to decide relevance
type: business | decision | glossary | project
---
The fact itself, in a few sentences. Always include the WHY —
that is the part the code never records.- Don't save what the repo already records — code structure, git history, READMEs. Only what exists in people's heads and conversations.
- Update over duplicate. Before writing a new note, check the index for an existing one that covers it.
- Wrong notes get deleted, not corrected around.
- Convert relative dates to absolute ("next quarter" → "2026-Q3").
- No secrets. Never store credentials, tokens, or personal data.