§ Start here

Specgraph SDD.

Spec-Driven Development (SDD) is the methodology at the core of Specgraph. It turns product ideas into validated, AI-ready specifications before a single line of code is written — and it works equally well for new builds and for extending existing systems.

What is Spec-Driven Development?

SDD is a development discipline where a complete, multi-department specification is produced and approved before implementation begins. The key difference from traditional documentation: the spec is not written for humans to read after the fact. It is structured so AI coding agents can consume it directly and implement it precisely.

Traditional approaches break down in two ways. Waterfall specs go stale the moment a team starts building. Agile teams skip the spec entirely and pay for it in mid-sprint pivots. SDD sits in neither camp — it uses AI to make the specification process fast enough to be practical, and structured enough to drive implementation without interpretation.

Product Idea
Vision · Scope · Users
governed phases
Validated Spec
Requirements · Architecture · Tests
handoff pack
Agent Build
Stories · Reviews · Done

The spec is the contract. The agent implements it. A different model reviews the result.

The governed specification method

Specgraph organises the specification into sequential, department-owned phases. Each phase is completed through an AI-led interview — the model asks questions, you answer, and the answers are structured into the spec automatically.

A phase cannot move forward until its owner approves it. Locking a phase makes it immutable for all downstream phases. Any subsequent change requires a formal amendment — which is tracked, audited, and routed to the right reviewer.

P-01Vision & Scope
P-02Features & Stories
P-03Product Brief
P-04Design & UX
P-05Architecture
P-06Quality & Testing
P-07Security & DevOps
P-08Handoff Check

Each department sees only what it owns. Business shapes the vision; Product writes the requirements; Engineering designs the architecture. Nobody gets to skip phases because the tool enforces the gate. When P-08 (Handoff Readiness) is green, the full handoff pack is generated and the MCP server begins exposing stories to coding agents.

Building new projects — Greenfield

A greenfield project starts with a single intake conversation. Specgraph asks about your idea — who it's for, what problem it solves, what success looks like, and what is explicitly out of scope. From that conversation, Vision & Scope (P-01) is pre-filled and the specification journey begins.

The AI then guides each subsequent phase as an interview: it asks the right questions for that phase's department, you answer in natural language, and it structures the output. No templates to fill in, no blank pages to stare at.

Intake Chat
Idea · Users · KPIs · Scope
AI interview
Governed Spec
8 phases · Handoff pack
MCP handoff
Agent Loop
Stories · Reviews · Ship

Because every decision is captured in the spec before coding starts, the implementing agent operates with full context — business rationale, data model, test strategy, security model — before touching a single file. Teams that use SDD for greenfield projects report significantly fewer mid-sprint pivots: the alignment happens at spec time, not in a PR comment at 11 pm.

Evolving existing systems — Brownfield

Legacy systems often have no spec at all — the architecture lives in engineers' heads and tribal knowledge disappears every time someone leaves. Specgraph's discovery skill solves this by reverse-speccing an existing codebase in one automated pass.

Point Specgraph at your repository and it reads routes, schemas, auth flows, API contracts, and test files — then auto-populates a first-draft spec across every phase, flags gaps it found, and surfaces inconsistencies between what the code does and what the comments say it should do.

The team then reviews each section, corrects the AI's inferences, and fills in the gaps. Once the spec is validated, adding a new feature follows the same governed flow as a greenfield project — but the agent also has full context about the existing system, so it won't break what's already there.

Existing Codebase
Routes · Schemas · Tests
discovery scan
Validated Spec
Ingested · Reviewed · Extended
agent via MCP
New Feature
Built · Reviewed · Merged

When stakeholders request future changes, the wish & amendment workflow lets them propose changes against locked phases formally — no more ad-hoc Slack messages that never make it into the spec. The implementing agent picks up new stories automatically once amendments are merged.

Why it produces precise implementation

A vague prompt produces a vague implementation. SDD removes vagueness at every layer of the stack:

Numbered acceptance criteria
Every story has Given/When/Then ACs. The implementing agent knows exactly when the story is done; the reviewing agent checks against the same list. There is no room for 'I thought you meant…'
Explicit constraints in CLAUDE.md
Critical rules — never expose PII, use the existing auth middleware, follow the folder convention — are surfaced to the agent at context-load time, not buried in a wiki page nobody reads.
Independent review gate
A different LLM reviews the implementation against the story spec. This cross-model check catches regressions and misunderstandings that the implementing agent would never self-report.
Stable story keys
Stories have stable IDs (EP-01-ST-01, …). Amendments add new stories rather than mutating existing ones — so mid-build changes don't invalidate in-flight work or confuse the agent mid-sprint.

Skills used for implementation

Specgraph relies on two layers of skills: the spec-building skills that fill and validate each phase, and the agent skills that coding tools use at implementation time via the MCP server.

Spec-building skills

AI Interviewall phases

The primary input method for every specification phase. The AI asks targeted questions for that department, structures your answers, and populates the phase fields automatically.

Discovery scanbrownfield only

Reads a repository — routes, schemas, auth flows, test files — and produces a first-draft spec across all phases. Flags gaps and surfaced inconsistencies for human review.

Improve menuany text field

One-shot AI rewrite triggered from any text field. Useful for polishing a vision statement, clarifying an acceptance criterion, or tightening an architecture decision.

Wish & amendmentlocked phases

Lets stakeholders propose changes against approved phases. Each amendment is reviewed, merged into the spec, and automatically generates new stories for the agent to pick up.

Agent MCP tools

Once connected to the MCP server, a coding agent (Claude Code, Cursor, Cline, …) has access to these tools. They are the only interface between the agent and the spec — no direct database access, no file mutations outside the story scope.

get-next-storyReturns the next ready-for-dev story with full context: tasks, ACs, related spec sections, and CLAUDE.md rules.
get-storyFetch a specific story by its stable key (e.g. EP-02-ST-04). Useful when resuming interrupted work.
update-story-statusTransition a story through its lifecycle: ready-for-dev → in-progress → review → done. Failing review loops back to in-progress.
add-dev-noteRecord files modified, test results, and blockers against the current story. Feeds the live Progress board.
list-storiesView all stories across every epic with their current status. Used by the agent to plan its sprint and pick up work in priority order.
story lifecycle·ready-for-devin-progressreviewdone·review fail loops back to in-progress