OpenSpec
Spec-driven development framework: non-trivial changes are planned as versioned artifacts (proposal, design, tasks) before writing code, instead of being agreed upon in chat and lost.
graph LR
A["/opsx:explore (optional)"] --> B["/opsx:propose"]
B --> C["/opsx:apply"]
C --> D["/opsx:archive"]
- Explore (optional,
/opsx:explore) — think out loud, compare options, sketch diagrams. No code is written and nothing is committed; it can only be captured in artifacts if the user asks for it. - Propose (
/opsx:propose "<description>") — createsopenspec/changes/<name>/withproposal.md(what and why),design.md(how), andtasks.md(implementation steps). - Apply (
/opsx:apply <name>) — implementstasks.md’s tasks one at a time, marking them[x]as they’re completed. If a design issue comes up mid-implementation, work pauses and the artifact is updated instead of improvising. - Archive (
/opsx:archive <name>) — moves the whole change toopenspec/changes/archive/YYYY-MM-DD-<name>/and syncs the spec deltas withopenspec/specs/<capability>/spec.md. In this project a change is archived as soon as its implementation is tested and validated, before opening its pull request, in the same branch: the archive, the synced specs and the roadmap update are reviewed and merged together with the code, instead of in a follow-up pull request. If review asks for changes, they’re applied on top of the archived change. The roadmap update only removes the bullet or section the change completes and adds its follow-ups as new lines; the roadmap keeps one sentence per line and unnumbered sections, so pull requests that update different items don’t conflict.
On-disk structure
Section titled “On-disk structure”openspec/├── config.yaml # schema, project context, per-artifact rules├── changes/│ ├── <change-name>/ # active change│ │ ├── proposal.md # what and why│ │ ├── design.md # how — design decisions│ │ └── tasks.md # implementation steps, checklist│ └── archive/│ └── YYYY-MM-DD-<name>/ # completed changes, with archive date└── specs/ └── <capability>/spec.md # living specification of each system capabilityopenspec/config.yaml supports a context block (stack, conventions, domain — shown to the AI when generating artifacts) and per-artifact-type rules. It’s used to set that all OpenSpec artifacts (proposal.md, design.md, tasks.md, spec.md) are written in English, like the code; docs/ is bilingual (English by default, with the Spanish translation in *.es.md files).
Where design decisions live
Section titled “Where design decisions live”Since adopting OpenSpec, each change’s design decisions are documented in its corresponding design.md, and are preserved when archived under openspec/changes/archive/. That historical file is the source of truth for “why it was done this way” for future changes.
The log in Design decisions captures what was decided before adopting OpenSpec (iteration 1). For later changes, check openspec/changes/archive/ directly.