Skip to main content
SPEC-DRIVEN DEVELOPMENT

What is spec-driven development, and where do the business rules in the spec come from?

Updated · By Adam Polak, founder

Spec-driven development (SDD) means writing a spec of what to build and why before any code, then having an agent plan, build and check its work against it. The spec is kept in the repo, as a Markdown file that Claude Code, Cursor or Copilot reads, or through a framework such as GitHub Spec Kit, Kiro or OpenSpec. The spec's business rules must come from whoever decides them, with anything unconfirmed left as an open question; RuleFoundry interviews that person and gives your agent the rules, each linked to where it was said.

Spec-driven development vs vibe coding, TDD and BDD

They answer different questions, and they combine: a spec's acceptance criteria make good first tests, and its business rules can become BDD scenarios.

ApproachWhat comes firstGood forWhere the business rules end up
Spec-driven developmentA spec: what to build and why, acceptance criteria, the rulesFeatures an agent builds and a reviewer checks against a written definitionIn the spec, if someone who knows them stated them
Vibe codingA prompt; you react to what the agent buildsPrototypes and small changes that are easy to undoWherever the agent guessed, until someone notices
Test-driven development (TDD)A failing test, then the code that makes it passGetting each behavior right in code, one test at a timeIn tests, once someone knows what to test
Behavior-driven development (BDD)Examples agreed with the business, as Given/When/Then scenariosRules the business must read and sign off, kept as executable testsIn feature files, one Rule per business rule

Spec-driven development tools and frameworks

From each one's docs. Spec Kit and OpenSpec run as skills in your coding agent; Kiro is its own agent; Tessl manages skills and standards, not feature specs.

ToolCommandsFilesWorks with
GitHub Spec Kit/speckit-constitution once, then /speckit-specify, /speckit-plan, /speckit-tasks, /speckit-implement and /speckit-converge, which checks the code against the spec. /speckit-clarify and /speckit-analyze are optional.spec.md, plan.md and tasks.md, in a folder under specs/Claude Code, Cursor, GitHub Copilot, Codex CLI and others, through integrations
KiroNone: start a spec from the Kiro pane, or choose Spec in the chat panerequirements.md (bugfix.md for a bug fix), design.md and tasks.mdKiro's own IDE, CLI, web and mobile apps, built by AWS
OpenSpecopenspec init, then /openspec-propose, /openspec-apply-change, /openspec-verify-change and /openspec-archive-changeA folder per change under openspec/changes/, with proposal.md, specs/, design.md and tasks.mdClaude Code, Codex, Cursor, GitHub Copilot and 30+ more, through skills
Tessltessl init, tessl search, tessl install and tessl updatetessl.json, the manifest of the skills a project installsClaude Code, Cursor, Gemini, Codex and Copilot, through MCP

From each tool's documentation, checked on 2026-11-30: Spec Kit v1.4.5, OpenSpec 2.2.0. For a longer comparison, see Birgitta Böckeler's Understanding Spec-Driven-Development: Kiro, spec-kit, and Tessl on martinfowler.com (October 2025).

  • AI made coding cheap. Clear business logic is still expensive.

    A coding agent builds what the spec says. Who approves a refund, above which amount, except when, still has to come from someone who decides it.

Get the rules before you write the spec

How spec-driven development works, step by step

The usual flow is specify, plan, tasks, implement, then check. It works with a Markdown file and any coding agent.

  1. 1

    Specify: what to build and why

    The goal, who it is for, what is in and out of scope, and acceptance criteria someone can test. Describe behavior, not code.

  2. 2

    Write down the business rules, with their sources

    Thresholds, exceptions, approvals, and which rule wins when two apply, each with who said it or which document it came from.

  3. 3

    List the open questions, and settle them with a person

    Anything nobody could confirm goes in a list, with who can answer it. Settle it with that person, not the agent, which tends to fill gaps with a guess.

  4. 4

    Plan: how to build it

    The agent proposes the design from the spec; review it before any code is written.

  5. 5

    Break it into tasks

    Small steps, each tied to an acceptance criterion or a rule.

  6. 6

    Implement against the spec, then check it

    Turn each acceptance criterion and rule into a test, and check the result against the spec, not the prompt.

  7. 7

    Keep the spec current

    When a rule changes, change the spec first, then the code. Birgitta Böckeler calls a spec written for one task spec-first, one kept to evolve the feature spec-anchored, and one that replaces editing the code spec-as-source.

Spec-driven development with Claude Code, Cursor or Copilot

Keep the spec as Markdown in the repo (say, specs/refund-approvals/spec.md), point the agent at it, and have it plan before it edits. For CLAUDE.md and AGENTS.md, see business rules for coding agents.

AgentHow it reads the specPlan before codeSpec Kit setup
Claude CodeReference it with @, such as @specs/refund-approvals/spec.md; Claude Code also adds the CLAUDE.md files in that folder and its parents.Press Shift+Tab until the status bar shows plan mode, or start with claude --permission-mode plan. It makes no edits until you approve.specify init --integration claude installs the /speckit-* skills in .claude/skills/
Cursor@-mention the file or folder in the chat, such as @specs/refund-approvals/.Shift+Tab in the chat input rotates to Plan Mode, which writes an implementation plan before any code.specify init --integration cursor-agent installs them in .cursor/skills/
GitHub Copilot in VS Code#-mention the file in Copilot Chat, or drag it from the Explorer into the Chat view.In a Copilot session, type /plan with the goal, or select Plan mode.specify init --integration copilot installs them in .github/skills/

From each tool's docs, checked on 2026-11-30. For OpenSpec, run openspec init, then /openspec-propose; version 2 replaced the 1.x /opsx:* commands.

What a good spec contains: an example to copy

A good spec fits on a page or two: the goal, the scope, acceptance criteria, the business rules with their sources, and the open questions. This example is made up.

Example spec

# Spec: Refund approvals in the support console

## Goal
Support reps issue refunds from the console, and refunds that need approval go to the right person.

## Scope
In: requesting a refund from an order page, routing it for approval, logging who approved it.
Out: partial refunds on bundles, changing the payment provider.

## Acceptance criteria
- A refund of $500 or less is issued without approval.
- A refund over $500 waits for a team lead, and the rep sees whose approval it is waiting on.
- A refund over $5,000 waits for a team lead and finance.
- An annual-plan refund more than 14 days after purchase is refused, with the reason shown.
- Every approval is logged with the approver and the time.

## Business rules
Build only from these. Each rule names its source.
- BR-1: A refund over $500 needs a team lead's approval.
  Source: Dana (support operations), interview 2026-11-12, 03:12: "anything over five hundred goes to a team lead"
- BR-2: A refund over $5,000 also needs finance approval.
  Source: Refund policy v3, section 2
- BR-3: Annual plans are refunded only within 14 days of purchase.
  Source: Dana, interview 2026-11-12, 05:40: "annual is fourteen days, no exceptions"

## Open questions
Do not guess these. Stop and ask if a task depends on one.
- Q1: Who approves a refund over $500 when the team lead is out? Owner: Dana
- Q2: Over $5,000, does finance approve after the team lead or in parallel? Owner: finance
- Q3: Is there a refund window for monthly plans? Owner: Dana

Two lines do most of the work: “Build only from these” tells the agent not to add rules of its own, and “Do not guess these” tells it to stop and ask. Agents don't always comply, so check the plan for any rule not on the list.

The weak spot: business rules nobody wrote down

Spec tools draft the spec from your description. Spec Kit's specify step is told to “make informed guesses”, record them under Assumptions and flag at most three questions; /speckit-clarify asks you up to five more. If the rule lives in someone else's head, nobody in the session can answer, and the guess stands. The first two lists are a made-up illustration.

Drafted from a one-line prompt

  • Refunds over $100 need manager approval.
  • Refunds are allowed within 30 days.
  • VIP customers are refunded automatically.

After asking who approves refunds

  • Refunds over $500 need a team lead's approval. (03:12: “anything over five hundred goes to a team lead”)
  • Annual plans are refunded only within 14 days. (05:40: “annual is fourteen days, no exceptions”)
  • Open question: who approves when the team lead is out?

Signs a rule was guessed

  • A round number nobody remembers choosing
  • No person or document named as its source
  • “Usually” or “typically” inside a rule
  • An exception no ticket or policy mentions

What to do instead

  • Ask whoever makes the decision, on a real case
  • Write each rule with who said it, or where it is written
  • List what nobody can confirm, with who can answer it
  • Tell the agent to stop and ask when a task depends on one

Where RuleFoundry fits: before you write the spec

RuleFoundry starts somewhere else than a spec tool: with an interview of whoever decides the rules, before the spec exists. It asks the follow-ups a good analyst would; you and your agent still write the spec and build.

  • Interview the expert

    RuleFoundry emails them a link; they talk it through in 10 to 60 minutes; you get the rules.

  • The rules land in a Project, each with its source

    Each rule cites the transcript lines it came from, and RuleFoundry checks that those lines actually say it. Rules are tentative until the expert confirms them, anything unsettled is listed as an open question, and when two people disagree the Project keeps both statements.

  • Your coding agent reads them while drafting the spec

    RuleFoundry's plugins connect Claude Code, Cowork, Cursor, Codex and GitHub Copilot, and its app runs in ChatGPT; each reads the Project's rules through RuleFoundry's MCP server. Ask: “Read our refund rules from RuleFoundry and write the business rules and open questions in specs/refund-approvals/spec.md, citing each rule's source.”

The outputs page shows a finished result, and the integrations page has the setup for each agent.

See it run

To try it on the next feature you spec, sign up and send an interview to whoever owns the decision, or add RuleFoundry to ChatGPT (how) and say:

Use RuleFoundry to interview [email protected] about how we decide which refunds need a team lead's approval.

When something else fits better

  • GitHub Spec Kit, for the same steps on every feature; its README calls it an open source toolkit of structured processes and reusable templates.
  • Kiro, for specs built into the agent; its site says it turns prompts into executable specs.
  • OpenSpec, for a light spec layer across many assistants; its site calls it a lightweight and configurable framework for software specifications.
  • Tessl, when agents need your team's standards more than a feature spec; its site calls it an agent enablement platform.
  • AGENTS.md or CLAUDE.md, for rules your team already knows; the AGENTS.md site calls it a simple, open format for guiding coding agents.
  • A PRD in Notion, Confluence or Jira, when people first need to agree what to build and why; Notion and Confluence offer PRD templates, and Atlassian's guide says a Jira work item can hold the spec.
  • BDD feature files (Gherkin), when rules should become executable examples; Cucumber's reference says a Rule represents one business rule that should be implemented.
  • RuleFoundry, alongside any of these, when the spec's business rules are still in someone's head and need asking for before the agent drafts the spec.

Descriptions of other products, formats and agent features come from their own websites and documentation, checked on 2026-11-30.

Questions people ask

Is spec-driven development just waterfall again?
It can drift that way. Waterfall specifies a whole project up front; spec-driven development writes a short spec for one change and updates it as you learn (OpenSpec lists “iterative not waterfall” as a principle). The risk is ceremony: three files for a one-line fix.
What is the difference between a PRD and a spec?
A PRD says what product to build and why: the problem, the users, how success is measured. A spec says what one change must do, precisely enough for an agent to build and a reviewer to check. A spec often starts from a PRD.
How does RuleFoundry work with Spec Kit or OpenSpec?
There is no special integration. Both run inside coding agents RuleFoundry connects to, such as Claude Code, Cursor and GitHub Copilot, so ask the agent to read the Project's rules through MCP while it writes the business-rules section.
Who can see the rules, and are they used for training?
Only members of your workspace can read a Project's knowledge base, and RuleFoundry does not use customer content to train models. The security page has the details.
What does it cost?
Your first Extraction (one interview or recording) is free; Personal is $20 a month for unlimited Extractions, and Team is $20 per active member a month with a two-seat minimum.

Related: business rules for coding agents, what a forward deployed engineer does, Agent Skills vs MCP, SME interview questions, PRD template and example, RuleFoundry facts.

What changed: 2026-12-01, the assistants that read RuleFoundry listed as on the integrations page; 2026-11-30, GitHub Copilot named as on the integrations page; 2026-11-30, first version.

Try it on one process

Your first Extraction is free.