NeuralOS
GuideIntermediate

Write the spec, not the code · spec-driven development with GitHub Spec Kit

There's a pattern that almost everyone building with AI runs into: at first you talk to it, code appears, it works, it's magic. But somewhere around the fifth or sixth feature the magic breaks — you ask for a small change and something else falls over, you explain how the login works for the third time \"because it forgot,\" and you open the project the next day with no memory of why half the files exist. The root problem isn't that the AI is dumb: it's that it has no memory of intent and guesses differently every time it fills a gap. Spec-Driven Development flips the order of vibe coding: before the AI writes a single line, you write the spec — what the app should do, in your own words — and that document becomes the single source of truth from which the agent generates plan → tasks → code, with your checkpoints in between. In this guide you'll see the tool that installs it as commands inside your own agent (GitHub Spec Kit, free and open source), the real 4-phase flow, the exact commands, and a single master prompt to kick off any spec-first project without turning into a programmer.

Jul 19, 202614 min
Who is this for?
For anyone who builds with AI by saying "make me this" and ends up with a Frankenstein: every feature patched on top of the last, nobody — not you, not the AI — remembers what the app is even supposed to do, and every change breaks something far away. If you've felt that the AI moves lightning-fast but toward no fixed destination, this is for you. You don't need to be a programmer: you need to learn to write the spec (the specification) and let the agent do the rest. It works with Claude Code, Copilot, Cursor, Gemini, and 30+ other agents.

The moment · when "just tell it what you want" stops working

At first vibe coding is magical. You talk to the AI, a screen appears, it works, you applaud. But there comes a point — almost always around the fifth or sixth feature — where the magic breaks. You ask for a small change and something you never touched falls over. You explain how the login is supposed to work for the third time "because it forgot." You open the project the next day and even you don't know why half the files exist. That's the moment: when the conversation stops being enough as a source of truth, and you need something sturdier than a chat with the memory of a goldfish.

Spec-Driven Development (SDD) is born exactly there. The idea is so simple it's almost offensive: before the AI writes a single line of code, you write down what the app should do — clear, organized, and saved to a file. That document, the spec, becomes the single source of truth. And from it, the agent generates a plan → a task list → the code. In that order. With your checkpoints in between.

The analogy · the blueprint before the bricks
Nobody builds a house by telling the bricklayer "start in that corner and we'll figure it out." First there's a blueprint: where the walls, the pipes, the windows go. The bricklayer is brilliant at laying bricks — just like your AI is brilliant at writing code — but with no blueprint, everyone improvises and the house comes out crooked. Vibe coding is building with no blueprint. SDD is drawing the blueprint first. And here the blueprint isn't a dead PDF: it's executable — the agent reads it and builds straight from it.

The pain · where the Frankenstein comes from

The problem isn't that the AI is dumb. It's that the AI has no memory of intent. On every message it makes the best decision for that message, with no complete picture of what you're building or why. You have that picture in your head — but your head isn't a document the agent can read. So the AI fills the gaps by guessing, and it guesses differently every time. One time the cart saves taxes, another time it doesn't. One time the user can edit their profile, another time the feature vanishes in a refactor. Nobody lied: there simply never was a contract that said what's correct.

Why it happens (and why it gets worse over time)
The chat is linear and it forgets. By line 200 of the conversation, what you decided at the start has already fallen out of the context window. The AI reconstructs your intent from the latest crumbs — and each reconstruction drifts a little further from the original, like a photocopy of a photocopy. The bigger the project, the more it degrades. That's why vibe coding feels incredible on day 1 and maddening by day 20: it's not that the AI gets worse, it's that the context evaporates and there was never an anchor outside the chat.

What happens if you don't fix this? It's not the apocalypse — it's a slow-motion accident. You end up with an app that almost works, impossible to explain to another person (or to next week's AI), where every fix carries its own odds of breaking something else. And those odds don't forgive: in a blog from this same series we walked through the math of 27% — an agent that's 85% right at each step only completes an eight-step flow 27% of the time (0.85⁸), because the hits multiply, they don't add up. Building blind chains together fragile steps in exactly the same way. The spec is what breaks that chain of fragility: it gives the AI a fixed point to verify each step against, instead of letting every step ride on the luck of the one before.

The solution · you flip the order (spec first, code after)

In vibe coding the flow is: you talk → code → (sometimes) you document. In SDD it flips completely: you specify → you plan → you generate tasks → code. Documentation stops being the forgotten leftover at the end and becomes the starting point. And it's not bureaucracy: each phase is an artifact the agent generates almost by itself from the previous one, with a checkpoint where you approve before moving on. You direct; the AI executes.

The analogy · the script before the shoot
A film isn't shot by improvising scene by scene. First there's a script (what happens), then a shooting plan (how and in what order it's filmed), then the shot breakdown (the day's tasks), and only then does the camera roll. If you change the script, everything else changes downstream — in an orderly way. SDD is that: the spec is your script, the plan is the shooting plan, the tasks are the breakdown, and the code is the shoot. The AI is a brilliant production crew that finally has a script.

The tool · GitHub Spec Kit

You don't have to invent this flow by hand. GitHub Spec Kit is an open source toolkit — from GitHub, free, MIT license — that installs SDD as a series of commands inside your AI agent. You write the spec in natural language; it gives you the structure, the checkpoints, and the commands for the AI to turn it into an app. It's one of the fastest-growing AI tools out there: 122,000 stars on GitHub, and its latest stable release, v0.13.0, shipped on July 17, 2026. It integrates 30+ agents — Claude Code, GitHub Copilot, Cursor, Gemini CLI, and whichever one you use.

github/spec-kit
REPO

GitHub's official kit for Spec-Driven Development. Installs a command flow (constitution → specify → plan → tasks → implement) inside your AI agent, so you build from an executable specification instead of improvising. Model-agnostic: works with 30+ agents.

PythonMITView on GitHub
Model-agnostic, just like this series' philosophy
Spec Kit doesn't lock you to a model. The spec is the valuable part and it's plain text — it lives outside the agent. If tomorrow you switch from Claude to Gemini, or from Copilot to Cursor, your spec is still valid and the new agent builds from it. The contract outlives the provider. That's exactly the principle we repeat throughout the library: what you organize (context, memory, spec) is yours; the model is swappable.

Installation · two commands and you're in

Spec Kit installs with uv, the modern Python package manager (fast, no drama). If you don't have uv, you install it first — one line. Then you install the Spec Kit CLI persistently, and initialize your project by choosing your agent. Don't be scared of the terminal: it's literally these commands, in order, and you won't touch it again for the real work (that happens inside your AI's chat).

bash
# 1) If you don't have uv (Python's package manager), install it:
curl -LsSf https://astral.sh/uv/install.sh | sh

# 2) Install the Spec Kit CLI persistently (pinning the stable version):
uv tool install specify-cli --from git+https://github.com/github/spec-kit.git@v0.13.0

# 3) See which agents you can choose (the exact value for the --integration flag):
specify integration list

# 4) Initialize your project by choosing your agent (here, Copilot as an example):
specify init mi-proyecto --integration copilot

# 5) Check whether there's a newer version (changes nothing, just reads):
specify self check
The `--integration` flag is the one that picks your agent
In specify init mi-proyecto --integration copilot, the value after --integration is your tool. Spec Kit ships 30+ integrations and keeps changing them between versions, so instead of memorizing the exact name, run specify integration list first and pick from that list the one you use (Copilot, Cursor, Gemini, Claude Code, etc.) — it's like asking for the menu before ordering, that way you never order a dish that's off. That init command creates the folder with the /speckit.* commands already wired inside your agent; from there on, all the work happens by talking to the AI, not in the terminal.

The protocol · Spec Kit's commands, in order

Once initialized, Spec Kit gives you a series of slash commands you type inside your agent. They're not magic: each one asks the AI to generate the next artifact in the flow. Order matters — it's a cascade where each step leans on the previous one. These are the real ones, exactly as they come in v0.13.0:

Spec Kit's commands (what each one does)
`/speckit.constitution` — defines your project's inviolable principles: rules the AI must NEVER break (e.g. "always validate user input," "no sensitive data in logs"). It's the constitution that governs everything else.
`/speckit.specify` — the spec: what you want to build, in natural language. Requirements and user stories. The heart of everything.
`/speckit.clarify` (optional) — the AI asks you questions about whatever stayed ambiguous in your spec, BEFORE planning. Closes gaps early.
`/speckit.plan` — the technical plan: the AI proposes the stack, the architecture, and how it's going to build the spec. You approve or correct.
`/speckit.tasks` — breaks the plan down into an actionable task list, ordered and concrete. The shot breakdown.
`/speckit.analyze` (optional) — checks that spec, plan, and tasks are consistent with each other before building. Catches contradictions.
`/speckit.checklist` — generates tailored quality checklists to validate that the requirements are met.
`/speckit.implement` — runs all the tasks and builds the app per the plan. This is where the camera finally rolls.
The order isn't decorative
Skipping the constitution or the spec and running straight to /speckit.implement is going back to vibe coding with extra steps. The cascade works because each artifact constrains the next one: the constitution bounds the plan, the plan bounds the tasks, the tasks bound the code. If you break the chain, the AI goes back to guessing. The discipline is in respecting the checkpoints, not in having the commands.

The real flow · 4 phases with your checkpoints

Put it all together, and this is what a project looks like end to end. Notice that at every boundary you review and approve before the AI moves on. That's the trick: it's not that the AI works alone with no brakes, it's that it works alone between checkpoints you control.

The 4-phase flow, with your role in each
Phase 1 · Constitution. You run /speckit.constitution and define the project's golden rules. Checkpoint: you read and confirm those principles are the right ones. Written once, governs forever.
Phase 2 · Specify (and clarify). You run /speckit.specify and describe what to build. Then /speckit.clarify so the AI closes ambiguities by asking you. Checkpoint: the spec says EXACTLY what you want, with no gaps.
Phase 3 · Plan and break down. /speckit.plan gives the technical plan; /speckit.tasks turns it into tasks; /speckit.analyze verifies it all hangs together. Checkpoint: you approve the stack and the tasks before any code is written.
Phase 4 · Implement. /speckit.implement builds. The AI runs the tasks one by one against the spec. Checkpoint: you use /speckit.checklist to validate that what got built meets the requirements.
The analogy · you're the director, not the camera operator
In a good production, the director doesn't hold the camera or swing the hammer. They read the script, approve the plan, review each filmed scene and say "this one's good, this one we do again." With SDD you do that: you don't write code or fight the syntax — you approve artifacts at the checkpoints. All the AI's horsepower, with your judgment at the points that matter. That balance is what people are after when they say "I want the AI to work on its own but without losing control."

The habit · when to write a spec and when not to

SDD isn't for everything. A one-line change, a color on a button, some copy — for that you just talk to the AI normally and you're done. Writing a spec for that would be like asking for architect's blueprints to hang a picture. The good habit is recognizing the threshold: the moment a task touches more than one file, has business rules, or you're going to come back to it next week — right there, spec first. And from then on, every big new feature is born from a spec, not from an impulse.

The exact moment it kicks in
The rule of thumb: if you catch yourself explaining the same thing to the AI a second time, or if you open the project and can't remember why a file exists — that's your reminder that a spec was missing. Don't beat yourself up: write the spec now, even if the code already exists. Spec Kit works just as well for new projects (greenfield) as for bringing order to one that's already a mess (brownfield).

The master prompt · kicking off a spec-first project

Here's the one prompt worth memorizing. It's the one you hand your AI (with Spec Kit already initialized) to start off right from minute one: it tells it to first set the constitution, then build the spec with you by asking what's missing, and to not write any code until you approve. Copy it, fill in the [brackets], and paste it to your agent at the start of any serious project.

Paste it to your AI · kicking off a spec-driven projecttexto
We're going to build this project with Spec-Driven Development using GitHub Spec Kit, which is already initialized. Do NOT write any code yet. Follow this flow with me, stopping at each checkpoint so I can approve before moving on.

My project is: [describe what you want to build and for whom, in 3-5 sentences].
What it must NOT do / my limits: [e.g. don't store credit cards, must work on mobile, no sensitive data in logs].

STEP 1 — CONSTITUTION. First of all, run /speckit.constitution and propose the inviolable principles for this project (security, input validation, consistency, whatever applies). Show them to me and wait for my sign-off.

STEP 2 — SPEC. Then run /speckit.specify and draft the specification from my description: clear requirements and user stories. After that run /speckit.clarify and ask me ALL the questions needed to eliminate ambiguity — don't guess, ask me. Don't move on until I say the spec is correct.

STEP 3 — PLAN AND TASKS. With the spec approved, run /speckit.plan and propose the stack and architecture (explain to me in plain terms why you chose each thing). Then /speckit.tasks for the breakdown, and /speckit.analyze to verify spec, plan, and tasks don't contradict each other. Show me everything and wait for my approval.

STEP 4 — IMPLEMENT. Only when I authorize it, run /speckit.implement and build. When you're done, generate a /speckit.checklist to validate that what was built meets the spec.

Golden rule throughout the process: the spec is the single source of truth. If any of the code drifts from the spec, the spec wins — or you flag it so we update it together. Never change behavior silently.
The detail that makes the difference
The phrase "don't guess, ask me" in Step 2 is the most important in the whole prompt. It's what turns the AI from a gap-filler into a collaborator. Most vibe coding bugs are born from a silent assumption you never questioned. /speckit.clarify exists precisely for that: to drag those assumptions into the light before they become code.

The easiest paths · what you do by chat and what by command

So you don't get lost: almost everything happens by talking to your AI. You touch the terminal exactly once (install and initialize). The /speckit.* you type inside your agent's chat, like any other message. And the spec you write in your own words — not in code. Here's the split:

Task split
By terminal (just once): install uv, install specify-cli, see the agents with specify integration list, run specify init mi-proyecto --integration <your-agent>, and specify self check to confirm you're up to date. That's it — you don't go back to the terminal.
By chat with your AI (the real work): all the commands /speckit.constitution, /speckit.specify, /speckit.plan, /speckit.tasks, /speckit.implement. You type them as normal messages.
In your own words (what you bring): the project description, the answers to /speckit.clarify's questions, and the approvals at each checkpoint. Zero code from you.
Save the spec in git: the spec and the constitution are text files. Commit them. They're the project's most valuable asset — more than the code, which can be regenerated from them.
Don't confuse fast with directed
SDD feels slower at first — you're "writing documents" instead of seeing code instantly. It's an illusion. That time invested in the spec saves you the five rounds of "no, that's not what I meant" that come later in vibe coding. You go slower at kilometer 1 and much faster — with no crashes — from kilometer 2 onward. Real speed isn't code per minute, it's finished, correct app per week.

Where this comes from (this series' evolution)

If you've followed the library, this doesn't sound new — it's the next step up. The C-A-R protocol taught you to separate building from auditing so you don't ship bugs. The design system resource taught you to lock the visual rules before the first screen. Both share one idea: decide the contract before you execute. SDD takes that idea to its purest form: the spec is the contract, and it's the single source of truth for the whole app — design, logic, behavior. You go from "organize your context" to "write the contract and let the AI fulfill it."

In NeuralOS, you're already building against a contract
There's a doctrine that governs how NeuralOS is built on the inside, and it's exactly this philosophy: the frontend is the source of truth. The design and the interface define the contract — what should exist and how it behaves — and the backend only fills that contract; it never invents on its own. It's SDD applied to a real product: first you specify what the user sees and expects, and everything else is built to fulfill it. When you talk to NeuralOS's orchestrator chat to build your app, that contract-first discipline is what works invisibly underneath so that what you ask for is what you get — without you having to set up the command cascade yourself.
The C-A-R protocol · building without bugs
This resource's big brother: separate building from auditing. The spec tells you WHAT to build; C-A-R makes sure what got built is right.
Create your design system BEFORE building
The same idea applied to design: lock the visual contract before the first screen. The spec and the design system are two sides of the same principle.
#spec-driven-development#spec-kit#github#vibe-coding#prompt#arquitectura
Ready to build?

Start building in
under 3 minutes

Join 4,200+ builders. No credit card. Build your first app with AI in minutes.