CCAR-F scenarios › Claude Code for Continuous Integration · Question 50 of 60
Scenario 5 · Claude Code for Continuous Integration
Claude Code runs inside your CI/CD pipeline. It reviews pull requests automatically, proposes test cases, and posts feedback on the PR. The central challenge is writing prompts and configuration that produce actionable findings while keeping false positives low enough that developers keep trusting the output.
Prompt Engineering & Structured Output
Developers dismiss about 30% of automated review findings. The team wants to improve the prompt systematically, but the dismissal data shows only finding text and file paths, so nobody can tell which code constructs are behind the dismissed findings. What should you add?
Show answer and explanation
Answer: A — A detected_pattern field in each structured finding naming the code construct that triggered it, so dismissal rates can be analyzed per pattern.
Section 6 recommends adding a detected_pattern field to structured findings so false-positive patterns can be analyzed systematically when developers dismiss findings. (b) produces prose that has to be read case by case and can't be grouped. (c) is an aggregate figure that hides which patterns cause the problem. (d) collects unstructured text and adds work for developers.
More from this scenario
- Your pipeline runs `claude -p` to review each pull request, and a script then uses…
- The CI review job re-runs on every push to an open pull request. Developers complain…
- A nightly CI job asks Claude Code to propose new unit tests for recently changed…
- Tests generated in CI are often low value, such as getter checks and assertions that a…
- Your pipeline has Claude Code generate a fix for a failing build and then, in the same…