@fission-ai/openspec 1.3.0 → 1.4.0

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.
Files changed (179) hide show
  1. package/README.md +9 -6
  2. package/bin/openspec.js +3 -1
  3. package/dist/cli/index.d.ts +4 -1
  4. package/dist/cli/index.js +46 -2
  5. package/dist/commands/completion.js +7 -0
  6. package/dist/commands/config.js +64 -5
  7. package/dist/commands/context-store.d.ts +3 -0
  8. package/dist/commands/context-store.js +475 -0
  9. package/dist/commands/initiative.d.ts +13 -0
  10. package/dist/commands/initiative.js +318 -0
  11. package/dist/commands/workflow/index.d.ts +2 -0
  12. package/dist/commands/workflow/index.js +1 -0
  13. package/dist/commands/workflow/initiative-link.d.ts +24 -0
  14. package/dist/commands/workflow/initiative-link.js +47 -0
  15. package/dist/commands/workflow/instructions.d.ts +1 -1
  16. package/dist/commands/workflow/instructions.js +46 -83
  17. package/dist/commands/workflow/new-change.d.ts +6 -0
  18. package/dist/commands/workflow/new-change.js +114 -17
  19. package/dist/commands/workflow/set-change.d.ts +13 -0
  20. package/dist/commands/workflow/set-change.js +87 -0
  21. package/dist/commands/workflow/shared.d.ts +5 -3
  22. package/dist/commands/workflow/shared.js +6 -6
  23. package/dist/commands/workflow/status.js +24 -9
  24. package/dist/commands/workflow/templates.js +5 -4
  25. package/dist/commands/workspace/context-status.d.ts +4 -0
  26. package/dist/commands/workspace/context-status.js +59 -0
  27. package/dist/commands/workspace/open-target-selection.d.ts +13 -0
  28. package/dist/commands/workspace/open-target-selection.js +146 -0
  29. package/dist/commands/workspace/open-view.d.ts +62 -0
  30. package/dist/commands/workspace/open-view.js +249 -0
  31. package/dist/commands/workspace/open.d.ts +37 -0
  32. package/dist/commands/workspace/open.js +110 -0
  33. package/dist/commands/workspace/opener-selection.d.ts +11 -0
  34. package/dist/commands/workspace/opener-selection.js +98 -0
  35. package/dist/commands/workspace/operations.d.ts +29 -0
  36. package/dist/commands/workspace/operations.js +543 -0
  37. package/dist/commands/workspace/prompt-theme.d.ts +29 -0
  38. package/dist/commands/workspace/prompt-theme.js +24 -0
  39. package/dist/commands/workspace/registration.d.ts +13 -0
  40. package/dist/commands/workspace/registration.js +84 -0
  41. package/dist/commands/workspace/selection.d.ts +9 -0
  42. package/dist/commands/workspace/selection.js +115 -0
  43. package/dist/commands/workspace/setup-prompts.d.ts +13 -0
  44. package/dist/commands/workspace/setup-prompts.js +121 -0
  45. package/dist/commands/workspace/types.d.ts +103 -0
  46. package/dist/commands/workspace/types.js +36 -0
  47. package/dist/commands/workspace.d.ts +6 -0
  48. package/dist/commands/workspace.js +587 -0
  49. package/dist/core/artifact-graph/index.d.ts +3 -1
  50. package/dist/core/artifact-graph/index.js +1 -0
  51. package/dist/core/artifact-graph/instruction-loader.d.ts +41 -1
  52. package/dist/core/artifact-graph/instruction-loader.js +51 -9
  53. package/dist/core/artifact-graph/outputs.d.ts +14 -0
  54. package/dist/core/artifact-graph/outputs.js +39 -0
  55. package/dist/core/artifact-graph/state.js +2 -25
  56. package/dist/core/artifact-graph/types.d.ts +0 -5
  57. package/dist/core/artifact-graph/types.js +0 -14
  58. package/dist/core/change-metadata/index.d.ts +2 -0
  59. package/dist/core/change-metadata/index.js +2 -0
  60. package/dist/core/change-metadata/schema.d.ts +18 -0
  61. package/dist/core/change-metadata/schema.js +28 -0
  62. package/dist/core/change-status-policy.d.ts +50 -0
  63. package/dist/core/change-status-policy.js +70 -0
  64. package/dist/core/collections/index.d.ts +3 -0
  65. package/dist/core/collections/index.js +3 -0
  66. package/dist/core/collections/initiatives/collection.d.ts +4 -0
  67. package/dist/core/collections/initiatives/collection.js +17 -0
  68. package/dist/core/collections/initiatives/index.d.ts +6 -0
  69. package/dist/core/collections/initiatives/index.js +6 -0
  70. package/dist/core/collections/initiatives/operations.d.ts +49 -0
  71. package/dist/core/collections/initiatives/operations.js +175 -0
  72. package/dist/core/collections/initiatives/resolution.d.ts +87 -0
  73. package/dist/core/collections/initiatives/resolution.js +374 -0
  74. package/dist/core/collections/initiatives/schema.d.ts +41 -0
  75. package/dist/core/collections/initiatives/schema.js +134 -0
  76. package/dist/core/collections/initiatives/templates.d.ts +12 -0
  77. package/dist/core/collections/initiatives/templates.js +90 -0
  78. package/dist/core/collections/runtime.d.ts +46 -0
  79. package/dist/core/collections/runtime.js +194 -0
  80. package/dist/core/completions/command-registry.d.ts +1 -5
  81. package/dist/core/completions/command-registry.js +532 -32
  82. package/dist/core/completions/completion-provider.d.ts +11 -0
  83. package/dist/core/completions/completion-provider.js +27 -0
  84. package/dist/core/completions/generators/bash-generator.d.ts +3 -0
  85. package/dist/core/completions/generators/bash-generator.js +60 -4
  86. package/dist/core/completions/generators/fish-generator.js +3 -0
  87. package/dist/core/completions/generators/powershell-generator.d.ts +3 -0
  88. package/dist/core/completions/generators/powershell-generator.js +63 -4
  89. package/dist/core/completions/generators/zsh-generator.d.ts +3 -0
  90. package/dist/core/completions/generators/zsh-generator.js +46 -22
  91. package/dist/core/completions/installers/zsh-installer.d.ts +0 -8
  92. package/dist/core/completions/installers/zsh-installer.js +3 -31
  93. package/dist/core/completions/shared-flags.d.ts +12 -0
  94. package/dist/core/completions/shared-flags.js +28 -0
  95. package/dist/core/completions/templates/bash-templates.d.ts +1 -1
  96. package/dist/core/completions/templates/bash-templates.js +6 -0
  97. package/dist/core/completions/templates/fish-templates.d.ts +1 -1
  98. package/dist/core/completions/templates/fish-templates.js +6 -0
  99. package/dist/core/completions/templates/powershell-templates.d.ts +1 -1
  100. package/dist/core/completions/templates/powershell-templates.js +9 -0
  101. package/dist/core/completions/templates/zsh-templates.d.ts +1 -1
  102. package/dist/core/completions/templates/zsh-templates.js +9 -0
  103. package/dist/core/completions/types.d.ts +23 -1
  104. package/dist/core/config.js +3 -1
  105. package/dist/core/context-store/binding.d.ts +53 -0
  106. package/dist/core/context-store/binding.js +197 -0
  107. package/dist/core/context-store/errors.d.ts +20 -0
  108. package/dist/core/context-store/errors.js +22 -0
  109. package/dist/core/context-store/foundation.d.ts +55 -0
  110. package/dist/core/context-store/foundation.js +321 -0
  111. package/dist/core/context-store/index.d.ts +6 -0
  112. package/dist/core/context-store/index.js +6 -0
  113. package/dist/core/context-store/operations.d.ts +85 -0
  114. package/dist/core/context-store/operations.js +528 -0
  115. package/dist/core/context-store/registry.d.ts +45 -0
  116. package/dist/core/context-store/registry.js +229 -0
  117. package/dist/core/global-config.d.ts +6 -1
  118. package/dist/core/global-config.js +15 -16
  119. package/dist/core/index.d.ts +5 -1
  120. package/dist/core/index.js +4 -0
  121. package/dist/core/parsers/change-parser.js +7 -3
  122. package/dist/core/parsers/markdown-parser.d.ts +4 -0
  123. package/dist/core/parsers/markdown-parser.js +41 -1
  124. package/dist/core/parsers/requirement-blocks.js +5 -5
  125. package/dist/core/parsers/spec-structure.d.ts +9 -0
  126. package/dist/core/parsers/spec-structure.js +88 -0
  127. package/dist/core/planning-home.d.ts +21 -0
  128. package/dist/core/planning-home.js +108 -0
  129. package/dist/core/profiles.d.ts +1 -1
  130. package/dist/core/profiles.js +1 -1
  131. package/dist/core/specs-apply.js +9 -1
  132. package/dist/core/templates/workflows/apply-change.js +10 -4
  133. package/dist/core/templates/workflows/archive-change.js +21 -15
  134. package/dist/core/templates/workflows/bulk-archive-change.js +14 -10
  135. package/dist/core/templates/workflows/continue-change.js +6 -4
  136. package/dist/core/templates/workflows/explore.js +8 -10
  137. package/dist/core/templates/workflows/ff-change.js +8 -6
  138. package/dist/core/templates/workflows/new-change.js +6 -6
  139. package/dist/core/templates/workflows/onboard.js +13 -15
  140. package/dist/core/templates/workflows/propose.js +8 -6
  141. package/dist/core/templates/workflows/sync-specs.js +28 -10
  142. package/dist/core/templates/workflows/verify-change.js +16 -10
  143. package/dist/core/update.d.ts +5 -0
  144. package/dist/core/update.js +20 -0
  145. package/dist/core/validation/validator.d.ts +11 -0
  146. package/dist/core/validation/validator.js +28 -2
  147. package/dist/core/workspace/foundation.d.ts +67 -0
  148. package/dist/core/workspace/foundation.js +295 -0
  149. package/dist/core/workspace/index.d.ts +8 -0
  150. package/dist/core/workspace/index.js +8 -0
  151. package/dist/core/workspace/legacy-state.d.ts +28 -0
  152. package/dist/core/workspace/legacy-state.js +200 -0
  153. package/dist/core/workspace/link-input.d.ts +9 -0
  154. package/dist/core/workspace/link-input.js +32 -0
  155. package/dist/core/workspace/open-surface.d.ts +45 -0
  156. package/dist/core/workspace/open-surface.js +215 -0
  157. package/dist/core/workspace/openers.d.ts +21 -0
  158. package/dist/core/workspace/openers.js +124 -0
  159. package/dist/core/workspace/registry.d.ts +24 -0
  160. package/dist/core/workspace/registry.js +146 -0
  161. package/dist/core/workspace/skills.d.ts +57 -0
  162. package/dist/core/workspace/skills.js +334 -0
  163. package/dist/core/workspace/state-io.d.ts +10 -0
  164. package/dist/core/workspace/state-io.js +119 -0
  165. package/dist/telemetry/config.d.ts +7 -1
  166. package/dist/telemetry/config.js +87 -19
  167. package/dist/telemetry/index.js +19 -0
  168. package/dist/utils/change-metadata.d.ts +5 -2
  169. package/dist/utils/change-metadata.js +7 -13
  170. package/dist/utils/change-utils.d.ts +9 -0
  171. package/dist/utils/change-utils.js +7 -5
  172. package/dist/utils/file-system.d.ts +5 -0
  173. package/dist/utils/file-system.js +21 -1
  174. package/package.json +2 -1
  175. package/schemas/workspace-planning/schema.yaml +72 -0
  176. package/schemas/workspace-planning/templates/design.md +33 -0
  177. package/schemas/workspace-planning/templates/proposal.md +28 -0
  178. package/schemas/workspace-planning/templates/spec.md +9 -0
  179. package/schemas/workspace-planning/templates/tasks.md +15 -0
package/README.md CHANGED
@@ -42,10 +42,6 @@ Our philosophy:
42
42
  Follow <a href="https://x.com/0xTab">@0xTab on X</a> for updates · Join the <a href="https://discord.gg/YctCnvvshC">OpenSpec Discord</a> for help and questions.
43
43
  </p>
44
44
 
45
- ### Teams
46
-
47
- Using OpenSpec in a team? [Email here](mailto:teams@openspec.dev) for access to our Slack channel.
48
-
49
45
  <!-- TODO: Add GIF demo of /opsx:propose → /opsx:archive workflow -->
50
46
 
51
47
  ## See it in action
@@ -100,7 +96,7 @@ openspec init
100
96
 
101
97
  Now tell your AI: `/opsx:propose <what-you-want-to-build>`
102
98
 
103
- If you want the expanded workflow (`/opsx:new`, `/opsx:continue`, `/opsx:ff`, `/opsx:verify`, `/opsx:sync`, `/opsx:bulk-archive`, `/opsx:onboard`), select it with `openspec config profile` and apply with `openspec update`.
99
+ If you want the expanded workflow (`/opsx:new`, `/opsx:continue`, `/opsx:ff`, `/opsx:verify`, `/opsx:bulk-archive`, `/opsx:onboard`), select it with `openspec config profile` and apply with `openspec update`.
104
100
 
105
101
  > [!NOTE]
106
102
  > Not sure if your tool is supported? [View the full list](docs/supported-tools.md) – we support 25+ tools and growing.
@@ -119,6 +115,13 @@ If you want the expanded workflow (`/opsx:new`, `/opsx:continue`, `/opsx:ff`, `/
119
115
  → **[Customization](docs/customization.md)**: make it yours
120
116
 
121
117
 
118
+ ## Community schemas
119
+
120
+ Third-party schema bundles distributed via standalone repositories — these provide opinionated workflows that integrate OpenSpec with other tools, similar to how [github/spec-kit's community extension catalog](https://github.com/github/spec-kit/tree/main/extensions) handles tool integrations.
121
+
122
+ → **[Browse the catalog](docs/customization.md#community-schemas)** in the customization docs.
123
+
124
+
122
125
  ## Why OpenSpec?
123
126
 
124
127
  AI coding assistants are powerful but unpredictable when requirements live only in chat history. OpenSpec adds a lightweight spec layer so you agree on what to build before any code is written.
@@ -154,7 +157,7 @@ openspec update
154
157
 
155
158
  ## Usage Notes
156
159
 
157
- **Model selection**: OpenSpec works best with high-reasoning models. We recommend Opus 4.5 and GPT 5.2 for both planning and implementation.
160
+ **Model selection**: OpenSpec works best with high-reasoning models. We recommend Codex 5.5 and Opus 4.7 for both planning and implementation.
158
161
 
159
162
  **Context hygiene**: OpenSpec benefits from a clean context window. Clear your context before starting implementation and maintain good context hygiene throughout your session.
160
163
 
package/bin/openspec.js CHANGED
@@ -1,3 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import '../dist/cli/index.js';
3
+ import { runCli } from '../dist/cli/index.js';
4
+
5
+ runCli();
@@ -1,2 +1,5 @@
1
- export {};
1
+ import { Command } from 'commander';
2
+ declare const program: Command;
3
+ export { program };
4
+ export declare function runCli(argv?: string[]): void;
2
5
  //# sourceMappingURL=index.d.ts.map
package/dist/cli/index.js CHANGED
@@ -2,6 +2,7 @@ import { Command } from 'commander';
2
2
  import { createRequire } from 'module';
3
3
  import ora from 'ora';
4
4
  import path from 'path';
5
+ import { fileURLToPath } from 'url';
5
6
  import { promises as fs } from 'fs';
6
7
  import { AI_TOOLS } from '../core/config.js';
7
8
  import { UpdateCommand } from '../core/update.js';
@@ -16,7 +17,11 @@ import { CompletionCommand } from '../commands/completion.js';
16
17
  import { FeedbackCommand } from '../commands/feedback.js';
17
18
  import { registerConfigCommand } from '../commands/config.js';
18
19
  import { registerSchemaCommand } from '../commands/schema.js';
19
- import { statusCommand, instructionsCommand, applyInstructionsCommand, templatesCommand, schemasCommand, newChangeCommand, DEFAULT_SCHEMA, } from '../commands/workflow/index.js';
20
+ import { registerWorkspaceCommand, runWorkspaceUpdateForRoot, } from '../commands/workspace.js';
21
+ import { registerContextStoreCommand } from '../commands/context-store.js';
22
+ import { registerInitiativeCommand } from '../commands/initiative.js';
23
+ import { findWorkspaceRoot } from '../core/workspace/index.js';
24
+ import { statusCommand, instructionsCommand, applyInstructionsCommand, templatesCommand, schemasCommand, newChangeCommand, setChangeCommand, DEFAULT_SCHEMA, } from '../commands/workflow/index.js';
20
25
  import { maybeShowTelemetryNotice, trackCommand, shutdown } from '../telemetry/index.js';
21
26
  const program = new Command();
22
27
  const require = createRequire(import.meta.url);
@@ -136,6 +141,11 @@ program
136
141
  .action(async (targetPath = '.', options) => {
137
142
  try {
138
143
  const resolvedPath = path.resolve(targetPath);
144
+ const workspaceRoot = await findWorkspaceRoot(resolvedPath);
145
+ if (workspaceRoot) {
146
+ await runWorkspaceUpdateForRoot(workspaceRoot, { force: options?.force });
147
+ return;
148
+ }
139
149
  const updateCommand = new UpdateCommand({ force: options?.force });
140
150
  await updateCommand.execute(resolvedPath);
141
151
  }
@@ -259,6 +269,9 @@ program
259
269
  registerSpecCommand(program);
260
270
  registerConfigCommand(program);
261
271
  registerSchemaCommand(program);
272
+ registerWorkspaceCommand(program);
273
+ registerContextStoreCommand(program);
274
+ registerInitiativeCommand(program);
262
275
  // Top-level validate command
263
276
  program
264
277
  .command('validate [item-name]')
@@ -467,7 +480,13 @@ newCmd
467
480
  .command('change <name>')
468
481
  .description('Create a new change directory')
469
482
  .option('--description <text>', 'Description to add to README.md')
483
+ .option('--goal <text>', 'Workspace product goal to store with the change')
484
+ .option('--areas <names>', 'Comma-separated affected workspace link names')
485
+ .option('--initiative <id>', 'Link the repo-local change to an initiative')
486
+ .option('--store <id>', 'Context store id for --initiative')
487
+ .option('--store-path <path>', 'Existing local context store root for --initiative')
470
488
  .option('--schema <name>', `Workflow schema to use (default: ${DEFAULT_SCHEMA})`)
489
+ .option('--json', 'Output as JSON')
471
490
  .action(async (name, options) => {
472
491
  try {
473
492
  await newChangeCommand(name, options);
@@ -478,5 +497,30 @@ newCmd
478
497
  process.exit(1);
479
498
  }
480
499
  });
481
- program.parse();
500
+ // Set command group
501
+ const setCmd = program.command('set').description('Set checked-in OpenSpec metadata');
502
+ setCmd
503
+ .command('change <name>')
504
+ .description('Set repo-local change metadata')
505
+ .option('--initiative <id>', 'Link the repo-local change to an initiative')
506
+ .option('--store <id>', 'Context store id for --initiative')
507
+ .option('--store-path <path>', 'Existing local context store root for --initiative')
508
+ .option('--json', 'Output as JSON')
509
+ .action(async (name, options) => {
510
+ try {
511
+ await setChangeCommand(name, options);
512
+ }
513
+ catch (error) {
514
+ console.log();
515
+ ora().fail(`Error: ${error.message}`);
516
+ process.exit(1);
517
+ }
518
+ });
519
+ export { program };
520
+ export function runCli(argv = process.argv) {
521
+ program.parse(argv);
522
+ }
523
+ if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
524
+ runCli();
525
+ }
482
526
  //# sourceMappingURL=index.js.map
@@ -229,6 +229,13 @@ export class CompletionCommand {
229
229
  }
230
230
  break;
231
231
  }
232
+ case 'schemas': {
233
+ const schemaNames = await this.completionProvider.getSchemaNames();
234
+ for (const name of schemaNames) {
235
+ console.log(`${name}\tschema`);
236
+ }
237
+ break;
238
+ }
232
239
  case 'archived-changes': {
233
240
  const archivedIds = await getArchivedChangeIds();
234
241
  for (const id of archivedIds) {
@@ -6,6 +6,7 @@ import { getNestedValue, setNestedValue, deleteNestedValue, coerceValue, formatV
6
6
  import { CORE_WORKFLOWS, ALL_WORKFLOWS, getProfileWorkflows } from '../core/profiles.js';
7
7
  import { OPENSPEC_DIR_NAME } from '../core/config.js';
8
8
  import { hasProjectConfigDrift } from '../core/profile-sync-drift.js';
9
+ import { findWorkspaceRoot, hasWorkspaceSkillProfileDrift, readOptionalWorkspaceViewState, } from '../core/workspace/index.js';
9
10
  const WORKFLOW_PROMPT_META = {
10
11
  propose: {
11
12
  name: 'Propose change',
@@ -132,7 +133,17 @@ export function diffProfileState(before, after) {
132
133
  lines,
133
134
  };
134
135
  }
135
- function maybeWarnConfigDrift(projectDir, state, colorize) {
136
+ async function resolveWorkspaceConfigProfileContext(cwd = process.cwd()) {
137
+ const workspaceRoot = await findWorkspaceRoot(cwd);
138
+ if (!workspaceRoot) {
139
+ return null;
140
+ }
141
+ return {
142
+ root: workspaceRoot,
143
+ commandCwd: cwd,
144
+ };
145
+ }
146
+ function maybeWarnProjectConfigDrift(projectDir, state, colorize) {
136
147
  const openspecDir = path.join(projectDir, OPENSPEC_DIR_NAME);
137
148
  if (!fs.existsSync(openspecDir)) {
138
149
  return;
@@ -142,6 +153,30 @@ function maybeWarnConfigDrift(projectDir, state, colorize) {
142
153
  }
143
154
  console.log(colorize('Warning: Global config is not applied to this project. Run `openspec update` to sync.'));
144
155
  }
156
+ async function maybeWarnConfigDrift(state, colorize) {
157
+ const workspaceContext = await resolveWorkspaceConfigProfileContext();
158
+ if (workspaceContext) {
159
+ let viewState = null;
160
+ try {
161
+ viewState = await readOptionalWorkspaceViewState(workspaceContext.root);
162
+ }
163
+ catch {
164
+ return;
165
+ }
166
+ if (hasWorkspaceSkillProfileDrift(viewState)) {
167
+ console.log(colorize('Warning: Workspace-local agent skills are out of sync with the active global profile. Run `openspec workspace update` to sync.'));
168
+ }
169
+ return;
170
+ }
171
+ maybeWarnProjectConfigDrift(process.cwd(), state, colorize);
172
+ }
173
+ function printConfigProfileApplyGuidance(workspaceContext) {
174
+ if (workspaceContext) {
175
+ console.log('Config updated. Run `openspec workspace update` to apply it to workspace-local skills.');
176
+ return;
177
+ }
178
+ console.log('Config updated. Run `openspec update` in your projects to apply.');
179
+ }
145
180
  /**
146
181
  * Register the config command and all its subcommands.
147
182
  *
@@ -383,7 +418,8 @@ export function registerConfigCommand(program) {
383
418
  config.workflows = [...CORE_WORKFLOWS];
384
419
  // Preserve delivery setting
385
420
  saveGlobalConfig(config);
386
- console.log('Config updated. Run `openspec update` in your projects to apply.');
421
+ const workspaceContext = await resolveWorkspaceConfigProfileContext();
422
+ printConfigProfileApplyGuidance(workspaceContext);
387
423
  return;
388
424
  }
389
425
  if (preset) {
@@ -436,7 +472,7 @@ export function registerConfigCommand(program) {
436
472
  });
437
473
  if (action === 'keep') {
438
474
  console.log('No config changes.');
439
- maybeWarnConfigDrift(process.cwd(), currentState, chalk.yellow);
475
+ await maybeWarnConfigDrift(currentState, chalk.yellow);
440
476
  return;
441
477
  }
442
478
  const nextState = {
@@ -505,7 +541,7 @@ export function registerConfigCommand(program) {
505
541
  const diff = diffProfileState(currentState, nextState);
506
542
  if (!diff.hasChanges) {
507
543
  console.log('No config changes.');
508
- maybeWarnConfigDrift(process.cwd(), nextState, chalk.yellow);
544
+ await maybeWarnConfigDrift(nextState, chalk.yellow);
509
545
  return;
510
546
  }
511
547
  console.log(chalk.bold('\nConfig changes:'));
@@ -517,6 +553,29 @@ export function registerConfigCommand(program) {
517
553
  config.delivery = nextState.delivery;
518
554
  config.workflows = nextState.workflows;
519
555
  saveGlobalConfig(config);
556
+ const workspaceContext = await resolveWorkspaceConfigProfileContext();
557
+ if (workspaceContext) {
558
+ const applyNow = await confirm({
559
+ message: 'Apply changes to this workspace now?',
560
+ default: true,
561
+ });
562
+ if (applyNow) {
563
+ try {
564
+ execSync('npx openspec workspace update', {
565
+ stdio: 'inherit',
566
+ cwd: workspaceContext.commandCwd,
567
+ });
568
+ console.log('Run `openspec workspace update` in your other workspaces to apply.');
569
+ }
570
+ catch {
571
+ console.error('`openspec workspace update` failed. Please run it manually to apply the profile changes.');
572
+ process.exitCode = 1;
573
+ }
574
+ return;
575
+ }
576
+ printConfigProfileApplyGuidance(workspaceContext);
577
+ return;
578
+ }
520
579
  // Check if inside an OpenSpec project
521
580
  const projectDir = process.cwd();
522
581
  const openspecDir = path.join(projectDir, OPENSPEC_DIR_NAME);
@@ -537,7 +596,7 @@ export function registerConfigCommand(program) {
537
596
  return;
538
597
  }
539
598
  }
540
- console.log('Config updated. Run `openspec update` in your projects to apply.');
599
+ printConfigProfileApplyGuidance(null);
541
600
  }
542
601
  catch (error) {
543
602
  if (isPromptCancellationError(error)) {
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerContextStoreCommand(program: Command): void;
3
+ //# sourceMappingURL=context-store.d.ts.map