scip-query 0.3.4 → 0.4.0

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 (154) hide show
  1. package/README.md +2 -26
  2. package/dist/{chunk-FYYOWQXK.js → chunk-2F2WH5WQ.js} +19 -36
  3. package/dist/{chunk-C7H5WBTJ.js → chunk-2UISVZGQ.js} +2 -2
  4. package/dist/{chunk-HLKAFWWJ.js → chunk-4ZT7UGWW.js} +56 -91
  5. package/dist/chunk-5AJJGPZE.js +60 -0
  6. package/dist/chunk-5RKYZSQ6.js +75 -0
  7. package/dist/chunk-7YBLWIXY.js +115 -0
  8. package/dist/{chunk-O7Q7FDUJ.js → chunk-A4GWYETB.js} +2 -2
  9. package/dist/{chunk-CHDJXYBG.js → chunk-A5BGEBM7.js} +2 -2
  10. package/dist/{chunk-KKCHYLVI.js → chunk-A7YY7IDA.js} +2 -2
  11. package/dist/chunk-AS7N27JK.js +115 -0
  12. package/dist/{chunk-F7XU27LU.js → chunk-CQRYLK33.js} +26 -2
  13. package/dist/{chunk-NFS5W3PP.js → chunk-CQUNEJYM.js} +2 -2
  14. package/dist/chunk-D4I3ZMN5.js +38 -0
  15. package/dist/{chunk-J3JSOSUO.js → chunk-E7J7Q7UW.js} +2 -2
  16. package/dist/{chunk-GEXE2T6I.js → chunk-EOHPASDV.js} +22 -14
  17. package/dist/chunk-FVH3Y44U.js +1 -0
  18. package/dist/chunk-GIBETK3W.js +37 -0
  19. package/dist/{chunk-SMDCNPMK.js → chunk-H3FPW5YN.js} +2 -2
  20. package/dist/{chunk-GJDHTTR2.js → chunk-HNURMDF4.js} +32 -17
  21. package/dist/{chunk-7KIMF5PV.js → chunk-HRDPUTIQ.js} +2 -2
  22. package/dist/{chunk-OIDHN6GD.js → chunk-I2JM34UV.js} +146 -5
  23. package/dist/{chunk-EPWLXXBL.js → chunk-IV6NZ426.js} +27 -29
  24. package/dist/{chunk-VT4JBH6L.js → chunk-KDCQJTYW.js} +2 -2
  25. package/dist/{chunk-5OMVSV6E.js → chunk-LOVDB4C6.js} +2 -2
  26. package/dist/chunk-MA3B3IUT.js +75 -0
  27. package/dist/{chunk-26DOJ63W.js → chunk-N2LH3M2P.js} +13 -2
  28. package/dist/chunk-NWCJWA36.js +162 -0
  29. package/dist/{chunk-NG5F43OU.js → chunk-P3VCDYMJ.js} +70 -1
  30. package/dist/{chunk-P3E6L7KW.js → chunk-P42KQKJZ.js} +83 -3
  31. package/dist/{chunk-YDBXNPYU.js → chunk-PGHN5UTM.js} +2 -2
  32. package/dist/{chunk-UGQKAVCD.js → chunk-QCYR4S6T.js} +2 -2
  33. package/dist/chunk-QGCEAVJD.js +2529 -0
  34. package/dist/{chunk-KBOQX573.js → chunk-RIEA5DOB.js} +19 -2
  35. package/dist/{chunk-VIYSWZCO.js → chunk-SL674KAW.js} +31 -3
  36. package/dist/chunk-SRELHCMG.js +110 -0
  37. package/dist/chunk-UTRKBUCB.js +87 -0
  38. package/dist/{chunk-HJZUSUPU.js → chunk-VCOJRQPP.js} +5 -5
  39. package/dist/chunk-VISMEWYP.js +34 -0
  40. package/dist/{chunk-LFJQVJYJ.js → chunk-VU7FDTWV.js} +2 -2
  41. package/dist/{chunk-HLUS2HEB.js → chunk-VUBLUTMU.js} +5 -4
  42. package/dist/{chunk-WGAD3GNR.js → chunk-WNPF2I25.js} +5 -5
  43. package/dist/{chunk-YY4QGUQ5.js → chunk-X3J4VPWM.js} +2 -2
  44. package/dist/{chunk-GSH2FPKV.js → chunk-XH56HXLC.js} +2 -2
  45. package/dist/{chunk-DH7G3DDV.js → chunk-ZU2AQQB5.js} +2 -2
  46. package/dist/cli.js +2722 -1036
  47. package/dist/{db-ShvwGDKf.d.ts → db-C4rPbKkI.d.ts} +7 -14
  48. package/dist/index.d.ts +4 -5
  49. package/dist/index.js +378 -149
  50. package/dist/postinstall.js +9 -3
  51. package/dist/queries/affected.d.ts +1 -1
  52. package/dist/queries/affected.js +2 -2
  53. package/dist/queries/bottlenecks.d.ts +1 -1
  54. package/dist/queries/bottlenecks.js +2 -1
  55. package/dist/queries/by-kind.d.ts +1 -1
  56. package/dist/queries/by-kind.js +2 -1
  57. package/dist/queries/call-graph.d.ts +1 -1
  58. package/dist/queries/call-graph.js +2 -2
  59. package/dist/queries/change-surface.d.ts +1 -1
  60. package/dist/queries/change-surface.js +2 -2
  61. package/dist/queries/code.d.ts +1 -1
  62. package/dist/queries/code.js +2 -2
  63. package/dist/queries/complexity-hotspots.d.ts +1 -1
  64. package/dist/queries/complexity-hotspots.js +2 -2
  65. package/dist/queries/complexity.d.ts +1 -1
  66. package/dist/queries/complexity.js +2 -2
  67. package/dist/queries/convergence.d.ts +1 -1
  68. package/dist/queries/convergence.js +2 -2
  69. package/dist/queries/coupling.d.ts +1 -1
  70. package/dist/queries/coupling.js +2 -2
  71. package/dist/queries/cycles.d.ts +1 -1
  72. package/dist/queries/cycles.js +2 -2
  73. package/dist/queries/dataflow.d.ts +1 -1
  74. package/dist/queries/dataflow.js +2 -2
  75. package/dist/queries/dead.d.ts +1 -1
  76. package/dist/queries/dead.js +3 -3
  77. package/dist/queries/deep-chains.d.ts +1 -1
  78. package/dist/queries/deep-chains.js +2 -2
  79. package/dist/queries/deps.d.ts +1 -1
  80. package/dist/queries/deps.js +2 -2
  81. package/dist/queries/diff-impact.d.ts +1 -1
  82. package/dist/queries/drift.d.ts +1 -1
  83. package/dist/queries/drift.js +2 -2
  84. package/dist/queries/extract-candidates.d.ts +1 -1
  85. package/dist/queries/extract-candidates.js +2 -2
  86. package/dist/queries/fan.d.ts +1 -1
  87. package/dist/queries/fan.js +2 -2
  88. package/dist/queries/files.d.ts +1 -1
  89. package/dist/queries/health.d.ts +1 -1
  90. package/dist/queries/health.js +13 -13
  91. package/dist/queries/hierarchy.d.ts +1 -1
  92. package/dist/queries/hierarchy.js +2 -2
  93. package/dist/queries/hotspots.d.ts +1 -1
  94. package/dist/queries/hotspots.js +2 -1
  95. package/dist/queries/imports.d.ts +1 -1
  96. package/dist/queries/imports.js +2 -2
  97. package/dist/queries/index.d.ts +1 -2
  98. package/dist/queries/index.js +49 -53
  99. package/dist/queries/isolated.d.ts +3 -4
  100. package/dist/queries/isolated.js +3 -3
  101. package/dist/queries/members.d.ts +1 -1
  102. package/dist/queries/members.js +2 -2
  103. package/dist/queries/methods.d.ts +1 -1
  104. package/dist/queries/methods.js +2 -1
  105. package/dist/queries/outline.d.ts +1 -1
  106. package/dist/queries/outline.js +2 -2
  107. package/dist/queries/passthrough-candidates.d.ts +1 -1
  108. package/dist/queries/passthrough-candidates.js +2 -2
  109. package/dist/queries/redundant-reexports.d.ts +1 -1
  110. package/dist/queries/redundant-reexports.js +3 -3
  111. package/dist/queries/refs.d.ts +1 -1
  112. package/dist/queries/refs.js +2 -2
  113. package/dist/queries/similar-chains.d.ts +1 -1
  114. package/dist/queries/similar-chains.js +2 -2
  115. package/dist/queries/similar-files.d.ts +1 -1
  116. package/dist/queries/similar-files.js +2 -2
  117. package/dist/queries/similar-signatures.d.ts +5 -3
  118. package/dist/queries/similar-signatures.js +2 -1
  119. package/dist/queries/similar.d.ts +1 -1
  120. package/dist/queries/similar.js +2 -2
  121. package/dist/queries/slice.d.ts +1 -1
  122. package/dist/queries/slice.js +2 -2
  123. package/dist/queries/stale-abstractions.d.ts +1 -1
  124. package/dist/queries/stale-abstractions.js +2 -2
  125. package/dist/queries/stats.d.ts +1 -1
  126. package/dist/queries/surface.d.ts +1 -1
  127. package/dist/queries/surface.js +2 -2
  128. package/dist/queries/symbols.d.ts +1 -1
  129. package/dist/queries/symbols.js +2 -2
  130. package/dist/queries/system.d.ts +1 -1
  131. package/dist/queries/system.js +2 -2
  132. package/dist/queries/trace.d.ts +1 -1
  133. package/dist/queries/trace.js +2 -2
  134. package/dist/queries/wrapper-candidates.d.ts +1 -1
  135. package/dist/queries/wrapper-candidates.js +2 -2
  136. package/dist/reindex-worker.js +213 -62
  137. package/package.json +1 -1
  138. package/skills/scip-language-playbook/SKILL.md +371 -0
  139. package/dist/chunk-2UELLEBI.js +0 -1
  140. package/dist/chunk-4JCSOF2O.js +0 -97
  141. package/dist/chunk-AXQKUYKF.js +0 -1442
  142. package/dist/chunk-CPVAQJEC.js +0 -46
  143. package/dist/chunk-EOROMIFO.js +0 -41
  144. package/dist/chunk-GU2H5QRN.js +0 -28
  145. package/dist/chunk-LQJUPXQY.js +0 -109
  146. package/dist/chunk-MPGIHELS.js +0 -39
  147. package/dist/chunk-P4WO3BBW.js +0 -64
  148. package/dist/chunk-TOIEB3LG.js +0 -78
  149. package/dist/chunk-UQEQ6AHX.js +0 -60
  150. package/dist/chunk-VJJKSGIX.js +0 -121
  151. package/dist/chunk-YZ6L7GFO.js +0 -73
  152. package/dist/chunk-ZEUCXQBN.js +0 -71
  153. package/dist/queries/doc-coverage.d.ts +0 -14
  154. package/dist/queries/doc-coverage.js +0 -8
package/dist/index.js CHANGED
@@ -1,148 +1,145 @@
1
- import "./chunk-2UELLEBI.js";
1
+ import "./chunk-FVH3Y44U.js";
2
2
  import {
3
3
  surface
4
- } from "./chunk-EOROMIFO.js";
4
+ } from "./chunk-MA3B3IUT.js";
5
5
  import {
6
6
  symbols
7
- } from "./chunk-CPVAQJEC.js";
7
+ } from "./chunk-D4I3ZMN5.js";
8
8
  import {
9
9
  system
10
- } from "./chunk-O7Q7FDUJ.js";
10
+ } from "./chunk-A4GWYETB.js";
11
11
  import {
12
12
  trace
13
- } from "./chunk-GEXE2T6I.js";
13
+ } from "./chunk-EOHPASDV.js";
14
14
  import {
15
15
  redundantReexports
16
- } from "./chunk-P3E6L7KW.js";
16
+ } from "./chunk-P42KQKJZ.js";
17
17
  import {
18
18
  refs
19
- } from "./chunk-MPGIHELS.js";
19
+ } from "./chunk-7YBLWIXY.js";
20
20
  import {
21
21
  similarChains
22
- } from "./chunk-WGAD3GNR.js";
22
+ } from "./chunk-WNPF2I25.js";
23
23
  import {
24
24
  similarFiles
25
- } from "./chunk-HLUS2HEB.js";
25
+ } from "./chunk-VUBLUTMU.js";
26
26
  import {
27
27
  similarSignatures
28
- } from "./chunk-TOIEB3LG.js";
28
+ } from "./chunk-NWCJWA36.js";
29
29
  import {
30
30
  slice
31
- } from "./chunk-CHDJXYBG.js";
32
- import {
33
- hierarchy
34
- } from "./chunk-YDBXNPYU.js";
31
+ } from "./chunk-A5BGEBM7.js";
35
32
  import {
36
33
  hotspots
37
- } from "./chunk-KBOQX573.js";
34
+ } from "./chunk-RIEA5DOB.js";
38
35
  import {
39
36
  importedBy,
40
37
  imports,
41
38
  unusedImports
42
- } from "./chunk-26DOJ63W.js";
39
+ } from "./chunk-N2LH3M2P.js";
43
40
  import {
44
41
  members
45
- } from "./chunk-NFS5W3PP.js";
42
+ } from "./chunk-CQUNEJYM.js";
46
43
  import {
47
44
  methods
48
- } from "./chunk-GU2H5QRN.js";
45
+ } from "./chunk-GIBETK3W.js";
49
46
  import {
50
47
  outline
51
- } from "./chunk-5OMVSV6E.js";
48
+ } from "./chunk-LOVDB4C6.js";
52
49
  import {
53
50
  deps,
54
51
  rdeps
55
- } from "./chunk-VT4JBH6L.js";
52
+ } from "./chunk-KDCQJTYW.js";
56
53
  import {
57
54
  diffImpact
58
55
  } from "./chunk-7HK5ZLOE.js";
59
- import {
60
- docCoverage
61
- } from "./chunk-YZ6L7GFO.js";
62
56
  import {
63
57
  fanIn,
64
58
  fanOut,
65
59
  topFanIn,
66
60
  topFanOut
67
- } from "./chunk-GJDHTTR2.js";
61
+ } from "./chunk-HNURMDF4.js";
68
62
  import {
69
63
  files
70
64
  } from "./chunk-MGNMHKX3.js";
71
65
  import {
72
66
  health
73
- } from "./chunk-FYYOWQXK.js";
74
- import {
75
- staleAbstractions
76
- } from "./chunk-P4WO3BBW.js";
67
+ } from "./chunk-2F2WH5WQ.js";
77
68
  import {
78
69
  stats
79
70
  } from "./chunk-74RFWB5T.js";
80
71
  import {
81
72
  wrapperCandidates
82
- } from "./chunk-4JCSOF2O.js";
83
- import {
84
- passthroughCandidates
85
- } from "./chunk-ZEUCXQBN.js";
73
+ } from "./chunk-AS7N27JK.js";
86
74
  import {
87
75
  similar,
88
76
  similarAll
89
- } from "./chunk-OIDHN6GD.js";
77
+ } from "./chunk-I2JM34UV.js";
78
+ import {
79
+ staleAbstractions
80
+ } from "./chunk-5RKYZSQ6.js";
90
81
  import {
91
82
  isolated
92
- } from "./chunk-UQEQ6AHX.js";
83
+ } from "./chunk-VISMEWYP.js";
84
+ import {
85
+ passthroughCandidates
86
+ } from "./chunk-5AJJGPZE.js";
93
87
  import {
94
88
  drift
95
- } from "./chunk-7KIMF5PV.js";
89
+ } from "./chunk-HRDPUTIQ.js";
96
90
  import {
97
91
  extractCandidates
98
- } from "./chunk-EPWLXXBL.js";
92
+ } from "./chunk-IV6NZ426.js";
93
+ import {
94
+ hierarchy
95
+ } from "./chunk-PGHN5UTM.js";
99
96
  import {
100
97
  complexityHotspots
101
- } from "./chunk-VIYSWZCO.js";
98
+ } from "./chunk-SL674KAW.js";
102
99
  import {
103
100
  complexity
104
- } from "./chunk-UGQKAVCD.js";
101
+ } from "./chunk-QCYR4S6T.js";
105
102
  import {
106
103
  convergence
107
- } from "./chunk-HJZUSUPU.js";
104
+ } from "./chunk-VCOJRQPP.js";
108
105
  import {
109
106
  coupling,
110
107
  topCoupling
111
- } from "./chunk-KKCHYLVI.js";
108
+ } from "./chunk-A7YY7IDA.js";
112
109
  import {
113
110
  cycles
114
- } from "./chunk-LFJQVJYJ.js";
111
+ } from "./chunk-VU7FDTWV.js";
115
112
  import {
116
113
  dataflow
117
- } from "./chunk-GSH2FPKV.js";
114
+ } from "./chunk-XH56HXLC.js";
118
115
  import {
119
116
  dead
120
- } from "./chunk-LQJUPXQY.js";
121
- import "./chunk-YY4QGUQ5.js";
117
+ } from "./chunk-SRELHCMG.js";
118
+ import "./chunk-X3J4VPWM.js";
122
119
  import {
123
120
  deepChains
124
- } from "./chunk-DH7G3DDV.js";
121
+ } from "./chunk-ZU2AQQB5.js";
125
122
  import {
126
123
  affected
127
- } from "./chunk-VJJKSGIX.js";
124
+ } from "./chunk-UTRKBUCB.js";
128
125
  import {
129
126
  bottlenecks
130
- } from "./chunk-F7XU27LU.js";
127
+ } from "./chunk-CQRYLK33.js";
131
128
  import {
132
129
  byKind,
133
130
  kindCounts
134
- } from "./chunk-HLKAFWWJ.js";
131
+ } from "./chunk-4ZT7UGWW.js";
135
132
  import {
136
133
  callGraph
137
- } from "./chunk-C7H5WBTJ.js";
134
+ } from "./chunk-2UISVZGQ.js";
138
135
  import {
139
136
  changeSurface
140
- } from "./chunk-SMDCNPMK.js";
137
+ } from "./chunk-H3FPW5YN.js";
141
138
  import "./chunk-4TYLS5XX.js";
142
139
  import {
143
140
  code
144
- } from "./chunk-J3JSOSUO.js";
145
- import "./chunk-AXQKUYKF.js";
141
+ } from "./chunk-E7J7Q7UW.js";
142
+ import "./chunk-QGCEAVJD.js";
146
143
  import {
147
144
  leafName,
148
145
  parseSymbol,
@@ -184,12 +181,23 @@ var ScipDatabase = class {
184
181
  * that need SQL-level filtering, use excludedPathPatterns().
185
182
  */
186
183
  get localSymbolPredicate() {
187
- return `EXISTS (
188
- SELECT 1
189
- FROM defn_enclosing_ranges local_der
190
- JOIN documents local_d ON local_der.document_id = local_d.id
191
- WHERE local_der.symbol_id = gs.id
192
- ${this.pathExclusionsFor("local_d").trimStart()}
184
+ return `(
185
+ EXISTS (
186
+ SELECT 1
187
+ FROM defn_enclosing_ranges local_der
188
+ JOIN documents local_d ON local_der.document_id = local_d.id
189
+ WHERE local_der.symbol_id = gs.id
190
+ ${this.pathExclusionsFor("local_d").trimStart()}
191
+ )
192
+ OR EXISTS (
193
+ SELECT 1
194
+ FROM mentions local_m
195
+ JOIN chunks local_c ON local_m.chunk_id = local_c.id
196
+ JOIN documents local_d ON local_c.document_id = local_d.id
197
+ WHERE local_m.symbol_id = gs.id
198
+ AND local_m.role = 1
199
+ ${this.pathExclusionsFor("local_d").trimStart()}
200
+ )
193
201
  )`;
194
202
  }
195
203
  /**
@@ -347,8 +355,8 @@ Thumbs.db
347
355
 
348
356
  // src/reindex/index.ts
349
357
  import { execFileSync as execFileSync3 } from "child_process";
350
- import { existsSync as existsSync3 } from "fs";
351
- import { join as join3 } from "path";
358
+ import { existsSync as existsSync5, renameSync } from "fs";
359
+ import { join as join5 } from "path";
352
360
 
353
361
  // src/scip-cli.ts
354
362
  import { execFileSync as execFileSync2 } from "child_process";
@@ -356,7 +364,9 @@ import { platform as platform2, arch } from "os";
356
364
 
357
365
  // src/reindex/install.ts
358
366
  import { execFileSync } from "child_process";
367
+ import { existsSync as existsSync2 } from "fs";
359
368
  import { platform } from "os";
369
+ import { join as join2 } from "path";
360
370
  var IS_WINDOWS = platform() === "win32";
361
371
  function isBinaryAvailable(name) {
362
372
  const cmd = IS_WINDOWS ? "where" : "which";
@@ -385,6 +395,31 @@ function resolveIndexerBinary(config) {
385
395
  function isIndexerInstalled(config) {
386
396
  return resolveIndexerBinary(config) !== null;
387
397
  }
398
+ function resolveProjectLocalIndexerBinary(config, projectRoot) {
399
+ for (const relativePath of config.projectLocalBinaries ?? []) {
400
+ const candidate = join2(projectRoot, relativePath);
401
+ if (existsSync2(candidate)) {
402
+ return candidate;
403
+ }
404
+ }
405
+ return null;
406
+ }
407
+ function getIndexerExecutionEnv(config, baseEnv = process.env, binary = config.indexerBinary) {
408
+ if (config.indexerBinary !== "scip-dotnet") {
409
+ return baseEnv;
410
+ }
411
+ if (canRunDotnetIndexer(binary, baseEnv)) {
412
+ return baseEnv;
413
+ }
414
+ const dotnetRoot = resolveWorkingDotnetRoot(binary, baseEnv);
415
+ if (!dotnetRoot) {
416
+ return baseEnv;
417
+ }
418
+ return {
419
+ ...baseEnv,
420
+ DOTNET_ROOT: dotnetRoot
421
+ };
422
+ }
388
423
  function tryInstallIndexer(config, onStatus) {
389
424
  const methods2 = config.installMethods;
390
425
  const binaryLabel = describeIndexerBinary(config);
@@ -424,6 +459,46 @@ function tryInstallIndexer(config, onStatus) {
424
459
  }
425
460
  return false;
426
461
  }
462
+ function resolveWorkingDotnetRoot(binary, env) {
463
+ for (const dotnetRoot of getDotnetRootCandidates(env)) {
464
+ if (canRunDotnetIndexer(binary, { ...env, DOTNET_ROOT: dotnetRoot })) {
465
+ return dotnetRoot;
466
+ }
467
+ }
468
+ return null;
469
+ }
470
+ function getDotnetRootCandidates(env) {
471
+ const candidates = [];
472
+ const configured = env["DOTNET_ROOT"];
473
+ if (configured && existsSync2(configured)) {
474
+ candidates.push(configured);
475
+ }
476
+ if (platform() === "darwin" && isBinaryAvailable("brew")) {
477
+ try {
478
+ const prefix = execFileSync("brew", ["--prefix", "dotnet@9"], {
479
+ stdio: "pipe",
480
+ env
481
+ }).toString().trim();
482
+ const candidate = join2(prefix, "libexec");
483
+ if (existsSync2(candidate) && !candidates.includes(candidate)) {
484
+ candidates.push(candidate);
485
+ }
486
+ } catch {
487
+ }
488
+ }
489
+ return candidates;
490
+ }
491
+ function canRunDotnetIndexer(binary, env) {
492
+ try {
493
+ execFileSync(binary, ["--version"], {
494
+ stdio: "pipe",
495
+ env
496
+ });
497
+ return true;
498
+ } catch {
499
+ return false;
500
+ }
501
+ }
427
502
 
428
503
  // src/scip-cli.ts
429
504
  var IS_WINDOWS2 = platform2() === "win32";
@@ -541,46 +616,151 @@ function tryInstallScipCli(onStatus) {
541
616
  }
542
617
 
543
618
  // src/reindex/detect.ts
544
- import { existsSync as existsSync2 } from "fs";
545
- import { join as join2 } from "path";
619
+ import { existsSync as existsSync3, readdirSync } from "fs";
620
+ import { extname, join as join3 } from "path";
621
+ var IGNORED_DIRS = /* @__PURE__ */ new Set([
622
+ ".git",
623
+ ".hg",
624
+ ".svn",
625
+ ".idea",
626
+ ".vscode",
627
+ "node_modules",
628
+ "vendor",
629
+ "dist",
630
+ "build",
631
+ "target",
632
+ "bin",
633
+ "obj",
634
+ ".dart_tool",
635
+ ".gradle",
636
+ ".next",
637
+ ".venv",
638
+ "venv",
639
+ "__pycache__"
640
+ ]);
546
641
  var LANGUAGE_MARKERS = [
547
- { language: "typescript", files: ["tsconfig.json", "tsconfig.base.json"] },
548
- { language: "rust", files: ["Cargo.toml"] },
549
- { language: "go", files: ["go.mod"] },
550
- { language: "java", files: ["pom.xml", "build.gradle", "build.gradle.kts"] },
551
- { language: "kotlin", files: ["build.gradle.kts"] },
552
- { language: "scala", files: ["build.sbt"] },
553
- { language: "python", files: ["pyproject.toml", "setup.py", "setup.cfg", "Pipfile"] },
554
- { language: "ruby", files: ["Gemfile"] },
555
- { language: "csharp", files: ["*.csproj", "*.sln"] },
556
- { language: "dart", files: ["pubspec.yaml"] },
557
- { language: "php", files: ["composer.json"] },
558
- { language: "javascript", files: ["package.json"] }
559
- // Last very common, low specificity
642
+ { language: "typescript", files: ["tsconfig.json", "tsconfig.base.json"], extensions: [".ts", ".tsx", ".mts", ".cts"] },
643
+ { language: "rust", files: ["Cargo.toml"], extensions: [".rs"] },
644
+ { language: "go", files: ["go.mod"], extensions: [".go"] },
645
+ { language: "java", files: ["pom.xml", "build.gradle", "build.gradle.kts"], extensions: [".java"] },
646
+ { language: "kotlin", files: ["build.gradle.kts"], extensions: [".kt", ".kts"] },
647
+ { language: "scala", files: ["build.sbt"], extensions: [".scala"] },
648
+ { language: "python", files: ["pyproject.toml", "setup.py", "setup.cfg", "Pipfile"], extensions: [".py", ".pyi"] },
649
+ { language: "ruby", files: ["Gemfile"], extensions: [".rb"] },
650
+ { language: "cpp", files: ["compile_commands.json", "CMakeLists.txt", "Makefile"], extensions: [".cc", ".cpp", ".cxx", ".hpp", ".hh", ".hxx"] },
651
+ { language: "c", files: ["compile_commands.json", "CMakeLists.txt", "Makefile"], extensions: [".c", ".h"] },
652
+ { language: "csharp", globs: ["*.csproj", "*.sln"], extensions: [".cs"] },
653
+ { language: "vb", globs: ["*.vbproj"], extensions: [".vb"] },
654
+ { language: "dart", files: ["pubspec.yaml"], extensions: [".dart"] },
655
+ { language: "php", files: ["composer.json"], extensions: [".php"] },
656
+ { language: "javascript", files: ["package.json"], extensions: [".js", ".jsx", ".mjs", ".cjs"] }
657
+ // Last — very common
560
658
  ];
561
659
  function detectLanguages(projectRoot) {
562
660
  const detected = [];
661
+ const rootEntries = safeReadDir(projectRoot);
662
+ const extensionSet = collectExtensions(projectRoot);
563
663
  for (const marker of LANGUAGE_MARKERS) {
564
- for (const file of marker.files) {
565
- if (file.includes("*")) {
566
- continue;
664
+ if (hasMarkerFile(projectRoot, marker.files)) {
665
+ detected.push(marker.language);
666
+ continue;
667
+ }
668
+ if (matchesRootGlob(rootEntries, marker.globs)) {
669
+ detected.push(marker.language);
670
+ continue;
671
+ }
672
+ if (hasExtension(extensionSet, marker.extensions)) {
673
+ detected.push(marker.language);
674
+ }
675
+ }
676
+ if (detected.includes("typescript")) {
677
+ removeLanguage(detected, "javascript");
678
+ }
679
+ if (detected.includes("cpp") && !extensionSet.has(".c")) {
680
+ removeLanguage(detected, "c");
681
+ }
682
+ return detected;
683
+ }
684
+ function safeReadDir(projectRoot) {
685
+ try {
686
+ return readdirSync(projectRoot);
687
+ } catch {
688
+ return [];
689
+ }
690
+ }
691
+ function hasMarkerFile(projectRoot, files2) {
692
+ if (!files2?.length) {
693
+ return false;
694
+ }
695
+ return files2.some((file) => existsSync3(join3(projectRoot, file)));
696
+ }
697
+ function matchesRootGlob(entries, globs) {
698
+ if (!globs?.length) {
699
+ return false;
700
+ }
701
+ return entries.some((entry) => globs.some((glob) => matchesSimpleGlob(entry, glob)));
702
+ }
703
+ function matchesSimpleGlob(entry, pattern) {
704
+ if (pattern === "*") {
705
+ return true;
706
+ }
707
+ if (!pattern.includes("*")) {
708
+ return entry === pattern;
709
+ }
710
+ const [prefix, suffix] = pattern.split("*");
711
+ return entry.startsWith(prefix ?? "") && entry.endsWith(suffix ?? "");
712
+ }
713
+ function collectExtensions(projectRoot) {
714
+ const found = /* @__PURE__ */ new Set();
715
+ const stack = [projectRoot];
716
+ while (stack.length > 0) {
717
+ const current = stack.pop();
718
+ if (!current) {
719
+ continue;
720
+ }
721
+ let entries;
722
+ try {
723
+ entries = readdirSync(current, { withFileTypes: true });
724
+ } catch {
725
+ continue;
726
+ }
727
+ for (const entry of entries) {
728
+ if (entry.name.startsWith(".") && !entry.name.endsWith("proj") && !entry.name.endsWith("sln")) {
729
+ if (entry.isDirectory()) {
730
+ continue;
731
+ }
567
732
  }
568
- if (existsSync2(join2(projectRoot, file))) {
569
- if (!detected.includes(marker.language)) {
570
- detected.push(marker.language);
733
+ const fullPath = join3(current, entry.name);
734
+ if (entry.isDirectory()) {
735
+ if (!IGNORED_DIRS.has(entry.name)) {
736
+ stack.push(fullPath);
571
737
  }
572
- break;
738
+ continue;
739
+ }
740
+ const extension = extname(entry.name).toLowerCase();
741
+ if (extension) {
742
+ found.add(extension);
573
743
  }
574
744
  }
575
745
  }
576
- if (detected.includes("typescript")) {
577
- const jsIdx = detected.indexOf("javascript");
578
- if (jsIdx !== -1) detected.splice(jsIdx, 1);
746
+ return found;
747
+ }
748
+ function hasExtension(extensionSet, extensions) {
749
+ if (!extensions?.length) {
750
+ return false;
751
+ }
752
+ return extensions.some((extension) => extensionSet.has(extension));
753
+ }
754
+ function removeLanguage(detected, language) {
755
+ const index = detected.indexOf(language);
756
+ if (index !== -1) {
757
+ detected.splice(index, 1);
579
758
  }
580
- return detected;
581
759
  }
582
760
 
583
761
  // src/reindex/indexers.ts
762
+ import { existsSync as existsSync4, readdirSync as readdirSync2 } from "fs";
763
+ import { join as join4 } from "path";
584
764
  var INDEXER_CONFIGS = {
585
765
  typescript: {
586
766
  language: "typescript",
@@ -620,9 +800,7 @@ var INDEXER_CONFIGS = {
620
800
  args: ["index", "--output", outputPath]
621
801
  }),
622
802
  markerFiles: ["pom.xml", "build.gradle"],
623
- installMethods: [
624
- { label: "coursier", prerequisite: "cs", binary: "cs", args: ["install", "scip-java"] }
625
- ],
803
+ installMethods: [],
626
804
  installUrl: "https://github.com/sourcegraph/scip-java/releases"
627
805
  },
628
806
  scala: {
@@ -634,9 +812,7 @@ var INDEXER_CONFIGS = {
634
812
  args: ["index", "--output", outputPath]
635
813
  }),
636
814
  markerFiles: ["build.sbt"],
637
- installMethods: [
638
- { label: "coursier", prerequisite: "cs", binary: "cs", args: ["install", "scip-java"] }
639
- ],
815
+ installMethods: [],
640
816
  installUrl: "https://github.com/sourcegraph/scip-java/releases"
641
817
  },
642
818
  kotlin: {
@@ -648,9 +824,7 @@ var INDEXER_CONFIGS = {
648
824
  args: ["index", "--output", outputPath]
649
825
  }),
650
826
  markerFiles: ["build.gradle.kts"],
651
- installMethods: [
652
- { label: "coursier", prerequisite: "cs", binary: "cs", args: ["install", "scip-java"] }
653
- ],
827
+ installMethods: [],
654
828
  installUrl: "https://github.com/sourcegraph/scip-java/releases"
655
829
  },
656
830
  rust: {
@@ -686,10 +860,11 @@ var INDEXER_CONFIGS = {
686
860
  language: "ruby",
687
861
  indexerBinary: "scip-ruby",
688
862
  checkCommand: "scip-ruby --version",
689
- indexArgs: ({ outputPath }) => ({
690
- binary: "scip-ruby",
691
- args: ["--output", outputPath]
863
+ indexArgs: ({ indexerBinary }) => ({
864
+ binary: indexerBinary,
865
+ args: ["--dir", "."]
692
866
  }),
867
+ defaultOutputPath: "index.scip",
693
868
  markerFiles: ["Gemfile"],
694
869
  installMethods: [],
695
870
  installUrl: "https://github.com/sourcegraph/scip-ruby/releases"
@@ -714,7 +889,7 @@ var INDEXER_CONFIGS = {
714
889
  checkCommand: "scip-clang --version",
715
890
  indexArgs: ({ outputPath }) => ({
716
891
  binary: "scip-clang",
717
- args: ["--output", outputPath]
892
+ args: ["--compdb-path", "compile_commands.json", "--index-output-path", outputPath]
718
893
  }),
719
894
  markerFiles: ["CMakeLists.txt", "Makefile"],
720
895
  installMethods: [],
@@ -726,7 +901,7 @@ var INDEXER_CONFIGS = {
726
901
  checkCommand: "scip-clang --version",
727
902
  indexArgs: ({ outputPath }) => ({
728
903
  binary: "scip-clang",
729
- args: ["--output", outputPath]
904
+ args: ["--compdb-path", "compile_commands.json", "--index-output-path", outputPath]
730
905
  }),
731
906
  markerFiles: ["CMakeLists.txt", "Makefile"],
732
907
  installMethods: [],
@@ -736,11 +911,25 @@ var INDEXER_CONFIGS = {
736
911
  language: "csharp",
737
912
  indexerBinary: "scip-dotnet",
738
913
  checkCommand: "scip-dotnet --version",
739
- indexArgs: ({ outputPath }) => ({
914
+ indexArgs: ({ projectRoot, outputPath }) => ({
740
915
  binary: "scip-dotnet",
741
- args: ["index", "--output", outputPath]
916
+ args: ["index", resolveDotnetProject(projectRoot, [".sln", ".csproj"]) ?? projectRoot, "--output", outputPath, "--working-directory", projectRoot]
917
+ }),
918
+ markerFiles: ["*.csproj", "*.sln"],
919
+ installMethods: [
920
+ { label: "dotnet", prerequisite: "dotnet", binary: "dotnet", args: ["tool", "install", "--global", "scip-dotnet"] }
921
+ ],
922
+ installUrl: "https://github.com/sourcegraph/scip-dotnet/releases"
923
+ },
924
+ vb: {
925
+ language: "vb",
926
+ indexerBinary: "scip-dotnet",
927
+ checkCommand: "scip-dotnet --version",
928
+ indexArgs: ({ projectRoot, outputPath }) => ({
929
+ binary: "scip-dotnet",
930
+ args: ["index", resolveDotnetProject(projectRoot, [".sln", ".vbproj"]) ?? projectRoot, "--output", outputPath, "--working-directory", projectRoot]
742
931
  }),
743
- markerFiles: [],
932
+ markerFiles: ["*.vbproj", "*.sln"],
744
933
  installMethods: [
745
934
  { label: "dotnet", prerequisite: "dotnet", binary: "dotnet", args: ["tool", "install", "--global", "scip-dotnet"] }
746
935
  ],
@@ -750,9 +939,9 @@ var INDEXER_CONFIGS = {
750
939
  language: "dart",
751
940
  indexerBinary: "scip-dart",
752
941
  checkCommand: "scip-dart --version",
753
- indexArgs: ({ outputPath }) => ({
754
- binary: "scip-dart",
755
- args: ["index", "--output", outputPath]
942
+ indexArgs: ({ indexerBinary, outputPath }) => ({
943
+ binary: indexerBinary,
944
+ args: ["--output", outputPath]
756
945
  }),
757
946
  markerFiles: ["pubspec.yaml"],
758
947
  installMethods: [
@@ -763,21 +952,44 @@ var INDEXER_CONFIGS = {
763
952
  php: {
764
953
  language: "php",
765
954
  indexerBinary: "scip-php",
955
+ projectLocalBinaries: ["vendor/davidrjenni/scip-php/bin/scip-php", "vendor/bin/scip-php"],
766
956
  checkCommand: "scip-php --version",
767
- indexArgs: ({ outputPath }) => ({
768
- binary: "scip-php",
769
- args: ["index", "--output", outputPath]
770
- }),
957
+ indexArgs: ({ projectRoot, indexerBinary }) => {
958
+ const localBinary = join4(projectRoot, "vendor", "bin", "scip-php");
959
+ const nestedLocalBinary = join4(projectRoot, "vendor", "davidrjenni", "scip-php", "bin", "scip-php");
960
+ const targetBinary = existsSync4(nestedLocalBinary) ? nestedLocalBinary : existsSync4(localBinary) ? localBinary : indexerBinary;
961
+ return {
962
+ binary: "php",
963
+ args: [
964
+ "-d",
965
+ "error_reporting=E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED",
966
+ targetBinary
967
+ ]
968
+ };
969
+ },
970
+ defaultOutputPath: "index.scip",
771
971
  markerFiles: ["composer.json"],
772
- installMethods: [
773
- { label: "composer", prerequisite: "composer", binary: "composer", args: ["global", "require", "davidrjenni/scip-php"] }
774
- ],
972
+ installMethods: [],
775
973
  installUrl: "https://github.com/davidrjenni/scip-php/releases"
776
974
  }
777
975
  };
778
976
  function getIndexerConfig(language) {
779
977
  return INDEXER_CONFIGS[language];
780
978
  }
979
+ function resolveDotnetProject(projectRoot, suffixes) {
980
+ let entries;
981
+ try {
982
+ entries = readdirSync2(projectRoot);
983
+ } catch {
984
+ return null;
985
+ }
986
+ for (const entry of entries) {
987
+ if (suffixes.some((suffix) => entry.endsWith(suffix))) {
988
+ return join4(projectRoot, entry);
989
+ }
990
+ }
991
+ return null;
992
+ }
781
993
 
782
994
  // src/reindex/index.ts
783
995
  async function reindex(opts) {
@@ -787,8 +999,8 @@ async function reindex(opts) {
787
999
  onStatus = console.log,
788
1000
  skipAutoInstall = false
789
1001
  } = opts;
790
- const outputScip = opts.outputScip ?? join3(projectRoot, "index.scip");
791
- const outputDb = opts.outputDb ?? join3(projectRoot, "index.db");
1002
+ const outputScip = opts.outputScip ?? join5(projectRoot, "index.scip");
1003
+ const outputDb = opts.outputDb ?? join5(projectRoot, "index.db");
792
1004
  const start = Date.now();
793
1005
  const languages = opts.languages ?? detectLanguages(projectRoot);
794
1006
  if (languages.length === 0) {
@@ -817,7 +1029,8 @@ async function reindex(opts) {
817
1029
  for (const lang of languages) {
818
1030
  const config = getIndexerConfig(lang);
819
1031
  const binaryLabel = describeIndexerBinary(config);
820
- if (!isIndexerInstalled(config)) {
1032
+ const projectLocalBinary = resolveProjectLocalIndexerBinary(config, projectRoot);
1033
+ if (!projectLocalBinary && !isIndexerInstalled(config)) {
821
1034
  if (skipAutoInstall) {
822
1035
  throw new Error(
823
1036
  `${binaryLabel} is required to index ${lang} but not found on PATH.
@@ -832,7 +1045,7 @@ async function reindex(opts) {
832
1045
  );
833
1046
  }
834
1047
  }
835
- const resolvedBinary = resolveIndexerBinary(config);
1048
+ const resolvedBinary = projectLocalBinary ?? resolveIndexerBinary(config);
836
1049
  if (!resolvedBinary) {
837
1050
  throw new Error(
838
1051
  `${binaryLabel} is required to index ${lang} but was not found on PATH after installation checks.
@@ -840,6 +1053,7 @@ async function reindex(opts) {
840
1053
  );
841
1054
  }
842
1055
  onStatus(`Indexing ${lang} with ${resolvedBinary}...`);
1056
+ const indexerEnv = getIndexerExecutionEnv(config, env, resolvedBinary);
843
1057
  const { binary, args } = config.indexArgs({
844
1058
  projectRoot,
845
1059
  outputPath: outputScip,
@@ -849,7 +1063,7 @@ async function reindex(opts) {
849
1063
  try {
850
1064
  execFileSync3(binary, args, {
851
1065
  cwd: projectRoot,
852
- env,
1066
+ env: indexerEnv,
853
1067
  stdio: "pipe",
854
1068
  maxBuffer: 50 * 1024 * 1024
855
1069
  });
@@ -860,9 +1074,10 @@ async function reindex(opts) {
860
1074
  Make sure ${binaryLabel} is installed and available on PATH.`
861
1075
  );
862
1076
  }
1077
+ moveDefaultOutputIfNeeded(config, projectRoot, outputScip);
863
1078
  }
864
1079
  onStatus("Converting to SQLite...");
865
- if (!existsSync3(outputScip)) {
1080
+ if (!existsSync5(outputScip)) {
866
1081
  throw new Error(`SCIP index not found at ${outputScip} after indexing`);
867
1082
  }
868
1083
  try {
@@ -879,10 +1094,19 @@ Make sure ${binaryLabel} is installed and available on PATH.`
879
1094
  onStatus(`Done in ${(durationMs / 1e3).toFixed(1)}s`);
880
1095
  return { languages, indexPath: outputScip, dbPath: outputDb, durationMs };
881
1096
  }
1097
+ function moveDefaultOutputIfNeeded(config, projectRoot, outputScip) {
1098
+ if (!config.defaultOutputPath) {
1099
+ return;
1100
+ }
1101
+ const defaultOutputPath = join5(projectRoot, config.defaultOutputPath);
1102
+ if (outputScip !== defaultOutputPath && existsSync5(defaultOutputPath)) {
1103
+ renameSync(defaultOutputPath, outputScip);
1104
+ }
1105
+ }
882
1106
 
883
1107
  // src/config.ts
884
- import { readFileSync as readFileSync2, writeFileSync, existsSync as existsSync4, mkdirSync } from "fs";
885
- import { join as join4, resolve } from "path";
1108
+ import { readFileSync as readFileSync2, writeFileSync, existsSync as existsSync6, mkdirSync } from "fs";
1109
+ import { join as join6, resolve } from "path";
886
1110
  import { createHash } from "crypto";
887
1111
  import { homedir } from "os";
888
1112
  var CONFIG_FILENAME = ".scipquery.json";
@@ -893,8 +1117,8 @@ var DEFAULT_WATCH = {
893
1117
  ignore: []
894
1118
  };
895
1119
  function loadProjectConfig(projectRoot) {
896
- const configPath = join4(projectRoot, CONFIG_FILENAME);
897
- if (!existsSync4(configPath)) {
1120
+ const configPath = join6(projectRoot, CONFIG_FILENAME);
1121
+ if (!existsSync6(configPath)) {
898
1122
  return {};
899
1123
  }
900
1124
  try {
@@ -915,23 +1139,23 @@ function resolveCacheDir(projectRoot, config) {
915
1139
  if (envOverride) return ensureDir(envOverride);
916
1140
  if (config?.dbPath) return ensureDir(resolve(projectRoot, config.dbPath));
917
1141
  const xdgCache = process.env["XDG_CACHE_HOME"];
918
- const cacheBase = xdgCache || join4(homedir(), ".cache");
1142
+ const cacheBase = xdgCache || join6(homedir(), ".cache");
919
1143
  const projectHash = createHash("sha256").update(resolve(projectRoot)).digest("hex").slice(0, 12);
920
- const dir = join4(cacheBase, "scip-query", "projects", projectHash);
1144
+ const dir = join6(cacheBase, "scip-query", "projects", projectHash);
921
1145
  return ensureDir(dir);
922
1146
  }
923
1147
  function resolveIndexPaths(projectRoot, config) {
924
1148
  const cacheDir = resolveCacheDir(projectRoot, config);
925
1149
  return {
926
1150
  cacheDir,
927
- dbPath: join4(cacheDir, "index.db"),
928
- indexPath: join4(cacheDir, "index.scip"),
929
- metaPath: join4(cacheDir, "meta.json")
1151
+ dbPath: join6(cacheDir, "index.db"),
1152
+ indexPath: join6(cacheDir, "index.scip"),
1153
+ metaPath: join6(cacheDir, "meta.json")
930
1154
  };
931
1155
  }
932
1156
  function initProjectConfig(projectRoot, languages) {
933
- const configPath = join4(projectRoot, CONFIG_FILENAME);
934
- if (existsSync4(configPath)) {
1157
+ const configPath = join6(projectRoot, CONFIG_FILENAME);
1158
+ if (existsSync6(configPath)) {
935
1159
  return configPath;
936
1160
  }
937
1161
  const config = {
@@ -952,8 +1176,8 @@ function ensureDir(dir) {
952
1176
 
953
1177
  // src/watch.ts
954
1178
  import { watch } from "fs";
955
- import { existsSync as existsSync5, renameSync } from "fs";
956
- import { join as join5, relative } from "path";
1179
+ import { existsSync as existsSync7, renameSync as renameSync2 } from "fs";
1180
+ import { join as join7, relative } from "path";
957
1181
  import { fork } from "child_process";
958
1182
  import ignore2 from "ignore";
959
1183
  var Watcher = class {
@@ -1031,7 +1255,7 @@ var Watcher = class {
1031
1255
  }
1032
1256
  // ── Internal ─────────────────────────────────────────────
1033
1257
  handleFileChange(filename) {
1034
- const rel = relative(this.projectRoot, join5(this.projectRoot, filename));
1258
+ const rel = relative(this.projectRoot, join7(this.projectRoot, filename));
1035
1259
  if (this.gitignoreFilter.isIgnored(rel)) return;
1036
1260
  if (this.extraIgnore.ignores(rel)) return;
1037
1261
  if (filename.endsWith("index.db") || filename.endsWith("index.scip") || filename.endsWith("index.db.tmp") || filename.endsWith(".scipquery.json")) {
@@ -1134,11 +1358,11 @@ var Watcher = class {
1134
1358
  child.on("exit", (code2) => {
1135
1359
  if (code2 === 0) {
1136
1360
  try {
1137
- if (existsSync5(tmpDb)) {
1138
- renameSync(tmpDb, this.indexPaths.dbPath);
1361
+ if (existsSync7(tmpDb)) {
1362
+ renameSync2(tmpDb, this.indexPaths.dbPath);
1139
1363
  }
1140
- if (existsSync5(tmpScip)) {
1141
- renameSync(tmpScip, this.indexPaths.indexPath);
1364
+ if (existsSync7(tmpScip)) {
1365
+ renameSync2(tmpScip, this.indexPaths.indexPath);
1142
1366
  }
1143
1367
  resolve3(Date.now() - start);
1144
1368
  } catch (err) {
@@ -1162,25 +1386,31 @@ function tempScipPath(indexPath) {
1162
1386
 
1163
1387
  // src/setup.ts
1164
1388
  import {
1165
- existsSync as existsSync6,
1389
+ existsSync as existsSync8,
1166
1390
  mkdirSync as mkdirSync2,
1167
1391
  symlinkSync,
1168
1392
  readlinkSync,
1169
1393
  unlinkSync
1170
1394
  } from "fs";
1171
- import { join as join6, dirname as dirname2, resolve as resolve2 } from "path";
1395
+ import { join as join8, dirname as dirname2, resolve as resolve2 } from "path";
1172
1396
  import { homedir as homedir2, platform as platform3 } from "os";
1173
1397
  import { fileURLToPath } from "url";
1174
1398
  var IS_WINDOWS3 = platform3() === "win32";
1175
- var SKILLS = ["concrete-plan", "scip-explore", "scip-debloat", "scip-verify"];
1399
+ var BUILTIN_SKILLS = [
1400
+ "concrete-plan",
1401
+ "scip-explore",
1402
+ "scip-debloat",
1403
+ "scip-verify",
1404
+ "scip-language-playbook"
1405
+ ];
1176
1406
  function installSkills(opts = {}) {
1177
1407
  const log = opts.quiet ? () => {
1178
1408
  } : console.log;
1179
1409
  const thisFile = fileURLToPath(import.meta.url);
1180
1410
  const skillsSource = resolve2(dirname2(thisFile), "..", "skills");
1181
1411
  const targets = [
1182
- join6(homedir2(), ".claude", "skills"),
1183
- join6(homedir2(), ".codex", "skills")
1412
+ join8(homedir2(), ".claude", "skills"),
1413
+ join8(homedir2(), ".codex", "skills")
1184
1414
  ];
1185
1415
  const result = {
1186
1416
  installed: [],
@@ -1189,19 +1419,19 @@ function installSkills(opts = {}) {
1189
1419
  };
1190
1420
  for (const targetDir of targets) {
1191
1421
  const parentDir = dirname2(targetDir);
1192
- if (!existsSync6(parentDir)) {
1422
+ if (!existsSync8(parentDir)) {
1193
1423
  continue;
1194
1424
  }
1195
1425
  mkdirSync2(targetDir, { recursive: true });
1196
1426
  const toolName = targetDir.includes(".codex") ? "Codex" : "Claude";
1197
- for (const skill of SKILLS) {
1198
- const source = join6(skillsSource, skill);
1199
- const target = join6(targetDir, skill);
1200
- if (!existsSync6(source)) {
1427
+ for (const skill of BUILTIN_SKILLS) {
1428
+ const source = join8(skillsSource, skill);
1429
+ const target = join8(targetDir, skill);
1430
+ if (!existsSync8(source)) {
1201
1431
  result.skipped.push(`${toolName}/${skill}`);
1202
1432
  continue;
1203
1433
  }
1204
- if (existsSync6(target)) {
1434
+ if (existsSync8(target)) {
1205
1435
  try {
1206
1436
  const existing = readlinkSync(target);
1207
1437
  if (resolve2(existing) === resolve2(source)) {
@@ -1245,7 +1475,6 @@ export {
1245
1475
  deps,
1246
1476
  detectLanguages,
1247
1477
  diffImpact,
1248
- docCoverage,
1249
1478
  drift,
1250
1479
  extractCandidates,
1251
1480
  fanIn,