agentleFS
GMaN1911GMaN1911/claude-cognitive/templates/CLAUDE.md

claude-cognitive / templates

CLAUDE.md449 starsChanged 11 months agoMITView on GitHub

Project: [Brief description] Status: [Development/Production/Research] Primary Goal: [What are you building?] Core Components: - [Component 1]: [Purpose, location] - [Component 2]: [Purpose, location] - [Component 3]: [Purpose, location] This project uses fractal documentation - information organized by attention level: When you start a session: 1. Check systems/ for deployment context 2. Check modules/ for code you're working on 3. Use integrations/ if touching external systems The context router will automatically: - Keep recently mentioned files HOT (full content) - Keep…

The file

Show its rules and text

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

14 rules. About 0 are common, 9 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Add more as needed

    line 45
  2. Distinctive:

    Add per major module

    line 52
  3. Distinctive:

    Add per integration point

    line 58
  4. Very specific:

    Check systems/ for deployment context

    line 65
  5. Very specific:

    Check modules/ for code you're working on

    line 66
  6. Very specific:

    Use integrations/ if touching external systems

    line 67
  7. Distinctive:

    Keep recently mentioned files HOT (full content)

    line 70
  8. Distinctive:

    Keep related files WARM (headers only)

    line 71
  9. Distinctive:

    Avoid hallucinating non-existent integrations

    line 159
  10. Distinctive:

    Add sections specific to your project

    line 165
  11. Distinctive:

    Keep it updated as architecture evolves

    line 166
  12. Very specific:

    Use systems/*.md for detailed hardware/deployment docs

    line 167
  13. Very specific:

    Use modules/*.md for detailed code documentation

    line 168
  14. Distinctive:

    If you're running multiple Claude Code instances on this project:

    line 174

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

[Your Project Name]

Project: [Brief description] Status: [Development/Production/Research] Primary Goal: [What are you building?]


Quick Reference

WhatWhereCommand
Start[entry_point.py]python [entry_point.py]
Test[test_directory]pytest
Deploy[deployment_script]./deploy.sh

Architecture Overview

[Your system architecture diagram - text-based is fine]

Example:
Client → API Server → Database
         ↓
    Background Workers

Core Components:

  • [Component 1]: [Purpose, location]
  • [Component 2]: [Purpose, location]
  • [Component 3]: [Purpose, location]

Context Documentation Structure

This project uses fractal documentation - information organized by attention level:

Systems (systems/)

Hardware, deployment, infrastructure - changes slowly

  • systems/production.md - Production environment
  • systems/development.md - Dev environment
  • Add more as needed

Modules (modules/)

Core code systems - changes frequently

  • modules/api.md - API layer documentation
  • modules/database.md - Data layer
  • modules/auth.md - Authentication
  • Add per major module

Integrations (integrations/)

Cross-system communication

  • integrations/external-api.md - Third-party API
  • integrations/websocket.md - Real-time communication
  • Add per integration point

Getting Started (for Claude)

When you start a session:

  1. Check systems/ for deployment context
  2. Check modules/ for code you're working on
  3. Use integrations/ if touching external systems

The context router will automatically:

  • Keep recently mentioned files HOT (full content)
  • Keep related files WARM (headers only)
  • Evict unmentioned files as COLD

Development Workflow

Daily:

# [Your typical commands]
git pull
[run tests]
[start dev server]

Deploy:

# [Your deploy process]
[build command]
[deploy command]

Common Operations

Run tests:

[test command]

Check logs:

[log command]

Health check:

[health check command]

Critical Files

FilePurposeLine
[critical_file_1.py][Purpose][Key line numbers]
[critical_file_2.py][Purpose][Key line numbers]

Environment Variables

# Required
export [VAR_NAME]=[value]

# Optional
export [VAR_NAME]=[value]

Dependencies on External Services

ServicePurposeFailure ImpactHealth Check
[Service 1][Purpose][Impact]curl [health_url]
[Service 2][Purpose][Impact]ping [host]

Recent Changes

[Keep a running log of major changes for context continuity]

[Date]:

  • [Change description]
  • [Affects: which systems]
  • [Why: reasoning]

For New Developers

This file helps Claude Code:

  1. Understand your project structure
  2. Avoid hallucinating non-existent integrations
  3. Maintain context across long sessions
  4. Coordinate across multiple concurrent instances

Customize this template:

  1. Replace all [placeholders] with your actual info
  2. Add sections specific to your project
  3. Keep it updated as architecture evolves
  4. Use systems/*.md for detailed hardware/deployment docs
  5. Use modules/*.md for detailed code documentation

Multi-Instance Coordination

If you're running multiple Claude Code instances on this project:

  1. Set instance ID:
    export CLAUDE_INSTANCE=A  # Or B, C, D, etc.
  2. Signal when completing work:
    INSTANCE: A
    ACTION: completed
    TOPIC: [Brief description]
    SUMMARY: [What changed]
    AFFECTS: [Files/systems touched]
    BLOCKS: [What this unblocks]
  3. Other instances will see your updates at their next session start

Last Updated: [Date] Maintained By: [Your name/team]

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.