問題 11
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
解説
Cross-file interaction bugs require the model to inspect callers and related modules that aren’t present in the static diff prompt. A turn-limited agentic review with tools (e.g., Grep/Glob/Read) lets Claude follow references, locate call sites in unchanged files, and verify findings before reporting—reducing false positives while catching real integration issues. Options B/C still rely on heuristic context expansion that can miss indirect usages or blow up context, and D (chain-of-thought prompting) cannot access missing files and is not a substitute for tool-based verification.