Claude Code — Rules
- File format
- Markdown
- Discovery paths
-
CLAUDE.md,.claude/rules - Global install path
-
~/.claude/rules - Syllago install method
- Symlink, Direct copy
- Symlink support
- Yes
- Native frontmatter fields
-
paths
Features
How each feature converts to syllago's canonical format. See format conversion for what these statuses mean.
Fields
Native frontmatter or config fields this provider exposes. The first column is the provider's own field name; the canonical key column links to syllago's cross-provider equivalent.
| Provider field | Conversion | Canonical key | Summary |
|---|---|---|---|
claudeMdExcludes | Conversion type: No canonical equivalent — appended as prose in a conversion notes block so nothing is silently lost. Learn more → | — | claudeMdExcludes setting accepts glob patterns matched against absolute file paths to skip ancestor CLAUDE.md or rules files. Arrays merge across settings layers. Managed policy CLAUDE.md files cannot be excluded. |
autoMemoryEnabled | Not portable Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | — | Claude auto-saves cross-session notes to ~/.claude/projects/<project>/memory/MEMORY.md; first 200 lines or 25KB loaded at session start; toggled via autoMemoryEnabled (CC v2.1.59+); disable via CLAUDE_CODE_DISABLE_AUTO_MEMORY=1; override storage location via autoMemoryDirectory setting (accepted from policy and user settings only). Topic files beyond MEMORY.md load on demand. All worktrees and subdirectories within the same git repo share one auto memory directory. Subagents can also maintain their own auto memory. |
Other features
Behaviors, conventions, and capabilities that aren't tied to a single named field — things like path-based activation, discovery rules, and lifecycle behavior.
| Feature | Conversion | Summary |
|---|---|---|
activation_mode | Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | Always-on (CLAUDE.md loads at every session start); conditional via paths frontmatter in .claude/rules/*.md files (glob-based, triggers on file access) |
auto_memory | Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | Auto memory saves Claude's accumulated notes to ~/.claude/projects/<project>/memory/MEMORY.md; first 200 lines or 25KB loaded at session start; requires CC v2.1.59+; enabled by default; disable via CLAUDE_CODE_DISABLE_AUTO_MEMORY=1; override storage location via autoMemoryDirectory setting (accepted from policy/user settings and --settings flag, not from project or local settings); subagents can also maintain their own auto memory |
| CLAUDE.md Files | Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | Persistent markdown instructions loaded from CLAUDE.md files at managed/project/user/local scopes; concatenated rather than overridden. Content is delivered as a user message after the system prompt, not enforced configuration. |
file_imports | Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | @path/to/file syntax in CLAUDE.md files; relative and absolute paths; recursive up to 5 hops; requires per-project approval |
hierarchical_loading | Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | CLAUDE.md files load from all ancestor directories up to repo root (ancestor files load in full at launch; subdirectory CLAUDE.md files beyond 200 lines threshold load on demand when Claude reads files in those subdirectories); .claude/rules/ files discovered recursively; user-level rules (~/.claude/rules/) load before project rules; rules without paths frontmatter load unconditionally |
| Path-Scoped Rules in .claude/rules/ | Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | Modular .md rule files in .claude/rules/ load unconditionally or via paths frontmatter glob filters that trigger on matching file access. Symlinks are supported and circular symlinks are handled gracefully. Rules are discovered recursively and can be organized into subdirectories. |
| AGENTS.md Cross-File Import via @-Syntax | Conversion type: No canonical equivalent — appended as prose in a conversion notes block so nothing is silently lost. Learn more → | Claude Code reads CLAUDE.md (not AGENTS.md natively), but CLAUDE.md can import AGENTS.md via @AGENTS.md syntax, making both Claude Code and tools that read AGENTS.md consume the same instructions. |
| @-Import Syntax for CLAUDE.md | Preserved Conversion type: Preserved Syntax survives conversion but the target provider may not interpret it. Learn more → | CLAUDE.md @path/to/file imports expand referenced files into context (up to 5 hops, requires per-project approval). Relative paths resolve relative to the containing file, not the working directory. |
| CLAUDE.local.md for Personal Project-Specific Instructions | Not portable Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | CLAUDE.local.md at the project root holds personal per-project preferences not committed to version control. Add to .gitignore. Within each directory, CLAUDE.local.md is appended after CLAUDE.md. |
| HTML Comment Stripping in CLAUDE.md | Not portable Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | Block-level HTML comments (<!-- -->) in CLAUDE.md files are stripped before content is injected into Claude's context. Comments inside code blocks are preserved. Comments remain visible when opening the file with the Read tool. |
| Interactive Multi-Phase /init Flow via CLAUDE_CODE_NEW_INIT | Not portable Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | Setting CLAUDE_CODE_NEW_INIT=1 enables an interactive /init flow: asks which artifacts to set up (CLAUDE.md, skills, hooks), explores the codebase with a subagent, fills in gaps, and presents a reviewable proposal before writing. |
| Organization-Wide Managed CLAUDE.md | Not portable Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | Centrally deployed CLAUDE.md at OS-specific system paths cannot be excluded and applies to all users. Paths: macOS: /Library/Application Support/ClaudeCode/CLAUDE.md; Linux/WSL: /etc/claude-code/CLAUDE.md; Windows: C:\Program Files\ClaudeCode\CLAUDE.md. |
| Rules Loading from Additional Directories via Environment Variable | Not portable Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | Setting CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 enables loading CLAUDE.md, .claude/CLAUDE.md, .claude/rules/*.md, and CLAUDE.local.md from --add-dir directories. |
| User-Level Rules in ~/.claude/rules/ | Not portable Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | Personal rules in ~/.claude/rules/ apply to every project on the machine. User-level rules load before project rules, giving project rules higher priority. |
Sources
| Source |
|---|
| https://code.claude.com/docs/en/memory.md |