100% Latest & Updated Anthropic CCA-F Practice Test Questions, Exam Dumps & Verified Answers!
30 Days Free Updates, Instant Download!
Question 270
A repository changes from lib/ to packages/core/ but path rules are never updated. Which design adjustment is most suitable under the stated constraints?
- Update the path glob and verify representative new files activate the rule.
- Exclude generated artifacts from rules intended for maintained source files.
- Keep only a glob anchored to the removed lib/ folder and assume it still matches packages/core/ files.
- Put the test convention into a path-scoped .claude/rules entry with matching globs.
- Include both extensions in the applicable path patterns and verify coverage.
Explanation
Correct Answer
A:After the code moves from lib/ to packages/core/, the existing path matcher no longer selects affected files. Update the glob to the new directory and test representative files to confirm the intended rule loads. Otherwise Claude Code may silently omit relevant local instructions.
Incorrect Answers
B:Excluding generated artifacts is a valid way to avoid applying source conventions to build output, but no generated-code confusion is described. The problem is an obsolete path root. Correct the path selector rather than changing generated-file handling.
C:An unchanged matcher anchored to lib/ cannot apply to packages/core/ even if the new directory is nested elsewhere. Leaving the path unchanged means the rule silently misses moved files. The rule needs an updated location pattern and a real activation test.
D:Placing a convention in a scoped rule is appropriate, but the question says a scoped rule already exists and its paths are stale. Recreating another rule with the old glob would not load for the new source. Update the existing matcher.
E:File extension matching controls language-specific applicability and may matter after a migration, but the failure is the directory root being renamed. An extension-only change cannot make a lib/-anchored pattern reach packages/core/. Check the actual relocated paths.
Question 271
A team uses an overbroad **/*.md rule intended only for technical API docs. What targeted change avoids repeating this failure?
- Include the actual target extensions and directory paths in its glob.
- Narrow the glob to the actual API documentation directories.
- Use an appropriate recursive glob and test representative nested files.
- Define explicit paths covering both locations rather than duplicate contradictory instructions.
Explanation
Correct Answer
B:Restrict the paths to the actual API documentation subtree and confirm that unrelated README, changelog and user-guide files are excluded. The rule then governs only the intended content.
Incorrect Answers
A:Adding more extensions or target directories could broaden the scope further; the defect is that **/*.md already matches far more than the intended API docs.
C:Recursive patterns are useful when nested API docs must match, but keeping **/*.md would still apply the rule to unrelated Markdown anywhere in the repo.
D:Explicitly covering two locations is correct when requirements span both. The stem names one intended API documentation scope, not a pair of independent test folders.
Question 272
A scoped code rule references a package that does not exist on some branches. Which corrective action most directly addresses the observed failure?
- Update the path glob and verify representative new files activate the rule.
- Scope the TypeScript rule to its relevant file path patterns.
- Normalize rule globs to the path syntax used by the runtime and test matches.
- Validate rule metadata and effective matching rather than assuming filesystem presence is enough.
- State conditional applicability and verify branch or path presence before enforcing it.
- Keep general architectural guidance in a global instruction and file-specific details in conditional rules.
Explanation
Correct Answer
E:State that the package-specific command applies only when the dependency exists in the current checkout or lockfile. Check the branch state before following the instruction and use an approved alternate path if it is absent. This prevents Claude Code from treating stale conventions as executable requirements.
Incorrect Answers
A:Updating a path glob addresses files that moved between directories, but the referenced package is actually absent from some branches. A matching rule could still instruct the agent to invoke a nonexistent tool. The rule must check package availability or clearly state its conditional applicability.
B:Path-scoping a TypeScript convention is appropriate for language-specific guidance, yet it does not establish the presence of an optional package across branches. A rule can be correctly scoped and still mention a tool that was removed. Conditional package checks are needed.
C:Correct glob syntax ensures a rule loads for matching paths, but it cannot make a missing dependency available. If the instruction names a package absent from this checkout, path-matching accuracy alone still gives the agent an impossible command. Verify dependency presence before enforcing it.
D:Validating metadata and activation can confirm that a rule is syntactically accepted and encountered on a file. The rule’s command may still refer to a noninstalled package. Include a branch-aware availability condition and a supported alternative for checkouts that lack it.
F:Global architectural guidance belongs at broader scope while code-area details can live in conditional rules. That is sound organization but does not specify whether this package is installed on each branch. The observed failure requires validating the applicable branch and tool availability.
Question 273
A team needs the same frontend testing checklist for .tsx and .jsx files. Which implementation choice best closes the specific gap described?
- Include both extensions in the applicable path patterns and verify coverage.
- Update the rule pattern to match .tsx files but omit the .jsx files that use the same testing checklist.
- Restrict the checklist to TypeScript-only .tsx paths, excluding the JavaScript .jsx components in the same frontend.
- Change the glob to the frontend directory root only and test a top-level file, without checking nested .tsx and .jsx files.
Explanation
Correct Answer
A:Conditional guidance should match the actual maintained file inventory, not a single extension. The case involves a team needs the same frontend testing checklist for .tsx and .jsx files. Conditional guidance should match the actual maintained file inventory, not a single extension. The implementation therefore needs to include both extensions in the applicable path patterns and verify coverage.
Incorrect Answers
B:Expanding a glob for one extension can repair only part of this requirement. The team expressly needs one checklist for both TSX and JSX components. A rule covering .tsx but not .jsx leaves one set of files unprotected; include both and run representative path-match tests.
C:Path scoping is useful, but the proposed pattern omits JavaScript JSX components that require the identical checklist. Nothing in the scenario authorizes a TypeScript-only rule. Both extensions must be included in the tested path patterns to get the intended common coverage.
D:A successful test on one top-level file would not show that nested React components match the rule. The stated checklist covers files by extension throughout the frontend. Include .tsx and .jsx in the appropriate recursive patterns and test representative nested files, not only the directory root.
Question 274
A repository generates client SDK bindings from an API contract under schema/. Claude Code keeps proposing hand edits in generated/clients/ because the active rule describes where failures appear, not which source file owns the fix. How should path-scoped instructions guide the repair?
- Permit edits to generated client output and omit regeneration, since the failing line is visible there.
- Put one mandatory rewrite rule over every Markdown and source file so no code path is missed.
- Disable validation of the generated client and retain the old API contract.
- Scope the repair instructions to the maintained schema source, require regeneration, and validate the generated client without hand editing it.
Explanation
Correct Answer
D:The maintained API contract is the correct edit boundary. Put source-change guidance on schema/ paths, require the generator to rebuild the client, and use tests to verify the new bindings. This fixes the architectural source of the error while keeping generated files reproducible and preventing fragile manual patches.
Incorrect Answers
A:A direct generated-file edit may make the local build appear green, but the code generator will overwrite it on the next run. The real owner of these API bindings is the maintained contract under schema/. The correct workflow changes that source and proves generated output reflects it.
B:A broad unscoped rule adds irrelevant instructions to unrelated code and documentation without distinguishing maintained inputs from generated output. That makes it easier to modify the wrong artifact. A path-scoped rule should identify the schema source and the required regeneration and validation steps.
C:Suppressing tests removes evidence of the compatibility defect and leaves a stale contract feeding each future generation. The issue is not that generated output should be ignored entirely; it should be validated against a deliberate change to its source-of-truth schema.
Question 275
A rule file has a valid name but invalid frontmatter and never loads for matching files. What should the team change first to resolve this exact failure mode?
- Put the test convention into a path-scoped .claude/rules entry with matching globs.
- Validate rule metadata and effective matching rather than assuming filesystem presence is enough.
- Keep general architectural guidance in a global instruction and file-specific details in conditional rules.
- Run a targeted configuration test using a matching file path and verify expected behavior.
- State conditional applicability and verify branch or path presence before enforcing it.
Explanation
Correct Answer
B:Check the rule’s frontmatter against supported metadata format and confirm activation for a representative file. A valid filename is not proof that the parser accepted the rule. Correct the malformed metadata, then verify the actual effective instructions rather than assuming the file loads.
Incorrect Answers
A:Placing the convention in a path-scoped file is not enough when the file’s frontmatter is invalid. The loader may ignore malformed metadata before evaluating a path glob. Fix schema or syntax validity and confirm the instruction is actually active on matching files.
C:Global-versus-conditional scope is important for different repository policies, but moving a malformed rule does not necessarily repair its frontmatter. The concrete defect is a loading failure despite an apparently valid filename. Validate and correct the rule metadata.
D:Opening a representative file can reveal that the rule is not active and is a useful regression test. By itself it does not identify or correct invalid frontmatter. Resolve the parse error, then rerun the scoped activation test.
E:Branch or path presence conditions help when optional packages are absent, which is unrelated to malformed rule metadata. A valid conditional intention remains inactive if its rule file cannot be parsed. Repair the frontmatter and confirm matching behavior first.
Question 276
A security team wants proof a restricted rule really applies to sensitive YAML deployments. Which safeguard or workflow change provides the missing guarantee?
- Keep general architectural guidance in a global instruction and file-specific details in conditional rules.
- Run a targeted configuration test using a matching file path and verify expected behavior.
- Scope the TypeScript rule to its relevant file path patterns.
- Validate rule metadata and effective matching rather than assuming filesystem presence is enough.
Explanation
Correct Answer
B:Create a representative sensitive YAML deployment path, inspect the effective instruction or safe behavior in the intended Claude Code context, and confirm restricted files receive the rule. Include an unrelated path as a negative check. This tests the deployed matcher rather than merely reviewing filenames.
Incorrect Answers
A:Global guidelines may describe the security intent, but they cannot prove that a sensitive YAML path activates a restricted rule. The team wants empirical evidence of conditional rule matching. Test the target deployment path under the actual runtime configuration.
C:TypeScript formatting scope is a different language boundary and does not show whether sensitive YAML deployment rules activate. Even perfect TypeScript matching provides no evidence of protected deployment path coverage. Test the actual YAML pattern.
D:Valid metadata is a prerequisite for a scoped rule, but a parsable file with a wrong glob may never apply to the protected deployments. Verify the effective policy on matching YAML paths and include negative tests to catch unintentional overbreadth.
Question 277
A request proposes splitting a monolith into six microservices across dozens of files without a migration contract. Which response is best supported by these operational facts?
- Enter plan mode to map service boundaries, data contracts, dependencies, rollout steps, and acceptance tests before editing.
- Start extracting the easiest service immediately and document integration contracts after its first deployment.
- Disable all write tools but skip discovery of existing contracts and cross-service dependencies.
- Write unit tests for a single proposed service without examining the monolith or defining a migration boundary.
Explanation
Correct Answer
A:Moving a monolith into six independently deployed services affects shared transactions, interfaces, data ownership, and rollback. Plan mode supports a read-first assessment rather than immediate source mutation; the plan should identify dependency order, migration contracts and executable acceptance criteria before any implementation is authorized.
Incorrect Answers
B:An early extraction can generate quick feedback when interfaces are already stable. Here no migration contract exists; deploying first risks breaking shared data assumptions, interservice transactions and callers before compatibility and rollback obligations have been defined.
C:Restricting writes protects the repository during investigation, but a prohibition alone does not reveal runtime coupling or specify what a successful migration must preserve. The team still needs a discovery-driven plan that addresses contracts, dependencies and deployment sequencing.
D:Unit tests are valuable once the intended interface and service boundaries are known. Testing only one guessed decomposition cannot establish cross-service contracts or preserve monolith behavior for the other five services, so it cannot replace system-level planning.
Question 278
A single test assertion has an obvious typo and a stable failing test. Which design adjustment is most suitable under the stated constraints?
- Begin a full architecture-planning session covering all packages and deployment boundaries before inspecting the one test.
- Map the entire repository dependency graph even though the faulty assertion and desired correction are already known.
- Merge the textual edit immediately without executing the failing test or checking whether the assertion now passes.
- Apply the narrow assertion correction directly, then rerun the original failing test to verify the fix.
Explanation
Correct Answer
D:The fault and desired scope are already understood. A targeted edit avoids unnecessary exploration, and rerunning the same stable failing test confirms that the actual reproduction is resolved without introducing an unrelated architecture workflow.
Incorrect Answers
A:Architecture planning prevents surprises in broad, high-impact changes. The typo is confined to one known assertion and has a stable reproduction, so a repository-wide design exercise adds delay without materially reducing the specified risk.
B:A full dependency graph is justified for uncertain shared-interface refactoring. This case provides the precise failing assertion and expected behavior; mapping unrelated packages does not help establish that the particular typo was corrected.
C:An edit can be well scoped yet still wrong, for example by changing the wrong assertion text or masking a different test failure. The existing reproducible test is the direct acceptance signal and should not be skipped before declaring success.
Question 279
A customer asks for a dry-run assessment and the agent starts rewriting files. What targeted change avoids repeating this failure?
- Use direct execution with an exact change and targeted validation.
- Use the supplied error context first and request a minimal relevant file only if needed.
- Use plan-only, read-oriented exploration and return a proposed change set.
- Include executable contract tests before considering the plan implemented.
Explanation
Correct Answer
C:Restrict the workflow to read-only inspection and produce a proposed change set without writing to disk. The customer can then decide whether to authorize implementation, avoiding the exact unauthorized file edits.
Incorrect Answers
A:Directly editing code is useful after the owner approves a concrete change, but the user requested assessment only. A correct edit would still violate the no-write boundary in this case.
B:Error-first navigation is efficient when a stack trace points at the defect. This customer supplied a dry-run request, not a failing diagnostic; more precise file selection does not prohibit unauthorized mutations.
D:Contract tests can validate a later implementation, but running or composing them does not itself honor a request for analysis only. The immediate defect is unauthorized mutation, not absence of tests.
Question 280
A library upgrade touches 50 modules and introduces an incompatible API. Which corrective action most directly addresses the observed failure?
- Bind execution to the approved plan and surface material deviations for review.
- Inventory callers and plan staged migration and regression testing before execution.
- Use an Explore-style subagent to summarize modules and dependencies first.
- Fix the first compilation error without identifying the other callers or their behavioral dependencies.
- Use direct execution with an exact change and targeted validation.
Explanation
Correct Answer
B:List every module and integration depending on the changed API, identify the interface adaptations and backward-compatibility constraints, and sequence edits so intermediate states can be tested. Run relevant unit, integration and regression checks before removing old adapters. Planning at this scale reduces partially migrated code paths and latent failures.
Incorrect Answers
A:Following a previously approved plan helps control drift, but the question does not establish that a valid cross-module migration plan exists. If a critical caller is missing, strict compliance with an incomplete plan can still break production. First inventory affected call sites and define staged compatibility tests for the new API.
C:An Explore-style read-only subagent can gather evidence about the repository, but its summary is an input to—not a replacement for—the migration and test plan. A large incompatible library upgrade needs decisions about call-site order and observable compatibility. Capture the findings in a staged change strategy with regression gates.
D:Patching the first compiler error may reveal a localized break, but fifty affected modules can contain runtime call sites, integration paths or unsupported semantics that compilation misses. Fixing one reported failure without mapping dependencies gives no guarantee of consistent migration. Inventory the affected callers and verify them together.
E:Immediate edit-and-test is efficient for a small, well-specified change, but the scenario explicitly spans fifty modules with incompatible contracts. Targeted tests may miss consumers outside the initial edit. Establish the migration scope and staged verification before executing broad code changes.
Claude Certified Architect - Foundations (CCA-F) Practice Tests