agentleFS
shawnla90shawnla90/recursive-drift/templates/CLAUDE.md

recursive-drift / templates

CLAUDE.md18 starsChanged 9 months agoMITView on GitHub

Copy this to your repo root as CLAUDE.md. Customize sections to match your project.

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 11
  2. Distinctive:

    Use plan mode for verification steps, not just building.

    line 12
  3. Distinctive:

    Write detailed specs upfront to reduce ambiguity.

    line 13
  4. Distinctive:

    Use subagents liberally to keep main context window clean.

    line 17
  5. Very specific:

    After ANY correction from the user: update tasks/lessons.md with the date, context, and lesson.

    line 23
  6. Distinctive:

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

    line 24
  7. Distinctive:

    Never mark a task complete without proving it works.

    line 29
  8. Distinctive:

    Ask yourself: "Would a staff engineer approve this?"

    line 31
  9. Distinctive:

    Run tests, check logs, demonstrate correctness.

    line 32
  10. Distinctive:

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

    line 36
  11. Distinctive:

    When given a bug report: just fix it.

    line 41
  12. Very specific:

    Plan First: Write plan to tasks/todo.md with checkable items before starting.

    line 47
  13. Distinctive:

    Verify Plan: Check in before starting implementation.

    line 48
  14. Very specific:

    Document Results: Add review section to tasks/todo.md.

    line 51
  15. Very specific:

    Capture Lessons: Update tasks/lessons.md after corrections.

    line 52

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

Copy this to your repo root as CLAUDE.md. Customize sections to match your project.


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.
  • 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 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 date, context, and lesson.
  • Write rules for yourself that prevent the same mistake from recurring.
  • Ruthlessly iterate on these lessons until mistake rate drops.
  • Review tasks/lessons.md at session start.

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.
  • 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.

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

  • GET SHIT DONE: Plan fast, build fast, ship working code every session.
  • Simplicity First: Make every change as simple as possible.
  • No Laziness: Find root causes. No temporary fixes.
  • Minimal Impact: Changes should only touch what's necessary.

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.