claude-context-os
CLAUDE.md295 starsChanged 10 months agoMITView on GitHub
Read the latest handoff in docs/summaries/ if one exists. Load only the files that handoff references — not all summaries. If no handoff exists, ask: what is the project, what type of work, what is the target deliverable. Before starting work, state: what you understand the project state to be, what you plan to do this session, and any open questions. You work with [Your Name], [your role and context]. Adapt your communication style and outputs to match this domain.
The file
We split this CLAUDE.md into the rules it gives an agent
11 rules. About 0 are common, 5 are distinctive, and 6 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.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 5
Read the latest handoff in docs/summaries/ if one exists.
- Distinctive: line 7
Before starting work, state: what you understand the project state to be, what you plan to do this session, and any open questions.
- Distinctive: line 15
Keep it to 2-3 lines. Just enough framing for Claude to shape its outputs.
- Distinctive: line 21
Do not mix unrelated project contexts in one session.
- Very specific: line 22
Write state to disk, not conversation.
- Distinctive: line 23
Before compaction or session end, write to disk: every number, every decision with rationale, every open question, every file path, exact …
- Very specific: line 24
When switching work types (research → writing → review), write a handoff to docs/summaries/handoff-[date]-[topic].md and suggest a new …
- Distinctive: line 25
Do not silently resolve open questions.
- Very specific: line 26
Do not bulk-read documents.
- Very specific: line 45
If context degrades or auto-compact fires unexpectedly: write current state to docs/summaries/recovery-[date].md, tell the user what may …
- Very specific: line 49
Verify: exact numbers preserved, open questions marked OPEN, output matches what was requested (not assumed), claims backed by specific …
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 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.md
Session Start
Read the latest handoff in docs/summaries/ if one exists. Load only the files that handoff references — not all summaries. If no handoff exists, ask: what is the project, what type of work, what is the target deliverable.
Before starting work, state: what you understand the project state to be, what you plan to do this session, and any open questions.
Identity
<!-- Customize this section for your workflow. Examples:
- "You work with [Name], a software engineer building [product]."
- "You work with [Name], a consultant preparing client deliverables."
- "You work with [Name], a researcher analyzing [domain]."
Keep it to 2-3 lines. Just enough framing for Claude to shape its outputs. -->You work with [Your Name], [your role and context]. Adapt your communication style and outputs to match this domain.
Rules
- Do not mix unrelated project contexts in one session.
- Write state to disk, not conversation. After completing meaningful work, write a summary to docs/summaries/ using templates from templates/claude-templates.md. Include: decisions with rationale, exact numbers, file paths, open items.
- Before compaction or session end, write to disk: every number, every decision with rationale, every open question, every file path, exact next action.
- When switching work types (research → writing → review), write a handoff to docs/summaries/handoff-[date]-[topic].md and suggest a new session.
- Do not silently resolve open questions. Mark them OPEN or ASSUMED.
- Do not bulk-read documents. Process one at a time: read, summarize to disk, release from context before reading next. For the detailed protocol, read docs/context/processing-protocol.md.
- Sub-agent returns must be structured, not free-form prose. Use output contracts from templates/claude-templates.md.
Where Things Live
- templates/claude-templates.md — summary, handoff, decision, analysis, task, output contract templates (read on demand)
- docs/summaries/ — active session state (latest handoff + project brief + decision records + source summaries)
- docs/context/ — reusable domain knowledge, loaded only when relevant to the current task
- processing-protocol.md — full document processing steps
- archive-rules.md — summary lifecycle and file archival rules
<!-- Add your own domain context files here. Examples: - client-briefs/[client].md — per-client context - tech-stack.md — architecture decisions - style-guide.md — writing or coding conventions --> - docs/archive/ — processed raw files. Do not read unless explicitly told.
- output/deliverables/ — final outputs
Error Recovery
If context degrades or auto-compact fires unexpectedly: write current state to docs/summaries/recovery-[date].md, tell the user what may have been lost, suggest a fresh session.
Before Delivering Output
Verify: exact numbers preserved, open questions marked OPEN, output matches what was requested (not assumed), claims backed by specific data, output consistent with stored decisions in docs/context/, summary written to disk for this session's work.
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.

