@deftai/directive 0.126.2 → 0.128.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 (420) hide show
  1. package/bin/deft-hook +14 -0
  2. package/bin/deft-hook.cmd +14 -0
  3. package/dist/bin.js +4319 -3
  4. package/package.json +11 -21
  5. package/dist/agents-refresh.d.ts +0 -11
  6. package/dist/agents-refresh.js +0 -90
  7. package/dist/authz.d.ts +0 -7
  8. package/dist/authz.js +0 -732
  9. package/dist/bin.d.ts +0 -3
  10. package/dist/branch-fixtures.d.ts +0 -45
  11. package/dist/branch-fixtures.js +0 -156
  12. package/dist/cache.d.ts +0 -4
  13. package/dist/cache.js +0 -10
  14. package/dist/capacity-backfill.d.ts +0 -3
  15. package/dist/capacity-backfill.js +0 -9
  16. package/dist/capacity-show.d.ts +0 -3
  17. package/dist/capacity-show.js +0 -9
  18. package/dist/change-init.d.ts +0 -3
  19. package/dist/change-init.js +0 -59
  20. package/dist/changelog-check.d.ts +0 -3
  21. package/dist/changelog-check.js +0 -52
  22. package/dist/check.d.ts +0 -15
  23. package/dist/check.js +0 -150
  24. package/dist/cli-package-version.d.ts +0 -3
  25. package/dist/cli-package-version.js +0 -23
  26. package/dist/cli-router/index.d.ts +0 -8
  27. package/dist/cli-router/index.js +0 -44
  28. package/dist/cli-router/route-argv.d.ts +0 -40
  29. package/dist/cli-router/route-argv.js +0 -371
  30. package/dist/codebase-default-extractor.d.ts +0 -3
  31. package/dist/codebase-default-extractor.js +0 -9
  32. package/dist/codebase-map-fresh.d.ts +0 -3
  33. package/dist/codebase-map-fresh.js +0 -9
  34. package/dist/codebase-map.d.ts +0 -3
  35. package/dist/codebase-map.js +0 -9
  36. package/dist/codebase-projection-registry.d.ts +0 -3
  37. package/dist/codebase-projection-registry.js +0 -9
  38. package/dist/codebase-provider.d.ts +0 -3
  39. package/dist/codebase-provider.js +0 -9
  40. package/dist/commit-lint.d.ts +0 -3
  41. package/dist/commit-lint.js +0 -44
  42. package/dist/content-validate-cli/validate-links.d.ts +0 -11
  43. package/dist/content-validate-cli/validate-links.js +0 -37
  44. package/dist/content-validate-cli/validate-strategy-output.d.ts +0 -13
  45. package/dist/content-validate-cli/validate-strategy-output.js +0 -56
  46. package/dist/content-validate-cli/verify-capacity.d.ts +0 -12
  47. package/dist/content-validate-cli/verify-capacity.js +0 -54
  48. package/dist/coverage-hotspots.d.ts +0 -21
  49. package/dist/coverage-hotspots.js +0 -198
  50. package/dist/design-critique-spend-resolve.d.ts +0 -18
  51. package/dist/design-critique-spend-resolve.js +0 -191
  52. package/dist/directive-finish-loop.d.ts +0 -3
  53. package/dist/directive-finish-loop.js +0 -10
  54. package/dist/dispatch.d.ts +0 -193
  55. package/dist/dispatch.js +0 -3091
  56. package/dist/doctor.d.ts +0 -19
  57. package/dist/doctor.js +0 -155
  58. package/dist/entrypoint.d.ts +0 -6
  59. package/dist/entrypoint.js +0 -19
  60. package/dist/escalation-cli.d.ts +0 -4
  61. package/dist/escalation-cli.js +0 -301
  62. package/dist/eval-health.d.ts +0 -13
  63. package/dist/eval-health.js +0 -63
  64. package/dist/eval-report.d.ts +0 -15
  65. package/dist/eval-report.js +0 -97
  66. package/dist/eval-run.d.ts +0 -17
  67. package/dist/eval-run.js +0 -122
  68. package/dist/eval-triggers.d.ts +0 -12
  69. package/dist/eval-triggers.js +0 -56
  70. package/dist/framework-check-updates.d.ts +0 -10
  71. package/dist/framework-check-updates.js +0 -68
  72. package/dist/gates-cli/_helpers.d.ts +0 -24
  73. package/dist/gates-cli/_helpers.js +0 -115
  74. package/dist/gates-cli/verify-bridge-drift.d.ts +0 -11
  75. package/dist/gates-cli/verify-bridge-drift.js +0 -47
  76. package/dist/gates-cli/verify-go-freeze.d.ts +0 -11
  77. package/dist/gates-cli/verify-go-freeze.js +0 -48
  78. package/dist/hook-bin.d.ts +0 -3
  79. package/dist/hook-bin.js +0 -11
  80. package/dist/hook-dispatch.d.ts +0 -80
  81. package/dist/hook-dispatch.js +0 -186
  82. package/dist/human-presence-mint.d.ts +0 -70
  83. package/dist/human-presence-mint.js +0 -204
  84. package/dist/identity-banner.d.ts +0 -13
  85. package/dist/identity-banner.js +0 -19
  86. package/dist/index.d.ts +0 -11
  87. package/dist/index.js +0 -14
  88. package/dist/init-cli/constants.d.ts +0 -42
  89. package/dist/init-cli/constants.js +0 -42
  90. package/dist/init-cli/help.d.ts +0 -9
  91. package/dist/init-cli/help.js +0 -43
  92. package/dist/init-cli/init.d.ts +0 -26
  93. package/dist/init-cli/init.js +0 -80
  94. package/dist/init-cli/migrate.d.ts +0 -3
  95. package/dist/init-cli/migrate.js +0 -51
  96. package/dist/init-cli/resolve-binary.d.ts +0 -34
  97. package/dist/init-cli/resolve-binary.js +0 -78
  98. package/dist/init-cli/run-deft-install.d.ts +0 -23
  99. package/dist/init-cli/run-deft-install.js +0 -71
  100. package/dist/init-cli/update.d.ts +0 -5
  101. package/dist/init-cli/update.js +0 -38
  102. package/dist/install-cli/coverage-map.d.ts +0 -14
  103. package/dist/install-cli/coverage-map.js +0 -113
  104. package/dist/install-uninstall.d.ts +0 -3
  105. package/dist/install-uninstall.js +0 -44
  106. package/dist/install-upgrade.d.ts +0 -41
  107. package/dist/install-upgrade.js +0 -86
  108. package/dist/lifecycle-cli/coverage-map.d.ts +0 -16
  109. package/dist/lifecycle-cli/coverage-map.js +0 -254
  110. package/dist/lifecycle-cli/helpers.d.ts +0 -8
  111. package/dist/lifecycle-cli/helpers.js +0 -20
  112. package/dist/lifecycle-event.d.ts +0 -11
  113. package/dist/lifecycle-event.js +0 -45
  114. package/dist/lifecycle-stats.d.ts +0 -12
  115. package/dist/lifecycle-stats.js +0 -100
  116. package/dist/migrate-category-b.d.ts +0 -9
  117. package/dist/migrate-category-b.js +0 -52
  118. package/dist/migrate-preflight.d.ts +0 -10
  119. package/dist/migrate-preflight.js +0 -85
  120. package/dist/migrate-xbrief.d.ts +0 -11
  121. package/dist/migrate-xbrief.js +0 -88
  122. package/dist/occupancy-grant.d.ts +0 -18
  123. package/dist/occupancy-grant.js +0 -121
  124. package/dist/occupancy-heartbeat.d.ts +0 -8
  125. package/dist/occupancy-heartbeat.js +0 -63
  126. package/dist/occupancy-release.d.ts +0 -23
  127. package/dist/occupancy-release.js +0 -102
  128. package/dist/occupancy-steal.d.ts +0 -10
  129. package/dist/occupancy-steal.js +0 -83
  130. package/dist/occupancy-unrecognized.d.ts +0 -3
  131. package/dist/occupancy-unrecognized.js +0 -5
  132. package/dist/orchestration-cli/coverage-map.d.ts +0 -21
  133. package/dist/orchestration-cli/coverage-map.js +0 -225
  134. package/dist/orchestration-cli/helpers.d.ts +0 -11
  135. package/dist/orchestration-cli/helpers.js +0 -35
  136. package/dist/ownership-doctor.d.ts +0 -10
  137. package/dist/ownership-doctor.js +0 -96
  138. package/dist/ownership-fix.d.ts +0 -10
  139. package/dist/ownership-fix.js +0 -93
  140. package/dist/plan-sequence.d.ts +0 -14
  141. package/dist/plan-sequence.js +0 -258
  142. package/dist/policy-fixtures.d.ts +0 -33
  143. package/dist/policy-fixtures.js +0 -118
  144. package/dist/policy.d.ts +0 -37
  145. package/dist/policy.js +0 -744
  146. package/dist/pr-closing-keywords.d.ts +0 -3
  147. package/dist/pr-closing-keywords.js +0 -10
  148. package/dist/pr-finish-loop.d.ts +0 -3
  149. package/dist/pr-finish-loop.js +0 -10
  150. package/dist/pr-merge-readiness.d.ts +0 -3
  151. package/dist/pr-merge-readiness.js +0 -10
  152. package/dist/pr-monitor.d.ts +0 -3
  153. package/dist/pr-monitor.js +0 -10
  154. package/dist/pr-protected-issues.d.ts +0 -3
  155. package/dist/pr-protected-issues.js +0 -10
  156. package/dist/pr-wait-mergeable.d.ts +0 -3
  157. package/dist/pr-wait-mergeable.js +0 -10
  158. package/dist/pr-watch.d.ts +0 -3
  159. package/dist/pr-watch.js +0 -10
  160. package/dist/pre-pr-run.d.ts +0 -39
  161. package/dist/pre-pr-run.js +0 -514
  162. package/dist/preflight-cache.d.ts +0 -18
  163. package/dist/preflight-cache.js +0 -113
  164. package/dist/preflight-gh.d.ts +0 -15
  165. package/dist/preflight-gh.js +0 -143
  166. package/dist/probe-session.d.ts +0 -3
  167. package/dist/probe-session.js +0 -10
  168. package/dist/release-e2e-fixtures.d.ts +0 -29
  169. package/dist/release-e2e-fixtures.js +0 -38
  170. package/dist/release-e2e.d.ts +0 -3
  171. package/dist/release-e2e.js +0 -10
  172. package/dist/release-publish.d.ts +0 -3
  173. package/dist/release-publish.js +0 -10
  174. package/dist/release-rollback.d.ts +0 -3
  175. package/dist/release-rollback.js +0 -10
  176. package/dist/release-wait-npm.d.ts +0 -3
  177. package/dist/release-wait-npm.js +0 -10
  178. package/dist/release.d.ts +0 -3
  179. package/dist/release.js +0 -10
  180. package/dist/render-cli/deft-ts-runner.d.ts +0 -17
  181. package/dist/render-cli/deft-ts-runner.js +0 -19
  182. package/dist/render-cli/export-spec-cli.d.ts +0 -2
  183. package/dist/render-cli/export-spec-cli.js +0 -6
  184. package/dist/render-cli/prd-render-cli.d.ts +0 -2
  185. package/dist/render-cli/prd-render-cli.js +0 -37
  186. package/dist/render-cli/project-render-cli.d.ts +0 -2
  187. package/dist/render-cli/project-render-cli.js +0 -6
  188. package/dist/render-cli/rule-map-cli.d.ts +0 -2
  189. package/dist/render-cli/rule-map-cli.js +0 -5
  190. package/dist/render-cli/spec-reconstruct-cli.d.ts +0 -3
  191. package/dist/render-cli/spec-reconstruct-cli.js +0 -15
  192. package/dist/render-cli/spec-render-cli.d.ts +0 -2
  193. package/dist/render-cli/spec-render-cli.js +0 -39
  194. package/dist/render-cli/spec-validate-cli.d.ts +0 -2
  195. package/dist/render-cli/spec-validate-cli.js +0 -38
  196. package/dist/review-monitor-register.d.ts +0 -19
  197. package/dist/review-monitor-register.js +0 -183
  198. package/dist/review-monitor-release.d.ts +0 -14
  199. package/dist/review-monitor-release.js +0 -123
  200. package/dist/scm-sync-default.d.ts +0 -34
  201. package/dist/scm-sync-default.js +0 -210
  202. package/dist/scope-lifecycle.d.ts +0 -4
  203. package/dist/scope-lifecycle.js +0 -34
  204. package/dist/scope-record-approved-scope.d.ts +0 -29
  205. package/dist/scope-record-approved-scope.js +0 -319
  206. package/dist/scope-record-intent-constraint.d.ts +0 -16
  207. package/dist/scope-record-intent-constraint.js +0 -202
  208. package/dist/scope-record-observable-scope.d.ts +0 -16
  209. package/dist/scope-record-observable-scope.js +0 -204
  210. package/dist/session-ready.d.ts +0 -15
  211. package/dist/session-ready.js +0 -144
  212. package/dist/session-start.d.ts +0 -56
  213. package/dist/session-start.js +0 -581
  214. package/dist/slice.d.ts +0 -4
  215. package/dist/slice.js +0 -34
  216. package/dist/story-ready-fixtures.d.ts +0 -47
  217. package/dist/story-ready-fixtures.js +0 -137
  218. package/dist/subagent-monitor.d.ts +0 -3
  219. package/dist/subagent-monitor.js +0 -10
  220. package/dist/subagent-pre-cancel.d.ts +0 -21
  221. package/dist/subagent-pre-cancel.js +0 -240
  222. package/dist/subagent-steer-write.d.ts +0 -41
  223. package/dist/subagent-steer-write.js +0 -333
  224. package/dist/toolchain-check.d.ts +0 -8
  225. package/dist/toolchain-check.js +0 -54
  226. package/dist/triage-actions.d.ts +0 -23
  227. package/dist/triage-actions.js +0 -233
  228. package/dist/triage-aux-a-fixtures.d.ts +0 -33
  229. package/dist/triage-aux-a-fixtures.js +0 -107
  230. package/dist/triage-aux-b-fixtures.d.ts +0 -30
  231. package/dist/triage-aux-b-fixtures.js +0 -167
  232. package/dist/triage-bootstrap-fixtures.d.ts +0 -42
  233. package/dist/triage-bootstrap-fixtures.js +0 -139
  234. package/dist/triage-bootstrap.d.ts +0 -24
  235. package/dist/triage-bootstrap.js +0 -175
  236. package/dist/triage-bulk.d.ts +0 -17
  237. package/dist/triage-bulk.js +0 -154
  238. package/dist/triage-classify-fixtures.d.ts +0 -38
  239. package/dist/triage-classify-fixtures.js +0 -137
  240. package/dist/triage-classify.d.ts +0 -45
  241. package/dist/triage-classify.js +0 -287
  242. package/dist/triage-evaluate.d.ts +0 -14
  243. package/dist/triage-evaluate.js +0 -153
  244. package/dist/triage-help.d.ts +0 -3
  245. package/dist/triage-help.js +0 -10
  246. package/dist/triage-queue-fixtures.d.ts +0 -59
  247. package/dist/triage-queue-fixtures.js +0 -284
  248. package/dist/triage-queue.d.ts +0 -38
  249. package/dist/triage-queue.js +0 -391
  250. package/dist/triage-reconcile.d.ts +0 -11
  251. package/dist/triage-reconcile.js +0 -76
  252. package/dist/triage-refresh.d.ts +0 -7
  253. package/dist/triage-refresh.js +0 -37
  254. package/dist/triage-scope-drift.d.ts +0 -12
  255. package/dist/triage-scope-drift.js +0 -117
  256. package/dist/triage-scope-fixtures.d.ts +0 -32
  257. package/dist/triage-scope-fixtures.js +0 -131
  258. package/dist/triage-scope.d.ts +0 -4
  259. package/dist/triage-scope.js +0 -34
  260. package/dist/triage-smoketest.d.ts +0 -3
  261. package/dist/triage-smoketest.js +0 -43
  262. package/dist/triage-strip-withdrawn.d.ts +0 -21
  263. package/dist/triage-strip-withdrawn.js +0 -102
  264. package/dist/triage-subscribe.d.ts +0 -15
  265. package/dist/triage-subscribe.js +0 -157
  266. package/dist/triage-summary.d.ts +0 -14
  267. package/dist/triage-summary.js +0 -83
  268. package/dist/triage-welcome.d.ts +0 -14
  269. package/dist/triage-welcome.js +0 -121
  270. package/dist/ts-check-lane.d.ts +0 -9
  271. package/dist/ts-check-lane.js +0 -49
  272. package/dist/umbrella-current-shape.d.ts +0 -9
  273. package/dist/umbrella-current-shape.js +0 -56
  274. package/dist/vbrief-activate.d.ts +0 -3
  275. package/dist/vbrief-activate.js +0 -7
  276. package/dist/vbrief-build.d.ts +0 -3
  277. package/dist/vbrief-build.js +0 -8
  278. package/dist/vbrief-preflight-fixtures.d.ts +0 -32
  279. package/dist/vbrief-preflight-fixtures.js +0 -79
  280. package/dist/vbrief-preflight.d.ts +0 -13
  281. package/dist/vbrief-preflight.js +0 -141
  282. package/dist/vbrief-reconcile.d.ts +0 -3
  283. package/dist/vbrief-reconcile.js +0 -7
  284. package/dist/vbrief-validate.d.ts +0 -3
  285. package/dist/vbrief-validate.js +0 -8
  286. package/dist/vbrief-validation.d.ts +0 -3
  287. package/dist/vbrief-validation.js +0 -8
  288. package/dist/verify-ac.d.ts +0 -28
  289. package/dist/verify-ac.js +0 -439
  290. package/dist/verify-agents-md-advisory.d.ts +0 -19
  291. package/dist/verify-agents-md-advisory.js +0 -65
  292. package/dist/verify-agents-md-budget.d.ts +0 -12
  293. package/dist/verify-agents-md-budget.js +0 -71
  294. package/dist/verify-branch.d.ts +0 -14
  295. package/dist/verify-branch.js +0 -81
  296. package/dist/verify-class-checks.d.ts +0 -11
  297. package/dist/verify-class-checks.js +0 -71
  298. package/dist/verify-cohort-review-monitors.d.ts +0 -5
  299. package/dist/verify-cohort-review-monitors.js +0 -11
  300. package/dist/verify-completed-tracked.d.ts +0 -19
  301. package/dist/verify-completed-tracked.js +0 -202
  302. package/dist/verify-completed-write-guard.d.ts +0 -13
  303. package/dist/verify-completed-write-guard.js +0 -84
  304. package/dist/verify-consumer-check-contract.d.ts +0 -12
  305. package/dist/verify-consumer-check-contract.js +0 -70
  306. package/dist/verify-consumer-header-placeholder.d.ts +0 -12
  307. package/dist/verify-consumer-header-placeholder.js +0 -73
  308. package/dist/verify-consumer-test-lane.d.ts +0 -12
  309. package/dist/verify-consumer-test-lane.js +0 -57
  310. package/dist/verify-durable-effect-acquisition.d.ts +0 -13
  311. package/dist/verify-durable-effect-acquisition.js +0 -70
  312. package/dist/verify-encoding.d.ts +0 -15
  313. package/dist/verify-encoding.js +0 -83
  314. package/dist/verify-eval-health-relocation.d.ts +0 -16
  315. package/dist/verify-eval-health-relocation.js +0 -93
  316. package/dist/verify-eval-triggers-relocation.d.ts +0 -14
  317. package/dist/verify-eval-triggers-relocation.js +0 -74
  318. package/dist/verify-evaluator-surface.d.ts +0 -15
  319. package/dist/verify-evaluator-surface.js +0 -87
  320. package/dist/verify-forward-coverage.d.ts +0 -19
  321. package/dist/verify-forward-coverage.js +0 -144
  322. package/dist/verify-hooks-installed.d.ts +0 -24
  323. package/dist/verify-hooks-installed.js +0 -140
  324. package/dist/verify-intent-constraint.d.ts +0 -17
  325. package/dist/verify-intent-constraint.js +0 -110
  326. package/dist/verify-investigation.d.ts +0 -3
  327. package/dist/verify-investigation.js +0 -10
  328. package/dist/verify-judgment-gates.d.ts +0 -3
  329. package/dist/verify-judgment-gates.js +0 -10
  330. package/dist/verify-l4-owner.d.ts +0 -15
  331. package/dist/verify-l4-owner.js +0 -132
  332. package/dist/verify-lifecycle-visible.d.ts +0 -13
  333. package/dist/verify-lifecycle-visible.js +0 -68
  334. package/dist/verify-literal-ac.d.ts +0 -14
  335. package/dist/verify-literal-ac.js +0 -168
  336. package/dist/verify-no-task-runtime.d.ts +0 -3
  337. package/dist/verify-no-task-runtime.js +0 -16
  338. package/dist/verify-observable-scope.d.ts +0 -17
  339. package/dist/verify-observable-scope.js +0 -110
  340. package/dist/verify-operator-scope-limit.d.ts +0 -17
  341. package/dist/verify-operator-scope-limit.js +0 -285
  342. package/dist/verify-orphan-active.d.ts +0 -17
  343. package/dist/verify-orphan-active.js +0 -135
  344. package/dist/verify-ownership.d.ts +0 -10
  345. package/dist/verify-ownership.js +0 -90
  346. package/dist/verify-persisted-planning-narratives.d.ts +0 -12
  347. package/dist/verify-persisted-planning-narratives.js +0 -82
  348. package/dist/verify-plan-sequence.d.ts +0 -14
  349. package/dist/verify-plan-sequence.js +0 -138
  350. package/dist/verify-pr-closeout-attestable.d.ts +0 -15
  351. package/dist/verify-pr-closeout-attestable.js +0 -114
  352. package/dist/verify-presentation-ceiling.d.ts +0 -11
  353. package/dist/verify-presentation-ceiling.js +0 -71
  354. package/dist/verify-presentation-coverage.d.ts +0 -14
  355. package/dist/verify-presentation-coverage.js +0 -90
  356. package/dist/verify-review-monitor.d.ts +0 -32
  357. package/dist/verify-review-monitor.js +0 -362
  358. package/dist/verify-scope-provenance.d.ts +0 -16
  359. package/dist/verify-scope-provenance.js +0 -91
  360. package/dist/verify-session-ritual.d.ts +0 -23
  361. package/dist/verify-session-ritual.js +0 -144
  362. package/dist/verify-source-cli/rule-ownership-lint.d.ts +0 -12
  363. package/dist/verify-source-cli/rule-ownership-lint.js +0 -61
  364. package/dist/verify-source-cli/verify-biome-config.d.ts +0 -11
  365. package/dist/verify-source-cli/verify-biome-config.js +0 -46
  366. package/dist/verify-source-cli/verify-closing-keywords.d.ts +0 -35
  367. package/dist/verify-source-cli/verify-closing-keywords.js +0 -139
  368. package/dist/verify-source-cli/verify-consumer-hard-stops.d.ts +0 -16
  369. package/dist/verify-source-cli/verify-consumer-hard-stops.js +0 -99
  370. package/dist/verify-source-cli/verify-contained-writes.d.ts +0 -13
  371. package/dist/verify-source-cli/verify-contained-writes.js +0 -67
  372. package/dist/verify-source-cli/verify-content-manifest.d.ts +0 -12
  373. package/dist/verify-source-cli/verify-content-manifest.js +0 -61
  374. package/dist/verify-source-cli/verify-contract-drift.d.ts +0 -11
  375. package/dist/verify-source-cli/verify-contract-drift.js +0 -47
  376. package/dist/verify-source-cli/verify-cursor-tier1.d.ts +0 -12
  377. package/dist/verify-source-cli/verify-cursor-tier1.js +0 -51
  378. package/dist/verify-source-cli/verify-deposit-closure.d.ts +0 -12
  379. package/dist/verify-source-cli/verify-deposit-closure.js +0 -52
  380. package/dist/verify-source-cli/verify-openclaw-tier1.d.ts +0 -12
  381. package/dist/verify-source-cli/verify-openclaw-tier1.js +0 -51
  382. package/dist/verify-source-cli/verify-scm-boundary.d.ts +0 -13
  383. package/dist/verify-source-cli/verify-scm-boundary.js +0 -66
  384. package/dist/verify-source-cli/verify-semantic-single-source.d.ts +0 -11
  385. package/dist/verify-source-cli/verify-semantic-single-source.js +0 -49
  386. package/dist/verify-source-cli/verify-skill-external-fetch-gate.d.ts +0 -11
  387. package/dist/verify-source-cli/verify-skill-external-fetch-gate.js +0 -46
  388. package/dist/verify-source-cli/verify-spec-drift.d.ts +0 -3
  389. package/dist/verify-source-cli/verify-spec-drift.js +0 -15
  390. package/dist/verify-source-cli/verify-spec-prd-fresh.d.ts +0 -3
  391. package/dist/verify-source-cli/verify-spec-prd-fresh.js +0 -15
  392. package/dist/verify-source-cli/verify-stubs.d.ts +0 -11
  393. package/dist/verify-source-cli/verify-stubs.js +0 -27
  394. package/dist/verify-source-cli/verify-telemetry-coverage.d.ts +0 -13
  395. package/dist/verify-source-cli/verify-telemetry-coverage.js +0 -67
  396. package/dist/verify-source-cli/verify-xbrief-drift.d.ts +0 -15
  397. package/dist/verify-source-cli/verify-xbrief-drift.js +0 -80
  398. package/dist/verify-story-ready.d.ts +0 -18
  399. package/dist/verify-story-ready.js +0 -190
  400. package/dist/verify-subagent-alive.d.ts +0 -21
  401. package/dist/verify-subagent-alive.js +0 -219
  402. package/dist/verify-subagent-steer.d.ts +0 -19
  403. package/dist/verify-subagent-steer.js +0 -136
  404. package/dist/verify-test-boundary.d.ts +0 -12
  405. package/dist/verify-test-boundary.js +0 -80
  406. package/dist/verify-tools.d.ts +0 -13
  407. package/dist/verify-tools.js +0 -67
  408. package/dist/verify-wip-cap.d.ts +0 -13
  409. package/dist/verify-wip-cap.js +0 -62
  410. package/dist/windows-bin-ps1.d.ts +0 -39
  411. package/dist/windows-bin-ps1.js +0 -226
  412. package/dist/wip-cap-fixtures.d.ts +0 -37
  413. package/dist/wip-cap-fixtures.js +0 -122
  414. package/dist/wsl-ownership-guard.d.ts +0 -2
  415. package/dist/wsl-ownership-guard.js +0 -15
  416. package/dist/xbrief-create.d.ts +0 -3
  417. package/dist/xbrief-create.js +0 -9
  418. package/dist/xbrief-verify.d.ts +0 -3
  419. package/dist/xbrief-verify.js +0 -9
  420. package/scripts/remove-windows-ps1-shims.mjs +0 -26
package/dist/verify-ac.js DELETED
@@ -1,439 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * CLI: task verify:ac — product-first acceptance criteria gate (#3284).
4
- *
5
- * Runs plan.acceptance.commands (or #3267 literal ledger) verbatim.
6
- * Primary name for the product-first done-gate; verify:literal-ac remains
7
- * the #3267 mechanism alias.
8
- */
9
- import { spawnSync } from "node:child_process";
10
- import { existsSync, readdirSync, readFileSync } from "node:fs";
11
- import { join, resolve } from "node:path";
12
- import { fileURLToPath } from "node:url";
13
- import { resolveSessionCompletedVerifyAcTarget } from "@deftai/directive-core/check";
14
- import { formatRejectedLedger, resolveLiteralAcceptanceDetailed, } from "@deftai/directive-core/literal-acceptance";
15
- import { emitVerifyAcTerminalOutcome, evaluateVerifyAcFromPath, readAdmittedSourceDigest, readAdmittedSourceSentences, readPlanAcceptance, resolveAcceptanceGateProfile, resolveSoftMissingAcTargets, } from "@deftai/directive-core/product-first-done-gate";
16
- /** Parse verify:ac CLI args. */
17
- export function parseArgs(argv) {
18
- const parsed = {
19
- projectRoot: ".",
20
- xbriefPath: null,
21
- quiet: false,
22
- captureOnly: false,
23
- softMissingXbrief: false,
24
- };
25
- const positionals = [];
26
- for (let i = 0; i < argv.length; i += 1) {
27
- const arg = argv[i];
28
- if (arg === "--quiet") {
29
- parsed.quiet = true;
30
- }
31
- else if (arg === "--capture-only") {
32
- parsed.captureOnly = true;
33
- }
34
- else if (arg === "--soft-missing-xbrief") {
35
- parsed.softMissingXbrief = true;
36
- }
37
- else if (arg === "--project-root") {
38
- const value = argv[i + 1];
39
- if (value === undefined) {
40
- return { ...parsed, error: "argument --project-root: expected one argument" };
41
- }
42
- parsed.projectRoot = value;
43
- i += 1;
44
- }
45
- else if (arg?.startsWith("--project-root=")) {
46
- parsed.projectRoot = arg.slice("--project-root=".length);
47
- }
48
- else if (arg === "--xbrief" || arg === "--vbrief") {
49
- const value = argv[i + 1];
50
- if (value === undefined) {
51
- return { ...parsed, error: `argument ${arg}: expected one argument` };
52
- }
53
- parsed.xbriefPath = value;
54
- i += 1;
55
- }
56
- else if (arg?.startsWith("--xbrief=") || arg?.startsWith("--vbrief=")) {
57
- parsed.xbriefPath = arg.slice(arg.indexOf("=") + 1);
58
- }
59
- else if (arg?.startsWith("-")) {
60
- return { ...parsed, error: `unrecognized argument: ${arg}` };
61
- }
62
- else if (arg !== undefined) {
63
- positionals.push(arg);
64
- }
65
- }
66
- if (parsed.xbriefPath === null && positionals.length > 0) {
67
- parsed.xbriefPath = positionals[0] ?? null;
68
- }
69
- return parsed;
70
- }
71
- function listActiveXbriefs(projectRoot) {
72
- // Greptile conf residual #3284: scan BOTH lifecycle roots (xbrief + read-accepted
73
- // vbrief). Returning after the first non-empty root left the other unchecked.
74
- const paths = [];
75
- const dirs = [];
76
- for (const dirName of ["xbrief", "vbrief"]) {
77
- const active = join(projectRoot, dirName, "active");
78
- if (!existsSync(active))
79
- continue;
80
- let names = [];
81
- try {
82
- names = readdirSync(active)
83
- .filter((n) => n.endsWith(".xbrief.json") || n.endsWith(".vbrief.json"))
84
- .sort();
85
- }
86
- catch {
87
- continue;
88
- }
89
- if (names.length === 0)
90
- continue;
91
- dirs.push(active);
92
- for (const n of names) {
93
- paths.push(join(active, n));
94
- }
95
- }
96
- if (paths.length === 0)
97
- return { kind: "none" };
98
- if (paths.length === 1) {
99
- return { kind: "one", path: paths[0] };
100
- }
101
- return {
102
- kind: "many",
103
- paths,
104
- dir: dirs.join(" + "),
105
- };
106
- }
107
- /** Three-state exit: pass=0, fail=1, config=2. A printed pass must not leak 201. */
108
- export function clampVerifyAcExit(ok, code) {
109
- if (ok)
110
- return 0;
111
- if (code === 2)
112
- return 2;
113
- return 1;
114
- }
115
- /**
116
- * Spec-path briefs persist the refused GitHub body under plan.metadata.issueBody
117
- * (#4524 / #5055), including empty string when the origin body was empty. Live
118
- * recovery must use the Bound-remedy harvest (Overview), not body-normative REST.
119
- */
120
- function planHasSpecPathRefusedBody(plan) {
121
- const meta = asRecord(plan.metadata);
122
- if (meta === null) {
123
- return false;
124
- }
125
- return Object.hasOwn(meta, "issueBody") && typeof meta.issueBody === "string";
126
- }
127
- /**
128
- * Spec-path admitted source = Overview harvest remainder (#5055).
129
- * Fail closed when Overview is empty — do not fall through to the refused body.
130
- */
131
- function fetchSpecPathHarvest(plan) {
132
- const narratives = asRecord(plan.narratives);
133
- const overview = narratives?.Overview;
134
- if (typeof overview === "string" && overview.trim().length > 0) {
135
- return { ok: true, text: overview };
136
- }
137
- return {
138
- ok: false,
139
- reason: "Spec-path Bound-remedy harvest unavailable (Overview empty); refuse offline / restore from git",
140
- };
141
- }
142
- /**
143
- * Live REST body for the origin issue (body-normative admitted source, #5055).
144
- * Fail closed on forge outage — do not skip.
145
- */
146
- function fetchOriginIssueBody(plan) {
147
- const refs = Array.isArray(plan.references) ? plan.references : [];
148
- let issueUrl = null;
149
- for (const entry of refs) {
150
- if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
151
- continue;
152
- }
153
- const row = entry;
154
- if (row.type === "x-xbrief/github-issue" && typeof row.uri === "string") {
155
- issueUrl = row.uri;
156
- break;
157
- }
158
- }
159
- if (issueUrl === null) {
160
- return { ok: false, reason: "no github-issue reference on the brief for live REST" };
161
- }
162
- const match = issueUrl.match(/github\.com\/([^/]+)\/([^/]+)\/issues\/(\d+)/i);
163
- if (match === null) {
164
- return { ok: false, reason: `unparseable github-issue uri: ${issueUrl}` };
165
- }
166
- const owner = match[1] ?? "";
167
- const repo = match[2] ?? "";
168
- const number = match[3] ?? "";
169
- const apiPath = `repos/${owner}/${repo}/issues/${number}`;
170
- const proc = spawnSync("gh", ["api", apiPath, "--jq", ".body"], {
171
- encoding: "utf8",
172
- env: process.env,
173
- });
174
- if (proc.error) {
175
- return { ok: false, reason: `forge outage: ${proc.error.message}` };
176
- }
177
- if (proc.status !== 0) {
178
- const detail = `${proc.stderr ?? ""}${proc.stdout ?? ""}`.trim() || `gh api exited ${String(proc.status)}`;
179
- return { ok: false, reason: `forge outage: ${detail}` };
180
- }
181
- return { ok: true, text: typeof proc.stdout === "string" ? proc.stdout : "" };
182
- }
183
- /**
184
- * Live admitted-source text for digest compare / missing-pin recovery (#5055).
185
- * Spec-path → Bound-remedy harvest; body-normative → origin issue body.
186
- */
187
- function fetchAdmittedSourceForPlan(plan) {
188
- if (planHasSpecPathRefusedBody(plan)) {
189
- return fetchSpecPathHarvest(plan);
190
- }
191
- return fetchOriginIssueBody(plan);
192
- }
193
- /** Evaluate one or many xBRIEF paths; return worst non-zero code (fail closed). */
194
- function evaluatePaths(paths, options) {
195
- let worst = 0;
196
- // One shared option profile per reader (#3497) — scope:complete resolves its own
197
- // profile from the same table, so the two readers cannot drift apart again.
198
- const profile = resolveAcceptanceGateProfile(options.softMissingXbrief ? "check" : "standalone");
199
- for (const path of paths) {
200
- if (!options.quiet && paths.length > 1) {
201
- process.stdout.write(`verify:ac — evaluating ${path}\n`);
202
- }
203
- let fetchAdmittedSourceText;
204
- try {
205
- const raw = JSON.parse(readFileSync(path, "utf8"));
206
- const root = asRecord(raw);
207
- const plan = asRecord(root?.plan);
208
- // Arm live admitted-source fetch when a pin is present (digest compare), a
209
- // digest remains after pin delete (honor recorded digest), or Spec-path
210
- // refused-body metadata marks harvest recovery (#5055). Spec-path callbacks
211
- // return the Bound-remedy harvest, not the refused raw issue body. Body-
212
- // normative both-deleted recovery prefers git HEAD / merge-base so
213
- // pre-#5055 briefs without a pin are not suddenly floored by live REST.
214
- if (plan !== null) {
215
- const pin = readAdmittedSourceSentences(plan.acceptance);
216
- const digest = readAdmittedSourceDigest(plan.acceptance);
217
- if (pin !== null || digest !== null || planHasSpecPathRefusedBody(plan)) {
218
- fetchAdmittedSourceText = () => fetchAdmittedSourceForPlan(plan);
219
- }
220
- }
221
- }
222
- catch {
223
- // Path evaluation still runs; unreadable brief is handled inside evaluateVerifyAcFromPath.
224
- }
225
- const result = evaluateVerifyAcFromPath(path, {
226
- projectRoot: options.projectRoot,
227
- quiet: options.quiet,
228
- softMissingXbrief: options.softMissingXbrief,
229
- checkIntegrated: profile.checkIntegrated,
230
- captureFromNarratives: profile.captureFromNarratives,
231
- reuseMode: profile.reuseMode,
232
- env: process.env,
233
- ...(fetchAdmittedSourceText !== undefined ? { fetchAdmittedSourceText } : {}),
234
- });
235
- if (result.message.length > 0) {
236
- if (result.ok) {
237
- process.stdout.write(`${result.message}\n`);
238
- }
239
- else {
240
- process.stderr.write(`${result.message}\n`);
241
- }
242
- }
243
- const code = clampVerifyAcExit(result.ok, result.code);
244
- if (code !== 0 && (worst === 0 || code > worst)) {
245
- // Prefer code 1 (fail) over 2 when both present — still non-zero.
246
- worst = code;
247
- }
248
- }
249
- return worst;
250
- }
251
- function asRecord(value) {
252
- if (typeof value === "object" && value !== null && !Array.isArray(value)) {
253
- return value;
254
- }
255
- return null;
256
- }
257
- /** Run the gate and return the process exit code. */
258
- export function run(argv) {
259
- const args = parseArgs(argv);
260
- if (args.error !== undefined) {
261
- process.stderr.write(`verify_ac: ${args.error}\n`);
262
- emitVerifyAcTerminalOutcome({
263
- projectRoot: resolve(args.projectRoot),
264
- env: process.env,
265
- outcome: "config-error",
266
- });
267
- return 2;
268
- }
269
- const projectRoot = resolve(args.projectRoot);
270
- let paths = [];
271
- if (args.xbriefPath !== null) {
272
- paths = [resolve(projectRoot, args.xbriefPath)];
273
- }
274
- else {
275
- const found = listActiveXbriefs(projectRoot);
276
- if (found.kind === "one") {
277
- paths = [found.path];
278
- }
279
- else if (found.kind === "many") {
280
- // #4285: soft-missing selects via DEFT_ACTIVE_SCOPE / explicit path
281
- // (or fail closed). ALL-paths soft-missing is not the #3284 product bar.
282
- // --capture-only still lists every active artifact (inventory, not run).
283
- if (args.captureOnly) {
284
- paths = [...found.paths];
285
- if (!args.quiet) {
286
- process.stdout.write(`verify:ac capture-only multi-active: listing ${paths.length} scopes in ${found.dir}\n`);
287
- }
288
- }
289
- else if (args.softMissingXbrief) {
290
- const selected = resolveSoftMissingAcTargets(projectRoot, {
291
- env: process.env,
292
- scannedPaths: found.paths,
293
- });
294
- if (selected.kind === "one") {
295
- paths = [selected.path];
296
- if (!args.quiet) {
297
- process.stdout.write(`verify:ac soft-missing multi-active (#4285): selected ${selected.path}\n`);
298
- }
299
- }
300
- else {
301
- process.stderr.write(`${selected.kind === "need-pin" ? selected.message : "verify_ac: multi-active soft-missing needs a pin"}\n` +
302
- " Usage: task verify:ac -- <path-to-active.xbrief.json>\n" +
303
- ` Or set DEFT_ACTIVE_SCOPE to the dispatched story under ${found.dir}\n` +
304
- " Refs #4285 / #3284 product-first done-gate\n");
305
- emitVerifyAcTerminalOutcome({
306
- projectRoot,
307
- env: process.env,
308
- outcome: "config-error",
309
- });
310
- return 1;
311
- }
312
- }
313
- else {
314
- process.stderr.write(`verify_ac: ${found.paths.length} active scopes in ${found.dir}.\n` +
315
- " Pass an explicit path, or set DEFT_ACTIVE_SCOPE with check composition (--soft-missing-xbrief).\n" +
316
- " Usage: task verify:ac -- <path-to-active.xbrief.json>\n" +
317
- " Refs #4285 / #3284 product-first done-gate\n");
318
- emitVerifyAcTerminalOutcome({
319
- projectRoot,
320
- env: process.env,
321
- outcome: "config-error",
322
- });
323
- return 1;
324
- }
325
- }
326
- else if (args.softMissingXbrief) {
327
- const completed = resolveSessionCompletedVerifyAcTarget({
328
- projectRoot,
329
- env: process.env,
330
- });
331
- if (completed.kind === "target") {
332
- paths = [completed.path];
333
- if (!args.quiet) {
334
- process.stdout.write(`verify:ac targeting just-completed brief (#3357): ${completed.path}\n`);
335
- }
336
- }
337
- else if (completed.kind === "cannot") {
338
- process.stderr.write(`${completed.message}\n`);
339
- emitVerifyAcTerminalOutcome({
340
- projectRoot,
341
- env: process.env,
342
- outcome: "config-error",
343
- });
344
- return 1;
345
- }
346
- else if (!args.quiet) {
347
- process.stdout.write("verify:ac skipped (#3284 soft-missing): no active xBRIEF in xbrief/active/\n");
348
- }
349
- if (completed.kind === "none") {
350
- emitVerifyAcTerminalOutcome({
351
- projectRoot,
352
- env: process.env,
353
- outcome: "soft-missing",
354
- });
355
- return 0;
356
- }
357
- }
358
- else {
359
- process.stderr.write("verify_ac: pass an xBRIEF path or ensure exactly one artifact in xbrief/active/\n" +
360
- " Usage: task verify:ac -- <path-to-active.xbrief.json>\n" +
361
- " Refs #3284 product-first done-gate (mechanism #3267)\n");
362
- emitVerifyAcTerminalOutcome({
363
- projectRoot,
364
- env: process.env,
365
- outcome: "config-error",
366
- });
367
- return 2;
368
- }
369
- }
370
- if (args.captureOnly) {
371
- // Capture-only: report each path (multi-active) as a list.
372
- const reports = [];
373
- for (const xbriefPath of paths) {
374
- try {
375
- const data = asRecord(JSON.parse(readFileSync(xbriefPath, "utf8")));
376
- if (data === null) {
377
- process.stderr.write(`verify_ac: xBRIEF top-level is not an object: ${xbriefPath}\n`);
378
- return 2;
379
- }
380
- const plan = asRecord(data.plan);
381
- if (plan === null) {
382
- process.stderr.write(`verify_ac: xBRIEF missing plan object: ${xbriefPath}\n`);
383
- return 2;
384
- }
385
- const acceptance = readPlanAcceptance(plan);
386
- const resolved = resolveLiteralAcceptanceDetailed(plan, { captureFromNarratives: true });
387
- // Executor reads plan.acceptance.commands when the #3267 ledger is empty (#3449).
388
- const executorCommands = resolved.commands.length > 0
389
- ? resolved.commands
390
- : acceptance.commands.map((c) => ({
391
- command: c.command,
392
- source: "explicit",
393
- sourceSpan: "plan.acceptance.commands",
394
- cwd: c.cwd ?? null,
395
- expectedExitCode: c.expectedExitCode ?? 0,
396
- }));
397
- reports.push({
398
- xbrief: xbriefPath,
399
- source_rung: acceptance.source_rung,
400
- none_stated: acceptance.none_stated,
401
- acceptance_commands: acceptance.commands,
402
- count: executorCommands.length,
403
- rejected_count: resolved.rejected.length,
404
- commands: executorCommands.map((c) => ({
405
- command: c.command,
406
- source: c.source,
407
- sourceSpan: c.sourceSpan ?? null,
408
- cwd: c.cwd ?? null,
409
- expectedExitCode: c.expectedExitCode ?? 0,
410
- })),
411
- rejected: resolved.rejected.map((r) => ({
412
- command: r.command,
413
- reason: r.reason,
414
- sourceSpan: r.sourceSpan ?? null,
415
- })),
416
- });
417
- if (resolved.rejected.length > 0) {
418
- process.stderr.write(`${formatRejectedLedger(resolved.rejected)}\n`);
419
- }
420
- }
421
- catch (err) {
422
- const msg = err instanceof Error ? err.message : String(err);
423
- process.stderr.write(`verify_ac: ${msg}\n`);
424
- return 2;
425
- }
426
- }
427
- process.stdout.write(`${JSON.stringify(reports.length === 1 ? reports[0] : { scopes: reports }, null, 2)}\n`);
428
- return 0;
429
- }
430
- return evaluatePaths(paths, {
431
- projectRoot,
432
- quiet: args.quiet,
433
- softMissingXbrief: args.softMissingXbrief,
434
- });
435
- }
436
- if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
437
- process.exit(run(process.argv.slice(2)));
438
- }
439
- //# sourceMappingURL=verify-ac.js.map
@@ -1,19 +0,0 @@
1
- #!/usr/bin/env node
2
- interface ParsedArgs {
3
- projectRoot: string;
4
- quiet: boolean;
5
- enforce: boolean;
6
- error?: string;
7
- }
8
- /** Parse verify-agents-md-advisory CLI args. */
9
- export declare function parseArgs(argv: string[]): ParsedArgs;
10
- /**
11
- * Run the advisory and return the process exit code.
12
- *
13
- * Default posture is advisory: the command ALWAYS exits 0 (it never
14
- * fail-closes a consumer build). The opt-in `--enforce` flag promotes an
15
- * over-budget unmanaged region to exit 1 for consumers who want a hard cap.
16
- */
17
- export declare function run(argv: string[]): number;
18
- export {};
19
- //# sourceMappingURL=verify-agents-md-advisory.d.ts.map
@@ -1,65 +0,0 @@
1
- #!/usr/bin/env node
2
- import { resolve } from "node:path";
3
- import { fileURLToPath } from "node:url";
4
- import { evaluate } from "@deftai/directive-core/agents-md-advisory";
5
- /** Parse verify-agents-md-advisory CLI args. */
6
- export function parseArgs(argv) {
7
- const parsed = {
8
- projectRoot: ".",
9
- quiet: false,
10
- enforce: false,
11
- };
12
- for (let i = 0; i < argv.length; i += 1) {
13
- const arg = argv[i];
14
- if (arg === "--quiet") {
15
- parsed.quiet = true;
16
- }
17
- else if (arg === "--enforce") {
18
- parsed.enforce = true;
19
- }
20
- else if (arg === "--project-root") {
21
- const value = argv[i + 1];
22
- if (value === undefined) {
23
- return { ...parsed, error: "argument --project-root: expected one argument" };
24
- }
25
- parsed.projectRoot = value;
26
- i += 1;
27
- }
28
- else if (arg?.startsWith("--project-root=")) {
29
- parsed.projectRoot = arg.slice("--project-root=".length);
30
- }
31
- else {
32
- return { ...parsed, error: `unrecognized argument: ${arg}` };
33
- }
34
- }
35
- return parsed;
36
- }
37
- /**
38
- * Run the advisory and return the process exit code.
39
- *
40
- * Default posture is advisory: the command ALWAYS exits 0 (it never
41
- * fail-closes a consumer build). The opt-in `--enforce` flag promotes an
42
- * over-budget unmanaged region to exit 1 for consumers who want a hard cap.
43
- */
44
- export function run(argv) {
45
- const args = parseArgs(argv);
46
- if (args.error !== undefined) {
47
- process.stderr.write(`verify_agents_md_advisory: ${args.error}\n`);
48
- return 2;
49
- }
50
- const projectRoot = resolve(args.projectRoot);
51
- const result = evaluate(projectRoot, { quiet: args.quiet, enforce: args.enforce });
52
- if (result.message.length > 0) {
53
- if (result.stream === "stdout") {
54
- process.stdout.write(`${result.message}\n`);
55
- }
56
- else if (result.stream === "stderr") {
57
- process.stderr.write(`${result.message}\n`);
58
- }
59
- }
60
- return result.code;
61
- }
62
- if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
63
- process.exit(run(process.argv.slice(2)));
64
- }
65
- //# sourceMappingURL=verify-agents-md-advisory.js.map
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env node
2
- interface ParsedArgs {
3
- projectRoot: string;
4
- quiet: boolean;
5
- error?: string;
6
- }
7
- /** Parse verify-agents-md-budget CLI args. */
8
- export declare function parseArgs(argv: string[]): ParsedArgs;
9
- /** Run the gate and return the process exit code. */
10
- export declare function run(argv: string[]): number;
11
- export {};
12
- //# sourceMappingURL=verify-agents-md-budget.d.ts.map
@@ -1,71 +0,0 @@
1
- #!/usr/bin/env node
2
- import { resolve } from "node:path";
3
- import { fileURLToPath } from "node:url";
4
- import { evaluate } from "@deftai/directive-core/agents-md-budget";
5
- /** Parse verify-agents-md-budget CLI args. */
6
- export function parseArgs(argv) {
7
- const parsed = {
8
- projectRoot: ".",
9
- quiet: false,
10
- };
11
- for (let i = 0; i < argv.length; i += 1) {
12
- const arg = argv[i];
13
- if (arg === "--quiet") {
14
- parsed.quiet = true;
15
- }
16
- else if (arg === "--project-root") {
17
- const value = argv[i + 1];
18
- if (value === undefined) {
19
- return { ...parsed, error: "argument --project-root: expected one argument" };
20
- }
21
- parsed.projectRoot = value;
22
- i += 1;
23
- }
24
- else if (arg?.startsWith("--project-root=")) {
25
- parsed.projectRoot = arg.slice("--project-root=".length);
26
- }
27
- else {
28
- return { ...parsed, error: `unrecognized argument: ${arg}` };
29
- }
30
- }
31
- return parsed;
32
- }
33
- /** Run the gate and return the process exit code. */
34
- export function run(argv) {
35
- const args = parseArgs(argv);
36
- if (args.error !== undefined) {
37
- process.stderr.write(`verify_agents_md_budget: ${args.error}\n`);
38
- return 2;
39
- }
40
- const projectRoot = resolve(args.projectRoot);
41
- const result = evaluate(projectRoot, { quiet: args.quiet });
42
- if (result.message.length > 0) {
43
- if (result.stream === "stdout") {
44
- process.stdout.write(`${result.message}\n`);
45
- }
46
- else if (result.stream === "stderr") {
47
- process.stderr.write(`${result.message}\n`);
48
- }
49
- }
50
- if (result.northStarMessage !== undefined && result.northStarMessage.length > 0) {
51
- if (result.northStarStream === "stdout") {
52
- process.stdout.write(`${result.northStarMessage}\n`);
53
- }
54
- else if (result.northStarStream === "stderr") {
55
- process.stderr.write(`${result.northStarMessage}\n`);
56
- }
57
- }
58
- else if (result.advisoryMessage !== undefined && result.advisoryMessage.length > 0) {
59
- if (result.advisoryStream === "stdout") {
60
- process.stdout.write(`${result.advisoryMessage}\n`);
61
- }
62
- else if (result.advisoryStream === "stderr") {
63
- process.stderr.write(`${result.advisoryMessage}\n`);
64
- }
65
- }
66
- return result.code;
67
- }
68
- if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
69
- process.exit(run(process.argv.slice(2)));
70
- }
71
- //# sourceMappingURL=verify-agents-md-budget.js.map
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env node
2
- interface ParsedArgs {
3
- projectRoot: string;
4
- allowMissingProjectDefinition: boolean;
5
- defaultBranches: string[] | null;
6
- quiet: boolean;
7
- error?: string;
8
- }
9
- /** Parse verify-branch CLI args, mirroring the Python argparse surface. */
10
- export declare function parseArgs(argv: string[]): ParsedArgs;
11
- /** Run the gate and return the process exit code. */
12
- export declare function run(argv: string[]): number;
13
- export {};
14
- //# sourceMappingURL=verify-branch.d.ts.map