Reference: CLAUDE.md, rules and memory
Claude Certified Architect - Foundations (CCAR-F) › Domain 3: Claude Code Configuration & Workflows
CLAUDE.md, rules and memory, from the Claude Code documentation
Domain 3 examines where configuration lives and who receives it. The exam guide names three levels. The documentation describes four, plus a second memory system the guide does not mention at all.
Every CLAUDE.md location
Listed in load order, broadest first, so a project instruction lands in context after a user instruction.
| Scope | Location | Shared with |
|---|---|---|
| Managed policy | macOS /Library/Application Support/ClaudeCode/CLAUDE.md · Linux/WSL /etc/claude-code/CLAUDE.md · Windows: under Program Files/ClaudeCode/ | Everyone on the machine |
| User | ~/.claude/CLAUDE.md | Just you, every project |
| Project | ./CLAUDE.md or ./.claude/CLAUDE.md | The team, via source control |
| Local | ./CLAUDE.local.md | Just you, this project — gitignore it |
Files are concatenated, not overridden. Across a directory tree, content is ordered from the filesystem root down to your working directory, so the file closest to where you launched Claude is read last. Within a directory, CLAUDE.local.md is appended after CLAUDE.md.
Subdirectory files are discovered but load on demand, when Claude reads a file in that directory — not at launch.
The limits worth memorising
Documented limits
- under 200 lines per CLAUDE.md
- a file over 4 MiB is not loaded
- four hops maximum
- first 200 lines or 25KB of MEMORY.md
Imports
@path/to/import pulls another file in. Relative paths resolve against the file containing the import, not the working directory. Imported files can import further files, to a maximum depth of four hops.
Import parsing skips code spans and fenced blocks, so a path wrapped in backticks stays literal text while the same path outside them imports the file. That is the documented way to mention a path in a CLAUDE.md without pulling it in.
Path-scoped rules
.claude/rules/ holds topic files. A rule with no paths frontmatter loads at launch with the same priority as .claude/CLAUDE.md. A rule with paths loads only when Claude reads a matching file.
---
paths:
- "src/api/**/*.ts"
---Brace expansion works — src/**/*.{ts,tsx} — and a rule's whole paths list shares a budget of 1,000 expanded patterns. User-level rules live in ~/.claude/rules/ and load before project rules, giving project rules the higher priority.
/memory and /context
/init generates a starting CLAUDE.md from the codebase, and suggests improvements rather than overwriting if one already exists.
What survives /compact
A project-root CLAUDE.md is re-read from disk after compaction and re-injected. Nested CLAUDE.md files and path-scoped rules reload as Claude reads files they apply to. An instruction that disappears after /compact was given only in conversation — which is the argument for writing it down.
Skills and commands, as documented
Two facts worth holding beside the guide's account.
Custom commands have been merged into skills. A file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy and work the same way. Existing command files keep working; skills add a directory for supporting files, frontmatter, and automatic invocation.
argument-hint does not do what the guide says. The documentation describes it as a hint shown during autocomplete to indicate expected arguments — not a prompt raised when a skill is invoked without any. The exam grades the guide's version.
| Frontmatter | Documented behaviour |
|---|---|
context: fork | Runs the skill in a forked subagent context |
allowed-tools | Grants go through the normal permission flow |
argument-hint | Hint shown during autocomplete |
disable-model-invocation | Stops Claude invoking the skill on its own |
The CLI flags this exam names
| Flag | Documented behaviour |
|---|---|
-p / --print | Print response without interactive mode |
--output-format | Print mode only. Values: text, json, stream-json |
--json-schema | Validated JSON matching a schema. Print mode only |
--resume / -r | Resume a session by ID or name, or pick interactively |
--continue / -c | Load the most recent conversation in this directory |
Sources
- How Claude remembers your project — https://code.claude.com/docs/en/memory (retrieved 2026-08-30)
- Extend Claude with skills — https://code.claude.com/docs/en/skills (retrieved 2026-08-30)
- CLI reference — https://code.claude.com/docs/en/cli-reference (retrieved 2026-08-30)