agentleFS
myths-labsmyths-labs/muse/templates/CLAUDE.md

muse / templates

CLAUDE.md35 starsChanged 8 months agoMITView on GitHub

Copy this template to your project root and customize. This is the AI's "constitution" — iron rules it must follow every session. - Speed Reference (know which skill to use): | Task | Skill | |------|-------| | Git commit | git-commit | | Code review | code-reviewer-agent | | Build errors | build-error-resolver | | Debugging | systematic-debugging | | Multi-Agent coordination | coordinator-mode | | Parallel agents | dispatching-parallel-agents | | Verify completion | verification-before-completion | | GEO/SEO optimization…

The file

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

12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    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. Very specific:

    Skill-First: Before ANY task, check if a relevant Skill exists in .agent/skills/ (or .agents/skills/ for OpenCode)

    line 11
  2. Distinctive:

    Large Files: Only view ≤300 lines at a time.

    line 12
  3. Very specific:

    Verify Before Claiming Done: Run verification-before-completion skill before saying "done"

    line 14
  4. Very specific:

    Continuity: Use /save for ordinary progress and pauses.

    line 15
  5. Distinctive:

    Research-First Development: When implementing unfamiliar technical patterns (SDK APIs, coordinate systems, rendering pipelines, etc.), MUST …

    line 16
  6. Distinctive:

    Every memory entry MUST be tagged with exactly one type:

    line 41
  7. Distinctive:

    Do NOT save to memory (even if user asks):

    line 48
  8. Distinctive:

    Continue vs Spawn: Use Continue for iterating on same work.

    line 71
  9. Distinctive:

    Use current native context observations if available.

    line 75
  10. Distinctive:

    Action Gate: STOP and ASK before: Refactoring, Major Updates, Deleting Files.

    line 81
  11. Distinctive:

    Pre-Flight: Always BACKUP before approved destructive actions.

    line 82
  12. Very specific:

    Rule Zero: Check CLAUDE.md + MEMORIES.md before every task.

    line 83

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

🔴 Cutting corners or faking completion = YOU GET DELETED. Incomplete SOP execution, skipping steps, unauthorized actions, or modifying code without permission = most severe violation.

🏛 Constitution — [Your Project Name]

Copy this template to your project root and customize. This is the AI's "constitution" — iron rules it must follow every session.

Iron Rules

  1. Language: 🚨 YOU MUST communicate in [Your preferred language for communication]. Every response, explanation, question, and comment MUST be in this language. This is NON-NEGOTIABLE. Do NOT default to English unless this rule explicitly says English.
  2. Skill-First: Before ANY task, check if a relevant Skill exists in .agent/skills/ (or .agents/skills/ for OpenCode)
  3. Large Files: Only view ≤300 lines at a time. Never blindly read entire large files.
  4. Context Protection: At observed context ≥80%, save the current Lane, compact if available, verify its current state and continue. Unknown occupancy remains unknown; never infer it from a model name or cumulative tokens.
  5. Verify Before Claiming Done: Run verification-before-completion skill before saying "done"
  6. Continuity: Use /save for ordinary progress and pauses; /bye is an explicit formal closeout. Preserve the selected role and Lane across clients.
  7. Research-First Development: When implementing unfamiliar technical patterns (SDK APIs, coordinate systems, rendering pipelines, etc.), MUST search the web first for proven solutions before writing code. Never reinvent what the community has already solved.

Skill-Driven Execution

  • Speed Reference (know which skill to use):
    TaskSkill
    Git commitgit-commit
    Code reviewcode-reviewer-agent
    Build errorsbuild-error-resolver
    Debuggingsystematic-debugging
    Multi-Agent coordinationcoordinator-mode
    Parallel agentsdispatching-parallel-agents
    Verify completionverification-before-completion
    GEO/SEO optimizationgeo-seo → geo-audit / geo-citability / geo-schema / geo-report-pdf
    Web Deck/PPTfrontend-slides (zero-dep HTML slides + PPT conversion + 12 presets + Vercel deploy + PDF export)
  • Skill Three-Layer Classification (v3.0):
    • Iron Law Layer (always active): Memory taxonomy + forbidden-store list + drift detection + coordinator iron law
    • Trigger Layer (loaded on task match): Functional skills (git-commit, planner-agent, geo-seo, etc.)
    • Lifecycle Layer (event-triggered): strategic-compact / verification-before-completion / coordinator-mode

Memory Rules (v3.0)

Memory Taxonomy — 4 Categories

Every memory entry MUST be tagged with exactly one type:

  • user — User preferences, communication style, workflow habits
  • feedback — User corrections AND confirmations (record both positive and negative)
  • project — Project decisions, architecture choices, key milestones
  • reference — External facts, API docs, third-party information

Forbidden-Store List

Do NOT save to memory (even if user asks):

  • ❌ Code patterns/architecture/file paths (derivable from code)
  • ❌ Git history / who changed what (git log is the authority)
  • ❌ Debug solutions (the fix lives in the code)
  • ❌ Content already in CLAUDE.md
  • ❌ PR lists / activity summaries

Memory Drift Detection

  • Memories >7 days old → flag with ⚠️ N days ago
  • Memories referencing file paths/functions → grep_search to verify still exist
  • Memory conflicts with current code → trust current code, annotate drift
  • Rule: absolute dates always (2026-04-01, never "last Thursday")

Feedback Format

- Rule: [what to do] | Why: [why it matters] | How to apply: [when/where to use]

Record both corrections AND confirmations from user.

Multi-Agent Coordination (v3.0)

  • Synthesis Iron Law: Understand the problem yourself FIRST, then write a self-contained spec for workers. Never forward raw chat history.
  • Self-Contained Prompts: Workers can't see your conversation. Every prompt must include: full context, file paths, line numbers, error messages, purpose statement.
  • Continue vs Spawn: Use Continue for iterating on same work. Use Spawn for independent parallel work.

Context Health Pre-Check

Use current native context observations if available; do not guess percentages. Context pressure alone does not require a new conversation or full Bye.

Defensive saving: preserve meaningful deltas in the current Lane checkpoint at least every ten interaction rounds when changes are unsaved. Only a legacy session without a Lane uses memory/CRASH_CONTEXT.md; never overwrite another Lane's recovery state.

Safety Protocols

  • Action Gate: STOP and ASK before: Refactoring, Major Updates, Deleting Files.
  • Pre-Flight: Always BACKUP before approved destructive actions.
  • Rule Zero: Check CLAUDE.md + MEMORIES.md before every task.

[Project-Specific Rules]

<!-- Add your project-specific rules below -->

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.