···11+---
22+name: openspec-apply-change
33+description: Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
44+license: MIT
55+compatibility: Requires openspec CLI.
66+metadata:
77+ author: openspec
88+ version: "1.0"
99+ generatedBy: "1.3.1"
1010+---
1111+1212+Implement tasks from an OpenSpec change.
1313+1414+**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
1515+1616+**Steps**
1717+1818+1. **Select the change**
1919+2020+ If a name is provided, use it. Otherwise:
2121+ - Infer from conversation context if the user mentioned a change
2222+ - Auto-select if only one active change exists
2323+ - If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
2424+2525+ Always announce: "Using change: <name>" and how to override (e.g., `/opsx:apply <other>`).
2626+2727+2. **Check status to understand the schema**
2828+ ```bash
2929+ openspec status --change "<name>" --json
3030+ ```
3131+ Parse the JSON to understand:
3232+ - `schemaName`: The workflow being used (e.g., "spec-driven")
3333+ - Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
3434+3535+3. **Get apply instructions**
3636+3737+ ```bash
3838+ openspec instructions apply --change "<name>" --json
3939+ ```
4040+4141+ This returns:
4242+ - `contextFiles`: artifact ID -> array of concrete file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)
4343+ - Progress (total, complete, remaining)
4444+ - Task list with status
4545+ - Dynamic instruction based on current state
4646+4747+ **Handle states:**
4848+ - If `state: "blocked"` (missing artifacts): show message, suggest using openspec-continue-change
4949+ - If `state: "all_done"`: congratulate, suggest archive
5050+ - Otherwise: proceed to implementation
5151+5252+4. **Read context files**
5353+5454+ Read every file path listed under `contextFiles` from the apply instructions output.
5555+ The files depend on the schema being used:
5656+ - **spec-driven**: proposal, specs, design, tasks
5757+ - Other schemas: follow the contextFiles from CLI output
5858+5959+5. **Show current progress**
6060+6161+ Display:
6262+ - Schema being used
6363+ - Progress: "N/M tasks complete"
6464+ - Remaining tasks overview
6565+ - Dynamic instruction from CLI
6666+6767+6. **Implement tasks (loop until done or blocked)**
6868+6969+ For each pending task:
7070+ - Show which task is being worked on
7171+ - Make the code changes required
7272+ - Keep changes minimal and focused
7373+ - Mark task complete in the tasks file: `- [ ]` → `- [x]`
7474+ - Continue to next task
7575+7676+ **Pause if:**
7777+ - Task is unclear → ask for clarification
7878+ - Implementation reveals a design issue → suggest updating artifacts
7979+ - Error or blocker encountered → report and wait for guidance
8080+ - User interrupts
8181+8282+7. **On completion or pause, show status**
8383+8484+ Display:
8585+ - Tasks completed this session
8686+ - Overall progress: "N/M tasks complete"
8787+ - If all done: suggest archive
8888+ - If paused: explain why and wait for guidance
8989+9090+**Output During Implementation**
9191+9292+```
9393+## Implementing: <change-name> (schema: <schema-name>)
9494+9595+Working on task 3/7: <task description>
9696+[...implementation happening...]
9797+✓ Task complete
9898+9999+Working on task 4/7: <task description>
100100+[...implementation happening...]
101101+✓ Task complete
102102+```
103103+104104+**Output On Completion**
105105+106106+```
107107+## Implementation Complete
108108+109109+**Change:** <change-name>
110110+**Schema:** <schema-name>
111111+**Progress:** 7/7 tasks complete ✓
112112+113113+### Completed This Session
114114+- [x] Task 1
115115+- [x] Task 2
116116+...
117117+118118+All tasks complete! Ready to archive this change.
119119+```
120120+121121+**Output On Pause (Issue Encountered)**
122122+123123+```
124124+## Implementation Paused
125125+126126+**Change:** <change-name>
127127+**Schema:** <schema-name>
128128+**Progress:** 4/7 tasks complete
129129+130130+### Issue Encountered
131131+<description of the issue>
132132+133133+**Options:**
134134+1. <option 1>
135135+2. <option 2>
136136+3. Other approach
137137+138138+What would you like to do?
139139+```
140140+141141+**Guardrails**
142142+- Keep going through tasks until done or blocked
143143+- Always read context files before starting (from the apply instructions output)
144144+- If task is ambiguous, pause and ask before implementing
145145+- If implementation reveals issues, pause and suggest artifact updates
146146+- Keep code changes minimal and scoped to each task
147147+- Update task checkbox immediately after completing each task
148148+- Pause on errors, blockers, or unclear requirements - don't guess
149149+- Use contextFiles from CLI output, don't assume specific file names
150150+151151+**Fluid Workflow Integration**
152152+153153+This skill supports the "actions on a change" model:
154154+155155+- **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
156156+- **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
+114
.claude/skills/openspec-archive-change/SKILL.md
···11+---
22+name: openspec-archive-change
33+description: Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
44+license: MIT
55+compatibility: Requires openspec CLI.
66+metadata:
77+ author: openspec
88+ version: "1.0"
99+ generatedBy: "1.3.1"
1010+---
1111+1212+Archive a completed change in the experimental workflow.
1313+1414+**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
1515+1616+**Steps**
1717+1818+1. **If no change name provided, prompt for selection**
1919+2020+ Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
2121+2222+ Show only active changes (not already archived).
2323+ Include the schema used for each change if available.
2424+2525+ **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
2626+2727+2. **Check artifact completion status**
2828+2929+ Run `openspec status --change "<name>" --json` to check artifact completion.
3030+3131+ Parse the JSON to understand:
3232+ - `schemaName`: The workflow being used
3333+ - `artifacts`: List of artifacts with their status (`done` or other)
3434+3535+ **If any artifacts are not `done`:**
3636+ - Display warning listing incomplete artifacts
3737+ - Use **AskUserQuestion tool** to confirm user wants to proceed
3838+ - Proceed if user confirms
3939+4040+3. **Check task completion status**
4141+4242+ Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
4343+4444+ Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
4545+4646+ **If incomplete tasks found:**
4747+ - Display warning showing count of incomplete tasks
4848+ - Use **AskUserQuestion tool** to confirm user wants to proceed
4949+ - Proceed if user confirms
5050+5151+ **If no tasks file exists:** Proceed without task-related warning.
5252+5353+4. **Assess delta spec sync state**
5454+5555+ Check for delta specs at `openspec/changes/<name>/specs/`. If none exist, proceed without sync prompt.
5656+5757+ **If delta specs exist:**
5858+ - Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
5959+ - Determine what changes would be applied (adds, modifications, removals, renames)
6060+ - Show a combined summary before prompting
6161+6262+ **Prompt options:**
6363+ - If changes needed: "Sync now (recommended)", "Archive without syncing"
6464+ - If already synced: "Archive now", "Sync anyway", "Cancel"
6565+6666+ If user chooses sync, use Task tool (subagent_type: "general-purpose", prompt: "Use Skill tool to invoke openspec-sync-specs for change '<name>'. Delta spec analysis: <include the analyzed delta spec summary>"). Proceed to archive regardless of choice.
6767+6868+5. **Perform the archive**
6969+7070+ Create the archive directory if it doesn't exist:
7171+ ```bash
7272+ mkdir -p openspec/changes/archive
7373+ ```
7474+7575+ Generate target name using current date: `YYYY-MM-DD-<change-name>`
7676+7777+ **Check if target already exists:**
7878+ - If yes: Fail with error, suggest renaming existing archive or using different date
7979+ - If no: Move the change directory to archive
8080+8181+ ```bash
8282+ mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
8383+ ```
8484+8585+6. **Display summary**
8686+8787+ Show archive completion summary including:
8888+ - Change name
8989+ - Schema that was used
9090+ - Archive location
9191+ - Whether specs were synced (if applicable)
9292+ - Note about any warnings (incomplete artifacts/tasks)
9393+9494+**Output On Success**
9595+9696+```
9797+## Archive Complete
9898+9999+**Change:** <change-name>
100100+**Schema:** <schema-name>
101101+**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
102102+**Specs:** ✓ Synced to main specs (or "No delta specs" or "Sync skipped")
103103+104104+All artifacts complete. All tasks complete.
105105+```
106106+107107+**Guardrails**
108108+- Always prompt for change selection if not provided
109109+- Use artifact graph (openspec status --json) for completion checking
110110+- Don't block archive on warnings - just inform and confirm
111111+- Preserve .openspec.yaml when moving to archive (it moves with the directory)
112112+- Show clear summary of what happened
113113+- If sync is requested, use openspec-sync-specs approach (agent-driven)
114114+- If delta specs exist, always run the sync assessment and show the combined summary before prompting
+288
.claude/skills/openspec-explore/SKILL.md
···11+---
22+name: openspec-explore
33+description: Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.
44+license: MIT
55+compatibility: Requires openspec CLI.
66+metadata:
77+ author: openspec
88+ version: "1.0"
99+ generatedBy: "1.3.1"
1010+---
1111+1212+Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
1313+1414+**IMPORTANT: Explore mode is for thinking, not implementing.** You may read files, search code, and investigate the codebase, but you must NEVER write code or implement features. If the user asks you to implement something, remind them to exit explore mode first and create a change proposal. You MAY create OpenSpec artifacts (proposals, designs, specs) if the user asks—that's capturing thinking, not implementing.
1515+1616+**This is a stance, not a workflow.** There are no fixed steps, no required sequence, no mandatory outputs. You're a thinking partner helping the user explore.
1717+1818+---
1919+2020+## The Stance
2121+2222+- **Curious, not prescriptive** - Ask questions that emerge naturally, don't follow a script
2323+- **Open threads, not interrogations** - Surface multiple interesting directions and let the user follow what resonates. Don't funnel them through a single path of questions.
2424+- **Visual** - Use ASCII diagrams liberally when they'd help clarify thinking
2525+- **Adaptive** - Follow interesting threads, pivot when new information emerges
2626+- **Patient** - Don't rush to conclusions, let the shape of the problem emerge
2727+- **Grounded** - Explore the actual codebase when relevant, don't just theorize
2828+2929+---
3030+3131+## What You Might Do
3232+3333+Depending on what the user brings, you might:
3434+3535+**Explore the problem space**
3636+- Ask clarifying questions that emerge from what they said
3737+- Challenge assumptions
3838+- Reframe the problem
3939+- Find analogies
4040+4141+**Investigate the codebase**
4242+- Map existing architecture relevant to the discussion
4343+- Find integration points
4444+- Identify patterns already in use
4545+- Surface hidden complexity
4646+4747+**Compare options**
4848+- Brainstorm multiple approaches
4949+- Build comparison tables
5050+- Sketch tradeoffs
5151+- Recommend a path (if asked)
5252+5353+**Visualize**
5454+```
5555+┌─────────────────────────────────────────┐
5656+│ Use ASCII diagrams liberally │
5757+├─────────────────────────────────────────┤
5858+│ │
5959+│ ┌────────┐ ┌────────┐ │
6060+│ │ State │────────▶│ State │ │
6161+│ │ A │ │ B │ │
6262+│ └────────┘ └────────┘ │
6363+│ │
6464+│ System diagrams, state machines, │
6565+│ data flows, architecture sketches, │
6666+│ dependency graphs, comparison tables │
6767+│ │
6868+└─────────────────────────────────────────┘
6969+```
7070+7171+**Surface risks and unknowns**
7272+- Identify what could go wrong
7373+- Find gaps in understanding
7474+- Suggest spikes or investigations
7575+7676+---
7777+7878+## OpenSpec Awareness
7979+8080+You have full context of the OpenSpec system. Use it naturally, don't force it.
8181+8282+### Check for context
8383+8484+At the start, quickly check what exists:
8585+```bash
8686+openspec list --json
8787+```
8888+8989+This tells you:
9090+- If there are active changes
9191+- Their names, schemas, and status
9292+- What the user might be working on
9393+9494+### When no change exists
9595+9696+Think freely. When insights crystallize, you might offer:
9797+9898+- "This feels solid enough to start a change. Want me to create a proposal?"
9999+- Or keep exploring - no pressure to formalize
100100+101101+### When a change exists
102102+103103+If the user mentions a change or you detect one is relevant:
104104+105105+1. **Read existing artifacts for context**
106106+ - `openspec/changes/<name>/proposal.md`
107107+ - `openspec/changes/<name>/design.md`
108108+ - `openspec/changes/<name>/tasks.md`
109109+ - etc.
110110+111111+2. **Reference them naturally in conversation**
112112+ - "Your design mentions using Redis, but we just realized SQLite fits better..."
113113+ - "The proposal scopes this to premium users, but we're now thinking everyone..."
114114+115115+3. **Offer to capture when decisions are made**
116116+117117+ | Insight Type | Where to Capture |
118118+ |----------------------------|--------------------------------|
119119+ | New requirement discovered | `specs/<capability>/spec.md` |
120120+ | Requirement changed | `specs/<capability>/spec.md` |
121121+ | Design decision made | `design.md` |
122122+ | Scope changed | `proposal.md` |
123123+ | New work identified | `tasks.md` |
124124+ | Assumption invalidated | Relevant artifact |
125125+126126+ Example offers:
127127+ - "That's a design decision. Capture it in design.md?"
128128+ - "This is a new requirement. Add it to specs?"
129129+ - "This changes scope. Update the proposal?"
130130+131131+4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
132132+133133+---
134134+135135+## What You Don't Have To Do
136136+137137+- Follow a script
138138+- Ask the same questions every time
139139+- Produce a specific artifact
140140+- Reach a conclusion
141141+- Stay on topic if a tangent is valuable
142142+- Be brief (this is thinking time)
143143+144144+---
145145+146146+## Handling Different Entry Points
147147+148148+**User brings a vague idea:**
149149+```
150150+User: I'm thinking about adding real-time collaboration
151151+152152+You: Real-time collab is a big space. Let me think about this...
153153+154154+ COLLABORATION SPECTRUM
155155+ ════════════════════════════════════════════
156156+157157+ Awareness Coordination Sync
158158+ │ │ │
159159+ ▼ ▼ ▼
160160+ ┌────────┐ ┌────────┐ ┌────────┐
161161+ │Presence│ │Cursors │ │ CRDT │
162162+ │ "3 │ │ Multi │ │Conflict│
163163+ │online" │ │ select │ │ free │
164164+ └────────┘ └────────┘ └────────┘
165165+ │ │ │
166166+ trivial moderate complex
167167+168168+ Where's your head at?
169169+```
170170+171171+**User brings a specific problem:**
172172+```
173173+User: The auth system is a mess
174174+175175+You: [reads codebase]
176176+177177+ ┌─────────────────────────────────────────────┐
178178+ │ CURRENT AUTH FLOW │
179179+ └─────────────────────────────────────────────┘
180180+ │
181181+ ┌─────────────┼─────────────┐
182182+ ▼ ▼ ▼
183183+ ┌─────────┐ ┌─────────┐ ┌─────────┐
184184+ │ Google │ │ GitHub │ │ Email │
185185+ │ OAuth │ │ OAuth │ │ Magic │
186186+ └────┬────┘ └────┬────┘ └────┬────┘
187187+ │ │ │
188188+ └─────────────┼─────────────┘
189189+ ▼
190190+ ┌───────────┐
191191+ │ Session │
192192+ └─────┬─────┘
193193+ │
194194+ ▼
195195+ ┌───────────┐
196196+ │ Perms │
197197+ └───────────┘
198198+199199+ I see three tangles. Which one's burning?
200200+```
201201+202202+**User is stuck mid-implementation:**
203203+```
204204+User: /opsx:explore add-auth-system
205205+ The OAuth integration is more complex than expected
206206+207207+You: [reads change artifacts]
208208+209209+ You're on task 4: "Implement OAuth flow"
210210+211211+ Let me trace what's involved...
212212+213213+ [draws diagram, explores options, suggests paths]
214214+215215+ Want to update the design to reflect this?
216216+ Or add a spike task to investigate?
217217+```
218218+219219+**User wants to compare options:**
220220+```
221221+User: Should we use Postgres or SQLite?
222222+223223+You: Generic answer is boring. What's the context?
224224+225225+User: A CLI tool that tracks local dev environments
226226+227227+You: That changes everything.
228228+229229+ ┌─────────────────────────────────────────────────┐
230230+ │ CLI TOOL DATA STORAGE │
231231+ └─────────────────────────────────────────────────┘
232232+233233+ Key constraints:
234234+ • No daemon running
235235+ • Must work offline
236236+ • Single user
237237+238238+ SQLite Postgres
239239+ Deployment embedded ✓ needs server ✗
240240+ Offline yes ✓ no ✗
241241+ Single file yes ✓ no ✗
242242+243243+ SQLite. Not even close.
244244+245245+ Unless... is there a sync component?
246246+```
247247+248248+---
249249+250250+## Ending Discovery
251251+252252+There's no required ending. Discovery might:
253253+254254+- **Flow into a proposal**: "Ready to start? I can create a change proposal."
255255+- **Result in artifact updates**: "Updated design.md with these decisions"
256256+- **Just provide clarity**: User has what they need, moves on
257257+- **Continue later**: "We can pick this up anytime"
258258+259259+When it feels like things are crystallizing, you might summarize:
260260+261261+```
262262+## What We Figured Out
263263+264264+**The problem**: [crystallized understanding]
265265+266266+**The approach**: [if one emerged]
267267+268268+**Open questions**: [if any remain]
269269+270270+**Next steps** (if ready):
271271+- Create a change proposal
272272+- Keep exploring: just keep talking
273273+```
274274+275275+But this summary is optional. Sometimes the thinking IS the value.
276276+277277+---
278278+279279+## Guardrails
280280+281281+- **Don't implement** - Never write code or implement features. Creating OpenSpec artifacts is fine, writing application code is not.
282282+- **Don't fake understanding** - If something is unclear, dig deeper
283283+- **Don't rush** - Discovery is thinking time, not task time
284284+- **Don't force structure** - Let patterns emerge naturally
285285+- **Don't auto-capture** - Offer to save insights, don't just do it
286286+- **Do visualize** - A good diagram is worth many paragraphs
287287+- **Do explore the codebase** - Ground discussions in reality
288288+- **Do question assumptions** - Including the user's and your own
+74
.claude/skills/openspec-new-change/SKILL.md
···11+---
22+name: openspec-new-change
33+description: Start a new OpenSpec change using the experimental artifact workflow. Use when the user wants to create a new feature, fix, or modification with a structured step-by-step approach.
44+license: MIT
55+compatibility: Requires openspec CLI.
66+metadata:
77+ author: openspec
88+ version: "1.0"
99+ generatedBy: "1.3.1"
1010+---
1111+1212+Start a new change using the experimental artifact-driven approach.
1313+1414+**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
1515+1616+**Steps**
1717+1818+1. **If no clear input provided, ask what they want to build**
1919+2020+ Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
2121+ > "What change do you want to work on? Describe what you want to build or fix."
2222+2323+ From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
2424+2525+ **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
2626+2727+2. **Determine the workflow schema**
2828+2929+ Use the default schema (omit `--schema`) unless the user explicitly requests a different workflow.
3030+3131+ **Use a different schema only if the user mentions:**
3232+ - A specific schema name → use `--schema <name>`
3333+ - "show workflows" or "what workflows" → run `openspec schemas --json` and let them choose
3434+3535+ **Otherwise**: Omit `--schema` to use the default.
3636+3737+3. **Create the change directory**
3838+ ```bash
3939+ openspec new change "<name>"
4040+ ```
4141+ Add `--schema <name>` only if the user requested a specific workflow.
4242+ This creates a scaffolded change at `openspec/changes/<name>/` with the selected schema.
4343+4444+4. **Show the artifact status**
4545+ ```bash
4646+ openspec status --change "<name>"
4747+ ```
4848+ This shows which artifacts need to be created and which are ready (dependencies satisfied).
4949+5050+5. **Get instructions for the first artifact**
5151+ The first artifact depends on the schema (e.g., `proposal` for spec-driven).
5252+ Check the status output to find the first artifact with status "ready".
5353+ ```bash
5454+ openspec instructions <first-artifact-id> --change "<name>"
5555+ ```
5656+ This outputs the template and context for creating the first artifact.
5757+5858+6. **STOP and wait for user direction**
5959+6060+**Output**
6161+6262+After completing the steps, summarize:
6363+- Change name and location
6464+- Schema/workflow being used and its artifact sequence
6565+- Current status (0/N artifacts complete)
6666+- The template for the first artifact
6767+- Prompt: "Ready to create the first artifact? Just describe what this change is about and I'll draft it, or ask me to continue."
6868+6969+**Guardrails**
7070+- Do NOT create any artifacts yet - just show the instructions
7171+- Do NOT advance beyond showing the first artifact template
7272+- If the name is invalid (not kebab-case), ask for a valid name
7373+- If a change with that name already exists, suggest continuing that change instead
7474+- Pass --schema if using a non-default workflow
+110
.claude/skills/openspec-propose/SKILL.md
···11+---
22+name: openspec-propose
33+description: Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.
44+license: MIT
55+compatibility: Requires openspec CLI.
66+metadata:
77+ author: openspec
88+ version: "1.0"
99+ generatedBy: "1.3.1"
1010+---
1111+1212+Propose a new change - create the change and generate all artifacts in one step.
1313+1414+I'll create a change with artifacts:
1515+- proposal.md (what & why)
1616+- design.md (how)
1717+- tasks.md (implementation steps)
1818+1919+When ready to implement, run /opsx:apply
2020+2121+---
2222+2323+**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
2424+2525+**Steps**
2626+2727+1. **If no clear input provided, ask what they want to build**
2828+2929+ Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
3030+ > "What change do you want to work on? Describe what you want to build or fix."
3131+3232+ From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
3333+3434+ **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
3535+3636+2. **Create the change directory**
3737+ ```bash
3838+ openspec new change "<name>"
3939+ ```
4040+ This creates a scaffolded change at `openspec/changes/<name>/` with `.openspec.yaml`.
4141+4242+3. **Get the artifact build order**
4343+ ```bash
4444+ openspec status --change "<name>" --json
4545+ ```
4646+ Parse the JSON to get:
4747+ - `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
4848+ - `artifacts`: list of all artifacts with their status and dependencies
4949+5050+4. **Create artifacts in sequence until apply-ready**
5151+5252+ Use the **TodoWrite tool** to track progress through the artifacts.
5353+5454+ Loop through artifacts in dependency order (artifacts with no pending dependencies first):
5555+5656+ a. **For each artifact that is `ready` (dependencies satisfied)**:
5757+ - Get instructions:
5858+ ```bash
5959+ openspec instructions <artifact-id> --change "<name>" --json
6060+ ```
6161+ - The instructions JSON includes:
6262+ - `context`: Project background (constraints for you - do NOT include in output)
6363+ - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
6464+ - `template`: The structure to use for your output file
6565+ - `instruction`: Schema-specific guidance for this artifact type
6666+ - `outputPath`: Where to write the artifact
6767+ - `dependencies`: Completed artifacts to read for context
6868+ - Read any completed dependency files for context
6969+ - Create the artifact file using `template` as the structure
7070+ - Apply `context` and `rules` as constraints - but do NOT copy them into the file
7171+ - Show brief progress: "Created <artifact-id>"
7272+7373+ b. **Continue until all `applyRequires` artifacts are complete**
7474+ - After creating each artifact, re-run `openspec status --change "<name>" --json`
7575+ - Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
7676+ - Stop when all `applyRequires` artifacts are done
7777+7878+ c. **If an artifact requires user input** (unclear context):
7979+ - Use **AskUserQuestion tool** to clarify
8080+ - Then continue with creation
8181+8282+5. **Show final status**
8383+ ```bash
8484+ openspec status --change "<name>"
8585+ ```
8686+8787+**Output**
8888+8989+After completing all artifacts, summarize:
9090+- Change name and location
9191+- List of artifacts created with brief descriptions
9292+- What's ready: "All artifacts created! Ready for implementation."
9393+- Prompt: "Run `/opsx:apply` or ask me to implement to start working on the tasks."
9494+9595+**Artifact Creation Guidelines**
9696+9797+- Follow the `instruction` field from `openspec instructions` for each artifact type
9898+- The schema defines what each artifact should contain - follow it
9999+- Read dependency artifacts for context before creating new ones
100100+- Use `template` as the structure for your output file - fill in its sections
101101+- **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
102102+ - Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
103103+ - These guide what you write, but should never appear in the output
104104+105105+**Guardrails**
106106+- Create ALL artifacts needed for implementation (as defined by schema's `apply.requires`)
107107+- Always read dependency artifacts before creating a new one
108108+- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
109109+- If a change with that name already exists, ask if user wants to continue it or create a new one
110110+- Verify each artifact file exists after writing before proceeding to next
+168
.claude/skills/openspec-verify-change/SKILL.md
···11+---
22+name: openspec-verify-change
33+description: Verify implementation matches change artifacts. Use when the user wants to validate that implementation is complete, correct, and coherent before archiving.
44+license: MIT
55+compatibility: Requires openspec CLI.
66+metadata:
77+ author: openspec
88+ version: "1.0"
99+ generatedBy: "1.3.1"
1010+---
1111+1212+Verify that an implementation matches the change artifacts (specs, tasks, design).
1313+1414+**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
1515+1616+**Steps**
1717+1818+1. **If no change name provided, prompt for selection**
1919+2020+ Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
2121+2222+ Show changes that have implementation tasks (tasks artifact exists).
2323+ Include the schema used for each change if available.
2424+ Mark changes with incomplete tasks as "(In Progress)".
2525+2626+ **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
2727+2828+2. **Check status to understand the schema**
2929+ ```bash
3030+ openspec status --change "<name>" --json
3131+ ```
3232+ Parse the JSON to understand:
3333+ - `schemaName`: The workflow being used (e.g., "spec-driven")
3434+ - Which artifacts exist for this change
3535+3636+3. **Get the change directory and load artifacts**
3737+3838+ ```bash
3939+ openspec instructions apply --change "<name>" --json
4040+ ```
4141+4242+ This returns the change directory and `contextFiles` (artifact ID -> array of concrete file paths). Read all available artifacts from `contextFiles`.
4343+4444+4. **Initialize verification report structure**
4545+4646+ Create a report structure with three dimensions:
4747+ - **Completeness**: Track tasks and spec coverage
4848+ - **Correctness**: Track requirement implementation and scenario coverage
4949+ - **Coherence**: Track design adherence and pattern consistency
5050+5151+ Each dimension can have CRITICAL, WARNING, or SUGGESTION issues.
5252+5353+5. **Verify Completeness**
5454+5555+ **Task Completion**:
5656+ - If `contextFiles.tasks` exists, read every file path in it
5757+ - Parse checkboxes: `- [ ]` (incomplete) vs `- [x]` (complete)
5858+ - Count complete vs total tasks
5959+ - If incomplete tasks exist:
6060+ - Add CRITICAL issue for each incomplete task
6161+ - Recommendation: "Complete task: <description>" or "Mark as done if already implemented"
6262+6363+ **Spec Coverage**:
6464+ - If delta specs exist in `openspec/changes/<name>/specs/`:
6565+ - Extract all requirements (marked with "### Requirement:")
6666+ - For each requirement:
6767+ - Search codebase for keywords related to the requirement
6868+ - Assess if implementation likely exists
6969+ - If requirements appear unimplemented:
7070+ - Add CRITICAL issue: "Requirement not found: <requirement name>"
7171+ - Recommendation: "Implement requirement X: <description>"
7272+7373+6. **Verify Correctness**
7474+7575+ **Requirement Implementation Mapping**:
7676+ - For each requirement from delta specs:
7777+ - Search codebase for implementation evidence
7878+ - If found, note file paths and line ranges
7979+ - Assess if implementation matches requirement intent
8080+ - If divergence detected:
8181+ - Add WARNING: "Implementation may diverge from spec: <details>"
8282+ - Recommendation: "Review <file>:<lines> against requirement X"
8383+8484+ **Scenario Coverage**:
8585+ - For each scenario in delta specs (marked with "#### Scenario:"):
8686+ - Check if conditions are handled in code
8787+ - Check if tests exist covering the scenario
8888+ - If scenario appears uncovered:
8989+ - Add WARNING: "Scenario not covered: <scenario name>"
9090+ - Recommendation: "Add test or implementation for scenario: <description>"
9191+9292+7. **Verify Coherence**
9393+9494+ **Design Adherence**:
9595+ - If `contextFiles.design` exists:
9696+ - Extract key decisions (look for sections like "Decision:", "Approach:", "Architecture:")
9797+ - Verify implementation follows those decisions
9898+ - If contradiction detected:
9999+ - Add WARNING: "Design decision not followed: <decision>"
100100+ - Recommendation: "Update implementation or revise design.md to match reality"
101101+ - If no design.md: Skip design adherence check, note "No design.md to verify against"
102102+103103+ **Code Pattern Consistency**:
104104+ - Review new code for consistency with project patterns
105105+ - Check file naming, directory structure, coding style
106106+ - If significant deviations found:
107107+ - Add SUGGESTION: "Code pattern deviation: <details>"
108108+ - Recommendation: "Consider following project pattern: <example>"
109109+110110+8. **Generate Verification Report**
111111+112112+ **Summary Scorecard**:
113113+ ```
114114+ ## Verification Report: <change-name>
115115+116116+ ### Summary
117117+ | Dimension | Status |
118118+ |--------------|------------------|
119119+ | Completeness | X/Y tasks, N reqs|
120120+ | Correctness | M/N reqs covered |
121121+ | Coherence | Followed/Issues |
122122+ ```
123123+124124+ **Issues by Priority**:
125125+126126+ 1. **CRITICAL** (Must fix before archive):
127127+ - Incomplete tasks
128128+ - Missing requirement implementations
129129+ - Each with specific, actionable recommendation
130130+131131+ 2. **WARNING** (Should fix):
132132+ - Spec/design divergences
133133+ - Missing scenario coverage
134134+ - Each with specific recommendation
135135+136136+ 3. **SUGGESTION** (Nice to fix):
137137+ - Pattern inconsistencies
138138+ - Minor improvements
139139+ - Each with specific recommendation
140140+141141+ **Final Assessment**:
142142+ - If CRITICAL issues: "X critical issue(s) found. Fix before archiving."
143143+ - If only warnings: "No critical issues. Y warning(s) to consider. Ready for archive (with noted improvements)."
144144+ - If all clear: "All checks passed. Ready for archive."
145145+146146+**Verification Heuristics**
147147+148148+- **Completeness**: Focus on objective checklist items (checkboxes, requirements list)
149149+- **Correctness**: Use keyword search, file path analysis, reasonable inference - don't require perfect certainty
150150+- **Coherence**: Look for glaring inconsistencies, don't nitpick style
151151+- **False Positives**: When uncertain, prefer SUGGESTION over WARNING, WARNING over CRITICAL
152152+- **Actionability**: Every issue must have a specific recommendation with file/line references where applicable
153153+154154+**Graceful Degradation**
155155+156156+- If only tasks.md exists: verify task completion only, skip spec/design checks
157157+- If tasks + specs exist: verify completeness and correctness, skip design
158158+- If full artifacts: verify all three dimensions
159159+- Always note which checks were skipped and why
160160+161161+**Output Format**
162162+163163+Use clear markdown with:
164164+- Table for summary scorecard
165165+- Grouped lists for issues (CRITICAL/WARNING/SUGGESTION)
166166+- Code references in format: `file.ts:123`
167167+- Specific, actionable recommendations
168168+- No vague suggestions like "consider reviewing"
+20
openspec/config.yaml
···11+schema: spec-driven
22+33+# Project context (optional)
44+# This is shown to AI when creating artifacts.
55+# Add your tech stack, conventions, style guides, domain knowledge, etc.
66+# Example:
77+# context: |
88+# Tech stack: TypeScript, React, Node.js
99+# We use conventional commits
1010+# Domain: e-commerce platform
1111+1212+# Per-artifact rules (optional)
1313+# Add custom rules for specific artifacts.
1414+# Example:
1515+# rules:
1616+# proposal:
1717+# - Keep proposals under 500 words
1818+# - Always include a "Non-goals" section
1919+# tasks:
2020+# - Break tasks into chunks of max 2 hours