@codewalla_india/openspec 1.3.1 → 1.3.2

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 (333) hide show
  1. package/LICENSE +22 -22
  2. package/README.md +272 -191
  3. package/bin/openspec.js +5 -5
  4. package/dist/cli/index.js +99 -62
  5. package/dist/commands/change.d.ts +0 -2
  6. package/dist/commands/change.js +107 -86
  7. package/dist/commands/config.js +14 -16
  8. package/dist/commands/doctor.js +9 -4
  9. package/dist/commands/feedback.js +79 -30
  10. package/dist/commands/modify.d.ts +26 -0
  11. package/dist/commands/modify.js +147 -0
  12. package/dist/commands/schema.js +170 -91
  13. package/dist/commands/show.js +5 -2
  14. package/dist/commands/spec.js +49 -29
  15. package/dist/commands/store.js +15 -21
  16. package/dist/commands/validate.d.ts +8 -0
  17. package/dist/commands/validate.js +43 -20
  18. package/dist/commands/workflow/index.d.ts +2 -2
  19. package/dist/commands/workflow/index.js +1 -1
  20. package/dist/commands/workflow/instructions.d.ts +6 -26
  21. package/dist/commands/workflow/instructions.js +183 -376
  22. package/dist/commands/workflow/new-change.d.ts +0 -4
  23. package/dist/commands/workflow/new-change.js +10 -28
  24. package/dist/commands/workflow/shared.d.ts +34 -19
  25. package/dist/commands/workflow/shared.js +34 -4
  26. package/dist/commands/workflow/status.js +10 -32
  27. package/dist/commands/workflow/templates.js +15 -5
  28. package/dist/commands/workset.d.ts +2 -2
  29. package/dist/commands/workset.js +19 -22
  30. package/dist/comprehension-quiz/fingerprint.d.ts +39 -0
  31. package/dist/comprehension-quiz/fingerprint.js +84 -0
  32. package/dist/comprehension-quiz/index.d.ts +42 -0
  33. package/dist/comprehension-quiz/index.js +47 -0
  34. package/dist/comprehension-quiz/pass-record.d.ts +44 -0
  35. package/dist/comprehension-quiz/pass-record.js +98 -0
  36. package/dist/comprehension-quiz/providers/anthropic.d.ts +34 -0
  37. package/dist/comprehension-quiz/providers/anthropic.js +53 -0
  38. package/dist/comprehension-quiz/providers/factory.d.ts +44 -0
  39. package/dist/comprehension-quiz/providers/factory.js +174 -0
  40. package/dist/comprehension-quiz/providers/interface.d.ts +59 -0
  41. package/dist/comprehension-quiz/providers/interface.js +63 -0
  42. package/dist/comprehension-quiz/providers/local.d.ts +34 -0
  43. package/dist/comprehension-quiz/providers/local.js +53 -0
  44. package/dist/comprehension-quiz/providers/ollama.d.ts +34 -0
  45. package/dist/comprehension-quiz/providers/ollama.js +53 -0
  46. package/dist/comprehension-quiz/providers/openai.d.ts +34 -0
  47. package/dist/comprehension-quiz/providers/openai.js +53 -0
  48. package/dist/comprehension-quiz/question-generator.d.ts +69 -0
  49. package/dist/comprehension-quiz/question-generator.js +141 -0
  50. package/dist/comprehension-quiz/quiz-executor.d.ts +70 -0
  51. package/dist/comprehension-quiz/quiz-executor.js +165 -0
  52. package/dist/comprehension-quiz/types.d.ts +115 -0
  53. package/dist/comprehension-quiz/types.js +11 -0
  54. package/dist/core/archive.d.ts +14 -1
  55. package/dist/core/archive.js +1350 -190
  56. package/dist/core/artifact-graph/graph.d.ts +28 -9
  57. package/dist/core/artifact-graph/graph.js +94 -43
  58. package/dist/core/artifact-graph/index.d.ts +1 -1
  59. package/dist/core/artifact-graph/index.js +1 -1
  60. package/dist/core/artifact-graph/instruction-loader.d.ts +30 -3
  61. package/dist/core/artifact-graph/instruction-loader.js +70 -12
  62. package/dist/core/artifact-graph/outputs.d.ts +1 -0
  63. package/dist/core/artifact-graph/outputs.js +67 -5
  64. package/dist/core/artifact-graph/resolver.d.ts +14 -0
  65. package/dist/core/artifact-graph/resolver.js +69 -15
  66. package/dist/core/artifact-graph/types.js +21 -3
  67. package/dist/core/available-tools.d.ts +2 -2
  68. package/dist/core/available-tools.js +14 -3
  69. package/dist/core/change-metadata/schema.d.ts +2 -0
  70. package/dist/core/change-metadata/schema.js +13 -0
  71. package/dist/core/change-status-policy.d.ts +10 -1
  72. package/dist/core/change-status-policy.js +30 -2
  73. package/dist/core/command-generation/adapters/amazon-q.d.ts +4 -0
  74. package/dist/core/command-generation/adapters/amazon-q.js +11 -5
  75. package/dist/core/command-generation/adapters/antigravity.js +6 -5
  76. package/dist/core/command-generation/adapters/auggie.js +7 -6
  77. package/dist/core/command-generation/adapters/bob.d.ts +5 -1
  78. package/dist/core/command-generation/adapters/bob.js +11 -10
  79. package/dist/core/command-generation/adapters/claude.d.ts +1 -1
  80. package/dist/core/command-generation/adapters/claude.js +12 -17
  81. package/dist/core/command-generation/adapters/cline.js +5 -5
  82. package/dist/core/command-generation/adapters/codebuddy.js +8 -7
  83. package/dist/core/command-generation/adapters/continue.js +8 -7
  84. package/dist/core/command-generation/adapters/costrict.js +7 -6
  85. package/dist/core/command-generation/adapters/crush.js +9 -9
  86. package/dist/core/command-generation/adapters/cursor.js +8 -8
  87. package/dist/core/command-generation/adapters/devin.d.ts +19 -0
  88. package/dist/core/command-generation/adapters/devin.js +36 -0
  89. package/dist/core/command-generation/adapters/factory.js +7 -6
  90. package/dist/core/command-generation/adapters/gemini.js +40 -5
  91. package/dist/core/command-generation/adapters/github-copilot.js +6 -5
  92. package/dist/core/command-generation/adapters/iflow.js +9 -8
  93. package/dist/core/command-generation/adapters/index.d.ts +4 -2
  94. package/dist/core/command-generation/adapters/index.js +4 -2
  95. package/dist/core/command-generation/adapters/junie.js +6 -5
  96. package/dist/core/command-generation/adapters/kilocode.js +1 -1
  97. package/dist/core/command-generation/adapters/kiro.js +6 -5
  98. package/dist/core/command-generation/adapters/lingma.js +9 -9
  99. package/dist/core/command-generation/adapters/oh-my-pi.d.ts +21 -0
  100. package/dist/core/command-generation/adapters/oh-my-pi.js +42 -0
  101. package/dist/core/command-generation/adapters/opencode.js +6 -8
  102. package/dist/core/command-generation/adapters/pi.d.ts +2 -2
  103. package/dist/core/command-generation/adapters/pi.js +7 -10
  104. package/dist/core/command-generation/adapters/qoder.js +9 -9
  105. package/dist/core/command-generation/adapters/qwen.d.ts +7 -3
  106. package/dist/core/command-generation/adapters/qwen.js +14 -9
  107. package/dist/core/command-generation/adapters/roocode.d.ts +4 -4
  108. package/dist/core/command-generation/adapters/roocode.js +9 -9
  109. package/dist/core/command-generation/adapters/trae.d.ts +13 -0
  110. package/dist/core/command-generation/adapters/trae.js +28 -0
  111. package/dist/core/command-generation/adapters/zcode.d.ts +16 -0
  112. package/dist/core/command-generation/adapters/zcode.js +33 -0
  113. package/dist/core/command-generation/generator.d.ts +8 -0
  114. package/dist/core/command-generation/generator.js +15 -1
  115. package/dist/core/command-generation/index.d.ts +1 -1
  116. package/dist/core/command-generation/index.js +1 -1
  117. package/dist/core/command-generation/invocation.d.ts +73 -0
  118. package/dist/core/command-generation/invocation.js +77 -0
  119. package/dist/core/command-generation/registry.js +8 -4
  120. package/dist/core/command-generation/types.d.ts +9 -2
  121. package/dist/core/command-generation/yaml.d.ts +20 -6
  122. package/dist/core/command-generation/yaml.js +31 -21
  123. package/dist/core/command-surface.d.ts +15 -0
  124. package/dist/core/command-surface.js +33 -0
  125. package/dist/core/completions/command-registry.js +16 -61
  126. package/dist/core/completions/generators/bash-generator.js +41 -41
  127. package/dist/core/completions/generators/fish-generator.js +7 -7
  128. package/dist/core/completions/generators/powershell-generator.js +44 -37
  129. package/dist/core/completions/generators/zsh-generator.js +33 -33
  130. package/dist/core/completions/installers/zsh-installer.d.ts +9 -0
  131. package/dist/core/completions/installers/zsh-installer.js +20 -4
  132. package/dist/core/completions/templates/bash-templates.js +24 -24
  133. package/dist/core/completions/templates/fish-templates.js +38 -38
  134. package/dist/core/completions/templates/powershell-templates.js +28 -28
  135. package/dist/core/completions/templates/zsh-templates.js +39 -39
  136. package/dist/core/config-prompts.d.ts +1 -1
  137. package/dist/core/config-prompts.js +14 -1
  138. package/dist/core/config-schema.d.ts +10 -1
  139. package/dist/core/config-schema.js +67 -1
  140. package/dist/core/config.d.ts +15 -0
  141. package/dist/core/config.js +46 -5
  142. package/dist/core/file-state.js +56 -24
  143. package/dist/core/github-copilot/cloud-agent.d.ts +95 -0
  144. package/dist/core/github-copilot/cloud-agent.js +497 -0
  145. package/dist/core/global-config.d.ts +16 -0
  146. package/dist/core/init.d.ts +58 -0
  147. package/dist/core/init.js +474 -73
  148. package/dist/core/legacy-cleanup.d.ts +59 -0
  149. package/dist/core/legacy-cleanup.js +253 -24
  150. package/dist/core/list.js +23 -16
  151. package/dist/core/migration.d.ts +73 -1
  152. package/dist/core/migration.js +360 -11
  153. package/dist/core/modify/conflict-detector.d.ts +26 -0
  154. package/dist/core/modify/conflict-detector.js +62 -0
  155. package/dist/core/modify/dependency-propagator.d.ts +38 -0
  156. package/dist/core/modify/dependency-propagator.js +103 -0
  157. package/dist/core/modify/history-tracker.d.ts +34 -0
  158. package/dist/core/modify/history-tracker.js +114 -0
  159. package/dist/core/modify/index.d.ts +7 -0
  160. package/dist/core/modify/index.js +7 -0
  161. package/dist/core/onboarding-commands.d.ts +30 -0
  162. package/dist/core/onboarding-commands.js +38 -0
  163. package/dist/core/openspec-root.js +18 -15
  164. package/dist/core/parsers/change-parser.d.ts +17 -2
  165. package/dist/core/parsers/change-parser.js +35 -21
  166. package/dist/core/parsers/code-fence.d.ts +15 -0
  167. package/dist/core/parsers/code-fence.js +49 -0
  168. package/dist/core/parsers/markdown-parser.d.ts +0 -3
  169. package/dist/core/parsers/markdown-parser.js +7 -60
  170. package/dist/core/parsers/requirement-blocks.d.ts +29 -0
  171. package/dist/core/parsers/requirement-blocks.js +150 -31
  172. package/dist/core/parsers/requirement-text.d.ts +48 -0
  173. package/dist/core/parsers/requirement-text.js +98 -0
  174. package/dist/core/parsers/spec-structure.d.ts +1 -1
  175. package/dist/core/parsers/spec-structure.js +20 -30
  176. package/dist/core/profile-sync-drift.d.ts +0 -8
  177. package/dist/core/profile-sync-drift.js +49 -50
  178. package/dist/core/profiles.d.ts +2 -2
  179. package/dist/core/profiles.js +2 -2
  180. package/dist/core/project-config.d.ts +27 -18
  181. package/dist/core/project-config.js +101 -34
  182. package/dist/core/references.js +42 -4
  183. package/dist/core/relationship-health.d.ts +8 -0
  184. package/dist/core/relationship-health.js +13 -0
  185. package/dist/core/root-selection.d.ts +9 -6
  186. package/dist/core/root-selection.js +42 -5
  187. package/dist/core/schemas/base.schema.js +7 -2
  188. package/dist/core/shared/allowed-tools.d.ts +12 -0
  189. package/dist/core/shared/allowed-tools.js +12 -0
  190. package/dist/core/shared/index.d.ts +1 -0
  191. package/dist/core/shared/index.js +1 -0
  192. package/dist/core/shared/skill-content-equivalence.d.ts +7 -0
  193. package/dist/core/shared/skill-content-equivalence.js +41 -0
  194. package/dist/core/shared/skill-generation.js +17 -13
  195. package/dist/core/shared/skill-paths.d.ts +13 -0
  196. package/dist/core/shared/skill-paths.js +23 -0
  197. package/dist/core/shared/tool-detection.d.ts +27 -7
  198. package/dist/core/shared/tool-detection.js +167 -37
  199. package/dist/core/shared-skill-target.d.ts +16 -0
  200. package/dist/core/shared-skill-target.js +156 -0
  201. package/dist/core/specs-apply.d.ts +80 -33
  202. package/dist/core/specs-apply.js +667 -145
  203. package/dist/core/store/git.d.ts +13 -0
  204. package/dist/core/store/git.js +24 -0
  205. package/dist/core/store/operations.js +20 -0
  206. package/dist/core/templates/skill-templates.d.ts +3 -2
  207. package/dist/core/templates/skill-templates.js +3 -2
  208. package/dist/core/templates/workflows/apply-change.d.ts +10 -0
  209. package/dist/core/templates/workflows/apply-change.js +186 -224
  210. package/dist/core/templates/workflows/archive-change.js +387 -260
  211. package/dist/core/templates/workflows/bulk-archive-change.js +655 -475
  212. package/dist/core/templates/workflows/continue-change.js +210 -219
  213. package/dist/core/templates/workflows/explore.js +479 -443
  214. package/dist/core/templates/workflows/feedback.js +97 -97
  215. package/dist/core/templates/workflows/ff-change.js +200 -191
  216. package/dist/core/templates/workflows/modify-change.d.ts +4 -1
  217. package/dist/core/templates/workflows/modify-change.js +237 -115
  218. package/dist/core/templates/workflows/new-change.js +127 -134
  219. package/dist/core/templates/workflows/onboard.js +548 -542
  220. package/dist/core/templates/workflows/propose.js +273 -217
  221. package/dist/core/templates/workflows/store-selection.d.ts +1 -1
  222. package/dist/core/templates/workflows/store-selection.js +1 -1
  223. package/dist/core/templates/workflows/sync-specs.js +500 -273
  224. package/dist/core/templates/workflows/update-change.d.ts +10 -0
  225. package/dist/core/templates/workflows/update-change.js +177 -0
  226. package/dist/core/templates/workflows/verify-change.js +324 -326
  227. package/dist/core/update.d.ts +40 -5
  228. package/dist/core/update.js +411 -96
  229. package/dist/core/validation/constants.d.ts +4 -1
  230. package/dist/core/validation/constants.js +4 -1
  231. package/dist/core/validation/plan-validator.d.ts +8 -0
  232. package/dist/core/validation/plan-validator.js +45 -0
  233. package/dist/core/validation/task-numbering.d.ts +16 -0
  234. package/dist/core/validation/task-numbering.js +57 -0
  235. package/dist/core/validation/validator.d.ts +27 -3
  236. package/dist/core/validation/validator.js +337 -48
  237. package/dist/core/version-check.d.ts +152 -0
  238. package/dist/core/version-check.js +731 -0
  239. package/dist/core/view.js +13 -18
  240. package/dist/prompts/searchable-multi-select.js +1 -1
  241. package/dist/telemetry/caller-detection.d.ts +27 -0
  242. package/dist/telemetry/caller-detection.js +85 -0
  243. package/dist/telemetry/caller-detection.test.d.ts +5 -0
  244. package/dist/telemetry/config.d.ts +48 -2
  245. package/dist/telemetry/config.js +113 -11
  246. package/dist/telemetry/config.test.d.ts +5 -0
  247. package/dist/telemetry/deduplication.d.ts +35 -0
  248. package/dist/telemetry/deduplication.js +82 -0
  249. package/dist/telemetry/deduplication.test.d.ts +5 -0
  250. package/dist/telemetry/identity.d.ts +62 -22
  251. package/dist/telemetry/identity.js +147 -102
  252. package/dist/telemetry/index.d.ts +126 -15
  253. package/dist/telemetry/index.js +569 -37
  254. package/dist/telemetry/sanitization.d.ts +40 -0
  255. package/dist/telemetry/sanitization.js +114 -0
  256. package/dist/telemetry/sanitization.test.d.ts +5 -0
  257. package/dist/telemetry/throttling.d.ts +20 -0
  258. package/dist/telemetry/throttling.js +70 -0
  259. package/dist/ui/welcome-screen.d.ts +9 -1
  260. package/dist/ui/welcome-screen.js +91 -38
  261. package/dist/utils/change-metadata.d.ts +43 -0
  262. package/dist/utils/change-metadata.js +123 -7
  263. package/dist/utils/change-utils.d.ts +10 -4
  264. package/dist/utils/change-utils.js +20 -13
  265. package/dist/utils/ci.d.ts +12 -0
  266. package/dist/utils/ci.js +16 -0
  267. package/dist/utils/command-references.d.ts +92 -6
  268. package/dist/utils/command-references.js +180 -7
  269. package/dist/utils/date.d.ts +8 -0
  270. package/dist/utils/date.js +13 -0
  271. package/dist/utils/file-system.d.ts +10 -0
  272. package/dist/utils/file-system.js +70 -0
  273. package/dist/utils/index.d.ts +1 -1
  274. package/dist/utils/index.js +1 -1
  275. package/dist/utils/interactive.d.ts +23 -0
  276. package/dist/utils/interactive.js +32 -0
  277. package/dist/utils/item-discovery.d.ts +19 -0
  278. package/dist/utils/item-discovery.js +30 -48
  279. package/dist/utils/shell-detection.d.ts +1 -1
  280. package/dist/utils/shell-detection.js +64 -11
  281. package/dist/utils/spec-discovery.d.ts +40 -0
  282. package/dist/utils/spec-discovery.js +115 -0
  283. package/dist/utils/task-progress.d.ts +29 -1
  284. package/dist/utils/task-progress.js +109 -15
  285. package/package.json +96 -84
  286. package/schemas/spec-driven/schema.yaml +252 -184
  287. package/schemas/spec-driven/templates/design.md +19 -19
  288. package/schemas/spec-driven/templates/plan-template.md +91 -0
  289. package/schemas/spec-driven/templates/proposal.md +29 -24
  290. package/schemas/spec-driven/templates/spec.md +11 -8
  291. package/schemas/spec-driven/templates/tasks.md +9 -9
  292. package/scripts/postinstall.js +83 -83
  293. package/dist/core/command-generation/adapters/codex.d.ts +0 -16
  294. package/dist/core/command-generation/adapters/codex.js +0 -39
  295. package/dist/core/command-generation/adapters/windsurf.d.ts +0 -14
  296. package/dist/core/command-generation/adapters/windsurf.js +0 -38
  297. package/dist/core/comprehension/config.d.ts +0 -20
  298. package/dist/core/comprehension/config.js +0 -23
  299. package/dist/core/comprehension/fingerprint.d.ts +0 -14
  300. package/dist/core/comprehension/fingerprint.js +0 -33
  301. package/dist/core/comprehension/index.d.ts +0 -57
  302. package/dist/core/comprehension/index.js +0 -87
  303. package/dist/core/comprehension/pass-record.d.ts +0 -29
  304. package/dist/core/comprehension/pass-record.js +0 -64
  305. package/dist/core/comprehension/stats.d.ts +0 -35
  306. package/dist/core/comprehension/stats.js +0 -133
  307. package/dist/core/templates/workflows/comprehension-guidance.d.ts +0 -9
  308. package/dist/core/templates/workflows/comprehension-guidance.js +0 -73
  309. package/dist/core/templates/workflows/mcp-guidance.d.ts +0 -13
  310. package/dist/core/templates/workflows/mcp-guidance.js +0 -131
  311. package/dist/core/templates/workflows/user-prompt-guidance.d.ts +0 -16
  312. package/dist/core/templates/workflows/user-prompt-guidance.js +0 -48
  313. package/dist/telemetry/caller.d.ts +0 -5
  314. package/dist/telemetry/caller.js +0 -29
  315. package/dist/telemetry/client.d.ts +0 -27
  316. package/dist/telemetry/client.js +0 -127
  317. package/dist/telemetry/command-context.d.ts +0 -13
  318. package/dist/telemetry/command-context.js +0 -59
  319. package/dist/telemetry/comprehension.d.ts +0 -44
  320. package/dist/telemetry/comprehension.js +0 -105
  321. package/dist/telemetry/content.d.ts +0 -10
  322. package/dist/telemetry/content.js +0 -56
  323. package/dist/telemetry/git-stats.d.ts +0 -12
  324. package/dist/telemetry/git-stats.js +0 -69
  325. package/dist/telemetry/identify-cache.d.ts +0 -7
  326. package/dist/telemetry/identify-cache.js +0 -47
  327. package/dist/telemetry/input.d.ts +0 -17
  328. package/dist/telemetry/input.js +0 -68
  329. package/dist/telemetry/marker.d.ts +0 -37
  330. package/dist/telemetry/marker.js +0 -67
  331. package/dist/telemetry/workflow.d.ts +0 -85
  332. package/dist/telemetry/workflow.js +0 -318
  333. package/schemas/spec-driven/templates/plan.md +0 -19
@@ -1,117 +1,144 @@
1
- import { ATLASSIAN_PROPOSE_GUIDANCE } from './mcp-guidance.js';
2
1
  import { STORE_SELECTION_GUIDANCE } from './store-selection.js';
3
- import { PROMPT_CLARIFY, PROMPT_OPEN_ENDED, TELEMETRY_WORKFLOW_INPUT_GUIDANCE } from './user-prompt-guidance.js';
4
2
  export function getOpsxProposeSkillTemplate() {
5
3
  return {
6
4
  name: 'openspec-propose',
7
- description: 'Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, plan, and tasks ready for implementation.',
8
- instructions: `Propose a new change - create the change and generate all artifacts in one step.
9
-
10
- I'll create a change with artifacts:
11
- - proposal.md (what & why)
12
- - design.md (how)
13
- - plan.md (file-level implementation plan)
14
- - tasks.md (implementation steps)
15
-
16
- When ready to implement, run /opsx:apply
17
-
18
- ---
19
-
20
- ${STORE_SELECTION_GUIDANCE}
21
-
22
- **Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
23
-
24
- **Steps**
25
-
26
- ${ATLASSIAN_PROPOSE_GUIDANCE}
27
-
28
- 1. **If no clear input provided, ask what they want to build**
29
-
30
- ${PROMPT_OPEN_ENDED} Ask:
31
- > "What change do you want to work on? Describe what you want to build or fix."
32
-
33
- From their description, derive a kebab-case name (e.g., "add user authentication" \`add-user-auth\`).
34
-
35
- **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
36
-
37
- 2. **Create the change directory**
38
- \`\`\`bash
39
- openspec new change "<name>" --entry-point propose \
40
- --workflow-input "<user request verbatim>" \
41
- --editor cursor
42
- \`\`\`
43
- ${TELEMETRY_WORKFLOW_INPUT_GUIDANCE}
44
- This creates a scaffolded change in the planning home resolved by the CLI with \`.openspec.yaml\`.
45
-
46
- 3. **Get the artifact build order**
47
- \`\`\`bash
48
- openspec status --change "<name>" --json
49
- \`\`\`
50
- Parse the JSON to get:
51
- - \`applyRequires\`: array of artifact IDs needed before implementation (e.g., \`["tasks"]\`)
52
- - \`artifacts\`: list of all artifacts with their status and dependencies
53
- - \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`: path and scope context. Use these instead of assuming repo-local paths.
54
-
55
- 4. **Create artifacts in sequence until apply-ready**
56
-
57
- Use the **TodoWrite tool** to track progress through the artifacts.
58
-
59
- Loop through artifacts in dependency order (artifacts with no pending dependencies first):
60
-
61
- a. **For each artifact that is \`ready\` (dependencies satisfied)**:
62
- - Get instructions:
63
- \`\`\`bash
64
- openspec instructions <artifact-id> --change "<name>" --json
65
- \`\`\`
66
- - The instructions JSON includes:
67
- - \`context\`: Project background (constraints for you - do NOT include in output)
68
- - \`rules\`: Artifact-specific rules (constraints for you - do NOT include in output)
69
- - \`template\`: The structure to use for your output file
70
- - \`instruction\`: Schema-specific guidance for this artifact type
71
- - \`resolvedOutputPath\`: Resolved path or pattern to write the artifact
72
- - \`dependencies\`: Completed artifacts to read for context
73
- - Read any completed dependency files for context
74
- - Create the artifact file using \`template\` as the structure and write it to \`resolvedOutputPath\`
75
- - Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
76
- - Show brief progress: "Created <artifact-id>"
77
-
78
- b. **Continue until all \`applyRequires\` artifacts are complete**
79
- - After creating each artifact, re-run \`openspec status --change "<name>" --json\`
80
- - Check if every artifact ID in \`applyRequires\` has \`status: "done"\` in the artifacts array
81
- - Stop when all \`applyRequires\` artifacts are done
82
-
83
- c. **If an artifact requires user input** (unclear context):
84
- - ${PROMPT_CLARIFY}
85
- - Then continue with creation
86
-
87
- 5. **Show final status**
88
- \`\`\`bash
89
- openspec status --change "<name>"
90
- \`\`\`
91
-
92
- **Output**
93
-
94
- After completing all artifacts, summarize:
95
- - Change name and location
96
- - List of artifacts created with brief descriptions
97
- - What's ready: "All artifacts created! Ready for implementation."
98
- - Prompt: "Run \`/opsx:apply\` or ask me to implement to start working on the tasks."
99
-
100
- **Artifact Creation Guidelines**
101
-
102
- - Follow the \`instruction\` field from \`openspec instructions\` for each artifact type
103
- - The schema defines what each artifact should contain - follow it
104
- - Read dependency artifacts for context before creating new ones
105
- - Use \`template\` as the structure for your output file - fill in its sections
106
- - **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
107
- - Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
108
- - These guide what you write, but should never appear in the output
109
-
110
- **Guardrails**
111
- - Create ALL artifacts needed for implementation (as defined by schema's \`apply.requires\`)
112
- - Always read dependency artifacts before creating a new one
113
- - If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
114
- - If a change with that name already exists, ask if user wants to continue it or create a new one
5
+ description: 'Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.',
6
+ instructions: `Propose a new change - create the change and generate all artifacts in one step.
7
+
8
+ **Planning boundary**: This workflow creates planning artifacts only. The user request that selected or triggered this workflow authorizes planning only, even if it asks to build or fix something. Do not edit project code. After the planning artifacts are complete, stop. Do not start implementation in the same response, even if the initial request asks for it. Wait for a new user request after the artifacts are presented; then start the apply workflow.
9
+
10
+ I'll create a change with the artifacts your schema defines. With the default spec-driven schema that is:
11
+ - proposal.md (what & why)
12
+ - \`specs/<capability-path>/spec.md\` (what the system must do - a delta, not the main spec)
13
+ - design.md (how)
14
+ - tasks.md (implementation steps)
15
+
16
+ \`<capability-path>\` is the spec directory relative to \`specs/\` (for example, \`user-auth\` or \`identity/user-auth\`). Preserve an existing capability's full path and follow the project's established organization for new capabilities.
17
+
18
+ When the user is ready to implement, they must start the apply workflow explicitly.
19
+
20
+ ---
21
+
22
+ ${STORE_SELECTION_GUIDANCE}
23
+
24
+ **Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
25
+
26
+ **Steps**
27
+
28
+ 1. **Understand the request and clarify material ambiguity**
29
+
30
+ If no clear input is provided, ask the user (open-ended, no preset options):
31
+ > "What change do you want to work on? Describe what you want to build or fix."
32
+
33
+ From their description, derive a kebab-case name (e.g., "add user authentication" \`add-user-auth\`).
34
+
35
+ **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
36
+
37
+ If the request contains ambiguity that would materially affect scope, externally observable behavior, compatibility, or acceptance criteria, ask the user before creating the change. For minor details, make a reasonable assumption and record it in the planning artifacts.
38
+
39
+ 2. **Determine the workflow schema**
40
+
41
+ Use the configured default schema unless the user explicitly requests a different workflow.
42
+
43
+ **Use a different schema only if the user:**
44
+ - Explicitly requests a specific schema by name → use \`--schema <schema-name>\`
45
+ - Asks to "show workflows" or asks "what workflows" exist → resolve the authoritative root by running \`openspec context --json\` from the current working directory. If the user explicitly selected a registered store, use \`openspec context --json --store "<store-id>"\`. Then run \`openspec schemas --json\` with its working directory set to the returned \`root.path\` and let them choose. This preserves roots selected by a local \`store:\` pointer or the global \`defaultStore\`; \`schemas\` does not accept \`--store\`. If context reports only \`no_openspec_root\`, run \`openspec schemas --json\` from the current working directory instead. Do not use this fallback for invalid or unavailable stores.
46
+
47
+ Otherwise, omit \`--schema\` to preserve the configured default.
48
+
49
+ 3. **Create the change directory**
50
+
51
+ Choose one schema form below. If a registered store is selected, append \`--store "<store-id>"\` to that command and each later OpenSpec command shown below that accepts \`--store\`.
52
+
53
+ Using the configured default:
54
+ \`\`\`bash
55
+ openspec new change "<name>"
56
+ \`\`\`
57
+
58
+ Using an explicitly requested schema:
59
+ \`\`\`bash
60
+ openspec new change "<name>" --schema "<schema-name>"
61
+ \`\`\`
62
+ This creates a scaffolded change in the planning home resolved by the CLI with \`.openspec.yaml\`.
63
+
64
+ 4. **Get the artifact build order**
65
+ \`\`\`bash
66
+ openspec status --change "<name>" --json
67
+ \`\`\`
68
+ Parse the JSON to get:
69
+ - \`applyRequires\`: array of artifact IDs needed before implementation (e.g., \`["tasks"]\`)
70
+ - \`artifacts\`: list of all artifacts, each with its \`status\` and its \`requires\` edges (the artifact IDs it directly depends on)
71
+ - \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`: path and scope context. Use these instead of assuming repo-local paths.
72
+
73
+ 5. **Create every artifact in the required set**
74
+
75
+ Use a todo list to track progress through the artifacts.
76
+
77
+ Loop through artifacts in dependency order (artifacts with no pending dependencies first):
78
+
79
+ a. **For each artifact that is \`ready\` (dependencies satisfied)**:
80
+ - Get instructions:
81
+ \`\`\`bash
82
+ openspec instructions <artifact-id> --change "<name>" --json
83
+ \`\`\`
84
+ - The instructions JSON includes:
85
+ - \`context\`: Project background (constraints for you - do NOT include in output)
86
+ - \`rules\`: Artifact-specific rules (constraints for you - do NOT include in output)
87
+ - \`template\`: The structure to use for your output file
88
+ - \`instruction\`: Schema-specific guidance for this artifact type
89
+ - \`skipped\`/\`warning\`: present when the change declares skip_specs and this artifact must NOT be created - stop and pick another artifact
90
+ - \`resolvedOutputPath\`: Resolved path or pattern to write the artifact
91
+ - \`dependencies\`: Completed artifacts to read for context
92
+ - Read any completed dependency files for context - always re-read them from disk, even if you saw them earlier in the conversation (the user may have edited them)
93
+ - If the \`instruction\` field delegates creation to a specific skill or command, invoke it to produce the artifact instead of writing the file yourself, then verify the artifact file exists at \`resolvedOutputPath\`
94
+ - Otherwise create the artifact file using \`template\` as the structure and write it to \`resolvedOutputPath\`. If \`resolvedOutputPath\` is a glob, follow \`instruction\` to choose the concrete file path
95
+ - Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
96
+ - Show brief progress: "Created <artifact-id>"
97
+
98
+ b. **Continue until every artifact in the required set exists (not just \`apply.requires\`)**
99
+ - After creating each artifact, re-run \`openspec status --change "<name>" --json\`
100
+ - The required set is \`applyRequires\` plus every artifact reachable from those by following the \`requires\` edges in \`status --json\` - walk them transitively (spec-driven closes over proposal, specs, design, tasks). Leave artifacts outside that set alone
101
+ - \`status\` is file-existence only, so an \`applyRequires\` artifact reading \`done\` does NOT mean its dependencies exist - writing \`tasks.md\` early marks \`tasks\` done while \`specs\` was never written. Use each artifact's \`requires\` edges, not its \`status\`, to build the required set: a \`done\` artifact still lists what it depends on
102
+ - An artifact already reading \`status: "skipped"\` is satisfied: the change declares \`skip_specs\` in \`.openspec.yaml\`, so its files must NOT exist. Never try to create one
103
+ - Create every artifact in the required set that is missing, then re-check - creating one can unblock others
104
+ - Skip one only when \`status\` already reports it \`skipped\`, or when its own \`instruction\` says it is conditional: run \`openspec instructions <artifact-id> --change "<name>" --json\` and skip only if its \`instruction\` field marks it optional (e.g. "create only if..."). Spec-driven's \`design.md\` qualifies; \`specs\` qualifies only via the \`skipped\` status above, never by your own judgment. Tell the user, and do not reconsider it
105
+ - Dependencies are enablers, not gates: if a required artifact is still \`blocked\` only because you skipped a conditional dependency, write it anyway
106
+ - Stop when every artifact in the required set is \`done\`, \`skipped\`, or was deliberately skipped
107
+
108
+ c. **If an artifact requires user input** (unclear context):
109
+ - Ask the user to clarify
110
+ - Then continue with creation
111
+
112
+ 6. **Show final status**
113
+ \`\`\`bash
114
+ openspec status --change "<name>"
115
+ \`\`\`
116
+
117
+ **Output**
118
+
119
+ After completing all artifacts, summarize:
120
+ - Change name and location
121
+ - List of artifacts created with brief descriptions, plus any conditional artifact you skipped and why
122
+ - What's ready: "All artifacts needed for implementation are ready."
123
+ - Prompt: "The artifacts are ready for review. When you are ready, run \`/opsx:apply\` or ask me to apply this change."
124
+
125
+ **Artifact Creation Guidelines**
126
+
127
+ - Follow the \`instruction\` field from \`openspec instructions\` for each artifact type - it is the authoritative guidance, even for familiar artifact names
128
+ - If the \`instruction\` field directs you to use a specific skill or command to create the artifact, invoke it instead of writing the artifact directly
129
+ - The schema defines what each artifact should contain - follow it
130
+ - Read dependency artifacts for context before creating new ones
131
+ - Use \`template\` as the structure for your output file - fill in its sections
132
+ - **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
133
+ - Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
134
+ - These guide what you write, but should never appear in the output
135
+
136
+ **Guardrails**
137
+ - The request that invoked this workflow authorizes planning only. Any implementation or apply instruction in that request does not carry forward. Do NOT implement the change, start the apply workflow, or edit project code during this workflow. After presenting the artifacts, stop and wait for a new user request to start the apply workflow
138
+ - Create every artifact the apply phase transitively depends on, not just the ids listed in \`apply.requires\`
139
+ - Always read dependency artifacts before creating a new one - re-read from disk, not from conversation memory (files may have changed since you last saw them)
140
+ - Ask about ambiguities that would materially change scope, externally observable behavior, compatibility, or acceptance criteria; for minor details, make reasonable assumptions and record them
141
+ - If a change with that name already exists, ask if user wants to continue it or create a new one
115
142
  - Verify each artifact file exists after writing before proceeding to next`,
116
143
  license: 'MIT',
117
144
  compatibility: 'Requires openspec CLI.',
@@ -124,113 +151,142 @@ export function getOpsxProposeCommandTemplate() {
124
151
  description: 'Propose a new change - create it and generate all artifacts in one step',
125
152
  category: 'Workflow',
126
153
  tags: ['workflow', 'artifacts', 'experimental'],
127
- content: `Propose a new change - create the change and generate all artifacts in one step.
128
-
129
- I'll create a change with artifacts:
130
- - proposal.md (what & why)
131
- - design.md (how)
132
- - plan.md (file-level implementation plan)
133
- - tasks.md (implementation steps)
134
-
135
- When ready to implement, run /opsx:apply
136
-
137
- ---
138
-
139
- ${STORE_SELECTION_GUIDANCE}
140
-
141
- **Input**: The argument after \`/opsx:propose\` is the change name (kebab-case), OR a description of what the user wants to build.
142
-
143
- **Steps**
144
-
145
- ${ATLASSIAN_PROPOSE_GUIDANCE}
146
-
147
- 1. **If no input provided, ask what they want to build**
148
-
149
- ${PROMPT_OPEN_ENDED} Ask:
150
- > "What change do you want to work on? Describe what you want to build or fix."
151
-
152
- From their description, derive a kebab-case name (e.g., "add user authentication" \`add-user-auth\`).
153
-
154
- **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
155
-
156
- 2. **Create the change directory**
157
- \`\`\`bash
158
- openspec new change "<name>" --entry-point propose \
159
- --workflow-input "<user request verbatim>" \
160
- --editor cursor
161
- \`\`\`
162
- ${TELEMETRY_WORKFLOW_INPUT_GUIDANCE}
163
- This creates a scaffolded change in the planning home resolved by the CLI with \`.openspec.yaml\`.
164
-
165
- 3. **Get the artifact build order**
166
- \`\`\`bash
167
- openspec status --change "<name>" --json
168
- \`\`\`
169
- Parse the JSON to get:
170
- - \`applyRequires\`: array of artifact IDs needed before implementation (e.g., \`["tasks"]\`)
171
- - \`artifacts\`: list of all artifacts with their status and dependencies
172
- - \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`: path and scope context. Use these instead of assuming repo-local paths.
173
-
174
- 4. **Create artifacts in sequence until apply-ready**
175
-
176
- Use the **TodoWrite tool** to track progress through the artifacts.
177
-
178
- Loop through artifacts in dependency order (artifacts with no pending dependencies first):
179
-
180
- a. **For each artifact that is \`ready\` (dependencies satisfied)**:
181
- - Get instructions:
182
- \`\`\`bash
183
- openspec instructions <artifact-id> --change "<name>" --json
184
- \`\`\`
185
- - The instructions JSON includes:
186
- - \`context\`: Project background (constraints for you - do NOT include in output)
187
- - \`rules\`: Artifact-specific rules (constraints for you - do NOT include in output)
188
- - \`template\`: The structure to use for your output file
189
- - \`instruction\`: Schema-specific guidance for this artifact type
190
- - \`resolvedOutputPath\`: Resolved path or pattern to write the artifact
191
- - \`dependencies\`: Completed artifacts to read for context
192
- - Read any completed dependency files for context
193
- - Create the artifact file using \`template\` as the structure and write it to \`resolvedOutputPath\`
194
- - Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
195
- - Show brief progress: "Created <artifact-id>"
196
-
197
- b. **Continue until all \`applyRequires\` artifacts are complete**
198
- - After creating each artifact, re-run \`openspec status --change "<name>" --json\`
199
- - Check if every artifact ID in \`applyRequires\` has \`status: "done"\` in the artifacts array
200
- - Stop when all \`applyRequires\` artifacts are done
201
-
202
- c. **If an artifact requires user input** (unclear context):
203
- - ${PROMPT_CLARIFY}
204
- - Then continue with creation
205
-
206
- 5. **Show final status**
207
- \`\`\`bash
208
- openspec status --change "<name>"
209
- \`\`\`
210
-
211
- **Output**
212
-
213
- After completing all artifacts, summarize:
214
- - Change name and location
215
- - List of artifacts created with brief descriptions
216
- - What's ready: "All artifacts created! Ready for implementation."
217
- - Prompt: "Run \`/opsx:apply\` to start implementing."
218
-
219
- **Artifact Creation Guidelines**
220
-
221
- - Follow the \`instruction\` field from \`openspec instructions\` for each artifact type
222
- - The schema defines what each artifact should contain - follow it
223
- - Read dependency artifacts for context before creating new ones
224
- - Use \`template\` as the structure for your output file - fill in its sections
225
- - **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
226
- - Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
227
- - These guide what you write, but should never appear in the output
228
-
229
- **Guardrails**
230
- - Create ALL artifacts needed for implementation (as defined by schema's \`apply.requires\`)
231
- - Always read dependency artifacts before creating a new one
232
- - If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
233
- - If a change with that name already exists, ask if user wants to continue it or create a new one
154
+ content: `Propose a new change - create the change and generate all artifacts in one step.
155
+
156
+ **Planning boundary**: This workflow creates planning artifacts only. The user request that selected or triggered this workflow authorizes planning only, even if it asks to build or fix something. Do not edit project code. After the planning artifacts are complete, stop. Do not start implementation in the same response, even if the initial request asks for it. Wait for a new user request after the artifacts are presented; then start the apply workflow.
157
+
158
+ I'll create a change with the artifacts your schema defines. With the default spec-driven schema that is:
159
+ - proposal.md (what & why)
160
+ - \`specs/<capability-path>/spec.md\` (what the system must do - a delta, not the main spec)
161
+ - design.md (how)
162
+ - tasks.md (implementation steps)
163
+
164
+ \`<capability-path>\` is the spec directory relative to \`specs/\` (for example, \`user-auth\` or \`identity/user-auth\`). Preserve an existing capability's full path and follow the project's established organization for new capabilities.
165
+
166
+ When the user is ready to implement, they must start the apply workflow explicitly.
167
+
168
+ ---
169
+
170
+ ${STORE_SELECTION_GUIDANCE}
171
+
172
+ **Input**: The argument after \`/opsx:propose\` is the change name (kebab-case), OR a description of what the user wants to build.
173
+
174
+ **Steps**
175
+
176
+ 1. **Understand the request and clarify material ambiguity**
177
+
178
+ If no input is provided, ask the user (open-ended, no preset options):
179
+ > "What change do you want to work on? Describe what you want to build or fix."
180
+
181
+ From their description, derive a kebab-case name (e.g., "add user authentication" \`add-user-auth\`).
182
+
183
+ **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
184
+
185
+ If the request contains ambiguity that would materially affect scope, externally observable behavior, compatibility, or acceptance criteria, ask the user before creating the change. For minor details, make a reasonable assumption and record it in the planning artifacts.
186
+
187
+ 2. **Determine the workflow schema**
188
+
189
+ Use the configured default schema unless the user explicitly requests a different workflow.
190
+
191
+ **Use a different schema only if the user:**
192
+ - Explicitly requests a specific schema by name → use \`--schema <schema-name>\`
193
+ - Asks to "show workflows" or asks "what workflows" exist → resolve the authoritative root by running \`openspec context --json\` from the current working directory. If the user explicitly selected a registered store, use \`openspec context --json --store "<store-id>"\`. Then run \`openspec schemas --json\` with its working directory set to the returned \`root.path\` and let them choose. This preserves roots selected by a local \`store:\` pointer or the global \`defaultStore\`; \`schemas\` does not accept \`--store\`. If context reports only \`no_openspec_root\`, run \`openspec schemas --json\` from the current working directory instead. Do not use this fallback for invalid or unavailable stores.
194
+
195
+ Otherwise, omit \`--schema\` to preserve the configured default.
196
+
197
+ 3. **Create the change directory**
198
+
199
+ Choose one schema form below. If a registered store is selected, append \`--store "<store-id>"\` to that command and each later OpenSpec command shown below that accepts \`--store\`.
200
+
201
+ Using the configured default:
202
+ \`\`\`bash
203
+ openspec new change "<name>"
204
+ \`\`\`
205
+
206
+ Using an explicitly requested schema:
207
+ \`\`\`bash
208
+ openspec new change "<name>" --schema "<schema-name>"
209
+ \`\`\`
210
+ This creates a scaffolded change in the planning home resolved by the CLI with \`.openspec.yaml\`.
211
+
212
+ 4. **Get the artifact build order**
213
+ \`\`\`bash
214
+ openspec status --change "<name>" --json
215
+ \`\`\`
216
+ Parse the JSON to get:
217
+ - \`applyRequires\`: array of artifact IDs needed before implementation (e.g., \`["tasks"]\`)
218
+ - \`artifacts\`: list of all artifacts, each with its \`status\` and its \`requires\` edges (the artifact IDs it directly depends on)
219
+ - \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`: path and scope context. Use these instead of assuming repo-local paths.
220
+
221
+ 5. **Create every artifact in the required set**
222
+
223
+ Use a todo list to track progress through the artifacts.
224
+
225
+ Loop through artifacts in dependency order (artifacts with no pending dependencies first):
226
+
227
+ a. **For each artifact that is \`ready\` (dependencies satisfied)**:
228
+ - Get instructions:
229
+ \`\`\`bash
230
+ openspec instructions <artifact-id> --change "<name>" --json
231
+ \`\`\`
232
+ - The instructions JSON includes:
233
+ - \`context\`: Project background (constraints for you - do NOT include in output)
234
+ - \`rules\`: Artifact-specific rules (constraints for you - do NOT include in output)
235
+ - \`template\`: The structure to use for your output file
236
+ - \`instruction\`: Schema-specific guidance for this artifact type
237
+ - \`skipped\`/\`warning\`: present when the change declares skip_specs and this artifact must NOT be created - stop and pick another artifact
238
+ - \`resolvedOutputPath\`: Resolved path or pattern to write the artifact
239
+ - \`dependencies\`: Completed artifacts to read for context
240
+ - Read any completed dependency files for context - always re-read them from disk, even if you saw them earlier in the conversation (the user may have edited them)
241
+ - If the \`instruction\` field delegates creation to a specific skill or command, invoke it to produce the artifact instead of writing the file yourself, then verify the artifact file exists at \`resolvedOutputPath\`
242
+ - Otherwise create the artifact file using \`template\` as the structure and write it to \`resolvedOutputPath\`. If \`resolvedOutputPath\` is a glob, follow \`instruction\` to choose the concrete file path
243
+ - Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
244
+ - Show brief progress: "Created <artifact-id>"
245
+
246
+ b. **Continue until every artifact in the required set exists (not just \`apply.requires\`)**
247
+ - After creating each artifact, re-run \`openspec status --change "<name>" --json\`
248
+ - The required set is \`applyRequires\` plus every artifact reachable from those by following the \`requires\` edges in \`status --json\` - walk them transitively (spec-driven closes over proposal, specs, design, tasks). Leave artifacts outside that set alone
249
+ - \`status\` is file-existence only, so an \`applyRequires\` artifact reading \`done\` does NOT mean its dependencies exist - writing \`tasks.md\` early marks \`tasks\` done while \`specs\` was never written. Use each artifact's \`requires\` edges, not its \`status\`, to build the required set: a \`done\` artifact still lists what it depends on
250
+ - An artifact already reading \`status: "skipped"\` is satisfied: the change declares \`skip_specs\` in \`.openspec.yaml\`, so its files must NOT exist. Never try to create one
251
+ - Create every artifact in the required set that is missing, then re-check - creating one can unblock others
252
+ - Skip one only when \`status\` already reports it \`skipped\`, or when its own \`instruction\` says it is conditional: run \`openspec instructions <artifact-id> --change "<name>" --json\` and skip only if its \`instruction\` field marks it optional (e.g. "create only if..."). Spec-driven's \`design.md\` qualifies; \`specs\` qualifies only via the \`skipped\` status above, never by your own judgment. Tell the user, and do not reconsider it
253
+ - Dependencies are enablers, not gates: if a required artifact is still \`blocked\` only because you skipped a conditional dependency, write it anyway
254
+ - Stop when every artifact in the required set is \`done\`, \`skipped\`, or was deliberately skipped
255
+
256
+ c. **If an artifact requires user input** (unclear context):
257
+ - Ask the user to clarify
258
+ - Then continue with creation
259
+
260
+ 6. **Show final status**
261
+ \`\`\`bash
262
+ openspec status --change "<name>"
263
+ \`\`\`
264
+
265
+ **Output**
266
+
267
+ After completing all artifacts, summarize:
268
+ - Change name and location
269
+ - List of artifacts created with brief descriptions, plus any conditional artifact you skipped and why
270
+ - What's ready: "All artifacts needed for implementation are ready."
271
+ - Prompt: "The artifacts are ready for review. When you are ready, run \`/opsx:apply\`."
272
+
273
+ **Artifact Creation Guidelines**
274
+
275
+ - Follow the \`instruction\` field from \`openspec instructions\` for each artifact type - it is the authoritative guidance, even for familiar artifact names
276
+ - If the \`instruction\` field directs you to use a specific skill or command to create the artifact, invoke it instead of writing the artifact directly
277
+ - The schema defines what each artifact should contain - follow it
278
+ - Read dependency artifacts for context before creating new ones
279
+ - Use \`template\` as the structure for your output file - fill in its sections
280
+ - **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
281
+ - Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
282
+ - These guide what you write, but should never appear in the output
283
+
284
+ **Guardrails**
285
+ - The request that invoked this workflow authorizes planning only. Any implementation or apply instruction in that request does not carry forward. Do NOT implement the change, start the apply workflow, or edit project code during this workflow. After presenting the artifacts, stop and wait for a new user request to start the apply workflow
286
+ - Create every artifact the apply phase transitively depends on, not just the ids listed in \`apply.requires\`
287
+ - Always read dependency artifacts before creating a new one - re-read from disk, not from conversation memory (files may have changed since you last saw them)
288
+ - Ask about ambiguities that would materially change scope, externally observable behavior, compatibility, or acceptance criteria; for minor details, make reasonable assumptions and record them
289
+ - If a change with that name already exists, ask if user wants to continue it or create a new one
234
290
  - Verify each artifact file exists after writing before proceeding to next`
235
291
  };
236
292
  }
@@ -4,5 +4,5 @@
4
4
  * Interpolated into every workflow's instructions so generated skills
5
5
  * consistently teach how to target a registered store with `--store <id>`.
6
6
  */
7
- export declare const STORE_SELECTION_GUIDANCE = "**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.";
7
+ export declare const STORE_SELECTION_GUIDANCE = "**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change \"<name>\" --json --store \"<id>\"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.";
8
8
  //# sourceMappingURL=store-selection.d.ts.map
@@ -4,5 +4,5 @@
4
4
  * Interpolated into every workflow's instructions so generated skills
5
5
  * consistently teach how to target a registered store with `--store <id>`.
6
6
  */
7
- export const STORE_SELECTION_GUIDANCE = `**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run \`openspec store list --json\` to discover registered store ids, then pass \`--store <id>\` on the commands that read or write specs and changes (\`new change\`, \`status\`, \`instructions\`, \`list\`, \`show\`, \`validate\`, \`archive\`, \`doctor\`, \`context\`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local \`openspec/\` root.`;
7
+ export const STORE_SELECTION_GUIDANCE = `**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run \`openspec store list --json\` to discover registered store ids, then pass \`--store <id>\` on the commands that read or write specs and changes (\`new change\`, \`status\`, \`instructions\`, \`list\`, \`show\`, \`validate\`, \`archive\`, \`doctor\`, \`context\`, \`view\`). Once selected, treat \`--store <id>\` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run \`openspec status --change "<name>" --json --store "<id>"\`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local \`openspec/\` root.`;
8
8
  //# sourceMappingURL=store-selection.js.map