@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,8 +1,19 @@
1
1
  import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
2
2
  import * as nodePath from 'node:path';
3
- import { createImportContext, DEFAULT_SAFE_IMPORT_TIMEOUT_MS, } from '@shrkcrft/core';
3
+ import { createImportContext, DEFAULT_SAFE_IMPORT_TIMEOUT_MS, ERROR_CODES, RejectionCause, } from '@shrkcrft/core';
4
4
  import { inspectWorkspace } from '@shrkcrft/workspace';
5
- import { loadProjectConfig } from '@shrkcrft/config';
5
+ import { DEFAULT_DOC_FILES, DEFAULT_KNOWLEDGE_FILES, DEFAULT_PATH_FILES, DEFAULT_RULE_FILES, loadProjectConfig, } from '@shrkcrft/config';
6
+ /**
7
+ * The knowledge-bearing files the config loader fills in by DEFAULT. They are
8
+ * optional by nature — a repo without `rules.ts` never asked for one — so only
9
+ * a file the config names BEYOND these is recorded `missing` when absent.
10
+ */
11
+ const OPTIONAL_DEFAULT_KNOWLEDGE_FILES = new Set([
12
+ ...DEFAULT_KNOWLEDGE_FILES,
13
+ ...DEFAULT_RULE_FILES,
14
+ ...DEFAULT_PATH_FILES,
15
+ ...DEFAULT_DOC_FILES,
16
+ ]);
6
17
  import { KnowledgeIndex, MarkdownKnowledgeLoader, TypeScriptKnowledgeLoader, validateKnowledgeEntries, } from '@shrkcrft/knowledge';
7
18
  import { RuleService } from '@shrkcrft/rules';
8
19
  import { PathService } from '@shrkcrft/paths';
@@ -12,6 +23,7 @@ import { discoverPacks } from '@shrkcrft/packs';
12
23
  import { BUILTIN_PRESETS, loadPresetsFromFile, PresetRegistry } from '@shrkcrft/presets';
13
24
  import { BoundaryRegistry, loadBoundaryRulesFromFile } from '@shrkcrft/boundaries';
14
25
  import { DoctorSeverity } from "./doctor-result.js";
26
+ import { registryLifecycleSkipDirsWarning, resolveRegistryLifecycleSkipDirs, } from "./registry-lifecycle.js";
15
27
  import { diagnoseActionHints } from "./action-hint-diagnostics.js";
16
28
  import { buildCodeIntelligenceChecks, } from "./code-intelligence-doctor.js";
17
29
  import { loadSearchTuning } from "./search-tuning-registry.js";
@@ -19,6 +31,8 @@ import { buildDelegateRecipeChecks } from "./delegate-doctor.js";
19
31
  import { computeFileFingerprint, createInspectorCache, } from "./inspector-cache.js";
20
32
  import { DEFAULT_SLOW_LOADER_THRESHOLD_MS, LARGE_FILE_THRESHOLD_BYTES, } from "./loader-diagnostics.js";
21
33
  import { suggestSurfaceProfile } from "./surface-profile-detect.js";
34
+ import { boundaryFileLabel, boundaryLoadIssuesFromFile, classifyLocalBoundaryFiles, } from "./boundary-configuration-status.js";
35
+ import { describePackAssetFreshness, detectPackAssetFreshness, packHasCompiledContributions, } from "./pack-asset-freshness.js";
22
36
  /**
23
37
  * Find SharkCraft packs that live IN the repo but are not discovered (i.e.
24
38
  * not linked into node_modules). Discovery scans node_modules; an unlinked
@@ -102,6 +116,22 @@ function recordDiagnostic(ctx, d) {
102
116
  ctx.diagnostics.push(d);
103
117
  ctx.onLoaderDiagnostic?.(d);
104
118
  }
119
+ /**
120
+ * A boundary rule file's invalid rules as THE rejection channel's records
121
+ * (round 12, 12.1) — the boundary loader's structured `invalid[]`, one record
122
+ * per rule with every failing field.
123
+ */
124
+ function boundaryRejections(file, invalid) {
125
+ return invalid.map((inv) => ({
126
+ file,
127
+ index: inv.index,
128
+ // The export the rule array came from — `(default[1])`, one wording with every kind.
129
+ ...(inv.exportName !== undefined ? { exportName: inv.exportName } : {}),
130
+ ...(inv.ruleId !== undefined ? { entryId: inv.ruleId } : {}),
131
+ reasons: inv.issues.map((i) => `${i.field}: ${i.message}`),
132
+ cause: RejectionCause.Invalid,
133
+ }));
134
+ }
105
135
  async function loadAssetTracked(ctx, filePath, kind, origin, packName, performLoad) {
106
136
  const start = Date.now();
107
137
  let sizeBytes;
@@ -191,6 +221,7 @@ async function loadAssetTracked(ctx, filePath, kind, origin, packName, performLo
191
221
  elapsedMs,
192
222
  status,
193
223
  count: loaded.count,
224
+ ...(loaded.rejected && loaded.rejected.length > 0 ? { rejected: loaded.rejected } : {}),
194
225
  warningCount: loaded.warnings.length,
195
226
  errorMessage,
196
227
  deduped: dedupedBefore,
@@ -227,20 +258,45 @@ export async function inspectSharkcraft(options = {}) {
227
258
  const knowledgeEntries = [];
228
259
  const templates = [];
229
260
  const pipelines = [];
261
+ // The file each LOCAL template / pipeline came from, so their sources carry a
262
+ // `file` like knowledge and pack entries do (the contributions inventory and
263
+ // the unregistered-export check attribute ids by file).
264
+ const localTemplateFiles = new Map();
265
+ const localPipelineFiles = new Map();
230
266
  if (cfg) {
231
267
  const tsLoader = new TypeScriptKnowledgeLoader({ importContext });
232
268
  const mdLoader = new MarkdownKnowledgeLoader();
233
269
  const collectFile = async (relPath, kindHint) => {
234
270
  const full = nodePath.join(cfg.sharkcraftDir, relPath);
235
- if (!existsSync(full))
271
+ if (!existsSync(full)) {
272
+ // A default slot file (`rules.ts`, `docs/overview.md`, …) is optional.
273
+ if (OPTIONAL_DEFAULT_KNOWLEDGE_FILES.has(relPath.replace(/^\.\//, '')))
274
+ return;
275
+ // The config NAMES this file; loading nothing from it is a fact a
276
+ // corpus verdict must see (it used to vanish: no diagnostic, no warning).
277
+ recordDiagnostic(ctx, {
278
+ filePath: full,
279
+ kind: kindHint,
280
+ origin: 'local-config',
281
+ elapsedMs: 0,
282
+ status: 'missing',
283
+ count: 0,
284
+ warningCount: 0,
285
+ errorMessage: `declared in ${kindHint === 'rules' ? 'ruleFiles' : kindHint === 'paths' ? 'pathFiles' : `${kindHint}Files`} but the file does not exist`,
286
+ deduped: false,
287
+ largeFile: false,
288
+ slow: false,
289
+ suggestedNextCommand: suggestNextCommand(kindHint),
290
+ });
236
291
  return;
292
+ }
237
293
  sourceFiles.push(full);
238
294
  if (tsLoader.canLoad(full)) {
239
295
  const tracked = await loadAssetTracked(ctx, full, kindHint, 'local-config', undefined, async () => {
240
296
  const r = await tsLoader.load(full);
241
297
  knowledgeEntries.push(...r.entries);
242
298
  warnings.push(...r.warnings);
243
- return { count: r.entries.length, warnings: r.warnings };
299
+ return { count: r.entries.length, warnings: r.warnings, ...(r.rejected ? { rejected: r.rejected } : {}) };
244
300
  });
245
301
  if (tracked.skipped)
246
302
  warnings.push(...tracked.warnings);
@@ -250,7 +306,7 @@ export async function inspectSharkcraft(options = {}) {
250
306
  const r = await mdLoader.load(full);
251
307
  knowledgeEntries.push(...r.entries);
252
308
  warnings.push(...r.warnings);
253
- return { count: r.entries.length, warnings: r.warnings };
309
+ return { count: r.entries.length, warnings: r.warnings, ...(r.rejected ? { rejected: r.rejected } : {}) };
254
310
  });
255
311
  if (tracked.skipped)
256
312
  warnings.push(...tracked.warnings);
@@ -279,8 +335,11 @@ export async function inspectSharkcraft(options = {}) {
279
335
  const tracked = await loadAssetTracked(ctx, full, 'templates', 'local-config', undefined, async () => {
280
336
  const r = await loadTemplatesFromFile(full, { importContext });
281
337
  templates.push(...r.templates);
338
+ for (const t of r.templates)
339
+ if (!localTemplateFiles.has(t.id))
340
+ localTemplateFiles.set(t.id, full);
282
341
  warnings.push(...r.warnings);
283
- return { count: r.templates.length, warnings: r.warnings };
342
+ return { count: r.templates.length, warnings: r.warnings, rejected: r.rejected };
284
343
  });
285
344
  if (tracked.skipped)
286
345
  warnings.push(...tracked.warnings);
@@ -293,8 +352,11 @@ export async function inspectSharkcraft(options = {}) {
293
352
  const tracked = await loadAssetTracked(ctx, full, 'pipelines', 'local-config', undefined, async () => {
294
353
  const r = await loadPipelinesFromFile(full, { importContext });
295
354
  pipelines.push(...r.pipelines);
355
+ for (const p of r.pipelines)
356
+ if (!localPipelineFiles.has(p.id))
357
+ localPipelineFiles.set(p.id, full);
296
358
  warnings.push(...r.warnings);
297
- return { count: r.pipelines.length, warnings: r.warnings };
359
+ return { count: r.pipelines.length, warnings: r.warnings, rejected: r.rejected };
298
360
  });
299
361
  if (tracked.skipped)
300
362
  warnings.push(...tracked.warnings);
@@ -309,11 +371,13 @@ export async function inspectSharkcraft(options = {}) {
309
371
  }
310
372
  const templateSources = new Map();
311
373
  for (const t of templates) {
312
- templateSources.set(t.id, { type: 'local' });
374
+ const file = localTemplateFiles.get(t.id);
375
+ templateSources.set(t.id, { type: 'local', ...(file ? { file } : {}) });
313
376
  }
314
377
  const pipelineSources = new Map();
315
378
  for (const p of pipelines) {
316
- pipelineSources.set(p.id, { type: 'local' });
379
+ const file = localPipelineFiles.get(p.id);
380
+ pipelineSources.set(p.id, { type: 'local', ...(file ? { file } : {}) });
317
381
  }
318
382
  const packs = await discoverPacks({
319
383
  projectRoot: workspace.projectRoot,
@@ -364,7 +428,7 @@ export async function inspectSharkcraft(options = {}) {
364
428
  resolved.templates += 1;
365
429
  }
366
430
  warnings.push(...r.warnings);
367
- return { count: r.templates.length, warnings: r.warnings };
431
+ return { count: r.templates.length, warnings: r.warnings, rejected: r.rejected };
368
432
  });
369
433
  if (tracked.skipped)
370
434
  warnings.push(...tracked.warnings);
@@ -382,7 +446,7 @@ export async function inspectSharkcraft(options = {}) {
382
446
  resolved.pipelines += 1;
383
447
  }
384
448
  warnings.push(...r.warnings);
385
- return { count: r.pipelines.length, warnings: r.warnings };
449
+ return { count: r.pipelines.length, warnings: r.warnings, rejected: r.rejected };
386
450
  });
387
451
  if (tracked.skipped)
388
452
  warnings.push(...tracked.warnings);
@@ -413,7 +477,7 @@ export async function inspectSharkcraft(options = {}) {
413
477
  if (kind === 'docs')
414
478
  resolved.docs += 1;
415
479
  warnings.push(...r.warnings);
416
- return { count: r.entries.length, warnings: r.warnings };
480
+ return { count: r.entries.length, warnings: r.warnings, ...(r.rejected ? { rejected: r.rejected } : {}) };
417
481
  });
418
482
  if (tracked.skipped)
419
483
  warnings.push(...tracked.warnings);
@@ -490,7 +554,7 @@ export async function inspectSharkcraft(options = {}) {
490
554
  if (pack.resolvedCounts)
491
555
  pack.resolvedCounts.presets += 1;
492
556
  }
493
- return { count: r.presets.length, warnings: r.warnings };
557
+ return { count: r.presets.length, warnings: r.warnings, rejected: r.rejected };
494
558
  });
495
559
  if (tracked.skipped)
496
560
  warnings.push(...tracked.warnings);
@@ -511,24 +575,39 @@ export async function inspectSharkcraft(options = {}) {
511
575
  presetRegistry.add(preset);
512
576
  presetSources.set(preset.id, { type: 'local', file: full });
513
577
  }
514
- return { count: r.presets.length, warnings: r.warnings };
578
+ return { count: r.presets.length, warnings: r.warnings, rejected: r.rejected };
515
579
  });
516
580
  if (tracked.skipped)
517
581
  warnings.push(...tracked.warnings);
518
582
  }
519
583
  const boundaryRegistry = new BoundaryRegistry();
520
584
  const boundarySources = new Map();
585
+ // Round 11: every configured-but-unevaluable boundary rule / file, structured
586
+ // so each boundary surface reports it as an ERRORED rule (never a warning
587
+ // string nobody renders).
588
+ const boundaryLoadIssues = [];
521
589
  for (const pack of packs.validPacks) {
522
590
  const c = pack.manifest.contributions;
523
591
  for (const rel of c.boundaryFiles ?? []) {
524
592
  const full = nodePath.resolve(pack.packageRoot, rel);
525
593
  if (!existsSync(full)) {
526
594
  warnings.push(`pack ${pack.packageName}: missing boundary file ${rel}`);
595
+ boundaryLoadIssues.push({
596
+ file: boundaryFileLabel(workspace.projectRoot, full),
597
+ kind: 'missing-file',
598
+ origin: 'pack',
599
+ packageName: pack.packageName,
600
+ issues: [`pack ${pack.packageName} declares boundary file ${rel}, which does not exist`],
601
+ });
527
602
  continue;
528
603
  }
529
604
  const tracked = await loadAssetTracked(ctx, full, 'boundaries', 'pack-manifest', pack.packageName, async () => {
530
- const r = await loadBoundaryRulesFromFile(full, { importContext });
605
+ // Round 13 (lane B): the pack's name is stamped on each expectEmpty
606
+ // marker of its rules — a pack marker that went live is INFO, never a
607
+ // failure for the consumer, who cannot edit it.
608
+ const r = await loadBoundaryRulesFromFile(full, { importContext, packageName: pack.packageName });
531
609
  warnings.push(...r.warnings);
610
+ boundaryLoadIssues.push(...boundaryLoadIssuesFromFile(r, workspace.projectRoot, 'pack', pack.packageName));
532
611
  for (const rule of r.rules) {
533
612
  if (boundaryRegistry.has(rule.id)) {
534
613
  warnings.push(`pack ${pack.packageName}: boundary "${rule.id}" already provided — pack version skipped`);
@@ -542,29 +621,62 @@ export async function inspectSharkcraft(options = {}) {
542
621
  file: full,
543
622
  });
544
623
  }
545
- return { count: r.rules.length, warnings: r.warnings };
624
+ return { count: r.rules.length, warnings: r.warnings, rejected: boundaryRejections(full, r.invalid) };
546
625
  });
547
- if (tracked.skipped)
626
+ if (tracked.skipped) {
548
627
  warnings.push(...tracked.warnings);
628
+ boundaryLoadIssues.push({
629
+ file: boundaryFileLabel(workspace.projectRoot, full),
630
+ kind: 'load-error',
631
+ origin: 'pack',
632
+ packageName: pack.packageName,
633
+ issues: tracked.warnings.length > 0 ? tracked.warnings : ['the rule file failed to load (cached)'],
634
+ });
635
+ }
549
636
  }
550
637
  }
551
- for (const rel of cfgExt?.boundaryFiles ?? []) {
552
- if (!cfg)
553
- continue;
554
- const full = nodePath.join(cfg.sharkcraftDir, rel);
555
- if (!existsSync(full))
638
+ // Local rule files, through THE classification the configuration status
639
+ // reads too — a listed-but-missing file and an unlisted
640
+ // sharkcraft/boundaries.ts are reported identically everywhere (round 11,
641
+ // L-1). The unlisted default is reported, never auto-loaded: loading it
642
+ // silently would start enforcing rules nobody opted into.
643
+ const localBoundaryFiles = cfg
644
+ ? classifyLocalBoundaryFiles(cfg.sharkcraftDir, cfgExt?.boundaryFiles ?? [])
645
+ : { listed: [] };
646
+ for (const listed of localBoundaryFiles.listed) {
647
+ const full = listed.abs;
648
+ if (!listed.exists) {
649
+ warnings.push(`boundaryFiles lists "${listed.rel}" but ${full} does not exist — no boundary rules load from it`);
650
+ boundaryLoadIssues.push({
651
+ file: boundaryFileLabel(workspace.projectRoot, full),
652
+ kind: 'missing-file',
653
+ origin: 'local',
654
+ issues: [`boundaryFiles lists "${listed.rel}", but the file does not exist`],
655
+ });
556
656
  continue;
657
+ }
557
658
  const tracked = await loadAssetTracked(ctx, full, 'boundaries', 'local-config', undefined, async () => {
558
659
  const r = await loadBoundaryRulesFromFile(full, { importContext });
559
660
  warnings.push(...r.warnings);
661
+ boundaryLoadIssues.push(...boundaryLoadIssuesFromFile(r, workspace.projectRoot, 'local'));
560
662
  for (const rule of r.rules) {
561
663
  boundaryRegistry.add(rule);
562
664
  boundarySources.set(rule.id, { type: 'local', file: full });
563
665
  }
564
- return { count: r.rules.length, warnings: r.warnings };
666
+ return { count: r.rules.length, warnings: r.warnings, rejected: boundaryRejections(full, r.invalid) };
565
667
  });
566
- if (tracked.skipped)
668
+ if (tracked.skipped) {
567
669
  warnings.push(...tracked.warnings);
670
+ boundaryLoadIssues.push({
671
+ file: boundaryFileLabel(workspace.projectRoot, full),
672
+ kind: 'load-error',
673
+ origin: 'local',
674
+ issues: tracked.warnings.length > 0 ? tracked.warnings : ['the rule file failed to load (cached)'],
675
+ });
676
+ }
677
+ }
678
+ if (localBoundaryFiles.unlistedDefault) {
679
+ warnings.push(`${boundaryFileLabel(workspace.projectRoot, localBoundaryFiles.unlistedDefault)} exists but is not listed in boundaryFiles — its rules are NOT loaded (add \`boundaryFiles: ['boundaries.ts']\` to sharkcraft.config.ts)`);
568
680
  }
569
681
  const inspection = {
570
682
  projectRoot: workspace.projectRoot,
@@ -573,6 +685,7 @@ export async function inspectSharkcraft(options = {}) {
573
685
  sharkcraftDir: cfg?.sharkcraftDir ?? workspace.sharkcraftPath ?? null,
574
686
  config: cfg?.config ?? null,
575
687
  configFile: cfg?.configFile ?? null,
688
+ ...(cfgResult.ok ? {} : describeConfigLoadError(cfgResult.error)),
576
689
  knowledgeEntries: cleanEntries,
577
690
  templates,
578
691
  pipelines,
@@ -587,12 +700,14 @@ export async function inspectSharkcraft(options = {}) {
587
700
  presetSources,
588
701
  boundaryRegistry,
589
702
  boundarySources,
703
+ boundaryLoadIssues,
590
704
  index,
591
705
  ruleService,
592
706
  pathService,
593
707
  templateRegistry,
594
708
  pipelineRegistry,
595
709
  loaderDiagnostics: diagnostics,
710
+ packAssetFreshness: compiledPackFreshness(packs),
596
711
  inspectionElapsedMs: Date.now() - inspectStart,
597
712
  cacheEnabled: cache.enabled,
598
713
  cacheDir: cache.dir,
@@ -608,6 +723,59 @@ export async function inspectSharkcraft(options = {}) {
608
723
  }
609
724
  return inspection;
610
725
  }
726
+ /**
727
+ * Freshness of every valid pack serving compiled contributions — the one
728
+ * authority, called only where something compiled can go stale (TS-source packs
729
+ * are skipped without hashing). Never throws: a pack whose files cannot be read
730
+ * simply reports what it could.
731
+ */
732
+ function compiledPackFreshness(packs) {
733
+ const out = [];
734
+ for (const pack of packs.validPacks ?? []) {
735
+ if (!packHasCompiledContributions(pack.manifest))
736
+ continue;
737
+ try {
738
+ out.push(detectPackAssetFreshness(pack));
739
+ }
740
+ catch {
741
+ /* best-effort */
742
+ }
743
+ }
744
+ return out;
745
+ }
746
+ /**
747
+ * Summarise a config LOAD failure for the inspection. Only CONFIG_INVALID is a
748
+ * failure of a config file that exists; a missing sharkcraft/ folder has its
749
+ * own doctor check and is not reported here.
750
+ */
751
+ function describeConfigLoadError(error) {
752
+ if (error.code !== ERROR_CODES.CONFIG_INVALID)
753
+ return {};
754
+ const details = error.details ?? {};
755
+ const fullPath = details['fullPath'];
756
+ const issues = [];
757
+ const rawIssues = details['issues'];
758
+ if (Array.isArray(rawIssues)) {
759
+ for (const raw of rawIssues) {
760
+ const iss = (raw ?? {});
761
+ const at = (iss.path ?? []).map(String).join('.') || '<root>';
762
+ issues.push(`${at}: ${typeof iss.message === 'string' ? iss.message : 'invalid value'}`);
763
+ }
764
+ }
765
+ // An import failure (e.g. a syntax error) carries no schema issues; its
766
+ // cause is the build/evaluation error.
767
+ const cause = error.cause;
768
+ if (issues.length === 0 && cause instanceof Error) {
769
+ issues.push((cause.message.split('\n')[0] ?? cause.message).trim());
770
+ }
771
+ return {
772
+ configLoadError: {
773
+ file: typeof fullPath === 'string' ? fullPath : null,
774
+ message: error.message,
775
+ issues,
776
+ },
777
+ };
778
+ }
611
779
  export function runDoctor(inspection, options = {}) {
612
780
  const checks = [];
613
781
  if (!inspection.workspace.hasPackageJson) {
@@ -644,7 +812,25 @@ export function runDoctor(inspection, options = {}) {
644
812
  message: `Found at ${inspection.sharkcraftDir}`,
645
813
  });
646
814
  }
647
- if (!inspection.configFile) {
815
+ if (inspection.configLoadError) {
816
+ // A config file EXISTS but was rejected. The loader then drops the WHOLE
817
+ // config — its knowledge/rule/template file lists and every config-declared
818
+ // plane — so this is an error, and it is never also "no config file".
819
+ const failure = inspection.configLoadError;
820
+ const where = failure.file ?? 'sharkcraft/sharkcraft.config.ts';
821
+ const detail = failure.issues.length > 0 ? failure.issues.join('; ') : failure.message;
822
+ checks.push({
823
+ id: 'config',
824
+ title: 'sharkcraft.config.ts',
825
+ severity: DoctorSeverity.Error,
826
+ category: 'config-invalid',
827
+ code: 'config-invalid',
828
+ message: `Invalid config ${where} — NOT loaded, every config-declared setting and plane is dropped: ${detail}`,
829
+ fix: `Fix the listed fields in ${where} (every key is validated against SharkCraftConfigSchema), then re-run \`shrk doctor\`.`,
830
+ whyThisMatters: 'An invalid config is discarded whole: its knowledge/rule/template file lists and every gate plane (wiring rules, registries, policy rules, baselines, …) silently fall back to nothing.',
831
+ });
832
+ }
833
+ else if (!inspection.configFile) {
648
834
  checks.push({
649
835
  id: 'config',
650
836
  title: 'sharkcraft.config.ts',
@@ -661,6 +847,22 @@ export function runDoctor(inspection, options = {}) {
661
847
  message: `Loaded from ${inspection.configFile}`,
662
848
  });
663
849
  }
850
+ // A replacing `registryLifecycle.skipDirs` that drops node_modules / dist / …
851
+ // makes the lifecycle scan read vendored and generated code. The one
852
+ // skip-dir authority decides; this only reports what it dropped.
853
+ const lifecycleSkip = inspection.config?.registryLifecycle;
854
+ if (lifecycleSkip?.skipDirs !== undefined) {
855
+ const { droppedDefaults } = resolveRegistryLifecycleSkipDirs(lifecycleSkip);
856
+ if (droppedDefaults.length > 0) {
857
+ checks.push({
858
+ id: 'registry-lifecycle-skip-dirs',
859
+ title: 'registryLifecycle.skipDirs',
860
+ severity: DoctorSeverity.Warning,
861
+ message: registryLifecycleSkipDirsWarning(droppedDefaults),
862
+ fix: `Use \`registryLifecycle.skipDirsAdd\` (extends the defaults), or add ${droppedDefaults.join(', ')} back to \`skipDirs\`.`,
863
+ });
864
+ }
865
+ }
664
866
  if (inspection.knowledgeEntries.length === 0) {
665
867
  checks.push({
666
868
  id: 'knowledge',
@@ -729,6 +931,25 @@ export function runDoctor(inspection, options = {}) {
729
931
  });
730
932
  }
731
933
  }
934
+ // Compiled pack contributions served from an older build (or with no build
935
+ // record at all). The one freshness authority computed this at inspection;
936
+ // absent for TS-source packs, so a repo without compiled packs sees nothing.
937
+ for (const f of inspection.packAssetFreshness ?? []) {
938
+ if (f.build.state !== 'stale' && f.build.state !== 'unrecorded')
939
+ continue;
940
+ const said = describePackAssetFreshness(f).build;
941
+ if (!said)
942
+ continue;
943
+ checks.push({
944
+ id: `pack-compiled-artifacts-${f.packageName}`,
945
+ title: 'Pack compiled artifacts',
946
+ severity: DoctorSeverity.Warning,
947
+ category: 'pack-compiled-artifacts',
948
+ code: f.build.state === 'stale' ? 'compiled-artifacts-stale' : 'compiled-artifacts-unrecorded',
949
+ message: said,
950
+ ...(f.build.rebuildCommand ? { fix: `(cd ${f.packageRoot} && ${f.build.rebuildCommand})` } : {}),
951
+ });
952
+ }
732
953
  if (inspection.pipelines.length === 0) {
733
954
  checks.push({
734
955
  id: 'pipelines',
@@ -763,6 +984,10 @@ export function runDoctor(inspection, options = {}) {
763
984
  });
764
985
  }
765
986
  for (const w of inspection.warnings) {
987
+ // The config load failure is already reported above as an error; do not
988
+ // repeat it as a second, weaker "Loader warning".
989
+ if (w === inspection.configLoadError?.message)
990
+ continue;
766
991
  checks.push({
767
992
  id: `warning-${checks.length}`,
768
993
  title: 'Loader warning',
@@ -851,7 +1076,29 @@ export function runDoctor(inspection, options = {}) {
851
1076
  summary.advisoryCount += 1;
852
1077
  }
853
1078
  }
854
- return { passed: summary.errors === 0, checks, summary };
1079
+ // A compiled pack build with NO build record was never compared with its
1080
+ // source, so the build the pack serves is unverified. The warning check above
1081
+ // names it; this record is what keeps `shrk doctor` from reading "Ready ✓"
1082
+ // over it (settled NOT VERIFIED, 2, like `packs doctor`). A stale build WAS
1083
+ // compared (its finding stays a warning), and a repo with no compiled pack,
1084
+ // or only fresh builds, gets no record at all.
1085
+ const compiledBuilds = (inspection.packAssetFreshness ?? []).filter((f) => f.build.state !== 'not-compiled');
1086
+ const unrecordedBuilds = compiledBuilds
1087
+ .filter((f) => f.build.state === 'unrecorded')
1088
+ .map((f) => f.packageName)
1089
+ .sort();
1090
+ const coverage = unrecordedBuilds.length > 0
1091
+ ? [
1092
+ {
1093
+ unit: 'compiled pack builds',
1094
+ expected: compiledBuilds.length,
1095
+ examined: compiledBuilds.length - unrecordedBuilds.length,
1096
+ unexamined: unrecordedBuilds,
1097
+ reason: 'no build record, so the compiled artifacts they serve were never compared with their source (rebuild the pack to record one)',
1098
+ },
1099
+ ]
1100
+ : [];
1101
+ return { passed: summary.errors === 0, checks, summary, ...(coverage.length > 0 ? { coverage } : {}) };
855
1102
  }
856
1103
  function actionHintWhyThisMatters(code) {
857
1104
  switch (code) {
@@ -1 +1 @@
1
- {"version":3,"file":"spec-evidence.d.ts","sourceRoot":"","sources":["../../src/spec/spec-evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,uEAAuE;AACvE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,cAAc,GAAG,OAAO,GAAG,WAAW,GAAG,MAAM,CAAC;AAE1F,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,yDAAyD;IACzD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,qDAAqD;IACrD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,CAAC;CACjD;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,QAAQ,EAAE,SAAS,wBAAwB,EAAE,CAAC;IACvD,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,oFAAoF;IACpF,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACzD;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,QAAQ,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACjD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,iFAAiF;IACjF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAgCD;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,4BAA4B,GAClC,wBAAwB,CAQ1B"}
1
+ {"version":3,"file":"spec-evidence.d.ts","sourceRoot":"","sources":["../../src/spec/spec-evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH,uEAAuE;AACvE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,cAAc,GAAG,OAAO,GAAG,WAAW,GAAG,MAAM,CAAC;AAE1F,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,yDAAyD;IACzD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,qDAAqD;IACrD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,CAAC;CACjD;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,QAAQ,EAAE,SAAS,wBAAwB,EAAE,CAAC;IACvD,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,oFAAoF;IACpF,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACzD;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,QAAQ,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACjD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,iFAAiF;IACjF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAgCD;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,4BAA4B,GAClC,wBAAwB,CAQ1B"}
@@ -20,6 +20,9 @@
20
20
  * for collecting `changedFiles` + `fileContents` (see the CLI
21
21
  * `collectChangedPaths` helper and `spec verify --coverage`).
22
22
  */
23
+ // THE identifier tokenizer — shared with reuse and the recommender.
24
+ import { matchesAny, TEST_FILE_GLOBS } from '@shrkcrft/boundaries';
25
+ import { splitIdentifierTokens } from "../split-identifier.js";
23
26
  /** Cap on evidence items retained per criterion (deterministic, insertion-ordered). */
24
27
  const MAX_EVIDENCE_PER_CRITERION = 12;
25
28
  /**
@@ -83,7 +86,7 @@ function analyzeCriterion(criterion, input) {
83
86
  };
84
87
  }
85
88
  function collectFileEvidence(file, content, keywords, push) {
86
- const pathTokens = tokenizeIdentifier(stripExtension(baseName(file)));
89
+ const pathTokens = splitIdentifierTokens(stripExtension(baseName(file)));
87
90
  if (isTestFile(file)) {
88
91
  // A new test backs a criterion when its path (or an exported helper)
89
92
  // names the feature. Test files are reported ONLY as `test` evidence.
@@ -93,7 +96,7 @@ function collectFileEvidence(file, content, keywords, push) {
93
96
  return;
94
97
  }
95
98
  for (const symbol of extractExportedSymbols(content)) {
96
- const hit = firstMatch(tokenizeIdentifier(symbol), keywords);
99
+ const hit = firstMatch(splitIdentifierTokens(symbol), keywords);
97
100
  if (hit) {
98
101
  push({ kind: 'test', file, detail: symbol, matched: hit });
99
102
  return;
@@ -108,7 +111,7 @@ function collectFileEvidence(file, content, keywords, push) {
108
111
  }
109
112
  // symbol: a newly exported declaration names the feature.
110
113
  for (const symbol of extractExportedSymbols(content)) {
111
- const hit = firstMatch(tokenizeIdentifier(symbol), keywords);
114
+ const hit = firstMatch(splitIdentifierTokens(symbol), keywords);
112
115
  if (hit)
113
116
  push({ kind: 'symbol', file, detail: symbol, matched: hit });
114
117
  }
@@ -119,7 +122,7 @@ function collectFileEvidence(file, content, keywords, push) {
119
122
  continue;
120
123
  const member = registrationMember(line);
121
124
  if (member) {
122
- const hit = firstMatch(tokenizeIdentifier(member), keywords);
125
+ const hit = firstMatch(splitIdentifierTokens(member), keywords);
123
126
  if (hit) {
124
127
  const kind = ROUTE_MARKER.test(line) ? 'route' : 'registration';
125
128
  push({ kind, file, detail: member, matched: hit });
@@ -174,25 +177,13 @@ function extractExportedSymbols(content) {
174
177
  function extractKeywords(text) {
175
178
  const out = new Set();
176
179
  for (const raw of text.toLowerCase().match(/[a-z0-9][a-z0-9_-]*/g) ?? []) {
177
- for (const tok of tokenizeIdentifier(raw)) {
180
+ for (const tok of splitIdentifierTokens(raw)) {
178
181
  if (tok.length >= 3 && !STOPWORDS.has(tok))
179
182
  out.add(tok);
180
183
  }
181
184
  }
182
185
  return out;
183
186
  }
184
- /**
185
- * Split an identifier into lowercase tokens across camelCase, PascalCase,
186
- * snake_case, kebab-case and digit boundaries.
187
- */
188
- function tokenizeIdentifier(name) {
189
- return name
190
- .replace(/([a-z0-9])([A-Z])/g, '$1 $2')
191
- .replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2')
192
- .split(/[^A-Za-z0-9]+/)
193
- .map((t) => t.toLowerCase())
194
- .filter((t) => t.length > 0);
195
- }
196
187
  function firstMatch(tokens, keywords) {
197
188
  for (const t of tokens) {
198
189
  if (keywords.has(t))
@@ -200,10 +191,13 @@ function firstMatch(tokens, keywords) {
200
191
  }
201
192
  return null;
202
193
  }
194
+ /**
195
+ * "Is this a test file?" through THE test-file layout list, `TEST_FILE_GLOBS`
196
+ * (the one a boundary rule's `excludeTests: true` expands to), so spec
197
+ * evidence and the boundary gate agree on which files are tests.
198
+ */
203
199
  function isTestFile(file) {
204
- return (/\.(test|spec)\.[cm]?[jt]sx?$/.test(file) ||
205
- file.includes('/__tests__/') ||
206
- file.startsWith('__tests__/'));
200
+ return matchesAny(file.split('\\').join('/'), TEST_FILE_GLOBS);
207
201
  }
208
202
  function baseName(file) {
209
203
  const norm = file.split('\\').join('/');
@@ -0,0 +1,21 @@
1
+ /**
2
+ * THE identifier tokenizer.
3
+ *
4
+ * Splits an identifier (or a free-text phrase) into lowercase tokens across
5
+ * camelCase, PascalCase, acronym runs, snake_case, kebab-case, whitespace and
6
+ * lower/digit→Upper boundaries:
7
+ *
8
+ * DateRangePicker → [date, range, picker]
9
+ * IDateRangePickerOptions → [i, date, range, picker, options]
10
+ * HTTPServer → [http, server]
11
+ * date_range-picker → [date, range, picker]
12
+ *
13
+ * One splitter for every "does this name match these words?" question —
14
+ * reuse name matching, spec evidence and the recommender's term matcher all
15
+ * read it — so two callers can never disagree about where a word boundary is.
16
+ * Do not write another. Order is preserved and duplicates are kept (callers
17
+ * that need a set build one); empty fragments are dropped. No stop-word or
18
+ * length filtering happens here — that is a caller's policy, not a boundary.
19
+ */
20
+ export declare function splitIdentifierTokens(name: string): string[];
21
+ //# sourceMappingURL=split-identifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"split-identifier.d.ts","sourceRoot":"","sources":["../src/split-identifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAO5D"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * THE identifier tokenizer.
3
+ *
4
+ * Splits an identifier (or a free-text phrase) into lowercase tokens across
5
+ * camelCase, PascalCase, acronym runs, snake_case, kebab-case, whitespace and
6
+ * lower/digit→Upper boundaries:
7
+ *
8
+ * DateRangePicker → [date, range, picker]
9
+ * IDateRangePickerOptions → [i, date, range, picker, options]
10
+ * HTTPServer → [http, server]
11
+ * date_range-picker → [date, range, picker]
12
+ *
13
+ * One splitter for every "does this name match these words?" question —
14
+ * reuse name matching, spec evidence and the recommender's term matcher all
15
+ * read it — so two callers can never disagree about where a word boundary is.
16
+ * Do not write another. Order is preserved and duplicates are kept (callers
17
+ * that need a set build one); empty fragments are dropped. No stop-word or
18
+ * length filtering happens here — that is a caller's policy, not a boundary.
19
+ */
20
+ export function splitIdentifierTokens(name) {
21
+ return name
22
+ .replace(/([a-z0-9])([A-Z])/g, '$1 $2')
23
+ .replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2')
24
+ .split(/[^A-Za-z0-9]+/)
25
+ .map((t) => t.toLowerCase())
26
+ .filter((t) => t.length > 0);
27
+ }