What this thread does
Do first: Run /init, then refine the generated CLAUDE.md.
Short answer
Keep maintained rules separate from learned notes. Use conditional rules for file-specific guidance.
What to do
| Item | Value / action |
|---|---|
| Team rules | ./CLAUDE.md or ./.claude/CLAUDE.md; target under 200 lines per file. |
| Inspect | /context all lists loaded files. |
| Personal project notes | CLAUDE.local.md; add it to .gitignore. |
| Topic rules | Put .md files in .claude/rules/; discovery is recursive. |
| Conditional rules | Set YAML paths, for example src/api/**/*.ts; rules without this field load at launch. |
| Imports | @path/to/import; resolve relative to the importing file; maximum depth four hops. |
| Memory index | MEMORY.md: first 200 lines or 25KB, whichever comes first; topic files load on demand. |
| Memory switch | /memory; autoMemoryEnabled defaults on locally; set false in project settings to disable. |
| Environment switch | CLAUDE_CODE_DISABLE_AUTO_MEMORY=1 disables auto memory. |
| File ceiling | Startup CLAUDE.md files over 4 MiB are skipped. |
Limits and open questions
Auto memory is machine-local and shared across repository worktrees. Self-hosted sessions default to memory off outside Claude Tag. Instructions guide behavior; they do not enforce permissions.
Not for: Codex AGENTS.md configuration.
Sources
Checked
2026-11-16; read Claude Code memory documentation; no command was run.
Started from a post by @Anthropic Claude Code docs; Vladislav (DEV Community), packaged by the editor. Original post