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 progress
41%

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
Review checklistDrag stickies · tap for tips
Study mapDrag stickies · tap for tipsKeep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Assert the UIdrag · tap →Retry wiselydrag · tap →Seed datadrag · tap →Close the loopdrag · tap →Keep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Pathwise hackdrag · tap →Review checklistdrag · tap →Try thisdrag · tap →Follow the dashed drag · tap →

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.