@shrkcrft/cli 0.1.0-alpha.30 → 0.1.0-alpha.31

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 (510) hide show
  1. package/dist/asset-preview/apply-asset-preview.js +1 -1
  2. package/dist/authoring/authoring-kit.d.ts +9 -1
  3. package/dist/authoring/authoring-kit.d.ts.map +1 -1
  4. package/dist/authoring/authoring-kit.js +26 -13
  5. package/dist/bootstrap/unlinked-workspace-dependency.d.ts +11 -0
  6. package/dist/bootstrap/unlinked-workspace-dependency.d.ts.map +1 -0
  7. package/dist/bootstrap/unlinked-workspace-dependency.js +99 -0
  8. package/dist/command-registry.d.ts +100 -1
  9. package/dist/command-registry.d.ts.map +1 -1
  10. package/dist/command-registry.js +130 -3
  11. package/dist/commands/api-diff.command.d.ts.map +1 -1
  12. package/dist/commands/api-diff.command.js +12 -0
  13. package/dist/commands/apply.command.d.ts.map +1 -1
  14. package/dist/commands/apply.command.js +3 -0
  15. package/dist/commands/arch.command.d.ts.map +1 -1
  16. package/dist/commands/arch.command.js +26 -7
  17. package/dist/commands/architecture.command.d.ts.map +1 -1
  18. package/dist/commands/architecture.command.js +8 -2
  19. package/dist/commands/baseline.command.d.ts +54 -3
  20. package/dist/commands/baseline.command.d.ts.map +1 -1
  21. package/dist/commands/baseline.command.js +582 -74
  22. package/dist/commands/biome.command.d.ts.map +1 -1
  23. package/dist/commands/biome.command.js +20 -0
  24. package/dist/commands/boundaries.command.d.ts +9 -1
  25. package/dist/commands/boundaries.command.d.ts.map +1 -1
  26. package/dist/commands/boundaries.command.js +88 -20
  27. package/dist/commands/bundle.command.d.ts.map +1 -1
  28. package/dist/commands/bundle.command.js +57 -11
  29. package/dist/commands/cache-align.command.d.ts.map +1 -1
  30. package/dist/commands/cache-align.command.js +3 -1
  31. package/dist/commands/changelog-data.d.ts.map +1 -1
  32. package/dist/commands/changelog-data.js +138 -0
  33. package/dist/commands/changes.command.d.ts.map +1 -1
  34. package/dist/commands/changes.command.js +15 -0
  35. package/dist/commands/check.command.d.ts.map +1 -1
  36. package/dist/commands/check.command.js +1241 -322
  37. package/dist/commands/checks.command.d.ts.map +1 -1
  38. package/dist/commands/checks.command.js +188 -40
  39. package/dist/commands/ci.command.d.ts.map +1 -1
  40. package/dist/commands/ci.command.js +35 -2
  41. package/dist/commands/code-intel.command.d.ts.map +1 -1
  42. package/dist/commands/code-intel.command.js +3 -0
  43. package/dist/commands/command-catalog.d.ts +23 -1
  44. package/dist/commands/command-catalog.d.ts.map +1 -1
  45. package/dist/commands/command-catalog.js +152 -35
  46. package/dist/commands/commands.command.d.ts +21 -3
  47. package/dist/commands/commands.command.d.ts.map +1 -1
  48. package/dist/commands/commands.command.js +172 -27
  49. package/dist/commands/compress.command.d.ts.map +1 -1
  50. package/dist/commands/compress.command.js +4 -0
  51. package/dist/commands/constructs.command.d.ts.map +1 -1
  52. package/dist/commands/constructs.command.js +50 -12
  53. package/dist/commands/context.command.d.ts.map +1 -1
  54. package/dist/commands/context.command.js +40 -5
  55. package/dist/commands/contract-templates.command.d.ts.map +1 -1
  56. package/dist/commands/contract-templates.command.js +9 -1
  57. package/dist/commands/contract.command.d.ts.map +1 -1
  58. package/dist/commands/contract.command.js +35 -0
  59. package/dist/commands/conventions.command.d.ts.map +1 -1
  60. package/dist/commands/conventions.command.js +189 -29
  61. package/dist/commands/coverage.command.d.ts.map +1 -1
  62. package/dist/commands/coverage.command.js +9 -0
  63. package/dist/commands/daily.commands.d.ts +0 -1
  64. package/dist/commands/daily.commands.d.ts.map +1 -1
  65. package/dist/commands/daily.commands.js +12 -76
  66. package/dist/commands/dashboard.command.d.ts.map +1 -1
  67. package/dist/commands/dashboard.command.js +10 -0
  68. package/dist/commands/dev.command.d.ts.map +1 -1
  69. package/dist/commands/dev.command.js +45 -2
  70. package/dist/commands/diagnostics.command.d.ts +0 -2
  71. package/dist/commands/diagnostics.command.d.ts.map +1 -1
  72. package/dist/commands/diagnostics.command.js +5 -78
  73. package/dist/commands/diff-check.command.d.ts +6 -4
  74. package/dist/commands/diff-check.command.d.ts.map +1 -1
  75. package/dist/commands/diff-check.command.js +190 -103
  76. package/dist/commands/docs-references.command.d.ts +13 -0
  77. package/dist/commands/docs-references.command.d.ts.map +1 -1
  78. package/dist/commands/docs-references.command.js +269 -72
  79. package/dist/commands/doctor.command.d.ts.map +1 -1
  80. package/dist/commands/doctor.command.js +58 -4
  81. package/dist/commands/drift.command.d.ts.map +1 -1
  82. package/dist/commands/drift.command.js +17 -4
  83. package/dist/commands/eslint.command.d.ts.map +1 -1
  84. package/dist/commands/eslint.command.js +20 -0
  85. package/dist/commands/export.command.d.ts.map +1 -1
  86. package/dist/commands/export.command.js +23 -1
  87. package/dist/commands/feedback-dispatch.command.d.ts.map +1 -1
  88. package/dist/commands/feedback-dispatch.command.js +29 -0
  89. package/dist/commands/feedback.command.d.ts.map +1 -1
  90. package/dist/commands/feedback.command.js +6 -1
  91. package/dist/commands/finish.command.d.ts.map +1 -1
  92. package/dist/commands/finish.command.js +32 -8
  93. package/dist/commands/fix.command.d.ts.map +1 -1
  94. package/dist/commands/fix.command.js +19 -0
  95. package/dist/commands/gate.command.d.ts +6 -1
  96. package/dist/commands/gate.command.d.ts.map +1 -1
  97. package/dist/commands/gate.command.js +50 -124
  98. package/dist/commands/gates.command.d.ts +52 -0
  99. package/dist/commands/gates.command.d.ts.map +1 -1
  100. package/dist/commands/gates.command.js +811 -185
  101. package/dist/commands/gen.command.d.ts.map +1 -1
  102. package/dist/commands/gen.command.js +4 -0
  103. package/dist/commands/generated.command.d.ts +33 -3
  104. package/dist/commands/generated.command.d.ts.map +1 -1
  105. package/dist/commands/generated.command.js +499 -147
  106. package/dist/commands/graph-code-subverbs.d.ts +15 -0
  107. package/dist/commands/graph-code-subverbs.d.ts.map +1 -1
  108. package/dist/commands/graph-code-subverbs.js +198 -24
  109. package/dist/commands/graph.command.d.ts.map +1 -1
  110. package/dist/commands/graph.command.js +79 -37
  111. package/dist/commands/help.command.d.ts +30 -6
  112. package/dist/commands/help.command.d.ts.map +1 -1
  113. package/dist/commands/help.command.js +323 -199
  114. package/dist/commands/helper.command.d.ts +1 -0
  115. package/dist/commands/helper.command.d.ts.map +1 -1
  116. package/dist/commands/helper.command.js +195 -56
  117. package/dist/commands/impact.command.d.ts.map +1 -1
  118. package/dist/commands/impact.command.js +115 -12
  119. package/dist/commands/infer.command.d.ts.map +1 -1
  120. package/dist/commands/infer.command.js +20 -45
  121. package/dist/commands/ingest.command.d.ts +0 -1
  122. package/dist/commands/ingest.command.d.ts.map +1 -1
  123. package/dist/commands/ingest.command.js +25 -41
  124. package/dist/commands/knowledge-author.command.d.ts +0 -3
  125. package/dist/commands/knowledge-author.command.d.ts.map +1 -1
  126. package/dist/commands/knowledge-author.command.js +10 -23
  127. package/dist/commands/knowledge.command.d.ts.map +1 -1
  128. package/dist/commands/knowledge.command.js +469 -129
  129. package/dist/commands/languages.command.d.ts.map +1 -1
  130. package/dist/commands/languages.command.js +27 -0
  131. package/dist/commands/lint.command.d.ts.map +1 -1
  132. package/dist/commands/lint.command.js +3 -0
  133. package/dist/commands/mcp.command.d.ts +18 -0
  134. package/dist/commands/mcp.command.d.ts.map +1 -1
  135. package/dist/commands/mcp.command.js +33 -8
  136. package/dist/commands/onboard.command.d.ts.map +1 -1
  137. package/dist/commands/onboard.command.js +20 -0
  138. package/dist/commands/owners.command.d.ts.map +1 -1
  139. package/dist/commands/owners.command.js +14 -2
  140. package/dist/commands/packs-new.d.ts +13 -1
  141. package/dist/commands/packs-new.d.ts.map +1 -1
  142. package/dist/commands/packs-new.js +500 -335
  143. package/dist/commands/packs.command.d.ts.map +1 -1
  144. package/dist/commands/packs.command.js +378 -36
  145. package/dist/commands/paths.command.d.ts.map +1 -1
  146. package/dist/commands/paths.command.js +9 -1
  147. package/dist/commands/pipelines.command.d.ts.map +1 -1
  148. package/dist/commands/pipelines.command.js +7 -1
  149. package/dist/commands/plan-check.command.d.ts.map +1 -1
  150. package/dist/commands/plan-check.command.js +3 -0
  151. package/dist/commands/plan.command.d.ts.map +1 -1
  152. package/dist/commands/plan.command.js +3 -0
  153. package/dist/commands/playbooks.command.d.ts.map +1 -1
  154. package/dist/commands/playbooks.command.js +7 -2
  155. package/dist/commands/policy-lint.command.d.ts +19 -2
  156. package/dist/commands/policy-lint.command.d.ts.map +1 -1
  157. package/dist/commands/policy-lint.command.js +224 -65
  158. package/dist/commands/policy.command.d.ts.map +1 -1
  159. package/dist/commands/policy.command.js +6 -1
  160. package/dist/commands/pr.command.d.ts.map +1 -1
  161. package/dist/commands/pr.command.js +14 -0
  162. package/dist/commands/presets.command.d.ts.map +1 -1
  163. package/dist/commands/presets.command.js +12 -27
  164. package/dist/commands/profiles.command.d.ts.map +1 -1
  165. package/dist/commands/profiles.command.js +94 -26
  166. package/dist/commands/provenance.command.js +1 -1
  167. package/dist/commands/quality.command.d.ts.map +1 -1
  168. package/dist/commands/quality.command.js +129 -33
  169. package/dist/commands/recommend.command.d.ts +20 -4
  170. package/dist/commands/recommend.command.d.ts.map +1 -1
  171. package/dist/commands/recommend.command.js +172 -278
  172. package/dist/commands/registrations.command.d.ts.map +1 -1
  173. package/dist/commands/registrations.command.js +138 -13
  174. package/dist/commands/registry-lifecycle-run.d.ts +14 -0
  175. package/dist/commands/registry-lifecycle-run.d.ts.map +1 -0
  176. package/dist/commands/registry-lifecycle-run.js +336 -0
  177. package/dist/commands/registry.command.d.ts.map +1 -1
  178. package/dist/commands/registry.command.js +235 -62
  179. package/dist/commands/release.command.d.ts.map +1 -1
  180. package/dist/commands/release.command.js +99 -20
  181. package/dist/commands/report.command.d.ts.map +1 -1
  182. package/dist/commands/report.command.js +38 -2
  183. package/dist/commands/reuse-coverage.command.d.ts +23 -0
  184. package/dist/commands/reuse-coverage.command.d.ts.map +1 -0
  185. package/dist/commands/reuse-coverage.command.js +536 -0
  186. package/dist/commands/reuse.command.d.ts +3 -18
  187. package/dist/commands/reuse.command.d.ts.map +1 -1
  188. package/dist/commands/reuse.command.js +395 -244
  189. package/dist/commands/review.command.d.ts.map +1 -1
  190. package/dist/commands/review.command.js +33 -1
  191. package/dist/commands/rounds.command.d.ts.map +1 -1
  192. package/dist/commands/rounds.command.js +5 -0
  193. package/dist/commands/safety.command.d.ts.map +1 -1
  194. package/dist/commands/safety.command.js +9 -0
  195. package/dist/commands/scaffolds.command.d.ts.map +1 -1
  196. package/dist/commands/scaffolds.command.js +97 -25
  197. package/dist/commands/search.command.d.ts +0 -8
  198. package/dist/commands/search.command.d.ts.map +1 -1
  199. package/dist/commands/search.command.js +136 -28
  200. package/dist/commands/self-config-xrefs.command.d.ts +24 -0
  201. package/dist/commands/self-config-xrefs.command.d.ts.map +1 -0
  202. package/dist/commands/self-config-xrefs.command.js +170 -0
  203. package/dist/commands/self-config.command.d.ts.map +1 -1
  204. package/dist/commands/self-config.command.js +261 -65
  205. package/dist/commands/smart-context.command.d.ts.map +1 -1
  206. package/dist/commands/smart-context.command.js +39 -3
  207. package/dist/commands/spec.command.d.ts.map +1 -1
  208. package/dist/commands/spec.command.js +3 -0
  209. package/dist/commands/stats.command.d.ts.map +1 -1
  210. package/dist/commands/stats.command.js +3 -0
  211. package/dist/commands/surface.command.d.ts +6 -1
  212. package/dist/commands/surface.command.d.ts.map +1 -1
  213. package/dist/commands/surface.command.js +256 -54
  214. package/dist/commands/task-context.command.js +1 -1
  215. package/dist/commands/task.command.d.ts.map +1 -1
  216. package/dist/commands/task.command.js +22 -1
  217. package/dist/commands/templates.command.d.ts +4 -0
  218. package/dist/commands/templates.command.d.ts.map +1 -1
  219. package/dist/commands/templates.command.js +109 -22
  220. package/dist/commands/test.command.d.ts.map +1 -1
  221. package/dist/commands/test.command.js +161 -33
  222. package/dist/commands/tests.command.d.ts.map +1 -1
  223. package/dist/commands/tests.command.js +29 -3
  224. package/dist/commands/trace.command.d.ts.map +1 -1
  225. package/dist/commands/trace.command.js +29 -4
  226. package/dist/commands/watch.command.d.ts.map +1 -1
  227. package/dist/commands/watch.command.js +3 -0
  228. package/dist/commands/why.command.d.ts.map +1 -1
  229. package/dist/commands/why.command.js +3 -0
  230. package/dist/commands/wiring.command.d.ts +18 -4
  231. package/dist/commands/wiring.command.d.ts.map +1 -1
  232. package/dist/commands/wiring.command.js +360 -73
  233. package/dist/dashboard/code-intelligence-data.js +4 -4
  234. package/dist/diff/deleted-orphan-coverage.d.ts +32 -0
  235. package/dist/diff/deleted-orphan-coverage.d.ts.map +1 -0
  236. package/dist/diff/deleted-orphan-coverage.js +107 -0
  237. package/dist/diff/deleted-orphan-scope-notes.d.ts +23 -0
  238. package/dist/diff/deleted-orphan-scope-notes.d.ts.map +1 -0
  239. package/dist/diff/deleted-orphan-scope-notes.js +49 -0
  240. package/dist/diff/deleted-orphans.d.ts +32 -0
  241. package/dist/diff/deleted-orphans.d.ts.map +1 -1
  242. package/dist/diff/deleted-orphans.js +42 -2
  243. package/dist/dispatch/closest-match.d.ts +15 -0
  244. package/dist/dispatch/closest-match.d.ts.map +1 -0
  245. package/dist/dispatch/closest-match.js +47 -0
  246. package/dist/dispatch/global-flags.d.ts +94 -0
  247. package/dist/dispatch/global-flags.d.ts.map +1 -0
  248. package/dist/dispatch/global-flags.js +123 -0
  249. package/dist/dispatch/guard-invocation-input.d.ts +24 -0
  250. package/dist/dispatch/guard-invocation-input.d.ts.map +1 -0
  251. package/dist/dispatch/guard-invocation-input.js +1 -0
  252. package/dist/dispatch/guard-invocation.d.ts +33 -0
  253. package/dist/dispatch/guard-invocation.d.ts.map +1 -0
  254. package/dist/dispatch/guard-invocation.js +183 -0
  255. package/dist/dispatch/help-intercept.d.ts +22 -0
  256. package/dist/dispatch/help-intercept.d.ts.map +1 -0
  257. package/dist/dispatch/help-intercept.js +42 -0
  258. package/dist/dispatch/i-declared-invocation.d.ts +17 -0
  259. package/dist/dispatch/i-declared-invocation.d.ts.map +1 -0
  260. package/dist/dispatch/i-declared-invocation.js +1 -0
  261. package/dist/dispatch/i-unknown-flag-refusal-input.d.ts +28 -0
  262. package/dist/dispatch/i-unknown-flag-refusal-input.d.ts.map +1 -0
  263. package/dist/dispatch/i-unknown-flag-refusal-input.js +1 -0
  264. package/dist/dispatch/invocation-rejection-kind.d.ts +15 -0
  265. package/dist/dispatch/invocation-rejection-kind.d.ts.map +1 -0
  266. package/dist/dispatch/invocation-rejection-kind.js +15 -0
  267. package/dist/dispatch/invocation-rejection.d.ts +18 -0
  268. package/dist/dispatch/invocation-rejection.d.ts.map +1 -0
  269. package/dist/dispatch/invocation-rejection.js +1 -0
  270. package/dist/dispatch/judge-invocation.d.ts +24 -0
  271. package/dist/dispatch/judge-invocation.d.ts.map +1 -0
  272. package/dist/dispatch/judge-invocation.js +50 -0
  273. package/dist/dispatch/positional-mode.d.ts +18 -0
  274. package/dist/dispatch/positional-mode.d.ts.map +1 -0
  275. package/dist/dispatch/positional-mode.js +18 -0
  276. package/dist/dispatch/read-tracking-map.d.ts +28 -0
  277. package/dist/dispatch/read-tracking-map.d.ts.map +1 -0
  278. package/dist/dispatch/read-tracking-map.js +58 -0
  279. package/dist/dispatch/refuse-sibling-valve-flags.d.ts +30 -0
  280. package/dist/dispatch/refuse-sibling-valve-flags.d.ts.map +1 -0
  281. package/dist/dispatch/refuse-sibling-valve-flags.js +65 -0
  282. package/dist/dispatch/subverb-spec.d.ts +26 -0
  283. package/dist/dispatch/subverb-spec.d.ts.map +1 -0
  284. package/dist/dispatch/subverb-spec.js +1 -0
  285. package/dist/dispatch/undocumented-flag-reads.d.ts +22 -0
  286. package/dist/dispatch/undocumented-flag-reads.d.ts.map +1 -0
  287. package/dist/dispatch/undocumented-flag-reads.js +283 -0
  288. package/dist/dispatch/unknown-flag-refusal-mode.d.ts +13 -0
  289. package/dist/dispatch/unknown-flag-refusal-mode.d.ts.map +1 -0
  290. package/dist/dispatch/unknown-flag-refusal-mode.js +13 -0
  291. package/dist/dispatch/unknown-flag-refusal.d.ts +22 -0
  292. package/dist/dispatch/unknown-flag-refusal.d.ts.map +1 -0
  293. package/dist/dispatch/unknown-flag-refusal.js +57 -0
  294. package/dist/dispatch/unread-flags.d.ts +152 -0
  295. package/dist/dispatch/unread-flags.d.ts.map +1 -0
  296. package/dist/dispatch/unread-flags.js +295 -0
  297. package/dist/dispatch/verdict-valve-flag.d.ts +21 -0
  298. package/dist/dispatch/verdict-valve-flag.d.ts.map +1 -0
  299. package/dist/dispatch/verdict-valve-flag.js +21 -0
  300. package/dist/dispatch/walk-declared-subverbs.d.ts +14 -0
  301. package/dist/dispatch/walk-declared-subverbs.d.ts.map +1 -0
  302. package/dist/dispatch/walk-declared-subverbs.js +28 -0
  303. package/dist/exit-codes.d.ts +41 -3
  304. package/dist/exit-codes.d.ts.map +1 -1
  305. package/dist/exit-codes.js +153 -14
  306. package/dist/finish/run-finish.d.ts +72 -5
  307. package/dist/finish/run-finish.d.ts.map +1 -1
  308. package/dist/finish/run-finish.js +453 -104
  309. package/dist/gates/accepted-empty-note.d.ts +10 -0
  310. package/dist/gates/accepted-empty-note.d.ts.map +1 -0
  311. package/dist/gates/accepted-empty-note.js +11 -0
  312. package/dist/gates/allow-empty.d.ts +25 -0
  313. package/dist/gates/allow-empty.d.ts.map +1 -0
  314. package/dist/gates/allow-empty.js +27 -0
  315. package/dist/gates/asset-doctor-failing-units.d.ts +16 -0
  316. package/dist/gates/asset-doctor-failing-units.d.ts.map +1 -0
  317. package/dist/gates/asset-doctor-failing-units.js +14 -0
  318. package/dist/gates/asset-doctor-failure-line.d.ts +16 -0
  319. package/dist/gates/asset-doctor-failure-line.d.ts.map +1 -0
  320. package/dist/gates/asset-doctor-failure-line.js +28 -0
  321. package/dist/gates/empty-rule-advice-lines.d.ts +15 -0
  322. package/dist/gates/empty-rule-advice-lines.d.ts.map +1 -0
  323. package/dist/gates/empty-rule-advice-lines.js +20 -0
  324. package/dist/gates/gate-envelope.d.ts +85 -8
  325. package/dist/gates/gate-envelope.d.ts.map +1 -1
  326. package/dist/gates/gate-envelope.js +56 -7
  327. package/dist/gates/gate-rule-globs.d.ts +37 -3
  328. package/dist/gates/gate-rule-globs.d.ts.map +1 -1
  329. package/dist/gates/gate-rule-globs.js +78 -40
  330. package/dist/gates/gate-rule-view.d.ts +17 -4
  331. package/dist/gates/gate-rule-view.d.ts.map +1 -1
  332. package/dist/gates/gate-rule-view.js +105 -90
  333. package/dist/gates/i-coverage-dead-glob.d.ts +19 -0
  334. package/dist/gates/i-coverage-dead-glob.d.ts.map +1 -0
  335. package/dist/gates/i-coverage-dead-glob.js +1 -0
  336. package/dist/gates/i-coverage-negation.d.ts +13 -0
  337. package/dist/gates/i-coverage-negation.d.ts.map +1 -0
  338. package/dist/gates/i-coverage-negation.js +1 -0
  339. package/dist/gates/i-registration-query-settle-input.d.ts +18 -0
  340. package/dist/gates/i-registration-query-settle-input.d.ts.map +1 -0
  341. package/dist/gates/i-registration-query-settle-input.js +1 -0
  342. package/dist/gates/i-unit-state-note-row.d.ts +16 -0
  343. package/dist/gates/i-unit-state-note-row.d.ts.map +1 -0
  344. package/dist/gates/i-unit-state-note-row.js +1 -0
  345. package/dist/gates/i-unit-state-notes.d.ts +32 -0
  346. package/dist/gates/i-unit-state-notes.d.ts.map +1 -0
  347. package/dist/gates/i-unit-state-notes.js +1 -0
  348. package/dist/gates/incomplete-registry-inventory.d.ts +19 -0
  349. package/dist/gates/incomplete-registry-inventory.d.ts.map +1 -0
  350. package/dist/gates/incomplete-registry-inventory.js +63 -0
  351. package/dist/gates/measure-registration-roles.d.ts +10 -0
  352. package/dist/gates/measure-registration-roles.d.ts.map +1 -0
  353. package/dist/gates/measure-registration-roles.js +9 -0
  354. package/dist/gates/plane-verdict.d.ts +14 -0
  355. package/dist/gates/plane-verdict.d.ts.map +1 -0
  356. package/dist/gates/plane-verdict.js +22 -0
  357. package/dist/gates/qualify-clean-for-units.d.ts +12 -0
  358. package/dist/gates/qualify-clean-for-units.d.ts.map +1 -0
  359. package/dist/gates/qualify-clean-for-units.js +18 -0
  360. package/dist/gates/registration-graph-verdict.d.ts +34 -0
  361. package/dist/gates/registration-graph-verdict.d.ts.map +1 -0
  362. package/dist/gates/registration-graph-verdict.js +70 -0
  363. package/dist/gates/registration-roles.d.ts +9 -0
  364. package/dist/gates/registration-roles.d.ts.map +1 -0
  365. package/dist/gates/registration-roles.js +1 -0
  366. package/dist/gates/registry-liveness.d.ts +11 -0
  367. package/dist/gates/registry-liveness.d.ts.map +1 -0
  368. package/dist/gates/registry-liveness.js +13 -0
  369. package/dist/gates/rule-coverage.d.ts +187 -4
  370. package/dist/gates/rule-coverage.d.ts.map +1 -1
  371. package/dist/gates/rule-coverage.js +501 -49
  372. package/dist/gates/run-gate-planes.d.ts +14 -0
  373. package/dist/gates/run-gate-planes.d.ts.map +1 -1
  374. package/dist/gates/run-gate-planes.js +172 -30
  375. package/dist/gates/scaffold-selftest.d.ts +56 -0
  376. package/dist/gates/scaffold-selftest.d.ts.map +1 -0
  377. package/dist/gates/scaffold-selftest.js +119 -0
  378. package/dist/gates/seam-rejected-rules.d.ts +28 -0
  379. package/dist/gates/seam-rejected-rules.d.ts.map +1 -0
  380. package/dist/gates/seam-rejected-rules.js +95 -0
  381. package/dist/gates/self-test-check.d.ts +29 -0
  382. package/dist/gates/self-test-check.d.ts.map +1 -0
  383. package/dist/gates/self-test-check.js +1 -0
  384. package/dist/gates/self-test-subject.d.ts +28 -0
  385. package/dist/gates/self-test-subject.d.ts.map +1 -0
  386. package/dist/gates/self-test-subject.js +1 -0
  387. package/dist/gates/self-test.d.ts +20 -0
  388. package/dist/gates/self-test.d.ts.map +1 -0
  389. package/dist/gates/self-test.js +82 -0
  390. package/dist/gates/settle-verdict.d.ts +14 -0
  391. package/dist/gates/settle-verdict.d.ts.map +1 -0
  392. package/dist/gates/settle-verdict.js +13 -0
  393. package/dist/gates/settled-verdict.d.ts +8 -0
  394. package/dist/gates/settled-verdict.d.ts.map +1 -0
  395. package/dist/gates/settled-verdict.js +1 -0
  396. package/dist/gates/template-registry-coverage.d.ts +18 -0
  397. package/dist/gates/template-registry-coverage.d.ts.map +1 -0
  398. package/dist/gates/template-registry-coverage.js +24 -0
  399. package/dist/gates/unit-state-notes.d.ts +40 -0
  400. package/dist/gates/unit-state-notes.d.ts.map +1 -0
  401. package/dist/gates/unit-state-notes.js +71 -0
  402. package/dist/gates/verdict-line.d.ts +18 -0
  403. package/dist/gates/verdict-line.d.ts.map +1 -0
  404. package/dist/gates/verdict-line.js +40 -0
  405. package/dist/graph/graph-reuse-lookup.d.ts +10 -0
  406. package/dist/graph/graph-reuse-lookup.d.ts.map +1 -0
  407. package/dist/graph/graph-reuse-lookup.js +41 -0
  408. package/dist/graph/index-behind-hint.d.ts +11 -0
  409. package/dist/graph/index-behind-hint.d.ts.map +1 -0
  410. package/dist/graph/index-behind-hint.js +27 -0
  411. package/dist/knowledge/knowledge-stale-gate-flags.d.ts +3 -0
  412. package/dist/knowledge/knowledge-stale-gate-flags.d.ts.map +1 -0
  413. package/dist/knowledge/knowledge-stale-gate-flags.js +1 -0
  414. package/dist/knowledge/knowledge-stale-gate-input.d.ts +3 -0
  415. package/dist/knowledge/knowledge-stale-gate-input.d.ts.map +1 -0
  416. package/dist/knowledge/knowledge-stale-gate-input.js +1 -0
  417. package/dist/knowledge/knowledge-stale-gate-result.d.ts +3 -0
  418. package/dist/knowledge/knowledge-stale-gate-result.d.ts.map +1 -0
  419. package/dist/knowledge/knowledge-stale-gate-result.js +1 -0
  420. package/dist/knowledge/knowledge-stale-gate.d.ts +10 -0
  421. package/dist/knowledge/knowledge-stale-gate.d.ts.map +1 -0
  422. package/dist/knowledge/knowledge-stale-gate.js +9 -0
  423. package/dist/main.d.ts.map +1 -1
  424. package/dist/main.js +200 -83
  425. package/dist/output/failure-hints.d.ts.map +1 -1
  426. package/dist/output/failure-hints.js +11 -9
  427. package/dist/output/rejected-entries-note.d.ts +57 -0
  428. package/dist/output/rejected-entries-note.d.ts.map +1 -0
  429. package/dist/output/rejected-entries-note.js +103 -0
  430. package/dist/output/stdout-is-pipe.d.ts +13 -0
  431. package/dist/output/stdout-is-pipe.d.ts.map +1 -0
  432. package/dist/output/stdout-is-pipe.js +21 -0
  433. package/dist/packs/stale-build-warning.d.ts +11 -0
  434. package/dist/packs/stale-build-warning.d.ts.map +1 -0
  435. package/dist/packs/stale-build-warning.js +23 -0
  436. package/dist/quality/run-quality.d.ts +123 -0
  437. package/dist/quality/run-quality.d.ts.map +1 -0
  438. package/dist/quality/run-quality.js +442 -0
  439. package/dist/schemas/json-schemas.d.ts +184 -3
  440. package/dist/schemas/json-schemas.d.ts.map +1 -1
  441. package/dist/schemas/json-schemas.js +113 -2
  442. package/dist/shrk.d.ts +3 -0
  443. package/dist/shrk.d.ts.map +1 -0
  444. package/dist/shrk.js +30 -0
  445. package/dist/surface/audience-applicability.d.ts +26 -0
  446. package/dist/surface/audience-applicability.d.ts.map +1 -0
  447. package/dist/surface/audience-applicability.js +60 -0
  448. package/dist/surface/catalog-command-safety.d.ts +18 -0
  449. package/dist/surface/catalog-command-safety.d.ts.map +1 -0
  450. package/dist/surface/catalog-command-safety.js +62 -0
  451. package/dist/surface/cli-command-resolver.d.ts +21 -0
  452. package/dist/surface/cli-command-resolver.d.ts.map +1 -0
  453. package/dist/surface/cli-command-resolver.js +87 -0
  454. package/dist/surface/command-dispatch-kind.d.ts +20 -0
  455. package/dist/surface/command-dispatch-kind.d.ts.map +1 -0
  456. package/dist/surface/command-dispatch-kind.js +20 -0
  457. package/dist/surface/command-index-entry.d.ts +40 -0
  458. package/dist/surface/command-index-entry.d.ts.map +1 -0
  459. package/dist/surface/command-index-entry.js +1 -0
  460. package/dist/surface/command-index.d.ts +77 -0
  461. package/dist/surface/command-index.d.ts.map +1 -0
  462. package/dist/surface/command-index.js +323 -0
  463. package/dist/surface/i-command-index.d.ts +22 -0
  464. package/dist/surface/i-command-index.d.ts.map +1 -0
  465. package/dist/surface/i-command-index.js +1 -0
  466. package/dist/surface/i-command-string-context.d.ts +20 -0
  467. package/dist/surface/i-command-string-context.d.ts.map +1 -0
  468. package/dist/surface/i-command-string-context.js +1 -0
  469. package/dist/surface/i-surface-denial.d.ts +13 -0
  470. package/dist/surface/i-surface-denial.d.ts.map +1 -0
  471. package/dist/surface/i-surface-denial.js +1 -0
  472. package/dist/surface/load-surface-context.d.ts +17 -1
  473. package/dist/surface/load-surface-context.d.ts.map +1 -1
  474. package/dist/surface/load-surface-context.js +48 -10
  475. package/dist/surface/not-enabled-error.d.ts +38 -4
  476. package/dist/surface/not-enabled-error.d.ts.map +1 -1
  477. package/dist/surface/not-enabled-error.js +96 -6
  478. package/dist/surface/profiles.d.ts +7 -0
  479. package/dist/surface/profiles.d.ts.map +1 -1
  480. package/dist/surface/resolve-command-string.d.ts +10 -0
  481. package/dist/surface/resolve-command-string.d.ts.map +1 -0
  482. package/dist/surface/resolve-command-string.js +572 -0
  483. package/dist/surface/surface-config-writer.d.ts +7 -2
  484. package/dist/surface/surface-config-writer.d.ts.map +1 -1
  485. package/dist/surface/surface-config-writer.js +25 -6
  486. package/dist/surface/surface-layer.d.ts +11 -0
  487. package/dist/surface/surface-layer.d.ts.map +1 -0
  488. package/dist/surface/surface-layer.js +11 -0
  489. package/dist/surface/surface-refusal-reason.d.ts +16 -0
  490. package/dist/surface/surface-refusal-reason.d.ts.map +1 -0
  491. package/dist/surface/surface-refusal-reason.js +16 -0
  492. package/dist/surface/surface-selector.d.ts +26 -0
  493. package/dist/surface/surface-selector.d.ts.map +1 -0
  494. package/dist/surface/surface-selector.js +42 -0
  495. package/dist/surface/surface-summary.d.ts +61 -18
  496. package/dist/surface/surface-summary.d.ts.map +1 -1
  497. package/dist/surface/surface-summary.js +147 -60
  498. package/dist/surface/tier.d.ts +85 -22
  499. package/dist/surface/tier.d.ts.map +1 -1
  500. package/dist/surface/tier.js +132 -30
  501. package/dist/usage/usage-log.d.ts +6 -1
  502. package/dist/usage/usage-log.d.ts.map +1 -1
  503. package/dist/usage/usage-log.js +7 -2
  504. package/dist/validation/run-validation-loop.d.ts +9 -0
  505. package/dist/validation/run-validation-loop.d.ts.map +1 -1
  506. package/dist/validation/run-validation-loop.js +14 -11
  507. package/dist/validation/typecheck-emitted.d.ts +8 -9
  508. package/dist/validation/typecheck-emitted.d.ts.map +1 -1
  509. package/dist/validation/typecheck-emitted.js +17 -97
  510. package/package.json +34 -34
@@ -0,0 +1,152 @@
1
+ import type { ICommandHandler, ParsedArgs } from '../command-registry.js';
2
+ import type { ICommandIndex } from '../surface/i-command-index.js';
3
+ import type { IDeclaredInvocation } from './i-declared-invocation.js';
4
+ import type { IInvocationRejection } from './invocation-rejection.js';
5
+ /**
6
+ * THE post-run unknown-flag detector (round 11 §5.2) — universal, zero
7
+ * annotation. `shrk check --tag auth` printed a green sweep at exit 0: `check`
8
+ * has no `--tag`, the parser accepted it as a flag, nothing read it. Now:
9
+ *
10
+ * - a supplied flag the handler never READ and its usage never DOCUMENTS was
11
+ * dropped → stderr names it (with the closest documented flag), and a `0`
12
+ * becomes `usageExitFor(path)`: a clean verdict over a dropped input is the
13
+ * lie. A non-zero exit is kept.
14
+ * - a documented-but-unread flag (`doctor --provider` without
15
+ * `--llm-recommendations`) NEVER changes the exit — reading a flag only in
16
+ * some modes is legitimate.
17
+ * - presentation flags (`SOFT_FLAGS`) are warned about, never escalated.
18
+ *
19
+ * Skipped when the handler declares `flags` (the pre-run guard is then
20
+ * authoritative) or `forwardsArgv` (a child process re-parses the argv, so
21
+ * this process's reads prove nothing).
22
+ */
23
+ export declare function tracksFlagReads(handler: ICommandHandler, walk: IDeclaredInvocation): boolean;
24
+ /**
25
+ * Swap `parsed.flags` / `parsed.multiFlags` for read-tracking copies (in place)
26
+ * and return a probe: the supplied flags nothing read, global flags and the
27
+ * bare `-` (stdin) sentinel excluded. Call the probe after the handler returns.
28
+ */
29
+ export declare function beginFlagReadTracking(parsed: ParsedArgs): () => string[];
30
+ /**
31
+ * Every text that documents the flags of the handler at `matchedPath` AS ITS
32
+ * USAGE records them: its usage, every declared subverb's usage (nested), and
33
+ * — from the command index — the usage, catalog row and folded flag variants of
34
+ * every entry at or below the path. Wider documentation only ever makes the
35
+ * detector quieter.
36
+ *
37
+ * This is the HANDLER-WIDE union — what `r75-flag-read-ledger` holds the
38
+ * ledger against ("is this flag named anywhere for this handler?"). It is
39
+ * NOT what an invocation is judged by: since round 13 a flag is a flag of the
40
+ * subverb that documents it, never of its siblings
41
+ * ({@link invocationFlagDocumentation}).
42
+ */
43
+ export declare function usageFlagDocumentation(handler: ICommandHandler, matchedPath: readonly string[], index: ICommandIndex): string[];
44
+ /**
45
+ * THE documentation an INVOCATION's flags are judged by (round 13): the usages
46
+ * along its declared-subverb walk ({@link walkedUsages}); from the command
47
+ * index, the usage, catalog row and folded variants of every entry at or below
48
+ * the handler whose path is a token prefix of the invocation (`check`, `check
49
+ * templates` for `shrk check templates …` — never `check boundaries`); and the
50
+ * handler's row of flags its code reads ({@link UNDOCUMENTED_FLAG_READS}).
51
+ *
52
+ * Before round 13 the post-run judgement read {@link flagDocumentation} — the
53
+ * whole group's — so `check --fail-on-dead-units` ran the full sweep at exit 0
54
+ * (only `check boundaries` documents the flag), and `self-config doctor
55
+ * --allow-empty` was accepted and ignored because `self-config broken-links`
56
+ * documents it. Documentation is per subverb, not per group
57
+ * ({@link settleUnreadFlags}).
58
+ */
59
+ export declare function invocationFlagDocumentation(input: {
60
+ readonly handler: ICommandHandler;
61
+ readonly matchedPath: readonly string[];
62
+ /** The positionals as the dispatcher parsed them — BEFORE the run (a handler may consume them). */
63
+ readonly positional: readonly string[];
64
+ readonly index: ICommandIndex;
65
+ }): string[];
66
+ /**
67
+ * What the post-run detector treats as the flags of the handler at
68
+ * `matchedPath`: its {@link usageFlagDocumentation}, plus the flags its code
69
+ * READS that the usage does not show yet ({@link UNDOCUMENTED_FLAG_READS}, a
70
+ * ledger locked two-way against the code by `r75-flag-read-ledger`). With
71
+ * both, a flag the detector calls "not a flag of this command" is one no code
72
+ * path of the handler reads (a flag name computed at runtime excepted), so a
73
+ * `0` over it is a dropped input — never a real flag read behind a branch
74
+ * (`export claude-md --write --force` on a fresh file wrote it, then exited 2).
75
+ */
76
+ export declare function flagDocumentation(handler: ICommandHandler, matchedPath: readonly string[], index: ICommandIndex): string[];
77
+ /** True when `--key` (or `-k` for a one-letter key) appears as a flag in any of `docs`. */
78
+ export declare function isFlagDocumented(key: string, docs: readonly string[]): boolean;
79
+ /** Every `--flag` named in `docs` — the candidates a refusal's did-you-mean picks from. */
80
+ export declare function documentedFlagNames(docs: readonly string[]): string[];
81
+ /**
82
+ * THE pre-run half of the undocumented-flag rule (round 11 review): a supplied
83
+ * flag that is not a flag of the command GROUP — named by none of its
84
+ * {@link flagDocumentation} (its usage and every declared subverb's, the
85
+ * command index at or below the path, and the two-way-locked ledger of flags
86
+ * its code reads) — is refused BEFORE the body runs. Whether a flag is
87
+ * undocumented is static, so nothing justifies running first: `baseline
88
+ * update --dry-rn` performed the bless write, then exited 3; `check --tag
89
+ * auth` printed a whole sweep first.
90
+ *
91
+ * A flag the group documents only on a SIBLING subverb is judged after the run
92
+ * instead ({@link settleUnreadFlags} with the invocation's own
93
+ * {@link invocationFlagDocumentation}, round 13): whether THIS subverb's code
94
+ * reads it is not static knowledge — a group's shared option is often
95
+ * documented on one subverb and read by all of them — so refusing it here
96
+ * would refuse real inputs. The message is THE one refusal format
97
+ * ({@link unknownFlagRefusal}).
98
+ *
99
+ * Presentation flags (`SOFT_FLAGS`) are left to the post-run warning — losing
100
+ * `--verbose` loses formatting, not an input. The index is built only when the
101
+ * handler's own usages leave a flag unexplained, so the common run pays
102
+ * nothing.
103
+ */
104
+ export declare function refuseUndocumentedFlags(input: {
105
+ readonly handler: ICommandHandler;
106
+ readonly matchedPath: readonly string[];
107
+ /** The declared walk's path — what the message and `usageExitFor` name. */
108
+ readonly label: string;
109
+ readonly parsed: ParsedArgs;
110
+ readonly index: () => ICommandIndex;
111
+ }): IInvocationRejection | undefined;
112
+ /**
113
+ * The command paths at or below `matchedPath` (other than the invocation's
114
+ * own chain) whose documentation names `key` — the sibling subverbs the
115
+ * refusal points at (`— only \`shrk check boundaries\` documents it`).
116
+ */
117
+ export declare function siblingsDocumenting(key: string, matchedPath: readonly string[], invocationPath: readonly string[], index: ICommandIndex): string[];
118
+ /**
119
+ * Judge the unread flags of a finished run against the INVOCATION's
120
+ * documentation (`documentation`: {@link invocationFlagDocumentation} — the
121
+ * subverb's own, never a sibling's):
122
+ *
123
+ * - a flag named by no documentation of the group: warned, and a `0`
124
+ * becomes `usageExitFor(path)` (the backstop for a name computed at
125
+ * runtime — the pre-run judgement refuses the rest);
126
+ * - round 13 — a flag only a SIBLING subverb documents (`groupDocumentation`
127
+ * names it, the invocation's does not) that this run never read is REFUSED
128
+ * like any dropped flag: a `0` becomes `usageExitFor(path)` on every verb,
129
+ * and on a verdict verb a `2` does too (a found failure `1` is kept).
130
+ * `check --fail-on-dead-units` ran the sweep at exit 0 (only `check
131
+ * boundaries` documents the flag); `self-config doctor --allow-empty`
132
+ * ignored it; `registrations list --fail-on-dead-units` kept its 0 with a
133
+ * warning (round 13 review — documentation is per subverb on every verb). A
134
+ * sibling-documented flag the run READ is a real input and never judged.
135
+ *
136
+ * Presentation flags (`SOFT_FLAGS`) are only ever warned about. Returns `exit`
137
+ * unchanged when nothing is judged.
138
+ */
139
+ export declare function settleUnreadFlags(input: {
140
+ readonly unread: readonly string[];
141
+ readonly path: string;
142
+ readonly documentation: readonly string[];
143
+ /** The whole group's documentation ({@link flagDocumentation}) — what tells a sibling-only flag apart. */
144
+ readonly groupDocumentation?: readonly string[];
145
+ /** Per flag key, the sibling command paths that document it — named in the message. */
146
+ readonly documentedOn?: (key: string) => readonly string[];
147
+ readonly exit: number;
148
+ readonly write?: (text: string) => void;
149
+ /** The argv the handler's args were parsed from — to name each flag as TYPED. */
150
+ readonly argv?: readonly string[];
151
+ }): number;
152
+ //# sourceMappingURL=unread-flags.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unread-flags.d.ts","sourceRoot":"","sources":["../../src/dispatch/unread-flags.ts"],"names":[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AAC;CACnC,GAAG,MAAM,CAqCT"}
@@ -0,0 +1,295 @@
1
+ import { ExitCode, isGateVerb, usageExitFor } from "../exit-codes.js";
2
+ import { GLOBAL_FLAGS, SOFT_FLAGS } from "./global-flags.js";
3
+ import { ReadTrackingMap } from "./read-tracking-map.js";
4
+ import { UNDOCUMENTED_FLAG_READS } from "./undocumented-flag-reads.js";
5
+ import { unknownFlagRefusal } from "./unknown-flag-refusal.js";
6
+ import { UnknownFlagRefusalMode } from "./unknown-flag-refusal-mode.js";
7
+ import { walkDeclaredSubverbs } from "./walk-declared-subverbs.js";
8
+ /**
9
+ * THE post-run unknown-flag detector (round 11 §5.2) — universal, zero
10
+ * annotation. `shrk check --tag auth` printed a green sweep at exit 0: `check`
11
+ * has no `--tag`, the parser accepted it as a flag, nothing read it. Now:
12
+ *
13
+ * - a supplied flag the handler never READ and its usage never DOCUMENTS was
14
+ * dropped → stderr names it (with the closest documented flag), and a `0`
15
+ * becomes `usageExitFor(path)`: a clean verdict over a dropped input is the
16
+ * lie. A non-zero exit is kept.
17
+ * - a documented-but-unread flag (`doctor --provider` without
18
+ * `--llm-recommendations`) NEVER changes the exit — reading a flag only in
19
+ * some modes is legitimate.
20
+ * - presentation flags (`SOFT_FLAGS`) are warned about, never escalated.
21
+ *
22
+ * Skipped when the handler declares `flags` (the pre-run guard is then
23
+ * authoritative) or `forwardsArgv` (a child process re-parses the argv, so
24
+ * this process's reads prove nothing).
25
+ */
26
+ export function tracksFlagReads(handler, walk) {
27
+ return handler.forwardsArgv !== true && walk.flags === undefined;
28
+ }
29
+ /**
30
+ * Swap `parsed.flags` / `parsed.multiFlags` for read-tracking copies (in place)
31
+ * and return a probe: the supplied flags nothing read, global flags and the
32
+ * bare `-` (stdin) sentinel excluded. Call the probe after the handler returns.
33
+ */
34
+ export function beginFlagReadTracking(parsed) {
35
+ const supplied = [...parsed.flags.keys()];
36
+ const flags = ReadTrackingMap.from(parsed.flags);
37
+ const multi = ReadTrackingMap.from(parsed.multiFlags);
38
+ parsed.flags = flags;
39
+ parsed.multiFlags = multi;
40
+ return () => supplied.filter((key) => key.length > 0 && !GLOBAL_FLAGS.has(key) && !flags.wasRead(key) && !multi.wasRead(key));
41
+ }
42
+ /**
43
+ * Every text that documents the flags of the handler at `matchedPath` AS ITS
44
+ * USAGE records them: its usage, every declared subverb's usage (nested), and
45
+ * — from the command index — the usage, catalog row and folded flag variants of
46
+ * every entry at or below the path. Wider documentation only ever makes the
47
+ * detector quieter.
48
+ *
49
+ * This is the HANDLER-WIDE union — what `r75-flag-read-ledger` holds the
50
+ * ledger against ("is this flag named anywhere for this handler?"). It is
51
+ * NOT what an invocation is judged by: since round 13 a flag is a flag of the
52
+ * subverb that documents it, never of its siblings
53
+ * ({@link invocationFlagDocumentation}).
54
+ */
55
+ export function usageFlagDocumentation(handler, matchedPath, index) {
56
+ const docs = declaredUsages(handler);
57
+ const prefix = matchedPath.join(' ');
58
+ for (const e of index.entries) {
59
+ if (e.path !== prefix && !e.path.startsWith(`${prefix} `))
60
+ continue;
61
+ if (e.usage)
62
+ docs.push(e.usage);
63
+ if (e.catalogEntry)
64
+ docs.push(e.catalogEntry.command);
65
+ docs.push(...e.variants);
66
+ }
67
+ return docs;
68
+ }
69
+ /** The handler's own usage and every declared subverb's (nested) — no index needed. */
70
+ function declaredUsages(handler) {
71
+ const docs = [handler.usage];
72
+ const addSpecs = (specs) => {
73
+ for (const spec of specs ?? []) {
74
+ docs.push(spec.usage);
75
+ addSpecs(spec.subverbs);
76
+ }
77
+ };
78
+ addSpecs(handler.subverbs);
79
+ return docs;
80
+ }
81
+ /** `--key`, or `-k` for a one-letter key — how a parsed flag is spelled on the command line. */
82
+ function spellFlag(key) {
83
+ return `${key.length === 1 ? '-' : '--'}${key}`;
84
+ }
85
+ /**
86
+ * The usages along an invocation's declared-subverb walk: the handler's own,
87
+ * then each walked subverb's (`check` → `check templates`). A SIBLING's usage
88
+ * never appears — `check boundaries` documenting `--fail-on-dead-units` makes
89
+ * it a flag of `check boundaries`, not of `check` or `check templates`.
90
+ */
91
+ function walkedUsages(handler, walk, matchedPath) {
92
+ const docs = [handler.usage];
93
+ let specs = handler.subverbs;
94
+ for (const name of walk.path.slice(matchedPath.length)) {
95
+ const spec = (specs ?? []).find((s) => s.name === name);
96
+ if (!spec)
97
+ break;
98
+ docs.push(spec.usage);
99
+ specs = spec.subverbs;
100
+ }
101
+ return docs;
102
+ }
103
+ /**
104
+ * THE documentation an INVOCATION's flags are judged by (round 13): the usages
105
+ * along its declared-subverb walk ({@link walkedUsages}); from the command
106
+ * index, the usage, catalog row and folded variants of every entry at or below
107
+ * the handler whose path is a token prefix of the invocation (`check`, `check
108
+ * templates` for `shrk check templates …` — never `check boundaries`); and the
109
+ * handler's row of flags its code reads ({@link UNDOCUMENTED_FLAG_READS}).
110
+ *
111
+ * Before round 13 the post-run judgement read {@link flagDocumentation} — the
112
+ * whole group's — so `check --fail-on-dead-units` ran the full sweep at exit 0
113
+ * (only `check boundaries` documents the flag), and `self-config doctor
114
+ * --allow-empty` was accepted and ignored because `self-config broken-links`
115
+ * documents it. Documentation is per subverb, not per group
116
+ * ({@link settleUnreadFlags}).
117
+ */
118
+ export function invocationFlagDocumentation(input) {
119
+ const walk = walkDeclaredSubverbs(input.handler, input.matchedPath, input.positional);
120
+ const docs = walkedUsages(input.handler, walk, input.matchedPath);
121
+ const tokens = [...walk.path, ...input.positional.slice(walk.consumed)];
122
+ for (const e of input.index.entries) {
123
+ if (e.tokens.length < input.matchedPath.length || e.tokens.length > tokens.length)
124
+ continue;
125
+ if (e.tokens.some((t, i) => t !== tokens[i]))
126
+ continue;
127
+ if (e.usage)
128
+ docs.push(e.usage);
129
+ if (e.catalogEntry)
130
+ docs.push(e.catalogEntry.command);
131
+ docs.push(...e.variants);
132
+ }
133
+ const read = UNDOCUMENTED_FLAG_READS.get(input.matchedPath.join(' '));
134
+ if (read !== undefined && read.length > 0)
135
+ docs.push(read.map(spellFlag).join(' '));
136
+ return docs;
137
+ }
138
+ /**
139
+ * What the post-run detector treats as the flags of the handler at
140
+ * `matchedPath`: its {@link usageFlagDocumentation}, plus the flags its code
141
+ * READS that the usage does not show yet ({@link UNDOCUMENTED_FLAG_READS}, a
142
+ * ledger locked two-way against the code by `r75-flag-read-ledger`). With
143
+ * both, a flag the detector calls "not a flag of this command" is one no code
144
+ * path of the handler reads (a flag name computed at runtime excepted), so a
145
+ * `0` over it is a dropped input — never a real flag read behind a branch
146
+ * (`export claude-md --write --force` on a fresh file wrote it, then exited 2).
147
+ */
148
+ export function flagDocumentation(handler, matchedPath, index) {
149
+ const docs = usageFlagDocumentation(handler, matchedPath, index);
150
+ const read = UNDOCUMENTED_FLAG_READS.get(matchedPath.join(' '));
151
+ if (read !== undefined && read.length > 0)
152
+ docs.push(read.map(spellFlag).join(' '));
153
+ return docs;
154
+ }
155
+ function escapeRegExp(text) {
156
+ return text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
157
+ }
158
+ /** True when `--key` (or `-k` for a one-letter key) appears as a flag in any of `docs`. */
159
+ export function isFlagDocumented(key, docs) {
160
+ const dashes = key.length === 1 ? '-' : '--';
161
+ const re = new RegExp(`(^|[^A-Za-z0-9-])${dashes}${escapeRegExp(key)}(?![A-Za-z0-9-])`);
162
+ return docs.some((d) => re.test(d));
163
+ }
164
+ /** Every `--flag` named in `docs` — the candidates a refusal's did-you-mean picks from. */
165
+ export function documentedFlagNames(docs) {
166
+ const names = new Set();
167
+ for (const d of docs) {
168
+ for (const m of d.matchAll(/(?:^|[^A-Za-z0-9-])--([a-z0-9][a-z0-9-]*)/gi)) {
169
+ if (m[1])
170
+ names.add(m[1]);
171
+ }
172
+ }
173
+ return [...names];
174
+ }
175
+ /**
176
+ * THE pre-run half of the undocumented-flag rule (round 11 review): a supplied
177
+ * flag that is not a flag of the command GROUP — named by none of its
178
+ * {@link flagDocumentation} (its usage and every declared subverb's, the
179
+ * command index at or below the path, and the two-way-locked ledger of flags
180
+ * its code reads) — is refused BEFORE the body runs. Whether a flag is
181
+ * undocumented is static, so nothing justifies running first: `baseline
182
+ * update --dry-rn` performed the bless write, then exited 3; `check --tag
183
+ * auth` printed a whole sweep first.
184
+ *
185
+ * A flag the group documents only on a SIBLING subverb is judged after the run
186
+ * instead ({@link settleUnreadFlags} with the invocation's own
187
+ * {@link invocationFlagDocumentation}, round 13): whether THIS subverb's code
188
+ * reads it is not static knowledge — a group's shared option is often
189
+ * documented on one subverb and read by all of them — so refusing it here
190
+ * would refuse real inputs. The message is THE one refusal format
191
+ * ({@link unknownFlagRefusal}).
192
+ *
193
+ * Presentation flags (`SOFT_FLAGS`) are left to the post-run warning — losing
194
+ * `--verbose` loses formatting, not an input. The index is built only when the
195
+ * handler's own usages leave a flag unexplained, so the common run pays
196
+ * nothing.
197
+ */
198
+ export function refuseUndocumentedFlags(input) {
199
+ const supplied = [...input.parsed.flags.keys()].filter((key) => key.length > 0 && !GLOBAL_FLAGS.has(key) && !SOFT_FLAGS.has(key));
200
+ if (supplied.length === 0)
201
+ return undefined;
202
+ const own = declaredUsages(input.handler);
203
+ const unsure = supplied.filter((key) => !isFlagDocumented(key, own));
204
+ if (unsure.length === 0)
205
+ return undefined;
206
+ const docs = flagDocumentation(input.handler, input.matchedPath, input.index());
207
+ const undocumented = unsure.filter((key) => !isFlagDocumented(key, docs));
208
+ if (undocumented.length === 0)
209
+ return undefined;
210
+ return unknownFlagRefusal({
211
+ label: input.label,
212
+ flags: undocumented,
213
+ known: documentedFlagNames(docs),
214
+ argv: input.parsed.argv,
215
+ exitCode: usageExitFor(input.label),
216
+ });
217
+ }
218
+ /**
219
+ * The command paths at or below `matchedPath` (other than the invocation's
220
+ * own chain) whose documentation names `key` — the sibling subverbs the
221
+ * refusal points at (`— only \`shrk check boundaries\` documents it`).
222
+ */
223
+ export function siblingsDocumenting(key, matchedPath, invocationPath, index) {
224
+ const prefix = matchedPath.join(' ');
225
+ const own = new Set(invocationPath.map((_, i) => invocationPath.slice(0, i + 1).join(' ')));
226
+ const out = [];
227
+ for (const e of index.entries) {
228
+ if (e.path !== prefix && !e.path.startsWith(`${prefix} `))
229
+ continue;
230
+ if (own.has(e.path))
231
+ continue;
232
+ const docs = [e.usage ?? '', e.catalogEntry?.command ?? '', ...e.variants];
233
+ if (isFlagDocumented(key, docs))
234
+ out.push(e.path);
235
+ }
236
+ return out.slice(0, 3);
237
+ }
238
+ /**
239
+ * Judge the unread flags of a finished run against the INVOCATION's
240
+ * documentation (`documentation`: {@link invocationFlagDocumentation} — the
241
+ * subverb's own, never a sibling's):
242
+ *
243
+ * - a flag named by no documentation of the group: warned, and a `0`
244
+ * becomes `usageExitFor(path)` (the backstop for a name computed at
245
+ * runtime — the pre-run judgement refuses the rest);
246
+ * - round 13 — a flag only a SIBLING subverb documents (`groupDocumentation`
247
+ * names it, the invocation's does not) that this run never read is REFUSED
248
+ * like any dropped flag: a `0` becomes `usageExitFor(path)` on every verb,
249
+ * and on a verdict verb a `2` does too (a found failure `1` is kept).
250
+ * `check --fail-on-dead-units` ran the sweep at exit 0 (only `check
251
+ * boundaries` documents the flag); `self-config doctor --allow-empty`
252
+ * ignored it; `registrations list --fail-on-dead-units` kept its 0 with a
253
+ * warning (round 13 review — documentation is per subverb on every verb). A
254
+ * sibling-documented flag the run READ is a real input and never judged.
255
+ *
256
+ * Presentation flags (`SOFT_FLAGS`) are only ever warned about. Returns `exit`
257
+ * unchanged when nothing is judged.
258
+ */
259
+ export function settleUnreadFlags(input) {
260
+ const write = input.write ?? ((text) => void process.stderr.write(text));
261
+ const undocumented = input.unread.filter((key) => !isFlagDocumented(key, input.documentation));
262
+ if (undocumented.length === 0)
263
+ return input.exit;
264
+ const group = input.groupDocumentation;
265
+ const siblingOnly = new Set(group ? undocumented.filter((key) => isFlagDocumented(key, group)) : []);
266
+ const dropped = undocumented.filter((key) => !SOFT_FLAGS.has(key));
267
+ const droppedNowhere = dropped.filter((key) => !siblingOnly.has(key));
268
+ const droppedSibling = dropped.filter((key) => siblingOnly.has(key));
269
+ const code = usageExitFor(input.path);
270
+ // A flag the invocation's documentation does not name is a dropped input
271
+ // whether NO subverb documents it or only a SIBLING does — both are "not a
272
+ // flag of this command": a `0` over it is refused on every verb. On a
273
+ // verdict verb a sibling-only flag refuses a `2` too (a NOT VERIFIED that
274
+ // silently dropped `--allow-empty` reads as the verb's own answer).
275
+ const refuse = input.exit !== code &&
276
+ ((input.exit === ExitCode.VerifiedPass && dropped.length > 0) ||
277
+ (droppedSibling.length > 0 && isGateVerb(input.path) && input.exit !== ExitCode.Failure));
278
+ const final = refuse ? code : input.exit;
279
+ const documentedOn = {};
280
+ for (const key of siblingOnly) {
281
+ const owners = input.documentedOn?.(key) ?? [];
282
+ if (owners.length > 0)
283
+ documentedOn[key] = owners;
284
+ }
285
+ write(unknownFlagRefusal({
286
+ label: input.path,
287
+ flags: undocumented,
288
+ known: documentedFlagNames(input.documentation),
289
+ documentedOn,
290
+ ...(input.argv !== undefined ? { argv: input.argv } : {}),
291
+ exitCode: final,
292
+ mode: refuse ? UnknownFlagRefusalMode.RefusedAfterRun : UnknownFlagRefusalMode.WarnedAfterRun,
293
+ }).message);
294
+ return final;
295
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The VERDICT-VALVE flags (round 13, K1) — the closed set of flags that change
3
+ * what a verdict verb's exit MEANS: a gap it accepts (`--allow-empty`,
4
+ * `--min-referenced`) or a unit it fails on (`--fail-on-dead-units`,
5
+ * `--fail-on`). None is a global flag.
6
+ *
7
+ * A valve flag the resolved subverb does not document is refused BEFORE the run
8
+ * (`refuseSiblingValveFlags`, inside the one `judgeInvocation`): a run that
9
+ * ignored a valve reads as the verb's own answer — `shrk check
10
+ * --fail-on-dead-units` printed the whole sweep and only then exited 3. Every
11
+ * other sibling-documented flag keeps the post-run judgement, because whether
12
+ * a subverb's code reads a shared option is not static knowledge; a valve is
13
+ * the one kind whose reader is always the documenting verb.
14
+ */
15
+ export declare enum VerdictValveFlag {
16
+ FailOnDeadUnits = "fail-on-dead-units",
17
+ AllowEmpty = "allow-empty",
18
+ MinReferenced = "min-referenced",
19
+ FailOn = "fail-on"
20
+ }
21
+ //# sourceMappingURL=verdict-valve-flag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verdict-valve-flag.d.ts","sourceRoot":"","sources":["../../src/dispatch/verdict-valve-flag.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,oBAAY,gBAAgB;IAC1B,eAAe,uBAAuB;IACtC,UAAU,gBAAgB;IAC1B,aAAa,mBAAmB;IAChC,MAAM,YAAY;CACnB"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The VERDICT-VALVE flags (round 13, K1) — the closed set of flags that change
3
+ * what a verdict verb's exit MEANS: a gap it accepts (`--allow-empty`,
4
+ * `--min-referenced`) or a unit it fails on (`--fail-on-dead-units`,
5
+ * `--fail-on`). None is a global flag.
6
+ *
7
+ * A valve flag the resolved subverb does not document is refused BEFORE the run
8
+ * (`refuseSiblingValveFlags`, inside the one `judgeInvocation`): a run that
9
+ * ignored a valve reads as the verb's own answer — `shrk check
10
+ * --fail-on-dead-units` printed the whole sweep and only then exited 3. Every
11
+ * other sibling-documented flag keeps the post-run judgement, because whether
12
+ * a subverb's code reads a shared option is not static knowledge; a valve is
13
+ * the one kind whose reader is always the documenting verb.
14
+ */
15
+ export var VerdictValveFlag;
16
+ (function (VerdictValveFlag) {
17
+ VerdictValveFlag["FailOnDeadUnits"] = "fail-on-dead-units";
18
+ VerdictValveFlag["AllowEmpty"] = "allow-empty";
19
+ VerdictValveFlag["MinReferenced"] = "min-referenced";
20
+ VerdictValveFlag["FailOn"] = "fail-on";
21
+ })(VerdictValveFlag || (VerdictValveFlag = {}));
@@ -0,0 +1,14 @@
1
+ import type { ICommandHandler } from '../command-registry.js';
2
+ import type { IDeclaredInvocation } from './i-declared-invocation.js';
3
+ /**
4
+ * Walk `positional` through the subverbs `handler` DECLARES (nested ones
5
+ * included): each positional naming a declared subverb (or one of its aliases)
6
+ * descends one level; the first that does not stops the walk. The declared flag
7
+ * sets met on the way are unioned — `graph` declares none, `graph cycles`
8
+ * declares its own, so `graph cycles --x` is judged against the cycles set.
9
+ *
10
+ * Pure; the dispatcher guard, the help topic and the post-run detector all
11
+ * read the same walk, so they cannot disagree about which subverb ran.
12
+ */
13
+ export declare function walkDeclaredSubverbs(handler: ICommandHandler, matchedPath: readonly string[], positional: readonly string[]): IDeclaredInvocation;
14
+ //# sourceMappingURL=walk-declared-subverbs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"walk-declared-subverbs.d.ts","sourceRoot":"","sources":["../../src/dispatch/walk-declared-subverbs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,UAAU,EAAE,SAAS,MAAM,EAAE,GAC5B,mBAAmB,CAiBrB"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Walk `positional` through the subverbs `handler` DECLARES (nested ones
3
+ * included): each positional naming a declared subverb (or one of its aliases)
4
+ * descends one level; the first that does not stops the walk. The declared flag
5
+ * sets met on the way are unioned — `graph` declares none, `graph cycles`
6
+ * declares its own, so `graph cycles --x` is judged against the cycles set.
7
+ *
8
+ * Pure; the dispatcher guard, the help topic and the post-run detector all
9
+ * read the same walk, so they cannot disagree about which subverb ran.
10
+ */
11
+ export function walkDeclaredSubverbs(handler, matchedPath, positional) {
12
+ const path = [...matchedPath];
13
+ let level = handler;
14
+ let flags = handler.flags ? new Set(handler.flags) : undefined;
15
+ let consumed = 0;
16
+ while (consumed < positional.length) {
17
+ const token = positional[consumed];
18
+ const match = (level.subverbs ?? []).find((s) => s.name === token || (s.aliases ?? []).includes(token));
19
+ if (!match)
20
+ break;
21
+ path.push(match.name);
22
+ level = match;
23
+ if (match.flags)
24
+ flags = new Set([...(flags ?? []), ...match.flags]);
25
+ consumed += 1;
26
+ }
27
+ return { path, level, consumed, ...(flags ? { flags } : {}) };
28
+ }
@@ -62,13 +62,51 @@ export declare function argvHasStrict(argv: readonly string[]): boolean;
62
62
  * channel the pipe can't swallow. See {@link emitPipeExitSignal}.
63
63
  */
64
64
  export declare function argvHasExitTrailer(argv: readonly string[]): boolean;
65
+ /**
66
+ * THE verdict-verb registry: command paths (space-joined, as `runCli` derives
67
+ * them with `extractCommandPath(argv, VERDICT_PATH_TOKENS)` — at most THREE
68
+ * leading positional tokens) whose exit code is an HONEST verdict an agent
69
+ * chains on — the set for which a masked exit is a real hazard.
70
+ *
71
+ * Register the SHORTEST path that is a verdict and nothing wider: `docs
72
+ * references check` is three tokens because its siblings `docs references
73
+ * list` / `explain` are informational, and registering `docs references` would
74
+ * make them verdict verbs too (the trailer would print `shrk-exit: 0` for a
75
+ * listing). A two-token entry covers every deeper path under it.
76
+ *
77
+ * Membership enables {@link emitPipeExitSignal}'s stderr note and the
78
+ * `--exit-trailer` line, never behaviour. It is also the list the round-11
79
+ * contract test iterates: every entry must have a row in
80
+ * `r75-verdict-coverage-contract.test.ts`, every verb that builds a gate
81
+ * envelope must be in here, and every CLI file that settles a verdict through
82
+ * `settleVerdict(` names its verbs (each registered) or a reasoned exemption in
83
+ * that test's two-way settle-site ledger. A NEW verdict verb therefore adds itself here, or
84
+ * CI fails — the registry and the contract cannot drift apart.
85
+ */
86
+ export declare const GATE_VERB_PATHS: ReadonlySet<string>;
87
+ /**
88
+ * How many leading positional tokens `runCli` reads to decide whether a verb is
89
+ * a verdict verb — the deepest {@link GATE_VERB_PATHS} entry. (Usage logging
90
+ * keeps its own two-token paths; this only feeds {@link emitPipeExitSignal}.)
91
+ */
92
+ export declare const VERDICT_PATH_TOKENS = 3;
65
93
  /**
66
94
  * Is `commandPath` (space-joined, e.g. `check boundaries` / `wiring unprovided`
67
- * / `finish`) a gate/verify verb whose exit code carries a chained verdict?
68
- * Matches the exact path, its first-two-token subverb, or its top-level verb —
69
- * so `check boundaries --json` (2 tokens) and a bare `finish` (1) both resolve.
95
+ * / `finish` / `docs references check`) a gate/verify verb whose exit code
96
+ * carries a chained verdict? Matches the exact path or any of its one-, two- or
97
+ * three-token prefixes — so `check boundaries --json`, a bare `finish` and
98
+ * `graph why a b` all resolve, while `docs references list` does not.
70
99
  */
71
100
  export declare function isGateVerb(commandPath: string): boolean;
101
+ /**
102
+ * The exit code for a malformed invocation of `commandPath` — an unknown
103
+ * subcommand, an unknown flag, a verb-shaped token that is no subverb and no
104
+ * file, an input the command silently ignored. THE documented split: `3`
105
+ * (UsageError) on a verdict verb, whose `2` must keep meaning "ran but proved
106
+ * nothing"; `2` everywhere else. The dispatcher guard and the post-run
107
+ * unknown-flag detector both read it, so one invocation mistake exits one way.
108
+ */
109
+ export declare function usageExitFor(commandPath: string): number;
72
110
  /**
73
111
  * True when the argv carries the global `--no-hints` (before the `--`
74
112
  * sentinel). Suppresses advisory one-liners like the piped-exit note while
@@ -1 +1 @@
1
- {"version":3,"file":"exit-codes.d.ts","sourceRoot":"","sources":["../src/exit-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,oBAAY,QAAQ;IAClB,YAAY,IAAI;IAChB,OAAO,IAAI;IACX,WAAW,IAAI;IACf,UAAU,IAAI;CACf;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,CAGtE;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAM9D;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAMnE;AA4BD;;;;;GAKG;AACH,wBAAgB,UAAU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