@vibe-agent-toolkit/cli 0.1.41-rc.6 → 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 (199) hide show
  1. package/README.md +4 -3
  2. package/dist/bin/vat +25 -2
  3. package/dist/bin/vat.js +25 -2
  4. package/dist/bin/vat.js.map +1 -1
  5. package/dist/bin.js +12 -1
  6. package/dist/bin.js.map +1 -1
  7. package/dist/commands/agent/list.d.ts +11 -0
  8. package/dist/commands/agent/list.d.ts.map +1 -1
  9. package/dist/commands/agent/list.js +30 -11
  10. package/dist/commands/agent/list.js.map +1 -1
  11. package/dist/commands/audit/hierarchical-output.d.ts +6 -2
  12. package/dist/commands/audit/hierarchical-output.d.ts.map +1 -1
  13. package/dist/commands/audit/hierarchical-output.js +93 -50
  14. package/dist/commands/audit/hierarchical-output.js.map +1 -1
  15. package/dist/commands/audit-settings.d.ts +35 -0
  16. package/dist/commands/audit-settings.d.ts.map +1 -1
  17. package/dist/commands/audit-settings.js +121 -51
  18. package/dist/commands/audit-settings.js.map +1 -1
  19. package/dist/commands/audit.d.ts +97 -2
  20. package/dist/commands/audit.d.ts.map +1 -1
  21. package/dist/commands/audit.js +505 -231
  22. package/dist/commands/audit.js.map +1 -1
  23. package/dist/commands/build.d.ts +14 -0
  24. package/dist/commands/build.d.ts.map +1 -1
  25. package/dist/commands/build.js +126 -32
  26. package/dist/commands/build.js.map +1 -1
  27. package/dist/commands/claude/marketplace/license-utils.d.ts +39 -2
  28. package/dist/commands/claude/marketplace/license-utils.d.ts.map +1 -1
  29. package/dist/commands/claude/marketplace/license-utils.js +114 -68
  30. package/dist/commands/claude/marketplace/license-utils.js.map +1 -1
  31. package/dist/commands/claude/marketplace/publish.js +5 -4
  32. package/dist/commands/claude/marketplace/publish.js.map +1 -1
  33. package/dist/commands/claude/marketplace/validate.d.ts +97 -0
  34. package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
  35. package/dist/commands/claude/marketplace/validate.js +157 -49
  36. package/dist/commands/claude/marketplace/validate.js.map +1 -1
  37. package/dist/commands/claude/org/skills.d.ts +11 -3
  38. package/dist/commands/claude/org/skills.d.ts.map +1 -1
  39. package/dist/commands/claude/org/skills.js +70 -20
  40. package/dist/commands/claude/org/skills.js.map +1 -1
  41. package/dist/commands/claude/org/stubs.d.ts +9 -1
  42. package/dist/commands/claude/org/stubs.d.ts.map +1 -1
  43. package/dist/commands/claude/org/stubs.js +11 -3
  44. package/dist/commands/claude/org/stubs.js.map +1 -1
  45. package/dist/commands/claude/plugin/build.d.ts +116 -0
  46. package/dist/commands/claude/plugin/build.d.ts.map +1 -1
  47. package/dist/commands/claude/plugin/build.js +173 -40
  48. package/dist/commands/claude/plugin/build.js.map +1 -1
  49. package/dist/commands/claude/plugin/marketplace-json.d.ts +36 -0
  50. package/dist/commands/claude/plugin/marketplace-json.d.ts.map +1 -0
  51. package/dist/commands/claude/plugin/marketplace-json.js +34 -0
  52. package/dist/commands/claude/plugin/marketplace-json.js.map +1 -0
  53. package/dist/commands/claude/plugin/plugin-json-merge.d.ts +30 -1
  54. package/dist/commands/claude/plugin/plugin-json-merge.d.ts.map +1 -1
  55. package/dist/commands/claude/plugin/plugin-json-merge.js +107 -14
  56. package/dist/commands/claude/plugin/plugin-json-merge.js.map +1 -1
  57. package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
  58. package/dist/commands/claude/plugin/tree-copy.js +0 -1
  59. package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
  60. package/dist/commands/corpus/report.d.ts +22 -4
  61. package/dist/commands/corpus/report.d.ts.map +1 -1
  62. package/dist/commands/corpus/report.js +1 -0
  63. package/dist/commands/corpus/report.js.map +1 -1
  64. package/dist/commands/corpus/runner.d.ts +16 -1
  65. package/dist/commands/corpus/runner.d.ts.map +1 -1
  66. package/dist/commands/corpus/runner.js +55 -48
  67. package/dist/commands/corpus/runner.js.map +1 -1
  68. package/dist/commands/doctor.d.ts +57 -8
  69. package/dist/commands/doctor.d.ts.map +1 -1
  70. package/dist/commands/doctor.js +142 -67
  71. package/dist/commands/doctor.js.map +1 -1
  72. package/dist/commands/inventory.d.ts +2 -0
  73. package/dist/commands/inventory.d.ts.map +1 -1
  74. package/dist/commands/inventory.js +45 -4
  75. package/dist/commands/inventory.js.map +1 -1
  76. package/dist/commands/phase-utils.d.ts +240 -11
  77. package/dist/commands/phase-utils.d.ts.map +1 -1
  78. package/dist/commands/phase-utils.js +352 -15
  79. package/dist/commands/phase-utils.js.map +1 -1
  80. package/dist/commands/rag/query-command.d.ts +40 -0
  81. package/dist/commands/rag/query-command.d.ts.map +1 -1
  82. package/dist/commands/rag/query-command.js +47 -20
  83. package/dist/commands/rag/query-command.js.map +1 -1
  84. package/dist/commands/resources/index.d.ts.map +1 -1
  85. package/dist/commands/resources/index.js +38 -13
  86. package/dist/commands/resources/index.js.map +1 -1
  87. package/dist/commands/resources/scan.d.ts +37 -0
  88. package/dist/commands/resources/scan.d.ts.map +1 -1
  89. package/dist/commands/resources/scan.js +47 -32
  90. package/dist/commands/resources/scan.js.map +1 -1
  91. package/dist/commands/resources/validate.d.ts +136 -1
  92. package/dist/commands/resources/validate.d.ts.map +1 -1
  93. package/dist/commands/resources/validate.js +121 -68
  94. package/dist/commands/resources/validate.js.map +1 -1
  95. package/dist/commands/skill/review.d.ts.map +1 -1
  96. package/dist/commands/skill/review.js +40 -23
  97. package/dist/commands/skill/review.js.map +1 -1
  98. package/dist/commands/skill/test/run.d.ts +1 -1
  99. package/dist/commands/skill/test/run.d.ts.map +1 -1
  100. package/dist/commands/skill/test/run.js +8 -6
  101. package/dist/commands/skill/test/run.js.map +1 -1
  102. package/dist/commands/skills/build.d.ts +140 -0
  103. package/dist/commands/skills/build.d.ts.map +1 -1
  104. package/dist/commands/skills/build.js +348 -94
  105. package/dist/commands/skills/build.js.map +1 -1
  106. package/dist/commands/skills/command-helpers.d.ts +6 -10
  107. package/dist/commands/skills/command-helpers.d.ts.map +1 -1
  108. package/dist/commands/skills/command-helpers.js +6 -22
  109. package/dist/commands/skills/command-helpers.js.map +1 -1
  110. package/dist/commands/skills/list.d.ts +18 -0
  111. package/dist/commands/skills/list.d.ts.map +1 -1
  112. package/dist/commands/skills/list.js +41 -15
  113. package/dist/commands/skills/list.js.map +1 -1
  114. package/dist/commands/skills/package.d.ts +17 -0
  115. package/dist/commands/skills/package.d.ts.map +1 -1
  116. package/dist/commands/skills/package.js +72 -43
  117. package/dist/commands/skills/package.js.map +1 -1
  118. package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
  119. package/dist/commands/skills/skill-discovery.js +9 -1
  120. package/dist/commands/skills/skill-discovery.js.map +1 -1
  121. package/dist/commands/skills/validate-command.d.ts.map +1 -1
  122. package/dist/commands/skills/validate-command.js +22 -6
  123. package/dist/commands/skills/validate-command.js.map +1 -1
  124. package/dist/commands/skills/validate.d.ts +79 -0
  125. package/dist/commands/skills/validate.d.ts.map +1 -1
  126. package/dist/commands/skills/validate.js +268 -79
  127. package/dist/commands/skills/validate.js.map +1 -1
  128. package/dist/commands/validate.d.ts +18 -0
  129. package/dist/commands/validate.d.ts.map +1 -1
  130. package/dist/commands/validate.js +79 -66
  131. package/dist/commands/validate.js.map +1 -1
  132. package/dist/commands/verify.d.ts +38 -1
  133. package/dist/commands/verify.d.ts.map +1 -1
  134. package/dist/commands/verify.js +247 -84
  135. package/dist/commands/verify.js.map +1 -1
  136. package/dist/index.d.ts +1 -1
  137. package/dist/index.d.ts.map +1 -1
  138. package/dist/index.js +7 -1
  139. package/dist/index.js.map +1 -1
  140. package/dist/skill-resolution/index.d.ts +1 -1
  141. package/dist/skill-resolution/index.d.ts.map +1 -1
  142. package/dist/skill-resolution/index.js +1 -1
  143. package/dist/skill-resolution/index.js.map +1 -1
  144. package/dist/skill-resolution/packaging-config.d.ts +15 -2
  145. package/dist/skill-resolution/packaging-config.d.ts.map +1 -1
  146. package/dist/skill-resolution/packaging-config.js +39 -2
  147. package/dist/skill-resolution/packaging-config.js.map +1 -1
  148. package/dist/utils/command-error.d.ts +34 -1
  149. package/dist/utils/command-error.d.ts.map +1 -1
  150. package/dist/utils/command-error.js +32 -1
  151. package/dist/utils/command-error.js.map +1 -1
  152. package/dist/utils/config-loader.d.ts.map +1 -1
  153. package/dist/utils/config-loader.js +0 -2
  154. package/dist/utils/config-loader.js.map +1 -1
  155. package/dist/utils/help-loader.d.ts +6 -2
  156. package/dist/utils/help-loader.d.ts.map +1 -1
  157. package/dist/utils/help-loader.js +9 -16
  158. package/dist/utils/help-loader.js.map +1 -1
  159. package/dist/utils/issue-anchor.d.ts +26 -0
  160. package/dist/utils/issue-anchor.d.ts.map +1 -0
  161. package/dist/utils/issue-anchor.js +39 -0
  162. package/dist/utils/issue-anchor.js.map +1 -0
  163. package/dist/utils/issue-rendering.d.ts +149 -0
  164. package/dist/utils/issue-rendering.d.ts.map +1 -0
  165. package/dist/utils/issue-rendering.js +229 -0
  166. package/dist/utils/issue-rendering.js.map +1 -0
  167. package/dist/utils/output.d.ts +80 -9
  168. package/dist/utils/output.d.ts.map +1 -1
  169. package/dist/utils/output.js +138 -23
  170. package/dist/utils/output.js.map +1 -1
  171. package/dist/utils/project-root-policy.d.ts +2 -2
  172. package/dist/utils/project-root-policy.js +2 -2
  173. package/dist/utils/relativize-paths.d.ts +45 -0
  174. package/dist/utils/relativize-paths.d.ts.map +1 -0
  175. package/dist/utils/relativize-paths.js +67 -0
  176. package/dist/utils/relativize-paths.js.map +1 -0
  177. package/dist/utils/resource-loader.d.ts +21 -2
  178. package/dist/utils/resource-loader.d.ts.map +1 -1
  179. package/dist/utils/resource-loader.js +85 -11
  180. package/dist/utils/resource-loader.js.map +1 -1
  181. package/dist/utils/skill-packaging-config.d.ts +22 -1
  182. package/dist/utils/skill-packaging-config.d.ts.map +1 -1
  183. package/dist/utils/skill-packaging-config.js +26 -0
  184. package/dist/utils/skill-packaging-config.js.map +1 -1
  185. package/dist/utils/validate-help-files.d.ts +3 -2
  186. package/dist/utils/validate-help-files.d.ts.map +1 -1
  187. package/dist/utils/validate-help-files.js +48 -5
  188. package/dist/utils/validate-help-files.js.map +1 -1
  189. package/dist/utils/verdict-helpers.d.ts +14 -5
  190. package/dist/utils/verdict-helpers.d.ts.map +1 -1
  191. package/dist/utils/verdict-helpers.js +19 -16
  192. package/dist/utils/verdict-helpers.js.map +1 -1
  193. package/docs/audit.md +40 -14
  194. package/docs/doctor.md +46 -10
  195. package/docs/index.md +1 -1
  196. package/docs/rag.md +9 -4
  197. package/docs/resources.md +54 -22
  198. package/docs/skills.md +11 -7
  199. package/package.json +12 -12
package/README.md CHANGED
@@ -92,10 +92,11 @@ vat doctor --verbose
92
92
  - CLI build status (in VAT source tree only)
93
93
 
94
94
  **Exit codes:**
95
- - `0` - All checks passed
95
+ - `0` - No check failed (an undetermined check is reported, not fatal)
96
96
  - `1` - One or more checks failed
97
97
 
98
- **Example output:**
98
+ **Example output** (`--verbose`; the concise view hides checks with nothing to
99
+ report and states how many it hid):
99
100
  ```
100
101
  🩺 vat doctor
101
102
 
@@ -119,7 +120,7 @@ Running diagnostic checks...
119
120
  ✅ vat version
120
121
  Current: 0.1.0 — up to date
121
122
 
122
- 📊 Results: 6/6 checks passed
123
+ 📊 Results: 6 checks — 6 passed, 0 failed, 0 undetermined, 0 skipped
123
124
 
124
125
  ✨ All checks passed! Your vat setup looks healthy.
125
126
  ```
package/dist/bin/vat CHANGED
@@ -18,7 +18,27 @@ import { spawnSync } from 'node:child_process';
18
18
  import { existsSync, readFileSync } from 'node:fs';
19
19
  import { dirname } from 'node:path';
20
20
  import { fileURLToPath } from 'node:url';
21
- import { findNodeWorkspaceRoot, safePath } from '@vibe-agent-toolkit/utils';
21
+ import { describeStdioBlocking, findNodeWorkspaceRoot, makeStdioBlocking, safePath, } from '@vibe-agent-toolkit/utils';
22
+ // Before ANY output. This file — not bin.ts — is what package.json maps `vat` to,
23
+ // so it is the CLI entry point in every installed copy, and `makeStdioBlocking`
24
+ // is documented as belonging first thing in one. The delegated child applies it
25
+ // again for the command's own output; what this protects is THIS process's
26
+ // writes, every one of which is followed by `spawnCli`'s immediate
27
+ // `process.exit`. See ../utils/output.ts.
28
+ const stdioBlocking = makeStdioBlocking();
29
+ /**
30
+ * Report whether the streams above actually went blocking.
31
+ *
32
+ * A free function rather than an inline `if` in `main()` because `main()` is
33
+ * already at the cognitive-complexity ceiling, and because reaching through an
34
+ * internal Node handle is precisely the kind of thing that can fail quietly on
35
+ * Windows — the diagnostic must not be the first thing dropped to save a branch.
36
+ */
37
+ function reportStdioBlocking(debug) {
38
+ if (debug) {
39
+ console.error(`[vat debug] ${describeStdioBlocking(stdioBlocking)}`);
40
+ }
41
+ }
22
42
  const __dirname = dirname(fileURLToPath(import.meta.url));
23
43
  function spawnCli(binPath, context, contextPath) {
24
44
  const env = {
@@ -106,11 +126,14 @@ function readVersion(packageJsonPath) {
106
126
  function main() {
107
127
  // VAT_TEST_ROOT: legacy test override that pins the project root to a
108
128
  // specific directory. Applied at the bin boundary so library code stays
109
- // pure. See docs/superpowers/specs/2026-05-17-root-model-and-leading-slash-design.md §7.
129
+ // pure — no library function reads this variable.
110
130
  const testRoot = process.env['VAT_TEST_ROOT'];
111
131
  const cwd = testRoot ? safePath.resolve(testRoot) : process.cwd();
112
132
  const args = process.argv.slice(2);
113
133
  const debug = process.env['VAT_DEBUG'] === '1';
134
+ // Reported here rather than in the block further down because every dispatch
135
+ // path below ends in `spawnCli`, which never returns.
136
+ reportStdioBlocking(debug);
114
137
  // Priority 1: Explicit override via VAT_ROOT_DIR
115
138
  if (process.env['VAT_ROOT_DIR']) {
116
139
  const binPath = safePath.join(process.env['VAT_ROOT_DIR'], 'packages/cli/dist/bin.js');
package/dist/bin/vat.js CHANGED
@@ -18,7 +18,27 @@ import { spawnSync } from 'node:child_process';
18
18
  import { existsSync, readFileSync } from 'node:fs';
19
19
  import { dirname } from 'node:path';
20
20
  import { fileURLToPath } from 'node:url';
21
- import { findNodeWorkspaceRoot, safePath } from '@vibe-agent-toolkit/utils';
21
+ import { describeStdioBlocking, findNodeWorkspaceRoot, makeStdioBlocking, safePath, } from '@vibe-agent-toolkit/utils';
22
+ // Before ANY output. This file — not bin.ts — is what package.json maps `vat` to,
23
+ // so it is the CLI entry point in every installed copy, and `makeStdioBlocking`
24
+ // is documented as belonging first thing in one. The delegated child applies it
25
+ // again for the command's own output; what this protects is THIS process's
26
+ // writes, every one of which is followed by `spawnCli`'s immediate
27
+ // `process.exit`. See ../utils/output.ts.
28
+ const stdioBlocking = makeStdioBlocking();
29
+ /**
30
+ * Report whether the streams above actually went blocking.
31
+ *
32
+ * A free function rather than an inline `if` in `main()` because `main()` is
33
+ * already at the cognitive-complexity ceiling, and because reaching through an
34
+ * internal Node handle is precisely the kind of thing that can fail quietly on
35
+ * Windows — the diagnostic must not be the first thing dropped to save a branch.
36
+ */
37
+ function reportStdioBlocking(debug) {
38
+ if (debug) {
39
+ console.error(`[vat debug] ${describeStdioBlocking(stdioBlocking)}`);
40
+ }
41
+ }
22
42
  const __dirname = dirname(fileURLToPath(import.meta.url));
23
43
  function spawnCli(binPath, context, contextPath) {
24
44
  const env = {
@@ -106,11 +126,14 @@ function readVersion(packageJsonPath) {
106
126
  function main() {
107
127
  // VAT_TEST_ROOT: legacy test override that pins the project root to a
108
128
  // specific directory. Applied at the bin boundary so library code stays
109
- // pure. See docs/superpowers/specs/2026-05-17-root-model-and-leading-slash-design.md §7.
129
+ // pure — no library function reads this variable.
110
130
  const testRoot = process.env['VAT_TEST_ROOT'];
111
131
  const cwd = testRoot ? safePath.resolve(testRoot) : process.cwd();
112
132
  const args = process.argv.slice(2);
113
133
  const debug = process.env['VAT_DEBUG'] === '1';
134
+ // Reported here rather than in the block further down because every dispatch
135
+ // path below ends in `spawnCli`, which never returns.
136
+ reportStdioBlocking(debug);
114
137
  // Priority 1: Explicit override via VAT_ROOT_DIR
115
138
  if (process.env['VAT_ROOT_DIR']) {
116
139
  const binPath = safePath.join(process.env['VAT_ROOT_DIR'], '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AC,KAAK,CAAC,6BAA6B,WAAW,EAAE,CAAC,CAAC;QAC1D,OAAO,CAAC,KAAK,CAAC,wBAAwB,OAAO,EAAE,CAAC,CAAC;QACjD,OAAO,CAAC,KAAK,CAAC,uBAAuB,OAAO,EAAE,CAAC,CAAC;QAChD,OAAO,CAAC,KAAK,CAAC,+BAA+B,aAAa,IAAI,SAAS,EAAE,CAAC,CAAC;QAC3E,OAAO,CAAC,KAAK,CAAC,8BAA8B,YAAY,IAAI,KAAK,EAAE,CAAC,CAAC;QACrE,OAAO,CAAC,KAAK,CAAC,qBAAqB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACvD,CAAC;IAED,sFAAsF;IACtF,MAAM,WAAW,GAAG,OAAO,KAAK,KAAK,IAAI,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;IACvF,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;AAC1C,CAAC;AAED,oBAAoB;AACpB,IAAI,EAAE,CAAC"}
package/dist/bin.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Main entry point for vat CLI
4
4
  * Uses Commander.js for command structure
5
5
  */
6
- import { safePath } from '@vibe-agent-toolkit/utils';
6
+ import { describeStdioBlocking, makeStdioBlocking, safePath } from '@vibe-agent-toolkit/utils';
7
7
  import { Command } from 'commander';
8
8
  import { createAgentCommand, showAgentVerboseHelp } from './commands/agent/index.js';
9
9
  import { createAuditCommand } from './commands/audit.js';
@@ -22,6 +22,17 @@ import { createVerifyTopLevelCommand } from './commands/verify.js';
22
22
  import { loadVerboseHelp, writeHelpSync } from './utils/help-loader.js';
23
23
  import { createLogger } from './utils/logger.js';
24
24
  import { version, getVersionString } from './version.js';
25
+ // Before ANY output: a piped stdio is non-blocking, and every command here exits
26
+ // the moment it finishes, so unflushed bytes would be discarded. See output.ts.
27
+ const stdioBlocking = makeStdioBlocking();
28
+ // Reported by hand rather than through the parsed `--debug` option because this
29
+ // has to run before Commander parses anything — the same reason the verbose-help
30
+ // checks below read process.argv directly. Reaching through an internal Node
31
+ // handle can fail silently, and a truncated report with no explanation is the
32
+ // exact failure this reporting exists to make diagnosable.
33
+ if (process.argv.includes('--debug')) {
34
+ process.stderr.write(`[DEBUG] ${describeStdioBlocking(stdioBlocking)}\n`);
35
+ }
25
36
  const program = new Command();
26
37
  // Context detection from environment
27
38
  const context = process.env['VAT_CONTEXT']
package/dist/bin.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACjG,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,6BAA6B,EAAE,MAAM,wB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AAmB,EAAE,CAAC,CAAC;AAE1C,uCAAuC;AACvC,OAAO,CAAC,UAAU,CAAC,0BAA0B,EAAE,CAAC,CAAC;AACjD,OAAO,CAAC,UAAU,CAAC,6BAA6B,EAAE,CAAC,CAAC;AACpD,OAAO,CAAC,UAAU,CAAC,2BAA2B,EAAE,CAAC,CAAC;AAElD,0BAA0B;AAC1B,aAAa,CAAC,OAAO,CAAC,CAAC;AAEvB,0BAA0B;AAC1B,OAAO,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,EAAE;IACnC,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAC9B,MAAM,CAAC,KAAK,CAAC,2BAA2B,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC;IAC7E,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACjB,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAChC,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,KAAK,EAAE,CAAC;AAEhB,SAAS,eAAe;IACtB,aAAa,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,+BAA+B;AACnE,CAAC"}
@@ -1,8 +1,19 @@
1
1
  /**
2
2
  * Agent list command - discovers and lists all agents
3
3
  */
4
+ import { type DiscoveredAgent } from '../../utils/agent-discovery.js';
4
5
  export interface ListCommandOptions {
5
6
  debug?: boolean;
6
7
  }
8
+ /**
9
+ * Build the agent-list payload.
10
+ *
11
+ * Pure, so the payload's shape — including the fact that `path` is root-relative
12
+ * — is under unit test rather than only under a CLI spawn. `root` is stated
13
+ * once and is the only absolute path in the document; without it a relative
14
+ * `path` is unresolvable, and with absolute paths the payload names the machine
15
+ * it ran on.
16
+ */
17
+ export declare function buildAgentListOutput(agents: readonly DiscoveredAgent[], root: string, durationMs: number): Record<string, unknown>;
7
18
  export declare function listCommand(options: ListCommandOptions): Promise<void>;
8
19
  //# sourceMappingURL=list.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/agent/list.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAsB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoC5E"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/agent/list.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAMtF,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AASD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,eAAe,EAAE,EAClC,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,GACjB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAczB;AAED,wBAAsB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8B5E"}
@@ -1,10 +1,35 @@
1
1
  /**
2
2
  * Agent list command - discovers and lists all agents
3
3
  */
4
+ import { safePath } from '@vibe-agent-toolkit/utils';
4
5
  import { discoverAgents } from '../../utils/agent-discovery.js';
5
6
  import { handleCommandError } from '../../utils/command-error.js';
6
7
  import { createLogger } from '../../utils/logger.js';
7
8
  import { writeYamlOutput } from '../../utils/output.js';
9
+ import { relativizePathEntries } from '../../utils/relativize-paths.js';
10
+ /**
11
+ * Build the agent-list payload.
12
+ *
13
+ * Pure, so the payload's shape — including the fact that `path` is root-relative
14
+ * — is under unit test rather than only under a CLI spawn. `root` is stated
15
+ * once and is the only absolute path in the document; without it a relative
16
+ * `path` is unresolvable, and with absolute paths the payload names the machine
17
+ * it ran on.
18
+ */
19
+ export function buildAgentListOutput(agents, root, durationMs) {
20
+ const reported = agents.map(agent => ({
21
+ name: agent.name,
22
+ version: agent.version,
23
+ path: agent.path,
24
+ }));
25
+ return {
26
+ status: 'success',
27
+ root,
28
+ agents: relativizePathEntries(reported, root),
29
+ count: agents.length,
30
+ duration: `${durationMs}ms`,
31
+ };
32
+ }
8
33
  export async function listCommand(options) {
9
34
  const logger = createLogger(options.debug ? { debug: true } : {});
10
35
  const startTime = Date.now();
@@ -12,23 +37,17 @@ export async function listCommand(options) {
12
37
  logger.debug('Discovering agents...');
13
38
  logger.debug(`Search paths: packages/vat-development-agents/agents, agents, .`);
14
39
  const agents = await discoverAgents();
15
- const output = {
16
- status: 'success',
17
- agents: agents.map(agent => ({
18
- name: agent.name,
19
- version: agent.version,
20
- path: agent.path,
21
- })),
22
- count: agents.length,
23
- duration: `${Date.now() - startTime}ms`,
24
- };
40
+ // `discoverAgents` resolves its search paths against cwd, so cwd — not a
41
+ // config/git projectRoot — is the honest base for what it found.
42
+ const root = safePath.resolve(process.cwd());
43
+ const output = buildAgentListOutput(agents, root, Date.now() - startTime);
25
44
  writeYamlOutput(output);
26
45
  if (agents.length === 0) {
27
46
  logger.info('No agents discovered');
28
47
  }
29
48
  else {
30
49
  logger.info(`Found ${agents.length} agent(s):`);
31
- for (const agent of agents) {
50
+ for (const agent of output['agents']) {
32
51
  logger.info(` ${agent.name} (${agent.version}) - ${agent.path}`);
33
52
  }
34
53
  }
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/agent/list.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAMxD,MAAM,CAAC,KAAK,UAAU,WAA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S,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,IAAI,CAAC;QACH,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;QACtC,MAAM,CAAC,KAAK,CAAC,iEAAiE,CAAC,CAAC;QAEhF,MAAM,MAAM,GAAG,MAAM,cAAc,EAAE,CAAC;QAEtC,yEAAyE;QACzE,iEAAiE;QACjE,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QAC7C,MAAM,MAAM,GAAG,oBAAoB,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,CAAC;QAE1E,eAAe,CAAC,MAAM,CAAC,CAAC;QAExB,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;QACtC,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,MAAM,YAAY,CAAC,CAAC;YAChD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,QAAQ,CAAoB,EAAE,CAAC;gBACxD,MAAM,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;YACpE,CAAC;QACH,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;IAC5D,CAAC;AACH,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ValidationIssue } from '@vibe-agent-toolkit/agent-schema';
1
+ import { type ValidationIssue } from '@vibe-agent-toolkit/agent-schema';
2
2
  import type { ValidationResult } from '@vibe-agent-toolkit/agent-skills';
3
3
  export interface HierarchicalOutput {
4
4
  marketplaces: MarketplaceGroup[];
@@ -17,6 +17,7 @@ export interface PluginGroup {
17
17
  export type CacheStatus = 'stale' | 'orphaned' | 'fresh';
18
18
  export interface SkillEntry {
19
19
  name: string;
20
+ /** Path relative to the run root stated once at the top of the report. */
20
21
  path: string;
21
22
  status: 'success' | 'warning' | 'error';
22
23
  issues: ValidationIssue[];
@@ -36,7 +37,10 @@ export interface SkillEntry {
36
37
  *
37
38
  * @param results - Validation results from audit command
38
39
  * @param verbose - If true, include all results; if false, only show results with issues
40
+ * @param locationRoot - The run's single stated root. Every emitted `path` and
41
+ * issue `location` is expressed relative to it, so one report never mixes
42
+ * coordinate systems across the three `--user` scan directories.
39
43
  * @returns Hierarchical structure for display
40
44
  */
41
- export declare function buildHierarchicalOutput(results: ValidationResult[], verbose?: boolean): HierarchicalOutput;
45
+ export declare function buildHierarchicalOutput(results: ValidationResult[], verbose: boolean, locationRoot: string): HierarchicalOutput;
42
46
  //# sourceMappingURL=hierarchical-output.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hierarchical-output.d.ts","sourceRoot":"","sources":["../../../src/commands/audit/hierarchical-output.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGzE,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,aAAa,EAAE,WAAW,EAAE,CAAC;IAC7B,iBAAiB,EAAE,WAAW,EAAE,CAAC;IACjC,gBAAgB,EAAE,UAAU,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB;AAED,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC;AAEzD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACxC,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAwWD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,gBAAgB,EAAE,EAAE,OAAO,GAAE,OAAe,GAAG,kBAAkB,CAoCjH"}
1
+ {"version":3,"file":"hierarchical-output.d.ts","sourceRoot":"","sources":["../../../src/commands/audit/hierarchical-output.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGzE,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,aAAa,EAAE,WAAW,EAAE,CAAC;IAC7B,iBAAiB,EAAE,WAAW,EAAE,CAAC;IACjC,gBAAgB,EAAE,UAAU,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB;AAED,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC;AAEzD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACxC,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAqaD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,gBAAgB,EAAE,EAC3B,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,MAAM,GACnB,kBAAkB,CAyCpB"}
@@ -1,46 +1,71 @@
1
1
  import * as os from 'node:os';
2
- import { toForwardSlash } from '@vibe-agent-toolkit/utils';
3
- /**
4
- * Replace home directory with ~ for cleaner paths
5
- * Normalizes paths for cross-platform comparison (handles Windows backslashes)
6
- */
7
- function replaceHomeDir(filePath) {
8
- const homeDir = os.homedir();
9
- // Normalize both paths to forward slashes for comparison
10
- const normalizedFilePath = toForwardSlash(filePath);
11
- const normalizedHomeDir = toForwardSlash(homeDir);
12
- if (normalizedFilePath.startsWith(normalizedHomeDir)) {
13
- // Replace using original paths to preserve platform separators in output
14
- return filePath.replace(homeDir, '~');
2
+ import { calculateValidationStatus, countBySeverity, } from '@vibe-agent-toolkit/agent-schema';
3
+ import { issueLocation, toForwardSlash } from '@vibe-agent-toolkit/utils';
4
+ /** Build {@link ParsedSkillPath.identity} from the parsed segments. */
5
+ function skillIdentity(parts, marketplace, plugin, skill) {
6
+ if (plugin === undefined) {
7
+ return parts.slice(0, -1).join('/');
15
8
  }
16
- return filePath;
9
+ return `${marketplace ?? ''}/${plugin}/${skill}`;
10
+ }
11
+ function parsed(parts, skill, isCached, marketplace, plugin) {
12
+ const out = {
13
+ skill,
14
+ isCached,
15
+ identity: skillIdentity(parts, marketplace, plugin, skill),
16
+ };
17
+ if (marketplace !== undefined)
18
+ out.marketplace = marketplace;
19
+ if (plugin !== undefined)
20
+ out.plugin = plugin;
21
+ return out;
17
22
  }
18
23
  /**
19
24
  * Parse path structure to extract marketplace, plugin, and skill names
20
25
  *
21
26
  * Expected patterns:
22
- * - Marketplace plugin skill: .../marketplaces/{marketplace}/{plugin}/skills/{skill}/SKILL.md
27
+ * - Cached plugin skill: .../plugins/cache/{marketplace}/{plugin}/{version}/skills/{skill}/SKILL.md
28
+ * - Marketplace plugin skill: .../marketplaces/{marketplace}/[plugins/]{plugin}/skills/{skill}/SKILL.md
23
29
  * - Standalone plugin skill (in plugins dir): .../plugins/{plugin}/skills/{skill}/SKILL.md (no marketplaces/)
24
30
  * - Skill-claude-plugin: .../plugins/{skill}/SKILL.md (root SKILL.md + .claude-plugin/plugin.json, no skills/ subdir)
25
31
  * - Standalone skill (in skills dir): ~/.claude/skills/{skill}/SKILL.md
32
+ *
33
+ * The plugin is read as the segment immediately BEFORE `skills/`, not as a fixed
34
+ * offset from `marketplaces/`. Claude Code's installed layout carries an extra
35
+ * `plugins/` segment between the marketplace and the plugin
36
+ * (`marketplaces/{marketplace}/plugins/{plugin}/skills/...`), so the fixed offset
37
+ * named every group `plugins`; the offset only looked right against fixtures that
38
+ * omitted that segment.
26
39
  */
27
40
  function parsePathStructure(filePath) {
28
41
  // Normalize to forward slashes for cross-platform parsing
29
42
  const normalizedPath = toForwardSlash(filePath);
30
43
  const parts = normalizedPath.split('/');
31
44
  // Detect if this is a cached resource
32
- const isCached = parts.includes('cache');
45
+ const cacheIdx = parts.indexOf('cache');
46
+ const isCached = cacheIdx >= 0;
33
47
  // Find key indices
34
48
  const marketplacesIdx = parts.indexOf('marketplaces');
35
49
  const pluginsIdx = parts.indexOf('plugins');
36
50
  const skillsIdx = parts.indexOf('skills');
37
- // Marketplace plugin skill: .../marketplaces/{marketplace}/{plugin}/skills/{skill}/SKILL.md
38
- if (marketplacesIdx >= 0 && skillsIdx >= 0) {
51
+ // Cached plugin skill: .../cache/{marketplace}/{plugin}/{version}/skills/{skill}/SKILL.md
52
+ // The marketplace and plugin are named here, which is what lets a cached copy
53
+ // be matched against its own source rather than a same-named stranger.
54
+ if (isCached && skillsIdx > cacheIdx) {
55
+ const marketplace = parts[cacheIdx + 1];
56
+ const plugin = parts[cacheIdx + 2];
57
+ const skill = parts[skillsIdx + 1];
58
+ if (marketplace !== undefined && plugin !== undefined && skill !== undefined) {
59
+ return parsed(parts, skill, isCached, marketplace, plugin);
60
+ }
61
+ }
62
+ // Marketplace plugin skill: .../marketplaces/{marketplace}/[plugins/]{plugin}/skills/{skill}/SKILL.md
63
+ if (marketplacesIdx >= 0 && skillsIdx > marketplacesIdx) {
39
64
  const marketplace = parts[marketplacesIdx + 1];
40
- const plugin = parts[marketplacesIdx + 2];
65
+ const plugin = parts[skillsIdx - 1];
41
66
  const skill = parts[skillsIdx + 1];
42
67
  if (marketplace !== undefined && plugin !== undefined && skill !== undefined) {
43
- return { marketplace, plugin, skill, isCached };
68
+ return parsed(parts, skill, isCached, marketplace, plugin);
44
69
  }
45
70
  }
46
71
  // Plugin-related patterns (requires /plugins/ in path)
@@ -52,12 +77,12 @@ function parsePathStructure(filePath) {
52
77
  if (skillsIdx >= 0) {
53
78
  const skill = parts[skillsIdx + 1];
54
79
  if (skill !== undefined) {
55
- return { skill, isCached };
80
+ return parsed(parts, skill, isCached);
56
81
  }
57
82
  }
58
83
  // Fallback: use directory name before SKILL.md
59
84
  const skill = parts.at(-2) ?? 'unknown';
60
- return { skill, isCached };
85
+ return parsed(parts, skill, isCached);
61
86
  }
62
87
  /**
63
88
  * Parse plugin-related paths
@@ -69,16 +94,16 @@ function parsePluginPath(parts, pluginsIdx, skillsIdx, isCached) {
69
94
  const plugin = parts[skillsIdx - 1]; // Plugin name is before /skills/
70
95
  const skill = parts[skillsIdx + 1];
71
96
  if (plugin !== undefined && skill !== undefined) {
72
- return { plugin, skill, isCached };
97
+ return parsed(parts, skill, isCached, undefined, plugin);
73
98
  }
74
99
  }
75
100
  // Skill-claude-plugin: .../plugins/{skill}/SKILL.md (root SKILL.md + .claude-plugin/plugin.json, no /skills/ subdir)
76
101
  const skill = parts[pluginsIdx + 1];
77
102
  if (skill !== undefined) {
78
- return { skill, isCached };
103
+ return parsed(parts, skill, isCached);
79
104
  }
80
105
  // Fallback
81
- return { skill: 'unknown', isCached };
106
+ return parsed(parts, 'unknown', isCached);
82
107
  }
83
108
  /**
84
109
  * Add skill entry to marketplace map
@@ -129,27 +154,28 @@ function addToStandalonePluginMap(standalonePluginsMap, plugin, entry) {
129
154
  * @returns Filtered results and cache status map
130
155
  */
131
156
  function filterCacheDuplicates(results) {
132
- const sourceBySkillName = new Map();
157
+ const sourceByIdentity = new Map();
133
158
  const cacheResults = [];
134
159
  const nonCacheResults = [];
135
160
  const cacheStatusMap = new Map();
136
161
  // First pass: categorize results and build source index
137
162
  for (const result of results) {
138
- const { skill, isCached } = parsePathStructure(result.path);
163
+ const { identity, isCached } = parsePathStructure(result.path);
139
164
  if (isCached) {
140
165
  cacheResults.push(result);
141
166
  }
142
167
  else {
143
168
  nonCacheResults.push(result);
144
- // Index source results by skill name for matching
145
- sourceBySkillName.set(skill, result);
169
+ // Index source results by marketplace/plugin/skill identity — see
170
+ // ParsedSkillPath.identity for why the bare skill name cannot be the key.
171
+ sourceByIdentity.set(identity, result);
146
172
  }
147
173
  }
148
174
  // Second pass: filter cache results and track status
149
175
  const filteredCache = [];
150
176
  for (const cacheResult of cacheResults) {
151
- const { skill } = parsePathStructure(cacheResult.path);
152
- const sourceResult = sourceBySkillName.get(skill);
177
+ const { identity } = parsePathStructure(cacheResult.path);
178
+ const sourceResult = sourceByIdentity.get(identity);
153
179
  if (!sourceResult) {
154
180
  // Orphaned cache - no matching source, keep it
155
181
  filteredCache.push(cacheResult);
@@ -180,11 +206,11 @@ function filterCacheDuplicates(results) {
180
206
  /**
181
207
  * Create skill entry from validation result
182
208
  */
183
- function createSkillEntry(result, cacheStatusMap) {
209
+ function createSkillEntry(result, cacheStatusMap, locationRoot) {
184
210
  const { skill, isCached } = parsePathStructure(result.path);
185
211
  const entry = {
186
212
  name: skill,
187
- path: replaceHomeDir(result.path),
213
+ path: issueLocation(result.path, locationRoot),
188
214
  status: result.status,
189
215
  issues: result.issues,
190
216
  };
@@ -200,16 +226,20 @@ function createSkillEntry(result, cacheStatusMap) {
200
226
  /**
201
227
  * Categorize entry into appropriate map
202
228
  */
203
- function categorizeEntry(entry, marketplace, plugin, isCached, maps) {
204
- if (marketplace !== undefined && plugin !== undefined) {
229
+ function categorizeEntry(entry, location, maps) {
230
+ const { marketplace, plugin, isCached } = location;
231
+ // Cached first: a cached path now names its marketplace too (that is what makes
232
+ // cache/source matching correct), so testing `marketplace` first would fold the
233
+ // whole cache into the marketplace tree and empty the `cachedPlugins` section.
234
+ if (isCached && plugin !== undefined) {
235
+ addToCachedPluginMap(maps.cachedPluginsMap, plugin, entry);
236
+ }
237
+ else if (marketplace !== undefined && plugin !== undefined) {
205
238
  addToMarketplaceMap(maps.marketplacesMap, marketplace, plugin, entry);
206
239
  }
207
240
  else if (plugin === undefined) {
208
241
  maps.standaloneSkills.push(entry);
209
242
  }
210
- else if (isCached) {
211
- addToCachedPluginMap(maps.cachedPluginsMap, plugin, entry);
212
- }
213
243
  else {
214
244
  addToStandalonePluginMap(maps.standalonePluginsMap, plugin, entry);
215
245
  }
@@ -246,9 +276,10 @@ function convertPluginMapToArray(pluginMap) {
246
276
  * configured as plugins with .claude-plugin/plugin.json.
247
277
  *
248
278
  * @param results - Validation results to check
279
+ * @param locationRoot - Run root the emitted `location` is expressed relative to
249
280
  * @returns Results with misconfiguration issues added
250
281
  */
251
- function addMisconfigurationIssues(results) {
282
+ function addMisconfigurationIssues(results, locationRoot) {
252
283
  const homeDir = toForwardSlash(os.homedir());
253
284
  const pluginsPath = `${homeDir}/.claude/plugins/`;
254
285
  return results.map((result) => {
@@ -267,14 +298,18 @@ function addMisconfigurationIssues(results) {
267
298
  severity: 'error',
268
299
  code: 'SKILL_MISCONFIGURED_LOCATION',
269
300
  message: 'Standalone skill in plugins directory won\'t be recognized by Claude Code',
270
- location: result.path,
301
+ location: issueLocation(result.path, locationRoot),
271
302
  fix: 'Move to ~/.claude/skills/ for standalone skills, or add .claude-plugin/plugin.json for a proper plugin',
272
303
  };
273
- // Clone result and add issue
304
+ // Clone result and add issue. The status and the counts are DERIVED from the
305
+ // new issue list by the one shared collapse — never hand-set — so they cannot
306
+ // drift from the findings they describe.
307
+ const issues = [...result.issues, misconfigIssue];
274
308
  return {
275
309
  ...result,
276
- status: 'error', // Upgrade to error
277
- issues: [...result.issues, misconfigIssue],
310
+ status: calculateValidationStatus(issues),
311
+ issueCounts: countBySeverity(issues),
312
+ issues,
278
313
  };
279
314
  });
280
315
  }
@@ -292,13 +327,16 @@ function addMisconfigurationIssues(results) {
292
327
  *
293
328
  * @param results - Validation results from audit command
294
329
  * @param verbose - If true, include all results; if false, only show results with issues
330
+ * @param locationRoot - The run's single stated root. Every emitted `path` and
331
+ * issue `location` is expressed relative to it, so one report never mixes
332
+ * coordinate systems across the three `--user` scan directories.
295
333
  * @returns Hierarchical structure for display
296
334
  */
297
- export function buildHierarchicalOutput(results, verbose = false) {
335
+ export function buildHierarchicalOutput(results, verbose, locationRoot) {
298
336
  // Filter out cache duplicates that match their source
299
337
  const { filtered: filteredResults, cacheStatusMap } = filterCacheDuplicates(results);
300
338
  // Add misconfiguration detection to results BEFORE verbose filtering
301
- const resultsWithMisconfigDetection = addMisconfigurationIssues(filteredResults);
339
+ const resultsWithMisconfigDetection = addMisconfigurationIssues(filteredResults, locationRoot);
302
340
  const marketplacesMap = new Map();
303
341
  const cachedPluginsMap = new Map();
304
342
  const standalonePluginsMap = new Map();
@@ -310,13 +348,18 @@ export function buildHierarchicalOutput(results, verbose = false) {
310
348
  standaloneSkills,
311
349
  };
312
350
  for (const result of resultsWithMisconfigDetection) {
313
- // Only include results with issues (terse principle), unless verbose mode
314
- if (!verbose && result.status === 'success') {
351
+ // Only include results with issues (terse principle), unless verbose mode.
352
+ //
353
+ // Keyed on the ISSUE COUNT, never on the status. A status names the worst
354
+ // ACTIONABLE severity, so an info-only result is `success` — keying this on
355
+ // `status === 'success'` deleted every info-only skill from the report while
356
+ // the summary went on counting its findings (a real `--user` scan hid 167
357
+ // info findings across 128 skills that way).
358
+ if (!verbose && result.issues.length === 0) {
315
359
  continue;
316
360
  }
317
- const { marketplace, plugin, isCached } = parsePathStructure(result.path);
318
- const entry = createSkillEntry(result, cacheStatusMap);
319
- categorizeEntry(entry, marketplace, plugin, isCached, maps);
361
+ const entry = createSkillEntry(result, cacheStatusMap, locationRoot);
362
+ categorizeEntry(entry, parsePathStructure(result.path), maps);
320
363
  }
321
364
  return {
322
365
  marketplaces: convertMarketplacesMapToArray(marketplacesMap),