@shrkcrft/inspector 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 (693) hide show
  1. package/dist/acceptance-replay.js +1 -1
  2. package/dist/agent-contract-templates.js +6 -6
  3. package/dist/agent-contract.d.ts.map +1 -1
  4. package/dist/agent-contract.js +13 -8
  5. package/dist/agent-orchestration.js +2 -2
  6. package/dist/agent-task-prep.d.ts +16 -0
  7. package/dist/agent-task-prep.d.ts.map +1 -1
  8. package/dist/agent-task-prep.js +51 -4
  9. package/dist/ai-readiness.d.ts.map +1 -1
  10. package/dist/ai-readiness.js +21 -3
  11. package/dist/architecture-map.d.ts +16 -0
  12. package/dist/architecture-map.d.ts.map +1 -1
  13. package/dist/architecture-map.js +42 -26
  14. package/dist/area-explore.d.ts +2 -2
  15. package/dist/area-explore.d.ts.map +1 -1
  16. package/dist/area-explore.js +36 -16
  17. package/dist/area-map.d.ts +56 -11
  18. package/dist/area-map.d.ts.map +1 -1
  19. package/dist/area-map.js +106 -25
  20. package/dist/asset-doctor-proposed-exit.d.ts +21 -0
  21. package/dist/asset-doctor-proposed-exit.d.ts.map +1 -0
  22. package/dist/asset-doctor-proposed-exit.js +22 -0
  23. package/dist/asset-provenance.js +1 -1
  24. package/dist/boundaries-changed-only.d.ts +24 -1
  25. package/dist/boundaries-changed-only.d.ts.map +1 -1
  26. package/dist/boundaries-changed-only.js +12 -2
  27. package/dist/boundary-check-options.model.d.ts +40 -0
  28. package/dist/boundary-check-options.model.d.ts.map +1 -0
  29. package/dist/boundary-check-options.model.js +1 -0
  30. package/dist/boundary-check-result.model.d.ts +89 -0
  31. package/dist/boundary-check-result.model.d.ts.map +1 -0
  32. package/dist/boundary-check-result.model.js +1 -0
  33. package/dist/boundary-configuration-status.d.ts +38 -0
  34. package/dist/boundary-configuration-status.d.ts.map +1 -0
  35. package/dist/boundary-configuration-status.js +118 -0
  36. package/dist/boundary-configuration-status.model.d.ts +37 -0
  37. package/dist/boundary-configuration-status.model.d.ts.map +1 -0
  38. package/dist/boundary-configuration-status.model.js +1 -0
  39. package/dist/boundary-load-issue.model.d.ts +30 -0
  40. package/dist/boundary-load-issue.model.d.ts.map +1 -0
  41. package/dist/boundary-load-issue.model.js +1 -0
  42. package/dist/boundary-rule-check.model.d.ts +44 -0
  43. package/dist/boundary-rule-check.model.d.ts.map +1 -0
  44. package/dist/boundary-rule-check.model.js +1 -0
  45. package/dist/boundary-rule-invalidation.model.d.ts +31 -0
  46. package/dist/boundary-rule-invalidation.model.d.ts.map +1 -0
  47. package/dist/boundary-rule-invalidation.model.js +1 -0
  48. package/dist/boundary-rule-set-diff.model.d.ts +75 -0
  49. package/dist/boundary-rule-set-diff.model.d.ts.map +1 -0
  50. package/dist/boundary-rule-set-diff.model.js +1 -0
  51. package/dist/boundary-rule-sources.d.ts +28 -0
  52. package/dist/boundary-rule-sources.d.ts.map +1 -0
  53. package/dist/boundary-rule-sources.js +110 -0
  54. package/dist/boundary-stale-exception-finding.model.d.ts +12 -0
  55. package/dist/boundary-stale-exception-finding.model.d.ts.map +1 -0
  56. package/dist/boundary-stale-exception-finding.model.js +1 -0
  57. package/dist/boundary-unit-liveness.d.ts +35 -0
  58. package/dist/boundary-unit-liveness.d.ts.map +1 -0
  59. package/dist/boundary-unit-liveness.js +71 -0
  60. package/dist/change-intent.d.ts +3 -0
  61. package/dist/change-intent.d.ts.map +1 -1
  62. package/dist/change-intent.js +61 -27
  63. package/dist/changes-summary.d.ts.map +1 -1
  64. package/dist/changes-summary.js +19 -9
  65. package/dist/ci-integrity-report.js +1 -1
  66. package/dist/ci-predict.d.ts.map +1 -1
  67. package/dist/ci-predict.js +38 -5
  68. package/dist/code-intelligence-doctor.d.ts +6 -0
  69. package/dist/code-intelligence-doctor.d.ts.map +1 -1
  70. package/dist/code-intelligence-doctor.js +22 -7
  71. package/dist/command-recommender.d.ts +45 -2
  72. package/dist/command-recommender.d.ts.map +1 -1
  73. package/dist/command-recommender.js +41 -263
  74. package/dist/command-resolution-status.d.ts +44 -0
  75. package/dist/command-resolution-status.d.ts.map +1 -0
  76. package/dist/command-resolution-status.js +44 -0
  77. package/dist/command-safety-level.d.ts +15 -0
  78. package/dist/command-safety-level.d.ts.map +1 -0
  79. package/dist/command-safety-level.js +43 -0
  80. package/dist/command-taxonomy.js +1 -1
  81. package/dist/compliance-evidence.js +1 -1
  82. package/dist/compliance-profiles.js +1 -1
  83. package/dist/construct-registry.d.ts +40 -0
  84. package/dist/construct-registry.d.ts.map +1 -1
  85. package/dist/construct-registry.js +186 -82
  86. package/dist/context-tuning.d.ts +4 -0
  87. package/dist/context-tuning.d.ts.map +1 -1
  88. package/dist/context-tuning.js +10 -7
  89. package/dist/contract-template-registry.d.ts +10 -0
  90. package/dist/contract-template-registry.d.ts.map +1 -1
  91. package/dist/contract-template-registry.js +59 -33
  92. package/dist/contribution-kind.d.ts +52 -0
  93. package/dist/contribution-kind.d.ts.map +1 -0
  94. package/dist/contribution-kind.js +52 -0
  95. package/dist/contribution-load-failures.d.ts +106 -0
  96. package/dist/contribution-load-failures.d.ts.map +1 -0
  97. package/dist/contribution-load-failures.js +575 -0
  98. package/dist/contributions-report.d.ts +28 -0
  99. package/dist/contributions-report.d.ts.map +1 -0
  100. package/dist/contributions-report.js +242 -0
  101. package/dist/convention-registry.d.ts +22 -0
  102. package/dist/convention-registry.d.ts.map +1 -1
  103. package/dist/convention-registry.js +79 -39
  104. package/dist/coverage-report.d.ts.map +1 -1
  105. package/dist/coverage-report.js +6 -6
  106. package/dist/custom-checks.d.ts +60 -1
  107. package/dist/custom-checks.d.ts.map +1 -1
  108. package/dist/custom-checks.js +159 -6
  109. package/dist/dashboard/dashboard-data.d.ts +6 -0
  110. package/dist/dashboard/dashboard-data.d.ts.map +1 -1
  111. package/dist/dashboard/dashboard-data.js +99 -8
  112. package/dist/dashboard/dashboard-knowledge.d.ts.map +1 -1
  113. package/dist/dashboard/dashboard-knowledge.js +14 -2
  114. package/dist/decision-records.d.ts +20 -0
  115. package/dist/decision-records.d.ts.map +1 -1
  116. package/dist/decision-records.js +68 -20
  117. package/dist/declared-cross-references.d.ts +61 -0
  118. package/dist/declared-cross-references.d.ts.map +1 -0
  119. package/dist/declared-cross-references.js +550 -0
  120. package/dist/declared-gate-plane-rules.d.ts +24 -0
  121. package/dist/declared-gate-plane-rules.d.ts.map +1 -0
  122. package/dist/declared-gate-plane-rules.js +39 -0
  123. package/dist/declared-reference-coverage.d.ts +27 -0
  124. package/dist/declared-reference-coverage.d.ts.map +1 -0
  125. package/dist/declared-reference-coverage.js +50 -0
  126. package/dist/declared-xref-status.d.ts +19 -0
  127. package/dist/declared-xref-status.d.ts.map +1 -0
  128. package/dist/declared-xref-status.js +19 -0
  129. package/dist/delegate-pack-recipes.d.ts +13 -2
  130. package/dist/delegate-pack-recipes.d.ts.map +1 -1
  131. package/dist/delegate-pack-recipes.js +45 -14
  132. package/dist/demo-package.js +2 -2
  133. package/dist/demo-script.js +2 -2
  134. package/dist/demo-workflow.js +3 -3
  135. package/dist/dev-cycle.js +1 -1
  136. package/dist/dev-session.js +1 -1
  137. package/dist/doc-references.d.ts +23 -2
  138. package/dist/doc-references.d.ts.map +1 -1
  139. package/dist/doc-references.js +96 -17
  140. package/dist/doctor-result.d.ts +8 -0
  141. package/dist/doctor-result.d.ts.map +1 -1
  142. package/dist/doctor-verdict-kind.d.ts +19 -0
  143. package/dist/doctor-verdict-kind.d.ts.map +1 -0
  144. package/dist/doctor-verdict-kind.js +19 -0
  145. package/dist/doctor-verdict.d.ts +18 -0
  146. package/dist/doctor-verdict.d.ts.map +1 -0
  147. package/dist/doctor-verdict.js +28 -0
  148. package/dist/drift.d.ts +17 -0
  149. package/dist/drift.d.ts.map +1 -1
  150. package/dist/drift.js +40 -10
  151. package/dist/entrypoint-matrix.d.ts.map +1 -1
  152. package/dist/entrypoint-matrix.js +4 -1
  153. package/dist/feedback-ingestion.d.ts +28 -2
  154. package/dist/feedback-ingestion.d.ts.map +1 -1
  155. package/dist/feedback-ingestion.js +68 -19
  156. package/dist/fix-preview.d.ts.map +1 -1
  157. package/dist/fix-preview.js +9 -5
  158. package/dist/framework-extractor-outcomes.d.ts +27 -0
  159. package/dist/framework-extractor-outcomes.d.ts.map +1 -0
  160. package/dist/framework-extractor-outcomes.js +83 -0
  161. package/dist/fuzzy-impact.js +1 -1
  162. package/dist/healing-plan.d.ts.map +1 -1
  163. package/dist/healing-plan.js +3 -4
  164. package/dist/helper-catalog.d.ts +25 -0
  165. package/dist/helper-catalog.d.ts.map +1 -0
  166. package/dist/helper-catalog.js +91 -0
  167. package/dist/helper-registry.d.ts.map +1 -1
  168. package/dist/helper-registry.js +17 -1
  169. package/dist/helper-view.d.ts +33 -0
  170. package/dist/helper-view.d.ts.map +1 -0
  171. package/dist/helper-view.js +1 -0
  172. package/dist/i-asset-doctor-flags.d.ts +16 -0
  173. package/dist/i-asset-doctor-flags.d.ts.map +1 -0
  174. package/dist/i-asset-doctor-flags.js +1 -0
  175. package/dist/i-command-resolution.d.ts +22 -0
  176. package/dist/i-command-resolution.d.ts.map +1 -0
  177. package/dist/i-command-resolution.js +1 -0
  178. package/dist/i-command-resolve-options.d.ts +24 -0
  179. package/dist/i-command-resolve-options.d.ts.map +1 -0
  180. package/dist/i-command-resolve-options.js +1 -0
  181. package/dist/i-command-safety.d.ts +13 -0
  182. package/dist/i-command-safety.d.ts.map +1 -0
  183. package/dist/i-command-safety.js +1 -0
  184. package/dist/i-contribution-accepted-entry.d.ts +18 -0
  185. package/dist/i-contribution-accepted-entry.d.ts.map +1 -0
  186. package/dist/i-contribution-accepted-entry.js +1 -0
  187. package/dist/i-contribution-entry-rejection.d.ts +21 -0
  188. package/dist/i-contribution-entry-rejection.d.ts.map +1 -0
  189. package/dist/i-contribution-entry-rejection.js +1 -0
  190. package/dist/i-contribution-file-issue.d.ts +18 -0
  191. package/dist/i-contribution-file-issue.d.ts.map +1 -0
  192. package/dist/i-contribution-file-issue.js +1 -0
  193. package/dist/i-contribution-file-report.d.ts +40 -0
  194. package/dist/i-contribution-file-report.d.ts.map +1 -0
  195. package/dist/i-contribution-file-report.js +1 -0
  196. package/dist/i-contribution-file-validation.d.ts +24 -0
  197. package/dist/i-contribution-file-validation.d.ts.map +1 -0
  198. package/dist/i-contribution-file-validation.js +1 -0
  199. package/dist/i-contributions-report.d.ts +31 -0
  200. package/dist/i-contributions-report.d.ts.map +1 -0
  201. package/dist/i-contributions-report.js +1 -0
  202. package/dist/i-declared-xref-field.d.ts +25 -0
  203. package/dist/i-declared-xref-field.d.ts.map +1 -0
  204. package/dist/i-declared-xref-field.js +1 -0
  205. package/dist/i-declared-xref-issue.d.ts +25 -0
  206. package/dist/i-declared-xref-issue.d.ts.map +1 -0
  207. package/dist/i-declared-xref-issue.js +1 -0
  208. package/dist/i-declared-xref-report.d.ts +48 -0
  209. package/dist/i-declared-xref-report.d.ts.map +1 -0
  210. package/dist/i-declared-xref-report.js +1 -0
  211. package/dist/i-declared-xref-row.d.ts +29 -0
  212. package/dist/i-declared-xref-row.d.ts.map +1 -0
  213. package/dist/i-declared-xref-row.js +1 -0
  214. package/dist/i-doctor-verdict.d.ts +10 -0
  215. package/dist/i-doctor-verdict.d.ts.map +1 -0
  216. package/dist/i-doctor-verdict.js +1 -0
  217. package/dist/i-kind-outcomes.d.ts +13 -0
  218. package/dist/i-kind-outcomes.d.ts.map +1 -0
  219. package/dist/i-kind-outcomes.js +1 -0
  220. package/dist/i-pack-doctor-verdict.d.ts +15 -0
  221. package/dist/i-pack-doctor-verdict.d.ts.map +1 -0
  222. package/dist/i-pack-doctor-verdict.js +1 -0
  223. package/dist/i-probed-id-field.d.ts +17 -0
  224. package/dist/i-probed-id-field.d.ts.map +1 -0
  225. package/dist/i-probed-id-field.js +1 -0
  226. package/dist/i-reference-kind-declaration.d.ts +38 -0
  227. package/dist/i-reference-kind-declaration.d.ts.map +1 -0
  228. package/dist/i-reference-kind-declaration.js +1 -0
  229. package/dist/i-reference-warm-options.d.ts +21 -0
  230. package/dist/i-reference-warm-options.d.ts.map +1 -0
  231. package/dist/i-reference-warm-options.js +1 -0
  232. package/dist/i-registry-outcomes.d.ts +16 -0
  233. package/dist/i-registry-outcomes.d.ts.map +1 -0
  234. package/dist/i-registry-outcomes.js +1 -0
  235. package/dist/i-scaffold-pattern-doctor-report.d.ts +35 -0
  236. package/dist/i-scaffold-pattern-doctor-report.d.ts.map +1 -0
  237. package/dist/i-scaffold-pattern-doctor-report.js +1 -0
  238. package/dist/i-search-tuning-key-probe.d.ts +30 -0
  239. package/dist/i-search-tuning-key-probe.d.ts.map +1 -0
  240. package/dist/i-search-tuning-key-probe.js +1 -0
  241. package/dist/i-search-tuning-lint-issue.d.ts +61 -0
  242. package/dist/i-search-tuning-lint-issue.d.ts.map +1 -0
  243. package/dist/i-search-tuning-lint-issue.js +1 -0
  244. package/dist/i-search-tuning-lint-report.d.ts +38 -0
  245. package/dist/i-search-tuning-lint-report.d.ts.map +1 -0
  246. package/dist/i-search-tuning-lint-report.js +1 -0
  247. package/dist/i-unresolvable-reference-scan.d.ts +14 -0
  248. package/dist/i-unresolvable-reference-scan.d.ts.map +1 -0
  249. package/dist/i-unresolvable-reference-scan.js +1 -0
  250. package/dist/i-unresolvable-reference.d.ts +29 -0
  251. package/dist/i-unresolvable-reference.d.ts.map +1 -0
  252. package/dist/i-unresolvable-reference.js +1 -0
  253. package/dist/i-workspace-profile-payload.d.ts +12 -0
  254. package/dist/i-workspace-profile-payload.d.ts.map +1 -0
  255. package/dist/i-workspace-profile-payload.js +1 -0
  256. package/dist/impact-analysis.d.ts +15 -0
  257. package/dist/impact-analysis.d.ts.map +1 -1
  258. package/dist/impact-analysis.js +58 -13
  259. package/dist/impact-render.d.ts.map +1 -1
  260. package/dist/impact-render.js +22 -0
  261. package/dist/import-hygiene.d.ts +35 -1
  262. package/dist/import-hygiene.d.ts.map +1 -1
  263. package/dist/import-hygiene.js +107 -13
  264. package/dist/index.d.ts +141 -0
  265. package/dist/index.d.ts.map +1 -1
  266. package/dist/index.js +172 -0
  267. package/dist/inspection-discovery.d.ts +45 -0
  268. package/dist/inspection-discovery.d.ts.map +1 -0
  269. package/dist/inspection-discovery.js +70 -0
  270. package/dist/knowledge-advisory-code.d.ts +17 -0
  271. package/dist/knowledge-advisory-code.d.ts.map +1 -0
  272. package/dist/knowledge-advisory-code.js +17 -0
  273. package/dist/knowledge-aged-entry.d.ts +10 -0
  274. package/dist/knowledge-aged-entry.d.ts.map +1 -0
  275. package/dist/knowledge-aged-entry.js +1 -0
  276. package/dist/knowledge-authoring.d.ts +24 -1
  277. package/dist/knowledge-authoring.d.ts.map +1 -1
  278. package/dist/knowledge-authoring.js +46 -7
  279. package/dist/knowledge-entry-verdict-record.d.ts +22 -0
  280. package/dist/knowledge-entry-verdict-record.d.ts.map +1 -0
  281. package/dist/knowledge-entry-verdict-record.js +1 -0
  282. package/dist/knowledge-entry-verdict.d.ts +17 -0
  283. package/dist/knowledge-entry-verdict.d.ts.map +1 -0
  284. package/dist/knowledge-entry-verdict.js +17 -0
  285. package/dist/knowledge-graph.d.ts +6 -0
  286. package/dist/knowledge-graph.d.ts.map +1 -1
  287. package/dist/knowledge-graph.js +18 -7
  288. package/dist/knowledge-kind-bucket.d.ts +19 -0
  289. package/dist/knowledge-kind-bucket.d.ts.map +1 -0
  290. package/dist/knowledge-kind-bucket.js +1 -0
  291. package/dist/knowledge-load-failure.d.ts +23 -0
  292. package/dist/knowledge-load-failure.d.ts.map +1 -0
  293. package/dist/knowledge-load-failure.js +1 -0
  294. package/dist/knowledge-reference-kind-bucket.d.ts +11 -0
  295. package/dist/knowledge-reference-kind-bucket.d.ts.map +1 -0
  296. package/dist/knowledge-reference-kind-bucket.js +1 -0
  297. package/dist/knowledge-stale-advisory.d.ts +14 -0
  298. package/dist/knowledge-stale-advisory.d.ts.map +1 -0
  299. package/dist/knowledge-stale-advisory.js +1 -0
  300. package/dist/knowledge-stale-coverage.d.ts +19 -0
  301. package/dist/knowledge-stale-coverage.d.ts.map +1 -0
  302. package/dist/knowledge-stale-coverage.js +1 -0
  303. package/dist/knowledge-stale-gate-flags.d.ts +33 -0
  304. package/dist/knowledge-stale-gate-flags.d.ts.map +1 -0
  305. package/dist/knowledge-stale-gate-flags.js +1 -0
  306. package/dist/knowledge-stale-gate-input.d.ts +46 -0
  307. package/dist/knowledge-stale-gate-input.d.ts.map +1 -0
  308. package/dist/knowledge-stale-gate-input.js +1 -0
  309. package/dist/knowledge-stale-gate-result.d.ts +33 -0
  310. package/dist/knowledge-stale-gate-result.d.ts.map +1 -0
  311. package/dist/knowledge-stale-gate-result.js +1 -0
  312. package/dist/knowledge-stale-gate-rule.d.ts +33 -0
  313. package/dist/knowledge-stale-gate-rule.d.ts.map +1 -0
  314. package/dist/knowledge-stale-gate-rule.js +1 -0
  315. package/dist/knowledge-stale-gate-violation.d.ts +13 -0
  316. package/dist/knowledge-stale-gate-violation.d.ts.map +1 -0
  317. package/dist/knowledge-stale-gate-violation.js +1 -0
  318. package/dist/knowledge-stale-gate.d.ts +83 -0
  319. package/dist/knowledge-stale-gate.d.ts.map +1 -0
  320. package/dist/knowledge-stale-gate.js +429 -0
  321. package/dist/knowledge-stale-quality-gate.d.ts +26 -0
  322. package/dist/knowledge-stale-quality-gate.d.ts.map +1 -0
  323. package/dist/knowledge-stale-quality-gate.js +110 -0
  324. package/dist/knowledge-stale.d.ts +122 -9
  325. package/dist/knowledge-stale.d.ts.map +1 -1
  326. package/dist/knowledge-stale.js +996 -291
  327. package/dist/knowledge-unverifiable-reason.d.ts +12 -0
  328. package/dist/knowledge-unverifiable-reason.d.ts.map +1 -0
  329. package/dist/knowledge-unverifiable-reason.js +12 -0
  330. package/dist/loader-diagnostics.d.ts +14 -2
  331. package/dist/loader-diagnostics.d.ts.map +1 -1
  332. package/dist/match-terms.d.ts +48 -0
  333. package/dist/match-terms.d.ts.map +1 -0
  334. package/dist/match-terms.js +155 -0
  335. package/dist/migration-profile-registry.d.ts +10 -0
  336. package/dist/migration-profile-registry.d.ts.map +1 -1
  337. package/dist/migration-profile-registry.js +57 -34
  338. package/dist/migration-readiness.d.ts.map +1 -1
  339. package/dist/migration-readiness.js +1 -3
  340. package/dist/nearest-id.d.ts +10 -26
  341. package/dist/nearest-id.d.ts.map +1 -1
  342. package/dist/nearest-id.js +9 -59
  343. package/dist/pack-asset-freshness.d.ts +65 -0
  344. package/dist/pack-asset-freshness.d.ts.map +1 -0
  345. package/dist/pack-asset-freshness.js +340 -0
  346. package/dist/pack-author-ux.d.ts +24 -3
  347. package/dist/pack-author-ux.d.ts.map +1 -1
  348. package/dist/pack-author-ux.js +87 -93
  349. package/dist/pack-contributions-inventory.d.ts +79 -39
  350. package/dist/pack-contributions-inventory.d.ts.map +1 -1
  351. package/dist/pack-contributions-inventory.js +443 -286
  352. package/dist/pack-doctor-verdict.d.ts +29 -0
  353. package/dist/pack-doctor-verdict.d.ts.map +1 -0
  354. package/dist/pack-doctor-verdict.js +45 -0
  355. package/dist/pack-doctor.d.ts +74 -1
  356. package/dist/pack-doctor.d.ts.map +1 -1
  357. package/dist/pack-doctor.js +281 -1
  358. package/dist/pack-helper-plan.d.ts +24 -0
  359. package/dist/pack-helper-plan.d.ts.map +1 -0
  360. package/dist/pack-helper-plan.js +77 -0
  361. package/dist/pack-helper-registry.d.ts +14 -0
  362. package/dist/pack-helper-registry.d.ts.map +1 -1
  363. package/dist/pack-helper-registry.js +76 -37
  364. package/dist/pack-manifest-reader.d.ts +8 -0
  365. package/dist/pack-manifest-reader.d.ts.map +1 -0
  366. package/dist/pack-manifest-reader.js +79 -0
  367. package/dist/pack-release-check.d.ts +14 -1
  368. package/dist/pack-release-check.d.ts.map +1 -1
  369. package/dist/pack-release-check.js +23 -1
  370. package/dist/pack-signature-status.d.ts +18 -6
  371. package/dist/pack-signature-status.d.ts.map +1 -1
  372. package/dist/pack-signature-status.js +59 -105
  373. package/dist/pack-test-runner.d.ts +27 -5
  374. package/dist/pack-test-runner.d.ts.map +1 -1
  375. package/dist/pack-test-runner.js +91 -35
  376. package/dist/pack-typecheck.d.ts +8 -0
  377. package/dist/pack-typecheck.d.ts.map +1 -0
  378. package/dist/pack-typecheck.js +76 -0
  379. package/dist/plan-review.d.ts +2 -0
  380. package/dist/plan-review.d.ts.map +1 -1
  381. package/dist/plan-review.js +17 -5
  382. package/dist/plan-simulation.d.ts.map +1 -1
  383. package/dist/plan-simulation.js +16 -5
  384. package/dist/playbook-load-issue.d.ts +16 -0
  385. package/dist/playbook-load-issue.d.ts.map +1 -0
  386. package/dist/playbook-load-issue.js +1 -0
  387. package/dist/playbook-registry.d.ts +32 -1
  388. package/dist/playbook-registry.d.ts.map +1 -1
  389. package/dist/playbook-registry.js +144 -55
  390. package/dist/policy-declaration.d.ts +18 -0
  391. package/dist/policy-declaration.d.ts.map +1 -0
  392. package/dist/policy-declaration.js +1 -0
  393. package/dist/policy-engine.d.ts +8 -0
  394. package/dist/policy-engine.d.ts.map +1 -1
  395. package/dist/policy-engine.js +26 -9
  396. package/dist/policy-overrides.d.ts.map +1 -1
  397. package/dist/policy-overrides.js +4 -4
  398. package/dist/policy-registry.d.ts +27 -0
  399. package/dist/policy-registry.d.ts.map +1 -1
  400. package/dist/policy-registry.js +87 -20
  401. package/dist/probed-id-fields.d.ts +21 -0
  402. package/dist/probed-id-fields.d.ts.map +1 -0
  403. package/dist/probed-id-fields.js +25 -0
  404. package/dist/probed-id-source.d.ts +11 -0
  405. package/dist/probed-id-source.d.ts.map +1 -0
  406. package/dist/probed-id-source.js +11 -0
  407. package/dist/profile-registry.d.ts +25 -2
  408. package/dist/profile-registry.d.ts.map +1 -1
  409. package/dist/profile-registry.js +59 -6
  410. package/dist/quality-gate-examination.d.ts +15 -0
  411. package/dist/quality-gate-examination.d.ts.map +1 -0
  412. package/dist/quality-gate-examination.js +15 -0
  413. package/dist/quality-gate-row-status.d.ts +19 -0
  414. package/dist/quality-gate-row-status.d.ts.map +1 -0
  415. package/dist/quality-gate-row-status.js +28 -0
  416. package/dist/quality-gate-status.d.ts +16 -0
  417. package/dist/quality-gate-status.d.ts.map +1 -0
  418. package/dist/quality-gate-status.js +16 -0
  419. package/dist/quality-html.d.ts.map +1 -1
  420. package/dist/quality-html.js +14 -3
  421. package/dist/quality-report-coverage.d.ts +26 -0
  422. package/dist/quality-report-coverage.d.ts.map +1 -0
  423. package/dist/quality-report-coverage.js +48 -0
  424. package/dist/quality-report.d.ts +28 -1
  425. package/dist/quality-report.d.ts.map +1 -1
  426. package/dist/quality-report.js +263 -35
  427. package/dist/query-intent-kind.d.ts +18 -0
  428. package/dist/query-intent-kind.d.ts.map +1 -0
  429. package/dist/query-intent-kind.js +18 -0
  430. package/dist/query-intent-result.d.ts +23 -0
  431. package/dist/query-intent-result.d.ts.map +1 -0
  432. package/dist/query-intent-result.js +1 -0
  433. package/dist/query-intent.d.ts +18 -0
  434. package/dist/query-intent.d.ts.map +1 -0
  435. package/dist/query-intent.js +336 -0
  436. package/dist/query-resolver.d.ts +18 -0
  437. package/dist/query-resolver.d.ts.map +1 -1
  438. package/dist/query-resolver.js +7 -4
  439. package/dist/ranked-recommendations.d.ts +36 -0
  440. package/dist/ranked-recommendations.d.ts.map +1 -0
  441. package/dist/ranked-recommendations.js +1 -0
  442. package/dist/ranker-explainability.d.ts.map +1 -1
  443. package/dist/ranker-explainability.js +38 -10
  444. package/dist/recommend-recipe.d.ts +17 -0
  445. package/dist/recommend-recipe.d.ts.map +1 -0
  446. package/dist/recommend-recipe.js +1 -0
  447. package/dist/recommend-recipes.d.ts +9 -0
  448. package/dist/recommend-recipes.d.ts.map +1 -0
  449. package/dist/recommend-recipes.js +106 -0
  450. package/dist/recommendation-candidate.d.ts +30 -0
  451. package/dist/recommendation-candidate.d.ts.map +1 -0
  452. package/dist/recommendation-candidate.js +1 -0
  453. package/dist/recommendation-confidence.d.ts +27 -0
  454. package/dist/recommendation-confidence.d.ts.map +1 -0
  455. package/dist/recommendation-confidence.js +1 -0
  456. package/dist/recommendation-ranking-options.d.ts +24 -0
  457. package/dist/recommendation-ranking-options.d.ts.map +1 -0
  458. package/dist/recommendation-ranking-options.js +1 -0
  459. package/dist/recommendation-ranking.d.ts +50 -0
  460. package/dist/recommendation-ranking.d.ts.map +1 -0
  461. package/dist/recommendation-ranking.js +527 -0
  462. package/dist/recommendation-source.d.ts +23 -0
  463. package/dist/recommendation-source.d.ts.map +1 -0
  464. package/dist/recommendation-source.js +23 -0
  465. package/dist/recommendation-suppression.d.ts +14 -0
  466. package/dist/recommendation-suppression.d.ts.map +1 -0
  467. package/dist/recommendation-suppression.js +14 -0
  468. package/dist/reference-asset-kind.d.ts +14 -0
  469. package/dist/reference-asset-kind.d.ts.map +1 -0
  470. package/dist/reference-asset-kind.js +14 -0
  471. package/dist/reference-content-check.d.ts +32 -0
  472. package/dist/reference-content-check.d.ts.map +1 -0
  473. package/dist/reference-content-check.js +143 -0
  474. package/dist/reference-failure.d.ts +31 -0
  475. package/dist/reference-failure.d.ts.map +1 -0
  476. package/dist/reference-failure.js +31 -0
  477. package/dist/reference-id-status.d.ts +15 -0
  478. package/dist/reference-id-status.d.ts.map +1 -0
  479. package/dist/reference-id-status.js +15 -0
  480. package/dist/reference-kind-declarations.d.ts +42 -0
  481. package/dist/reference-kind-declarations.d.ts.map +1 -0
  482. package/dist/reference-kind-declarations.js +142 -0
  483. package/dist/reference-lookup.d.ts +6 -0
  484. package/dist/reference-lookup.d.ts.map +1 -1
  485. package/dist/reference-lookup.js +13 -5
  486. package/dist/reference-registry.d.ts +109 -11
  487. package/dist/reference-registry.d.ts.map +1 -1
  488. package/dist/reference-registry.js +186 -30
  489. package/dist/reference-subject.d.ts +20 -0
  490. package/dist/reference-subject.d.ts.map +1 -0
  491. package/dist/reference-subject.js +1 -0
  492. package/dist/registration-hint-discovery-status.d.ts +25 -0
  493. package/dist/registration-hint-discovery-status.d.ts.map +1 -0
  494. package/dist/registration-hint-discovery-status.js +25 -0
  495. package/dist/registration-hint-registry.d.ts +80 -0
  496. package/dist/registration-hint-registry.d.ts.map +1 -1
  497. package/dist/registration-hint-registry.js +356 -138
  498. package/dist/registry-lifecycle.d.ts +200 -19
  499. package/dist/registry-lifecycle.d.ts.map +1 -1
  500. package/dist/registry-lifecycle.js +526 -136
  501. package/dist/release-readiness.d.ts.map +1 -1
  502. package/dist/release-readiness.js +10 -7
  503. package/dist/release-smoke.d.ts.map +1 -1
  504. package/dist/release-smoke.js +11 -7
  505. package/dist/report-site.d.ts.map +1 -1
  506. package/dist/report-site.js +25 -7
  507. package/dist/repository-intelligence.d.ts.map +1 -1
  508. package/dist/repository-intelligence.js +3 -2
  509. package/dist/repository-knowledge-model.d.ts.map +1 -1
  510. package/dist/repository-knowledge-model.js +18 -5
  511. package/dist/resolve-project-config.d.ts +64 -0
  512. package/dist/resolve-project-config.d.ts.map +1 -1
  513. package/dist/resolve-project-config.js +240 -32
  514. package/dist/reuse/compute-reuse-coverage.d.ts +29 -0
  515. package/dist/reuse/compute-reuse-coverage.d.ts.map +1 -0
  516. package/dist/reuse/compute-reuse-coverage.js +198 -0
  517. package/dist/reuse/rank-reuse-candidates.d.ts +38 -0
  518. package/dist/reuse/rank-reuse-candidates.d.ts.map +1 -0
  519. package/dist/reuse/rank-reuse-candidates.js +212 -0
  520. package/dist/reuse/rank-reuse-options.d.ts +20 -0
  521. package/dist/reuse/rank-reuse-options.d.ts.map +1 -0
  522. package/dist/reuse/rank-reuse-options.js +1 -0
  523. package/dist/reuse/rank-reuse-suggestions.d.ts +15 -0
  524. package/dist/reuse/rank-reuse-suggestions.d.ts.map +1 -0
  525. package/dist/reuse/rank-reuse-suggestions.js +31 -0
  526. package/dist/reuse/resolve-curated-reuse.d.ts +43 -0
  527. package/dist/reuse/resolve-curated-reuse.d.ts.map +1 -0
  528. package/dist/reuse/resolve-curated-reuse.js +115 -0
  529. package/dist/reuse/reuse-candidate.d.ts +29 -0
  530. package/dist/reuse/reuse-candidate.d.ts.map +1 -0
  531. package/dist/reuse/reuse-candidate.js +1 -0
  532. package/dist/reuse/reuse-coverage-report.d.ts +74 -0
  533. package/dist/reuse/reuse-coverage-report.d.ts.map +1 -0
  534. package/dist/reuse/reuse-coverage-report.js +1 -0
  535. package/dist/reuse/reuse-curated-coverage.d.ts +36 -0
  536. package/dist/reuse/reuse-curated-coverage.d.ts.map +1 -0
  537. package/dist/reuse/reuse-curated-coverage.js +1 -0
  538. package/dist/reuse/reuse-curated-resolution.d.ts +36 -0
  539. package/dist/reuse/reuse-curated-resolution.d.ts.map +1 -0
  540. package/dist/reuse/reuse-curated-resolution.js +1 -0
  541. package/dist/reuse/reuse-curated-status.d.ts +21 -0
  542. package/dist/reuse/reuse-curated-status.d.ts.map +1 -0
  543. package/dist/reuse/reuse-curated-status.js +21 -0
  544. package/dist/reuse/reuse-match-detail.d.ts +15 -0
  545. package/dist/reuse/reuse-match-detail.d.ts.map +1 -0
  546. package/dist/reuse/reuse-match-detail.js +1 -0
  547. package/dist/reuse/reuse-ranking.d.ts +37 -0
  548. package/dist/reuse/reuse-ranking.d.ts.map +1 -0
  549. package/dist/reuse/reuse-ranking.js +1 -0
  550. package/dist/reuse/reuse-suggestion.d.ts +19 -0
  551. package/dist/reuse/reuse-suggestion.d.ts.map +1 -0
  552. package/dist/reuse/reuse-suggestion.js +1 -0
  553. package/dist/reuse/reuse-symbol-lookup.d.ts +28 -0
  554. package/dist/reuse/reuse-symbol-lookup.d.ts.map +1 -0
  555. package/dist/reuse/reuse-symbol-lookup.js +1 -0
  556. package/dist/reuse/reuse-tokenize.d.ts +11 -0
  557. package/dist/reuse/reuse-tokenize.d.ts.map +1 -0
  558. package/dist/reuse/reuse-tokenize.js +26 -0
  559. package/dist/reuse/score-reuse-name.d.ts +16 -0
  560. package/dist/reuse/score-reuse-name.d.ts.map +1 -0
  561. package/dist/reuse/score-reuse-name.js +35 -0
  562. package/dist/reuse/score-reuse-primitive.d.ts +33 -0
  563. package/dist/reuse/score-reuse-primitive.d.ts.map +1 -0
  564. package/dist/reuse/score-reuse-primitive.js +92 -0
  565. package/dist/review-packet.d.ts +2 -0
  566. package/dist/review-packet.d.ts.map +1 -1
  567. package/dist/review-packet.js +13 -6
  568. package/dist/role-views.d.ts.map +1 -1
  569. package/dist/role-views.js +16 -16
  570. package/dist/routing-recommends-channels.d.ts +24 -0
  571. package/dist/routing-recommends-channels.d.ts.map +1 -0
  572. package/dist/routing-recommends-channels.js +19 -0
  573. package/dist/run-boundary-check.d.ts +118 -0
  574. package/dist/run-boundary-check.d.ts.map +1 -0
  575. package/dist/run-boundary-check.js +592 -0
  576. package/dist/safety-audit.js +1 -1
  577. package/dist/scaffold-coverage.js +1 -1
  578. package/dist/scaffold-pattern-doctor-report.d.ts +19 -0
  579. package/dist/scaffold-pattern-doctor-report.d.ts.map +1 -0
  580. package/dist/scaffold-pattern-doctor-report.js +54 -0
  581. package/dist/scaffold-patterns.d.ts +75 -1
  582. package/dist/scaffold-patterns.d.ts.map +1 -1
  583. package/dist/scaffold-patterns.js +375 -84
  584. package/dist/schema-inventory.d.ts.map +1 -1
  585. package/dist/schema-inventory.js +4 -3
  586. package/dist/search-document-id.d.ts +52 -0
  587. package/dist/search-document-id.d.ts.map +1 -0
  588. package/dist/search-document-id.js +72 -0
  589. package/dist/search-document-prefix.d.ts +7 -0
  590. package/dist/search-document-prefix.d.ts.map +1 -0
  591. package/dist/search-document-prefix.js +1 -0
  592. package/dist/search-index.d.ts.map +1 -1
  593. package/dist/search-index.js +20 -23
  594. package/dist/search-tuning-explain.d.ts +6 -0
  595. package/dist/search-tuning-explain.d.ts.map +1 -1
  596. package/dist/search-tuning-explain.js +19 -17
  597. package/dist/search-tuning-key-probes.d.ts +16 -0
  598. package/dist/search-tuning-key-probes.d.ts.map +1 -0
  599. package/dist/search-tuning-key-probes.js +65 -0
  600. package/dist/search-tuning-key-resolution.d.ts +25 -0
  601. package/dist/search-tuning-key-resolution.d.ts.map +1 -0
  602. package/dist/search-tuning-key-resolution.js +1 -0
  603. package/dist/search-tuning-key-resolver.d.ts +4 -0
  604. package/dist/search-tuning-key-resolver.d.ts.map +1 -0
  605. package/dist/search-tuning-key-resolver.js +107 -0
  606. package/dist/search-tuning-key-status.d.ts +24 -0
  607. package/dist/search-tuning-key-status.d.ts.map +1 -0
  608. package/dist/search-tuning-key-status.js +24 -0
  609. package/dist/search-tuning-lint.d.ts +9 -0
  610. package/dist/search-tuning-lint.d.ts.map +1 -0
  611. package/dist/search-tuning-lint.js +468 -0
  612. package/dist/search-tuning-registry.d.ts +43 -0
  613. package/dist/search-tuning-registry.d.ts.map +1 -1
  614. package/dist/search-tuning-registry.js +214 -49
  615. package/dist/self-audit.d.ts +12 -0
  616. package/dist/self-audit.d.ts.map +1 -1
  617. package/dist/self-audit.js +36 -10
  618. package/dist/self-config-doctor-v2.d.ts +145 -3
  619. package/dist/self-config-doctor-v2.d.ts.map +1 -1
  620. package/dist/self-config-doctor-v2.js +1304 -181
  621. package/dist/self-config-doctor.d.ts +20 -1
  622. package/dist/self-config-doctor.d.ts.map +1 -1
  623. package/dist/self-config-doctor.js +53 -280
  624. package/dist/settled-unit-states.d.ts +9 -0
  625. package/dist/settled-unit-states.d.ts.map +1 -0
  626. package/dist/settled-unit-states.js +14 -0
  627. package/dist/sharkcraft-inspector.d.ts +34 -0
  628. package/dist/sharkcraft-inspector.d.ts.map +1 -1
  629. package/dist/sharkcraft-inspector.js +273 -26
  630. package/dist/spec/spec-evidence.d.ts.map +1 -1
  631. package/dist/spec/spec-evidence.js +14 -20
  632. package/dist/split-identifier.d.ts +21 -0
  633. package/dist/split-identifier.d.ts.map +1 -0
  634. package/dist/split-identifier.js +27 -0
  635. package/dist/start-here.d.ts.map +1 -1
  636. package/dist/start-here.js +1 -2
  637. package/dist/substitute-placeholders.d.ts +8 -0
  638. package/dist/substitute-placeholders.d.ts.map +1 -0
  639. package/dist/substitute-placeholders.js +9 -0
  640. package/dist/symbol-index.d.ts +33 -0
  641. package/dist/symbol-index.d.ts.map +1 -1
  642. package/dist/symbol-index.js +241 -3
  643. package/dist/symbol-member-entry.d.ts +26 -0
  644. package/dist/symbol-member-entry.d.ts.map +1 -0
  645. package/dist/symbol-member-entry.js +1 -0
  646. package/dist/symbol-member-kind.d.ts +14 -0
  647. package/dist/symbol-member-kind.d.ts.map +1 -0
  648. package/dist/symbol-member-kind.js +14 -0
  649. package/dist/task-packet.d.ts.map +1 -1
  650. package/dist/task-packet.js +52 -9
  651. package/dist/task-ranker.d.ts +8 -0
  652. package/dist/task-ranker.d.ts.map +1 -1
  653. package/dist/task-ranker.js +25 -13
  654. package/dist/task-risk.js +1 -1
  655. package/dist/task-routing-hint-registry.d.ts +20 -1
  656. package/dist/task-routing-hint-registry.d.ts.map +1 -1
  657. package/dist/task-routing-hint-registry.js +186 -42
  658. package/dist/template-drift.d.ts.map +1 -1
  659. package/dist/template-drift.js +30 -9
  660. package/dist/template-lint.d.ts.map +1 -1
  661. package/dist/template-lint.js +160 -2
  662. package/dist/term-query.d.ts +10 -0
  663. package/dist/term-query.d.ts.map +1 -0
  664. package/dist/term-query.js +1 -0
  665. package/dist/test-definitions.d.ts +6 -3
  666. package/dist/test-definitions.d.ts.map +1 -1
  667. package/dist/test-runner.d.ts +95 -10
  668. package/dist/test-runner.d.ts.map +1 -1
  669. package/dist/test-runner.js +309 -308
  670. package/dist/tuning-query-tokens.d.ts +29 -0
  671. package/dist/tuning-query-tokens.d.ts.map +1 -0
  672. package/dist/tuning-query-tokens.js +51 -0
  673. package/dist/typecheck-files.d.ts +36 -0
  674. package/dist/typecheck-files.d.ts.map +1 -0
  675. package/dist/typecheck-files.js +158 -0
  676. package/dist/uncertainty.js +1 -1
  677. package/dist/universal-search.d.ts.map +1 -1
  678. package/dist/universal-search.js +5 -3
  679. package/dist/unregistered-exports.d.ts +19 -0
  680. package/dist/unregistered-exports.d.ts.map +1 -0
  681. package/dist/unregistered-exports.js +141 -0
  682. package/dist/unresolvable-reason.d.ts +11 -0
  683. package/dist/unresolvable-reason.d.ts.map +1 -0
  684. package/dist/unresolvable-reason.js +11 -0
  685. package/dist/upgrade-advisor.d.ts.map +1 -1
  686. package/dist/upgrade-advisor.js +16 -9
  687. package/dist/validate-contribution-file.d.ts +4 -0
  688. package/dist/validate-contribution-file.d.ts.map +1 -0
  689. package/dist/validate-contribution-file.js +228 -0
  690. package/dist/why-file.d.ts +3 -0
  691. package/dist/why-file.d.ts.map +1 -1
  692. package/dist/why-file.js +7 -3
  693. package/package.json +17 -17
@@ -1,277 +1,55 @@
1
- /**
2
- * Deterministic command recommender.
3
- *
4
- * Given an input ("what I want to do" or stderr blob), surface the
5
- * most relevant commands from the catalog + diagnostics + start-here
6
- * flow + intent classification. No AI, no embeddings.
7
- */
8
- import { classifyChangeIntent, ChangeIntentKind } from "./change-intent.js";
9
- import { buildDiagnosticByCode, listDiagnostics } from "./failure-diagnostics.js";
10
- import { rankAll } from "./task-ranker.js";
11
- import { buildUncertaintyReport, } from "./uncertainty-report.js";
1
+ import { rankRecommendationCandidates } from "./recommendation-ranking.js";
2
+ import { buildUncertaintyReport } from "./uncertainty-report.js";
12
3
  export const COMMAND_RECOMMENDER_SCHEMA = 'sharkcraft.command-recommender/v1';
13
- const RECIPES = [
14
- {
15
- match: /review|pr|pull[-\s]?request/i,
16
- recommendations: [
17
- { command: 'shrk review packet --v3 --since main', why: 'Generate an agent-ready PR review packet.' },
18
- { command: 'shrk impact --since main', why: 'See what changed and what depends on it.' },
19
- { command: 'shrk report site --output .sharkcraft/reports/site', why: 'Render the local read-only review site.' },
20
- ],
21
- },
22
- {
23
- match: /start|begin|new task|feature/i,
24
- recommendations: [
25
- { command: 'shrk brief "<task>"', why: 'Pre-work brief for the agent.' },
26
- { command: 'shrk dev start "<task>"', why: 'Start a tracked dev session.' },
27
- { command: 'shrk intent "<task>"', why: 'Classify the change intent first.' },
28
- ],
29
- },
30
- {
31
- match: /publish|release|tag|alpha|beta/i,
32
- recommendations: [
33
- { command: 'shrk release readiness --strict', why: 'Confirm release gates.' },
34
- { command: 'shrk release smoke --scenario all', why: 'Validate the release smoke matrix.' },
35
- { command: 'bun run release:preflight', why: 'Run the full preflight.' },
36
- ],
37
- },
38
- {
39
- match: /pack/i,
40
- recommendations: [
41
- { command: 'shrk packs doctor --release --require-signatures', why: 'Validate discovered packs.' },
42
- { command: 'shrk packs compat <pack> --consumer-root .', why: 'Detect helper/symbol-missing issues.' },
43
- { command: 'shrk packs quality <path>', why: 'Score pack maturity.' },
44
- ],
45
- },
46
- {
47
- match: /boundary|architecture|layer/i,
48
- recommendations: [
49
- { command: 'shrk architecture map', why: 'Layered architecture summary.' },
50
- { command: 'shrk check boundaries', why: 'Boundary scan.' },
51
- { command: 'shrk drift', why: 'Drift report.' },
52
- ],
53
- },
54
- {
55
- match: /code[-\s]?intel|code intelligence|code graph|graph status|graph health|import cycle|unresolved import|blast radius|callers|dependents|who calls|who uses|where is .*\bused|find usages|usages? of|is .*\bwired|wired (up|to)|wire[ds]? .*\bto\b|path (from|between)|reach(es|able)|connected to|who implements|implementations? of|subclass|subtype|load[-\s]?bearing|\bhubs?\b|most[-\s](depended|imported|referenced)|what.*change carefully|important.*\b(code|files?|symbols?)|what breaks if|what calls|call sites?|trace .*\b(symbol|function|usage)/i,
56
- recommendations: [
57
- { command: 'shrk graph callers <symbol>', why: 'Who calls / references a symbol, as path:line — the grep replacement for "who calls X / where is X used".' },
58
- { command: 'shrk graph path <from> <to>', why: 'Is code A actually wired to code B? Shortest import/call/implements path between two files or symbols — the deterministic answer to "is X wired to Y".' },
59
- { command: 'shrk graph hubs', why: 'The most-depended-on symbols/files (biggest blast radius) — what to change carefully or understand first when onboarding.' },
60
- { command: 'shrk graph context <file-or-symbol>', why: 'Inspect one file or symbol with imports, callers, subtypes/supertypes, bridge context, and framework hits — answers "is X wired".' },
61
- { command: 'shrk graph impact <file-or-symbol> --full', why: 'What breaks if you change it: graph-backed dependents, caller files, rules, and likely tests.' },
62
- { command: 'shrk code-intel', why: 'One-shot health view across the code graph, bridge, and quality gates.' },
63
- { command: 'shrk graph status', why: 'Check whether the code graph is present, fresh, and internally consistent.' },
64
- { command: 'shrk graph unresolved', why: 'Find unresolved imports that undercut graph accuracy.' },
65
- ],
66
- },
67
- {
68
- match: /delegate|mechanical (edit|task|change|refactor)|grunt (work|task)|boilerplate|repetitive edit|hand (this|it|off) (off |over )?to (a |the )?(local |worker|model)|add (a |an )?(barrel )?(export|import)\b|local (llm|model) (do|handle|make)/i,
69
- recommendations: [
70
- { command: 'shrk delegate list', why: 'See the MECHANICAL task recipes a local-LLM worker can handle (the engine verifies the result + auto-reverts on failure). Each is fenced to specific files + op kinds.' },
71
- { command: 'shrk delegate run "<task>" --recipe <id> --apply', why: 'Hand a mechanical, deterministically-verifiable edit to the LOCAL worker — you pay for a compact brief + result instead of reading the whole file and writing the edit. The edit lands only if it passes the recipe verification.' },
72
- { command: 'shrk delegate explain <id>', why: 'Audit a recipe before trusting it: the allowed ops, guardrail globs, and whether its verification is bound.' },
73
- ],
74
- },
75
- ];
76
- function safetyLevelFor(command) {
77
- if (/^shrk delegate run/i.test(command))
78
- return 'writes-source';
79
- if (/^shrk (gen|init|apply|import|presets apply --write|packs (sign|new))/i.test(command))
80
- return 'writes-source';
81
- if (/^shrk (onboard|brief|dev start|handoff|export|report site|impact|ci scaffold|simulate|orchestrate)/i.test(command))
82
- return 'writes-drafts';
83
- if (/^shrk (session|dev report)/i.test(command))
84
- return 'writes-session';
85
- if (/^bun |^npm |^node |^git /i.test(command))
86
- return 'runs-shell';
87
- return 'read-only';
88
- }
89
- /**
90
- * Minimum `rankAll` template score to treat the shared ranker's top template as
91
- * a strong, intent-confirmed structured match. Real template matches score well
92
- * into double digits; unrelated templates don't match at all — so this bar
93
- * cleanly separates a genuine scaffold target from noise. Above it, a keyword
94
- * recipe that only overlapped a single word no longer gets to headline.
95
- */
96
- const RANKER_TEMPLATE_PROMOTE_THRESHOLD = 6;
97
- /**
98
- * Minimum `rankAll` pipeline score to let the matched pipeline lead. Higher than
99
- * the template bar: a generic catch-all pipeline scores low on noise but high on
100
- * a real scaffolding task, so the bar excludes that baseline.
101
- */
102
- const RANKER_PIPELINE_PROMOTE_THRESHOLD = 8;
103
- const SCAFFOLD_VERBS = new Set([
104
- 'create', 'build', 'add', 'generate', 'scaffold', 'implement', 'make', 'new', 'introduce', 'write',
105
- ]);
106
- /**
107
- * Does the query read like create/build/scaffold work? Gate for ranker-driven
108
- * `gen <template>` promotion: a strong template token-overlap on a NON-scaffold
109
- * verb (e.g. "document the cli-command template") must not be routed to a
110
- * generator. Mirrors the CLI's `looksLikeCreateBuild` (kept local — the
111
- * inspector layer cannot import the cli layer).
112
- */
113
- function looksLikeScaffolding(query) {
114
- const tokens = query
115
- .toLowerCase()
116
- .replace(/[^a-z0-9\s]/g, ' ')
117
- .split(/\s+/)
118
- .filter((t) => t.length > 0);
119
- if (tokens.length === 0)
120
- return false;
121
- if (SCAFFOLD_VERBS.has(tokens[0]))
122
- return true;
123
- for (let i = 1; i < Math.min(4, tokens.length); i++) {
124
- if (SCAFFOLD_VERBS.has(tokens[i]))
125
- return true;
126
- }
127
- return false;
4
+ /** One report row from a ranked candidate. */
5
+ export function toCommandRecommendation(c) {
6
+ return {
7
+ command: c.command,
8
+ why: c.why,
9
+ safetyLevel: c.safetyLevel,
10
+ ...(c.docsLink ? { docsLink: c.docsLink } : {}),
11
+ source: c.source,
12
+ ...(c.sourceId !== undefined ? { sourceId: c.sourceId } : {}),
13
+ score: c.normalisedScore,
14
+ weak: c.weak,
15
+ attribution: c.attribution,
16
+ };
128
17
  }
129
- export async function recommendCommands(inspection, query, options = {}) {
130
- const warnings = [];
131
- const trimmed = query.trim();
132
- let recommendations = [];
133
- // Recipe matching by query.
134
- for (const r of RECIPES) {
135
- if (r.match.test(trimmed)) {
136
- for (const rec of r.recommendations)
137
- recommendations.push({ ...rec, safetyLevel: safetyLevelFor(rec.command) });
138
- }
139
- }
140
- // ── Ranker arbitration ────────────────────────────────────────────────
141
- // A keyword recipe matches on a single overlapping word (e.g. "release" in
142
- // "create a cli command for the release tooling"), which would otherwise
143
- // route a scaffolding intent to unrelated review/release tooling. Consult
144
- // the SAME shared ranker that `brief`/`task` use: when it confirms a concrete
145
- // template/pipeline for a create/build query, promote `shrk gen <template>`
146
- // (or the pipeline packet) to the HEADLINE so the recipe keyword no longer
147
- // hijacks the route. Mirrors the CLI's R1 routing-hint promotion.
148
- let promotedRanker;
149
- if (trimmed.length > 0 && looksLikeScaffolding(trimmed)) {
150
- try {
151
- const ranking = rankAll(inspection, trimmed);
152
- const topTemplate = ranking.templates[0];
153
- const topPipeline = ranking.pipelines[0];
154
- if (topTemplate && topTemplate.score >= RANKER_TEMPLATE_PROMOTE_THRESHOLD) {
155
- promotedRanker = {
156
- kind: 'template',
157
- id: topTemplate.item.id,
158
- label: topTemplate.item.name,
159
- score: topTemplate.score,
160
- };
161
- }
162
- else if (topPipeline && topPipeline.score >= RANKER_PIPELINE_PROMOTE_THRESHOLD) {
163
- promotedRanker = {
164
- kind: 'pipeline',
165
- id: topPipeline.item.id,
166
- label: topPipeline.item.title,
167
- score: topPipeline.score,
168
- };
169
- }
170
- }
171
- catch {
172
- // The ranker is advisory — fall back to recipe/intent output on failure.
173
- }
174
- }
175
- if (promotedRanker) {
176
- const command = promotedRanker.kind === 'template'
177
- ? `shrk gen ${promotedRanker.id} <name> --dry-run`
178
- : `shrk task "${trimmed.replace(/"/g, '\\"')}"`;
179
- const why = promotedRanker.kind === 'template'
180
- ? `Ranker matched template "${promotedRanker.label}" (score ${promotedRanker.score}) — the project scaffold for this create/build task, ahead of the keyword recipe.`
181
- : `Ranker matched pipeline "${promotedRanker.label}" (score ${promotedRanker.score}) — run the full task packet for this create/build task, ahead of the keyword recipe.`;
182
- // Headline: unshift so it leads; dedup below keeps this first occurrence.
183
- recommendations.unshift({ command, why, safetyLevel: safetyLevelFor(command) });
184
- }
185
- // If a stderr-like input was provided, do a diagnostic-suggest pass.
186
- if (options.fromError && options.fromError.length > 0) {
187
- for (const e of listDiagnostics()) {
188
- const built = buildDiagnosticByCode(e.code, {});
189
- if (new RegExp(e.code, 'i').test(options.fromError) || new RegExp(built.problem.slice(0, 20), 'i').test(options.fromError)) {
190
- recommendations.push({
191
- command: built.nextCommand,
192
- why: `Diagnostic match: ${e.code}.`,
193
- safetyLevel: safetyLevelFor(built.nextCommand),
194
- ...(built.docsLink ? { docsLink: built.docsLink } : {}),
195
- });
196
- }
197
- }
198
- }
199
- // Intent-driven fallback.
200
- if (recommendations.length === 0) {
201
- const intent = await classifyChangeIntent(trimmed, inspection);
202
- recommendations.push({
203
- command: intent.suggestedFirstCommand,
204
- why: `Intent fallback (${intent.kind}, confidence ${intent.confidence}).`,
205
- safetyLevel: safetyLevelFor(intent.suggestedFirstCommand),
206
- });
207
- if (intent.kind === ChangeIntentKind.Unknown) {
208
- recommendations.push({ command: 'shrk start-here', why: 'No clear intent — start here.', safetyLevel: 'read-only' });
209
- }
210
- }
211
- // Dedup by command (keep first).
212
- const seen = new Set();
213
- recommendations = recommendations.filter((r) => (seen.has(r.command) ? false : (seen.add(r.command), true)));
214
- // Top of list = first recommendation.
215
- const nextCommand = recommendations[0]?.command ?? 'shrk start-here';
216
- // Build an uncertainty report from the recommendation signals.
217
- const usedRecipe = RECIPES.some((r) => r.match.test(trimmed));
218
- let confidence = 'medium';
219
- const reasons = [];
220
- const missing = [];
221
- const conflicting = [];
222
- const increase = [];
223
- if (usedRecipe && promotedRanker) {
224
- // Divergent signals: a keyword recipe fired AND a stronger ranker
225
- // template/pipeline match was promoted to the headline. Keyword overlap
226
- // alone is NOT enough for HIGH — emit a medium confidence + review note so
227
- // the agent confirms the corrected route rather than trusting it blindly.
228
- confidence = 'medium';
229
- reasons.push(`Keyword recipe matched "${trimmed}", but the shared ranker found a stronger ${promotedRanker.kind} "${promotedRanker.id}" (score ${promotedRanker.score}) and now headlines it — review which fits.`);
230
- conflicting.push({
231
- id: 'conflict-recipe-vs-ranker',
232
- message: `Recipe keyword overlap competes with ranker ${promotedRanker.kind} "${promotedRanker.id}". The headline was routed to the ranker match; confirm the intended target.`,
233
- });
234
- increase.push('Tighten the recipe regex or add a routing hint so the keyword stops overlapping unrelated tooling.');
235
- warnings.push(`review: recipe keyword overlap was outranked by ranker ${promotedRanker.kind} "${promotedRanker.id}" — headline routed to the scaffold; confirm before applying.`);
236
- }
237
- else if (usedRecipe) {
238
- // Pure-recipe case (no competing ranker match) — HIGH stays appropriate.
239
- confidence = 'high';
240
- reasons.push(`Recipe matched the query "${trimmed}".`);
241
- }
242
- else if (promotedRanker) {
243
- // A clean, intent-confirmed structured match with no competing keyword
244
- // recipe — the ranker is the engine's confident answer.
245
- confidence = 'high';
246
- reasons.push(`Shared ranker matched ${promotedRanker.kind} "${promotedRanker.id}" (score ${promotedRanker.score}).`);
247
- }
248
- else if (recommendations.length > 0 && recommendations[0]?.why.startsWith('Intent fallback')) {
249
- confidence = 'low';
250
- reasons.push('No recipe matched — fell back to intent classification.');
251
- missing.push({ id: 'no-recipe-match', message: 'No recommender recipe matched the query.' });
252
- increase.push('Add a routing hint or recommender recipe for this task class.');
253
- }
254
- else if (recommendations.length === 0) {
255
- confidence = 'unknown';
256
- reasons.push('No recommendations could be produced.');
257
- }
18
+ /** The report for a ranked list — no re-ranking, no re-derivation. */
19
+ export function recommendationReportFromRanking(ranked, options = {}) {
20
+ const c = ranked.confidence;
21
+ const recommendations = ranked.recommendations.map(toCommandRecommendation);
258
22
  const uncertainty = buildUncertaintyReport({
259
- confidence,
260
- reasons,
261
- missingSignals: missing,
262
- conflictingSignals: conflicting,
23
+ confidence: c.level,
24
+ reasons: c.reasons,
25
+ missingSignals: c.missingSignals,
26
+ conflictingSignals: c.conflictingSignals,
263
27
  suggestedCommands: recommendations.slice(0, 3).map((r) => r.command),
264
28
  safeFallbackCommand: 'shrk start-here',
265
- whatWouldIncreaseConfidence: increase,
29
+ whatWouldIncreaseConfidence: c.whatWouldIncreaseConfidence,
266
30
  });
267
31
  return {
268
32
  schema: COMMAND_RECOMMENDER_SCHEMA,
269
33
  generatedAt: new Date().toISOString(),
270
- query: trimmed,
34
+ query: ranked.query,
271
35
  ...(options.role ? { role: options.role } : {}),
272
36
  recommendations,
273
- nextCommand,
274
- warnings,
37
+ nextCommand: ranked.nextCommand,
38
+ warnings: [...c.warnings],
275
39
  uncertainty,
40
+ confident: c.confident,
41
+ verdict: c.verdict,
42
+ floor: c.floor,
43
+ bestScore: c.bestScore,
44
+ ...(c.bestSource ? { bestSource: c.bestSource } : {}),
45
+ intent: ranked.intent,
46
+ ranked: ranked.candidates,
276
47
  };
277
48
  }
49
+ export async function recommendCommands(inspection, query, options = {}) {
50
+ const ranked = await rankRecommendationCandidates(inspection, query, {
51
+ ...(options.fromError ? { fromError: options.fromError } : {}),
52
+ ...(options.minScore !== undefined ? { minScore: options.minScore } : {}),
53
+ });
54
+ return recommendationReportFromRanking(ranked, options.role ? { role: options.role } : {});
55
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * The ONE vocabulary for "does this command string resolve?".
3
+ *
4
+ * The command table lives in the CLI package, above this layer, so the
5
+ * inspector never answers the question itself: the CLI builds its command
6
+ * index and injects a resolver through `warmReferenceRegistries(inspection,
7
+ * { commandResolver })`. The CLI resolver (`resolveCommandString`) returns
8
+ * these same members — there is exactly one definition, here.
9
+ *
10
+ * - `Ok` — the verb chain dispatches (a trie path, a declared or
11
+ * catalog-documented subverb, a meta flag), or
12
+ * `<pm> run <x>` names a real package script, or a bare
13
+ * MCP tool id names a registered tool.
14
+ * - `PrefixOnly` — the verb chain is proven, but the handler dispatches
15
+ * its tail internally and the tail cannot be proven from
16
+ * the trie + catalog (it may be a free positional).
17
+ * Counted, never flagged.
18
+ * - `UnknownVerb` — no registered verb matches the first token.
19
+ * - `UnknownSubverb` — the parent is proven and provably takes no free
20
+ * positional, and the next token is not one of its
21
+ * subverbs (or a path-mode token is verb-shaped and
22
+ * names neither a subverb nor a file).
23
+ * - `UnknownFlag` — the verb chain is proven, but the dispatcher refuses a
24
+ * flag before anything runs (outside a declared set, or
25
+ * named by none of the command's documentation).
26
+ * - `UnknownScript` — `<pm> run <x>` and the root package.json has no `x`.
27
+ * - `UnknownTool` — a bare MCP-tool-shaped id that no tool registers.
28
+ * - `NotShrk` — not a command this engine can check (git, tsc, …).
29
+ * Skipped and counted.
30
+ * - `Unverified` — no resolver was injected (outside the CLI), so the
31
+ * string was NOT checked. Never read as a pass.
32
+ */
33
+ export declare enum CommandResolutionStatus {
34
+ Ok = "ok",
35
+ PrefixOnly = "prefix-only",
36
+ UnknownVerb = "unknown-verb",
37
+ UnknownSubverb = "unknown-subverb",
38
+ UnknownFlag = "unknown-flag",
39
+ UnknownScript = "unknown-script",
40
+ UnknownTool = "unknown-tool",
41
+ NotShrk = "not-shrk",
42
+ Unverified = "unverified"
43
+ }
44
+ //# sourceMappingURL=command-resolution-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-resolution-status.d.ts","sourceRoot":"","sources":["../src/command-resolution-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,oBAAY,uBAAuB;IACjC,EAAE,OAAO;IACT,UAAU,gBAAgB;IAC1B,WAAW,iBAAiB;IAC5B,cAAc,oBAAoB;IAClC,WAAW,iBAAiB;IAC5B,aAAa,mBAAmB;IAChC,WAAW,iBAAiB;IAC5B,OAAO,aAAa;IACpB,UAAU,eAAe;CAC1B"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * The ONE vocabulary for "does this command string resolve?".
3
+ *
4
+ * The command table lives in the CLI package, above this layer, so the
5
+ * inspector never answers the question itself: the CLI builds its command
6
+ * index and injects a resolver through `warmReferenceRegistries(inspection,
7
+ * { commandResolver })`. The CLI resolver (`resolveCommandString`) returns
8
+ * these same members — there is exactly one definition, here.
9
+ *
10
+ * - `Ok` — the verb chain dispatches (a trie path, a declared or
11
+ * catalog-documented subverb, a meta flag), or
12
+ * `<pm> run <x>` names a real package script, or a bare
13
+ * MCP tool id names a registered tool.
14
+ * - `PrefixOnly` — the verb chain is proven, but the handler dispatches
15
+ * its tail internally and the tail cannot be proven from
16
+ * the trie + catalog (it may be a free positional).
17
+ * Counted, never flagged.
18
+ * - `UnknownVerb` — no registered verb matches the first token.
19
+ * - `UnknownSubverb` — the parent is proven and provably takes no free
20
+ * positional, and the next token is not one of its
21
+ * subverbs (or a path-mode token is verb-shaped and
22
+ * names neither a subverb nor a file).
23
+ * - `UnknownFlag` — the verb chain is proven, but the dispatcher refuses a
24
+ * flag before anything runs (outside a declared set, or
25
+ * named by none of the command's documentation).
26
+ * - `UnknownScript` — `<pm> run <x>` and the root package.json has no `x`.
27
+ * - `UnknownTool` — a bare MCP-tool-shaped id that no tool registers.
28
+ * - `NotShrk` — not a command this engine can check (git, tsc, …).
29
+ * Skipped and counted.
30
+ * - `Unverified` — no resolver was injected (outside the CLI), so the
31
+ * string was NOT checked. Never read as a pass.
32
+ */
33
+ export var CommandResolutionStatus;
34
+ (function (CommandResolutionStatus) {
35
+ CommandResolutionStatus["Ok"] = "ok";
36
+ CommandResolutionStatus["PrefixOnly"] = "prefix-only";
37
+ CommandResolutionStatus["UnknownVerb"] = "unknown-verb";
38
+ CommandResolutionStatus["UnknownSubverb"] = "unknown-subverb";
39
+ CommandResolutionStatus["UnknownFlag"] = "unknown-flag";
40
+ CommandResolutionStatus["UnknownScript"] = "unknown-script";
41
+ CommandResolutionStatus["UnknownTool"] = "unknown-tool";
42
+ CommandResolutionStatus["NotShrk"] = "not-shrk";
43
+ CommandResolutionStatus["Unverified"] = "unverified";
44
+ })(CommandResolutionStatus || (CommandResolutionStatus = {}));
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The FALLBACK safety classification of a recommended command — for a surface
3
+ * with no command catalog (MCP `recommend_commands`, which cannot import the
4
+ * CLI) and for uncatalogued / free-text strings. The CLI injects the catalog's
5
+ * DECLARED per-command safety into the ranker (`safetyOf`, see
6
+ * `IRecommendationRankingOptions`), which wins over this regex; a lock
7
+ * (r75-safety-one-authority) holds this regex equal to the catalog on every
8
+ * row the catalog's own audit counts as writing source, so the not-confident
9
+ * withhold gate reads the same answer on both surfaces.
10
+ *
11
+ * A `shrk` invocation behind a package-manager prefix is classified by the
12
+ * `shrk` verb, never as a shell command.
13
+ */
14
+ export declare function commandSafetyLevel(command: string): 'read-only' | 'writes-drafts' | 'writes-session' | 'writes-source' | 'runs-shell';
15
+ //# sourceMappingURL=command-safety-level.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-safety-level.d.ts","sourceRoot":"","sources":["../src/command-safety-level.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,GACd,WAAW,GAAG,eAAe,GAAG,gBAAgB,GAAG,eAAe,GAAG,YAAY,CA2BnF"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * The FALLBACK safety classification of a recommended command — for a surface
3
+ * with no command catalog (MCP `recommend_commands`, which cannot import the
4
+ * CLI) and for uncatalogued / free-text strings. The CLI injects the catalog's
5
+ * DECLARED per-command safety into the ranker (`safetyOf`, see
6
+ * `IRecommendationRankingOptions`), which wins over this regex; a lock
7
+ * (r75-safety-one-authority) holds this regex equal to the catalog on every
8
+ * row the catalog's own audit counts as writing source, so the not-confident
9
+ * withhold gate reads the same answer on both surfaces.
10
+ *
11
+ * A `shrk` invocation behind a package-manager prefix is classified by the
12
+ * `shrk` verb, never as a shell command.
13
+ */
14
+ export function commandSafetyLevel(command) {
15
+ const c = command
16
+ .trim()
17
+ .replace(/^\$\s+/, '')
18
+ .replace(/^(?:bun run|bun x|bunx|npx|pnpm exec|pnpm|yarn)\s+(?=shrk\b)/i, '');
19
+ if (/^shrk delegate(?:\s|$)/i.test(c))
20
+ return 'writes-source';
21
+ if (/^shrk (?:gen|init|apply|import|migrate|spike|presets apply --write|packs (?:sign|new)|(?:baseline|generated) update)(?:\s|$)/i.test(c)) {
22
+ return 'writes-source';
23
+ }
24
+ // `surface` and its config-mutating verbs write sharkcraft.config.ts; `surface
25
+ // list` / `explain` / `profiles` read.
26
+ if (/^shrk surface(?:\s+(?:enable|disable|hide|unhide|deny|allow|reset)(?:\s|$)|\s*$)/i.test(c))
27
+ return 'writes-source';
28
+ // `check wiring --fix` edits sink files; plain `check wiring` reads.
29
+ if (/^shrk check wiring\b.*\s--fix(?:\s|=|$)/i.test(c))
30
+ return 'writes-source';
31
+ // The base GitHub workflow scaffold writes source; its `--with-*` variants
32
+ // are declared drafts-only (the catalog rows), which the rule below keeps.
33
+ if (/^shrk ci scaffold github-actions(?:\s|$)/i.test(c) && !/\s--with-/i.test(c))
34
+ return 'writes-source';
35
+ if (/^shrk (?:onboard|brief|dev start|handoff|export|report site|impact|ci scaffold|simulate|orchestrate|spec)\b/i.test(c)) {
36
+ return 'writes-drafts';
37
+ }
38
+ if (/^shrk (?:session|dev report)\b/i.test(c))
39
+ return 'writes-session';
40
+ if (/^(?:bun|bunx|npm|npx|pnpm|yarn|node|git|nx) /i.test(c))
41
+ return 'runs-shell';
42
+ return 'read-only';
43
+ }
@@ -74,7 +74,7 @@ const GROUP_DEFS = [
74
74
  title: 'Diagnostics and troubleshooting',
75
75
  description: 'self audit, diagnostics, upgrade.',
76
76
  match: /^(self audit|diagnostics|upgrade|api)/,
77
- primary: ['self audit', 'diagnostics suggest', 'upgrade check'],
77
+ primary: ['self audit', 'diagnostics list', 'upgrade check'],
78
78
  },
79
79
  {
80
80
  id: 'advanced',
@@ -173,7 +173,7 @@ export function previewComplianceEvidencePacket(profileId) {
173
173
  '(if present) release-smoke.json',
174
174
  '(if present) self-audit.json',
175
175
  ],
176
- nextCommand: `shrk compliance evidence ${profileId} --output .sharkcraft/compliance-evidence/${profileId}`,
176
+ nextCommand: 'shrk release readiness --report',
177
177
  };
178
178
  }
179
179
  export function verifyComplianceEvidencePacket(targetPathOrDir) {
@@ -83,7 +83,7 @@ export async function runComplianceCheck(inspection, profileId) {
83
83
  profileId,
84
84
  ruleId: 'unknown-profile',
85
85
  severity: 'error',
86
- message: `Compliance profile "${profileId}" not found. Use \`shrk compliance profiles\`.`,
86
+ message: `Compliance profile "${profileId}" not found. Known profiles: ${listComplianceProfiles().map((p) => p.id).join(', ')}.`,
87
87
  },
88
88
  ],
89
89
  summary: { errors: 1, warnings: 0, info: 0 },
@@ -1,5 +1,7 @@
1
1
  import type { IConstructFacetInput, IConstructFacetValue, IConstructInput } from '@shrkcrft/plugin-api';
2
2
  import type { ISharkcraftInspection } from './sharkcraft-inspector.js';
3
+ import { type IRejectedEntry } from '@shrkcrft/core';
4
+ import type { IContributionFileIssue } from './i-contribution-file-issue.js';
3
5
  export declare const CONSTRUCT_REGISTRY_SCHEMA = "sharkcraft.construct-registry/v1";
4
6
  export interface IConstruct extends IConstructInput {
5
7
  source: 'local' | 'pack';
@@ -8,6 +10,44 @@ export interface IConstruct extends IConstructInput {
8
10
  }
9
11
  export interface IConstructFacet extends IConstructFacetInput {
10
12
  }
13
+ /**
14
+ * THE construct acceptance predicate (round 12, 12.1 / 12.1d): a non-empty
15
+ * string `id` and a string `type` — `[]` means accepted. An id-less construct
16
+ * used to be dropped silently, and one without `type` was ACCEPTED and then
17
+ * crashed `constructs list` (`c.type.padEnd`).
18
+ */
19
+ export declare function constructRejectionReasons(raw: unknown): readonly string[];
20
+ /**
21
+ * THE construct-facet SHAPE predicate: `id`, `constructId`, `kind`, `value`,
22
+ * each a string — `[]` means the shape is accepted. (A well-shaped facet whose
23
+ * `constructId` names no loaded construct is refused at fold time.)
24
+ */
25
+ export declare function constructFacetRejectionReasons(raw: unknown): readonly string[];
26
+ /**
27
+ * Load every local and pack construct (and fold loose facets into them), with
28
+ * what did not take effect: files that failed to import (they used to be
29
+ * swallowed — `catch { /* ignore *\/ }` — so a broken `constructs.ts` read as a
30
+ * smaller registry), and every declared construct / facet the loader refused
31
+ * (round 12, 12.1).
32
+ */
33
+ export declare function loadConstructsWithIssues(inspection: ISharkcraftInspection): Promise<{
34
+ readonly constructs: readonly IConstruct[];
35
+ /** Every facet folded into a construct, attributed to its file. */
36
+ readonly facets: readonly {
37
+ readonly id: string;
38
+ readonly constructId: string;
39
+ readonly file: string;
40
+ readonly packageName?: string;
41
+ }[];
42
+ /** Construct files that failed to import / are missing. */
43
+ readonly issues: readonly IContributionFileIssue[];
44
+ /** Every declared construct the loader refused. */
45
+ readonly rejected: readonly IRejectedEntry[];
46
+ /** Facet files that failed to import / are missing. */
47
+ readonly facetIssues: readonly IContributionFileIssue[];
48
+ /** Every declared facet the loader refused (malformed, or its construct is not loaded). */
49
+ readonly facetRejected: readonly IRejectedEntry[];
50
+ }>;
11
51
  export declare function loadConstructs(inspection: ISharkcraftInspection): Promise<readonly IConstruct[]>;
12
52
  /** Synchronous accessor — falls back to a snapshot cached from the last
13
53
  * async load. Used by search-index which needs to be sync-friendly. */
@@ -1 +1 @@
1
- {"version":3,"file":"construct-registry.d.ts","sourceRoot":"","sources":["../src/construct-registry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGvE,eAAO,MAAM,yBAAyB,qCAAqC,CAAC;AAE5E,MAAM,WAAW,UAAW,SAAQ,eAAe;IACjD,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAgB,SAAQ,oBAAoB;CAAG;AA+DhE,wBAAsB,cAAc,CAClC,UAAU,EAAE,qBAAqB,GAChC,OAAO,CAAC,SAAS,UAAU,EAAE,CAAC,CAwFhC;AAED;wEACwE;AACxE,wBAAgB,cAAc,CAAC,UAAU,EAAE,qBAAqB,GAAG,SAAS,UAAU,EAAE,CAGvF;AAED,wEAAwE;AACxE,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEzF;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,UAAU,CAAC;IACtB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,oBAAoB,EAAE,CAAC,CAAC;IACxD,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,UAAU,GAAG,eAAe,CAmBrE"}
1
+ {"version":3,"file":"construct-registry.d.ts","sourceRoot":"","sources":["../src/construct-registry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAE7E,eAAO,MAAM,yBAAyB,qCAAqC,CAAC;AAE5E,MAAM,WAAW,UAAW,SAAQ,eAAe;IACjD,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAgB,SAAQ,oBAAoB;CAAG;AA+BhE;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CAOzE;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CAM9E;AA+BD;;;;;;GAMG;AACH,wBAAsB,wBAAwB,CAAC,UAAU,EAAE,qBAAqB,GAAG,OAAO,CAAC;IACzF,QAAQ,CAAC,UAAU,EAAE,SAAS,UAAU,EAAE,CAAC;IAC3C,mEAAmE;IACnE,QAAQ,CAAC,MAAM,EAAE,SAAS;QACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;KAC/B,EAAE,CAAC;IACJ,2DAA2D;IAC3D,QAAQ,CAAC,MAAM,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACnD,mDAAmD;IACnD,QAAQ,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;IAC7C,uDAAuD;IACvD,QAAQ,CAAC,WAAW,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACxD,2FAA2F;IAC3F,QAAQ,CAAC,aAAa,EAAE,SAAS,cAAc,EAAE,CAAC;CACnD,CAAC,CA0LD;AAED,wBAAsB,cAAc,CAClC,UAAU,EAAE,qBAAqB,GAChC,OAAO,CAAC,SAAS,UAAU,EAAE,CAAC,CAEhC;AAED;wEACwE;AACxE,wBAAgB,cAAc,CAAC,UAAU,EAAE,qBAAqB,GAAG,SAAS,UAAU,EAAE,CAGvF;AAED,wEAAwE;AACxE,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEzF;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,UAAU,CAAC;IACtB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,oBAAoB,EAAE,CAAC,CAAC;IACxD,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,UAAU,GAAG,eAAe,CAmBrE"}