Skip to main content
Handbook/Set Up/Page 8 · Existing Code

If You Already Started

Share

Share this page

Pass it to someone who needs it.

Star on GitHub

Key takeaway: Point the book at code you already have

Plenty of people reach this page with something already half-built: an app they vibe-coded over a weekend, a template they downloaded, a project someone else abandoned. Everything so far has assumed an empty folder. It does not have to. This chapter aims the same path at code that already exists.

1.4.1Skip this if your folder is empty

If you have nothing yet, you are on the normal path. Go to the next chapter.

If you do have something, nothing about this book changes except where you start. The stages run in the same order, and a few of them are simply already finished. Your job in this chapter is to find out which ones.

1.4.2Survey it before you touch it

The instinct is to hand the whole thing to your agent and say "clean this up". Do not. You would be trading the only working version you have for a version nobody has run.

Read first. Have the agent go through what is there and write down what it finds: what the project is, how to start it, what it is built with, and what the data looks like. Nothing else. No fixes, no tidying, no improvements.

That written survey is worth more than it sounds. It is the front-door document your project never had, and it is the first honest description of what you actually own.

1.4.3Your gaps are your reading list

Now line up what you have against the fifteen stages. A typical weekend project scores something like this:

StageUsually true of an existing project
Set UpDone. It runs, and something is installed
PlanMissing. Nobody ever wrote down what it should do
ArchitectPartly. There is a layout, but nobody chose it
BuildPartly. Features exist, in whatever shape they landed
TestMissing, almost always
Ship, OperateMissing. It runs on your laptop and nowhere else

The empty rows are your reading list, and they are usually the same rows for everyone. That is the actual reason a weekend app dies in a month: the parts that were skipped are the parts that keep software alive.

1.4.4Keep, redo, or delete

You will be tempted to throw it all away and start clean. That is almost always the expensive choice. Sort it into three piles instead:

  • Keep anything that runs and that you can describe. Working code you do not understand is still working code.
  • Redo only what you cannot explain and that touches money, passwords, or personal data. Those two conditions together, not either one alone.
  • Delete whatever nothing calls: the abandoned file, the half-finished page, the feature you talked yourself out of.

Rule of thumb: rewriting feels like progress and usually is not. Every hour spent replacing code that already worked is an hour not spent on the empty rows above.

1.4.5Have your agent survey what you own

Ready prompt
Act as a senior engineer taking over a codebase I already have. Read the project and report only. Do not change, refactor, tidy, or fix a single file in this task, even if something looks obviously wrong. Tell me: what this project is, the exact command to start it, what it is built with, what the data looks like, and which parts actually work when you run it. Say plainly where you are guessing. Then score it against the fifteen stages of this book, from Set Up to Scale, and tell me which ones are done, partly done, or missing. The missing ones are my reading list, so order them. Finally, list anything that touches money, passwords, or personal data and that you could not explain confidently. That list, and only that list, is what I should consider rewriting. Write the survey into my project as a README and add what you found (the language, the framework, the database) to my rules file, so later sessions confirm these instead of choosing again. If you need the full reasoning behind this step, read https://zalt.me/guides/vibe-coding/setup/existing-code What I already have, and how I got it:

Do this now: paste the prompt and read the survey before changing one line. Then carry on through the book, moving faster through the stages it says you already finished.

Mahmoud Zalt

Mahmoud Zalt

Software engineer, 16+ yrs · built Sistava.com in 3 months, idea to production, using these methods

Resources
Star on GitHubContribute
Donate

Support my work

A small tip keeps the free work coming.

© 2026 Mahmoud Zalt. Free to read, not to republish.
Copyright & license