Question 300
An organization wants scoped Claude Code instructions without huge root prompts. Documentation files use a distinct formatting standard. What should the architect specify in the design?
- Apply documentation rules only to matching Markdown paths
- Define a rule for generated paths that points to the generator command
- Create a dedicated rule for migration directories and file patterns
- Target only the legacy module rather than the repository root
- Enforce secret scanning in CI for the affected files
Explanation
Correct Answer
A:File targeting communicates when a doc-specific tool is relevant and prevents it displacing source-code tests. Here it serves the explicit need to scope document lint conventions without adding a separate unverified inference.
Incorrect Answers
B:When a generated file is matched, Claude should change the generator input rather than apply a patch that will be overwritten; the alternative would make sense if generated source files should not be edited by hand. It does not directly fix the observed condition: documentation files use a distinct formatting standard.
C:Targeted rules add critical checks when touching migrations without burdening unrelated UI tasks; the relevant precondition would be database migration files need extra review beyond normal code. The question instead describes documentation files use a distinct formatting standard.
D:This measure fits a different trigger: a rule is needed only for a deprecated module kept for compatibility. In that setting, A narrow rule preserves compatibility requirements without imposing obsolete practices on active packages; it does not resolve the present need to scope document lint conventions.
E:When developers accidentally commit secrets in test-fixture paths, this would be useful because path-specific instructions may remind Claude, but only a scanner or policy gate reliably blocks forbidden content before merge; this item instead calls for a way to scope document lint conventions.
Question 301
An organization uses Claude to summarize an archive of technical incidents. One summary appears to describe a different source document. Which change most directly addresses this condition?
- Verify stored document digest and cited spans before accepting the result
- Use a synchronous, reviewable workflow for that specific incident
- Use batch processing and an output manifest for the incident collection
- Include stable incident IDs in each request and result mapping
Explanation
Correct Answer
A:Matching output to the right input is a semantic and provenance requirement, not merely a batch-completion check. The relevant requirement is to check per-item source alignment, and this measure operates at that decision point.
Incorrect Answers
B:Interactive escalation has different latency and control requirements from an archival bulk job; the alternative would make sense if a critical incident needs an urgent follow-up question from a human. It does not directly fix the observed condition: one summary appears to describe a different source document.
C:For the separate situation where the workload has many independent records and no user waiting for each response, large independent jobs can be processed without tying up a conversational request; the manifest preserves record identity; the current task is to check per-item source alignment.
D:Without correlation keys, a bulk response can be structurally complete but impossible to assign safely to the correct incident; that assumes a run returns finished summaries but no mapping to original incident IDs. The item tests the different ability to check per-item source alignment.
Question 302
A monorepo uses different coding guidelines for backend and frontend files. A rule never loads because its path pattern misses nested packages. What is the most defensible next step?
- Narrow the patterns or align their formatter requirements
- Scope the testing guidance to Python service paths
- Correct the rule's glob or path targeting to match actual edited files
- Keep the common style principle in root project instructions
Explanation
Correct Answer
C:Path-scoped rules depend on matching paths; the model cannot follow instructions that the configuration never selects.
Incorrect Answers
A:Overlapping rule sets should lead to one predictable tool choice; unresolved conflicts create patch churn; the alternative would make sense if two path rules overlap and recommend incompatible formatters. It does not directly fix the observed condition: a rule never loads because its path pattern misses nested packages.
B:This control matters when python services require an alternate unit-test command; a service-specific rule prevents Claude from running a frontend command on an unrelated backend change. The required decision is different: a rule never loads because its path pattern misses nested packages.
D:Shared behavior should have one clear home rather than several overlapping path rules that can contradict one another; that assumes a global style rule applies to every source file in the repository. The item tests the different ability to debug the path-matching pattern.
Question 303
An organization publishes MCP tools for searching internal technical documentation. A results object has optional confidence and pagination fields. Which approach satisfies the stated constraint?
- Specify its corpus, query shape, and result guarantees in the description
- Document optional fields, cursor behavior, and what confidence actually represents
- Document that search outputs are excerpts with source references and may need follow-up reads
- Describe deterministic lookup versus semantic search use cases explicitly
Explanation
Correct Answer
B:Typed, well-described results let the agent distinguish absent values from negative findings and paginate without assumptions.
Incorrect Answers
A:For the separate situation where a tool named query has no indication of which index it searches, model selection depends on clear capability metadata; an opaque name leaves the assistant guessing which source will answer the user's question; the current task is to make response fields interpretable.
C:This control matters when a semantic-search tool returns ranked snippets that may not be complete documents; an explicit limitation discourages Claude from treating a truncated hit as authoritative coverage of a whole document. The required decision is different: a results object has optional confidence and pagination fields.
D:A direct identifier lookup gives precise retrieval when a key is known; embedding search is better for conceptual matching, not exact ID verification; the alternative would make sense if two tools share a capability, but one is optimized for exact identifier lookups. It does not directly fix the observed condition: a results object has optional confidence and pagination fields.
Question 304
A multi-agent research product must collect, compare, and publish findings. A coordinator routinely duplicates its specialists' detailed searches. Which mechanism should be selected?
- Ask the coordinator to compare provenance and escalate unresolved conflicts
- Run source-search subtasks concurrently and join their evidence before synthesis
- Give the coordinator routing and synthesis responsibilities, not a second full search workload
- Sequence data collection, computation, and writing according to their dependencies
Explanation
Correct Answer
C:Overlapping roles waste tokens and introduce conflicting versions of evidence; ownership should be explicit in the orchestration contract.
Incorrect Answers
A:The coordinator should reconcile using source quality and dates, not silently select whichever worker sounds more confident; the alternative would make sense if two specialists disagree over a key statistic from different documents. It does not directly fix the observed condition: a coordinator routinely duplicates its specialists' detailed searches.
B:This control matters when three independent sources must be examined before a combined report is written; independent searches have no ordering dependency; parallel fan-out reduces latency while a later merge can still compare findings. The required decision is different: a coordinator routinely duplicates its specialists' detailed searches.
D:Publishing before numbers are validated creates unsupported claims; a dependency graph makes prerequisite completion explicit; that assumes a narrative must cite calculations derived from a completed dataset. The item tests the different ability to eliminate redundant work across agents.
Question 305
A CI pipeline runs Claude Code non-interactively for pull-request review. The team wants Claude's review to recommend fixes but not approve its own changes. What should be implemented at the appropriate boundary?
- Set job timeout, token or iteration budgets, and explicit failure behavior
- Run Claude Code in noninteractive print mode with a bounded task prompt
- Request a defined JSON output format and validate its schema in the pipeline
- Use an independent check or human approval before merging
- Run in a restricted sandbox with minimal tokens and no secret-bearing privileged steps
Explanation
Correct Answer
D:A model reviewing its own output is correlated with its mistakes; a distinct gate reduces unchecked self-approval. Here it serves the explicit need to separate producer and review authority without adding a separate unverified inference.
Incorrect Answers
A:CI should fail visibly when budgets are exhausted rather than hang or silently return partial success; the alternative would make sense if a CI task might continue indefinitely under repeated tool calls. It does not directly fix the observed condition: the team wants Claude's review to recommend fixes but not approve its own changes.
B:For the separate situation where the build runner has no interactive terminal for answering Claude prompts, a headless execution path avoids UI expectations and lets CI capture the completed response as an artifact; the current task is to separate producer and review authority.
C:This control matters when a downstream CI job must parse the review result reliably; structured output supports deterministic gating and avoids brittle parsing of free-form review prose. The required decision is different: the team wants Claude's review to recommend fixes but not approve its own changes.
E:Pull-request content is untrusted input; prompt instructions cannot substitute for runner isolation or secret scoping; that assumes a pull request from an untrusted fork contains instructions to exfiltrate secrets. The item tests the different ability to separate producer and review authority.
Question 306
An internal compliance system tracks where evidence for decisions originated. A research report mixes direct quotations and model paraphrases without labeling them. Which option best meets the operational need?
- Record retrieval time and a content digest or archived excerpt where permitted
- Mark quotations, extracted facts, and analyst inferences separately
- Compare source-of-truth ownership and freshness before selecting a status
- Attach the document version and effective date to the quoted passage
Explanation
Correct Answer
B:Separating evidence types prevents a model's synthesis from appearing to be a verbatim statement by an external authority.
Incorrect Answers
A:Web evidence is mutable; a stable reference explains what the system actually saw when reaching its original conclusion; the alternative would make sense if a cited webpage changes after the original analysis was completed. It does not directly fix the observed condition: a research report mixes direct quotations and model paraphrases without labeling them.
C:This control matters when two tools return different customer statuses from separate data stores; a newer timestamp is not always sufficient if one system is a derived cache; authority and synchronization matter. The required decision is different: a research report mixes direct quotations and model paraphrases without labeling them.
D:For the separate situation where a policy interpretation quotes a paragraph but does not identify the policy revision, policy text changes over time; revision identity prevents a once-valid rule from being applied to the wrong period; the current task is to distinguish source statements from generated interpretation.
Question 307
An organization wants scoped Claude Code instructions without huge root prompts. A rule is needed only for a deprecated module kept for compatibility. What is the most appropriate design choice?
- Define a rule for generated paths that points to the generator command
- Enforce secret scanning in CI for the affected files
- Create a dedicated rule for migration directories and file patterns
- Target only the legacy module rather than the repository root
Explanation
Correct Answer
D:A narrow rule preserves compatibility requirements without imposing obsolete practices on active packages. For the stated case, the check is whether the system can localize legacy-specific constraints; this approach supplies that control.
Incorrect Answers
A:This control matters when generated source files should not be edited by hand; when a generated file is matched, Claude should change the generator input rather than apply a patch that will be overwritten. The required decision is different: a rule is needed only for a deprecated module kept for compatibility.
B:Path-specific instructions may remind Claude, but only a scanner or policy gate reliably blocks forbidden content before merge; the alternative would make sense if developers accidentally commit secrets in test-fixture paths. It does not directly fix the observed condition: a rule is needed only for a deprecated module kept for compatibility.
C:For the separate situation where database migration files need extra review beyond normal code, targeted rules add critical checks when touching migrations without burdening unrelated UI tasks; the current task is to localize legacy-specific constraints.
Question 308
A document-processing agent invokes external services while extracting invoice fields. Tool execution takes several minutes, but the model has already emitted the request. Which response is most reliable?
- Gate the payment tool behind authorization and confirmation before execution
- Apply a retry cap and bounded backoff outside the model
- Track pending work in durable application state until the actual result arrives
- Validate tool-call inputs against the declared argument schema
Explanation
Correct Answer
C:A long-running call must not be represented as success before completion, especially where later steps depend on its output.
Incorrect Answers
A:Prompt wording alone is not a reliable transaction guard; the execution layer must verify that the action is approved; that assumes a payment API can create a real charge, but model responses may be replayed. The item tests the different ability to avoid pretending a long operation has finished.
B:This control matters when an extraction workflow repeats one expensive tool call after a transient error; an application-owned retry policy prevents infinite loops and makes downstream reliability predictable under outages. The required decision is different: tool execution takes several minutes, but the model has already emitted the request.
D:Schema checking at the host boundary prevents type errors and unsafe side effects from malformed model-generated arguments; the alternative would make sense if a tool schema requires a numeric invoice total but Claude supplies a string. It does not directly fix the observed condition: tool execution takes several minutes, but the model has already emitted the request.
Question 309
A support workflow uses model-generated structured actions. A service rejects a proposed mutation for insufficient approval. What should the team do to resolve this particular gap?
- Check postal-code validity with an authoritative service
- Validate the record identity against the authenticated session
- Route the request to the approval path without automatic replay
- Consult current quota state before committing the mutation
Explanation
Correct Answer
C:Authorization is not a text-generation defect; more model attempts cannot substitute for a missing approval. This matches the workflow goal to avoid treating policy denials as ordinary formatting errors rather than introducing an unrelated action.
Incorrect Answers
A:For the separate situation where a proposed address change contains a nonexistent postal code, a field can be a syntactically valid string while failing the external real-world requirement for a deliverable address; the current task is to avoid treating policy denials as ordinary formatting errors.
B:This control matters when a model response contains a correct enum but refers to the wrong customer ID; schema matching cannot establish that a valid-looking identifier belongs to the authorized customer. The required decision is different: a service rejects a proposed mutation for insufficient approval.
D:Current cumulative limits depend on external state and require an authoritative execution-time check, not just a schema; the alternative would make sense if an action payload validates but would exceed a daily transaction limit. It does not directly fix the observed condition: a service rejects a proposed mutation for insufficient approval.
Question 310
Claude Code is used to modernize a legacy service under production constraints. The team disagrees about the safest migration approach. Which control is most directly relevant?
- Generate alternative plans with trade-offs and identify missing evidence
- Inspect dependencies and outline migration, rollback, and validation steps in plan mode
- Limit writes to authorized paths and escalate the out-of-scope changes
- Search for the flag and inspect references using read-only tools
- Edit the identified key and run the acceptance test
Explanation
Correct Answer
A:A decision stage should expose risks and open questions rather than let the assistant silently pick an unreviewed migration strategy.
Incorrect Answers
B:For the separate situation where the requested change affects database schema and multiple integrations, high-impact changes benefit from a reviewable plan that exposes assumptions and ordering before writes occur; the current task is to compare proposals before committing to one.
C:Approval for a plan does not grant unrestricted filesystem rights; actual tool permissions must still match the authorized work; the alternative would make sense if the final plan is accepted, but some files lie outside the permitted workspace. It does not directly fix the observed condition: the team disagrees about the safest migration approach.
D:This control matters when the task is to locate files referencing an old environment flag; locating references is a discovery task; executable patches are premature until intended behavior is understood. The required decision is different: the team disagrees about the safest migration approach.
E:A concrete low-risk request with clear verification can move directly to execution without an elaborate architecture phase; that assumes a one-line configuration adjustment has an approved target and acceptance check. The item tests the different ability to compare proposals before committing to one.