Manuals / AI Coding with Cursor / Chapter 5
B · Review & Test · intermediate · ~40 min · Chapter 5 of 11
Reviewing AI-generated code
Never accept agent output blindly. Read every line. Check edge cases, security, tests, and style. You own the code, not the model.
Path progress41%
Step 1 of 2
Review checklist
Logic correct? Edge cases? Tests exist and pass? Secrets leaked? Dependencies justified? Style matches project?
- Logic handles null/empty/error paths
- No hardcoded secrets or API keys
- Tests cover happy path + one failure path
- No unnecessary new dependencies
- Matches existing naming and patterns
Do this now
Review an agent diff with the checklist. Find at least one issue to fix.
Was this step clear?
Chapter learning outcomes
- Diff review
- Security checklist
- Test verification
Clear these before you leave
Side quest
Red team
Ask agent to add a feature. Deliberately find 2 bugs in its output.