Free mini-course · Lesson 3 of 4
3 Your first SPEC.md
Learn to write a spec, the short list that makes the AI build what you want (not what it imagines).
The problem: vague requests
Ask an AI to “make a shopping list app” and it has to guess a lot. Is there a login? Where is data saved? Should it use React? Does it work on a phone?
It guesses, and it often overdoes it: you get a huge project full of things you didn’t ask for and don’t understand.
A spec fixes that. It’s a short file called SPEC.md where you decide up front what you want and what you don’t. The AI follows the spec, and you can check whether it did.
| Vague request | With a spec |
|---|---|
| The AI decides how big the project is | You decide how big the project is |
| Features show up that you didn’t ask for | The “out of scope” section prevents that |
| Hard to tell when it’s done | You have a “done when” list to check |
| Everything at once | One step at a time, testing along the way |
The parts of a good spec
| Section | What it’s for |
|---|---|
| Goal | What the app does, in one or two sentences |
| Who it is for | Who uses it and where (phone, computer) |
| Core features | The minimum for the app to be useful, one per line |
| Extras | What can wait until the core works |
| Out of scope | What the AI should not do |
| Technology | What to build with. Simple is better at first. |
| Done when | How you’ll know it works |
| How to work | Rules for the AI: one step at a time, explain what changed |
A good feature is specific and testable. Compare:
- Bad: “make the app look nice”
- Good: “buttons are at least 44px tall so they’re easy to tap on a phone”
Build yours
Fill in the fields and watch the SPEC.md take shape next to them. No idea yet? Click Show a finished example. What you type is saved in this browser.
Using the spec with Claude Code
- Click Download and move
SPEC.mdinto your project folder (it can be a new folder, likemy-first-app). - Open Claude Code in that folder (
claude) and ask for a plan before any code:
Read SPEC.md. Before writing any code, tell me in a few lines how you plan to build it and which files you'll create.
- If the plan makes sense, ask for just the first step:
Great. Build only the first core feature, then stop so I can test it.
- Test it in the browser. Did it work? Ask for the next one. Didn’t work? Describe what happened (“I clicked add and nothing showed up”) and ask it to fix it.
Mark it complete to track your progress.