@lumenflow/cli 3.1.2 → 3.2.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 (389) hide show
  1. package/README.md +36 -35
  2. package/dist/agent-issues-query.js +13 -8
  3. package/dist/agent-log-issue.js +15 -4
  4. package/dist/agent-session-end.js +15 -4
  5. package/dist/agent-session.js +18 -6
  6. package/dist/backlog-prune.js +1 -1
  7. package/dist/commands/integrate.js +32 -18
  8. package/dist/config-get.js +27 -15
  9. package/dist/config-set.js +104 -37
  10. package/dist/delegation-list.js +1 -1
  11. package/dist/doctor.js +19 -13
  12. package/dist/file-delete.js +1 -1
  13. package/dist/file-edit.js +1 -1
  14. package/dist/file-read.js +1 -1
  15. package/dist/file-write.js +1 -1
  16. package/dist/flow-bottlenecks.js +1 -1
  17. package/dist/flow-report.js +10 -9
  18. package/dist/gates.js +3 -2
  19. package/dist/git-branch.js +1 -1
  20. package/dist/git-diff.js +1 -1
  21. package/dist/git-log.js +1 -1
  22. package/dist/init.js +238 -42
  23. package/dist/initiative-add-wu.js +1 -1
  24. package/dist/initiative-bulk-assign-wus.js +1 -1
  25. package/dist/initiative-create.js +2 -2
  26. package/dist/initiative-edit.js +1 -1
  27. package/dist/initiative-list.js +1 -1
  28. package/dist/initiative-plan.js +1 -3
  29. package/dist/initiative-status.js +47 -6
  30. package/dist/lane-edit.js +19 -10
  31. package/dist/lane-health.js +13 -24
  32. package/dist/lane-lock.js +4 -5
  33. package/dist/lane-setup.js +5 -5
  34. package/dist/lane-status.js +4 -5
  35. package/dist/lane-suggest.js +9 -7
  36. package/dist/lane-validate.js +4 -5
  37. package/dist/lumenflow-upgrade.js +17 -11
  38. package/dist/mem-checkpoint.js +1 -1
  39. package/dist/mem-cleanup.js +6 -23
  40. package/dist/mem-context.js +1 -1
  41. package/dist/mem-create.js +1 -1
  42. package/dist/mem-delete.js +1 -1
  43. package/dist/mem-export.js +1 -1
  44. package/dist/mem-inbox.js +1 -1
  45. package/dist/mem-init.js +1 -1
  46. package/dist/mem-ready.js +1 -1
  47. package/dist/mem-recover.js +1 -1
  48. package/dist/mem-signal.js +1 -1
  49. package/dist/mem-start.js +1 -1
  50. package/dist/mem-summarize.js +8 -7
  51. package/dist/mem-triage.js +7 -5
  52. package/dist/metrics-cli.js +1 -1
  53. package/dist/metrics-snapshot.js +1 -1
  54. package/dist/onboard.js +295 -120
  55. package/dist/orchestrate-init-status.js +12 -7
  56. package/dist/orchestrate-initiative.js +23 -12
  57. package/dist/orchestrate-monitor.js +20 -8
  58. package/dist/pack-scaffold.js +1 -1
  59. package/dist/plan-create.js +1 -3
  60. package/dist/plan-edit.js +1 -3
  61. package/dist/plan-link.js +1 -3
  62. package/dist/plan-promote.js +1 -3
  63. package/dist/release.js +27 -10
  64. package/dist/signal-cleanup.js +4 -18
  65. package/dist/state-bootstrap.js +11 -8
  66. package/dist/state-cleanup.js +5 -19
  67. package/dist/state-doctor.js +213 -9
  68. package/dist/task-claim.js +1 -1
  69. package/dist/validate.js +1 -1
  70. package/dist/workspace-init.js +61 -61
  71. package/dist/wu-block.js +1 -1
  72. package/dist/wu-brief.js +1 -1
  73. package/dist/wu-claim.js +1 -1
  74. package/dist/wu-cleanup.js +1 -1
  75. package/dist/wu-create.js +3 -3
  76. package/dist/wu-delegate.js +1 -1
  77. package/dist/wu-deps.js +1 -1
  78. package/dist/wu-done.js +66 -34
  79. package/dist/wu-edit.js +1 -1
  80. package/dist/wu-infer-lane.js +1 -1
  81. package/dist/wu-preflight.js +1 -1
  82. package/dist/wu-prep.js +1 -1
  83. package/dist/wu-proto.js +1 -1
  84. package/dist/wu-prune.js +1 -1
  85. package/dist/wu-recover.js +1 -1
  86. package/dist/wu-release.js +1 -1
  87. package/dist/wu-repair.js +1 -1
  88. package/dist/wu-sandbox.js +40 -27
  89. package/dist/wu-status.js +1 -1
  90. package/dist/wu-unblock.js +1 -1
  91. package/dist/wu-unlock-lane.js +1 -1
  92. package/dist/wu-validate.js +1 -1
  93. package/package.json +13 -8
  94. package/packs/software-delivery/constants.ts +10 -0
  95. package/packs/software-delivery/extensions.ts +140 -0
  96. package/packs/software-delivery/gate-policies.ts +134 -0
  97. package/packs/software-delivery/index.ts +8 -0
  98. package/packs/software-delivery/manifest-schema.ts +236 -0
  99. package/packs/software-delivery/manifest.ts +417 -0
  100. package/packs/software-delivery/manifest.yaml +711 -0
  101. package/packs/software-delivery/pack-registration.ts +113 -0
  102. package/packs/software-delivery/tool-impl/agent-tools.ts +263 -0
  103. package/packs/software-delivery/tool-impl/delegation-tools.ts +66 -0
  104. package/packs/software-delivery/tool-impl/flow-metrics-tools.ts +219 -0
  105. package/packs/software-delivery/tool-impl/git-runner.ts +113 -0
  106. package/packs/software-delivery/tool-impl/git-tools.ts +316 -0
  107. package/packs/software-delivery/tool-impl/index.ts +15 -0
  108. package/packs/software-delivery/tool-impl/initiative-orchestration-tools.ts +720 -0
  109. package/packs/software-delivery/tool-impl/lane-lock.ts +246 -0
  110. package/packs/software-delivery/tool-impl/memory-tools.ts +415 -0
  111. package/packs/software-delivery/tool-impl/pending-runtime-tools.ts +21 -0
  112. package/packs/software-delivery/tool-impl/runtime-cli-adapter.ts +328 -0
  113. package/packs/software-delivery/tool-impl/runtime-native-tools.ts +687 -0
  114. package/packs/software-delivery/tool-impl/worker-loader.ts +52 -0
  115. package/packs/software-delivery/tool-impl/worktree-tools.ts +46 -0
  116. package/packs/software-delivery/tool-impl/wu-lifecycle-tools.ts +759 -0
  117. package/packs/software-delivery/tools/delegation-tools.ts +23 -0
  118. package/packs/software-delivery/tools/git-tools.ts +55 -0
  119. package/packs/software-delivery/tools/index.ts +8 -0
  120. package/packs/software-delivery/tools/lane-lock-tool.ts +37 -0
  121. package/packs/software-delivery/tools/types.ts +71 -0
  122. package/packs/software-delivery/tools/worktree-tools.ts +49 -0
  123. package/templates/core/LUMENFLOW.md.template +3 -3
  124. package/templates/core/ai/onboarding/agent-invocation-guide.md.template +1 -1
  125. package/templates/core/ai/onboarding/lumenflow-force-usage.md.template +1 -1
  126. package/templates/core/ai/onboarding/quick-ref-commands.md.template +5 -5
  127. package/templates/core/ai/onboarding/starting-prompt.md.template +3 -3
  128. package/templates/core/ai/onboarding/vendor-support.md.template +1 -1
  129. package/templates/core/ai/onboarding/wu-create-checklist.md.template +1 -1
  130. package/dist/agent-issues-query.js.map +0 -1
  131. package/dist/agent-log-issue.js.map +0 -1
  132. package/dist/agent-session-end.js.map +0 -1
  133. package/dist/agent-session.js.map +0 -1
  134. package/dist/backlog-prune.js.map +0 -1
  135. package/dist/cli-entry-point.js +0 -149
  136. package/dist/cli-entry-point.js.map +0 -1
  137. package/dist/commands/integrate.js.map +0 -1
  138. package/dist/commands.js.map +0 -1
  139. package/dist/config-get.js.map +0 -1
  140. package/dist/config-set.js.map +0 -1
  141. package/dist/delegation-list.js.map +0 -1
  142. package/dist/deps-add.js +0 -259
  143. package/dist/deps-add.js.map +0 -1
  144. package/dist/deps-remove.js +0 -105
  145. package/dist/deps-remove.js.map +0 -1
  146. package/dist/docs-sync.js.map +0 -1
  147. package/dist/doctor.js.map +0 -1
  148. package/dist/file-delete.js.map +0 -1
  149. package/dist/file-edit.js.map +0 -1
  150. package/dist/file-read.js.map +0 -1
  151. package/dist/file-write.js.map +0 -1
  152. package/dist/flow-bottlenecks.js.map +0 -1
  153. package/dist/flow-report.js.map +0 -1
  154. package/dist/formatters.js +0 -151
  155. package/dist/formatters.js.map +0 -1
  156. package/dist/gate-defaults.js +0 -131
  157. package/dist/gate-defaults.js.map +0 -1
  158. package/dist/gate-registry.js +0 -73
  159. package/dist/gate-registry.js.map +0 -1
  160. package/dist/gates-graceful-degradation.js +0 -153
  161. package/dist/gates-graceful-degradation.js.map +0 -1
  162. package/dist/gates-plan-resolvers.js +0 -152
  163. package/dist/gates-plan-resolvers.js.map +0 -1
  164. package/dist/gates-runners.js +0 -509
  165. package/dist/gates-runners.js.map +0 -1
  166. package/dist/gates-types.js +0 -4
  167. package/dist/gates-types.js.map +0 -1
  168. package/dist/gates-utils.js +0 -323
  169. package/dist/gates-utils.js.map +0 -1
  170. package/dist/gates.js.map +0 -1
  171. package/dist/git-branch.js.map +0 -1
  172. package/dist/git-diff.js.map +0 -1
  173. package/dist/git-log.js.map +0 -1
  174. package/dist/git-status.js.map +0 -1
  175. package/dist/guard-locked.js +0 -172
  176. package/dist/guard-locked.js.map +0 -1
  177. package/dist/guard-main-branch.js +0 -217
  178. package/dist/guard-main-branch.js.map +0 -1
  179. package/dist/guard-worktree-commit.js +0 -163
  180. package/dist/guard-worktree-commit.js.map +0 -1
  181. package/dist/hooks/auto-checkpoint-utils.js +0 -54
  182. package/dist/hooks/auto-checkpoint-utils.js.map +0 -1
  183. package/dist/hooks/enforcement-checks.js +0 -399
  184. package/dist/hooks/enforcement-checks.js.map +0 -1
  185. package/dist/hooks/enforcement-generator.js +0 -139
  186. package/dist/hooks/enforcement-generator.js.map +0 -1
  187. package/dist/hooks/enforcement-sync.js +0 -385
  188. package/dist/hooks/enforcement-sync.js.map +0 -1
  189. package/dist/hooks/generators/auto-checkpoint.js +0 -125
  190. package/dist/hooks/generators/auto-checkpoint.js.map +0 -1
  191. package/dist/hooks/generators/enforce-worktree.js +0 -190
  192. package/dist/hooks/generators/enforce-worktree.js.map +0 -1
  193. package/dist/hooks/generators/index.js +0 -18
  194. package/dist/hooks/generators/index.js.map +0 -1
  195. package/dist/hooks/generators/pre-compact-checkpoint.js +0 -136
  196. package/dist/hooks/generators/pre-compact-checkpoint.js.map +0 -1
  197. package/dist/hooks/generators/require-wu.js +0 -117
  198. package/dist/hooks/generators/require-wu.js.map +0 -1
  199. package/dist/hooks/generators/session-start-recovery.js +0 -103
  200. package/dist/hooks/generators/session-start-recovery.js.map +0 -1
  201. package/dist/hooks/generators/signal-utils.js +0 -54
  202. package/dist/hooks/generators/signal-utils.js.map +0 -1
  203. package/dist/hooks/generators/warn-incomplete.js +0 -67
  204. package/dist/hooks/generators/warn-incomplete.js.map +0 -1
  205. package/dist/hooks/index.js +0 -10
  206. package/dist/hooks/index.js.map +0 -1
  207. package/dist/index.js.map +0 -1
  208. package/dist/init-detection.js +0 -232
  209. package/dist/init-detection.js.map +0 -1
  210. package/dist/init-lane-validation.js +0 -143
  211. package/dist/init-lane-validation.js.map +0 -1
  212. package/dist/init-scaffolding.js +0 -158
  213. package/dist/init-scaffolding.js.map +0 -1
  214. package/dist/init-templates.js +0 -1982
  215. package/dist/init-templates.js.map +0 -1
  216. package/dist/init.js.map +0 -1
  217. package/dist/initiative-add-wu.js.map +0 -1
  218. package/dist/initiative-bulk-assign-wus.js.map +0 -1
  219. package/dist/initiative-create.js.map +0 -1
  220. package/dist/initiative-edit.js.map +0 -1
  221. package/dist/initiative-list.js.map +0 -1
  222. package/dist/initiative-plan.js.map +0 -1
  223. package/dist/initiative-remove-wu.js.map +0 -1
  224. package/dist/initiative-status.js.map +0 -1
  225. package/dist/lane-edit.js.map +0 -1
  226. package/dist/lane-health.js.map +0 -1
  227. package/dist/lane-lifecycle-process.js +0 -366
  228. package/dist/lane-lifecycle-process.js.map +0 -1
  229. package/dist/lane-lock.js.map +0 -1
  230. package/dist/lane-setup.js.map +0 -1
  231. package/dist/lane-status.js.map +0 -1
  232. package/dist/lane-suggest.js.map +0 -1
  233. package/dist/lane-validate.js.map +0 -1
  234. package/dist/lifecycle-regression-harness.js +0 -181
  235. package/dist/lifecycle-regression-harness.js.map +0 -1
  236. package/dist/lumenflow-upgrade.js.map +0 -1
  237. package/dist/mem-checkpoint.js.map +0 -1
  238. package/dist/mem-cleanup.js.map +0 -1
  239. package/dist/mem-context.js.map +0 -1
  240. package/dist/mem-create.js.map +0 -1
  241. package/dist/mem-delete.js.map +0 -1
  242. package/dist/mem-export.js.map +0 -1
  243. package/dist/mem-inbox.js.map +0 -1
  244. package/dist/mem-index.js +0 -214
  245. package/dist/mem-index.js.map +0 -1
  246. package/dist/mem-init.js.map +0 -1
  247. package/dist/mem-profile.js +0 -210
  248. package/dist/mem-profile.js.map +0 -1
  249. package/dist/mem-promote.js +0 -257
  250. package/dist/mem-promote.js.map +0 -1
  251. package/dist/mem-ready.js.map +0 -1
  252. package/dist/mem-recover.js.map +0 -1
  253. package/dist/mem-signal.js.map +0 -1
  254. package/dist/mem-start.js.map +0 -1
  255. package/dist/mem-summarize.js.map +0 -1
  256. package/dist/mem-triage.js.map +0 -1
  257. package/dist/merge-block.js +0 -225
  258. package/dist/merge-block.js.map +0 -1
  259. package/dist/metrics-cli.js.map +0 -1
  260. package/dist/metrics-snapshot.js.map +0 -1
  261. package/dist/onboard.js.map +0 -1
  262. package/dist/onboarding-smoke-test.js +0 -418
  263. package/dist/onboarding-smoke-test.js.map +0 -1
  264. package/dist/orchestrate-init-status.js.map +0 -1
  265. package/dist/orchestrate-initiative.js.map +0 -1
  266. package/dist/orchestrate-monitor.js.map +0 -1
  267. package/dist/pack-author.js.map +0 -1
  268. package/dist/pack-hash.js.map +0 -1
  269. package/dist/pack-install.js.map +0 -1
  270. package/dist/pack-publish.js.map +0 -1
  271. package/dist/pack-scaffold.js.map +0 -1
  272. package/dist/pack-search.js.map +0 -1
  273. package/dist/pack-validate.js.map +0 -1
  274. package/dist/plan-create.js.map +0 -1
  275. package/dist/plan-edit.js.map +0 -1
  276. package/dist/plan-link.js.map +0 -1
  277. package/dist/plan-promote.js.map +0 -1
  278. package/dist/public-manifest.js +0 -920
  279. package/dist/public-manifest.js.map +0 -1
  280. package/dist/release.js.map +0 -1
  281. package/dist/rotate-progress.js +0 -253
  282. package/dist/rotate-progress.js.map +0 -1
  283. package/dist/session-coordinator.js +0 -303
  284. package/dist/session-coordinator.js.map +0 -1
  285. package/dist/shared-validators.js +0 -81
  286. package/dist/shared-validators.js.map +0 -1
  287. package/dist/signal-cleanup.js.map +0 -1
  288. package/dist/state-bootstrap.js.map +0 -1
  289. package/dist/state-cleanup.js.map +0 -1
  290. package/dist/state-doctor-fix.js +0 -226
  291. package/dist/state-doctor-fix.js.map +0 -1
  292. package/dist/state-doctor-stamps.js +0 -23
  293. package/dist/state-doctor-stamps.js.map +0 -1
  294. package/dist/state-doctor.js.map +0 -1
  295. package/dist/strict-progress.js +0 -255
  296. package/dist/strict-progress.js.map +0 -1
  297. package/dist/sync-templates.js.map +0 -1
  298. package/dist/task-claim.js.map +0 -1
  299. package/dist/trace-gen.js +0 -401
  300. package/dist/trace-gen.js.map +0 -1
  301. package/dist/validate-agent-skills.js +0 -223
  302. package/dist/validate-agent-skills.js.map +0 -1
  303. package/dist/validate-agent-sync.js +0 -151
  304. package/dist/validate-agent-sync.js.map +0 -1
  305. package/dist/validate-backlog-sync.js +0 -77
  306. package/dist/validate-backlog-sync.js.map +0 -1
  307. package/dist/validate-skills-spec.js +0 -211
  308. package/dist/validate-skills-spec.js.map +0 -1
  309. package/dist/validate.js.map +0 -1
  310. package/dist/validator-defaults.js +0 -107
  311. package/dist/validator-defaults.js.map +0 -1
  312. package/dist/validator-registry.js +0 -71
  313. package/dist/validator-registry.js.map +0 -1
  314. package/dist/workspace-init.js.map +0 -1
  315. package/dist/wu-block.js.map +0 -1
  316. package/dist/wu-brief.js.map +0 -1
  317. package/dist/wu-claim-branch.js +0 -123
  318. package/dist/wu-claim-branch.js.map +0 -1
  319. package/dist/wu-claim-cloud.js +0 -79
  320. package/dist/wu-claim-cloud.js.map +0 -1
  321. package/dist/wu-claim-mode.js +0 -82
  322. package/dist/wu-claim-mode.js.map +0 -1
  323. package/dist/wu-claim-output.js +0 -85
  324. package/dist/wu-claim-output.js.map +0 -1
  325. package/dist/wu-claim-repair-guidance.js +0 -12
  326. package/dist/wu-claim-repair-guidance.js.map +0 -1
  327. package/dist/wu-claim-resume-handler.js +0 -87
  328. package/dist/wu-claim-resume-handler.js.map +0 -1
  329. package/dist/wu-claim-state.js +0 -581
  330. package/dist/wu-claim-state.js.map +0 -1
  331. package/dist/wu-claim-validation.js +0 -457
  332. package/dist/wu-claim-validation.js.map +0 -1
  333. package/dist/wu-claim-worktree.js +0 -223
  334. package/dist/wu-claim-worktree.js.map +0 -1
  335. package/dist/wu-claim.js.map +0 -1
  336. package/dist/wu-cleanup-cloud.js +0 -78
  337. package/dist/wu-cleanup-cloud.js.map +0 -1
  338. package/dist/wu-cleanup.js.map +0 -1
  339. package/dist/wu-code-path-coverage.js +0 -83
  340. package/dist/wu-code-path-coverage.js.map +0 -1
  341. package/dist/wu-create-cloud.js +0 -30
  342. package/dist/wu-create-cloud.js.map +0 -1
  343. package/dist/wu-create-content.js +0 -264
  344. package/dist/wu-create-content.js.map +0 -1
  345. package/dist/wu-create-readiness.js +0 -59
  346. package/dist/wu-create-readiness.js.map +0 -1
  347. package/dist/wu-create-validation.js +0 -128
  348. package/dist/wu-create-validation.js.map +0 -1
  349. package/dist/wu-create.js.map +0 -1
  350. package/dist/wu-delegate.js.map +0 -1
  351. package/dist/wu-delete.js.map +0 -1
  352. package/dist/wu-deps.js.map +0 -1
  353. package/dist/wu-done-auto-cleanup.js +0 -203
  354. package/dist/wu-done-auto-cleanup.js.map +0 -1
  355. package/dist/wu-done-check.js +0 -38
  356. package/dist/wu-done-check.js.map +0 -1
  357. package/dist/wu-done-cloud.js +0 -48
  358. package/dist/wu-done-cloud.js.map +0 -1
  359. package/dist/wu-done-decay.js +0 -86
  360. package/dist/wu-done-decay.js.map +0 -1
  361. package/dist/wu-done.js.map +0 -1
  362. package/dist/wu-edit-operations.js +0 -399
  363. package/dist/wu-edit-operations.js.map +0 -1
  364. package/dist/wu-edit-validators.js +0 -282
  365. package/dist/wu-edit-validators.js.map +0 -1
  366. package/dist/wu-edit.js.map +0 -1
  367. package/dist/wu-infer-lane.js.map +0 -1
  368. package/dist/wu-preflight.js.map +0 -1
  369. package/dist/wu-prep.js.map +0 -1
  370. package/dist/wu-proto.js.map +0 -1
  371. package/dist/wu-prune.js.map +0 -1
  372. package/dist/wu-recover.js.map +0 -1
  373. package/dist/wu-release.js.map +0 -1
  374. package/dist/wu-repair.js.map +0 -1
  375. package/dist/wu-sandbox.js.map +0 -1
  376. package/dist/wu-spawn-completion.js +0 -33
  377. package/dist/wu-spawn-completion.js.map +0 -1
  378. package/dist/wu-spawn-prompt-builders.js +0 -1197
  379. package/dist/wu-spawn-prompt-builders.js.map +0 -1
  380. package/dist/wu-spawn-strategy-resolver.js +0 -322
  381. package/dist/wu-spawn-strategy-resolver.js.map +0 -1
  382. package/dist/wu-spawn.js +0 -59
  383. package/dist/wu-spawn.js.map +0 -1
  384. package/dist/wu-state-cloud.js +0 -41
  385. package/dist/wu-state-cloud.js.map +0 -1
  386. package/dist/wu-status.js.map +0 -1
  387. package/dist/wu-unblock.js.map +0 -1
  388. package/dist/wu-unlock-lane.js.map +0 -1
  389. package/dist/wu-validate.js.map +0 -1
@@ -3,26 +3,26 @@
3
3
  // SPDX-License-Identifier: AGPL-3.0-only
4
4
  /**
5
5
  * @file config-set.ts
6
- * WU-1902: Safe config:set CLI command for .lumenflow.config.yaml modification
6
+ * WU-1902 / WU-1973: Safe config:set CLI command for workspace.yaml modification
7
7
  *
8
- * Accepts dotpath keys (methodology.testing, agents.clients.claude-code.capabilities_map),
9
- * validates against the Zod schema before writing, uses micro-worktree for safe atomic commits.
8
+ * Accepts dotpath keys and writes them to workspace.yaml under software_delivery.
9
+ * Values are validated against the LumenFlow config schema before writing.
10
10
  *
11
11
  * Follows the lane:edit pattern (WU-1854).
12
12
  *
13
13
  * Usage:
14
- * pnpm config:set --key methodology.testing --value test-after
15
- * pnpm config:set --key gates.minCoverage --value 85
16
- * pnpm config:set --key agents.methodology.principles --value Library-First,KISS
14
+ * pnpm config:set --key software_delivery.methodology.testing --value test-after
15
+ * pnpm config:set --key software_delivery.gates.minCoverage --value 85
16
+ * pnpm config:set --key software_delivery.agents.methodology.principles --value Library-First,KISS
17
17
  */
18
18
  import path from 'node:path';
19
19
  import { existsSync, readFileSync, writeFileSync } from 'node:fs';
20
20
  import YAML from 'yaml';
21
21
  import { findProjectRoot } from '@lumenflow/core/config';
22
22
  import { die } from '@lumenflow/core/error-handler';
23
- import { CONFIG_FILES, FILE_SYSTEM } from '@lumenflow/core/wu-constants';
23
+ import { FILE_SYSTEM } from '@lumenflow/core/wu-constants';
24
24
  import { withMicroWorktree } from '@lumenflow/core/micro-worktree';
25
- import { LumenFlowConfigSchema } from '@lumenflow/core/config-schema';
25
+ import { LumenFlowConfigSchema, WORKSPACE_V2_KEYS } from '@lumenflow/core/config-schema';
26
26
  import { normalizeConfigKeys } from '@lumenflow/core/normalize-config-keys';
27
27
  import { runCLI } from './cli-entry-point.js';
28
28
  // ---------------------------------------------------------------------------
@@ -34,33 +34,37 @@ const ARG_KEY = '--key';
34
34
  const ARG_VALUE = '--value';
35
35
  const ARG_HELP = '--help';
36
36
  const COMMIT_PREFIX = 'chore: config:set';
37
+ const WORKSPACE_INIT_COMMAND = 'pnpm workspace-init --yes';
38
+ export const WORKSPACE_FILE_NAME = 'workspace.yaml';
39
+ export const WORKSPACE_CONFIG_ROOT_KEY = WORKSPACE_V2_KEYS.SOFTWARE_DELIVERY;
40
+ export const WORKSPACE_CONFIG_PREFIX = `${WORKSPACE_CONFIG_ROOT_KEY}.`;
37
41
  // ---------------------------------------------------------------------------
38
42
  // Help text
39
43
  // ---------------------------------------------------------------------------
40
44
  const SET_HELP_TEXT = `Usage: pnpm config:set --key <dotpath> --value <value>
41
45
 
42
- Safely update .lumenflow.config.yaml via micro-worktree commit.
46
+ Safely update workspace.yaml via micro-worktree commit.
43
47
  Validates against Zod schema before writing.
44
48
 
45
49
  Required:
46
- ${ARG_KEY} <dotpath> Config key in dot notation (e.g., methodology.testing)
50
+ ${ARG_KEY} <dotpath> Config key in dot notation (e.g., software_delivery.methodology.testing)
47
51
  ${ARG_VALUE} <value> Value to set (comma-separated for arrays)
48
52
 
49
53
  Examples:
50
- pnpm config:set --key methodology.testing --value test-after
51
- pnpm config:set --key gates.minCoverage --value 85
52
- pnpm config:set --key agents.methodology.principles --value Library-First,KISS
54
+ pnpm config:set --key software_delivery.methodology.testing --value test-after
55
+ pnpm config:set --key software_delivery.gates.minCoverage --value 85
56
+ pnpm config:set --key software_delivery.agents.methodology.principles --value Library-First,KISS
53
57
  `;
54
58
  const GET_HELP_TEXT = `Usage: pnpm config:get --key <dotpath>
55
59
 
56
- Read and display a value from .lumenflow.config.yaml.
60
+ Read and display a value from workspace.yaml.
57
61
 
58
62
  Required:
59
- ${ARG_KEY} <dotpath> Config key in dot notation (e.g., methodology.testing)
63
+ ${ARG_KEY} <dotpath> Config key in dot notation (e.g., software_delivery.methodology.testing)
60
64
 
61
65
  Examples:
62
- pnpm config:get --key methodology.testing
63
- pnpm config:get --key gates.minCoverage
66
+ pnpm config:get --key software_delivery.methodology.testing
67
+ pnpm config:get --key software_delivery.gates.minCoverage
64
68
  `;
65
69
  // ---------------------------------------------------------------------------
66
70
  // Argument parsing
@@ -115,6 +119,25 @@ export function parseConfigGetArgs(argv) {
115
119
  }
116
120
  return { key };
117
121
  }
122
+ /**
123
+ * Normalize a user-provided key to software_delivery-relative dotpath.
124
+ *
125
+ * Supported key forms:
126
+ * - `software_delivery.methodology.testing` (canonical)
127
+ * - `methodology.testing` (shorthand; automatically scoped)
128
+ *
129
+ * @param key - User-provided config key
130
+ * @returns Dotpath relative to software_delivery
131
+ */
132
+ export function normalizeWorkspaceConfigKey(key) {
133
+ if (key === WORKSPACE_CONFIG_ROOT_KEY) {
134
+ return '';
135
+ }
136
+ if (key.startsWith(WORKSPACE_CONFIG_PREFIX)) {
137
+ return key.slice(WORKSPACE_CONFIG_PREFIX.length);
138
+ }
139
+ return key;
140
+ }
118
141
  // ---------------------------------------------------------------------------
119
142
  // Dotpath helpers (pure, no side effects)
120
143
  // ---------------------------------------------------------------------------
@@ -232,27 +255,69 @@ export function applyConfigSet(config, dotpath, rawValue) {
232
255
  // ---------------------------------------------------------------------------
233
256
  // Config I/O helpers
234
257
  // ---------------------------------------------------------------------------
235
- function readRawConfig(configPath) {
236
- const content = readFileSync(configPath, FILE_SYSTEM.UTF8);
258
+ /**
259
+ * Read workspace YAML as object.
260
+ *
261
+ * @param workspacePath - Absolute path to workspace.yaml
262
+ * @returns Parsed workspace object
263
+ */
264
+ function readRawWorkspace(workspacePath) {
265
+ const content = readFileSync(workspacePath, FILE_SYSTEM.UTF8);
237
266
  const parsed = YAML.parse(content);
238
267
  return parsed && typeof parsed === 'object' ? parsed : {};
239
268
  }
240
- function writeRawConfig(configPath, config) {
241
- const nextContent = YAML.stringify(config);
242
- writeFileSync(configPath, nextContent, FILE_SYSTEM.UTF8);
269
+ /**
270
+ * Write workspace object back to YAML.
271
+ *
272
+ * @param workspacePath - Absolute path to workspace.yaml
273
+ * @param workspace - Workspace object to persist
274
+ */
275
+ function writeRawWorkspace(workspacePath, workspace) {
276
+ const nextContent = YAML.stringify(workspace);
277
+ writeFileSync(workspacePath, nextContent, FILE_SYSTEM.UTF8);
278
+ }
279
+ /**
280
+ * Extract software_delivery config section from workspace object.
281
+ *
282
+ * @param workspace - Parsed workspace object
283
+ * @returns software_delivery config object (empty when unset/invalid)
284
+ */
285
+ export function getSoftwareDeliveryConfigFromWorkspace(workspace) {
286
+ const section = workspace[WORKSPACE_CONFIG_ROOT_KEY];
287
+ if (!section || typeof section !== 'object' || Array.isArray(section)) {
288
+ return {};
289
+ }
290
+ return section;
291
+ }
292
+ /**
293
+ * Return a new workspace object with updated software_delivery section.
294
+ *
295
+ * @param workspace - Existing workspace object
296
+ * @param config - Updated software_delivery config object
297
+ * @returns New workspace object with replaced software_delivery section
298
+ */
299
+ export function setSoftwareDeliveryConfigInWorkspace(workspace, config) {
300
+ return {
301
+ ...workspace,
302
+ [WORKSPACE_CONFIG_ROOT_KEY]: config,
303
+ };
243
304
  }
244
305
  // ---------------------------------------------------------------------------
245
306
  // Main: config:set
246
307
  // ---------------------------------------------------------------------------
247
- async function main() {
308
+ export async function main() {
248
309
  const userArgs = process.argv.slice(2);
249
310
  const options = parseConfigSetArgs(userArgs);
311
+ const configKey = normalizeWorkspaceConfigKey(options.key);
312
+ if (!configKey) {
313
+ die(`${LOG_PREFIX} Key must target a nested field under ${WORKSPACE_CONFIG_ROOT_KEY} (e.g., ${WORKSPACE_CONFIG_PREFIX}methodology.testing).`);
314
+ }
250
315
  const projectRoot = findProjectRoot();
251
- const configPath = path.join(projectRoot, CONFIG_FILES.LUMENFLOW_CONFIG);
252
- if (!existsSync(configPath)) {
253
- die(`${LOG_PREFIX} Missing ${CONFIG_FILES.LUMENFLOW_CONFIG}. Run \`pnpm exec lumenflow init\` first.`);
316
+ const workspacePath = path.join(projectRoot, WORKSPACE_FILE_NAME);
317
+ if (!existsSync(workspacePath)) {
318
+ die(`${LOG_PREFIX} Missing ${WORKSPACE_FILE_NAME}. Run \`${WORKSPACE_INIT_COMMAND}\` first.`);
254
319
  }
255
- console.log(`${LOG_PREFIX} Setting ${options.key}=${options.value} via micro-worktree isolation (WU-1902)`);
320
+ console.log(`${LOG_PREFIX} Setting ${options.key}=${options.value} in ${WORKSPACE_FILE_NAME} via micro-worktree isolation`);
256
321
  // Use micro-worktree to make atomic changes
257
322
  await withMicroWorktree({
258
323
  operation: OPERATION_NAME,
@@ -260,24 +325,26 @@ async function main() {
260
325
  logPrefix: LOG_PREFIX,
261
326
  pushOnly: true,
262
327
  async execute({ worktreePath }) {
263
- const configRelPath = CONFIG_FILES.LUMENFLOW_CONFIG;
264
- const mwConfigPath = path.join(worktreePath, configRelPath);
265
- if (!existsSync(mwConfigPath)) {
266
- die(`${LOG_PREFIX} Config file not found in micro-worktree: ${configRelPath}`);
328
+ const workspaceRelPath = WORKSPACE_FILE_NAME;
329
+ const mwWorkspacePath = path.join(worktreePath, workspaceRelPath);
330
+ if (!existsSync(mwWorkspacePath)) {
331
+ die(`${LOG_PREFIX} Config file not found in micro-worktree: ${workspaceRelPath}`);
267
332
  }
268
- // Read current config
269
- const config = readRawConfig(mwConfigPath);
333
+ // Read workspace and extract software_delivery config section
334
+ const workspace = readRawWorkspace(mwWorkspacePath);
335
+ const softwareDeliveryConfig = getSoftwareDeliveryConfigFromWorkspace(workspace);
270
336
  // Apply set
271
- const result = applyConfigSet(config, options.key, options.value);
337
+ const result = applyConfigSet(softwareDeliveryConfig, configKey, options.value);
272
338
  if (!result.ok) {
273
339
  die(`${LOG_PREFIX} ${result.error}`);
274
340
  }
275
- // Write updated config
276
- writeRawConfig(mwConfigPath, result.config);
341
+ // Write updated workspace with replaced software_delivery section
342
+ const updatedWorkspace = setSoftwareDeliveryConfigInWorkspace(workspace, result.config);
343
+ writeRawWorkspace(mwWorkspacePath, updatedWorkspace);
277
344
  console.log(`${LOG_PREFIX} Config validated and written successfully.`);
278
345
  return {
279
346
  commitMessage: `${COMMIT_PREFIX} ${options.key}=${options.value}`,
280
- files: [configRelPath],
347
+ files: [workspaceRelPath],
281
348
  };
282
349
  },
283
350
  });
@@ -60,7 +60,7 @@ function printLegend() {
60
60
  /**
61
61
  * Main entry point
62
62
  */
63
- async function main() {
63
+ export async function main() {
64
64
  const args = createWUParser({
65
65
  name: 'delegation-list',
66
66
  description: 'Display delegation trees for WUs or initiatives',
package/dist/doctor.js CHANGED
@@ -11,14 +11,14 @@
11
11
  import * as fs from 'node:fs';
12
12
  import * as path from 'node:path';
13
13
  import { execFileSync } from 'node:child_process';
14
- import { createWUParser, getResolvedPaths, detectOrphanWorktrees, detectMissingTrackedWorktrees, } from '@lumenflow/core';
14
+ import { createWUParser, getResolvedPaths, detectOrphanWorktrees, detectMissingTrackedWorktrees, getConfigFilePresence, WORKSPACE_CONFIG_FILE_NAME, } from '@lumenflow/core';
15
15
  import { loadLaneDefinitions, detectLaneOverlaps } from './lane-health.js';
16
16
  import { runCLI } from './cli-entry-point.js';
17
17
  /**
18
18
  * WU-1386: Managed files that should not have uncommitted changes
19
19
  */
20
20
  const MANAGED_FILE_PATTERNS = [
21
- '.lumenflow.config.yaml',
21
+ WORKSPACE_CONFIG_FILE_NAME,
22
22
  '.lumenflow.lane-inference.yaml',
23
23
  'AGENTS.md',
24
24
  'CLAUDE.md',
@@ -94,11 +94,11 @@ function checkSafeGit(projectDir) {
94
94
  // WU-1654: Read safe-git path from config instead of hardcoding
95
95
  let safeGitPath;
96
96
  try {
97
- const resolved = getResolvedPaths({ projectRoot: projectDir });
97
+ const resolved = getResolvedPaths({ projectRoot: projectDir, strictWorkspace: true });
98
98
  safeGitPath = resolved.safeGitPath;
99
99
  }
100
100
  catch {
101
- // Graceful fallback if config can't be loaded
101
+ // Default location when config cannot be loaded
102
102
  safeGitPath = path.join(projectDir, 'scripts', 'safe-git');
103
103
  }
104
104
  const relativePath = path.relative(projectDir, safeGitPath);
@@ -132,20 +132,20 @@ function checkAgentsMd(projectDir) {
132
132
  };
133
133
  }
134
134
  /**
135
- * Check if .lumenflow.config.yaml exists
135
+ * Check whether canonical workspace config exists.
136
136
  */
137
137
  function checkLumenflowConfig(projectDir) {
138
- const configPath = path.join(projectDir, '.lumenflow.config.yaml');
139
- if (!fs.existsSync(configPath)) {
138
+ const { workspaceConfigExists } = getConfigFilePresence(projectDir);
139
+ if (!workspaceConfigExists) {
140
140
  return {
141
141
  passed: false,
142
- message: 'LumenFlow config missing',
143
- details: 'Run: lumenflow init to create configuration',
142
+ message: `${WORKSPACE_CONFIG_FILE_NAME} missing`,
143
+ details: `Run: pnpm workspace-init --yes`,
144
144
  };
145
145
  }
146
146
  return {
147
147
  passed: true,
148
- message: 'LumenFlow config present (.lumenflow.config.yaml)',
148
+ message: `Workspace config present (${WORKSPACE_CONFIG_FILE_NAME})`,
149
149
  };
150
150
  }
151
151
  /**
@@ -549,7 +549,7 @@ export async function runDoctor(projectDir, options = {}) {
549
549
  }
550
550
  // Determine overall status
551
551
  // Note: laneHealth is advisory (not included in critical checks)
552
- const criticalChecks = [checks.husky, checks.safeGit, checks.agentsMd];
552
+ const criticalChecks = [checks.husky, checks.safeGit, checks.agentsMd, checks.lumenflowConfig];
553
553
  const allCriticalPassed = criticalChecks.every((check) => check.passed);
554
554
  // WU-1386: Calculate exit code
555
555
  // 0 = healthy (all checks pass, no warnings)
@@ -584,7 +584,7 @@ export async function runDoctorForInit(projectDir) {
584
584
  let warnings = 0;
585
585
  let errors = 0;
586
586
  // Critical checks that count as errors (if they fail, safety is compromised)
587
- const criticalCheckKeys = ['husky', 'safeGit', 'agentsMd'];
587
+ const criticalCheckKeys = ['husky', 'safeGit', 'agentsMd', 'lumenflowConfig'];
588
588
  for (const [key, check] of Object.entries(result.checks)) {
589
589
  if (!check.passed) {
590
590
  if (criticalCheckKeys.includes(key)) {
@@ -625,6 +625,12 @@ export async function runDoctorForInit(projectDir) {
625
625
  if (!result.checks.agentsMd.passed) {
626
626
  lines.push(' Error: AGENTS.md not found');
627
627
  }
628
+ if (!result.checks.lumenflowConfig.passed) {
629
+ lines.push(` Error: ${result.checks.lumenflowConfig.message}`);
630
+ if (result.checks.lumenflowConfig.details) {
631
+ lines.push(` ${result.checks.lumenflowConfig.details}`);
632
+ }
633
+ }
628
634
  // WU-1387: Show lane health issues
629
635
  if (!result.checks.laneHealth.passed) {
630
636
  lines.push(` Warning: Lane overlap detected - ${result.checks.laneHealth.message}`);
@@ -746,7 +752,7 @@ export function formatDoctorOutput(result) {
746
752
  lines.push('');
747
753
  lines.push('To fix missing components:');
748
754
  lines.push(' pnpm install && pnpm prepare # Install Husky hooks');
749
- lines.push(' lumenflow init # Create missing config files');
755
+ lines.push(' pnpm workspace-init --yes # Create canonical workspace.yaml');
750
756
  }
751
757
  lines.push('');
752
758
  return lines.join('\n');
@@ -202,7 +202,7 @@ Examples:
202
202
  * Main entry point
203
203
  */
204
204
  /* istanbul ignore next -- CLI entry point tested via subprocess */
205
- async function main() {
205
+ export async function main() {
206
206
  const args = parseFileDeleteArgs(process.argv);
207
207
  if (args.help) {
208
208
  printHelp();
package/dist/file-edit.js CHANGED
@@ -208,7 +208,7 @@ Examples:
208
208
  * Main entry point
209
209
  */
210
210
  /* istanbul ignore next -- CLI entry point tested via subprocess */
211
- async function main() {
211
+ export async function main() {
212
212
  const args = parseFileEditArgs(process.argv);
213
213
  if (args.help) {
214
214
  printHelp();
package/dist/file-read.js CHANGED
@@ -171,7 +171,7 @@ Examples:
171
171
  * Main entry point
172
172
  */
173
173
  /* istanbul ignore next -- CLI entry point tested via subprocess */
174
- async function main() {
174
+ export async function main() {
175
175
  const args = parseFileReadArgs(process.argv);
176
176
  if (args.help) {
177
177
  printHelp();
@@ -166,7 +166,7 @@ Examples:
166
166
  * Main entry point
167
167
  */
168
168
  /* istanbul ignore next -- CLI entry point tested via subprocess */
169
- async function main() {
169
+ export async function main() {
170
170
  const args = parseFileWriteArgs(process.argv);
171
171
  if (args.help) {
172
172
  printHelp();
@@ -142,7 +142,7 @@ function formatAsMermaid(analysis, coreGraph) {
142
142
  /**
143
143
  * Main function
144
144
  */
145
- async function main() {
145
+ export async function main() {
146
146
  const opts = parseArgs();
147
147
  const limit = parseInt(opts.limit, 10);
148
148
  console.log(`${LOG_PREFIX} Building dependency graph...`);
@@ -24,6 +24,7 @@ import { Command } from 'commander';
24
24
  import { generateFlowReport, TELEMETRY_PATHS, } from '@lumenflow/metrics';
25
25
  import { WU_PATHS } from '@lumenflow/core/wu-paths';
26
26
  import { runCLI } from './cli-entry-point.js';
27
+ import { FLOW_REPORT_WU_DISPLAY_LIMIT, FLOW_REPORT_TITLE_COLUMN_WIDTH, WU_ID_COLUMN_WIDTH, LANE_COLUMN_WIDTH, GATE_NAME_COLUMN_WIDTH, MS_PER_HOUR, ONE_DECIMAL_ROUNDING_FACTOR, JSON_INDENT, } from './constants.js';
27
28
  /** Log prefix for console output */
28
29
  const LOG_PREFIX = '[flow:report]';
29
30
  /** Default report window in days */
@@ -206,8 +207,8 @@ function calculateCycleTime(wu) {
206
207
  const claimed = new Date(wu.claimed_at);
207
208
  const completed = new Date(wu.completed_at);
208
209
  const diffMs = completed.getTime() - claimed.getTime();
209
- const diffHours = diffMs / (1000 * 60 * 60);
210
- return Math.round(diffHours * 10) / 10; // Round to 1 decimal
210
+ const diffHours = diffMs / MS_PER_HOUR;
211
+ return Math.round(diffHours * ONE_DECIMAL_ROUNDING_FACTOR) / ONE_DECIMAL_ROUNDING_FACTOR;
211
212
  }
212
213
  /**
213
214
  * Filter events by date range
@@ -236,7 +237,7 @@ function formatAsTable(report) {
236
237
  lines.push('├─────────────────────────────────────────────────────────────┤');
237
238
  lines.push('│ By Name: │');
238
239
  for (const [name, stats] of Object.entries(report.gates.byName)) {
239
- lines.push(`│ ${name.padEnd(20)} ${stats.passRate}% (${stats.passed}/${stats.total})`);
240
+ lines.push(`│ ${name.padEnd(GATE_NAME_COLUMN_WIDTH)} ${stats.passRate}% (${stats.passed}/${stats.total})`);
240
241
  }
241
242
  lines.push('└─────────────────────────────────────────────────────────────┘');
242
243
  lines.push('');
@@ -246,11 +247,11 @@ function formatAsTable(report) {
246
247
  lines.push('├─────────────────────────────────────────────────────────────┤');
247
248
  lines.push(`│ Completed: ${report.wus.completed}`);
248
249
  lines.push('├─────────────────────────────────────────────────────────────┤');
249
- for (const wu of report.wus.list.slice(0, 10)) {
250
- lines.push(`│ ${wu.wuId.padEnd(8)} ${wu.completedDate} ${wu.lane.padEnd(15)} ${wu.title.slice(0, 25)}`);
250
+ for (const wu of report.wus.list.slice(0, FLOW_REPORT_WU_DISPLAY_LIMIT)) {
251
+ lines.push(`│ ${wu.wuId.padEnd(WU_ID_COLUMN_WIDTH)} ${wu.completedDate} ${wu.lane.padEnd(LANE_COLUMN_WIDTH)} ${wu.title.slice(0, FLOW_REPORT_TITLE_COLUMN_WIDTH)}`);
251
252
  }
252
- if (report.wus.list.length > 10) {
253
- lines.push(`│ ... and ${report.wus.list.length - 10} more`);
253
+ if (report.wus.list.length > FLOW_REPORT_WU_DISPLAY_LIMIT) {
254
+ lines.push(`│ ... and ${report.wus.list.length - FLOW_REPORT_WU_DISPLAY_LIMIT} more`);
254
255
  }
255
256
  lines.push('└─────────────────────────────────────────────────────────────┘');
256
257
  lines.push('');
@@ -267,7 +268,7 @@ function formatAsTable(report) {
267
268
  /**
268
269
  * Main function
269
270
  */
270
- async function main() {
271
+ export async function main() {
271
272
  const opts = parseArgs();
272
273
  const baseDir = process.cwd();
273
274
  console.log(`${LOG_PREFIX} Generating flow report...`);
@@ -302,7 +303,7 @@ async function main() {
302
303
  console.log(formatAsTable(report));
303
304
  }
304
305
  else {
305
- console.log(JSON.stringify(report, null, 2));
306
+ console.log(JSON.stringify(report, null, JSON_INDENT));
306
307
  }
307
308
  }
308
309
  // WU-1181: Use import.meta.main instead of process.argv[1] comparison
package/dist/gates.js CHANGED
@@ -70,7 +70,7 @@ import { runOnboardingSmokeTestGate } from './onboarding-smoke-test.js';
70
70
  // ── WU-1647: Import from extracted modules ─────────────────────────────
71
71
  import { run, makeGateLogger, readLogTail, createAgentLogContext, emitFormatCheckGuidance, loadCurrentWUCodePaths, } from './gates-utils.js';
72
72
  import { resolveDocsOnlyTestPlan, formatDocsOnlySkipMessage, } from './gates-plan-resolvers.js';
73
- import { runFormatCheckGate, runIncrementalLint, runChangedTests, runSafetyCriticalTests, runIntegrationTests, runSpecLinterGate, runBacklogSyncGate, runSupabaseDocsGate, runLaneHealthGate, runDocsOnlyFilteredTests, } from './gates-runners.js';
73
+ import { runFormatCheckGate, runIncrementalLint, runChangedTests, runSafetyCriticalTests, runIntegrationTests, runSpecLinterGate, runClaimValidationGate, runBacklogSyncGate, runSupabaseDocsGate, runLaneHealthGate, runDocsOnlyFilteredTests, } from './gates-runners.js';
74
74
  // ── Re-exports for backward compatibility ──────────────────────────────
75
75
  // Tests and other modules import these from gates.ts; preserve the public API.
76
76
  export { parsePrettierListOutput, buildPrettierWriteCommand, formatFormatCheckGuidance, parseWUFromBranchName, extractPackagesFromCodePaths, loadCurrentWUCodePaths, } from './gates-utils.js';
@@ -260,6 +260,7 @@ async function executeGates(opts) {
260
260
  const gateRunFunctions = {
261
261
  [GATE_NAMES.FORMAT_CHECK]: runFormatCheckGate,
262
262
  [GATE_NAMES.SPEC_LINTER]: runSpecLinterGate,
263
+ [GATE_NAMES.CLAIM_VALIDATION]: runClaimValidationGate,
263
264
  [GATE_NAMES.BACKLOG_SYNC]: runBacklogSyncGate,
264
265
  [GATE_NAMES.SUPABASE_DOCS_LINTER]: runSupabaseDocsGate,
265
266
  [GATE_NAMES.LANE_HEALTH]: (ctx) => runLaneHealthGate({ ...ctx, mode: laneHealthMode }),
@@ -498,7 +499,7 @@ async function executeGates(opts) {
498
499
  return true;
499
500
  }
500
501
  // WU-1537: Wrap executeGates in a standard main() for runCLI consistency
501
- async function main() {
502
+ export async function main() {
502
503
  const opts = parseGatesOptions();
503
504
  const ok = await executeGates({ ...opts, argv: process.argv.slice(2) });
504
505
  if (!ok) {
@@ -157,7 +157,7 @@ Examples:
157
157
  * Main entry point
158
158
  */
159
159
  /* istanbul ignore next -- CLI entry point tested via subprocess */
160
- async function main() {
160
+ export async function main() {
161
161
  const args = parseGitBranchArgs(process.argv);
162
162
  if (args.help) {
163
163
  printHelp();
package/dist/git-diff.js CHANGED
@@ -145,7 +145,7 @@ Examples:
145
145
  * Main entry point
146
146
  */
147
147
  /* istanbul ignore next -- CLI entry point tested via subprocess */
148
- async function main() {
148
+ export async function main() {
149
149
  const args = parseGitDiffArgs(process.argv);
150
150
  if (args.help) {
151
151
  printHelp();
package/dist/git-log.js CHANGED
@@ -194,7 +194,7 @@ Examples:
194
194
  * Main entry point
195
195
  */
196
196
  /* istanbul ignore next -- CLI entry point tested via subprocess */
197
- async function main() {
197
+ export async function main() {
198
198
  const args = parseGitLogArgs(process.argv);
199
199
  if (args.help) {
200
200
  printHelp();