Phase 3: Reading & Reviewing AI Code · 20 min · Cursor · Claude Code · GitHub Desktop
Objective
Your mission
Commit your current state, ask the AI to make a change, review the diff in plain English, and either commit or revert. Output: diff_review.md.
You need: Cursor, Claude Code, or GitHub Desktop with an AI-built project.
Time: 20 minutes.
Step 1: learn how diffs work (3 min)
A diff shows what changed between two versions:
- Green lines (+): what was added
- Red lines (-): what was removed
- Unchanged lines: context
Before:
const tipPercent = 15
After:
const tipPercent = 20
Plain English: "The AI changed the default tip from 15 to 20."
Step 2: commit your current state (2 min)
Before asking the AI to change anything, commit your working state:
git add .
git commit -m "Working state before AI change"
This is your safety net. If the AI breaks something, you revert to this commit.
The Replit incident and the safety net
In 2025, a Replit user reported that an AI agent wiped their production database during a debugging session. If the user had committed their work before the session and understood how to revert, they could have restored their data. The safety net only works if you set it up BEFORE the AI makes changes — not after.
Step 3: ask the AI to make a change (5 min)
Give the AI a specific change request — add a feature or modify something. Let it work.
Write in your file:
## Change Requested
[Your prompt to the AI]
Step 4: review the diff (5 min)
Look at what the AI changed:
In Cursor: Diff view shows old code on left, new on right. You can accept/reject individual changes.
In Claude Code: Shows files it wants to modify and asks for confirmation. Use git diff to see changes.
In GitHub Desktop: Shows all changes in a visual diff.
Write in your file:
## Diff Summary
What was added: [list]
What was removed: [list]
What was modified: [list]
Any changes I didn't ask for? [yes/no — what?]
Step 5: commit or revert (5 min)
If the change is good:
git add .
git commit -m "Added [feature name]"
If the change broke something or added unwanted changes:
git checkout . # undo all uncommitted changes
Write in your file:
## Decision: [Commit / Revert]
Why? [specific reasoning — e.g., "the feature works but the AI also added an analytics function I didn't ask for, so I reverted and will ask again with clearer constraints"]
When does a git commit protect you from an AI change that goes badly?
The safety net must be in place before the change: commit the working state, let the AI edit, read the diff, then commit or revert.