A spec is the decisions, written down, as a folder of files. A prompt is the message in the chat. When the chat ends, the prompt is gone. The folder is still there.
You can keep the folder on your own machine. Publishing puts it at an address on Spekkr, where Claude Code, Cursor, or Codex can build from it. This page is how to write the folder, and how to check the manifest before you publish.
The manifest is spekkr.json. It names the spec, the choices a person may change, and the commands and secrets the build uses. check_spec reads the manifest and lists every problem. Send it the other files too and it adds advice on them, which stops nothing. The other files are what the agent builds from.
Spec-driven development is why those decisions are worth writing down. This page is how to write them.
Write the decision, not the feature name
A prompt such as "build a waitlist with referrals" names a feature. It does not say how two email addresses count as the same person, how long a confirm link lasts, or what a mail scanner does when it opens that link. juno/waitlist version 0.1.2 writes those down as requirements R1 and R2.
Give each requirement an id, and keep it
A requirement is one numbered rule. In juno/waitlist the published spec.md says: "Each requirement has an id. Tests name the id they cover." R1 is Join. R2 is Confirm. The ids run through R9.
Later lines cite the id. R3 and R7 both say "by the rule in R1". tasks.md says "Check: the R1 and R2 acceptance tests pass."
Spekkr does not refuse a spec over its numbers. Send check_spec the files and it names an id used twice in one file, as advice. Keep the id when you publish a new version anyway. A test, a task, or another requirement may already name it, and renumbering means finding every citation. Spekkr keeps the versions you publish, so an agent can read an earlier one and compare its ids with the newest.
End the requirement with one check
juno/waitlist ends each requirement with a line that starts "Accept when:". The line is the check a test can fail. R1's line is the published one:
Accept when:
Sam+x@Example.comandsam@example.comare one entry, the answer to both requests is the same, and the sixth join from an address in an hour is refused.
The bullets above that line are the rule. The Accept when line is how you know the rule was met. One line, and it names something a test can do.
dwrtz/whiteboard version 0.1.1 does the same job and names the test. Its spec.md says:
Each requirement ends with an "Accept when" line naming the tests that prove it.
R1's line is: Accept when: "R1 R16 zoom, pan, fit, the eraser, and the shortcuts help" passes.
Spekkr does not require the words "Accept when". These two specs use that line so a task can point at a check.
What goes in each file
You publish the manifest and the files it lists. publish_spec takes the text of spekkr.json, and those files. BUILD.md and spekkr.inputs.json are not in the list. Spekkr writes both when someone pulls the spec.
BUILD.md is the note the agent reads first. It says to read the manifest, then the choices, then the spec files in the order the manifest lists them. If the spec has a task list, the note says to finish each task's check before the next task.
Spekkr does not require the names spec.md, design.md, and tasks.md. A spec lists at least one file. juno/waitlist lists those three, and the manifest says what each one is: spec.md, "Requirements and acceptance criteria."; design.md, "Data model, rules and flows."; tasks.md, "Build tasks in order, each with a check."
spec.md is the behavior. The published file opens with what the waitlist does, then a heading "Out of scope", then the requirements, then "Definition of done". Out of scope is that heading. It is not a field in the manifest. The published lines under it include "Paying to move up." and "Prizes and leaderboards."
design.md is the part that is easy to get wrong. The published file starts: "This file fixes the parts that are easy to get wrong. Choose the language and framework that fit the person's project; nothing here depends on them." It names the tables, how a person's place in line is scored, and which secret signs the status link. It also says where the spec stops choosing: "Where this spec names something, use that name, so that two builds of it agree. Where it does not, the choice is yours."
tasks.md is the order. The published file starts: "Work in order. Finish a task's check before starting the next." Task 3 is join and confirm. Its check is that the R1 and R2 acceptance tests pass.
dwrtz/whiteboard lists a fourth file, research.md. The manifest's about field for it is "Provenance only, not needed to build: sources, how the spec was checked, and where it differs from the app it was modelled on." Put a note like that in the about field when the file is not a requirement. A Spec Kit feature is the same work in different file names. The comparison says which file is which.
Choices
A choice is a value a person can change. The field is customize. It has three lists: settings, options, and swaps. A key is used once across all three.
A key is lowercase letters, digits, and underscores, and it starts with a letter.
A setting is any text. juno/waitlist has app_name, default Acme, and referral_boost, default 3. The 3 is text. In the file it is the characters 3, not a JSON number.
An option is on or off. referrals and show_position are both on by default. In the manifest the default is true or false.
A swap is one of a fixed list of two or more. database is postgres or sqlite, and the default is postgres.
When the spec is pulled, the person's values go in spekkr.inputs.json, next to the files. An option is written true or false there. The person can still answer on or off.
A key the spec does not declare is refused, and so is a swap value that is not one of the choices. Anything left out keeps the default.
The requirements have to say what the choice does. juno/waitlist's spec.md says "Read spekkr.inputs.json first. referrals decides whether R3 exists". R3 itself starts "Only if referrals is on."
With every default, the file Spekkr writes for juno/waitlist 0.1.2 is this one.
{
"spec": "juno/waitlist",
"version": "0.1.2",
"inputs": {
"app_name": "Acme",
"database": "postgres",
"referral_boost": "3",
"referrals": true,
"show_position": true
}
}
List every command and every secret
safety.commands is the commands the spec's files tell the agent to run. safety.secrets is the names of the secrets the build reads. BUILD.md tells the agent to ask before it runs a command a spec file names, or reads a secret, unless the manifest lists it. A command the agent picks for its own tools, such as its usual test command, does not have to be listed.
juno/waitlist lists three secrets and no commands: DATABASE_URL, EMAIL_API_KEY, and WAITLIST_SECRET. The design.md line for WAITLIST_SECRET is "Signs status links. At least 32 random bytes."
That design.md table also names EMAIL_API_URL and EMAIL_FROM, and marks each one "Optional in development." Neither name is under safety.secrets. The manifest rule is to name the secrets the build reads. If a later edit starts reading another one, add the name there.
dwrtz/whiteboard lists three commands and no secrets: npm install, npx wrangler dev, and npx playwright install chromium.
Show the person this list before the agent builds. After you publish, the spec's page names you. An agent that pulls the spec is told to say who published it, and to show this list, before it builds.
Needs, a demo, screenshots, the changelog, lineage
needs.accounts is the services a person must sign up for. juno/waitlist lists "An email-sending service".
needs.permissions is what the agent must be allowed to do. juno lists shell and network.
Leave needs.buildMinutes and needs.modelCostUSD out until you have measured them. The spec's page shows a number when it is greater than zero.
demo.url is the address of a running reference build. juno/waitlist does not set one.
demo.screenshots is a list of image paths in the spec folder. The first image is the picture on the spec's card. juno lists four png files, and the first is shots/join-form.png. The others are shots/status-place.png, shots/team-line.png, and shots/join-form-mobile.png. To publish, each screenshot is png, jpg, gif, webp, or avif, and there can be at most 12.
The changelog is newest first. The first entry's version has to be the version field. Each entry has a version, a date like 2026-11-15, and a note. juno/waitlist's current entry is version 0.1.2, dated 2026-11-15, note "Names what it builds." A published version never changes. To update a spec, raise version, add a changelog entry, and publish again.
lineage.forkedFrom is the id of another Spekkr spec this one started from, written username/name. lineage.adapters lists specs by other people that extend yours. It is not where you name an outside product. That is worksLike, one product's name such as Excalidraw. The spec's page then says the spec works like it, and that Spekkr is not affiliated with it. juno/waitlist and dwrtz/whiteboard both leave lineage empty. The whiteboard says where the design came from in research.md, and the manifest says the builder does not need that file. Spec an existing app is that distinction on two published specs.
kind is optional. It is what the spec builds, in your own words, up to 40 characters. juno/waitlist sets it to app part. Leave it out and it means software. Software needs at least one platform: web, mobile, desktop, backend, or cli. A spec with some other kind may leave platforms out.
targets.agents is also optional. The manifest docs call it the AI agents the spec was written for. Neither of these two specs sets it, and the field does not choose which agent may build.
A starter that already passes
The four files below are a whole spec, and the spec template is the same shape with each part saying what goes in it. check_spec reports no problems for the manifest. The id is example-user/shared-note. That username is a placeholder, the same one the manifest docs use. Before you publish, change the id to your username and the name you want, and set author.id to that username.
check_spec does not look in the folder. Its answer names two things it does not check: that every file and screenshot the manifest lists is in the spec's folder, and that the folder is named after the spec's id. publish_spec checks both. These files are the ones the manifest names, so that second check has something to find.
The starter is a Node.js page on purpose. tasks.md tells the agent to run npm test, and the manifest lists that command. juno/waitlist does not pick a language. Its design.md says to choose the language and framework that fit the person's project. If your spec names a different command, list that command instead.
This is the manifest check_spec reads.
{
"spekkr": 1,
"id": "example-user/shared-note",
"name": "Shared note",
"summary": "A page with one note. The title is a setting, and a signed-in person can replace the text.",
"version": "0.1.0",
"author": { "id": "example-user", "name": "Example User" },
"targets": { "platforms": ["web"], "stack": ["Node.js"] },
"customize": {
"settings": [
{
"key": "page_title",
"label": "Page title",
"default": "Notes",
"help": "Shown at the top of the page."
}
]
},
"files": [
{ "path": "spec.md", "about": "Requirements and acceptance criteria." },
{ "path": "design.md", "about": "The rule that is easy to get wrong." },
{ "path": "tasks.md", "about": "Build tasks in order, each with a check." }
],
"needs": { "permissions": ["shell"] },
"demo": {},
"safety": { "commands": ["npm test"], "secrets": ["NOTE_SECRET"] },
"lineage": {},
"changelog": [
{ "version": "0.1.0", "date": "2026-11-20", "note": "First version." }
]
}
spec.md
# Shared note
## What this builds
A page that shows one note. The title comes from `page_title` in
`spekkr.inputs.json`. A person who is signed in can replace the note. Anyone
can read it.
## Out of scope
- More than one note.
- Accounts. Use the sign-in the project already has. This spec does not add one.
## Requirements
Each requirement has an id. The test names the id.
### R1. Read and replace
- The page shows `page_title` and the current note.
- A signed-in person can replace the note. The new text is stored as they
typed it, up to 2,000 characters.
- A person who is not signed in can read the note and cannot change it.
Accept when: a signed-in save of `hello` is what the next read returns, a save
of 2,001 characters is refused, and a signed-out save changes nothing.
## Definition of done
- The R1 check has an automated test, and that test passes.
design.md
# Design
This file is the part that is easy to get wrong. Task 2 says to run
`npm test`, so this starter is a Node.js page. A different project would name
its own test command, and would list that command under `safety`.
## The note
Store one string, the note, and the time it last changed.
## Who may change it
Use the project's sign-in. A request that changes the note has to be from a
signed-in person. Anyone may read the note. If the project has no sign-in,
stop and say so.
## The secret
When a save succeeds, set a cookie named `note_saved`. Its value is an
HMAC-SHA-256 of the saved text, keyed with `NOTE_SECRET`, written as hex.
Compare in constant time. `NOTE_SECRET` is the name listed under
`safety.secrets`.
## The command
Task 2 says to run `npm test`. That is the command listed under
`safety.commands`.
tasks.md
# Tasks
Work in order. Finish a task's check before starting the next.
1. **The page (R1).** Show `page_title` from `spekkr.inputs.json`, or `Notes`
when that file is missing, and show the current note.
Check: the default title `Notes` is on the page.
2. **The check (R1).** Add a test for the Accept when line in `spec.md`, then
run `npm test`.
Check: `npm test` passes.
There is no screenshot in the starter, so demo is empty. Add image files, and list them under demo.screenshots, when you have them. How to publish has the rest of the rules, including the file size limits.
juno/waitlist, one requirement at a time
juno/waitlist version 0.1.2 is published by juno. The manifest lists spec.md, design.md, and tasks.md, in that order.
R1 is Join. The rule says the address is trimmed and lowercased, a tag after a plus sign is ignored, and full stops are ignored for Gmail. Mail still goes to the address the person typed. The Accept when line is the check quoted above: the two addresses are one entry, both requests get the same answer, and the sixth join from one address in an hour is refused.
design.md adds a case the requirement does not spell out. Under "Named here" it says googlemail.com counts as Gmail.
tasks.md task 2 is the function that builds the address key. Its check is those cases. Task 3 builds join and confirm, and its check is that the R1 and R2 acceptance tests pass.
R3 is referrals, and the published spec.md starts that requirement with "Only if referrals is on." The task says the same. referrals is the option in the manifest, on by default. The requirement, the task, and the choice use one key.
The spec-driven development guide prints R1 to R5 from this spec and marks what a five-word prompt leaves out. Spec an existing app is the same kind of folder after the requirements have been edited, on dwrtz/whiteboard and dwrtz/product-analytics.
Hand it to your agent
Paste this into Claude Code, Cursor, or Codex after Spekkr is connected. The agent should ask you what to build, draft the files, run check_spec until it reports no problems, show you the commands and secrets, and wait to publish until you say so.
Help me write a Spekkr spec. Ask what it should do before you draft anything. Then write spekkr.json, spec.md, design.md, and tasks.md. Give each requirement an id and one Accept when line, and say what is out of scope. Put every command the files tell you to run, and every secret the build reads, under safety. Run check_spec and fix every problem it reports. Show me that safety list. Do not call publish_spec until I say to publish.
Not connected yet? Set up your agent
Connecting Spekkr gives the agent tools, such as check_spec, and this text as a prompt named write_spec. Where your agent's app lists MCP prompts, pick it there. Anywhere else, paste the text above. Setup connects the agent to https://spekkr.com/mcp.
Publishing needs sign-in. Spekkr emails you a code. There is no password. Publishing makes the files public. Questions: support@spekkr.com.
Exact tool call
check_spec {"manifest": "<the text of spekkr.json>"}check_spec takes the text of spekkr.json. Nothing is saved. After the spec is published, another agent pulls it with pull_spec. A call that leaves every choice at the default is pull_spec {"id": "juno/waitlist"}.
FAQ
Does check_spec read spec.md?
Only when you send it. It always reads the text of spekkr.json and reports every problem. Send the text files too and it adds advice on them, such as a requirement with no Accept when line. Advice never stops a publish. The answer also names what it did not check: that every file and screenshot the manifest lists is in the folder, and that the folder is named after the id. publish_spec checks both.
Do the files have to be named spec.md, design.md, and tasks.md?
No. juno/waitlist and dwrtz/whiteboard use those names. A spec lists at least one file. The agent is told to read the files in that order.
Does Spekkr keep requirement ids stable?
No. check_spec sees the ids only in files you send it, and does not compare them with earlier versions. Keep an id when you publish a new version if a test, a task, or another requirement already names it.
Do I have to publish?
No. The folder is already a spec. Publishing needs sign-in and makes the files public.
Can the spec be something other than an app?
Yes. Set kind to what it builds, in your own words, up to 40 characters. Leave kind out and it means software, and targets.platforms then needs at least one of web, mobile, desktop, backend, or cli. juno/waitlist sets kind to app part.