Thuta Learning
IntermediateAIbeginner

Write a Spec Before You Prompt

Relax. We'll talk through this in plain words — no textbook voice.

What you'll walk away with

  • Understand why you write a spec before you prompt, without the intimidation
  • Get hands-on and try it yourself
  • Learn to spot and dodge the easy mistakes, with a smile

Good vibe coding doesn't start with fancy wording. You have to write down, up front, what needs to be built, what shouldn't be, and how you'll know it's done.

Take a moment to think about it this way

A spec isn't a 20-page document. It's a short paragraph covering who the user is, what the first success looks like, what the input/output is, and what's out of scope. When a prompt is vague, the AI fills in the gaps with guesses. Sometimes those guesses are lovely. Sometimes they turn into a product you never wanted. With a spec in hand, your prompts get shorter and easier to check.

Let's connect this to everyday life

Say "build a notes app" and the AI might throw in routing, a database, and auth, all at once. A spec that says "public list, create form, localStorage, no login needed" is far more precise. Write acceptance criteria like checkboxes — for example, "show an empty state when there's nothing yet." Paste that exact wording straight into your prompt.

Let's try it hands-on, together

markdown
# Mini spec: Quick Notes
User: ကိုယ်တိုင်သုံးမည့်သူ
First win: မှတ်စုအသစ်ရေးပြီး refresh လုပ်လည်း မပျောက်
In scope: list, create, delete, localStorage
Out of scope: login, share, rich text
Done when:
- [ ] Empty state ရှိသည်
- [ ] Add နှိပ်လျှင် list ထဲပေါ်သည်
- [ ] Delete အလုပ်လုပ်သည်
- [ ] Secret သို့မဟုတ် API key မပါ
You should see
Be able to write a mini spec you can paste straight into a prompt.

5-minute try-it

Write a spec for your mini app following the pattern above. Include at least 3 things that are out of scope.

One quick warning

Never treat AI output as the final, correct answer. Read through code, secrets, and user data yourself, test it, and only then put it to use.

Easy traps

  • Starting with a vague prompt like "build an app"
  • Measuring "done" by how pretty the UI looks

Now try it yourself

Write a spec for your mini app following the pattern above. Include at least 3 things that are out of scope.

You'll know it worked when: Be able to write a mini spec you can paste straight into a prompt.

Write a Spec Before You Prompt | Thuta Learning