OPSX Workflow
The standard workflow for OpenSpec β a structured approach to working with AI coding assistants. Turns reactive prompting into a repeatable process with artifacts, dependencies, and iteration.
π Links
Description
- OpenSpec GitHub β official repo
- OpenSpec Discord β community and feedback
Download or use
npm install -g openspec
openspec init # creates skills in .claude/skills/ποΈ Reasoning for
Problem
- Context rot β the AI loses context between sessions and starts from scratch every time
- Chaotic sessions β with larger changes (multi-file feature, refactoring) chaos builds up
- Linear phases donβt work β real work is not sequential (planβimplementβdone), because design shifts during implementation
Legacy OpenSpec workflow β limitations
- Instructions hardcoded in TypeScript β cannot be changed
- All-or-nothing approach β one command creates everything
- No customization β the same workflow for everyone
- Black box on bad outputs β you cannot fix the prompts
Solution: OPSX
- Actions, not phases β do what you need, when you need it
- Artifacts with dependencies β a DAG (Directed Acyclic Graph) instead of linear phases
- Filesystem as state β a file existing = artifact DONE
- Open instructions β YAML schemata + markdown templates, editable
π§© Commands
| Command | What it does |
|---|---|
/opsx:explore | Thinking, investigating a problem, comparing options |
/opsx:new | Start a new change |
/opsx:continue | Create the next artifact (based on DAG dependencies) |
/opsx:ff | Fast-forward β all planning artifacts at once |
/opsx:apply | Implement tasks |
/opsx:sync | Sync delta specs into main |
/opsx:archive | Archive once finished |
Typical flow
/opsx:explore β think the idea through
/opsx:new β start the change
/opsx:continue β create proposal β specs β design β tasks (iteratively)
/opsx:apply β implement
/opsx:archive β close outPro tip: use /opsx:ff when the picture is clear. Use /opsx:continue during exploration β iterating one artifact at a time.
π Architecture
Artifact DAG
proposal
(root node)
β
βββββββββββββββ΄ββββββββββββββ
β β
βΌ βΌ
specs design
(requires: (requires:
proposal) proposal)
β β
βββββββββββββββ¬ββββββββββββββ
β
βΌ
tasks
(requires:
specs, design)State machine
BLOCKED βββΊ READY βββΊ DONE
β β β
Missing All deps File exists
deps are DONE on filesystemKey concepts:
- Dependencies are enablers, not gates β they show what is possible, not what is required
- Filesystem as state β no need for a database, file exists = DONE
- Topological ordering β the system knows what to create next
When to update vs. start a new change
| Test | Update | New change |
|---|---|---|
| Identity | βSame thing, refined" | "Different workβ |
| Scope overlap | >50% coverage | <50% coverage |
| Closure | Cannot be closed without changes | Can be closed; the new one stands on its own |
βοΈ Customization
YAML Schemata
Define your own workflows:
name: research-first
artifacts:
- id: research
generates: research.md
requires: []
- id: proposal
generates: proposal.md
requires: [research]
- id: tasks
generates: tasks.md
requires: [proposal]Context Injection
# openspec/config.yaml
schema: spec-driven
context: |
Tech stack: TypeScript, React, Node.js
API conventions: RESTful, JSON responses
Testing: Vitest for unit tests, Playwright for e2e
rules:
proposal:
- Include rollback plan
- Identify affected teams
specs:
- Use Given/When/Then formatThe AI knows the projectβs conventions without you repeating them in every prompt.
Alternatives considered
- Reactive prompting β works for small changes, doesnβt scale
- Linear phase-gate workflows β fight the reality of iterative work
- Cursor/Windsurf without structure β no persistent artifacts, context loss
π§ Use case: PRD from analysis + client offer
OPSX works well as a PRD generation engine from two inputs: business analysis (e.g., an AS-IS process map) and an offer (scope + stack + timeline). Pipeline:
- Analysis (Process Mapping β 4 elements: Action/Actor/Tool/Mode) β
proposal.md(problem statement) - Discovery (UX RULER 7 stages) β
PRODUCT.md, decision-log, north-star-metric - Offer β
openspec/config.yamlcontext (stack, conventions, timeline) /opsx:ffor/opsx:continueβspecs/*.md(Given/When/Then per feature) +design.md+tasks.mdin the DAG
Full synthesis: 2026-05-16_PRD-z-analizy-i-oferty. End-to-end pattern: El Padre Case Study.
π Resources
- OpenSpec GitHub β repo with code and docs
- OpenSpec Discord β community
- Claude Code β primary AI coding assistant
- Agentic Coding β approach to coding with AI agents
- Context Engineering β managing context when working with LLMs
- Process Mapping β AS-IS analysis as input to a proposal
- UX RULER β product discovery generating artifacts for the repo
- El Padre Case Study β a 6-week offer case mapped to spec + tasks
Template: tool