Skip to content

CCAR-F · Domain 3: Claude Code Configuration & Workflows · 20% of the exam

Task 3.1: Configure CLAUDE.md files with appropriate hierarchy, scoping, and modular organization

Where instructions live and who gets them: user, project, local and subdirectory CLAUDE.md files, @imports, topic files in .claude/rules/, and checking which files a session actually loaded.

Study it

  • CLAUDE.md hierarchy, @imports and .claude/rules/

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the Anthropic documentation page that proves it.

Question 1 · choose 1

A senior developer wrote the team's coding standards and test commands into ~/.claude/CLAUDE.md on their laptop months ago. A new team member clones the repository, and Claude Code ignores those standards in their sessions. Everyone should get the same instructions from the repository. What should the team do?

  1. AAsk the new team member to copy the senior developer's file into their own ~/.claude/CLAUDE.md
  2. BAsk IT to deploy the file as the managed policy CLAUDE.md on every developer machine
  3. CMove the standards into the project's CLAUDE.md (./CLAUDE.md or ./.claude/CLAUDE.md) and commit it
  4. DPut the standards in the README so that Claude reads them when it explores the repository
Show the answer and why
  • AAsk the new team member to copy the senior developer's file into their own ~/.claude/CLAUDE.md

    Incorrect

    Personal copies drift apart and every future teammate has to repeat the step; nothing comes from the repository.

  • BAsk IT to deploy the file as the managed policy CLAUDE.md on every developer machine

    Incorrect

    A managed policy file applies to every repository on the machine and needs IT to maintain it; project standards belong in the project.

  • CMove the standards into the project's CLAUDE.md (./CLAUDE.md or ./.claude/CLAUDE.md) and commit it

    Correct

    Project instructions are shared through version control; user-level CLAUDE.md is personal and never reaches teammates.

  • DPut the standards in the README so that Claude reads them when it explores the repository

    Incorrect

    Claude Code does not load the README as standing instructions; team instructions belong in the project CLAUDE.md.

~/.claude/CLAUDE.md applies only to that user. Team-wide project instructions go in the project CLAUDE.md, committed, so every clone loads them.

Question 2 · choose 1

Your monorepo has an api package, a web package and a data package, and the shared docs/standards folder holds api-style.md, react-style.md and sql-style.md. Each package's maintainers know which standards apply to their code. You want each package's CLAUDE.md to pull in only the files that apply, without copying their text. How should you set this up?

  1. APut all three standards files' content into the root CLAUDE.md under a heading for each package
  2. BCopy the relevant standards text into each package's CLAUDE.md and update the copies when a standard changes
  3. CTurn each standards file into a skill so that Claude loads it when it decides the standard is relevant
  4. DIn each package's CLAUDE.md, @import only the shared standards files that apply to that package
Show the answer and why
  • APut all three standards files' content into the root CLAUDE.md under a heading for each package

    Incorrect

    Every session then carries every standard, and Claude has to infer which section applies to the code it is changing.

  • BCopy the relevant standards text into each package's CLAUDE.md and update the copies when a standard changes

    Incorrect

    Copies drift as the standards evolve, which imports avoid by reading the shared file.

  • CTurn each standards file into a skill so that Claude loads it when it decides the standard is relevant

    Incorrect

    The maintainers want these standards in force for every change in the package, which is what the package's CLAUDE.md provides.

  • DIn each package's CLAUDE.md, @import only the shared standards files that apply to that package

    Correct

    @path imports pull referenced files into context with the CLAUDE.md that names them, so each package includes what its maintainers choose.

Keep CLAUDE.md modular with @path imports: each package's file imports the specific shared standards that apply, so the text lives in one place and each package gets only what it needs.

Question 3 · choose 1

Your team is starting to use Claude Code on an existing repository that has no CLAUDE.md. You want a reasonable first version with build commands, test instructions and conventions, which the team will refine and commit. What is the quickest start?

  1. AAsk Claude to save the build and test commands to auto memory as it discovers them
  2. BWrite topic files in .claude/rules/ by hand before creating any CLAUDE.md
  3. CRun /memory and select the project CLAUDE.md entry, which creates the file
  4. DRun /init so that Claude analyzes the codebase and drafts one
Show the answer and why
  • AAsk Claude to save the build and test commands to auto memory as it discovers them

    Incorrect

    Auto memory is Claude's own notes for you on your machine, not a shared file the team can refine and commit.

  • BWrite topic files in .claude/rules/ by hand before creating any CLAUDE.md

    Incorrect

    Writing everything by hand is the slow path, and it starts from nothing rather than from what the codebase shows.

  • CRun /memory and select the project CLAUDE.md entry, which creates the file

    Incorrect

    Selecting a missing file creates it empty; it does not draft any content from the codebase.

  • DRun /init so that Claude analyzes the codebase and drafts one

    Correct

    /init generates a starter CLAUDE.md with the build commands, test instructions and conventions Claude discovers.

Run /init to generate a starting CLAUDE.md from the codebase, then refine it with what Claude would not discover on its own, and commit it so the team shares it.

Question 4 · choose 1

You start Claude Code in services/payments/. There is a CLAUDE.md at the repository root and another in services/payments/. A colleague believes the inner file replaces the root one. What actually happens?

  1. AOnly the root file loads, because it is the project file
  2. BOnly the inner file loads, because it is closer to the working directory
  3. CBoth load and are concatenated, root first and the inner file last
  4. DNeither loads until you import one from the other
Show the answer and why
  • AOnly the root file loads, because it is the project file

    Incorrect

    Files in the directory hierarchy above and at the working directory load at launch.

  • BOnly the inner file loads, because it is closer to the working directory

    Incorrect

    Files do not override each other; both are in context.

  • CBoth load and are concatenated, root first and the inner file last

    Correct

    Discovered CLAUDE.md files are combined, ordered from the root down to the working directory.

  • DNeither loads until you import one from the other

    Incorrect

    No import is needed for files in the directory hierarchy.

Claude Code loads CLAUDE.md files from the working directory and its ancestors and concatenates them, so instructions closer to where you launched are read last. Conflicting files leave Claude to pick one.

Question 5 · choose 1

packages/api/CLAUDE.md contains the line @docs/style.md, but the style guide actually lives at the repository root in docs/style.md, and the import does not pick it up. Why?

  1. AImports only work in the root CLAUDE.md
  2. BImports must use absolute paths in every case
  3. CImported files must be listed in settings.json first
  4. DRelative imports start from the importing file
Show the answer and why
  • AImports only work in the root CLAUDE.md

    Incorrect

    Any CLAUDE.md can import files.

  • BImports must use absolute paths in every case

    Incorrect

    Relative and absolute paths are both allowed.

  • CImported files must be listed in settings.json first

    Incorrect

    No settings entry is required for imports.

  • DRelative imports start from the importing file

    Correct

    The path is resolved against packages/api/, not the repository root.

@path imports accept relative and absolute paths; relative paths resolve from the file that contains the import, and imports can nest up to four hops.

Question 6 · choose 1

Your security team wants a set of instructions to apply to every Claude Code session on every company laptop, in every repository, and users must not be able to exclude them. What fits?

  1. AEach user's ~/.claude/CLAUDE.md, set up during onboarding
  2. BA pinned message in the security team's chat channel
  3. CA managed policy CLAUDE.md that IT deploys everywhere
  4. DA project CLAUDE.md committed to every repository
Show the answer and why
  • AEach user's ~/.claude/CLAUDE.md, set up during onboarding

    Incorrect

    Users can edit or remove their own files.

  • BA pinned message in the security team's chat channel

    Incorrect

    Chat messages never reach Claude Code sessions.

  • CA managed policy CLAUDE.md that IT deploys everywhere

    Correct

    Managed policy files apply to all users on the machine and cannot be excluded.

  • DA project CLAUDE.md committed to every repository

    Incorrect

    Repositories without the file, or new ones, would be missed.

Organization-wide instructions belong in the managed policy CLAUDE.md (or managed settings), which loads for everyone and cannot be excluded.

Question 7 · choose 1

You run claude --add-dir ../shared-lib so that Claude can work on a library next to your service. The library has its own CLAUDE.md with its coding conventions, but Claude ignores them when it edits the library's files. You want those conventions loaded too. What should you do?

  1. ASet CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 when launching, so that memory files in added directories load
  2. BList ../shared-lib under permissions.additionalDirectories in settings.json
  3. CRename the library's file to CLAUDE.local.md so that it counts as personal instructions
  4. DRun /memory and add the library's CLAUDE.md to the list
Show the answer and why
  • ASet CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 when launching, so that memory files in added directories load

    Correct

    By default --add-dir grants access but loads no CLAUDE.md from the added directory; the variable turns that loading on.

  • BList ../shared-lib under permissions.additionalDirectories in settings.json

    Incorrect

    That setting grants file access only; it loads no CLAUDE.md, rules or skills from the directory.

  • CRename the library's file to CLAUDE.local.md so that it counts as personal instructions

    Incorrect

    CLAUDE.local.md loads from the session's own directory hierarchy; renaming the file in an added directory changes nothing.

  • DRun /memory and add the library's CLAUDE.md to the list

    Incorrect

    /memory lists and opens the memory files of your own scopes; it has no way to add another directory's file.

--add-dir gives Claude access to directories outside the working directory, but their CLAUDE.md files do not load unless CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD is set. With it, CLAUDE.md, .claude/CLAUDE.md, .claude/rules/*.md and CLAUDE.local.md load from the added directory.

Practise domain 3 →Practise all domains →