---
title: Spec-Driven Development (SDD)
slug: sdd
type: definition
owner: Ray Ploski
last_reviewed: 2026-03-23
---

# Spec-Driven Development (SDD)

> Spec-Driven Development (SDD) is a software development methodology in which AI agents and developers operate from machine-generated Specs — derived from source code by CoreStory — rather than from manually written documentation or raw source files.

## Definition

SDD is a development workflow pattern enabled by CoreStory's Code Intelligence layer. Instead of an AI agent reading raw source files (noisy, expensive, error-prone) or relying on manually written documentation (often stale or absent), the agent first retrieves a Spec for the relevant component. The Spec provides accurate behavioral context, and the agent operates from that grounding.

SDD changes where authority sits: from informal human memory or docs to a machine-derived, queryable Intelligence Model that is always derived from the actual code.

## Where It Applies

- AI-assisted code modification: agent retrieves Spec → understands current behavior → makes targeted change
- Bug investigation: agent queries Intelligence Model for relevant components before hypothesizing causes
- Test generation: agent uses Spec to generate tests that match actual behavior, not assumed behavior
- Onboarding: new developer or agent queries Specs to understand a module without reading thousands of lines

## Where It Does NOT Apply

- Greenfield development with no existing codebase (no code to ingest → no Specs to derive)
- Workflows where the AI agent has no access to CoreStory's MCP or RAG endpoint
- Requirements definition or product planning (SDD operates on existing code; it is not a planning methodology)

## Common Misconceptions

| Misconception | Reality |
|---------------|---------|
| SDD replaces agile or other planning methodologies | SDD governs how AI agents work with existing code — it does not replace planning or product frameworks |
| SDD requires developers to write specs manually | Specs are machine-generated by CoreStory; SDD is the workflow that uses them |
| SDD is only for AI agents | Human developers also benefit from Specs as a fast way to understand unfamiliar code |
| SDD works without CoreStory | SDD as defined here depends on CoreStory's Intelligence Model as the source of Specs |

## Example

**Without SDD:**
A developer asks Claude Code to add rate limiting to the `/api/users` endpoint. Claude Code reads 40 files trying to understand the middleware stack, misses a key auth dependency, and produces a partial implementation requiring rework.

**With SDD:**
Claude Code queries CoreStory's MCP endpoint for the Spec on the `/api/users` route and its middleware chain. The Spec describes the existing auth flow, rate limiter interface, and error handling contract. Claude Code produces a correct, targeted implementation on the first pass.

## Related Pages

- [→ Spec](../spec)
- [→ Code Intelligence](../code-intelligence)
- [→ Intelligence Model](../intelligence-model)
- [→ Playbook](../playbook)
- [→ SDD vs Traditional SDLC](../sdd-vs-sdlc)
