Ask for a located finding before asking for a rewrite. The first useful question is what source behavior violates the requirement, not how many lines the agent can change.
- 1Requirement
- 2Finding location
- 3Context
- 4Minimal patch
Work through the example
Prompt: Show one finding, its file and line, and the smallest test that would distinguish a real bug from a false positive.
One practical example
Use the prompt above on one small, named part of your app. Before accepting an edit, ask the agent to point to the source or configuration that supports its answer. If it cannot locate that context, resolve the missing input before expanding the task.
In the diagram, each arrow represents a handoff you can inspect. Keep the intermediate result rather than jumping directly to the final claim. For example, a reported finding should retain its location, and an executed check should retain its outcome. This gives the next attempt a concrete starting point and makes a misleading completion message easier to challenge.
Apply it to your project
Prompt: Show one finding, its file and line, and the smallest test that would distinguish a real bug from a false positive. Then compare the resulting diff with the original request. If it changed a neighboring concern, ask why that change was necessary. Save the result only after the relevant check has run, and record any part that remains unverified.
Evidence and limits
A review-first prompt is a technique, not a measured universal quality gain.
This is an educational guide. Its presence in the series does not certify a completed client-specific lab. The series evidence record separates executed checks from exercises and blocked environments.
Inspect the source used in this lesson.
Related reading
- Review AI-generated Swift before you trust it
A focused review, a small patch and a real test beat a confident completion message.
- Claude Code: turn a Swift finding into a tested patch
A small review-to-test loop for an existing iOS project.