From 441cb3b980044f0e848e14fffff7807a51d27634 Mon Sep 17 00:00:00 2001 From: Clay Good Date: Mon, 27 Jul 2026 20:04:35 -0500 Subject: [PATCH 1/2] fix(templates): auto-select the only active change instead of always prompting The continue, update, verify, sync, and archive workflows told agents 'Do NOT guess or auto-select a change. Always let the user choose', which contradicted their own Input line ('check if it can be inferred from conversation context') and stalled every invocation on a question with a single possible answer when only one change was active. Align them with the selection pattern /opsx:apply has used since #513: use the provided name, infer from context, auto-select a sole active change, prompt only when ambiguous, and always announce the selection with how to override. Bulk archive keeps its always-prompt behavior. Closes #679 Co-Authored-By: Claude Fable 5 --- .changeset/single-change-autoselect.md | 5 ++++ .../changes/add-update-workflow/design.md | 5 ++-- .../specs/opsx-update-skill/spec.md | 4 +-- openspec/specs/opsx-archive-skill/spec.md | 5 ++-- openspec/specs/opsx-verify-skill/spec.md | 5 ++-- openspec/specs/specs-sync-skill/spec.md | 5 ++-- skills/openspec-archive-change/SKILL.md | 13 ++++---- skills/openspec-continue-change/SKILL.md | 11 ++++--- skills/openspec-sync-specs/SKILL.md | 11 ++++--- skills/openspec-update-change/SKILL.md | 11 ++++--- skills/openspec-verify-change/SKILL.md | 11 ++++--- .../templates/workflows/archive-change.ts | 26 +++++++++------- .../templates/workflows/continue-change.ts | 22 +++++++++----- src/core/templates/workflows/sync-specs.ts | 22 +++++++++----- src/core/templates/workflows/update-change.ts | 22 +++++++++----- src/core/templates/workflows/verify-change.ts | 22 +++++++++----- .../templates/skill-templates-parity.test.ts | 30 +++++++++---------- 17 files changed, 142 insertions(+), 88 deletions(-) create mode 100644 .changeset/single-change-autoselect.md diff --git a/.changeset/single-change-autoselect.md b/.changeset/single-change-autoselect.md new file mode 100644 index 0000000000..07356cc515 --- /dev/null +++ b/.changeset/single-change-autoselect.md @@ -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: ") with how to override, and bulk archive still always prompts. diff --git a/openspec/changes/add-update-workflow/design.md b/openspec/changes/add-update-workflow/design.md index 9ab208b735..cc7bcfee96 100644 --- a/openspec/changes/add-update-workflow/design.md +++ b/openspec/changes/add-update-workflow/design.md @@ -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). 2. Get the artifacts. - Run `openspec status --change "" --json`. diff --git a/openspec/changes/add-update-workflow/specs/opsx-update-skill/spec.md b/openspec/changes/add-update-workflow/specs/opsx-update-skill/spec.md index a8074d2c8a..86981e6194 100644 --- a/openspec/changes/add-update-workflow/specs/opsx-update-skill/spec.md +++ b/openspec/changes/add-update-workflow/specs/opsx-update-skill/spec.md @@ -7,8 +7,8 @@ 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 #### Scenario: Revise without advancing the frontier diff --git a/openspec/specs/opsx-archive-skill/spec.md b/openspec/specs/opsx-archive-skill/spec.md index a6256b37b7..5ebf37a88d 100644 --- a/openspec/specs/opsx-archive-skill/spec.md +++ b/openspec/specs/opsx-archive-skill/spec.md @@ -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 diff --git a/openspec/specs/opsx-verify-skill/spec.md b/openspec/specs/opsx-verify-skill/spec.md index 0c6f23da18..91562c0e55 100644 --- a/openspec/specs/opsx-verify-skill/spec.md +++ b/openspec/specs/opsx-verify-skill/spec.md @@ -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 diff --git a/openspec/specs/specs-sync-skill/spec.md b/openspec/specs/specs-sync-skill/spec.md index 2232637fb0..1b925049e2 100644 --- a/openspec/specs/specs-sync-skill/spec.md +++ b/openspec/specs/specs-sync-skill/spec.md @@ -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. diff --git a/skills/openspec-archive-change/SKILL.md b/skills/openspec-archive-change/SKILL.md index 3d8832e206..d028076057 100644 --- a/skills/openspec-archive-change/SKILL.md +++ b/skills/openspec-archive-change/SKILL.md @@ -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: " and how to override (e.g., `/openspec-archive-change `). **Load current archive inputs before the existing archive checks:** @@ -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) diff --git a/skills/openspec-continue-change/SKILL.md b/skills/openspec-continue-change/SKILL.md index d25380d21f..5faa6a2178 100644 --- a/skills/openspec-continue-change/SKILL.md +++ b/skills/openspec-continue-change/SKILL.md @@ -17,11 +17,14 @@ 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") @@ -29,7 +32,7 @@ Continue working on a change by creating the next artifact. 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: " and how to override (e.g., `/openspec-continue-change `). 2. **Check current status** ```bash diff --git a/skills/openspec-sync-specs/SKILL.md b/skills/openspec-sync-specs/SKILL.md index ec5579e2a4..778aa511ff 100644 --- a/skills/openspec-sync-specs/SKILL.md +++ b/skills/openspec-sync-specs/SKILL.md @@ -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: " and how to override (e.g., `/openspec-sync-specs `). 2. **Resolve change context** diff --git a/skills/openspec-update-change/SKILL.md b/skills/openspec-update-change/SKILL.md index 9d3501fca9..88986da8ab 100644 --- a/skills/openspec-update-change/SKILL.md +++ b/skills/openspec-update-change/SKILL.md @@ -17,11 +17,14 @@ 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") @@ -29,7 +32,7 @@ Revise a change's existing planning artifacts and keep them coherent. Never edit 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: " and how to override (e.g., `/openspec-update-change `). 2. **Get the change's artifacts** ```bash diff --git a/skills/openspec-verify-change/SKILL.md b/skills/openspec-verify-change/SKILL.md index 6d5e27780c..3779b0a2f6 100644 --- a/skills/openspec-verify-change/SKILL.md +++ b/skills/openspec-verify-change/SKILL.md @@ -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: " and how to override (e.g., `/openspec-verify-change `). 2. **Check status to understand the schema** ```bash diff --git a/src/core/templates/workflows/archive-change.ts b/src/core/templates/workflows/archive-change.ts index cc209148db..ee4cb857bf 100644 --- a/src/core/templates/workflows/archive-change.ts +++ b/src/core/templates/workflows/archive-change.ts @@ -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: " and how to override (e.g., \`/opsx:archive \`). **Load current archive inputs before the existing archive checks:** @@ -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) @@ -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: " and how to override (e.g., \`/opsx:archive \`). **Load current archive inputs before the existing archive checks:** @@ -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) diff --git a/src/core/templates/workflows/continue-change.ts b/src/core/templates/workflows/continue-change.ts index e2938ec8f9..bef2147200 100644 --- a/src/core/templates/workflows/continue-change.ts +++ b/src/core/templates/workflows/continue-change.ts @@ -19,11 +19,14 @@ ${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") @@ -31,7 +34,7 @@ ${STORE_SELECTION_GUIDANCE} 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: " and how to override (e.g., \`/opsx:continue \`). 2. **Check current status** \`\`\`bash @@ -134,11 +137,14 @@ ${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") @@ -146,7 +152,7 @@ ${STORE_SELECTION_GUIDANCE} 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: " and how to override (e.g., \`/opsx:continue \`). 2. **Check current status** \`\`\`bash diff --git a/src/core/templates/workflows/sync-specs.ts b/src/core/templates/workflows/sync-specs.ts index 6bcd4c5f4c..d480e0eaa1 100644 --- a/src/core/templates/workflows/sync-specs.ts +++ b/src/core/templates/workflows/sync-specs.ts @@ -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: " and how to override (e.g., \`/opsx:sync \`). 2. **Resolve change context** @@ -228,13 +231,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: " and how to override (e.g., \`/opsx:sync \`). 2. **Resolve change context** diff --git a/src/core/templates/workflows/update-change.ts b/src/core/templates/workflows/update-change.ts index 25bee5dbae..3e8549b677 100644 --- a/src/core/templates/workflows/update-change.ts +++ b/src/core/templates/workflows/update-change.ts @@ -19,11 +19,14 @@ ${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 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") @@ -31,7 +34,7 @@ ${STORE_SELECTION_GUIDANCE} 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: " and how to override (e.g., \`/opsx:update \`). 2. **Get the change's artifacts** \`\`\`bash @@ -106,11 +109,14 @@ ${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 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") @@ -118,7 +124,7 @@ ${STORE_SELECTION_GUIDANCE} 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: " and how to override (e.g., \`/opsx:update \`). 2. **Get the change's artifacts** \`\`\`bash diff --git a/src/core/templates/workflows/verify-change.ts b/src/core/templates/workflows/verify-change.ts index 7be14e8cb6..1aa540c76b 100644 --- a/src/core/templates/workflows/verify-change.ts +++ b/src/core/templates/workflows/verify-change.ts @@ -19,15 +19,18 @@ ${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 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: " and how to override (e.g., \`/opsx:verify \`). 2. **Check status to understand the schema** \`\`\`bash @@ -191,15 +194,18 @@ ${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 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: " and how to override (e.g., \`/opsx:verify \`). 2. **Check status to understand the schema** \`\`\`bash diff --git a/test/core/templates/skill-templates-parity.test.ts b/test/core/templates/skill-templates-parity.test.ts index 3886fb8fae..afa3e1bd3b 100644 --- a/test/core/templates/skill-templates-parity.test.ts +++ b/test/core/templates/skill-templates-parity.test.ts @@ -39,44 +39,44 @@ import { STORE_SELECTION_GUIDANCE } from '../../../src/core/templates/workflows/ const EXPECTED_FUNCTION_HASHES: Record = { getExploreSkillTemplate: '1ed2dfea7d1f020ba4515d1814f2a139fd070a9c0a7c08a726e49bd65a033930', getNewChangeSkillTemplate: 'd2b4be99614c57ae5b7d48e477d462729fafb063b0a7418d73372ff35eee6cfc', - getContinueChangeSkillTemplate: 'bb3e6440eeae417a8f7efd1c064024ab2fcf824ff2adbf37cfc2607a2c8c6249', + getContinueChangeSkillTemplate: '676e7472977d2b6f4d922ce384db1f15020c195f94d6cd4ee71abcf0201e28a9', getApplyChangeSkillTemplate: '031cf8f8ffc2937fc4051651bd5e1fc6159bfd225605d8e4c3181054a4e52b38', getFfChangeSkillTemplate: '225a8eaf1b3769ac5d43e079297c5fa9cc20fc2e34fec9bb0d887c8c1fb0ea71', - getSyncSpecsSkillTemplate: '125672d288cb990759679c2aa2976fccb9c13cceb2af43a89f99dd1aae9bc397', + getSyncSpecsSkillTemplate: 'c5e10b7109669d0c1790a2ea43aeeb189506d59377962f88a562006cb48a0eda', getOnboardSkillTemplate: '31dffc7c3b8d75ffbd59ed751d6a1550b885b20ef90e12d236262127ee4021e9', getOpsxExploreCommandTemplate: 'e9674ddace813e685b0e9fe37149140a3d33d48aa20b9ba2b0963a7c49c9aea7', getOpsxNewCommandTemplate: '652adc870f16bb260d54436356132b6ee051a9ed7cc0464603fb31f4db259762', - getOpsxContinueCommandTemplate: 'baec8a530d8f5626214aae531c1e5cf1e5e0d47943d34597d150e2e5f815dbdd', + getOpsxContinueCommandTemplate: 'bcf0ad1c55b71346147c5b4dbaed016c77c9718f960012d8efc9d3d2089d0e00', getOpsxApplyCommandTemplate: '18c82fc48e65084065171e44f811db8fdc96bd6cb0f61fe8f31324207f4861c7', getOpsxFfCommandTemplate: '678375642a21d255444f0ba717e659abb2cc2b7474981d52eae900a0793e3e4d', - getArchiveChangeSkillTemplate: 'd325f65b26dccba084ace510874cf92b73cecdc430d93b2d73dd0066b95619a3', + getArchiveChangeSkillTemplate: '7c1bf2170ba57833f111c79002ea56be3cca499e2b13b2ea8141c182351b1a3b', getBulkArchiveChangeSkillTemplate: '3ed5e36fdb1b0f4a70c75a341550c0d910cd63c5394ff61ac666f241f86c1e19', - getOpsxSyncCommandTemplate: 'a1404217de12a9ca31b2abe66c352ce47e5f362fb016e3650655cc599b94430a', - getVerifyChangeSkillTemplate: '4af69762ff061c1a76dad21725827d87b168dca8bd0c4cea133152e37cacc2ce', - getOpsxArchiveCommandTemplate: '10a230ea7dc8f8f9ed8bbcd0017cdec694a8f9a3da1e15845bc745e68e2cdeda', + getOpsxSyncCommandTemplate: '7285f10773f3a95b5169bf42b451fabd922316014557035dbecb0b24c4b343a6', + getVerifyChangeSkillTemplate: '917de96cc8341799107b0617979cdaf30e121c51676272f5caef143b090583f9', + getOpsxArchiveCommandTemplate: '14fbf150ee8ad87193a22c144af1f6be6e21b218873cc24627ed0acdccc36b9e', getOpsxOnboardCommandTemplate: 'e69a5aa37749727290c05b687981dd69f3b17a55514a118d088c4124c5fd8505', getOpsxBulkArchiveCommandTemplate: 'bd2301e28fc68dcb4a2582af2b21304a490d474909f85c508947c92dc9aa4eb9', - getOpsxVerifyCommandTemplate: 'fa60b9258df1d98934077315c20f1838431d9340281d8126ad651e36d8e87cb8', + getOpsxVerifyCommandTemplate: '29e3913c93566e689971d8c15c3348ba4169ebf6b1d403f5ac9974605c734baa', getOpsxProposeSkillTemplate: '06a8f7d272db8d3cb113dc05d606630d1e5aedd267c2722e971d1175e0d8bb40', getOpsxProposeCommandTemplate: 'ed3ad596d9bb238830b4fcbe566e3c1ba9d0db62f4a92cdb28c38262dc3f04df', getFeedbackSkillTemplate: 'd7d83c5f7fc2b92fe8f4588a5bf2d9cb315e4c73ec19bcd5ef28270906319a0d', - getUpdateChangeSkillTemplate: '377b0e5691fc06aca67763c8b7f3eb5ab2d3df08f5e83f299120fd302a89a8bb', - getOpsxUpdateCommandTemplate: '6ff10bae4fee9969eb63e3485ff81a64e29f41973754735ce435f2b7042af153', + getUpdateChangeSkillTemplate: 'da1f76a91ba606df6aa895431c79e64ca91580fa952807230e653bddeb2a3c15', + getOpsxUpdateCommandTemplate: 'afbf85f79177a0125bbc2028ed50e23f59ea96c2b6ef4153ed9bce6465c6414e', }; const EXPECTED_GENERATED_SKILL_CONTENT_HASHES: Record = { 'openspec-explore': '67eeacf1c797eebbc20926555c1a29cbc06fdd12aae5b8f06acf3d0445e1a51a', 'openspec-new-change': 'b56c7f8dd85b462c9fea5c36eeaadff9b231b41e21dde12f156fb261959aa82a', - 'openspec-continue-change': '0d3fe07961b061a9bac0d18f98891038ffd89f70c4f3d987fc997379a9e6e9f4', + 'openspec-continue-change': '2e1a7d17ec021949d115c72227729609bf9980ad1f23445af117c09834711121', 'openspec-apply-change': '49fc5772404e3033085384ee214c44488c93880a596a9a05dcad42f9ce86cf83', 'openspec-ff-change': '4228d75e3571097164f2360e2ad3063a5b88d44750078c3601b23a89e74c1de6', - 'openspec-sync-specs': '7eae5d8a46b8b81bd6acad9b78f5dae25e3f848052bebb291a494ed0c0f9ea67', - 'openspec-archive-change': 'bd30f9c1f5979c4b469796dc231c5ad3be3c9ede54c8eb92c5b5f96b35241265', + 'openspec-sync-specs': 'ac6ca79f6b1a6158222c8362a34f625ca1f061fdacfe69b6b14046e285a2f30e', + 'openspec-archive-change': '84b9d3a5690b8d64e1845b3c7368a4ad43369ea8549a76ef78912690d434363b', 'openspec-bulk-archive-change': 'ae0d8b038311f5fd172cdfa7476c4c6881af17aa3ad6bf904a5969393813b0b6', - 'openspec-verify-change': '0b087d5428df63145f4853a3b136eca522e3a9cbe88047fb30e5f774d873adf4', + 'openspec-verify-change': '1c3f73a36be691a18d3acb200d22e6874004d6d4a5d3e2e346ae95a7379e9da8', 'openspec-onboard': 'f2440f59c22b1ac9db33247b23a6fa32fb9cd418dc196486a213f5d7e91b1dbc', 'openspec-propose': '6b49634d3672e7fef4750a8c7572a661fec0dafe6d52a0075b41a2c87a793871', - 'openspec-update-change': 'c23b3dddfa8de61a5cee3662b1a7711b9171768df5810e4e01442d7d28334e39', + 'openspec-update-change': '1e61edfcd229b5b3e7ea957a5606712805cae19709304b26448fe111657a7255', }; // Intentionally excludes getFeedbackSkillTemplate: this list only models templates From 556560ac534b6ccb3f373fac5db5c735e80c7ebd Mon Sep 17 00:00:00 2001 From: Clay Good Date: Mon, 27 Jul 2026 20:25:49 -0500 Subject: [PATCH 2/2] docs(openspec): add the announce clause to the update workflow's selection contract CodeRabbit noted the add-update-workflow delta spec and design sketch adopted auto-selection without the 'Using change: ' announcement the other selection contracts require. Add the same announce-and-override clause so the update skill's contract matches the template it describes. Co-Authored-By: Claude Fable 5 --- openspec/changes/add-update-workflow/design.md | 2 +- .../changes/add-update-workflow/specs/opsx-update-skill/spec.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/openspec/changes/add-update-workflow/design.md b/openspec/changes/add-update-workflow/design.md index cc7bcfee96..3dd6ca53a3 100644 --- a/openspec/changes/add-update-workflow/design.md +++ b/openspec/changes/add-update-workflow/design.md @@ -34,7 +34,7 @@ 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, or auto-select the only active change; if still unclear, run `openspec list --json` and ask the user to choose - (most-recently-modified first). + (most-recently-modified first). Announce the selection and how to override. 2. Get the artifacts. - Run `openspec status --change "" --json`. diff --git a/openspec/changes/add-update-workflow/specs/opsx-update-skill/spec.md b/openspec/changes/add-update-workflow/specs/opsx-update-skill/spec.md index 86981e6194..6dc4a4b704 100644 --- a/openspec/changes/add-update-workflow/specs/opsx-update-skill/spec.md +++ b/openspec/changes/add-update-workflow/specs/opsx-update-skill/spec.md @@ -9,6 +9,7 @@ The system SHALL provide a `/opsx:update` workflow skill that revises a change's - **WHEN** the user invokes `/opsx:update` without a change name - **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