@vibe-agent-toolkit/agent-skills 0.1.42 → 0.2.0-rc.10

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 (322) hide show
  1. package/README.md +5 -5
  2. package/dist/builder.d.ts.map +1 -1
  3. package/dist/builder.js +7 -17
  4. package/dist/builder.js.map +1 -1
  5. package/dist/content-type-routing.d.ts +32 -0
  6. package/dist/content-type-routing.d.ts.map +1 -1
  7. package/dist/content-type-routing.js +23 -0
  8. package/dist/content-type-routing.js.map +1 -1
  9. package/dist/files-config.d.ts +34 -1
  10. package/dist/files-config.d.ts.map +1 -1
  11. package/dist/files-config.js +277 -39
  12. package/dist/files-config.js.map +1 -1
  13. package/dist/fs-attribution.d.ts +45 -0
  14. package/dist/fs-attribution.d.ts.map +1 -0
  15. package/dist/fs-attribution.js +57 -0
  16. package/dist/fs-attribution.js.map +1 -0
  17. package/dist/import.d.ts.map +1 -1
  18. package/dist/import.js +0 -4
  19. package/dist/import.js.map +1 -1
  20. package/dist/index.d.ts +13 -8
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +25 -7
  23. package/dist/index.js.map +1 -1
  24. package/dist/inventory/detectors/declared-but-missing.d.ts +1 -1
  25. package/dist/inventory/detectors/declared-but-missing.d.ts.map +1 -1
  26. package/dist/inventory/detectors/marketplace-source-missing.d.ts +1 -1
  27. package/dist/inventory/detectors/marketplace-source-missing.d.ts.map +1 -1
  28. package/dist/inventory/detectors/present-but-undeclared.d.ts +1 -1
  29. package/dist/inventory/detectors/present-but-undeclared.d.ts.map +1 -1
  30. package/dist/inventory/detectors/reference-target-missing.d.ts +1 -1
  31. package/dist/inventory/detectors/reference-target-missing.d.ts.map +1 -1
  32. package/dist/inventory/index.d.ts +1 -1
  33. package/dist/inventory/index.d.ts.map +1 -1
  34. package/dist/inventory/index.js +1 -1
  35. package/dist/inventory/index.js.map +1 -1
  36. package/dist/inventory/serialize.d.ts +4 -4
  37. package/dist/inventory/serialize.d.ts.map +1 -1
  38. package/dist/inventory/serialize.js +6 -6
  39. package/dist/inventory/serialize.js.map +1 -1
  40. package/dist/inventory/types.d.ts +8 -0
  41. package/dist/inventory/types.d.ts.map +1 -1
  42. package/dist/inventory/types.js.map +1 -1
  43. package/dist/link-graph-members.d.ts +18 -0
  44. package/dist/link-graph-members.d.ts.map +1 -0
  45. package/dist/link-graph-members.js +18 -0
  46. package/dist/link-graph-members.js.map +1 -0
  47. package/dist/parsers/frontmatter-parser.d.ts.map +1 -1
  48. package/dist/parsers/frontmatter-parser.js +30 -6
  49. package/dist/parsers/frontmatter-parser.js.map +1 -1
  50. package/dist/plugin-distribution-layout.d.ts +70 -6
  51. package/dist/plugin-distribution-layout.d.ts.map +1 -1
  52. package/dist/plugin-distribution-layout.js +84 -11
  53. package/dist/plugin-distribution-layout.js.map +1 -1
  54. package/dist/post-build-checks.d.ts +38 -1
  55. package/dist/post-build-checks.d.ts.map +1 -1
  56. package/dist/post-build-checks.js +68 -17
  57. package/dist/post-build-checks.js.map +1 -1
  58. package/dist/projection/skill-extent.d.ts +247 -0
  59. package/dist/projection/skill-extent.d.ts.map +1 -0
  60. package/dist/projection/skill-extent.js +560 -0
  61. package/dist/projection/skill-extent.js.map +1 -0
  62. package/dist/schemas/agent-skill-frontmatter.js +1 -1
  63. package/dist/schemas/agent-skill-frontmatter.js.map +1 -1
  64. package/dist/schemas/allowed-tools.d.ts +31 -0
  65. package/dist/schemas/allowed-tools.d.ts.map +1 -0
  66. package/dist/schemas/allowed-tools.js +88 -0
  67. package/dist/schemas/allowed-tools.js.map +1 -0
  68. package/dist/schemas/index.d.ts +1 -0
  69. package/dist/schemas/index.d.ts.map +1 -1
  70. package/dist/schemas/index.js +1 -0
  71. package/dist/schemas/index.js.map +1 -1
  72. package/dist/schemas/installed-plugins-registry.d.ts.map +1 -1
  73. package/dist/schemas/installed-plugins-registry.js +7 -1
  74. package/dist/schemas/installed-plugins-registry.js.map +1 -1
  75. package/dist/schemas/marketplace-manifest.d.ts.map +1 -1
  76. package/dist/schemas/marketplace-manifest.js +17 -6
  77. package/dist/schemas/marketplace-manifest.js.map +1 -1
  78. package/dist/skill-identity.d.ts +18 -3
  79. package/dist/skill-identity.d.ts.map +1 -1
  80. package/dist/skill-identity.js +25 -6
  81. package/dist/skill-identity.js.map +1 -1
  82. package/dist/skill-packager.d.ts +144 -20
  83. package/dist/skill-packager.d.ts.map +1 -1
  84. package/dist/skill-packager.js +447 -105
  85. package/dist/skill-packager.js.map +1 -1
  86. package/dist/skill-source/content-hash.d.ts.map +1 -1
  87. package/dist/skill-source/content-hash.js +21 -10
  88. package/dist/skill-source/content-hash.js.map +1 -1
  89. package/dist/skill-source/fetch-cache.d.ts.map +1 -1
  90. package/dist/skill-source/fetch-cache.js +0 -5
  91. package/dist/skill-source/fetch-cache.js.map +1 -1
  92. package/dist/skill-source/git-clone.d.ts +1 -1
  93. package/dist/skill-source/git-clone.d.ts.map +1 -1
  94. package/dist/skill-source/git-clone.js +10 -10
  95. package/dist/skill-source/git-clone.js.map +1 -1
  96. package/dist/skill-source/sources/url-source.d.ts.map +1 -1
  97. package/dist/skill-source/sources/url-source.js +2 -2
  98. package/dist/skill-source/sources/url-source.js.map +1 -1
  99. package/dist/skill-source/stage.d.ts.map +1 -1
  100. package/dist/skill-source/stage.js +0 -6
  101. package/dist/skill-source/stage.js.map +1 -1
  102. package/dist/skill-test/baseline-delta.d.ts +1575 -0
  103. package/dist/skill-test/baseline-delta.d.ts.map +1 -0
  104. package/dist/skill-test/baseline-delta.js +272 -0
  105. package/dist/skill-test/baseline-delta.js.map +1 -0
  106. package/dist/skill-test/baseline-integrity.d.ts +944 -0
  107. package/dist/skill-test/baseline-integrity.d.ts.map +1 -0
  108. package/dist/skill-test/baseline-integrity.js +3090 -0
  109. package/dist/skill-test/baseline-integrity.js.map +1 -0
  110. package/dist/skill-test/build-hook.d.ts +3 -2
  111. package/dist/skill-test/build-hook.d.ts.map +1 -1
  112. package/dist/skill-test/build-hook.js +4 -5
  113. package/dist/skill-test/build-hook.js.map +1 -1
  114. package/dist/skill-test/configure-writer.js +1 -1
  115. package/dist/skill-test/configure-writer.js.map +1 -1
  116. package/dist/skill-test/declared-env.d.ts +5 -4
  117. package/dist/skill-test/declared-env.d.ts.map +1 -1
  118. package/dist/skill-test/declared-env.js +8 -9
  119. package/dist/skill-test/declared-env.js.map +1 -1
  120. package/dist/skill-test/eval-executor.d.ts +21 -5
  121. package/dist/skill-test/eval-executor.d.ts.map +1 -1
  122. package/dist/skill-test/eval-executor.js +6 -6
  123. package/dist/skill-test/eval-executor.js.map +1 -1
  124. package/dist/skill-test/eval-fragment.d.ts +106 -28
  125. package/dist/skill-test/eval-fragment.d.ts.map +1 -1
  126. package/dist/skill-test/eval-fragment.js +78 -16
  127. package/dist/skill-test/eval-fragment.js.map +1 -1
  128. package/dist/skill-test/eval-grader.d.ts +65 -7
  129. package/dist/skill-test/eval-grader.d.ts.map +1 -1
  130. package/dist/skill-test/eval-grader.js +263 -64
  131. package/dist/skill-test/eval-grader.js.map +1 -1
  132. package/dist/skill-test/eval-inputs.d.ts +110 -8
  133. package/dist/skill-test/eval-inputs.d.ts.map +1 -1
  134. package/dist/skill-test/eval-inputs.js +177 -22
  135. package/dist/skill-test/eval-inputs.js.map +1 -1
  136. package/dist/skill-test/eval-lint.d.ts +17 -4
  137. package/dist/skill-test/eval-lint.d.ts.map +1 -1
  138. package/dist/skill-test/eval-lint.js +22 -9
  139. package/dist/skill-test/eval-lint.js.map +1 -1
  140. package/dist/skill-test/eval-suite-isolation.d.ts.map +1 -1
  141. package/dist/skill-test/eval-suite-isolation.js +8 -5
  142. package/dist/skill-test/eval-suite-isolation.js.map +1 -1
  143. package/dist/skill-test/evals-template.d.ts +1 -1
  144. package/dist/skill-test/evals-template.d.ts.map +1 -1
  145. package/dist/skill-test/evals-template.js +1 -3
  146. package/dist/skill-test/evals-template.js.map +1 -1
  147. package/dist/skill-test/executor-prompt.d.ts +15 -7
  148. package/dist/skill-test/executor-prompt.d.ts.map +1 -1
  149. package/dist/skill-test/executor-prompt.js +10 -7
  150. package/dist/skill-test/executor-prompt.js.map +1 -1
  151. package/dist/skill-test/failure-reason.d.ts +113 -0
  152. package/dist/skill-test/failure-reason.d.ts.map +1 -0
  153. package/dist/skill-test/failure-reason.js +124 -0
  154. package/dist/skill-test/failure-reason.js.map +1 -0
  155. package/dist/skill-test/fragment-merge.d.ts +3 -20
  156. package/dist/skill-test/fragment-merge.d.ts.map +1 -1
  157. package/dist/skill-test/fragment-merge.js +67 -8
  158. package/dist/skill-test/fragment-merge.js.map +1 -1
  159. package/dist/skill-test/grader-prompt.d.ts +29 -9
  160. package/dist/skill-test/grader-prompt.d.ts.map +1 -1
  161. package/dist/skill-test/grader-prompt.js +264 -68
  162. package/dist/skill-test/grader-prompt.js.map +1 -1
  163. package/dist/skill-test/grader-text.d.ts +145 -0
  164. package/dist/skill-test/grader-text.d.ts.map +1 -0
  165. package/dist/skill-test/grader-text.js +410 -0
  166. package/dist/skill-test/grader-text.js.map +1 -0
  167. package/dist/skill-test/grading-adapter.d.ts +38 -2
  168. package/dist/skill-test/grading-adapter.d.ts.map +1 -1
  169. package/dist/skill-test/grading-adapter.js +57 -9
  170. package/dist/skill-test/grading-adapter.js.map +1 -1
  171. package/dist/skill-test/grading-schema.d.ts +160 -5
  172. package/dist/skill-test/grading-schema.d.ts.map +1 -1
  173. package/dist/skill-test/grading-schema.js +66 -7
  174. package/dist/skill-test/grading-schema.js.map +1 -1
  175. package/dist/skill-test/harness-location.d.ts +3 -2
  176. package/dist/skill-test/harness-location.d.ts.map +1 -1
  177. package/dist/skill-test/harness-location.js +5 -16
  178. package/dist/skill-test/harness-location.js.map +1 -1
  179. package/dist/skill-test/index.d.ts +2 -2
  180. package/dist/skill-test/index.d.ts.map +1 -1
  181. package/dist/skill-test/index.js +2 -2
  182. package/dist/skill-test/index.js.map +1 -1
  183. package/dist/skill-test/lock.d.ts +58 -1
  184. package/dist/skill-test/lock.d.ts.map +1 -1
  185. package/dist/skill-test/lock.js +78 -6
  186. package/dist/skill-test/lock.js.map +1 -1
  187. package/dist/skill-test/pipeline.d.ts +19 -1
  188. package/dist/skill-test/pipeline.d.ts.map +1 -1
  189. package/dist/skill-test/pipeline.js +21 -10
  190. package/dist/skill-test/pipeline.js.map +1 -1
  191. package/dist/skill-test/preflight.d.ts +1 -1
  192. package/dist/skill-test/preflight.d.ts.map +1 -1
  193. package/dist/skill-test/preflight.js +59 -16
  194. package/dist/skill-test/preflight.js.map +1 -1
  195. package/dist/skill-test/prompt-invariants.d.ts +4 -2
  196. package/dist/skill-test/prompt-invariants.d.ts.map +1 -1
  197. package/dist/skill-test/prompt-invariants.js +5 -4
  198. package/dist/skill-test/prompt-invariants.js.map +1 -1
  199. package/dist/skill-test/run-harness.d.ts +665 -85
  200. package/dist/skill-test/run-harness.d.ts.map +1 -1
  201. package/dist/skill-test/run-harness.js +1522 -237
  202. package/dist/skill-test/run-harness.js.map +1 -1
  203. package/dist/skill-test/staging.d.ts +20 -8
  204. package/dist/skill-test/staging.d.ts.map +1 -1
  205. package/dist/skill-test/staging.js +25 -18
  206. package/dist/skill-test/staging.js.map +1 -1
  207. package/dist/skill-test/tier-plan.d.ts +1 -1
  208. package/dist/skill-test/tier-plan.js +1 -1
  209. package/dist/skill-test/tool-eval-schema.d.ts +6 -6
  210. package/dist/skill-test/tool-eval-schema.js +2 -2
  211. package/dist/skill-test/vendor-manifest.d.ts +2 -1
  212. package/dist/skill-test/vendor-manifest.d.ts.map +1 -1
  213. package/dist/skill-test/vendor-manifest.js +10 -10
  214. package/dist/skill-test/vendor-manifest.js.map +1 -1
  215. package/dist/test-input.d.ts +59 -8
  216. package/dist/test-input.d.ts.map +1 -1
  217. package/dist/test-input.js +64 -19
  218. package/dist/test-input.js.map +1 -1
  219. package/dist/validators/agent-instruction-presence.d.ts +1 -1
  220. package/dist/validators/agent-instruction-presence.d.ts.map +1 -1
  221. package/dist/validators/agent-instruction-presence.js +45 -2
  222. package/dist/validators/agent-instruction-presence.js.map +1 -1
  223. package/dist/validators/bundled-resource-link-detection.d.ts +6 -4
  224. package/dist/validators/bundled-resource-link-detection.d.ts.map +1 -1
  225. package/dist/validators/bundled-resource-link-detection.js +39 -39
  226. package/dist/validators/bundled-resource-link-detection.js.map +1 -1
  227. package/dist/validators/compat-detectors.d.ts +18 -1
  228. package/dist/validators/compat-detectors.d.ts.map +1 -1
  229. package/dist/validators/compat-detectors.js +47 -20
  230. package/dist/validators/compat-detectors.js.map +1 -1
  231. package/dist/validators/cross-skill-dependency-detection.d.ts +1 -1
  232. package/dist/validators/cross-skill-dependency-detection.d.ts.map +1 -1
  233. package/dist/validators/cross-skill-dependency-detection.js +1 -1
  234. package/dist/validators/cross-skill-dependency-detection.js.map +1 -1
  235. package/dist/validators/description-style-detection.d.ts +1 -1
  236. package/dist/validators/description-style-detection.d.ts.map +1 -1
  237. package/dist/validators/description-style-detection.js +1 -1
  238. package/dist/validators/description-style-detection.js.map +1 -1
  239. package/dist/validators/format-detection.d.ts +3 -0
  240. package/dist/validators/format-detection.d.ts.map +1 -1
  241. package/dist/validators/format-detection.js +41 -26
  242. package/dist/validators/format-detection.js.map +1 -1
  243. package/dist/validators/frontmatter-validation.d.ts +1 -1
  244. package/dist/validators/frontmatter-validation.d.ts.map +1 -1
  245. package/dist/validators/frontmatter-validation.js +2 -2
  246. package/dist/validators/frontmatter-validation.js.map +1 -1
  247. package/dist/validators/imperative-body-detection.d.ts +1 -1
  248. package/dist/validators/imperative-body-detection.d.ts.map +1 -1
  249. package/dist/validators/imperative-body-detection.js +1 -1
  250. package/dist/validators/imperative-body-detection.js.map +1 -1
  251. package/dist/validators/index.d.ts +1 -1
  252. package/dist/validators/index.d.ts.map +1 -1
  253. package/dist/validators/kebab-case-detection.d.ts +1 -1
  254. package/dist/validators/kebab-case-detection.d.ts.map +1 -1
  255. package/dist/validators/kebab-case-detection.js +1 -1
  256. package/dist/validators/kebab-case-detection.js.map +1 -1
  257. package/dist/validators/marketplace-validator.d.ts.map +1 -1
  258. package/dist/validators/marketplace-validator.js +7 -2
  259. package/dist/validators/marketplace-validator.js.map +1 -1
  260. package/dist/validators/mcp-tool-qualification.d.ts +158 -0
  261. package/dist/validators/mcp-tool-qualification.d.ts.map +1 -0
  262. package/dist/validators/mcp-tool-qualification.js +467 -0
  263. package/dist/validators/mcp-tool-qualification.js.map +1 -0
  264. package/dist/validators/packaged-size-limit.d.ts +296 -0
  265. package/dist/validators/packaged-size-limit.d.ts.map +1 -0
  266. package/dist/validators/packaged-size-limit.js +492 -0
  267. package/dist/validators/packaged-size-limit.js.map +1 -0
  268. package/dist/validators/packaging-validator.d.ts +149 -10
  269. package/dist/validators/packaging-validator.d.ts.map +1 -1
  270. package/dist/validators/packaging-validator.js +371 -55
  271. package/dist/validators/packaging-validator.js.map +1 -1
  272. package/dist/validators/plugin-hosted-shape.d.ts +4 -2
  273. package/dist/validators/plugin-hosted-shape.d.ts.map +1 -1
  274. package/dist/validators/plugin-hosted-shape.js +6 -7
  275. package/dist/validators/plugin-hosted-shape.js.map +1 -1
  276. package/dist/validators/plugin-recommended-fields.d.ts +1 -1
  277. package/dist/validators/plugin-recommended-fields.d.ts.map +1 -1
  278. package/dist/validators/plugin-recommended-fields.js +1 -1
  279. package/dist/validators/plugin-recommended-fields.js.map +1 -1
  280. package/dist/validators/referenced-path-missing.d.ts +211 -0
  281. package/dist/validators/referenced-path-missing.d.ts.map +1 -0
  282. package/dist/validators/referenced-path-missing.js +378 -0
  283. package/dist/validators/referenced-path-missing.js.map +1 -0
  284. package/dist/validators/registry-validator.d.ts.map +1 -1
  285. package/dist/validators/registry-validator.js +1 -2
  286. package/dist/validators/registry-validator.js.map +1 -1
  287. package/dist/validators/rule-engine/index.d.ts +1 -1
  288. package/dist/validators/rule-engine/rule-context.d.ts +20 -3
  289. package/dist/validators/rule-engine/rule-context.d.ts.map +1 -1
  290. package/dist/validators/rule-engine/rule-context.js +3 -1
  291. package/dist/validators/rule-engine/rule-context.js.map +1 -1
  292. package/dist/validators/rule-engine/rule-engine.d.ts +2 -2
  293. package/dist/validators/rule-engine/rule-engine.d.ts.map +1 -1
  294. package/dist/validators/rule-engine/rule-engine.js +52 -13
  295. package/dist/validators/rule-engine/rule-engine.js.map +1 -1
  296. package/dist/validators/skill-validator.d.ts.map +1 -1
  297. package/dist/validators/skill-validator.js +91 -54
  298. package/dist/validators/skill-validator.js.map +1 -1
  299. package/dist/validators/source-only-codes.js +1 -1
  300. package/dist/validators/source-only-codes.js.map +1 -1
  301. package/dist/validators/types.d.ts +21 -1
  302. package/dist/validators/types.d.ts.map +1 -1
  303. package/dist/validators/unified-validator.d.ts.map +1 -1
  304. package/dist/validators/unified-validator.js +4 -5
  305. package/dist/validators/unified-validator.js.map +1 -1
  306. package/dist/validators/validation-rules.d.ts +4 -4
  307. package/dist/validators/validation-rules.d.ts.map +1 -1
  308. package/dist/validators/validation-rules.js +9 -38
  309. package/dist/validators/validation-rules.js.map +1 -1
  310. package/dist/validators/walker-to-issues.d.ts +9 -3
  311. package/dist/validators/walker-to-issues.d.ts.map +1 -1
  312. package/dist/validators/walker-to-issues.js +64 -19
  313. package/dist/validators/walker-to-issues.js.map +1 -1
  314. package/dist/walk-link-graph.d.ts +64 -5
  315. package/dist/walk-link-graph.d.ts.map +1 -1
  316. package/dist/walk-link-graph.js +376 -92
  317. package/dist/walk-link-graph.js.map +1 -1
  318. package/package.json +14 -22
  319. package/dist/skill-test/exit-codes.d.ts +0 -97
  320. package/dist/skill-test/exit-codes.d.ts.map +0 -1
  321. package/dist/skill-test/exit-codes.js +0 -141
  322. package/dist/skill-test/exit-codes.js.map +0 -1
@@ -16,7 +16,7 @@
16
16
  * - docs/external/anthropic-skill-authoring-best-practices.md (dated cache of the above)
17
17
  * - https://github.com/anthropics/skills (official examples)
18
18
  */
19
- import type { ValidationIssue } from '@vibe-agent-toolkit/agent-schema';
19
+ import type { ValidationIssue } from '@vibe-agent-toolkit/schema';
20
20
  /**
21
21
  * Validation rule category
22
22
  * - required: Non-overridable rules (fundamental correctness)
@@ -26,7 +26,7 @@ export type RuleCategory = 'required' | 'best_practice';
26
26
  /**
27
27
  * Validation rule code
28
28
  */
29
- export type ValidationRuleCode = 'BROKEN_INTERNAL_LINK' | 'CIRCULAR_REFERENCE' | 'OUTSIDE_PROJECT_BOUNDARY' | 'WINDOWS_BACKSLASH_IN_PATH' | 'LINK_TARGETS_DIRECTORY' | 'SKILL_LENGTH_EXCEEDS_RECOMMENDED' | 'SKILL_TOTAL_SIZE_LARGE' | 'SKILL_TOO_MANY_FILES' | 'REFERENCE_TOO_DEEP' | 'LINKS_TO_NAVIGATION_FILES' | 'DESCRIPTION_TOO_VAGUE' | 'NO_PROGRESSIVE_DISCLOSURE' | 'PACKAGED_UNREFERENCED_FILE';
29
+ export type ValidationRuleCode = 'LINK_TARGETS_DIRECTORY' | 'SKILL_LENGTH_EXCEEDS_RECOMMENDED' | 'SKILL_TOTAL_SIZE_LARGE' | 'SKILL_TOO_MANY_FILES' | 'REFERENCE_TOO_DEEP' | 'DESCRIPTION_TOO_VAGUE' | 'NO_PROGRESSIVE_DISCLOSURE' | 'PACKAGED_UNREFERENCED_FILE';
30
30
  /**
31
31
  * Validation rule definition
32
32
  */
@@ -55,7 +55,7 @@ export declare const VALIDATION_RULES: Record<ValidationRuleCode, ValidationRule
55
55
  * listing truncates. MAX_TOTAL_LINES, MAX_FILE_COUNT, MAX_REFERENCE_DEPTH and
56
56
  * MIN_DESCRIPTION_LENGTH are VAT-originated.
57
57
  *
58
- * Re-verified against the live page on 2026-07-30. That pass sharpened two of
58
+ * Re-verified against the live page (the `reviewed=` date above). That pass sharpened two of
59
59
  * those verdicts from "unsupported" to "contradicted", which is a stronger claim:
60
60
  *
61
61
  * - MAX_REFERENCE_DEPTH (2) is CONTRADICTED, not merely VAT-originated. Anthropic:
@@ -145,7 +145,7 @@ export declare const AGENT_INSTRUCTION_FILE_PATTERNS: readonly ["CLAUDE.md", "CL
145
145
  * - {@link AGENT_INSTRUCTION_FILE_PATTERNS} — never packaged on ANY surface.
146
146
  * - {@link NAVIGATION_FILE_PATTERNS} — never packaged into a *skill bundle*, and
147
147
  * **only** there. A plugin-root `README.md` is the plugin's front page (measured
148
- * 2026-08-02: 50 of 86 installed plugins ship one; 57 of 94 when first measured),
148
+ * twice on installed plugins: 50 of 86 ship one; 57 of 94 the first time),
149
149
  * so the plugin tree-copy must import the agent-instruction list alone. Merging
150
150
  * the two lists would strip the front page off three in five real plugins. The
151
151
  * population moves as plugins are installed and removed — the ratio is the load-
@@ -1 +1 @@
1
- {"version":3,"file":"validation-rules.d.ts","sourceRoot":"","sources":["../../src/validators/validation-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,eAAe,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAE1B,sBAAsB,GACtB,oBAAoB,GACpB,0BAA0B,GAC1B,2BAA2B,GAC3B,wBAAwB,GAExB,kCAAkC,GAClC,wBAAwB,GACxB,sBAAsB,GACtB,oBAAoB,GACpB,2BAA2B,GAC3B,uBAAuB,GACvB,2BAA2B,GAC3B,4BAA4B,CAAC;AAEjC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,kBAAkB,CAAC;IACzB,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC;IACtD,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAGD;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,kBAAkB,EAAE,cAAc,CAwGvE,CAAC;A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e,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAKrE;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,cAAc,EACpB,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EACrC,QAAQ,CAAC,EAAE,MAAM,GAChB,eAAe,CAajB"}
@@ -21,35 +21,13 @@
21
21
  */
22
22
  export const VALIDATION_RULES = {
23
23
  // Required rules (non-overridable)
24
- BROKEN_INTERNAL_LINK: {
25
- code: 'BROKEN_INTERNAL_LINK',
26
- category: 'required',
27
- message: (ctx) => `Link target not found: ${ctx['href'] ?? 'unknown'}`,
28
- fix: 'Fix link path or restore missing file',
29
- },
30
- CIRCULAR_REFERENCE: {
31
- code: 'CIRCULAR_REFERENCE',
32
- category: 'required',
33
- message: (ctx) => `Circular reference detected: ${ctx['chain'] ?? 'unknown'}`,
34
- fix: 'Remove circular link dependency',
35
- },
36
- OUTSIDE_PROJECT_BOUNDARY: {
37
- code: 'OUTSIDE_PROJECT_BOUNDARY',
38
- category: 'required',
39
- message: (ctx) => `Link points outside project: ${ctx['href'] ?? 'unknown'}`,
40
- fix: 'Keep skills self-contained - move referenced files into the project',
41
- },
42
- // FILENAME_COLLISION is deliberately absent: it lives in CODE_REGISTRY and is
43
- // emitted by the packager (see `filenameCollisionIssue` in skill-packager.ts).
44
- // The entry that used to sit here was never emitted by anything and its fix
45
- // hint named `packagingOptions.usePathNames`, an option that does not exist —
46
- // a second, stale definition of one code is worse than none.
47
- WINDOWS_BACKSLASH_IN_PATH: {
48
- code: 'WINDOWS_BACKSLASH_IN_PATH',
49
- category: 'required',
50
- message: () => 'Path uses Windows backslashes',
51
- fix: 'Use forward slashes for cross-platform compatibility',
52
- },
24
+ //
25
+ // Only the rows something EMITS live here. FILENAME_COLLISION, the broken /
26
+ // circular / outside-project link codes and the Windows-backslash code used
27
+ // to sit in this table too; none was emitted through it (the link checks go
28
+ // through CODE_REGISTRY as LINK_INTEGRITY_BROKEN / LINK_OUTSIDE_SKILL_DIR, the
29
+ // collision through `filenameCollisionIssue` in skill-packager.ts), and a
30
+ // second, stale definition of one code is worse than none.
53
31
  LINK_TARGETS_DIRECTORY: {
54
32
  code: 'LINK_TARGETS_DIRECTORY',
55
33
  category: 'required',
@@ -91,13 +69,6 @@ export const VALIDATION_RULES = {
91
69
  fix: 'Reduce transitive link chains by moving deep content to RAG search or using linkFollowDepth configuration',
92
70
  example: 'SKILL.md → reference.md (1 hop), SKILL.md → advanced.md → details.md (2 hops, OK)',
93
71
  },
94
- LINKS_TO_NAVIGATION_FILES: {
95
- code: 'LINKS_TO_NAVIGATION_FILES',
96
- category: 'best_practice',
97
- message: (ctx) => `Links to navigation files: ${ctx['files'] ?? 'unknown'}`,
98
- fix: 'Link directly to specific topic documents instead of navigation indexes',
99
- example: '[Operators](patterns/calculations/operators.md) not [Overview](patterns/README.md)',
100
- },
101
72
  DESCRIPTION_TOO_VAGUE: {
102
73
  code: 'DESCRIPTION_TOO_VAGUE',
103
74
  category: 'best_practice',
@@ -135,7 +106,7 @@ export const VALIDATION_RULES = {
135
106
  * listing truncates. MAX_TOTAL_LINES, MAX_FILE_COUNT, MAX_REFERENCE_DEPTH and
136
107
  * MIN_DESCRIPTION_LENGTH are VAT-originated.
137
108
  *
138
- * Re-verified against the live page on 2026-07-30. That pass sharpened two of
109
+ * Re-verified against the live page (the `reviewed=` date above). That pass sharpened two of
139
110
  * those verdicts from "unsupported" to "contradicted", which is a stronger claim:
140
111
  *
141
112
  * - MAX_REFERENCE_DEPTH (2) is CONTRADICTED, not merely VAT-originated. Anthropic:
@@ -235,7 +206,7 @@ export const AGENT_INSTRUCTION_FILE_PATTERNS = [
235
206
  * - {@link AGENT_INSTRUCTION_FILE_PATTERNS} — never packaged on ANY surface.
236
207
  * - {@link NAVIGATION_FILE_PATTERNS} — never packaged into a *skill bundle*, and
237
208
  * **only** there. A plugin-root `README.md` is the plugin's front page (measured
238
- * 2026-08-02: 50 of 86 installed plugins ship one; 57 of 94 when first measured),
209
+ * twice on installed plugins: 50 of 86 ship one; 57 of 94 the first time),
239
210
  * so the plugin tree-copy must import the agent-instruction list alone. Merging
240
211
  * the two lists would strip the front page off three in five real plugins. The
241
212
  * population moves as plugins are installed and removed — the ratio is the load-
@@ -1 +1 @@
1
- {"version":3,"file":"validation-rules.js","sourceRoot":"","sources":["../../src/validators/validation-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AA4CH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA+C;IAC1E,mCAAmC;IACnC,oBAAoB,EAAE;QACpB,IAAI,EAAE,sBAAsB;QAC5B,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,0BAA2B,GAAG,CAAC,MAAM,CAAY,IAAI,SAAS,EAAE;QAClF,GAAG,EAAE,uCAAuC;KAC7C;IACD,kBAAkB,EAAE;QAClB,IAAI,EAAE,oBAAoB;QAC1B,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,gCAAiC,GAAG,CAAC,OAAO,CAAY,IAAI,SAAS,EAAE;QACzF,GAAG,EAAE,iCAAiC;KACvC;IACD,wBAAwB,EAAE;QACxB,IAAI,EAAE,0BAA0B;QAChC,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,gCAAiC,GAAG,CAAC,MAAM,CAAY,IAAI,SAAS,EAAE;QACxF,GAAG,EAAE,qEAAqE;KAC3E;IACD,8EAA8E;IAC9E,+EAA+E;IAC/E,4EAA4E;IAC5E,8EAA8E;IAC9E,6DAA6D;IAC7D,yBAAyB,EAAE;QACzB,IAAI,EAAE,2BAA2B;QACjC,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE,GAAG,EAAE,CAAC,+BAA+B;QAC9C,GAAG,EAAE,sDAAsD;KAC5D;IACD,sBAAsB,EAA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,OAAO,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,KAAK,GAAG,CAAC;IACvD,CAAC,CAAC;SACD,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,QAA2B;IACzD,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC/B,MAAM,IAAI,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;QACzC,OAAO,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CACzB,IAAoB,EACpB,UAAmC,EAAE,EACrC,QAAiB;IAEjB,MAAM,KAAK,GAAoB;QAC7B,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,IAAI,CAAC,IAAa,EAAE,0CAA0C;QACpE,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;QAC9B,GAAG,EAAE,IAAI,CAAC,GAAG;KACd,CAAC;IAEF,IAAI,QAAQ,EAAE,CAAC;QACb,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,11 +1,17 @@
1
- import { type ValidationIssue } from '@vibe-agent-toolkit/agent-schema';
1
+ import { type ValidationIssue } from '@vibe-agent-toolkit/schema';
2
2
  import type { LinkResolution } from '../walk-link-graph.js';
3
3
  /**
4
4
  * Map walker exclusions to validation issues by routing each through the
5
- * intent-aware engine. Exclusions whose intent is acceptable (navigational
6
- * directory link, pattern-excluded reference) produce no issue.
5
+ * intent-aware engine.
6
+ *
7
+ * One exclusion in, one issue out: the engine no longer returns `null` for any
8
+ * reason the walker can record, so no exclusion is dropped on the floor here.
9
+ * The `null` branch remains because `evaluate` is shared with the file/orphan
10
+ * subject, where `null` is a real verdict.
7
11
  */
8
12
  export declare function walkerExclusionsToIssues(exclusions: readonly LinkResolution[], locationRoot: string): ValidationIssue[];
13
+ /** Followed links that left the skill directory, as issues at the registry default severity. */
14
+ export declare function outsideSkillDirLinksToIssues(links: readonly LinkResolution[], locationRoot: string): ValidationIssue[];
9
15
  /**
10
16
  * Emit one LINK_DEFERRED_ARTIFACT info issue per deferred asset path.
11
17
  *
@@ -1 +1 @@
1
- {"version":3,"file":"walker-to-issues.d.ts","sourceRoot":"","sources":["../../src/validators/walker-to-issues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAGxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AA2D5D;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,SAAS,cAAc,EAAE,EACrC,YAAY,EAAE,MAAM,GACnB,eAAe,EAAE,CAmBnB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,cAAc,EAAE,SAAS,MAAM,EAAE,EACjC,YAAY,EAAE,MAAM,GACnB,eAAe,EAAE,CAKnB"}
1
+ {"version":3,"file":"walker-to-issues.d.ts","sourceRoot":"","sources":["../../src/validators/walker-to-issues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAGlF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAgG5D;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,SAAS,cAAc,EAAE,EACrC,YAAY,EAAE,MAAM,GACnB,eAAe,EAAE,CASnB;AAED,gGAAgG;AAChG,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,SAAS,cAAc,EAAE,EAChC,YAAY,EAAE,MAAM,GACnB,eAAe,EAAE,CAGnB;AAaD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,cAAc,EAAE,SAAS,MAAM,EAAE,EACjC,YAAY,EAAE,MAAM,GACnB,eAAe,EAAE,CAKnB"}
@@ -1,7 +1,7 @@
1
1
  import { issueLocation } from '@vibe-agent-toolkit/utils';
2
2
  import { evaluate, makeRuleContext, materializeIssue } from './rule-engine/index.js';
3
3
  /**
4
- * Live-path extraction front-end (issue #129, slice 3).
4
+ * Live-path extraction front-end.
5
5
  *
6
6
  * Translates the link-graph walker's mechanical `excludeReason` into the
7
7
  * intent-aware {@link RuleContext} the engine reasons over. This is the ONLY
@@ -9,11 +9,19 @@ import { evaluate, makeRuleContext, materializeIssue } from './rule-engine/index
9
9
  * decision and issue construction belong to the shared engine + materializer,
10
10
  * so the registry stays the single source of truth.
11
11
  *
12
- * A navigational link that resolves to a directory ('directory-target') is a
13
- * valid reference — the directory is excluded from the bundle but no issue is
14
- * emitted (the engine returns `null` for a non-typed-slot directory). A
15
- * `files:` typed-slot source resolving to a directory is an error, but that
16
- * check lives in packaging-validator, not here.
12
+ * **Every one of the walker's eleven reasons reaches a code.** Two did not: a
13
+ * navigational link resolving to a directory ('directory-target') and a
14
+ * reference refused by the author's own rule ('pattern-matched') both evaluated
15
+ * to `null` and were filtered out of the output below, so the author got no
16
+ * finding at all — not a quiet one, none. Both are now reported, at severities
17
+ * that say how much each matters: `LINK_TO_UNBUNDLED_DIRECTORY` (warning — the
18
+ * directory never travels, so the packaged link points at nothing) and
19
+ * `LINK_EXCLUDED_BY_PATTERN` (info — the author configured this, and the receipt
20
+ * only needs to be there when they come looking for it).
21
+ *
22
+ * `LINK_TARGETS_DIRECTORY` is a DIFFERENT code for a different situation: a
23
+ * `files:` typed-slot source that resolves to a directory, an error, owned by
24
+ * packaging-validator. The two never fire for the same edge.
17
25
  *
18
26
  * `existsAtSource` is READ FROM the walker's record, never assumed. The engine
19
27
  * gates `LINK_TO_GITIGNORED_FILE` on "gitignored AND exists"; hardcoding
@@ -39,8 +47,19 @@ function exclusionToContext(reason, targetExists) {
39
47
  return makeRuleContext({ subject: 'edge', fileKind: 'agent-instruction' });
40
48
  case 'missing-target':
41
49
  return makeRuleContext({ subject: 'edge', phase: 'source', existsAtSource: targetExists });
50
+ case 'unreadable-target':
51
+ // Present on disk, unstattable anyway. `existsAtSource` stays true (the
52
+ // walker found it) — the edge is not broken, it is unreadable, and the two
53
+ // send an author to different places.
54
+ return makeRuleContext({ subject: 'edge', unreadable: true });
42
55
  case 'pattern-matched':
43
56
  return makeRuleContext({ subject: 'edge', patternExcluded: true });
57
+ case 'non-routable-source':
58
+ // `existsAtSource` is read from the walker's record for the same reason
59
+ // the gitignore arm reads it: a link out of an HTML page to a path that
60
+ // is not there is an author's broken link, and the engine must be able to
61
+ // tell the two apart rather than being handed a hardcoded `true`.
62
+ return makeRuleContext({ subject: 'edge', nonRoutableSource: true, existsAtSource: targetExists });
44
63
  default: {
45
64
  // Exhaustiveness guard, NOT a fallback. A `default:` arm that returns a
46
65
  // context is precisely what disables TypeScript's exhaustiveness check:
@@ -51,10 +70,31 @@ function exclusionToContext(reason, targetExists) {
51
70
  }
52
71
  }
53
72
  }
73
+ /**
74
+ * The per-issue detail appended to the registry description.
75
+ *
76
+ * Always the link, because that is what identifies the edge. Plus, when the
77
+ * walker recorded WHICH rule refused the reference, the patterns of that rule:
78
+ * with several `excludeReferencesFromBundle` rules configured, learning that one
79
+ * of them fired is not an answer to "why did this file not ship?", and the
80
+ * walker already knows which. Keyed on the presence of `matchedRule` rather than
81
+ * on the code, because the walker only ever sets that field for the reason it
82
+ * describes — so this needs no branch on a code it does not own.
83
+ */
84
+ function exclusionDetail(r, target) {
85
+ const link = `link: ${r.linkHref ?? target}`;
86
+ return r.matchedRule === undefined
87
+ ? link
88
+ : `${link}; matched excludeReferencesFromBundle pattern(s): ${r.matchedRule.patterns.join(', ')}`;
89
+ }
54
90
  /**
55
91
  * Map walker exclusions to validation issues by routing each through the
56
- * intent-aware engine. Exclusions whose intent is acceptable (navigational
57
- * directory link, pattern-excluded reference) produce no issue.
92
+ * intent-aware engine.
93
+ *
94
+ * One exclusion in, one issue out: the engine no longer returns `null` for any
95
+ * reason the walker can record, so no exclusion is dropped on the floor here.
96
+ * The `null` branch remains because `evaluate` is shared with the file/orphan
97
+ * subject, where `null` is a real verdict.
58
98
  */
59
99
  export function walkerExclusionsToIssues(exclusions, locationRoot) {
60
100
  const issues = [];
@@ -64,20 +104,25 @@ export function walkerExclusionsToIssues(exclusions, locationRoot) {
64
104
  const code = evaluate(exclusionToContext(r.excludeReason, r.targetExists));
65
105
  if (code === null)
66
106
  continue;
67
- // Anchor to the file CONTAINING the link, not the target. For a
68
- // `missing-target` exclusion the target does not exist, so a location
69
- // naming it points at nothing the author can open. The target is a link,
70
- // and links have their own field.
71
- const target = issueLocation(r.path, locationRoot);
72
- issues.push(materializeIssue(code, {
73
- location: issueLocation(r.sourcePath, locationRoot),
74
- ...(r.sourceLine !== undefined && { line: r.sourceLine }),
75
- link: r.linkHref ?? target,
76
- detail: `link: ${r.linkHref ?? target}`,
77
- }));
107
+ issues.push(edgeIssue(code, r, locationRoot));
78
108
  }
79
109
  return issues;
80
110
  }
111
+ /** Followed links that left the skill directory, as issues at the registry default severity. */
112
+ export function outsideSkillDirLinksToIssues(links, locationRoot) {
113
+ const code = evaluate(makeRuleContext({ subject: 'edge', insideSkillDir: false }));
114
+ return code === null ? [] : links.map(r => edgeIssue(code, r, locationRoot));
115
+ }
116
+ /** One edge's issue, anchored to the file CONTAINING the link: a missing target names nothing to open. */
117
+ function edgeIssue(code, r, locationRoot) {
118
+ const target = issueLocation(r.path, locationRoot);
119
+ return materializeIssue(code, {
120
+ location: issueLocation(r.sourcePath, locationRoot),
121
+ ...(r.sourceLine !== undefined && { line: r.sourceLine }),
122
+ link: r.linkHref ?? target,
123
+ detail: exclusionDetail(r, target),
124
+ });
125
+ }
81
126
  /**
82
127
  * Emit one LINK_DEFERRED_ARTIFACT info issue per deferred asset path.
83
128
  *
@@ -1 +1 @@
1
- {"version":3,"file":"walker-to-issues.js","sourceRo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AC;IACnD,OAAO,gBAAgB,CAAC,IAAI,EAAE;QAC5B,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,UAAU,EAAE,YAAY,CAAC;QACnD,GAAG,CAAC,CAAC,CAAC,UAAU,KAAK,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC;QACzD,IAAI,EAAE,CAAC,CAAC,QAAQ,IAAI,MAAM;QAC1B,MAAM,EAAE,eAAe,CAAC,CAAC,EAAE,MAAM,CAAC;KACnC,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CACpC,cAAiC,EACjC,YAAoB;IAEpB,OAAO,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QAClC,MAAM,QAAQ,GAAG,aAAa,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;QACpD,OAAO,gBAAgB,CAAC,wBAAwB,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IACpF,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -8,9 +8,33 @@
8
8
  * Non-markdown assets (images, JSON, etc.) won't be in the registry and still
9
9
  * require `existsSync()` checks — this is acceptable since the goal is eliminating
10
10
  * redundant I/O for markdown files that are already parsed.
11
+ *
12
+ * ## Membership is not traversability
13
+ *
14
+ * A registry MEMBER is a file VAT has parsed: its links are known, so the
15
+ * packager's rewriter can reach inside it and repoint them at bundled copies. A
16
+ * ROUTABLE file is one the walker walks THROUGH — it enqueues that file's link
17
+ * targets as further bundle members. Routing is markdown-only
18
+ * ({@link isRoutable}); HTML is "a leaf we can read, not a door we walk
19
+ * through".
20
+ *
21
+ * These used to be the same thing, by accident: any link target that
22
+ * `getResourceById` found was queued, so a registry's include globs silently
23
+ * WERE the routability policy. The two production registries disagreed as a
24
+ * result. `crawlAndResolveRegistry` includes HTML, so `vat audit` and
25
+ * post-build validation walked THROUGH a bundled page and counted its targets
26
+ * as bundled; the packager's `createProjectRegistry` is markdown-only, so at
27
+ * walk time the same page was an opaque asset and its targets were dropped.
28
+ * Same tree, two answers to "is HTML a door" — and audit's answer described a
29
+ * bundle the build never produced.
30
+ *
31
+ * Links out of a non-routable member are not silently dropped: each one whose
32
+ * target the walk never bundled by some other route is reported as a
33
+ * `non-routable-source` exclusion (`LINK_FROM_NON_ROUTABLE_FILE`).
11
34
  */
12
35
  import type { DeferredArtifacts, ResourceMetadata } from '@vibe-agent-toolkit/resources';
13
- import { type GitTracker } from '@vibe-agent-toolkit/utils';
36
+ import { FsLookupCache } from '@vibe-agent-toolkit/utils';
37
+ import { type GitTracker } from '@vibe-agent-toolkit/utils/git';
14
38
  /**
15
39
  * Resolution result for a single link found in a bundled markdown file.
16
40
  */
@@ -40,7 +64,7 @@ export interface LinkResolution {
40
64
  /** Whether the file will be bundled */
41
65
  bundled: boolean;
42
66
  /** Reason it was excluded (only set when bundled is false) */
43
- excludeReason?: 'depth-exceeded' | 'pattern-matched' | 'directory-target' | 'outside-project' | 'navigation-file' | 'agent-instruction-file' | 'skill-definition' | 'gitignored' | 'missing-target' | undefined;
67
+ excludeReason?: 'depth-exceeded' | 'pattern-matched' | 'directory-target' | 'outside-project' | 'navigation-file' | 'agent-instruction-file' | 'skill-definition' | 'gitignored' | 'missing-target' | 'unreadable-target' | 'non-routable-source' | undefined;
44
68
  /** The rule that matched (only set for pattern-matched exclusions) */
45
69
  matchedRule?: ExcludeRule | undefined;
46
70
  /** Link text from the source markdown */
@@ -74,6 +98,8 @@ export interface LinkGraphResult {
74
98
  bundledAssets: string[];
75
99
  /** References detected but NOT bundled (depth, exclude, etc.) */
76
100
  excludedReferences: LinkResolution[];
101
+ /** Followed links whose shipped target lies outside the skill's directory (inside the project) */
102
+ outsideSkillDirLinks: LinkResolution[];
77
103
  /** Actual max depth of the bundled portion */
78
104
  maxBundledDepth: number;
79
105
  /** Asset paths that are deferred (declared in files config, may not exist yet) */
@@ -83,7 +109,29 @@ export interface LinkGraphResult {
83
109
  * Options for walking the link graph.
84
110
  */
85
111
  export interface WalkLinkGraphOptions {
86
- /** Max depth for following markdown links (Infinity for 'full') */
112
+ /**
113
+ * Max depth for following markdown links (Infinity for 'full').
114
+ *
115
+ * ⚠️ **This bounds ROUTING, not bundling.** The limit is consulted at exactly
116
+ * one site — the depth check in {@link processRegistryResource} — and that
117
+ * site is reached only for a target the walker walks THROUGH. The deciding
118
+ * predicate is {@link isRoutable}, i.e. `parserKindForPath(path) ===
119
+ * 'markdown'`; every target for which it is false is bundled as a leaf with
120
+ * no depth test at all:
121
+ *
122
+ * - a link target that is not a registry member (an image, a PDF, JSON) —
123
+ * the unconditional add in {@link processLink};
124
+ * - a link target that IS a registry member but is not markdown (HTML, and
125
+ * anything else a registry's include globs admit whose parser kind is
126
+ * `html` or `none`) — the early return in
127
+ * {@link processRegistryResource}, which tests routability BEFORE depth on
128
+ * purpose so that parsing a file never shrinks what ships.
129
+ *
130
+ * So the exemption is not "assets": it is **everything that is not
131
+ * markdown**. `maxDepth: 1` still ships a non-markdown file linked from a
132
+ * document ten hops out, as long as markdown routed to that document. See
133
+ * {@link walkLinkGraph}'s semantics list for the statement of the rule.
134
+ */
87
135
  maxDepth: number;
88
136
  /** Ordered exclude rules (first match wins) */
89
137
  excludeRules: ExcludeRule[];
@@ -103,9 +151,9 @@ export interface WalkLinkGraphOptions {
103
151
  * as a deferred build artifact in two cases:
104
152
  *
105
153
  * - The target does not yet exist on disk ({@link checkDeferred}, the FIRST
106
- * discriminator in {@link checkExclusions}) — covered via dest OR source.
154
+ * discriminator in {@link classifyExclusion}) — covered via dest OR source.
107
155
  * - The target exists, is gitignored, AND is covered as a DEST (the
108
- * gitignore branch in {@link checkExclusions}) — the expected state of a
156
+ * gitignore branch, {@link classifyGitignored}) — the expected state of a
109
157
  * build artifact once a build has run, not a leak. Source-only coverage
110
158
  * does NOT exempt an existing, gitignored target: a `files:` source is a
111
159
  * real file the author pointed at, and the leak signal is wanted.
@@ -129,6 +177,17 @@ export interface WalkLinkGraphOptions {
129
177
  * `isGitIgnored()` spawn so one-off callers continue to work unchanged.
130
178
  */
131
179
  gitTracker?: GitTracker;
180
+ /**
181
+ * Optional {@link FsLookupCache} to answer this walk's `exists`/`isDirectory`
182
+ * questions (pass 1′). Omitted, the walk builds its own and discards it.
183
+ *
184
+ * ⚠️ **Only inject one when nothing writes to the tree between the walks that
185
+ * share it.** The cache holds a snapshot, so a probe taken before a build
186
+ * step answers questions asked after it. `packageSkill` writes `dist/` per
187
+ * skill and therefore must NOT share a probe across skills. Provided mainly
188
+ * so callers can read {@link FsLookupCache.probeStats} back.
189
+ */
190
+ pathProbe?: FsLookupCache;
132
191
  }
133
192
  /**
134
193
  * Walk the link graph starting from a skill resource, using pre-parsed
@@ -1 +1 @@
1
- {"version":3,"file":"walk-link-graph.d.ts","sourceRoot":"","sources":["../src/walk-link-graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,KAAK,EAAE,iBAAiB,EAAgB,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACvG,OAAO,EAAE,KAAK,UAAU,EAA0C,MAAM,2BAA2B,CAAC;AAKpG;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC;;;;;;;OAOG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB,uCAAuC;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,gBAAgB,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,wBAAwB,GAAG,kBAAkB,GAAG,YAAY,GAAG,gBAAgB,GAAG,SAAS,CAAC;IAChN,sEAAsE;IACtE,WAAW,CAAC,EAAE,WAAW,GAAG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