ddd-ts-kit 0.26.0 → 0.27.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 (360) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/README.fr.md +4 -3
  3. package/README.md +3 -2
  4. package/dist/acceptance/acceptance-file-of.d.ts +5 -0
  5. package/dist/acceptance/acceptance-file-of.d.ts.map +1 -0
  6. package/dist/acceptance/acceptance-file-of.js +7 -0
  7. package/dist/acceptance/acceptance-file-of.js.map +1 -0
  8. package/dist/acceptance/acceptance-gate.d.ts +8 -0
  9. package/dist/acceptance/acceptance-gate.d.ts.map +1 -0
  10. package/dist/acceptance/acceptance-gate.js +2 -0
  11. package/dist/acceptance/acceptance-gate.js.map +1 -0
  12. package/dist/acceptance/acceptance-lock.d.ts +32 -0
  13. package/dist/acceptance/acceptance-lock.d.ts.map +1 -0
  14. package/dist/acceptance/acceptance-lock.js +2 -0
  15. package/dist/acceptance/acceptance-lock.js.map +1 -0
  16. package/dist/acceptance/acceptance-problem.d.ts +15 -0
  17. package/dist/acceptance/acceptance-problem.d.ts.map +1 -0
  18. package/dist/acceptance/acceptance-problem.js +2 -0
  19. package/dist/acceptance/acceptance-problem.js.map +1 -0
  20. package/dist/acceptance/commentless.d.ts +4 -0
  21. package/dist/acceptance/commentless.d.ts.map +1 -0
  22. package/dist/acceptance/commentless.js +31 -0
  23. package/dist/acceptance/commentless.js.map +1 -0
  24. package/dist/acceptance/counts-for.d.ts +5 -0
  25. package/dist/acceptance/counts-for.d.ts.map +1 -0
  26. package/dist/acceptance/counts-for.js +8 -0
  27. package/dist/acceptance/counts-for.js.map +1 -0
  28. package/dist/acceptance/criteria-in.d.ts +14 -0
  29. package/dist/acceptance/criteria-in.d.ts.map +1 -0
  30. package/dist/acceptance/criteria-in.js +34 -0
  31. package/dist/acceptance/criteria-in.js.map +1 -0
  32. package/dist/acceptance/drift.d.ts +30 -0
  33. package/dist/acceptance/drift.d.ts.map +1 -0
  34. package/dist/acceptance/drift.js +44 -0
  35. package/dist/acceptance/drift.js.map +1 -0
  36. package/dist/acceptance/format-acceptance.d.ts +5 -0
  37. package/dist/acceptance/format-acceptance.d.ts.map +1 -0
  38. package/dist/acceptance/format-acceptance.js +40 -0
  39. package/dist/acceptance/format-acceptance.js.map +1 -0
  40. package/dist/acceptance/lock-acceptance.d.ts +24 -0
  41. package/dist/acceptance/lock-acceptance.d.ts.map +1 -0
  42. package/dist/acceptance/lock-acceptance.js +58 -0
  43. package/dist/acceptance/lock-acceptance.js.map +1 -0
  44. package/dist/acceptance/lock-file-of.d.ts +3 -0
  45. package/dist/acceptance/lock-file-of.d.ts.map +1 -0
  46. package/dist/acceptance/lock-file-of.js +6 -0
  47. package/dist/acceptance/lock-file-of.js.map +1 -0
  48. package/dist/acceptance/lock-problems.d.ts +21 -0
  49. package/dist/acceptance/lock-problems.d.ts.map +1 -0
  50. package/dist/acceptance/lock-problems.js +58 -0
  51. package/dist/acceptance/lock-problems.js.map +1 -0
  52. package/dist/acceptance/read-acceptance.d.ts +9 -0
  53. package/dist/acceptance/read-acceptance.d.ts.map +1 -0
  54. package/dist/acceptance/read-acceptance.js +76 -0
  55. package/dist/acceptance/read-acceptance.js.map +1 -0
  56. package/dist/acceptance/read-lock.d.ts +5 -0
  57. package/dist/acceptance/read-lock.d.ts.map +1 -0
  58. package/dist/acceptance/read-lock.js +45 -0
  59. package/dist/acceptance/read-lock.js.map +1 -0
  60. package/dist/acceptance/read-verdicts.d.ts +9 -0
  61. package/dist/acceptance/read-verdicts.d.ts.map +1 -0
  62. package/dist/acceptance/read-verdicts.js +35 -0
  63. package/dist/acceptance/read-verdicts.js.map +1 -0
  64. package/dist/acceptance/scenario-problems.d.ts +12 -0
  65. package/dist/acceptance/scenario-problems.d.ts.map +1 -0
  66. package/dist/acceptance/scenario-problems.js +74 -0
  67. package/dist/acceptance/scenario-problems.js.map +1 -0
  68. package/dist/acceptance/scenario.d.ts +23 -0
  69. package/dist/acceptance/scenario.d.ts.map +1 -0
  70. package/dist/acceptance/scenario.js +2 -0
  71. package/dist/acceptance/scenario.js.map +1 -0
  72. package/dist/acceptance/scenarios-in.d.ts +4 -0
  73. package/dist/acceptance/scenarios-in.d.ts.map +1 -0
  74. package/dist/acceptance/scenarios-in.js +68 -0
  75. package/dist/acceptance/scenarios-in.js.map +1 -0
  76. package/dist/acceptance/story-acceptance.d.ts +29 -0
  77. package/dist/acceptance/story-acceptance.d.ts.map +1 -0
  78. package/dist/acceptance/story-acceptance.js +2 -0
  79. package/dist/acceptance/story-acceptance.js.map +1 -0
  80. package/dist/acceptance/story-file-of.d.ts +4 -0
  81. package/dist/acceptance/story-file-of.d.ts.map +1 -0
  82. package/dist/acceptance/story-file-of.js +8 -0
  83. package/dist/acceptance/story-file-of.js.map +1 -0
  84. package/dist/acceptance/story-of-file.d.ts +3 -0
  85. package/dist/acceptance/story-of-file.d.ts.map +1 -0
  86. package/dist/acceptance/story-of-file.js +6 -0
  87. package/dist/acceptance/story-of-file.js.map +1 -0
  88. package/dist/acceptance/story-of-row.d.ts +3 -0
  89. package/dist/acceptance/story-of-row.d.ts.map +1 -0
  90. package/dist/acceptance/story-of-row.js +6 -0
  91. package/dist/acceptance/story-of-row.js.map +1 -0
  92. package/dist/acceptance/story-problems.d.ts +16 -0
  93. package/dist/acceptance/story-problems.d.ts.map +1 -0
  94. package/dist/acceptance/story-problems.js +48 -0
  95. package/dist/acceptance/story-problems.js.map +1 -0
  96. package/dist/acceptance/verdict-on.d.ts +8 -0
  97. package/dist/acceptance/verdict-on.d.ts.map +1 -0
  98. package/dist/acceptance/verdict-on.js +9 -0
  99. package/dist/acceptance/verdict-on.js.map +1 -0
  100. package/dist/acceptance/verdict.d.ts +14 -0
  101. package/dist/acceptance/verdict.d.ts.map +1 -0
  102. package/dist/acceptance/verdict.js +2 -0
  103. package/dist/acceptance/verdict.js.map +1 -0
  104. package/dist/acceptance/verdicts-dir.d.ts +3 -0
  105. package/dist/acceptance/verdicts-dir.d.ts.map +1 -0
  106. package/dist/acceptance/verdicts-dir.js +3 -0
  107. package/dist/acceptance/verdicts-dir.js.map +1 -0
  108. package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
  109. package/dist/check/catalogue/architecture-rules.js +2 -0
  110. package/dist/check/catalogue/architecture-rules.js.map +1 -1
  111. package/dist/check/catalogue/default-severities.d.ts.map +1 -1
  112. package/dist/check/catalogue/default-severities.js +1 -0
  113. package/dist/check/catalogue/default-severities.js.map +1 -1
  114. package/dist/check/configuration/config-inspection.d.ts +1 -0
  115. package/dist/check/configuration/config-inspection.d.ts.map +1 -1
  116. package/dist/check/configuration/config-inspection.js +9 -1
  117. package/dist/check/configuration/config-inspection.js.map +1 -1
  118. package/dist/check/explain/tree-docs.d.ts.map +1 -1
  119. package/dist/check/explain/tree-docs.js +9 -0
  120. package/dist/check/explain/tree-docs.js.map +1 -1
  121. package/dist/check/fixtures/test-fixtures.d.ts.map +1 -1
  122. package/dist/check/fixtures/test-fixtures.js +35 -0
  123. package/dist/check/fixtures/test-fixtures.js.map +1 -1
  124. package/dist/check/project/walk-directory.js +1 -1
  125. package/dist/check/project/walk-directory.js.map +1 -1
  126. package/dist/check/rules/config-valid.d.ts.map +1 -1
  127. package/dist/check/rules/config-valid.js +1 -0
  128. package/dist/check/rules/config-valid.js.map +1 -1
  129. package/dist/check/rules/test-acceptance-black-box.d.ts +3 -0
  130. package/dist/check/rules/test-acceptance-black-box.d.ts.map +1 -0
  131. package/dist/check/rules/test-acceptance-black-box.js +38 -0
  132. package/dist/check/rules/test-acceptance-black-box.js.map +1 -0
  133. package/dist/commands/acceptance.d.ts +11 -0
  134. package/dist/commands/acceptance.d.ts.map +1 -0
  135. package/dist/commands/acceptance.js +63 -0
  136. package/dist/commands/acceptance.js.map +1 -0
  137. package/dist/commands/plan-waves.d.ts.map +1 -1
  138. package/dist/commands/plan-waves.js +1 -2
  139. package/dist/commands/plan-waves.js.map +1 -1
  140. package/dist/commands/stories.d.ts +9 -0
  141. package/dist/commands/stories.d.ts.map +1 -0
  142. package/dist/commands/stories.js +16 -0
  143. package/dist/commands/stories.js.map +1 -0
  144. package/dist/commands/story-scope.d.ts +4 -0
  145. package/dist/commands/story-scope.d.ts.map +1 -0
  146. package/dist/commands/story-scope.js +34 -0
  147. package/dist/commands/story-scope.js.map +1 -0
  148. package/dist/commands/story.d.ts +9 -0
  149. package/dist/commands/story.d.ts.map +1 -0
  150. package/dist/commands/story.js +45 -0
  151. package/dist/commands/story.js.map +1 -0
  152. package/dist/commands/worker-scope.d.ts.map +1 -1
  153. package/dist/commands/worker-scope.js +2 -0
  154. package/dist/commands/worker-scope.js.map +1 -1
  155. package/dist/commands/worktree.d.ts +7 -0
  156. package/dist/commands/worktree.d.ts.map +1 -0
  157. package/dist/commands/worktree.js +34 -0
  158. package/dist/commands/worktree.js.map +1 -0
  159. package/dist/config/config.d.ts +7 -0
  160. package/dist/config/config.d.ts.map +1 -1
  161. package/dist/config/index.d.ts +1 -0
  162. package/dist/config/index.d.ts.map +1 -1
  163. package/dist/config/index.js +1 -0
  164. package/dist/config/index.js.map +1 -1
  165. package/dist/config/parse-config.js +1 -0
  166. package/dist/config/parse-config.js.map +1 -1
  167. package/dist/config/serialize-config.js +1 -0
  168. package/dist/config/serialize-config.js.map +1 -1
  169. package/dist/config/worktree-modes.d.ts +3 -0
  170. package/dist/config/worktree-modes.d.ts.map +1 -0
  171. package/dist/config/worktree-modes.js +3 -0
  172. package/dist/config/worktree-modes.js.map +1 -0
  173. package/dist/generate/kinds/acceptance-kind.d.ts +3 -0
  174. package/dist/generate/kinds/acceptance-kind.d.ts.map +1 -0
  175. package/dist/generate/kinds/acceptance-kind.js +69 -0
  176. package/dist/generate/kinds/acceptance-kind.js.map +1 -0
  177. package/dist/generate/kinds.d.ts.map +1 -1
  178. package/dist/generate/kinds.js +2 -0
  179. package/dist/generate/kinds.js.map +1 -1
  180. package/dist/generate/shared-writes.d.ts.map +1 -1
  181. package/dist/generate/shared-writes.js +3 -0
  182. package/dist/generate/shared-writes.js.map +1 -1
  183. package/dist/help/notes.d.ts +1 -1
  184. package/dist/help/notes.d.ts.map +1 -1
  185. package/dist/help/notes.js +50 -2
  186. package/dist/help/notes.js.map +1 -1
  187. package/dist/help/usage.d.ts +1 -1
  188. package/dist/help/usage.d.ts.map +1 -1
  189. package/dist/help/usage.js +6 -0
  190. package/dist/help/usage.js.map +1 -1
  191. package/dist/init/agent-permissions.d.ts.map +1 -1
  192. package/dist/init/agent-permissions.js +9 -1
  193. package/dist/init/agent-permissions.js.map +1 -1
  194. package/dist/init/ignore-worktrees.d.ts +7 -0
  195. package/dist/init/ignore-worktrees.d.ts.map +1 -0
  196. package/dist/init/ignore-worktrees.js +15 -0
  197. package/dist/init/ignore-worktrees.js.map +1 -0
  198. package/dist/init/manifest/versions.js +24 -24
  199. package/dist/init/run-init.d.ts.map +1 -1
  200. package/dist/init/run-init.js +9 -3
  201. package/dist/init/run-init.js.map +1 -1
  202. package/dist/plan/batched-waves.d.ts +0 -2
  203. package/dist/plan/batched-waves.d.ts.map +1 -1
  204. package/dist/plan/batched-waves.js +4 -4
  205. package/dist/plan/batched-waves.js.map +1 -1
  206. package/dist/plan/plan-waves.d.ts +0 -2
  207. package/dist/plan/plan-waves.d.ts.map +1 -1
  208. package/dist/plan/plan-waves.js +2 -2
  209. package/dist/plan/plan-waves.js.map +1 -1
  210. package/dist/run.d.ts.map +1 -1
  211. package/dist/run.js +10 -0
  212. package/dist/run.js.map +1 -1
  213. package/dist/slice/plan-staging.d.ts +1 -1
  214. package/dist/slice/plan-staging.d.ts.map +1 -1
  215. package/dist/slice/plan-staging.js +5 -2
  216. package/dist/slice/plan-staging.js.map +1 -1
  217. package/dist/stories/forecast-merge.d.ts +14 -0
  218. package/dist/stories/forecast-merge.d.ts.map +1 -0
  219. package/dist/stories/forecast-merge.js +44 -0
  220. package/dist/stories/forecast-merge.js.map +1 -0
  221. package/dist/stories/format-stories.d.ts +4 -0
  222. package/dist/stories/format-stories.d.ts.map +1 -0
  223. package/dist/stories/format-stories.js +66 -0
  224. package/dist/stories/format-stories.js.map +1 -0
  225. package/dist/stories/format-story-phases.d.ts +5 -0
  226. package/dist/stories/format-story-phases.d.ts.map +1 -0
  227. package/dist/stories/format-story-phases.js +14 -0
  228. package/dist/stories/format-story-phases.js.map +1 -0
  229. package/dist/stories/merge-forecast.d.ts +18 -0
  230. package/dist/stories/merge-forecast.d.ts.map +1 -0
  231. package/dist/stories/merge-forecast.js +2 -0
  232. package/dist/stories/merge-forecast.js.map +1 -0
  233. package/dist/stories/open-stories.d.ts +8 -0
  234. package/dist/stories/open-stories.d.ts.map +1 -0
  235. package/dist/stories/open-stories.js +31 -0
  236. package/dist/stories/open-stories.js.map +1 -0
  237. package/dist/stories/open-story-scope.d.ts +23 -0
  238. package/dist/stories/open-story-scope.d.ts.map +1 -0
  239. package/dist/stories/open-story-scope.js +86 -0
  240. package/dist/stories/open-story-scope.js.map +1 -0
  241. package/dist/stories/open-story.d.ts +11 -0
  242. package/dist/stories/open-story.d.ts.map +1 -0
  243. package/dist/stories/open-story.js +2 -0
  244. package/dist/stories/open-story.js.map +1 -0
  245. package/dist/stories/read-stories.d.ts +9 -0
  246. package/dist/stories/read-stories.d.ts.map +1 -0
  247. package/dist/stories/read-stories.js +60 -0
  248. package/dist/stories/read-stories.js.map +1 -0
  249. package/dist/stories/read-story-phases.d.ts +10 -0
  250. package/dist/stories/read-story-phases.d.ts.map +1 -0
  251. package/dist/stories/read-story-phases.js +144 -0
  252. package/dist/stories/read-story-phases.js.map +1 -0
  253. package/dist/stories/read-story-place.d.ts +4 -0
  254. package/dist/stories/read-story-place.d.ts.map +1 -0
  255. package/dist/stories/read-story-place.js +23 -0
  256. package/dist/stories/read-story-place.js.map +1 -0
  257. package/dist/stories/review-file-of.d.ts +4 -0
  258. package/dist/stories/review-file-of.d.ts.map +1 -0
  259. package/dist/stories/review-file-of.js +7 -0
  260. package/dist/stories/review-file-of.js.map +1 -0
  261. package/dist/stories/section-of.d.ts +3 -0
  262. package/dist/stories/section-of.d.ts.map +1 -0
  263. package/dist/stories/section-of.js +11 -0
  264. package/dist/stories/section-of.js.map +1 -0
  265. package/dist/stories/stories-view.d.ts +13 -0
  266. package/dist/stories/stories-view.d.ts.map +1 -0
  267. package/dist/stories/stories-view.js +2 -0
  268. package/dist/stories/stories-view.js.map +1 -0
  269. package/dist/stories/story-crossing.d.ts +16 -0
  270. package/dist/stories/story-crossing.d.ts.map +1 -0
  271. package/dist/stories/story-crossing.js +2 -0
  272. package/dist/stories/story-crossing.js.map +1 -0
  273. package/dist/stories/story-gate.d.ts +4 -0
  274. package/dist/stories/story-gate.d.ts.map +1 -0
  275. package/dist/stories/story-gate.js +2 -0
  276. package/dist/stories/story-gate.js.map +1 -0
  277. package/dist/stories/story-phase.d.ts +13 -0
  278. package/dist/stories/story-phase.d.ts.map +1 -0
  279. package/dist/stories/story-phase.js +2 -0
  280. package/dist/stories/story-phase.js.map +1 -0
  281. package/dist/stories/story-place.d.ts +14 -0
  282. package/dist/stories/story-place.d.ts.map +1 -0
  283. package/dist/stories/story-place.js +2 -0
  284. package/dist/stories/story-place.js.map +1 -0
  285. package/dist/stories/story-scope-file.d.ts +3 -0
  286. package/dist/stories/story-scope-file.d.ts.map +1 -0
  287. package/dist/stories/story-scope-file.js +3 -0
  288. package/dist/stories/story-scope-file.js.map +1 -0
  289. package/dist/stories/story-scope.d.ts +17 -0
  290. package/dist/stories/story-scope.d.ts.map +1 -0
  291. package/dist/stories/story-scope.js +2 -0
  292. package/dist/stories/story-scope.js.map +1 -0
  293. package/dist/stories/story-state.d.ts +13 -0
  294. package/dist/stories/story-state.d.ts.map +1 -0
  295. package/dist/stories/story-state.js +2 -0
  296. package/dist/stories/story-state.js.map +1 -0
  297. package/dist/stories/trunk-phase.d.ts +8 -0
  298. package/dist/stories/trunk-phase.d.ts.map +1 -0
  299. package/dist/stories/trunk-phase.js +27 -0
  300. package/dist/stories/trunk-phase.js.map +1 -0
  301. package/dist/version.d.ts +1 -1
  302. package/dist/version.js +1 -1
  303. package/dist/worker/add-worktree.d.ts +7 -0
  304. package/dist/worker/add-worktree.d.ts.map +1 -0
  305. package/dist/worker/add-worktree.js +13 -0
  306. package/dist/worker/add-worktree.js.map +1 -0
  307. package/dist/worker/branch-exists.d.ts +3 -0
  308. package/dist/worker/branch-exists.d.ts.map +1 -0
  309. package/dist/worker/branch-exists.js +6 -0
  310. package/dist/worker/branch-exists.js.map +1 -0
  311. package/dist/worker/briefed-rows.js +1 -1
  312. package/dist/worker/briefed-rows.js.map +1 -1
  313. package/dist/worker/ensure-ignored.d.ts +7 -0
  314. package/dist/worker/ensure-ignored.d.ts.map +1 -0
  315. package/dist/worker/ensure-ignored.js +17 -0
  316. package/dist/worker/ensure-ignored.js.map +1 -0
  317. package/dist/worker/install-notes.d.ts +9 -0
  318. package/dist/worker/install-notes.d.ts.map +1 -0
  319. package/dist/worker/install-notes.js +25 -0
  320. package/dist/worker/install-notes.js.map +1 -0
  321. package/dist/worker/is-worktree.d.ts +3 -0
  322. package/dist/worker/is-worktree.d.ts.map +1 -0
  323. package/dist/worker/is-worktree.js +15 -0
  324. package/dist/worker/is-worktree.js.map +1 -0
  325. package/dist/worker/open-worker-scope.d.ts +6 -1
  326. package/dist/worker/open-worker-scope.d.ts.map +1 -1
  327. package/dist/worker/open-worker-scope.js +29 -36
  328. package/dist/worker/open-worker-scope.js.map +1 -1
  329. package/dist/worker/repository-prefix.d.ts +3 -0
  330. package/dist/worker/repository-prefix.d.ts.map +1 -0
  331. package/dist/worker/repository-prefix.js +14 -0
  332. package/dist/worker/repository-prefix.js.map +1 -0
  333. package/dist/worker/upstream-of.d.ts +8 -0
  334. package/dist/worker/upstream-of.d.ts.map +1 -0
  335. package/dist/worker/upstream-of.js +18 -0
  336. package/dist/worker/upstream-of.js.map +1 -0
  337. package/dist/worker/worktree-home.d.ts +9 -0
  338. package/dist/worker/worktree-home.d.ts.map +1 -0
  339. package/dist/worker/worktree-home.js +17 -0
  340. package/dist/worker/worktree-home.js.map +1 -0
  341. package/dist/worker/worktree-of.d.ts +13 -0
  342. package/dist/worker/worktree-of.d.ts.map +1 -0
  343. package/dist/worker/worktree-of.js +30 -0
  344. package/dist/worker/worktree-of.js.map +1 -0
  345. package/dist/worktree/open-worktree.d.ts +20 -0
  346. package/dist/worktree/open-worktree.d.ts.map +1 -0
  347. package/dist/worktree/open-worktree.js +57 -0
  348. package/dist/worktree/open-worktree.js.map +1 -0
  349. package/dist/worktree/worktree-scope.d.ts +15 -0
  350. package/dist/worktree/worktree-scope.d.ts.map +1 -0
  351. package/dist/worktree/worktree-scope.js +2 -0
  352. package/dist/worktree/worktree-scope.js.map +1 -0
  353. package/package.json +2 -2
  354. package/templates/acceptance/acceptance.spec.ts.tpl +35 -0
  355. package/templates/init/docker/dockerignore.tpl +1 -0
  356. package/templates/init/e2e/jest.e2e.config.js.tpl +1 -1
  357. package/templates/init/e2e/vitest.e2e.config.ts.tpl +1 -1
  358. package/templates/init/gitignore.tpl +1 -0
  359. package/templates/pipeline/biome.json.tpl +1 -0
  360. package/templates/pipeline/package-scripts.json +1 -1
@@ -0,0 +1,11 @@
1
+ /** A story open in another worktree of the repository. */
2
+ export interface OpenStory {
3
+ readonly story: string;
4
+ readonly worktree: string;
5
+ readonly branch?: string;
6
+ /** The ref its branch was cut from and merges back into. */
7
+ readonly base: string;
8
+ /** The contexts its rows name, read in its worktree; empty before its rows are planned. */
9
+ readonly contexts: readonly string[];
10
+ }
11
+ //# sourceMappingURL=open-story.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-story.d.ts","sourceRoot":"","sources":["../../src/stories/open-story.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,4DAA4D;IAC5D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2FAA2F;IAC3F,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=open-story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-story.js","sourceRoot":"","sources":["../../src/stories/open-story.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import type { StoriesView } from './stories-view.js';
2
+ /**
3
+ * The stories open in the worktrees of the repository of the project at `root`, each with the
4
+ * files it changed and the trunk merged in now, and each pair of them that meets. From the
5
+ * worktree of a story, the pairs it is in, that story first. Reads git and the files, changes
6
+ * nothing but objects of the repository.
7
+ */
8
+ export declare function readStories(root: string): StoriesView;
9
+ //# sourceMappingURL=read-stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-stories.d.ts","sourceRoot":"","sources":["../../src/stories/read-stories.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAiBrD"}
@@ -0,0 +1,60 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { runGit } from '../commit/run-git.js';
4
+ import { classifyConflict } from '../merge/classify-conflict.js';
5
+ import { mergeRepositoryOf } from '../merge/lost/merge-repository-of.js';
6
+ import { changedFiles } from '../worker/changed-files.js';
7
+ import { forecastMerge } from './forecast-merge.js';
8
+ import { openStories } from './open-stories.js';
9
+ import { readStoryPlace } from './read-story-place.js';
10
+ /**
11
+ * The stories open in the worktrees of the repository of the project at `root`, each with the
12
+ * files it changed and the trunk merged in now, and each pair of them that meets. From the
13
+ * worktree of a story, the pairs it is in, that story first. Reads git and the files, changes
14
+ * nothing but objects of the repository.
15
+ */
16
+ export function readStories(root) {
17
+ const repo = mergeRepositoryOf(root);
18
+ const here = readStoryPlace(root)?.story;
19
+ const stories = openStories(root, repo.prefix).map((story) => stateOf(repo, story));
20
+ const own = stories.find((story) => story.story === here);
21
+ const pairs = own === undefined
22
+ ? stories.flatMap((first, index) => stories.slice(index + 1).map((second) => [first, second]))
23
+ : stories.filter((other) => other !== own).map((other) => [own, other]);
24
+ return {
25
+ ...(here === undefined ? {} : { here }),
26
+ stories,
27
+ crossings: pairs.flatMap(([first, second]) => crossingOf(repo, first, second)),
28
+ ...fetchedOf(repo.top),
29
+ };
30
+ }
31
+ /** When the last fetch wrote FETCH_HEAD, shared by every worktree of the repository. */
32
+ function fetchedOf(top) {
33
+ const common = runGit(top, ['rev-parse', '--git-common-dir'])?.trim();
34
+ const stat = common === undefined ? undefined : fs.statSync(path.resolve(top, common, 'FETCH_HEAD'), { throwIfNoEntry: false });
35
+ return stat === undefined ? {} : { fetched: stat.mtime.toISOString() };
36
+ }
37
+ function stateOf(repo, story) {
38
+ const top = runGit(story.worktree, ['rev-parse', '--show-toplevel'])?.trim() ?? story.worktree;
39
+ const { base, branch } = story;
40
+ const mergeBase = runGit(top, ['merge-base', base, 'HEAD'])?.trim();
41
+ const trunk = branch === undefined ? undefined : forecastMerge(repo, { ours: branch, theirs: base });
42
+ return { ...story, files: changedFiles(top, mergeBase), ...(trunk === undefined ? {} : { trunk }) };
43
+ }
44
+ function crossingOf(repo, first, second) {
45
+ const contexts = first.contexts.filter((context) => second.contexts.includes(context));
46
+ const files = first.files.filter((file) => second.files.includes(file) && classifyConflict(file, repo) === 'source');
47
+ const merge = mergeOf(repo, first, second);
48
+ const conflicts = (merge?.settled.length ?? 0) + (merge?.byHand.length ?? 0);
49
+ if (contexts.length === 0 && files.length === 0 && conflicts === 0) {
50
+ return [];
51
+ }
52
+ return [{ stories: [first.story, second.story], contexts, files, ...(merge === undefined ? {} : { merge }) }];
53
+ }
54
+ /** The branch of the second merged into the branch of the first now; none while either has no branch. */
55
+ function mergeOf(repo, first, second) {
56
+ return first.branch === undefined || second.branch === undefined
57
+ ? undefined
58
+ : forecastMerge(repo, { ours: first.branch, theirs: second.branch });
59
+ }
60
+ //# sourceMappingURL=read-stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-stories.js","sourceRoot":"","sources":["../../src/stories/read-stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAKvD;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,MAAM,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC;IACzC,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;IACpF,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC;IAE1D,MAAM,KAAK,GACT,GAAG,KAAK,SAAS;QACf,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,E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AC;IAC3C,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;IAE7E,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,SAAS,KAAK,CAAC,EAAE,CAAC;QACnE,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;AAChH,CAAC;AAED,yGAAyG;AACzG,SAAS,OAAO,CAAC,IAAqB,EAAE,KAAiB,EAAE,MAAkB;IAC3E,OAAO,KAAK,CAAC,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS;QAC9D,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,aAAa,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;AACzE,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { Slice } from '../progress/slice.js';
2
+ import type { Workspace } from '../workspace/index.js';
3
+ import type { StoryPhase } from './story-phase.js';
4
+ /**
5
+ * The phases of a story, in order: its specification and criteria, its rows, the design review of
6
+ * each row, its acceptance written and locked (the `build` gate: the code may start), then its rows
7
+ * done, its acceptance passing, its trunk merged in and its report (the `close` gate).
8
+ */
9
+ export declare function readStoryPhases(ws: Workspace, story: string, slices: readonly Slice[]): StoryPhase[];
10
+ //# sourceMappingURL=read-story-phases.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-story-phases.d.ts","sourceRoot":"","sources":["../../src/stories/read-story-phases.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAKvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAcnD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,KAAK,EAAE,GAAG,UAAU,EAAE,CAgBpG"}
@@ -0,0 +1,144 @@
1
+ import { criteriaIn } from '../acceptance/criteria-in.js';
2
+ import { countsFor } from '../acceptance/counts-for.js';
3
+ import { readAcceptance } from '../acceptance/read-acceptance.js';
4
+ import { storyFileOf } from '../acceptance/story-file-of.js';
5
+ import { storyOfRow } from '../acceptance/story-of-row.js';
6
+ import { readStoryClosing } from '../story/read-story-closing.js';
7
+ import { reviewFileOf } from './review-file-of.js';
8
+ import { sectionOf } from './section-of.js';
9
+ import { trunkPhase } from './trunk-phase.js';
10
+ /** A design review section of a row: `## #US5.02 Place order`. */
11
+ const ROW_HEADING = /^##\s+#(\S+)/gm;
12
+ /**
13
+ * The phases of a story, in order: its specification and criteria, its rows, the design review of
14
+ * each row, its acceptance written and locked (the `build` gate: the code may start), then its rows
15
+ * done, its acceptance passing, its trunk merged in and its report (the `close` gate).
16
+ */
17
+ export function readStoryPhases(ws, story, slices) {
18
+ const rows = slices.filter((row) => storyOfRow(row.id).toLowerCase() === story.toLowerCase());
19
+ const specification = storyFileOf(ws, story);
20
+ const [acceptance] = readAcceptance(ws, slices, story);
21
+ const facts = { ws, story, rows, specification, acceptance };
22
+ return [
23
+ specificationPhase(facts),
24
+ rowsPhase(facts),
25
+ designPhase(facts),
26
+ acceptancePhase(facts, 'written'),
27
+ builtPhase(facts),
28
+ acceptancePhase(facts, 'passing'),
29
+ trunkPhase(ws, story),
30
+ reportPhase(facts),
31
+ ];
32
+ }
33
+ function specificationPhase({ ws, story, specification }) {
34
+ const criteria = specification === undefined ? [] : criteriaIn(ws.read(specification) ?? '');
35
+ return {
36
+ id: 'specification',
37
+ title: 'specification',
38
+ met: criteria.length > 0,
39
+ detail: specification === undefined
40
+ ? `no docs/architecture/stories/${story}.md`
41
+ : `${specification}, ${criteria.length} acceptance criteria`,
42
+ next: `Write docs/architecture/stories/${story}.md: the statement, the questions asked and their answers, and \`## Acceptance criteria\`, one \`- AC1: <what a client observes>\` each.`,
43
+ gate: 'build',
44
+ };
45
+ }
46
+ function rowsPhase({ story, rows }) {
47
+ return {
48
+ id: 'rows',
49
+ title: 'rows',
50
+ met: rows.length > 0,
51
+ detail: `${rows.length} row${rows.length === 1 ? '' : 's'} in docs/architecture/slices.md`,
52
+ next: `Plan the rows of ${story} in docs/architecture/slices.md (skill ddd-ts-kit:plan-slices), numbered ${story}.01, ${story}.02.`,
53
+ gate: 'build',
54
+ };
55
+ }
56
+ function designPhase({ ws, story, rows }) {
57
+ const file = reviewFileOf(ws, story);
58
+ const reviewed = new Set([...(ws.read(file ?? '') ?? '').matchAll(ROW_HEADING)].map(([, id]) => id));
59
+ const missing = rows.filter((row) => row.status !== 'done' && !reviewed.has(row.id)).map((row) => `#${row.id}`);
60
+ return {
61
+ id: 'design',
62
+ title: 'design review',
63
+ met: rows.length > 0 && missing.length === 0,
64
+ detail: file === undefined
65
+ ? `no docs/architecture/reviews/${story}.md`
66
+ : missing.length === 0
67
+ ? `${file}, a section per row`
68
+ : `${file} has no section for ${missing.join(', ')}`,
69
+ next: `Write the design of each row in docs/architecture/reviews/${story}.md, one \`## #<id> <slice>\` section each, have the architecture-reviewer agent read it as a design review, and settle its findings.`,
70
+ gate: 'build',
71
+ };
72
+ }
73
+ /** What each acceptance gate is called and asks for, by the gate of the story it belongs to. */
74
+ const ACCEPTANCE_PHASES = {
75
+ written: {
76
+ id: 'acceptance',
77
+ title: 'acceptance written and locked',
78
+ next: (story) => `Write the acceptance of ${story} before its code (skill ddd-ts-kit:testing), then \`npx ddd-ts-kit acceptance ${story} --lock\`; \`npx ddd-ts-kit acceptance ${story} --gate written\` lists what is left.`,
79
+ gate: 'build',
80
+ },
81
+ passing: {
82
+ id: 'passing',
83
+ title: 'acceptance passing',
84
+ next: (story) => `Build what the pending scenarios wait for; \`npx ddd-ts-kit acceptance ${story} --gate passing\` lists them.`,
85
+ gate: 'close',
86
+ },
87
+ };
88
+ function acceptancePhase({ story, acceptance }, gate) {
89
+ const left = acceptance?.problems.filter((problem) => countsFor(problem, gate)) ?? [];
90
+ const { id, title, next, gate: storyGate } = ACCEPTANCE_PHASES[gate];
91
+ return {
92
+ id,
93
+ title,
94
+ met: acceptance !== undefined && left.length === 0,
95
+ detail: left.length === 0 ? 'met' : `${left.length} left: ${left[0]?.message ?? ''}`,
96
+ next: next(story),
97
+ gate: storyGate,
98
+ };
99
+ }
100
+ /** Its rows done and no marker of its own left, as `story-check` says. */
101
+ function builtPhase({ ws, story, rows }) {
102
+ const [next] = rows.filter((row) => row.status !== 'done');
103
+ if (next !== undefined) {
104
+ const done = rows.filter((row) => row.status === 'done').length;
105
+ return {
106
+ ...BUILT,
107
+ met: false,
108
+ detail: `${done} of ${rows.length} done, next #${next.id} ${next.slice}`,
109
+ next: 'Build the next row: contracts and skeletons yourself, each slice with `npx ddd-ts-kit worker-scope <context> --here --rows <id>` and one context-builder agent; mark it done once verified and committed.',
110
+ };
111
+ }
112
+ const markers = rows.length === 0 ? 0 : markersLeft(ws, story);
113
+ const left = markers === 0
114
+ ? ''
115
+ : `, ${markers} marker${markers === 1 ? '' : 's'} of its own left (\`npx ddd-ts-kit story-check ${story}\`)`;
116
+ return {
117
+ ...BUILT,
118
+ met: rows.length > 0 && markers === 0,
119
+ detail: `${rows.length} of ${rows.length} done${left}`,
120
+ next: `Settle each marker \`npx ddd-ts-kit story-check ${story}\` lists, as it says.`,
121
+ };
122
+ }
123
+ const BUILT = { id: 'built', title: 'rows done', gate: 'close' };
124
+ /** The markers that keep the story open; none when they cannot be read. */
125
+ function markersLeft(ws, story) {
126
+ try {
127
+ return readStoryClosing(ws.root, story, false).markers.length;
128
+ }
129
+ catch {
130
+ return 0;
131
+ }
132
+ }
133
+ function reportPhase({ ws, story, specification }) {
134
+ const report = specification === undefined ? undefined : sectionOf(ws.read(specification) ?? '', 'Report');
135
+ return {
136
+ id: 'report',
137
+ title: 'report',
138
+ met: report !== undefined && report.trim() !== '',
139
+ detail: report === undefined ? 'no `## Report` in the specification' : 'written',
140
+ next: `Write \`## Report\` in docs/architecture/stories/${story}.md: each provisional decision, each compromise, each amendment of the acceptance, what is left; it is the body of the pull request.`,
141
+ gate: 'close',
142
+ };
143
+ }
144
+ //# sourceMappingURL=read-story-phases.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-story-phases.js","sourceRoot":"","sources":["../../src/stories/read-story-phases.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,kEAAkE;AAClE,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAWrC;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,EAAa,EAAE,KAAa,EAAE,MAAwB;IACpF,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC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AC,IAAI,OAAO,KAAK,CAAC;QACrC,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,OAAO,IAAI,CAAC,MAAM,QAAQ,IAAI,EAAE;QACtD,IAAI,EAAE,mDAAmD,KAAK,uBAAuB;KACtF,CAAC;AACJ,CAAC;AAED,MAAM,KAAK,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAW,CAAC;AAE1E,2EAA2E;AAC3E,SAAS,WAAW,CAAC,EAAa,EAAE,KAAa;IAC/C,IAAI,CAAC;QACH,OAAO,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IAChE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,aAAa,EAAc;IAC3D,MAAM,MAAM,GAAG,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAC;IAE3G,OAAO;QACL,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,QAAQ;QACf,GAAG,EAAE,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE;QACjD,MAAM,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,qCAAqC,CAAC,CAAC,CAAC,SAAS;QAChF,IAAI,EAAE,oDAAoD,KAAK,sIAAsI;QACrM,IAAI,EAAE,OAAO;KACd,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { StoryPlace } from './story-place.js';
2
+ /** The story of the worktree at `root`; undefined outside the worktree of a story or when its file is not one. */
3
+ export declare function readStoryPlace(root: string): StoryPlace | undefined;
4
+ //# sourceMappingURL=read-story-place.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-story-place.d.ts","sourceRoot":"","sources":["../../src/stories/read-story-place.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD,kHAAkH;AAClH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAiBnE"}
@@ -0,0 +1,23 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { isRecord } from '../config/values/is-record.js';
4
+ import { STORY_SCOPE_FILE } from './story-scope-file.js';
5
+ /** The story of the worktree at `root`; undefined outside the worktree of a story or when its file is not one. */
6
+ export function readStoryPlace(root) {
7
+ try {
8
+ const raw = JSON.parse(fs.readFileSync(path.join(root, STORY_SCOPE_FILE), 'utf8'));
9
+ if (!isRecord(raw) || typeof raw['story'] !== 'string' || typeof raw['base'] !== 'string') {
10
+ return undefined;
11
+ }
12
+ return {
13
+ story: raw['story'],
14
+ base: raw['base'],
15
+ ...(typeof raw['baseCommit'] === 'string' ? { baseCommit: raw['baseCommit'] } : {}),
16
+ branch: typeof raw['branch'] === 'string' ? raw['branch'] : '',
17
+ };
18
+ }
19
+ catch {
20
+ return undefined;
21
+ }
22
+ }
23
+ //# sourceMappingURL=read-story-place.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-story-place.js","sourceRoot":"","sources":["../../src/stories/read-story-place.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,kHAAkH;AAClH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,IAAI,CAAC;QACH,MAAM,GAAG,GAAY,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;QAE5F,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,QAAQ,EAAE,CAAC;YAC1F,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO;YACL,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC;YACnB,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC;YACjB,GAAG,CAAC,OAAO,GAAG,CAAC,YAAY,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACnF,MAAM,EAAE,OAAO,GAAG,CAAC,QAAQ,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;SAC/D,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Workspace } from '../workspace/index.js';
2
+ /** The design review of a story, `docs/architecture/reviews/US5.md`, whatever the case of its name; undefined when it has none. */
3
+ export declare function reviewFileOf(ws: Workspace, story: string): string | undefined;
4
+ //# sourceMappingURL=review-file-of.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review-file-of.d.ts","sourceRoot":"","sources":["../../src/stories/review-file-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAIvD,mIAAmI;AACnI,wBAAgB,YAAY,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAI7E"}
@@ -0,0 +1,7 @@
1
+ const REVIEWS_DIR = 'docs/architecture/reviews';
2
+ /** The design review of a story, `docs/architecture/reviews/US5.md`, whatever the case of its name; undefined when it has none. */
3
+ export function reviewFileOf(ws, story) {
4
+ const name = ws.list(REVIEWS_DIR).find((file) => file.toLowerCase() === `${story.toLowerCase()}.md`);
5
+ return name === undefined ? undefined : `${REVIEWS_DIR}/${name}`;
6
+ }
7
+ //# sourceMappingURL=review-file-of.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review-file-of.js","sourceRoot":"","sources":["../../src/stories/review-file-of.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG,2BAA2B,CAAC;AAEhD,mIAAmI;AACnI,MAAM,UAAU,YAAY,CAAC,EAAa,EAAE,KAAa;IACvD,MAAM,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAErG,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,WAAW,IAAI,IAAI,EAAE,CAAC;AACnE,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** The lines under a `## <title>` heading of a Markdown text, up to the next heading of that level or above; undefined without it. */
2
+ export declare function sectionOf(text: string, title: string): string | undefined;
3
+ //# sourceMappingURL=section-of.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-of.d.ts","sourceRoot":"","sources":["../../src/stories/section-of.ts"],"names":[],"mappings":"AAAA,sIAAsI;AACtI,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAWzE"}
@@ -0,0 +1,11 @@
1
+ /** The lines under a `## <title>` heading of a Markdown text, up to the next heading of that level or above; undefined without it. */
2
+ export function sectionOf(text, title) {
3
+ const lines = text.split('\n');
4
+ const heading = lines.findIndex((line) => line.trim().toLowerCase() === `## ${title.toLowerCase()}`);
5
+ if (heading === -1) {
6
+ return undefined;
7
+ }
8
+ const end = lines.findIndex((line, at) => at > heading && /^#{1,2}\s/.test(line));
9
+ return lines.slice(heading + 1, end === -1 ? undefined : end).join('\n');
10
+ }
11
+ //# sourceMappingURL=section-of.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-of.js","sourceRoot":"","sources":["../../src/stories/section-of.ts"],"names":[],"mappings":"AAAA,sIAAsI;AACtI,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,KAAa;IACnD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,MAAM,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAErG,IAAI,OAAO,KAAK,CAAC,CAAC,EAAE,CAAC;QACnB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAElF,OAAO,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3E,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { StoryCrossing } from './story-crossing.js';
2
+ import type { StoryState } from './story-state.js';
3
+ /** What `stories` says: the stories open in the worktrees of the repository, and where they meet. */
4
+ export interface StoriesView {
5
+ /** The story of this worktree; absent from any other checkout. */
6
+ readonly here?: string;
7
+ readonly stories: readonly StoryState[];
8
+ /** Each pair of open stories that meets; from the worktree of a story, the pairs it is in. */
9
+ readonly crossings: readonly StoryCrossing[];
10
+ /** When the repository last fetched, as an ISO 8601 date; absent when it never did: the trunk is read as the last fetch left it. */
11
+ readonly fetched?: string;
12
+ }
13
+ //# sourceMappingURL=stories-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stories-view.d.ts","sourceRoot":"","sources":["../../src/stories/stories-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,qGAAqG;AACrG,MAAM,WAAW,WAAW;IAC1B,kEAAkE;IAClE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IACxC,8FAA8F;IAC9F,QAAQ,CAAC,SAAS,EAAE,SAAS,aAAa,EAAE,CAAC;IAC7C,oIAAoI;IACpI,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=stories-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stories-view.js","sourceRoot":"","sources":["../../src/stories/stories-view.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ import type { MergeForecast } from './merge-forecast.js';
2
+ /** Where two open stories meet: a context both change, a file both change, a conflict the second to land settles. */
3
+ export interface StoryCrossing {
4
+ /** The two stories; from the worktree of a story, that story first. */
5
+ readonly stories: readonly [string, string];
6
+ /** The contexts the rows of both name. */
7
+ readonly contexts: readonly string[];
8
+ /**
9
+ * The files both worktrees changed, committed or not, but those `merge-trunk` settles by their
10
+ * kind alone (slices.md, the derived files, the lockfile, the stored-events lock).
11
+ */
12
+ readonly files: readonly string[];
13
+ /** The branch of the second merged into the branch of the first now; absent when either has no branch. */
14
+ readonly merge?: MergeForecast;
15
+ }
16
+ //# sourceMappingURL=story-crossing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"story-crossing.d.ts","sourceRoot":"","sources":["../../src/stories/story-crossing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,qHAAqH;AACrH,MAAM,WAAW,aAAa;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,0CAA0C;IAC1C,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,0GAA0G;IAC1G,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC;CAChC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=story-crossing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"story-crossing.js","sourceRoot":"","sources":["../../src/stories/story-crossing.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ /** `build`: the code of the story may start; `close`: the story may go to its pull request. */
2
+ export type StoryGate = 'build' | 'close';
3
+ export declare const STORY_GATES: readonly StoryGate[];
4
+ //# sourceMappingURL=story-gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"story-gate.d.ts","sourceRoot":"","sources":["../../src/stories/story-gate.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAE1C,eAAO,MAAM,WAAW,EAAE,SAAS,SAAS,EAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export const STORY_GATES = ['build', 'close'];
2
+ //# sourceMappingURL=story-gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"story-gate.js","sourceRoot":"","sources":["../../src/stories/story-gate.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,WAAW,GAAyB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ /** One step of a story, in the order a session takes them. */
2
+ export interface StoryPhase {
3
+ readonly id: 'specification' | 'rows' | 'design' | 'acceptance' | 'built' | 'passing' | 'trunk' | 'report';
4
+ readonly title: string;
5
+ readonly met: boolean;
6
+ /** What stands, or what is missing. */
7
+ readonly detail: string;
8
+ /** What to do while it is not met. */
9
+ readonly next: string;
10
+ /** The gate it belongs to: `build` opens the code of the story, `close` its pull request. */
11
+ readonly gate: 'build' | 'close';
12
+ }
13
+ //# sourceMappingURL=story-phase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"story-phase.d.ts","sourceRoot":"","sources":["../../src/stories/story-phase.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC3G,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,uCAAuC;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,sCAAsC;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6FAA6F;IAC7F,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;CAClC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=story-phase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"story-phase.js","sourceRoot":"","sources":["../../src/stories/story-phase.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * What `.ddd-ts-kit/story.json` holds in the worktree of a story: the story one session takes from
3
+ * its questions to its pull request, and where its branch started. Local, never committed.
4
+ */
5
+ export interface StoryPlace {
6
+ /** The code of the story, as its rows start in slices.md: `US5`. */
7
+ readonly story: string;
8
+ /** The ref the branch was cut from and merges back into. */
9
+ readonly base: string;
10
+ /** The commit the base named when the worktree was opened. */
11
+ readonly baseCommit?: string;
12
+ readonly branch: string;
13
+ }
14
+ //# sourceMappingURL=story-place.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"story-place.d.ts","sourceRoot":"","sources":["../../src/stories/story-place.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,oEAAoE;IACpE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,4DAA4D;IAC5D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,8DAA8D;IAC9D,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=story-place.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"story-place.js","sourceRoot":"","sources":["../../src/stories/story-place.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ /** Written in the worktree of a story: which story it takes and from where. Never committed. */
2
+ export declare const STORY_SCOPE_FILE = ".ddd-ts-kit/story.json";
3
+ //# sourceMappingURL=story-scope-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"story-scope-file.d.ts","sourceRoot":"","sources":["../../src/stories/story-scope-file.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,eAAO,MAAM,gBAAgB,2BAA2B,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Written in the worktree of a story: which story it takes and from where. Never committed. */
2
+ export const STORY_SCOPE_FILE = '.ddd-ts-kit/story.json';
3
+ //# sourceMappingURL=story-scope-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"story-scope-file.js","sourceRoot":"","sources":["../../src/stories/story-scope-file.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,MAAM,CAAC,MAAM,gBAAgB,GAAG,wBAAwB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { DependencyInstall } from '../worker/install-dependencies.js';
2
+ import type { OpenStory } from './open-story.js';
3
+ /** What `story-scope` prepared, or would prepare in a dry run. */
4
+ export interface StoryScope {
5
+ readonly story: string;
6
+ readonly dryRun: boolean;
7
+ readonly worktree: string;
8
+ readonly branch: string;
9
+ readonly base: string;
10
+ /** False when the worktree of the story was already there: the story resumes. */
11
+ readonly created: boolean;
12
+ readonly install?: DependencyInstall;
13
+ /** The other stories open in the repository, with the contexts they change. */
14
+ readonly others: readonly OpenStory[];
15
+ readonly notes: readonly string[];
16
+ }
17
+ //# sourceMappingURL=story-scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"story-scope.d.ts","sourceRoot":"","sources":["../../src/stories/story-scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,kEAAkE;AAClE,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,iFAAiF;IACjF,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IACrC,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=story-scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"story-scope.js","sourceRoot":"","sources":["../../src/stories/story-scope.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import type { MergeForecast } from './merge-forecast.js';
2
+ import type { OpenStory } from './open-story.js';
3
+ /** One open story as `stories` reads it in its worktree. */
4
+ export interface StoryState extends OpenStory {
5
+ /**
6
+ * The files its worktree changed, relative to the top of the repository: committed since the
7
+ * merge base with its base, modified, and untracked but not ignored.
8
+ */
9
+ readonly files: readonly string[];
10
+ /** Its base merged into its branch now; absent when either names no commit. */
11
+ readonly trunk?: MergeForecast;
12
+ }
13
+ //# sourceMappingURL=story-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"story-state.d.ts","sourceRoot":"","sources":["../../src/stories/story-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,4DAA4D;AAC5D,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,+EAA+E;IAC/E,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC;CAChC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=story-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"story-state.js","sourceRoot":"","sources":["../../src/stories/story-state.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import type { Workspace } from '../workspace/index.js';
2
+ import type { StoryPhase } from './story-phase.js';
3
+ /**
4
+ * Its base merged into its branch, as this repository knows the base: the pull request is read
5
+ * against it. Read in the worktree of the story only; from another checkout it is not held.
6
+ */
7
+ export declare function trunkPhase(ws: Workspace, story: string): StoryPhase;
8
+ //# sourceMappingURL=trunk-phase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trunk-phase.d.ts","sourceRoot":"","sources":["../../src/stories/trunk-phase.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAoBnE"}