Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Plan Before You Prompt  ›  Lesson

Write a One-Page Spec

Plan before you Code 12 minA short spec with who, must, won't and done-when replaces the assistant's guesses with your decisions before any code is written.

Write a One-Page Spec

"Build me an app to split bills" is a wish, not a plan. An assistant will happily turn that wish into code, filling every gap with its own guesses: accounts or no accounts, even or uneven splits, rupees or dollars. You then spend your evenings undoing guesses. Ten minutes of planning on one page saves most of that.

The rule

Decide what done looks like before asking for any code.

A spec (short for specification) is a short written description of what you are building. For a vibe coder it does two jobs: it forces you to decide, and it gives the assistant something firmer than a wish. One page is enough for Kitty:

# Kitty: spec

## Who
Three flatmates (Asha, Ravi, Meera) who share rent, groceries and bills.

## Must do
- Log an expense: who paid, amount, short note, date.
- Split each expense evenly among everyone in the flat.
- Show who owes whom.
- Record a "settle up" payment between two flatmates.

## Won't do (yet)
- No bank connections. No uneven splits. No phone app.

## Done when
- Asha pays ₹900 for groceries: Ravi and Meera each owe her ₹300.
- A negative or zero amount is refused with a clear message.

Each heading earns its place:

  • Who keeps the scale honest. Three flatmates do not need what a bank needs.
  • Must do is the smallest set of features that makes the app useful.
  • Won't do (yet) stops scope creep: you can point to it when an assistant starts adding extras.
  • Done when gives concrete examples you can try by hand, and later turn into tests.

The shortcut

Four headings: Who, Must, Won't, Done when. If any one of them is empty, you are not ready to prompt. Fill it first, even with one line.

From "an app to split bills" to a specStep 1 of 4
  1. Who

    Three flatmates sharing rent and groceries, all fine with a simple web page.

The common mistake is writing only the "Must" list. Without "Won't", every clever extra looks welcome; without "Done when", nobody can say whether the feature works.

Drills

Answer fast — trust the rule.

quick drill

Which line belongs under "Won't do (yet)" in Kitty's spec?

quick drill

Why include a "Done when" example such as "Asha pays ₹900: Ravi and Meera each owe ₹300"?

quick drill

What usually happens to the gaps you leave in a description?

quick drill

Your spec has an empty "Must do" section. What does the shortcut say?

Remember

  • Rule: decide what done looks like before asking for any code.
  • Shortcut: Who, Must, Won't, Done when. No empty headings.
  • Trap: skipping "Won't" and "Done when", which are the parts that protect you from guesses and extras.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainSpec the settle-up feature

Write a short spec for Kitty's 'settle up' feature, where a flatmate records that they have paid back what they owe. Use the four headings Who, Must, Won't and Done when, then explain why the Won't list matters when an AI assistant writes the code.