.context
CLAUDE.md253 starsChanged 10 months agoMITView on GitHub
This repo teaches the .context method: documentation-as-code-as-context, tuned to measured LLM behavior. See .context/research.md for the evidence. This table is the source of truth. AGENTS.md mirrors it. Keep them in sync. When a file matches multiple rows, load every matching rule file. Pages matching both ui.md (component rules) and seo.md (metadata, structured data) is intentional. Long prompts hurt accuracy (13-85%). Models reliably follow ~150-200 instructions, not more. Middle-of-document content is ignored. Path-scoped rules cut rule-token usage per turn sharply because…
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- add-adrSkill
- generate-tool-configSkill
- new-domainSkill
- validate-contextSkill
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
When a file matches multiple rows, load every matching rule file.
- Distinctive: line 35
When making an architectural decision, update the relevant file in the same change
- Very specific: line 36
Do not compound items listed in .context/debt.md
≈ “Common” is an estimate: at least 1 in 5 of the 27,641 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Claude Code Configuration
This repo teaches the .context method: documentation-as-code-as-context, tuned to measured LLM behavior. See .context/research.md for the evidence.
Always loaded (Tier 1)
.context/ai-rules.md: project-wide hard constraints.context/glossary.md: terminology. Do not invent synonyms
Path-scoped rules (load when touching matching files)
This table is the source of truth. AGENTS.md mirrors it. Keep them in sync.
When a file matches multiple rows, load every matching rule file. Pages matching both ui.md (component rules) and seo.md (metadata, structured data) is intentional.
| Touching | Load |
src/api/**, src/routes/**, src/handlers/**, app/api/** | .claude/rules/api.md |
src/auth/**, src/middleware/auth*, src/security/** | .claude/rules/auth.md |
src/models/**, src/db/**, src/repositories/**, migrations/**, *.sql | .claude/rules/database.md |
src/components/**, app/** (non-page), *.tsx, *.jsx, *.vue, *.svelte | .claude/rules/ui.md |
src/app/**/page.*, src/pages/**, public/sitemap*, public/robots*, src/head/** | .claude/rules/seo.md |
**/*.test.*, **/*.spec.*, tests/**, __tests__/** | .claude/rules/testing.md |
On-demand (Tier 2, load when the task asks for depth)
- Boundaries (what requires human review) →
.context/boundaries.md - Anti-patterns →
.context/anti-patterns.md - Tech debt register →
.context/debt.md - ADRs →
.context/decisions/README.md - Pre-built task prompts →
.context/prompts/
Non-negotiables
- When making an architectural decision, update the relevant file in the same change
- Do not compound items listed in
.context/debt.md - For files listed in
.context/boundaries.md, propose a diff instead of editing
Why it is shaped this way
Long prompts hurt accuracy (13-85%). Models reliably follow ~150-200 instructions, not more. Middle-of-document content is ignored. Path-scoped rules cut rule-token usage per turn sharply because most rules are inactive for most tasks. Details in .context/research.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

