OpenSpec (OPSX) Skill
Use this skill to guide or reason about the OpenSpec artifact-driven workflow system (OPSX), including artifact graphs, schema/template resolution, change lifecycle, and experimental commands/skills.
Quick Navigation
- Artifact graph core concepts: references/artifact-core.md
- OPSX workflow behavior and usage: references/opsx-workflow.md
- Setup + profiles (init, update, config profile): references/setup-profiles.md
- Schema customization workflow and gaps: references/schema-customization.md
- End-to-end schema workflow gaps and proposed solution: references/schema-workflow-gaps.md
- Experimental release plan and rollout checklist: references/experimental-release-plan.md
Release Highlights (1.2.0 → 1.3.0)
- More tool integrations: adds support for Junie, Lingma, ForgeCode, and IBM Bob.
- Safer setup: shell completion installation is now opt-in, and Copilot auto-detection no longer triggers from a bare
.github/ directory alone.
- Adapter fixes: Pi command generation was corrected, and OpenCode now uses the canonical
.opencode/commands/ path.
- Safer status checks:
openspec status now exits cleanly when a project has no changes yet.
OPSX Commands
| Command |
Purpose |
/opsx:explore |
Think through ideas, investigate problems (no structure) |
/opsx:new |
Start a new change |
/opsx:continue |
Create next artifact based on dependencies |
/opsx:ff |
Fast-forward — create all planning artifacts at once |
/opsx:apply |
Implement tasks, updating artifacts as needed |
/opsx:verify |
Validate implementation matches spec |
/opsx:sync |
Sync delta specs to main specs |
/opsx:archive |
Archive single completed change |
/opsx:bulk-archive |
Archive multiple completed changes at once |
Legacy (non-OPSX) command: /openspec:proposal creates all planning artifacts at once. Prefer OPSX, but this can be useful for small/straightforward changes or older setups.
Schema Management
openspec schemas # List available schemas
openspec schema which --all # Show resolution sources
openspec schema init my-workflow # Create new schema interactively
openspec schema fork spec-driven my-workflow # Fork existing schema
openspec schema validate my-workflow # Validate schema structure
Project Configuration
Create openspec/config.yaml for per-project settings:
schema: spec-driven
context: |
Tech stack: TypeScript, React, Node.js
Testing: Vitest, Playwright
rules:
proposal:
- Include rollback plan
specs:
- Use Given/When/Then format
Schema precedence: CLI flag → Change metadata → Project config → Default (spec-driven)
Core Concepts
- Artifact graph, not a workflow engine: Dependencies enable actions; they do not force linear phases.
- Filesystem-as-database: Completion is derived from file existence, not stored state.
- Deterministic CLI: Commands require explicit change context (agent infers, CLI remains strict).
- XDG schema resolution: User overrides take precedence over built-ins.
- Templates are schema-scoped: Templates live next to schema and resolve with a strict 2-level fallback.
Decision Rules
- Prefer update when intent stays the same and you are refining scope or approach.
- Prefer new change when intent or scope fundamentally shifts, or the original can be completed independently.
- Always preserve a clear history of why artifacts changed (proposal/specs/design/tasks).
Recipes
1) Show what is ready to create next
- Determine the active change id.
- Query status and ready artifacts with the change explicitly set.
- Present ready artifacts and their dependencies.
Expected behavior: show ready artifacts, not required steps.
2) Generate instructions for a specific artifact
- Resolve schema and template with XDG fallback.
- Build context: change metadata, dependency status, and target paths.
- Return enriched instructions in plain Markdown.
3) Start a new change
- Validate change name (kebab-case).
- Create change directory and README.
- Show initial status and first ready artifact.
4) Schema customization guidance
- Explain XDG override paths.
- Describe copying built-in schema + templates.
- Provide verification steps or recommended CLI commands for listing and resolving.
5) Explain schema binding for a change
- Prefer change metadata if available.
- Fallback to project default schema if configured.
- Otherwise default to spec-driven.
Prohibitions
- Do not treat the system as a linear workflow engine.
- Do not assume a change is active without explicit selection.
- Do not silently fall back between schemas or templates without reporting.
- Do not copy long vendor docs verbatim; summarize and provide actionable guidance.
Output Expectations
- Give clear artifact readiness and dependency explanations.
- Use explicit change identifiers in examples.
- Provide concise, actionable steps and indicate whether they are informational or required.
Links
1---2name: openspec3description: OpenSpec artifact-driven workflow. Covers OPSX commands, schemas, project config. Use when applying the artifact-driven workflow (OPSX), planning or reviewing changes based on artifact dependencies, or working with OPSX commands and schema/template resolution. Keywords: OPSX, artifact graph, /opsx:.4---5
6# OpenSpec (OPSX) Skill
7
8Use this skill to guide or reason about the OpenSpec artifact-driven workflow system (OPSX), including artifact graphs, schema/template resolution, change lifecycle, and experimental commands/skills.
9
10## Quick Navigation
11
12- Artifact graph core concepts: references/artifact-core.md
13- OPSX workflow behavior and usage: references/opsx-workflow.md
14- Setup + profiles (init, update, config profile): references/setup-profiles.md
15- Schema customization workflow and gaps: references/schema-customization.md
16- End-to-end schema workflow gaps and proposed solution: references/schema-workflow-gaps.md
17- Experimental release plan and rollout checklist: references/experimental-release-plan.md
18
19## Release Highlights (1.2.0 → 1.3.0)
20
21- **More tool integrations:** adds support for Junie, Lingma, ForgeCode, and IBM Bob.
22- **Safer setup:** shell completion installation is now opt-in, and Copilot auto-detection no longer triggers from a bare `.github/` directory alone.
23- **Adapter fixes:** Pi command generation was corrected, and OpenCode now uses the canonical `.opencode/commands/` path.
24- **Safer status checks:** `openspec status` now exits cleanly when a project has no changes yet.
25
26## OPSX Commands
27
28| Command | Purpose |
29| -------------------- | -------------------------------------------------------- |
30| `/opsx:explore` | Think through ideas, investigate problems (no structure) |
31| `/opsx:new` | Start a new change |
32| `/opsx:continue` | Create next artifact based on dependencies |
33| `/opsx:ff` | Fast-forward — create all planning artifacts at once |
34| `/opsx:apply` | Implement tasks, updating artifacts as needed |
35| `/opsx:verify` | Validate implementation matches spec |
36| `/opsx:sync` | Sync delta specs to main specs |
37| `/opsx:archive` | Archive single completed change |
38| `/opsx:bulk-archive` | Archive multiple completed changes at once |
39
40**Legacy (non-OPSX) command:** `/openspec:proposal` creates all planning artifacts at once. Prefer OPSX, but this can be useful for small/straightforward changes or older setups.
41
42## Schema Management
43
44```bash
45openspec schemas # List available schemas
46openspec schema which --all # Show resolution sources
47openspec schema init my-workflow # Create new schema interactively
48openspec schema fork spec-driven my-workflow # Fork existing schema
49openspec schema validate my-workflow # Validate schema structure
50```
51
52## Project Configuration
53
54Create `openspec/config.yaml` for per-project settings:
55
56```yaml
57schema: spec-driven
58
59context: |
60 Tech stack: TypeScript, React, Node.js
61 Testing: Vitest, Playwright
62
63rules:
64 proposal:
65 - Include rollback plan
66 specs:
67 - Use Given/When/Then format
68```
69
70**Schema precedence:** CLI flag → Change metadata → Project config → Default (`spec-driven`)
71
72## Core Concepts
73
74- **Artifact graph, not a workflow engine**: Dependencies enable actions; they do not force linear phases.
75- **Filesystem-as-database**: Completion is derived from file existence, not stored state.
76- **Deterministic CLI**: Commands require explicit change context (agent infers, CLI remains strict).
77- **XDG schema resolution**: User overrides take precedence over built-ins.
78- **Templates are schema-scoped**: Templates live next to schema and resolve with a strict 2-level fallback.
79
80## Decision Rules
81
82- Prefer **update** when intent stays the same and you are refining scope or approach.
83- Prefer **new change** when intent or scope fundamentally shifts, or the original can be completed independently.
84- Always preserve a clear history of why artifacts changed (proposal/specs/design/tasks).
85
86## Recipes
87
88### 1) Show what is ready to create next
89
901. Determine the active change id.
912. Query status and ready artifacts with the change explicitly set.
923. Present ready artifacts and their dependencies.
93
94Expected behavior: show ready artifacts, not required steps.
95
96### 2) Generate instructions for a specific artifact
97
981. Resolve schema and template with XDG fallback.
992. Build context: change metadata, dependency status, and target paths.
1003. Return enriched instructions in plain Markdown.
101
102### 3) Start a new change
103
1041. Validate change name (kebab-case).
1052. Create change directory and README.
1063. Show initial status and first ready artifact.
107
108### 4) Schema customization guidance
109
1101. Explain XDG override paths.
1112. Describe copying built-in schema + templates.
1123. Provide verification steps or recommended CLI commands for listing and resolving.
113
114### 5) Explain schema binding for a change
115
1161. Prefer change metadata if available.
1172. Fallback to project default schema if configured.
1183. Otherwise default to spec-driven.
119
120## Prohibitions
121
122- Do not treat the system as a linear workflow engine.
123- Do not assume a change is active without explicit selection.
124- Do not silently fall back between schemas or templates without reporting.
125- Do not copy long vendor docs verbatim; summarize and provide actionable guidance.
126
127## Output Expectations
128
129- Give clear artifact readiness and dependency explanations.
130- Use explicit change identifiers in examples.
131- Provide concise, actionable steps and indicate whether they are informational or required.
132
133## Links
134
135- [Documentation](https://github.com/Fission-AI/OpenSpec/tree/main/docs)
136- [Releases](https://github.com/Fission-AI/OpenSpec/releases)
137- [GitHub](https://github.com/Fission-AI/OpenSpec)
138- [npm](https://www.npmjs.com/package/openspec)