domain-experts
CLAUDE.md29 starsChanged 5 months agoMITView on GitHub
Before doing ANY work in this repo, read these three files in full, in this order: This project uses a local dual-graph MCP server for efficient context retrieval. 2. If graph_continue returns needs_project=true: call graph_scan with the current project directory (pwd). Do NOT ask the user. 3. If graph_continue returns skip=true: project has fewer than 5 files. Do NOT do broad or recursive exploration. Read only specific files if their names are mentioned, or ask the user what to work…
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/llms.txtllms.txt
- domain-expert-routerSkill
The file
We split this CLAUDE.md into the rules it gives an agent
12 rules. About 0 are common, 5 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 3
Before doing ANY work in this repo, read these three files in full, in this order:
- Very specific: line 13
Never hand-edit generated content: README role-count block, ROADMAP checklist, data/roles.json.
- Very specific: line 26
If
graph_continuereturnsneeds_project=true: call graph_scan with the current project directory (pwd). - Distinctive: line 30
Do NOT do broad or recursive exploration.
- Very specific: line 66
Do NOT use rg, grep, or bash file exploration before calling graph_continue.
- Distinctive: line 67
Do NOT do broad/recursive exploration at any confidence level.
- Distinctive: line 69
Do NOT dump full chat history.
- Very specific: line 70
Do NOT call graph_retrieve more than once per turn.
- Very specific: line 71
After edits, call graph_register_edit with the changed files.
- Distinctive: line 85
Only log things worth remembering across sessions (not every minor detail)
- Very specific: line 92
When the user signals they are done (e.g.
- Very specific: line 97
Keep CONTEXT.md under 20 lines total.
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 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
Domain Experts — session bootstrap
Before doing ANY work in this repo, read these three files in full, in this order:
AGENTS.md— what lives where, the rules, release checklist, known pitfallsCONTRIBUTING.md— especially the "Exact recipe for adding a role (follow verbatim)" sectiondocs/CONTEXT.md— where the last session left off
Non-negotiables when adding or editing roles
- New roles are
spec: 2perAUTHORING.md: SKILL.md +references/trio, worked example with real reconciling numbers, each idea stated exactly once. - Order of operations: write files →
git add roles/<slug>→python3 scripts/lint_roles.py <slug>until 0 errors →python3 scripts/generate_roadmap.py→ commit everything together →git pull --rebase --autostash→ push. - Never hand-edit generated content: README role-count block, ROADMAP checklist,
data/roles.json. - Another session may be pushing to
mainconcurrently — always pull --rebase --autostash before push. - Quality bar: a practitioner should nod, not shrug. If a role would ship generic, skip it and pick another — an empty slot is recoverable, a generic role poisons trust.
<!-- dgc-policy-v11 -->Dual-Graph Context Policy
This project uses a local dual-graph MCP server for efficient context retrieval.
MANDATORY: Always follow this order
- Call
graph_continuefirst — before any file exploration, grep, or code reading. - If
graph_continuereturnsneeds_project=true: callgraph_scanwith the current project directory (pwd). Do NOT ask the user. - If
graph_continuereturnsskip=true: project has fewer than 5 files. Do NOT do broad or recursive exploration. Read only specific files if their names are mentioned, or ask the user what to work on. - Read
recommended_filesusinggraph_read— one call per file.graph_readaccepts a singlefileparameter (string). Call it separately for each recommended file. Do NOT pass an array or batch multiple files into one call.recommended_filesmay containfile::symbolentries (e.g.src/auth.ts::handleLogin). Pass them verbatim tograph_read(file: "src/auth.ts::handleLogin")— it reads only that symbol's lines, not the full file.- Example: if
recommended_filesis["src/auth.ts::handleLogin", "src/db.ts"], callgraph_read(file: "src/auth.ts::handleLogin")andgraph_read(file: "src/db.ts")as two separate calls (they can be parallel).
- Check
confidenceand obey the caps strictly:confidence=high-> Stop. Do NOT grep or explore further.confidence=medium-> If recommended files are insufficient, callfallback_rgat mostmax_supplementary_grepstime(s) with specific terms, thengraph_readat mostmax_supplementary_filesadditional file(s). Then stop.confidence=low-> Callfallback_rgat mostmax_supplementary_grepstime(s), thengraph_readat mostmax_supplementary_filesfile(s). Then stop.
Token Usage
A token-counter MCP is available for tracking live token usage.
- To check how many tokens a large file or text will cost before reading it:
count_tokens({text: "<content>"}) - To log actual usage after a task completes (if the user asks):
log_usage({input_tokens: <est>, output_tokens: <est>, description: "<task>"}) - To show the user their running session cost:
get_session_stats()
Live dashboard URL is printed at startup next to "Token usage".
Rules
- Do NOT use
rg,grep, or bash file exploration before callinggraph_continue. - Do NOT do broad/recursive exploration at any confidence level.
max_supplementary_grepsandmax_supplementary_filesare hard caps - never exceed them.- Do NOT dump full chat history.
- Do NOT call
graph_retrievemore than once per turn. - After edits, call
graph_register_editwith the changed files. Usefile::symbolnotation (e.g.src/auth.ts::handleLogin) when the edit targets a specific function, class, or hook.
Context Store
Whenever you make a decision, identify a task, note a next step, fact, or blocker during a conversation, call graph_add_memory.
To add an entry:
graph_add_memory(type="decision|task|next|fact|blocker", content="one sentence max 15 words", tags=["topic"], files=["relevant/file.ts"])Do NOT write context-store.json directly — always use graph_add_memory. It applies pruning and keeps the store healthy.
Rules:
- Only log things worth remembering across sessions (not every minor detail)
contentmust be under 15 wordsfileslists the files this decision/task relates to (can be empty)- Log immediately when the item arises — not at session end
Session End
When the user signals they are done (e.g. "bye", "done", "wrap up", "end session"), proactively update CONTEXT.md in the project root with:
- Current Task: one sentence on what was being worked on
- Key Decisions: bullet list, max 3 items
- Next Steps: bullet list, max 3 items
Keep CONTEXT.md under 20 lines total. Do NOT summarize the full conversation — only what's needed to resume next session.
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.

