Domain Glossary (CONTEXT.md)
A per-repository document that establishes a shared language between the developer and AI agents. Pioneered in Matt Pocock’s skills set asCONTEXT.md, built during /grill-with-docs sessions.
What it is
A glossary of canonical terms for the problem domain. Written collaboratively — the agent proposes precise terms, the developer confirms, and the result is a single source of truth for project vocabulary. Example:- Without glossary: “There’s a problem when a lesson inside a section of a course is made ‘real’ (given a spot in the filesystem)”
- With glossary: “There’s a problem with the materialization cascade”
CONTEXT.md gets that compression for free.
Why it matters
- Token efficiency — agents stop explaining concepts they don’t have words for. Domain terms collapse multi-sentence explanations into single tokens.
- Consistent naming — variables, functions, and files naturally adopt canonical terms when the agent has them.
- Faster navigation — agents find relevant code faster when file/function names match the vocabulary they were given.
- Reduced context distraction — a shared language is a form of context compression. See Context Compression Strategies.
How it’s built
Created lazily via/grill-with-docs. The agent:
- Grills you on the plan/design one question at a time
- Identifies vague terms and proposes precise alternatives
- When a term crystallizes, adds it to
CONTEXT.mdinline - Never creates
CONTEXT.mduntil the first term is ready
Structure
SingleCONTEXT.md at repo root for most projects. Multi-context repos (monorepos) use CONTEXT-MAP.md pointing to distributed context files per domain area.
Companion to docs/adr/ (Architecture Decision Records). ADRs are for hard-to-reverse decisions with genuine trade-offs; CONTEXT.md is for vocabulary that doesn’t warrant an ADR.
ADR Gatekeeping
An ADR is warranted only when all three hold:- Decision is hard to reverse
- Surprising without context
- Resulted from genuine trade-offs
CONTEXT.md or nowhere.
Relation to Agent Context Instructions
CONTEXT.md is a specific implementation of the agent context instructions pattern — a standards document that aligns agent output to team conventions before code generation. It focuses specifically on language rather than code style or architecture patterns.