Implement tasks from an OpenSpec change.
-**Input**: Optionally specify a change name (e.g., `/opsx:apply add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
+**Input**: Optionally specify a change name (e.g., `/opsx-apply add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
**Steps**
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
- Always announce: "Using change: <name>" and how to override (e.g., `/opsx:apply <other>`).
+ Always announce: "Using change: <name>" and how to override (e.g., `/opsx-apply <other>`).
2. **Check status to understand the schema**
+
```bash
openspec status --change "<name>" --json
```
+
Parse the JSON to understand:
- `schemaName`: The workflow being used (e.g., "spec-driven")
- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
- Dynamic instruction based on current state
**Handle states:**
- - If `state: "blocked"` (missing artifacts): show message, suggest using `/opsx:continue`
+ - If `state: "blocked"` (missing artifacts): show message, suggest using `/opsx-continue`
- If `state: "all_done"`: congratulate, suggest archive
- Otherwise: proceed to implementation
- [x] Task 2
...
-All tasks complete! Ready to archive this change.
+All tasks complete! You can archive this change with `/opsx-archive`.
```
**Output On Pause (Issue Encountered)**
```
**Guardrails**
+
- Keep going through tasks until done or blocked
- Always read context files before starting (from the apply instructions output)
- If task is ambiguous, pause and ask before implementing
Archive a completed change in the experimental workflow.
-**Input**: Optionally specify a change name after `/opsx:archive` (e.g., `/opsx:archive add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
+**Input**: Optionally specify a change name after `/opsx-archive` (e.g., `/opsx-archive add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
**Steps**
- If changes needed: "Sync now (recommended)", "Archive without syncing"
- If already synced: "Archive now", "Sync anyway", "Cancel"
- If user chooses sync, execute `/opsx:sync` logic. Proceed to archive regardless of choice.
+ If user chooses sync, execute `/opsx-sync` logic. Proceed to archive regardless of choice.
5. **Perform the archive**
Create the archive directory if it doesn't exist:
+
```bash
mkdir -p openspec/changes/archive
```
```
**Guardrails**
+
- Always prompt for change selection if not provided
- Use artifact graph (openspec status --json) for completion checking
- Don't block archive on warnings - just inform and confirm
- Preserve .openspec.yaml when moving to archive (it moves with the directory)
- Show clear summary of what happened
-- If sync is requested, use /opsx:sync approach (agent-driven)
+- If sync is requested, use /opsx-sync approach (agent-driven)
- If delta specs exist, always run the sync assessment and show the combined summary before prompting
For each selected change, collect:
a. **Artifact status** - Run `openspec status --change "<name>" --json`
- - Parse `schemaName` and `artifacts` list
- - Note which artifacts are `done` vs other states
+ - Parse `schemaName` and `artifacts` list
+ - Note which artifacts are `done` vs other states
b. **Task completion** - Read `openspec/changes/<name>/tasks.md`
- - Count `- [ ]` (incomplete) vs `- [x]` (complete)
- - If no tasks file exists, note as "No tasks"
+ - Count `- [ ]` (incomplete) vs `- [x]` (complete)
+ - If no tasks file exists, note as "No tasks"
c. **Delta specs** - Check `openspec/changes/<name>/specs/` directory
- - List which capability specs exist
- - For each, extract requirement names (lines matching `### Requirement: <name>`)
+ - List which capability specs exist
+ - For each, extract requirement names (lines matching `### Requirement: <name>`)
4. **Detect spec conflicts**
a. **Read the delta specs** from each conflicting change to understand what each claims to add/modify
b. **Search the codebase** for implementation evidence:
- - Look for code implementing requirements from each delta spec
- - Check for related files, functions, or tests
+ - Look for code implementing requirements from each delta spec
+ - Check for related files, functions, or tests
c. **Determine resolution**:
- - If only one change is actually implemented -> sync that one's specs
- - If both implemented -> apply in chronological order (older first, newer overwrites)
- - If neither implemented -> skip spec sync, warn user
+ - If only one change is actually implemented -> sync that one's specs
+ - If both implemented -> apply in chronological order (older first, newer overwrites)
+ - If neither implemented -> skip spec sync, warn user
d. **Record resolution** for each conflict:
- - Which change's specs to apply
- - In what order (if both)
- - Rationale (what was found in codebase)
+ - Which change's specs to apply
+ - In what order (if both)
+ - Rationale (what was found in codebase)
6. **Show consolidated status table**
```
For conflicts, show the resolution:
+
```
* Conflict resolution:
- auth spec: Will apply add-oauth then add-jwt (both implemented, chronological order)
```
For incomplete changes, show warnings:
+
```
Warnings:
- add-verify-skill: 1 incomplete artifact, 3 incomplete tasks
7. **Confirm batch operation**
Use **AskUserQuestion tool** with a single confirmation:
-
- "Archive N changes?" with options based on status
- Options might include:
- "Archive all N changes"
Process changes in the determined order (respecting conflict resolution):
a. **Sync specs** if delta specs exist:
- - Use the openspec-sync-specs approach (agent-driven intelligent merge)
- - For conflicts, apply in resolved order
- - Track if sync was done
+ - Use the openspec-sync-specs approach (agent-driven intelligent merge)
+ - For conflicts, apply in resolved order
+ - Track if sync was done
b. **Perform the archive**:
- ```bash
- mkdir -p openspec/changes/archive
- mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
- ```
+
+ ```bash
+ mkdir -p openspec/changes/archive
+ mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
+ ```
c. **Track outcome** for each change:
- - Success: archived successfully
- - Failed: error during archive (record error)
- - Skipped: user chose not to archive (if applicable)
+ - Success: archived successfully
+ - Failed: error during archive (record error)
+ - Skipped: user chose not to archive (if applicable)
9. **Display summary**
```
If any failures:
+
```
Failed 1 change:
- some-change: Archive directory already exists
**Conflict Resolution Examples**
Example 1: Only one implemented
+
```
Conflict: specs/auth/spec.md touched by [add-oauth, add-jwt]
```
Example 2: Both implemented
+
```
Conflict: specs/api/spec.md touched by [add-rest-api, add-graphql]
```
## No Changes to Archive
-No active changes found. Use `/opsx:new` to create a new change.
+No active changes found. Use `/opsx-new` to create a new change.
```
**Guardrails**
+
- Allow any number of changes (1+ is fine, 2+ is the typical use case)
- Always prompt for selection, never auto-select
- Detect spec conflicts early and resolve by checking codebase
Continue working on a change by creating the next artifact.
-**Input**: Optionally specify a change name after `/opsx:continue` (e.g., `/opsx:continue add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
+**Input**: Optionally specify a change name after `/opsx-continue` (e.g., `/opsx-continue add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
**Steps**
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
2. **Check current status**
+
```bash
openspec status --change "<name>" --json
```
+
Parse the JSON to understand current state. The response includes:
- `schemaName`: The workflow schema being used (e.g., "spec-driven")
- `artifacts`: Array of artifacts with their status ("done", "ready", "blocked")
3. **Act based on status**:
- ---
+ ***
**If all artifacts are complete (`isComplete: true`)**:
- Congratulate the user
- Show final status including the schema used
- - Suggest: "All artifacts created! You can now implement this change or archive it."
+ - Suggest: "All artifacts created! You can now implement this change with `/opsx-apply` or archive it with `/opsx-archive`."
- STOP
- ---
+ ***
**If artifacts are ready to create** (status shows artifacts with `status: "ready"`):
- Pick the FIRST artifact with `status: "ready"` from the status output
- Show what was created and what's now unlocked
- STOP after creating ONE artifact
- ---
+ ***
**If no artifacts are ready (all blocked)**:
- This shouldn't happen with a valid schema
**Output**
After each invocation, show:
+
- Which artifact was created
- Schema workflow being used
- Current progress (N/M complete)
- What artifacts are now unlocked
-- Prompt: "Run `/opsx:continue` to create the next artifact"
+- Prompt: "Run `/opsx-continue` to create the next artifact"
**Artifact Creation Guidelines**
Common artifact patterns:
**spec-driven schema** (proposal → specs → design → tasks):
+
- **proposal.md**: Ask user about the change if not clear. Fill in Why, What Changes, Capabilities, Impact.
- The Capabilities section is critical - each capability listed will need a spec file.
- **specs/<capability>/spec.md**: Create one spec per capability listed in the proposal's Capabilities section (use the capability name, not the change name).
For other schemas, follow the `instruction` field from the CLI output.
**Guardrails**
+
- Create ONE artifact per invocation
- Always read dependency artifacts before creating a new one
- Never skip artifacts or create out of order
Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
-**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 (e.g., start a change with `/opsx:new` or `/opsx:ff`). You MAY create OpenSpec artifacts (proposals, designs, specs) if the user asks—that's capturing thinking, not implementing.
+**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 (e.g., start a change with `/opsx-new` or `/opsx-ff`). You MAY create OpenSpec artifacts (proposals, designs, specs) if the user asks—that's capturing thinking, not implementing.
**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.
-**Input**: The argument after `/opsx:explore` is whatever the user wants to think about. Could be:
+**Input**: The argument after `/opsx-explore` is whatever the user wants to think about. Could be:
+
- A vague idea: "real-time collaboration"
- A specific problem: "the auth system is getting unwieldy"
- A change name: "add-dark-mode" (to explore in context of that change)
Depending on what the user brings, you might:
**Explore the problem space**
+
- Ask clarifying questions that emerge from what they said
- Challenge assumptions
- Reframe the problem
- Find analogies
**Investigate the codebase**
+
- Map existing architecture relevant to the discussion
- Find integration points
- Identify patterns already in use
- Surface hidden complexity
**Compare options**
+
- Brainstorm multiple approaches
- Build comparison tables
- Sketch tradeoffs
- Recommend a path (if asked)
**Visualize**
+
```
┌─────────────────────────────────────────┐
│ Use ASCII diagrams liberally │
```
**Surface risks and unknowns**
+
- Identify what could go wrong
- Find gaps in understanding
- Suggest spikes or investigations
### Check for context
At the start, quickly check what exists:
+
```bash
openspec list --json
```
This tells you:
+
- If there are active changes
- Their names, schemas, and status
- What the user might be working on
Think freely. When insights crystallize, you might offer:
- "This feels solid enough to start a change. Want me to create one?"
- → Can transition to `/opsx:new` or `/opsx:ff`
+ → Can transition to `/opsx-new` or `/opsx-ff`
- Or keep exploring - no pressure to formalize
### When a change exists
3. **Offer to capture when decisions are made**
- | Insight Type | Where to Capture |
- |--------------|------------------|
+ | Insight Type | Where to Capture |
+ | -------------------------- | ---------------------------- |
| New requirement discovered | `specs/<capability>/spec.md` |
- | Requirement changed | `specs/<capability>/spec.md` |
- | Design decision made | `design.md` |
- | Scope changed | `proposal.md` |
- | New work identified | `tasks.md` |
- | Assumption invalidated | Relevant artifact |
+ | Requirement changed | `specs/<capability>/spec.md` |
+ | Design decision made | `design.md` |
+ | Scope changed | `proposal.md` |
+ | New work identified | `tasks.md` |
+ | Assumption invalidated | Relevant artifact |
Example offers:
- "That's a design decision. Capture it in design.md?"
There's no required ending. Discovery might:
-- **Flow into action**: "Ready to start? `/opsx:new` or `/opsx:ff`"
+- **Flow into action**: "Ready to start? `/opsx-new` or `/opsx-ff`"
- **Result in artifact updates**: "Updated design.md with these decisions"
- **Just provide clarity**: User has what they need, moves on
- **Continue later**: "We can pick this up anytime"
Fast-forward through artifact creation - generate everything needed to start implementation.
-**Input**: The argument after `/opsx:ff` is the change name (kebab-case), OR a description of what the user wants to build.
+**Input**: The argument after `/opsx-ff` is the change name (kebab-case), OR a description of what the user wants to build.
**Steps**
1. **If no input provided, ask what they want to build**
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
+
> "What change do you want to work on? Describe what you want to build or fix."
From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
2. **Create the change directory**
+
```bash
openspec new change "<name>"
```
+
This creates a scaffolded change at `openspec/changes/<name>/`.
3. **Get the artifact build order**
+
```bash
openspec status --change "<name>" --json
```
+
Parse the JSON to get:
- `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
- `artifacts`: list of all artifacts with their status and dependencies
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
a. **For each artifact that is `ready` (dependencies satisfied)**:
- - Get instructions:
- ```bash
- openspec instructions <artifact-id> --change "<name>" --json
- ```
- - The instructions JSON includes:
- - `context`: Project background (constraints for you - do NOT include in output)
- - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
- - `template`: The structure to use for your output file
- - `instruction`: Schema-specific guidance for this artifact type
- - `outputPath`: Where to write the artifact
- - `dependencies`: Completed artifacts to read for context
- - Read any completed dependency files for context
- - Create the artifact file using `template` as the structure
- - Apply `context` and `rules` as constraints - but do NOT copy them into the file
- - Show brief progress: "✓ Created <artifact-id>"
+ - Get instructions:
+ ```bash
+ openspec instructions <artifact-id> --change "<name>" --json
+ ```
+ - The instructions JSON includes:
+ - `context`: Project background (constraints for you - do NOT include in output)
+ - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
+ - `template`: The structure to use for your output file
+ - `instruction`: Schema-specific guidance for this artifact type
+ - `outputPath`: Where to write the artifact
+ - `dependencies`: Completed artifacts to read for context
+ - Read any completed dependency files for context
+ - Create the artifact file using `template` as the structure
+ - Apply `context` and `rules` as constraints - but do NOT copy them into the file
+ - Show brief progress: "✓ Created <artifact-id>"
b. **Continue until all `applyRequires` artifacts are complete**
- - After creating each artifact, re-run `openspec status --change "<name>" --json`
- - Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
- - Stop when all `applyRequires` artifacts are done
+ - After creating each artifact, re-run `openspec status --change "<name>" --json`
+ - Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
+ - Stop when all `applyRequires` artifacts are done
c. **If an artifact requires user input** (unclear context):
- - Use **AskUserQuestion tool** to clarify
- - Then continue with creation
+ - Use **AskUserQuestion tool** to clarify
+ - Then continue with creation
5. **Show final status**
```bash
**Output**
After completing all artifacts, summarize:
+
- Change name and location
- List of artifacts created with brief descriptions
- What's ready: "All artifacts created! Ready for implementation."
-- Prompt: "Run `/opsx:apply` to start implementing."
+- Prompt: "Run `/opsx-apply` to start implementing."
**Artifact Creation Guidelines**
- Use the `template` as a starting point, filling in based on context
**Guardrails**
+
- Create ALL artifacts needed for implementation (as defined by schema's `apply.requires`)
- Always read dependency artifacts before creating a new one
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
Start a new change using the experimental artifact-driven approach.
-**Input**: The argument after `/opsx:new` is the change name (kebab-case), OR a description of what the user wants to build.
+**Input**: The argument after `/opsx-new` is the change name (kebab-case), OR a description of what the user wants to build.
**Steps**
1. **If no input provided, ask what they want to build**
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
+
> "What change do you want to work on? Describe what you want to build or fix."
From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
**Otherwise**: Omit `--schema` to use the default.
3. **Create the change directory**
+
```bash
openspec new change "<name>"
```
+
Add `--schema <name>` only if the user requested a specific workflow.
This creates a scaffolded change at `openspec/changes/<name>/` with the selected schema.
4. **Show the artifact status**
+
```bash
openspec status --change "<name>"
```
+
This shows which artifacts need to be created and which are ready (dependencies satisfied).
5. **Get instructions for the first artifact**
The first artifact depends on the schema. Check the status output to find the first artifact with status "ready".
+
```bash
openspec instructions <first-artifact-id> --change "<name>"
```
+
This outputs the template and context for creating the first artifact.
6. **STOP and wait for user direction**
**Output**
After completing the steps, summarize:
+
- Change name and location
- Schema/workflow being used and its artifact sequence
- Current status (0/N artifacts complete)
- The template for the first artifact
-- Prompt: "Ready to create the first artifact? Run `/opsx:continue` or just describe what this change is about and I'll draft it."
+- Prompt: "Ready to create the first artifact? Run `/opsx-continue` or just describe what this change is about and I'll draft it."
**Guardrails**
+
- Do NOT create any artifacts yet - just show the instructions
- Do NOT advance beyond showing the first artifact template
- If the name is invalid (not kebab-case), ask for a valid name
-- If a change with that name already exists, suggest using `/opsx:continue` instead
+- If a change with that name already exists, suggest using `/opsx-continue` instead
- Pass --schema if using a non-default workflow
```
**If not initialized:**
-> OpenSpec isn't set up in this project yet. Run `openspec init` first, then come back to `/opsx:onboard`.
+
+> OpenSpec isn't set up in this project yet. Run `openspec init` first, then come back to `/opsx-onboard`.
Stop here if not initialized.
6. **Missing validation** - User input handlers without validation
Also check recent git activity:
+
```bash
git log --oneline -10 2>/dev/null || echo "No git history"
```
```
**If nothing found:** Fall back to asking what the user wants to build:
+
> I didn't find obvious quick wins in your codebase. What's something small you've been meaning to add or fix?
### Scope Guardrail
```
Spend 1-2 minutes investigating the relevant code:
+
- Read the file(s) involved
- Draw a quick ASCII diagram if it helps
- Note any considerations
│ [Optional: ASCII diagram if helpful] │
└─────────────────────────────────────────┘
-Explore mode (`/opsx:explore`) is for this kind of thinking—investigating before implementing. You can use it anytime you need to think through a problem.
+Explore mode (`/opsx-explore`) is for this kind of thinking—investigating before implementing. You can use it anytime you need to think through a problem.
Now let's create a change to hold our work.
```
## Phase 4: Create the Change
**EXPLAIN:**
+
```
## Creating a Change
```
**DO:** Create the change with a derived kebab-case name:
+
```bash
openspec new change "<derived-name>"
```
**SHOW:**
+
```
Created: `openspec/changes/<name>/`
The folder structure:
```
+
openspec/changes/<name>/
-├── proposal.md ← Why we're doing this (empty, we'll fill it)
-├── design.md ← How we'll build it (empty)
-├── specs/ ← Detailed requirements (empty)
-└── tasks.md ← Implementation checklist (empty)
+├── proposal.md ← Why we're doing this (empty, we'll fill it)
+├── design.md ← How we'll build it (empty)
+├── specs/ ← Detailed requirements (empty)
+└── tasks.md ← Implementation checklist (empty)
+
```
Now let's fill in the first artifact—the proposal.
## Phase 5: Proposal
**EXPLAIN:**
+
```
## The Proposal
**PAUSE** - Wait for user approval/feedback.
After approval, save the proposal:
+
```bash
openspec instructions proposal --change "<name>" --json
```
+
Then write the content to `openspec/changes/<name>/proposal.md`.
```
## Phase 6: Specs
**EXPLAIN:**
+
```
## Specs
```
**DO:** Create the spec file:
+
```bash
mkdir -p openspec/changes/<name>/specs/<capability-name>
```
## Phase 7: Design
**EXPLAIN:**
+
```
## Design
## Phase 8: Tasks
**EXPLAIN:**
+
```
## Tasks
## Phase 9: Apply (Implementation)
**EXPLAIN:**
+
```
## Implementation
## Phase 10: Archive
**EXPLAIN:**
+
```
## Archiving
```
**DO:**
+
```bash
openspec archive "<name>"
```
**SHOW:**
+
```
Archived to: `openspec/changes/archive/YYYY-MM-DD-<name>/`
| Command | What it does |
|---------|--------------|
-| `/opsx:explore` | Think through problems before/during work |
-| `/opsx:new` | Start a new change, step through artifacts |
-| `/opsx:ff` | Fast-forward: create all artifacts at once |
-| `/opsx:continue` | Continue working on an existing change |
-| `/opsx:apply` | Implement tasks from a change |
-| `/opsx:verify` | Verify implementation matches artifacts |
-| `/opsx:archive` | Archive a completed change |
+| `/opsx-explore` | Think through problems before/during work |
+| `/opsx-new` | Start a new change, step through artifacts |
+| `/opsx-ff` | Fast-forward: create all artifacts at once |
+| `/opsx-continue` | Continue working on an existing change |
+| `/opsx-apply` | Implement tasks from a change |
+| `/opsx-verify` | Verify implementation matches artifacts |
+| `/opsx-archive` | Archive a completed change |
---
## What's Next?
-Try `/opsx:new` or `/opsx:ff` on something you actually want to build. You've got the rhythm now!
+Try `/opsx-new` or `/opsx-ff` on something you actually want to build. You've got the rhythm now!
```
---
No problem! Your change is saved at `openspec/changes/<name>/`.
To pick up where we left off later:
-- `/opsx:continue <name>` - Resume artifact creation
-- `/opsx:apply <name>` - Jump to implementation (if tasks exist)
+- `/opsx-continue <name>` - Resume artifact creation
+- `/opsx-apply <name>` - Jump to implementation (if tasks exist)
The work won't be lost. Come back whenever you're ready.
```
| Command | What it does |
|---------|--------------|
-| `/opsx:explore` | Think through problems (no code changes) |
-| `/opsx:new <name>` | Start a new change, step by step |
-| `/opsx:ff <name>` | Fast-forward: all artifacts at once |
-| `/opsx:continue <name>` | Continue an existing change |
-| `/opsx:apply <name>` | Implement tasks |
-| `/opsx:verify <name>` | Verify implementation |
-| `/opsx:archive <name>` | Archive when done |
-
-Try `/opsx:new` to start your first change, or `/opsx:ff` if you want to move fast.
+| `/opsx-explore` | Think through problems (no code changes) |
+| `/opsx-new <name>` | Start a new change, step by step |
+| `/opsx-ff <name>` | Fast-forward: all artifacts at once |
+| `/opsx-continue <name>` | Continue an existing change |
+| `/opsx-apply <name>` | Implement tasks |
+| `/opsx-verify <name>` | Verify implementation |
+| `/opsx-archive <name>` | Archive when done |
+
+Try `/opsx-new` to start your first change, or `/opsx-ff` if you want to move fast.
```
Exit gracefully.
This is an **agent-driven** operation - you will read delta specs and directly edit main specs to apply the changes. This allows intelligent merging (e.g., adding a scenario without copying the entire requirement).
-**Input**: Optionally specify a change name after `/opsx:sync` (e.g., `/opsx:sync add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
+**Input**: Optionally specify a change name after `/opsx-sync` (e.g., `/opsx-sync add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
**Steps**
c. **Apply changes intelligently**:
- **ADDED Requirements:**
- - If requirement doesn't exist in main spec → add it
- - If requirement already exists → update it to match (treat as implicit MODIFIED)
+ **ADDED Requirements:**
+ - If requirement doesn't exist in main spec → add it
+ - If requirement already exists → update it to match (treat as implicit MODIFIED)
- **MODIFIED Requirements:**
- - Find the requirement in main spec
- - Apply the changes - this can be:
- - Adding new scenarios (don't need to copy existing ones)
- - Modifying existing scenarios
- - Changing the requirement description
- - Preserve scenarios/content not mentioned in the delta
+ **MODIFIED Requirements:**
+ - Find the requirement in main spec
+ - Apply the changes - this can be:
+ - Adding new scenarios (don't need to copy existing ones)
+ - Modifying existing scenarios
+ - Changing the requirement description
+ - Preserve scenarios/content not mentioned in the delta
- **REMOVED Requirements:**
- - Remove the entire requirement block from main spec
+ **REMOVED Requirements:**
+ - Remove the entire requirement block from main spec
- **RENAMED Requirements:**
- - Find the FROM requirement, rename to TO
+ **RENAMED Requirements:**
+ - Find the FROM requirement, rename to TO
d. **Create new main spec** if capability doesn't exist yet:
- - Create `openspec/specs/<capability>/spec.md`
- - Add Purpose section (can be brief, mark as TBD)
- - Add Requirements section with the ADDED requirements
+ - Create `openspec/specs/<capability>/spec.md`
+ - Add Purpose section (can be brief, mark as TBD)
+ - Add Requirements section with the ADDED requirements
4. **Show summary**
## ADDED Requirements
### Requirement: New Feature
+
The system SHALL do something new.
#### Scenario: Basic case
+
- **WHEN** user does X
- **THEN** system does Y
## MODIFIED Requirements
### Requirement: Existing Feature
+
#### Scenario: New scenario to add
+
- **WHEN** user does A
- **THEN** system does B
**Key Principle: Intelligent Merging**
Unlike programmatic merging, you can apply **partial updates**:
+
- To add a scenario, just include that scenario under MODIFIED - don't copy existing scenarios
-- The delta represents *intent*, not a wholesale replacement
+- The delta represents _intent_, not a wholesale replacement
- Use your judgment to merge changes sensibly
**Output On Success**
```
**Guardrails**
+
- Read both delta and main specs before making changes
- Preserve existing content not mentioned in delta
- If something is unclear, ask for clarification
Verify that an implementation matches the change artifacts (specs, tasks, design).
-**Input**: Optionally specify a change name after `/opsx:verify` (e.g., `/opsx:verify add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
+**Input**: Optionally specify a change name after `/opsx-verify` (e.g., `/opsx-verify add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
**Steps**
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
2. **Check status to understand the schema**
+
```bash
openspec status --change "<name>" --json
```
+
Parse the JSON to understand:
- `schemaName`: The workflow being used (e.g., "spec-driven")
- Which artifacts exist for this change
8. **Generate Verification Report**
**Summary Scorecard**:
+
```
## Verification Report: <change-name>
```
**Issues by Priority**:
-
1. **CRITICAL** (Must fix before archive):
- Incomplete tasks
- Missing requirement implementations
**Output Format**
Use clear markdown with:
+
- Table for summary scorecard
- Grouped lists for issues (CRITICAL/WARNING/SUGGESTION)
- Code references in format: `file.ts:123`
metadata:
author: openspec
version: "1.0"
- generatedBy: "1.0.2"
+ generatedBy: "1.1.1"
---
Implement tasks from an OpenSpec change.
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
- Always announce: "Using change: <name>" and how to override (e.g., `/opsx:apply <other>`).
+ Always announce: "Using change: <name>" and how to override (e.g., `/opsx-apply <other>`).
2. **Check status to understand the schema**
+
```bash
openspec status --change "<name>" --json
```
+
Parse the JSON to understand:
- `schemaName`: The workflow being used (e.g., "spec-driven")
- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
```
**Guardrails**
+
- Keep going through tasks until done or blocked
- Always read context files before starting (from the apply instructions output)
- If task is ambiguous, pause and ask before implementing
metadata:
author: openspec
version: "1.0"
- generatedBy: "1.0.2"
+ generatedBy: "1.1.1"
---
Archive a completed change in the experimental workflow.
- If changes needed: "Sync now (recommended)", "Archive without syncing"
- If already synced: "Archive now", "Sync anyway", "Cancel"
- If user chooses sync, execute /opsx:sync logic (use the openspec-sync-specs skill). Proceed to archive regardless of choice.
+ If user chooses sync, execute /opsx-sync logic (use the openspec-sync-specs skill). Proceed to archive regardless of choice.
5. **Perform the archive**
Create the archive directory if it doesn't exist:
+
```bash
mkdir -p openspec/changes/archive
```
```
**Guardrails**
+
- Always prompt for change selection if not provided
- Use artifact graph (openspec status --json) for completion checking
- Don't block archive on warnings - just inform and confirm
metadata:
author: openspec
version: "1.0"
- generatedBy: "1.0.2"
+ generatedBy: "1.1.1"
---
Archive multiple completed changes in a single operation.
For each selected change, collect:
a. **Artifact status** - Run `openspec status --change "<name>" --json`
- - Parse `schemaName` and `artifacts` list
- - Note which artifacts are `done` vs other states
+ - Parse `schemaName` and `artifacts` list
+ - Note which artifacts are `done` vs other states
b. **Task completion** - Read `openspec/changes/<name>/tasks.md`
- - Count `- [ ]` (incomplete) vs `- [x]` (complete)
- - If no tasks file exists, note as "No tasks"
+ - Count `- [ ]` (incomplete) vs `- [x]` (complete)
+ - If no tasks file exists, note as "No tasks"
c. **Delta specs** - Check `openspec/changes/<name>/specs/` directory
- - List which capability specs exist
- - For each, extract requirement names (lines matching `### Requirement: <name>`)
+ - List which capability specs exist
+ - For each, extract requirement names (lines matching `### Requirement: <name>`)
4. **Detect spec conflicts**
a. **Read the delta specs** from each conflicting change to understand what each claims to add/modify
b. **Search the codebase** for implementation evidence:
- - Look for code implementing requirements from each delta spec
- - Check for related files, functions, or tests
+ - Look for code implementing requirements from each delta spec
+ - Check for related files, functions, or tests
c. **Determine resolution**:
- - If only one change is actually implemented -> sync that one's specs
- - If both implemented -> apply in chronological order (older first, newer overwrites)
- - If neither implemented -> skip spec sync, warn user
+ - If only one change is actually implemented -> sync that one's specs
+ - If both implemented -> apply in chronological order (older first, newer overwrites)
+ - If neither implemented -> skip spec sync, warn user
d. **Record resolution** for each conflict:
- - Which change's specs to apply
- - In what order (if both)
- - Rationale (what was found in codebase)
+ - Which change's specs to apply
+ - In what order (if both)
+ - Rationale (what was found in codebase)
6. **Show consolidated status table**
```
For conflicts, show the resolution:
+
```
* Conflict resolution:
- auth spec: Will apply add-oauth then add-jwt (both implemented, chronological order)
```
For incomplete changes, show warnings:
+
```
Warnings:
- add-verify-skill: 1 incomplete artifact, 3 incomplete tasks
7. **Confirm batch operation**
Use **AskUserQuestion tool** with a single confirmation:
-
- "Archive N changes?" with options based on status
- Options might include:
- "Archive all N changes"
Process changes in the determined order (respecting conflict resolution):
a. **Sync specs** if delta specs exist:
- - Use the openspec-sync-specs approach (agent-driven intelligent merge)
- - For conflicts, apply in resolved order
- - Track if sync was done
+ - Use the openspec-sync-specs approach (agent-driven intelligent merge)
+ - For conflicts, apply in resolved order
+ - Track if sync was done
b. **Perform the archive**:
- ```bash
- mkdir -p openspec/changes/archive
- mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
- ```
+
+ ```bash
+ mkdir -p openspec/changes/archive
+ mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
+ ```
c. **Track outcome** for each change:
- - Success: archived successfully
- - Failed: error during archive (record error)
- - Skipped: user chose not to archive (if applicable)
+ - Success: archived successfully
+ - Failed: error during archive (record error)
+ - Skipped: user chose not to archive (if applicable)
9. **Display summary**
```
If any failures:
+
```
Failed 1 change:
- some-change: Archive directory already exists
**Conflict Resolution Examples**
Example 1: Only one implemented
+
```
Conflict: specs/auth/spec.md touched by [add-oauth, add-jwt]
```
Example 2: Both implemented
+
```
Conflict: specs/api/spec.md touched by [add-rest-api, add-graphql]
```
## No Changes to Archive
-No active changes found. Use `/opsx:new` to create a new change.
+No active changes found. Use `/opsx-new` to create a new change.
```
**Guardrails**
+
- Allow any number of changes (1+ is fine, 2+ is the typical use case)
- Always prompt for selection, never auto-select
- Detect spec conflicts early and resolve by checking codebase
metadata:
author: openspec
version: "1.0"
- generatedBy: "1.0.2"
+ generatedBy: "1.1.1"
---
Continue working on a change by creating the next artifact.
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
2. **Check current status**
+
```bash
openspec status --change "<name>" --json
```
+
Parse the JSON to understand current state. The response includes:
- `schemaName`: The workflow schema being used (e.g., "spec-driven")
- `artifacts`: Array of artifacts with their status ("done", "ready", "blocked")
3. **Act based on status**:
- ---
+ ***
**If all artifacts are complete (`isComplete: true`)**:
- Congratulate the user
- Suggest: "All artifacts created! You can now implement this change or archive it."
- STOP
- ---
+ ***
**If artifacts are ready to create** (status shows artifacts with `status: "ready"`):
- Pick the FIRST artifact with `status: "ready"` from the status output
- Show what was created and what's now unlocked
- STOP after creating ONE artifact
- ---
+ ***
**If no artifacts are ready (all blocked)**:
- This shouldn't happen with a valid schema
**Output**
After each invocation, show:
+
- Which artifact was created
- Schema workflow being used
- Current progress (N/M complete)
Common artifact patterns:
**spec-driven schema** (proposal → specs → design → tasks):
+
- **proposal.md**: Ask user about the change if not clear. Fill in Why, What Changes, Capabilities, Impact.
- The Capabilities section is critical - each capability listed will need a spec file.
- **specs/<capability>/spec.md**: Create one spec per capability listed in the proposal's Capabilities section (use the capability name, not the change name).
For other schemas, follow the `instruction` field from the CLI output.
**Guardrails**
+
- Create ONE artifact per invocation
- Always read dependency artifacts before creating a new one
- Never skip artifacts or create out of order
metadata:
author: openspec
version: "1.0"
- generatedBy: "1.0.2"
+ generatedBy: "1.1.1"
---
Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
-**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 (e.g., start a change with `/opsx:new` or `/opsx:ff`). You MAY create OpenSpec artifacts (proposals, designs, specs) if the user asks—that's capturing thinking, not implementing.
+**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 (e.g., start a change with `/opsx-new` or `/opsx-ff`). You MAY create OpenSpec artifacts (proposals, designs, specs) if the user asks—that's capturing thinking, not implementing.
**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.
Depending on what the user brings, you might:
**Explore the problem space**
+
- Ask clarifying questions that emerge from what they said
- Challenge assumptions
- Reframe the problem
- Find analogies
**Investigate the codebase**
+
- Map existing architecture relevant to the discussion
- Find integration points
- Identify patterns already in use
- Surface hidden complexity
**Compare options**
+
- Brainstorm multiple approaches
- Build comparison tables
- Sketch tradeoffs
- Recommend a path (if asked)
**Visualize**
+
```
┌─────────────────────────────────────────┐
│ Use ASCII diagrams liberally │
```
**Surface risks and unknowns**
+
- Identify what could go wrong
- Find gaps in understanding
- Suggest spikes or investigations
### Check for context
At the start, quickly check what exists:
+
```bash
openspec list --json
```
This tells you:
+
- If there are active changes
- Their names, schemas, and status
- What the user might be working on
Think freely. When insights crystallize, you might offer:
- "This feels solid enough to start a change. Want me to create one?"
- → Can transition to `/opsx:new` or `/opsx:ff`
+ → Can transition to `/opsx-new` or `/opsx-ff`
- Or keep exploring - no pressure to formalize
### When a change exists
3. **Offer to capture when decisions are made**
- | Insight Type | Where to Capture |
- |--------------|------------------|
+ | Insight Type | Where to Capture |
+ | -------------------------- | ---------------------------- |
| New requirement discovered | `specs/<capability>/spec.md` |
- | Requirement changed | `specs/<capability>/spec.md` |
- | Design decision made | `design.md` |
- | Scope changed | `proposal.md` |
- | New work identified | `tasks.md` |
- | Assumption invalidated | Relevant artifact |
+ | Requirement changed | `specs/<capability>/spec.md` |
+ | Design decision made | `design.md` |
+ | Scope changed | `proposal.md` |
+ | New work identified | `tasks.md` |
+ | Assumption invalidated | Relevant artifact |
Example offers:
- "That's a design decision. Capture it in design.md?"
## Handling Different Entry Points
**User brings a vague idea:**
+
```
User: I'm thinking about adding real-time collaboration
```
**User brings a specific problem:**
+
```
User: The auth system is a mess
```
**User is stuck mid-implementation:**
+
```
-User: /opsx:explore add-auth-system
+User: /opsx-explore add-auth-system
The OAuth integration is more complex than expected
You: [reads change artifacts]
```
**User wants to compare options:**
+
```
User: Should we use Postgres or SQLite?
There's no required ending. Discovery might:
-- **Flow into action**: "Ready to start? /opsx:new or /opsx:ff"
+- **Flow into action**: "Ready to start? /opsx-new or /opsx-ff"
- **Result in artifact updates**: "Updated design.md with these decisions"
- **Just provide clarity**: User has what they need, moves on
- **Continue later**: "We can pick this up anytime"
**Open questions**: [if any remain]
**Next steps** (if ready):
-- Create a change: /opsx:new <name>
-- Fast-forward to tasks: /opsx:ff <name>
+- Create a change: /opsx-new <name>
+- Fast-forward to tasks: /opsx-ff <name>
- Keep exploring: just keep talking
```
metadata:
author: openspec
version: "1.0"
- generatedBy: "1.0.2"
+ generatedBy: "1.1.1"
---
Fast-forward through artifact creation - generate everything needed to start implementation in one go.
1. **If no clear input provided, ask what they want to build**
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
+
> "What change do you want to work on? Describe what you want to build or fix."
From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
2. **Create the change directory**
+
```bash
openspec new change "<name>"
```
+
This creates a scaffolded change at `openspec/changes/<name>/`.
3. **Get the artifact build order**
+
```bash
openspec status --change "<name>" --json
```
+
Parse the JSON to get:
- `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
- `artifacts`: list of all artifacts with their status and dependencies
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
a. **For each artifact that is `ready` (dependencies satisfied)**:
- - Get instructions:
- ```bash
- openspec instructions <artifact-id> --change "<name>" --json
- ```
- - The instructions JSON includes:
- - `context`: Project background (constraints for you - do NOT include in output)
- - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
- - `template`: The structure to use for your output file
- - `instruction`: Schema-specific guidance for this artifact type
- - `outputPath`: Where to write the artifact
- - `dependencies`: Completed artifacts to read for context
- - Read any completed dependency files for context
- - Create the artifact file using `template` as the structure
- - Apply `context` and `rules` as constraints - but do NOT copy them into the file
- - Show brief progress: "✓ Created <artifact-id>"
+ - Get instructions:
+ ```bash
+ openspec instructions <artifact-id> --change "<name>" --json
+ ```
+ - The instructions JSON includes:
+ - `context`: Project background (constraints for you - do NOT include in output)
+ - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
+ - `template`: The structure to use for your output file
+ - `instruction`: Schema-specific guidance for this artifact type
+ - `outputPath`: Where to write the artifact
+ - `dependencies`: Completed artifacts to read for context
+ - Read any completed dependency files for context
+ - Create the artifact file using `template` as the structure
+ - Apply `context` and `rules` as constraints - but do NOT copy them into the file
+ - Show brief progress: "✓ Created <artifact-id>"
b. **Continue until all `applyRequires` artifacts are complete**
- - After creating each artifact, re-run `openspec status --change "<name>" --json`
- - Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
- - Stop when all `applyRequires` artifacts are done
+ - After creating each artifact, re-run `openspec status --change "<name>" --json`
+ - Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
+ - Stop when all `applyRequires` artifacts are done
c. **If an artifact requires user input** (unclear context):
- - Use **AskUserQuestion tool** to clarify
- - Then continue with creation
+ - Use **AskUserQuestion tool** to clarify
+ - Then continue with creation
5. **Show final status**
```bash
**Output**
After completing all artifacts, summarize:
+
- Change name and location
- List of artifacts created with brief descriptions
- What's ready: "All artifacts created! Ready for implementation."
-- Prompt: "Run `/opsx:apply` or ask me to implement to start working on the tasks."
+- Prompt: "Run `/opsx-apply` or ask me to implement to start working on the tasks."
**Artifact Creation Guidelines**
- These guide what you write, but should never appear in the output
**Guardrails**
+
- Create ALL artifacts needed for implementation (as defined by schema's `apply.requires`)
- Always read dependency artifacts before creating a new one
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
metadata:
author: openspec
version: "1.0"
- generatedBy: "1.0.2"
+ generatedBy: "1.1.1"
---
Start a new change using the experimental artifact-driven approach.
1. **If no clear input provided, ask what they want to build**
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
+
> "What change do you want to work on? Describe what you want to build or fix."
From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
**Otherwise**: Omit `--schema` to use the default.
3. **Create the change directory**
+
```bash
openspec new change "<name>"
```
+
Add `--schema <name>` only if the user requested a specific workflow.
This creates a scaffolded change at `openspec/changes/<name>/` with the selected schema.
4. **Show the artifact status**
+
```bash
openspec status --change "<name>"
```
+
This shows which artifacts need to be created and which are ready (dependencies satisfied).
5. **Get instructions for the first artifact**
The first artifact depends on the schema (e.g., `proposal` for spec-driven).
Check the status output to find the first artifact with status "ready".
+
```bash
openspec instructions <first-artifact-id> --change "<name>"
```
+
This outputs the template and context for creating the first artifact.
6. **STOP and wait for user direction**
**Output**
After completing the steps, summarize:
+
- Change name and location
- Schema/workflow being used and its artifact sequence
- Current status (0/N artifacts complete)
- Prompt: "Ready to create the first artifact? Just describe what this change is about and I'll draft it, or ask me to continue."
**Guardrails**
+
- Do NOT create any artifacts yet - just show the instructions
- Do NOT advance beyond showing the first artifact template
- If the name is invalid (not kebab-case), ask for a valid name
metadata:
author: openspec
version: "1.0"
- generatedBy: "1.0.2"
+ generatedBy: "1.1.1"
---
Guide the user through their first complete OpenSpec workflow cycle. This is a teaching experience—you'll do real work in their codebase while explaining each step.
```
**If not initialized:**
-> OpenSpec isn't set up in this project yet. Run `openspec init` first, then come back to `/opsx:onboard`.
+
+> OpenSpec isn't set up in this project yet. Run `openspec init` first, then come back to `/opsx-onboard`.
Stop here if not initialized.
6. **Missing validation** - User input handlers without validation
Also check recent git activity:
+
```bash
git log --oneline -10 2>/dev/null || echo "No git history"
```
```
**If nothing found:** Fall back to asking what the user wants to build:
+
> I didn't find obvious quick wins in your codebase. What's something small you've been meaning to add or fix?
### Scope Guardrail
```
Spend 1-2 minutes investigating the relevant code:
+
- Read the file(s) involved
- Draw a quick ASCII diagram if it helps
- Note any considerations
│ [Optional: ASCII diagram if helpful] │
└─────────────────────────────────────────┘
-Explore mode (`/opsx:explore`) is for this kind of thinking—investigating before implementing. You can use it anytime you need to think through a problem.
+Explore mode (`/opsx-explore`) is for this kind of thinking—investigating before implementing. You can use it anytime you need to think through a problem.
Now let's create a change to hold our work.
```
## Phase 4: Create the Change
**EXPLAIN:**
+
```
## Creating a Change
```
**DO:** Create the change with a derived kebab-case name:
+
```bash
openspec new change "<derived-name>"
```
**SHOW:**
+
```
Created: `openspec/changes/<name>/`
The folder structure:
```
+
openspec/changes/<name>/
-├── proposal.md ← Why we're doing this (empty, we'll fill it)
-├── design.md ← How we'll build it (empty)
-├── specs/ ← Detailed requirements (empty)
-└── tasks.md ← Implementation checklist (empty)
+├── proposal.md ← Why we're doing this (empty, we'll fill it)
+├── design.md ← How we'll build it (empty)
+├── specs/ ← Detailed requirements (empty)
+└── tasks.md ← Implementation checklist (empty)
+
```
Now let's fill in the first artifact—the proposal.
## Phase 5: Proposal
**EXPLAIN:**
+
```
## The Proposal
**PAUSE** - Wait for user approval/feedback.
After approval, save the proposal:
+
```bash
openspec instructions proposal --change "<name>" --json
```
+
Then write the content to `openspec/changes/<name>/proposal.md`.
```
## Phase 6: Specs
**EXPLAIN:**
+
```
## Specs
```
**DO:** Create the spec file:
+
```bash
mkdir -p openspec/changes/<name>/specs/<capability-name>
```
## Phase 7: Design
**EXPLAIN:**
+
```
## Design
## Phase 8: Tasks
**EXPLAIN:**
+
```
## Tasks
## Phase 9: Apply (Implementation)
**EXPLAIN:**
+
```
## Implementation
## Phase 10: Archive
**EXPLAIN:**
+
```
## Archiving
```
**DO:**
+
```bash
openspec archive "<name>"
```
**SHOW:**
+
```
Archived to: `openspec/changes/archive/YYYY-MM-DD-<name>/`
| Command | What it does |
|---------|--------------|
-| `/opsx:explore` | Think through problems before/during work |
-| `/opsx:new` | Start a new change, step through artifacts |
-| `/opsx:ff` | Fast-forward: create all artifacts at once |
-| `/opsx:continue` | Continue working on an existing change |
-| `/opsx:apply` | Implement tasks from a change |
-| `/opsx:verify` | Verify implementation matches artifacts |
-| `/opsx:archive` | Archive a completed change |
+| `/opsx-explore` | Think through problems before/during work |
+| `/opsx-new` | Start a new change, step through artifacts |
+| `/opsx-ff` | Fast-forward: create all artifacts at once |
+| `/opsx-continue` | Continue working on an existing change |
+| `/opsx-apply` | Implement tasks from a change |
+| `/opsx-verify` | Verify implementation matches artifacts |
+| `/opsx-archive` | Archive a completed change |
---
## What's Next?
-Try `/opsx:new` or `/opsx:ff` on something you actually want to build. You've got the rhythm now!
+Try `/opsx-new` or `/opsx-ff` on something you actually want to build. You've got the rhythm now!
```
---
No problem! Your change is saved at `openspec/changes/<name>/`.
To pick up where we left off later:
-- `/opsx:continue <name>` - Resume artifact creation
-- `/opsx:apply <name>` - Jump to implementation (if tasks exist)
+- `/opsx-continue <name>` - Resume artifact creation
+- `/opsx-apply <name>` - Jump to implementation (if tasks exist)
The work won't be lost. Come back whenever you're ready.
```
| Command | What it does |
|---------|--------------|
-| `/opsx:explore` | Think through problems (no code changes) |
-| `/opsx:new <name>` | Start a new change, step by step |
-| `/opsx:ff <name>` | Fast-forward: all artifacts at once |
-| `/opsx:continue <name>` | Continue an existing change |
-| `/opsx:apply <name>` | Implement tasks |
-| `/opsx:verify <name>` | Verify implementation |
-| `/opsx:archive <name>` | Archive when done |
-
-Try `/opsx:new` to start your first change, or `/opsx:ff` if you want to move fast.
+| `/opsx-explore` | Think through problems (no code changes) |
+| `/opsx-new <name>` | Start a new change, step by step |
+| `/opsx-ff <name>` | Fast-forward: all artifacts at once |
+| `/opsx-continue <name>` | Continue an existing change |
+| `/opsx-apply <name>` | Implement tasks |
+| `/opsx-verify <name>` | Verify implementation |
+| `/opsx-archive <name>` | Archive when done |
+
+Try `/opsx-new` to start your first change, or `/opsx-ff` if you want to move fast.
```
Exit gracefully.
metadata:
author: openspec
version: "1.0"
- generatedBy: "1.0.2"
+ generatedBy: "1.1.1"
---
Sync delta specs from a change to main specs.
c. **Apply changes intelligently**:
- **ADDED Requirements:**
- - If requirement doesn't exist in main spec → add it
- - If requirement already exists → update it to match (treat as implicit MODIFIED)
+ **ADDED Requirements:**
+ - If requirement doesn't exist in main spec → add it
+ - If requirement already exists → update it to match (treat as implicit MODIFIED)
- **MODIFIED Requirements:**
- - Find the requirement in main spec
- - Apply the changes - this can be:
- - Adding new scenarios (don't need to copy existing ones)
- - Modifying existing scenarios
- - Changing the requirement description
- - Preserve scenarios/content not mentioned in the delta
+ **MODIFIED Requirements:**
+ - Find the requirement in main spec
+ - Apply the changes - this can be:
+ - Adding new scenarios (don't need to copy existing ones)
+ - Modifying existing scenarios
+ - Changing the requirement description
+ - Preserve scenarios/content not mentioned in the delta
- **REMOVED Requirements:**
- - Remove the entire requirement block from main spec
+ **REMOVED Requirements:**
+ - Remove the entire requirement block from main spec
- **RENAMED Requirements:**
- - Find the FROM requirement, rename to TO
+ **RENAMED Requirements:**
+ - Find the FROM requirement, rename to TO
d. **Create new main spec** if capability doesn't exist yet:
- - Create `openspec/specs/<capability>/spec.md`
- - Add Purpose section (can be brief, mark as TBD)
- - Add Requirements section with the ADDED requirements
+ - Create `openspec/specs/<capability>/spec.md`
+ - Add Purpose section (can be brief, mark as TBD)
+ - Add Requirements section with the ADDED requirements
4. **Show summary**
## ADDED Requirements
### Requirement: New Feature
+
The system SHALL do something new.
#### Scenario: Basic case
+
- **WHEN** user does X
- **THEN** system does Y
## MODIFIED Requirements
### Requirement: Existing Feature
+
#### Scenario: New scenario to add
+
- **WHEN** user does A
- **THEN** system does B
**Key Principle: Intelligent Merging**
Unlike programmatic merging, you can apply **partial updates**:
+
- To add a scenario, just include that scenario under MODIFIED - don't copy existing scenarios
-- The delta represents *intent*, not a wholesale replacement
+- The delta represents _intent_, not a wholesale replacement
- Use your judgment to merge changes sensibly
**Output On Success**
```
**Guardrails**
+
- Read both delta and main specs before making changes
- Preserve existing content not mentioned in delta
- If something is unclear, ask for clarification
metadata:
author: openspec
version: "1.0"
- generatedBy: "1.0.2"
+ generatedBy: "1.1.1"
---
Verify that an implementation matches the change artifacts (specs, tasks, design).
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
2. **Check status to understand the schema**
+
```bash
openspec status --change "<name>" --json
```
+
Parse the JSON to understand:
- `schemaName`: The workflow being used (e.g., "spec-driven")
- Which artifacts exist for this change
8. **Generate Verification Report**
**Summary Scorecard**:
+
```
## Verification Report: <change-name>
```
**Issues by Priority**:
-
1. **CRITICAL** (Must fix before archive):
- Incomplete tasks
- Missing requirement implementations
**Output Format**
Use clear markdown with:
+
- Table for summary scorecard
- Grouped lists for issues (CRITICAL/WARNING/SUGGESTION)
- Code references in format: `file.ts:123`
-
Open `@/.github/copilot-instructions.md`, read it and strictly follow the
instructions.