
Spec-driven development with Claude Code, past one session
Spec-driven development with Claude Code saves the requirements, the plan and the task list as three files before any code, so a fresh session or a second agent builds from them.
Spec-driven development with Claude Code puts the plan on disk
Spec-driven development with Claude Code means the requirements, the technical plan and the task list go into three Markdown files in the repo before Claude Code edits any source. Each tool names them its own way. GitHub's Spec Kit calls the phases Specify, Plan, Tasks and Implement, and FredAntB's Claude skill writes requirements.md, design.md and tasks.md.
I care about the disk more than the format. Claude Code compacts its history as a session grows, and /clear wipes it outright, taking any plan that lived only in the chat. A file survives both. A fresh session or a reviewer that starts later reads the same words I approved.
I read and approve the spec before any build starts. After that, every review checks the diff against the spec, and whatever the build chat decided along the way carries no weight.
A spec on disk, not plan mode, once a second session picks up the work
Plan mode in Claude Code drafts a plan inside one session, and the Show HN thread for sddw asked for benchmarks proving a written spec beats it. I have no benchmark. For a single change I finish in one sitting, I use plan mode, because it's faster and the plan sits right above the code it describes.
Once the work outlives the session, I switch. If I /clear between planning and building, or hand the build to a subagent with a clean context, an unsaved plan is gone, and a saved plan is a spec with a worse name. Most of my features cross that line, since I build and check the work in fresh contexts on purpose.
The sharpest objection in that thread was "A detailed-enough spec is just code that you can't run." For a spec that dictates function names and file layouts, I agree. Mine describe behavior and the checks that prove it, and the builder picks the code. If one of my specs starts naming functions, I've written the code twice and I cut half of it.
What goes into a spec Claude Code builds from
A spec in my repo is one Markdown file per feature, such as docs/checkout-redesign.md, holding a plain-words title, the intent, an out-of-scope list, the decisions and the acceptance lines. My planning skill's brief says to write for a builder who can never ask a question. I know no better single instruction, because the builder, the test writer and the reviewers all work from this file, and a gap in it becomes a guess in the code.
Each acceptance line is a behavior a person could check in the running app, such as "a member without admin rights sees the button disabled". The builder reads the list as its definition of done, the test writer turns each line into a test, and QA walks the list in a browser. I notice a vague line early, because nobody downstream can test it.
The out-of-scope list earns its place too. Agents fill silence with features, and a line like "no bulk edit in this change" saves me a review round. Rules that hold for every spec, such as the stack and naming, stay out of it. They live in CLAUDE.md and .claude/rules, which I share across the team like code.
Spec-driven development frameworks for Claude Code
GitHub's Spec Kit, the sddw plugin and FredAntB's skill each bring spec-driven development to Claude Code, and each writes its own set of files before the build. DataCamp's tutorial sets Spec Kit beside Superpowers and the BMAD Method if you want a second comparison.
| Option | What it writes | How the build runs |
|---|---|---|
| GitHub Spec Kit | A spec, a plan and a task list through its Specify, Plan and Tasks commands | Implement hands the task list to your coding agent |
| sddw | Staged specs for requirements, code analysis and design | Subtasks one at a time, with the context cleared between steps |
| FredAntB's skill | requirements.md, design.md and tasks.md, after it interviews you | In Claude Code, Cursor, Windsurf, Copilot or Aider, through instruction files it generates |
| Claude Code with your own spec skill | Whatever your template says, such as one spec file per feature | Subagents you define in .claude/agents, each in a clean context |
I use the last row. Spec Kit is a fair default for structure on day one, though DataCamp counts nine slash commands, which feels like a lot of ceremony for a small change. My planning skill is about 240 lines of Markdown across two files, and I edit it the day a phase annoys me.
Every row assumes one developer approving one spec at a time. None of them covers five features building at once, or who answers an agent that stops mid-build with a question while its developer is away.
Where a spec breaks once a team runs it
Augment Code's guide names four ways spec-driven development with Claude Code fails on a team, and spec drift and test masking are the two I hit first.
- Spec drift. The agent skips an instruction, or a decision made mid-build overrides the spec without anyone noticing. My reviewers read the spec and the diff, never the build chat, so drift comes back as a finding with a line number.
- Test masking. An agent that writes both the code and its tests can write tests that pass whatever it wrote. My test writer runs in its own context from the acceptance lines, so the tests come from the spec.
- Context exhaustion. A long build fills the window, and compaction drops the early decisions. Each of my phases starts fresh and reads the spec from disk.
- Verification bottleneck. Someone still has to look. Approving the spec is my one required gate, and after it I see only the questions an agent can't answer from the spec and the pull requests ready to read.
How spec-driven development works in Aldena
Aldena runs spec-driven development as a chain of agents, where a requirements agent writes the spec to a stable docs path and a delivery agent drives the build from it. Both come from the agent roster a team hires into a project. The requirements agent first runs a clarifying round with me on goals, scope, edge cases, data shapes and personas. Then it writes the spec as atomic user stories with acceptance criteria, and it never writes code or commits. The intake agent routes my request to it and hands the finished spec, with its path, to the delivery agent.
The delivery agent drives the spec through architecture, build, tests, review and fixes, one delegate at a time, along the delegation links a team draws on the org chart. Review and fix repeat for up to two rounds. Each build agent implements from the spec path it's given, so it reads the file itself. The delivery agent then opens the pull request as the Aldena GitHub app and never merges it.
Each conversation runs Claude Code in its own sandbox, on each member's Claude plan or, with the project's shared runtime on, the team's Anthropic key, and two isolated projects never share a filesystem. A spec skill I already keep in my repo comes along too, since a project imports the skills, agents and commands from one branch of a GitHub or Bitbucket repository, out of the .agents, .claude and .cursor folders.
Aldena's own default pipeline, the full run from plan to deploy watch, isn't shipped as a product yet. I still ship Aldena with the .claude/ pipeline in its repo, and the agents above are the parts of that flow Aldena ships today.
When an agent can't answer something from the spec, its question lands in the team inbox, grouped by project and oldest first. Any member can answer it within the seven days a question waits, so the developer who wrote the spec doesn't have to be the one online.
Ready when you are
Spin up your first project.
One project per client, product, or piece of work, staffed with intake, requirements, build and code review agents.