Skip to content
Claude Certified Architect – Professional (CCAR-P) Exam Prep

Lesson 31 of 31 · 7 min

x
31/31

CLAUDE.md Hierarchy

Video lesson: CCAR-P 31/31: CLAUDE.md Hierarchy

Per-file mechanics (locations, loading, imports, 200-line guidance, claudeMdExcludes) are in claude md hierarchy. This note is the organisational layer.

Instruction layers at scale

LayerWhereWho controls
Managed policymacOS /Library/Application Support/ClaudeCode/CLAUDE.md; Linux/WSL /etc/claude-code/CLAUDE.md; Windows C:\Program Files\ClaudeCode\CLAUDE.mdIT or DevOps; applies to all users; cannot be excluded by individuals
Project./CLAUDE.md or ./.claude/CLAUDE.md plus .claude/rules/Team, via version control
User~/.claude/CLAUDE.md, ~/.claude/rules/Individual
Local./CLAUDE.local.md (gitignored)Individual, per project

All discovered files concatenate (root down to the working directory); they do not override one another. Contradictions across files can make Claude pick one arbitrarily, so audit them (/doctor prompt-audit audits instruction files, verified).

Rollout practice (design guidance)

  1. Org baseline (managed policy file): security rules, data handling, banned actions, escalation contacts. Keep it short.
  2. Repo CLAUDE.md per project: architecture, build, test and lint commands, conventions. Generate a first draft with /init, then edit.
  3. Scoped rules (.claude/rules/ with paths) for file-type conventions; skills for procedures (3.3, 3.2).
  4. Ownership: named owners, review via pull requests, a change log.
  5. Measure adoption and effect with telemetry and the analytics dashboard (existence verified) (D3.4).
  6. Prune regularly: remove stale or conflicting rules; keep files under about 200 lines.

Guidance, not enforcement

CLAUDE.md is context. To enforce policy, use managed settings and hooks.

Managed settings: how policy merges

  • Lists combine across sources (for example permissions.allow, hooks, deniedMcpServers).
  • Locks apply the strictest value any source sets (for example allowManagedHooksOnly, permissions.disableBypassPermissionsMode).
  • Restriction allowlists take the list whole from the highest-ranked source (for example availableModels, allowedMcpServers, strictKnownMarketplaces).
  • Other keys take the value whole from the highest-ranked source.
  • Examples of enforceable controls: block bypass mode, make Claude Code ignore user, project and local permission rules, restrict hooks to managed ones (allowManagedHooksOnly), restrict MCP servers, restrict which plugin marketplaces are allowed, set telemetry for everyone.
  • Delivery: a managed-settings.json file on each machine (including via MDM), or server-managed settings from the admin console.

Operational enablement topics to expect (partly unverified)

Third-party pages list only the CLAUDE.md hierarchy under this 7% domain. Related, documented areas you should be ready for: permission modes and rules (D3.2), hooks as policy, skills and plugins distribution via marketplaces, telemetry and cost monitoring (D3.4), sandboxing and devcontainers (documentation exists for both), and CI/CD integration (../../../CCAR-F-Claude-Certified-Architect-Foundations/knowledge/03-claude-code-configuration-and-workflows/06-ci-cd-integration.md). Confirm the full domain against the official exam guide.

Exam traps

  • Putting enforcement-grade policy only in CLAUDE.md.
  • Personal preferences in the shared project file.
  • One giant org-wide file that every project inherits.
  • No owner or review for instruction changes.
  • Assuming users can exclude the managed policy file.

References

  1. How Claude remembers your project — checked Oct 16, 2026
  2. Managed settings — checked Oct 16, 2026

Check your understanding

  • Can a developer exclude the organisation's managed CLAUDE.md?Show answer

    Answer

    No; managed policy files cannot be excluded.
  • Two managed sources set allowManagedHooksOnly differently. Result?Show answer

    Answer

    The strictest value applies (it is a lock).
  • Which layer enforces a rule that must never be broken?Show answer

    Answer

    Managed settings and hooks, not CLAUDE.md.

Next step: take a CCAR-P practice exam

You have reached the end of the course. Take practice exam 1 without notes, check your score by domain, then go back to the lessons for your weakest domain before the next exam. There are 10 exams with 630 questions in all, and every answer is explained.

Previous

Progress is saved in this browser.

Finish Course