CCDV-F Claude Code Practice Question
You are working in a monorepo where the repository root contains a CLAUDE.md with shared coding standards, and the packages/api directory has its own CLAUDE.md with API-specific conventions. During a session started from the repository root, Claude Code begins editing files under packages/api. Which CLAUDE.md content is applied to those edits, and how should you expect the two files to interact?
⚠ Common exam trap
The trap here is assuming memory files are mutually exclusive, so whichever CLAUDE.md is closest wins outright and the root file stops mattering.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Both files contribute: the root CLAUDE.md supplies repo-wide standards while the packages/api CLAUDE.md adds directory-specific conventions that take precedence for those files.
Claude Code treats CLAUDE.md as layered project memory rather than a single global file. A repository-root CLAUDE.md carries standards that apply across the codebase, and a nested CLAUDE.md inside a package refines those rules for that subtree. For edits under packages/api, the nested conventions govern while the root standards still apply where they are not contradicted, which is why monorepos can share common guidance and still specialize per package.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Neither file is applied automatically; you must paste the relevant conventions into the prompt each time you want them honored.
Why it's wrong here
CLAUDE.md files are discovered and loaded as project memory automatically when a session starts in that working tree, so you do not need to paste their contents manually. Requiring manual pasting would defeat the purpose of persistent project instructions. While you can still add ad hoc guidance in a prompt, the files themselves are already contributing context without extra effort.
- ✓
Both files contribute: the root CLAUDE.md supplies repo-wide standards while the packages/api CLAUDE.md adds directory-specific conventions that take precedence for those files.
Why this is correct
Claude Code layers project memory, so the root CLAUDE.md establishes repository-wide conventions and the nested packages/api CLAUDE.md refines them for that subtree. The more specific file governs the API edits, while the root guidance still applies where it is not overridden. This layering is exactly what lets a monorepo keep shared standards without forcing every package to repeat them.
- ✗
Only the repository root CLAUDE.md is loaded, because Claude Code reads a single memory file at the project root and ignores nested ones.
Why it's wrong here
Claude Code does not restrict itself to a single root memory file. When the working tree contains nested CLAUDE.md files, the agent can pick up the one nearest the files being edited in addition to the root-level guidance. Claiming only the root file is loaded misstates how project memory discovery works and would mislead you into duplicating API conventions at the top level.
- ✗
The nested packages/api CLAUDE.md completely replaces the root CLAUDE.md for the whole session once any file in that directory is touched.
Why it's wrong here
Nested memory does not evict root memory for the entire session. The root CLAUDE.md continues to inform the agent's behavior on files outside packages/api and on shared concerns like commit conventions. Treating the nested file as a global replacement would cause the agent to drop repo-wide rules the moment it edits one API file, which is not how layered project memory behaves.
About these practice questions
Courseiva writes every CCDV-F question from scratch — 257 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Anthropic exam blueprint
This CCDV-F practice question is part of Courseiva's free Anthropic certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CCDV-F exam.