Work in small steps
Why the biggest lever in AI coding isn't the prompt — it's the size of each change.
You’ve got version control under your belt. Now let’s use it to make AI coding dramatically less stressful. The single habit that separates smooth AI coding from the “everything is on fire” kind is surprisingly simple: make small changes.
The big-bang trap
It’s tempting to ask for everything at once: “Build me a login page with Google auth, a dashboard, and a settings screen.” The AI happily generates hundreds of lines across a dozen files. Then something’s broken — and now you’re debugging a mountain of code you’ve never read, with no idea which part went wrong.
The loop that works
Good AI coding is a tight loop:
- Ask for one small thing. “Add a single email field to this form.”
- Check it works. Look at it. Run it. Read the diff.
- Commit. Now that working state is locked in.
- Repeat. Move to the next small thing.
Each commit is a safe checkpoint (remember the last module). If step 2 ever goes wrong, you
git restore and you’ve lost minutes, not hours.
$git commit -m 'Add email field to signup form' [main 7a3f9c1] Add email field to signup form 1 file changed, 6 insertions(+)
Your AI assistant just generated a 400-line change touching 8 files, and the app is now broken. What went wrong at the process level?
“But small feels slower”
It feels slower and is actually faster, because you almost never get stuck. The person asking for giant changes looks fast right up until the 45-minute debugging spiral. Small steps trade a tiny bit of upfront ceremony for never losing an afternoon.
What's the main benefit of committing after each small working change while coding with AI?
Try it for real
Practice the loop on something tiny and real:
- In a project, ask your AI tool for one small change — e.g. “change the page heading text” or “add a single new list item.”
- Look at what it changed. Run the app if you can.
- If it’s good:
git add .andgit commit -m "...". - If it’s not:
git restore .and try a clearer ask.
Do this three times in a row. That rhythm — ask, check, commit — is the core skill of this whole module.