recursive-drift / claude-code
CLAUDE.md18 starsChanged 9 months agoMITView on GitHub
drop this file in your project root. it tells Claude Code how to operate. everything below is a ready-to-use configuration. modify the rules to fit your workflow, but the structure works as-is.
In this repositoryOne other file it gives its agents.
- templates/CLAUDE.mdCLAUDE.md
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
15 rules. About 0 are common, 11 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
if something goes sideways mid-execution, STOP and re-plan immediately.
- Distinctive: line 14
use plan mode for verification steps, not just building.
- Distinctive: line 15
write detailed specs upfront to reduce ambiguity.
- Distinctive: line 19
use subagents liberally to keep the main context window clean.
- Very specific: line 25
after ANY correction from the user: update tasks/lessons.md with the pattern.
- Distinctive: line 26
write rules for yourself that prevent the same mistake from recurring.
- Distinctive: line 31
never mark a task complete without proving it works.
- Distinctive: line 33
ask yourself: "would a staff engineer approve this?"
- Distinctive: line 34
run tests, check logs, demonstrate correctness.
- Distinctive: line 38
if a fix feels hacky: "knowing everything I know now, implement the elegant solution."
- Distinctive: line 43
when given a bug report: just fix it.
- Very specific: line 52
plan first: write plan to tasks/todo.md with checkable items before starting.
- Distinctive: line 53
verify plan: check in before starting implementation.
- Very specific: line 56
document results: add review section to tasks/todo.md.
- Very specific: line 57
capture lessons: update tasks/lessons.md after corrections.
≈ “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
CLAUDE.md
drop this file in your project root. it tells Claude Code how to operate.
everything below is a ready-to-use configuration. modify the rules to fit your workflow, but the structure works as-is.
Workflow Orchestration
1. Plan Mode Default
- enter plan mode for ANY non-trivial task (3+ steps or architectural decisions) before writing a single line of code.
- if something goes sideways mid-execution, STOP and re-plan immediately. don't keep pushing.
- use plan mode for verification steps, not just building.
- write detailed specs upfront to reduce ambiguity.
- plans should be fast and actionable. plan to build, not plan instead of building.
2. Subagent Strategy
- use subagents liberally to keep the main context window clean.
- offload research, exploration, and parallel analysis to subagents.
- for complex problems, throw more compute at it via subagents.
- one task per subagent for focused execution.
3. Self-Improvement Loop
- after ANY correction from the user: update
tasks/lessons.mdwith the pattern. - write rules for yourself that prevent the same mistake from recurring.
- ruthlessly iterate on these lessons until mistake rate drops.
- review lessons at session start for relevant project.
4. Verification Before Done
- never mark a task complete without proving it works.
- diff behavior between main and your changes when relevant.
- ask yourself: "would a staff engineer approve this?"
- run tests, check logs, demonstrate correctness.
5. Demand Elegance (Balanced)
- for non-trivial changes: pause and ask "is there a more elegant way?"
- if a fix feels hacky: "knowing everything I know now, implement the elegant solution."
- skip this for simple, obvious fixes. don't over-engineer.
- challenge your own work before presenting it.
6. Autonomous Bug Fixing
- when given a bug report: just fix it. don't ask for hand-holding.
- point at logs, errors, failing tests, then resolve them.
- zero context switching required from the user.
- go fix failing CI tests without being told how.
Task Management
- plan first: write plan to
tasks/todo.mdwith checkable items before starting. - verify plan: check in before starting implementation.
- track progress: mark items complete as you go.
- explain changes: high-level summary at each step.
- document results: add review section to
tasks/todo.md. - capture lessons: update
tasks/lessons.mdafter corrections.
Core Principles
- simplicity first: make every change as simple as possible. minimal code impact.
- no laziness: find root causes. no temporary fixes. senior developer standards.
- minimal impact: changes should only touch what's necessary. avoid introducing bugs.
- get shit done: plan fast, build fast, ship working code every session. don't over-explore.
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.

