@sk8metal/michi-cli 0.14.1 → 0.19.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 (614) hide show
  1. package/CHANGELOG.md +268 -2
  2. package/README.md +27 -2
  3. package/dist/scripts/config/config-schema.d.ts +5 -333
  4. package/dist/scripts/config/config-schema.d.ts.map +1 -1
  5. package/dist/scripts/config/config-schema.js +6 -233
  6. package/dist/scripts/config/config-schema.js.map +1 -1
  7. package/dist/scripts/config-global.d.ts.map +1 -1
  8. package/dist/scripts/config-global.js +3 -2
  9. package/dist/scripts/config-global.js.map +1 -1
  10. package/dist/scripts/confluence-sync.d.ts +5 -73
  11. package/dist/scripts/confluence-sync.d.ts.map +1 -1
  12. package/dist/scripts/confluence-sync.js +14 -392
  13. package/dist/scripts/confluence-sync.js.map +1 -1
  14. package/dist/scripts/constants/environments.d.ts +3 -30
  15. package/dist/scripts/constants/environments.d.ts.map +1 -1
  16. package/dist/scripts/constants/environments.js +3 -41
  17. package/dist/scripts/constants/environments.js.map +1 -1
  18. package/dist/scripts/constants/languages.d.ts +3 -20
  19. package/dist/scripts/constants/languages.d.ts.map +1 -1
  20. package/dist/scripts/constants/languages.js +3 -50
  21. package/dist/scripts/constants/languages.js.map +1 -1
  22. package/dist/scripts/constants/test-commands.d.ts +3 -33
  23. package/dist/scripts/constants/test-commands.d.ts.map +1 -1
  24. package/dist/scripts/constants/test-commands.js +3 -67
  25. package/dist/scripts/constants/test-commands.js.map +1 -1
  26. package/dist/scripts/dev-tools/mermaid-converter.d.ts.map +1 -0
  27. package/dist/scripts/dev-tools/mermaid-converter.js.map +1 -0
  28. package/dist/scripts/dev-tools/test-interactive.d.ts.map +1 -0
  29. package/dist/scripts/{test-interactive.js → dev-tools/test-interactive.js} +4 -3
  30. package/dist/scripts/dev-tools/test-interactive.js.map +1 -0
  31. package/dist/scripts/github-actions-client.d.ts +5 -75
  32. package/dist/scripts/github-actions-client.d.ts.map +1 -1
  33. package/dist/scripts/github-actions-client.js +4 -178
  34. package/dist/scripts/github-actions-client.js.map +1 -1
  35. package/dist/scripts/jira-sync.d.ts +3 -121
  36. package/dist/scripts/jira-sync.d.ts.map +1 -1
  37. package/dist/scripts/jira-sync.js +5 -879
  38. package/dist/scripts/jira-sync.js.map +1 -1
  39. package/dist/scripts/markdown-to-confluence.d.ts.map +1 -1
  40. package/dist/scripts/markdown-to-confluence.js +2 -2
  41. package/dist/scripts/markdown-to-confluence.js.map +1 -1
  42. package/dist/scripts/multi-project-estimate.d.ts.map +1 -1
  43. package/dist/scripts/multi-project-estimate.js +3 -2
  44. package/dist/scripts/multi-project-estimate.js.map +1 -1
  45. package/dist/scripts/phase-runner.d.ts.map +1 -1
  46. package/dist/scripts/phase-runner.js +34 -18
  47. package/dist/scripts/phase-runner.js.map +1 -1
  48. package/dist/scripts/pre-flight-check.d.ts.map +1 -1
  49. package/dist/scripts/pre-flight-check.js +27 -11
  50. package/dist/scripts/pre-flight-check.js.map +1 -1
  51. package/dist/scripts/template/multi-repo-renderer.js +2 -2
  52. package/dist/scripts/template/multi-repo-renderer.js.map +1 -1
  53. package/dist/scripts/test-execution-generator.d.ts.map +1 -1
  54. package/dist/scripts/test-execution-generator.js +5 -4
  55. package/dist/scripts/test-execution-generator.js.map +1 -1
  56. package/dist/scripts/utils/aidlc-parser.d.ts +5 -82
  57. package/dist/scripts/utils/aidlc-parser.d.ts.map +1 -1
  58. package/dist/scripts/utils/aidlc-parser.js +4 -204
  59. package/dist/scripts/utils/aidlc-parser.js.map +1 -1
  60. package/dist/scripts/utils/ci-generator.d.ts.map +1 -1
  61. package/dist/scripts/utils/ci-generator.js +4 -3
  62. package/dist/scripts/utils/ci-generator.js.map +1 -1
  63. package/dist/scripts/utils/config-loader.d.ts.map +1 -1
  64. package/dist/scripts/utils/config-loader.js +46 -49
  65. package/dist/scripts/utils/config-loader.js.map +1 -1
  66. package/dist/scripts/utils/config-validator.d.ts +9 -10
  67. package/dist/scripts/utils/config-validator.d.ts.map +1 -1
  68. package/dist/scripts/utils/config-validator.js +68 -70
  69. package/dist/scripts/utils/config-validator.js.map +1 -1
  70. package/dist/scripts/utils/docker-requirement-detector.d.ts.map +1 -1
  71. package/dist/scripts/utils/docker-requirement-detector.js +5 -4
  72. package/dist/scripts/utils/docker-requirement-detector.js.map +1 -1
  73. package/dist/scripts/utils/env-config.d.ts.map +1 -1
  74. package/dist/scripts/utils/env-config.js +55 -38
  75. package/dist/scripts/utils/env-config.js.map +1 -1
  76. package/dist/scripts/utils/feature-name-validator.d.ts +4 -9
  77. package/dist/scripts/utils/feature-name-validator.d.ts.map +1 -1
  78. package/dist/scripts/utils/feature-name-validator.js +12 -21
  79. package/dist/scripts/utils/feature-name-validator.js.map +1 -1
  80. package/dist/scripts/utils/interactive-helpers.d.ts +5 -29
  81. package/dist/scripts/utils/interactive-helpers.d.ts.map +1 -1
  82. package/dist/scripts/utils/interactive-helpers.js +5 -89
  83. package/dist/scripts/utils/interactive-helpers.js.map +1 -1
  84. package/dist/scripts/utils/language-detector.d.ts.map +1 -1
  85. package/dist/scripts/utils/language-detector.js +4 -3
  86. package/dist/scripts/utils/language-detector.js.map +1 -1
  87. package/dist/scripts/utils/markdown-parser.d.ts +6 -52
  88. package/dist/scripts/utils/markdown-parser.d.ts.map +1 -1
  89. package/dist/scripts/utils/markdown-parser.js +5 -286
  90. package/dist/scripts/utils/markdown-parser.js.map +1 -1
  91. package/dist/scripts/utils/multi-repo-validator.d.ts +9 -10
  92. package/dist/scripts/utils/multi-repo-validator.d.ts.map +1 -1
  93. package/dist/scripts/utils/multi-repo-validator.js +15 -17
  94. package/dist/scripts/utils/multi-repo-validator.js.map +1 -1
  95. package/dist/scripts/utils/project-analyzer.d.ts +120 -0
  96. package/dist/scripts/utils/project-analyzer.d.ts.map +1 -0
  97. package/dist/scripts/utils/project-analyzer.js +358 -0
  98. package/dist/scripts/utils/project-analyzer.js.map +1 -0
  99. package/dist/scripts/utils/project-detector.d.ts.map +1 -1
  100. package/dist/scripts/utils/project-detector.js +6 -5
  101. package/dist/scripts/utils/project-detector.js.map +1 -1
  102. package/dist/scripts/utils/project-finder.d.ts +1 -21
  103. package/dist/scripts/utils/project-finder.d.ts.map +1 -1
  104. package/dist/scripts/utils/project-finder.js +2 -121
  105. package/dist/scripts/utils/project-finder.js.map +1 -1
  106. package/dist/scripts/utils/project-meta.d.ts +4 -27
  107. package/dist/scripts/utils/project-meta.d.ts.map +1 -1
  108. package/dist/scripts/utils/project-meta.js +3 -67
  109. package/dist/scripts/utils/project-meta.js.map +1 -1
  110. package/dist/scripts/utils/safe-file-reader.d.ts +84 -0
  111. package/dist/scripts/utils/safe-file-reader.d.ts.map +1 -0
  112. package/dist/scripts/utils/safe-file-reader.js +122 -0
  113. package/dist/scripts/utils/safe-file-reader.js.map +1 -0
  114. package/dist/scripts/utils/security-validator.d.ts +8 -19
  115. package/dist/scripts/utils/security-validator.d.ts.map +1 -1
  116. package/dist/scripts/utils/security-validator.js +28 -58
  117. package/dist/scripts/utils/security-validator.js.map +1 -1
  118. package/dist/scripts/utils/spec-archiver.d.ts.map +1 -1
  119. package/dist/scripts/utils/spec-archiver.js +7 -6
  120. package/dist/scripts/utils/spec-archiver.js.map +1 -1
  121. package/dist/scripts/utils/spec-updater.d.ts.map +1 -1
  122. package/dist/scripts/utils/spec-updater.js +10 -7
  123. package/dist/scripts/utils/spec-updater.js.map +1 -1
  124. package/dist/scripts/utils/tasks-converter.js +2 -2
  125. package/dist/scripts/utils/tasks-converter.js.map +1 -1
  126. package/dist/scripts/utils/tasks-format-validator.js +4 -4
  127. package/dist/scripts/utils/tasks-format-validator.js.map +1 -1
  128. package/dist/scripts/utils/template-applier.d.ts.map +1 -1
  129. package/dist/scripts/utils/template-applier.js +4 -3
  130. package/dist/scripts/utils/template-applier.js.map +1 -1
  131. package/dist/scripts/utils/types/validation.d.ts +57 -0
  132. package/dist/scripts/utils/types/validation.d.ts.map +1 -0
  133. package/dist/scripts/utils/types/validation.js +50 -0
  134. package/dist/scripts/utils/types/validation.js.map +1 -0
  135. package/dist/scripts/validate-phase.d.ts +6 -1
  136. package/dist/scripts/validate-phase.d.ts.map +1 -1
  137. package/dist/scripts/validate-phase.js +42 -20
  138. package/dist/scripts/validate-phase.js.map +1 -1
  139. package/dist/scripts/workflow-orchestrator.d.ts +4 -40
  140. package/dist/scripts/workflow-orchestrator.d.ts.map +1 -1
  141. package/dist/scripts/workflow-orchestrator.js +7 -194
  142. package/dist/scripts/workflow-orchestrator.js.map +1 -1
  143. package/dist/src/application/interfaces/config-provider.d.ts +89 -0
  144. package/dist/src/application/interfaces/config-provider.d.ts.map +1 -0
  145. package/dist/src/application/interfaces/config-provider.js +8 -0
  146. package/dist/src/application/interfaces/config-provider.js.map +1 -0
  147. package/dist/src/application/interfaces/external-api.d.ts +80 -0
  148. package/dist/src/application/interfaces/external-api.d.ts.map +1 -0
  149. package/dist/src/application/interfaces/external-api.js +8 -0
  150. package/dist/src/application/interfaces/external-api.js.map +1 -0
  151. package/dist/src/application/interfaces/spec-repository.d.ts +52 -0
  152. package/dist/src/application/interfaces/spec-repository.d.ts.map +1 -0
  153. package/dist/src/application/interfaces/spec-repository.js +8 -0
  154. package/dist/src/application/interfaces/spec-repository.js.map +1 -0
  155. package/dist/src/application/services/spec-service.d.ts +49 -0
  156. package/dist/src/application/services/spec-service.d.ts.map +1 -0
  157. package/dist/src/application/services/spec-service.js +94 -0
  158. package/dist/src/application/services/spec-service.js.map +1 -0
  159. package/dist/src/application/services/workflow-service.d.ts +58 -0
  160. package/dist/src/application/services/workflow-service.d.ts.map +1 -0
  161. package/dist/src/application/services/workflow-service.js +125 -0
  162. package/dist/src/application/services/workflow-service.js.map +1 -0
  163. package/dist/src/application/templates/processor.d.ts +31 -0
  164. package/dist/src/application/templates/processor.d.ts.map +1 -0
  165. package/dist/src/application/templates/processor.js +58 -0
  166. package/dist/src/application/templates/processor.js.map +1 -0
  167. package/dist/src/application/use-cases/spec/archive-spec.d.ts +34 -0
  168. package/dist/src/application/use-cases/spec/archive-spec.d.ts.map +1 -0
  169. package/dist/src/application/use-cases/spec/archive-spec.js +56 -0
  170. package/dist/src/application/use-cases/spec/archive-spec.js.map +1 -0
  171. package/dist/src/application/use-cases/spec/generate-design.d.ts +34 -0
  172. package/dist/src/application/use-cases/spec/generate-design.d.ts.map +1 -0
  173. package/dist/src/application/use-cases/spec/generate-design.js +58 -0
  174. package/dist/src/application/use-cases/spec/generate-design.js.map +1 -0
  175. package/dist/src/application/use-cases/spec/generate-requirements.d.ts +34 -0
  176. package/dist/src/application/use-cases/spec/generate-requirements.d.ts.map +1 -0
  177. package/dist/src/application/use-cases/spec/generate-requirements.js +58 -0
  178. package/dist/src/application/use-cases/spec/generate-requirements.js.map +1 -0
  179. package/dist/src/application/use-cases/spec/generate-tasks.d.ts +34 -0
  180. package/dist/src/application/use-cases/spec/generate-tasks.d.ts.map +1 -0
  181. package/dist/src/application/use-cases/spec/generate-tasks.js +58 -0
  182. package/dist/src/application/use-cases/spec/generate-tasks.js.map +1 -0
  183. package/dist/src/application/use-cases/spec/init-spec.d.ts +48 -0
  184. package/dist/src/application/use-cases/spec/init-spec.d.ts.map +1 -0
  185. package/dist/src/application/use-cases/spec/init-spec.js +121 -0
  186. package/dist/src/application/use-cases/spec/init-spec.js.map +1 -0
  187. package/dist/src/cli.d.ts +6 -7
  188. package/dist/src/cli.d.ts.map +1 -1
  189. package/dist/src/cli.js +6 -745
  190. package/dist/src/cli.js.map +1 -1
  191. package/dist/src/commands/config-validate.js +2 -2
  192. package/dist/src/commands/init.d.ts +6 -21
  193. package/dist/src/commands/init.d.ts.map +1 -1
  194. package/dist/src/commands/init.js +5 -508
  195. package/dist/src/commands/init.js.map +1 -1
  196. package/dist/src/commands/migrate.js +4 -3
  197. package/dist/src/commands/migrate.js.map +1 -1
  198. package/dist/src/commands/spec-archive.d.ts +6 -13
  199. package/dist/src/commands/spec-archive.d.ts.map +1 -1
  200. package/dist/src/commands/spec-archive.js +5 -36
  201. package/dist/src/commands/spec-archive.js.map +1 -1
  202. package/dist/src/commands/spec-list.d.ts +6 -11
  203. package/dist/src/commands/spec-list.d.ts.map +1 -1
  204. package/dist/src/commands/spec-list.js +5 -51
  205. package/dist/src/commands/spec-list.js.map +1 -1
  206. package/dist/src/domain/constants/approval.d.ts +18 -0
  207. package/dist/src/domain/constants/approval.d.ts.map +1 -0
  208. package/dist/src/domain/constants/approval.js +23 -0
  209. package/dist/src/domain/constants/approval.js.map +1 -0
  210. package/dist/src/domain/constants/environments.d.ts +33 -0
  211. package/dist/src/domain/constants/environments.d.ts.map +1 -0
  212. package/dist/src/domain/constants/environments.js +44 -0
  213. package/dist/src/domain/constants/environments.js.map +1 -0
  214. package/dist/src/domain/constants/index.d.ts +12 -0
  215. package/dist/src/domain/constants/index.d.ts.map +1 -0
  216. package/dist/src/domain/constants/index.js +18 -0
  217. package/dist/src/domain/constants/index.js.map +1 -0
  218. package/dist/src/domain/constants/languages.d.ts +23 -0
  219. package/dist/src/domain/constants/languages.d.ts.map +1 -0
  220. package/dist/src/domain/constants/languages.js +53 -0
  221. package/dist/src/domain/constants/languages.js.map +1 -0
  222. package/dist/src/domain/constants/phases.d.ts +32 -0
  223. package/dist/src/domain/constants/phases.d.ts.map +1 -0
  224. package/dist/src/domain/constants/phases.js +52 -0
  225. package/dist/src/domain/constants/phases.js.map +1 -0
  226. package/dist/src/domain/constants/test-commands.d.ts +36 -0
  227. package/dist/src/domain/constants/test-commands.d.ts.map +1 -0
  228. package/dist/src/domain/constants/test-commands.js +70 -0
  229. package/dist/src/domain/constants/test-commands.js.map +1 -0
  230. package/dist/src/domain/constants/validation-rules.d.ts +32 -0
  231. package/dist/src/domain/constants/validation-rules.d.ts.map +1 -0
  232. package/dist/src/domain/constants/validation-rules.js +51 -0
  233. package/dist/src/domain/constants/validation-rules.js.map +1 -0
  234. package/dist/src/domain/entities/spec.d.ts +66 -0
  235. package/dist/src/domain/entities/spec.d.ts.map +1 -0
  236. package/dist/src/domain/entities/spec.js +112 -0
  237. package/dist/src/domain/entities/spec.js.map +1 -0
  238. package/dist/src/domain/entities/task.d.ts +43 -0
  239. package/dist/src/domain/entities/task.d.ts.map +1 -0
  240. package/dist/src/domain/entities/task.js +65 -0
  241. package/dist/src/domain/entities/task.js.map +1 -0
  242. package/dist/src/domain/services/spec-validator.d.ts +46 -0
  243. package/dist/src/domain/services/spec-validator.d.ts.map +1 -0
  244. package/dist/src/domain/services/spec-validator.js +99 -0
  245. package/dist/src/domain/services/spec-validator.js.map +1 -0
  246. package/dist/src/domain/value-objects/feature-name.d.ts +24 -0
  247. package/dist/src/domain/value-objects/feature-name.d.ts.map +1 -0
  248. package/dist/src/domain/value-objects/feature-name.js +36 -0
  249. package/dist/src/domain/value-objects/feature-name.js.map +1 -0
  250. package/dist/src/domain/value-objects/index.d.ts +7 -0
  251. package/dist/src/domain/value-objects/index.d.ts.map +1 -0
  252. package/dist/src/domain/value-objects/index.js +7 -0
  253. package/dist/src/domain/value-objects/index.js.map +1 -0
  254. package/dist/src/infrastructure/config/index.d.ts +5 -0
  255. package/dist/src/infrastructure/config/index.d.ts.map +1 -0
  256. package/dist/src/infrastructure/config/index.js +6 -0
  257. package/dist/src/infrastructure/config/index.js.map +1 -0
  258. package/dist/src/infrastructure/config/schema.d.ts +337 -0
  259. package/dist/src/infrastructure/config/schema.d.ts.map +1 -0
  260. package/dist/src/infrastructure/config/schema.js +237 -0
  261. package/dist/src/infrastructure/config/schema.js.map +1 -0
  262. package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.d.ts +14 -0
  263. package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.d.ts.map +1 -0
  264. package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.js +102 -0
  265. package/dist/src/infrastructure/external-apis/atlassian/confluence/approval.js.map +1 -0
  266. package/dist/src/infrastructure/external-apis/atlassian/confluence/client.d.ts +23 -0
  267. package/dist/src/infrastructure/external-apis/atlassian/confluence/client.d.ts.map +1 -0
  268. package/dist/src/infrastructure/external-apis/atlassian/confluence/client.js +192 -0
  269. package/dist/src/infrastructure/external-apis/atlassian/confluence/client.js.map +1 -0
  270. package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.d.ts +48 -0
  271. package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.d.ts.map +1 -0
  272. package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.js +531 -0
  273. package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.js.map +1 -0
  274. package/dist/src/infrastructure/external-apis/atlassian/confluence/index.d.ts +10 -0
  275. package/dist/src/infrastructure/external-apis/atlassian/confluence/index.d.ts.map +1 -0
  276. package/dist/src/infrastructure/external-apis/atlassian/confluence/index.js +12 -0
  277. package/dist/src/infrastructure/external-apis/atlassian/confluence/index.js.map +1 -0
  278. package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.d.ts +13 -0
  279. package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.d.ts.map +1 -0
  280. package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.js +129 -0
  281. package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.js.map +1 -0
  282. package/dist/src/infrastructure/external-apis/atlassian/confluence/types.d.ts +113 -0
  283. package/dist/src/infrastructure/external-apis/atlassian/confluence/types.d.ts.map +1 -0
  284. package/dist/src/infrastructure/external-apis/atlassian/confluence/types.js +5 -0
  285. package/dist/src/infrastructure/external-apis/atlassian/confluence/types.js.map +1 -0
  286. package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.d.ts +15 -0
  287. package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.d.ts.map +1 -0
  288. package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.js +141 -0
  289. package/dist/src/infrastructure/external-apis/atlassian/jira/adf-converter.js.map +1 -0
  290. package/dist/src/infrastructure/external-apis/atlassian/jira/client.d.ts +50 -0
  291. package/dist/src/infrastructure/external-apis/atlassian/jira/client.d.ts.map +1 -0
  292. package/dist/src/infrastructure/external-apis/atlassian/jira/client.js +226 -0
  293. package/dist/src/infrastructure/external-apis/atlassian/jira/client.js.map +1 -0
  294. package/dist/src/infrastructure/external-apis/atlassian/jira/index.d.ts +12 -0
  295. package/dist/src/infrastructure/external-apis/atlassian/jira/index.d.ts.map +1 -0
  296. package/dist/src/infrastructure/external-apis/atlassian/jira/index.js +16 -0
  297. package/dist/src/infrastructure/external-apis/atlassian/jira/index.js.map +1 -0
  298. package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.d.ts +49 -0
  299. package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.d.ts.map +1 -0
  300. package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.js +165 -0
  301. package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.js.map +1 -0
  302. package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.d.ts +14 -0
  303. package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.d.ts.map +1 -0
  304. package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.js +110 -0
  305. package/dist/src/infrastructure/external-apis/atlassian/jira/status-mapper.js.map +1 -0
  306. package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.d.ts +32 -0
  307. package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.d.ts.map +1 -0
  308. package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.js +284 -0
  309. package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.js.map +1 -0
  310. package/dist/src/infrastructure/external-apis/atlassian/jira/types.d.ts +114 -0
  311. package/dist/src/infrastructure/external-apis/atlassian/jira/types.d.ts.map +1 -0
  312. package/dist/src/infrastructure/external-apis/atlassian/jira/types.js +7 -0
  313. package/dist/src/infrastructure/external-apis/atlassian/jira/types.js.map +1 -0
  314. package/dist/src/infrastructure/external-apis/github/client.d.ts +25 -0
  315. package/dist/src/infrastructure/external-apis/github/client.d.ts.map +1 -0
  316. package/dist/src/infrastructure/external-apis/github/client.js +109 -0
  317. package/dist/src/infrastructure/external-apis/github/client.js.map +1 -0
  318. package/dist/src/infrastructure/external-apis/github/index.d.ts +7 -0
  319. package/dist/src/infrastructure/external-apis/github/index.d.ts.map +1 -0
  320. package/dist/src/infrastructure/external-apis/github/index.js +8 -0
  321. package/dist/src/infrastructure/external-apis/github/index.js.map +1 -0
  322. package/dist/src/infrastructure/external-apis/github/types.d.ts +69 -0
  323. package/dist/src/infrastructure/external-apis/github/types.d.ts.map +1 -0
  324. package/dist/src/infrastructure/external-apis/github/types.js +5 -0
  325. package/dist/src/infrastructure/external-apis/github/types.js.map +1 -0
  326. package/dist/src/infrastructure/external-apis/github/utils.d.ts +18 -0
  327. package/dist/src/infrastructure/external-apis/github/utils.d.ts.map +1 -0
  328. package/dist/src/infrastructure/external-apis/github/utils.js +84 -0
  329. package/dist/src/infrastructure/external-apis/github/utils.js.map +1 -0
  330. package/dist/src/infrastructure/filesystem/index.d.ts +6 -0
  331. package/dist/src/infrastructure/filesystem/index.d.ts.map +1 -0
  332. package/dist/src/infrastructure/filesystem/index.js +5 -0
  333. package/dist/src/infrastructure/filesystem/index.js.map +1 -0
  334. package/dist/src/infrastructure/filesystem/project-meta.d.ts +32 -0
  335. package/dist/src/infrastructure/filesystem/project-meta.d.ts.map +1 -0
  336. package/dist/src/infrastructure/filesystem/project-meta.js +75 -0
  337. package/dist/src/infrastructure/filesystem/project-meta.js.map +1 -0
  338. package/dist/src/infrastructure/parsers/aidlc-parser.d.ts +86 -0
  339. package/dist/src/infrastructure/parsers/aidlc-parser.d.ts.map +1 -0
  340. package/dist/src/infrastructure/parsers/aidlc-parser.js +208 -0
  341. package/dist/src/infrastructure/parsers/aidlc-parser.js.map +1 -0
  342. package/dist/src/infrastructure/parsers/index.d.ts +8 -0
  343. package/dist/src/infrastructure/parsers/index.d.ts.map +1 -0
  344. package/dist/src/infrastructure/parsers/index.js +6 -0
  345. package/dist/src/infrastructure/parsers/index.js.map +1 -0
  346. package/dist/src/infrastructure/parsers/markdown-parser.d.ts +51 -0
  347. package/dist/src/infrastructure/parsers/markdown-parser.d.ts.map +1 -0
  348. package/dist/src/infrastructure/parsers/markdown-parser.js +253 -0
  349. package/dist/src/infrastructure/parsers/markdown-parser.js.map +1 -0
  350. package/dist/src/presentation/cli/config.d.ts +12 -0
  351. package/dist/src/presentation/cli/config.d.ts.map +1 -0
  352. package/dist/src/presentation/cli/config.js +22 -0
  353. package/dist/src/presentation/cli/config.js.map +1 -0
  354. package/dist/src/presentation/cli/version.d.ts +10 -0
  355. package/dist/src/presentation/cli/version.d.ts.map +1 -0
  356. package/dist/src/presentation/cli/version.js +41 -0
  357. package/dist/src/presentation/cli/version.js.map +1 -0
  358. package/dist/src/presentation/cli.d.ts +22 -0
  359. package/dist/src/presentation/cli.d.ts.map +1 -0
  360. package/dist/src/presentation/cli.js +85 -0
  361. package/dist/src/presentation/cli.js.map +1 -0
  362. package/dist/src/presentation/commands/config/register.d.ts +11 -0
  363. package/dist/src/presentation/commands/config/register.d.ts.map +1 -0
  364. package/dist/src/presentation/commands/config/register.js +44 -0
  365. package/dist/src/presentation/commands/config/register.js.map +1 -0
  366. package/dist/src/presentation/commands/confluence/register.d.ts +11 -0
  367. package/dist/src/presentation/commands/confluence/register.d.ts.map +1 -0
  368. package/dist/src/presentation/commands/confluence/register.js +32 -0
  369. package/dist/src/presentation/commands/confluence/register.js.map +1 -0
  370. package/dist/src/presentation/commands/confluence/sync.d.ts +17 -0
  371. package/dist/src/presentation/commands/confluence/sync.d.ts.map +1 -0
  372. package/dist/src/presentation/commands/confluence/sync.js +25 -0
  373. package/dist/src/presentation/commands/confluence/sync.js.map +1 -0
  374. package/dist/src/presentation/commands/init/handler.d.ts +10 -0
  375. package/dist/src/presentation/commands/init/handler.d.ts.map +1 -0
  376. package/dist/src/presentation/commands/init/handler.js +64 -0
  377. package/dist/src/presentation/commands/init/handler.js.map +1 -0
  378. package/dist/src/presentation/commands/init/prompts.d.ts +41 -0
  379. package/dist/src/presentation/commands/init/prompts.d.ts.map +1 -0
  380. package/dist/src/presentation/commands/init/prompts.js +119 -0
  381. package/dist/src/presentation/commands/init/prompts.js.map +1 -0
  382. package/dist/src/presentation/commands/init/register.d.ts +11 -0
  383. package/dist/src/presentation/commands/init/register.d.ts.map +1 -0
  384. package/dist/src/presentation/commands/init/register.js +141 -0
  385. package/dist/src/presentation/commands/init/register.js.map +1 -0
  386. package/dist/src/presentation/commands/init/setup.d.ts +26 -0
  387. package/dist/src/presentation/commands/init/setup.d.ts.map +1 -0
  388. package/dist/src/presentation/commands/init/setup.js +196 -0
  389. package/dist/src/presentation/commands/init/setup.js.map +1 -0
  390. package/dist/src/presentation/commands/init/templates.d.ts +19 -0
  391. package/dist/src/presentation/commands/init/templates.d.ts.map +1 -0
  392. package/dist/src/presentation/commands/init/templates.js +140 -0
  393. package/dist/src/presentation/commands/init/templates.js.map +1 -0
  394. package/dist/src/presentation/commands/init/validation.d.ts +21 -0
  395. package/dist/src/presentation/commands/init/validation.d.ts.map +1 -0
  396. package/dist/src/presentation/commands/init/validation.js +65 -0
  397. package/dist/src/presentation/commands/init/validation.js.map +1 -0
  398. package/dist/src/presentation/commands/jira/register.d.ts +11 -0
  399. package/dist/src/presentation/commands/jira/register.d.ts.map +1 -0
  400. package/dist/src/presentation/commands/jira/register.js +75 -0
  401. package/dist/src/presentation/commands/jira/register.js.map +1 -0
  402. package/dist/src/presentation/commands/jira/sync.d.ts +29 -0
  403. package/dist/src/presentation/commands/jira/sync.d.ts.map +1 -0
  404. package/dist/src/presentation/commands/jira/sync.js +37 -0
  405. package/dist/src/presentation/commands/jira/sync.js.map +1 -0
  406. package/dist/src/{commands/multi-repo-add-repo.d.ts → presentation/commands/multi-repo/add-repo.d.ts} +1 -1
  407. package/dist/src/presentation/commands/multi-repo/add-repo.d.ts.map +1 -0
  408. package/dist/src/{commands/multi-repo-add-repo.js → presentation/commands/multi-repo/add-repo.js} +4 -4
  409. package/dist/src/presentation/commands/multi-repo/add-repo.js.map +1 -0
  410. package/dist/src/{commands/multi-repo-ci-status.d.ts → presentation/commands/multi-repo/ci-status.d.ts} +2 -2
  411. package/dist/src/presentation/commands/multi-repo/ci-status.d.ts.map +1 -0
  412. package/dist/src/{commands/multi-repo-ci-status.js → presentation/commands/multi-repo/ci-status.js} +95 -81
  413. package/dist/src/presentation/commands/multi-repo/ci-status.js.map +1 -0
  414. package/dist/src/{commands/multi-repo-confluence-sync.d.ts → presentation/commands/multi-repo/confluence-sync.d.ts} +1 -1
  415. package/dist/src/presentation/commands/multi-repo/confluence-sync.d.ts.map +1 -0
  416. package/dist/src/{commands/multi-repo-confluence-sync.js → presentation/commands/multi-repo/confluence-sync.js} +7 -6
  417. package/dist/src/presentation/commands/multi-repo/confluence-sync.js.map +1 -0
  418. package/dist/src/{commands/multi-repo-init.d.ts → presentation/commands/multi-repo/init.d.ts} +1 -1
  419. package/dist/src/presentation/commands/multi-repo/init.d.ts.map +1 -0
  420. package/dist/src/{commands/multi-repo-init.js → presentation/commands/multi-repo/init.js} +6 -6
  421. package/dist/src/presentation/commands/multi-repo/init.js.map +1 -0
  422. package/dist/src/{commands/multi-repo-list.d.ts → presentation/commands/multi-repo/list.d.ts} +1 -1
  423. package/dist/src/presentation/commands/multi-repo/list.d.ts.map +1 -0
  424. package/dist/src/{commands/multi-repo-list.js → presentation/commands/multi-repo/list.js} +2 -2
  425. package/dist/src/presentation/commands/multi-repo/list.js.map +1 -0
  426. package/dist/src/presentation/commands/multi-repo/register.d.ts +12 -0
  427. package/dist/src/presentation/commands/multi-repo/register.d.ts.map +1 -0
  428. package/dist/src/presentation/commands/multi-repo/register.js +249 -0
  429. package/dist/src/presentation/commands/multi-repo/register.js.map +1 -0
  430. package/dist/src/{commands/multi-repo-test.d.ts → presentation/commands/multi-repo/test.d.ts} +1 -1
  431. package/dist/src/presentation/commands/multi-repo/test.d.ts.map +1 -0
  432. package/dist/src/{commands/multi-repo-test.js → presentation/commands/multi-repo/test.js} +4 -4
  433. package/dist/src/presentation/commands/multi-repo/test.js.map +1 -0
  434. package/dist/src/presentation/commands/phase/register.d.ts +11 -0
  435. package/dist/src/presentation/commands/phase/register.d.ts.map +1 -0
  436. package/dist/src/presentation/commands/phase/register.js +97 -0
  437. package/dist/src/presentation/commands/phase/register.js.map +1 -0
  438. package/dist/src/presentation/commands/spec/archive.d.ts +17 -0
  439. package/dist/src/presentation/commands/spec/archive.d.ts.map +1 -0
  440. package/dist/src/presentation/commands/spec/archive.js +40 -0
  441. package/dist/src/presentation/commands/spec/archive.js.map +1 -0
  442. package/dist/src/presentation/commands/spec/list.d.ts +15 -0
  443. package/dist/src/presentation/commands/spec/list.d.ts.map +1 -0
  444. package/dist/src/presentation/commands/spec/list.js +55 -0
  445. package/dist/src/presentation/commands/spec/list.js.map +1 -0
  446. package/dist/src/presentation/commands/spec/register.d.ts +11 -0
  447. package/dist/src/presentation/commands/spec/register.d.ts.map +1 -0
  448. package/dist/src/presentation/commands/spec/register.js +45 -0
  449. package/dist/src/presentation/commands/spec/register.js.map +1 -0
  450. package/dist/src/presentation/commands/workflow/orchestrator.d.ts +50 -0
  451. package/dist/src/presentation/commands/workflow/orchestrator.d.ts.map +1 -0
  452. package/dist/src/presentation/commands/workflow/orchestrator.js +174 -0
  453. package/dist/src/presentation/commands/workflow/orchestrator.js.map +1 -0
  454. package/dist/src/presentation/commands/workflow/register.d.ts +11 -0
  455. package/dist/src/presentation/commands/workflow/register.d.ts.map +1 -0
  456. package/dist/src/presentation/commands/workflow/register.js +58 -0
  457. package/dist/src/presentation/commands/workflow/register.js.map +1 -0
  458. package/dist/src/presentation/formatters/error-formatter.d.ts +79 -0
  459. package/dist/src/presentation/formatters/error-formatter.d.ts.map +1 -0
  460. package/dist/src/presentation/formatters/error-formatter.js +150 -0
  461. package/dist/src/presentation/formatters/error-formatter.js.map +1 -0
  462. package/dist/src/presentation/formatters/index.d.ts +8 -0
  463. package/dist/src/presentation/formatters/index.d.ts.map +1 -0
  464. package/dist/src/presentation/formatters/index.js +11 -0
  465. package/dist/src/presentation/formatters/index.js.map +1 -0
  466. package/dist/src/presentation/formatters/output-formatter.d.ts +98 -0
  467. package/dist/src/presentation/formatters/output-formatter.d.ts.map +1 -0
  468. package/dist/src/presentation/formatters/output-formatter.js +165 -0
  469. package/dist/src/presentation/formatters/output-formatter.js.map +1 -0
  470. package/dist/src/presentation/formatters/progress-formatter.d.ts +121 -0
  471. package/dist/src/presentation/formatters/progress-formatter.d.ts.map +1 -0
  472. package/dist/src/presentation/formatters/progress-formatter.js +235 -0
  473. package/dist/src/presentation/formatters/progress-formatter.js.map +1 -0
  474. package/dist/src/presentation/interactive/confirmation.d.ts +24 -0
  475. package/dist/src/presentation/interactive/confirmation.d.ts.map +1 -0
  476. package/dist/src/presentation/interactive/confirmation.js +54 -0
  477. package/dist/src/presentation/interactive/confirmation.js.map +1 -0
  478. package/dist/src/presentation/interactive/index.d.ts +8 -0
  479. package/dist/src/presentation/interactive/index.d.ts.map +1 -0
  480. package/dist/src/presentation/interactive/index.js +11 -0
  481. package/dist/src/presentation/interactive/index.js.map +1 -0
  482. package/dist/src/presentation/interactive/prompts.d.ts +31 -0
  483. package/dist/src/presentation/interactive/prompts.d.ts.map +1 -0
  484. package/dist/src/presentation/interactive/prompts.js +71 -0
  485. package/dist/src/presentation/interactive/prompts.js.map +1 -0
  486. package/dist/src/presentation/interactive/selection.d.ts +31 -0
  487. package/dist/src/presentation/interactive/selection.d.ts.map +1 -0
  488. package/dist/src/presentation/interactive/selection.js +138 -0
  489. package/dist/src/presentation/interactive/selection.js.map +1 -0
  490. package/dist/src/shared/types/errors.d.ts +132 -0
  491. package/dist/src/shared/types/errors.d.ts.map +1 -0
  492. package/dist/src/shared/types/errors.js +61 -0
  493. package/dist/src/shared/types/errors.js.map +1 -0
  494. package/dist/src/shared/types/result.d.ts +53 -0
  495. package/dist/src/shared/types/result.d.ts.map +1 -0
  496. package/dist/src/shared/types/result.js +42 -0
  497. package/dist/src/shared/types/result.js.map +1 -0
  498. package/dist/test-confluence-auth.d.ts +6 -0
  499. package/dist/test-confluence-auth.d.ts.map +1 -0
  500. package/dist/test-confluence-auth.js +128 -0
  501. package/dist/test-confluence-auth.js.map +1 -0
  502. package/docs/MIGRATION.md +513 -0
  503. package/docs/architecture.md +774 -0
  504. package/docs/guides/comprehensive-verification-guide.md +1926 -0
  505. package/docs/onion-architecture-phase0-complete.md +91 -0
  506. package/package.json +6 -6
  507. package/scripts/README.md +148 -0
  508. package/scripts/__tests__/jira-transitions.test.ts +44 -30
  509. package/scripts/__tests__/mermaid-converter.test.ts +2 -2
  510. package/scripts/__tests__/multi-repo-validator.test.ts +62 -62
  511. package/scripts/__tests__/spec-archiver.test.ts +12 -0
  512. package/scripts/__tests__/validate-phase.test.ts +6 -6
  513. package/scripts/build/README.md +24 -0
  514. package/scripts/{copy-static-assets.js → build/copy-static-assets.js} +1 -1
  515. package/scripts/{set-permissions.js → build/set-permissions.js} +1 -1
  516. package/scripts/config/config-schema.ts +43 -302
  517. package/scripts/config-global.ts +3 -2
  518. package/scripts/confluence-sync.ts +17 -538
  519. package/scripts/constants/environments.ts +3 -53
  520. package/scripts/constants/languages.ts +3 -68
  521. package/scripts/constants/test-commands.ts +3 -94
  522. package/scripts/dev-tools/README.md +22 -0
  523. package/scripts/{test-interactive.ts → dev-tools/test-interactive.ts} +4 -3
  524. package/scripts/github-actions-client.ts +18 -256
  525. package/scripts/jira-sync.ts +5 -1270
  526. package/scripts/markdown-to-confluence.ts +5 -5
  527. package/scripts/multi-project-estimate.ts +3 -2
  528. package/scripts/phase-runner.ts +41 -19
  529. package/scripts/pre-flight-check.ts +27 -11
  530. package/scripts/template/__tests__/multi-repo-renderer.test.ts +12 -0
  531. package/scripts/template/multi-repo-renderer.ts +2 -2
  532. package/scripts/test-execution-generator.ts +5 -4
  533. package/scripts/utils/__tests__/config-validator.test.ts +19 -19
  534. package/scripts/utils/__tests__/feature-name-validator.test.ts +13 -13
  535. package/scripts/utils/__tests__/multi-repo-validator.test.ts +34 -34
  536. package/scripts/utils/__tests__/project-analyzer.test.ts +542 -0
  537. package/scripts/utils/__tests__/safe-file-reader.test.ts +208 -0
  538. package/scripts/utils/__tests__/security-validator.test.ts +33 -33
  539. package/scripts/utils/__tests__/validation-result.test.ts +112 -0
  540. package/scripts/utils/aidlc-parser.ts +18 -287
  541. package/scripts/utils/ci-generator.ts +4 -3
  542. package/scripts/utils/config-loader.ts +54 -50
  543. package/scripts/utils/config-validator.ts +89 -80
  544. package/scripts/utils/docker-requirement-detector.ts +5 -4
  545. package/scripts/utils/env-config.ts +59 -40
  546. package/scripts/utils/feature-name-validator.ts +25 -40
  547. package/scripts/utils/interactive-helpers.ts +24 -132
  548. package/scripts/utils/language-detector.ts +4 -3
  549. package/scripts/utils/markdown-parser.ts +18 -373
  550. package/scripts/utils/multi-repo-validator.ts +27 -28
  551. package/scripts/utils/project-analyzer.ts +429 -0
  552. package/scripts/utils/project-detector.ts +6 -5
  553. package/scripts/utils/project-finder.ts +2 -154
  554. package/scripts/utils/project-meta.ts +8 -91
  555. package/scripts/utils/safe-file-reader.ts +158 -0
  556. package/scripts/utils/security-validator.ts +42 -78
  557. package/scripts/utils/spec-archiver.ts +7 -6
  558. package/scripts/utils/spec-updater.ts +12 -6
  559. package/scripts/utils/tasks-converter.ts +2 -2
  560. package/scripts/utils/tasks-format-validator.ts +4 -4
  561. package/scripts/utils/template-applier.ts +4 -3
  562. package/scripts/utils/types/validation.ts +92 -0
  563. package/scripts/validate-phase.ts +51 -23
  564. package/scripts/workflow-orchestrator.ts +16 -251
  565. package/dist/scripts/mermaid-converter.d.ts.map +0 -1
  566. package/dist/scripts/mermaid-converter.js.map +0 -1
  567. package/dist/scripts/resource-dashboard.d.ts +0 -7
  568. package/dist/scripts/resource-dashboard.d.ts.map +0 -1
  569. package/dist/scripts/resource-dashboard.js +0 -157
  570. package/dist/scripts/resource-dashboard.js.map +0 -1
  571. package/dist/scripts/test-interactive.d.ts.map +0 -1
  572. package/dist/scripts/test-interactive.js.map +0 -1
  573. package/dist/scripts/test-new-features.d.ts +0 -5
  574. package/dist/scripts/test-new-features.d.ts.map +0 -1
  575. package/dist/scripts/test-new-features.js +0 -148
  576. package/dist/scripts/test-new-features.js.map +0 -1
  577. package/dist/scripts/test-spec-generator.d.ts +0 -29
  578. package/dist/scripts/test-spec-generator.d.ts.map +0 -1
  579. package/dist/scripts/test-spec-generator.js +0 -493
  580. package/dist/scripts/test-spec-generator.js.map +0 -1
  581. package/dist/scripts/utils/confluence-approval.d.ts +0 -46
  582. package/dist/scripts/utils/confluence-approval.d.ts.map +0 -1
  583. package/dist/scripts/utils/confluence-approval.js +0 -120
  584. package/dist/scripts/utils/confluence-approval.js.map +0 -1
  585. package/dist/scripts/utils/template-finder.d.ts +0 -37
  586. package/dist/scripts/utils/template-finder.d.ts.map +0 -1
  587. package/dist/scripts/utils/template-finder.js +0 -58
  588. package/dist/scripts/utils/template-finder.js.map +0 -1
  589. package/dist/src/commands/multi-repo-add-repo.d.ts.map +0 -1
  590. package/dist/src/commands/multi-repo-add-repo.js.map +0 -1
  591. package/dist/src/commands/multi-repo-ci-status.d.ts.map +0 -1
  592. package/dist/src/commands/multi-repo-ci-status.js.map +0 -1
  593. package/dist/src/commands/multi-repo-confluence-sync.d.ts.map +0 -1
  594. package/dist/src/commands/multi-repo-confluence-sync.js.map +0 -1
  595. package/dist/src/commands/multi-repo-init.d.ts.map +0 -1
  596. package/dist/src/commands/multi-repo-init.js.map +0 -1
  597. package/dist/src/commands/multi-repo-list.d.ts.map +0 -1
  598. package/dist/src/commands/multi-repo-list.js.map +0 -1
  599. package/dist/src/commands/multi-repo-test.d.ts.map +0 -1
  600. package/dist/src/commands/multi-repo-test.js.map +0 -1
  601. package/dist/src/commands/setup-existing.d.ts +0 -22
  602. package/dist/src/commands/setup-existing.d.ts.map +0 -1
  603. package/dist/src/commands/setup-existing.js +0 -606
  604. package/dist/src/commands/setup-existing.js.map +0 -1
  605. package/scripts/__tests__/setup-existing-project.test.ts +0 -244
  606. package/scripts/resource-dashboard.ts +0 -189
  607. package/scripts/test-new-features.ts +0 -171
  608. package/scripts/test-spec-generator.ts +0 -570
  609. package/scripts/utils/confluence-approval.ts +0 -169
  610. package/scripts/utils/template-finder.ts +0 -69
  611. /package/dist/scripts/{mermaid-converter.d.ts → dev-tools/mermaid-converter.d.ts} +0 -0
  612. /package/dist/scripts/{mermaid-converter.js → dev-tools/mermaid-converter.js} +0 -0
  613. /package/dist/scripts/{test-interactive.d.ts → dev-tools/test-interactive.d.ts} +0 -0
  614. /package/scripts/{mermaid-converter.ts → dev-tools/mermaid-converter.ts} +0 -0
@@ -0,0 +1,56 @@
1
+ /**
2
+ * ArchiveSpecUseCase - Archive a specification
3
+ *
4
+ * Application layer use case for spec archiving
5
+ */
6
+ import { ok, err } from '../../../shared/types/result.js';
7
+ /**
8
+ * ArchiveSpecUseCase
9
+ *
10
+ * Archive a specification after implementation is complete
11
+ */
12
+ export class ArchiveSpecUseCase {
13
+ repository;
14
+ constructor(repository) {
15
+ this.repository = repository;
16
+ }
17
+ /**
18
+ * Execute use case
19
+ *
20
+ * @param featureName - Feature name to archive
21
+ * @returns Success with ArchiveSpecResult or failure with UseCaseError
22
+ */
23
+ async execute(featureName) {
24
+ // Load spec from repository
25
+ const specResult = await this.repository.findByFeatureName(featureName);
26
+ if (!specResult.success) {
27
+ return err({
28
+ type: 'RepositoryError',
29
+ cause: specResult.error,
30
+ });
31
+ }
32
+ // Note: No phase validation - specs can be archived in any phase
33
+ // This allows for archiving abandoned or cancelled specs as well
34
+ // Delete spec from active repository
35
+ // (The repository implementation will handle moving to archive)
36
+ const deleteResult = await this.repository.delete(featureName);
37
+ if (!deleteResult.success) {
38
+ return err({
39
+ type: 'RepositoryError',
40
+ cause: deleteResult.error,
41
+ });
42
+ }
43
+ // Return result
44
+ return ok({
45
+ featureName,
46
+ archiveLocation: `.kiro/specs/.archive/${featureName.value}`,
47
+ archivedFiles: [
48
+ 'spec.json',
49
+ 'requirements.md',
50
+ 'design.md',
51
+ 'tasks.md',
52
+ ],
53
+ });
54
+ }
55
+ }
56
+ //# sourceMappingURL=archive-spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"archive-spec.js","sourceRoot":"","sources":["../../../../../src/application/use-cases/spec/archive-spec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAW1D;;;;GAIG;AACH,MAAM,OAAO,kBAAkB;IACA;IAA7B,YAA6B,UAA0B;QAA1B,eAAU,GAAV,UAAU,CAAgB;IAAG,CAAC;IAE3D;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CACX,WAAwB;QAExB,4BAA4B;QAC5B,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACxE,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;YACxB,OAAO,GAAG,CAAC;gBACT,IAAI,EAAE,iBAAiB;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;aACxB,CAAC,CAAC;QACL,CAAC;QAED,iEAAiE;QACjE,iEAAiE;QAEjE,qCAAqC;QACrC,gEAAgE;QAChE,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAC/D,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;YAC1B,OAAO,GAAG,CAAC;gBACT,IAAI,EAAE,iBAAiB;gBACvB,KAAK,EAAE,YAAY,CAAC,KAAK;aAC1B,CAAC,CAAC;QACL,CAAC;QAED,gBAAgB;QAChB,OAAO,EAAE,CAAC;YACR,WAAW;YACX,eAAe,EAAE,wBAAwB,WAAW,CAAC,KAAK,EAAE;YAC5D,aAAa,EAAE;gBACb,WAAW;gBACX,iBAAiB;gBACjB,WAAW;gBACX,UAAU;aACX;SACF,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * GenerateDesignUseCase - Generate design for a specification
3
+ *
4
+ * Application layer use case for design generation
5
+ */
6
+ import type { Result } from '../../../shared/types/result.js';
7
+ import type { UseCaseError } from '../../../shared/types/errors.js';
8
+ import type { SpecRepository } from '../../interfaces/spec-repository.js';
9
+ import type { FeatureName } from '../../../domain/value-objects/feature-name.js';
10
+ /**
11
+ * GenerateDesignUseCase Result
12
+ */
13
+ export interface GenerateDesignResult {
14
+ featureName: FeatureName;
15
+ designFile: string;
16
+ nextCommand: string;
17
+ }
18
+ /**
19
+ * GenerateDesignUseCase
20
+ *
21
+ * Generate design document for a specification
22
+ */
23
+ export declare class GenerateDesignUseCase {
24
+ private readonly repository;
25
+ constructor(repository: SpecRepository);
26
+ /**
27
+ * Execute use case
28
+ *
29
+ * @param featureName - Feature name to generate design for
30
+ * @returns Success with GenerateDesignResult or failure with UseCaseError
31
+ */
32
+ execute(featureName: FeatureName): Promise<Result<GenerateDesignResult, UseCaseError>>;
33
+ }
34
+ //# sourceMappingURL=generate-design.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-design.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/spec/generate-design.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAGjF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,qBAAa,qBAAqB;IACpB,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,cAAc;IAEvD;;;;;OAKG;IACG,OAAO,CACX,WAAW,EAAE,WAAW,GACvB,OAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAAC;CAuCvD"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * GenerateDesignUseCase - Generate design for a specification
3
+ *
4
+ * Application layer use case for design generation
5
+ */
6
+ import { ok, err } from '../../../shared/types/result.js';
7
+ /**
8
+ * GenerateDesignUseCase
9
+ *
10
+ * Generate design document for a specification
11
+ */
12
+ export class GenerateDesignUseCase {
13
+ repository;
14
+ constructor(repository) {
15
+ this.repository = repository;
16
+ }
17
+ /**
18
+ * Execute use case
19
+ *
20
+ * @param featureName - Feature name to generate design for
21
+ * @returns Success with GenerateDesignResult or failure with UseCaseError
22
+ */
23
+ async execute(featureName) {
24
+ // Load spec from repository
25
+ const specResult = await this.repository.findByFeatureName(featureName);
26
+ if (!specResult.success) {
27
+ return err({
28
+ type: 'RepositoryError',
29
+ cause: specResult.error,
30
+ });
31
+ }
32
+ const spec = specResult.value;
33
+ // Verify spec is in requirements-generated phase
34
+ if (spec.phase !== 'requirements-generated') {
35
+ return err({
36
+ type: 'InvalidInput',
37
+ message: `Spec must be in 'requirements-generated' phase to generate design, but is in '${spec.phase}' phase`,
38
+ });
39
+ }
40
+ // Update spec phase to design-generated
41
+ spec.updatePhase('design-generated');
42
+ // Save updated spec
43
+ const saveResult = await this.repository.save(spec);
44
+ if (!saveResult.success) {
45
+ return err({
46
+ type: 'RepositoryError',
47
+ cause: saveResult.error,
48
+ });
49
+ }
50
+ // Return result
51
+ return ok({
52
+ featureName,
53
+ designFile: 'design.md',
54
+ nextCommand: `/kiro:spec-tasks ${featureName.value}`,
55
+ });
56
+ }
57
+ }
58
+ //# sourceMappingURL=generate-design.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-design.js","sourceRoot":"","sources":["../../../../../src/application/use-cases/spec/generate-design.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAW1D;;;;GAIG;AACH,MAAM,OAAO,qBAAqB;IACH;IAA7B,YAA6B,UAA0B;QAA1B,eAAU,GAAV,UAAU,CAAgB;IAAG,CAAC;IAE3D;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CACX,WAAwB;QAExB,4BAA4B;QAC5B,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACxE,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;YACxB,OAAO,GAAG,CAAC;gBACT,IAAI,EAAE,iBAAiB;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;aACxB,CAAC,CAAC;QACL,CAAC;QAED,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC;QAE9B,iDAAiD;QACjD,IAAI,IAAI,CAAC,KAAK,KAAK,wBAAwB,EAAE,CAAC;YAC5C,OAAO,GAAG,CAAC;gBACT,IAAI,EAAE,cAAc;gBACpB,OAAO,EAAE,iFAAiF,IAAI,CAAC,KAAK,SAAS;aAC9G,CAAC,CAAC;QACL,CAAC;QAED,wCAAwC;QACxC,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;QAErC,oBAAoB;QACpB,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;YACxB,OAAO,GAAG,CAAC;gBACT,IAAI,EAAE,iBAAiB;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;aACxB,CAAC,CAAC;QACL,CAAC;QAED,gBAAgB;QAChB,OAAO,EAAE,CAAC;YACR,WAAW;YACX,UAAU,EAAE,WAAW;YACvB,WAAW,EAAE,oBAAoB,WAAW,CAAC,KAAK,EAAE;SACrD,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * GenerateRequirementsUseCase - Generate requirements for a specification
3
+ *
4
+ * Application layer use case for requirements generation
5
+ */
6
+ import type { Result } from '../../../shared/types/result.js';
7
+ import type { UseCaseError } from '../../../shared/types/errors.js';
8
+ import type { SpecRepository } from '../../interfaces/spec-repository.js';
9
+ import type { FeatureName } from '../../../domain/value-objects/feature-name.js';
10
+ /**
11
+ * GenerateRequirementsUseCase Result
12
+ */
13
+ export interface GenerateRequirementsResult {
14
+ featureName: FeatureName;
15
+ requirementsFile: string;
16
+ nextCommand: string;
17
+ }
18
+ /**
19
+ * GenerateRequirementsUseCase
20
+ *
21
+ * Generate requirements document for a specification
22
+ */
23
+ export declare class GenerateRequirementsUseCase {
24
+ private readonly repository;
25
+ constructor(repository: SpecRepository);
26
+ /**
27
+ * Execute use case
28
+ *
29
+ * @param featureName - Feature name to generate requirements for
30
+ * @returns Success with GenerateRequirementsResult or failure with UseCaseError
31
+ */
32
+ execute(featureName: FeatureName): Promise<Result<GenerateRequirementsResult, UseCaseError>>;
33
+ }
34
+ //# sourceMappingURL=generate-requirements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-requirements.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/spec/generate-requirements.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAGjF;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,WAAW,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,qBAAa,2BAA2B;IAC1B,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,cAAc;IAEvD;;;;;OAKG;IACG,OAAO,CACX,WAAW,EAAE,WAAW,GACvB,OAAO,CAAC,MAAM,CAAC,0BAA0B,EAAE,YAAY,CAAC,CAAC;CAuC7D"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * GenerateRequirementsUseCase - Generate requirements for a specification
3
+ *
4
+ * Application layer use case for requirements generation
5
+ */
6
+ import { ok, err } from '../../../shared/types/result.js';
7
+ /**
8
+ * GenerateRequirementsUseCase
9
+ *
10
+ * Generate requirements document for a specification
11
+ */
12
+ export class GenerateRequirementsUseCase {
13
+ repository;
14
+ constructor(repository) {
15
+ this.repository = repository;
16
+ }
17
+ /**
18
+ * Execute use case
19
+ *
20
+ * @param featureName - Feature name to generate requirements for
21
+ * @returns Success with GenerateRequirementsResult or failure with UseCaseError
22
+ */
23
+ async execute(featureName) {
24
+ // Load spec from repository
25
+ const specResult = await this.repository.findByFeatureName(featureName);
26
+ if (!specResult.success) {
27
+ return err({
28
+ type: 'RepositoryError',
29
+ cause: specResult.error,
30
+ });
31
+ }
32
+ const spec = specResult.value;
33
+ // Verify spec is in initialized phase
34
+ if (spec.phase !== 'initialized') {
35
+ return err({
36
+ type: 'InvalidInput',
37
+ message: `Spec must be in 'initialized' phase to generate requirements, but is in '${spec.phase}' phase`,
38
+ });
39
+ }
40
+ // Update spec phase to requirements-generated
41
+ spec.updatePhase('requirements-generated');
42
+ // Save updated spec
43
+ const saveResult = await this.repository.save(spec);
44
+ if (!saveResult.success) {
45
+ return err({
46
+ type: 'RepositoryError',
47
+ cause: saveResult.error,
48
+ });
49
+ }
50
+ // Return result
51
+ return ok({
52
+ featureName,
53
+ requirementsFile: 'requirements.md',
54
+ nextCommand: `/kiro:spec-design ${featureName.value}`,
55
+ });
56
+ }
57
+ }
58
+ //# sourceMappingURL=generate-requirements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-requirements.js","sourceRoot":"","sources":["../../../../../src/application/use-cases/spec/generate-requirements.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAW1D;;;;GAIG;AACH,MAAM,OAAO,2BAA2B;IACT;IAA7B,YAA6B,UAA0B;QAA1B,eAAU,GAAV,UAAU,CAAgB;IAAG,CAAC;IAE3D;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CACX,WAAwB;QAExB,4BAA4B;QAC5B,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACxE,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;YACxB,OAAO,GAAG,CAAC;gBACT,IAAI,EAAE,iBAAiB;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;aACxB,CAAC,CAAC;QACL,CAAC;QAED,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC;QAE9B,sCAAsC;QACtC,IAAI,IAAI,CAAC,KAAK,KAAK,aAAa,EAAE,CAAC;YACjC,OAAO,GAAG,CAAC;gBACT,IAAI,EAAE,cAAc;gBACpB,OAAO,EAAE,4EAA4E,IAAI,CAAC,KAAK,SAAS;aACzG,CAAC,CAAC;QACL,CAAC;QAED,8CAA8C;QAC9C,IAAI,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC;QAE3C,oBAAoB;QACpB,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;YACxB,OAAO,GAAG,CAAC;gBACT,IAAI,EAAE,iBAAiB;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;aACxB,CAAC,CAAC;QACL,CAAC;QAED,gBAAgB;QAChB,OAAO,EAAE,CAAC;YACR,WAAW;YACX,gBAAgB,EAAE,iBAAiB;YACnC,WAAW,EAAE,qBAAqB,WAAW,CAAC,KAAK,EAAE;SACtD,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * GenerateTasksUseCase - Generate tasks for a specification
3
+ *
4
+ * Application layer use case for tasks generation
5
+ */
6
+ import type { Result } from '../../../shared/types/result.js';
7
+ import type { UseCaseError } from '../../../shared/types/errors.js';
8
+ import type { SpecRepository } from '../../interfaces/spec-repository.js';
9
+ import type { FeatureName } from '../../../domain/value-objects/feature-name.js';
10
+ /**
11
+ * GenerateTasksUseCase Result
12
+ */
13
+ export interface GenerateTasksResult {
14
+ featureName: FeatureName;
15
+ tasksFile: string;
16
+ nextCommand: string;
17
+ }
18
+ /**
19
+ * GenerateTasksUseCase
20
+ *
21
+ * Generate tasks document for a specification
22
+ */
23
+ export declare class GenerateTasksUseCase {
24
+ private readonly repository;
25
+ constructor(repository: SpecRepository);
26
+ /**
27
+ * Execute use case
28
+ *
29
+ * @param featureName - Feature name to generate tasks for
30
+ * @returns Success with GenerateTasksResult or failure with UseCaseError
31
+ */
32
+ execute(featureName: FeatureName): Promise<Result<GenerateTasksResult, UseCaseError>>;
33
+ }
34
+ //# sourceMappingURL=generate-tasks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-tasks.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/spec/generate-tasks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAGjF;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,qBAAa,oBAAoB;IACnB,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,cAAc;IAEvD;;;;;OAKG;IACG,OAAO,CACX,WAAW,EAAE,WAAW,GACvB,OAAO,CAAC,MAAM,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAAC;CAuCtD"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * GenerateTasksUseCase - Generate tasks for a specification
3
+ *
4
+ * Application layer use case for tasks generation
5
+ */
6
+ import { ok, err } from '../../../shared/types/result.js';
7
+ /**
8
+ * GenerateTasksUseCase
9
+ *
10
+ * Generate tasks document for a specification
11
+ */
12
+ export class GenerateTasksUseCase {
13
+ repository;
14
+ constructor(repository) {
15
+ this.repository = repository;
16
+ }
17
+ /**
18
+ * Execute use case
19
+ *
20
+ * @param featureName - Feature name to generate tasks for
21
+ * @returns Success with GenerateTasksResult or failure with UseCaseError
22
+ */
23
+ async execute(featureName) {
24
+ // Load spec from repository
25
+ const specResult = await this.repository.findByFeatureName(featureName);
26
+ if (!specResult.success) {
27
+ return err({
28
+ type: 'RepositoryError',
29
+ cause: specResult.error,
30
+ });
31
+ }
32
+ const spec = specResult.value;
33
+ // Verify spec is in design-generated phase
34
+ if (spec.phase !== 'design-generated') {
35
+ return err({
36
+ type: 'InvalidInput',
37
+ message: `Spec must be in 'design-generated' phase to generate tasks, but is in '${spec.phase}' phase`,
38
+ });
39
+ }
40
+ // Update spec phase to tasks-generated
41
+ spec.updatePhase('tasks-generated');
42
+ // Save updated spec
43
+ const saveResult = await this.repository.save(spec);
44
+ if (!saveResult.success) {
45
+ return err({
46
+ type: 'RepositoryError',
47
+ cause: saveResult.error,
48
+ });
49
+ }
50
+ // Return result
51
+ return ok({
52
+ featureName,
53
+ tasksFile: 'tasks.md',
54
+ nextCommand: `/kiro:spec-impl ${featureName.value}`,
55
+ });
56
+ }
57
+ }
58
+ //# sourceMappingURL=generate-tasks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-tasks.js","sourceRoot":"","sources":["../../../../../src/application/use-cases/spec/generate-tasks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAW1D;;;;GAIG;AACH,MAAM,OAAO,oBAAoB;IACF;IAA7B,YAA6B,UAA0B;QAA1B,eAAU,GAAV,UAAU,CAAgB;IAAG,CAAC;IAE3D;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CACX,WAAwB;QAExB,4BAA4B;QAC5B,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACxE,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;YACxB,OAAO,GAAG,CAAC;gBACT,IAAI,EAAE,iBAAiB;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;aACxB,CAAC,CAAC;QACL,CAAC;QAED,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC;QAE9B,2CAA2C;QAC3C,IAAI,IAAI,CAAC,KAAK,KAAK,kBAAkB,EAAE,CAAC;YACtC,OAAO,GAAG,CAAC;gBACT,IAAI,EAAE,cAAc;gBACpB,OAAO,EAAE,0EAA0E,IAAI,CAAC,KAAK,SAAS;aACvG,CAAC,CAAC;QACL,CAAC;QAED,uCAAuC;QACvC,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;QAEpC,oBAAoB;QACpB,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;YACxB,OAAO,GAAG,CAAC;gBACT,IAAI,EAAE,iBAAiB;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;aACxB,CAAC,CAAC;QACL,CAAC;QAED,gBAAgB;QAChB,OAAO,EAAE,CAAC;YACR,WAAW;YACX,SAAS,EAAE,UAAU;YACrB,WAAW,EAAE,mBAAmB,WAAW,CAAC,KAAK,EAAE;SACpD,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * InitSpecUseCase - Initialize a new specification
3
+ *
4
+ * Application layer use case for spec initialization
5
+ */
6
+ import type { Result } from '../../../shared/types/result.js';
7
+ import type { UseCaseError } from '../../../shared/types/errors.js';
8
+ import type { SpecRepository } from '../../interfaces/spec-repository.js';
9
+ import { FeatureName } from '../../../domain/value-objects/feature-name.js';
10
+ /**
11
+ * InitSpecUseCase Result
12
+ */
13
+ export interface InitSpecResult {
14
+ featureName: FeatureName;
15
+ createdFiles: string[];
16
+ nextCommand: string;
17
+ }
18
+ /**
19
+ * InitSpecUseCase
20
+ *
21
+ * Initialize a new specification with unique feature name
22
+ */
23
+ export declare class InitSpecUseCase {
24
+ private readonly repository;
25
+ constructor(repository: SpecRepository);
26
+ /**
27
+ * Execute use case
28
+ *
29
+ * @param projectDescription - Project description to generate feature name
30
+ * @returns Success with InitSpecResult or failure with UseCaseError
31
+ */
32
+ execute(projectDescription: string): Promise<Result<InitSpecResult, UseCaseError>>;
33
+ /**
34
+ * Generate feature name from project description
35
+ *
36
+ * @param description - Project description
37
+ * @returns Feature name in kebab-case
38
+ */
39
+ private generateFeatureName;
40
+ /**
41
+ * Ensure feature name is unique
42
+ *
43
+ * @param baseFeatureName - Base feature name
44
+ * @returns Unique FeatureName or error
45
+ */
46
+ private ensureUniqueness;
47
+ }
48
+ //# sourceMappingURL=init-spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-spec.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/spec/init-spec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAmB,MAAM,iCAAiC,CAAC;AACrF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAG1E,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,cAAc;IAEvD;;;;;OAKG;IACG,OAAO,CACX,kBAAkB,EAAE,MAAM,GACzB,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IA2ChD;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;IAW3B;;;;;OAKG;YACW,gBAAgB;CA2C/B"}
@@ -0,0 +1,121 @@
1
+ /**
2
+ * InitSpecUseCase - Initialize a new specification
3
+ *
4
+ * Application layer use case for spec initialization
5
+ */
6
+ import { ok, err } from '../../../shared/types/result.js';
7
+ import { Spec } from '../../../domain/entities/spec.js';
8
+ import { FeatureName } from '../../../domain/value-objects/feature-name.js';
9
+ /**
10
+ * InitSpecUseCase
11
+ *
12
+ * Initialize a new specification with unique feature name
13
+ */
14
+ export class InitSpecUseCase {
15
+ repository;
16
+ constructor(repository) {
17
+ this.repository = repository;
18
+ }
19
+ /**
20
+ * Execute use case
21
+ *
22
+ * @param projectDescription - Project description to generate feature name
23
+ * @returns Success with InitSpecResult or failure with UseCaseError
24
+ */
25
+ async execute(projectDescription) {
26
+ // Validate input
27
+ if (!projectDescription || projectDescription.trim().length === 0) {
28
+ return err({
29
+ type: 'InvalidInput',
30
+ message: 'Project description cannot be empty',
31
+ });
32
+ }
33
+ // Generate feature name from project description
34
+ const baseFeatureName = this.generateFeatureName(projectDescription);
35
+ // Ensure uniqueness (auto-generate suffixes on collision)
36
+ const uniqueFeatureName = await this.ensureUniqueness(baseFeatureName);
37
+ if (!uniqueFeatureName.success) {
38
+ return err({
39
+ type: 'RepositoryError',
40
+ cause: uniqueFeatureName.error,
41
+ });
42
+ }
43
+ const featureName = uniqueFeatureName.value;
44
+ // Create Spec entity
45
+ const spec = new Spec(featureName.value, 'initialized', 'ja');
46
+ // Save to repository
47
+ const saveResult = await this.repository.save(spec);
48
+ if (!saveResult.success) {
49
+ return err({
50
+ type: 'RepositoryError',
51
+ cause: saveResult.error,
52
+ });
53
+ }
54
+ // Return result
55
+ return ok({
56
+ featureName,
57
+ createdFiles: ['spec.json', 'requirements.md'],
58
+ nextCommand: `/kiro:spec-requirements ${featureName.value}`,
59
+ });
60
+ }
61
+ /**
62
+ * Generate feature name from project description
63
+ *
64
+ * @param description - Project description
65
+ * @returns Feature name in kebab-case
66
+ */
67
+ generateFeatureName(description) {
68
+ // Convert to lowercase, remove special chars, replace spaces with hyphens
69
+ return description
70
+ .toLowerCase()
71
+ .replace(/[^a-z0-9\s-]/g, '')
72
+ .replace(/\s+/g, '-')
73
+ .replace(/-+/g, '-')
74
+ .replace(/^-|-$/g, '')
75
+ .substring(0, 50);
76
+ }
77
+ /**
78
+ * Ensure feature name is unique
79
+ *
80
+ * @param baseFeatureName - Base feature name
81
+ * @returns Unique FeatureName or error
82
+ */
83
+ async ensureUniqueness(baseFeatureName) {
84
+ let candidateName = baseFeatureName;
85
+ let suffix = 1;
86
+ while (true) {
87
+ // Try to create FeatureName
88
+ let featureName;
89
+ try {
90
+ featureName = new FeatureName(candidateName);
91
+ }
92
+ catch {
93
+ // Invalid feature name, try next
94
+ suffix++;
95
+ candidateName = `${baseFeatureName}-${suffix}`;
96
+ continue;
97
+ }
98
+ // Check if exists
99
+ const existsResult = await this.repository.exists(featureName);
100
+ if (!existsResult.success) {
101
+ return err(existsResult.error);
102
+ }
103
+ if (!existsResult.value) {
104
+ // Unique feature name found
105
+ return ok(featureName);
106
+ }
107
+ // Collision, try next
108
+ suffix++;
109
+ candidateName = `${baseFeatureName}-${suffix}`;
110
+ // Safety limit
111
+ if (suffix > 100) {
112
+ return err({
113
+ type: 'WriteError',
114
+ path: candidateName,
115
+ cause: 'Too many collisions, cannot generate unique feature name',
116
+ });
117
+ }
118
+ }
119
+ }
120
+ }
121
+ //# sourceMappingURL=init-spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-spec.js","sourceRoot":"","sources":["../../../../../src/application/use-cases/spec/init-spec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAW5E;;;;GAIG;AACH,MAAM,OAAO,eAAe;IACG;IAA7B,YAA6B,UAA0B;QAA1B,eAAU,GAAV,UAAU,CAAgB;IAAG,CAAC;IAE3D;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CACX,kBAA0B;QAE1B,iBAAiB;QACjB,IAAI,CAAC,kBAAkB,IAAI,kBAAkB,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAClE,OAAO,GAAG,CAAC;gBACT,IAAI,EAAE,cAAc;gBACpB,OAAO,EAAE,qCAAqC;aAC/C,CAAC,CAAC;QACL,CAAC;QAED,iDAAiD;QACjD,MAAM,eAAe,GAAG,IAAI,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;QAErE,0DAA0D;QAC1D,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;QACvE,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,CAAC;YAC/B,OAAO,GAAG,CAAC;gBACT,IAAI,EAAE,iBAAiB;gBACvB,KAAK,EAAE,iBAAiB,CAAC,KAAK;aAC/B,CAAC,CAAC;QACL,CAAC;QAED,MAAM,WAAW,GAAG,iBAAiB,CAAC,KAAK,CAAC;QAE5C,qBAAqB;QACrB,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;QAE9D,qBAAqB;QACrB,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;YACxB,OAAO,GAAG,CAAC;gBACT,IAAI,EAAE,iBAAiB;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;aACxB,CAAC,CAAC;QACL,CAAC;QAED,gBAAgB;QAChB,OAAO,EAAE,CAAC;YACR,WAAW;YACX,YAAY,EAAE,CAAC,WAAW,EAAE,iBAAiB,CAAC;YAC9C,WAAW,EAAE,2BAA2B,WAAW,CAAC,KAAK,EAAE;SAC5D,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACK,mBAAmB,CAAC,WAAmB;QAC7C,0EAA0E;QAC1E,OAAO,WAAW;aACf,WAAW,EAAE;aACb,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC;aAC5B,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;aACpB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;aACnB,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;aACrB,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACtB,CAAC;IAED;;;;;OAKG;IACK,KAAK,CAAC,gBAAgB,CAC5B,eAAuB;QAEvB,IAAI,aAAa,GAAG,eAAe,CAAC;QACpC,IAAI,MAAM,GAAG,CAAC,CAAC;QAEf,OAAO,IAAI,EAAE,CAAC;YACZ,4BAA4B;YAC5B,IAAI,WAAwB,CAAC;YAC7B,IAAI,CAAC;gBACH,WAAW,GAAG,IAAI,WAAW,CAAC,aAAa,CAAC,CAAC;YAC/C,CAAC;YAAC,MAAM,CAAC;gBACP,iCAAiC;gBACjC,MAAM,EAAE,CAAC;gBACT,aAAa,GAAG,GAAG,eAAe,IAAI,MAAM,EAAE,CAAC;gBAC/C,SAAS;YACX,CAAC;YAED,kBAAkB;YAClB,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YAC/D,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;gBAC1B,OAAO,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;YACjC,CAAC;YAED,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;gBACxB,4BAA4B;gBAC5B,OAAO,EAAE,CAAC,WAAW,CAAC,CAAC;YACzB,CAAC;YAED,sBAAsB;YACtB,MAAM,EAAE,CAAC;YACT,aAAa,GAAG,GAAG,eAAe,IAAI,MAAM,EAAE,CAAC;YAE/C,eAAe;YACf,IAAI,MAAM,GAAG,GAAG,EAAE,CAAC;gBACjB,OAAO,GAAG,CAAC;oBACT,IAAI,EAAE,YAAY;oBAClB,IAAI,EAAE,aAAa;oBACnB,KAAK,EAAE,0DAA0D;iBAClE,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
package/dist/src/cli.d.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Michi CLI Tool
4
- * AI駆動開発ワークフロー自動化コマンドラインツール
3
+ * Michi CLI Tool - Entry Point
4
+ *
5
+ * This file is now a thin wrapper that delegates to the Presentation layer.
6
+ * The actual CLI logic has been moved to src/presentation/cli.ts as part of
7
+ * the Onion Architecture migration (Phase 5, Task 6.1).
5
8
  */
6
- import { Command } from 'commander';
7
- /**
8
- * CLIツールを作成
9
- */
10
- export declare function createCLI(): Command;
9
+ export { createCLI } from './presentation/cli.js';
11
10
  //# sourceMappingURL=cli.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiFpC;;GAEG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAq3BnC"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC"}