Reconstruct the contract from evidence
Read the requested outcome and acceptance examples before the model’s explanation. Identify changed public interfaces, errors, persistence and external calls. Ask which behaviour is intentionally different and which must remain unchanged.
Open the implementation of unfamiliar helpers. Generated code can call a plausible API with the wrong signature or assume a library feature that is absent from the locked version. Resolve that uncertainty from the installed version’s documentation.
Inspect boundaries and repeated actions
Check that authentication and authorization run on the server, and that record ownership is verified for the object actually returned. Trace external input into queries, paths, rendered output and tool actions.
Look for duplicate effects in retries, callbacks and concurrent requests. A function that looks correct once may charge, insert or notify twice. Use a controlled repeated-event fixture rather than a live external mutation.
Review the tests independently
Check what makes each test fail. Ensure it asserts an observable result, covers a negative case and does not reproduce the same flawed calculation as the patch. Run the checks on the exact candidate under review.
Record findings with a concrete consequence and a small relevant location. If the agent changes the patch after review, inspect those changes and refresh the affected checks. A previous green summary is not evidence for new code.
Working sheet
| Inspect | Challenge | Evidence |
|---|---|---|
| Contract | Which result intentionally changes? | Worked input-output examples |
| Permissions | Can another user reach this record? | Allowed and denied requests |
| Repeated effects | What happens on the second callback? | Idempotency fixture |
| Tests | Does a wrong result make them fail? | Assertion review and local mutation |
| Dependencies | Does the locked API exist? | Manifest version and primary docs |
Questions about how to review AI-generated code
Should AI review its own code?
It can suggest improvements, but that does not provide independent acceptance. Preserve a separate review of the final patch and its evidence.
Is a short patch automatically safe?
No. A one-line permission or transaction change can have a large effect. Review by consequence and boundary, not only by line count.
How should I use the working sheet?
Download the CSV and replace the sample rows with evidence from your repository. Record a clear acceptance check and an owner for each item. Keep unresolved assumptions visible rather than treating the example as a completed assessment.
Sources and further reading
Examples are illustrative. They are not customer results, security guarantees, or a substitute for checking the documentation for your installed version.
