Vibe Coding
The Vibe Coding Workflow
Explore, plan, implement a small slice, review the diff, test, then commit. Repeat.
The loop
- Explore — read the files that will change. Ask "what already exists?"
- Plan — for anything non-trivial, demand a step list. Approve it.
- Implement — one slice. One feature, one bug, one refactor.
- Review — read the diff like a PR. Reject extra files and mystery logic.
- Test — run the command you named as "done."
- Commit — save the working slice. Then start the next loop.
If a slice takes more than about 20 minutes of back-and-forth, the slice is too big. Cut it in half.
Explore before you generate
Before writing code, list:
1. Files that already do something similar
2. The function or class I should change
3. Tests I should run
4. Anything you would need to invent (ask me instead)Small slices
Bad slice: "Build the whole CLI." Better slices:
- Parse arguments only, print help, no storage.
- Add JSON storage for
add. - Add
listand a test. - Handle missing file and empty list.
Each slice ends with tests green and a commit.
When the vibe goes wrong
| Symptom | Do this |
|---|---|
| Files you did not ask for | Revert, tighten constraints, retry |
| Same bug after 3 tries | Paste the failing test; stop re-prompting the whole feature |
| Model rewrites style everywhere | "Do not reformat unrelated code" |
| You cannot follow the diff | Ask for a summary, then revert and plan smaller |
A one-loop example
# 1. Explore
"Read notes.py. How are notes stored today?"
# 2. Plan
"I want a delete command. Do not code. List files and steps."
# 3. Implement
"Implement only `python notes.py delete INDEX` as in the plan.
Do not change add or list."
# 4. Review
"Show me the diff summary and any risk."
# 5. Test
pytest -q
python notes.py delete 0
# 6. Commit
git add notes.py test_notes.py
git commit -m "Add notes delete command"How you run the loop at the keyboard
Do not keep the six steps in your head as a slogan. Map them to clicks:
- Explore — new chat, @ the likely file, “do not edit.”
- Plan — same thread, “do not write code.” You reply with answers.
- Implement — “implement step 2 only. Files allowed: …”
- Review — open the diff UI. Scroll every file. Then ask for a review if you want a second pass.
- Test — switch to the terminal. Run the done command. Paste failures back.
- Commit — you stage named files. You write the message. Then you start a new chat for the next slice.
A good user session is quiet: short prompts, a small diff, a green terminal, a commit. A bad one is a long chat and a dirty tree. Shrink the slice.
Try it yourself
You wanted delete. The agent also rewrote add and added a config class. Where did the loop break, and what do you do now?
Show solution
Implement was too wide, or you skipped “files allowed.” Restore add and the extra file. Prompt: “Implement only delete INDEX in notes.py. Do not change add or list.” Then review, pytest, commit.
Key takeaways
- The workflow is the product. Prompts are just the interface.
- One slice, one review, one test run, one commit.
- Revert early. Retrying a giant mess costs more than starting the slice over.
- New chat when the goal changes. Same chat while you finish one slice.