Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/single-change-autoselect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fission-ai/openspec': patch
---

The continue, update, verify, sync, and archive workflow skills now select a change the same way apply does: use the provided name, infer it from conversation context, auto-select when exactly one active change exists, and only prompt when the choice is genuinely ambiguous. Previously these workflows were told to always prompt ("Do NOT guess or auto-select"), so invoking them with a single active change stalled on a question with only one possible answer. The selection is always announced ("Using change: <name>") with how to override, and bulk archive still always prompts.
5 changes: 3 additions & 2 deletions openspec/changes/add-update-workflow/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ Working backwards from "what is the minimal instruction set," here is the skill
Revise a change's planning artifacts and keep them coherent. Never edit code.

1. Resolve the change.
- If named, use it. Else infer from context; if unclear, run `openspec list --json`
and ask the user to choose (most-recently-modified first). Never auto-select.
- If named, use it. Else infer from context, or auto-select the only active change;
if still unclear, run `openspec list --json` and ask the user to choose
(most-recently-modified first). Announce the selection and how to override.

2. Get the artifacts.
- Run `openspec status --change "<id>" --json`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ The system SHALL provide a `/opsx:update` workflow skill that revises a change's
#### Scenario: Select the change to update

- **WHEN** the user invokes `/opsx:update` without a change name
- **THEN** the skill infers the change from conversation context if possible
- **AND** if it cannot, it lists available changes (most-recently-modified first) via `openspec list --json` and asks the user to choose, never auto-selecting
- **THEN** the skill infers the change from conversation context if possible, or auto-selects the change when only one active change exists
- **AND** if it is still ambiguous, it lists available changes (most-recently-modified first) via `openspec list --json` and asks the user to choose
- **AND** it announces which change was selected and how to override

#### Scenario: Revise without advancing the frontier

Expand Down
5 changes: 3 additions & 2 deletions openspec/specs/opsx-archive-skill/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ The system SHALL provide an `/opsx:archive` skill that archives completed change
#### Scenario: Change selection prompt

- **WHEN** agent executes `/opsx:archive` without specifying a change
- **THEN** the agent prompts user to select from available changes
- **AND** shows only active changes (excludes archive/)
- **THEN** the agent infers the change from conversation context, or auto-selects it when only one active change exists
- **AND** when ambiguous, prompts user to select from available changes, showing only active changes (excludes archive/)
- **AND** announces which change was selected and how to override

### Requirement: Artifact Completion Check

Expand Down
5 changes: 3 additions & 2 deletions openspec/specs/opsx-verify-skill/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ The system SHALL provide an `/opsx:verify` skill that validates implementation a

#### Scenario: Verify without change name
- **WHEN** agent executes `/opsx:verify` without a change name
- **THEN** the agent prompts user to select from available changes
- **AND** shows only changes that have implementation tasks
- **THEN** the agent infers the change from conversation context, or auto-selects it when only one active change exists
- **AND** when ambiguous, prompts user to select from available changes, showing only changes that have implementation tasks
- **AND** announces which change was selected and how to override

#### Scenario: Change has no tasks
- **WHEN** selected change has no tasks.md or tasks are empty
Expand Down
5 changes: 3 additions & 2 deletions openspec/specs/specs-sync-skill/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ The system SHALL provide an `/opsx:sync` skill that syncs delta specs from a cha

#### Scenario: Change selection prompt
- **WHEN** agent executes `/opsx:sync` without specifying a change
- **THEN** the agent prompts user to select from available changes
- **AND** shows changes that have delta specs
- **THEN** the agent infers the change from conversation context, or auto-selects it when only one active change exists
- **AND** when ambiguous, prompts user to select from available changes, showing changes that have delta specs
- **AND** announces which change was selected and how to override

### Requirement: Delta Reconciliation Logic
The agent SHALL reconcile main specs with delta specs using the delta operation headers.
Expand Down
13 changes: 8 additions & 5 deletions skills/openspec-archive-change/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@ Archive a completed change in the experimental workflow.

**Steps**

1. **If no change name provided, prompt for selection**
1. **Select the change**

Run `openspec list --json` to get available changes. Ask the user to select one.
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes and ask the user to select one

Show only active changes (not already archived).
When prompting, show only active changes (not already archived).
Include the schema used for each change if available.

**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
Always announce: "Using change: <name>" and how to override (e.g., `/openspec-archive-change <other>`).

**Load current archive inputs before the existing archive checks:**

Expand Down Expand Up @@ -161,7 +164,7 @@ Archive a completed change in the experimental workflow.
```

**Guardrails**
- Always prompt for change selection if not provided
- Announce the selected change; prompt for selection when it is ambiguous
- 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)
Expand Down
11 changes: 7 additions & 4 deletions skills/openspec-continue-change/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,22 @@ Continue working on a change by creating the next artifact.

**Steps**

1. **If no change name provided, prompt for selection**
1. **Select the change**

Run `openspec list --json` to get available changes sorted by most recently modified. Then ask the user to select which change to work on.
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes sorted by most recently modified, and ask the user to select one

Present the top 3-4 most recently modified changes as options, showing:
When prompting, present the top 3-4 most recently modified changes as options, showing:
- Change name
- Schema (from `schema` field if present, otherwise "spec-driven")
- Status (e.g., "0/5 tasks", "complete", "no tasks")
- How recently it was modified (from `lastModified` field)

Mark the most recently modified change as "(Recommended)" since it's likely what the user wants to continue.

**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
Always announce: "Using change: <name>" and how to override (e.g., `/openspec-continue-change <other>`).

2. **Check current status**
```bash
Expand Down
11 changes: 7 additions & 4 deletions skills/openspec-sync-specs/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ This is an **agent-driven** operation - you will read delta specs and directly e

**Steps**

1. **If no change name provided, prompt for selection**
1. **Select the change**

Run `openspec list --json` to get available changes. Ask the user to select one.
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes and ask the user to select one

Show changes that have delta specs (under `specs/` directory).
When prompting, show changes that have delta specs (under `specs/` directory).

**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
Always announce: "Using change: <name>" and how to override (e.g., `/openspec-sync-specs <other>`).

2. **Resolve change context**

Expand Down
11 changes: 7 additions & 4 deletions skills/openspec-update-change/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,22 @@ Revise a change's existing planning artifacts and keep them coherent. Never edit

**Steps**

1. **If no change name provided, prompt for selection**
1. **Select the change**

Run `openspec list --json` to get available changes sorted by most recently modified. Then ask the user to select which change to update.
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes sorted by most recently modified, and ask the user to select one

Present the top 3-4 most recently modified changes as options, showing:
When prompting, present the top 3-4 most recently modified changes as options, showing:
- Change name
- Schema (from `schema` field if present, otherwise "spec-driven")
- Status (e.g., "0/5 tasks", "complete", "no tasks")
- How recently it was modified (from `lastModified` field)

Mark the most recently modified change as "(Recommended)" since it's likely what the user wants to update.

**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
Always announce: "Using change: <name>" and how to override (e.g., `/openspec-update-change <other>`).

2. **Get the change's artifacts**
```bash
Expand Down
11 changes: 7 additions & 4 deletions skills/openspec-verify-change/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,18 @@ Verify that an implementation matches the change artifacts (specs, tasks, design

**Steps**

1. **If no change name provided, prompt for selection**
1. **Select the change**

Run `openspec list --json` to get available changes. Ask the user to select one.
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes and ask the user to select one

Show changes that have implementation tasks (tasks artifact exists).
When prompting, show changes that have implementation tasks (tasks artifact exists).
Include the schema used for each change if available.
Mark changes with incomplete tasks as "(In Progress)".

**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
Always announce: "Using change: <name>" and how to override (e.g., `/openspec-verify-change <other>`).
Comment thread
coderabbitai[bot] marked this conversation as resolved.

2. **Check status to understand the schema**
```bash
Expand Down
26 changes: 16 additions & 10 deletions src/core/templates/workflows/archive-change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ ${STORE_SELECTION_GUIDANCE}

**Steps**

1. **If no change name provided, prompt for selection**
1. **Select the change**

Run \`openspec list --json\` to get available changes. Ask the user to select one.
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run \`openspec list --json\` to get available changes and ask the user to select one

Show only active changes (not already archived).
When prompting, show only active changes (not already archived).
Include the schema used for each change if available.

**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
Always announce: "Using change: <name>" and how to override (e.g., \`/opsx:archive <other>\`).

**Load current archive inputs before the existing archive checks:**

Expand Down Expand Up @@ -163,7 +166,7 @@ ${STORE_SELECTION_GUIDANCE}
\`\`\`

**Guardrails**
- Always prompt for change selection if not provided
- Announce the selected change; prompt for selection when it is ambiguous
- 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)
Expand Down Expand Up @@ -196,14 +199,17 @@ ${STORE_SELECTION_GUIDANCE}

**Steps**

1. **If no change name provided, prompt for selection**
1. **Select the change**

Run \`openspec list --json\` to get available changes. Ask the user to select one.
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run \`openspec list --json\` to get available changes and ask the user to select one

Show only active changes (not already archived).
When prompting, show only active changes (not already archived).
Include the schema used for each change if available.

**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
Always announce: "Using change: <name>" and how to override (e.g., \`/opsx:archive <other>\`).

**Load current archive inputs before the existing archive checks:**

Expand Down Expand Up @@ -387,7 +393,7 @@ Target archive directory already exists.
\`\`\`

**Guardrails**
- Always prompt for change selection if not provided
- Announce the selected change; prompt for selection when it is ambiguous
- 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)
Expand Down
22 changes: 14 additions & 8 deletions src/core/templates/workflows/continue-change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,22 @@ ${STORE_SELECTION_GUIDANCE}

**Steps**

1. **If no change name provided, prompt for selection**
1. **Select the change**

Run \`openspec list --json\` to get available changes sorted by most recently modified. Then ask the user to select which change to work on.
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run \`openspec list --json\` to get available changes sorted by most recently modified, and ask the user to select one

Present the top 3-4 most recently modified changes as options, showing:
When prompting, present the top 3-4 most recently modified changes as options, showing:
- Change name
- Schema (from \`schema\` field if present, otherwise "spec-driven")
- Status (e.g., "0/5 tasks", "complete", "no tasks")
- How recently it was modified (from \`lastModified\` field)

Mark the most recently modified change as "(Recommended)" since it's likely what the user wants to continue.

**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
Always announce: "Using change: <name>" and how to override (e.g., \`/opsx:continue <other>\`).
Comment thread
coderabbitai[bot] marked this conversation as resolved.

2. **Check current status**
\`\`\`bash
Expand Down Expand Up @@ -134,19 +137,22 @@ ${STORE_SELECTION_GUIDANCE}

**Steps**

1. **If no change name provided, prompt for selection**
1. **Select the change**

Run \`openspec list --json\` to get available changes sorted by most recently modified. Then ask the user to select which change to work on.
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run \`openspec list --json\` to get available changes sorted by most recently modified, and ask the user to select one

Present the top 3-4 most recently modified changes as options, showing:
When prompting, present the top 3-4 most recently modified changes as options, showing:
- Change name
- Schema (from \`schema\` field if present, otherwise "spec-driven")
- Status (e.g., "0/5 tasks", "complete", "no tasks")
- How recently it was modified (from \`lastModified\` field)

Mark the most recently modified change as "(Recommended)" since it's likely what the user wants to continue.

**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
Always announce: "Using change: <name>" and how to override (e.g., \`/opsx:continue <other>\`).

2. **Check current status**
\`\`\`bash
Expand Down
22 changes: 14 additions & 8 deletions src/core/templates/workflows/sync-specs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ ${STORE_SELECTION_GUIDANCE}

**Steps**

1. **If no change name provided, prompt for selection**
1. **Select the change**

Run \`openspec list --json\` to get available changes. Ask the user to select one.
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run \`openspec list --json\` to get available changes and ask the user to select one

Show changes that have delta specs (under \`specs/\` directory).
When prompting, show changes that have delta specs (under \`specs/\` directory).

**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
Always announce: "Using change: <name>" and how to override (e.g., \`/opsx:sync <other>\`).
Comment thread
coderabbitai[bot] marked this conversation as resolved.

2. **Resolve change context**

Expand Down Expand Up @@ -241,13 +244,16 @@ ${STORE_SELECTION_GUIDANCE}

**Steps**

1. **If no change name provided, prompt for selection**
1. **Select the change**

Run \`openspec list --json\` to get available changes. Ask the user to select one.
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run \`openspec list --json\` to get available changes and ask the user to select one

Show changes that have delta specs (under \`specs/\` directory).
When prompting, show changes that have delta specs (under \`specs/\` directory).

**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
Always announce: "Using change: <name>" and how to override (e.g., \`/opsx:sync <other>\`).

2. **Resolve change context**

Expand Down
Loading
Loading