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.
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.
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:
| File | Which question it answers | What is inside |
|---|---|---|
proposal.md | Why? | the reason for the change and what exactly changes |
specs/ | What must be true? | requirements with SHALL and MUST and “when — then” scenarios |
design.md | How? | technical decisions, goals, non-goals, risks |
tasks.md | In which order? | a checklist of tasks the agent follows |
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.
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 | shIf 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 initopenspec 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.
openspec init and checks the result.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.
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:
| Command | What the agent does | What appears in the project | What you do |
|---|---|---|---|
/openspec-explore | reads the code, suggests options | nothing | pick an option |
/openspec-propose | writes the change plan | an openspec/changes/name/ folder with four files | read and edit the plan |
/openspec-apply-change | writes code by the tasks, ticks them off | code and tests | check the result |
/openspec-archive-change | merges the requirements into the shared specs | updated openspec/specs, the folder archived | nothing, 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.
openspec/specs holds the current description of the system, and the history of decisions sits in the change archive.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:
| File | What it held |
|---|---|
proposal.md | why: the catalog is a key part of the talk and empty cards spoil it; what changes: all 73 techniques get a detailed description |
design.md | one 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.md | the requirement “every pattern has a filled detail” and three scenarios for showing a card |
tasks.md | 10 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 blocksThe “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.
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.
/openspec-explore, and plan later.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.
| OpenSpec | Spec Kit | |
|---|---|---|
| Order of steps | flexible: you can return to the plan at any time | fixed phases: principles, spec, plan, tasks, code |
| Where specs live | openspec/specs and change folders | a feature folder with a spec, a plan and tasks |
| Which project | fits code that already runs | fits a new feature from scratch |
| Several repositories | a shared plan store (Stores, beta) | each repository on its own |
| Made by | Fission AI | GitHub |
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 initThen 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 checkboxesStart 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.
- 1Setup“Install OpenSpec and run openspec init in this project. Show which commands appeared”
- 2Exploration“/openspec-explore I want to add … Look at the code and suggest two options without changing anything”
- 3Plan“/openspec-propose … Only the plan first. Give scenarios for empty and partial data in the requirements”
- 4Code“/openspec-apply-change Do the tasks one by one and run the tests after each”
- 5Merge“/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.
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.design.md. A change should fit in one sentence, otherwise split it.openspec/config.yaml, describe the change in more detail and review the files one at a time. Config changes apply immediately, no restart needed./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.