---
title: "Spec-driven development with Claude Code, past one session"
description: "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."
url: "https://aldena.ai/blog/spec-driven-development-with-claude-code"
---

# Spec-driven development with Claude Code, past one session

Published 2026-12-02.

## 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](https://github.blog/ai-and-ml/generative-ai/spec-driven-development-with-ai-get-started-with-a-new-open-source-toolkit/) calls the phases Specify, Plan, Tasks and Implement, and [FredAntB's Claude skill](https://github.com/FredAntB/Spec-Driven-Development) 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.

![Four phases of spec-driven development with Claude Code, each writing a file: specify writes spec.md, plan writes plan.md, tasks writes tasks.md, and implement reads all three, with a human approval gate after the spec and a clear of the context before the build](https://cdn.aldena.ai/images/blog/spec-driven-development-with-claude-code-1-20261202.png)

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](https://news.ycombinator.com/item?id=48231575) 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.

![Plan mode compared with a spec on disk: in plan mode the plan lives in one session's context and is gone after a clear, while a spec file on disk is read by a planning session, a build session and a review session in turn](https://cdn.aldena.ai/images/blog/spec-driven-development-with-claude-code-2-20261202.png)

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](https://aldena.ai/blog/claude-code-verify-its-own-work) 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](https://aldena.ai/blog/share-claude-code-rules-across-a-team) like code.

![The sections of one spec file, docs/checkout-redesign.md: title, intent, out of scope, decisions and acceptance, with the acceptance lines highlighted and arrows to the three readers that use them, the build, the tests and QA](https://cdn.aldena.ai/images/blog/spec-driven-development-with-claude-code-3-20261202.png)

## 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](https://www.datacamp.com/tutorial/spec-driven-development-with-claude-code) 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](https://www.augmentcode.com/guides/claude-code-spec-driven-development) 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.

![Four ways a spec breaks on a team and the fix for each: spec drift is caught by a reviewer that reads the spec and the diff, test masking by a separate test writer working from the acceptance lines, context exhaustion by a fresh context per phase, and the verification bottleneck by one approval on the spec](https://cdn.aldena.ai/images/blog/spec-driven-development-with-claude-code-4-20261202.png)

- **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](https://aldena.ai/features/agents) a team hires into a project. The [requirements agent](https://aldena.ai/agent/ai-business-analyst) 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](https://aldena.ai/agent/ai-engineering-manager).

![An intake agent chat where Alex asks for a checkout redesign, the intake agent hands the work to the Requirements agent, which reports the spec ready at docs/checkout-redesign.md with acceptance criteria and one open question, and the intake agent then hands the build to the Delivery agent and its subagents](https://cdn.aldena.ai/images/features/org-chart/hand-off-20261111.png)

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](https://aldena.ai/features/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](https://aldena.ai/integrations/github) 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](https://aldena.ai/features/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.

![Aldena team Inbox with 3 chats that need a person, grouped by project: checkout-web with a Requirements agent question waiting 6 minutes and a Project Setup approval behind it, then status-page with 1 chat](https://cdn.aldena.ai/images/blog/claude-code-in-the-cloud-5-20261112.png)

When an agent can't answer something from the spec, its question lands in the [team inbox](https://aldena.ai/features/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.
