Anthropic CCA-F Practice Test 29
Question 280
A developer commits an internal access token to CLAUDE.md to make tool setup easier. What should be done?
- Align guidance with the repository's explicit project requirements and resolve conflicting files
- Check the working directory and path hierarchy used to load applicable instruction files
- Inspect file locations and instruction-loading scope after the directory move
- Remove and rotate the token, replacing it with a secure credential reference
Explanation
Correct Answer
D:Instructions are often read and versioned broadly. Embedding credentials exposes secrets and is unnecessary for communicating setup expectations. Treat a credential committed into instructions as exposed, remove it and rotate it. Replace raw secrets with securely provisioned environment or vault references and review git history for leaked copies.
Incorrect Answers
A:Conflicting instructions lead to inconsistent edits. The decisive requirement here is to keep credentials out of persistent agent instructions. Reconciling instruction files is unrelated to a token already committed to source control. Remove and rotate the exposed secret, then eliminate hardcoded credentials.
B:Instruction scope depends on where the file and work occur. That addresses a different part of the system, not the requirement to keep credentials out of persistent agent instructions.
C:Verifying instruction-loading scope after a directory move helps path-scoped rules, but a credential committed into CLAUDE.md is already exposed in version history. Remove it, rotate or revoke the token, and use approved secret injection; changing directories cannot make the leaked value safe.
Question 281
A nested directory instruction says to disable linting while the repository rules require linting. How should this be handled?
- Move genuinely shared requirements into version-controlled project guidance
- Review and version-control edits to shared CLAUDE.md like other policy-affecting code changes
- Reconcile the conflict and document an explicit supported exception if needed
- Verify expected path-scoped instructions still match actual source files after directory moves
Explanation
Correct Answer
C:Inconsistent local and global rules are fragile. A deliberate tested exception is safer than expecting the model to infer which contradiction wins. Resolve conflicting lint rules through the established instruction precedence and an approved exception where justified. A nested convenience rule cannot silently nullify a required security control without review.
Incorrect Answers
A:Moving shared requirements to project-level guidance helps reuse, but both project and nested instructions already contain conflicting linting rules. The team must resolve which policy governs, remove the contradiction and record any approved exception rather than add another copy of the same requirement.
B:Code review of policy-affecting instructions is necessary, but version control alone does not determine how to handle a nested rule that contradicts mandatory linting. Reconcile the specific conflict and preserve the higher-priority requirement unless an authorized exception explicitly modifies it.
D:Glob patterns can become stale after directory migrations without syntax errors. It would leave the stated need to avoid silent conflicting instructions across scopes unresolved.
Question 282
A repository moves its API package into a new directory and a previously working path-scoped instruction silently stops triggering. Which check detects that regression?
- Verify expected path-scoped instructions still match actual source files after directory moves
- Review and version-control edits to shared CLAUDE.md like other policy-affecting code changes
- Reconcile the conflict and document an explicit supported exception if needed
- Preserve the old directory-matching patterns without checking whether any paths still match
Explanation
Correct Answer
A:A path-scoped instruction depends on its glob matching real files. Moving the API package can leave an otherwise valid YAML rule pointing at paths that no longer exist. Inspect the effective rule coverage for a representative moved file and update the pattern in version control. The relevant check is whether the instruction loads for the new package location, not just whether the YAML parses.
Incorrect Answers
B:Agent instructions influence future edits and validation. The required action is “Verify expected path-scoped instructions still match actual source files after directory moves”; the other measure addresses a separate concern. Moving the API package can leave an otherwise valid YAML rule pointing at paths that no longer exist.
C:An exception resolves a genuinely conflicting rule, but a repository relocation has simply left a path-scoped rule pointing at old files. Update and test its path matcher against the new package layout; no policy waiver is needed to restore applicability.
D:Unverified old glob patterns may match no code after a repository reorganization. Directory moves can leave previously correct path selectors unable to match any current files. Recheck rule globs against the new tree, test actual rule loading and migrate any requirements needed by moved packages.
Question 283
A developer adds a claudeMdExcludes pattern that matches an IT-managed CLAUDE.md, yet those company instructions still load. What explains this behavior?
- The claudeMdExcludes setting does not exclude an organization-managed CLAUDE.md
- The claudeMdExcludes setting cannot exclude any project instruction file
- Nested project CLAUDE.md instructions automatically override all managed instructions
- Instruction exclusions only take effect after a file has been loaded once
Explanation
Correct Answer
A:Claude Code distinguishes organization-managed instructions from ordinary user, project, and ancestor files. Its documented claudeMdExcludes setting cannot exclude a managed CLAUDE.md, so a matching pattern does not suppress the company file. Disabling all CLAUDE.md loading is a separate control; the exclusion setting itself has this explicit exception. Guidance is still not a technical permission boundary.
Incorrect Answers
B:The setting can skip matching non-managed instruction files, including ordinary inherited or project guidance. The failure here is specific to the centrally managed CLAUDE.md exemption, not a blanket inability to filter project instructions. Inspect where the file is deployed before changing a glob that already matches.
C:More-specific project text can contribute context, but it does not replace or disable an organization-managed CLAUDE.md at load time. The question asks why an exclusion pattern failed to suppress the managed file, not how the model reconciles potentially conflicting guidance.
D:Claude Code does not document a first-load prerequisite for claudeMdExcludes. Applicable non-managed files can be skipped by the configured path pattern, while managed CLAUDE.md remains outside that exclusion mechanism. Waiting for a previous session will not change the policy-file exception.
Question 284
A company wants the same Claude Code behavioral conventions for every employee across all repositories and workstations. Which instruction placement best fits?
- Commit a project CLAUDE.md to one repository and rely on it for all other repositories
- Put the conventions in a nested subdirectory CLAUDE.md for one package
- Deploy an IT-managed CLAUDE.md or managed claudeMd configuration to employee machines
- Ask each engineer to save the conventions in their personal ~/.claude/CLAUDE.md
Explanation
Correct Answer
C:Anthropic documents a managed CLAUDE.md, or the managed claudeMd setting, for IT-controlled instructions that apply to users across projects on deployed machines. The user-level file belongs to a single developer; repository files are shared only with each project. This answer provides the requested company-wide behavioral guidance. Actual tool prohibitions require enforceable managed settings such as permissions.deny rather than relying on instructional text.
Incorrect Answers
A:A version-controlled project CLAUDE.md is the right place for standards shared by contributors to that repository. It is not an organization-wide distribution mechanism for every employee across unrelated repositories. The scenario needs a centrally managed instruction scope, rather than assuming one repository file loads everywhere.
B:A subdirectory file is designed to scope package-specific guidance as Claude works in that part of a repository. It neither applies globally to other repositories nor distributes standards across employee workstations. Such files are useful for local exceptions, not universal company conventions.
D:A personal ~/.claude/CLAUDE.md applies to that developer across their own projects, not to everyone in the company. Asking every employee to copy it creates unmanaged drift and cannot provide a single centrally distributed version. Choose the managed organizational scope for the stated requirement.
Question 285
A repository has organization-wide build and review conventions that every contributor must use. Where should those shared instructions be maintained?
- Place scoped instructions in the relevant subdirectory instruction file
- Resolve the effective hierarchy and simplify conflicting overlapping instructions
- Move the repository-wide conventions into a private developer-only note that is never checked into the project.
- Put repository-wide requirements in the project CLAUDE.md
Explanation
Correct Answer
D:When a repository has its own build and review conventions, the system should put repository-wide requirements in the project CLAUDE.md. Project instructions travel with the codebase and make local behavior predictable. Do not assume a global preference overrides the effective project rule for the changed file.
Incorrect Answers
A:Directory-specific rules prevent a local implementation constraint from affecting unrelated modules. Here, a repository has its own build and review conventions. Put repository-wide requirements in the project CLAUDE.md. Project instructions travel with the codebase and make local behavior predictable.
B:Instruction precedence and clear scope reduce unpredictable behavior from contradictory conventions. Here, a repository has its own build and review conventions. Put repository-wide requirements in the project CLAUDE.md. Project instructions travel with the codebase and make local behavior predictable.
C:A private note is invisible to other developers and automatic coding sessions, so it cannot serve as the shared repository policy. Put reviewed conventions in a tracked project-level CLAUDE.md so contributors receive the same instructions, and reserve personal notes for individual preferences rather than team requirements.
Question 286
One package has specialized rules that should not apply elsewhere. How should the instruction scope be organized?
- Place scoped instructions in the relevant subdirectory instruction file
- Resolve the effective hierarchy and simplify conflicting overlapping instructions
- Move shared repository requirements into the tracked project guidance
- Record stable project commands and quality checks in a concise project instruction document
Explanation
Correct Answer
A:One package has specialized rules that should not apply elsewhere. The relevant control is to place scoped instructions in the relevant subdirectory instruction file. Directory-specific rules prevent a local implementation constraint from affecting unrelated modules. Track repository instructions and their applicable file paths as versioned, testable inputs to coding work.
Incorrect Answers
B:Instruction precedence and clear scope reduce unpredictable behavior from contradictory conventions. This is not a substitute for “Place scoped instructions in the relevant subdirectory instruction file”; that control is necessary in the stated circumstances. Directory-specific rules prevent a local implementation constraint from affecting unrelated modules.
C:Team-relevant policies should not depend on a single person's private configuration. The issue here is one package has specialized rules that should not apply elsewhere, so the relevant control is to place scoped instructions in the relevant subdirectory instruction file. Directory-specific rules prevent a local implementation constraint from affecting unrelated modules.
D:Durable local instructions reduce repetitive prompting and command confusion. The proposed option cannot provide the specific “Place scoped instructions in the relevant subdirectory instruction file” behavior that the case requires. Directory-specific rules prevent a local implementation constraint from affecting unrelated modules.
Question 287
A developer finds conflicting global and project guidance. Which CLAUDE.md arrangement best fits?
- Move shared repository requirements into the tracked project guidance
- Resolve the effective hierarchy and simplify conflicting overlapping instructions
- Record stable project commands and quality checks in a concise project instruction document
- Remove the secret and reference approved secure configuration
Explanation
Correct Answer
B:The relevant control is to resolve the effective hierarchy and simplify conflicting overlapping instructions. Instruction precedence and clear scope reduce unpredictable behavior from contradictory conventions. This matters when a developer finds conflicting global and project guidance. Do not assume a global preference overrides the effective project rule for the changed file.
Incorrect Answers
A:this choice instead describes move shared repository requirements into the tracked project guidance. The issue here is a developer finds conflicting global and project guidance, so the relevant control is to resolve the effective hierarchy and simplify conflicting overlapping instructions. Instruction precedence and clear scope reduce unpredictable behavior from contradictory conventions.
C:Durable local instructions reduce repetitive prompting and command confusion. This is not a substitute for “Resolve the effective hierarchy and simplify conflicting overlapping instructions”; that control is necessary in the stated circumstances. Instruction precedence and clear scope reduce unpredictable behavior from contradictory conventions.
D:Instruction files are not secret stores and may be checked into source control. Here, a developer finds conflicting global and project guidance. Resolve the effective hierarchy and simplify conflicting overlapping instructions. Instruction precedence and clear scope reduce unpredictable behavior from contradictory conventions.
Question 288
A repository instruction file still contains steps for a deployment system retired six months ago. New contributors are following the outdated commands. What is the best maintenance response?
- Delete the repository instructions entirely and rely on undocumented institutional memory
- Leave the old instructions in place but ask the model to ignore them when inconvenient
- Replace the obsolete steps with tested current commands, document the effective workflow and review them when deployment changes
- Move all deployment secrets into the instruction file so the correct deployment can run automatically
Explanation
Correct Answer
C:A repository instruction file is a durable team contract only when its commands match real tools and policies. Verify the replacement deployment procedure on the current project, document prerequisites and validation commands, then retire the obsolete instructions. Assign an owner or review trigger so configuration changes do not leave stale steps in the next contributor’s working context.
Incorrect Answers
A:Removing all repository guidance eliminates shared build and review conventions and leaves contributors guessing how to validate changes. The problem is outdated procedural content, which should be corrected with verified instructions rather than replaced by undocumented assumptions.
B:A request to ignore obsolete instructions does not repair the source document; future contributors and automated sessions can still use the incorrect commands. Update the tracked instructions to the actual supported deployment procedure, and remove retired steps so the guidance is consistent.
D:Storing deployment secrets in project instructions makes sensitive material accessible to source control and readers who do not need it. Use approved secret management and environment injection; the instruction file should describe safe commands and prerequisites without embedding credentials.
Question 289
An agent repeatedly forgets documented command names for the repository. How should the instruction scope be organized?
- Remove the secret and reference approved secure configuration
- Place broad reusable guidance at the appropriate user-level instruction scope
- Put repository-wide requirements in the project CLAUDE.md
- Record stable project commands and quality checks in a concise project instruction document
Explanation
Correct Answer
D:When an agent repeatedly forgets documented command names for the repository, the system should record stable project commands and quality checks in a concise project instruction document. Durable local instructions reduce repetitive prompting and command confusion. Do not assume a global preference overrides the effective project rule for the changed file.
Incorrect Answers
A:Instruction files are not secret stores and may be checked into source control. Here, an agent repeatedly forgets documented command names for the repository. Record stable project commands and quality checks in a concise project instruction document. Durable local instructions reduce repetitive prompting and command confusion.
B:Global guidance applies across workspaces but should avoid project-specific secrets or irrelevant constraints. The proposed option cannot provide the specific “Record stable project commands and quality checks in a concise project instruction document” behavior that the case requires. Durable local instructions reduce repetitive prompting and command confusion.
C:Project instructions travel with the codebase and make local behavior predictable. Here, an agent repeatedly forgets documented command names for the repository. Record stable project commands and quality checks in a concise project instruction document. Durable local instructions reduce repetitive prompting and command confusion.
Question 290
A team wants CLAUDE.md to remain readable but still load its shared policy runbook from docs/team-rules.md whenever the project instructions load. Which configuration uses the supported import mechanism?
- Put the policy runbook only in a developer’s private notes and assume every teammate receives it automatically
- Reference @docs/team-rules.md from CLAUDE.md; the relative path is resolved from the importing file
- Copy the same runbook repeatedly into multiple CLAUDE.md sections so every rule is duplicated
- Place a hyperlink to a remote website and assume the linked text is always injected as trusted instructions
Explanation
Correct Answer
B:Claude Code supports @path imports inside CLAUDE.md. A relative @docs/team-rules.md reference loads that file and resolves relative to the CLAUDE.md containing the import, not the current shell directory. Imports improve organization but still consume context because the imported text is loaded; use path-scoped rules instead if the goal is conditional loading rather than consistent inclusion.
Incorrect Answers
A:Private developer notes are not a reliable team-wide source for repository policy. They may not be checked in, and other sessions will not automatically inherit them. Shared rules should be distributed through a supported instruction-file mechanism that project participants can inspect.
C:Duplicating the entire runbook inflates context and makes revisions inconsistent: one copy may be fixed while another retains obsolete instructions. A single imported source is easier to maintain and audit. The project should identify the correct relative path instead of pasting duplicate policy bodies throughout its memory file.
D:A conventional Markdown link is navigation, not the @path import syntax. A link can be useful for human reading, but it does not guarantee that Claude Code loads the linked file’s instructions into the project context. Use an explicit @path reference to the local authoritative runbook.