@lumenflow/packs-software-delivery 4.24.0 → 5.0.1

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 (286) hide show
  1. package/dist/manifest-schema.d.ts +12 -0
  2. package/dist/manifest-schema.d.ts.map +1 -1
  3. package/dist/manifest-schema.js +10 -0
  4. package/dist/manifest-schema.js.map +1 -1
  5. package/dist/manifest.d.ts +21 -0
  6. package/dist/manifest.d.ts.map +1 -1
  7. package/dist/manifest.js +92 -1
  8. package/dist/manifest.js.map +1 -1
  9. package/dist/src/commands/index.d.ts +2 -0
  10. package/dist/src/commands/index.d.ts.map +1 -0
  11. package/dist/src/commands/index.js +5 -0
  12. package/dist/src/commands/index.js.map +1 -0
  13. package/dist/src/config/delivery-review-contract.d.ts +17 -0
  14. package/dist/src/config/delivery-review-contract.d.ts.map +1 -0
  15. package/dist/src/config/delivery-review-contract.js +19 -0
  16. package/dist/src/config/delivery-review-contract.js.map +1 -0
  17. package/dist/src/config/env-accessors.d.ts +16 -0
  18. package/dist/src/config/env-accessors.d.ts.map +1 -0
  19. package/dist/src/config/env-accessors.js +18 -0
  20. package/dist/src/config/env-accessors.js.map +1 -0
  21. package/dist/src/config/index.d.ts +3 -0
  22. package/dist/src/config/index.d.ts.map +1 -0
  23. package/dist/src/config/index.js +8 -0
  24. package/dist/src/config/index.js.map +1 -0
  25. package/dist/src/config/normalize-config-keys.d.ts +16 -0
  26. package/dist/src/config/normalize-config-keys.d.ts.map +1 -0
  27. package/dist/src/config/normalize-config-keys.js +18 -0
  28. package/dist/src/config/normalize-config-keys.js.map +1 -0
  29. package/dist/src/config/schemas/lumenflow-config-schema-types.d.ts +190 -0
  30. package/dist/src/config/schemas/lumenflow-config-schema-types.d.ts.map +1 -0
  31. package/dist/src/config/schemas/lumenflow-config-schema-types.js +182 -0
  32. package/dist/src/config/schemas/lumenflow-config-schema-types.js.map +1 -0
  33. package/dist/src/config/schemas/lumenflow-config-schema.d.ts +190 -0
  34. package/dist/src/config/schemas/lumenflow-config-schema.d.ts.map +1 -0
  35. package/dist/src/config/schemas/lumenflow-config-schema.js +182 -0
  36. package/dist/src/config/schemas/lumenflow-config-schema.js.map +1 -0
  37. package/dist/src/config/workspace-reader.d.ts +56 -0
  38. package/dist/src/config/workspace-reader.d.ts.map +1 -0
  39. package/dist/src/config/workspace-reader.js +209 -0
  40. package/dist/src/config/workspace-reader.js.map +1 -0
  41. package/dist/src/constants/backlog-patterns.d.ts +21 -0
  42. package/dist/src/constants/backlog-patterns.d.ts.map +1 -0
  43. package/dist/src/constants/backlog-patterns.js +26 -0
  44. package/dist/src/constants/backlog-patterns.js.map +1 -0
  45. package/dist/src/constants/client-ids.d.ts +16 -0
  46. package/dist/src/constants/client-ids.d.ts.map +1 -0
  47. package/dist/src/constants/client-ids.js +16 -0
  48. package/dist/src/constants/client-ids.js.map +1 -0
  49. package/dist/src/constants/config-contract.d.ts +2 -0
  50. package/dist/src/constants/config-contract.d.ts.map +1 -0
  51. package/dist/src/constants/config-contract.js +7 -0
  52. package/dist/src/constants/config-contract.js.map +1 -0
  53. package/dist/src/constants/docs-layout-presets.d.ts +31 -0
  54. package/dist/src/constants/docs-layout-presets.d.ts.map +1 -0
  55. package/dist/src/constants/docs-layout-presets.js +41 -0
  56. package/dist/src/constants/docs-layout-presets.js.map +1 -0
  57. package/dist/src/constants/duration-constants.d.ts +11 -0
  58. package/dist/src/constants/duration-constants.d.ts.map +1 -0
  59. package/dist/src/constants/duration-constants.js +13 -0
  60. package/dist/src/constants/duration-constants.js.map +1 -0
  61. package/dist/src/constants/gate-constants.d.ts +24 -0
  62. package/dist/src/constants/gate-constants.d.ts.map +1 -0
  63. package/dist/src/constants/gate-constants.js +26 -0
  64. package/dist/src/constants/gate-constants.js.map +1 -0
  65. package/dist/src/constants/index.d.ts +18 -0
  66. package/dist/src/constants/index.d.ts.map +1 -0
  67. package/dist/src/constants/index.js +29 -0
  68. package/dist/src/constants/index.js.map +1 -0
  69. package/dist/src/constants/lock-constants.d.ts +29 -0
  70. package/dist/src/constants/lock-constants.d.ts.map +1 -0
  71. package/dist/src/constants/lock-constants.js +31 -0
  72. package/dist/src/constants/lock-constants.js.map +1 -0
  73. package/dist/src/constants/object-guards.d.ts +9 -0
  74. package/dist/src/constants/object-guards.d.ts.map +1 -0
  75. package/dist/src/constants/object-guards.js +11 -0
  76. package/dist/src/constants/object-guards.js.map +1 -0
  77. package/dist/src/constants/section-headings.d.ts +35 -0
  78. package/dist/src/constants/section-headings.d.ts.map +1 -0
  79. package/dist/src/constants/section-headings.js +82 -0
  80. package/dist/src/constants/section-headings.js.map +1 -0
  81. package/dist/src/constants/wu-cli-constants.d.ts +434 -0
  82. package/dist/src/constants/wu-cli-constants.d.ts.map +1 -0
  83. package/dist/src/constants/wu-cli-constants.js +439 -0
  84. package/dist/src/constants/wu-cli-constants.js.map +1 -0
  85. package/dist/src/constants/wu-domain-constants.d.ts +296 -0
  86. package/dist/src/constants/wu-domain-constants.d.ts.map +1 -0
  87. package/dist/src/constants/wu-domain-constants.js +400 -0
  88. package/dist/src/constants/wu-domain-constants.js.map +1 -0
  89. package/dist/src/constants/wu-git-constants.d.ts +2 -0
  90. package/dist/src/constants/wu-git-constants.d.ts.map +1 -0
  91. package/dist/src/constants/wu-git-constants.js +7 -0
  92. package/dist/src/constants/wu-git-constants.js.map +1 -0
  93. package/dist/src/constants/wu-id-format.d.ts +138 -0
  94. package/dist/src/constants/wu-id-format.d.ts.map +1 -0
  95. package/dist/src/constants/wu-id-format.js +265 -0
  96. package/dist/src/constants/wu-id-format.js.map +1 -0
  97. package/dist/src/constants/wu-paths-constants.d.ts +254 -0
  98. package/dist/src/constants/wu-paths-constants.d.ts.map +1 -0
  99. package/dist/src/constants/wu-paths-constants.js +276 -0
  100. package/dist/src/constants/wu-paths-constants.js.map +1 -0
  101. package/dist/src/constants/wu-statuses.d.ts +209 -0
  102. package/dist/src/constants/wu-statuses.d.ts.map +1 -0
  103. package/dist/src/constants/wu-statuses.js +245 -0
  104. package/dist/src/constants/wu-statuses.js.map +1 -0
  105. package/dist/src/constants/wu-type-helpers.d.ts +28 -0
  106. package/dist/src/constants/wu-type-helpers.d.ts.map +1 -0
  107. package/dist/src/constants/wu-type-helpers.js +49 -0
  108. package/dist/src/constants/wu-type-helpers.js.map +1 -0
  109. package/dist/src/constants/wu-ui-constants.d.ts +236 -0
  110. package/dist/src/constants/wu-ui-constants.d.ts.map +1 -0
  111. package/dist/src/constants/wu-ui-constants.js +238 -0
  112. package/dist/src/constants/wu-ui-constants.js.map +1 -0
  113. package/dist/src/constants/wu-validation-constants.d.ts +61 -0
  114. package/dist/src/constants/wu-validation-constants.d.ts.map +1 -0
  115. package/dist/src/constants/wu-validation-constants.js +69 -0
  116. package/dist/src/constants/wu-validation-constants.js.map +1 -0
  117. package/dist/src/domain/index.d.ts +4 -0
  118. package/dist/src/domain/index.d.ts.map +1 -0
  119. package/dist/src/domain/index.js +6 -0
  120. package/dist/src/domain/index.js.map +1 -0
  121. package/dist/src/domain/orchestration.constants.d.ts +111 -0
  122. package/dist/src/domain/orchestration.constants.d.ts.map +1 -0
  123. package/dist/src/domain/orchestration.constants.js +130 -0
  124. package/dist/src/domain/orchestration.constants.js.map +1 -0
  125. package/dist/src/domain/orchestration.schemas.d.ts +307 -0
  126. package/dist/src/domain/orchestration.schemas.d.ts.map +1 -0
  127. package/dist/src/domain/orchestration.schemas.js +214 -0
  128. package/dist/src/domain/orchestration.schemas.js.map +1 -0
  129. package/dist/src/domain/orchestration.types.d.ts +134 -0
  130. package/dist/src/domain/orchestration.types.d.ts.map +1 -0
  131. package/dist/src/domain/orchestration.types.js +5 -0
  132. package/dist/src/domain/orchestration.types.js.map +1 -0
  133. package/dist/src/methodology/incremental-test.d.ts +33 -0
  134. package/dist/src/methodology/incremental-test.d.ts.map +1 -0
  135. package/dist/src/methodology/incremental-test.js +73 -0
  136. package/dist/src/methodology/incremental-test.js.map +1 -0
  137. package/dist/src/methodology/index.d.ts +3 -0
  138. package/dist/src/methodology/index.d.ts.map +1 -0
  139. package/dist/src/methodology/index.js +6 -0
  140. package/dist/src/methodology/index.js.map +1 -0
  141. package/dist/src/methodology/manual-test-validator.d.ts +97 -0
  142. package/dist/src/methodology/manual-test-validator.d.ts.map +1 -0
  143. package/dist/src/methodology/manual-test-validator.js +248 -0
  144. package/dist/src/methodology/manual-test-validator.js.map +1 -0
  145. package/dist/src/policy/coverage-gate.d.ts +127 -0
  146. package/dist/src/policy/coverage-gate.d.ts.map +1 -0
  147. package/dist/src/policy/coverage-gate.js +211 -0
  148. package/dist/src/policy/coverage-gate.js.map +1 -0
  149. package/dist/src/policy/gates-agent-mode.d.ts +107 -0
  150. package/dist/src/policy/gates-agent-mode.d.ts.map +1 -0
  151. package/dist/src/policy/gates-agent-mode.js +138 -0
  152. package/dist/src/policy/gates-agent-mode.js.map +1 -0
  153. package/dist/src/policy/gates-config-internal.d.ts +54 -0
  154. package/dist/src/policy/gates-config-internal.d.ts.map +1 -0
  155. package/dist/src/policy/gates-config-internal.js +108 -0
  156. package/dist/src/policy/gates-config-internal.js.map +1 -0
  157. package/dist/src/policy/gates-config.d.ts +67 -0
  158. package/dist/src/policy/gates-config.d.ts.map +1 -0
  159. package/dist/src/policy/gates-config.js +193 -0
  160. package/dist/src/policy/gates-config.js.map +1 -0
  161. package/dist/src/policy/gates-coverage.d.ts +48 -0
  162. package/dist/src/policy/gates-coverage.d.ts.map +1 -0
  163. package/dist/src/policy/gates-coverage.js +182 -0
  164. package/dist/src/policy/gates-coverage.js.map +1 -0
  165. package/dist/src/policy/gates-presets.d.ts +51 -0
  166. package/dist/src/policy/gates-presets.d.ts.map +1 -0
  167. package/dist/src/policy/gates-presets.js +117 -0
  168. package/dist/src/policy/gates-presets.js.map +1 -0
  169. package/dist/src/policy/gates-schemas.d.ts +142 -0
  170. package/dist/src/policy/gates-schemas.d.ts.map +1 -0
  171. package/dist/src/policy/gates-schemas.js +67 -0
  172. package/dist/src/policy/gates-schemas.js.map +1 -0
  173. package/dist/src/policy/index.d.ts +19 -0
  174. package/dist/src/policy/index.d.ts.map +1 -0
  175. package/dist/src/policy/index.js +21 -0
  176. package/dist/src/policy/index.js.map +1 -0
  177. package/dist/src/policy/package-manager-resolver.d.ts +79 -0
  178. package/dist/src/policy/package-manager-resolver.d.ts.map +1 -0
  179. package/dist/src/policy/package-manager-resolver.js +245 -0
  180. package/dist/src/policy/package-manager-resolver.js.map +1 -0
  181. package/dist/src/policy/resolve-policy.d.ts +337 -0
  182. package/dist/src/policy/resolve-policy.d.ts.map +1 -0
  183. package/dist/src/policy/resolve-policy.js +353 -0
  184. package/dist/src/policy/resolve-policy.js.map +1 -0
  185. package/dist/src/ports/config.ports.d.ts +83 -0
  186. package/dist/src/ports/config.ports.d.ts.map +1 -0
  187. package/dist/src/ports/config.ports.js +4 -0
  188. package/dist/src/ports/config.ports.js.map +1 -0
  189. package/dist/src/ports/dashboard-renderer.port.d.ts +113 -0
  190. package/dist/src/ports/dashboard-renderer.port.d.ts.map +1 -0
  191. package/dist/src/ports/dashboard-renderer.port.js +4 -0
  192. package/dist/src/ports/dashboard-renderer.port.js.map +1 -0
  193. package/dist/src/ports/index.d.ts +5 -0
  194. package/dist/src/ports/index.d.ts.map +1 -0
  195. package/dist/src/ports/index.js +10 -0
  196. package/dist/src/ports/index.js.map +1 -0
  197. package/dist/src/ports/sync-validator.ports.d.ts +52 -0
  198. package/dist/src/ports/sync-validator.ports.d.ts.map +1 -0
  199. package/dist/src/ports/sync-validator.ports.js +4 -0
  200. package/dist/src/ports/sync-validator.ports.js.map +1 -0
  201. package/dist/src/ports/wu-helpers.ports.d.ts +157 -0
  202. package/dist/src/ports/wu-helpers.ports.d.ts.map +1 -0
  203. package/dist/src/ports/wu-helpers.ports.js +4 -0
  204. package/dist/src/ports/wu-helpers.ports.js.map +1 -0
  205. package/dist/src/ports/wu-state.ports.d.ts +209 -0
  206. package/dist/src/ports/wu-state.ports.d.ts.map +1 -0
  207. package/dist/src/ports/wu-state.ports.js +4 -0
  208. package/dist/src/ports/wu-state.ports.js.map +1 -0
  209. package/dist/src/primitives/index.d.ts +2 -0
  210. package/dist/src/primitives/index.d.ts.map +1 -0
  211. package/dist/src/primitives/index.js +5 -0
  212. package/dist/src/primitives/index.js.map +1 -0
  213. package/dist/src/runtime/index.d.ts +2 -0
  214. package/dist/src/runtime/index.d.ts.map +1 -0
  215. package/dist/src/runtime/index.js +6 -0
  216. package/dist/src/runtime/index.js.map +1 -0
  217. package/dist/src/runtime/work-classifier.d.ts +103 -0
  218. package/dist/src/runtime/work-classifier.d.ts.map +1 -0
  219. package/dist/src/runtime/work-classifier.js +427 -0
  220. package/dist/src/runtime/work-classifier.js.map +1 -0
  221. package/dist/src/sandbox/index.d.ts +6 -0
  222. package/dist/src/sandbox/index.d.ts.map +1 -0
  223. package/dist/src/sandbox/index.js +10 -0
  224. package/dist/src/sandbox/index.js.map +1 -0
  225. package/dist/src/sandbox/sandbox-allowlist.d.ts +16 -0
  226. package/dist/src/sandbox/sandbox-allowlist.d.ts.map +1 -0
  227. package/dist/src/sandbox/sandbox-allowlist.js +77 -0
  228. package/dist/src/sandbox/sandbox-allowlist.js.map +1 -0
  229. package/dist/src/sandbox/sandbox-backend-linux.d.ts +6 -0
  230. package/dist/src/sandbox/sandbox-backend-linux.d.ts.map +1 -0
  231. package/dist/src/sandbox/sandbox-backend-linux.js +67 -0
  232. package/dist/src/sandbox/sandbox-backend-linux.js.map +1 -0
  233. package/dist/src/sandbox/sandbox-backend-macos.d.ts +6 -0
  234. package/dist/src/sandbox/sandbox-backend-macos.d.ts.map +1 -0
  235. package/dist/src/sandbox/sandbox-backend-macos.js +112 -0
  236. package/dist/src/sandbox/sandbox-backend-macos.js.map +1 -0
  237. package/dist/src/sandbox/sandbox-backend-windows.d.ts +6 -0
  238. package/dist/src/sandbox/sandbox-backend-windows.d.ts.map +1 -0
  239. package/dist/src/sandbox/sandbox-backend-windows.js +30 -0
  240. package/dist/src/sandbox/sandbox-backend-windows.js.map +1 -0
  241. package/dist/src/sandbox/sandbox-profile.d.ts +58 -0
  242. package/dist/src/sandbox/sandbox-profile.d.ts.map +1 -0
  243. package/dist/src/sandbox/sandbox-profile.js +69 -0
  244. package/dist/src/sandbox/sandbox-profile.js.map +1 -0
  245. package/dist/src/schemas/index.d.ts +2 -0
  246. package/dist/src/schemas/index.d.ts.map +1 -0
  247. package/dist/src/schemas/index.js +5 -0
  248. package/dist/src/schemas/index.js.map +1 -0
  249. package/dist/src/state/date-utils.d.ts +66 -0
  250. package/dist/src/state/date-utils.d.ts.map +1 -0
  251. package/dist/src/state/date-utils.js +143 -0
  252. package/dist/src/state/date-utils.js.map +1 -0
  253. package/dist/src/state/index.d.ts +8 -0
  254. package/dist/src/state/index.d.ts.map +1 -0
  255. package/dist/src/state/index.js +15 -0
  256. package/dist/src/state/index.js.map +1 -0
  257. package/dist/src/state/state-machine.d.ts +14 -0
  258. package/dist/src/state/state-machine.d.ts.map +1 -0
  259. package/dist/src/state/state-machine.js +92 -0
  260. package/dist/src/state/state-machine.js.map +1 -0
  261. package/dist/src/state/wu-doc-types.d.ts +48 -0
  262. package/dist/src/state/wu-doc-types.d.ts.map +1 -0
  263. package/dist/src/state/wu-doc-types.js +4 -0
  264. package/dist/src/state/wu-doc-types.js.map +1 -0
  265. package/dist/src/state/wu-paths.d.ts +275 -0
  266. package/dist/src/state/wu-paths.d.ts.map +1 -0
  267. package/dist/src/state/wu-paths.js +335 -0
  268. package/dist/src/state/wu-paths.js.map +1 -0
  269. package/dist/src/state/wu-schema.d.ts +831 -0
  270. package/dist/src/state/wu-schema.d.ts.map +1 -0
  271. package/dist/src/state/wu-schema.js +934 -0
  272. package/dist/src/state/wu-schema.js.map +1 -0
  273. package/dist/src/state/wu-state-schema.d.ts +292 -0
  274. package/dist/src/state/wu-state-schema.d.ts.map +1 -0
  275. package/dist/src/state/wu-state-schema.js +215 -0
  276. package/dist/src/state/wu-state-schema.js.map +1 -0
  277. package/dist/src/state/wu-yaml.d.ts +113 -0
  278. package/dist/src/state/wu-yaml.d.ts.map +1 -0
  279. package/dist/src/state/wu-yaml.js +307 -0
  280. package/dist/src/state/wu-yaml.js.map +1 -0
  281. package/dist/tool-impl/wu-lifecycle-tools.d.ts +11 -0
  282. package/dist/tool-impl/wu-lifecycle-tools.d.ts.map +1 -1
  283. package/dist/tool-impl/wu-lifecycle-tools.js +17 -0
  284. package/dist/tool-impl/wu-lifecycle-tools.js.map +1 -1
  285. package/manifest.yaml +210 -230
  286. package/package.json +88 -3
@@ -0,0 +1,193 @@
1
+ // Copyright (c) 2026 Hellmai Ltd
2
+ // SPDX-License-Identifier: AGPL-3.0-only
3
+ /**
4
+ * Gates Configuration Facade
5
+ *
6
+ * WU-1067: Config-driven gates execution
7
+ * WU-2037: Decomposed into focused sub-modules
8
+ *
9
+ * This module is the public entry point for gates configuration.
10
+ * It re-exports from the extracted sub-modules and retains the
11
+ * config-loading, parsing, and lane-health functions that depend
12
+ * on the shared infrastructure.
13
+ *
14
+ * Sub-modules:
15
+ * - gates-schemas.ts Zod schemas, types, interfaces
16
+ * - gates-presets.ts Preset definitions and expansion
17
+ * - gates-coverage.ts Coverage and test policy resolution
18
+ * - package-manager-resolver.ts PM, TR, build, commands, ignore
19
+ * - gates-config-internal.ts Shared helpers and constants
20
+ *
21
+ * @module gates-config
22
+ */
23
+ import { isString } from '../constants/object-guards.js';
24
+ import { WORKSPACE_CONFIG_FILE_NAME, WORKSPACE_V2_KEYS } from '../constants/config-contract.js';
25
+ import { GatesExecutionConfigSchema, LaneHealthModeSchema, DEFAULT_LANE_HEALTH_MODE, } from './gates-schemas.js';
26
+ import { expandPreset } from './gates-presets.js';
27
+ import { GATES_RUNTIME_DEFAULTS, GATES_FIELDS, getGatesSection } from './gates-config-internal.js';
28
+ export { GateCommandConfigSchema, GatesExecutionConfigSchema, LaneHealthModeSchema, DEFAULT_LANE_HEALTH_MODE, } from './gates-schemas.js';
29
+ // Re-export presets
30
+ // WU-2547: PRESET_FIX_COMMANDS and getFormatFixCommand added for preset-aware
31
+ // onboarding template rendering in @lumenflow/cli/src/init.ts.
32
+ export { GATE_PRESETS, expandPreset, PRESET_FIX_COMMANDS, getFormatFixCommand, } from './gates-presets.js';
33
+ // Re-export coverage/test policy resolution
34
+ export { resolveCoverageConfig, resolveTestPolicy, resolveTddDiffEvidencePolicy, resolveTddOrderingPolicy, } from './gates-coverage.js';
35
+ // Re-export package manager / test runner resolution
36
+ export { resolvePackageManager, resolveTestRunner, resolveBuildCommand, resolveGatesCommands, getIgnorePatterns, resolveGatePreset, resolveScopedUnitTestExecutionPlan, formatScopedUnitTestFallbackMessage, } from './package-manager-resolver.js';
37
+ // Re-export shared infrastructure (consumed by child modules and external callers)
38
+ export { GATES_RUNTIME_DEFAULTS, SOFTWARE_DELIVERY_FIELDS, GATES_FIELDS, GATES_COMMAND_FIELDS, loadSoftwareDeliveryConfig, getGatesSection, } from './gates-config-internal.js';
39
+ // ---------------------------------------------------------------------------
40
+ // Config loading / gate parsing / lane health (facade-owned)
41
+ // ---------------------------------------------------------------------------
42
+ const SOFTWARE_DELIVERY_KEY = WORKSPACE_V2_KEYS.SOFTWARE_DELIVERY;
43
+ /**
44
+ * Parse a gate command configuration into executable form
45
+ *
46
+ * @param config - Gate command configuration (string or object)
47
+ * @returns Parsed command with defaults applied, or null if undefined
48
+ */
49
+ export function parseGateCommand(config) {
50
+ if (config === undefined) {
51
+ return null;
52
+ }
53
+ if (isString(config)) {
54
+ return {
55
+ command: config,
56
+ continueOnError: false,
57
+ timeout: GATES_RUNTIME_DEFAULTS.COMMAND_TIMEOUT_MS,
58
+ };
59
+ }
60
+ return {
61
+ command: config.command,
62
+ continueOnError: config.continueOnError ?? false,
63
+ timeout: config.timeout ?? GATES_RUNTIME_DEFAULTS.COMMAND_TIMEOUT_MS,
64
+ };
65
+ }
66
+ /**
67
+ * Load gates configuration from workspace.yaml software_delivery.gates.execution
68
+ *
69
+ * @param projectRoot - Project root directory
70
+ * @returns Gates execution config, or null if not configured
71
+ */
72
+ export function loadGatesConfig(projectRoot) {
73
+ const gates = getGatesSection(projectRoot);
74
+ if (!gates) {
75
+ return null;
76
+ }
77
+ try {
78
+ // Check if gates.execution section exists
79
+ const executionConfig = gates[GATES_FIELDS.EXECUTION];
80
+ if (!executionConfig) {
81
+ return null;
82
+ }
83
+ // Validate the config
84
+ const result = GatesExecutionConfigSchema.safeParse(executionConfig);
85
+ if (!result.success) {
86
+ console.warn('Warning: Invalid gates.execution config:', result.error.message);
87
+ return null;
88
+ }
89
+ // Expand preset and merge with explicit config (explicit wins)
90
+ const presetDefaults = expandPreset(result.data.preset);
91
+ const merged = {
92
+ ...presetDefaults,
93
+ ...result.data,
94
+ };
95
+ return merged;
96
+ }
97
+ catch (error) {
98
+ console.warn(`Warning: Failed to parse ${WORKSPACE_CONFIG_FILE_NAME} ${SOFTWARE_DELIVERY_KEY}.gates.execution:`, error instanceof Error ? error.message : String(error));
99
+ return null;
100
+ }
101
+ }
102
+ /**
103
+ * Get default gates configuration for auto-detection fallback
104
+ *
105
+ * Used when no gates config is present in workspace.yaml software_delivery.
106
+ * These are generic commands that work across common setups.
107
+ *
108
+ * @returns Default gates configuration
109
+ */
110
+ export function getDefaultGatesConfig() {
111
+ return {
112
+ format: 'npm run format:check 2>/dev/null || npx prettier --check . 2>/dev/null || echo "No formatter configured"',
113
+ lint: 'npm run lint 2>/dev/null || npx eslint . 2>/dev/null || echo "No linter configured"',
114
+ typecheck: 'npm run typecheck 2>/dev/null || npx tsc --noEmit 2>/dev/null || echo "No type checker configured"',
115
+ test: 'npm test 2>/dev/null || echo "No test command configured"',
116
+ };
117
+ }
118
+ /**
119
+ * Resolve the effective gates configuration
120
+ *
121
+ * Priority order:
122
+ * 1. Explicit config from workspace.yaml software_delivery
123
+ * 2. Preset defaults (if preset specified)
124
+ * 3. Auto-detection defaults
125
+ *
126
+ * @param projectRoot - Project root directory
127
+ * @returns Resolved gates configuration
128
+ */
129
+ export function resolveGatesConfig(projectRoot) {
130
+ const config = loadGatesConfig(projectRoot);
131
+ if (config) {
132
+ return config;
133
+ }
134
+ // Fall back to defaults for auto-detection
135
+ return getDefaultGatesConfig();
136
+ }
137
+ /**
138
+ * Check if a specific gate should be skipped
139
+ *
140
+ * @param gateName - Name of the gate (format, lint, typecheck, test)
141
+ * @param config - Gates execution configuration
142
+ * @param skipFlags - Map of skip flags from CLI/Action inputs
143
+ * @returns True if the gate should be skipped
144
+ */
145
+ export function shouldSkipGate(gateName, config, skipFlags) {
146
+ // Check if skip flag is set
147
+ const skipFlagName = `skip-${gateName}`;
148
+ if (skipFlags[skipFlagName] || skipFlags[gateName]) {
149
+ return true;
150
+ }
151
+ // Check if gate is configured (undefined means skip)
152
+ if (config[gateName] === undefined) {
153
+ return true;
154
+ }
155
+ return false;
156
+ }
157
+ /**
158
+ * WU-1191: Load lane health configuration from workspace.yaml software_delivery
159
+ *
160
+ * Configuration format:
161
+ * ```yaml
162
+ * gates:
163
+ * lane_health: warn|error|off
164
+ * ```
165
+ *
166
+ * @param projectRoot - Project root directory
167
+ * @returns Lane health mode ('warn', 'error', or 'off'), defaults to 'warn'
168
+ */
169
+ export function loadLaneHealthConfig(projectRoot) {
170
+ const gates = getGatesSection(projectRoot);
171
+ if (!gates) {
172
+ return DEFAULT_LANE_HEALTH_MODE;
173
+ }
174
+ try {
175
+ // Check if gates.lane_health is configured
176
+ const laneHealthConfig = gates[GATES_FIELDS.LANE_HEALTH] ?? gates[GATES_FIELDS.LANE_HEALTH_CAMEL];
177
+ if (laneHealthConfig === undefined) {
178
+ return DEFAULT_LANE_HEALTH_MODE;
179
+ }
180
+ // Validate the config value
181
+ const result = LaneHealthModeSchema.safeParse(laneHealthConfig);
182
+ if (!result.success) {
183
+ console.warn(`Warning: Invalid gates.lane_health value '${laneHealthConfig}', expected 'warn', 'error', or 'off'. Using default 'warn'.`);
184
+ return DEFAULT_LANE_HEALTH_MODE;
185
+ }
186
+ return result.data;
187
+ }
188
+ catch (error) {
189
+ console.warn(`Warning: Failed to parse ${WORKSPACE_CONFIG_FILE_NAME} ${SOFTWARE_DELIVERY_KEY}.gates.lane_health:`, error instanceof Error ? error.message : String(error));
190
+ return DEFAULT_LANE_HEALTH_MODE;
191
+ }
192
+ }
193
+ //# sourceMappingURL=gates-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gates-config.js","sourceRoot":"","sources":["../../../src/policy/gates-config.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAChG,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAO5B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAqBnG,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAE5B,oBAAoB;AACpB,8EAA8E;AAC9E,+DAA+D;AAC/D,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,4CAA4C;AAC5C,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAE7B,qDAAqD;AACrD,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,kCAAkC,EAClC,mCAAmC,GACpC,MAAM,+BAA+B,CAAC;AAEvC,mFAAmF;AACnF,OAAO,EACL,sBAAsB,E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MAAM,CAAC,QAAQ,CAAC,KAAK,SAAS,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,oBAAoB,CAAC,WAAmB;IACtD,MAAM,KAAK,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;IAC3C,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,wBAAwB,CAAC;IAClC,CAAC;IAED,IAAI,CAAC;QACH,2CAA2C;QAC3C,MAAM,gBAAgB,GACpB,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;QAC3E,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;YACnC,OAAO,wBAAwB,CAAC;QAClC,CAAC;QAED,4BAA4B;QAC5B,MAAM,MAAM,GAAG,oBAAoB,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;QAChE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO,CAAC,IAAI,CACV,6CAA6C,gBAAgB,8DAA8D,CAC5H,CAAC;YACF,OAAO,wBAAwB,CAAC;QAClC,CAAC;QAED,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CACV,4BAA4B,0BAA0B,IAAI,qBAAqB,qBAAqB,EACpG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACvD,CAAC;QACF,OAAO,wBAAwB,CAAC;IAClC,CAAC;AACH,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { type TddDiffEvidencePolicy, type TddOrderingPolicy } from './resolve-policy.js';
2
+ import type { CoverageConfig, TestPolicy } from './gates-schemas.js';
3
+ /**
4
+ * WU-1262: Resolve coverage configuration from methodology policy
5
+ *
6
+ * Uses resolvePolicy() to determine coverage defaults based on methodology.testing:
7
+ * - tdd: 90% threshold, block mode
8
+ * - test-after: 70% threshold, warn mode
9
+ * - none: 0% threshold, off mode
10
+ *
11
+ * Precedence (highest to lowest):
12
+ * 1. Explicit gates.minCoverage / gates.enableCoverage
13
+ * 2. methodology.overrides.coverage_threshold / coverage_mode
14
+ * 3. methodology.testing template defaults
15
+ *
16
+ * @param projectRoot - Project root directory
17
+ * @returns Resolved coverage configuration
18
+ */
19
+ export declare function resolveCoverageConfig(projectRoot: string): CoverageConfig;
20
+ /**
21
+ * WU-1280: Resolve test policy from methodology configuration
22
+ *
23
+ * Returns the full test policy including coverage config AND tests_required.
24
+ * This is used by gates to determine whether test failures should block or warn.
25
+ *
26
+ * Methodology mapping:
27
+ * - tdd: 90% threshold, block mode, tests_required=true
28
+ * - test-after: 70% threshold, warn mode, tests_required=true
29
+ * - none: 0% threshold, off mode, tests_required=false
30
+ *
31
+ * When tests_required=false:
32
+ * - Test failures produce WARNINGS instead of FAILURES
33
+ * - Gates continue but log the test failures
34
+ * - Coverage gate is effectively skipped (mode='off')
35
+ *
36
+ * @param projectRoot - Project root directory
37
+ * @returns Resolved test policy including tests_required
38
+ */
39
+ export declare function resolveTestPolicy(projectRoot: string): TestPolicy;
40
+ export declare function resolveTddDiffEvidencePolicy(projectRoot: string): TddDiffEvidencePolicy;
41
+ /**
42
+ * WU-2650: Resolve the commit-order (RED-first) policy.
43
+ *
44
+ * Mirrors resolveTddDiffEvidencePolicy. Enforces only for feature/bug WUs
45
+ * under TDD methodology by default; docs/chore/process/tooling WUs bypass.
46
+ */
47
+ export declare function resolveTddOrderingPolicy(projectRoot: string): TddOrderingPolicy;
48
+ //# sourceMappingURL=gates-coverage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gates-coverage.d.ts","sourceRoot":"","sources":["../../../src/policy/gates-coverage.ts"],"names":[],"mappings":"AAeA,OAAO,EAOL,KAAK,qBAAqB,EAE1B,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAuHrE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc,CAkBzE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,UAAU,CAoBjE;AAED,wBAAgB,4BAA4B,CAAC,WAAW,EAAE,MAAM,GAAG,qBAAqB,CAQvF;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,iBAAiB,CAQ/E"}
@@ -0,0 +1,182 @@
1
+ // Copyright (c) 2026 Hellmai Ltd
2
+ // SPDX-License-Identifier: AGPL-3.0-only
3
+ /**
4
+ * Gates Coverage Policy Resolution
5
+ *
6
+ * WU-2037: Extracted from gates-config.ts
7
+ *
8
+ * Resolves coverage configuration and test policy from methodology settings.
9
+ * Uses resolvePolicy() to derive thresholds and modes from workspace.yaml.
10
+ *
11
+ * @module gates-coverage
12
+ */
13
+ import { asRecord, isBoolean, isNumber } from '../constants/object-guards.js';
14
+ import { resolvePolicy, getDefaultPolicy, MethodologyConfigSchema, TddDiffEvidenceConfigSchema, TddOrderingConfigSchema, } from './resolve-policy.js';
15
+ import { GATES_RUNTIME_DEFAULTS, SOFTWARE_DELIVERY_FIELDS, GATES_FIELDS, loadSoftwareDeliveryConfig, } from './gates-config-internal.js';
16
+ // ---------------------------------------------------------------------------
17
+ // Private helpers for reading typed fields from raw config
18
+ // ---------------------------------------------------------------------------
19
+ function readNumberField(source, primaryKey, secondaryKey) {
20
+ const primary = source?.[primaryKey];
21
+ if (isNumber(primary)) {
22
+ return primary;
23
+ }
24
+ const secondary = source?.[secondaryKey];
25
+ return isNumber(secondary) ? secondary : undefined;
26
+ }
27
+ function readBooleanField(source, primaryKey, secondaryKey) {
28
+ const primary = source?.[primaryKey];
29
+ if (isBoolean(primary)) {
30
+ return primary;
31
+ }
32
+ const secondary = source?.[secondaryKey];
33
+ return isBoolean(secondary) ? secondary : undefined;
34
+ }
35
+ function readGateMinCoverage(gatesRaw) {
36
+ return readNumberField(gatesRaw, GATES_FIELDS.MIN_COVERAGE, GATES_FIELDS.MIN_COVERAGE_SNAKE);
37
+ }
38
+ function readGateEnableCoverage(gatesRaw) {
39
+ return readBooleanField(gatesRaw, GATES_FIELDS.ENABLE_COVERAGE, GATES_FIELDS.ENABLE_COVERAGE_SNAKE);
40
+ }
41
+ function readTddDiffEvidenceConfig(gatesRaw) {
42
+ const raw = asRecord(gatesRaw?.[GATES_FIELDS.TDD_DIFF_EVIDENCE]) ?? undefined;
43
+ return TddDiffEvidenceConfigSchema.optional().parse(raw);
44
+ }
45
+ function readTddOrderingConfig(gatesRaw) {
46
+ const raw = asRecord(gatesRaw?.[GATES_FIELDS.TDD_ORDERING]) ?? undefined;
47
+ return TddOrderingConfigSchema.optional().parse(raw);
48
+ }
49
+ // ---------------------------------------------------------------------------
50
+ // Shared policy resolution helper (DRY: used by both public functions)
51
+ // ---------------------------------------------------------------------------
52
+ function resolvePolicyFromConfig(rawConfig) {
53
+ const methodologyRaw = asRecord(rawConfig[SOFTWARE_DELIVERY_FIELDS.METHODOLOGY]) ?? undefined;
54
+ const gatesRaw = asRecord(rawConfig[SOFTWARE_DELIVERY_FIELDS.GATES]) ?? undefined;
55
+ const minCoverage = readGateMinCoverage(gatesRaw);
56
+ const enableCoverage = readGateEnableCoverage(gatesRaw);
57
+ const tddDiffEvidence = readTddDiffEvidenceConfig(gatesRaw);
58
+ const tddOrdering = readTddOrderingConfig(gatesRaw);
59
+ // Parse methodology with Zod to get defaults
60
+ const methodology = MethodologyConfigSchema.parse(methodologyRaw ?? {});
61
+ // Build the config structure that resolvePolicy expects
62
+ const minimalConfig = {
63
+ methodology: methodologyRaw, // Pass raw methodology for explicit detection
64
+ gates: {
65
+ minCoverage,
66
+ enableCoverage,
67
+ tdd_diff_evidence: tddDiffEvidence,
68
+ tdd_ordering: tddOrdering,
69
+ },
70
+ };
71
+ // Resolve policy using the methodology configuration
72
+ // Pass rawConfig to detect explicit gates.* settings vs Zod defaults
73
+ return resolvePolicy({
74
+ methodology,
75
+ gates: {
76
+ // Default gates values from schema
77
+ maxEslintWarnings: GATES_RUNTIME_DEFAULTS.MAX_ESLINT_WARNINGS,
78
+ enableCoverage: enableCoverage ?? GATES_RUNTIME_DEFAULTS.DEFAULT_ENABLE_COVERAGE,
79
+ minCoverage: minCoverage ?? GATES_RUNTIME_DEFAULTS.DEFAULT_MIN_COVERAGE,
80
+ enableSafetyCriticalTests: true,
81
+ enableInvariants: true,
82
+ tdd_diff_evidence: tddDiffEvidence,
83
+ tdd_ordering: tddOrdering,
84
+ },
85
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- Minimal type for config
86
+ }, {
87
+ rawConfig: minimalConfig,
88
+ });
89
+ }
90
+ // ---------------------------------------------------------------------------
91
+ // Public API
92
+ // ---------------------------------------------------------------------------
93
+ /**
94
+ * WU-1262: Resolve coverage configuration from methodology policy
95
+ *
96
+ * Uses resolvePolicy() to determine coverage defaults based on methodology.testing:
97
+ * - tdd: 90% threshold, block mode
98
+ * - test-after: 70% threshold, warn mode
99
+ * - none: 0% threshold, off mode
100
+ *
101
+ * Precedence (highest to lowest):
102
+ * 1. Explicit gates.minCoverage / gates.enableCoverage
103
+ * 2. methodology.overrides.coverage_threshold / coverage_mode
104
+ * 3. methodology.testing template defaults
105
+ *
106
+ * @param projectRoot - Project root directory
107
+ * @returns Resolved coverage configuration
108
+ */
109
+ export function resolveCoverageConfig(projectRoot) {
110
+ const rawConfig = loadSoftwareDeliveryConfig(projectRoot) ?? {};
111
+ // If no config file, use default policy
112
+ if (Object.keys(rawConfig).length === 0) {
113
+ const defaultPolicy = getDefaultPolicy();
114
+ return {
115
+ threshold: defaultPolicy.coverage_threshold,
116
+ mode: defaultPolicy.coverage_mode,
117
+ };
118
+ }
119
+ const policy = resolvePolicyFromConfig(rawConfig);
120
+ return {
121
+ threshold: policy.coverage_threshold,
122
+ mode: policy.coverage_mode,
123
+ };
124
+ }
125
+ /**
126
+ * WU-1280: Resolve test policy from methodology configuration
127
+ *
128
+ * Returns the full test policy including coverage config AND tests_required.
129
+ * This is used by gates to determine whether test failures should block or warn.
130
+ *
131
+ * Methodology mapping:
132
+ * - tdd: 90% threshold, block mode, tests_required=true
133
+ * - test-after: 70% threshold, warn mode, tests_required=true
134
+ * - none: 0% threshold, off mode, tests_required=false
135
+ *
136
+ * When tests_required=false:
137
+ * - Test failures produce WARNINGS instead of FAILURES
138
+ * - Gates continue but log the test failures
139
+ * - Coverage gate is effectively skipped (mode='off')
140
+ *
141
+ * @param projectRoot - Project root directory
142
+ * @returns Resolved test policy including tests_required
143
+ */
144
+ export function resolveTestPolicy(projectRoot) {
145
+ const rawConfig = loadSoftwareDeliveryConfig(projectRoot) ?? {};
146
+ // If no config file, use default policy (TDD)
147
+ if (Object.keys(rawConfig).length === 0) {
148
+ const defaultPolicy = getDefaultPolicy();
149
+ return {
150
+ threshold: defaultPolicy.coverage_threshold,
151
+ mode: defaultPolicy.coverage_mode,
152
+ tests_required: defaultPolicy.tests_required,
153
+ };
154
+ }
155
+ const policy = resolvePolicyFromConfig(rawConfig);
156
+ return {
157
+ threshold: policy.coverage_threshold,
158
+ mode: policy.coverage_mode,
159
+ tests_required: policy.tests_required,
160
+ };
161
+ }
162
+ export function resolveTddDiffEvidencePolicy(projectRoot) {
163
+ const rawConfig = loadSoftwareDeliveryConfig(projectRoot) ?? {};
164
+ if (Object.keys(rawConfig).length === 0) {
165
+ return getDefaultPolicy().tdd_diff_evidence;
166
+ }
167
+ return resolvePolicyFromConfig(rawConfig).tdd_diff_evidence;
168
+ }
169
+ /**
170
+ * WU-2650: Resolve the commit-order (RED-first) policy.
171
+ *
172
+ * Mirrors resolveTddDiffEvidencePolicy. Enforces only for feature/bug WUs
173
+ * under TDD methodology by default; docs/chore/process/tooling WUs bypass.
174
+ */
175
+ export function resolveTddOrderingPolicy(projectRoot) {
176
+ const rawConfig = loadSoftwareDeliveryConfig(projectRoot) ?? {};
177
+ if (Object.keys(rawConfig).length === 0) {
178
+ return getDefaultPolicy().tdd_ordering;
179
+ }
180
+ return resolvePolicyFromConfig(rawConfig).tdd_ordering;
181
+ }
182
+ //# sourceMappingURL=gates-coverage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gates-coverage.js","sourceRoot":"","sources":["../../../src/policy/gates-coverage.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,yCAAyC;AAEzC;;;;;;;;;GASG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EACvB,2BAA2B,EAC3B,uBAAuB,GAKxB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,YAAY,EACZ,0BAA0B,GAC3B,MAAM,4BAA4B,CAAC;AAEpC,8EAA8E;AAC9E,2DAA2D;AAC3D,8EAA8E;AAE9E,SAAS,eAAe,CACtB,MAA2C,EAC3C,UAAkB,EAClB,YAAoB;IAEpB,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,UAAU,CAAC,CAAC;IACrC,IAAI,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACtB,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC,YAAY,CAAC,CAAC;IACzC,OAAO,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;AACrD,CAAC;AAED,SAAS,gBAAgB,CACvB,MAA2C,EAC3C,UAAkB,EAClB,YAAoB;IAEpB,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC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AAiB,CAAC;IAC9C,CAAC;IAED,OAAO,uBAAuB,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC;AAC9D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,WAAmB;IAC1D,MAAM,SAAS,GAAG,0BAA0B,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;IAEhE,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxC,OAAO,gBAAgB,EAAE,CAAC,YAAY,CAAC;IACzC,CAAC;IAED,OAAO,uBAAuB,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC;AACzD,CAAC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Gates Presets
3
+ *
4
+ * WU-2037: Extracted from gates-config.ts
5
+ *
6
+ * Language ecosystem preset definitions and expansion logic.
7
+ *
8
+ * @module gates-presets
9
+ */
10
+ import type { GatesExecutionConfig } from './gates-schemas.js';
11
+ /**
12
+ * Gate preset definitions
13
+ *
14
+ * These provide sensible defaults for common language ecosystems.
15
+ * Users can override fields via workspace.yaml software_delivery
16
+ */
17
+ export declare const GATE_PRESETS: Record<string, Partial<GatesExecutionConfig>>;
18
+ /**
19
+ * Expand a preset name into its default gate commands
20
+ *
21
+ * @param preset - Preset name (node, python, go, rust, dotnet) or undefined
22
+ * @returns Partial gates config with preset defaults, or empty object if unknown
23
+ */
24
+ export declare function expandPreset(preset: string | undefined): Partial<GatesExecutionConfig>;
25
+ /**
26
+ * WU-2547: Preset-specific format-fix remediation commands.
27
+ *
28
+ * The `format` key in GATE_PRESETS above is the *verification* command used
29
+ * by gates (e.g. `dotnet format --verify-no-changes`). When an agent or
30
+ * user needs to actually fix a formatting failure they need the mutating
31
+ * equivalent of that command — `dotnet format`, `cargo fmt`, etc.
32
+ *
33
+ * Onboarding templates used to hardcode `pnpm prettier --write <file>`,
34
+ * which silently teaches agents the wrong habit in non-JS repos. init.ts
35
+ * now resolves this map against the chosen preset and substitutes the
36
+ * result into the `{{format_fix_command}}` placeholder.
37
+ */
38
+ export declare const PRESET_FIX_COMMANDS: Record<string, string>;
39
+ /**
40
+ * WU-2547: Resolve the format-fix remediation command for a preset.
41
+ *
42
+ * Used by init.ts to populate the `{{format_fix_command}}` token in
43
+ * onboarding templates so a .NET repo gets `dotnet format` guidance
44
+ * instead of `pnpm prettier --write`.
45
+ *
46
+ * @param preset - Gate preset name (node, dotnet, python, etc.)
47
+ * @returns The remediation command for the preset, or the node default
48
+ * if the preset is unknown (never returns empty).
49
+ */
50
+ export declare function getFormatFixCommand(preset: string): string;
51
+ //# sourceMappingURL=gates-presets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gates-presets.d.ts","sourceRoot":"","sources":["../../../src/policy/gates-presets.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAoDtE,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAMtF;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAStD,CAAC;AASF;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE1D"}
@@ -0,0 +1,117 @@
1
+ // Copyright (c) 2026 Hellmai Ltd
2
+ // SPDX-License-Identifier: AGPL-3.0-only
3
+ /**
4
+ * Gate preset definitions
5
+ *
6
+ * These provide sensible defaults for common language ecosystems.
7
+ * Users can override fields via workspace.yaml software_delivery
8
+ */
9
+ export const GATE_PRESETS = {
10
+ node: {
11
+ setup: 'npm ci || npm install',
12
+ format: 'npx prettier --check .',
13
+ lint: 'npx eslint .',
14
+ typecheck: 'npx tsc --noEmit',
15
+ test: 'npm test',
16
+ },
17
+ python: {
18
+ setup: 'pip install -e ".[dev]" || pip install -r requirements.txt',
19
+ format: 'ruff format --check .',
20
+ lint: 'ruff check .',
21
+ typecheck: 'mypy .',
22
+ test: 'pytest',
23
+ },
24
+ go: {
25
+ format: 'gofmt -l . | grep -v "^$" && exit 1 || exit 0',
26
+ lint: 'golangci-lint run',
27
+ typecheck: 'go vet ./...',
28
+ test: 'go test ./...',
29
+ },
30
+ rust: {
31
+ format: 'cargo fmt --check',
32
+ lint: 'cargo clippy -- -D warnings',
33
+ typecheck: 'cargo check',
34
+ test: 'cargo test',
35
+ },
36
+ dotnet: {
37
+ setup: 'dotnet restore',
38
+ format: 'dotnet format --verify-no-changes',
39
+ lint: 'dotnet build --no-restore -warnaserror',
40
+ test: 'dotnet test --no-restore',
41
+ },
42
+ // WU-1118: Java/JVM, Ruby, and PHP presets
43
+ java: {
44
+ format: 'mvn spotless:check || ./gradlew spotlessCheck',
45
+ lint: 'mvn checkstyle:check || ./gradlew checkstyleMain',
46
+ typecheck: 'mvn compile -DskipTests || ./gradlew compileJava',
47
+ test: 'mvn test || ./gradlew test',
48
+ },
49
+ ruby: {
50
+ setup: 'bundle install',
51
+ format: 'bundle exec rubocop --format simple --fail-level W',
52
+ lint: 'bundle exec rubocop',
53
+ test: 'bundle exec rspec',
54
+ },
55
+ php: {
56
+ setup: 'composer install',
57
+ format: 'vendor/bin/php-cs-fixer fix --dry-run --diff',
58
+ lint: 'vendor/bin/phpstan analyse',
59
+ test: 'vendor/bin/phpunit',
60
+ },
61
+ };
62
+ /**
63
+ * Expand a preset name into its default gate commands
64
+ *
65
+ * @param preset - Preset name (node, python, go, rust, dotnet) or undefined
66
+ * @returns Partial gates config with preset defaults, or empty object if unknown
67
+ */
68
+ export function expandPreset(preset) {
69
+ if (!preset) {
70
+ return {};
71
+ }
72
+ return GATE_PRESETS[preset] ?? {};
73
+ }
74
+ /**
75
+ * WU-2547: Preset-specific format-fix remediation commands.
76
+ *
77
+ * The `format` key in GATE_PRESETS above is the *verification* command used
78
+ * by gates (e.g. `dotnet format --verify-no-changes`). When an agent or
79
+ * user needs to actually fix a formatting failure they need the mutating
80
+ * equivalent of that command — `dotnet format`, `cargo fmt`, etc.
81
+ *
82
+ * Onboarding templates used to hardcode `pnpm prettier --write <file>`,
83
+ * which silently teaches agents the wrong habit in non-JS repos. init.ts
84
+ * now resolves this map against the chosen preset and substitutes the
85
+ * result into the `{{format_fix_command}}` placeholder.
86
+ */
87
+ export const PRESET_FIX_COMMANDS = {
88
+ node: 'pnpm prettier --write <file>',
89
+ python: 'ruff format <file>',
90
+ go: 'gofmt -w <file>',
91
+ rust: 'cargo fmt',
92
+ dotnet: 'dotnet format',
93
+ java: 'mvn spotless:apply',
94
+ ruby: 'bundle exec rubocop -a <file>',
95
+ php: 'vendor/bin/php-cs-fixer fix <file>',
96
+ };
97
+ /**
98
+ * WU-2547: Safe fallback when a caller passes an unknown preset.
99
+ * Mirrors PRESET_FIX_COMMANDS.node so the two always match; kept as its own
100
+ * constant to satisfy noUncheckedIndexedAccess without a non-null assertion.
101
+ */
102
+ const DEFAULT_FORMAT_FIX_COMMAND = 'pnpm prettier --write <file>';
103
+ /**
104
+ * WU-2547: Resolve the format-fix remediation command for a preset.
105
+ *
106
+ * Used by init.ts to populate the `{{format_fix_command}}` token in
107
+ * onboarding templates so a .NET repo gets `dotnet format` guidance
108
+ * instead of `pnpm prettier --write`.
109
+ *
110
+ * @param preset - Gate preset name (node, dotnet, python, etc.)
111
+ * @returns The remediation command for the preset, or the node default
112
+ * if the preset is unknown (never returns empty).
113
+ */
114
+ export function getFormatFixCommand(preset) {
115
+ return PRESET_FIX_COMMANDS[preset] ?? DEFAULT_FORMAT_FIX_COMMAND;
116
+ }
117
+ //# sourceMappingURL=gates-presets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"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