opening pane
ProofStack guide · 7 min read
How to Review AI-Generated Code Before You Merge
A step-by-step review checklist for AI-generated code covering diffs, tests, security boundaries, dependencies, and honest verification evidence.
By ProofStack
Start with the request and the complete diff
Review against the behavior that was requested, not only the explanation the agent wrote afterward. Read all changed files and look for edits outside scope, missing error handling, weakened checks, copied secrets, and assumptions that were not part of the task.
Ask the agent to explain a change you cannot connect to the goal. A concise explanation helps investigation, but the code and evidence decide whether the change is acceptable.
Run checks that cover the changed behavior
Choose tests based on the code path. Run focused tests first, then type checks, lint, integration tests, or a manual browser flow when they cover behavior the focused test does not. Confirm that test output belongs to the current version of the change.
- A command that was suggested but never executed is not a passing check.
- A passing test proves only the behavior it exercises.
- A skipped test leaves a known verification gap; write that down.
Inspect inputs, permissions, and dependencies
When changes cross a trust boundary, trace who controls each value and what the server checks before acting. Review authorization separately from authentication. Inspect shell and SQL construction, URL and path handling, HTML output, newly introduced packages, and any secret or personal data that may enter logs.
- 01
Trace untrusted input
Follow user, network, file, or environment values to the operations they influence.
- 02
Check access control
Verify both who signed in and whether that identity may access the requested resource.
- 03
Review new dependencies
Confirm the package is needed, maintained enough for your use, and allowed by project policy.
- 04
Check negative paths
Look for tests or manual checks covering invalid input, denied access, and unavailable services.
Report the scope of your verification honestly
A useful review record lists changed areas, checks and results, and unresolved limitations. Say “the focused auth suite passed” rather than implying the entire application is correct. If a scanner did not cover generated files, runtime behavior, or a dependency, state that boundary.
ProofCheck scans working-tree changes for selected dependency CVEs, exposed secrets, and unsafe patterns. It reports file-and-line findings for you to investigate. It is a useful signal within that scope, not a substitute for review and not proof that no vulnerability exists.
Keep learning
Related pages
ProofStack
Keep agents, tasks, and checks together.
A desktop workspace for Claude Code, Codex, Gemini CLI, and other coding agents. Coordinate sessions, automate routines, and review code checks before shipping.