@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,246 +1,335 @@
1
1
  import { STORE_SELECTION_GUIDANCE } from './store-selection.js';
2
- import { PROMPT_CONFIRM, PROMPT_MULTI_SELECT_CHANGES } from './user-prompt-guidance.js';
3
2
  export function getBulkArchiveChangeSkillTemplate() {
4
3
  return {
5
4
  name: 'openspec-bulk-archive-change',
6
5
  description: 'Archive multiple completed changes at once. Use when archiving several parallel changes.',
7
- instructions: `Archive multiple completed changes in a single operation.
8
-
9
- This skill allows you to batch-archive changes, handling spec conflicts intelligently by checking the codebase to determine what's actually implemented.
10
-
11
- ${STORE_SELECTION_GUIDANCE}
12
-
13
- **Input**: None required (prompts for selection)
14
-
15
- **Steps**
16
-
17
- 1. **Get active changes**
18
-
19
- Run \`openspec list --json\` to get all active changes.
20
-
21
- If no active changes exist, inform user and stop.
22
-
23
- 2. **Prompt for change selection**
24
-
25
- ${PROMPT_MULTI_SELECT_CHANGES}
26
- - Show each change with its schema
27
- - Include an option for "All changes"
28
- - Allow any number of selections (1+ works, 2+ is the typical use case)
29
-
30
- **IMPORTANT**: Do NOT auto-select. Always let the user choose.
31
-
32
- 3. **Batch validation - gather status for all selected changes**
33
-
34
- For each selected change, collect:
35
-
36
- a. **Artifact status** - Run \`openspec status --change "<name>" --json\`
37
- - Parse \`schemaName\`, \`artifacts\`, \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`
38
- - Note which artifacts are \`done\` vs other states
39
-
40
- b. **Task completion** - Read \`artifactPaths.tasks.existingOutputPaths\` from status JSON
41
- - Count \`- [ ]\` (incomplete) vs \`- [x]\` (complete)
42
- - If no tasks file exists, note as "No tasks"
43
-
44
- c. **Delta specs** - Check \`artifactPaths.specs.existingOutputPaths\` from status JSON
45
- - List which capability specs exist
46
- - For each, extract requirement names (lines matching \`### Requirement: <name>\`)
47
-
48
- 4. **Detect spec conflicts**
49
-
50
- Build a map of \`capability -> [changes that touch it]\`:
51
-
52
- \`\`\`
53
- auth -> [change-a, change-b] <- CONFLICT (2+ changes)
54
- api -> [change-c] <- OK (only 1 change)
55
- \`\`\`
56
-
57
- A conflict exists when 2+ selected changes have delta specs for the same capability.
58
-
59
- 5. **Resolve conflicts agentically**
60
-
61
- **For each conflict**, investigate the codebase:
62
-
63
- a. **Read the delta specs** from each conflicting change to understand what each claims to add/modify
64
-
65
- b. **Search the codebase** for implementation evidence:
66
- - Look for code implementing requirements from each delta spec
67
- - Check for related files, functions, or tests
68
-
69
- c. **Determine resolution**:
70
- - If only one change is actually implemented -> sync that one's specs
71
- - If both implemented -> apply in chronological order (older first, newer overwrites)
72
- - If neither implemented -> skip spec sync, warn user
73
-
74
- d. **Record resolution** for each conflict:
75
- - Which change's specs to apply
76
- - In what order (if both)
77
- - Rationale (what was found in codebase)
78
-
79
- 6. **Show consolidated status table**
80
-
81
- Display a table summarizing all changes:
82
-
83
- \`\`\`
84
- | Change | Artifacts | Tasks | Specs | Conflicts | Status |
85
- |---------------------|-----------|-------|---------|-----------|--------|
86
- | schema-management | Done | 5/5 | 2 delta | None | Ready |
87
- | project-config | Done | 3/3 | 1 delta | None | Ready |
88
- | add-oauth | Done | 4/4 | 1 delta | auth (!) | Ready* |
89
- | add-verify-skill | 1 left | 2/5 | None | None | Warn |
90
- \`\`\`
91
-
92
- For conflicts, show the resolution:
93
- \`\`\`
94
- * Conflict resolution:
95
- - auth spec: Will apply add-oauth then add-jwt (both implemented, chronological order)
96
- \`\`\`
97
-
98
- For incomplete changes, show warnings:
99
- \`\`\`
100
- Warnings:
101
- - add-verify-skill: 1 incomplete artifact, 3 incomplete tasks
102
- \`\`\`
103
-
104
- 7. **Confirm batch operation**
105
-
106
- ${PROMPT_CONFIRM}
107
-
108
- - "Archive N changes?" with options based on status
109
- - Options might include:
110
- - "Archive all N changes"
111
- - "Archive only N ready changes (skip incomplete)"
112
- - "Cancel"
113
-
114
- If there are incomplete changes, make clear they'll be archived with warnings.
115
-
116
- 8. **Execute archive for each confirmed change**
117
-
118
- Process changes in the determined order (respecting conflict resolution):
119
-
120
- a. **Sync specs** if delta specs exist:
121
- - Use the openspec-sync-specs approach (agent-driven intelligent merge)
122
- - For conflicts, apply in resolved order
123
- - Track if sync was done
124
-
125
- b. **Perform the archive**:
126
- \`\`\`bash
127
- mkdir -p "<planningHome.changesDir>/archive"
128
- mv "<changeRoot>" "<planningHome.changesDir>/archive/YYYY-MM-DD-<name>"
129
- \`\`\`
130
-
131
- c. **Track outcome** for each change:
132
- - Success: archived successfully
133
- - Failed: error during archive (record error)
134
- - Skipped: user chose not to archive (if applicable)
135
-
136
- 9. **Display summary**
137
-
138
- Show final results:
139
-
140
- \`\`\`
141
- ## Bulk Archive Complete
142
-
143
- Archived 3 changes:
144
- - schema-management-cli -> archive/2026-01-19-schema-management-cli/
145
- - project-config -> archive/2026-01-19-project-config/
146
- - add-oauth -> archive/2026-01-19-add-oauth/
147
-
148
- Skipped 1 change:
149
- - add-verify-skill (user chose not to archive incomplete)
150
-
151
- Spec sync summary:
152
- - 4 delta specs synced to main specs
153
- - 1 conflict resolved (auth: applied both in chronological order)
154
- \`\`\`
155
-
156
- If any failures:
157
- \`\`\`
158
- Failed 1 change:
159
- - some-change: Archive directory already exists
160
- \`\`\`
161
-
162
- **Conflict Resolution Examples**
163
-
164
- Example 1: Only one implemented
165
- \`\`\`
166
- Conflict: specs/auth/spec.md touched by [add-oauth, add-jwt]
167
-
168
- Checking add-oauth:
169
- - Delta adds "OAuth Provider Integration" requirement
170
- - Searching codebase... found src/auth/oauth.ts implementing OAuth flow
171
-
172
- Checking add-jwt:
173
- - Delta adds "JWT Token Handling" requirement
174
- - Searching codebase... no JWT implementation found
175
-
176
- Resolution: Only add-oauth is implemented. Will sync add-oauth specs only.
177
- \`\`\`
178
-
179
- Example 2: Both implemented
180
- \`\`\`
181
- Conflict: specs/api/spec.md touched by [add-rest-api, add-graphql]
182
-
183
- Checking add-rest-api (created 2026-01-10):
184
- - Delta adds "REST Endpoints" requirement
185
- - Searching codebase... found src/api/rest.ts
186
-
187
- Checking add-graphql (created 2026-01-15):
188
- - Delta adds "GraphQL Schema" requirement
189
- - Searching codebase... found src/api/graphql.ts
190
-
191
- Resolution: Both implemented. Will apply add-rest-api specs first,
192
- then add-graphql specs (chronological order, newer takes precedence).
193
- \`\`\`
194
-
195
- **Output On Success**
196
-
197
- \`\`\`
198
- ## Bulk Archive Complete
199
-
200
- Archived N changes:
201
- - <change-1> -> archive/YYYY-MM-DD-<change-1>/
202
- - <change-2> -> archive/YYYY-MM-DD-<change-2>/
203
-
204
- Spec sync summary:
205
- - N delta specs synced to main specs
206
- - No conflicts (or: M conflicts resolved)
207
- \`\`\`
208
-
209
- **Output On Partial Success**
210
-
211
- \`\`\`
212
- ## Bulk Archive Complete (partial)
213
-
214
- Archived N changes:
215
- - <change-1> -> archive/YYYY-MM-DD-<change-1>/
216
-
217
- Skipped M changes:
218
- - <change-2> (user chose not to archive incomplete)
219
-
220
- Failed K changes:
221
- - <change-3>: Archive directory already exists
222
- \`\`\`
223
-
224
- **Output When No Changes**
225
-
226
- \`\`\`
227
- ## No Changes to Archive
228
-
229
- No active changes found. Create a new change to get started.
230
- \`\`\`
231
-
232
- **Guardrails**
233
- - Allow any number of changes (1+ is fine, 2+ is the typical use case)
234
- - Always prompt for selection, never auto-select
235
- - Detect spec conflicts early and resolve by checking codebase
236
- - When both changes are implemented, apply specs in chronological order
237
- - Skip spec sync only when implementation is missing (warn user)
238
- - Show clear per-change status before confirming
239
- - Use single confirmation for entire batch
240
- - Track and report all outcomes (success/skip/fail)
241
- - Preserve .openspec.yaml when moving to archive
242
- - Archive directory target uses current date: YYYY-MM-DD-<name>
243
- - If archive target exists, fail that change but continue with others`,
6
+ instructions: `Archive multiple completed changes in a single operation.
7
+
8
+ This skill allows you to batch-archive changes, handling spec conflicts intelligently by checking the codebase to determine what's actually implemented.
9
+
10
+ ${STORE_SELECTION_GUIDANCE}
11
+
12
+ \`<capability-path>\` is the spec directory relative to \`specs/\` (for example, \`user-auth\` or \`identity/user-auth\`). Preserve the full path from each delta spec when resolving its main spec.
13
+
14
+ **Input**: None required (prompts for selection)
15
+
16
+ **Steps**
17
+
18
+ 1. **Get active changes**
19
+
20
+ Run \`openspec list --json\` to get all active changes.
21
+
22
+ If no active changes exist, inform user and stop.
23
+
24
+ 2. **Prompt for change selection**
25
+
26
+ Ask the user to choose changes (multi-select):
27
+ - Show each change with its schema
28
+ - Include an option for "All changes"
29
+ - Allow any number of selections (1+ works, 2+ is the typical use case)
30
+
31
+ **IMPORTANT**: Do NOT auto-select. Always let the user choose.
32
+
33
+ **Load current archive inputs once for the selected root before batch validation:**
34
+
35
+ Choose one selected change from this root and run
36
+ \`openspec instructions archive --change "<selected-change>" --json\` with the
37
+ same selected-root flags. This lookup is advisory and optional: it only supplies
38
+ extra prompt inputs, so it must never block the batch. If it fails or returns
39
+ invalid JSON for example on an older CLI that does not support this command
40
+ yet continue the batch with no context and no operation guidance. Do not
41
+ report an error and do not stop.
42
+
43
+ A valid response may omit \`context\` and \`operationGuidance\`. Treat
44
+ \`context\` as a required prompt-level input across the batch: read and consider
45
+ it, and apply relevant project facts, conventions, and constraints. Treat
46
+ \`operationGuidance\` as optional additive advice: read and consider every
47
+ entry, and follow entries that are applicable and compatible with the built-in
48
+ batch workflow.
49
+
50
+ Keep both fields separate from conflict analysis, explicit user choices,
51
+ resolved paths, CLI checks, and command contracts. If context conflicts with one
52
+ of those controlling inputs, report the conflict and preserve the controlling
53
+ value. If guidance is inapplicable or conflicts with a controlling input, do not
54
+ follow it and explain why. Do not infer skipped prompts, replacement paths, or
55
+ flags from either field, and do not copy their text verbatim into specs, changes,
56
+ or summaries. These are prompt-level behavior contracts, not enforceable checks.
57
+
58
+ 3. **Batch validation - gather status for all selected changes**
59
+
60
+ For each selected change, collect:
61
+
62
+ a. **Artifact status** - Run \`openspec status --change "<name>" --json\`
63
+ - Parse \`schemaName\`, \`artifacts\`, \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`
64
+ - Note which artifacts are \`done\` vs other states
65
+
66
+ b. **Task completion** - Read \`artifactPaths.tasks.existingOutputPaths\` from status JSON
67
+ - Count \`- [ ]\` (incomplete) vs \`- [x]\` (complete)
68
+ - If no tasks file exists, note as "No tasks"
69
+
70
+ c. **Delta specs** - Check \`artifactPaths.specs.existingOutputPaths\` from status JSON
71
+ - List which capability specs exist
72
+ - For each, extract requirement names (lines matching \`### Requirement: <name>\`)
73
+ - Treat this list as the only delta-spec source. If the \`specs\` entry is
74
+ missing or the list is empty, perform no spec sync or specs-instruction
75
+ lookup for that change; do not infer deltas from unrelated artifacts.
76
+ - Evaluate this independently for every change, including mixed-schema
77
+ batches where some schemas have no \`specs\` artifact.
78
+ 4. **Detect spec conflicts**
79
+
80
+ Build a map keyed by \`<capability-path>\`, the exact path relative to \`specs/\`:
81
+
82
+ \`\`\`text
83
+ identity/user-auth -> [change-a, change-b] <- CONFLICT (2+ changes)
84
+ billing/user-auth -> [change-c] <- OK (different full path)
85
+ \`\`\`
86
+
87
+ A conflict exists when 2+ selected changes have delta specs for the exact same \`<capability-path>\`.
88
+
89
+ 5. **Resolve conflicts agentically**
90
+
91
+ **For each conflict**, investigate the codebase:
92
+
93
+ a. **Read the delta specs** from each conflicting change to understand what each claims to add/modify
94
+
95
+ b. **Search the codebase** for implementation evidence:
96
+ - Look for code implementing requirements from each delta spec
97
+ - Check for related files, functions, or tests
98
+
99
+ c. **Determine resolution**:
100
+ - If only one change is actually implemented -> sync that one's specs
101
+ - If both implemented -> apply in chronological order (older first, newer overwrites)
102
+ - If neither implemented -> skip spec sync, warn user
103
+
104
+ d. **Record resolution** for each conflict:
105
+ - An inclusion or exclusion decision for every delta spec, keyed by change and \`<capability-path>\`
106
+ - Which included delta specs to apply and in what order
107
+ - Which delta specs to exclude from sync because their implementation is missing
108
+ - Rationale (what was found in codebase)
109
+
110
+ 6. **Show consolidated status table**
111
+
112
+ Display a table summarizing all changes:
113
+
114
+ \`\`\`markdown
115
+ | Change | Artifacts | Tasks | Specs | Conflicts | Status |
116
+ |---------------------|-----------|-------|---------|-----------|--------|
117
+ | schema-management | Done | 5/5 | 2 delta | None | Ready |
118
+ | project-config | Done | 3/3 | 1 delta | None | Ready |
119
+ | add-oauth | Done | 4/4 | 1 delta | identity/user-auth (!) | Ready* |
120
+ | add-verify-skill | 1 left | 2/5 | None | None | Warn |
121
+ \`\`\`
122
+
123
+ For conflicts, show the resolution:
124
+ \`\`\`text
125
+ * Conflict resolution:
126
+ - identity/user-auth spec: Will apply add-oauth then add-jwt (both implemented, chronological order)
127
+ \`\`\`
128
+
129
+ For incomplete changes, show warnings:
130
+ \`\`\`text
131
+ Warnings:
132
+ - add-verify-skill: 1 incomplete artifact, 3 incomplete tasks
133
+ \`\`\`
134
+
135
+ 7. **Confirm batch operation**
136
+
137
+ Ask the user a single confirmation question:
138
+
139
+ - "Archive N changes?" with options based on status
140
+ - Options might include:
141
+ - "Archive all N changes"
142
+ - "Archive only N ready changes (skip incomplete)"
143
+ - "Cancel"
144
+
145
+ If there are incomplete changes, make clear they'll be archived with warnings.
146
+
147
+ Route on the answer by intent, not by exact label — you wrote these labels,
148
+ so match what the user picked rather than the wording above:
149
+ - "Cancel" — stop, do not archive. Report that nothing was archived and skip the remaining steps.
150
+ - The archive-everything option — proceed with every selected change
151
+ - The ready-only option proceed with only the changes the step 6 table marks \`Ready\` or \`Ready*\`, and record the rest as Skipped in step 8d. If a \`Ready*\` change's conflict partner is skipped, re-derive that conflict's resolution using only the changes being archived.
152
+ - Anything else ask again rather than archiving
153
+
154
+ Before step 8 writes the first main spec or moves any change, fetch every
155
+ required specs-rule snapshot for the confirmed batch. For each change that will
156
+ sync concrete \`artifactPaths.specs.existingOutputPaths\`, run
157
+ \`openspec instructions specs --change "<name>" --json\` exactly once with the
158
+ same selected-root flags. Obtain all snapshots before the first write or move.
159
+ If any lookup exits non-zero or returns invalid artifact-instruction JSON,
160
+ identify the affected change, report the error, and stop the whole batch before
161
+ any main-spec write or change move. Do not treat lookup failure as omitted
162
+ rules. A valid response without \`rules\` is the no-rules case.
163
+
164
+ 8. **Execute archive for each confirmed change**
165
+
166
+ Before processing, carry the recorded decisions from step 5 (after any step 7 re-derivation) into two per-delta sets:
167
+ - \`includedDeltas\`: all non-conflicting delta specs from confirmed changes plus conflict deltas selected for sync
168
+ - \`excludedDeltas\`: conflict deltas from confirmed changes excluded because their implementation is missing
169
+ - A single change can have both included and excluded delta specs. Keep the decision per delta; do not collapse it into a per-change sync flag.
170
+
171
+ Process changes in the determined order (respecting conflict resolution):
172
+
173
+ a. **Sync included delta specs**:
174
+ - Run the \`openspec-sync-specs\` workflow inline (agent-driven intelligent merge) only for changes with entries in \`includedDeltas\`, passing only the included delta paths and explicitly instructing it to ignore that change's \`excludedDeltas\`. Wait for it to finish.
175
+ - For conflicts, apply in resolved order.
176
+ - Pass that change's fetched specs-rule snapshot into inline sync; inline
177
+ sync must reuse it without fetching instructions again
178
+ - Apply artifact rules only to main specs produced by that change. They do
179
+ not change conflict resolution, archive behavior, or CLI contracts, and
180
+ their text is not copied into an output file
181
+ - Do not delegate to a background task — step 8c would move \`changeRoot\` out from under a sync that is still reading it.
182
+ - If a change has no included delta specs, do not run the sync workflow for it.
183
+
184
+ b. **Verify included delta specs before moving changeRoot**:
185
+ - Re-run the comparison only for delta specs in \`includedDeltas\` against main spec at \`<planningHome.root>/openspec/specs/<capability-path>/spec.md\` (use the store-aware \`planningHome.root\` from step 3 status JSON, not a hardcoded repo path).
186
+ - Verify that main specs are updated:
187
+ - ADDED requirements present
188
+ - MODIFIED requirements carrying scenario and description changes named in the delta, with their other scenarios intact
189
+ - REMOVED requirements gone — and where this sync retired a capability (removed its last requirement, leaving \`## Requirements\` empty), its main spec deleted rather than left empty; a spec the sync deliberately kept and reported is also a match
190
+ - RENAMED requirements present under the new name and absent under the old one
191
+ - Do not verify delta specs in \`excludedDeltas\`; they are intentionally left unsynced.
192
+ - If sync failed or any capability does not match verification, report what differs and fail/skip moving that change's \`changeRoot\` — do not archive that change. \`changeRoot\` remains intact.
193
+
194
+ c. **Perform the archive**:
195
+
196
+ Target name: use the change name as-is when it already starts with a \`YYYY-MM-DD-\` prefix; otherwise prepend the current date as \`YYYY-MM-DD-<name>\` (same rule as \`openspec archive\`).
197
+
198
+ \`\`\`bash
199
+ mkdir -p "<planningHome.changesDir>/archive"
200
+ mv "<changeRoot>" "<planningHome.changesDir>/archive/<target-name>"
201
+ \`\`\`
202
+
203
+ d. **Track outcome** for each change:
204
+ - Success: archived successfully
205
+ - Failed: error during archive or spec verification (record error)
206
+ - Skipped: user chose not to archive (if applicable)
207
+ - Sync skipped: for every delta in \`excludedDeltas\`, report \`sync skipped\` with the change, \`<capability-path>\`, and recorded reason. This is distinct from skipping the archive.
208
+
209
+ 9. **Display summary**
210
+
211
+ Show final results:
212
+
213
+ \`\`\`markdown
214
+ ## Bulk Archive Complete
215
+
216
+ Archived 3 changes:
217
+ - schema-management-cli -> archive/2026-01-19-schema-management-cli/
218
+ - project-config -> archive/2026-01-19-project-config/
219
+ - add-oauth -> archive/2026-01-19-add-oauth/
220
+
221
+ Skipped 1 change:
222
+ - add-verify-skill (user chose not to archive incomplete)
223
+
224
+ Spec sync summary:
225
+ - 4 delta specs synced to main specs
226
+ - 1 delta spec sync skipped (add-jwt, identity/user-auth: implementation not found)
227
+ - 1 conflict resolved (identity/user-auth: synced add-oauth, skipped add-jwt)
228
+ \`\`\`
229
+
230
+ If any failures:
231
+ \`\`\`text
232
+ Failed 1 change:
233
+ - some-change: Archive directory already exists
234
+ \`\`\`
235
+
236
+ **Conflict Resolution Examples**
237
+
238
+ Example 1: Only one implemented
239
+ \`\`\`text
240
+ Conflict: <planningHome.root>/openspec/specs/auth/spec.md touched by [add-oauth, add-jwt]
241
+
242
+ Checking add-oauth:
243
+ - Delta adds "OAuth Provider Integration" requirement
244
+ - Searching codebase... found src/auth/oauth.ts implementing OAuth flow
245
+
246
+ Checking add-jwt:
247
+ - Delta adds "JWT Token Handling" requirement
248
+ - Searching codebase... no JWT implementation found
249
+
250
+ Resolution: Only add-oauth is implemented. Will sync add-oauth specs only.
251
+ \`\`\`
252
+
253
+ Example 2: Both implemented
254
+ \`\`\`text
255
+ Conflict: <planningHome.root>/openspec/specs/api/spec.md touched by [add-rest-api, add-graphql]
256
+
257
+ Checking add-rest-api (created 2026-01-10):
258
+ - Delta adds "REST Endpoints" requirement
259
+ - Searching codebase... found src/api/rest.ts
260
+
261
+ Checking add-graphql (created 2026-01-15):
262
+ - Delta adds "GraphQL Schema" requirement
263
+ - Searching codebase... found src/api/graphql.ts
264
+
265
+ Resolution: Both implemented. Will apply add-rest-api specs first,
266
+ then add-graphql specs (chronological order, newer takes precedence).
267
+ \`\`\`
268
+
269
+ **Output On Success**
270
+
271
+ \`\`\`markdown
272
+ ## Bulk Archive Complete
273
+
274
+ Archived N changes:
275
+ - <change-1> -> archive/<target-name-1>/
276
+ - <change-2> -> archive/<target-name-2>/
277
+
278
+ Spec sync summary:
279
+ - N delta specs synced to main specs
280
+ - No conflicts (or: M conflicts resolved)
281
+ \`\`\`
282
+
283
+ **Output On Partial Success**
284
+
285
+ \`\`\`markdown
286
+ ## Bulk Archive Complete (partial)
287
+
288
+ Archived N changes:
289
+ - <change-1> -> archive/<target-name-1>/
290
+
291
+ Skipped M changes:
292
+ - <change-2> (user chose not to archive incomplete)
293
+
294
+ Failed K changes:
295
+ - <change-3>: Archive directory already exists
296
+ \`\`\`
297
+
298
+ **Output When No Changes**
299
+
300
+ \`\`\`markdown
301
+ ## No Changes to Archive
302
+
303
+ No active changes found. Create a new change to get started.
304
+ \`\`\`
305
+
306
+ **Guardrails**
307
+ - Allow any number of changes (1+ is fine, 2+ is the typical use case)
308
+ - Always prompt for selection, never auto-select
309
+ - Detect spec conflicts early and resolve by checking codebase
310
+ - When both changes are implemented, apply specs in chronological order
311
+ - Skip spec sync only when implementation is missing (warn user)
312
+ - Show clear per-change status before confirming
313
+ - Use single confirmation for entire batch
314
+ - Never archive after the user cancels the confirmation — a cancelled batch archives nothing
315
+ - Track and report all outcomes (success/skip/fail)
316
+ - Preserve .openspec.yaml when moving to archive
317
+ - Archive directory target uses current date: YYYY-MM-DD-<name>; a name that already starts with a \`YYYY-MM-DD-\` prefix is used as-is (never stack a second date)
318
+ - If archive target exists, fail that change but continue with others
319
+ - If sync is requested, run the \`openspec-sync-specs\` workflow inline (agent-driven) for each change with included delta specs
320
+ - Carry the per-delta \`includedDeltas\` and \`excludedDeltas\` decisions into execution; sync and verify only included deltas
321
+ - Report every excluded delta as \`sync skipped\` without treating the archive itself as skipped
322
+ - Never archive a change while a spec sync is still in flight — run the sync inline and verify main specs at \`<planningHome.root>/openspec/specs/<capability-path>/spec.md\` before moving \`changeRoot\`
323
+ - Fetch archive inputs once per selected root before spec inspection or moves
324
+ - Fetch all required specs-rule snapshots before the batch's first main-spec write or move
325
+ - A failed archive-inputs lookup never blocks the batch; it proceeds with no context or guidance
326
+ - A failed specs instruction lookup stops the whole batch atomically
327
+ - Changes without concrete \`artifactPaths.specs.existingOutputPaths\` continue without spec sync
328
+ - Apply relevant runtime context across the batch and report conflicts
329
+ - Operation guidance remains advisory; consider every entry and explain rejected advice
330
+ - Keep runtime inputs, conflict analysis, CLI-derived values, and artifact rules separate
331
+ - Artifact rules constrain only written specs
332
+ - Never copy runtime input or artifact-rule text verbatim into output files`,
244
333
  license: 'MIT',
245
334
  compatibility: 'Requires openspec CLI.',
246
335
  metadata: { author: 'openspec', version: '1.0' },
@@ -252,243 +341,334 @@ export function getOpsxBulkArchiveCommandTemplate() {
252
341
  description: 'Archive multiple completed changes at once',
253
342
  category: 'Workflow',
254
343
  tags: ['workflow', 'archive', 'experimental', 'bulk'],
255
- content: `Archive multiple completed changes in a single operation.
256
-
257
- This skill allows you to batch-archive changes, handling spec conflicts intelligently by checking the codebase to determine what's actually implemented.
258
-
259
- ${STORE_SELECTION_GUIDANCE}
260
-
261
- **Input**: None required (prompts for selection)
262
-
263
- **Steps**
264
-
265
- 1. **Get active changes**
266
-
267
- Run \`openspec list --json\` to get all active changes.
268
-
269
- If no active changes exist, inform user and stop.
270
-
271
- 2. **Prompt for change selection**
272
-
273
- ${PROMPT_MULTI_SELECT_CHANGES}
274
- - Show each change with its schema
275
- - Include an option for "All changes"
276
- - Allow any number of selections (1+ works, 2+ is the typical use case)
277
-
278
- **IMPORTANT**: Do NOT auto-select. Always let the user choose.
279
-
280
- 3. **Batch validation - gather status for all selected changes**
281
-
282
- For each selected change, collect:
283
-
284
- a. **Artifact status** - Run \`openspec status --change "<name>" --json\`
285
- - Parse \`schemaName\`, \`artifacts\`, \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`
286
- - Note which artifacts are \`done\` vs other states
287
-
288
- b. **Task completion** - Read \`artifactPaths.tasks.existingOutputPaths\` from status JSON
289
- - Count \`- [ ]\` (incomplete) vs \`- [x]\` (complete)
290
- - If no tasks file exists, note as "No tasks"
291
-
292
- c. **Delta specs** - Check \`artifactPaths.specs.existingOutputPaths\` from status JSON
293
- - List which capability specs exist
294
- - For each, extract requirement names (lines matching \`### Requirement: <name>\`)
295
-
296
- 4. **Detect spec conflicts**
297
-
298
- Build a map of \`capability -> [changes that touch it]\`:
299
-
300
- \`\`\`
301
- auth -> [change-a, change-b] <- CONFLICT (2+ changes)
302
- api -> [change-c] <- OK (only 1 change)
303
- \`\`\`
304
-
305
- A conflict exists when 2+ selected changes have delta specs for the same capability.
306
-
307
- 5. **Resolve conflicts agentically**
308
-
309
- **For each conflict**, investigate the codebase:
310
-
311
- a. **Read the delta specs** from each conflicting change to understand what each claims to add/modify
312
-
313
- b. **Search the codebase** for implementation evidence:
314
- - Look for code implementing requirements from each delta spec
315
- - Check for related files, functions, or tests
316
-
317
- c. **Determine resolution**:
318
- - If only one change is actually implemented -> sync that one's specs
319
- - If both implemented -> apply in chronological order (older first, newer overwrites)
320
- - If neither implemented -> skip spec sync, warn user
321
-
322
- d. **Record resolution** for each conflict:
323
- - Which change's specs to apply
324
- - In what order (if both)
325
- - Rationale (what was found in codebase)
326
-
327
- 6. **Show consolidated status table**
328
-
329
- Display a table summarizing all changes:
330
-
331
- \`\`\`
332
- | Change | Artifacts | Tasks | Specs | Conflicts | Status |
333
- |---------------------|-----------|-------|---------|-----------|--------|
334
- | schema-management | Done | 5/5 | 2 delta | None | Ready |
335
- | project-config | Done | 3/3 | 1 delta | None | Ready |
336
- | add-oauth | Done | 4/4 | 1 delta | auth (!) | Ready* |
337
- | add-verify-skill | 1 left | 2/5 | None | None | Warn |
338
- \`\`\`
339
-
340
- For conflicts, show the resolution:
341
- \`\`\`
342
- * Conflict resolution:
343
- - auth spec: Will apply add-oauth then add-jwt (both implemented, chronological order)
344
- \`\`\`
345
-
346
- For incomplete changes, show warnings:
347
- \`\`\`
348
- Warnings:
349
- - add-verify-skill: 1 incomplete artifact, 3 incomplete tasks
350
- \`\`\`
351
-
352
- 7. **Confirm batch operation**
353
-
354
- ${PROMPT_CONFIRM}
355
-
356
- - "Archive N changes?" with options based on status
357
- - Options might include:
358
- - "Archive all N changes"
359
- - "Archive only N ready changes (skip incomplete)"
360
- - "Cancel"
361
-
362
- If there are incomplete changes, make clear they'll be archived with warnings.
363
-
364
- 8. **Execute archive for each confirmed change**
365
-
366
- Process changes in the determined order (respecting conflict resolution):
367
-
368
- a. **Sync specs** if delta specs exist:
369
- - Use the openspec-sync-specs approach (agent-driven intelligent merge)
370
- - For conflicts, apply in resolved order
371
- - Track if sync was done
372
-
373
- b. **Perform the archive**:
374
- \`\`\`bash
375
- mkdir -p "<planningHome.changesDir>/archive"
376
- mv "<changeRoot>" "<planningHome.changesDir>/archive/YYYY-MM-DD-<name>"
377
- \`\`\`
378
-
379
- c. **Track outcome** for each change:
380
- - Success: archived successfully
381
- - Failed: error during archive (record error)
382
- - Skipped: user chose not to archive (if applicable)
383
-
384
- 9. **Display summary**
385
-
386
- Show final results:
387
-
388
- \`\`\`
389
- ## Bulk Archive Complete
390
-
391
- Archived 3 changes:
392
- - schema-management-cli -> archive/2026-01-19-schema-management-cli/
393
- - project-config -> archive/2026-01-19-project-config/
394
- - add-oauth -> archive/2026-01-19-add-oauth/
395
-
396
- Skipped 1 change:
397
- - add-verify-skill (user chose not to archive incomplete)
398
-
399
- Spec sync summary:
400
- - 4 delta specs synced to main specs
401
- - 1 conflict resolved (auth: applied both in chronological order)
402
- \`\`\`
403
-
404
- If any failures:
405
- \`\`\`
406
- Failed 1 change:
407
- - some-change: Archive directory already exists
408
- \`\`\`
409
-
410
- **Conflict Resolution Examples**
411
-
412
- Example 1: Only one implemented
413
- \`\`\`
414
- Conflict: specs/auth/spec.md touched by [add-oauth, add-jwt]
415
-
416
- Checking add-oauth:
417
- - Delta adds "OAuth Provider Integration" requirement
418
- - Searching codebase... found src/auth/oauth.ts implementing OAuth flow
419
-
420
- Checking add-jwt:
421
- - Delta adds "JWT Token Handling" requirement
422
- - Searching codebase... no JWT implementation found
423
-
424
- Resolution: Only add-oauth is implemented. Will sync add-oauth specs only.
425
- \`\`\`
426
-
427
- Example 2: Both implemented
428
- \`\`\`
429
- Conflict: specs/api/spec.md touched by [add-rest-api, add-graphql]
430
-
431
- Checking add-rest-api (created 2026-01-10):
432
- - Delta adds "REST Endpoints" requirement
433
- - Searching codebase... found src/api/rest.ts
434
-
435
- Checking add-graphql (created 2026-01-15):
436
- - Delta adds "GraphQL Schema" requirement
437
- - Searching codebase... found src/api/graphql.ts
438
-
439
- Resolution: Both implemented. Will apply add-rest-api specs first,
440
- then add-graphql specs (chronological order, newer takes precedence).
441
- \`\`\`
442
-
443
- **Output On Success**
444
-
445
- \`\`\`
446
- ## Bulk Archive Complete
447
-
448
- Archived N changes:
449
- - <change-1> -> archive/YYYY-MM-DD-<change-1>/
450
- - <change-2> -> archive/YYYY-MM-DD-<change-2>/
451
-
452
- Spec sync summary:
453
- - N delta specs synced to main specs
454
- - No conflicts (or: M conflicts resolved)
455
- \`\`\`
456
-
457
- **Output On Partial Success**
458
-
459
- \`\`\`
460
- ## Bulk Archive Complete (partial)
461
-
462
- Archived N changes:
463
- - <change-1> -> archive/YYYY-MM-DD-<change-1>/
464
-
465
- Skipped M changes:
466
- - <change-2> (user chose not to archive incomplete)
467
-
468
- Failed K changes:
469
- - <change-3>: Archive directory already exists
470
- \`\`\`
471
-
472
- **Output When No Changes**
473
-
474
- \`\`\`
475
- ## No Changes to Archive
476
-
477
- No active changes found. Create a new change to get started.
478
- \`\`\`
479
-
480
- **Guardrails**
481
- - Allow any number of changes (1+ is fine, 2+ is the typical use case)
482
- - Always prompt for selection, never auto-select
483
- - Detect spec conflicts early and resolve by checking codebase
484
- - When both changes are implemented, apply specs in chronological order
485
- - Skip spec sync only when implementation is missing (warn user)
486
- - Show clear per-change status before confirming
487
- - Use single confirmation for entire batch
488
- - Track and report all outcomes (success/skip/fail)
489
- - Preserve .openspec.yaml when moving to archive
490
- - Archive directory target uses current date: YYYY-MM-DD-<name>
491
- - If archive target exists, fail that change but continue with others`
344
+ content: `Archive multiple completed changes in a single operation.
345
+
346
+ This skill allows you to batch-archive changes, handling spec conflicts intelligently by checking the codebase to determine what's actually implemented.
347
+
348
+ ${STORE_SELECTION_GUIDANCE}
349
+
350
+ \`<capability-path>\` is the spec directory relative to \`specs/\` (for example, \`user-auth\` or \`identity/user-auth\`). Preserve the full path from each delta spec when resolving its main spec.
351
+
352
+ **Input**: None required (prompts for selection)
353
+
354
+ **Steps**
355
+
356
+ 1. **Get active changes**
357
+
358
+ Run \`openspec list --json\` to get all active changes.
359
+
360
+ If no active changes exist, inform user and stop.
361
+
362
+ 2. **Prompt for change selection**
363
+
364
+ Ask the user to choose changes (multi-select):
365
+ - Show each change with its schema
366
+ - Include an option for "All changes"
367
+ - Allow any number of selections (1+ works, 2+ is the typical use case)
368
+
369
+ **IMPORTANT**: Do NOT auto-select. Always let the user choose.
370
+
371
+ **Load current archive inputs once for the selected root before batch validation:**
372
+
373
+ Choose one selected change from this root and run
374
+ \`openspec instructions archive --change "<selected-change>" --json\` with the
375
+ same selected-root flags. This lookup is advisory and optional: it only supplies
376
+ extra prompt inputs, so it must never block the batch. If it fails or returns
377
+ invalid JSON for example on an older CLI that does not support this command
378
+ yet continue the batch with no context and no operation guidance. Do not
379
+ report an error and do not stop.
380
+
381
+ A valid response may omit \`context\` and \`operationGuidance\`. Treat
382
+ \`context\` as a required prompt-level input across the batch: read and consider
383
+ it, and apply relevant project facts, conventions, and constraints. Treat
384
+ \`operationGuidance\` as optional additive advice: read and consider every
385
+ entry, and follow entries that are applicable and compatible with the built-in
386
+ batch workflow.
387
+
388
+ Keep both fields separate from conflict analysis, explicit user choices,
389
+ resolved paths, CLI checks, and command contracts. If context conflicts with one
390
+ of those controlling inputs, report the conflict and preserve the controlling
391
+ value. If guidance is inapplicable or conflicts with a controlling input, do not
392
+ follow it and explain why. Do not infer skipped prompts, replacement paths, or
393
+ flags from either field, and do not copy their text verbatim into specs, changes,
394
+ or summaries. These are prompt-level behavior contracts, not enforceable checks.
395
+
396
+ 3. **Batch validation - gather status for all selected changes**
397
+
398
+ For each selected change, collect:
399
+
400
+ a. **Artifact status** - Run \`openspec status --change "<name>" --json\`
401
+ - Parse \`schemaName\`, \`artifacts\`, \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`
402
+ - Note which artifacts are \`done\` vs other states
403
+
404
+ b. **Task completion** - Read \`artifactPaths.tasks.existingOutputPaths\` from status JSON
405
+ - Count \`- [ ]\` (incomplete) vs \`- [x]\` (complete)
406
+ - If no tasks file exists, note as "No tasks"
407
+
408
+ c. **Delta specs** - Check \`artifactPaths.specs.existingOutputPaths\` from status JSON
409
+ - List which capability specs exist
410
+ - For each, extract requirement names (lines matching \`### Requirement: <name>\`)
411
+ - Treat this list as the only delta-spec source. If the \`specs\` entry is
412
+ missing or the list is empty, perform no spec sync or specs-instruction
413
+ lookup for that change; do not infer deltas from unrelated artifacts.
414
+ - Evaluate this independently for every change, including mixed-schema
415
+ batches where some schemas have no \`specs\` artifact.
416
+
417
+ 4. **Detect spec conflicts**
418
+
419
+ Build a map keyed by \`<capability-path>\`, the exact path relative to \`specs/\`:
420
+
421
+ \`\`\`text
422
+ identity/user-auth -> [change-a, change-b] <- CONFLICT (2+ changes)
423
+ billing/user-auth -> [change-c] <- OK (different full path)
424
+ \`\`\`
425
+
426
+ A conflict exists when 2+ selected changes have delta specs for the exact same \`<capability-path>\`.
427
+
428
+ 5. **Resolve conflicts agentically**
429
+
430
+ **For each conflict**, investigate the codebase:
431
+
432
+ a. **Read the delta specs** from each conflicting change to understand what each claims to add/modify
433
+
434
+ b. **Search the codebase** for implementation evidence:
435
+ - Look for code implementing requirements from each delta spec
436
+ - Check for related files, functions, or tests
437
+
438
+ c. **Determine resolution**:
439
+ - If only one change is actually implemented -> sync that one's specs
440
+ - If both implemented -> apply in chronological order (older first, newer overwrites)
441
+ - If neither implemented -> skip spec sync, warn user
442
+
443
+ d. **Record resolution** for each conflict:
444
+ - An inclusion or exclusion decision for every delta spec, keyed by change and \`<capability-path>\`
445
+ - Which included delta specs to apply and in what order
446
+ - Which delta specs to exclude from sync because their implementation is missing
447
+ - Rationale (what was found in codebase)
448
+
449
+ 6. **Show consolidated status table**
450
+
451
+ Display a table summarizing all changes:
452
+
453
+ \`\`\`markdown
454
+ | Change | Artifacts | Tasks | Specs | Conflicts | Status |
455
+ |---------------------|-----------|-------|---------|-----------|--------|
456
+ | schema-management | Done | 5/5 | 2 delta | None | Ready |
457
+ | project-config | Done | 3/3 | 1 delta | None | Ready |
458
+ | add-oauth | Done | 4/4 | 1 delta | identity/user-auth (!) | Ready* |
459
+ | add-verify-skill | 1 left | 2/5 | None | None | Warn |
460
+ \`\`\`
461
+
462
+ For conflicts, show the resolution:
463
+ \`\`\`text
464
+ * Conflict resolution:
465
+ - identity/user-auth spec: Will apply add-oauth then add-jwt (both implemented, chronological order)
466
+ \`\`\`
467
+
468
+ For incomplete changes, show warnings:
469
+ \`\`\`text
470
+ Warnings:
471
+ - add-verify-skill: 1 incomplete artifact, 3 incomplete tasks
472
+ \`\`\`
473
+
474
+ 7. **Confirm batch operation**
475
+
476
+ Ask the user a single confirmation question:
477
+
478
+ - "Archive N changes?" with options based on status
479
+ - Options might include:
480
+ - "Archive all N changes"
481
+ - "Archive only N ready changes (skip incomplete)"
482
+ - "Cancel"
483
+
484
+ If there are incomplete changes, make clear they'll be archived with warnings.
485
+
486
+ Route on the answer by intent, not by exact label — you wrote these labels,
487
+ so match what the user picked rather than the wording above:
488
+ - "Cancel" — stop, do not archive. Report that nothing was archived and skip the remaining steps.
489
+ - The archive-everything option proceed with every selected change
490
+ - The ready-only option proceed with only the changes the step 6 table marks \`Ready\` or \`Ready*\`, and record the rest as Skipped in step 8d. If a \`Ready*\` change's conflict partner is skipped, re-derive that conflict's resolution using only the changes being archived.
491
+ - Anything else — ask again rather than archiving
492
+
493
+ Before step 8 writes the first main spec or moves any change, fetch every
494
+ required specs-rule snapshot for the confirmed batch. For each change that will
495
+ sync concrete \`artifactPaths.specs.existingOutputPaths\`, run
496
+ \`openspec instructions specs --change "<name>" --json\` exactly once with the
497
+ same selected-root flags. Obtain all snapshots before the first write or move.
498
+ If any lookup exits non-zero or returns invalid artifact-instruction JSON,
499
+ identify the affected change, report the error, and stop the whole batch before
500
+ any main-spec write or change move. Do not treat lookup failure as omitted
501
+ rules. A valid response without \`rules\` is the no-rules case.
502
+
503
+ 8. **Execute archive for each confirmed change**
504
+
505
+ Before processing, carry the recorded decisions from step 5 (after any step 7 re-derivation) into two per-delta sets:
506
+ - \`includedDeltas\`: all non-conflicting delta specs from confirmed changes plus conflict deltas selected for sync
507
+ - \`excludedDeltas\`: conflict deltas from confirmed changes excluded because their implementation is missing
508
+ - A single change can have both included and excluded delta specs. Keep the decision per delta; do not collapse it into a per-change sync flag.
509
+
510
+ Process changes in the determined order (respecting conflict resolution):
511
+
512
+ a. **Sync included delta specs**:
513
+ - Run the \`/opsx:sync\` workflow inline (agent-driven intelligent merge) only for changes with entries in \`includedDeltas\`, passing only the included delta paths and explicitly instructing it to ignore that change's \`excludedDeltas\`. Wait for it to finish.
514
+ - For conflicts, apply in resolved order.
515
+ - Pass that change's fetched specs-rule snapshot into inline sync; inline
516
+ sync must reuse it without fetching instructions again
517
+ - Apply artifact rules only to main specs produced by that change. They do
518
+ not change conflict resolution, archive behavior, or CLI contracts, and
519
+ their text is not copied into an output file
520
+ - Do not delegate to a background task — step 8c would move \`changeRoot\` out from under a sync that is still reading it.
521
+ - If a change has no included delta specs, do not run the sync workflow for it.
522
+
523
+ b. **Verify included delta specs before moving changeRoot**:
524
+ - Re-run the comparison only for delta specs in \`includedDeltas\` against main spec at \`<planningHome.root>/openspec/specs/<capability-path>/spec.md\` (use the store-aware \`planningHome.root\` from step 3 status JSON, not a hardcoded repo path).
525
+ - Verify that main specs are updated:
526
+ - ADDED requirements present
527
+ - MODIFIED requirements carrying scenario and description changes named in the delta, with their other scenarios intact
528
+ - REMOVED requirements gone and where this sync retired a capability (removed its last requirement, leaving \`## Requirements\` empty), its main spec deleted rather than left empty; a spec the sync deliberately kept and reported is also a match
529
+ - RENAMED requirements present under the new name and absent under the old one
530
+ - Do not verify delta specs in \`excludedDeltas\`; they are intentionally left unsynced.
531
+ - If sync failed or any capability does not match verification, report what differs and fail/skip moving that change's \`changeRoot\` — do not archive that change. \`changeRoot\` remains intact.
532
+
533
+ c. **Perform the archive**:
534
+
535
+ Target name: use the change name as-is when it already starts with a \`YYYY-MM-DD-\` prefix; otherwise prepend the current date as \`YYYY-MM-DD-<name>\` (same rule as \`openspec archive\`).
536
+
537
+ \`\`\`bash
538
+ mkdir -p "<planningHome.changesDir>/archive"
539
+ mv "<changeRoot>" "<planningHome.changesDir>/archive/<target-name>"
540
+ \`\`\`
541
+
542
+ d. **Track outcome** for each change:
543
+ - Success: archived successfully
544
+ - Failed: error during archive or spec verification (record error)
545
+ - Skipped: user chose not to archive (if applicable)
546
+ - Sync skipped: for every delta in \`excludedDeltas\`, report \`sync skipped\` with the change, \`<capability-path>\`, and recorded reason. This is distinct from skipping the archive.
547
+
548
+ 9. **Display summary**
549
+
550
+ Show final results:
551
+
552
+ \`\`\`markdown
553
+ ## Bulk Archive Complete
554
+
555
+ Archived 3 changes:
556
+ - schema-management-cli -> archive/2026-01-19-schema-management-cli/
557
+ - project-config -> archive/2026-01-19-project-config/
558
+ - add-oauth -> archive/2026-01-19-add-oauth/
559
+
560
+ Skipped 1 change:
561
+ - add-verify-skill (user chose not to archive incomplete)
562
+
563
+ Spec sync summary:
564
+ - 4 delta specs synced to main specs
565
+ - 1 delta spec sync skipped (add-jwt, identity/user-auth: implementation not found)
566
+ - 1 conflict resolved (identity/user-auth: synced add-oauth, skipped add-jwt)
567
+ \`\`\`
568
+
569
+ If any failures:
570
+ \`\`\`text
571
+ Failed 1 change:
572
+ - some-change: Archive directory already exists
573
+ \`\`\`
574
+
575
+ **Conflict Resolution Examples**
576
+
577
+ Example 1: Only one implemented
578
+ \`\`\`text
579
+ Conflict: <planningHome.root>/openspec/specs/auth/spec.md touched by [add-oauth, add-jwt]
580
+
581
+ Checking add-oauth:
582
+ - Delta adds "OAuth Provider Integration" requirement
583
+ - Searching codebase... found src/auth/oauth.ts implementing OAuth flow
584
+
585
+ Checking add-jwt:
586
+ - Delta adds "JWT Token Handling" requirement
587
+ - Searching codebase... no JWT implementation found
588
+
589
+ Resolution: Only add-oauth is implemented. Will sync add-oauth specs only.
590
+ \`\`\`
591
+
592
+ Example 2: Both implemented
593
+ \`\`\`text
594
+ Conflict: <planningHome.root>/openspec/specs/api/spec.md touched by [add-rest-api, add-graphql]
595
+
596
+ Checking add-rest-api (created 2026-01-10):
597
+ - Delta adds "REST Endpoints" requirement
598
+ - Searching codebase... found src/api/rest.ts
599
+
600
+ Checking add-graphql (created 2026-01-15):
601
+ - Delta adds "GraphQL Schema" requirement
602
+ - Searching codebase... found src/api/graphql.ts
603
+
604
+ Resolution: Both implemented. Will apply add-rest-api specs first,
605
+ then add-graphql specs (chronological order, newer takes precedence).
606
+ \`\`\`
607
+
608
+ **Output On Success**
609
+
610
+ \`\`\`markdown
611
+ ## Bulk Archive Complete
612
+
613
+ Archived N changes:
614
+ - <change-1> -> archive/<target-name-1>/
615
+ - <change-2> -> archive/<target-name-2>/
616
+
617
+ Spec sync summary:
618
+ - N delta specs synced to main specs
619
+ - No conflicts (or: M conflicts resolved)
620
+ \`\`\`
621
+
622
+ **Output On Partial Success**
623
+
624
+ \`\`\`markdown
625
+ ## Bulk Archive Complete (partial)
626
+
627
+ Archived N changes:
628
+ - <change-1> -> archive/<target-name-1>/
629
+
630
+ Skipped M changes:
631
+ - <change-2> (user chose not to archive incomplete)
632
+
633
+ Failed K changes:
634
+ - <change-3>: Archive directory already exists
635
+ \`\`\`
636
+
637
+ **Output When No Changes**
638
+
639
+ \`\`\`markdown
640
+ ## No Changes to Archive
641
+
642
+ No active changes found. Create a new change to get started.
643
+ \`\`\`
644
+
645
+ **Guardrails**
646
+ - Allow any number of changes (1+ is fine, 2+ is the typical use case)
647
+ - Always prompt for selection, never auto-select
648
+ - Detect spec conflicts early and resolve by checking codebase
649
+ - When both changes are implemented, apply specs in chronological order
650
+ - Skip spec sync only when implementation is missing (warn user)
651
+ - Show clear per-change status before confirming
652
+ - Use single confirmation for entire batch
653
+ - Never archive after the user cancels the confirmation — a cancelled batch archives nothing
654
+ - Track and report all outcomes (success/skip/fail)
655
+ - Preserve .openspec.yaml when moving to archive
656
+ - Archive directory target uses current date: YYYY-MM-DD-<name>; a name that already starts with a \`YYYY-MM-DD-\` prefix is used as-is (never stack a second date)
657
+ - If archive target exists, fail that change but continue with others
658
+ - If sync is requested, run the \`/opsx:sync\` workflow inline (agent-driven) for each change with included delta specs
659
+ - Carry the per-delta \`includedDeltas\` and \`excludedDeltas\` decisions into execution; sync and verify only included deltas
660
+ - Report every excluded delta as \`sync skipped\` without treating the archive itself as skipped
661
+ - Never archive a change while a spec sync is still in flight — run the sync inline and verify main specs at \`<planningHome.root>/openspec/specs/<capability-path>/spec.md\` before moving \`changeRoot\`
662
+ - Fetch archive inputs once per selected root before spec inspection or moves
663
+ - Fetch all required specs-rule snapshots before the batch's first main-spec write or move
664
+ - A failed archive-inputs lookup never blocks the batch; it proceeds with no context or guidance
665
+ - A failed specs instruction lookup stops the whole batch atomically
666
+ - Changes without concrete \`artifactPaths.specs.existingOutputPaths\` continue without spec sync
667
+ - Apply relevant runtime context across the batch and report conflicts
668
+ - Operation guidance remains advisory; consider every entry and explain rejected advice
669
+ - Keep runtime inputs, conflict analysis, CLI-derived values, and artifact rules separate
670
+ - Artifact rules constrain only written specs
671
+ - Never copy runtime input or artifact-rule text verbatim into output files`
492
672
  };
493
673
  }
494
674
  //# sourceMappingURL=bulk-archive-change.js.map