Anthropic CCAR-F - Claude Certified Architect - Foundations Exam
Page: 3 / 28
Total 137 questions
Question #11 (Topic: Exam A)
You are integrating Claude Code into your Continuous Integration/Continuous Deployment (CI/CD) pipeline. The system runs automated code reviews, generates test cases, and provides feedback on pull requests. You need to design prompts that provide actionable feedback and minimize false positives.
Your pipeline reviews every PR using a single API call with a static prompt containing the diff and full text of each changed file – unchanged files are not included. Reviews are posted asynchronously and don’t block PR creation. Developers report that reviews consistently miss bugs involving cross-file interactions – for example, a PR renames a function’s parameters but the review doesn’t flag callers in unchanged files that still use the old argument order. Evaluation shows cross-file bugs account for 35% of production incidents from reviewed PRs.
What is the most effective change to your review design?
Your pipeline reviews every PR using a single API call with a static prompt containing the diff and full text of each changed file – unchanged files are not included. Reviews are posted asynchronously and don’t block PR creation. Developers report that reviews consistently miss bugs involving cross-file interactions – for example, a PR renames a function’s parameters but the review doesn’t flag callers in unchanged files that still use the old argument order. Evaluation shows cross-file bugs account for 35% of production incidents from reviewed PRs.
What is the most effective change to your review design?
A. Redesign the review as a turn-limited agentic task where the model can read files and search the codebase via tools, following references to verify cross-file findings.
B. Run parallel review passes per changed file with direct dependents included in each pass, then aggregate and deduplicate findings using a final summarization call.
C. Use static analysis to build a dependency graph of changed code, then expand the prompt to include all files within two dependency hops of any changed file.
D. Add chain-of-thought instructions asking the model to list all external references in the diff, then reason step-by-step about how each change might affect callers in other files.
Answer: A
Question #12 (Topic: Exam A)
You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers.
An engineer submits two requests: - Request A: “Rename the ‘getUserData’ function to ‘fetchUserProfile’ everywhere it’s used.” - Request B: “Improve error handling throughout the data processing module – add try/catch blocks, meaningful error messages, and ensure failures don’t silently corrupt data.”
For which request does specifying an explicit multi-phase workflow (such as analyze --> propose --> implement with review) most improve outcome quality?
An engineer submits two requests: - Request A: “Rename the ‘getUserData’ function to ‘fetchUserProfile’ everywhere it’s used.” - Request B: “Improve error handling throughout the data processing module – add try/catch blocks, meaningful error messages, and ensure failures don’t silently corrupt data.”
For which request does specifying an explicit multi-phase workflow (such as analyze --> propose --> implement with review) most improve outcome quality?
A. Request A, the function rename task
B. Request B, the error handling task
C. Both requests benefit equally
D. Neither request benefits significantly
Answer: B
Question #13 (Topic: Exam A)
You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers.
A developer asks the agent to investigate why a specific API endpoint intermittently returns 500 errors. The codebase has 200+ files and the developer doesn’t know which components are involved. The agent must trace the error through routing, middleware, business logic, and database layers.
What task decomposition approach would be most effective?
A developer asks the agent to investigate why a specific API endpoint intermittently returns 500 errors. The codebase has 200+ files and the developer doesn’t know which components are involved. The agent must trace the error through routing, middleware, business logic, and database layers.
What task decomposition approach would be most effective?
A. Have the agent first create a comprehensive plan mapping all code paths through the endpoint before beginning any file exploration or code reading.
B. Define a fixed sequence of investigation steps upfront – grep for error patterns, then read error handlers, then check database queries, then examine middleware – executing each step regardless of intermediate findings.
C. Run parallel worker agents that simultaneously investigate all four layers, then synthesize their findings to identify where the error originates.
D. Have the agent dynamically generate investigation subtasks based on what it discovers at each step, adapting its exploration plan as new information about the error path emerges.
Answer: D
Question #14 (Topic: Exam A)
You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers.
An engineer asks your agent to add comprehensive tests to a legacy codebase with 200 files and minimal existing test coverage. The engineer hasn’t specified which modules to prioritize.
How should the agent decompose this open-ended task?
An engineer asks your agent to add comprehensive tests to a legacy codebase with 200 files and minimal existing test coverage. The engineer hasn’t specified which modules to prioritize.
How should the agent decompose this open-ended task?
A. Systematically read all 200 files to create a complete function inventory before writing any tests, ensuring the testing plan accounts for every function before beginning.
B. Start writing tests for the first module alphabetically, using test failures and imports to discover related files organically.
C. Create a fixed testing schedule upfront based on directory structure, allocating equal effort to each top-level directory regardless of code complexity or business importance.
D. Use Glob and Grep to map codebase structure, identify heavily-coupled modules, create a prioritized plan for high-impact areas, and revise as dependencies are discovered.
Answer: D
Question #15 (Topic: Exam A)
You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers.
An engineer asks your agent to identify untested code paths in a legacy payment processing module spanning 45 files. After reading the first 8 source files, the agent’s responses are becoming noticeably less accurate – it’s forgetting previously discussed code patterns and hasn’t yet located all test files or traced critical payment flows.
What’s the most effective approach to complete this investigation?
An engineer asks your agent to identify untested code paths in a legacy payment processing module spanning 45 files. After reading the first 8 source files, the agent’s responses are becoming noticeably less accurate – it’s forgetting previously discussed code patterns and hasn’t yet located all test files or traced critical payment flows.
What’s the most effective approach to complete this investigation?
A. Clear context with /clear, then selectively re-read only the most critical files discovered so far, writing key findings to a scratchpad file that persists between context resets.
B. Switch to using Grep to search for specific function names instead of reading full files, reducing the content loaded into context for remaining exploration.
C. Document all current findings in a summary report, clear context completely, then use that report as the sole reference for continuing the investigation.
D. Spawn subagents to investigate specific questions (e.g., “find all test files for payment processing,” “trace refund flow dependencies”) while the main agent coordinates findings and preserves high-level understanding.
Answer: D