@exodus/openspec 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ export function getApplyChangeSkillTemplate() {
13
13
  If a name is provided, use it. Otherwise:
14
14
  - Infer from conversation context if the user mentioned a change
15
15
  - Auto-select if only one active change exists
16
- - If ambiguous, run \`openspec list --json\` to get available changes and use the **AskUserQuestion tool** to let the user select
16
+ - If ambiguous, check for a workspace manifest (\`cat openspec/workspace.yaml 2>/dev/null\`). If it exists, run \`(cd <scope.path> && openspec list --json)\` for each scope and \`ls openspec/changes/ 2>/dev/null\` for umbrella changes; otherwise run \`openspec list --json\`. Aggregate all results and use the **AskUserQuestion tool** to let the user select, showing which scope each change belongs to
17
17
 
18
18
  Always announce: "Using change: <name>" and how to override (e.g., \`/opsx:apply <other>\`).
19
19
 
@@ -196,7 +196,7 @@ export function getOpsxApplyCommandTemplate() {
196
196
  If a name is provided, use it. Otherwise:
197
197
  - Infer from conversation context if the user mentioned a change
198
198
  - Auto-select if only one active change exists
199
- - If ambiguous, run \`openspec list --json\` to get available changes and use the **AskUserQuestion tool** to let the user select
199
+ - If ambiguous, check for a workspace manifest (\`cat openspec/workspace.yaml 2>/dev/null\`). If it exists, run \`(cd <scope.path> && openspec list --json)\` for each scope and \`ls openspec/changes/ 2>/dev/null\` for umbrella changes; otherwise run \`openspec list --json\`. Aggregate all results and use the **AskUserQuestion tool** to let the user select, showing which scope each change belongs to
200
200
 
201
201
  Always announce: "Using change: <name>" and how to override (e.g., \`/opsx:apply <other>\`).
202
202
 
@@ -10,8 +10,24 @@ export function getArchiveChangeSkillTemplate() {
10
10
 
11
11
  1. **If no change name provided, prompt for selection**
12
12
 
13
- Run \`openspec list --json\` to get available changes. Use the **AskUserQuestion tool** to let the user select.
13
+ Check for a workspace manifest:
14
+ \`\`\`bash
15
+ cat openspec/workspace.yaml 2>/dev/null
16
+ \`\`\`
17
+
18
+ If workspace.yaml exists, list changes across all scopes:
19
+ \`\`\`bash
20
+ (cd <scope.path> && openspec list --json) # for each scope in workspace.yaml
21
+ ls openspec/changes/ 2>/dev/null # umbrella changes at root
22
+ \`\`\`
23
+
24
+ Otherwise:
25
+ \`\`\`bash
26
+ openspec list --json
27
+ \`\`\`
14
28
 
29
+ Aggregate all results. Use the **AskUserQuestion tool** to let the user select.
30
+ In workspace mode, show which scope each change belongs to.
15
31
  Show only active changes (not already archived).
16
32
  Include the schema used for each change if available.
17
33
 
@@ -154,8 +170,24 @@ export function getOpsxArchiveCommandTemplate() {
154
170
 
155
171
  1. **If no change name provided, prompt for selection**
156
172
 
157
- Run \`openspec list --json\` to get available changes. Use the **AskUserQuestion tool** to let the user select.
173
+ Check for a workspace manifest:
174
+ \`\`\`bash
175
+ cat openspec/workspace.yaml 2>/dev/null
176
+ \`\`\`
177
+
178
+ If workspace.yaml exists, list changes across all scopes:
179
+ \`\`\`bash
180
+ (cd <scope.path> && openspec list --json) # for each scope in workspace.yaml
181
+ ls openspec/changes/ 2>/dev/null # umbrella changes at root
182
+ \`\`\`
183
+
184
+ Otherwise:
185
+ \`\`\`bash
186
+ openspec list --json
187
+ \`\`\`
158
188
 
189
+ Aggregate all results. Use the **AskUserQuestion tool** to let the user select.
190
+ In workspace mode, show which scope each change belongs to.
159
191
  Show only active changes (not already archived).
160
192
  Include the schema used for each change if available.
161
193
 
@@ -10,7 +10,23 @@ export function getContinueChangeSkillTemplate() {
10
10
 
11
11
  1. **If no change name provided, prompt for selection**
12
12
 
13
- Run \`openspec list --json\` to get available changes sorted by most recently modified. Then use the **AskUserQuestion tool** to let the user select which change to work on.
13
+ Check for a workspace manifest:
14
+ \`\`\`bash
15
+ cat openspec/workspace.yaml 2>/dev/null
16
+ \`\`\`
17
+
18
+ If workspace.yaml exists, list changes across all scopes:
19
+ \`\`\`bash
20
+ (cd <scope.path> && openspec list --json) # for each scope in workspace.yaml
21
+ ls openspec/changes/ 2>/dev/null # umbrella changes at root
22
+ \`\`\`
23
+
24
+ Otherwise:
25
+ \`\`\`bash
26
+ openspec list --json
27
+ \`\`\`
28
+
29
+ Aggregate all results sorted by most recently modified. Use the **AskUserQuestion tool** to let the user select which change to work on.
14
30
 
15
31
  Present the top 3-4 most recently modified changes as options, showing:
16
32
  - Change name
@@ -128,7 +144,23 @@ export function getOpsxContinueCommandTemplate() {
128
144
 
129
145
  1. **If no change name provided, prompt for selection**
130
146
 
131
- Run \`openspec list --json\` to get available changes sorted by most recently modified. Then use the **AskUserQuestion tool** to let the user select which change to work on.
147
+ Check for a workspace manifest:
148
+ \`\`\`bash
149
+ cat openspec/workspace.yaml 2>/dev/null
150
+ \`\`\`
151
+
152
+ If workspace.yaml exists, list changes across all scopes:
153
+ \`\`\`bash
154
+ (cd <scope.path> && openspec list --json) # for each scope in workspace.yaml
155
+ ls openspec/changes/ 2>/dev/null # umbrella changes at root
156
+ \`\`\`
157
+
158
+ Otherwise:
159
+ \`\`\`bash
160
+ openspec list --json
161
+ \`\`\`
162
+
163
+ Aggregate all results sorted by most recently modified. Use the **AskUserQuestion tool** to let the user select which change to work on.
132
164
 
133
165
  Present the top 3-4 most recently modified changes as options, showing:
134
166
  - Change name
@@ -17,16 +17,17 @@
17
17
  export declare function transformToHyphenCommands(text: string): string;
18
18
  /**
19
19
  * Creates a transformer that replaces bare `openspec` CLI invocations with a custom command.
20
- * Only replaces command invocations (backtick-quoted or after `&&`), not path references
21
- * like `openspec/changes/`.
20
+ * Only replaces command invocations (backtick-quoted, after `&&`, or at line start),
21
+ * not path references like `openspec/changes/`.
22
22
  *
23
23
  * @param cli - The CLI command to use instead of bare `openspec`
24
24
  * @returns Transformer function, or undefined if cli is not set
25
25
  *
26
26
  * @example
27
27
  * const t = createCliTransformer('pnpm exec openspec');
28
- * t('`openspec list --json`') // '`pnpm exec openspec list --json`'
29
- * t('openspec/changes/foo') // 'openspec/changes/foo' (path unchanged)
28
+ * t('`openspec list --json`') // '`pnpm exec openspec list --json`'
29
+ * t('openspec status --change "x"') // 'pnpm exec openspec status --change "x"' (line-start)
30
+ * t('openspec/changes/foo') // 'openspec/changes/foo' (path unchanged)
30
31
  */
31
32
  export declare function createCliTransformer(cli: string | undefined): ((text: string) => string) | undefined;
32
33
  //# sourceMappingURL=command-references.d.ts.map
@@ -19,22 +19,24 @@ export function transformToHyphenCommands(text) {
19
19
  }
20
20
  /**
21
21
  * Creates a transformer that replaces bare `openspec` CLI invocations with a custom command.
22
- * Only replaces command invocations (backtick-quoted or after `&&`), not path references
23
- * like `openspec/changes/`.
22
+ * Only replaces command invocations (backtick-quoted, after `&&`, or at line start),
23
+ * not path references like `openspec/changes/`.
24
24
  *
25
25
  * @param cli - The CLI command to use instead of bare `openspec`
26
26
  * @returns Transformer function, or undefined if cli is not set
27
27
  *
28
28
  * @example
29
29
  * const t = createCliTransformer('pnpm exec openspec');
30
- * t('`openspec list --json`') // '`pnpm exec openspec list --json`'
31
- * t('openspec/changes/foo') // 'openspec/changes/foo' (path unchanged)
30
+ * t('`openspec list --json`') // '`pnpm exec openspec list --json`'
31
+ * t('openspec status --change "x"') // 'pnpm exec openspec status --change "x"' (line-start)
32
+ * t('openspec/changes/foo') // 'openspec/changes/foo' (path unchanged)
32
33
  */
33
34
  export function createCliTransformer(cli) {
34
35
  if (!cli)
35
36
  return undefined;
36
37
  return (text) => text
37
38
  .replace(/`openspec\s/g, `\`${cli} `)
38
- .replace(/&& openspec\s/g, `&& ${cli} `);
39
+ .replace(/&& openspec\s/g, `&& ${cli} `)
40
+ .replace(/^(\s*)openspec\s/gm, `$1${cli} `);
39
41
  }
40
42
  //# sourceMappingURL=command-references.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/openspec",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "AI-native system for spec-driven development",
5
5
  "keywords": [
6
6
  "openspec",