Vibe Coding
Build a Project with Vibe Coding
Walk through a real Python CLI from first prompt to tests and a commit, using the full workflow.
The project
A notes CLI: add, list, delete. JSON on disk. pytest. No extra packages. You will not paste a finished app here. You will run the same prompts in your editor.
python notes.py add "text"python notes.py listpython notes.py delete INDEX
How you run this project
Work in the vibe-lab folder from Setup, in the tool you picked inTools. One chat per slice. You copy the prompts below into the agent. After each slice: read the diff, run pytest -q, run the CLI yourself, then commit with the message given. If the agent builds a website, revert and paste the constraints again. That is part of the exercise.
Use the session script in How You Work if you forget the order.
Slice 1 — plan
Do not write code yet.
Build a notes CLI in notes.py with JSON storage in notes.json.
Commands: add, list, delete.
Constraints: Python 3.12, no new dependencies, pytest in test_notes.py.
Give steps, files, tests, and open questions.Answer questions (overwrite JSON, 0-based index, empty list message). Then implement only add + list.
Slice 2 — tests first
Create test_notes.py only (no notes.py changes yet).
Use a temp directory for notes.json so tests do not touch my real file.
Cover: add then list; list when file missing; delete last item.
Do not weaken later. I will implement until pytest -q passes.Slice 3 — implement add and list
@test_notes.py
Implement notes.py so the add/list tests pass.
Use argparse and json.
Do not implement delete yet.
Do not add dependencies.Run pytest -q. Read the diff. Commit: Add notes CLI add and list.
Slice 4 — delete
@notes.py @test_notes.py
Implement delete INDEX (0-based).
If INDEX is missing or out of range, print a clear error and exit 1.
Do not change add/list behavior.
Keep tests passing.Review for off-by-one. Commit: Add notes delete command.
What you should have at the end
| File | Role |
|---|---|
notes.py | CLI and JSON helpers |
test_notes.py | Temp-dir tests for add/list/delete |
AGENTS.md | Short standing rules |
| Git log | At least two small commits |
If the agent built a web app or installed Flask, revert and paste the constraints again. That is the lesson.
Stretch
Add search TEXT with the same loop: plan, test, implement, review, pytest, commit. Use the cheatsheet if you stall.
Key takeaways
- A real project is just the workflow repeated.
- Tests before the second slice prevent silent breakage.
- Your finished git history should read like a story, not like “agent dump.”
- You run the prompts. This page is not a finished app to copy.