Anthropic CCA-F Practice Test 28
Question 270
A developer wants both the set of test files and a specific assertion within them. Which built-in operation fits the requirement?
- Use Glob for path discovery rather than reading every file
- Use Read on the selected files rather than a broad shell dump
- Use Grep for content search instead of enumerating filenames
- Use Glob to narrow filenames and Grep to locate the assertion
Explanation
Correct Answer
D:A developer wants both the set of test files and a specific assertion within them. The relevant control is to use Glob to narrow filenames and Grep to locate the assertion. Combining path and content tools avoids indiscriminate full-repository reads. Validate the actual command, file path or content representation before recording the operation as successful.
Incorrect Answers
A:Path matching quickly narrows candidate files before content inspection. The issue here is a developer wants both the set of test files and a specific assertion within them, so the relevant control is to use Glob to narrow filenames and Grep to locate the assertion. Combining path and content tools avoids indiscriminate full-repository reads.
B:Targeted file reads preserve context and avoid unnecessary data exposure. Here, a developer wants both the set of test files and a specific assertion within them. Use Glob to narrow filenames and Grep to locate the assertion. Combining path and content tools avoids indiscriminate full-repository reads.
C:Grep locates matching text, but by itself does not identify the requested family of test filenames as a separate preliminary filter. First use Glob to find paths matching the test pattern; then search the narrowed set for the assertion and inspect the relevant files.
Question 271
A distributed engineering team uses Claude Code for the same repository. Which TWO practices make shared instructions dependable? Choose TWO.
- Store the only shared instruction file in one developer personal home directory
- Include live tokens in the project instructions for convenience
- Keep the documented test commands current and version-controlled
- Commit concise team conventions in project-level CLAUDE.md
Explanation
Correct Answers
C:Keeping documented test commands accurate and under version control ensures everyone can reproduce the validation path used by the coding assistant. When scripts, package names or CI entry points change, update the documented commands in the same repository revision. Test the instructions on the actual project; stale commands can produce false completion claims even when every contributor follows them faithfully.
D:A project-level CLAUDE.md provides shared, reviewable guidance for repository conventions and expected commands. Commit concise instructions with the project so collaborating sessions see the same source of truth. Personal home-directory preferences should not be the only record of team requirements, and any package-specific exceptions should be scoped narrowly to the relevant codebase area.
Incorrect Answers
A:Personal guidance is not reliably accessible to other engineers. A developer's local home directory is not a reliable team source of truth. Project instructions need to be discoverable and versioned with the repository so teammates and CI agents use consistent rules.
B:Credentials should not be committed as instructional text. Repository instructions can be replicated through clones, forks and code review. API tokens must be managed through approved secret injection rather than embedded in CLAUDE.md where readers and tools may reproduce them.
Question 272
A developer wants their own terse response style across projects without imposing it on teammates. Which configuration fits?
- Remove and rotate the token, replacing it with a secure credential reference
- Check the working directory and path hierarchy used to load applicable instruction files
- Use a user-level CLAUDE.md instruction for the personal preference
- Align guidance with the repository's explicit project requirements and resolve conflicting files
Explanation
Correct Answer
C:User-level instructions apply to the individual's environment. Committing a stylistic preference to project policy would affect unrelated collaborators. User-level CLAUDE.md applies personal preferences without imposing them on the shared repository. Team conventions belong in version-controlled project instructions, not a hidden home-directory setting.
Incorrect Answers
A:Instructions are often read and versioned broadly. That addresses a different part of the system, not the requirement to separate personal guidance from team requirements.
B:Checking a working directory's instruction hierarchy determines which existing rules apply in that workspace. A personal response style intended across all projects belongs in user-level guidance, not a path-specific loading diagnosis; put it in the user's CLAUDE.md without imposing it on the repository.
D:Conflicting instructions lead to inconsistent edits. This capability does not directly separate personal guidance from team requirements. Resolving shared repository conflicts does not establish a personal response style across unrelated projects. A user-level preference is the appropriate scope for an individual convention.
Question 273
Only the mobile package uses a special build command, and the rest of the monorepo should remain unchanged. Where should this be described?
- A concise repository map with build, test and relevant ownership conventions
- Put shared instructions in the repository's project-level CLAUDE.md file
- Inspect file locations and instruction-loading scope after the directory move
- Place a more local CLAUDE.md in the mobile subtree for that scope
Explanation
Correct Answer
D:Directory-local guidance can capture package-specific rules without burdening every project area. The hierarchy should be validated from each working directory. A package-specific CLAUDE.md can keep mobile build instructions close to the files they govern. Check instruction-loading precedence and test both mobile and unrelated package paths before assuming the rule is scoped as intended.
Incorrect Answers
A:Actionable orientation lets Claude Code locate work and verify changes without extensive exploration. It would leave the stated need to scope instructions to the affected repository subtree unresolved.
B:Project instructions can be versioned with the repository and discovered by team sessions. Although useful elsewhere, it is not the direct mechanism to scope instructions to the affected repository subtree.
C:Changing directory topology can change what guidance is in scope. This alternative does not establish how to scope instructions to the affected repository subtree in the stated workflow.
Question 274
A global formatter recommendation conflicts with the project's formatter required by CI. Which TWO actions resolve the discrepancy safely? Choose TWO.
- Remove and rotate the token, replacing it with a secure credential reference
- Ignore the repository formatter and declare an undocumented personal exception without checking CI.
- Log the formatter conflict as an open instruction-review issue but leave both contradictory formatting rules active for this change
- Align guidance with the repository's explicit project requirements and resolve conflicting files
- Run the project formatter and its CI-equivalent checks before accepting the change.
Explanation
Correct Answers
D:Resolve the conflict by documenting the repository's required formatter and determining how it interacts with broader user or organizational policies. The project guidance should state the actual command and formatting contract, while higher-priority safety rules remain binding. Do not quietly apply a personal global preference that causes the checked-in code to fail the project's documented CI checks.
E:Verification proves that the selected project-specific formatter satisfies the actual quality gate. A code edit is not validated merely because the assistant says it is complete. Run the relevant local formatter, tests and static checks so reviewers can assess reproducible evidence of compatibility with repository conventions.
Incorrect Answers
A:Instructions are often read and versioned broadly. That addresses a different part of the system, not the requirement to resolve conflicting CLAUDE.md conventions explicitly.
B:An undocumented personal override cannot supersede the formatter enforced by CI for the shared repository. Align the guidance with the project configuration, resolve the conflict through approved policy and verify the actual formatter result before accepting the edit.
C:Recording a conflict for later review is not enough when the current change must satisfy the repository’s formatter enforced by CI. Leaving two contradictory instructions active creates repeatable confusion and may result in a failed pipeline. Resolve the governing requirement now, update the applicable instructions and verify the actual formatter output before accepting the change.
Question 275
A root CLAUDE.md has become a thirty-page catalogue of unrelated component rules, degrading task focus. What is a better organization?
- Keep concise global guidance and move specialized rules closer to relevant paths
- Reconcile the conflict and document an explicit supported exception if needed
- Remove and rotate the token, replacing it with a secure credential reference
- Put shared instructions in the repository's project-level CLAUDE.md file
Explanation
Correct Answer
A:Compact shared instructions improve relevance. Local rules and modular references prevent every request from carrying instructions that apply only to a few files. Move component-specific details to relevant scoped instructions while keeping shared repository conventions easy to find. A shorter root file reduces conflicting guidance and saves context for the actual change.
Incorrect Answers
B:Inconsistent local and global rules are fragile. The decisive requirement here is to avoid flooding sessions with unrelated configuration. A documented rule conflict may require an exception, but the stated defect is excessive root instruction volume. Moving specialized guidance to relevant paths solves unnecessary global context loading.
C:Credential rotation is mandatory if a secret has leaked, but the problem here is a bloated root instruction document full of unrelated component rules. Reducing unnecessary global text and moving conventions near their applicable paths addresses context pollution without implying a token exposure.
D:A project-level CLAUDE.md is the right place for concise shared conventions, but moving an entire thirty-page component catalogue there does not solve the overload. Keep only broad project instructions at the root and move specialized rules into scoped files.
Question 276
A project instruction file links to an obsolete deployment procedure, and automated changes keep using it. What maintenance action helps?
- Reconcile the conflict and document an explicit supported exception if needed
- Review and version-control edits to shared CLAUDE.md like other policy-affecting code changes
- Move genuinely shared requirements into version-controlled project guidance
- Update the linked canonical procedure and verify the instruction references resolve
Explanation
Correct Answer
D:Instructions can be correct in form but stale in substance. Keeping referenced materials current is essential for reliable automation. A correct instruction that points to an obsolete procedure remains operationally misleading. Update the authoritative procedure, revise its links and test that a new contributor can follow the current documented deployment sequence.
Incorrect Answers
A:A documented exception might resolve a genuine clash between active policy rules. This situation involves a link to an obsolete deployment procedure, not a competing current requirement. Update the canonical procedure and the reference rather than legitimizing outdated instructions as an exception.
B:Version-controlling changes is useful governance, but committing the same obsolete link again will not make the deployment instructions correct. Locate the replacement procedure, update the canonical reference, and verify that the referenced file and commands still exist before accepting the change.
C:A shared requirement already exists in the project's instructions; the defect is its obsolete deployment link. Moving the requirement into another shared location risks duplicating stale guidance. Repair the authoritative target and verify the instruction resolves to an active supported process.
Question 277
New engineers repeatedly ask where to find the test command and package boundaries. What belongs in shared agent guidance?
- Keep repository test commands only in one engineer's personal untracked instructions
- Inspect file locations and instruction-loading scope after the directory move
- A concise repository map with build, test and relevant ownership conventions
- Place a more local CLAUDE.md in the mobile subtree for that scope
Explanation
Correct Answer
C:Actionable orientation lets Claude Code locate work and verify changes without extensive exploration. Excessive unrelated prose is less useful. A repository map should identify the commands and component boundaries engineers repeatedly need to verify. Keep it concise, versioned and linked to actual scripts rather than relying on stale remembered commands.
Incorrect Answers
A:An individual's untracked CLAUDE.md is not available to new contributors and does not provide one auditable source for the repository's test commands. Put concise package boundaries and build/test instructions in committed project guidance so team members receive consistent, current directions.
B:Changing directory topology can change what guidance is in scope. This capability does not directly provide task-relevant repository orientation. Inspecting the new directory after a move helps repair scope, not teach new engineers the commands and ownership boundaries. A concise, maintained repository map addresses repeated onboarding questions.
D:Directory-local instructions can record package-specific rules, but they do not supply the concise project orientation these new contributors need. Provide a repository map identifying package boundaries, build/test commands and ownership, so the agent can locate relevant code and validate changes without rediscovering the same layout each time.
Question 278
A developer added a nested CLAUDE.md but cannot tell whether it applies when editing a file outside that subtree. What should be checked?
- Reconcile the conflict and document an explicit supported exception if needed
- Remove and rotate the token, replacing it with a secure credential reference
- Inspect file locations and instruction-loading scope after the directory move
- Check the working directory and path hierarchy used to load applicable instruction files
Explanation
Correct Answer
D:Instruction scope depends on where the file and work occur. A nested instruction should not be assumed to govern arbitrary sibling directories. The instruction hierarchy matters: a nested file may apply to its subtree but not unrelated paths. Inspect the effective context for representative files instead of assuming every nested rule has repository-wide effect.
Incorrect Answers
A:Reconciling conflicting rules helps when two loaded instructions disagree. Here the team does not know whether a nested CLAUDE.md is loaded for the edited file. Inspect actual working directory and instruction-loading hierarchy first, then address conflicts only if the file is in scope.
B:Instructions are often read and versioned broadly. The decisive requirement here is to verify how directory-scoped instructions apply. Credential rotation is required after an actual leak, not simply to establish whether a nested instruction applies to files outside its subtree. Test the path scope instead.
C:Changing directory topology can change what guidance is in scope. This alternative does not establish how to verify how directory-scoped instructions apply in the stated workflow.
Question 279
A teammate adds an instruction to skip all tests when making UI changes. What process should protect the repository?
- Reconcile the conflict and document an explicit supported exception if needed
- Verify expected path-scoped instructions still match actual source files after directory moves
- Update the linked canonical procedure and verify the instruction references resolve
- Review and version-control edits to shared CLAUDE.md like other policy-affecting code changes
Explanation
Correct Answer
D:Agent instructions influence future edits and validation. Changes should be evaluated for safety and compatibility instead of silently trusted. Instructions that disable required tests change a team-wide quality gate. Review, version and verify such changes like code or policy; no single developer should silently eliminate safeguards for others.
Incorrect Answers
A:An exception is appropriate only when approved policy explicitly permits skipping a safeguard. A teammate's new 'skip all tests' instruction is a policy-affecting change, not a self-authorizing exception. Review it through normal repository controls and reject unapproved weakening.
B:Testing path globs after directory moves protects rules whose activation paths have changed. This case instead introduces a policy-affecting instruction to skip tests. Changes to CLAUDE.md must be reviewed and version controlled so a unilateral instruction cannot silently weaken the repository’s required test process.
C:Updating a broken procedure reference would help if the test command had been retired. The teammate instead proposes a new rule waiving tests for UI changes. Evaluate and review that instruction as a change to the project's quality policy rather than treating it as link maintenance.
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.