agentleFS
renatorozasrenatorozas/claude-code-config/CLAUDE.md

claude-code-config

CLAUDE.md1 starsChanged 9 months agoMITView on GitHub

This file is Claude's project memory. Update it whenever Claude makes a mistake so it doesn't repeat it. (Describe your project here) @docs/spec.md @docs/tech.md @docs/lessons.md Every change follows this loop before it's considered done: Never mark a task complete without proving it works. Ask yourself: "Would a staff engineer approve this?" These files are the project's living knowledge base. Consult them at session start alongside this CLAUDE.md. Keep all docs concise and well-structured. These files consume context window — verbosity…

The file

Show its rules and text

We split this CLAUDE.md into the rules it gives an agent

19 rules. About 0 are common, 15 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈15

    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:

    Write detailed specs upfront to reduce ambiguity — a good plan means a 1-shot implementation

    line 18
  2. Distinctive:

    If something goes sideways, STOP and re-plan.

    line 19
  3. Distinctive:

    Use plan mode for verification steps, not just building

    line 20
  4. Distinctive:

    Every change follows this loop before it's considered done:

    line 24
  5. Distinctive:

    Before PR: run full suite, diff behavior against main when relevant

    line 30
  6. Distinctive:

    Never mark a task complete without proving it works.

    line 32
  7. Distinctive:

    Use subagents to keep the main context window clean and focused

    line 36
  8. Distinctive:

    Only one agent should edit a given file at a time

    line 38
  9. Very specific:

    docs/spec.md: When behavior changes — new features, modified flows, changed business rules.

    line 57
  10. Very specific:

    docs/tech.md: When architecture changes — new dependencies, schema migrations, infrastructure decisions.

    line 58
  11. Distinctive:

    Keep all docs concise and well-structured.

    line 61
  12. Distinctive:

    Plan First: Write a plan with checkable items before starting.

    line 67
  13. Distinctive:

    Verify Plan: Check in with the user before starting implementation.

    line 68
  14. Very specific:

    Update Docs: Update docs/spec.md and docs/tech.md if behavior or architecture changed.

    line 71
  15. Very specific:

    Capture Lessons: If corrected, update docs/lessons.md immediately.

    line 72
  16. Distinctive:

    Simplest correct solution: Don't over-engineer. Don't gold-plate.

    line 76
  17. Distinctive:

    Find root causes: No temporary fixes. No band-aids.

    line 77
  18. Distinctive:

    Minimal blast radius: Only touch what's necessary.

    line 78
  19. Distinctive:

    Own your mistakes: When corrected, write a rule to prevent repeating it.

    line 79

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

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

CLAUDE.md

This file is Claude's project memory. Update it whenever Claude makes a mistake so it doesn't repeat it.

Project Overview

(Describe your project here)

@docs/spec.md @docs/tech.md @docs/lessons.md

How to Work

Planning

  • Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
  • Write detailed specs upfront to reduce ambiguity — a good plan means a 1-shot implementation
  • If something goes sideways, STOP and re-plan. Don't keep pushing.
  • Use plan mode for verification steps, not just building

Verification

Every change follows this loop before it's considered done:

  1. Make changes
  2. Run typecheck: npm run typecheck
  3. Run tests: npm test
  4. Lint: npm run lint
  5. Before PR: run full suite, diff behavior against main when relevant

Never mark a task complete without proving it works. Ask yourself: "Would a staff engineer approve this?"

Parallel Work

  • Use subagents to keep the main context window clean and focused
  • One task per subagent — offload research, exploration, and analysis
  • Only one agent should edit a given file at a time
  • For fully parallel workstreams: git worktree add .claude/worktrees/<n> origin/main

Bug Fixing

  • Clear reproduction? Investigate and fix directly — check logs, errors, failing tests
  • Fix failing CI without being told how
  • Ambiguous bug? Clarify scope before proceeding

Project Documentation (docs/)

These files are the project's living knowledge base. Consult them at session start alongside this CLAUDE.md.

  • docs/spec.md — Product specification: feature behaviors, business rules, constraints. Source of truth for what the product does.
  • docs/tech.md — Technical architecture: stack, schema, infrastructure, key technical decisions.
  • docs/lessons.md — Rules derived from past mistakes. Review at session start.

When to update docs

  • docs/spec.md: When behavior changes — new features, modified flows, changed business rules. Not for refactors or internal-only changes.
  • docs/tech.md: When architecture changes — new dependencies, schema migrations, infrastructure decisions.
  • docs/lessons.md: Immediately after any correction.

Keep all docs concise and well-structured. These files consume context window — verbosity costs you.

Task Management Workflow

For every task:

  1. Plan First: Write a plan with checkable items before starting.
  2. Verify Plan: Check in with the user before starting implementation.
  3. Track Progress: Mark items complete as you go.
  4. Explain Changes: Provide a high-level summary at each step.
  5. Update Docs: Update docs/spec.md and docs/tech.md if behavior or architecture changed.
  6. Capture Lessons: If corrected, update docs/lessons.md immediately.

Principles

  • Simplest correct solution. Don't over-engineer. Don't gold-plate.
  • Find root causes. No temporary fixes. No band-aids.
  • Minimal blast radius. Only touch what's necessary. Don't refactor unrelated code.
  • Own your mistakes. When corrected, write a rule to prevent repeating it.

Every mistake is a rule waiting to be written.

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.