@vibe-agent-toolkit/cli 0.1.41-rc.7 → 0.1.41-rc.8

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 (149) hide show
  1. package/dist/bin/vat +24 -1
  2. package/dist/bin/vat.js +24 -1
  3. package/dist/bin/vat.js.map +1 -1
  4. package/dist/bin.js +12 -1
  5. package/dist/bin.js.map +1 -1
  6. package/dist/commands/agent/list.d.ts +11 -0
  7. package/dist/commands/agent/list.d.ts.map +1 -1
  8. package/dist/commands/agent/list.js +30 -11
  9. package/dist/commands/agent/list.js.map +1 -1
  10. package/dist/commands/audit.d.ts +34 -1
  11. package/dist/commands/audit.d.ts.map +1 -1
  12. package/dist/commands/audit.js +220 -88
  13. package/dist/commands/audit.js.map +1 -1
  14. package/dist/commands/build.d.ts +14 -0
  15. package/dist/commands/build.d.ts.map +1 -1
  16. package/dist/commands/build.js +89 -24
  17. package/dist/commands/build.js.map +1 -1
  18. package/dist/commands/claude/marketplace/validate.d.ts +97 -0
  19. package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
  20. package/dist/commands/claude/marketplace/validate.js +154 -40
  21. package/dist/commands/claude/marketplace/validate.js.map +1 -1
  22. package/dist/commands/claude/org/stubs.d.ts +9 -1
  23. package/dist/commands/claude/org/stubs.d.ts.map +1 -1
  24. package/dist/commands/claude/org/stubs.js +11 -3
  25. package/dist/commands/claude/org/stubs.js.map +1 -1
  26. package/dist/commands/claude/plugin/build.d.ts +25 -2
  27. package/dist/commands/claude/plugin/build.d.ts.map +1 -1
  28. package/dist/commands/claude/plugin/build.js +99 -10
  29. package/dist/commands/claude/plugin/build.js.map +1 -1
  30. package/dist/commands/claude/plugin/plugin-json-merge.d.ts.map +1 -1
  31. package/dist/commands/claude/plugin/plugin-json-merge.js +15 -0
  32. package/dist/commands/claude/plugin/plugin-json-merge.js.map +1 -1
  33. package/dist/commands/corpus/report.d.ts +22 -4
  34. package/dist/commands/corpus/report.d.ts.map +1 -1
  35. package/dist/commands/corpus/report.js +1 -0
  36. package/dist/commands/corpus/report.js.map +1 -1
  37. package/dist/commands/corpus/runner.d.ts +16 -1
  38. package/dist/commands/corpus/runner.d.ts.map +1 -1
  39. package/dist/commands/corpus/runner.js +40 -22
  40. package/dist/commands/corpus/runner.js.map +1 -1
  41. package/dist/commands/inventory.d.ts +2 -0
  42. package/dist/commands/inventory.d.ts.map +1 -1
  43. package/dist/commands/inventory.js +45 -4
  44. package/dist/commands/inventory.js.map +1 -1
  45. package/dist/commands/phase-utils.d.ts +183 -14
  46. package/dist/commands/phase-utils.d.ts.map +1 -1
  47. package/dist/commands/phase-utils.js +294 -29
  48. package/dist/commands/phase-utils.js.map +1 -1
  49. package/dist/commands/rag/query-command.d.ts +40 -0
  50. package/dist/commands/rag/query-command.d.ts.map +1 -1
  51. package/dist/commands/rag/query-command.js +47 -20
  52. package/dist/commands/rag/query-command.js.map +1 -1
  53. package/dist/commands/resources/index.d.ts.map +1 -1
  54. package/dist/commands/resources/index.js +27 -9
  55. package/dist/commands/resources/index.js.map +1 -1
  56. package/dist/commands/resources/scan.d.ts +37 -0
  57. package/dist/commands/resources/scan.d.ts.map +1 -1
  58. package/dist/commands/resources/scan.js +47 -32
  59. package/dist/commands/resources/scan.js.map +1 -1
  60. package/dist/commands/resources/validate.d.ts +136 -1
  61. package/dist/commands/resources/validate.d.ts.map +1 -1
  62. package/dist/commands/resources/validate.js +105 -66
  63. package/dist/commands/resources/validate.js.map +1 -1
  64. package/dist/commands/skill/review.d.ts.map +1 -1
  65. package/dist/commands/skill/review.js +7 -3
  66. package/dist/commands/skill/review.js.map +1 -1
  67. package/dist/commands/skill/test/run.d.ts +1 -1
  68. package/dist/commands/skill/test/run.d.ts.map +1 -1
  69. package/dist/commands/skill/test/run.js +8 -6
  70. package/dist/commands/skill/test/run.js.map +1 -1
  71. package/dist/commands/skills/build.d.ts +96 -7
  72. package/dist/commands/skills/build.d.ts.map +1 -1
  73. package/dist/commands/skills/build.js +277 -60
  74. package/dist/commands/skills/build.js.map +1 -1
  75. package/dist/commands/skills/command-helpers.d.ts +6 -10
  76. package/dist/commands/skills/command-helpers.d.ts.map +1 -1
  77. package/dist/commands/skills/command-helpers.js +6 -22
  78. package/dist/commands/skills/command-helpers.js.map +1 -1
  79. package/dist/commands/skills/list.d.ts +18 -0
  80. package/dist/commands/skills/list.d.ts.map +1 -1
  81. package/dist/commands/skills/list.js +41 -15
  82. package/dist/commands/skills/list.js.map +1 -1
  83. package/dist/commands/skills/package.d.ts +15 -0
  84. package/dist/commands/skills/package.d.ts.map +1 -1
  85. package/dist/commands/skills/package.js +30 -20
  86. package/dist/commands/skills/package.js.map +1 -1
  87. package/dist/commands/skills/validate-command.d.ts.map +1 -1
  88. package/dist/commands/skills/validate-command.js +22 -6
  89. package/dist/commands/skills/validate-command.js.map +1 -1
  90. package/dist/commands/skills/validate.d.ts +44 -3
  91. package/dist/commands/skills/validate.d.ts.map +1 -1
  92. package/dist/commands/skills/validate.js +180 -46
  93. package/dist/commands/skills/validate.js.map +1 -1
  94. package/dist/commands/validate.d.ts +18 -0
  95. package/dist/commands/validate.d.ts.map +1 -1
  96. package/dist/commands/validate.js +73 -66
  97. package/dist/commands/validate.js.map +1 -1
  98. package/dist/commands/verify.d.ts +38 -1
  99. package/dist/commands/verify.d.ts.map +1 -1
  100. package/dist/commands/verify.js +203 -83
  101. package/dist/commands/verify.js.map +1 -1
  102. package/dist/index.d.ts +1 -1
  103. package/dist/index.d.ts.map +1 -1
  104. package/dist/index.js +7 -1
  105. package/dist/index.js.map +1 -1
  106. package/dist/skill-resolution/index.d.ts +1 -1
  107. package/dist/skill-resolution/index.d.ts.map +1 -1
  108. package/dist/skill-resolution/index.js +1 -1
  109. package/dist/skill-resolution/index.js.map +1 -1
  110. package/dist/skill-resolution/packaging-config.d.ts +15 -2
  111. package/dist/skill-resolution/packaging-config.d.ts.map +1 -1
  112. package/dist/skill-resolution/packaging-config.js +39 -2
  113. package/dist/skill-resolution/packaging-config.js.map +1 -1
  114. package/dist/utils/command-error.d.ts +34 -1
  115. package/dist/utils/command-error.d.ts.map +1 -1
  116. package/dist/utils/command-error.js +32 -1
  117. package/dist/utils/command-error.js.map +1 -1
  118. package/dist/utils/help-loader.d.ts +6 -2
  119. package/dist/utils/help-loader.d.ts.map +1 -1
  120. package/dist/utils/help-loader.js +9 -16
  121. package/dist/utils/help-loader.js.map +1 -1
  122. package/dist/utils/issue-rendering.d.ts +88 -0
  123. package/dist/utils/issue-rendering.d.ts.map +1 -1
  124. package/dist/utils/issue-rendering.js +94 -0
  125. package/dist/utils/issue-rendering.js.map +1 -1
  126. package/dist/utils/output.d.ts +54 -5
  127. package/dist/utils/output.d.ts.map +1 -1
  128. package/dist/utils/output.js +111 -17
  129. package/dist/utils/output.js.map +1 -1
  130. package/dist/utils/relativize-paths.d.ts +45 -0
  131. package/dist/utils/relativize-paths.d.ts.map +1 -0
  132. package/dist/utils/relativize-paths.js +67 -0
  133. package/dist/utils/relativize-paths.js.map +1 -0
  134. package/dist/utils/resource-loader.d.ts +21 -2
  135. package/dist/utils/resource-loader.d.ts.map +1 -1
  136. package/dist/utils/resource-loader.js +85 -11
  137. package/dist/utils/resource-loader.js.map +1 -1
  138. package/dist/utils/skill-packaging-config.d.ts +22 -1
  139. package/dist/utils/skill-packaging-config.d.ts.map +1 -1
  140. package/dist/utils/skill-packaging-config.js +26 -0
  141. package/dist/utils/skill-packaging-config.js.map +1 -1
  142. package/dist/utils/verdict-helpers.d.ts +4 -3
  143. package/dist/utils/verdict-helpers.d.ts.map +1 -1
  144. package/dist/utils/verdict-helpers.js +6 -13
  145. package/dist/utils/verdict-helpers.js.map +1 -1
  146. package/docs/rag.md +9 -4
  147. package/docs/resources.md +30 -14
  148. package/docs/skills.md +9 -5
  149. package/package.json +12 -12
@@ -1 +1 @@
1
- {"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,K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YAClH,CAAC;YACD,OAAO,IAAI,CAAC,CAAC;YACb,kBAAkB,GAAG,CAAC,CAAC;QACzB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,wEAAwE;YACxE,wEAAwE;YACxE,yBAAyB;YACzB,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ;gBAAE,MAAM,KAAK,CAAC;YACpE,kBAAkB,EAAE,CAAC;YACrB,IAAI,kBAAkB,GAAG,UAAU,EAAE,CAAC;gBACpC,MAAM,IAAI,KAAK,CACb,kBAAkB,UAAU,sDAAsD,OAAO,OAAO,MAAM,CAAC,MAAM,8CAA8C,CAC5J,CAAC;YACJ,CAAC;YACD,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,eAAe,CAAC,IAAa;IAC3C,4EAA4E;IAC5E,wEAAwE;IACxE,4EAA4E;IAC5E,8EAA8E;IAC9E,2DAA2D;IAC3D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;QAChD,MAAM,EAAE,CAAC;QACT,SAAS,EAAE,GAAG;QACd,qBAAqB,EAAE,KAAK;KAC7B,CAAC,EAAE,CAAC,CAAC;AACR,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oBAAoB,CAClC,IAAY,EACZ,IAAY,EACZ,MAAc,EACd,QAAgB,EAChB,OAAe;IAEf,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,IAAI,IAAI,MAAM,KAAK,QAAQ,KAAK,OAAO,IAAI,CAAC,CAAC;AAC/E,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Re-basing report `path` values onto the run's single stated root.
3
+ *
4
+ * A report states its coordinate system ONCE — `root:` — and every `path`
5
+ * beneath it is relative to that. Producers keep absolute paths internally on
6
+ * purpose: an absolute path is the identity every internal map keys on (compat
7
+ * results, visited-path de-duplication, registry caches), and unlike a
8
+ * `location` it is trivially recoverable, since an absolute path plus a known
9
+ * root yields the relative form. Re-basing therefore happens once, at the
10
+ * document boundary, and this module is that one place.
11
+ *
12
+ * Deliberately NOT a deep walk over every `path`-named property: re-basing is
13
+ * not idempotent (`relative(root, someRelativeValue)` resolves the value
14
+ * against the process cwd and produces nonsense), so a helper that guesses
15
+ * which values are absolute would silently corrupt an already-relative one.
16
+ * The caller names the nested carriers it owns instead.
17
+ */
18
+ /** The minimum shape this module re-bases: anything carrying a `path`. */
19
+ export interface PathEntry {
20
+ path: string;
21
+ }
22
+ /**
23
+ * Re-base one absolute path onto `root`, as a forward-slashed relative path.
24
+ *
25
+ * Pointing a report AT a single resource makes that resource the root, which
26
+ * relativizes to the empty string. That is spelled `.` — the POSIX name for
27
+ * "the root itself" — so no consumer has to special-case a blank value, and
28
+ * `join(root, path)` still resolves.
29
+ */
30
+ export declare function relativizePath(absolutePath: string, root: string): string;
31
+ /**
32
+ * Re-base the `path` of every entry — and of every entry inside the nested
33
+ * carriers named by `nestedKeys`, at any depth — onto `root`.
34
+ *
35
+ * Returns new objects; the input is never mutated.
36
+ *
37
+ * @param entries - Report entries carrying absolute `path` values.
38
+ * @param root - The single root the document states.
39
+ * @param nestedKeys - Names of array-valued properties whose elements also
40
+ * carry an absolute `path` (audit passes `['linkedFiles']`). Omitting a
41
+ * carrier leaves its paths absolute, which is how a document ends up in two
42
+ * coordinate systems — so a producer that adds a carrier must name it here.
43
+ */
44
+ export declare function relativizePathEntries<T extends PathEntry>(entries: readonly T[], root: string, nestedKeys?: readonly string[]): T[];
45
+ //# sourceMappingURL=relativize-paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relativize-paths.d.ts","sourceRoot":"","sources":["../../src/utils/relativize-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,0EAA0E;AAC1E,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAGzE;AA+BD;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,SAAS,EACvD,OAAO,EAAE,SAAS,CAAC,EAAE,EACrB,IAAI,EAAE,MAAM,EACZ,UAAU,GAAE,SAAS,MAAM,EAAO,GACjC,CAAC,EAAE,CAEL"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Re-basing report `path` values onto the run's single stated root.
3
+ *
4
+ * A report states its coordinate system ONCE — `root:` — and every `path`
5
+ * beneath it is relative to that. Producers keep absolute paths internally on
6
+ * purpose: an absolute path is the identity every internal map keys on (compat
7
+ * results, visited-path de-duplication, registry caches), and unlike a
8
+ * `location` it is trivially recoverable, since an absolute path plus a known
9
+ * root yields the relative form. Re-basing therefore happens once, at the
10
+ * document boundary, and this module is that one place.
11
+ *
12
+ * Deliberately NOT a deep walk over every `path`-named property: re-basing is
13
+ * not idempotent (`relative(root, someRelativeValue)` resolves the value
14
+ * against the process cwd and produces nonsense), so a helper that guesses
15
+ * which values are absolute would silently corrupt an already-relative one.
16
+ * The caller names the nested carriers it owns instead.
17
+ */
18
+ import { issueLocation } from '@vibe-agent-toolkit/utils';
19
+ /**
20
+ * Re-base one absolute path onto `root`, as a forward-slashed relative path.
21
+ *
22
+ * Pointing a report AT a single resource makes that resource the root, which
23
+ * relativizes to the empty string. That is spelled `.` — the POSIX name for
24
+ * "the root itself" — so no consumer has to special-case a blank value, and
25
+ * `join(root, path)` still resolves.
26
+ */
27
+ export function relativizePath(absolutePath, root) {
28
+ const relative = issueLocation(absolutePath, root);
29
+ return relative === '' ? '.' : relative;
30
+ }
31
+ /** Whether an unknown value is shaped like something this module can re-base. */
32
+ function isPathEntry(value) {
33
+ return (typeof value === 'object' &&
34
+ value !== null &&
35
+ typeof value.path === 'string');
36
+ }
37
+ function relativizeEntry(entry, root, nestedKeys) {
38
+ const out = { ...entry, path: relativizePath(entry.path, root) };
39
+ // The nested carriers are named by the caller, so they are not on T's known
40
+ // keys; the bag view is the only way to reach them without demanding every
41
+ // caller widen its own result type.
42
+ const bag = out;
43
+ for (const key of nestedKeys) {
44
+ const nested = bag[key];
45
+ if (!Array.isArray(nested))
46
+ continue;
47
+ bag[key] = nested.map((item) => isPathEntry(item) ? relativizeEntry(item, root, nestedKeys) : item);
48
+ }
49
+ return out;
50
+ }
51
+ /**
52
+ * Re-base the `path` of every entry — and of every entry inside the nested
53
+ * carriers named by `nestedKeys`, at any depth — onto `root`.
54
+ *
55
+ * Returns new objects; the input is never mutated.
56
+ *
57
+ * @param entries - Report entries carrying absolute `path` values.
58
+ * @param root - The single root the document states.
59
+ * @param nestedKeys - Names of array-valued properties whose elements also
60
+ * carry an absolute `path` (audit passes `['linkedFiles']`). Omitting a
61
+ * carrier leaves its paths absolute, which is how a document ends up in two
62
+ * coordinate systems — so a producer that adds a carrier must name it here.
63
+ */
64
+ export function relativizePathEntries(entries, root, nestedKeys = []) {
65
+ return entries.map((entry) => relativizeEntry(entry, root, nestedKeys));
66
+ }
67
+ //# sourceMappingURL=relativize-paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relativize-paths.js","sourceRoot":"","sources":["../../src/utils/relativize-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAO1D;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,YAAoB,EAAE,IAAY;IAC/D,MAAM,QAAQ,GAAG,aAAa,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IACnD,OAAO,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC1C,CAAC;AAED,iFAAiF;AACjF,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,OAAQ,KAA4B,CAAC,IAAI,KAAK,QAAQ,CACvD,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CACtB,KAAQ,EACR,IAAY,EACZ,UAA6B;IAE7B,MAAM,GAAG,GAAG,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;IACjE,4EAA4E;IAC5E,2EAA2E;IAC3E,oCAAoC;IACpC,MAAM,GAAG,GAAG,GAAyC,CAAC;IACtD,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAC7B,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QACxB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;YAAE,SAAS;QACrC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,IAAa,EAAE,EAAE,CACtC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CACnE,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAqB,EACrB,IAAY,EACZ,aAAgC,EAAE;IAElC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC;AAC1E,CAAC"}
@@ -11,6 +11,18 @@ export interface ResourceLoadResult {
11
11
  registry: ResourceRegistry;
12
12
  gitTracker: GitTracker | undefined;
13
13
  }
14
+ /**
15
+ * Scope resource include patterns to a subdirectory of the crawl base.
16
+ *
17
+ * Pure, and exported so the scoping rule is testable without a filesystem.
18
+ * `relDir` is base-relative with forward slashes; `''` means "the base itself",
19
+ * for which the patterns are already correctly scoped.
20
+ *
21
+ * The patterns in {@link DEFAULT_RESOURCE_INCLUDE} are all `**`-rooted, so
22
+ * prefixing is enough: picomatch's `**` matches zero segments, meaning
23
+ * `docs/**\/*.md` still matches `docs/a.md`.
24
+ */
25
+ export declare function scopeIncludeToSubtree(include: readonly string[], relDir: string): string[];
14
26
  /**
15
27
  * Load resources from a path with config support
16
28
  *
@@ -20,8 +32,15 @@ export interface ResourceLoadResult {
20
32
  * 3. Create registry and crawl
21
33
  *
22
34
  * Behavior:
23
- * - When path argument provided: use as baseDir, ignore config patterns (use defaults)
24
- * - When no path argument: use project root as baseDir, apply config patterns
35
+ * - When no path argument: crawl the project root, applying the config's
36
+ * `resources.include` and `resources.exclude` patterns.
37
+ * - When a path argument is provided: still crawl on the project-root basis (so
38
+ * the config's root-relative globs remain meaningful), with `include` replaced
39
+ * by the default resource patterns scoped to that subtree and the config's
40
+ * `exclude` still applied. A path argument says WHICH tree to scan; it does
41
+ * not license scanning files the project excluded.
42
+ * - When the path argument lies outside the project root, the config's patterns
43
+ * describe a different tree: they are dropped, with a warning.
25
44
  *
26
45
  * Per CLI-boundary rule (spec §5): `projectRoot` MUST be resolved by the
27
46
  * caller using one of the policy helpers in `project-root-policy.ts`. This
@@ -1 +1 @@
1
- {"version":3,"file":"resource-loader.d.ts","sourceRoot":"","sources":["../../src/utils/resource-loader.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,gBAAgB,EAChB,KAAK,aAAa,EAEnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,aAAa,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,UAAU,GAAG,SAAS,CAAC;CACpC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,kBAAkB,CAAC,CA2D7B"}
1
+ {"version":3,"file":"resource-loader.d.ts","sourceRoot":"","sources":["../../src/utils/resource-loader.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAEL,gBAAgB,EAEhB,KAAK,aAAa,EAEnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAA4B,MAAM,2BAA2B,CAAC;AAGjF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,aAAa,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,UAAU,GAAG,SAAS,CAAC;CACpC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAK1F;AAkED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,kBAAkB,CAAC,CAuD7B"}
@@ -1,9 +1,79 @@
1
1
  /**
2
2
  * Utilities for loading and crawling resources
3
3
  */
4
- import { ResourceRegistry, } from '@vibe-agent-toolkit/resources';
5
- import { GitTracker } from '@vibe-agent-toolkit/utils';
4
+ import { existsSync, statSync } from 'node:fs';
5
+ import { DEFAULT_RESOURCE_INCLUDE, ResourceRegistry, } from '@vibe-agent-toolkit/resources';
6
+ import { GitTracker, safePath, toForwardSlash } from '@vibe-agent-toolkit/utils';
6
7
  import { loadConfig } from './config-loader.js';
8
+ /**
9
+ * Scope resource include patterns to a subdirectory of the crawl base.
10
+ *
11
+ * Pure, and exported so the scoping rule is testable without a filesystem.
12
+ * `relDir` is base-relative with forward slashes; `''` means "the base itself",
13
+ * for which the patterns are already correctly scoped.
14
+ *
15
+ * The patterns in {@link DEFAULT_RESOURCE_INCLUDE} are all `**`-rooted, so
16
+ * prefixing is enough: picomatch's `**` matches zero segments, meaning
17
+ * `docs/**\/*.md` still matches `docs/a.md`.
18
+ */
19
+ export function scopeIncludeToSubtree(include, relDir) {
20
+ if (relDir === '') {
21
+ return [...include];
22
+ }
23
+ return include.map((pattern) => `${relDir}/${pattern}`);
24
+ }
25
+ /**
26
+ * Build the crawl options for an explicit path argument.
27
+ *
28
+ * The path argument RESTATES which tree to scan; it does not license scanning
29
+ * files the project has declared out of bounds. So `exclude` — a "never treat
30
+ * this as a resource" statement about node_modules, build output, vendored
31
+ * trees, and deliberately-broken test fixtures — is applied either way, while
32
+ * the path replaces `include`.
33
+ *
34
+ * That is only expressible by keeping `baseDir` at the project root: config
35
+ * globs are declared relative to the project root, so re-basing the crawl onto
36
+ * the path argument (the previous behavior) silently voided every one of them.
37
+ * Instead the path argument becomes an include PREFIX on the same basis.
38
+ */
39
+ function crawlOptionsForPath(pathArg, projectRoot, config, logger) {
40
+ const resolved = safePath.resolve(pathArg);
41
+ // safePath.relative already normalizes, but toForwardSlash makes the
42
+ // separator assumption in the `../` test below explicit on Windows too.
43
+ const normalizedRelDir = toForwardSlash(safePath.relative(projectRoot, resolved));
44
+ if (normalizedRelDir === '..' || normalizedRelDir.startsWith('../')) {
45
+ // Outside the project root, so the config's root-relative globs describe a
46
+ // different tree and genuinely cannot apply. Say so rather than dropping
47
+ // them silently — silent dropping is the bug this function exists to fix.
48
+ logger.warn(`${resolved} is outside projectRoot ${projectRoot}; ` +
49
+ `resources include/exclude patterns from the config do not apply to it`);
50
+ return { baseDir: resolved };
51
+ }
52
+ assertCrawlableDirectory(resolved);
53
+ return {
54
+ baseDir: projectRoot,
55
+ include: scopeIncludeToSubtree(DEFAULT_RESOURCE_INCLUDE, normalizedRelDir),
56
+ ...(config?.resources?.exclude ? { exclude: config.resources.exclude } : {}),
57
+ };
58
+ }
59
+ /**
60
+ * Fail loudly on a path argument that cannot be crawled.
61
+ *
62
+ * The crawler used to perform this check itself, because it received the path
63
+ * argument as its `baseDir`. Now that `baseDir` is the project root, a bad path
64
+ * argument would otherwise degrade into a glob that matches nothing — a green
65
+ * run reporting `filesScanned: 0`.
66
+ */
67
+ function assertCrawlableDirectory(resolved) {
68
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- CLI path argument, resolved above
69
+ if (!existsSync(resolved)) {
70
+ throw new Error(`Path does not exist: ${resolved}`);
71
+ }
72
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- CLI path argument, existence checked above
73
+ if (!statSync(resolved).isDirectory()) {
74
+ throw new Error(`Path is not a directory: ${resolved}`);
75
+ }
76
+ }
7
77
  /**
8
78
  * Load resources from a path with config support
9
79
  *
@@ -13,8 +83,15 @@ import { loadConfig } from './config-loader.js';
13
83
  * 3. Create registry and crawl
14
84
  *
15
85
  * Behavior:
16
- * - When path argument provided: use as baseDir, ignore config patterns (use defaults)
17
- * - When no path argument: use project root as baseDir, apply config patterns
86
+ * - When no path argument: crawl the project root, applying the config's
87
+ * `resources.include` and `resources.exclude` patterns.
88
+ * - When a path argument is provided: still crawl on the project-root basis (so
89
+ * the config's root-relative globs remain meaningful), with `include` replaced
90
+ * by the default resource patterns scoped to that subtree and the config's
91
+ * `exclude` still applied. A path argument says WHICH tree to scan; it does
92
+ * not license scanning files the project excluded.
93
+ * - When the path argument lies outside the project root, the config's patterns
94
+ * describe a different tree: they are dropped, with a warning.
18
95
  *
19
96
  * Per CLI-boundary rule (spec §5): `projectRoot` MUST be resolved by the
20
97
  * caller using one of the policy helpers in `project-root-policy.ts`. This
@@ -48,14 +125,11 @@ export async function loadResourcesWithConfig(pathArg, projectRoot, logger) {
48
125
  const registry = new ResourceRegistry(registryOptions);
49
126
  let crawlOptions;
50
127
  if (pathArg) {
51
- // Path argument provided: crawl from that directory with default patterns
52
- // Ignore config patterns because they're relative to project root
128
+ // Path argument provided: narrow the scan to that subtree, but keep the
129
+ // project's exclude patterns — see crawlOptionsForPath.
53
130
  logger.debug(`Path argument provided: ${pathArg}`);
54
- logger.debug('Using default patterns (ignoring config)');
55
- crawlOptions = {
56
- baseDir: pathArg,
57
- // Use defaults from ResourceRegistry.crawl (will use **/*.md)
58
- };
131
+ crawlOptions = crawlOptionsForPath(pathArg, projectRoot, config, logger);
132
+ logger.debug(`Crawling ${crawlOptions.baseDir} with include: ${JSON.stringify(crawlOptions.include)}`);
59
133
  }
60
134
  else {
61
135
  // No path argument: crawl from projectRoot with config patterns
@@ -1 +1 @@
1
- {"version":3,"file":"resource-loader.js","sourceRoot":"","sources":["../../src/utils/resource-loader.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,gBAAgB,GAGjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAWhD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,OAA2B,EAC3B,WAAmB,EACnB,MAAc;IAEd,yDAAyD;IACzD,MAAM,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IAEvC,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,CAAC,KAAK,CAAC,sBAAsB,WAAW,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,yEAAyE;IACzE,MAAM,UAAU,GAAG,IAA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AAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC7E,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAEnC,OAAO;QACL,QAAQ,EAAE,OAAO,IAAI,WAAW;QAChC,WAAW;QACX,MAAM;QACN,QAAQ;QACR,UAAU;KACX,CAAC;AACJ,CAAC"}
@@ -9,7 +9,8 @@
9
9
  * Most fields are a shallow override: a per-skill value replaces the default
10
10
  * outright. `files:` is the exception — see below.
11
11
  */
12
- import { type SkillPackagingConfig } from '@vibe-agent-toolkit/agent-skills';
12
+ import { type DeclaredEvalSuite, type SkillPackagingConfig } from '@vibe-agent-toolkit/agent-skills';
13
+ import type { SkillsConfig } from '@vibe-agent-toolkit/resources';
13
14
  /**
14
15
  * Merge defaults with per-skill overrides, dropping undefined values.
15
16
  *
@@ -25,4 +26,24 @@ import { type SkillPackagingConfig } from '@vibe-agent-toolkit/agent-skills';
25
26
  * the build did — the exact class of divergence this module exists to prevent.
26
27
  */
27
28
  export declare function mergeSkillPackagingConfig(defaults: Record<string, unknown> | undefined, perSkillOverrides: Record<string, unknown> | undefined): SkillPackagingConfig;
29
+ /**
30
+ * The PROJECT's declared eval suites: one {@link DeclaredEvalSuite} per discovered
31
+ * skill, from the same discovery + merge every lane already runs.
32
+ *
33
+ * Test input never ships, and that rule is project-wide rather than per-skill — a file
34
+ * ANY skill declares as its eval suite is an answer key, and no other skill's bundle may
35
+ * carry it. Every lane that packages or models a bundle therefore needs the whole
36
+ * project's declarations, not just the subject's.
37
+ *
38
+ * Build this ONCE per invocation, from the UNFILTERED discovery, and pass the same array
39
+ * down to every skill:
40
+ * - unfiltered, because `--skill x` narrows what is BUILT, never what counts as test
41
+ * input; a suite excluded from the run is still an answer key;
42
+ * - once, because assembling it per skill would walk the project's whole skills config
43
+ * inside a per-skill loop — a per-item cost against whole-corpus work.
44
+ */
45
+ export declare function collectDeclaredEvalSuites(skillsConfig: SkillsConfig | undefined, discovered: ReadonlyArray<{
46
+ name: string;
47
+ sourcePath: string;
48
+ }>): DeclaredEvalSuite[];
28
49
  //# sourceMappingURL=skill-packaging-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"skill-packaging-config.d.ts","sourceRoot":"","sources":["../../src/utils/skill-packaging-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAoB,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAE/F;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC7C,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACrD,oBAAoB,CAmBtB"}
1
+ {"version":3,"file":"skill-packaging-config.d.ts","sourceRoot":"","sources":["../../src/utils/skill-packaging-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAoB,KAAK,iBAAiB,EAAE,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACvH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAGlE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC7C,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACrD,oBAAoB,CAmBtB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,YAAY,GAAG,SAAS,EACtC,UAAU,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,GAC9D,iBAAiB,EAAE,CAUrB"}
@@ -10,6 +10,7 @@
10
10
  * outright. `files:` is the exception — see below.
11
11
  */
12
12
  import { mergeFilesConfig } from '@vibe-agent-toolkit/agent-skills';
13
+ import { safePath } from '@vibe-agent-toolkit/utils';
13
14
  /**
14
15
  * Merge defaults with per-skill overrides, dropping undefined values.
15
16
  *
@@ -42,4 +43,29 @@ export function mergeSkillPackagingConfig(defaults, perSkillOverrides) {
42
43
  }
43
44
  return packagingConfig;
44
45
  }
46
+ /**
47
+ * The PROJECT's declared eval suites: one {@link DeclaredEvalSuite} per discovered
48
+ * skill, from the same discovery + merge every lane already runs.
49
+ *
50
+ * Test input never ships, and that rule is project-wide rather than per-skill — a file
51
+ * ANY skill declares as its eval suite is an answer key, and no other skill's bundle may
52
+ * carry it. Every lane that packages or models a bundle therefore needs the whole
53
+ * project's declarations, not just the subject's.
54
+ *
55
+ * Build this ONCE per invocation, from the UNFILTERED discovery, and pass the same array
56
+ * down to every skill:
57
+ * - unfiltered, because `--skill x` narrows what is BUILT, never what counts as test
58
+ * input; a suite excluded from the run is still an answer key;
59
+ * - once, because assembling it per skill would walk the project's whole skills config
60
+ * inside a per-skill loop — a per-item cost against whole-corpus work.
61
+ */
62
+ export function collectDeclaredEvalSuites(skillsConfig, discovered) {
63
+ if (skillsConfig === undefined)
64
+ return [];
65
+ const { defaults, config: perSkillConfig } = skillsConfig;
66
+ return discovered.map((skill) => ({
67
+ skillDir: safePath.resolve(skill.sourcePath, '..'),
68
+ config: mergeSkillPackagingConfig(defaults, perSkillConfig?.[skill.name]),
69
+ }));
70
+ }
45
71
  //# sourceMappingURL=skill-packaging-config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"skill-packaging-config.js","sourceRoot":"","sources":["../../src/utils/skill-packaging-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,gBAAgB,EAA6B,MAAM,kCAAkC,CAAC;AAE/F;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,yBAAyB,CACvC,QAA6C,EAC7C,iBAAsD;IAEtD,MAAM,MAA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,EAAE,CAAC;QAClD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACvB,eAA2C,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAC5D,CAAC;IACH,CAAC;IAED,MAAM,YAAY,GAAG,QAAQ,EAAE,CAAC,OAAO,CAAkC,CAAC;IAC1E,MAAM,aAAa,GAAG,iBAAiB,EAAE,CAAC,OAAO,CAAkC,CAAC;IACpF,IAAI,YAAY,KAAK,SAAS,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;QAC9D,MAAM,WAAW,GAAG,gBAAgB,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;QAClE,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,eAAe,CAAC,KAAK,GAAG,WAAW,CAAC;QACtC,CAAC;IACH,CAAC;IAED,OAAO,eAAe,CAAC;AACzB,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,yBAAyB,CACvC,YAAsC,EACtC,UAA+D;IAE/D,IAAI,YAAY,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IAC1C,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,YAAY,CAAC;IAC1D,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAChC,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,IAAI,CAAC;QAClD,MAAM,EAAE,yBAAyB,CAC/B,QAA+C,EAC/C,cAAc,EAAE,CAAC,KAAK,CAAC,IAAI,CAAwC,CACpE;KACF,CAAC,CAAC,CAAC;AACN,CAAC"}
@@ -41,9 +41,10 @@ export declare function computeConfigVerdicts(observations: readonly Observation
41
41
  * Mutate a PackagingValidationResult in place to include compat verdicts
42
42
  * derived from the result's observations and the configured targets.
43
43
  *
44
- * Verdict issues land in `allErrors` and the appropriate active bucket
45
- * based on resolved severity (warning → activeWarnings; info stays only
46
- * in allErrors). Verdicts are not allow-filterable.
44
+ * Verdict issues land in `allErrors`, which is the sole container for every
45
+ * emitted issue regardless of severity — callers derive the active partition
46
+ * with `activeErrorsOf` / `activeWarningsOf` rather than reading a second
47
+ * pre-filtered copy. Verdicts are not allow-filterable.
47
48
  */
48
49
  export declare function applyConfigVerdicts(result: PackagingValidationResult, configTargets: ReadonlyArray<Target> | undefined, skillSourcePath: string, locationRoot: string): void;
49
50
  //# sourceMappingURL=verdict-helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"verdict-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/verdict-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,yBAAyB,EAC/B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,OAAO,EACb,MAAM,wCAAwC,CAAC;AAGhD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,eAAe,CAUlF;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,SAAS,WAAW,EAAE,EACpC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,EAChD,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,GACnB,eAAe,EAAE,CAkBnB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,yBAAyB,EACjC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,EAChD,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,GACnB,IAAI,CAqBN"}
1
+ {"version":3,"file":"verdict-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/verdict-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,yBAAyB,EAC/B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,OAAO,EACb,MAAM,wCAAwC,CAAC;AAGhD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,eAAe,CAUlF;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,SAAS,WAAW,EAAE,EACpC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,EAChD,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,GACnB,eAAe,EAAE,CAkBnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,yBAAyB,EACjC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,EAChD,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,GACnB,IAAI,CAcN"}
@@ -66,25 +66,18 @@ export function computeConfigVerdicts(observations, configTargets, skillSourcePa
66
66
  * Mutate a PackagingValidationResult in place to include compat verdicts
67
67
  * derived from the result's observations and the configured targets.
68
68
  *
69
- * Verdict issues land in `allErrors` and the appropriate active bucket
70
- * based on resolved severity (warning → activeWarnings; info stays only
71
- * in allErrors). Verdicts are not allow-filterable.
69
+ * Verdict issues land in `allErrors`, which is the sole container for every
70
+ * emitted issue regardless of severity — callers derive the active partition
71
+ * with `activeErrorsOf` / `activeWarningsOf` rather than reading a second
72
+ * pre-filtered copy. Verdicts are not allow-filterable.
72
73
  */
73
74
  export function applyConfigVerdicts(result, configTargets, skillSourcePath, locationRoot) {
74
75
  const verdictIssues = computeConfigVerdicts(result.observations, configTargets, skillSourcePath, locationRoot);
75
76
  if (verdictIssues.length === 0) {
76
77
  return;
77
78
  }
78
- for (const issue of verdictIssues) {
79
- result.allErrors.push(issue);
80
- if (issue.severity === 'error') {
81
- result.activeErrors.push(issue);
82
- }
83
- else if (issue.severity === 'warning') {
84
- result.activeWarnings.push(issue);
85
- }
86
- }
87
- if (result.activeErrors.length > 0) {
79
+ result.allErrors.push(...verdictIssues);
80
+ if (result.allErrors.some(issue => issue.severity === 'error')) {
88
81
  result.status = 'error';
89
82
  }
90
83
  }
@@ -1 +1 @@
1
- {"version":3,"file":"verdict-helpers.js","sourceRoot":"","sources":["../../src/utils/verdict-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,aAAa,EAAwB,MAAM,kCAAkC,CAAC;AAKvF,OAAO,EACL,eAAe,EACf,uBAAuB,GAGxB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,OAAgB,EAAE,QAAgB;IAC/D,MAAM,KAAK,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,OAAO;QACL,QAAQ,EAAE,KAAK,CAAC,eAAe;QAC/B,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,QAAQ;QACR,GAAG,EAAE,KAAK,CAAC,GAAG;QACd,SAAS,EAAE,KAAK,CAAC,SAAS;KAC3B,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,qBAAqB,CACnC,YAAoC,EACpC,aAAgD,EAChD,eAAuB,EACvB,YAAoB;IAEpB,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;QAC/C,aAAa,EAAE,aAAa,KAAK,SAAS,C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E,YAAY,CAAC,CAAC;IAC9D,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;AACxD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAAiC,EACjC,aAAgD,EAChD,eAAuB,EACvB,YAAoB;IAEpB,MAAM,aAAa,GAAG,qBAAqB,CACzC,MAAM,CAAC,YAAY,EACnB,aAAa,EACb,eAAe,EACf,YAAY,CACb,CAAC;IACF,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/B,OAAO;IACT,CAAC;IACD,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC;IACxC,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,EAAE,CAAC;QAC/D,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC;IAC1B,CAAC;AACH,CAAC"}
package/docs/rag.md CHANGED
@@ -36,10 +36,15 @@ vat rag clear
36
36
  5. Supports incremental updates (skips files with unchanged content)
37
37
 
38
38
  **Path Argument Behavior:**
39
- - `[path]` specifies the **base directory** to start crawling from
40
- - Recursively finds all `*.md` files under that directory (default pattern: `**/*.md`)
41
- - When path is specified, **config patterns are ignored** (to avoid pattern conflicts)
42
- - To use config patterns, run without path argument: `vat rag index`
39
+ - `[path]` restricts the crawl to that subtree of the project
40
+ - Recursively finds all `*.md` / `*.html` files under that directory
41
+ - The path **replaces** the config's `resources.include` patterns
42
+ - The config's `resources.exclude` patterns **still apply**, so a path run never
43
+ indexes build output or vendored trees the project excluded
44
+ - If the path lies outside the project root the config's patterns cannot apply;
45
+ they are dropped and a warning is printed
46
+ - To index the project's full configured set, run without a path argument:
47
+ `vat rag index`
43
48
 
44
49
  **Options:**
45
50
  - `[path]` - Base directory to crawl (defaults to current directory)
package/docs/resources.md CHANGED
@@ -18,14 +18,19 @@ including link integrity checking and anchor validation.
18
18
  4. Exits 0 always (informational only)
19
19
 
20
20
  **Path Argument:**
21
- - `[path]` specifies the **base directory** to start crawling from
22
- - Recursively finds all `*.md` files under that directory (default pattern: `**/*.md`)
23
- - When path is specified, **config patterns are ignored** (to avoid pattern conflicts)
24
- - To use config patterns, run without path argument: `vat resources scan`
21
+ - `[path]` restricts the scan to that subtree of the project
22
+ - Recursively finds all `*.md` / `*.html` files under that directory
23
+ - The path **replaces** the config's `resources.include` patterns
24
+ - The config's `resources.exclude` patterns **still apply** — a path run never
25
+ scans build output, vendored trees, or test fixtures the project excluded
26
+ - To scan the project's full configured set, run without a path argument:
27
+ `vat resources scan`
25
28
 
26
29
  **Options:**
27
30
  - `[path]` - Base directory to crawl (defaults to current directory)
28
31
  - `--debug` - Enable debug logging
32
+ - `--verbose` - Add a `files:` list with per-file link/anchor counts and checksums
33
+ - `--collection <id>` - Only report files in the named collection (config mode — no path argument)
29
34
 
30
35
  **Exit Codes:**
31
36
  - `0` - Always (scan is informational)
@@ -33,23 +38,28 @@ including link integrity checking and anchor validation.
33
38
 
34
39
  **Output:** YAML on stdout, logs on stderr
35
40
 
41
+ `root` is stated once and is the only absolute path in the document; every
42
+ `path` beneath it is relative to it.
43
+
36
44
  **Example:**
37
45
  ```bash
38
46
  # Recursively scan all *.md files under docs/
39
- vat resources scan docs/
47
+ vat resources scan docs/ --verbose
40
48
  # Equivalent to: find all files matching docs/**/*.md pattern
41
49
 
42
50
  # Output:
43
51
  # ---
44
52
  # status: success
53
+ # root: /home/you/my-project
45
54
  # filesScanned: 12
46
55
  # linksFound: 47
47
56
  # anchorsFound: 23
57
+ # durationSecs: 0.234
48
58
  # files:
49
59
  # - path: docs/README.md
50
60
  # links: 5
51
61
  # anchors: 3
52
- # duration: 234ms
62
+ # checksum: 47dd7b50af765df240fe2514f029fc697c907fc37a3267e22060f2f9f611975c
53
63
  # ---
54
64
  ```
55
65
 
@@ -78,14 +88,21 @@ for the loud-cwd fallback policy and the projectRoot discovery ladder.
78
88
  4. Exits 0 if valid, 1 if errors found
79
89
 
80
90
  **Path Argument:**
81
- - `[path]` specifies the **base directory** to start crawling from
82
- - Recursively finds all `*.md` files under that directory (default pattern: `**/*.md`)
83
- - When path is specified, **config patterns are ignored** (to avoid pattern conflicts)
84
- - To use config patterns, run without path argument: `vat resources validate`
91
+ - `[path]` restricts the scan to that subtree of the project
92
+ - Recursively finds all `*.md` / `*.html` files under that directory
93
+ - The path **replaces** the config's `resources.include` patterns
94
+ - The config's `resources.exclude` patterns **still apply** — a path run never
95
+ scans build output, vendored trees, or test fixtures the project excluded
96
+ - To scan the project's full configured set, run without a path argument:
97
+ `vat resources validate`
85
98
 
86
99
  **Options:**
87
100
  - `[path]` - Base directory to crawl (defaults to current directory)
88
101
  - `--debug` - Enable debug logging
102
+ - `-v, --verbose` - Show all scanned resources, including those without issues. By
103
+ default `issues` carries one counts-only row per file with findings
104
+ (`{file, errors?, warnings?, info?, codes}`); `--verbose` replaces each row with
105
+ its per-issue detail. Every other output field is identical in both modes.
89
106
  - `--no-check-frontmatter-links` - Skip frontmatter URI-reference link validation across all collections (default: enabled)
90
107
 
91
108
  **Exit Codes:**
@@ -108,8 +125,7 @@ vat resources validate docs/
108
125
  # status: success
109
126
  # filesScanned: 12
110
127
  # linksChecked: 47
111
- # anchorsChecked: 23
112
- # duration: 456ms
128
+ # durationSecs: 0.456
113
129
  # ---
114
130
  ```
115
131
 
@@ -123,7 +139,7 @@ vat resources validate docs/
123
139
 
124
140
  # stdout:
125
141
  # ---
126
- # status: failed
142
+ # status: error
127
143
  # errorsFound: 2
128
144
  # filesWithErrors: 2
129
145
  # issueCounts: { errors: 2, warnings: 0, info: 0 }
@@ -136,7 +152,7 @@ vat resources validate docs/
136
152
  # code: LINK_BROKEN_FILE
137
153
  # severity: error
138
154
  # message: Link target not found: ./missing.md
139
- # duration: 456ms
155
+ # durationSecs: 0.456
140
156
  # ---
141
157
  ```
142
158
 
package/docs/skills.md CHANGED
@@ -362,11 +362,14 @@ to override (single-skill sources only).
362
362
  | `windsurf` | `~/.codeium/windsurf/skills/` | `.windsurf/skills/` |
363
363
  | `agents` | `~/.agents/skills/` | `.agents/skills/` |
364
364
 
365
- These paths were last reviewed against vendor conventions on 2026-04-08 and are
366
- not verified at build or test time — the tests assert the table's shape, never
367
- that a path is where a platform actually looks. If a vendor moves its convention,
368
- installs land somewhere unread and every VAT check still passes. Re-check the
369
- vendor's documentation before relying on a non-`claude` target.
365
+ These paths were last reviewed against each platform's own published docs on
366
+ 2026-07-30 (all fourteen unchanged) and are not verified at build or test time.
367
+ The tests derive their expectations from the table and assert invariants of it —
368
+ every target present, both scopes relative and forward-slash only, and that the
369
+ resolver composes base + relative path. No test can check that a path is where a
370
+ platform actually looks. If a vendor moves its convention, installs land
371
+ somewhere unread and every VAT check still passes. Re-check the vendor's
372
+ documentation before relying on a non-`claude` target.
370
373
 
371
374
  **Visibility:** VAT's own inspection commands are Claude-scoped — `vat skills
372
375
  list --user` and `vat audit --user` read `~/.claude` only. A skill installed to
@@ -495,6 +498,7 @@ only when the `SKILL.md` declares none.
495
498
  **Output Format:**
496
499
  ```yaml
497
500
  status: success
501
+ root: /abs/path/to/project
498
502
  context: project | user
499
503
  skillsFound: 3
500
504
  skills: