AI

OpenSpec: AI-Native Specification-Driven Development Framework with 37K GitHub Stars

OpenSpec is an AI-native specification-driven development framework that helps developers and AI assistants agree on what to build before writing code.

Keeping this site alive takes effort — your support means everything.
無程式碼也能輕鬆打造專業LINE官方帳號!一鍵導入模板,讓AI助你行銷加分! 無程式碼也能輕鬆打造專業LINE官方帳號!一鍵導入模板,讓AI助你行銷加分!
OpenSpec: AI-Native Specification-Driven Development Framework with 37K GitHub Stars

The biggest problem in AI-assisted software development is not code quality – it is alignment. AI coding assistants are remarkably good at generating code, but they are equally good at generating code that does not actually solve the user’s problem. They misinterpret requirements, hallucinate features, and build elaborate solutions for problems that do not exist. OpenSpec tackles this alignment problem head-on with a specification-driven development (SDD) framework that has attracted over 37,000 GitHub stars.

Created by Fission AI, OpenSpec is built on a simple but transformative premise: developers and AI assistants should agree on what to build before a single line of code is written. The framework enforces a five-step workflow – spec, plan, code, review, commit – that mirrors the structured thinking of professional software engineering but executes at AI speed. Every step produces artifacts that both human and AI can inspect, critique, and refine.

What sets OpenSpec apart from other AI coding frameworks is its emphasis on “spec-first” development. Rather than treating the specification as a disposable prompt that vanishes after code generation, OpenSpec treats the spec as a living document that persists, evolves, and serves as the ground truth for the entire development lifecycle. This approach eliminates the “hallucination tax” that plagues prompt-driven development, where the AI confidently builds features that were never requested.


How Does OpenSpec’s Five-Step Workflow Work?

OpenSpec’s core innovation is its structured, gated workflow. Each step produces specific artifacts, and the process stops if any gate fails.

StepWhat HappensArtifact ProducedAI Role
SpecWrite detailed specification with AI collaborationspec.md with acceptance criteriaAsks clarifying questions, suggests edge cases
PlanMap out file changes and architectureplan.md with file-by-file change listAnalyzes existing codebase, proposes implementation order
CodeExecute the plan line by lineModified source filesWrites code with automatic guardrails
ReviewAI reviews its own output against specreview.md with pass/fail per requirementSelf-critiques, identifies spec violations
CommitGenerate structured commit messageCommit with changelogSummarizes changes, links to spec sections

The spec step is where most of the value is created. OpenSpec’s guided specification process prompts the developer to think through edge cases, error handling, and acceptance criteria before the AI writes any code. This upfront investment pays dividends by preventing the most common failure mode of AI coding: building the wrong thing.


How Do Delta Specs Keep the Workflow Iterative?

One concern with spec-driven development is that specifications become ossified. OpenSpec solves this with the concept of “delta specs” – lightweight updates that describe only what changed from the previous specification.

ConceptFull SpecDelta Spec
LengthComprehensive document2-5 paragraphs
ScopeEntire feature or moduleSpecific change only
ContextProvides full requirementsReferences prior spec sections
Best forNew features, initial implementationBug fixes, scope adjustments, refinements

Delta specs keep the workflow agile. Instead of updating a monolithic specification document, developers write small, targeted delta specs that describe what changed and why. The AI merges the delta into its understanding of the full specification automatically, maintaining a complete picture without manual document rewrites.


What AI Tools Can You Use with OpenSpec?

OpenSpec is intentionally tool-agnostic, designed to work with any AI coding assistant that can execute shell commands.

ToolIntegration MethodStrengths with OpenSpec
Claude CodeCLI-based, runs OpenSpec commandsBest spec writing assistance, natural language refinement
CursorTerminal within IDESeamless context switching between spec and code
WindsurfCLI with editor integrationGood for pair programming with OpenSpec guardrails
AiderCLI with Git integrationStrong for existing codebase refactoring with specs
Any LLM CLIManual spec file editingWorks with any tool, no lock-in

OpenSpec communicates through file-based specification documents rather than tool-specific APIs. This means you can start a project with Claude Code, switch to Cursor for debugging, and finalize with Aider – all while maintaining specification continuity. The spec files in your repository serve as the shared ground truth across all tools and team members.


How Does OpenSpec Compare to Other Approaches?

The AI coding landscape has fragmented into competing methodologies. OpenSpec occupies a specific niche at the intersection of rigor and speed.

ApproachExample ToolsSpec RigorSpeedBest For
Prompt-drivenChatGPT, direct promptingLowFastQuick scripts, prototypes
Agentic loopClaude Code, Cursor AgentMediumFastComplex multi-file tasks
Spec-driven (SDD)OpenSpecHighMediumProduction features, team projects
TDD + AITest-focused workflowsVery highSlowMission-critical systems

OpenSpec’s sweet spot is production features where correctness matters but speed is still important. The framework’s structured approach reduces the “back-and-forth” cost of AI coding by catching misalignments early in the spec phase, before any code is written.


FAQ

What is OpenSpec? OpenSpec is an AI-native specification-driven development (SDD) framework that helps developers and AI assistants agree on what to build before writing code. It has over 37,000 GitHub stars and uses a structured workflow: spec, plan, code, review, and commit. The framework prevents the common failure mode where AI assistants generate code that looks plausible but does not actually solve the right problem.

How does OpenSpec work? OpenSpec enforces a five-step workflow: (1) Spec – write a detailed specification with the AI, (2) Plan – generate an implementation plan with file changes mapped out, (3) Code – execute the plan line by line with automatic guardrails, (4) Review – AI reviews its own generated code against the spec, (5) Commit – generate a structured commit message. This gated process prevents scope creep and catches hallucinated features.

What AI tools does OpenSpec support? OpenSpec works with Claude Code, Cursor, Windsurf, Aider, and any other AI coding assistant that can run shell commands. The framework is AI-tool-agnostic – it communicates through file-based specification documents rather than tool-specific APIs. Developers can switch between AI tools mid-project while maintaining specification continuity.

How do I install OpenSpec? Install via npm: ’npm install -g openspec’ or use it as a CLI tool. You can also add it to your project: ’npm install –save-dev openspec’. Initialize with ‘openspec init’ and start a session with ‘openspec start’. The minimal version requires Node.js 18+.

What is a delta spec in OpenSpec? A delta spec is a lightweight specification update that describes only the changes from the previous specification. Rather than rewriting the entire spec document for each iteration, developers write delta specs that capture what changed and why. This keeps the specification history intact and allows the AI to understand the evolution of requirements.


Further Reading

TAG
CATEGORIES