scip-query 0.3.5 → 0.4.1
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.
- package/README.md +2 -1
- package/dist/{chunk-VMM4SYV4.js → chunk-24LF6IZB.js} +17 -4
- package/dist/{chunk-EPWLXXBL.js → chunk-3NJSJ7TE.js} +28 -30
- package/dist/{chunk-SMDCNPMK.js → chunk-43A4UCS7.js} +3 -3
- package/dist/{chunk-CHDJXYBG.js → chunk-5GCORUNV.js} +3 -3
- package/dist/{chunk-OIDHN6GD.js → chunk-6CH23IAS.js} +148 -7
- package/dist/chunk-6ECR2FLR.js +60 -0
- package/dist/{chunk-C7H5WBTJ.js → chunk-6UZU7DFL.js} +3 -3
- package/dist/chunk-7BS4CPJX.js +162 -0
- package/dist/{chunk-UGQKAVCD.js → chunk-A6XLXV6W.js} +3 -3
- package/dist/chunk-ALUFWH3U.js +2695 -0
- package/dist/{chunk-F7XU27LU.js → chunk-CBIWNZZZ.js} +27 -3
- package/dist/{chunk-26DOJ63W.js → chunk-DUJNJQPO.js} +14 -3
- package/dist/{chunk-GSH2FPKV.js → chunk-EAGKJFDX.js} +3 -3
- package/dist/{chunk-VIYSWZCO.js → chunk-ELFGD5EW.js} +32 -4
- package/dist/chunk-FVJE4MQL.js +37 -0
- package/dist/{chunk-NFS5W3PP.js → chunk-GNAMV3JC.js} +3 -3
- package/dist/{chunk-TRESG7OB.js → chunk-J47VSL6I.js} +3 -3
- package/dist/chunk-J6QXMYAQ.js +115 -0
- package/dist/{chunk-6FKIA6EI.js → chunk-JHVQB4Y5.js} +12 -12
- package/dist/{chunk-YY4QGUQ5.js → chunk-JKXHHV4B.js} +2 -2
- package/dist/{chunk-EN2Z2CLO.js → chunk-KG4OFQEN.js} +17 -20
- package/dist/chunk-KLNKDX6A.js +110 -0
- package/dist/{chunk-5OMVSV6E.js → chunk-KYPXKV64.js} +3 -3
- package/dist/chunk-NXUIWD6K.js +87 -0
- package/dist/{chunk-LFJQVJYJ.js → chunk-OXX3QF24.js} +2 -2
- package/dist/{chunk-NG5F43OU.js → chunk-P3VCDYMJ.js} +70 -1
- package/dist/{chunk-7HK5ZLOE.js → chunk-PCU455MX.js} +2 -2
- package/dist/{chunk-O7Q7FDUJ.js → chunk-POLELLNM.js} +3 -3
- package/dist/chunk-PU2254N2.js +115 -0
- package/dist/{chunk-WGAD3GNR.js → chunk-QMXSLHZP.js} +5 -5
- package/dist/{chunk-YDBXNPYU.js → chunk-R7HPHMRZ.js} +3 -3
- package/dist/{chunk-HLUS2HEB.js → chunk-RE7POFGI.js} +5 -4
- package/dist/{chunk-VT4JBH6L.js → chunk-RJ5GULL6.js} +2 -2
- package/dist/{chunk-7KIMF5PV.js → chunk-RL74LF47.js} +2 -2
- package/dist/chunk-SVLUJSY7.js +75 -0
- package/dist/chunk-SYQR4QGK.js +38 -0
- package/dist/{chunk-QIXNAB5K.js → chunk-TO3L4YNK.js} +1 -2
- package/dist/{chunk-P3E6L7KW.js → chunk-TWVXFKJA.js} +84 -4
- package/dist/chunk-UJWI5CBB.js +75 -0
- package/dist/{chunk-J3JSOSUO.js → chunk-VKBOLNYN.js} +3 -3
- package/dist/{chunk-KBOQX573.js → chunk-VY2L4TP6.js} +20 -3
- package/dist/{chunk-KKCHYLVI.js → chunk-W46L2BXT.js} +2 -2
- package/dist/chunk-XUVPQDXW.js +34 -0
- package/dist/{chunk-DH7G3DDV.js → chunk-Z5VSUOEE.js} +2 -2
- package/dist/{chunk-GEXE2T6I.js → chunk-ZVZAIIB5.js} +23 -15
- package/dist/cli.js +2838 -870
- package/dist/{db-viWlyVtv.d.ts → db-C4rPbKkI.d.ts} +6 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +376 -142
- package/dist/postinstall.js +9 -3
- package/dist/queries/affected.d.ts +1 -1
- package/dist/queries/affected.js +3 -3
- package/dist/queries/bottlenecks.d.ts +1 -1
- package/dist/queries/bottlenecks.js +3 -2
- package/dist/queries/by-kind.d.ts +1 -1
- package/dist/queries/by-kind.js +3 -2
- package/dist/queries/call-graph.d.ts +1 -1
- package/dist/queries/call-graph.js +3 -3
- package/dist/queries/change-surface.d.ts +1 -1
- package/dist/queries/change-surface.js +3 -3
- package/dist/queries/code.d.ts +1 -1
- package/dist/queries/code.js +3 -3
- package/dist/queries/complexity-hotspots.d.ts +1 -1
- package/dist/queries/complexity-hotspots.js +3 -3
- package/dist/queries/complexity.d.ts +1 -1
- package/dist/queries/complexity.js +3 -3
- package/dist/queries/convergence.d.ts +1 -1
- package/dist/queries/convergence.js +3 -3
- package/dist/queries/coupling.d.ts +1 -1
- package/dist/queries/coupling.js +3 -3
- package/dist/queries/cycles.d.ts +1 -1
- package/dist/queries/cycles.js +3 -3
- package/dist/queries/dataflow.d.ts +1 -1
- package/dist/queries/dataflow.js +3 -3
- package/dist/queries/dead.d.ts +1 -1
- package/dist/queries/dead.js +4 -4
- package/dist/queries/deep-chains.d.ts +1 -1
- package/dist/queries/deep-chains.js +3 -3
- package/dist/queries/deps.d.ts +1 -1
- package/dist/queries/deps.js +3 -3
- package/dist/queries/diff-impact.d.ts +1 -1
- package/dist/queries/diff-impact.js +2 -2
- package/dist/queries/drift.d.ts +1 -1
- package/dist/queries/drift.js +3 -3
- package/dist/queries/extract-candidates.d.ts +1 -1
- package/dist/queries/extract-candidates.js +3 -3
- package/dist/queries/fan.d.ts +1 -1
- package/dist/queries/fan.js +3 -3
- package/dist/queries/files.d.ts +1 -1
- package/dist/queries/health.d.ts +1 -1
- package/dist/queries/health.js +14 -14
- package/dist/queries/hierarchy.d.ts +1 -1
- package/dist/queries/hierarchy.js +3 -3
- package/dist/queries/hotspots.d.ts +1 -1
- package/dist/queries/hotspots.js +3 -2
- package/dist/queries/imports.d.ts +1 -1
- package/dist/queries/imports.js +3 -3
- package/dist/queries/index.d.ts +1 -1
- package/dist/queries/index.js +44 -44
- package/dist/queries/isolated.d.ts +3 -4
- package/dist/queries/isolated.js +4 -4
- package/dist/queries/members.d.ts +1 -1
- package/dist/queries/members.js +3 -3
- package/dist/queries/methods.d.ts +1 -1
- package/dist/queries/methods.js +3 -2
- package/dist/queries/outline.d.ts +1 -1
- package/dist/queries/outline.js +3 -3
- package/dist/queries/passthrough-candidates.d.ts +1 -1
- package/dist/queries/passthrough-candidates.js +3 -3
- package/dist/queries/redundant-reexports.d.ts +1 -1
- package/dist/queries/redundant-reexports.js +4 -4
- package/dist/queries/refs.d.ts +1 -1
- package/dist/queries/refs.js +3 -3
- package/dist/queries/similar-chains.d.ts +1 -1
- package/dist/queries/similar-chains.js +3 -3
- package/dist/queries/similar-files.d.ts +1 -1
- package/dist/queries/similar-files.js +3 -3
- package/dist/queries/similar-signatures.d.ts +5 -3
- package/dist/queries/similar-signatures.js +3 -2
- package/dist/queries/similar.d.ts +1 -1
- package/dist/queries/similar.js +3 -3
- package/dist/queries/slice.d.ts +1 -1
- package/dist/queries/slice.js +3 -3
- package/dist/queries/stale-abstractions.d.ts +1 -1
- package/dist/queries/stale-abstractions.js +3 -3
- package/dist/queries/stats.d.ts +1 -1
- package/dist/queries/surface.d.ts +1 -1
- package/dist/queries/surface.js +3 -3
- package/dist/queries/symbols.d.ts +1 -1
- package/dist/queries/symbols.js +3 -3
- package/dist/queries/system.d.ts +1 -1
- package/dist/queries/system.js +3 -3
- package/dist/queries/trace.d.ts +1 -1
- package/dist/queries/trace.js +3 -3
- package/dist/queries/wrapper-candidates.d.ts +1 -1
- package/dist/queries/wrapper-candidates.js +3 -3
- package/dist/reindex-worker.js +216 -64
- package/package.json +5 -1
- package/skills/scip-language-playbook/SKILL.md +371 -0
- package/dist/chunk-4JCSOF2O.js +0 -97
- package/dist/chunk-AXQKUYKF.js +0 -1442
- package/dist/chunk-CPVAQJEC.js +0 -46
- package/dist/chunk-EOROMIFO.js +0 -41
- package/dist/chunk-GU2H5QRN.js +0 -28
- package/dist/chunk-LQJUPXQY.js +0 -109
- package/dist/chunk-MPGIHELS.js +0 -39
- package/dist/chunk-TOIEB3LG.js +0 -78
- package/dist/chunk-UQEQ6AHX.js +0 -60
- package/dist/chunk-VJJKSGIX.js +0 -121
- package/dist/chunk-YGGFLMTM.js +0 -83
- package/dist/chunk-ZEUCXQBN.js +0 -71
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scip-language-playbook
|
|
3
|
+
description: Pick the highest-signal scip-query commands for the language in front of you so you can understand a system granularly and find DRY or de-bloat opportunities without wandering through low-signal queries first.
|
|
4
|
+
allowed-tools: [Bash, Write, Edit, Glob, Agent, TaskCreate, TaskUpdate, TaskGet, TaskList]
|
|
5
|
+
keywords: [language, playbook, commands, cheat-sheet, understand, granular, flow, dry, debloat, consolidate, similarity, ts, typescript, python, java, scala, kotlin, rust, cpp, c, ruby, csharp, vb, dart, php]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Best scip-query Commands by Language
|
|
9
|
+
|
|
10
|
+
Use this skill when you want the shortest path from "what is this system doing?" to verified answers, or when you want the fastest way to spot duplication, indirection, and stale structure in a language-specific codebase.
|
|
11
|
+
|
|
12
|
+
This playbook is grounded in verified fixtures:
|
|
13
|
+
- TypeScript and Python are backed by the dedicated regression fixtures in `scip-query/tests`.
|
|
14
|
+
- Java, Scala, Kotlin, Rust, C++, C, Ruby, C#, Visual Basic, Dart, and PHP are backed by the cross-language fixture lab in `scip_repos`.
|
|
15
|
+
|
|
16
|
+
## Hard Rules
|
|
17
|
+
|
|
18
|
+
1. Start with the commands listed for the active language before reaching for broader or noisier commands.
|
|
19
|
+
2. For behavior claims, pair graph commands with source commands: `trace`, `call-graph`, and `refs` tell you the relationships; `code` confirms the actual implementation.
|
|
20
|
+
3. For de-bloat work, do not rely on a single command. Cross-check `dead`, `similar*`, `wrapper-candidates`, `passthrough-candidates`, `stale-abstractions`, `unused-imports`, and `drift`.
|
|
21
|
+
4. When a command is weaker in a language, the table below tells you the safer fallback.
|
|
22
|
+
|
|
23
|
+
## Universal First Pass
|
|
24
|
+
|
|
25
|
+
Run these in almost every codebase, regardless of language:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
scip-query stats
|
|
29
|
+
scip-query files <feature-or-module-name>
|
|
30
|
+
scip-query symbols <file>
|
|
31
|
+
scip-query trace <symbol>
|
|
32
|
+
scip-query code <symbol>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Then switch to the language row below.
|
|
36
|
+
|
|
37
|
+
## Language Playbook
|
|
38
|
+
|
|
39
|
+
### TypeScript
|
|
40
|
+
|
|
41
|
+
Use first:
|
|
42
|
+
```bash
|
|
43
|
+
scip-query system <module>
|
|
44
|
+
scip-query surface <module>
|
|
45
|
+
scip-query call-graph <symbol>
|
|
46
|
+
scip-query dataflow <symbol>
|
|
47
|
+
scip-query change-surface <file>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Best de-bloat set:
|
|
51
|
+
```bash
|
|
52
|
+
scip-query health
|
|
53
|
+
scip-query dead
|
|
54
|
+
scip-query similar <symbol>
|
|
55
|
+
scip-query convergence <symbol1> <symbol2>
|
|
56
|
+
scip-query wrapper-candidates
|
|
57
|
+
scip-query passthrough-candidates
|
|
58
|
+
scip-query stale-abstractions
|
|
59
|
+
scip-query unused-imports <file>
|
|
60
|
+
scip-query redundant-reexports
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Why this row is strong: TypeScript has the broadest verified command surface in the current suite, especially for imports, members, call flow, change risk, and DRY analysis.
|
|
64
|
+
|
|
65
|
+
### Python
|
|
66
|
+
|
|
67
|
+
Use first:
|
|
68
|
+
```bash
|
|
69
|
+
scip-query symbols <file>
|
|
70
|
+
scip-query outline <file>
|
|
71
|
+
scip-query system <module-or-file>
|
|
72
|
+
scip-query imports <file>
|
|
73
|
+
scip-query imported-by <symbol>
|
|
74
|
+
scip-query call-graph <symbol>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Best de-bloat set:
|
|
78
|
+
```bash
|
|
79
|
+
scip-query dead
|
|
80
|
+
scip-query unused-imports <file>
|
|
81
|
+
scip-query drift
|
|
82
|
+
scip-query similar-signatures
|
|
83
|
+
scip-query complexity <symbol>
|
|
84
|
+
scip-query complexity-hotspots
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Fallback note: Python indexes can omit some kind and call metadata, so `symbols`, `outline`, `imports`, and `call-graph` are especially important because the tool already compensates for those gaps with source-backed fallbacks.
|
|
88
|
+
|
|
89
|
+
### Java
|
|
90
|
+
|
|
91
|
+
Use first:
|
|
92
|
+
```bash
|
|
93
|
+
scip-query system <module>
|
|
94
|
+
scip-query surface <module>
|
|
95
|
+
scip-query call-graph <symbol>
|
|
96
|
+
scip-query deps <file>
|
|
97
|
+
scip-query rdeps <file>
|
|
98
|
+
scip-query slice <symbol>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Best de-bloat set:
|
|
102
|
+
```bash
|
|
103
|
+
scip-query health
|
|
104
|
+
scip-query dead
|
|
105
|
+
scip-query similar-files
|
|
106
|
+
scip-query similar-chains
|
|
107
|
+
scip-query wrapper-candidates
|
|
108
|
+
scip-query stale-abstractions
|
|
109
|
+
scip-query extract-candidates
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Scala
|
|
113
|
+
|
|
114
|
+
Use first:
|
|
115
|
+
```bash
|
|
116
|
+
scip-query surface <module>
|
|
117
|
+
scip-query trace <symbol>
|
|
118
|
+
scip-query call-graph <symbol>
|
|
119
|
+
scip-query imports <file>
|
|
120
|
+
scip-query imported-by <symbol>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Best de-bloat set:
|
|
124
|
+
```bash
|
|
125
|
+
scip-query dead
|
|
126
|
+
scip-query similar-files
|
|
127
|
+
scip-query similar-chains
|
|
128
|
+
scip-query extract-candidates
|
|
129
|
+
scip-query stale-abstractions
|
|
130
|
+
scip-query unused-imports <file>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Kotlin
|
|
134
|
+
|
|
135
|
+
Use first:
|
|
136
|
+
```bash
|
|
137
|
+
scip-query surface <module>
|
|
138
|
+
scip-query trace <symbol>
|
|
139
|
+
scip-query call-graph <symbol>
|
|
140
|
+
scip-query imports <file>
|
|
141
|
+
scip-query imported-by <symbol>
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Best de-bloat set:
|
|
145
|
+
```bash
|
|
146
|
+
scip-query dead
|
|
147
|
+
scip-query similar-files
|
|
148
|
+
scip-query similar-chains
|
|
149
|
+
scip-query extract-candidates
|
|
150
|
+
scip-query stale-abstractions
|
|
151
|
+
scip-query unused-imports <file>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Rust
|
|
155
|
+
|
|
156
|
+
Use first:
|
|
157
|
+
```bash
|
|
158
|
+
scip-query trace <symbol>
|
|
159
|
+
scip-query call-graph <symbol>
|
|
160
|
+
scip-query refs <symbol>
|
|
161
|
+
scip-query methods <type>
|
|
162
|
+
scip-query surface <module>
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Best de-bloat set:
|
|
166
|
+
```bash
|
|
167
|
+
scip-query dead
|
|
168
|
+
scip-query wrapper-candidates
|
|
169
|
+
scip-query passthrough-candidates
|
|
170
|
+
scip-query stale-abstractions
|
|
171
|
+
scip-query similar-signatures
|
|
172
|
+
scip-query redundant-reexports
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### C++
|
|
176
|
+
|
|
177
|
+
Use first:
|
|
178
|
+
```bash
|
|
179
|
+
scip-query trace <symbol>
|
|
180
|
+
scip-query refs <symbol>
|
|
181
|
+
scip-query methods <class>
|
|
182
|
+
scip-query surface <module>
|
|
183
|
+
scip-query code <symbol>
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Then try:
|
|
187
|
+
```bash
|
|
188
|
+
scip-query call-graph <symbol>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Fallback note: `call-graph` is useful here, but `trace`, `refs`, and `code` are the safer first-line tools when you need to be absolutely precise.
|
|
192
|
+
|
|
193
|
+
Best de-bloat set:
|
|
194
|
+
```bash
|
|
195
|
+
scip-query dead
|
|
196
|
+
scip-query wrapper-candidates
|
|
197
|
+
scip-query similar-files
|
|
198
|
+
scip-query similar-chains
|
|
199
|
+
scip-query extract-candidates
|
|
200
|
+
scip-query unused-imports <file>
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### C
|
|
204
|
+
|
|
205
|
+
Use first:
|
|
206
|
+
```bash
|
|
207
|
+
scip-query trace <symbol>
|
|
208
|
+
scip-query call-graph <symbol>
|
|
209
|
+
scip-query refs <symbol>
|
|
210
|
+
scip-query symbols <file>
|
|
211
|
+
scip-query outline <file>
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Skip:
|
|
215
|
+
```bash
|
|
216
|
+
scip-query methods <class>
|
|
217
|
+
scip-query members <symbol>
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Best de-bloat set:
|
|
221
|
+
```bash
|
|
222
|
+
scip-query dead
|
|
223
|
+
scip-query wrapper-candidates
|
|
224
|
+
scip-query similar-files
|
|
225
|
+
scip-query similar-chains
|
|
226
|
+
scip-query extract-candidates
|
|
227
|
+
scip-query unused-imports <file>
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Ruby
|
|
231
|
+
|
|
232
|
+
Use first:
|
|
233
|
+
```bash
|
|
234
|
+
scip-query trace <symbol>
|
|
235
|
+
scip-query call-graph <symbol>
|
|
236
|
+
scip-query refs <symbol>
|
|
237
|
+
scip-query imports <file>
|
|
238
|
+
scip-query imported-by <symbol>
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Best de-bloat set:
|
|
242
|
+
```bash
|
|
243
|
+
scip-query dead
|
|
244
|
+
scip-query wrapper-candidates
|
|
245
|
+
scip-query passthrough-candidates
|
|
246
|
+
scip-query stale-abstractions
|
|
247
|
+
scip-query similar-files
|
|
248
|
+
scip-query similar-signatures
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### C#
|
|
252
|
+
|
|
253
|
+
Use first:
|
|
254
|
+
```bash
|
|
255
|
+
scip-query surface <module>
|
|
256
|
+
scip-query call-graph <symbol>
|
|
257
|
+
scip-query trace <symbol>
|
|
258
|
+
scip-query methods <class>
|
|
259
|
+
scip-query refs <symbol>
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Best de-bloat set:
|
|
263
|
+
```bash
|
|
264
|
+
scip-query dead
|
|
265
|
+
scip-query wrapper-candidates
|
|
266
|
+
scip-query passthrough-candidates
|
|
267
|
+
scip-query stale-abstractions
|
|
268
|
+
scip-query similar-files
|
|
269
|
+
scip-query extract-candidates
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Visual Basic
|
|
273
|
+
|
|
274
|
+
Use first:
|
|
275
|
+
```bash
|
|
276
|
+
scip-query surface <module>
|
|
277
|
+
scip-query call-graph <symbol>
|
|
278
|
+
scip-query trace <symbol>
|
|
279
|
+
scip-query methods <class>
|
|
280
|
+
scip-query refs <symbol>
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
Best de-bloat set:
|
|
284
|
+
```bash
|
|
285
|
+
scip-query dead
|
|
286
|
+
scip-query wrapper-candidates
|
|
287
|
+
scip-query passthrough-candidates
|
|
288
|
+
scip-query stale-abstractions
|
|
289
|
+
scip-query similar-files
|
|
290
|
+
scip-query extract-candidates
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Dart
|
|
294
|
+
|
|
295
|
+
Use first:
|
|
296
|
+
```bash
|
|
297
|
+
scip-query surface <module>
|
|
298
|
+
scip-query call-graph <symbol>
|
|
299
|
+
scip-query trace <symbol>
|
|
300
|
+
scip-query imports <file>
|
|
301
|
+
scip-query imported-by <symbol>
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
Best de-bloat set:
|
|
305
|
+
```bash
|
|
306
|
+
scip-query dead
|
|
307
|
+
scip-query wrapper-candidates
|
|
308
|
+
scip-query stale-abstractions
|
|
309
|
+
scip-query similar-files
|
|
310
|
+
scip-query similar-signatures
|
|
311
|
+
scip-query redundant-reexports
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### PHP
|
|
315
|
+
|
|
316
|
+
Use first:
|
|
317
|
+
```bash
|
|
318
|
+
scip-query trace <symbol>
|
|
319
|
+
scip-query refs <symbol>
|
|
320
|
+
scip-query methods <class>
|
|
321
|
+
scip-query surface <module>
|
|
322
|
+
scip-query code <symbol>
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
Then try:
|
|
326
|
+
```bash
|
|
327
|
+
scip-query call-graph <symbol>
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Fallback note: as with C++, the graph is useful, but `trace`, `refs`, and `code` are the more reliable first pass when you need a crisp explanation.
|
|
331
|
+
|
|
332
|
+
Best de-bloat set:
|
|
333
|
+
```bash
|
|
334
|
+
scip-query dead
|
|
335
|
+
scip-query wrapper-candidates
|
|
336
|
+
scip-query stale-abstractions
|
|
337
|
+
scip-query similar-files
|
|
338
|
+
scip-query similar-signatures
|
|
339
|
+
scip-query extract-candidates
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
## Minimal Workflows
|
|
343
|
+
|
|
344
|
+
### Understand a feature quickly
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
scip-query files <feature>
|
|
348
|
+
scip-query symbols <file>
|
|
349
|
+
scip-query trace <entry-symbol>
|
|
350
|
+
scip-query call-graph <entry-symbol>
|
|
351
|
+
scip-query code <entry-symbol>
|
|
352
|
+
scip-query surface <module>
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### Find DRY and de-bloat wins quickly
|
|
356
|
+
|
|
357
|
+
```bash
|
|
358
|
+
scip-query health
|
|
359
|
+
scip-query dead
|
|
360
|
+
scip-query wrapper-candidates
|
|
361
|
+
scip-query passthrough-candidates
|
|
362
|
+
scip-query stale-abstractions
|
|
363
|
+
scip-query similar-files
|
|
364
|
+
scip-query similar-chains
|
|
365
|
+
scip-query similar-signatures
|
|
366
|
+
scip-query extract-candidates
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
## Reporting Rule
|
|
370
|
+
|
|
371
|
+
When you recommend a command sequence, name the language and explain why those commands are the highest-signal ones for that language. If a command is only sweep-proven rather than strictly source-truth-graded, say so when the distinction matters.
|
package/dist/chunk-4JCSOF2O.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
testFileExclusionSql
|
|
3
|
-
} from "./chunk-AXQKUYKF.js";
|
|
4
|
-
import {
|
|
5
|
-
shortenSymbol
|
|
6
|
-
} from "./chunk-QIXNAB5K.js";
|
|
7
|
-
|
|
8
|
-
// src/queries/wrapper-candidates.ts
|
|
9
|
-
function wrapperCandidates(db, opts) {
|
|
10
|
-
const { scope, maxLoc = 15, limit = 30 } = opts ?? {};
|
|
11
|
-
const scopeFilter = scope ? `AND d.relative_path LIKE '%${scope}%'` : "";
|
|
12
|
-
const rows = db.all(
|
|
13
|
-
`SELECT * FROM (
|
|
14
|
-
SELECT
|
|
15
|
-
gs.symbol,
|
|
16
|
-
d.relative_path AS file,
|
|
17
|
-
der.start_line,
|
|
18
|
-
der.end_line,
|
|
19
|
-
(der.end_line - der.start_line + 1) AS loc,
|
|
20
|
-
-- The single caller: the symbol whose definition range contains
|
|
21
|
-
-- the chunk that references our target
|
|
22
|
-
(SELECT caller_gs.symbol
|
|
23
|
-
FROM mentions ref_m
|
|
24
|
-
JOIN chunks ref_c ON ref_m.chunk_id = ref_c.id
|
|
25
|
-
JOIN defn_enclosing_ranges caller_der
|
|
26
|
-
ON caller_der.document_id = ref_c.document_id
|
|
27
|
-
AND ref_c.start_line >= caller_der.start_line
|
|
28
|
-
AND ref_c.end_line <= caller_der.end_line
|
|
29
|
-
JOIN global_symbols caller_gs ON caller_der.symbol_id = caller_gs.id
|
|
30
|
-
WHERE ref_m.symbol_id = gs.id
|
|
31
|
-
AND ref_m.role != 1
|
|
32
|
-
AND ref_c.document_id != der.document_id
|
|
33
|
-
LIMIT 1
|
|
34
|
-
) AS caller_symbol,
|
|
35
|
-
-- Fan-in of that single caller
|
|
36
|
-
(SELECT COUNT(DISTINCT caller_ref_c.document_id)
|
|
37
|
-
FROM mentions caller_ref_m
|
|
38
|
-
JOIN chunks caller_ref_c ON caller_ref_m.chunk_id = caller_ref_c.id
|
|
39
|
-
WHERE caller_ref_m.symbol_id = (
|
|
40
|
-
SELECT caller_der2.symbol_id
|
|
41
|
-
FROM mentions ref_m2
|
|
42
|
-
JOIN chunks ref_c2 ON ref_m2.chunk_id = ref_c2.id
|
|
43
|
-
JOIN defn_enclosing_ranges caller_der2
|
|
44
|
-
ON caller_der2.document_id = ref_c2.document_id
|
|
45
|
-
AND ref_c2.start_line >= caller_der2.start_line
|
|
46
|
-
AND ref_c2.end_line <= caller_der2.end_line
|
|
47
|
-
WHERE ref_m2.symbol_id = gs.id
|
|
48
|
-
AND ref_m2.role != 1
|
|
49
|
-
AND ref_c2.document_id != der.document_id
|
|
50
|
-
LIMIT 1
|
|
51
|
-
)
|
|
52
|
-
AND caller_ref_m.role != 1
|
|
53
|
-
) AS caller_fan_in
|
|
54
|
-
FROM global_symbols gs
|
|
55
|
-
JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
|
|
56
|
-
JOIN documents d ON der.document_id = d.id
|
|
57
|
-
WHERE 1 = 1
|
|
58
|
-
${db.pathExclusionsFor("d")}
|
|
59
|
-
AND ${testFileExclusionSql("d")}
|
|
60
|
-
${db.symbolNoiseFor("gs")}
|
|
61
|
-
-- Only functions/terms, not type definitions (types with # are not wrappers)
|
|
62
|
-
AND gs.symbol NOT LIKE '%#'
|
|
63
|
-
AND (der.end_line - der.start_line + 1) <= ?
|
|
64
|
-
AND (der.end_line - der.start_line + 1) >= 2
|
|
65
|
-
${scopeFilter}
|
|
66
|
-
-- Exactly 1 cross-file consumer
|
|
67
|
-
AND (
|
|
68
|
-
SELECT COUNT(DISTINCT ref_c.document_id)
|
|
69
|
-
FROM mentions ref_m
|
|
70
|
-
JOIN chunks ref_c ON ref_m.chunk_id = ref_c.id
|
|
71
|
-
WHERE ref_m.symbol_id = gs.id
|
|
72
|
-
AND ref_m.role != 1
|
|
73
|
-
AND ref_c.document_id != der.document_id
|
|
74
|
-
) = 1
|
|
75
|
-
) WHERE caller_symbol IS NOT NULL AND caller_fan_in > 3
|
|
76
|
-
ORDER BY caller_fan_in DESC, loc DESC
|
|
77
|
-
LIMIT ?`,
|
|
78
|
-
maxLoc,
|
|
79
|
-
limit
|
|
80
|
-
);
|
|
81
|
-
return rows.filter((r) => !db.isIgnored(r.file)).map((r) => ({
|
|
82
|
-
symbol: r.symbol,
|
|
83
|
-
shortName: shortenSymbol(r.symbol),
|
|
84
|
-
file: r.file,
|
|
85
|
-
startLine: r.start_line,
|
|
86
|
-
endLine: r.end_line,
|
|
87
|
-
loc: r.loc,
|
|
88
|
-
singleCaller: r.caller_symbol,
|
|
89
|
-
singleCallerShort: shortenSymbol(r.caller_symbol),
|
|
90
|
-
callerFanIn: r.caller_fan_in
|
|
91
|
-
}));
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export {
|
|
95
|
-
wrapperCandidates
|
|
96
|
-
};
|
|
97
|
-
//# sourceMappingURL=chunk-4JCSOF2O.js.map
|