OpenSpec
Lightweight, brownfield-first SDD layer where humans and AI agents agree on written specs (requirements + scenarios) before code, using delta-based change proposals (ADDED/MODIFIED/REMOVED) that merge into a canonical spec set on archive. Current workflow surface is branded OPSX.
Detection
A project uses OpenSpec when any of these exist:
- openspec/
- openspec/config.yaml
- openspec/specs/
- openspec/changes/
- openspec/specs/*/spec.md
Status Model
Method: dir-state
A change directly under openspec/changes/ is active; under openspec/changes/archive/ it is done (date-prefixed). For an active change, "openspec status --change <id> --json" reports each planning artifact as done/ready/blocked; implementation progress comes from tasks.md checkbox counts. Roll up: count active vs archived changes and specs/*/spec.md.
Lifecycle
- 1 Init openspec init
Scaffold the openspec/ directory and config.
- 2 Explore /opsx:explore
Optional shaping/thinking step before proposing (no structured output).
- 3 Propose /opsx:propose
Open a change — proposal, delta specs, optional design, and tasks.
- 4 Apply /opsx:apply
Implement the change, checking off tasks as code is written.
- 5 Archive openspec archive
Merge delta specs into the canonical specs and move the change to archive/.