Faisalaffan Blog
Faisalaffan Blog
Engineering16 min read

OpenSpec: Stop 'Vibe Coding', Give AI a Clear Roadmap

Vibe Coding is like asking a contractor to build a house without a blueprint โ€” the result? Chaos by the third month. OpenSpec arrives as an 'architectural blueprint' for AI coding, shifting the paradigm from random chatting to structured Spec-Driven Development.

Faisal Affan
Faisal Affan
Published
Gallery
1 / 3

OpenSpec: "Architectural Blueprint" for AI Coding

"A wise man builds his house on rock, not on sand." โ€” A universal proverb that also applies to software engineering

TL;DR

OpenSpec is an open-source framework from Fission AI that forces AI to read the blueprint first before starting to build. Instead of back-and-forth chatting without a plan (vibe coding), OpenSpec transforms how AI works into something structured, predictable, and safe for large-scale projects.


The Problem: Why "Vibe Coding" Is Like Building a House Without a Blueprint?

Imagine hiring a contractor to build a house. But instead of giving them an architectural blueprint, you just say:

"Build a room over there. Oh yeah, add a kitchen too. Hey, make it a sliding door instead."

At first it's fine. The room is done, the kitchen is done. But by the third month:

  • The kitchen water pipe crashes into the room's foundation ๐Ÿ’ฅ
  • The contractor forgot you asked for a sliding door, so they installed a regular door
  • Want to renovate? The new contractor has no idea why the wall was built at an angle โ€” the old contractor is gone

This is exactly what happens with vibe coding. You chat with AI, ask for code here and there, everything goes smoothly... until the project grows. Then:

The Complexity Wall

Many projects built purely with vibe coding reportedly hit the "complexity wall" by the third month. Adding new features ends up breaking what already works โ€” because no one recorded why the code was written that way.


The Solution: Spec-Driven Development โ€” Give AI the Blueprint First!

Spec-Driven Development (SDD) is the opposite of vibe coding. Its philosophy is simple:

Don't tell AI to write code before there's a clear specification.

If vibe coding is "chat โ†’ code โ†’ hope it's right", then SDD is "write intent โ†’ validate โ†’ then code".

graph LR
    subgraph VC["โŒ Vibe Coding"]
      A["Chat with AI"] --> B["AI writes code"]
      B --> C["Check, wrong"]
      C --> A
    end
    subgraph SDD["โœ… Spec-Driven Dev"]
      D["Write specification"] --> E["Review & validate"]
      E --> F["AI writes code per spec"]
      F --> G["Archive & update spec"]
    end
    style VC fill:#450a0a,color:#fca5a5
    style SDD fill:#052e16,color:#86efac

And at the forefront of this SDD movement stands a platform called OpenSpec.


What is OpenSpec?

OpenSpec is an open-source framework built by Fission AI that serves as a universal planning layer between human intent and AI execution.

The analogy: if an AI coding agent is the contractor, then OpenSpec is the architect's desk where blueprints are drawn, validated, and stored โ€” before hammer and nail are touched.

PropertyTypeDescription
Core Philosophy Design Philosophy Brownfield-first โ€” optimized for projects that are ALREADY running, not new projects from scratch
Technology Tech Stack TypeScript (98.7% codebase), distributed via CLI (npm/pnpm/yarn/bun)
Compatibility Integration Agnostic โ€” supports 20+ AI agents: Claude Code, Cursor, Codex, Windsurf, Gemini CLI, etc.
Core Principle Core Principle Specifications are the source of truth, NOT code. Code can be replaced, specs are maintained.
No Vendor Lock-in

OpenSpec doesn't need a special API key or closed protocol. All specifications live inside your Git repository, side by side with your code. Moving from Claude to Gemini? The specs stay the same.


Foundation of Thought: Where Did This Idea Come From?

๐Ÿ—๏ธ Intentional Programming โ€” An Old Idea Now Relevant Again

In the 1990s, Charles Simonyi from Microsoft had a vision: domain expert intent should be the primary artifact, not code. Code is just a "side effect" of that intent.

The problem? Back then there was no technology that could translate natural language intent into code. Now there is โ€” it's called LLM.

OpenSpec revives this vision: Markdown specifications are not just passive documentation, but executable representations of intent for AI.

When the cost of writing code becomes cheaper (because of AI), the source of truth automatically shifts UPWARD โ€” from code to functional intent.

๐Ÿงฉ From Prompt Engineering to Context Engineering

Prompt Engineering is tactical โ€” focused on one instruction, one iteration. Like texting a contractor: "Build a room, okay."

Context Engineering is strategic โ€” building a long-term reasoning landscape. Like handing over a complete playbook: building standards, blueprints, guardrails, and success criteria.

OpenSpec forces developers to break their thinking into manageable blocks:

  • Feature intent โ€” what needs to be achieved
  • Architecture decisions โ€” why it was designed that way
  • Testing standards โ€” how to know this works
  • Guardrails โ€” what AI MUST NOT do

The result? Prompts to AI become very simple, and the output shifts from "creative guesses" to "predictable algorithmic output".

๐Ÿ“ Requirements Engineering Rises Again

In the Agile era, requirements documentation was often minimized. "Working software over comprehensive documentation," says the Agile manifesto.

But AI reverses this! LLMs need unambiguous instructions and strict hierarchical boundaries. Without them, AI will fill the gaps with its own assumptions โ€” also known as hallucinations.

OpenSpec brings back the discipline of Requirements Engineering: every intent is articulated specifically, reviewed by humans, and validated by machine before AI is allowed to write code.


Architecture: Two-Folder Model

OpenSpec's most important innovation is the physical separation between "current truth" and "change plans". Imagine it like this:

  • ๐Ÿ“š specs/ = Official school notebook โ€” contains rules that are already in effect
  • ๐Ÿ“ changes/ = Scratch paper โ€” where new ideas are tested before entering the official book
  • openspec
    • specs
      • auth-login
        • spec.md
      • checkout-cart
        • spec.md
    • changes
      • add-dark-mode
        • proposal.md
        • design.md
        • tasks.md
        • specs
          • spec.md
    • project.md
    • AGENTS.md

Analogy: Like a constitution โ€” the official document currently in effect.

  • ๐Ÿ“– Represents the current system reality that has been validated
  • ๐Ÿ—‚๏ธ Grouped by domain (auth-login/, checkout-cart/)
  • ๐Ÿ”’ Read-only for AI โ€” cannot be modified directly
  • ๐Ÿ›๏ธ Stable until an official archiving process occurs
Why Is This Separation Important?

Imagine AI hallucinates and writes a wrong spec. With this separation, the damage is contained in the changes/ folder โ€” it doesn't spread to the main source of truth. Like an airlock system on a submarine: a leak in one compartment, the ship stays afloat.


Workflow: Three Simple Commands

The entire OpenSpec development cycle runs on just three commands. Like the Design โ†’ Build โ†’ Archive cycle:

/opsx:propose โ€” Design First

You describe what you want in everyday language. AI then:

  1. Searches existing specifications for relevance
  2. Analyzes related code
  3. Generates four artifacts in the changes/ folder:
PropertyTypeDescription
proposal.md Justification Why is this change needed? What's the impact on other modules?
specs/ Spec Delta Spec delta โ€” what changes functionally
design.md Technical Design Technical decisions: what technology, what patterns, what logic paths
tasks.md Task List List of atomic and deterministic implementation tasks

Analogy: Like an architect drawing the blueprint, calculating materials, and creating a work schedule โ€” before the contractor starts drilling.

/opsx:apply โ€” Now Build

After the human approves the proposal, AI starts implementation:

  • Pulls tasks from tasks.md
  • Works on them one by one iteratively
  • Updates the checklist in real-time
  • Must not make decisions that contradict design.md

Analogy: The contractor starts drilling โ€” but must follow the blueprint. Want to move a pipe? Gotta go back to the architect first.

/opsx:archive โ€” Archive & Clean Up

After implementation and testing are complete:

  • All artifacts are moved to archive/ with a timestamp
  • The realized spec delta goes into specs/ (source of truth)
  • Working folder is cleaned up, ready for the next cycle

Analogy: After the house is built, the architectural blueprint is updated and stored in a vault. Scratch paper is thrown away. Clean.

graph LR
    A["๐ŸŽจ Propose"] -->|"Review & Approve"| B["๐Ÿ”จ Apply"]
    B -->|"Test & Verify"| C["๐Ÿ“ฆ Archive"]
    C -->|"Next cycle"| A
    style A fill:#7c3aed,color:#fff
    style B fill:#059669,color:#fff
    style C fill:#d97706,color:#000

"Project Constitution" โ€” The Rule Book AI Cannot Violate

The first time you run openspec init, the platform scans your entire project and generates a project.md file โ€” a kind of "constitution" for your project:

20+ AI Agents Supported

OpenSpec rejects vendor lock-in. During initialization, the platform automatically detects agent folders (.claude/, .cursor/, etc.) and injects relevant rules. You're free to use Claude, Gemini, Codex, or whatever.


Efficiency: Why Does OpenSpec Save Tokens?

This is the technical part โ€” but the analogy is simple.

Vibe Coding is like asking the contractor to reread the entire building manual every time you ask them to install one light. Expensive, slow, and the contractor often forgets details on page 847.

OpenSpec gives the contractor only the relevant pages โ€” the electrical blueprint for the 2nd floor, the wattage standards used, and the safety checklist. That's it.

Plaintext
AI receives: ENTIRE repository (millions of characters)

Consequences:
โŒ API costs balloon
โŒ High latency
โŒ AI "forgets" details in the middle
โŒ Hallucinations increase drastically

Technically, this is because transformer architecture has quadratic complexity โ€” the longer the input, the more expensive and more "forgetful" the AI becomes. OpenSpec cuts the input to the necessary minimum.


Spec Writing Rules: Firm and Unambiguous

OpenSpec has strict rules about how specs are written. The goal: so that AI (and humans) don't misinterpret.

Required and Forbidden Language

OpenSpec adopts the IETF RFC 2119 standard โ€” the standard commonly used for writing global internet specifications:

PropertyTypeDescription
MUST / SHALL Mandatory Absolutely mandatory. Cannot be compromised. Example: 'The system MUST validate JWT tokens'
SHOULD Recommended Highly recommended, but there are valid exceptions. Example: 'The response SHOULD be cached for 5 minutes'
MAY Optional Truly optional. Example: 'Users MAY enable email notifications'
Why Does This Matter?

The word "must" in everyday language is ambiguous โ€” it could mean mandatory or just a suggestion. With MUST vs SHOULD, AI immediately knows: MUST is the law of gravity (cannot be violated), SHOULD is a guideline (can be bent with a good reason).

Scenario Format: GIVEN / WHEN / THEN

Every specification MUST have at least one test scenario. The format is borrowed from Behavior-Driven Development (BDD):

Markdown
#### Scenario: User logs in with valid credentials

- GIVEN the user is registered with email "[email protected]"
- WHEN the user enters the correct email and password
- THEN the system returns a valid access token
- AND the user is redirected to the dashboard page

Analogy: This is like an exam question for your code. If it can't answer this question, the code isn't correct yet. OpenSpec can run openspec validate --strict to ensure all questions exist and are properly formatted.

Four Types of Changes (Delta Operations)

When proposing changes, OpenSpec forces you to categorize them:

New standalone functionality.

Like adding a new room to a house โ€” it doesn't interfere with other rooms.

Markdown
## ADDED Requirements

### Dark Mode Support
Sistem MUST menyediakan opsi dark mode...

Comparison: OpenSpec vs Competitors

Where does OpenSpec stand among other SDD platforms?

Comparison Map

Parameter OpenSpec GitHub Spec Kit Amazon Kiro BMAD
Focus ๐Ÿš๏ธ Brownfield (legacy code) ๐Ÿ—๏ธ Greenfield (new projects) ๐Ÿข Corporate (AWS) ๐Ÿค– Multi-agent
Workflow 3 simple commands 4 rigid phases Integrated IDE Autonomous delegation
Context Delta (efficient) Full documents (heavy) Steering files Sharding
Tech Stack TypeScript/npm Python/UV Terminal/VS Code Framework-agnostic
Vendor Lock-in โŒ None โš ๏ธ GitHub bias ๐Ÿ”’ AWS only โŒ None
OpenSpec vs GitHub Spec Kit โ€” Simple vs Bureaucracy

GitHub Spec Kit forces 4 super-rigid hierarchical phases: specify โ†’ plan โ†’ tasks โ†’ implement. Everything must be completed before a single line of code is written.

The problem? Markdown documents balloon, reviews can take hours. For complex legacy projects, this is overkill.

OpenSpec chooses an incremental approach โ€” only track what changes (delta), with 3 simple commands. Lighter, more adaptable.

Analogy: Spec Kit is like writing a full thesis before starting research. OpenSpec is more like a daily journal โ€” write what changed, validate immediately.

OpenSpec vs Amazon Kiro โ€” Free vs Locked In

Amazon Kiro has tremendous power: deep file system access, SSH connections, MCP integration โ€” all wrapped in a powerful IDE.

But? You're locked into the AWS ecosystem and exclusively Claude models. Switch to Gemini? Can't. Use outside VS Code? Can't.

OpenSpec works alongside your IDE of choice, supports 20+ AI agents, and doesn't require special infrastructure.

Analogy: Kiro is a showroom car โ€” fast and luxurious, but service must be done at the official dealer. OpenSpec is an open standard car โ€” any mechanic can handle it.

OpenSpec vs OpenAPI (Swagger) โ€” Don't Get Confused!

Similar names, but very different functions:

  • OpenAPI/Swagger = technical specification for API contracts (endpoints, parameters, responses). Its scope is only APIs.
  • OpenSpec = holistic specification management framework for directing AI to write code (frontend, backend, DevOps, database).

Analogy: OpenAPI is the specification for USB-C connector dimensions โ€” port shape, voltage, pin assignment. OpenSpec is the instruction manual for a robot assembling USB-C in a factory โ€” how the robot should work, step by step.

Both can synergize: OpenSpec can guide AI to generate perfectly validated OpenAPI files.


Criticism and Risks: Is This Waterfall 2.0?

No approach is perfect. Here are the sharpest criticisms of SDD and OpenSpec:

Lessons from History

Model-Driven Development (MDD) in the 2000s had a similar vision: "model first, code automatic." The result? It failed because it was too heavy, not flexible, and couldn't adapt to change. OpenSpec is aware of this risk โ€” that's why they chose a delta approach (lightweight) instead of a full-spec approach (heavy).


Conclusion: When Should You Use OpenSpec?

  • Large-scale projects with many developers and AI agents
  • Complex legacy codebases (brownfield) prone to regression
  • Teams that need an audit trail and accountability for AI decisions
  • Projects where architectural consistency matters more than speed
  • Corporate environments that need a review gate before AI can commit

The Bottom Line

OpenSpec is not a replacement for creativity or agility. It is a safety net โ€” ensuring that as AI becomes a more sophisticated "contractor," we as the "architect" don't lose control over the building's design.

Vibe coding is like jazz improvisation โ€” beautiful for a short solo. Spec-Driven Development is like an orchestra โ€” it needs a score so that 50 musicians play harmoniously.

OpenSpec is the score.


References

Topics:#AI

Related stories

Engineering
Engineering
Integer to Roman: The Greedy Mapping That Always Shows Up in Interviews

Integer to Roman: The Greedy Mapping That Always Shows Up in Interviews

Breaking down the integer to Roman numeral conversion problem โ€” from basic Roman numeral rules, the subtractive notation pitfalls (IV, IX, XL...), to a clean, interview-ready greedy O(1) solution. Complete with mapping table, step-by-step visualization, and why this approach is optimal given the 1-3999 constraint.
Faisal Affan
Faisal Affan
Published
Engineering
Best Time to Buy and Sell Stock: From Brute Force to One-Pass O(n)

Best Time to Buy and Sell Stock: From Brute Force to One-Pass O(n)

Master the classic coding interview problem 'Best Time to Buy and Sell Stock' with step-by-step explanation โ€” from the naive brute force approach, recognizing patterns, to the optimal one-pass O(n) solution using sliding window / two-pointer technique. Complete with array visualization, complexity analysis, and the intuition behind every decision.
Faisal Affan
Faisal Affan
Published
Engineering
Services I've Handled โ€” Full-Stack Engineering, Architecture & Product Strategy

Services I've Handled โ€” Full-Stack Engineering, Architecture & Product Strategy

A comprehensive list of professional services I've delivered across multiple industries: IoT fleet management, fintech core banking integration, cyber insurance platforms, education technology, and enterprise digital transformation. Each service backed by real production systems still running today.
Faisal Affan
Faisal Affan
Published
Engineering
Portfolio Strategy by Career Level โ€” Junior to CTO

Portfolio Strategy by Career Level โ€” Junior to CTO

Your portfolio should reflect your seniority level, not just list every project you've touched. Junior engineers sell potential and fundamentals. Senior engineers sell depth and architecture. Staff engineers sell leverage. CTOs sell business outcomes. Here's exactly what to put in your portfolio at each level โ€” with concrete examples and a universal format you can use today.
Faisal Affan
Faisal Affan
Published