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,93 @@
1
+ # Adopt Delta-Based Changes for Specifications
2
+
3
+ ## Why
4
+
5
+ The current approach of storing complete future states in change proposals creates a poor review experience. When reviewing changes on GitHub, reviewers see entire spec files (often 100+ lines) as "added" in green, making it impossible to identify what actually changed. With the recent structured format adoption, we now have clear section boundaries that enable a better approach: storing only additions and modifications.
6
+
7
+ ## What Changes
8
+
9
+ Store only the requirements that actually change, not complete future states:
10
+
11
+ - **ADDED Requirements**: New capabilities being introduced
12
+ - **MODIFIED Requirements**: Existing requirements being changed (must match current header)
13
+ - **REMOVED Requirements**: Deprecated capabilities
14
+ - **RENAMED Requirements**: Explicit header changes (e.g., `FROM: Old Name` → `TO: New Name`)
15
+
16
+ The archive command will programmatically apply these deltas using normalized header matching (trim leading/trailing whitespace) instead of manually copying entire files.
17
+
18
+ ## Impact
19
+
20
+ **Affected specs**: openspec-conventions, cli-archive, cli-diff
21
+
22
+ **Benefits**:
23
+ - GitHub diffs show only actual changes (25 lines instead of 150+)
24
+ - Reviewers immediately see what's being added, modified, or removed
25
+ - Conflicts are more apparent when two changes modify the same requirement
26
+ - Archive command can programmatically apply changes
27
+
28
+ **Format**: Delta format only - all changes must use ADDED/MODIFIED/REMOVED sections.
29
+
30
+ ## Example
31
+
32
+ Instead of storing a 150-line complete future spec, store only:
33
+
34
+ ```markdown
35
+ # User Authentication - Changes
36
+
37
+ ## ADDED Requirements
38
+
39
+ ### Requirement: OAuth Support
40
+ Users SHALL authenticate via OAuth providers including Google and GitHub.
41
+
42
+ #### Scenario: OAuth login flow
43
+ - **WHEN** user selects OAuth provider
44
+ - **THEN** redirect to provider authorization
45
+ - **AND** exchange authorization code for tokens
46
+
47
+ ## MODIFIED Requirements
48
+
49
+ ### Requirement: Session Management
50
+ Sessions SHALL expire after 30 minutes of inactivity.
51
+
52
+ #### Scenario: Inactive session timeout
53
+ - **WHEN** no activity for 30 minutes ← (was 60 minutes)
54
+ - **THEN** invalidate session token
55
+ - **AND** require re-authentication
56
+
57
+ ## RENAMED Requirements
58
+ - FROM: `### Requirement: Basic Authentication`
59
+ - TO: `### Requirement: Email Authentication`
60
+ ```
61
+
62
+ This makes reviews focused and changes explicit.
63
+
64
+ ## Conflict Resolution
65
+
66
+ Git naturally detects conflicts when two changes modify the same requirement header. This is actually better than full-state storage where Git might silently merge incompatible changes.
67
+
68
+ ## Decisions and Product Guidelines
69
+
70
+ To keep the archive flow lean and predictable, the following decisions apply:
71
+
72
+ - New spec creation: When a target spec does not exist, auto-generate a minimal skeleton and insert ADDED requirements only. Skeleton format:
73
+ - `# [Spec Name] Specification`
74
+ - `## Purpose` with placeholder: "TBD — created by archiving change [change-name]. Update Purpose after archive."
75
+ - `## Requirements`
76
+ - If a non-existent spec includes MODIFIED/REMOVED/RENAMED, abort with guidance to create via ADDED-only first.
77
+
78
+ - Requirement identification: Match requirements by exact header `### Requirement: [Name]` with trim-only normalization and case-sensitive comparison. Use a requirement-block extractor that preserves the exact header and captures full content (including scenarios) for both main specs and delta files.
79
+
80
+ - Application order and atomicity: Apply deltas in order RENAMED → REMOVED → MODIFIED → ADDED. Validate all operations first, apply in-memory, and write each spec once. On any validation failure, abort without writing partial results. An aggregated totals line is displayed across all specs: `Totals: + A, ~ M, - R, → N`.
81
+
82
+ - Validation matrix: Enforce that MODIFIED/REMOVED exist; ADDED do not exist; RENAMED FROM exists and TO does not; no duplicates after all operations; and no cross-section conflicts (e.g., same item in MODIFIED and REMOVED). When a rename and modify apply to the same item, MODIFIED must reference the NEW header.
83
+
84
+ - Idempotency: Keep v1 simple. Abort on precondition failures (e.g., ADDED already exists) with clear errors. Do not implement no-op detection in v1.
85
+
86
+ - Output and UX: For each spec, display operation counts using standard symbols `+ ~ - →`. Optionally include a short aggregated totals line at the end. Keep messages concise and actionable.
87
+
88
+ - Error messaging: Standardize messages as `[spec] [operation] failed for header "### Requirement: X" — reason`. On abort, explicitly state: `Aborted. No files were changed.`
89
+ - Subsections: Any subsections under a requirement (e.g., `#### Scenario: ...`) are preserved verbatim during parsing and application.
90
+
91
+ - Backward compatibility: Reject full future-state spec copies for existing specs with guidance to convert to deltas. Allow brand-new specs to be created via ADDED-only deltas using the skeleton above.
92
+
93
+ - Dry-run: Deferred for v1 to keep scope minimal.
@@ -0,0 +1,48 @@
1
+ # CLI Archive Command - Changes
2
+
3
+ ## MODIFIED Requirements
4
+
5
+ ### Requirement: Spec Update Process
6
+
7
+ Before moving the change to archive, the command SHALL apply delta changes to main specs to reflect the deployed reality.
8
+
9
+ #### Scenario: Applying delta changes
10
+
11
+ - **WHEN** archiving a change with delta-based specs
12
+ - **THEN** parse and apply delta changes as defined in openspec-conventions
13
+ - **AND** validate all operations before applying
14
+
15
+ #### Scenario: Validating delta changes
16
+
17
+ - **WHEN** processing delta changes
18
+ - **THEN** perform validations as specified in openspec-conventions
19
+ - **AND** if validation fails, show specific errors and abort
20
+
21
+ #### Scenario: Conflict detection
22
+
23
+ - **WHEN** applying deltas would create duplicate requirement headers
24
+ - **THEN** abort with error message showing the conflict
25
+ - **AND** suggest manual resolution
26
+
27
+ ## ADDED Requirements
28
+
29
+ ### Requirement: Display Output
30
+
31
+ The command SHALL provide clear feedback about delta operations.
32
+
33
+ #### Scenario: Showing delta application
34
+
35
+ - **WHEN** applying delta changes
36
+ - **THEN** display for each spec:
37
+ - Number of requirements added
38
+ - Number of requirements modified
39
+ - Number of requirements removed
40
+ - Number of requirements renamed
41
+ - **AND** use standard output symbols (+ ~ - →) as defined in openspec-conventions:
42
+ ```
43
+ Applying changes to specs/user-auth/spec.md:
44
+ + 2 added
45
+ ~ 3 modified
46
+ - 1 removed
47
+ → 1 renamed
48
+ ```
@@ -0,0 +1,45 @@
1
+ # CLI Diff Command - Changes
2
+
3
+ ## REMOVED Requirements
4
+
5
+ ### Requirement: Display Format
6
+
7
+ The diff command SHALL display unified diff output in text format.
8
+
9
+ **Reason for removal**: The standard unified diff format is replaced by requirement-level side-by-side comparison that better shows semantic changes rather than line-by-line text differences.
10
+
11
+ #### Scenario: Unified diff output (deprecated)
12
+
13
+ - **WHEN** running `openspec diff <change>`
14
+ - **THEN** show a unified text diff of files
15
+ - **AND** include `+`/`-` prefixed lines representing additions and removals
16
+
17
+ ## MODIFIED Requirements
18
+
19
+ ### Requirement: Diff Output
20
+
21
+ The command SHALL show a requirement-level comparison displaying only changed requirements.
22
+
23
+ #### Scenario: Side-by-side comparison of changes
24
+
25
+ - **WHEN** running `openspec diff <change>`
26
+ - **THEN** display only requirements that have changed
27
+ - **AND** show them in a side-by-side format that:
28
+ - Clearly shows the current version on the left
29
+ - Shows the future version on the right
30
+ - Indicates new requirements (not in current)
31
+ - Indicates removed requirements (not in future)
32
+ - Aligns modified requirements for easy comparison
33
+
34
+ ## ADDED Requirements
35
+
36
+ ### Requirement: Validation
37
+
38
+ The command SHALL validate that changes can be applied successfully.
39
+
40
+ #### Scenario: Invalid delta references
41
+
42
+ - **WHEN** delta references non-existent requirement
43
+ - **THEN** show error message with specific requirement
44
+ - **AND** continue showing other valid changes
45
+ - **AND** clearly mark failed changes in the output
@@ -0,0 +1,101 @@
1
+ # OpenSpec Conventions - Changes
2
+
3
+ ## MODIFIED Requirements
4
+
5
+ ### Requirement: Header-Based Requirement Identification
6
+
7
+ Requirement headers SHALL serve as unique identifiers for programmatic matching between current specs and proposed changes.
8
+
9
+ #### Scenario: Matching requirements programmatically
10
+
11
+ - **WHEN** processing delta changes
12
+ - **THEN** use the `### Requirement: [Name]` header as the unique identifier
13
+ - **AND** match using normalized headers: `normalize(header) = trim(header)`
14
+ - **AND** compare headers with case-sensitive equality after normalization
15
+
16
+ #### Scenario: Handling requirement renames
17
+
18
+ - **WHEN** renaming a requirement
19
+ - **THEN** use a special `## RENAMED Requirements` section
20
+ - **AND** specify both old and new names explicitly:
21
+ ```markdown
22
+ ## RENAMED Requirements
23
+ - FROM: `### Requirement: Old Name`
24
+ - TO: `### Requirement: New Name`
25
+ ```
26
+ - **AND** if content also changes, include under MODIFIED using the NEW header
27
+
28
+ #### Scenario: Validating header uniqueness
29
+
30
+ - **WHEN** creating or modifying requirements
31
+ - **THEN** ensure no duplicate headers exist within a spec
32
+ - **AND** validation tools SHALL flag duplicate headers as errors
33
+
34
+ ### Requirement: Change Storage Convention
35
+
36
+ Change proposals SHALL store only the additions, modifications, and removals to specifications, not complete future states.
37
+
38
+ #### Scenario: Creating change proposals with additions
39
+
40
+ - **WHEN** creating a change proposal that adds new requirements
41
+ - **THEN** include only the new requirements under `## ADDED Requirements`
42
+ - **AND** each requirement SHALL include its complete content
43
+ - **AND** use the standard structured format for requirements and scenarios
44
+
45
+ #### Scenario: Creating change proposals with modifications
46
+
47
+ - **WHEN** creating a change proposal that modifies existing requirements
48
+ - **THEN** include the modified requirements under `## MODIFIED Requirements`
49
+ - **AND** use the same header text as in the current spec (normalized)
50
+ - **AND** include the complete modified requirement (not a diff)
51
+ - **AND** optionally annotate what changed with inline comments like `← (was X)`
52
+
53
+ #### Scenario: Creating change proposals with removals
54
+
55
+ - **WHEN** creating a change proposal that removes requirements
56
+ - **THEN** list them under `## REMOVED Requirements`
57
+ - **AND** use the normalized header text for identification
58
+ - **AND** include reason for removal
59
+ - **AND** document any migration path if applicable
60
+
61
+
62
+ The `changes/[name]/specs/` directory SHALL contain:
63
+ - Delta files showing only what changes
64
+ - Sections for ADDED, MODIFIED, REMOVED, and RENAMED requirements
65
+ - Normalized header matching for requirement identification
66
+ - Complete requirements using the structured format
67
+ - Clear indication of change type for each requirement
68
+
69
+ #### Scenario: Using standard output symbols
70
+
71
+ - **WHEN** displaying delta operations in CLI output
72
+ - **THEN** use these standard symbols:
73
+ - `+` for ADDED (green)
74
+ - `~` for MODIFIED (yellow)
75
+ - `-` for REMOVED (red)
76
+ - `→` for RENAMED (cyan)
77
+
78
+ ### Requirement: Archive Process Enhancement
79
+
80
+ The archive process SHALL programmatically apply delta changes to current specifications using header-based matching.
81
+
82
+ #### Scenario: Archiving changes with deltas
83
+
84
+ - **WHEN** archiving a completed change
85
+ - **THEN** the archive command SHALL:
86
+ 1. Parse RENAMED sections first and apply renames
87
+ 2. Parse REMOVED sections and remove by normalized header match
88
+ 3. Parse MODIFIED sections and replace by normalized header match (using new names if renamed)
89
+ 4. Parse ADDED sections and append new requirements
90
+ - **AND** validate that all MODIFIED/REMOVED headers exist in current spec
91
+ - **AND** validate that ADDED headers don't already exist
92
+ - **AND** generate the updated spec in the main specs/ directory
93
+
94
+ #### Scenario: Handling conflicts during archive
95
+
96
+ - **WHEN** delta changes conflict with current spec state
97
+ - **THEN** the archive command SHALL report specific conflicts
98
+ - **AND** require manual resolution before proceeding
99
+ - **AND** provide clear guidance on resolving conflicts
100
+
101
+
@@ -0,0 +1,55 @@
1
+ # Implementation Tasks
2
+
3
+ ## 1. Update Conventions
4
+ - [x] 1.1 Update openspec-conventions spec with delta-based approach
5
+ - [x] 1.2 Add Header-Based Requirement Identification
6
+ - [x] 1.3 Define ADDED/MODIFIED/REMOVED/RENAMED sections
7
+ - [x] 1.4 Document standard output symbols (+ ~ - →)
8
+ - [x] 1.5 Update openspec/README.md with delta-based conventions
9
+ - [x] 1.6 Update examples to use delta format
10
+
11
+ ## 2. Update Diff Command
12
+ - [ ] 2.1 Update cli-diff spec with requirement-level comparison
13
+ - [ ] 2.2 Parse specs into requirement-level structures
14
+ - [ ] 2.3 Apply deltas to generate future state
15
+ - [ ] 2.4 Implement side-by-side comparison view (changes only)
16
+ - [ ] 2.5 Add tests for requirement-level comparison
17
+ - [ ] 2.6 Add tests for side-by-side view formatting
18
+
19
+ ## 3. Update Archive Command
20
+ - [x] 3.1 Update cli-archive spec with delta processing behavior
21
+ - [x] 3.2 Implement requirement-block extractor that preserves exact headers (`### Requirement: [Name]`) and captures full content (including scenarios)
22
+ - [x] 3.3 Implement normalized header matching (trim-only, case-sensitive)
23
+ - [x] 3.4 Parse delta sections (ADDED/MODIFIED/REMOVED/RENAMED)
24
+ - [x] 3.5 New spec creation when target spec does not exist
25
+ - [x] 3.5.1 Auto-generate minimal skeleton: `# [Spec Name] Specification`, `## Purpose` placeholder, `## Requirements`
26
+ - [x] 3.5.2 Allow only ADDED operations for non-existent specs; abort if MODIFIED/REMOVED/RENAMED present
27
+ - [x] 3.6 Apply changes in order: RENAMED → REMOVED → MODIFIED → ADDED
28
+ - [x] 3.7 Validation and conflict checks
29
+ - [x] 3.7.1 MODIFIED/REMOVED requirements exist (after applying rename mappings)
30
+ - [x] 3.7.2 ADDED requirements don't already exist (consider post-rename state)
31
+ - [x] 3.7.3 RENAMED FROM headers exist; TO headers don't (including collisions with ADDED)
32
+ - [x] 3.7.4 No duplicate headers within specs after all operations
33
+ - [x] 3.7.5 Detect cross-section conflicts (e.g., same requirement in MODIFIED and REMOVED)
34
+ - [x] 3.7.6 When a rename exists, require MODIFIED to reference the NEW header
35
+ - [x] 3.8 Atomic updates
36
+ - [x] 3.8.1 Validate all deltas first; stage updates in-memory per spec
37
+ - [x] 3.8.2 Single write per spec; abort entire archive on any validation failure (no partial writes)
38
+ - [x] 3.9 Output and error messaging
39
+ - [x] 3.9.1 Display per-spec operation counts with symbols: `+` added, `~` modified, `-` removed, `→` renamed
40
+ - [x] 3.9.2 Optionally display an aggregated totals line across all specs
41
+ - [x] 3.9.3 Standardize error message format: `[spec] [operation] failed for header "### Requirement: X" — reason`; end with `Aborted. No files were changed.` on failure
42
+ - [x] 3.10 Idempotency behavior (v1): abort on precondition failures (e.g., ADDED already exists); do not implement no-op detection
43
+ - [x] 3.11 Tests
44
+ - [x] 3.11.1 Header normalization (trim-only) matching
45
+ - [x] 3.11.2 Apply in correct order (RENAMED → REMOVED → MODIFIED → ADDED)
46
+ - [x] 3.11.3 Validation edge cases (missing headers, duplicates, rename collisions, conflicting sections)
47
+ - [x] 3.11.4 Rename + modify interplay (MODIFIED uses new header)
48
+ - [x] 3.11.5 New spec creation via skeleton
49
+ - [x] 3.11.6 Multi-spec mixed operations with independent validation and write
50
+
51
+ ## Notes
52
+ - Archive command is critical path - must work reliably
53
+ - All new changes must use delta format
54
+ - Header normalization: normalize(header) = trim(header)
55
+ - Diff command shows only changed requirements in side-by-side comparison
@@ -0,0 +1,19 @@
1
+ # Design: Verb–Noun CLI Structure Adoption
2
+
3
+ ## Overview
4
+ We will make verb commands (`list`, `show`, `validate`, `diff`, `archive`) the primary interface and keep noun commands (`spec`, `change`) as deprecated aliases for one release.
5
+
6
+ ## Decisions
7
+
8
+ 1. Keep routing centralized in `src/cli/index.ts`.
9
+ 2. Add `--specs`/`--changes` to `openspec list`, with `--changes` as default.
10
+ 3. Show deprecation warnings for `openspec change list` and, more generally, for any `openspec change ...` and `openspec spec ...` subcommands.
11
+ 4. Do not change `show`/`validate` behavior beyond help text; they already support `--type` for disambiguation.
12
+
13
+ ## Backward Compatibility
14
+ All noun-based commands continue to work with clear deprecation warnings directing users to verb-first equivalents.
15
+
16
+ ## Out of Scope
17
+ JSON output parity for `openspec list` across modes and `show --specs/--changes` discovery are follow-ups.
18
+
19
+
@@ -0,0 +1,67 @@
1
+ # Change: Adopt Verb–Noun CLI Structure (Deprecate Noun-Based Commands)
2
+
3
+ ## Why
4
+
5
+ Most widely used CLIs (git, docker, kubectl) start with an action (verb) followed by the object (noun). This matches how users think: “do X to Y”. Using verbs as top-level commands improves clarity, discoverability, and extensibility.
6
+
7
+ ## What Changes
8
+
9
+ - Promote top-level verb commands as primary entry points: `list`, `show`, `validate`, `diff`, `archive`.
10
+ - Deprecate noun-based top-level commands: `openspec spec ...` and `openspec change ...`.
11
+ - Introduce consistent noun scoping via flags where applicable (e.g., `--changes`, `--specs`) and keep smart defaults.
12
+ - Clarify disambiguation for `show` and `validate` when names collide.
13
+
14
+ ### Mappings (From → To)
15
+
16
+ - **List**
17
+ - From: `openspec change list`
18
+ - To: `openspec list --changes` (default), or `openspec list --specs`
19
+
20
+ - **Show**
21
+ - From: `openspec spec show <spec-id>` / `openspec change show <change-id>`
22
+ - To: `openspec show <item-id>` with auto-detect, use `--type spec|change` if ambiguous
23
+
24
+ - **Validate**
25
+ - From: `openspec spec validate <spec-id>` / `openspec change validate <change-id>`
26
+ - To: `openspec validate <item-id> --type spec|change`, or bulk: `openspec validate --specs` / `--changes` / `--all`
27
+
28
+ ### Backward Compatibility
29
+
30
+ - Keep `openspec spec` and `openspec change` available with deprecation warnings for one release cycle.
31
+ - Update help text to point users to the verb–noun alternatives.
32
+
33
+ ## Impact
34
+
35
+ - **Affected specs**:
36
+ - `cli-list`: Add support for `--specs` and explicit `--changes` (default remains changes)
37
+ - `openspec-conventions`: Add explicit requirement establishing verb–noun CLI design and deprecation guidance
38
+ - **Affected code**:
39
+ - `src/cli/index.ts`: Un-deprecate top-level `list`; mark `change list` as deprecated; ensure help text and warnings align
40
+ - `src/core/list.ts`: Support listing specs via `--specs` and default to changes; shared output shape
41
+ - Optional follow-ups: tighten `show`/`validate` help and ambiguity handling
42
+
43
+ ## Explicit Changes
44
+
45
+ **CLI Design**
46
+ - From: Mixed model with nouns (`spec`, `change`) and some top-level verbs; `openspec list` currently deprecated
47
+ - To: Verbs as primary: `openspec list|show|validate|diff|archive`; nouns scoped via flags or item ids; noun commands deprecated
48
+ - Reason: Align with common CLIs; improve UX; simpler mental model
49
+ - Impact: Non-breaking with deprecation period; users migrate incrementally
50
+
51
+ **Listing Behavior**
52
+ - From: `openspec change list` (primary), `openspec list` (deprecated)
53
+ - To: `openspec list` as primary, defaulting to `--changes`; add `--specs` to list specs
54
+ - Reason: Consistent verb–noun style; better discoverability
55
+ - Impact: New option; preserves existing behavior via default
56
+
57
+ ## Rollout and Deprecation Policy
58
+
59
+ - Show deprecation warnings on noun-based commands for one release.
60
+ - Document new usage in `openspec/README.md` and CLI help.
61
+ - After one release, consider removing noun-based commands, or keep as thin aliases without warnings.
62
+
63
+ ## Open Questions
64
+
65
+ - Should `show` also accept `--changes`/`--specs` for discovery without an id? (Out of scope here; current auto-detect and `--type` remain.)
66
+
67
+
@@ -0,0 +1,57 @@
1
+ # Delta: CLI List Command
2
+
3
+ ## MODIFIED Requirements
4
+
5
+ ### Requirement: Command Execution
6
+ The command SHALL scan and analyze either active changes or specs based on the selected mode.
7
+
8
+ #### Scenario: Scanning for changes (default)
9
+ - **WHEN** `openspec list` is executed without flags
10
+ - **THEN** scan the `openspec/changes/` directory for change directories
11
+ - **AND** exclude the `archive/` subdirectory from results
12
+ - **AND** parse each change's `tasks.md` file to count task completion
13
+
14
+ #### Scenario: Scanning for specs
15
+ - **WHEN** `openspec list --specs` is executed
16
+ - **THEN** scan the `openspec/specs/` directory for capabilities
17
+ - **AND** read each capability's `spec.md`
18
+ - **AND** parse requirements to compute requirement counts
19
+
20
+ ### Requirement: Output Format
21
+ The command SHALL display items in a clear, readable table format with mode-appropriate progress or counts.
22
+
23
+ #### Scenario: Displaying change list (default)
24
+ - **WHEN** displaying the list of changes
25
+ - **THEN** show a table with columns:
26
+ - Change name (directory name)
27
+ - Task progress (e.g., "3/5 tasks" or "✓ Complete")
28
+
29
+ #### Scenario: Displaying spec list
30
+ - **WHEN** displaying the list of specs
31
+ - **THEN** show a table with columns:
32
+ - Spec id (directory name)
33
+ - Requirement count (e.g., "requirements 12")
34
+
35
+ ### Requirement: Empty State
36
+ The command SHALL provide clear feedback when no items are present for the selected mode.
37
+
38
+ #### Scenario: Handling empty state (changes)
39
+ - **WHEN** no active changes exist (only archive/ or empty changes/)
40
+ - **THEN** display: "No active changes found."
41
+
42
+ #### Scenario: Handling empty state (specs)
43
+ - **WHEN** no specs directory exists or contains no capabilities
44
+ - **THEN** display: "No specs found."
45
+
46
+ ### Requirement: Flags
47
+ The command SHALL accept flags to select the noun being listed.
48
+
49
+ #### Scenario: Selecting specs
50
+ - **WHEN** `--specs` is provided
51
+ - **THEN** list specs instead of changes
52
+
53
+ #### Scenario: Selecting changes
54
+ - **WHEN** `--changes` is provided
55
+ - **THEN** list changes explicitly (same as default behavior)
56
+
57
+
@@ -0,0 +1,23 @@
1
+ # Delta: OpenSpec Conventions — Verb–Noun CLI Design
2
+
3
+ ## ADDED Requirements
4
+
5
+ ### Requirement: Verb–Noun CLI Command Structure
6
+ OpenSpec CLI design SHALL use verbs as top-level commands with nouns provided as arguments or flags for scoping.
7
+
8
+ #### Scenario: Verb-first command discovery
9
+ - **WHEN** a user runs a command like `openspec list`
10
+ - **THEN** the verb communicates the action clearly
11
+ - **AND** nouns refine scope via flags or arguments (e.g., `--changes`, `--specs`)
12
+
13
+ #### Scenario: Backward compatibility for noun commands
14
+ - **WHEN** users run noun-prefixed commands such as `openspec spec ...` or `openspec change ...`
15
+ - **THEN** the CLI SHALL continue to support them for at least one release
16
+ - **AND** display a deprecation warning that points to verb-first alternatives
17
+
18
+ #### Scenario: Disambiguation guidance
19
+ - **WHEN** item names are ambiguous between changes and specs
20
+ - **THEN** `openspec show` and `openspec validate` SHALL accept `--type spec|change`
21
+ - **AND** the help text SHALL document this clearly
22
+
23
+
@@ -0,0 +1,27 @@
1
+ # Implementation Tasks
2
+
3
+ ## 1. CLI Behavior and Help
4
+ - [x] 1.1 Un-deprecate top-level `openspec list`; mark `change list` as deprecated with warning that points to `openspec list`
5
+ - [x] 1.2 Add support to list specs via `openspec list --specs` and keep `--changes` as default
6
+ - [x] 1.3 Update command descriptions and `--help` output to emphasize verb–noun pattern
7
+ - [x] 1.4 Keep `openspec spec ...` and `openspec change ...` commands working but print deprecation notices
8
+
9
+ ## 2. Core List Logic
10
+ - [x] 2.1 Extend `src/core/list.ts` to accept a mode: `changes` (default) or `specs`
11
+ - [x] 2.2 Implement `specs` listing: scan `openspec/specs/*/spec.md`, compute requirement count via parser, format output consistently
12
+ - [x] 2.3 Share output structure for both modes; preserve current text table; ensure JSON parity in future change
13
+
14
+ ## 3. Specs and Conventions
15
+ - [x] 3.1 Update `openspec/specs/cli-list/spec.md` to document `--specs` (and default to changes)
16
+ - [x] 3.2 Update `openspec/specs/openspec-conventions/spec.md` with a requirement for verb–noun CLI design and deprecation guidance
17
+
18
+ ## 4. Tests and Docs
19
+ - [x] 4.1 Update tests: ensure `openspec list` works for changes and specs; keep `change list` tests but assert warning
20
+ - [ ] 4.2 Update README and any usage docs to show new primary commands
21
+ - [ ] 4.3 Add migration notes in repo CHANGELOG or README
22
+
23
+ ## 5. Follow-ups (Optional, not in this change)
24
+ - [ ] 5.1 Consider `openspec show --specs/--changes` for discovery without ids
25
+ - [ ] 5.2 Consider JSON output for `openspec list` with `--json` for both modes
26
+
27
+
@@ -0,0 +1,20 @@
1
+ ## Why
2
+
3
+ Currently, users must validate changes and specs individually by specifying each ID. This creates friction when:
4
+ - Teams want to validate all changes/specs before a release
5
+ - Developers need to ensure consistency across multiple related changes
6
+ - Users run validation commands without arguments and receive errors instead of helpful guidance
7
+ - The subcommand structure requires users to know in advance whether they're validating a change or spec
8
+
9
+ ## What Changes
10
+
11
+ - Add new top-level `validate` command with intuitive flags (--all, --changes, --specs)
12
+ - Enhance existing `change validate` and `spec validate` to support interactive selection (backwards compatibility)
13
+ - Interactive selection by default when no arguments provided
14
+ - Support direct item validation: `openspec validate <item>` with automatic type detection
15
+
16
+ ## Impact
17
+
18
+ - New specs to create: cli-validate
19
+ - Specs to enhance: cli-change, cli-spec (for backwards compatibility)
20
+ - Affected code: src/cli/index.ts, src/commands/validate.ts (new), src/commands/spec.ts, src/commands/change.ts
@@ -0,0 +1,22 @@
1
+ # CLI Change Command Spec
2
+
3
+ ## ADDED Requirements
4
+
5
+ ### Requirement: Interactive validation selection
6
+
7
+ The change validate command SHALL support interactive selection when no change name is provided.
8
+
9
+ #### Scenario: Interactive change selection for validation
10
+
11
+ - **WHEN** executing `openspec change validate` without arguments
12
+ - **THEN** display an interactive list of available changes
13
+ - **AND** allow the user to select a change to validate
14
+ - **AND** validate the selected change
15
+
16
+ #### Scenario: Non-interactive fallback keeps current behavior
17
+
18
+ - **GIVEN** stdin is not a TTY or `--no-interactive` is provided or environment variable `OPEN_SPEC_INTERACTIVE=0`
19
+ - **WHEN** executing `openspec change validate` without a change name
20
+ - **THEN** do not prompt interactively
21
+ - **AND** print the existing hint including available change IDs
22
+ - **AND** set `process.exitCode = 1`
@@ -0,0 +1,23 @@
1
+ # CLI Spec Command Spec
2
+
3
+ ## ADDED Requirements
4
+
5
+ ### Requirement: Interactive spec validation
6
+
7
+ The spec validate command SHALL support interactive selection when no spec-id is provided.
8
+
9
+ #### Scenario: Interactive spec selection for validation
10
+
11
+ - **WHEN** executing `openspec spec validate` without arguments
12
+ - **THEN** display an interactive list of available specs
13
+ - **AND** allow the user to select a spec to validate
14
+ - **AND** validate the selected spec
15
+ - **AND** maintain all existing validation options (--strict, --json)
16
+
17
+ #### Scenario: Non-interactive fallback keeps current behavior
18
+
19
+ - **GIVEN** stdin is not a TTY or `--no-interactive` is provided or environment variable `OPEN_SPEC_INTERACTIVE=0`
20
+ - **WHEN** executing `openspec spec validate` without a spec-id
21
+ - **THEN** do not prompt interactively
22
+ - **AND** print the existing error message for missing spec-id
23
+ - **AND** set non-zero exit code