Day 2, 30 minutes · beginner
Why it matters
A coding agent builds what you write down. Where your words leave a gap, it fills the gap with a guess, and it guesses with the same confidence as everything else. A person who builds for you asks a question when something is unclear. An agent may just pick an answer and carry on.
That makes the spec the most important input of the whole flow. A spec (short for specification) is a short description of what a feature must do, for whom, and how you will know it works. It says what, not how. Product people write and judge specs; developers and agents build from them; reviewers check the result against them.
Today you write a one-page spec for one small feature. It has a goal, the users, examples of the behaviour, the unusual cases, what is out of scope and how you will know it works. Every later lesson builds on this page.
What goes on one page
These headings are our suggestion. Each one closes a gap an agent would otherwise fill by guessing.
- Goal. One or two sentences: what problem this solves and for whom. Not the solution.
- Users. Who uses the feature, and who must not be able to.
- Behaviour examples. Three or more short scenes of the feature working. They are the heart of the spec.
- Edge cases. An edge case is an unusual or extreme situation at the border of normal use: zero, too many, at the same time, too late, the wrong person. Agents and people both forget them.
- Out of scope. What this feature will not do, even if it seems obvious. This stops an agent from adding things nobody asked for.
- How we will know it works. What you will look at after release: a number, a complaint that stops, a task that gets faster.
- Open questions. What is not decided yet, and who decides it.
Writing behaviour examples
A simple form works well: Given a starting situation, When someone does something, Then this is what they see or what happens. One scene per example. Use concrete values ("6 tomato plants") instead of words like "some".
Given an offer of 6 tomato plants with 6 left
When a member claims 2
Then the offer shows 4 left and the member sees "You claimed 2"
You will turn these examples into tests on day 4, so write them so that a person could check them with a yes or a no.
The steps
- Pick one small feature. Small means a few days of work at most for a person. If you work on a real product, pick something that is not confidential, or describe it as a stand-in with made-up names and numbers.
- Write the goal and the users first, in your own words, before you open your tool. Two sentences are enough.
- Let the tool interview you. Pick your tool below and follow the steps. The prompt asks the tool to put questions to you first, one at a time, before it writes anything. Answer them yourself; do not let it decide for you.
- Read the draft as the person who has to build it. Underline every word that could mean two things ("soon", "fast", "nearby") and replace it with a number or an example.
- Add edge cases until it feels a bit much. At least four. Ask: what if there are none, too many, two at once, too late, or the wrong person?
- Cut it to one page. If it does not fit, the feature is too big. Move part of it to Out of scope for now.
Wren's spec for the seedling swap board
Goal: Members with spare seedlings can offer them, and other
members can claim them, so fewer plants end up on the compost.
Users: logged-in members. Visitors who are not logged in see nothing.
Behaviour examples
1. Given I am logged in, when I post 6 tomato plants available
until Saturday, then the offer appears on the board.
2. Given an offer with 6 left, when another member claims 2,
then it shows 4 left.
3. Given an offer with 0 left, then it disappears from the board.
Edge cases
- Someone claims more than are left.
- Two members claim the last plants at the same moment.
- A member tries to claim from their own offer.
- The end date has passed.
Out of scope: payments, photos, messages between members,
showing phone numbers or email addresses on the board.
How we will know it works: at least 10 offers in the first month,
and no complaints about claims that were not there.
Open questions: how members arrange the hand-over (Wren decides).
Look at the out of scope line about phone numbers. Wren added it after the interview asked how members get in touch. Without it, an agent might well have shown contact details on the board to be helpful.
Common mistakes
- Writing the how. "Use a dropdown and a database table" is a design choice for the builder. Write what the member needs to do.
- Only the happy path. The happy path is the normal case where everything goes right. A spec with no edge cases gets code with no edge cases.
- Letting the tool invent the feature. The interview is there to draw out your decisions. If it suggests something you did not want, move it to Open questions or Out of scope.
Today's actions
Ticks are not saved without an accountDo it in your tool
Claude
- Open your
AI-native courseproject and start a new chat. - Paste the prompt below, fill in your feature and send it. Answer the questions one by one.
I want to write a one-page spec for one small feature, so a coding agent and a reviewer can work from it. A spec here means a short description of what the feature must do, not how to build it. The feature in my words: [two or three sentences] Who uses it: [roles] First, ask me up to eight short questions, one at a time, about anything you would otherwise have to guess. Wait for each answer. Then write the spec with these headings: Goal, Users, Behaviour examples (at least three, each as Given, When, Then, with concrete values), Edge cases (at least four), Out of scope, How we will know it works, Open questions. Keep it to one page. Do not add features I did not ask for; put your own ideas under Open questions. - When the draft is ready, select Output in the message box, choose the Docs template and ask:
Put the final spec in a doc. - Edit the doc directly where a word could mean two things. To change one part, highlight it, click Edit with Claude and type your request.
- Click Export and choose Word or PDF. Then upload the file to the project knowledge with the + button, so later lessons can use it.
Note: Artifacts need Cloud code execution and file creation (called Create and edit files in the updated Settings layout) turned on in Settings > Capabilities; on Team and Enterprise plans an owner controls it. Without it, copy the final spec into a text file instead.
ChatGPT
- Open your
AI-native courseproject from Projects in the sidebar and start a new chat in it. - Paste the prompt below, fill in your feature and send it. Answer the questions one by one.
I want to write a one-page spec for one small feature, so a coding agent and a reviewer can work from it. A spec here means a short description of what the feature must do, not how to build it. The feature in my words: [two or three sentences] Who uses it: [roles] First, ask me up to eight short questions, one at a time, about anything you would otherwise have to guess. Wait for each answer. Then write the spec with these headings: Goal, Users, Behaviour examples (at least three, each as Given, When, Then, with concrete values), Edge cases (at least four), Out of scope, How we will know it works, Open questions. Keep it to one page. Do not add features I did not ask for; put your own ideas under Open questions. - Read the draft as the builder. Ask ChatGPT to replace every vague word with a number or an example, and correct anything you did not decide.
- Copy the final spec into a text file named
spec.mdon your computer. Then add it to the project as a file, or paste the text into the project.
Note: The project instructions from day 1 still apply in this chat. How many files you can upload to a project depends on your plan.
Gemini
- Go to gemini.google.com. Below the text box at the bottom, click Add Files and then Canvas.
- Paste the prompt below, fill in your feature and click Submit. Answer the questions one by one.
I want to write a one-page spec for one small feature, so a coding agent and a reviewer can work from it. A spec here means a short description of what the feature must do, not how to build it. Write in plain, short sentences. The feature in my words: [two or three sentences] Who uses it: [roles] First, ask me up to eight short questions, one at a time, about anything you would otherwise have to guess. Wait for each answer. Then write the spec as a doc with these headings: Goal, Users, Behaviour examples (at least three, each as Given, When, Then, with concrete values), Edge cases (at least four), Out of scope, How we will know it works, Open questions. Keep it to one page. Do not add features I did not ask for; put your own ideas under Open questions. - In the Canvas panel, select a vague word or line with the cursor and type in the text box what it should say. You can also edit the text directly.
- At the top right of the Canvas panel, click Share & export and then Export to Docs to keep the spec in Google Drive.
- Click Share & export again and then Copy contents. Paste the text into a file named
spec.txton your computer; you attach it in the next lessons.
Note: Changes in Canvas are saved by themselves, and you can step back with Previous Version at the top of the panel.
Microsoft Copilot
- Sign in to copilot.cloud.microsoft. Select the plus button on the left of the chat prompt box, hover over More and select Draft page or code.
- Paste the prompt below, fill in your feature and send it. Answer the questions one by one in the chat.
Create a page with a one-page spec for one small feature, so a coding agent and a reviewer can work from it. A spec here means a short description of what the feature must do, not how to build it. Write in plain, short sentences. The feature in my words: [two or three sentences] Who uses it: [roles] First, ask me up to eight short questions, one at a time, about anything you would otherwise have to guess. Wait for each answer. Then write the spec with these headings: Goal, Users, Behaviour examples (at least three, each as Given, When, Then, with concrete values), Edge cases (at least four), Out of scope, How we will know it works, Open questions. Keep it to one page. Do not add features I did not ask for; put your own ideas under Open questions. - Edit vague words directly on the page, or ask Copilot in the chat next to it to replace them with numbers or examples.
- Select the title on the page and rename it
Spec: [feature name]. Copy the page text into a file namedspec.txton your computer; you attach it in the next lessons.
Note: You can also turn any chat answer into a page: select the ellipses below the response and then Edit in Pages. Microsoft says the new Copilot Home is still rolling out, so your screen may differ.
Paid planPages needs a work or school account with SharePoint or OneDrive storage (no Copilot licence needed), or Microsoft 365 Personal, Family, Premium or Pro.
Create a free account to save your progress
Free, and no payment details. Your ticks and finished lessons are kept, on every device.
Create a free account I already have an accountCreate a free account to save your progress. Sign in or sign up