Egor Urvanov

What is OpenSpec, setup and commandsA change example from plan to merge

OpenSpec is a free open-source framework for spec-driven development (SDD): before any code, an AI agent writes a change plan into the project folder, covering why, requirements, approach and tasks. You review the plan, the agent codes by the tasks, and the requirements merge into the shared specs. Below: setup, three commands and a real change.

What OpenSpec is

Without a plan, an agent writes code straight from a chat message. The intent lives only in that chat: a week later nobody remembers why it was done this way, and the next agent starts from scratch and may redo it its own way.

PLAN IN A CHATPLAN IN FILESdo it like…and also…?a week later:why like this?codeyouplan: why, what, how, stepscode from the planyou review● model, people, systems, data  ● agent and harness  ● risk, stop, boundary

On the left is the usual way: you tell the agent “do it like this”, then “and also this”, and it writes code. The code stays, but the explanation of why it looks this way stays in the chat history. On the right is work with OpenSpec: the agent first puts a plan into the project files, you read and edit that plan, and only then the agent writes code strictly by it. The plan is stored in the repository together with the code, where every teammate and every later agent can see it.

OpenSpec moves the intent out of the chat into files next to the code. Every change gets its own folder in openspec/changes: it records why, which requirements change, how to do it and in which steps. The live requirements for the whole system sit separately, in openspec/specs. It is plain Markdown with no special syntax, so both people and the agent read it.

openspec/specslive specsopenspec/changes/add-dark-modeproposal.mdspec deltadesign.mdtasks.mdopenspec-propose → apply-change → archive-changearchive: the delta merges into specs+ ADDED · ~ MODIFIED · − REMOVED requirements● model, people, systems, data  ● agent and harnessA change is a folder with a proposal and a delta; on archive the delta merges into the specs

The diagram shows two parts. The change folder is a draft: it holds what you are about to change. The shared specs describe the system as it already is. While a change is in progress, the shared specs stay untouched. When the code is done, the requirements from the change folder move into the shared specs, and the description of the system matches the code again. Every change consists of four files:

FileWhich question it answersWhat is inside
proposal.mdWhy?the reason for the change and what exactly changes
specs/What must be true?requirements with SHALL and MUST and “when — then” scenarios
design.mdHow?technical decisions, goals, non-goals, risks
tasks.mdIn which order?a checklist of tasks the agent follows
Takeaway
In this exampleThe four files of one change answer four questions: why, what, how and in which order.
In generalThe plan sits next to the code and gets reviewed before the agent starts writing. A flaw in the idea shows up in a paragraph of text, before it reaches the code.
Next stepBefore a large change, ask the agent to put a plan into a change folder first and only then write code.

Setup

OpenSpec has two parts. The first is the openspec command-line program: you install it once per computer. The second is setting up a specific project: openspec init creates an openspec/ folder in it and adds commands like /openspec-propose to your agents.

1. COMPUTER2. PROJECT3. AGENTSinstall openspeconcespecschangesopenspec initan openspec/ folder in the project/openspec-proposeskills in the agentsClaude Code · Codex · Cursor● model, people, systems, data  ● agent and harness

The order on the diagram: first the program appears on the computer, then an openspec/ folder appears in the project with two subfolders — specs for the live requirements and changes for changes in progress — and finally your agents get new commands. The project code itself does not change: only the plans folder and the command files for the agents are added. The command for macOS and Linux:

Install on macOS and Linux

curl -fsSL https://openspec.dev/cli/install.sh | sh

If you prefer npm, you need Node.js 22.12 or newer. Windows has its own PowerShell install script, and macOS has a Homebrew formula. Then open the project folder and switch OpenSpec on:

Through npm and in the project

npm install -g @fission-ai/openspec@latest
cd your-project
openspec init

openspec init asks which agents you use and installs OpenSpec skills for them into one shared .agents/skills/ folder. Claude Code and most agents call them as /openspec-propose, Codex as $openspec-propose, or you can just ask in plain words. In 1.x the same steps were /opsx:propose, /opsx:apply, /opsx:archive; to move to 2.0, run openspec update in each project. The rest of the article uses the Claude Code spelling.

If the project uses several agents, for example part of the team works in Cursor and part in Claude Code, select them all: the change plan is shared, and each agent gets its own commands. The program is free, runs locally and needs no account.

Takeaway
In this exampleTwo commands: one installs the program, the other prepares the project and connects the agents.
In generalYou do not have to set it up by hand: OpenSpec has a ready prompt with which the agent installs the program, runs openspec init and checks the result.
Next stepAsk the agent: “Install OpenSpec and run openspec init in this project, show which commands appeared”.

Three commands: plan, code, merge

Work goes around a loop of three commands. Before them you can think out loud with /openspec-explore: the agent reads the code, suggests options and changes nothing. Once it is clear what to do, the main path starts.

1/openspec-proposethe agent writes a plan2reviewyou read and edit the plan3/openspec-apply-changethe agent writes code by the tasks4/openspec-archive-changerequirements merge into the specsthe next changestarts from fresh specs● model, people, systems, data  ● agent and harness

Read the loop clockwise. The first command, /openspec-propose, asks the agent to write a plan: it creates a change folder and four files. Then it is your turn: you read the plan and edit it in the chat or right in the files. This is the main control point, because fixing a paragraph of text is cheaper than rewriting finished code. The second command, /openspec-apply-change, starts work by the tasks: the agent takes tasks from tasks.md one by one and ticks each off. The third command, /openspec-archive-change, closes the change: the requirements move into the shared specs, and the folder goes to the archive with its whole history of decisions. The next change starts from the updated specs.

Here is what a short terminal session looks like. A sample session based on the demo in the OpenSpec description:

Claude​ Code v2
OpenSpec 2.0 · skills
~/projects/shop
› /openspec-propose add-dark-mode
● Created openspec/changes/add-dark-mode/
⎿ proposal.md · specs/ · design.md · tasks.md
› Add a scenario: the theme survives a reloadyou review the plan
› /openspec-apply-change
● 1.1 theme context ✓ · 1.2 toggle ✓ · 2.1 colours ✓
⎿ all tasks complete
› /openspec-archive-change
● Moved the requirements into openspec/specs and the change folder to the archive
CommandWhat the agent doesWhat appears in the projectWhat you do
/openspec-explorereads the code, suggests optionsnothingpick an option
/openspec-proposewrites the change planan openspec/changes/name/ folder with four filesread and edit the plan
/openspec-apply-changewrites code by the tasks, ticks them offcode and testscheck the result
/openspec-archive-changemerges the requirements into the shared specsupdated openspec/specs, the folder archivednothing, this is the end

For large tasks there is an expanded set: create a change step by step, continue one in progress, verify the code against the spec. Switch it on with openspec config profile and apply it in the project with openspec update.

Commands are current as of 15 Nov 2026 (OpenSpec 2.0.0). Articles from 2025 and other sites' docs still show the old /openspec:* and /opsx:* commands: in version 2.0 the /openspec-* skills replace them. After upgrading the program, run openspec update in each project.

Takeaway
In this exampleAfter archiving, openspec/specs holds the current description of the system, and the history of decisions sits in the change archive.
In generalSpecs are updated in the same step as the code, so they do not go stale like a separate wiki.
Next stepDo not skip archiving: without it the next change builds on old requirements.

Example: a change in the urvanov.com site repository

This example comes from the repository of urvanov.com, the site where this article is published. The site code has an openspec/ folder where this change is kept. The site has an AI pattern catalog: 73 techniques for working with AI agents, grouped into 10 topics such as context and memory, orchestration, security and quality control. Each technique is shown as a card. The catalog was made as a companion to the talk “Spec-Driven Development in Practice” at the Podlodka Crew conference.

The problem: on click, 72 of the 73 cards showed only a name and one line of description. Every card had to open in full: which problem the technique solves, how it works, a practitioner’s quote, when it works and when it breaks. The material already existed in research notes; it had to be moved over carefully, without making anything up. The change was named fill-all-pattern-details. Here is what the agent wrote into its four files:

FileWhat it held
proposal.mdwhy: the catalog is a key part of the talk and empty cards spoil it; what changes: all 73 techniques get a detailed description
design.mdone task per pattern category; quotes only from the source file, nothing invented; a diagram only where there is a data flow
specs/pattern-detail/spec.mdthe requirement “every pattern has a filled detail” and three scenarios for showing a card
tasks.md10 tasks for 10 categories, all ticked

Below is a piece of the requirements file. SHALL marks a mandatory requirement. A Scenario is a check: WHEN describes the situation, THEN what must happen. Here detail is the full description of a technique, and problem and solution are its “problem” and “solution” parts.

A requirement excerpt from specs/pattern-detail/spec.md

## MODIFIED Requirements
### Requirement: Pattern detail content structure
All patterns in all categories SHALL have a filled detail.
#### Scenario: Partial content
- WHEN the user opens a pattern that has only problem and solution
- THEN the card shows only those sections, with no empty blocks

The “quotes only from the source” decision was written in design.md before the code. So the agent did not make up quotes where there were none, and the “partial content” scenario set in advance how a card looks without a quote or a diagram.

The work took 10 tasks, one per catalog topic. All 10 tasks are ticked, but the archive command was never run: the change folder still sits in openspec/changes, and the site has no shared specs. This is a common mistake. The requirement “every technique has a detailed description” lives only in the change draft, and the next agent reading the shared specs will not learn about it. One /openspec-archive-change command would move it into the shared specs.

Takeaway
In this exampleThe “partial content” scenario appeared in the plan before the code and set how a card behaves without a quote or a diagram.
In generalRequirements with “when — then” scenarios read like tests: the agent knows what counts as done.
Next stepIn every requirement write at least one scenario for an edge case: empty data, partial data, an error.

When OpenSpec isn't needed

A change folder with four files pays off where the idea is longer than a paragraph. For small things it weighs more than the work itself. The authors advise matching the level of detail to the size of the change: a trivial fix doesn't need several requirements and a design file.

A one-line fixA typo, a button colour, a constant. A commit message is enough; a plan would be longer than the change.
An urgent patchProduction is down and the hole must be closed within the hour. Patch first, and write the requirement afterwards if it is needed.
A throwaway scriptA one-time export or migration that goes in the bin tomorrow. There is nothing for a spec to describe: nobody will maintain the behaviour.
An experiment or sketchWhile it is unclear what to build, it is too early for a spec. Explore first, optionally with /openspec-explore, and plan later.
Takeaway
In this exampleA change you can state in one sentence and check at a glance does not need a change folder.
In generalOpenSpec helps when a plan is worth reading: several files, several agents, an edit a week later. In other cases it turns into ceremony.
Next stepWhen in doubt, make the edit without a plan. If you need a record of the decision, open a change.

OpenSpec or Spec Kit

Both drive development from a specification, but they see order differently. GitHub’s Spec Kit walks through phases strictly one after another. OpenSpec lets you return to the plan at any time and is built for a project where code already exists.

OpenSpecSpec Kit
Order of stepsflexible: you can return to the plan at any timefixed phases: principles, spec, plan, tasks, code
Where specs liveopenspec/specs and change foldersa feature folder with a spec, a plan and tasks
Which projectfits code that already runsfits a new feature from scratch
Several repositoriesa shared plan store (Stores, beta)each repository on its own
Made byFission AIGitHub
Takeaway
In this exampleOpenSpec describes itself as flexible and built for existing code.
In generalSpec Kit walks you through steps and suits a team that needs discipline. OpenSpec is lighter and settles faster in a project where code already exists.
Next stepFor changes in a running project start with OpenSpec; for a large new feature from scratch, try both on one task.

How to start

A short example in 5 minutes. Two commands in the terminal and three in the agent chat. First, setup and project preparation:

Terminal: install and openspec init

curl -fsSL https://openspec.dev/cli/install.sh | sh
cd your-project
openspec init

Then three commands in the agent chat: /openspec-propose add-dark-mode (the agent writes the plan), /openspec-apply-change (code by the tasks), /openspec-archive-change (merge into the shared specs). After /openspec-propose a change folder appears in the project; after archiving it moves to archive and the requirements land in specs:

What openspec/ holds after /openspec-propose add-dark-mode

openspec/
├── specs/                  current requirements
└── changes/
    └── add-dark-mode/
        ├── proposal.md     why and what changes
        ├── specs/          delta: what is added, changed, removed
        ├── design.md       how to build it
        └── tasks.md        tasks with checkboxes

Start with one small change you were going to make anyway. Five prompts for the agent, one per step: paste them into Claude Code, Codex or Cursor and fill in your task.

  1. 1
    Setup
    “Install OpenSpec and run openspec init in this project. Show which commands appeared”
  2. 2
    Exploration
    “/openspec-explore I want to add … Look at the code and suggest two options without changing anything”
  3. 3
    Plan
    “/openspec-propose … Only the plan first. Give scenarios for empty and partial data in the requirements”
  4. 4
    Code
    “/openspec-apply-change Do the tasks one by one and run the tests after each”
  5. 5
    Merge
    “/openspec-archive-change Move the requirements into the specs and show what changed in openspec/specs”

Common problems

Four cases that come up most often. The fixes come from the troubleshooting page and the spec-writing guide in the OpenSpec repository.

A command does nothingType commands in the agent's chat; in the terminal they do not work. Then run openspec update in the project root and restart the agent: most programs look for skills at startup. In Claude Code check that .claude/skills/ has openspec- folders; in Codex type $openspec-propose. The /openspec: and /opsx:* commands from old articles are replaced by skills in version 2.0.
Specs are too detailedA spec describes behaviour while construction stays in code: a queue, a library or a table schema in a requirement goes stale fast. One requirement is one behaviour; the “how” goes into design.md. A change should fit in one sentence, otherwise split it.
The agent ignores the specA plan comes out incomplete or wrong when the agent lacks project context. Put a project description and per-file rules into openspec/config.yaml, describe the change in more detail and review the files one at a time. Config changes apply immediately, no restart needed.
Spec and code drifted apartDrift appears when a change is done but archiving is skipped: the requirements stay in the draft. Finish the change with /openspec-archive-change and agree to merge the delta into the shared specs. openspec validate checks file format, and /openspec-verify-change from the expanded set checks the code against the spec.

Frequently asked questions

What is OpenSpec?

A free open-source framework by Fission AI for spec-driven development. The agent writes a change plan into Markdown files, you review it, the agent writes code, and the requirements merge into the project's shared specs.

How do I install OpenSpec?

With curl -fsSL https://openspec.dev/cli/install.sh | sh on macOS and Linux, or with npm install -g @fission-ai/openspec@latest. Then run openspec init in the project folder.

How is OpenSpec different from Spec Kit?

OpenSpec is more flexible and built for code that already runs; steps can repeat in any order. GitHub's Spec Kit walks through fixed phases: principles, spec, plan, tasks, code.

Which agents does OpenSpec work with?

Claude Code, Codex, Cursor, GitHub Copilot and others, more than 30 in all. openspec init installs skills for the agents you pick.

How do I use OpenSpec?

Install the program, run openspec init in the project folder and call /openspec-propose with a change name in the agent chat. Review the plan, then /openspec-apply-change writes code by the tasks and /openspec-archive-change merges the requirements into the shared specs. Not sure what to build? Start with /openspec-explore.

What is SDD (spec-driven development)?

SDD (Spec-Driven Development) is an approach where the specification, what the system must do, is written first. The agent writes code from that specification, and it lives in the project files. OpenSpec, Spec Kit and Kiro are three ways to work like this.
© 2026 Egor Urvanov