CCAR-F scenarios › Claude Code for Continuous Integration · Question 43 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.

Claude Code Configuration & Workflows

A nightly CI job asks Claude Code to propose new unit tests for recently changed modules. Maintainers find that about half of the proposals duplicate scenarios the existing test suite already covers, which they have to weed out by hand. What is the most effective change?

Show answer and explanation

Answer: A — Provide the existing test files for each changed module in context, so Claude can see what is already covered and propose only missing scenarios.

Claude can't avoid duplicating tests it has never seen, so the existing test files have to be in context. Section 6 lists this directly. (b) asks for something Claude has no information to do. (c) compares names, not what the tests actually check. (d) reduces the volume but not the share of duplicates.