agentleFS
shawnla90shawnla90/recursive-drift/claude-code/CLAUDE.md

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.

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
  1. Distinctive:

    if something goes sideways mid-execution, STOP and re-plan immediately.

    line 13
  2. Distinctive:

    use plan mode for verification steps, not just building.

    line 14
  3. Distinctive:

    write detailed specs upfront to reduce ambiguity.

    line 15
  4. Distinctive:

    use subagents liberally to keep the main context window clean.

    line 19
  5. Very specific:

    after ANY correction from the user: update tasks/lessons.md with the pattern.

    line 25
  6. Distinctive:

    write rules for yourself that prevent the same mistake from recurring.

    line 26
  7. Distinctive:

    never mark a task complete without proving it works.

    line 31
  8. Distinctive:

    ask yourself: "would a staff engineer approve this?"

    line 33
  9. Distinctive:

    run tests, check logs, demonstrate correctness.

    line 34
  10. Distinctive:

    if a fix feels hacky: "knowing everything I know now, implement the elegant solution."

    line 38
  11. Distinctive:

    when given a bug report: just fix it.

    line 43
  12. Very specific:

    plan first: write plan to tasks/todo.md with checkable items before starting.

    line 52
  13. Distinctive:

    verify plan: check in before starting implementation.

    line 53
  14. Very specific:

    document results: add review section to tasks/todo.md.

    line 56
  15. Very specific:

    capture lessons: update tasks/lessons.md after corrections.

    line 57

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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.md with 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

  1. plan first: write plan to tasks/todo.md with checkable items before starting.
  2. verify plan: check in before starting implementation.
  3. track progress: mark items complete as you go.
  4. explain changes: high-level summary at each step.
  5. document results: add review section to tasks/todo.md.
  6. capture lessons: update tasks/lessons.md after 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.