@vibe-agent-toolkit/cli 0.2.0-rc.10 → 0.2.0-rc.12

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 (755) hide show
  1. package/README.md +3 -3
  2. package/dist/bin/supervise-cli.d.ts +45 -0
  3. package/dist/bin/supervise-cli.d.ts.map +1 -0
  4. package/dist/bin/supervise-cli.js +83 -0
  5. package/dist/bin/supervise-cli.js.map +1 -0
  6. package/dist/bin/vat +94 -40
  7. package/dist/bin/vat.d.ts +15 -4
  8. package/dist/bin/vat.d.ts.map +1 -1
  9. package/dist/bin/vat.js +94 -40
  10. package/dist/bin/vat.js.map +1 -1
  11. package/dist/bin.js +21 -29
  12. package/dist/bin.js.map +1 -1
  13. package/dist/command-tree.d.ts +45 -0
  14. package/dist/command-tree.d.ts.map +1 -0
  15. package/dist/command-tree.js +60 -0
  16. package/dist/command-tree.js.map +1 -0
  17. package/dist/commands/agent/build-schema.d.ts +100 -0
  18. package/dist/commands/agent/build-schema.d.ts.map +1 -0
  19. package/dist/commands/agent/build-schema.js +32 -0
  20. package/dist/commands/agent/build-schema.js.map +1 -0
  21. package/dist/commands/agent/build.d.ts +1 -0
  22. package/dist/commands/agent/build.d.ts.map +1 -1
  23. package/dist/commands/agent/build.js +63 -33
  24. package/dist/commands/agent/build.js.map +1 -1
  25. package/dist/commands/agent/import-schema.d.ts +75 -0
  26. package/dist/commands/agent/import-schema.d.ts.map +1 -0
  27. package/dist/commands/agent/import-schema.js +25 -0
  28. package/dist/commands/agent/import-schema.js.map +1 -0
  29. package/dist/commands/agent/import.d.ts.map +1 -1
  30. package/dist/commands/agent/import.js +33 -27
  31. package/dist/commands/agent/import.js.map +1 -1
  32. package/dist/commands/agent/index.d.ts.map +1 -1
  33. package/dist/commands/agent/index.js +132 -37
  34. package/dist/commands/agent/index.js.map +1 -1
  35. package/dist/commands/agent/install-path.d.ts.map +1 -1
  36. package/dist/commands/agent/install-path.js +2 -1
  37. package/dist/commands/agent/install-path.js.map +1 -1
  38. package/dist/commands/agent/install-schema.d.ts +89 -0
  39. package/dist/commands/agent/install-schema.d.ts.map +1 -0
  40. package/dist/commands/agent/install-schema.js +29 -0
  41. package/dist/commands/agent/install-schema.js.map +1 -0
  42. package/dist/commands/agent/install.d.ts +7 -1
  43. package/dist/commands/agent/install.d.ts.map +1 -1
  44. package/dist/commands/agent/install.js +78 -108
  45. package/dist/commands/agent/install.js.map +1 -1
  46. package/dist/commands/agent/installed-schema.d.ts +140 -0
  47. package/dist/commands/agent/installed-schema.d.ts.map +1 -0
  48. package/dist/commands/agent/installed-schema.js +36 -0
  49. package/dist/commands/agent/installed-schema.js.map +1 -0
  50. package/dist/commands/agent/installed.d.ts +1 -1
  51. package/dist/commands/agent/installed.d.ts.map +1 -1
  52. package/dist/commands/agent/installed.js +104 -75
  53. package/dist/commands/agent/installed.js.map +1 -1
  54. package/dist/commands/agent/list-schema.d.ts +128 -0
  55. package/dist/commands/agent/list-schema.d.ts.map +1 -0
  56. package/dist/commands/agent/list-schema.js +34 -0
  57. package/dist/commands/agent/list-schema.js.map +1 -0
  58. package/dist/commands/agent/list.d.ts +4 -3
  59. package/dist/commands/agent/list.d.ts.map +1 -1
  60. package/dist/commands/agent/list.js +50 -37
  61. package/dist/commands/agent/list.js.map +1 -1
  62. package/dist/commands/agent/run.d.ts +3 -0
  63. package/dist/commands/agent/run.d.ts.map +1 -1
  64. package/dist/commands/agent/run.js +8 -3
  65. package/dist/commands/agent/run.js.map +1 -1
  66. package/dist/commands/agent/uninstall-schema.d.ts +89 -0
  67. package/dist/commands/agent/uninstall-schema.d.ts.map +1 -0
  68. package/dist/commands/agent/uninstall-schema.js +29 -0
  69. package/dist/commands/agent/uninstall-schema.js.map +1 -0
  70. package/dist/commands/agent/uninstall.d.ts +5 -1
  71. package/dist/commands/agent/uninstall.d.ts.map +1 -1
  72. package/dist/commands/agent/uninstall.js +50 -38
  73. package/dist/commands/agent/uninstall.js.map +1 -1
  74. package/dist/commands/agent/validate-schema.d.ts +129 -0
  75. package/dist/commands/agent/validate-schema.d.ts.map +1 -0
  76. package/dist/commands/agent/validate-schema.js +35 -0
  77. package/dist/commands/agent/validate-schema.js.map +1 -0
  78. package/dist/commands/agent/validate.d.ts +6 -0
  79. package/dist/commands/agent/validate.d.ts.map +1 -1
  80. package/dist/commands/agent/validate.js +64 -36
  81. package/dist/commands/agent/validate.js.map +1 -1
  82. package/dist/commands/ard/emit-schema.d.ts +108 -0
  83. package/dist/commands/ard/emit-schema.d.ts.map +1 -0
  84. package/dist/commands/ard/emit-schema.js +37 -0
  85. package/dist/commands/ard/emit-schema.js.map +1 -0
  86. package/dist/commands/ard/emit.d.ts +31 -63
  87. package/dist/commands/ard/emit.d.ts.map +1 -1
  88. package/dist/commands/ard/emit.js +124 -68
  89. package/dist/commands/ard/emit.js.map +1 -1
  90. package/dist/commands/ard/index.d.ts.map +1 -1
  91. package/dist/commands/ard/index.js +17 -10
  92. package/dist/commands/ard/index.js.map +1 -1
  93. package/dist/commands/audit/compat-lane-findings.d.ts +65 -0
  94. package/dist/commands/audit/compat-lane-findings.d.ts.map +1 -0
  95. package/dist/commands/audit/compat-lane-findings.js +72 -0
  96. package/dist/commands/audit/compat-lane-findings.js.map +1 -0
  97. package/dist/commands/audit/distributed-tree.d.ts +2 -2
  98. package/dist/commands/audit/distributed-tree.d.ts.map +1 -1
  99. package/dist/commands/audit/distributed-tree.js +23 -12
  100. package/dist/commands/audit/distributed-tree.js.map +1 -1
  101. package/dist/commands/audit/git-url-clone.d.ts +15 -7
  102. package/dist/commands/audit/git-url-clone.d.ts.map +1 -1
  103. package/dist/commands/audit/git-url-clone.js +85 -42
  104. package/dist/commands/audit/git-url-clone.js.map +1 -1
  105. package/dist/commands/audit/hierarchical-output.d.ts +28 -4
  106. package/dist/commands/audit/hierarchical-output.d.ts.map +1 -1
  107. package/dist/commands/audit/hierarchical-output.js +44 -27
  108. package/dist/commands/audit/hierarchical-output.js.map +1 -1
  109. package/dist/commands/audit/scan-population.d.ts.map +1 -1
  110. package/dist/commands/audit/scan-population.js +2 -1
  111. package/dist/commands/audit/scan-population.js.map +1 -1
  112. package/dist/commands/audit-schema.d.ts +1247 -0
  113. package/dist/commands/audit-schema.d.ts.map +1 -0
  114. package/dist/commands/audit-schema.js +139 -0
  115. package/dist/commands/audit-schema.js.map +1 -0
  116. package/dist/commands/audit-settings-schema.d.ts +417 -0
  117. package/dist/commands/audit-settings-schema.d.ts.map +1 -0
  118. package/dist/commands/audit-settings-schema.js +77 -0
  119. package/dist/commands/audit-settings-schema.js.map +1 -0
  120. package/dist/commands/audit-settings.d.ts +28 -9
  121. package/dist/commands/audit-settings.d.ts.map +1 -1
  122. package/dist/commands/audit-settings.js +215 -151
  123. package/dist/commands/audit-settings.js.map +1 -1
  124. package/dist/commands/audit.d.ts +72 -33
  125. package/dist/commands/audit.d.ts.map +1 -1
  126. package/dist/commands/audit.js +415 -397
  127. package/dist/commands/audit.js.map +1 -1
  128. package/dist/commands/build.d.ts +61 -4
  129. package/dist/commands/build.d.ts.map +1 -1
  130. package/dist/commands/build.js +176 -190
  131. package/dist/commands/build.js.map +1 -1
  132. package/dist/commands/cache/clear-schema.d.ts +111 -0
  133. package/dist/commands/cache/clear-schema.d.ts.map +1 -0
  134. package/dist/commands/cache/clear-schema.js +37 -0
  135. package/dist/commands/cache/clear-schema.js.map +1 -0
  136. package/dist/commands/cache/clear.d.ts +28 -26
  137. package/dist/commands/cache/clear.d.ts.map +1 -1
  138. package/dist/commands/cache/clear.js +108 -103
  139. package/dist/commands/cache/clear.js.map +1 -1
  140. package/dist/commands/cache/index.d.ts.map +1 -1
  141. package/dist/commands/cache/index.js +13 -7
  142. package/dist/commands/cache/index.js.map +1 -1
  143. package/dist/commands/claude/claude-config.d.ts +23 -6
  144. package/dist/commands/claude/claude-config.d.ts.map +1 -1
  145. package/dist/commands/claude/claude-config.js +29 -15
  146. package/dist/commands/claude/claude-config.js.map +1 -1
  147. package/dist/commands/claude/context.d.ts +87 -2
  148. package/dist/commands/claude/context.d.ts.map +1 -1
  149. package/dist/commands/claude/context.js +116 -57
  150. package/dist/commands/claude/context.js.map +1 -1
  151. package/dist/commands/claude/marketplace/changelog-utils.js +2 -2
  152. package/dist/commands/claude/marketplace/changelog-utils.js.map +1 -1
  153. package/dist/commands/claude/marketplace/git-publish.d.ts +14 -1
  154. package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
  155. package/dist/commands/claude/marketplace/git-publish.js +135 -68
  156. package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
  157. package/dist/commands/claude/marketplace/license-utils.d.ts +3 -5
  158. package/dist/commands/claude/marketplace/license-utils.d.ts.map +1 -1
  159. package/dist/commands/claude/marketplace/license-utils.js +16 -7
  160. package/dist/commands/claude/marketplace/license-utils.js.map +1 -1
  161. package/dist/commands/claude/marketplace/publish-schema.d.ts +137 -0
  162. package/dist/commands/claude/marketplace/publish-schema.d.ts.map +1 -0
  163. package/dist/commands/claude/marketplace/publish-schema.js +32 -0
  164. package/dist/commands/claude/marketplace/publish-schema.js.map +1 -0
  165. package/dist/commands/claude/marketplace/publish-tree.d.ts +6 -0
  166. package/dist/commands/claude/marketplace/publish-tree.d.ts.map +1 -1
  167. package/dist/commands/claude/marketplace/publish-tree.js +75 -17
  168. package/dist/commands/claude/marketplace/publish-tree.js.map +1 -1
  169. package/dist/commands/claude/marketplace/publish.d.ts +27 -0
  170. package/dist/commands/claude/marketplace/publish.d.ts.map +1 -1
  171. package/dist/commands/claude/marketplace/publish.js +84 -50
  172. package/dist/commands/claude/marketplace/publish.js.map +1 -1
  173. package/dist/commands/claude/marketplace/validate-schema.d.ts +362 -0
  174. package/dist/commands/claude/marketplace/validate-schema.d.ts.map +1 -0
  175. package/dist/commands/claude/marketplace/validate-schema.js +67 -0
  176. package/dist/commands/claude/marketplace/validate-schema.js.map +1 -0
  177. package/dist/commands/claude/marketplace/validate.d.ts +40 -53
  178. package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
  179. package/dist/commands/claude/marketplace/validate.js +358 -214
  180. package/dist/commands/claude/marketplace/validate.js.map +1 -1
  181. package/dist/commands/claude/org/api-keys.d.ts +3 -0
  182. package/dist/commands/claude/org/api-keys.d.ts.map +1 -1
  183. package/dist/commands/claude/org/api-keys.js +4 -5
  184. package/dist/commands/claude/org/api-keys.js.map +1 -1
  185. package/dist/commands/claude/org/code-analytics.js +1 -1
  186. package/dist/commands/claude/org/code-analytics.js.map +1 -1
  187. package/dist/commands/claude/org/cost.d.ts.map +1 -1
  188. package/dist/commands/claude/org/cost.js +11 -33
  189. package/dist/commands/claude/org/cost.js.map +1 -1
  190. package/dist/commands/claude/org/helpers.d.ts +40 -27
  191. package/dist/commands/claude/org/helpers.d.ts.map +1 -1
  192. package/dist/commands/claude/org/helpers.js +61 -66
  193. package/dist/commands/claude/org/helpers.js.map +1 -1
  194. package/dist/commands/claude/org/index.d.ts.map +1 -1
  195. package/dist/commands/claude/org/index.js +10 -4
  196. package/dist/commands/claude/org/index.js.map +1 -1
  197. package/dist/commands/claude/org/info.d.ts.map +1 -1
  198. package/dist/commands/claude/org/info.js +2 -3
  199. package/dist/commands/claude/org/info.js.map +1 -1
  200. package/dist/commands/claude/org/invites.d.ts +3 -0
  201. package/dist/commands/claude/org/invites.d.ts.map +1 -1
  202. package/dist/commands/claude/org/invites.js +5 -7
  203. package/dist/commands/claude/org/invites.js.map +1 -1
  204. package/dist/commands/claude/org/skills.d.ts +76 -21
  205. package/dist/commands/claude/org/skills.d.ts.map +1 -1
  206. package/dist/commands/claude/org/skills.js +273 -246
  207. package/dist/commands/claude/org/skills.js.map +1 -1
  208. package/dist/commands/claude/org/stubs-schema.d.ts +56 -0
  209. package/dist/commands/claude/org/stubs-schema.d.ts.map +1 -0
  210. package/dist/commands/claude/org/stubs-schema.js +23 -0
  211. package/dist/commands/claude/org/stubs-schema.js.map +1 -0
  212. package/dist/commands/claude/org/stubs.d.ts +8 -3
  213. package/dist/commands/claude/org/stubs.d.ts.map +1 -1
  214. package/dist/commands/claude/org/stubs.js +9 -9
  215. package/dist/commands/claude/org/stubs.js.map +1 -1
  216. package/dist/commands/claude/org/usage.d.ts.map +1 -1
  217. package/dist/commands/claude/org/usage.js +1 -2
  218. package/dist/commands/claude/org/usage.js.map +1 -1
  219. package/dist/commands/claude/org/users.d.ts +3 -0
  220. package/dist/commands/claude/org/users.d.ts.map +1 -1
  221. package/dist/commands/claude/org/users.js +6 -8
  222. package/dist/commands/claude/org/users.js.map +1 -1
  223. package/dist/commands/claude/org/workspaces.d.ts +3 -0
  224. package/dist/commands/claude/org/workspaces.d.ts.map +1 -1
  225. package/dist/commands/claude/org/workspaces.js +10 -15
  226. package/dist/commands/claude/org/workspaces.js.map +1 -1
  227. package/dist/commands/claude/plugin/build-schema.d.ts +642 -0
  228. package/dist/commands/claude/plugin/build-schema.d.ts.map +1 -0
  229. package/dist/commands/claude/plugin/build-schema.js +51 -0
  230. package/dist/commands/claude/plugin/build-schema.js.map +1 -0
  231. package/dist/commands/claude/plugin/build.d.ts +220 -45
  232. package/dist/commands/claude/plugin/build.d.ts.map +1 -1
  233. package/dist/commands/claude/plugin/build.js +466 -249
  234. package/dist/commands/claude/plugin/build.js.map +1 -1
  235. package/dist/commands/claude/plugin/helpers.d.ts +186 -24
  236. package/dist/commands/claude/plugin/helpers.d.ts.map +1 -1
  237. package/dist/commands/claude/plugin/helpers.js +110 -68
  238. package/dist/commands/claude/plugin/helpers.js.map +1 -1
  239. package/dist/commands/claude/plugin/install-schema.d.ts +144 -0
  240. package/dist/commands/claude/plugin/install-schema.d.ts.map +1 -0
  241. package/dist/commands/claude/plugin/install-schema.js +36 -0
  242. package/dist/commands/claude/plugin/install-schema.js.map +1 -0
  243. package/dist/commands/claude/plugin/install.d.ts +191 -11
  244. package/dist/commands/claude/plugin/install.d.ts.map +1 -1
  245. package/dist/commands/claude/plugin/install.js +688 -628
  246. package/dist/commands/claude/plugin/install.js.map +1 -1
  247. package/dist/commands/claude/plugin/kept-findings.d.ts +19 -0
  248. package/dist/commands/claude/plugin/kept-findings.d.ts.map +1 -0
  249. package/dist/commands/claude/plugin/kept-findings.js +24 -0
  250. package/dist/commands/claude/plugin/kept-findings.js.map +1 -0
  251. package/dist/commands/claude/plugin/list-schema.d.ts +223 -0
  252. package/dist/commands/claude/plugin/list-schema.d.ts.map +1 -0
  253. package/dist/commands/claude/plugin/list-schema.js +34 -0
  254. package/dist/commands/claude/plugin/list-schema.js.map +1 -0
  255. package/dist/commands/claude/plugin/list.d.ts +18 -0
  256. package/dist/commands/claude/plugin/list.d.ts.map +1 -1
  257. package/dist/commands/claude/plugin/list.js +53 -45
  258. package/dist/commands/claude/plugin/list.js.map +1 -1
  259. package/dist/commands/claude/plugin/npm-pack.d.ts +15 -0
  260. package/dist/commands/claude/plugin/npm-pack.d.ts.map +1 -0
  261. package/dist/commands/claude/plugin/npm-pack.js +39 -0
  262. package/dist/commands/claude/plugin/npm-pack.js.map +1 -0
  263. package/dist/commands/claude/plugin/plugin-changelog.d.ts +5 -1
  264. package/dist/commands/claude/plugin/plugin-changelog.d.ts.map +1 -1
  265. package/dist/commands/claude/plugin/plugin-changelog.js +9 -5
  266. package/dist/commands/claude/plugin/plugin-changelog.js.map +1 -1
  267. package/dist/commands/claude/plugin/plugin-files.d.ts +21 -2
  268. package/dist/commands/claude/plugin/plugin-files.d.ts.map +1 -1
  269. package/dist/commands/claude/plugin/plugin-files.js +65 -32
  270. package/dist/commands/claude/plugin/plugin-files.js.map +1 -1
  271. package/dist/commands/claude/plugin/plugin-validators.d.ts +13 -0
  272. package/dist/commands/claude/plugin/plugin-validators.d.ts.map +1 -1
  273. package/dist/commands/claude/plugin/plugin-validators.js +64 -16
  274. package/dist/commands/claude/plugin/plugin-validators.js.map +1 -1
  275. package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
  276. package/dist/commands/claude/plugin/tree-copy.js +63 -37
  277. package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
  278. package/dist/commands/claude/plugin/uninstall-schema.d.ts +112 -0
  279. package/dist/commands/claude/plugin/uninstall-schema.d.ts.map +1 -0
  280. package/dist/commands/claude/plugin/uninstall-schema.js +28 -0
  281. package/dist/commands/claude/plugin/uninstall-schema.js.map +1 -0
  282. package/dist/commands/claude/plugin/uninstall.d.ts +57 -0
  283. package/dist/commands/claude/plugin/uninstall.d.ts.map +1 -1
  284. package/dist/commands/claude/plugin/uninstall.js +176 -64
  285. package/dist/commands/claude/plugin/uninstall.js.map +1 -1
  286. package/dist/commands/consistency-check.d.ts.map +1 -1
  287. package/dist/commands/consistency-check.js +8 -6
  288. package/dist/commands/consistency-check.js.map +1 -1
  289. package/dist/commands/corpus/index.d.ts.map +1 -1
  290. package/dist/commands/corpus/index.js +26 -10
  291. package/dist/commands/corpus/index.js.map +1 -1
  292. package/dist/commands/corpus/report.d.ts +34 -16
  293. package/dist/commands/corpus/report.d.ts.map +1 -1
  294. package/dist/commands/corpus/report.js +36 -18
  295. package/dist/commands/corpus/report.js.map +1 -1
  296. package/dist/commands/corpus/runner.d.ts +25 -20
  297. package/dist/commands/corpus/runner.d.ts.map +1 -1
  298. package/dist/commands/corpus/runner.js +123 -67
  299. package/dist/commands/corpus/runner.js.map +1 -1
  300. package/dist/commands/corpus/scan-schema.d.ts +127 -0
  301. package/dist/commands/corpus/scan-schema.d.ts.map +1 -0
  302. package/dist/commands/corpus/scan-schema.js +31 -0
  303. package/dist/commands/corpus/scan-schema.js.map +1 -0
  304. package/dist/commands/corpus/scan.d.ts +31 -0
  305. package/dist/commands/corpus/scan.d.ts.map +1 -1
  306. package/dist/commands/corpus/scan.js +124 -50
  307. package/dist/commands/corpus/scan.js.map +1 -1
  308. package/dist/commands/corpus/seed.d.ts +11 -8
  309. package/dist/commands/corpus/seed.d.ts.map +1 -1
  310. package/dist/commands/corpus/seed.js +29 -11
  311. package/dist/commands/corpus/seed.js.map +1 -1
  312. package/dist/commands/doctor-render.d.ts +52 -0
  313. package/dist/commands/doctor-render.d.ts.map +1 -0
  314. package/dist/commands/doctor-render.js +110 -0
  315. package/dist/commands/doctor-render.js.map +1 -0
  316. package/dist/commands/doctor-schema.d.ts +191 -0
  317. package/dist/commands/doctor-schema.d.ts.map +1 -0
  318. package/dist/commands/doctor-schema.js +44 -0
  319. package/dist/commands/doctor-schema.js.map +1 -0
  320. package/dist/commands/doctor.d.ts +7 -62
  321. package/dist/commands/doctor.d.ts.map +1 -1
  322. package/dist/commands/doctor.js +126 -165
  323. package/dist/commands/doctor.js.map +1 -1
  324. package/dist/commands/inventory-schema.d.ts +7297 -0
  325. package/dist/commands/inventory-schema.d.ts.map +1 -0
  326. package/dist/commands/inventory-schema.js +28 -0
  327. package/dist/commands/inventory-schema.js.map +1 -0
  328. package/dist/commands/inventory.d.ts +1 -1
  329. package/dist/commands/inventory.d.ts.map +1 -1
  330. package/dist/commands/inventory.js +89 -41
  331. package/dist/commands/inventory.js.map +1 -1
  332. package/dist/commands/mcp/index.d.ts.map +1 -1
  333. package/dist/commands/mcp/index.js +15 -0
  334. package/dist/commands/mcp/index.js.map +1 -1
  335. package/dist/commands/mcp/list-collections-schema.d.ts +101 -0
  336. package/dist/commands/mcp/list-collections-schema.d.ts.map +1 -0
  337. package/dist/commands/mcp/list-collections-schema.js +22 -0
  338. package/dist/commands/mcp/list-collections-schema.js.map +1 -0
  339. package/dist/commands/mcp/list-collections.d.ts +1 -1
  340. package/dist/commands/mcp/list-collections.d.ts.map +1 -1
  341. package/dist/commands/mcp/list-collections.js +19 -17
  342. package/dist/commands/mcp/list-collections.js.map +1 -1
  343. package/dist/commands/mcp/serve.d.ts +5 -0
  344. package/dist/commands/mcp/serve.d.ts.map +1 -1
  345. package/dist/commands/mcp/serve.js +29 -15
  346. package/dist/commands/mcp/serve.js.map +1 -1
  347. package/dist/commands/okf/index.d.ts.map +1 -1
  348. package/dist/commands/okf/index.js +13 -10
  349. package/dist/commands/okf/index.js.map +1 -1
  350. package/dist/commands/okf/validate-schema.d.ts +171 -0
  351. package/dist/commands/okf/validate-schema.d.ts.map +1 -0
  352. package/dist/commands/okf/validate-schema.js +44 -0
  353. package/dist/commands/okf/validate-schema.js.map +1 -0
  354. package/dist/commands/okf/validate.d.ts +16 -145
  355. package/dist/commands/okf/validate.d.ts.map +1 -1
  356. package/dist/commands/okf/validate.js +63 -52
  357. package/dist/commands/okf/validate.js.map +1 -1
  358. package/dist/commands/orchestrator-schema.d.ts +419 -0
  359. package/dist/commands/orchestrator-schema.d.ts.map +1 -0
  360. package/dist/commands/orchestrator-schema.js +91 -0
  361. package/dist/commands/orchestrator-schema.js.map +1 -0
  362. package/dist/commands/phase-utils.d.ts +188 -220
  363. package/dist/commands/phase-utils.d.ts.map +1 -1
  364. package/dist/commands/phase-utils.js +210 -258
  365. package/dist/commands/phase-utils.js.map +1 -1
  366. package/dist/commands/positional-args.d.ts +13 -11
  367. package/dist/commands/positional-args.d.ts.map +1 -1
  368. package/dist/commands/positional-args.js +16 -15
  369. package/dist/commands/positional-args.js.map +1 -1
  370. package/dist/commands/rag/admin-schema.d.ts +152 -0
  371. package/dist/commands/rag/admin-schema.d.ts.map +1 -0
  372. package/dist/commands/rag/admin-schema.js +31 -0
  373. package/dist/commands/rag/admin-schema.js.map +1 -0
  374. package/dist/commands/rag/clear-command.d.ts.map +1 -1
  375. package/dist/commands/rag/clear-command.js +30 -15
  376. package/dist/commands/rag/clear-command.js.map +1 -1
  377. package/dist/commands/rag/command-helpers.d.ts +31 -7
  378. package/dist/commands/rag/command-helpers.d.ts.map +1 -1
  379. package/dist/commands/rag/command-helpers.js +41 -21
  380. package/dist/commands/rag/command-helpers.js.map +1 -1
  381. package/dist/commands/rag/index-command.d.ts +37 -48
  382. package/dist/commands/rag/index-command.d.ts.map +1 -1
  383. package/dist/commands/rag/index-command.js +80 -65
  384. package/dist/commands/rag/index-command.js.map +1 -1
  385. package/dist/commands/rag/index-schema.d.ts +107 -0
  386. package/dist/commands/rag/index-schema.d.ts.map +1 -0
  387. package/dist/commands/rag/index-schema.js +34 -0
  388. package/dist/commands/rag/index-schema.js.map +1 -0
  389. package/dist/commands/rag/index.d.ts.map +1 -1
  390. package/dist/commands/rag/index.js +88 -41
  391. package/dist/commands/rag/index.js.map +1 -1
  392. package/dist/commands/rag/query-command.d.ts +18 -4
  393. package/dist/commands/rag/query-command.d.ts.map +1 -1
  394. package/dist/commands/rag/query-command.js +42 -27
  395. package/dist/commands/rag/query-command.js.map +1 -1
  396. package/dist/commands/rag/query-schema.d.ts +363 -0
  397. package/dist/commands/rag/query-schema.d.ts.map +1 -0
  398. package/dist/commands/rag/query-schema.js +59 -0
  399. package/dist/commands/rag/query-schema.js.map +1 -0
  400. package/dist/commands/rag/stats-command.d.ts.map +1 -1
  401. package/dist/commands/rag/stats-command.js +19 -18
  402. package/dist/commands/rag/stats-command.js.map +1 -1
  403. package/dist/commands/resources/check-progress.d.ts +79 -13
  404. package/dist/commands/resources/check-progress.d.ts.map +1 -1
  405. package/dist/commands/resources/check-progress.js +112 -11
  406. package/dist/commands/resources/check-progress.js.map +1 -1
  407. package/dist/commands/resources/check-schema.d.ts +335 -0
  408. package/dist/commands/resources/check-schema.d.ts.map +1 -0
  409. package/dist/commands/resources/check-schema.js +104 -0
  410. package/dist/commands/resources/check-schema.js.map +1 -0
  411. package/dist/commands/resources/check-supervisor.d.ts +329 -71
  412. package/dist/commands/resources/check-supervisor.d.ts.map +1 -1
  413. package/dist/commands/resources/check-supervisor.js +507 -107
  414. package/dist/commands/resources/check-supervisor.js.map +1 -1
  415. package/dist/commands/resources/check.d.ts +88 -254
  416. package/dist/commands/resources/check.d.ts.map +1 -1
  417. package/dist/commands/resources/check.js +537 -310
  418. package/dist/commands/resources/check.js.map +1 -1
  419. package/dist/commands/resources/index.d.ts.map +1 -1
  420. package/dist/commands/resources/index.js +189 -103
  421. package/dist/commands/resources/index.js.map +1 -1
  422. package/dist/commands/resources/query-schema.d.ts +188 -0
  423. package/dist/commands/resources/query-schema.d.ts.map +1 -0
  424. package/dist/commands/resources/query-schema.js +48 -0
  425. package/dist/commands/resources/query-schema.js.map +1 -0
  426. package/dist/commands/resources/query.d.ts +18 -13
  427. package/dist/commands/resources/query.d.ts.map +1 -1
  428. package/dist/commands/resources/query.js +61 -49
  429. package/dist/commands/resources/query.js.map +1 -1
  430. package/dist/commands/resources/scan-schema.d.ts +195 -0
  431. package/dist/commands/resources/scan-schema.d.ts.map +1 -0
  432. package/dist/commands/resources/scan-schema.js +53 -0
  433. package/dist/commands/resources/scan-schema.js.map +1 -0
  434. package/dist/commands/resources/scan.d.ts +26 -3
  435. package/dist/commands/resources/scan.d.ts.map +1 -1
  436. package/dist/commands/resources/scan.js +51 -53
  437. package/dist/commands/resources/scan.js.map +1 -1
  438. package/dist/commands/resources/validate-schema.d.ts +326 -0
  439. package/dist/commands/resources/validate-schema.d.ts.map +1 -0
  440. package/dist/commands/resources/validate-schema.js +60 -0
  441. package/dist/commands/resources/validate-schema.js.map +1 -0
  442. package/dist/commands/resources/validate.d.ts +45 -169
  443. package/dist/commands/resources/validate.d.ts.map +1 -1
  444. package/dist/commands/resources/validate.js +221 -485
  445. package/dist/commands/resources/validate.js.map +1 -1
  446. package/dist/commands/skill/review-checklist.d.ts.map +1 -1
  447. package/dist/commands/skill/review-checklist.js +0 -1
  448. package/dist/commands/skill/review-checklist.js.map +1 -1
  449. package/dist/commands/skill/review-schema.d.ts +278 -0
  450. package/dist/commands/skill/review-schema.d.ts.map +1 -0
  451. package/dist/commands/skill/review-schema.js +46 -0
  452. package/dist/commands/skill/review-schema.js.map +1 -0
  453. package/dist/commands/skill/review.d.ts +8 -234
  454. package/dist/commands/skill/review.d.ts.map +1 -1
  455. package/dist/commands/skill/review.js +54 -77
  456. package/dist/commands/skill/review.js.map +1 -1
  457. package/dist/commands/skill/test/auth-flags.d.ts +3 -0
  458. package/dist/commands/skill/test/auth-flags.d.ts.map +1 -1
  459. package/dist/commands/skill/test/auth-flags.js +6 -2
  460. package/dist/commands/skill/test/auth-flags.js.map +1 -1
  461. package/dist/commands/skill/test/configure-schema.d.ts +67 -0
  462. package/dist/commands/skill/test/configure-schema.d.ts.map +1 -0
  463. package/dist/commands/skill/test/configure-schema.js +27 -0
  464. package/dist/commands/skill/test/configure-schema.js.map +1 -0
  465. package/dist/commands/skill/test/configure.d.ts +12 -5
  466. package/dist/commands/skill/test/configure.d.ts.map +1 -1
  467. package/dist/commands/skill/test/configure.js +101 -31
  468. package/dist/commands/skill/test/configure.js.map +1 -1
  469. package/dist/commands/skill/test/run-schema.d.ts +107 -0
  470. package/dist/commands/skill/test/run-schema.d.ts.map +1 -0
  471. package/dist/commands/skill/test/run-schema.js +36 -0
  472. package/dist/commands/skill/test/run-schema.js.map +1 -0
  473. package/dist/commands/skill/test/run.d.ts +3 -2
  474. package/dist/commands/skill/test/run.d.ts.map +1 -1
  475. package/dist/commands/skill/test/run.js +316 -155
  476. package/dist/commands/skill/test/run.js.map +1 -1
  477. package/dist/commands/skills/build-schema.d.ts +199 -0
  478. package/dist/commands/skills/build-schema.d.ts.map +1 -0
  479. package/dist/commands/skills/build-schema.js +55 -0
  480. package/dist/commands/skills/build-schema.js.map +1 -0
  481. package/dist/commands/skills/build.d.ts +95 -298
  482. package/dist/commands/skills/build.d.ts.map +1 -1
  483. package/dist/commands/skills/build.js +415 -818
  484. package/dist/commands/skills/build.js.map +1 -1
  485. package/dist/commands/skills/command-helpers.d.ts +5 -11
  486. package/dist/commands/skills/command-helpers.d.ts.map +1 -1
  487. package/dist/commands/skills/command-helpers.js +7 -17
  488. package/dist/commands/skills/command-helpers.js.map +1 -1
  489. package/dist/commands/skills/index.js +12 -6
  490. package/dist/commands/skills/index.js.map +1 -1
  491. package/dist/commands/skills/install-schema.d.ts +153 -0
  492. package/dist/commands/skills/install-schema.d.ts.map +1 -0
  493. package/dist/commands/skills/install-schema.js +44 -0
  494. package/dist/commands/skills/install-schema.js.map +1 -0
  495. package/dist/commands/skills/install.d.ts +76 -8
  496. package/dist/commands/skills/install.d.ts.map +1 -1
  497. package/dist/commands/skills/install.js +230 -194
  498. package/dist/commands/skills/install.js.map +1 -1
  499. package/dist/commands/skills/list-schema.d.ts +145 -0
  500. package/dist/commands/skills/list-schema.d.ts.map +1 -0
  501. package/dist/commands/skills/list-schema.js +37 -0
  502. package/dist/commands/skills/list-schema.js.map +1 -0
  503. package/dist/commands/skills/list.d.ts +39 -8
  504. package/dist/commands/skills/list.d.ts.map +1 -1
  505. package/dist/commands/skills/list.js +110 -122
  506. package/dist/commands/skills/list.js.map +1 -1
  507. package/dist/commands/skills/package-schema.d.ts +98 -0
  508. package/dist/commands/skills/package-schema.d.ts.map +1 -0
  509. package/dist/commands/skills/package-schema.js +32 -0
  510. package/dist/commands/skills/package-schema.js.map +1 -0
  511. package/dist/commands/skills/package.d.ts +85 -14
  512. package/dist/commands/skills/package.d.ts.map +1 -1
  513. package/dist/commands/skills/package.js +288 -207
  514. package/dist/commands/skills/package.js.map +1 -1
  515. package/dist/commands/skills/scope-guard.d.ts +27 -20
  516. package/dist/commands/skills/scope-guard.d.ts.map +1 -1
  517. package/dist/commands/skills/scope-guard.js +43 -28
  518. package/dist/commands/skills/scope-guard.js.map +1 -1
  519. package/dist/commands/skills/skill-discovery.d.ts +1 -1
  520. package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
  521. package/dist/commands/skills/skill-discovery.js +40 -19
  522. package/dist/commands/skills/skill-discovery.js.map +1 -1
  523. package/dist/commands/skills/source-resolvers.d.ts +58 -8
  524. package/dist/commands/skills/source-resolvers.d.ts.map +1 -1
  525. package/dist/commands/skills/source-resolvers.js +113 -38
  526. package/dist/commands/skills/source-resolvers.js.map +1 -1
  527. package/dist/commands/skills/validate-command.d.ts.map +1 -1
  528. package/dist/commands/skills/validate-command.js +31 -51
  529. package/dist/commands/skills/validate-command.js.map +1 -1
  530. package/dist/commands/skills/validate-schema.d.ts +199 -0
  531. package/dist/commands/skills/validate-schema.d.ts.map +1 -0
  532. package/dist/commands/skills/validate-schema.js +44 -0
  533. package/dist/commands/skills/validate-schema.js.map +1 -0
  534. package/dist/commands/skills/validate.d.ts +100 -136
  535. package/dist/commands/skills/validate.d.ts.map +1 -1
  536. package/dist/commands/skills/validate.js +257 -343
  537. package/dist/commands/skills/validate.js.map +1 -1
  538. package/dist/commands/validate.d.ts +17 -5
  539. package/dist/commands/validate.d.ts.map +1 -1
  540. package/dist/commands/validate.js +139 -94
  541. package/dist/commands/validate.js.map +1 -1
  542. package/dist/commands/verify.d.ts +121 -110
  543. package/dist/commands/verify.d.ts.map +1 -1
  544. package/dist/commands/verify.js +230 -294
  545. package/dist/commands/verify.js.map +1 -1
  546. package/dist/index.d.ts +1 -1
  547. package/dist/index.d.ts.map +1 -1
  548. package/dist/index.js +1 -1
  549. package/dist/index.js.map +1 -1
  550. package/dist/report-schemas.d.ts +12398 -35
  551. package/dist/report-schemas.d.ts.map +1 -1
  552. package/dist/report-schemas.js +624 -66
  553. package/dist/report-schemas.js.map +1 -1
  554. package/dist/skill-resolution/packaging-config.js +2 -2
  555. package/dist/skill-resolution/packaging-config.js.map +1 -1
  556. package/dist/skill-resolution/resolve-skill-reference.d.ts.map +1 -1
  557. package/dist/skill-resolution/resolve-skill-reference.js +20 -13
  558. package/dist/skill-resolution/resolve-skill-reference.js.map +1 -1
  559. package/dist/utils/agent-discovery.d.ts +34 -1
  560. package/dist/utils/agent-discovery.d.ts.map +1 -1
  561. package/dist/utils/agent-discovery.js +80 -38
  562. package/dist/utils/agent-discovery.js.map +1 -1
  563. package/dist/utils/claude-context-lens.d.ts +13 -6
  564. package/dist/utils/claude-context-lens.d.ts.map +1 -1
  565. package/dist/utils/claude-context-lens.js +11 -12
  566. package/dist/utils/claude-context-lens.js.map +1 -1
  567. package/dist/utils/command-error-codes.d.ts +12 -0
  568. package/dist/utils/command-error-codes.d.ts.map +1 -0
  569. package/dist/utils/command-error-codes.js +12 -0
  570. package/dist/utils/command-error-codes.js.map +1 -0
  571. package/dist/utils/command-refusal.d.ts +58 -0
  572. package/dist/utils/command-refusal.d.ts.map +1 -0
  573. package/dist/utils/command-refusal.js +170 -0
  574. package/dist/utils/command-refusal.js.map +1 -0
  575. package/dist/utils/commander-ending.d.ts +40 -0
  576. package/dist/utils/commander-ending.d.ts.map +1 -0
  577. package/dist/utils/commander-ending.js +42 -0
  578. package/dist/utils/commander-ending.js.map +1 -0
  579. package/dist/utils/config-loader.d.ts +13 -8
  580. package/dist/utils/config-loader.d.ts.map +1 -1
  581. package/dist/utils/config-loader.js +84 -45
  582. package/dist/utils/config-loader.js.map +1 -1
  583. package/dist/utils/corpus-target.d.ts +1 -1
  584. package/dist/utils/corpus-target.d.ts.map +1 -1
  585. package/dist/utils/corpus-target.js +44 -5
  586. package/dist/utils/corpus-target.js.map +1 -1
  587. package/dist/utils/debug-diagnostics.d.ts +18 -0
  588. package/dist/utils/debug-diagnostics.d.ts.map +1 -0
  589. package/dist/utils/debug-diagnostics.js +23 -0
  590. package/dist/utils/debug-diagnostics.js.map +1 -0
  591. package/dist/utils/document-writer.d.ts +191 -0
  592. package/dist/utils/document-writer.d.ts.map +1 -0
  593. package/dist/utils/document-writer.js +319 -0
  594. package/dist/utils/document-writer.js.map +1 -0
  595. package/dist/utils/help-loader.d.ts +2 -2
  596. package/dist/utils/help-loader.js +2 -2
  597. package/dist/utils/install-plan.d.ts +99 -0
  598. package/dist/utils/install-plan.d.ts.map +1 -0
  599. package/dist/utils/install-plan.js +146 -0
  600. package/dist/utils/install-plan.js.map +1 -0
  601. package/dist/utils/issue-anchor.d.ts +1 -1
  602. package/dist/utils/issue-anchor.d.ts.map +1 -1
  603. package/dist/utils/issue-anchor.js.map +1 -1
  604. package/dist/utils/issue-rendering.d.ts +8 -3
  605. package/dist/utils/issue-rendering.d.ts.map +1 -1
  606. package/dist/utils/issue-rendering.js +4 -0
  607. package/dist/utils/issue-rendering.js.map +1 -1
  608. package/dist/utils/lens-population.d.ts +20 -0
  609. package/dist/utils/lens-population.d.ts.map +1 -0
  610. package/dist/utils/lens-population.js +15 -0
  611. package/dist/utils/lens-population.js.map +1 -0
  612. package/dist/utils/marketplace-io.d.ts +63 -0
  613. package/dist/utils/marketplace-io.d.ts.map +1 -0
  614. package/dist/utils/marketplace-io.js +63 -0
  615. package/dist/utils/marketplace-io.js.map +1 -0
  616. package/dist/utils/operator-notices.d.ts +97 -0
  617. package/dist/utils/operator-notices.d.ts.map +1 -0
  618. package/dist/utils/operator-notices.js +115 -0
  619. package/dist/utils/operator-notices.js.map +1 -0
  620. package/dist/utils/optional-backend.d.ts +18 -15
  621. package/dist/utils/optional-backend.d.ts.map +1 -1
  622. package/dist/utils/optional-backend.js +22 -33
  623. package/dist/utils/optional-backend.js.map +1 -1
  624. package/dist/utils/output.d.ts +5 -43
  625. package/dist/utils/output.d.ts.map +1 -1
  626. package/dist/utils/output.js +8 -63
  627. package/dist/utils/output.js.map +1 -1
  628. package/dist/utils/package-json.d.ts +3 -4
  629. package/dist/utils/package-json.d.ts.map +1 -1
  630. package/dist/utils/package-json.js +8 -8
  631. package/dist/utils/package-json.js.map +1 -1
  632. package/dist/utils/population-wiring.d.ts +31 -38
  633. package/dist/utils/population-wiring.d.ts.map +1 -1
  634. package/dist/utils/population-wiring.js +38 -32
  635. package/dist/utils/population-wiring.js.map +1 -1
  636. package/dist/utils/project-root-policy.d.ts +74 -1
  637. package/dist/utils/project-root-policy.d.ts.map +1 -1
  638. package/dist/utils/project-root-policy.js +146 -8
  639. package/dist/utils/project-root-policy.js.map +1 -1
  640. package/dist/utils/projection-lenses.d.ts +25 -7
  641. package/dist/utils/projection-lenses.d.ts.map +1 -1
  642. package/dist/utils/projection-lenses.js +20 -6
  643. package/dist/utils/projection-lenses.js.map +1 -1
  644. package/dist/utils/projection-query.d.ts +18 -11
  645. package/dist/utils/projection-query.d.ts.map +1 -1
  646. package/dist/utils/projection-query.js +47 -28
  647. package/dist/utils/projection-query.js.map +1 -1
  648. package/dist/utils/projection-store.d.ts +2 -2
  649. package/dist/utils/projection-store.d.ts.map +1 -1
  650. package/dist/utils/projection-store.js +74 -45
  651. package/dist/utils/projection-store.js.map +1 -1
  652. package/dist/utils/rag-database.d.ts +61 -0
  653. package/dist/utils/rag-database.d.ts.map +1 -0
  654. package/dist/utils/rag-database.js +178 -0
  655. package/dist/utils/rag-database.js.map +1 -0
  656. package/dist/utils/relation-limits.d.ts +7 -2
  657. package/dist/utils/relation-limits.d.ts.map +1 -1
  658. package/dist/utils/relation-limits.js +6 -1
  659. package/dist/utils/relation-limits.js.map +1 -1
  660. package/dist/utils/relativize-paths.d.ts +23 -0
  661. package/dist/utils/relativize-paths.d.ts.map +1 -1
  662. package/dist/utils/relativize-paths.js +32 -1
  663. package/dist/utils/relativize-paths.js.map +1 -1
  664. package/dist/utils/resource-loader.d.ts +78 -32
  665. package/dist/utils/resource-loader.d.ts.map +1 -1
  666. package/dist/utils/resource-loader.js +134 -66
  667. package/dist/utils/resource-loader.js.map +1 -1
  668. package/dist/utils/run-integrity.d.ts +64 -31
  669. package/dist/utils/run-integrity.d.ts.map +1 -1
  670. package/dist/utils/run-integrity.js +76 -35
  671. package/dist/utils/run-integrity.js.map +1 -1
  672. package/dist/utils/scope-locations.d.ts +7 -5
  673. package/dist/utils/scope-locations.d.ts.map +1 -1
  674. package/dist/utils/scope-locations.js +37 -12
  675. package/dist/utils/scope-locations.js.map +1 -1
  676. package/dist/utils/staging-dir.d.ts +7 -0
  677. package/dist/utils/staging-dir.d.ts.map +1 -0
  678. package/dist/utils/staging-dir.js +12 -0
  679. package/dist/utils/staging-dir.js.map +1 -0
  680. package/dist/utils/url-redact.d.ts +9 -0
  681. package/dist/utils/url-redact.d.ts.map +1 -1
  682. package/dist/utils/url-redact.js +13 -0
  683. package/dist/utils/url-redact.js.map +1 -1
  684. package/dist/utils/user-context-scanner.d.ts +3 -2
  685. package/dist/utils/user-context-scanner.d.ts.map +1 -1
  686. package/dist/utils/user-context-scanner.js +24 -4
  687. package/dist/utils/user-context-scanner.js.map +1 -1
  688. package/dist/utils/validate-help-files.d.ts.map +1 -1
  689. package/dist/utils/validate-help-files.js +8 -14
  690. package/dist/utils/validate-help-files.js.map +1 -1
  691. package/dist/utils/vat-bin-path.d.ts.map +1 -1
  692. package/dist/utils/vat-bin-path.js +3 -3
  693. package/dist/utils/vat-bin-path.js.map +1 -1
  694. package/dist/utils/verdict-helpers.d.ts.map +1 -1
  695. package/dist/utils/verdict-helpers.js +5 -5
  696. package/dist/utils/verdict-helpers.js.map +1 -1
  697. package/docs/agent.md +347 -2
  698. package/docs/audit.md +312 -89
  699. package/docs/doctor.md +65 -19
  700. package/docs/index.md +571 -20
  701. package/docs/mcp.md +64 -12
  702. package/docs/rag.md +176 -48
  703. package/docs/resources.md +257 -71
  704. package/docs/skill-test.md +148 -19
  705. package/docs/skills.md +459 -174
  706. package/package.json +17 -20
  707. package/schemas/agent-build.json +268 -0
  708. package/schemas/agent-import.json +252 -0
  709. package/schemas/agent-install.json +260 -0
  710. package/schemas/agent-installed.json +287 -0
  711. package/schemas/agent-list.json +279 -0
  712. package/schemas/agent-uninstall.json +260 -0
  713. package/schemas/agent-validate.json +279 -0
  714. package/schemas/ard-emit.json +228 -107
  715. package/schemas/audit-settings.json +472 -0
  716. package/schemas/audit.json +635 -0
  717. package/schemas/cache-clear.json +273 -0
  718. package/schemas/claude-marketplace-publish.json +286 -0
  719. package/schemas/claude-marketplace-validate.json +352 -0
  720. package/schemas/claude-org-not-implemented.json +239 -0
  721. package/schemas/claude-plugin-build.json +446 -0
  722. package/schemas/claude-plugin-install.json +291 -0
  723. package/schemas/claude-plugin-list.json +326 -0
  724. package/schemas/claude-plugin-uninstall.json +272 -0
  725. package/schemas/corpus-audit.json +635 -0
  726. package/schemas/corpus-scan.json +293 -0
  727. package/schemas/doctor.json +299 -0
  728. package/schemas/inventory.json +982 -0
  729. package/schemas/mcp-list-collections.json +268 -0
  730. package/schemas/okf-validate.json +224 -106
  731. package/schemas/orchestrator.json +299 -0
  732. package/schemas/rag-clear.json +253 -0
  733. package/schemas/rag-index.json +273 -0
  734. package/schemas/rag-query.json +365 -0
  735. package/schemas/rag-stats.json +269 -0
  736. package/schemas/resources-check.json +280 -118
  737. package/schemas/resources-query.json +333 -0
  738. package/schemas/resources-scan.json +321 -0
  739. package/schemas/resources-validate.json +332 -0
  740. package/schemas/skill-review.json +224 -106
  741. package/schemas/skill-test-configure.json +256 -0
  742. package/schemas/skill-test-run.json +296 -0
  743. package/schemas/skills-build.json +325 -0
  744. package/schemas/skills-install.json +287 -0
  745. package/schemas/skills-list.json +283 -0
  746. package/schemas/skills-package.json +270 -0
  747. package/schemas/skills-validate.json +285 -0
  748. package/dist/commands/skills/shared.d.ts +0 -29
  749. package/dist/commands/skills/shared.d.ts.map +0 -1
  750. package/dist/commands/skills/shared.js +0 -33
  751. package/dist/commands/skills/shared.js.map +0 -1
  752. package/dist/utils/command-error.d.ts +0 -189
  753. package/dist/utils/command-error.d.ts.map +0 -1
  754. package/dist/utils/command-error.js +0 -230
  755. package/dist/utils/command-error.js.map +0 -1
@@ -3,221 +3,121 @@
3
3
  *
4
4
  * Discovers skills from config yaml skills.include/exclude, validates each
5
5
  * using validateSkillForPackaging with merged packaging config.
6
+ *
7
+ * Publishes the `Report<T>` envelope (`validate-schema.ts`): every finding
8
+ * flat with its `location` relative to `data.root`, one `data.skills` row per
9
+ * skill validated, `examined` = skills validated. A run over zero skills is
10
+ * refused by the writer, from the registry's declared denominator — never by
11
+ * a check at this site. `--verbose` decides only how much stderr prints.
6
12
  */
7
13
  import { conventionalSuiteProbe, validateSkillForPackaging, } from '@vibe-agent-toolkit/agent-skills';
8
14
  import { ResourceRegistry, } from '@vibe-agent-toolkit/resources';
9
- import { allowUnusedIssues, calculateValidationStatus, countBySeverity, createAllowUsageLedger, } from '@vibe-agent-toolkit/schema';
10
- import { findProjectRoot, safePath } from '@vibe-agent-toolkit/utils';
15
+ import { allowUnusedIssues, buildReport, countBySeverity, createAllowUsageLedger, summarizeIssues, toFindings, } from '@vibe-agent-toolkit/schema';
16
+ import { findProjectRoot, mapInOrder, safePath } from '@vibe-agent-toolkit/utils';
11
17
  import { gitFindRoot, GitTracker } from '@vibe-agent-toolkit/utils/git';
12
- import * as yaml from 'yaml';
13
- import { reportCommandError } from '../../utils/command-error.js';
18
+ import { refusalCodeOf } from '../../utils/command-refusal.js';
14
19
  import { loadConfig } from '../../utils/config-loader.js';
15
- import { formatDurationSecs } from '../../utils/duration.js';
16
- import { formatIssueLines, formatRunIssueLines, formatSeverityBreakdown, issuesToRenderAtVerbosity, summarizeFindings, sumSeverityCounts, } from '../../utils/issue-rendering.js';
20
+ import { endWithReport, NOTHING_FINISHED, refusalReport } from '../../utils/document-writer.js';
21
+ import { formatIssueLines, formatRunIssueLines, formatSeverityBreakdown, issuesToRenderAtVerbosity, summarizeFindings, } from '../../utils/issue-rendering.js';
17
22
  import { requireProjectRoot } from '../../utils/project-root-policy.js';
18
- import { RESOURCES_CRAWL_ENV, RESOURCES_CRAWL_PROJECTION, withResourcePopulationSource, } from '../../utils/resource-loader.js';
19
- import { nothingCheckedFinding } from '../../utils/run-integrity.js';
23
+ import { crawlLaneDebugLine, withResourcePopulationSource } from '../../utils/resource-loader.js';
24
+ import { verdictBanner } from '../../utils/run-integrity.js';
20
25
  import { collectDeclaredEvalSuites, mergeSkillPackagingConfig } from '../../utils/skill-packaging-config.js';
21
26
  import { renderSkillQualityFooter } from '../../utils/skill-quality-footer.js';
22
27
  import { applyConfigVerdicts } from '../../utils/verdict-helpers.js';
23
- import { finishCommand } from '../phase-utils.js';
24
28
  import { filterSkillsByName, setupCommandContext, } from './command-helpers.js';
29
+ import { assertScopableSkillsPath } from './scope-guard.js';
25
30
  import { discoverSkillsFromConfig } from './skill-discovery.js';
31
+ /** `vat skills validate` offers no `--strict`: warnings never fail it. */
32
+ const GATE = { strict: false };
33
+ /** This command offers no `--format`: its document is YAML. */
34
+ const FORMAT = 'yaml';
35
+ /**
36
+ * What a mis-scoped `vat skills validate` used to do.
37
+ *
38
+ * In a package where the bare invocation validates 13 skills, one mistyped
39
+ * character rescoped it to nothing and still reported success — the same
40
+ * "went wide / went narrow and reported success" defect
41
+ * `rejectPositionalArguments` was added to `vat verify` / `vat validate` /
42
+ * `vat build` for, arrived at from the opposite direction. `vat skills build`
43
+ * carried the identical hole and is guarded by the same module.
44
+ */
45
+ const SCOPE_SUBJECT = {
46
+ command: 'vat skills validate',
47
+ silentSuccess: 'nothing to validate',
48
+ };
26
49
  /**
27
- * Every issue emitted across the batch, after severity resolution.
50
+ * Every finding a skill published: its emitted issues after severity
51
+ * resolution, minus any the adopter resolved to `ignore`.
28
52
  *
29
53
  * `allErrors` is the full emitted set INCLUDING info despite the name (see the
30
54
  * doc comment on `PackagingValidationResult`), and excluding issues suppressed
31
- * by `validation.allow` — those live in `ignoredErrors`.
55
+ * by `validation.allow` — those live in `ignoredErrors`, counted as `allowed`.
32
56
  */
33
- function batchIssues(results) {
34
- return results.flatMap((r) => r.allErrors);
57
+ function skillFindings(result) {
58
+ return toFindings(result.allErrors);
35
59
  }
36
60
  /**
37
- * The run-level findings, with the run-integrity refusal derived in front of
38
- * them when the run validated no skill.
39
- *
40
- * 🚨 **Zero skills validated is an ERROR, not a clean run.** `skills.include`
41
- * globs that discover nothing — a typo, a renamed directory, an `exclude` that
42
- * swallows every match — used to take an early return that printed one info
43
- * line and published NO document at exit 0, and `vat validate` folded that into
44
- * `status: success`: the gate the docs name as THE gate, green forever on a
45
- * config that checked nothing. `vat verify` refused the identical config in its
46
- * `packaged-content` phase and its message sent the operator to this command,
47
- * which then said nothing.
61
+ * Build the report. Pure: no file system, no clock, no `process.exit`.
48
62
  *
49
- * 🔑 The ONE seam both channels read. {@link buildValidateSummary} (the
50
- * document) and {@link formatValidationReportLines} (stderr) both derive their
51
- * issue set here, so "denominator zero, status clean" is unrepresentable on
52
- * either channel rather than merely unwritten, and the exit code — derived from
53
- * the document's own counts — agrees with both by construction. Through the
54
- * shared mechanism in `run-integrity.ts`: one non-overridable
55
- * `RESOURCE_CHECK_BROKEN` at `error`.
63
+ * Every finding is on the envelope, flat — each skill's, then the run's — so
64
+ * the envelope `summary` is exactly the sum of the `data.skills[].summary`
65
+ * rows plus the run-level findings, by construction. Every validated skill has
66
+ * a row, clean or not: `examined` and `data.skills.length` agree, so a reader
67
+ * never has to guess whether an absent skill was clean or never validated.
56
68
  *
57
- * Only the empty GLOB is refused. A config with no `skills:` block at all is a
58
- * choice — the project declares no skills — and both orchestrators already skip
59
- * this phase on that config; the phase declines it the same way (no document,
60
- * exit 0) rather than inventing a refusal for a gate nobody declared.
69
+ * The run-integrity refusal for a run over zero skills is NOT decided here;
70
+ * the writer adds it from the registry's declared denominator.
61
71
  *
62
- * @param results - One result per skill the run validated: the denominator
63
- * @param runIssues - The run's own findings so far (`ALLOW_UNUSED`), so an
64
- * existing run-integrity report is not duplicated
65
- * @param patterns - The discovery globs, named in the refusal so the operator
66
- * sees what matched nothing
67
- * @returns The run-level issues the document and the stderr report publish
72
+ * @param input - The run's results
73
+ * @returns The report, before the writer's run-integrity pass
68
74
  */
69
- export function withRunIntegrity(results, runIssues, patterns) {
70
- return [
71
- ...nothingCheckedFinding(results.length, runIssues, () => nothingDiscoveredMessage(patterns)),
72
- ...runIssues,
73
- ];
75
+ export function buildSkillsValidateReport(input) {
76
+ const skills = input.results.map((result) => ({
77
+ name: result.skillName,
78
+ ...summarizeIssues(skillFindings(result)),
79
+ allowed: result.ignoredErrors.length,
80
+ }));
81
+ return buildReport({
82
+ examined: input.results.length,
83
+ findings: [...input.results.flatMap(skillFindings), ...toFindings(input.runIssues)],
84
+ data: { root: input.root, skills },
85
+ gate: GATE,
86
+ durationMs: input.durationMs,
87
+ });
74
88
  }
75
89
  /** The globs as an operator wrote them, back-quoted and comma-separated. */
76
90
  function quoteGlobs(globs) {
77
91
  return globs.map((glob) => `\`${glob}\``).join(', ');
78
92
  }
79
- /** What did not run, and what the operator can do — invariant 5 of `run-integrity.ts`. */
80
- function nothingDiscoveredMessage(patterns) {
81
- const include = quoteGlobs(patterns.include);
82
- const exclude = patterns.exclude === undefined || patterns.exclude.length === 0
83
- ? ''
84
- : ` after \`skills.exclude\` (${quoteGlobs(patterns.exclude)})`;
85
- return 'vat skills validate validated 0 skills, so this run is not a verdict: nothing was checked,'
86
- + ' and the document reads the same as a run over clean skills. The `skills.include` globs in'
87
- + ` vibe-agent-toolkit.config.yaml (${include}) matched no SKILL.md${exclude} — usually a typo`
88
- + ' in the glob, a renamed directory, or an exclude that swallows every match. Fix the patterns'
89
- + ' so they discover the skills this project ships, or remove the `skills:` block if it ships'
90
- + ' none.';
91
- }
92
93
  /**
93
- * One skill's VERBOSE YAML entry: the whole result plus the per-severity counts
94
- * its two-valued `status` cannot express.
94
+ * The stderr half of a run over zero skills: WHICH globs matched nothing.
95
95
  *
96
- * The per-skill `status` stays the gate verdict (`error` iff an active error) —
97
- * that is what the exit code is derived from. `issueCounts` beside it is what
98
- * makes `success` readable: "nothing you must act on", not "nothing was found".
99
- *
100
- * This shape is optimized for `> file` then `grep`, not for reading: on a
101
- * 90-skill repo it is 17,262 of the 22,156 stdout lines `vat verify` emits.
96
+ * The document's refusal is the registry's generic `whenZero` — the writer
97
+ * cannot see the config — so the globs this run actually used are named here,
98
+ * where the operator reads them.
102
99
  */
103
- function toVerboseYamlResult(result) {
104
- return { ...result, issueCounts: countBySeverity(result.allErrors) };
100
+ export function nothingDiscoveredLine(patterns) {
101
+ if (patterns === undefined) {
102
+ return 'vibe-agent-toolkit.config.yaml declares no `skills:` block, so there is nothing to validate.';
103
+ }
104
+ const exclude = patterns.exclude === undefined || patterns.exclude.length === 0
105
+ ? ''
106
+ : ` after \`skills.exclude\` (${quoteGlobs(patterns.exclude)})`;
107
+ return `The \`skills.include\` globs (${quoteGlobs(patterns.include)}) matched no SKILL.md${exclude}.`;
105
108
  }
106
- /**
107
- * Does this skill have anything to say? Emitted findings OR allow-suppressed
108
- * ones — the same predicate the human report uses, so the two streams cannot
109
- * disagree about which skills exist.
110
- */
109
+ /** Any finding at all, emitted or allow-suppressed — the skills the human report lists. */
111
110
  function hasFindings(result) {
112
111
  return result.allErrors.length > 0 || result.ignoredErrors.length > 0;
113
112
  }
114
- /**
115
- * One skill's DEFAULT YAML entry: which asset has problems, how many, of what
116
- * code — and nothing else.
117
- *
118
- * Why the per-code tally is a summary rather than N findings: 1,728 of the 1,897
119
- * findings on a real 90-skill repo are one code, LINK_DROPPED_BY_DEPTH, and the
120
- * four remedies its `fix` hint proposes (`linkFollowDepth`, `files:`,
121
- * `validation.allow`, `excludeReferencesFromBundle`) are all SKILL-level config
122
- * edits — so 348 findings on one skill propose the same four edits 348 times.
123
- * The skill is the unit the reader acts on, so the skill is the unit we publish.
124
- * Aggregating at EMISSION instead would break `validation.allow`'s per-`paths:`
125
- * matching and per-path severity overrides, both of which need one issue per
126
- * link; the collapse therefore has to happen here, after allow-filtering.
127
- * Downgrading the code to `info` was considered and rejected: it would delete
128
- * the signal the code exists for (a depth-limited walk may silently omit content
129
- * the author expected to ship) and would contradict PACKAGED_TEST_INPUT, which
130
- * `docs/validation-codes.md` keeps at `warning` on identical "this is configured
131
- * behaviour, here is your receipt" reasoning.
132
- *
133
- * `allowed` is a scalar, not a list: an allow-suppressed finding is a fact about
134
- * the skill a reader must not lose, but it is deliberately NOT in `codes`, which
135
- * summarizes the EMITTED set.
136
- */
137
- function toSummaryYamlResult(result) {
138
- const { codes, ...counts } = summarizeFindings(result.allErrors);
139
- const allowedCount = result.ignoredErrors.length;
140
- return {
141
- skillName: result.skillName,
142
- status: result.status,
143
- ...counts,
144
- ...(allowedCount > 0 ? { allowed: allowedCount } : {}),
145
- codes,
146
- };
147
- }
148
- /**
149
- * Build the YAML summary object.
150
- *
151
- * `status` is the shared `issues → status` collapse over the WHOLE batch, so it
152
- * can say `warning`. It previously read
153
- * `results.some(r => r.status === 'error') ? 'error' : 'success'` — a two-value
154
- * collapse that could never report the warning case, and so reported 33 active
155
- * warnings as `success`.
156
- *
157
- * The header total counts BOTH the per-skill findings and the run-level ones,
158
- * because the exit code does too — dropping run issues from the header would
159
- * divorce the published verdict from the code the process actually returns.
160
- * That is why `runIssueCounts` exists beside them: on a large real repo the
161
- * header read 1814 warnings against a per-skill sum of 1800, and the missing 14
162
- * were run-level ALLOW_UNUSED entries published only as a bare LIST. The
163
- * identity `issueCounts === Σ results[].issueCounts + runIssueCounts` now holds
164
- * by construction, so a consumer can reconcile the two numbers instead of
165
- * hand-counting a list to find out whether anything went missing.
166
- *
167
- * That identity survives the default mode dropping every finding-free skill from
168
- * `results[]`, because a dropped row contributes exactly zero to each bucket —
169
- * and it survives the default row publishing its counts flat with zero buckets
170
- * omitted, because an absent bucket reads as zero. Only the per-asset ROWS omit
171
- * zeros: `issueCounts` and `runIssueCounts` keep their complete
172
- * `{errors, warnings, info}` shape in both modes, because they are the
173
- * reconciliation identity rather than something a reader scans.
174
- *
175
- * A run over ZERO skills is refused here, not passed — see
176
- * {@link withRunIntegrity}, which is why the discovery `patterns` are a
177
- * parameter of a document builder: the refusal names the globs that matched
178
- * nothing, and the builder is where the refusal is derived.
179
- */
180
- export function buildValidateSummary(results, duration, verbose, runIssues, patterns) {
181
- const skillIssues = batchIssues(results);
182
- const published = withRunIntegrity(results, runIssues, patterns);
183
- const runIssueCounts = countBySeverity(published);
184
- return {
185
- status: calculateValidationStatus([...skillIssues, ...published]),
186
- issueCounts: sumSeverityCounts([countBySeverity(skillIssues), runIssueCounts]),
187
- runIssueCounts,
188
- // `skillsValidated` stays the true denominator even though the default
189
- // `results[]` lists only the skills with something to say.
190
- //
191
- // KNOWN, DELIBERATELY NOT FIXED — the denominator and the listing disagree,
192
- // and nothing in the document explains the gap. A real adopter run published
193
- // `skillsValidated: 92` beside a `results:` array of 62 rows. Omitting the
194
- // clean skills is the DESIGN — a report of 92 rows where 30 say nothing is a
195
- // report nobody reads — but 23 of the omitted were config-DECLARED skills, so
196
- // a reader reconciling 92 against 62 cannot tell "validated and clean" from
197
- // "never validated at all". The omission is deliberate; the unexplained
198
- // difference is the defect. A fix names the omitted population rather than
199
- // re-listing it (a count of clean skills, or their names on a separate key) —
200
- // it does not put the empty rows back.
201
- skillsValidated: results.length,
202
- results: verbose
203
- ? results.map((r) => toVerboseYamlResult(r))
204
- : results.filter((r) => hasFindings(r)).map((r) => toSummaryYamlResult(r)),
205
- runIssues: published,
206
- durationSecs: formatDurationSecs(duration),
207
- };
208
- }
209
- /**
210
- * Output YAML summary to stdout
211
- */
212
- function writeYamlSummary(summary) {
213
- console.log(yaml.stringify(summary, { indent: 2, lineWidth: 0, aliasDuplicateObjects: false }));
214
- }
215
113
  /**
216
114
  * ONE line for one skill: its severity breakdown, its allowed count, and the
217
115
  * codes behind it, dominant first.
218
116
  *
219
- * The stderr counterpart of {@link toSummaryYamlResult} — same unit (the asset),
220
- * same reason (see that function's comment). The per-issue blocks below are what
117
+ * The skill is the unit the reader acts on: 1,728 of the 1,897 findings on a
118
+ * real 90-skill repo are one code, LINK_DROPPED_BY_DEPTH, whose four remedies
119
+ * are all SKILL-level config edits — so the default stderr report is one row
120
+ * per skill, never one block per finding. The per-issue blocks below are what
221
121
  * made this stream 6,261 lines on a 90-skill repo.
222
122
  */
223
123
  function skillSummaryLine(result) {
@@ -230,6 +130,25 @@ function skillSummaryLine(result) {
230
130
  const codeSuffix = tally === '' ? '' : ` — ${tally}`;
231
131
  return ` ${result.skillName}: ${breakdown}${allowed}${codeSuffix}`;
232
132
  }
133
+ /** Under `--verbose`: the allow-suppressed records and the references left out of the bundle. */
134
+ function verboseDetailLines(result) {
135
+ const lines = [];
136
+ if (result.ignoredErrors.length > 0) {
137
+ lines.push(` Allowed issues (${result.ignoredErrors.length}):`);
138
+ for (const record of result.ignoredErrors) {
139
+ lines.push(` [${String(record.code)}] ${String(record.location)} (allowed: ${record.reason})`);
140
+ }
141
+ }
142
+ const excluded = result.metadata.excludedReferences;
143
+ if (excluded.length > 0) {
144
+ lines.push(` Excluded references (${excluded.length}):`);
145
+ for (const reference of excluded) {
146
+ const pattern = reference.matchedPattern === undefined ? '' : `, pattern ${reference.matchedPattern}`;
147
+ lines.push(` ${reference.path} (${reference.reason}${pattern})`);
148
+ }
149
+ }
150
+ return lines;
151
+ }
233
152
  /**
234
153
  * Lines for ONE skill: its summary row, then the findings that render in full
235
154
  * beneath it at this verbosity.
@@ -242,8 +161,8 @@ function skillSummaryLine(result) {
242
161
  * re-run with `-v` to learn what failed the gate), while `warning`/`info`
243
162
  * collapse into the row unless asked for.
244
163
  *
245
- * The allow-suppressed records are listed only under `verbose`; by default the
246
- * row's `(+N allowed by config)` is their receipt.
164
+ * The allow-suppressed records and the excluded references are listed only
165
+ * under `verbose`; by default the row's `(+N allowed by config)` is the receipt.
247
166
  */
248
167
  function skillReportLines(result, verbose) {
249
168
  const lines = [skillSummaryLine(result)];
@@ -251,29 +170,27 @@ function skillReportLines(result, verbose) {
251
170
  for (const issue of rendered) {
252
171
  lines.push(...formatIssueLines(issue, ' '));
253
172
  }
254
- const listAllowed = verbose && result.ignoredErrors.length > 0;
255
- if (listAllowed) {
256
- lines.push(` Allowed issues (${result.ignoredErrors.length}):`);
257
- for (const record of result.ignoredErrors) {
258
- lines.push(` [${String(record.code)}] ${String(record.location)} (allowed: ${record.reason})`);
259
- }
260
- }
173
+ const detail = verbose ? verboseDetailLines(result) : [];
174
+ lines.push(...detail);
261
175
  // A trailing blank line only when something was rendered beneath the row —
262
176
  // otherwise consecutive one-line rows would be double-spaced.
263
- if (rendered.length > 0 || listAllowed) {
177
+ if (rendered.length > 0 || detail.length > 0) {
264
178
  lines.push('');
265
179
  }
266
180
  return lines;
267
181
  }
268
182
  /**
269
- * One glyph per status value — total, so a status this renderer has not thought
270
- * about cannot fall through to the reassuring `✅`.
183
+ * One glyph per severity outcome. Info never rates a warning: the same rule
184
+ * `statusFromEnvelope` applies to a phase, so an info-only skill is `✅` here
185
+ * and `success` in `vat validate`.
271
186
  */
272
- const STATUS_GLYPHS = {
273
- error: '❌',
274
- warning: '⚠️ ',
275
- success: '✅',
276
- };
187
+ function glyphFor(counts) {
188
+ if (counts.errors > 0)
189
+ return '❌';
190
+ if (counts.warnings > 0)
191
+ return '⚠️ ';
192
+ return '✅';
193
+ }
277
194
  /**
278
195
  * Banner naming what the run actually found.
279
196
  *
@@ -285,83 +202,71 @@ const STATUS_GLYPHS = {
285
202
  * directly above `FILES_GLOB_MATCHED_NOTHING`, whose message reads "`vat skills
286
203
  * build` fails on a glob that matches nothing, so the build will fail unless
287
204
  * that artifact is produced first" — a headline contradicting the single line
288
- * beneath it.
289
- *
290
- * The severity is right (a glob over an unbuilt `dist/` matching nothing is the
291
- * expected pre-build state and must not fail CI); only the claim was wrong. It
292
- * is dropped rather than made conditional because the code registry carries no
293
- * build-blocking fact to condition it on — `CodeRegistryEntry` in
294
- * schema/src/validation-codes.ts is exactly `defaultSeverity` /
295
- * `description` / `fix` / `reference` — and keying the claim
296
- * on a hardcoded list of code names would assert a cause this renderer cannot
297
- * observe, and would go stale the next time a code is added.
205
+ * beneath it. Keying the claim on a hardcoded list of code names would assert a
206
+ * cause this renderer cannot observe, and would go stale the next time a code
207
+ * is added.
298
208
  */
299
- function reportBanner(status, counts) {
300
- if (status === 'error') {
209
+ function reportBanner(counts, examined) {
210
+ if (counts.errors > 0) {
301
211
  return `\n❌ Validation failed — ${formatSeverityBreakdown(counts)}:\n`;
302
212
  }
303
213
  if (counts.warnings + counts.info > 0) {
304
214
  // Non-blocking (exit 0), which is exactly why this used to print
305
215
  // "All validations passed" over the findings.
306
- return `\n${STATUS_GLYPHS[status]} Validation passed with findings — ${formatSeverityBreakdown(counts)}:\n`;
216
+ return verdictBanner(examined, `\n${glyphFor(counts)} Validation passed with findings — ${formatSeverityBreakdown(counts)}:\n`);
307
217
  }
308
- return '\n✅ All validations passed';
218
+ return verdictBanner(examined, '\n✅ All validations passed');
309
219
  }
310
220
  /**
311
221
  * Human-readable report lines for the whole batch.
312
222
  *
313
- * Renders every skill with ANY emitted finding, not just the ones that failed
314
- * the gate: a warning-only or info-only run used to print the success banner and
223
+ * Renders every skill with ANY finding, not just the ones that failed the
224
+ * gate: a warning-only or info-only run used to print the success banner and
315
225
  * nothing else, so the findings existed only in the YAML on stdout.
316
226
  *
317
227
  * Every skill with findings gets its summary row at every verbosity; `verbose`
318
228
  * picks only which findings are ALSO rendered in full beneath that row, per
319
229
  * {@link issuesToRenderAtVerbosity} — errors always, `warning`/`info` when
320
- * asked, `ignore` never. `verbose` deliberately does NOT gate errors: a default
321
- * run that collapsed the error it exited 1 on into a count line forced the reader
322
- * to re-run with a flag to learn what broke.
230
+ * asked, `ignore` never.
323
231
  *
324
- * Run-level findings and the banner are printed in full either way — there are
325
- * ~14 of the former, and they belong to the project config rather than to any
326
- * asset, so there is no row for them to collapse into.
232
+ * `runFindings` are the published run-level findings — the `validation.allow`
233
+ * entries no skill matched, and the writer's run-integrity refusal when the
234
+ * run validated nothing — so the banner counts what the document counts and a
235
+ * run over zero skills cannot print a green banner over a refused document.
327
236
  *
328
- * Reads the same seam as the document builder ({@link withRunIntegrity}), so a
329
- * run over zero skills prints the refusal here too rather than a green banner
330
- * over a document that says `error`.
237
+ * @param results - One result per skill validated
238
+ * @param runFindings - The run-level findings the document published
239
+ * @param examined - The published report's `examined`, never recounted
240
+ * @param verbose - Render every finding in full, and the per-skill detail
331
241
  */
332
- export function formatValidationReportLines(results, runIssues, verbose, patterns) {
333
- const published = withRunIntegrity(results, runIssues, patterns);
334
- const issues = [...batchIssues(results), ...published];
335
- const counts = countBySeverity(issues);
336
- const status = calculateValidationStatus(issues);
337
- const lines = [reportBanner(status, counts)];
242
+ export function formatValidationReportLines(results, runFindings, examined, verbose) {
243
+ const counts = countBySeverity([...results.flatMap(skillFindings), ...toFindings(runFindings)]);
244
+ const lines = [reportBanner(counts, examined)];
338
245
  for (const result of results) {
339
246
  if (!hasFindings(result))
340
247
  continue;
341
248
  lines.push(...skillReportLines(result, verbose));
342
249
  }
343
- const runLines = formatRunIssueLines(published);
250
+ const runLines = formatRunIssueLines(runFindings);
344
251
  if (runLines.length > 0) {
345
252
  lines.push(...runLines, '');
346
253
  }
347
254
  return lines;
348
255
  }
349
256
  /**
350
- * Output validation report to stdout (YAML) and stderr (human-readable)
257
+ * The human half, on stderr: the report lines and the quality footer.
351
258
  */
352
- function reportValidationToStderr(results, logger, verbose, runIssues, patterns) {
353
- // Collect all emitted codes across skills (both errors and warnings) to drive the footer
354
- const emittedCodes = new Set();
355
- for (const r of results) {
356
- for (const issue of r.allErrors) {
357
- emittedCodes.add(issue.code);
358
- }
359
- }
360
- for (const issue of withRunIntegrity(results, runIssues, patterns)) {
361
- emittedCodes.add(issue.code);
362
- }
363
- const hasSkillFindings = results.some((r) => calculateValidationStatus(r.allErrors) !== 'success');
364
- for (const line of formatValidationReportLines(results, runIssues, verbose, patterns)) {
259
+ function reportValidationToStderr(results, runFindings, examined, logger, verbose) {
260
+ // Collect all emitted codes across skills and the run to drive the footer.
261
+ const emittedCodes = new Set([
262
+ ...results.flatMap((r) => r.allErrors.map((issue) => issue.code)),
263
+ ...runFindings.map((issue) => issue.code),
264
+ ]);
265
+ const hasSkillFindings = results.some((r) => {
266
+ const counts = countBySeverity(skillFindings(r));
267
+ return counts.errors + counts.warnings > 0;
268
+ });
269
+ for (const line of formatValidationReportLines(results, runFindings, examined, verbose)) {
365
270
  logger.info(line);
366
271
  }
367
272
  renderSkillQualityFooter(logger, hasSkillFindings, emittedCodes);
@@ -369,17 +274,15 @@ function reportValidationToStderr(results, logger, verbose, runIssues, patterns)
369
274
  /**
370
275
  * Log validation progress for a single skill.
371
276
  *
372
- * The per-skill glyph follows the shared collapse (`⚠️` for a warning-only
373
- * skill), and the severity breakdown is always spelled out. A skill with
374
- * warnings used to print a bare `✅ <name>`, which is the same reassuring
375
- * collapse as the batch banner, one line earlier.
277
+ * The per-skill glyph follows the skill's worst severity (`⚠️` for a
278
+ * warning-only skill), and the severity breakdown is always spelled out. A
279
+ * skill with warnings used to print a bare `✅ <name>`, which is the same
280
+ * reassuring collapse as the batch banner, one line earlier.
376
281
  */
377
282
  export function formatSkillProgressLine(skillName, result) {
378
- const counts = countBySeverity(result.allErrors);
379
- const status = calculateValidationStatus(result.allErrors);
380
- const glyph = STATUS_GLYPHS[status];
381
- const detail = result.allErrors.length > 0 ? `: ${formatSeverityBreakdown(counts)}` : '';
382
- const lines = [` ${glyph} ${skillName}${detail}`];
283
+ const counts = countBySeverity(skillFindings(result));
284
+ const detail = result.allErrors.length > 0 ? `: ${formatSeverityBreakdown(countBySeverity(result.allErrors))}` : '';
285
+ const lines = [` ${glyphFor(counts)} ${skillName}${detail}`];
383
286
  if (result.ignoredErrors.length > 0) {
384
287
  lines.push(` (${result.ignoredErrors.length} allowed by config)`);
385
288
  }
@@ -411,17 +314,33 @@ function logSkillProgress(skillName, result, logger) {
411
314
  */
412
315
  export async function buildSkillsValidateRegistry(projectRoot, options = {}) {
413
316
  const { config, populationSource } = options;
414
- const registry = await ResourceRegistry.fromCrawl({
317
+ const { registry } = await ResourceRegistry.fromCrawl({
415
318
  baseDir: projectRoot,
416
319
  include: ['**/*.md'],
417
320
  // `vat skills validate` acts on this registry as the whole population: a
418
321
  // directory it cannot list refuses the run by name, exit 2.
419
322
  unreadable: 'refuse',
323
+ // It only reads the project.
324
+ outputs: [],
420
325
  ...(populationSource !== undefined && { populationSource }),
421
326
  }, config === undefined ? undefined : { config });
422
327
  registry.resolveLinks();
423
328
  return registry;
424
329
  }
330
+ /**
331
+ * Build a single shared validation context for an entire `vat skills validate`
332
+ * invocation.
333
+ *
334
+ * When every skill in the batch resolves to the same projectRoot (the normal
335
+ * monorepo case), we crawl the resource registry once and hand the same
336
+ * instance to each skill's validation — the per-skill markdown reparse
337
+ * disappears. Similarly, gitignore checks are backed by a single
338
+ * {@link GitTracker} when every skill sits inside the same git repository.
339
+ *
340
+ * When the batch is heterogeneous (e.g. multiple projectRoots), the helper
341
+ * returns an empty context and validators transparently fall back to their
342
+ * legacy per-skill setup — correctness first, perf second.
343
+ */
425
344
  export async function buildSharedValidationContext(skills, projectSkills, config, logger) {
426
345
  // The allow-entry ledger is not an optimization like the two below — it is
427
346
  // what makes ALLOW_UNUSED true. `validation.allow` is declared once for the
@@ -449,7 +368,7 @@ export async function buildSharedValidationContext(skills, projectSkills, config
449
368
  // lane must model a bundle that excludes EVERY declared suite, not just the
450
369
  // subject's. Present even for an empty batch, so no early return can drop it.
451
370
  if (skills.length === 0) {
452
- return { allowLedger, projectSkills, suiteProbe, unreadable: 'refuse' };
371
+ return { allowLedger, projectSkills, suiteProbe, unreadable: 'refuse', outputs: [] };
453
372
  }
454
373
  const projectRoots = new Set();
455
374
  const gitRoots = new Set();
@@ -467,7 +386,8 @@ export async function buildSharedValidationContext(skills, projectSkills, config
467
386
  gitRoots.add(safePath.resolve(gitRoot));
468
387
  }
469
388
  }
470
- const context = { allowLedger, projectSkills, suiteProbe, unreadable: 'refuse' };
389
+ // Validation only reads the project.
390
+ const context = { allowLedger, projectSkills, suiteProbe, unreadable: 'refuse', outputs: [] };
471
391
  // One tracker per repo; when the batch spans repos, skip rather than spawn
472
392
  // multiple `git ls-files`.
473
393
  //
@@ -500,10 +420,8 @@ export async function buildSharedValidationContext(skills, projectSkills, config
500
420
  // `include` is unchanged either way — `ResourceRegistry.crawl` re-applies
501
421
  // it to whatever the source offers, so this stays a markdown-only registry
502
422
  // on both lanes.
503
- const registry = await withResourcePopulationSource({ root: sharedRoot, gitTracker: context.gitTracker }, async (populationSource) => {
504
- logger.debug(populationSource
505
- ? `Enumerating via the projection lane (${RESOURCES_CRAWL_ENV}=${RESOURCES_CRAWL_PROJECTION})`
506
- : `Enumerating via the incumbent walk (${RESOURCES_CRAWL_ENV} unset)`);
423
+ const registry = await withResourcePopulationSource({ root: sharedRoot, gitTracker: context.gitTracker }, (populationSource) => {
424
+ logger.debug(crawlLaneDebugLine(populationSource));
507
425
  return buildSkillsValidateRegistry(sharedRoot, {
508
426
  // The command's OWN config, not a second read of the same file. It
509
427
  // governs `sharedRoot` by construction: this command exits early
@@ -526,108 +444,104 @@ export async function buildSharedValidationContext(skills, projectSkills, config
526
444
  return context;
527
445
  }
528
446
  /**
529
- * Validate every configured skill and hand back the document and exit code,
530
- * printing the document nowhere.
447
+ * Validate every skill the `skills:` block declares (narrowed by `--skill`).
448
+ *
449
+ * @param skillsConfig - The config's `skills:` block
450
+ * @param cwd - The directory the config was read from; discovery globs resolve against it
451
+ * @param config - The whole config, handed to the shared registry
452
+ * @param options - `--skill`
453
+ * @param logger - Progress on stderr
454
+ */
455
+ async function validateConfiguredSkills(skillsConfig, cwd, config, options, logger) {
456
+ // `'refuse'`: one fewer skill at exit 0 is the drop this command must not
457
+ // make. A directory the OS will not list is refused by code (INPUT_UNREADABLE).
458
+ const discovered = await discoverSkillsFromConfig(skillsConfig, cwd, 'refuse');
459
+ // No early return on `discovered.length === 0`: the empty batch flows through
460
+ // every step below unchanged — the shared context is built for zero skills
461
+ // (its ledger and probe exist regardless), the loop runs zero times, and the
462
+ // writer refuses the zero denominator.
463
+ const { defaults, config: perSkillConfig } = skillsConfig;
464
+ const validatableSkills = discovered.map(skill => ({
465
+ ...skill,
466
+ packagingConfig: mergeSkillPackagingConfig(defaults, perSkillConfig?.[skill.name]),
467
+ }));
468
+ const skillsToValidate = filterSkillsByName(validatableSkills, options.skill);
469
+ logger.info(`🔍 Found ${skillsToValidate.length} skill(s) to validate\n`);
470
+ // Every declared skill, not just `skillsToValidate`: `--skill x` narrows what is
471
+ // REPORTED on, never what counts as some skill's declared test input.
472
+ const projectSkills = collectDeclaredEvalSuites(skillsConfig, discovered);
473
+ const sharedContext = await buildSharedValidationContext(skillsToValidate, projectSkills, config, logger);
474
+ // In order: `sharedContext`'s caches and the per-skill progress lines.
475
+ const results = await mapInOrder(skillsToValidate, async (skill) => {
476
+ logger.info(` Validating: ${skill.name}`);
477
+ logger.debug(` Source: ${skill.sourcePath}`);
478
+ const result = await validateSkillForPackaging(skill.sourcePath, skill.packagingConfig, 'source', sharedContext);
479
+ // `cwd` is the anchor root: config is read from it and discovery globs
480
+ // resolve against it, so every other location in this report is already
481
+ // relative to it.
482
+ applyConfigVerdicts(result, skill.packagingConfig.targets, skill.sourcePath, cwd);
483
+ logSkillProgress(skill.name, result, logger);
484
+ return result;
485
+ });
486
+ // Drain the run's allow ledger AFTER the last skill — an entry matched by
487
+ // any skill in the batch is used, so this is the first point at which
488
+ // "matched nothing" is answerable.
489
+ const runIssues = sharedContext.allowLedger === undefined ? [] : allowUnusedIssues(sharedContext.allowLedger);
490
+ return { results, runIssues };
491
+ }
492
+ /**
493
+ * Validate every configured skill and hand back the report, printing it
494
+ * nowhere.
495
+ *
496
+ * The phase entry point for `vat validate` and `vat verify`, and the command's
497
+ * own. The report is the one BEFORE the writer's run-integrity pass: inside an
498
+ * orchestrator, `runPhase` applies the same pass to this phase's report, by the
499
+ * declaration this verb gives its own writer.
531
500
  *
532
- * The phase entry point for `vat validate` and `vat verify`. The one early
533
- * return publishes NO document: a config with no `skills:` block prints one
534
- * info line, exits 0, and `phaseResultFromOutcome` records that as `success`
535
- * with no `report` — both orchestrators skip the phase on that config anyway,
536
- * because declaring no skills is a choice.
501
+ * A run that validated no skill — globs that discover nothing, or a config
502
+ * with no `skills:` block — is not a clean run. It used to take an early
503
+ * return that printed one info line and published NO document at exit 0, and
504
+ * `vat validate` folded that into success: the gate the docs name as THE gate,
505
+ * green forever on a config that checked nothing. Now it reports zero skills,
506
+ * which the writer refuses with `RESOURCE_CHECK_BROKEN` (exit 1) when this is
507
+ * the whole run; stderr names the globs that matched nothing. Both
508
+ * orchestrators skip this phase for a config with no `skills:` block.
537
509
  *
538
- * A `skills:` block whose globs discover nothing is NOT a second early return.
539
- * It used to be — one info line, no document, exit 0 — and that made `vat
540
- * validate` green forever on a typo'd glob. It now runs through the same
541
- * builder as a populated batch, which refuses a zero denominator (see
542
- * {@link withRunIntegrity}): a document with one `RESOURCE_CHECK_BROKEN` at
543
- * `error`, `status: error`, exit 1. Exit 1 and not 2, deliberately: the run
544
- * completed and the gate FAILED, which is the class an operator's CI already
545
- * handles; 2 is for a run that could not answer at all.
510
+ * Every refusal is classified by code: a `[path]` naming nothing, an unknown
511
+ * `--skill`, no project root → `USAGE_INVALID`; an unlistable directory →
512
+ * `INPUT_UNREADABLE`; a config that does not parse → `CONFIG_INVALID`.
546
513
  */
547
514
  export async function runSkillsValidatePhase(pathArg, options) {
548
515
  const { logger, cwd, startTime } = setupCommandContext(pathArg, options.debug);
549
516
  try {
550
- // Spec §7: `vat skills validate` requires a projectRoot — fails fast at
551
- // the CLI boundary if no config or git ancestor exists. The resolved root
552
- // is discarded here because config is read from `cwd`; the guard exists
553
- // to satisfy the policy contract.
517
+ assertScopableSkillsPath(SCOPE_SUBJECT, pathArg);
518
+ // Spec §7: `vat skills validate` requires a projectRoot. Config is read
519
+ // from `cwd`; the guard exists to satisfy the policy contract.
554
520
  requireProjectRoot(cwd, 'vat skills validate');
555
521
  // Load config yaml from cwd (not workspace root — config lives next to the package)
556
- const config = loadConfig(cwd);
557
- if (!config?.skills) {
558
- logger.info('No skills section in config yaml — nothing to validate');
559
- return { document: undefined, exitCode: 0 };
560
- }
561
- // Discover skills from config yaml (relative to cwd where config lives).
562
- // `'refuse'`: one fewer skill at exit 0 is the drop this command must not
563
- // make. The throw lands in the catch below → `reportCommandError`, exit 2.
564
- const discovered = await discoverSkillsFromConfig(config.skills, cwd, 'refuse');
565
- // No early return on `discovered.length === 0` — see the function comment.
566
- // The empty batch flows through every step below unchanged: the shared
567
- // context is built for zero skills (its ledger and probe exist regardless),
568
- // the loop runs zero times, and the builder refuses the zero denominator.
569
- // Merge packaging config for each skill.
570
- const { defaults, config: perSkillConfig } = config.skills;
571
- const validatableSkills = discovered.map(skill => ({
572
- ...skill,
573
- packagingConfig: mergeSkillPackagingConfig(defaults, perSkillConfig?.[skill.name]),
574
- }));
575
- // Filter by name if specified
576
- const skillsToValidate = filterSkillsByName(validatableSkills, options.skill);
577
- logger.info(`🔍 Found ${skillsToValidate.length} skill(s) to validate\n`);
578
- // Build shared context once per invocation. Both the resource registry
579
- // (for markdown parses) and the git tracker (for gitignore checks) can be
580
- // shared across every skill whose projectRoot + gitRoot match the derived
581
- // values, which is the common case for a single-repo `vat skills validate`.
582
- // Every declared skill, not just `skillsToValidate`: `--skill x` narrows what is
583
- // REPORTED on, never what counts as some skill's declared test input.
584
- const projectSkills = collectDeclaredEvalSuites(config.skills, discovered);
585
- const sharedContext = await buildSharedValidationContext(skillsToValidate, projectSkills, config, logger);
586
- // Validate each skill
587
- const results = [];
588
- for (const skill of skillsToValidate) {
589
- logger.info(` Validating: ${skill.name}`);
590
- logger.debug(` Source: ${skill.sourcePath}`);
591
- const result = await validateSkillForPackaging(skill.sourcePath, skill.packagingConfig, 'source', sharedContext);
592
- // `cwd` is the anchor root: config is read from it and discovery globs
593
- // resolve against it, so every other location in this report is already
594
- // relative to it.
595
- applyConfigVerdicts(result, skill.packagingConfig.targets, skill.sourcePath, cwd);
596
- logSkillProgress(skill.name, result, logger);
597
- results.push(result);
598
- }
599
- // Drain the run's allow ledger AFTER the last skill — an entry matched by
600
- // any skill in the batch is used, so this is the first point at which
601
- // "matched nothing" is answerable.
602
- const runIssues = sharedContext.allowLedger === undefined
603
- ? []
604
- : allowUnusedIssues(sharedContext.allowLedger);
605
- const duration = Date.now() - startTime;
606
- const verbose = options.verbose === true;
607
- const document = buildValidateSummary(results, duration, verbose, runIssues, config.skills);
608
- reportValidationToStderr(results, logger, verbose, runIssues, config.skills);
609
- // The exit code is read off the DOCUMENT, not recomputed beside it, so the
610
- // two cannot disagree: whatever the builder refused, the process refuses.
611
- // `issueCounts.errors` counts an active error on any skill and every
612
- // run-level error alike — including the zero-denominator refusal.
613
- return { document, exitCode: document.issueCounts.errors > 0 ? 1 : 0 };
522
+ const config = loadConfig(cwd, 'source');
523
+ const { results, runIssues } = config?.skills === undefined
524
+ ? { results: [], runIssues: [] }
525
+ : await validateConfiguredSkills(config.skills, cwd, config, options, logger);
526
+ const report = buildSkillsValidateReport({
527
+ root: cwd,
528
+ results,
529
+ runIssues,
530
+ durationMs: Date.now() - startTime,
531
+ });
532
+ reportValidationToStderr(results, runIssues, report.examined, logger, options.verbose === true);
533
+ if (report.examined === 0)
534
+ logger.error(nothingDiscoveredLine(config?.skills));
535
+ return { report };
614
536
  }
615
537
  catch (error) {
616
- return {
617
- document: reportCommandError(error, logger, startTime, 'SkillsValidate'),
618
- exitCode: 2,
619
- failed: true,
620
- };
538
+ return { report: refusalReport(refusalCodeOf(error), error, GATE, NOTHING_FINISHED) };
621
539
  }
622
540
  }
623
541
  /**
624
542
  * Skills validate command implementation
625
543
  */
626
544
  export async function validateCommand(pathArg, options) {
627
- // `undefined`: this command offers no `--format`, so its failure envelope is
628
- // YAML like its report.
629
- finishCommand(await runSkillsValidatePhase(pathArg, options), (document) => {
630
- writeYamlSummary(document);
631
- }, undefined);
545
+ endWithReport('skills validate', (await runSkillsValidatePhase(pathArg, options)).report, FORMAT);
632
546
  }
633
547
  //# sourceMappingURL=validate.js.map