brainax

Plan first: a one-page spec

Lesson 5 of 26 in the course “Vibe coding”. Free, with animations and a quiz.

Why plan before code

AI can't read minds. Whatever you don't say, it fills in itself, and often not the way you wanted. You ask for “a gym tracker” and get an app with payments, chat and a leaderboard, when you just wanted to log workouts. Then half a day of redoing. A short plan before the first line of code saves more time than it takes. Sounds boring, but it's five minutes.

A one-page spec

A spec, short for specification, is a brief description of what you're building. A request from the last lesson describes one step; a spec describes the whole project. Five lines. Goal: one sentence on why it exists. Who it's for: who will use it. Three main features. What we're not doing now. Done when: the signs that it worked. The picture shows an example for a workout tracker.

Three features and “not now”

MVP, minimum viable product: the smallest version that is already useful. For the tracker that's three features: log a workout, see your streak of days in a row, view simple stats. The “not doing now” line matters just as much: payments and chat can wait. Common mistake: listing twenty features at once. The project drowns and nothing gets finished.

“Done when…”

The last line is a short checklist, meaning a list of items you can tick off. Example: “opens and works well on a phone”, “a logged workout survives a page reload”, “a friend managed to sign up alone”. Without this line you can polish the project forever. With it, you know when to stop and publish.

Plan first, then code

Give the spec to the AI and ask it not to write code yet: “Propose a project structure and break the work into steps.” Read the answer. If the AI added extras or misunderstood something, fix the plan now, while it's just a few lines of text. Then go step by step: skeleton, meaning the empty frame of the page, first feature, second, publish. Keep the spec in the project and give it to the AI in every new chat.

Check yourself

  1. Why does a spec have a “not doing now” line?
    Correct answer: So you and the AI don't waste effort on extras. Without it, the AI adds payments, chat and more on its own. An explicit “no” keeps the project small and finishable.
  2. What is an MVP?
    Correct answer: The smallest version that's already useful. MVP: minimum viable product. It already solves the main task; everything else comes later.
  3. Your spec is ready. What do you ask the AI first?
    Correct answer: Propose a structure and steps, no code yet. First check how the AI understood the task. Fixing a short plan is easier than rewriting finished code.

← How to brief the AI Keys and secrets →