@codewalla_india/openspec 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (333) hide show
  1. package/LICENSE +22 -22
  2. package/README.md +272 -230
  3. package/bin/openspec.js +5 -5
  4. package/dist/cli/index.js +99 -62
  5. package/dist/commands/change.d.ts +0 -2
  6. package/dist/commands/change.js +107 -86
  7. package/dist/commands/config.js +14 -16
  8. package/dist/commands/doctor.js +9 -4
  9. package/dist/commands/feedback.js +79 -30
  10. package/dist/commands/modify.d.ts +26 -0
  11. package/dist/commands/modify.js +147 -0
  12. package/dist/commands/schema.js +170 -91
  13. package/dist/commands/show.js +5 -2
  14. package/dist/commands/spec.js +49 -29
  15. package/dist/commands/store.js +15 -21
  16. package/dist/commands/validate.d.ts +8 -0
  17. package/dist/commands/validate.js +43 -20
  18. package/dist/commands/workflow/index.d.ts +2 -2
  19. package/dist/commands/workflow/index.js +1 -1
  20. package/dist/commands/workflow/instructions.d.ts +6 -26
  21. package/dist/commands/workflow/instructions.js +183 -376
  22. package/dist/commands/workflow/new-change.d.ts +0 -4
  23. package/dist/commands/workflow/new-change.js +10 -28
  24. package/dist/commands/workflow/shared.d.ts +34 -19
  25. package/dist/commands/workflow/shared.js +34 -4
  26. package/dist/commands/workflow/status.js +10 -32
  27. package/dist/commands/workflow/templates.js +15 -5
  28. package/dist/commands/workset.d.ts +2 -2
  29. package/dist/commands/workset.js +19 -22
  30. package/dist/comprehension-quiz/fingerprint.d.ts +39 -0
  31. package/dist/comprehension-quiz/fingerprint.js +84 -0
  32. package/dist/comprehension-quiz/index.d.ts +42 -0
  33. package/dist/comprehension-quiz/index.js +47 -0
  34. package/dist/comprehension-quiz/pass-record.d.ts +44 -0
  35. package/dist/comprehension-quiz/pass-record.js +98 -0
  36. package/dist/comprehension-quiz/providers/anthropic.d.ts +34 -0
  37. package/dist/comprehension-quiz/providers/anthropic.js +53 -0
  38. package/dist/comprehension-quiz/providers/factory.d.ts +44 -0
  39. package/dist/comprehension-quiz/providers/factory.js +174 -0
  40. package/dist/comprehension-quiz/providers/interface.d.ts +59 -0
  41. package/dist/comprehension-quiz/providers/interface.js +63 -0
  42. package/dist/comprehension-quiz/providers/local.d.ts +34 -0
  43. package/dist/comprehension-quiz/providers/local.js +53 -0
  44. package/dist/comprehension-quiz/providers/ollama.d.ts +34 -0
  45. package/dist/comprehension-quiz/providers/ollama.js +53 -0
  46. package/dist/comprehension-quiz/providers/openai.d.ts +34 -0
  47. package/dist/comprehension-quiz/providers/openai.js +53 -0
  48. package/dist/comprehension-quiz/question-generator.d.ts +69 -0
  49. package/dist/comprehension-quiz/question-generator.js +141 -0
  50. package/dist/comprehension-quiz/quiz-executor.d.ts +70 -0
  51. package/dist/comprehension-quiz/quiz-executor.js +165 -0
  52. package/dist/comprehension-quiz/types.d.ts +115 -0
  53. package/dist/comprehension-quiz/types.js +11 -0
  54. package/dist/core/archive.d.ts +14 -1
  55. package/dist/core/archive.js +1350 -190
  56. package/dist/core/artifact-graph/graph.d.ts +28 -9
  57. package/dist/core/artifact-graph/graph.js +94 -43
  58. package/dist/core/artifact-graph/index.d.ts +1 -1
  59. package/dist/core/artifact-graph/index.js +1 -1
  60. package/dist/core/artifact-graph/instruction-loader.d.ts +30 -3
  61. package/dist/core/artifact-graph/instruction-loader.js +70 -12
  62. package/dist/core/artifact-graph/outputs.d.ts +1 -0
  63. package/dist/core/artifact-graph/outputs.js +67 -5
  64. package/dist/core/artifact-graph/resolver.d.ts +14 -0
  65. package/dist/core/artifact-graph/resolver.js +69 -15
  66. package/dist/core/artifact-graph/types.js +21 -3
  67. package/dist/core/available-tools.d.ts +2 -2
  68. package/dist/core/available-tools.js +14 -3
  69. package/dist/core/change-metadata/schema.d.ts +2 -0
  70. package/dist/core/change-metadata/schema.js +13 -0
  71. package/dist/core/change-status-policy.d.ts +10 -1
  72. package/dist/core/change-status-policy.js +30 -2
  73. package/dist/core/command-generation/adapters/amazon-q.d.ts +4 -0
  74. package/dist/core/command-generation/adapters/amazon-q.js +11 -5
  75. package/dist/core/command-generation/adapters/antigravity.js +6 -5
  76. package/dist/core/command-generation/adapters/auggie.js +7 -6
  77. package/dist/core/command-generation/adapters/bob.d.ts +5 -1
  78. package/dist/core/command-generation/adapters/bob.js +11 -10
  79. package/dist/core/command-generation/adapters/claude.d.ts +1 -1
  80. package/dist/core/command-generation/adapters/claude.js +12 -17
  81. package/dist/core/command-generation/adapters/cline.js +5 -5
  82. package/dist/core/command-generation/adapters/codebuddy.js +8 -7
  83. package/dist/core/command-generation/adapters/continue.js +8 -7
  84. package/dist/core/command-generation/adapters/costrict.js +7 -6
  85. package/dist/core/command-generation/adapters/crush.js +9 -9
  86. package/dist/core/command-generation/adapters/cursor.js +8 -8
  87. package/dist/core/command-generation/adapters/devin.d.ts +19 -0
  88. package/dist/core/command-generation/adapters/devin.js +36 -0
  89. package/dist/core/command-generation/adapters/factory.js +7 -6
  90. package/dist/core/command-generation/adapters/gemini.js +40 -5
  91. package/dist/core/command-generation/adapters/github-copilot.js +6 -5
  92. package/dist/core/command-generation/adapters/iflow.js +9 -8
  93. package/dist/core/command-generation/adapters/index.d.ts +4 -2
  94. package/dist/core/command-generation/adapters/index.js +4 -2
  95. package/dist/core/command-generation/adapters/junie.js +6 -5
  96. package/dist/core/command-generation/adapters/kilocode.js +1 -1
  97. package/dist/core/command-generation/adapters/kiro.js +6 -5
  98. package/dist/core/command-generation/adapters/lingma.js +9 -9
  99. package/dist/core/command-generation/adapters/oh-my-pi.d.ts +21 -0
  100. package/dist/core/command-generation/adapters/oh-my-pi.js +42 -0
  101. package/dist/core/command-generation/adapters/opencode.js +6 -8
  102. package/dist/core/command-generation/adapters/pi.d.ts +2 -2
  103. package/dist/core/command-generation/adapters/pi.js +7 -10
  104. package/dist/core/command-generation/adapters/qoder.js +9 -9
  105. package/dist/core/command-generation/adapters/qwen.d.ts +7 -3
  106. package/dist/core/command-generation/adapters/qwen.js +14 -9
  107. package/dist/core/command-generation/adapters/roocode.d.ts +4 -4
  108. package/dist/core/command-generation/adapters/roocode.js +9 -9
  109. package/dist/core/command-generation/adapters/trae.d.ts +13 -0
  110. package/dist/core/command-generation/adapters/trae.js +28 -0
  111. package/dist/core/command-generation/adapters/zcode.d.ts +16 -0
  112. package/dist/core/command-generation/adapters/zcode.js +33 -0
  113. package/dist/core/command-generation/generator.d.ts +8 -0
  114. package/dist/core/command-generation/generator.js +15 -1
  115. package/dist/core/command-generation/index.d.ts +1 -1
  116. package/dist/core/command-generation/index.js +1 -1
  117. package/dist/core/command-generation/invocation.d.ts +73 -0
  118. package/dist/core/command-generation/invocation.js +77 -0
  119. package/dist/core/command-generation/registry.js +8 -4
  120. package/dist/core/command-generation/types.d.ts +9 -2
  121. package/dist/core/command-generation/yaml.d.ts +20 -6
  122. package/dist/core/command-generation/yaml.js +31 -21
  123. package/dist/core/command-surface.d.ts +15 -0
  124. package/dist/core/command-surface.js +33 -0
  125. package/dist/core/completions/command-registry.js +16 -61
  126. package/dist/core/completions/generators/bash-generator.js +41 -41
  127. package/dist/core/completions/generators/fish-generator.js +7 -7
  128. package/dist/core/completions/generators/powershell-generator.js +44 -37
  129. package/dist/core/completions/generators/zsh-generator.js +33 -33
  130. package/dist/core/completions/installers/zsh-installer.d.ts +9 -0
  131. package/dist/core/completions/installers/zsh-installer.js +20 -4
  132. package/dist/core/completions/templates/bash-templates.js +24 -24
  133. package/dist/core/completions/templates/fish-templates.js +38 -38
  134. package/dist/core/completions/templates/powershell-templates.js +28 -28
  135. package/dist/core/completions/templates/zsh-templates.js +39 -39
  136. package/dist/core/config-prompts.d.ts +1 -1
  137. package/dist/core/config-prompts.js +14 -1
  138. package/dist/core/config-schema.d.ts +10 -1
  139. package/dist/core/config-schema.js +67 -1
  140. package/dist/core/config.d.ts +15 -0
  141. package/dist/core/config.js +46 -5
  142. package/dist/core/file-state.js +56 -24
  143. package/dist/core/github-copilot/cloud-agent.d.ts +95 -0
  144. package/dist/core/github-copilot/cloud-agent.js +497 -0
  145. package/dist/core/global-config.d.ts +16 -0
  146. package/dist/core/init.d.ts +58 -0
  147. package/dist/core/init.js +474 -73
  148. package/dist/core/legacy-cleanup.d.ts +59 -0
  149. package/dist/core/legacy-cleanup.js +253 -24
  150. package/dist/core/list.js +23 -16
  151. package/dist/core/migration.d.ts +73 -1
  152. package/dist/core/migration.js +360 -11
  153. package/dist/core/modify/conflict-detector.d.ts +26 -0
  154. package/dist/core/modify/conflict-detector.js +62 -0
  155. package/dist/core/modify/dependency-propagator.d.ts +38 -0
  156. package/dist/core/modify/dependency-propagator.js +103 -0
  157. package/dist/core/modify/history-tracker.d.ts +34 -0
  158. package/dist/core/modify/history-tracker.js +114 -0
  159. package/dist/core/modify/index.d.ts +7 -0
  160. package/dist/core/modify/index.js +7 -0
  161. package/dist/core/onboarding-commands.d.ts +30 -0
  162. package/dist/core/onboarding-commands.js +38 -0
  163. package/dist/core/openspec-root.js +18 -15
  164. package/dist/core/parsers/change-parser.d.ts +17 -2
  165. package/dist/core/parsers/change-parser.js +35 -21
  166. package/dist/core/parsers/code-fence.d.ts +15 -0
  167. package/dist/core/parsers/code-fence.js +49 -0
  168. package/dist/core/parsers/markdown-parser.d.ts +0 -3
  169. package/dist/core/parsers/markdown-parser.js +7 -60
  170. package/dist/core/parsers/requirement-blocks.d.ts +29 -0
  171. package/dist/core/parsers/requirement-blocks.js +150 -31
  172. package/dist/core/parsers/requirement-text.d.ts +48 -0
  173. package/dist/core/parsers/requirement-text.js +98 -0
  174. package/dist/core/parsers/spec-structure.d.ts +1 -1
  175. package/dist/core/parsers/spec-structure.js +20 -30
  176. package/dist/core/profile-sync-drift.d.ts +0 -8
  177. package/dist/core/profile-sync-drift.js +49 -50
  178. package/dist/core/profiles.d.ts +2 -2
  179. package/dist/core/profiles.js +2 -2
  180. package/dist/core/project-config.d.ts +27 -18
  181. package/dist/core/project-config.js +101 -34
  182. package/dist/core/references.js +42 -4
  183. package/dist/core/relationship-health.d.ts +8 -0
  184. package/dist/core/relationship-health.js +13 -0
  185. package/dist/core/root-selection.d.ts +9 -6
  186. package/dist/core/root-selection.js +42 -5
  187. package/dist/core/schemas/base.schema.js +7 -2
  188. package/dist/core/shared/allowed-tools.d.ts +12 -0
  189. package/dist/core/shared/allowed-tools.js +12 -0
  190. package/dist/core/shared/index.d.ts +1 -0
  191. package/dist/core/shared/index.js +1 -0
  192. package/dist/core/shared/skill-content-equivalence.d.ts +7 -0
  193. package/dist/core/shared/skill-content-equivalence.js +41 -0
  194. package/dist/core/shared/skill-generation.js +17 -13
  195. package/dist/core/shared/skill-paths.d.ts +13 -0
  196. package/dist/core/shared/skill-paths.js +23 -0
  197. package/dist/core/shared/tool-detection.d.ts +27 -7
  198. package/dist/core/shared/tool-detection.js +167 -37
  199. package/dist/core/shared-skill-target.d.ts +16 -0
  200. package/dist/core/shared-skill-target.js +156 -0
  201. package/dist/core/specs-apply.d.ts +80 -33
  202. package/dist/core/specs-apply.js +667 -145
  203. package/dist/core/store/git.d.ts +13 -0
  204. package/dist/core/store/git.js +24 -0
  205. package/dist/core/store/operations.js +20 -0
  206. package/dist/core/templates/skill-templates.d.ts +3 -2
  207. package/dist/core/templates/skill-templates.js +3 -2
  208. package/dist/core/templates/workflows/apply-change.d.ts +10 -0
  209. package/dist/core/templates/workflows/apply-change.js +186 -323
  210. package/dist/core/templates/workflows/archive-change.js +387 -260
  211. package/dist/core/templates/workflows/bulk-archive-change.js +655 -475
  212. package/dist/core/templates/workflows/continue-change.js +210 -219
  213. package/dist/core/templates/workflows/explore.js +479 -443
  214. package/dist/core/templates/workflows/feedback.js +97 -97
  215. package/dist/core/templates/workflows/ff-change.js +200 -191
  216. package/dist/core/templates/workflows/modify-change.d.ts +4 -1
  217. package/dist/core/templates/workflows/modify-change.js +237 -115
  218. package/dist/core/templates/workflows/new-change.js +127 -134
  219. package/dist/core/templates/workflows/onboard.js +548 -542
  220. package/dist/core/templates/workflows/propose.js +273 -217
  221. package/dist/core/templates/workflows/store-selection.d.ts +1 -1
  222. package/dist/core/templates/workflows/store-selection.js +1 -1
  223. package/dist/core/templates/workflows/sync-specs.js +500 -273
  224. package/dist/core/templates/workflows/update-change.d.ts +10 -0
  225. package/dist/core/templates/workflows/update-change.js +177 -0
  226. package/dist/core/templates/workflows/verify-change.js +324 -326
  227. package/dist/core/update.d.ts +40 -5
  228. package/dist/core/update.js +411 -96
  229. package/dist/core/validation/constants.d.ts +4 -1
  230. package/dist/core/validation/constants.js +4 -1
  231. package/dist/core/validation/plan-validator.d.ts +8 -0
  232. package/dist/core/validation/plan-validator.js +45 -0
  233. package/dist/core/validation/task-numbering.d.ts +16 -0
  234. package/dist/core/validation/task-numbering.js +57 -0
  235. package/dist/core/validation/validator.d.ts +27 -3
  236. package/dist/core/validation/validator.js +337 -48
  237. package/dist/core/version-check.d.ts +152 -0
  238. package/dist/core/version-check.js +731 -0
  239. package/dist/core/view.js +13 -18
  240. package/dist/prompts/searchable-multi-select.js +1 -1
  241. package/dist/telemetry/caller-detection.d.ts +27 -0
  242. package/dist/telemetry/caller-detection.js +85 -0
  243. package/dist/telemetry/caller-detection.test.d.ts +5 -0
  244. package/dist/telemetry/config.d.ts +48 -2
  245. package/dist/telemetry/config.js +113 -11
  246. package/dist/telemetry/config.test.d.ts +5 -0
  247. package/dist/telemetry/deduplication.d.ts +35 -0
  248. package/dist/telemetry/deduplication.js +82 -0
  249. package/dist/telemetry/deduplication.test.d.ts +5 -0
  250. package/dist/telemetry/identity.d.ts +62 -22
  251. package/dist/telemetry/identity.js +147 -102
  252. package/dist/telemetry/index.d.ts +126 -15
  253. package/dist/telemetry/index.js +569 -37
  254. package/dist/telemetry/sanitization.d.ts +40 -0
  255. package/dist/telemetry/sanitization.js +114 -0
  256. package/dist/telemetry/sanitization.test.d.ts +5 -0
  257. package/dist/telemetry/throttling.d.ts +20 -0
  258. package/dist/telemetry/throttling.js +70 -0
  259. package/dist/ui/welcome-screen.d.ts +9 -1
  260. package/dist/ui/welcome-screen.js +91 -38
  261. package/dist/utils/change-metadata.d.ts +43 -0
  262. package/dist/utils/change-metadata.js +123 -7
  263. package/dist/utils/change-utils.d.ts +10 -4
  264. package/dist/utils/change-utils.js +20 -13
  265. package/dist/utils/ci.d.ts +12 -0
  266. package/dist/utils/ci.js +16 -0
  267. package/dist/utils/command-references.d.ts +92 -6
  268. package/dist/utils/command-references.js +180 -7
  269. package/dist/utils/date.d.ts +8 -0
  270. package/dist/utils/date.js +13 -0
  271. package/dist/utils/file-system.d.ts +10 -0
  272. package/dist/utils/file-system.js +70 -0
  273. package/dist/utils/index.d.ts +1 -1
  274. package/dist/utils/index.js +1 -1
  275. package/dist/utils/interactive.d.ts +23 -0
  276. package/dist/utils/interactive.js +32 -0
  277. package/dist/utils/item-discovery.d.ts +19 -0
  278. package/dist/utils/item-discovery.js +30 -48
  279. package/dist/utils/shell-detection.d.ts +1 -1
  280. package/dist/utils/shell-detection.js +64 -11
  281. package/dist/utils/spec-discovery.d.ts +40 -0
  282. package/dist/utils/spec-discovery.js +115 -0
  283. package/dist/utils/task-progress.d.ts +29 -1
  284. package/dist/utils/task-progress.js +109 -15
  285. package/package.json +96 -84
  286. package/schemas/spec-driven/schema.yaml +252 -184
  287. package/schemas/spec-driven/templates/design.md +19 -19
  288. package/schemas/spec-driven/templates/plan-template.md +91 -0
  289. package/schemas/spec-driven/templates/proposal.md +29 -24
  290. package/schemas/spec-driven/templates/spec.md +11 -8
  291. package/schemas/spec-driven/templates/tasks.md +9 -9
  292. package/scripts/postinstall.js +83 -83
  293. package/dist/core/command-generation/adapters/codex.d.ts +0 -16
  294. package/dist/core/command-generation/adapters/codex.js +0 -39
  295. package/dist/core/command-generation/adapters/windsurf.d.ts +0 -14
  296. package/dist/core/command-generation/adapters/windsurf.js +0 -38
  297. package/dist/core/comprehension/config.d.ts +0 -20
  298. package/dist/core/comprehension/config.js +0 -23
  299. package/dist/core/comprehension/fingerprint.d.ts +0 -14
  300. package/dist/core/comprehension/fingerprint.js +0 -33
  301. package/dist/core/comprehension/index.d.ts +0 -57
  302. package/dist/core/comprehension/index.js +0 -87
  303. package/dist/core/comprehension/pass-record.d.ts +0 -29
  304. package/dist/core/comprehension/pass-record.js +0 -64
  305. package/dist/core/comprehension/stats.d.ts +0 -35
  306. package/dist/core/comprehension/stats.js +0 -133
  307. package/dist/core/templates/workflows/comprehension-guidance.d.ts +0 -9
  308. package/dist/core/templates/workflows/comprehension-guidance.js +0 -71
  309. package/dist/core/templates/workflows/mcp-guidance.d.ts +0 -13
  310. package/dist/core/templates/workflows/mcp-guidance.js +0 -131
  311. package/dist/core/templates/workflows/user-prompt-guidance.d.ts +0 -16
  312. package/dist/core/templates/workflows/user-prompt-guidance.js +0 -48
  313. package/dist/telemetry/caller.d.ts +0 -5
  314. package/dist/telemetry/caller.js +0 -29
  315. package/dist/telemetry/client.d.ts +0 -27
  316. package/dist/telemetry/client.js +0 -127
  317. package/dist/telemetry/command-context.d.ts +0 -13
  318. package/dist/telemetry/command-context.js +0 -59
  319. package/dist/telemetry/comprehension.d.ts +0 -44
  320. package/dist/telemetry/comprehension.js +0 -105
  321. package/dist/telemetry/content.d.ts +0 -10
  322. package/dist/telemetry/content.js +0 -56
  323. package/dist/telemetry/git-stats.d.ts +0 -12
  324. package/dist/telemetry/git-stats.js +0 -69
  325. package/dist/telemetry/identify-cache.d.ts +0 -7
  326. package/dist/telemetry/identify-cache.js +0 -47
  327. package/dist/telemetry/input.d.ts +0 -17
  328. package/dist/telemetry/input.js +0 -68
  329. package/dist/telemetry/marker.d.ts +0 -37
  330. package/dist/telemetry/marker.js +0 -67
  331. package/dist/telemetry/workflow.d.ts +0 -85
  332. package/dist/telemetry/workflow.js +0 -318
  333. package/schemas/spec-driven/templates/plan.md +0 -19
package/package.json CHANGED
@@ -1,84 +1,96 @@
1
- {
2
- "name": "@codewalla_india/openspec",
3
- "version": "1.3.0",
4
- "description": "AI-native system for spec-driven development",
5
- "keywords": [
6
- "openspec",
7
- "specs",
8
- "cli",
9
- "ai",
10
- "development"
11
- ],
12
- "homepage": "https://github.com/codewalla-engineering/OpenSpec",
13
- "repository": {
14
- "type": "git",
15
- "url": "https://github.com/codewalla-engineering/OpenSpec"
16
- },
17
- "license": "MIT",
18
- "author": "OpenSpec Contributors",
19
- "type": "module",
20
- "publishConfig": {
21
- "access": "public"
22
- },
23
- "exports": {
24
- ".": {
25
- "types": "./dist/index.d.ts",
26
- "default": "./dist/index.js"
27
- }
28
- },
29
- "bin": {
30
- "openspec": "./bin/openspec.js"
31
- },
32
- "files": [
33
- "dist",
34
- "bin",
35
- "schemas",
36
- "scripts/postinstall.js",
37
- "!dist/**/*.test.js",
38
- "!dist/**/__tests__",
39
- "!dist/**/*.map"
40
- ],
41
- "scripts": {
42
- "lint": "eslint src/",
43
- "build": "node build.js",
44
- "dev": "tsc --watch",
45
- "dev:cli": "pnpm build && node bin/openspec.js",
46
- "test": "vitest run",
47
- "test:watch": "vitest",
48
- "test:ui": "vitest --ui",
49
- "test:coverage": "vitest --coverage",
50
- "test:postinstall": "node scripts/postinstall.js",
51
- "prepare": "pnpm run build",
52
- "prepublishOnly": "pnpm run build",
53
- "postinstall": "node scripts/postinstall.js",
54
- "check:pack-version": "node scripts/pack-version-check.mjs",
55
- "release": "pnpm run release:ci",
56
- "release:ci": "pnpm run check:pack-version && pnpm exec changeset publish",
57
- "changeset": "changeset"
58
- },
59
- "engines": {
60
- "node": ">=20.19.0"
61
- },
62
- "devDependencies": {
63
- "@changesets/changelog-github": "^0.5.2",
64
- "@changesets/cli": "^2.27.7",
65
- "@types/node": "^24.2.0",
66
- "@vitest/ui": "^3.2.6",
67
- "eslint": "^9.39.2",
68
- "typescript": "^5.9.3",
69
- "typescript-eslint": "^8.62.0",
70
- "vitest": "^3.2.6"
71
- },
72
- "dependencies": {
73
- "@inquirer/core": "^10.3.2",
74
- "@inquirer/prompts": "^7.10.1",
75
- "chalk": "^5.5.0",
76
- "commander": "^14.0.0",
77
- "cross-spawn": "7.0.6",
78
- "fast-glob": "^3.3.3",
79
- "ora": "^8.2.0",
80
- "posthog-node": "^5.20.0",
81
- "yaml": "^2.8.2",
82
- "zod": "^4.0.17"
83
- }
84
- }
1
+ {
2
+ "name": "@codewalla_india/openspec",
3
+ "version": "1.3.2",
4
+ "description": "AI-native system for spec-driven development",
5
+ "keywords": [
6
+ "openspec",
7
+ "specs",
8
+ "cli",
9
+ "ai",
10
+ "development"
11
+ ],
12
+ "homepage": "https://github.com/codewalla-engineering/openspec-upstream-sync",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/codewalla-engineering/openspec-upstream-sync"
16
+ },
17
+ "license": "MIT",
18
+ "author": "OpenSpec Contributors",
19
+ "type": "module",
20
+ "packageManager": "pnpm@9.15.9",
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "exports": {
25
+ ".": {
26
+ "types": "./dist/index.d.ts",
27
+ "default": "./dist/index.js"
28
+ }
29
+ },
30
+ "bin": {
31
+ "openspec": "./bin/openspec.js"
32
+ },
33
+ "files": [
34
+ "dist",
35
+ "bin",
36
+ "schemas",
37
+ "scripts/postinstall.js",
38
+ "!dist/**/*.test.js",
39
+ "!dist/**/__tests__",
40
+ "!dist/**/*.map"
41
+ ],
42
+ "scripts": {
43
+ "lint": "eslint src/",
44
+ "build": "node build.js",
45
+ "generate:skills": "node scripts/generate-skillssh.mjs",
46
+ "regen:parity-hashes": "node scripts/regen-parity-hashes.mjs",
47
+ "dev": "tsc --watch",
48
+ "dev:cli": "pnpm build && node bin/openspec.js",
49
+ "test": "vitest run",
50
+ "test:watch": "vitest",
51
+ "test:ui": "vitest --ui",
52
+ "test:coverage": "vitest --coverage",
53
+ "test:postinstall": "node scripts/postinstall.js",
54
+ "prepare": "pnpm run build",
55
+ "prepublishOnly": "pnpm run build",
56
+ "postinstall": "node scripts/postinstall.js",
57
+ "check:pack-version": "node scripts/pack-version-check.mjs",
58
+ "release": "pnpm run release:ci",
59
+ "release:ci": "pnpm run check:pack-version && pnpm exec changeset publish",
60
+ "changeset": "changeset"
61
+ },
62
+ "engines": {
63
+ "node": ">=20.19.0"
64
+ },
65
+ "devDependencies": {
66
+ "@changesets/changelog-github": "^0.7.0",
67
+ "@changesets/cli": "^2.31.1",
68
+ "@types/node": "^20.19.43",
69
+ "@vitest/ui": "^3.2.6",
70
+ "eslint": "^10.5.0",
71
+ "smol-toml": "^1.7.1",
72
+ "typescript": "^6.0.3",
73
+ "typescript-eslint": "^8.65.0",
74
+ "vitest": "^3.2.6"
75
+ },
76
+ "dependencies": {
77
+ "@inquirer/core": "^10.3.2",
78
+ "@inquirer/prompts": "^7.10.1",
79
+ "chalk": "^5.6.2",
80
+ "commander": "^14.0.0",
81
+ "cross-spawn": "7.0.6",
82
+ "fast-glob": "^3.3.3",
83
+ "ora": "^9.4.1",
84
+ "yaml": "^2.8.3",
85
+ "zod": "^4.4.3"
86
+ },
87
+ "pnpm": {
88
+ "onlyBuiltDependencies": [
89
+ "esbuild"
90
+ ],
91
+ "overrides": {
92
+ "brace-expansion@<=5.0.8": ">=5.0.9 <6",
93
+ "postcss@<8.5.23": ">=8.5.23 <9"
94
+ }
95
+ }
96
+ }
@@ -1,184 +1,252 @@
1
- name: spec-driven
2
- version: 1
3
- description: Default OpenSpec workflow - proposal → specs → design → plan → tasks
4
- artifacts:
5
- - id: proposal
6
- generates: proposal.md
7
- description: Initial proposal document outlining the change
8
- template: proposal.md
9
- instruction: |
10
- Create the proposal document that establishes WHY this change is needed.
11
-
12
- Sections:
13
- - **Why**: 1-2 sentences on the problem or opportunity. What problem does this solve? Why now?
14
- - **What Changes**: Bullet list of changes. Be specific about new capabilities, modifications, or removals. Mark breaking changes with **BREAKING**.
15
- - **Capabilities**: Identify which specs will be created or modified:
16
- - **New Capabilities**: List capabilities being introduced. Each becomes a new `specs/<name>/spec.md`. Use kebab-case names (e.g., `user-auth`, `data-export`).
17
- - **Modified Capabilities**: List existing capabilities whose REQUIREMENTS are changing. Only include if spec-level behavior changes (not just implementation details). Each needs a delta spec file. Check `openspec/specs/` for existing spec names. Leave empty if no requirement changes.
18
- - **Impact**: Affected code, APIs, dependencies, or systems. If importing from
19
- Jira, record ticket key(s) here (e.g., `Jira: CW-1234`) for traceability.
20
-
21
- When importing from Jira: name capabilities by behavioral domain (e.g., `ui`,
22
- `user-auth`), not by ticket key. Reference the ticket in Impact, not in
23
- capability names.
24
-
25
- IMPORTANT: The Capabilities section is critical. It creates the contract between
26
- proposal and specs phases. Research existing specs before filling this in.
27
- Each capability listed here will need a corresponding spec file.
28
-
29
- Keep it concise (1-2 pages). Focus on the "why" not the "how" -
30
- implementation details belong in design.md.
31
-
32
- This is the foundation - specs, design, plan, and tasks all build on this.
33
- requires: []
34
-
35
- - id: specs
36
- generates: "specs/**/*.md"
37
- description: Detailed specifications for the change
38
- template: spec.md
39
- instruction: |
40
- Create specification files that define WHAT the system should do.
41
-
42
- Create one spec file per capability listed in the proposal's Capabilities section.
43
- - New capabilities: use the exact kebab-case name from the proposal (specs/<capability>/spec.md).
44
- - Modified capabilities: use the existing spec folder name from openspec/specs/<capability>/ when creating the delta spec at specs/<capability>/spec.md.
45
-
46
- When Jira acceptance criteria exist: translate them into requirements under the
47
- capability folders listed in the proposal. Never create specs/<ticket-key>/.
48
-
49
- Delta operations (use ## headers):
50
- - **ADDED Requirements**: New capabilities
51
- - **MODIFIED Requirements**: Changed behavior - MUST include full updated content
52
- - **REMOVED Requirements**: Deprecated features - MUST include **Reason** and **Migration**
53
- - **RENAMED Requirements**: Name changes only - use FROM:/TO: format
54
-
55
- Format requirements:
56
- - Each requirement: `### Requirement: <name>` followed by description
57
- - Use SHALL/MUST for normative requirements (avoid should/may)
58
- - Each scenario: `#### Scenario: <name>` with WHEN/THEN format
59
- - **CRITICAL**: Scenarios MUST use exactly 4 hashtags (`####`). Using 3 hashtags or bullets will fail silently.
60
- - Every requirement MUST have at least one scenario.
61
-
62
- MODIFIED requirements workflow:
63
- 1. Locate the existing requirement in openspec/specs/<capability>/spec.md
64
- 2. Copy the ENTIRE requirement block (from `### Requirement:` through all scenarios)
65
- 3. Paste under `## MODIFIED Requirements` and edit to reflect new behavior
66
- 4. Ensure header text matches exactly (whitespace-insensitive)
67
-
68
- Common pitfall: Using MODIFIED with partial content loses detail at archive time.
69
- If adding new concerns without changing existing behavior, use ADDED instead.
70
-
71
- Example:
72
- ```
73
- ## ADDED Requirements
74
-
75
- ### Requirement: User can export data
76
- The system SHALL allow users to export their data in CSV format.
77
-
78
- #### Scenario: Successful export
79
- - **WHEN** user clicks "Export" button
80
- - **THEN** system downloads a CSV file with all user data
81
-
82
- ## REMOVED Requirements
83
-
84
- ### Requirement: Legacy export
85
- **Reason**: Replaced by new export system
86
- **Migration**: Use new export endpoint at /api/v2/export
87
- ```
88
-
89
- Specs should be testable - each scenario is a potential test case.
90
- requires:
91
- - proposal
92
-
93
- - id: design
94
- generates: design.md
95
- description: Technical design document with implementation details
96
- template: design.md
97
- instruction: |
98
- Create the design document that explains HOW to implement the change.
99
-
100
- When to include design.md (create only if any apply):
101
- - Cross-cutting change (multiple services/modules) or new architectural pattern
102
- - New external dependency or significant data model changes
103
- - Security, performance, or migration complexity
104
- - Ambiguity that benefits from technical decisions before coding
105
-
106
- Sections:
107
- - **Context**: Background, current state, constraints, stakeholders
108
- - **Goals / Non-Goals**: What this design achieves and explicitly excludes
109
- - **Decisions**: Key technical choices with rationale (why X over Y?). Include alternatives considered for each decision.
110
- - **Risks / Trade-offs**: Known limitations, things that could go wrong. Format: [Risk] → Mitigation
111
- - **Migration Plan**: Steps to deploy, rollback strategy (if applicable)
112
- - **Open Questions**: Outstanding decisions or unknowns to resolve
113
-
114
- Focus on architecture and approach, not line-by-line implementation.
115
- Reference the proposal for motivation and specs for requirements.
116
-
117
- Good design docs explain the "why" behind technical decisions.
118
- requires:
119
- - proposal
120
-
121
- - id: plan
122
- generates: plan.md
123
- description: File-level implementation plan with code map
124
- template: plan.md
125
- instruction: |
126
- Create a concrete implementation plan from design and specs.
127
-
128
- Sections:
129
- - **Code map**: Files to create, modify, or delete
130
- - **Implementation order**: Sequenced steps at file/module level
131
- - **Test plan**: How to verify the change
132
- - **Risks**: Known risks with mitigations ([Risk] → Mitigation)
133
- - **Done definition**: Objective criteria for completion
134
-
135
- Do NOT restate behavioral requirements — link to specs.
136
- Do NOT duplicate design decisions reference design.md.
137
- requires:
138
- - specs
139
- - design
140
-
141
- - id: tasks
142
- generates: tasks.md
143
- description: Implementation checklist with trackable tasks
144
- template: tasks.md
145
- instruction: |
146
- Create the task list that breaks down the implementation work.
147
-
148
- **IMPORTANT: Follow the template below exactly.** The apply phase parses
149
- checkbox format to track progress. Tasks not using `- [ ]` won't be tracked.
150
-
151
- Guidelines:
152
- - Group related tasks under ## numbered headings
153
- - Each task MUST be a checkbox: `- [ ] X.Y Task description`
154
- - Tasks should be small enough to complete in one session
155
- - Order tasks by dependency (what must be done first?)
156
-
157
- Example:
158
- ```
159
- ## 1. Setup
160
-
161
- - [ ] 1.1 Create new module structure
162
- - [ ] 1.2 Add dependencies to package.json
163
-
164
- ## 2. Core Implementation
165
-
166
- - [ ] 2.1 Implement data export function
167
- - [ ] 2.2 Add CSV formatting utilities
168
- ```
169
-
170
- Derive tasks from plan.md code map. Reference specs for what to build,
171
- design for architectural decisions, and plan for file-level targets.
172
- Include file/module references where helpful.
173
- Each task should be verifiable - you know when it's done.
174
- requires:
175
- - specs
176
- - design
177
- - plan
178
-
179
- apply:
180
- requires: [plan, tasks]
181
- tracks: tasks.md
182
- instruction: |
183
- Read context files, work through pending tasks, mark complete as you go.
184
- Pause if you hit blockers or need clarification.
1
+ name: spec-driven
2
+ version: 1
3
+ description: Default OpenSpec workflow - proposal → specs → design → tasks
4
+ artifacts:
5
+ - id: proposal
6
+ generates: proposal.md
7
+ description: Initial proposal document outlining the change
8
+ template: proposal.md
9
+ instruction: |
10
+ Create the proposal document that establishes WHY this change is needed.
11
+
12
+ Sections:
13
+ - **Why**: 1-2 sentences on the problem or opportunity. What problem does this solve? Why now?
14
+ - **What Changes**: Bullet list of changes. Be specific about new capabilities, modifications, or removals. Mark breaking changes with **BREAKING**.
15
+ - **Capabilities**: Identify which specs will be created or modified:
16
+ - **New Capabilities**: List capabilities being introduced. Each becomes a new `specs/<capability-path>/spec.md`. Use kebab-case for path segments you introduce (e.g., `user-auth` or `identity/user-auth`) and follow the project's existing spec organization.
17
+ - **Modified Capabilities**: List existing capabilities whose REQUIREMENTS are changing. Only include if spec-level behavior changes (not just implementation details). Each needs a delta spec file. Use the exact existing path under `openspec/specs/`. Leave empty if no requirement changes.
18
+ - **Impact**: Affected code, APIs, dependencies, or systems.
19
+
20
+ IMPORTANT: The Capabilities section is critical. It creates the contract between
21
+ proposal and specs phases. Research existing specs before filling this in.
22
+ Each capability listed here will need a corresponding spec file.
23
+
24
+ Every change must either declare at least one capability (new or
25
+ modified) or explicitly opt out of specs: `openspec validate` rejects a
26
+ change with zero deltas unless the change's `.openspec.yaml` sets
27
+ `skip_specs: true`. Use `skip_specs: true` only when no spec-level
28
+ behavior changes (pure refactor, tooling, docs) - specs describe
29
+ behavior, so if behavior does not change, no spec should change either.
30
+ Do not invent a requirement just to satisfy validation.
31
+
32
+ Keep it concise (1-2 pages). Focus on the "why" not the "how" -
33
+ implementation details belong in design.md.
34
+
35
+ This is the foundation - specs, design, and tasks all build on this.
36
+ requires: []
37
+
38
+ - id: specs
39
+ generates: "specs/**/*.md"
40
+ description: Detailed specifications for the change
41
+ template: spec.md
42
+ instruction: |
43
+ Create specification files that define WHAT the system should do.
44
+
45
+ A spec is a behavior contract, not an implementation plan.
46
+
47
+ Good spec content:
48
+ - Observable behavior users or downstream systems rely on
49
+ - Inputs, outputs, and error conditions
50
+ - External constraints (security, privacy, reliability, compatibility)
51
+ - Scenarios that can be tested or explicitly validated
52
+
53
+ Avoid in specs:
54
+ - Internal class/function names
55
+ - Library or framework choices
56
+ - Step-by-step implementation details
57
+ - Detailed execution plans (those belong in design.md or tasks.md)
58
+
59
+ Quick test: if the implementation can change without changing externally
60
+ visible behavior, it likely does not belong in the spec.
61
+
62
+ Create one spec file per capability listed in the proposal's Capabilities section.
63
+ `<capability-path>` is the spec directory relative to `specs/` (for example,
64
+ `user-auth` or `identity/user-auth`). Preserve the full path:
65
+ - New capabilities: use the exact path from the proposal at `specs/<capability-path>/spec.md`. Any path segment newly introduced in the proposal must be kebab-case. Follow the project's existing organization; do not add a new domain level when the project uses a flat layout.
66
+ - Modified capabilities: use the exact existing path from `openspec/specs/<capability-path>/` when creating the delta at `specs/<capability-path>/spec.md`. Do not move or rename the capability.
67
+
68
+ There must be at least one spec file unless the change's `.openspec.yaml`
69
+ sets `skip_specs: true` (no spec-level behavior change) - `openspec validate`
70
+ rejects a zero-delta change without that marker. If the proposal lists no
71
+ capabilities and `skip_specs` is not set, revisit the proposal first.
72
+
73
+ Delta operations (use ## headers):
74
+ - **ADDED Requirements**: New capabilities
75
+ - **MODIFIED Requirements**: Changed behavior - MUST include full updated content
76
+ - **REMOVED Requirements**: Deprecated features - MUST include **Reason** and **Migration**
77
+ - **RENAMED Requirements**: Name changes only - use FROM:/TO: format
78
+
79
+ Format requirements:
80
+ - Each requirement: `### Requirement: <name>` followed by description
81
+ - Use SHALL/MUST for normative requirements (avoid should/may)
82
+ - Each scenario: `#### Scenario: <name>` with WHEN/THEN format
83
+ - **CRITICAL**: Scenarios MUST use exactly 4 hashtags (`####`). Using 3 hashtags or bullets will fail silently.
84
+ - Every requirement MUST have at least one scenario.
85
+
86
+ New capabilities only: start the delta spec with a `## Purpose` section -
87
+ one or two sentences (50+ characters, or `openspec validate --strict`
88
+ reports it as too brief) describing what the capability is for. Archive
89
+ copies it into the main spec it creates; without it the new main spec is
90
+ left with a `TBD ... Update Purpose after archive` placeholder to fill in
91
+ by hand. Do NOT add `## Purpose` to a delta for an existing capability -
92
+ that spec already has one and the delta's is ignored. To change an
93
+ existing capability's Purpose - including a leftover `TBD` placeholder -
94
+ edit `openspec/specs/<capability-path>/spec.md` directly.
95
+
96
+ MODIFIED requirements workflow:
97
+ 1. Locate the existing requirement in openspec/specs/<capability-path>/spec.md
98
+ 2. Copy the ENTIRE requirement block (from `### Requirement:` through all scenarios)
99
+ 3. Paste under `## MODIFIED Requirements` and edit to reflect new behavior
100
+ 4. Ensure header text matches exactly (whitespace-insensitive)
101
+
102
+ Common pitfall: Using MODIFIED with partial content loses detail at archive time.
103
+ If adding new concerns without changing existing behavior, use ADDED instead.
104
+
105
+ Example (a new capability, so it opens with `## Purpose`):
106
+ ```
107
+ ## Purpose
108
+
109
+ Lets users take their data out of the product in a portable format.
110
+
111
+ ## ADDED Requirements
112
+
113
+ ### Requirement: User can export data
114
+ The system SHALL allow users to export their data in CSV format.
115
+
116
+ #### Scenario: Successful export
117
+ - **WHEN** user clicks "Export" button
118
+ - **THEN** system downloads a CSV file with all user data
119
+
120
+ ## REMOVED Requirements
121
+
122
+ ### Requirement: Legacy export
123
+ **Reason**: Replaced by new export system
124
+ **Migration**: Use new export endpoint at /api/v2/export
125
+ ```
126
+
127
+ Specs should be testable - each scenario is a potential test case.
128
+ requires:
129
+ - proposal
130
+
131
+ - id: design
132
+ generates: design.md
133
+ description: Technical design document with implementation details
134
+ template: design.md
135
+ instruction: |
136
+ Create the design document that explains HOW to implement the change.
137
+
138
+ When to include design.md (create only if any apply):
139
+ - Cross-cutting change (multiple services/modules) or new architectural pattern
140
+ - New external dependency or significant data model changes
141
+ - Security, performance, or migration complexity
142
+ - Ambiguity that benefits from technical decisions before coding
143
+
144
+ Sections:
145
+ - **Context**: Only the current state and constraints needed to explain the approach. Reference the proposal for motivation instead of restating it (e.g., "See proposal.md - Why").
146
+ - **Goals / Non-Goals**: What this design achieves and explicitly excludes. Don't restate the proposal's scope - add only design-level boundaries.
147
+ - **Decisions**: Key technical choices with rationale (why X over Y?). Include alternatives considered for each decision.
148
+ - **Risks / Trade-offs**: Known limitations, things that could go wrong. Format: [Risk] → Mitigation
149
+ - **Migration Plan**: Steps to deploy, rollback strategy (if applicable)
150
+ - **Open Questions**: Unknowns that can safely be answered later without
151
+ changing the specs, the approach, or the task breakdown. Omit if none.
152
+
153
+ Open questions are for genuinely deferrable unknowns, not decisions you
154
+ skipped. If a question would change the specs, the chosen approach, or
155
+ the task breakdown, resolve it now - ask the user instead of guessing.
156
+
157
+ Focus on architecture and approach, not line-by-line implementation.
158
+ The proposal covers why and what; design covers how. Reference the
159
+ proposal for motivation and, once written, the specs for requirements -
160
+ if a section would only restate them, point to them instead.
161
+
162
+ Good design docs explain the "why" behind technical decisions.
163
+ requires:
164
+ - proposal
165
+
166
+ - id: plan
167
+ generates: plan.md
168
+ description: File-level implementation plan with code map
169
+ template: plan.md
170
+ instruction: |
171
+ Create a concrete implementation plan from design and specs.
172
+
173
+ Sections:
174
+ - **Code map**: Files to create, modify, or delete
175
+ - **Implementation order**: Sequenced steps at file/module level
176
+ - **Test plan**: How to verify the change
177
+ - **Risks**: Known risks with mitigations ([Risk] → Mitigation)
178
+ - **Done definition**: Objective criteria for completion
179
+
180
+ Do NOT restate behavioral requirements — link to specs.
181
+ Do NOT duplicate design decisions — reference design.md.
182
+ requires:
183
+ - specs
184
+ - design
185
+
186
+ - id: tasks
187
+ generates: tasks.md
188
+ description: Implementation checklist with trackable tasks
189
+ template: tasks.md
190
+ instruction: |
191
+ Create the task list that breaks down the implementation work.
192
+
193
+ Before writing tasks, check design.md for Open Questions. If any of them
194
+ would change what gets built, resolve them with the user first - do not
195
+ bake an unstated assumption into the task list.
196
+
197
+ **IMPORTANT: Follow the template below exactly.** The apply phase parses
198
+ checkbox format to track progress. Tasks not using `- [ ]` won't be tracked.
199
+
200
+ Guidelines:
201
+ - Group related tasks under ## numbered headings
202
+ - Each task MUST be a checkbox: `- [ ] X.Y Task description`
203
+ - Tasks should be small enough to complete in one session
204
+ - Order tasks by dependency (what must be done first?)
205
+
206
+ Example:
207
+ ```
208
+ ## 1. Setup
209
+
210
+ - [ ] 1.1 Create new module structure
211
+ - [ ] 1.2 Add dependencies to package.json
212
+
213
+ ## 2. Core Implementation
214
+
215
+ - [ ] 2.1 Implement data export function
216
+ - [ ] 2.2 Add CSV formatting utilities
217
+ ```
218
+
219
+ Reference specs for what needs to be built, design for how to build it.
220
+ Each task should be verifiable - you know when it's done.
221
+ requires:
222
+ - plan
223
+
224
+ apply:
225
+ requires: [plan, tasks]
226
+ tracks: tasks.md
227
+ instruction: |
228
+ Read context files, work through pending tasks, mark complete as you go.
229
+ Pause if you hit blockers or need clarification.
230
+
231
+ modify:
232
+ requires: [proposal, specs, design, plan, tasks]
233
+ instruction: |
234
+ Modify planning artifacts before implementation starts.
235
+
236
+ Pre-apply validation:
237
+ - Modification is blocked if any tasks are marked complete in tasks.md
238
+ - This ensures modification only happens before /opsx:apply begins
239
+
240
+ Workflow:
241
+ 1. Select the artifact to modify (proposal, specs, design, plan, or tasks)
242
+ 2. Calculate affected artifacts using the artifact graph (getDependents)
243
+ 3. Check for conflicts with manual edits in downstream artifacts
244
+ 4. Record modification history in .openspec.yaml (modifyHistory array)
245
+ 5. Emit telemetry events (artifact_modify_requested, artifact_revision_requested)
246
+
247
+ The modify command returns:
248
+ - artifactsToUpdate: list of artifacts in update order (deepest dependents first)
249
+ - conflicts: any conflicts with manual edits (blocks modification if present)
250
+ - success: true if modification can proceed, false if blocked
251
+
252
+ Use openspec instructions modify --change <name> --artifact <id> to execute.