openspecui 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/.gitmodules +3 -0
  2. package/CHAT.md +3 -0
  3. package/package.json +12 -0
  4. package/references/openspec/.changeset/README.md +6 -0
  5. package/references/openspec/.changeset/config.json +12 -0
  6. package/references/openspec/.coderabbit.yaml +11 -0
  7. package/references/openspec/.devcontainer/README.md +92 -0
  8. package/references/openspec/.devcontainer/devcontainer.json +68 -0
  9. package/references/openspec/.github/CODEOWNERS +2 -0
  10. package/references/openspec/.github/workflows/ci.yml +222 -0
  11. package/references/openspec/.github/workflows/release-prepare.yml +50 -0
  12. package/references/openspec/AGENTS.md +18 -0
  13. package/references/openspec/CHANGELOG.md +205 -0
  14. package/references/openspec/LICENSE +22 -0
  15. package/references/openspec/README.md +374 -0
  16. package/references/openspec/assets/openspec_dashboard.png +0 -0
  17. package/references/openspec/assets/openspec_pixel_dark.svg +89 -0
  18. package/references/openspec/assets/openspec_pixel_light.svg +89 -0
  19. package/references/openspec/bin/openspec.js +3 -0
  20. package/references/openspec/build.js +31 -0
  21. package/references/openspec/openspec/AGENTS.md +454 -0
  22. package/references/openspec/openspec/changes/IMPLEMENTATION_ORDER.md +68 -0
  23. package/references/openspec/openspec/changes/add-antigravity-support/proposal.md +11 -0
  24. package/references/openspec/openspec/changes/add-antigravity-support/specs/cli-init/spec.md +9 -0
  25. package/references/openspec/openspec/changes/add-antigravity-support/specs/cli-update/spec.md +8 -0
  26. package/references/openspec/openspec/changes/add-antigravity-support/tasks.md +12 -0
  27. package/references/openspec/openspec/changes/add-scaffold-command/proposal.md +11 -0
  28. package/references/openspec/openspec/changes/add-scaffold-command/specs/cli-scaffold/spec.md +36 -0
  29. package/references/openspec/openspec/changes/add-scaffold-command/tasks.md +12 -0
  30. package/references/openspec/openspec/changes/archive/2025-01-11-add-update-command/design.md +86 -0
  31. package/references/openspec/openspec/changes/archive/2025-01-11-add-update-command/proposal.md +29 -0
  32. package/references/openspec/openspec/changes/archive/2025-01-11-add-update-command/specs/cli-update/spec.md +59 -0
  33. package/references/openspec/openspec/changes/archive/2025-01-11-add-update-command/tasks.md +20 -0
  34. package/references/openspec/openspec/changes/archive/2025-01-13-add-list-command/proposal.md +20 -0
  35. package/references/openspec/openspec/changes/archive/2025-01-13-add-list-command/specs/cli-list/spec.md +69 -0
  36. package/references/openspec/openspec/changes/archive/2025-01-13-add-list-command/tasks.md +26 -0
  37. package/references/openspec/openspec/changes/archive/2025-08-05-initialize-typescript-project/design.md +64 -0
  38. package/references/openspec/openspec/changes/archive/2025-08-05-initialize-typescript-project/proposal.md +18 -0
  39. package/references/openspec/openspec/changes/archive/2025-08-05-initialize-typescript-project/tasks.md +25 -0
  40. package/references/openspec/openspec/changes/archive/2025-08-06-add-init-command/design.md +104 -0
  41. package/references/openspec/openspec/changes/archive/2025-08-06-add-init-command/proposal.md +30 -0
  42. package/references/openspec/openspec/changes/archive/2025-08-06-add-init-command/specs/cli-init/spec.md +148 -0
  43. package/references/openspec/openspec/changes/archive/2025-08-06-add-init-command/tasks.md +38 -0
  44. package/references/openspec/openspec/changes/archive/2025-08-06-adopt-future-state-storage/proposal.md +24 -0
  45. package/references/openspec/openspec/changes/archive/2025-08-06-adopt-future-state-storage/specs/openspec-conventions/spec.md +120 -0
  46. package/references/openspec/openspec/changes/archive/2025-08-06-adopt-future-state-storage/tasks.md +38 -0
  47. package/references/openspec/openspec/changes/archive/2025-08-11-add-complexity-guidelines/proposal.md +13 -0
  48. package/references/openspec/openspec/changes/archive/2025-08-11-add-complexity-guidelines/specs/openspec-docs/README.md +472 -0
  49. package/references/openspec/openspec/changes/archive/2025-08-11-add-complexity-guidelines/tasks.md +9 -0
  50. package/references/openspec/openspec/changes/archive/2025-08-13-add-archive-command/proposal.md +15 -0
  51. package/references/openspec/openspec/changes/archive/2025-08-13-add-archive-command/specs/cli-archive/spec.md +111 -0
  52. package/references/openspec/openspec/changes/archive/2025-08-13-add-archive-command/tasks.md +44 -0
  53. package/references/openspec/openspec/changes/archive/2025-08-13-add-diff-command/proposal.md +19 -0
  54. package/references/openspec/openspec/changes/archive/2025-08-13-add-diff-command/specs/cli-diff/spec.md +77 -0
  55. package/references/openspec/openspec/changes/archive/2025-08-13-add-diff-command/tasks.md +23 -0
  56. package/references/openspec/openspec/changes/archive/2025-08-19-add-change-commands/design.md +56 -0
  57. package/references/openspec/openspec/changes/archive/2025-08-19-add-change-commands/proposal.md +17 -0
  58. package/references/openspec/openspec/changes/archive/2025-08-19-add-change-commands/specs/cli-change/spec.md +48 -0
  59. package/references/openspec/openspec/changes/archive/2025-08-19-add-change-commands/specs/cli-list/spec.md +12 -0
  60. package/references/openspec/openspec/changes/archive/2025-08-19-add-change-commands/tasks.md +34 -0
  61. package/references/openspec/openspec/changes/archive/2025-08-19-add-interactive-show-command/proposal.md +20 -0
  62. package/references/openspec/openspec/changes/archive/2025-08-19-add-interactive-show-command/specs/cli-change/spec.md +23 -0
  63. package/references/openspec/openspec/changes/archive/2025-08-19-add-interactive-show-command/specs/cli-show/spec.md +83 -0
  64. package/references/openspec/openspec/changes/archive/2025-08-19-add-interactive-show-command/specs/cli-spec/spec.md +23 -0
  65. package/references/openspec/openspec/changes/archive/2025-08-19-add-interactive-show-command/tasks.md +142 -0
  66. package/references/openspec/openspec/changes/archive/2025-08-19-add-skip-specs-archive-option/proposal.md +13 -0
  67. package/references/openspec/openspec/changes/archive/2025-08-19-add-skip-specs-archive-option/specs/cli-archive/spec.md +191 -0
  68. package/references/openspec/openspec/changes/archive/2025-08-19-add-skip-specs-archive-option/tasks.md +57 -0
  69. package/references/openspec/openspec/changes/archive/2025-08-19-add-spec-commands/design.md +45 -0
  70. package/references/openspec/openspec/changes/archive/2025-08-19-add-spec-commands/proposal.md +19 -0
  71. package/references/openspec/openspec/changes/archive/2025-08-19-add-spec-commands/specs/cli-spec/spec.md +43 -0
  72. package/references/openspec/openspec/changes/archive/2025-08-19-add-spec-commands/tasks.md +22 -0
  73. package/references/openspec/openspec/changes/archive/2025-08-19-add-zod-validation/design.md +104 -0
  74. package/references/openspec/openspec/changes/archive/2025-08-19-add-zod-validation/proposal.md +22 -0
  75. package/references/openspec/openspec/changes/archive/2025-08-19-add-zod-validation/specs/cli-archive/spec.md +18 -0
  76. package/references/openspec/openspec/changes/archive/2025-08-19-add-zod-validation/specs/cli-diff/spec.md +12 -0
  77. package/references/openspec/openspec/changes/archive/2025-08-19-add-zod-validation/tasks.md +59 -0
  78. package/references/openspec/openspec/changes/archive/2025-08-19-adopt-delta-based-changes/proposal.md +93 -0
  79. package/references/openspec/openspec/changes/archive/2025-08-19-adopt-delta-based-changes/specs/cli-archive/spec.md +48 -0
  80. package/references/openspec/openspec/changes/archive/2025-08-19-adopt-delta-based-changes/specs/cli-diff/spec.md +45 -0
  81. package/references/openspec/openspec/changes/archive/2025-08-19-adopt-delta-based-changes/specs/openspec-conventions/spec.md +101 -0
  82. package/references/openspec/openspec/changes/archive/2025-08-19-adopt-delta-based-changes/tasks.md +55 -0
  83. package/references/openspec/openspec/changes/archive/2025-08-19-adopt-verb-noun-cli-structure/design.md +19 -0
  84. package/references/openspec/openspec/changes/archive/2025-08-19-adopt-verb-noun-cli-structure/proposal.md +67 -0
  85. package/references/openspec/openspec/changes/archive/2025-08-19-adopt-verb-noun-cli-structure/specs/cli-list/spec.md +57 -0
  86. package/references/openspec/openspec/changes/archive/2025-08-19-adopt-verb-noun-cli-structure/specs/openspec-conventions/spec.md +23 -0
  87. package/references/openspec/openspec/changes/archive/2025-08-19-adopt-verb-noun-cli-structure/tasks.md +27 -0
  88. package/references/openspec/openspec/changes/archive/2025-08-19-bulk-validation-interactive-selection/proposal.md +20 -0
  89. package/references/openspec/openspec/changes/archive/2025-08-19-bulk-validation-interactive-selection/specs/cli-change/spec.md +22 -0
  90. package/references/openspec/openspec/changes/archive/2025-08-19-bulk-validation-interactive-selection/specs/cli-spec/spec.md +23 -0
  91. package/references/openspec/openspec/changes/archive/2025-08-19-bulk-validation-interactive-selection/specs/cli-validate/spec.md +149 -0
  92. package/references/openspec/openspec/changes/archive/2025-08-19-bulk-validation-interactive-selection/tasks.md +81 -0
  93. package/references/openspec/openspec/changes/archive/2025-08-19-fix-update-tool-selection/proposal.md +40 -0
  94. package/references/openspec/openspec/changes/archive/2025-08-19-fix-update-tool-selection/specs/cli-update/spec.md +23 -0
  95. package/references/openspec/openspec/changes/archive/2025-08-19-fix-update-tool-selection/tasks.md +21 -0
  96. package/references/openspec/openspec/changes/archive/2025-08-19-improve-validate-error-messages/proposal.md +25 -0
  97. package/references/openspec/openspec/changes/archive/2025-08-19-improve-validate-error-messages/specs/cli-validate/spec.md +55 -0
  98. package/references/openspec/openspec/changes/archive/2025-08-19-improve-validate-error-messages/tasks.md +21 -0
  99. package/references/openspec/openspec/changes/archive/2025-08-19-structured-spec-format/proposal.md +36 -0
  100. package/references/openspec/openspec/changes/archive/2025-08-19-structured-spec-format/specs/openspec-conventions/spec.md +192 -0
  101. package/references/openspec/openspec/changes/archive/2025-08-19-structured-spec-format/tasks.md +19 -0
  102. package/references/openspec/openspec/changes/archive/2025-09-12-add-view-dashboard-command/proposal.md +38 -0
  103. package/references/openspec/openspec/changes/archive/2025-09-12-add-view-dashboard-command/specs/cli-view/spec.md +109 -0
  104. package/references/openspec/openspec/changes/archive/2025-09-12-add-view-dashboard-command/tasks.md +47 -0
  105. package/references/openspec/openspec/changes/archive/2025-09-29-add-agents-md-config/proposal.md +28 -0
  106. package/references/openspec/openspec/changes/archive/2025-09-29-add-agents-md-config/specs/cli-init/spec.md +71 -0
  107. package/references/openspec/openspec/changes/archive/2025-09-29-add-agents-md-config/specs/cli-update/spec.md +41 -0
  108. package/references/openspec/openspec/changes/archive/2025-09-29-add-agents-md-config/tasks.md +17 -0
  109. package/references/openspec/openspec/changes/archive/2025-09-29-add-multi-agent-init/proposal.md +35 -0
  110. package/references/openspec/openspec/changes/archive/2025-09-29-add-multi-agent-init/specs/cli-init/spec.md +45 -0
  111. package/references/openspec/openspec/changes/archive/2025-09-29-add-multi-agent-init/tasks.md +16 -0
  112. package/references/openspec/openspec/changes/archive/2025-09-29-add-slash-command-support/proposal.md +119 -0
  113. package/references/openspec/openspec/changes/archive/2025-09-29-add-slash-command-support/specs/cli-init/spec.md +21 -0
  114. package/references/openspec/openspec/changes/archive/2025-09-29-add-slash-command-support/specs/cli-update/spec.md +22 -0
  115. package/references/openspec/openspec/changes/archive/2025-09-29-add-slash-command-support/tasks.md +20 -0
  116. package/references/openspec/openspec/changes/archive/2025-09-29-improve-cli-e2e-plan/proposal.md +19 -0
  117. package/references/openspec/openspec/changes/archive/2025-09-29-improve-cli-e2e-plan/tasks.md +9 -0
  118. package/references/openspec/openspec/changes/archive/2025-09-29-improve-deterministic-tests/proposal.md +78 -0
  119. package/references/openspec/openspec/changes/archive/2025-09-29-improve-deterministic-tests/tasks.md +25 -0
  120. package/references/openspec/openspec/changes/archive/2025-09-29-improve-init-onboarding/proposal.md +13 -0
  121. package/references/openspec/openspec/changes/archive/2025-09-29-improve-init-onboarding/specs/cli-init/spec.md +92 -0
  122. package/references/openspec/openspec/changes/archive/2025-09-29-improve-init-onboarding/tasks.md +12 -0
  123. package/references/openspec/openspec/changes/archive/2025-09-29-remove-diff-command/proposal.md +81 -0
  124. package/references/openspec/openspec/changes/archive/2025-09-29-remove-diff-command/tasks.md +37 -0
  125. package/references/openspec/openspec/changes/archive/2025-09-29-sort-active-changes-by-progress/proposal.md +25 -0
  126. package/references/openspec/openspec/changes/archive/2025-09-29-sort-active-changes-by-progress/specs/cli-view/spec.md +9 -0
  127. package/references/openspec/openspec/changes/archive/2025-09-29-sort-active-changes-by-progress/tasks.md +8 -0
  128. package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-file-name/proposal.md +29 -0
  129. package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-file-name/specs/cli-init/spec.md +40 -0
  130. package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-file-name/specs/cli-update/spec.md +22 -0
  131. package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-file-name/specs/openspec-conventions/spec.md +27 -0
  132. package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-file-name/tasks.md +22 -0
  133. package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-instructions/design.md +130 -0
  134. package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-instructions/proposal.md +117 -0
  135. package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-instructions/tasks.md +69 -0
  136. package/references/openspec/openspec/changes/archive/2025-09-29-update-markdown-parser-crlf/proposal.md +19 -0
  137. package/references/openspec/openspec/changes/archive/2025-09-29-update-markdown-parser-crlf/specs/cli-validate/spec.md +9 -0
  138. package/references/openspec/openspec/changes/archive/2025-09-29-update-markdown-parser-crlf/tasks.md +11 -0
  139. package/references/openspec/openspec/changes/archive/2025-10-14-add-codex-slash-command-support/proposal.md +25 -0
  140. package/references/openspec/openspec/changes/archive/2025-10-14-add-codex-slash-command-support/specs/cli-init/spec.md +56 -0
  141. package/references/openspec/openspec/changes/archive/2025-10-14-add-codex-slash-command-support/specs/cli-update/spec.md +41 -0
  142. package/references/openspec/openspec/changes/archive/2025-10-14-add-codex-slash-command-support/tasks.md +19 -0
  143. package/references/openspec/openspec/changes/archive/2025-10-14-add-github-copilot-prompts/proposal.md +25 -0
  144. package/references/openspec/openspec/changes/archive/2025-10-14-add-github-copilot-prompts/specs/cli-init/spec.md +48 -0
  145. package/references/openspec/openspec/changes/archive/2025-10-14-add-github-copilot-prompts/specs/cli-update/spec.md +48 -0
  146. package/references/openspec/openspec/changes/archive/2025-10-14-add-github-copilot-prompts/tasks.md +30 -0
  147. package/references/openspec/openspec/changes/archive/2025-10-14-add-kilocode-workflows/proposal.md +17 -0
  148. package/references/openspec/openspec/changes/archive/2025-10-14-add-kilocode-workflows/specs/cli-init/spec.md +43 -0
  149. package/references/openspec/openspec/changes/archive/2025-10-14-add-kilocode-workflows/specs/cli-update/spec.md +27 -0
  150. package/references/openspec/openspec/changes/archive/2025-10-14-add-kilocode-workflows/tasks.md +15 -0
  151. package/references/openspec/openspec/changes/archive/2025-10-14-add-non-interactive-init-options/proposal.md +12 -0
  152. package/references/openspec/openspec/changes/archive/2025-10-14-add-non-interactive-init-options/specs/cli-init/spec.md +39 -0
  153. package/references/openspec/openspec/changes/archive/2025-10-14-add-non-interactive-init-options/tasks.md +17 -0
  154. package/references/openspec/openspec/changes/archive/2025-10-14-add-windsurf-workflows/proposal.md +17 -0
  155. package/references/openspec/openspec/changes/archive/2025-10-14-add-windsurf-workflows/specs/cli-init/spec.md +42 -0
  156. package/references/openspec/openspec/changes/archive/2025-10-14-add-windsurf-workflows/specs/cli-update/spec.md +27 -0
  157. package/references/openspec/openspec/changes/archive/2025-10-14-add-windsurf-workflows/tasks.md +17 -0
  158. package/references/openspec/openspec/changes/archive/2025-10-14-enhance-validation-error-messages/proposal.md +12 -0
  159. package/references/openspec/openspec/changes/archive/2025-10-14-enhance-validation-error-messages/specs/cli-validate/spec.md +39 -0
  160. package/references/openspec/openspec/changes/archive/2025-10-14-enhance-validation-error-messages/tasks.md +12 -0
  161. package/references/openspec/openspec/changes/archive/2025-10-14-improve-agent-instruction-usability/proposal.md +12 -0
  162. package/references/openspec/openspec/changes/archive/2025-10-14-improve-agent-instruction-usability/specs/docs-agent-instructions/spec.md +33 -0
  163. package/references/openspec/openspec/changes/archive/2025-10-14-improve-agent-instruction-usability/tasks.md +11 -0
  164. package/references/openspec/openspec/changes/archive/2025-10-14-slim-root-agents-file/proposal.md +13 -0
  165. package/references/openspec/openspec/changes/archive/2025-10-14-slim-root-agents-file/tasks.md +15 -0
  166. package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-enter-selection/proposal.md +14 -0
  167. package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-enter-selection/specs/cli-init/spec.md +10 -0
  168. package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-enter-selection/tasks.md +8 -0
  169. package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-root-agents/proposal.md +15 -0
  170. package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-root-agents/specs/cli-init/spec.md +32 -0
  171. package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-root-agents/specs/cli-update/spec.md +10 -0
  172. package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-root-agents/tasks.md +11 -0
  173. package/references/openspec/openspec/changes/archive/2025-10-14-update-release-automation/proposal.md +49 -0
  174. package/references/openspec/openspec/changes/archive/2025-10-14-update-release-automation/tasks.md +12 -0
  175. package/references/openspec/openspec/changes/archive/2025-10-22-add-archive-command-arguments/proposal.md +17 -0
  176. package/references/openspec/openspec/changes/archive/2025-10-22-add-archive-command-arguments/specs/cli-update/spec.md +32 -0
  177. package/references/openspec/openspec/changes/archive/2025-10-22-add-archive-command-arguments/tasks.md +15 -0
  178. package/references/openspec/openspec/changes/archive/2025-10-22-add-cline-support/proposal.md +15 -0
  179. package/references/openspec/openspec/changes/archive/2025-10-22-add-cline-support/specs/cli-init/spec.md +97 -0
  180. package/references/openspec/openspec/changes/archive/2025-10-22-add-cline-support/tasks.md +19 -0
  181. package/references/openspec/openspec/changes/archive/2025-10-22-add-crush-support/proposal.md +13 -0
  182. package/references/openspec/openspec/changes/archive/2025-10-22-add-crush-support/specs/cli-init/spec.md +67 -0
  183. package/references/openspec/openspec/changes/archive/2025-10-22-add-crush-support/tasks.md +7 -0
  184. package/references/openspec/openspec/changes/archive/2025-10-22-add-factory-slash-commands/proposal.md +12 -0
  185. package/references/openspec/openspec/changes/archive/2025-10-22-add-factory-slash-commands/specs/cli-init/spec.md +54 -0
  186. package/references/openspec/openspec/changes/archive/2025-10-22-add-factory-slash-commands/specs/cli-update/spec.md +54 -0
  187. package/references/openspec/openspec/changes/archive/2025-10-22-add-factory-slash-commands/tasks.md +11 -0
  188. package/references/openspec/openspec/changes/fix-cline-workflows-implementation/proposal.md +13 -0
  189. package/references/openspec/openspec/changes/fix-cline-workflows-implementation/specs/cli-init/spec.md +11 -0
  190. package/references/openspec/openspec/changes/fix-cline-workflows-implementation/tasks.md +13 -0
  191. package/references/openspec/openspec/changes/make-validation-scope-aware/proposal.md +12 -0
  192. package/references/openspec/openspec/changes/make-validation-scope-aware/specs/cli-validate/spec.md +25 -0
  193. package/references/openspec/openspec/changes/make-validation-scope-aware/tasks.md +16 -0
  194. package/references/openspec/openspec/project.md +53 -0
  195. package/references/openspec/openspec/specs/cli-archive/spec.md +210 -0
  196. package/references/openspec/openspec/specs/cli-change/spec.md +91 -0
  197. package/references/openspec/openspec/specs/cli-init/spec.md +311 -0
  198. package/references/openspec/openspec/specs/cli-list/spec.md +103 -0
  199. package/references/openspec/openspec/specs/cli-show/spec.md +85 -0
  200. package/references/openspec/openspec/specs/cli-spec/spec.md +87 -0
  201. package/references/openspec/openspec/specs/cli-update/spec.md +190 -0
  202. package/references/openspec/openspec/specs/cli-validate/spec.md +218 -0
  203. package/references/openspec/openspec/specs/cli-view/spec.md +105 -0
  204. package/references/openspec/openspec/specs/docs-agent-instructions/spec.md +38 -0
  205. package/references/openspec/openspec/specs/openspec-conventions/spec.md +474 -0
  206. package/references/openspec/openspec-parallel-merge-plan.md +98 -0
  207. package/references/openspec/package.json +73 -0
  208. package/references/openspec/pnpm-lock.yaml +2324 -0
  209. package/references/openspec/scripts/pack-version-check.mjs +111 -0
  210. package/references/openspec/src/cli/index.ts +253 -0
  211. package/references/openspec/src/commands/change.ts +291 -0
  212. package/references/openspec/src/commands/show.ts +139 -0
  213. package/references/openspec/src/commands/spec.ts +250 -0
  214. package/references/openspec/src/commands/validate.ts +305 -0
  215. package/references/openspec/src/core/archive.ts +606 -0
  216. package/references/openspec/src/core/config.ts +41 -0
  217. package/references/openspec/src/core/configurators/agents.ts +23 -0
  218. package/references/openspec/src/core/configurators/base.ts +6 -0
  219. package/references/openspec/src/core/configurators/claude.ts +23 -0
  220. package/references/openspec/src/core/configurators/cline.ts +23 -0
  221. package/references/openspec/src/core/configurators/codebuddy.ts +24 -0
  222. package/references/openspec/src/core/configurators/costrict.ts +23 -0
  223. package/references/openspec/src/core/configurators/iflow.ts +23 -0
  224. package/references/openspec/src/core/configurators/qoder.ts +53 -0
  225. package/references/openspec/src/core/configurators/qwen.ts +47 -0
  226. package/references/openspec/src/core/configurators/registry.ts +49 -0
  227. package/references/openspec/src/core/configurators/slash/amazon-q.ts +51 -0
  228. package/references/openspec/src/core/configurators/slash/antigravity.ts +28 -0
  229. package/references/openspec/src/core/configurators/slash/auggie.ts +37 -0
  230. package/references/openspec/src/core/configurators/slash/base.ts +95 -0
  231. package/references/openspec/src/core/configurators/slash/claude.ts +42 -0
  232. package/references/openspec/src/core/configurators/slash/cline.ts +27 -0
  233. package/references/openspec/src/core/configurators/slash/codebuddy.ts +43 -0
  234. package/references/openspec/src/core/configurators/slash/codex.ts +126 -0
  235. package/references/openspec/src/core/configurators/slash/costrict.ts +36 -0
  236. package/references/openspec/src/core/configurators/slash/crush.ts +42 -0
  237. package/references/openspec/src/core/configurators/slash/cursor.ts +42 -0
  238. package/references/openspec/src/core/configurators/slash/factory.ts +41 -0
  239. package/references/openspec/src/core/configurators/slash/gemini.ts +27 -0
  240. package/references/openspec/src/core/configurators/slash/github-copilot.ts +39 -0
  241. package/references/openspec/src/core/configurators/slash/iflow.ts +42 -0
  242. package/references/openspec/src/core/configurators/slash/kilocode.ts +21 -0
  243. package/references/openspec/src/core/configurators/slash/opencode.ts +83 -0
  244. package/references/openspec/src/core/configurators/slash/qoder.ts +84 -0
  245. package/references/openspec/src/core/configurators/slash/qwen.ts +55 -0
  246. package/references/openspec/src/core/configurators/slash/registry.ts +81 -0
  247. package/references/openspec/src/core/configurators/slash/roocode.ts +27 -0
  248. package/references/openspec/src/core/configurators/slash/toml-base.ts +66 -0
  249. package/references/openspec/src/core/configurators/slash/windsurf.ts +27 -0
  250. package/references/openspec/src/core/converters/json-converter.ts +61 -0
  251. package/references/openspec/src/core/index.ts +2 -0
  252. package/references/openspec/src/core/init.ts +986 -0
  253. package/references/openspec/src/core/list.ts +104 -0
  254. package/references/openspec/src/core/parsers/change-parser.ts +234 -0
  255. package/references/openspec/src/core/parsers/markdown-parser.ts +237 -0
  256. package/references/openspec/src/core/parsers/requirement-blocks.ts +234 -0
  257. package/references/openspec/src/core/schemas/base.schema.ts +20 -0
  258. package/references/openspec/src/core/schemas/change.schema.ts +42 -0
  259. package/references/openspec/src/core/schemas/index.ts +20 -0
  260. package/references/openspec/src/core/schemas/spec.schema.ts +17 -0
  261. package/references/openspec/src/core/styles/palette.ts +8 -0
  262. package/references/openspec/src/core/templates/agents-root-stub.ts +16 -0
  263. package/references/openspec/src/core/templates/agents-template.ts +457 -0
  264. package/references/openspec/src/core/templates/claude-template.ts +1 -0
  265. package/references/openspec/src/core/templates/cline-template.ts +1 -0
  266. package/references/openspec/src/core/templates/costrict-template.ts +1 -0
  267. package/references/openspec/src/core/templates/index.ts +50 -0
  268. package/references/openspec/src/core/templates/project-template.ts +38 -0
  269. package/references/openspec/src/core/templates/slash-command-templates.ts +60 -0
  270. package/references/openspec/src/core/update.ts +129 -0
  271. package/references/openspec/src/core/validation/constants.ts +48 -0
  272. package/references/openspec/src/core/validation/types.ts +19 -0
  273. package/references/openspec/src/core/validation/validator.ts +448 -0
  274. package/references/openspec/src/core/view.ts +189 -0
  275. package/references/openspec/src/index.ts +2 -0
  276. package/references/openspec/src/utils/file-system.ts +187 -0
  277. package/references/openspec/src/utils/index.ts +2 -0
  278. package/references/openspec/src/utils/interactive.ts +7 -0
  279. package/references/openspec/src/utils/item-discovery.ts +45 -0
  280. package/references/openspec/src/utils/match.ts +26 -0
  281. package/references/openspec/src/utils/task-progress.ts +43 -0
  282. package/references/openspec/test/cli-e2e/basic.test.ts +156 -0
  283. package/references/openspec/test/commands/change.interactive-show.test.ts +45 -0
  284. package/references/openspec/test/commands/change.interactive-validate.test.ts +48 -0
  285. package/references/openspec/test/commands/show.test.ts +123 -0
  286. package/references/openspec/test/commands/spec.interactive-show.test.ts +44 -0
  287. package/references/openspec/test/commands/spec.interactive-validate.test.ts +44 -0
  288. package/references/openspec/test/commands/spec.test.ts +324 -0
  289. package/references/openspec/test/commands/validate.enriched-output.test.ts +49 -0
  290. package/references/openspec/test/commands/validate.test.ts +133 -0
  291. package/references/openspec/test/core/archive.test.ts +680 -0
  292. package/references/openspec/test/core/commands/change-command.list.test.ts +76 -0
  293. package/references/openspec/test/core/commands/change-command.show-validate.test.ts +111 -0
  294. package/references/openspec/test/core/converters/json-converter.test.ts +184 -0
  295. package/references/openspec/test/core/init.test.ts +1710 -0
  296. package/references/openspec/test/core/list.test.ts +165 -0
  297. package/references/openspec/test/core/parsers/change-parser.test.ts +52 -0
  298. package/references/openspec/test/core/parsers/markdown-parser.test.ts +291 -0
  299. package/references/openspec/test/core/update.test.ts +1642 -0
  300. package/references/openspec/test/core/validation.enriched-messages.test.ts +74 -0
  301. package/references/openspec/test/core/validation.test.ts +489 -0
  302. package/references/openspec/test/core/view.test.ts +79 -0
  303. package/references/openspec/test/fixtures/tmp-init/openspec/changes/c1/proposal.md +7 -0
  304. package/references/openspec/test/fixtures/tmp-init/openspec/changes/c1/specs/alpha/spec.md +8 -0
  305. package/references/openspec/test/fixtures/tmp-init/openspec/specs/alpha/spec.md +12 -0
  306. package/references/openspec/test/helpers/run-cli.ts +139 -0
  307. package/references/openspec/test/utils/file-system.test.ts +211 -0
  308. package/references/openspec/test/utils/marker-updates.test.ts +287 -0
  309. package/references/openspec/tsconfig.json +21 -0
  310. package/references/openspec/vitest.config.ts +25 -0
  311. package/references/openspec/vitest.setup.ts +6 -0
@@ -0,0 +1,19 @@
1
+ ## Why
2
+ Recent cross-shell regressions for `openspec` commands revealed that our existing unit/integration tests do not exercise the packaged CLI or shell-specific behavior. The prior attempt at Vitest spawn tests stalled because it coupled e2e coverage with `pnpm pack` installs, which fail in network-restricted environments. With those findings incorporated, we now need an approved plan to realign the work.
3
+
4
+ ## What Changes
5
+ - Adopt a phased strategy that first stabilizes direct spawn testing of the built CLI (`node dist/cli/index.js`) using lightweight fixtures and a shared `runCLI` helper.
6
+ - Expand coverage once the spawn harness is stable, keeping the initial matrix focused on bash jobs for Linux/macOS and `pwsh` on Windows while exercising both the direct `node dist/cli/index.js` invocation and the bin shim with non-TTY defaults and captured diagnostics.
7
+ - Treat packaging/install validation as an optional CI safeguard: when a runner has registry access, run a simple pnpm-based pack→install→smoke-test flow; otherwise document it as out of scope while closing remaining hardening items.
8
+ - Close out the remaining cross-shell hardening items: ensure `.gitattributes` covers packaged assets, enforce executable bits for CLI shims during CI, and finish the pending SIGINT handling improvements.
9
+
10
+ ## Impact
11
+ - Tests: add `test/cli-e2e` spawn suite, create the shared `runCLI` helper, and adjust `vitest.setup.ts` as needed.
12
+ - Tooling: update GitHub Actions workflows with the lightweight matrix above and (optionally) a packaging install check where network is available.
13
+ - Docs: note phase progress and any limitations inline in this proposal (or the relevant spec) so future phases have clear context.
14
+
15
+ ### Phase 1 Status
16
+ - Shared `test/helpers/run-cli.ts` guarantees the CLI bundle exists before spawning and enforces non-TTY defaults for every invocation.
17
+ - New `test/cli-e2e/basic.test.ts` covers `--help`, `--version`, a successful `validate --all --json`, and an unknown-item error path against the `tmp-init` fixture copy.
18
+ - Legacy top-level `validate` exec tests now rely on `runCLI`, avoiding manual `execSync` usage while keeping their fixture authoring intact.
19
+ - CI matrix groundwork is in place (bash on Linux/macOS, pwsh on Windows) so the spawn suite runs the same way the helper does across supported shells.
@@ -0,0 +1,9 @@
1
+ ## 1. Phase 1 – Stabilize Local Spawn Coverage
2
+ - [x] 1.1 Add `test/helpers/run-cli.ts` that ensures the build runs once and executes `node dist/cli/index.js` with non-TTY defaults; update `vitest.setup.ts` to reuse the shared build step.
3
+ - [x] 1.2 Seed `test/cli-e2e` using the minimal fixture set (`tmp-init` or copy) to cover help/version, a happy-path `validate`, and a representative error flow via the new helper.
4
+ - [x] 1.3 Migrate the highest-value existing CLI exec tests (e.g., validate) onto `runCLI` and summarize Phase 1 coverage in this proposal for the next phase.
5
+
6
+ ## 2. Phase 2 – Expand Cross-Shell Validation
7
+ - [x] 2.1 Exercise both entry points (`node dist/cli/index.js`, `bin/openspec.js`) in the spawn suite and add diagnostics for shell/OS context.
8
+ - [x] 2.2 Extend GitHub Actions to run the spawn suite on bash jobs for Linux/macOS and a `pwsh` job on Windows; capture shell/OS diagnostics and note follow-ups for additional shells.
9
+
@@ -0,0 +1,78 @@
1
+ # Change: Improve Deterministic Tests (Isolate From Repo State)
2
+
3
+ ## Problem
4
+
5
+ Some unit tests (e.g., ChangeCommand.show/validate) read the live repository
6
+ state via `process.cwd()` and `openspec/changes`. This makes outcomes depend on
7
+ whatever directories happen to exist and the order returned by `fs.readdir`,
8
+ causing flaky success/failure across environments.
9
+
10
+ Symptoms observed:
11
+ - Tests sometimes select a partial or unrelated change folder.
12
+ - Failures like missing `proposal.md` when a stray change directory is picked.
13
+ - Environment/sandbox differences alter `readdir` ordering and worker behavior.
14
+
15
+ ## Goals
16
+
17
+ - Make tests deterministic and hermetic.
18
+ - Remove dependence on real repo contents and directory ordering.
19
+ - Keep runtime behavior unchanged for end users.
20
+
21
+ ## Non‑Goals
22
+
23
+ - Introduce heavy frameworks or test harness complexity.
24
+ - Redesign CLI behavior or change default paths for users.
25
+
26
+ ## Approach
27
+
28
+ 1) Test-local fixture root
29
+ - Each suite that touches filesystem discovery creates a temporary directory:
30
+ - `openspec/changes/sample-change/proposal.md`
31
+ - `openspec/changes/sample-change/specs/sample/spec.md`
32
+ - `beforeAll`: `process.chdir(tmpRoot)`; `afterAll`: restore original cwd.
33
+ - Use a constant `changeName = 'sample-change'`; remove reliance on
34
+ `readdir` order.
35
+
36
+ 2) Optional thin DI for commands (minimal, if needed)
37
+ - Allow `ChangeCommand` (and similar) to accept an optional `root` path
38
+ (default `process.cwd()`), used for path resolution.
39
+ - Tests pass the temp root explicitly; production code remains unchanged.
40
+
41
+ 3) Harden discovery helpers (safe enhancement)
42
+ - Update `getActiveChangeIds()`/`getActiveChanges()` to include only
43
+ directories containing `proposal.md` (and optionally at least one
44
+ `specs/*/spec.md`).
45
+ - Prevents incomplete/stray change folders from being treated as active.
46
+
47
+ ## Rationale
48
+
49
+ - Small, focused changes eliminate flakiness without altering user workflows.
50
+ - Temporary fixtures are a well-understood testing pattern and keep tests fast.
51
+ - Optional constructor root param is a minimal DI surface that avoids global
52
+ stubbing and keeps code simple.
53
+
54
+ ## Risks & Mitigations
55
+
56
+ - Risk: Tests forget to restore `process.cwd()`.
57
+ - Mitigation: Add `afterAll` guard restoring cwd; reset `process.exitCode` in
58
+ `afterEach` where modified.
59
+ - Risk: Behavior divergence if DI root is misused.
60
+ - Mitigation: Default to `process.cwd()`; only tests pass custom roots.
61
+
62
+ ## Acceptance Criteria
63
+
64
+ - Tests that previously depended on repo state now:
65
+ - Create and use a temp fixture root.
66
+ - Do not read real `openspec/changes` during execution.
67
+ - Pass consistently regardless of directory order or stray folders.
68
+ - No change to CLI behavior for end users (paths still default to cwd).
69
+
70
+ ## Rollout
71
+
72
+ - Phase 1: Convert the suites that hit `ChangeCommand.show/validate` to
73
+ isolated fixtures; verify stability locally and in CI.
74
+ - Phase 2: Apply the same pattern to any remaining suites that touch file
75
+ discovery (`list`, `show`, `validate`, `diff`).
76
+ - Phase 3 (optional): Introduce the constructor `root` param and discovery
77
+ hardening, if Phase 1 alone isn’t sufficient.
78
+
@@ -0,0 +1,25 @@
1
+ # Implementation Tasks
2
+
3
+ ## 1. Test Isolation
4
+ - [x] 1.1 Create temp fixture roots per suite (openspec/changes, openspec/specs)
5
+ - [x] 1.2 Use process.chdir to temp root within tests
6
+ - [x] 1.3 Restore original cwd and clean temp dirs after each
7
+
8
+ ## 2. Deterministic Discovery
9
+ - [x] 2.1 Implement getActiveChangeIds(root?) to only include dirs with proposal.md
10
+ - [x] 2.2 Implement getSpecIds(root?) to only include dirs with spec.md
11
+ - [x] 2.3 Return sorted results to avoid fs.readdir ordering variance
12
+
13
+ ## 3. Command Integration
14
+ - [x] 3.1 Ensure change/show/validate rely on cwd and discovery helpers
15
+ - [x] 3.2 Keep runtime behavior unchanged for end users
16
+
17
+ ## 4. Validation
18
+ - [x] 4.1 Convert affected command tests (show, spec, validate, change) to isolated fixtures
19
+ - [x] 4.2 Verify tests pass consistently across environments
20
+ - [x] 4.3 Confirm no reads from real repo state during tests
21
+
22
+ ## 5. Optional (Not Needed Now)
23
+ - [x] 5.1 Add optional root param to discovery helpers (default process.cwd())
24
+
25
+
@@ -0,0 +1,13 @@
1
+ ## Why
2
+ The current `openspec init` flow assumes a single assistant selection and stops once an OpenSpec structure already exists. That makes onboarding feel rigid: teams cannot configure multiple tools in one pass, they do not learn which files were refreshed, and the success copy always references Claude even when other assistants are involved.
3
+
4
+ ## What Changes
5
+ - Allow selecting multiple assistants during `openspec init`, including refreshing existing configurations in a single run.
6
+ - Provide richer onboarding copy that summarizes which tool files were created or refreshed and guides users on next steps for each assistant.
7
+ - Align generated AI-instruction content and specs so CLAUDE.md and AGENTS.md share the same OpenSpec guidance.
8
+ - Update specs and tests to cover the multi-select prompt, improved summaries, and extend-mode coordination.
9
+
10
+ ## Impact
11
+ - Specs: `cli-init`
12
+ - Code: `src/core/init.ts`, `src/core/config.ts`, `src/core/templates/*`, `src/core/configurators/*`
13
+ - Tests: `test/core/init.test.ts`, `test/core/update.test.ts`
@@ -0,0 +1,92 @@
1
+ ## MODIFIED Requirements
2
+ ### Requirement: AI Tool Configuration
3
+
4
+ The command SHALL configure AI coding assistants with OpenSpec instructions based on user selection.
5
+
6
+ #### Scenario: Prompting for AI tool selection
7
+
8
+ - **WHEN** run interactively
9
+ - **THEN** prompt the user with "Which AI tools do you use?" using a multi-select menu
10
+ - **AND** list every available tool with a checkbox:
11
+ - Claude Code (creates or refreshes CLAUDE.md and slash commands)
12
+ - Cursor (creates or refreshes `.cursor/commands/*` slash commands)
13
+ - AGENTS.md standard (creates or refreshes AGENTS.md with OpenSpec markers)
14
+ - **AND** show "(already configured)" beside tools whose managed files exist so users understand selections will refresh content
15
+ - **AND** treat disabled tools as "coming soon" and keep them unselectable
16
+ - **AND** allow confirming with Enter after selecting one or more tools
17
+
18
+ ### Requirement: AI Tool Configuration Details
19
+
20
+ The command SHALL properly configure selected AI tools with OpenSpec-specific instructions using a marker system.
21
+
22
+ #### Scenario: Configuring Claude Code
23
+
24
+ - **WHEN** Claude Code is selected
25
+ - **THEN** create or update `CLAUDE.md` in the project root directory (not inside openspec/)
26
+
27
+ #### Scenario: Creating new CLAUDE.md
28
+
29
+ - **WHEN** CLAUDE.md does not exist
30
+ - **THEN** create new file with OpenSpec content wrapped in markers:
31
+ ```markdown
32
+ <!-- OPENSPEC:START -->
33
+ # OpenSpec Instructions
34
+
35
+ Instructions for AI coding assistants using OpenSpec for spec-driven development.
36
+
37
+ ## TL;DR Quick Checklist
38
+ - Search existing work: `openspec spec list --long`, `openspec list`
39
+ - Decide scope: new capability vs modify existing capability
40
+ - Pick a unique `change-id`: verb-led kebab-case (`add-`, `update-`, `remove-`, `refactor-`)
41
+ - Scaffold: `proposal.md`, `tasks.md`, optional `design.md`, and spec deltas
42
+ - Validate with `openspec validate [change-id] --strict`
43
+ - Request approval before implementation
44
+ <!-- OPENSPEC:END -->
45
+ ```
46
+
47
+ #### Scenario: Updating existing CLAUDE.md
48
+
49
+ - **WHEN** CLAUDE.md already exists
50
+ - **THEN** preserve all existing content
51
+ - **AND** insert OpenSpec content at the beginning of the file using markers
52
+ - **AND** ensure markers don't duplicate if they already exist
53
+
54
+ #### Scenario: Managing content with markers
55
+
56
+ - **WHEN** using the marker system
57
+ - **THEN** use `<!-- OPENSPEC:START -->` to mark the beginning of managed content
58
+ - **AND** use `<!-- OPENSPEC:END -->` to mark the end of managed content
59
+ - **AND** allow OpenSpec to update its content without affecting user customizations
60
+ - **AND** preserve all content outside the markers intact
61
+
62
+ ### Requirement: Interactive Mode
63
+
64
+ The command SHALL provide an interactive menu for AI tool selection with clear navigation instructions.
65
+
66
+ #### Scenario: Displaying interactive menu
67
+
68
+ - **WHEN** run
69
+ - **THEN** prompt the user with: "Which AI tools do you use?"
70
+ - **AND** show a checkbox-based multi-select menu with available tools (Claude Code, Cursor, AGENTS.md standard)
71
+ - **AND** show disabled options as "coming soon" (not selectable)
72
+ - **AND** display inline help indicating Space toggles selections and Enter confirms
73
+
74
+ #### Scenario: Navigating the menu
75
+
76
+ - **WHEN** the user is in the menu
77
+ - **THEN** allow arrow keys to move between options
78
+ - **AND** allow Spacebar to toggle the highlighted option
79
+ - **AND** allow Enter key to confirm all current selections
80
+
81
+ ### Requirement: Success Output
82
+
83
+ The command SHALL provide clear, actionable next steps upon successful initialization.
84
+
85
+ #### Scenario: Displaying success message
86
+
87
+ - **WHEN** initialization completes successfully
88
+ - **THEN** display a success banner followed by actionable prompts tailored to the selected tools
89
+ - **AND** summarize which assistant files were created versus refreshed (e.g., `CLAUDE.md (created)`, `.cursor/commands/openspec-apply.md (refreshed)`)
90
+ - **AND** include copy-pasteable onboarding prompts for each configured assistant, replacing placeholder text ([YOUR FEATURE HERE]) with real guidance to customize
91
+ - **AND** reference AGENTS.md-compatible assistants when no tool-specific file exists (e.g., when only AGENTS.md standard is selected)
92
+
@@ -0,0 +1,12 @@
1
+ ## 1. Planning & Spec Updates
2
+ - [x] 1.1 Confirm overlap with `add-multi-agent-init` and coordinate extend-mode flow
3
+ - [x] 1.2 Update `openspec/specs/cli-init/spec.md` to capture multi-select onboarding requirements
4
+
5
+ ## 2. Implementation
6
+ - [x] 2.1 Add multi-select support to the `openspec init` prompt, including indicators for existing tool configs
7
+ - [x] 2.2 Enhance success messaging to summarize created/refreshed assets per tool
8
+ - [x] 2.3 Ensure shared instruction template is applied consistently (CLAUDE.md, AGENTS.md, slash commands)
9
+
10
+ ## 3. Quality
11
+ - [x] 3.1 Expand unit tests for init/update flows covering multi-select and summaries
12
+ - [x] 3.2 Perform `openspec init` smoke test in a temp directory (document output)
@@ -0,0 +1,81 @@
1
+ # Remove Diff Command
2
+
3
+ ## Problem
4
+
5
+ The `openspec diff` command adds unnecessary complexity to the OpenSpec CLI for several reasons:
6
+
7
+ 1. **Redundant functionality**: The `openspec show` command already provides comprehensive visualization of changes through structured JSON output and markdown rendering
8
+ 2. **Maintenance burden**: The diff command requires a separate dependency (jest-diff) and additional code complexity (~227 lines)
9
+ 3. **Limited value**: Developers can achieve better diff visualization using existing tools:
10
+ - Git diff for actual file changes
11
+ - The `show` command for structured change viewing
12
+ - Standard diff utilities for comparing spec files directly
13
+ 4. **Inconsistent with verb-noun pattern**: The command doesn't follow the preferred verb-first command structure that other commands are migrating to
14
+
15
+ ## Solution
16
+
17
+ Remove the `openspec diff` command entirely and guide users to more appropriate alternatives:
18
+
19
+ 1. **For viewing change content**: Use `openspec show <change-name>` which provides:
20
+ - Structured JSON output with `--json` flag
21
+ - Markdown rendering for human-readable format
22
+ - Delta-only views with `--deltas-only` flag
23
+ - Full spec content visualization
24
+
25
+ 2. **For comparing files**: Use standard tools:
26
+ - `git diff` for version control comparisons
27
+ - System diff utilities for file-by-file comparisons
28
+ - IDE diff viewers for visual comparisons
29
+
30
+ ## Benefits
31
+
32
+ - **Reduced complexity**: Removes ~227 lines of code and the jest-diff dependency
33
+ - **Clearer user journey**: Directs users to the canonical `show` command for viewing changes
34
+ - **Lower maintenance**: Fewer commands to maintain and test
35
+ - **Better alignment**: Focuses on the core OpenSpec workflow without redundant features
36
+
37
+ ## Implementation
38
+
39
+ ### Files to Remove
40
+ - `/src/core/diff.ts` - The entire diff command implementation
41
+ - `/openspec/specs/cli-diff/spec.md` - The diff command specification
42
+
43
+ ### Files to Update
44
+ - `/src/cli/index.ts` - Remove diff command registration (lines 8, 84-96)
45
+ - `/package.json` - Remove jest-diff dependency
46
+ - `/README.md` - Remove diff command documentation
47
+ - `/openspec/README.md` - Remove diff command references
48
+ - Various documentation files mentioning `openspec diff`
49
+
50
+ ### Migration Guide for Users
51
+
52
+ Users currently using `openspec diff` should transition to:
53
+
54
+ ```bash
55
+ # Before
56
+ openspec diff add-feature
57
+
58
+ # After - view the change proposal
59
+ openspec show add-feature
60
+
61
+ # After - view only the deltas
62
+ openspec show add-feature --json --deltas-only
63
+
64
+ # After - use git for file comparisons
65
+ git diff openspec/specs openspec/changes/add-feature/specs
66
+ ```
67
+
68
+ ## Risks
69
+
70
+ - **User disruption**: Existing users may have workflows depending on the diff command
71
+ - Mitigation: Provide clear migration guide and deprecation period
72
+
73
+ - **Loss of visual diff**: The colored, unified diff format will no longer be available
74
+ - Mitigation: Users can use git diff or other tools for visual comparisons
75
+
76
+ ## Success Metrics
77
+
78
+ - Successful removal with no broken dependencies
79
+ - Documentation updated to reflect the change
80
+ - Tests passing without the diff command
81
+ - Reduced package size from removing jest-diff dependency
@@ -0,0 +1,37 @@
1
+ # Remove Diff Command - Tasks
2
+
3
+ ## 1. Remove Core Implementation
4
+ - [x] Delete `/src/core/diff.ts`
5
+ - [x] Remove DiffCommand import from `/src/cli/index.ts`
6
+ - [x] Remove diff command registration from CLI
7
+
8
+ ## 2. Remove Specifications
9
+ - [x] Delete `/openspec/specs/cli-diff/spec.md`
10
+ - [x] Archive the spec for historical reference if needed
11
+
12
+ ## 3. Update Dependencies
13
+ - [x] Remove jest-diff from package.json dependencies
14
+ - [x] Run pnpm install to update lock file
15
+
16
+ ## 4. Update Documentation
17
+ - [x] Update main README.md to remove diff command references
18
+ - [x] Update openspec/README.md to remove diff command from command list
19
+ - [x] Update CLAUDE.md template if it mentions diff command
20
+ - [x] Update any example workflows that use diff command
21
+
22
+ ## 5. Update Related Files
23
+ - [x] Search and update any remaining references to "openspec diff" in:
24
+ - Template files
25
+ - Test files (if any exist for diff command)
26
+ - Archive documentation
27
+ - Change proposals
28
+
29
+ ## 7. Testing
30
+ - [x] Ensure all tests pass after removal
31
+ - [x] Verify CLI help text no longer shows diff command
32
+ - [x] Test that show command provides adequate replacement functionality
33
+
34
+ ## 8. Documentation of Alternative Workflows
35
+ - [x] Document how to use `openspec show` for viewing changes
36
+ - [x] Document how to use git diff for file comparisons
37
+ - [x] Add migration guide to help text or documentation
@@ -0,0 +1,25 @@
1
+ # Change: Sort Active Changes by Progress
2
+
3
+ ## Problem
4
+ - The dashboard currently lists active changes in filesystem discovery order.
5
+ - Users cannot quickly spot proposals that have not started or are nearly complete.
6
+ - Inconsistent ordering between runs makes it harder to track progress when many changes exist.
7
+
8
+ ## Proposal
9
+ 1. Update the Active Changes list in the dashboard to sort by percentage of completion in ascending order so 0% items show first.
10
+ 2. When two changes share the same completion percentage, break ties deterministically by change identifier (alphabetical).
11
+
12
+ ## Benefits
13
+ - Highlights work that has not started yet, enabling quicker prioritization.
14
+ - Provides consistent ordering across machines and repeated runs.
15
+ - Keeps the dashboard compact while communicating the most important status signal.
16
+
17
+ ## Risks & Mitigations
18
+ - **Risk:** Sorting logic could regress rendering when progress data is missing.
19
+ - **Mitigation:** Treat missing progress as 0% so items still surface and document behavior in tests.
20
+ - **Risk:** Additional sorting could impact performance for large change sets.
21
+ - **Mitigation:** The number of active changes is typically small; sorting a few entries is negligible.
22
+
23
+ ## Success Criteria
24
+ - Dashboard output shows active changes ordered by ascending completion percentage with deterministic tie-breaking.
25
+ - Unit coverage verifying the sort when percentages vary and when ties occur.
@@ -0,0 +1,9 @@
1
+ ## MODIFIED Requirements
2
+ ### Requirement: Active Changes Display
3
+ The dashboard SHALL show active changes with visual progress indicators.
4
+
5
+ #### Scenario: Active changes ordered by completion percentage
6
+ - **WHEN** multiple active changes are displayed with progress information
7
+ - **THEN** list them sorted by completion percentage ascending so 0% items appear first
8
+ - **AND** treat missing progress values as 0% for ordering
9
+ - **AND** break ties by change identifier in ascending alphabetical order to keep output deterministic
@@ -0,0 +1,8 @@
1
+ # Implementation Tasks
2
+
3
+ ## 1. Dashboard Sorting Logic
4
+ - [x] 1.1 Update the Active Changes rendering to sort by completion percentage ascending.
5
+ - [x] 1.2 Treat missing progress as 0% and break ties alphabetically by change identifier.
6
+
7
+ ## 2. Verification
8
+ - [x] 2.1 Add tests that cover different completion percentages and tie cases to confirm deterministic ordering.
@@ -0,0 +1,29 @@
1
+ # Update Agent Instruction File Name
2
+
3
+ ## Problem
4
+ The agent instructions live in `openspec/README.md`, which clashes with conventional project README usage and creates confusion for tooling and contributors.
5
+
6
+ ## Solution
7
+ Rename the agent instruction file to `openspec/AGENTS.md` and update OpenSpec tooling to use the new filename:
8
+ - `openspec init` generates `AGENTS.md` instead of `README.md`
9
+ - Templates and code reference `AGENTS.md`
10
+ - Specifications and documentation are updated accordingly
11
+
12
+ ## Benefits
13
+ - Clear separation from project documentation
14
+ - Consistent naming with other agent instruction files
15
+ - Simplifies tooling and project onboarding
16
+
17
+ ## Implementation
18
+ - Rename instruction file and template
19
+ - Update CLI commands (`init`, `update`) to read/write `AGENTS.md`
20
+ - Adjust specs and documentation to reference the new path
21
+
22
+ ## Risks
23
+ - Existing projects may still rely on `README.md`
24
+ - Tooling may miss lingering references to the old filename
25
+
26
+ ## Success Metrics
27
+ - `openspec init` creates `openspec/AGENTS.md`
28
+ - `openspec update` refreshes `AGENTS.md`
29
+ - All specs reference `openspec/AGENTS.md`
@@ -0,0 +1,40 @@
1
+ ## MODIFIED Requirements
2
+
3
+ ### Requirement: Directory Creation
4
+ The command SHALL create the complete OpenSpec directory structure with all required directories and files.
5
+
6
+ #### Scenario: Creating OpenSpec structure
7
+ - **WHEN** `openspec init` is executed
8
+ - **THEN** create the following directory structure:
9
+ ```
10
+ openspec/
11
+ ├── project.md
12
+ ├── AGENTS.md
13
+ ├── specs/
14
+ └── changes/
15
+ └── archive/
16
+ ```
17
+
18
+ ### Requirement: File Generation
19
+ The command SHALL generate required template files with appropriate content for immediate use.
20
+
21
+ #### Scenario: Generating template files
22
+ - **WHEN** initializing OpenSpec
23
+ - **THEN** generate `AGENTS.md` containing complete OpenSpec instructions for AI assistants
24
+ - **AND** generate `project.md` with project context template
25
+
26
+ ### Requirement: AI Tool Configuration Details
27
+
28
+ The command SHALL properly configure selected AI tools with OpenSpec-specific instructions using a marker system.
29
+
30
+ #### Scenario: Creating new CLAUDE.md
31
+ - **WHEN** CLAUDE.md does not exist
32
+ - **THEN** create new file with OpenSpec content wrapped in markers including reference to `@openspec/AGENTS.md`
33
+
34
+ ### Requirement: Success Output
35
+
36
+ The command SHALL provide clear, actionable next steps upon successful initialization.
37
+
38
+ #### Scenario: Displaying success message
39
+ - **WHEN** initialization completes successfully
40
+ - **THEN** include prompt: "Please explain the OpenSpec workflow from openspec/AGENTS.md and how I should work with you on this project"
@@ -0,0 +1,22 @@
1
+ ## MODIFIED Requirements
2
+
3
+ ### Requirement: Update Behavior
4
+ The update command SHALL update OpenSpec instruction files to the latest templates in a team-friendly manner.
5
+
6
+ #### Scenario: Running update command
7
+ - **WHEN** a user runs `openspec update`
8
+ - **THEN** replace `openspec/AGENTS.md` with the latest template
9
+
10
+ ### Requirement: File Handling
11
+ The update command SHALL handle file updates in a predictable and safe manner.
12
+
13
+ #### Scenario: Updating files
14
+ - **WHEN** updating files
15
+ - **THEN** completely replace `openspec/AGENTS.md` with the latest template
16
+
17
+ ### Requirement: Core Files Always Updated
18
+ The update command SHALL always update the core OpenSpec files and display an ASCII-safe success message.
19
+
20
+ #### Scenario: Successful update
21
+ - **WHEN** the update completes successfully
22
+ - **THEN** replace `openspec/AGENTS.md` with the latest template
@@ -0,0 +1,27 @@
1
+ ## MODIFIED Requirements
2
+
3
+ ### Requirement: Project Structure
4
+ An OpenSpec project SHALL maintain a consistent directory structure for specifications and changes.
5
+
6
+ #### Scenario: Initializing project structure
7
+ - **WHEN** an OpenSpec project is initialized
8
+ - **THEN** it SHALL have this structure:
9
+ ```
10
+ openspec/
11
+ ├── project.md # Project-specific context
12
+ ├── AGENTS.md # AI assistant instructions
13
+ ├── specs/ # Current deployed capabilities
14
+ │ └── [capability]/ # Single, focused capability
15
+ │ ├── spec.md # WHAT and WHY
16
+ │ └── design.md # HOW (optional, for established patterns)
17
+ └── changes/ # Proposed changes
18
+ ├── [change-name]/ # Descriptive change identifier
19
+ │ ├── proposal.md # Why, what, and impact
20
+ │ ├── tasks.md # Implementation checklist
21
+ │ ├── design.md # Technical decisions (optional)
22
+ │ └── specs/ # Complete future state
23
+ │ └── [capability]/
24
+ │ └── spec.md # Clean markdown (no diff syntax)
25
+ └── archive/ # Completed changes
26
+ └── YYYY-MM-DD-[name]/
27
+ ```
@@ -0,0 +1,22 @@
1
+ # Update Agent Instruction File Name - Tasks
2
+
3
+ ## 1. Rename Instruction File
4
+ - [x] Rename `openspec/README.md` to `openspec/AGENTS.md`
5
+ - [x] Update root references to new path
6
+
7
+ ## 2. Update Templates
8
+ - [x] Rename `src/core/templates/readme-template.ts` to `agents-template.ts`
9
+ - [x] Update exported constant from `readmeTemplate` to `agentsTemplate`
10
+
11
+ ## 3. Adjust CLI Commands
12
+ - [x] Modify `openspec init` to generate `AGENTS.md`
13
+ - [x] Update `openspec update` to refresh `AGENTS.md`
14
+ - [x] Ensure CLAUDE.md markers link to `@openspec/AGENTS.md`
15
+
16
+ ## 4. Update Specifications
17
+ - [x] Modify `cli-init` spec to reference `AGENTS.md`
18
+ - [x] Modify `cli-update` spec to reference `AGENTS.md`
19
+ - [x] Modify `openspec-conventions` spec to include `AGENTS.md` in project structure
20
+
21
+ ## 5. Validation
22
+ - [x] `pnpm test`