Vibe Coding
Review Every Diff
Treat AI output like a pull request. If you cannot explain a change, do not keep it.
Read the diff, not the story
Models write confident summaries. The truth is in the patch. Scroll every file. Watch for extra files, deleted tests, and "helpful" refactors you did not ask for.
Review checklist
| Look for | Why |
|---|---|
| Scope creep | Unrelated formatting, renames, new folders |
| Correctness | Off-by-one, empty input, wrong types |
| Duplication | A helper that already existed |
| Security | eval, shell=True, hardcoded secrets, wide file writes |
| Tests | Tests deleted or assertions weakened so they pass |
| Dependencies | New packages you did not approve |
Ask the model to review itself
Use a second prompt after generation. Do not skip your own read.
Review the diff you just made.
List:
- files changed vs files I asked for
- possible bugs
- tests missing
- anything I should revert
Do not write more code unless I say so.A bad accept
You asked for a unique-words helper. The model also added a web server and a requirements file with ten packages. That is not success. Revert to the last commit and retry with "only change words.py and test_words.py."
Accepting a huge diff because "it looks like it works" is how vibe coding gets a bad name. Working once is not the same as being correct.
How you review in the editor
- Open the diff, not the chat. Scroll every file.
- Ask: did I request this file? If no, restore it unless you now want it on purpose.
- Read new functions out loud. If you stall, ask “explain this function line by line.”
- Check tests still assert something real. Deleted or emptied tests are a reject.
- Only then run the done command. Green tests on a mystery refactor are not a pass.
Explain it or reject it
After review, you should be able to tell a teammate what changed and why. If you cannot, ask: "Explain this function line by line" or revert and implement a smaller slice.
Try it yourself
The diff adds eval(user_input) in a CLI parser you did not ask to change. What do you do?
Show solution
Reject. Restore that file. Never keep eval on user input. Prompt: “Do not change the parser. Do not use eval. Implement only the feature I named.”
Key takeaways
- The diff is the artifact. The chat is commentary.
- Reject extra files and extra dependencies by default.
- If you cannot explain it, it is not done.
- You review before you run, and you run before you commit.