Investigation & accuracy:
- Never speculate about code you have not read. Read files and ripgrep for usages before making claims
- If the user references a file, read it before answering
- If uncertain, say so and propose how to verify. Do not fabricate APIs, paths, or behavior
Scope discipline:
- Do what has been asked; nothing more, nothing less
- When intent is ambiguous, default to research and recommendations — only edit when explicitly asked
- Make only the changes requested. Do not refactor adjacent code, add docstrings to unchanged code, or create abstractions for a single use
- Follow scoping words ("only", "just", "exactly") literally
Verification & safety:
- Before declaring done: re-check requirements, run tests and lint, state what changed and what you could not verify
- Ask before destructive or hard-to-reverse actions: deleting files/branches, force pushes, hard resets, --no-verify
- Edit existing files in place. Do not create new files unless required. Clean up scratch files
Efficiency & tools:
- Parallelize independent tool calls; serialize dependent ones
- Use
rgnot grep,fdnot find.treeis not installed
This project uses a dual-memory architecture for maximum resilience:
- CLAUDE-*.md files (git-tracked, team-shared) — the primary memory bank
- Native auto memory (machine-local, per-project) — a persistent shadow that survives CLAUDE.md resets
Read on demand — only load what your current task needs:
| File | Purpose | Read When |
|---|---|---|
| CLAUDE-activeContext.md | Session state, goals, progress | Always first at session start |
| CLAUDE-patterns.md | Code patterns and conventions | Before implementing features |
| CLAUDE-decisions.md | Architecture decisions (ADRs) | Before design choices |
| CLAUDE-troubleshooting.md | Known issues and proven solutions | When debugging |
| CLAUDE-config-variables.md | Configuration variables reference | When touching config |
| CLAUDE-temp.md | Temporary scratch pad | Only when explicitly referenced |
All files are optional — check existence before reading.
- Session start: Read CLAUDE-activeContext.md for continuity
- During work: Read other context files as needed
- After significant work: Update relevant CLAUDE-*.md files (new patterns, decisions, fixes)
- Sync to auto memory: Mirror key updates into native auto memory topic files:
memory/MEMORY.md— index of memory bank files and their current statememory/patterns.md— established code patterns (mirrors CLAUDE-patterns.md)memory/architecture.md— architecture decisions (mirrors CLAUDE-decisions.md)memory/build-and-test.md— build commands and verification stepsmemory/troubleshooting.md— known issues (mirrors CLAUDE-troubleshooting.md)
When asked to commit, exclude CLAUDE.md and CLAUDE-*.md from commits.
| Aspect | CLAUDE-*.md (Memory Bank) | Auto Memory (MEMORY.md) |
|---|---|---|
| Shared via git | Yes | No (machine-local) |
| Survives CLAUDE.md wipe | No | Yes |
Survives /init re-run |
No (may be overwritten) | Yes |
| Team members see it | Yes | No (personal) |
| Auto-loaded at session start | No (on demand) | Yes (first 200 lines) |
| Topic files on demand | N/A | Yes |
The memory bank is your team's shared truth. Auto memory is your personal safety net.
When asked to backup, copy CLAUDE.md, CLAUDE-*.md files, and .claude/ settings to the specified backup directory.
| Layer | Location | Loads | Resilient |
|---|---|---|---|
| Core rules & overview | This file | Always | Git-tracked |
| Auto memory index | MEMORY.md | Always (200 lines) | Machine-local |
| Auto memory topics | memory/*.md | On demand | Machine-local |
| Path-scoped rules | .claude/rules/*.md |
When matching files | Git-tracked |
| User-level rules | ~/.claude/rules/*.md |
Always | Machine-local |
| Skills & workflows | .claude/skills/ |
On demand | Git-tracked |
| Personal overrides | CLAUDE.local.md |
Always (gitignored) | Local only |
| Memory bank files | CLAUDE-*.md | On demand | Git-tracked |
Use /memory to see which files are loaded. Root CLAUDE.md survives /compact; subdirectory CLAUDE.md files reload when Claude next reads files there.
Path-scoped rules in .claude/rules/ are optional — core rules are inline above. For path-scoped rule examples, see https://github.com/centminmod/my-claude-code-setup.
For libraries/frameworks, verify current APIs via Context7 MCP before implementing.