# How to Vibe Code Your First App: Scoping It, Prompting It, and Fixing What Breaks

A hands-on walkthrough of one vibe coding session: shrink the idea to one screen, write a first prompt that asks for a plan, test like a user, and fix breakage and drift one change at a time.

> vibe coding · prompting · prototyping · About 7 min · Nov 20

## Key points

1. A first vibe coding session works better if you write a four-sentence brief before you open the tool: who uses it, what they do, what happens on the main action, and what is deliberately out of scope.
2. Shrink the idea to one screen, one action, one outcome, and state what "done" means as behaviours you can test, such as "three runs added, total matches, list survives a refresh".
3. Put the brief into the first prompt, ask the tool for clarifying questions and a plan first, and read the plan as a scope check; a login screen or database appearing there is the AI's default guess, not your requirement.
4. After the build, test the running app like a user before reading any code; each failure becomes one sentence, and each sentence becomes one prompting round.
5. One change per round is a measurement rule, not politeness: with a single change, a failure is attributable to it; with five, nothing tells you what broke.
6. A fix prompt states what you did, what you saw, and what you expected, and adds a guardrail such as "only change the distance check, do not restyle anything"; describe what you saw rather than your guess at the cause.
7. Drift, where the app still runs but unrequested changes appear, is a scope problem; fix it with explicit boundaries in the prompt, and split any request that would need "and" more than twice.
8. Save a known-good version after each round that works; if two attempts fail, revert and re-describe the change in smaller words, remembering that reverting restores code but not database data.
9. Done for a first app means a link that opens on a phone, its one job working, and one real person using it without your explanation.

---

You have an idea for a small app, a tool that generates code is open in a browser tab, and a blank prompt box is waiting. The hard part comes after the first sentence you type. What do you cut from the idea before you start? How do you phrase each round so the AI does not wander off? And when the app breaks, or quietly changes something that was working, what do you send back?

This is a walkthrough of one full session using a deliberately boring example: a page where the members of your running club log the distance they ran, and the page shows the total for the week. It has one screen, one main action, and one number that can go visibly wrong. That is all a first app needs. The describe-run-refine loop from [the previous article](https://eulore.ai/articles/what-is-vibe-coding-338b51be) stays the same. The skill is in how you feed it.

Pick one tool and stay with it for the whole project, even when it gets stuck. A browser-based builder such as Lovable, Bolt, Replit, or Figma Make needs nothing installed and updates the app while you talk [1]. Switching tools mid-project does not fix a muddled description. It restarts the part you had already learned.

Before you touch the tool, write one paragraph of four sentences: who uses this, what they do on the screen, what happens when they take the main action, and what is deliberately out of scope. The paragraph for the running club reads: my club members open the page on a phone after a run, type their name and distance, press Add run, and see the run in a list with the week's total above it. Everything else (accounts, history, charts, other clubs) is out of scope.

The out-of-scope line is doing more work than it looks like. A code-generating model fills every gap you leave with its own default guess, and those guesses are almost always the ambitious ones: a login screen, a database, a settings page. Those guesses cost you rounds later, because now you are maintaining features you never wanted. Keep the first version to one user, one action, one outcome [3].

Write down what "done" means too, in testable terms: I can add three runs, the total matches, and the list is still there after I refresh. If you cannot say what done looks like, the idea is still too big, so cut it again rather than prompting harder.

Now the first prompt. Turn the paragraph into a brief, and name your boundaries explicitly. Figma's guide makes the difference plain: "Build me a project dashboard" gets something generic, while the same request naming the sidebar, the projects in it, the task list of the selected project, and the header detail gets a screen that matches intent [1]. Same model, same minute, very different output.

This is the prompt to send for the running club:

```
Build a web app called Club Runs.

Who uses it: members of my running club, on a phone, right after a run.

What it does: one page. A member types their name and today's distance in kilometres, presses "Add run", and the run appears in a list below, newest first with the date. A line above the list shows the total distance this week.

Out of scope: accounts, passwords, a database, a calendar view, charts.

Save the runs in the browser so the list is still there after a refresh. Plain readable design, works on a narrow phone screen.

Before you build anything, ask me any questions you need, then show me your plan in five lines and wait for my OK.
```

The last line is the most useful sentence in vibe coding. Asking for questions before the build surfaces decisions you forgot to make, and those are cheaper to settle now than after the tool has written dozens of files. Lovable's documentation recommends exactly this, and its Plan mode formalises it: the tool inspects the project, asks clarifying questions, and proposes a plan you can edit before any code is written [2][3]. Browser builders and editors differ in naming, but the move is the same everywhere. Get the plan before you get the app.

Read that plan as a scope check rather than a technical document. Does it mention a login screen? A database? Extra pages? Those are the AI's defaults leaking in, and this is the cheapest moment to say "drop the login, keep everything else".

When the plan is right, say go. Then, before you read a single line of generated code, use the app the way a club member would. Add a run. Add a second one. Refresh. Try distance 0. Try a distance with a comma, since plenty of people type 1,5. Add ten runs and see whether the total and the list still make sense. Change nothing yet. This pass is only to find out what you actually received [1].

Each failure you find becomes one sentence, and each sentence becomes one round of prompting. This is the discipline that keeps a vibe-coded project finishable: one change per round. Beginners bundle five fixes into one message, the AI does four, breaks one, and now nothing tells you which one broke it. The only feedback you have is the running app, and it can attribute a failure to a change only if there was one change.

A fix prompt has three parts: what you did, what you saw, what you expected. Add a guardrail so the model does not "improve" the parts that already work.

```
Bug: I typed 0 as the distance and pressed Add run. The weekly total now reads "NaN km".

I expected: either zero gets accepted, or the button rejects it with a short message.

Only change how the distance input is checked. Do not restyle anything or touch the total calculation.
```

Two habits make these prompts land. First, describe what you saw, not what you think caused it. "The total reads NaN after I enter 0" beats "the calculation function is broken", because your guess about the cause is usually wrong and pulls the AI toward fixing the wrong layer. Figma's guide puts it the same way: say what is wrong and let the model, which can see the current code, work out the fix [1]. Second, when the round goes sideways, do not negotiate for ten messages. If two attempts do not land, go back to your last working version and re-describe the change in smaller words.

That only works if a working version exists to go back to, so save one deliberately. Browser builders keep automatic version history and let you bookmark a version after each feature that works [3]. Tools that work on a folder use Git commits instead, and you can ask the AI to make them for you. This is your undo button. With a saved known-good state, a failed experiment costs one revert instead of an evening of repair. Two caveats are worth knowing. Reverting restores the code, not the data users entered into a database [3]. And a plain restore will not bring back files the AI created since the last save.

The other failure mode is quieter than an error message: drift. The app still runs, but the AI has restyled the header, renamed a button, or added a feature you did not ask for, and the thing you liked is gone. Drift is a scope problem rather than a bug, so the fix is a boundary in the prompt: "only change the total line", "keep the existing styling", "do not touch the form" [2]. If you find yourself writing "and" more than twice in one request, split the request. Lovable's guidance is blunt about this, because a request that turns into four changes produces a result you cannot untangle [3].

```mermaid
flowchart LR
  A["Ask for one change"] --> B["Use the app like a real user"]
  B --> C{"Does it work?"}
  C -->|"yes"| D["Save this version"]
  D --> A
  C -->|"no"| E["One sentence: what I did, what I saw, what I expected"]
  E --> F{"Two attempts failed?"}
  F -->|"no"| A
  F -->|"yes"| G["Revert to the last working version"]
  G --> A
```

A session like this ends in a specific place: the app opens on your phone, it does its one job, and a real person (a club member, a colleague) used it without you narrating over their shoulder. Everything else belongs on a "later" list: accounts, charts, dark mode.

There is one optional round worth doing before you stop, because it makes every future session cheaper. Ask the tool to explain what it built, in plain words, one line per file, and to name which file you would change to alter the page title or the rounding. You still are not reading code. You are learning the map, and a map turns "fix the numbers" into "change the rounding in the file that scales amounts", which gets a better answer in fewer rounds. That is the beginning of the next stage: you keep steering without becoming the person who writes the code.

## Mind map

```mermaid
flowchart LR
  A["First vibe coding session"] --> B["Write the brief"]
  B --> B1["Who uses it, what they do, main action"]
  B --> B2["Out-of-scope list blocks default guesses"]
  B --> B3["Done = testable behaviours"]
  A --> C["The first prompt"]
  C --> C1["Brief plus boundaries in the prompt"]
  C --> C2["Ask for questions and a plan first"]
  C --> C3["Read the plan as a scope check"]
  A --> D["The refine loop"]
  D --> D1["Test like a user before reading code"]
  D --> D2["One change per prompt"]
  D --> D3["Fix prompt: did, saw, expected, guardrail"]
  D --> D4["Drift is a scope problem"]
  D --> E["Save known-good version each round"]
  E --> E1["Two failed attempts, then revert"]
  A --> F["Finished means: link, one job, one real user"]
```

## Glossary

- Brief：the few-sentence description written before prompting, covering who uses the app, what they do, what the main action does, and what is out of scope, from which the first prompt is built.
- Out-of-scope list：the explicit statement of features you are not building, which stops the AI from filling gaps with its default guesses like logins and databases.
- Plan-before-build：asking the tool for clarifying questions and a short plan, then waiting before it writes code, so a scoped misunderstanding is caught while it is still a sentence.
- One change per prompt：asking for a single change each round, so that when the running app misbehaves you know which change caused it.
- Guardrail：a line in the prompt naming what must not change, such as "only change the distance check, do not restyle anything", used to keep edits from rippling into working parts.
- Drift：the case where the app still runs but the AI has altered or added things you did not ask for, making the output wrong in scope rather than broken.
- Known-good version：a saved working state, either a bookmarked version in a browser builder or a Git commit, that a failed round can be reverted to.

## Sources

1. [Figma: How to start vibe coding — prompt scope, testing the prototype, and describing what is wrong in follow-up prompts](https://www.figma.com/resource-library/how-to-start-vibe-coding/)
2. [Lovable docs: Prompting best practices — clarifying questions, guardrails, and naming what must stay untouched](https://docs.lovable.dev/prompting/prompting-one)
3. [Lovable docs: From idea to app — frontend-first scope, plan mode, small loops, and version history caveats](https://docs.lovable.dev/tips-tricks/from-idea-to-app)

---

Original article: https://eulore.ai/articles/how-to-vibe-code-bbc9ef5c

> **Eulore** · Start small. Go deep.
>
> Eulore is an AI learning tool built around connected articles, each a 5–10 minute read. Ask questions as you go and help shape what comes next. That’s how this article was created.
>
> Start your own series → https://eulore.ai
