scip-query 0.7.2 → 0.8.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.
- package/README.md +179 -221
- package/dist/augment-vue-worker.js +1 -1
- package/dist/{chunk-OPWOX7NT.js → chunk-2EC4JTHC.js} +2 -2
- package/dist/{chunk-SVSLAUSJ.js → chunk-46ILZVMX.js} +2 -2
- package/dist/chunk-4A4JFNWG.js +2 -0
- package/dist/{chunk-QBXTQODK.js → chunk-4B7YLRXX.js} +2 -2
- package/dist/chunk-64UY7VTR.js +63 -0
- package/dist/chunk-66ORT3LS.js +2 -0
- package/dist/{chunk-VMS5YTBS.js → chunk-6G76D2YM.js} +2 -2
- package/dist/{chunk-PEU24CSY.js → chunk-6P5W4U6G.js} +2 -2
- package/dist/chunk-6ZFKI5EP.js +40 -0
- package/dist/{chunk-EVXQF7DM.js → chunk-7I6KNKE3.js} +2 -2
- package/dist/{chunk-EIGCLVKK.js → chunk-7TYJD45F.js} +2 -2
- package/dist/chunk-7UZWNW4E.js +2 -0
- package/dist/{chunk-GIRI7FHW.js → chunk-AGW2MVIO.js} +2 -2
- package/dist/chunk-APLCSDXL.js +4 -0
- package/dist/{chunk-JDFWJ7VK.js → chunk-BCFED24F.js} +2 -2
- package/dist/chunk-CVRXOP6M.js +3 -0
- package/dist/{chunk-2QNKEJ7R.js → chunk-D43L5PQF.js} +2 -2
- package/dist/chunk-DJTJ3DLZ.js +7 -0
- package/dist/chunk-EAU4RDFG.js +2 -0
- package/dist/{chunk-BI4F6GXI.js → chunk-EKP7XJ6L.js} +2 -2
- package/dist/{chunk-LLL7THVV.js → chunk-EM2PPDN7.js} +2 -2
- package/dist/{chunk-6QC7SCKV.js → chunk-FIPE5AQT.js} +2 -2
- package/dist/chunk-FTBT4RP2.js +7 -0
- package/dist/{chunk-TB2OYNRS.js → chunk-GD7XRHSV.js} +2 -2
- package/dist/{chunk-XDXZP3BE.js → chunk-GMEBYEMU.js} +2 -2
- package/dist/chunk-GTZAU7OL.js +2 -0
- package/dist/chunk-HVGNOUYP.js +2 -0
- package/dist/chunk-HVXIXDLV.js +2 -0
- package/dist/{chunk-5TB4N27G.js → chunk-I7OTKWNY.js} +2 -2
- package/dist/{chunk-RFCR2BRD.js → chunk-JAMU6FLN.js} +2 -2
- package/dist/chunk-JTCEWV7Q.js +2 -0
- package/dist/chunk-K4Z3FCUJ.js +6 -0
- package/dist/{chunk-WJQFABZN.js → chunk-K6YIGVL7.js} +2 -2
- package/dist/chunk-MKE7SEEX.js +2 -0
- package/dist/chunk-N5D5ZCBW.js +7 -0
- package/dist/{chunk-ROZNBWIF.js → chunk-NGLRXEWN.js} +2 -2
- package/dist/{chunk-IFGEPTH5.js → chunk-NK7TQQG4.js} +2 -2
- package/dist/chunk-NOVKLH2F.js +2 -0
- package/dist/chunk-OIMM7KMI.js +2 -0
- package/dist/chunk-OQSV6OS2.js +2 -0
- package/dist/chunk-PBGTMPJ7.js +2 -0
- package/dist/{chunk-YH6TTQEI.js → chunk-PCMVXWDC.js} +4 -4
- package/dist/{chunk-U75WH4XG.js → chunk-PE4EJOLN.js} +2 -2
- package/dist/chunk-PLFYFZX3.js +2 -0
- package/dist/{chunk-HTVLH3NL.js → chunk-QYQXPPDI.js} +2 -2
- package/dist/{chunk-P7UMQ7R7.js → chunk-RCRK4E7E.js} +2 -2
- package/dist/chunk-RIXOMSOR.js +20 -0
- package/dist/chunk-SB6I6O3P.js +2 -0
- package/dist/{chunk-X2JB54QF.js → chunk-SDGCKEB7.js} +2 -2
- package/dist/chunk-SLOIQKY7.js +2 -0
- package/dist/{chunk-4VYIZV3S.js → chunk-SOGLYIJ4.js} +4 -4
- package/dist/chunk-SSINY7HL.js +4 -0
- package/dist/{chunk-FU5WRWAN.js → chunk-TFO4OMJZ.js} +2 -2
- package/dist/chunk-TH4JVC34.js +71 -0
- package/dist/chunk-TQTVM27C.js +6 -0
- package/dist/{chunk-QP6FLI6D.js → chunk-TR5AU6A5.js} +2 -2
- package/dist/{chunk-4LKJMRT5.js → chunk-UQE3DSXY.js} +2 -2
- package/dist/{chunk-LXJTDFOV.js → chunk-UUDYI3FF.js} +2 -2
- package/dist/chunk-VDZL45XI.js +2 -0
- package/dist/{chunk-XANDY7N5.js → chunk-VN6B6HFB.js} +2 -2
- package/dist/{chunk-SDPP5KVQ.js → chunk-WC43FMAB.js} +2 -2
- package/dist/chunk-WEJYUS5O.js +2 -0
- package/dist/chunk-WQFOZIID.js +4 -0
- package/dist/chunk-XBFLIGWU.js +3 -0
- package/dist/{chunk-TGNL3ZKZ.js → chunk-XSZ5NC4O.js} +2 -2
- package/dist/{chunk-4T35WUCX.js → chunk-Z2AJQ7VA.js} +2 -2
- package/dist/{chunk-S5VMVNFM.js → chunk-ZIIQ55VK.js} +2 -2
- package/dist/chunk-ZJ737ZMD.js +2 -0
- package/dist/cli.js +171 -173
- package/dist/health-C6r2VgpA.d.ts +234 -0
- package/dist/index.d.ts +11 -18
- package/dist/index.js +1 -1
- package/dist/postinstall.js +4 -4
- package/dist/queries/affected.js +1 -1
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.d.ts +66 -0
- package/dist/queries/cleanup-plan.js +2 -0
- package/dist/queries/co-change.d.ts +42 -0
- package/dist/queries/co-change.js +2 -0
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.js +1 -1
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-gate.d.ts +52 -0
- package/dist/queries/diff-gate.js +2 -0
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.d.ts +69 -0
- package/dist/queries/doc-drift.js +2 -0
- package/dist/queries/drift.js +1 -1
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.js +1 -1
- package/dist/queries/health.d.ts +1 -1
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.js +1 -1
- package/dist/queries/index.d.ts +38 -2
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.js +1 -1
- package/dist/queries/outline.d.ts +1 -0
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.d.ts +65 -0
- package/dist/queries/plan-context.js +2 -0
- package/dist/queries/recent-duplicates.d.ts +48 -0
- package/dist/queries/recent-duplicates.js +2 -0
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.d.ts +58 -0
- package/dist/queries/self-audit.js +2 -0
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.d.ts +6 -0
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.js +1 -1
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system.js +1 -1
- package/dist/queries/trace.js +1 -1
- package/dist/queries/unused-params.d.ts +38 -0
- package/dist/queries/unused-params.js +2 -0
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/reindex-worker.js +1 -1
- package/dist/reindex.js +1 -1
- package/dist/runtime.d.ts +3 -2
- package/dist/runtime.js +2 -2
- package/package.json +33 -1
- package/skills/concrete-plan/SKILL.md +37 -7
- package/skills/scip-ai-cleanup/SKILL.md +145 -0
- package/skills/scip-debloat/SKILL.md +37 -7
- package/skills/scip-explore/SKILL.md +22 -9
- package/skills/scip-language-playbook/SKILL.md +4 -4
- package/skills/scip-maintainability/SKILL.md +264 -0
- package/skills/scip-verify/SKILL.md +2 -2
- package/dist/chunk-3X43EYFU.js +0 -3
- package/dist/chunk-4GPWGSOE.js +0 -40
- package/dist/chunk-5RGK4YA5.js +0 -63
- package/dist/chunk-5TT47UMX.js +0 -44
- package/dist/chunk-6QH2L26C.js +0 -71
- package/dist/chunk-6SR4UNWI.js +0 -2
- package/dist/chunk-6XEWA6FX.js +0 -2
- package/dist/chunk-7WHNTKSD.js +0 -2
- package/dist/chunk-BOVNTAKQ.js +0 -3
- package/dist/chunk-D62LLANH.js +0 -2
- package/dist/chunk-EDXML2HI.js +0 -4
- package/dist/chunk-EZQOVY3C.js +0 -2
- package/dist/chunk-IODTPF5H.js +0 -20
- package/dist/chunk-KJ6CW6EK.js +0 -2
- package/dist/chunk-NBUINPSH.js +0 -2
- package/dist/chunk-NHDPYW7O.js +0 -2
- package/dist/chunk-NKJKI6SE.js +0 -2
- package/dist/chunk-OPZQIJZU.js +0 -7
- package/dist/chunk-P3PVY6TX.js +0 -2
- package/dist/chunk-QE6MGGUY.js +0 -2
- package/dist/chunk-QVPYMZUJ.js +0 -6
- package/dist/chunk-RCJEFQOK.js +0 -4
- package/dist/chunk-UHMJYNTK.js +0 -2
- package/dist/health-x7B4Xu_6.d.ts +0 -119
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { S as ScipDatabase } from './db-DdTPetj5.js';
|
|
2
|
+
import { stats } from './queries/stats.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Structural copy of analysis/git-history's ChangeAmplification — defined
|
|
6
|
+
* here so the report envelope consumed by runtime/ does not pull analysis/
|
|
7
|
+
* types across the layer boundary.
|
|
8
|
+
*/
|
|
9
|
+
interface ChangeAmplificationSummary {
|
|
10
|
+
medianFilesPerCommit: number;
|
|
11
|
+
p90FilesPerCommit: number;
|
|
12
|
+
commitsAnalyzed: number;
|
|
13
|
+
}
|
|
14
|
+
interface CountLocSummary {
|
|
15
|
+
count: number;
|
|
16
|
+
loc: number;
|
|
17
|
+
/** Files contributing findings — feeds fix-density validation. */
|
|
18
|
+
files?: string[];
|
|
19
|
+
}
|
|
20
|
+
interface StaleSummary extends CountLocSummary {
|
|
21
|
+
unused: number;
|
|
22
|
+
singleUse: number;
|
|
23
|
+
}
|
|
24
|
+
interface DriftSummary {
|
|
25
|
+
count: number;
|
|
26
|
+
unusedImports: number;
|
|
27
|
+
layerViolations: number;
|
|
28
|
+
}
|
|
29
|
+
interface ComplexitySummary {
|
|
30
|
+
top: Array<{
|
|
31
|
+
symbol: string;
|
|
32
|
+
score: number;
|
|
33
|
+
file?: string;
|
|
34
|
+
}>;
|
|
35
|
+
extremeCount: number;
|
|
36
|
+
}
|
|
37
|
+
interface GitEvidenceSummary {
|
|
38
|
+
amplification: ChangeAmplificationSummary | null;
|
|
39
|
+
hiddenCoupling: {
|
|
40
|
+
pairCount: number;
|
|
41
|
+
top: Array<{
|
|
42
|
+
fileA: string;
|
|
43
|
+
fileB: string;
|
|
44
|
+
together: number;
|
|
45
|
+
confidence: number;
|
|
46
|
+
}>;
|
|
47
|
+
};
|
|
48
|
+
/** Per-file change counts over the analyzed window (tracked files only). */
|
|
49
|
+
fileStats: Record<string, {
|
|
50
|
+
changes: number;
|
|
51
|
+
fixChanges: number;
|
|
52
|
+
}>;
|
|
53
|
+
}
|
|
54
|
+
interface SuppressionSummary {
|
|
55
|
+
total: number;
|
|
56
|
+
byCategory: Record<string, number>;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
type FindingEvidence = 'graph-fact' | 'heuristic' | 'change-graph';
|
|
60
|
+
interface HealthAction {
|
|
61
|
+
category: string;
|
|
62
|
+
description: string;
|
|
63
|
+
effort: 'low' | 'medium' | 'high';
|
|
64
|
+
impact: 'low' | 'medium' | 'high';
|
|
65
|
+
count: number;
|
|
66
|
+
locRecoverable: number;
|
|
67
|
+
/** What kind of evidence backs this action — agents should trust accordingly. */
|
|
68
|
+
evidence: FindingEvidence;
|
|
69
|
+
}
|
|
70
|
+
/** One deduction line — the score is the sum of these, so it is auditable. */
|
|
71
|
+
interface ScoreDeduction {
|
|
72
|
+
axis: string;
|
|
73
|
+
points: number;
|
|
74
|
+
detail: string;
|
|
75
|
+
/** Risk deductions are empirically validated predictors; hygiene are tidiness signals. */
|
|
76
|
+
kind: 'risk' | 'hygiene';
|
|
77
|
+
}
|
|
78
|
+
interface HealthAxes {
|
|
79
|
+
/** LOC provably removable with behavior preserved (dead + isolated). */
|
|
80
|
+
deletable: {
|
|
81
|
+
loc: number;
|
|
82
|
+
symbols: number;
|
|
83
|
+
};
|
|
84
|
+
cycles: {
|
|
85
|
+
count: number;
|
|
86
|
+
};
|
|
87
|
+
/** Files touched per commit — the measured cost of one conceptual change. */
|
|
88
|
+
changeAmplification: ChangeAmplificationSummary | null;
|
|
89
|
+
/** File pairs that co-change without a dependency edge — concepts the reference graph can't see. */
|
|
90
|
+
hiddenCoupling: {
|
|
91
|
+
pairCount: number;
|
|
92
|
+
top: Array<{
|
|
93
|
+
fileA: string;
|
|
94
|
+
fileB: string;
|
|
95
|
+
together: number;
|
|
96
|
+
confidence: number;
|
|
97
|
+
}>;
|
|
98
|
+
} | null;
|
|
99
|
+
/** Complexity hotspots weighted by churn — complex code nobody touches costs nothing. */
|
|
100
|
+
churnWeightedComplexity: Array<{
|
|
101
|
+
symbol: string;
|
|
102
|
+
file?: string;
|
|
103
|
+
score: number;
|
|
104
|
+
changes: number;
|
|
105
|
+
weighted: number;
|
|
106
|
+
}> | null;
|
|
107
|
+
/** What fraction of findings rest on graph facts vs heuristics, and how many the user has rejected. */
|
|
108
|
+
evidenceQuality: {
|
|
109
|
+
graphFindings: number;
|
|
110
|
+
heuristicFindings: number;
|
|
111
|
+
userSuppressed: number;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/** Do flagged files attract more fix commits than the rest? The falsifiability check. */
|
|
115
|
+
interface HealthValidation {
|
|
116
|
+
flaggedFiles: number;
|
|
117
|
+
flaggedFixDensity: number;
|
|
118
|
+
baselineFixDensity: number;
|
|
119
|
+
/** > 1 means findings concentrate where fixes happen — predictive signal. */
|
|
120
|
+
ratio: number | null;
|
|
121
|
+
/** Per-detector lift — which detectors actually predict fixes, auditable. */
|
|
122
|
+
byCategory: Record<string, {
|
|
123
|
+
flaggedFiles: number;
|
|
124
|
+
fixDensity: number;
|
|
125
|
+
lift: number | null;
|
|
126
|
+
}>;
|
|
127
|
+
}
|
|
128
|
+
interface HealthReport {
|
|
129
|
+
/** Headline = min(riskScore, hygieneScore); kept for compatibility. */
|
|
130
|
+
score: number;
|
|
131
|
+
/** Empirically validated predictors only (graph facts, change-graph signals). */
|
|
132
|
+
riskScore: number;
|
|
133
|
+
/** Tidiness signals (candidate detectors) — real but not fix-predictive. */
|
|
134
|
+
hygieneScore: number;
|
|
135
|
+
scoreBreakdown: ScoreDeduction[];
|
|
136
|
+
overview: {
|
|
137
|
+
documents: number;
|
|
138
|
+
symbols: number;
|
|
139
|
+
indexSizeBytes: number;
|
|
140
|
+
};
|
|
141
|
+
findings: {
|
|
142
|
+
deadSymbols: number;
|
|
143
|
+
deadLoc: number;
|
|
144
|
+
isolatedSymbols: number;
|
|
145
|
+
isolatedLoc: number;
|
|
146
|
+
cycles: number;
|
|
147
|
+
similarPairs: number;
|
|
148
|
+
extractionCandidates: number;
|
|
149
|
+
wrappers: number;
|
|
150
|
+
passthroughs: number;
|
|
151
|
+
staleTypes: number;
|
|
152
|
+
driftedFiles: number;
|
|
153
|
+
complexityHotspotCount: number;
|
|
154
|
+
hiddenCouplingPairs: number | null;
|
|
155
|
+
};
|
|
156
|
+
axes: HealthAxes;
|
|
157
|
+
validation: HealthValidation | null;
|
|
158
|
+
suppressions: {
|
|
159
|
+
total: number;
|
|
160
|
+
byCategory: Record<string, number>;
|
|
161
|
+
} | null;
|
|
162
|
+
actions: HealthAction[];
|
|
163
|
+
topComplexity: Array<{
|
|
164
|
+
symbol: string;
|
|
165
|
+
score: number;
|
|
166
|
+
file?: string;
|
|
167
|
+
}>;
|
|
168
|
+
warnings?: string[];
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
declare const HEALTH_PHASES: readonly ["overview", "dead", "isolated", "cycles", "similar", "extract-candidates", "wrapper-candidates", "passthrough-candidates", "stale-abstractions", "drift", "complexity-hotspots", "git-evidence", "suppressions"];
|
|
172
|
+
type HealthPhaseName = typeof HEALTH_PHASES[number];
|
|
173
|
+
type HealthPhaseResult = {
|
|
174
|
+
phase: 'overview';
|
|
175
|
+
statsResult: ReturnType<typeof stats>;
|
|
176
|
+
warnings: string[];
|
|
177
|
+
} | {
|
|
178
|
+
phase: 'dead';
|
|
179
|
+
dead: CountLocSummary;
|
|
180
|
+
} | {
|
|
181
|
+
phase: 'isolated';
|
|
182
|
+
isolated: CountLocSummary;
|
|
183
|
+
} | {
|
|
184
|
+
phase: 'cycles';
|
|
185
|
+
realCycleCount: number;
|
|
186
|
+
} | {
|
|
187
|
+
phase: 'similar';
|
|
188
|
+
similarCount: number;
|
|
189
|
+
} | {
|
|
190
|
+
phase: 'extract-candidates';
|
|
191
|
+
extractCount: number;
|
|
192
|
+
} | {
|
|
193
|
+
phase: 'wrapper-candidates';
|
|
194
|
+
wrappers: CountLocSummary;
|
|
195
|
+
} | {
|
|
196
|
+
phase: 'passthrough-candidates';
|
|
197
|
+
passthroughs: CountLocSummary;
|
|
198
|
+
} | {
|
|
199
|
+
phase: 'stale-abstractions';
|
|
200
|
+
stale: StaleSummary;
|
|
201
|
+
} | {
|
|
202
|
+
phase: 'drift';
|
|
203
|
+
drift: DriftSummary;
|
|
204
|
+
} | {
|
|
205
|
+
phase: 'complexity-hotspots';
|
|
206
|
+
complexity: ComplexitySummary;
|
|
207
|
+
} | {
|
|
208
|
+
phase: 'git-evidence';
|
|
209
|
+
gitEvidence: GitEvidenceSummary | null;
|
|
210
|
+
} | {
|
|
211
|
+
phase: 'suppressions';
|
|
212
|
+
suppressions: SuppressionSummary;
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Single composite health report that runs all de-bloat analyses
|
|
216
|
+
* and produces a prioritized action list.
|
|
217
|
+
*
|
|
218
|
+
* The scoring formula accounts for common false positives:
|
|
219
|
+
* - Entry points (CLI, workers, barrels) appearing as "dead code"
|
|
220
|
+
* - Typed result interfaces with 1 consumer (normal for APIs)
|
|
221
|
+
* - Consistent import patterns across sibling modules (not duplication)
|
|
222
|
+
* - Barrel and orchestrator files deviating from sibling patterns (expected)
|
|
223
|
+
*/
|
|
224
|
+
declare function health(db: ScipDatabase, opts?: {
|
|
225
|
+
scope?: string;
|
|
226
|
+
full?: boolean;
|
|
227
|
+
}): HealthReport;
|
|
228
|
+
declare function healthPhase(db: ScipDatabase, phase: HealthPhaseName, opts?: {
|
|
229
|
+
scope?: string;
|
|
230
|
+
full?: boolean;
|
|
231
|
+
}): HealthPhaseResult;
|
|
232
|
+
declare function healthReportFromPhases(phaseResults: HealthPhaseResult[]): HealthReport;
|
|
233
|
+
|
|
234
|
+
export { HEALTH_PHASES as H, type HealthAction as a, type HealthReport as b, healthPhase as c, healthReportFromPhases as d, type HealthPhaseName as e, health as h };
|
package/dist/index.d.ts
CHANGED
|
@@ -130,22 +130,7 @@ declare function crossFileCallerEvidenceMap(db: ScipDatabase, definitions?: Read
|
|
|
130
130
|
}): Map<number, Set<string>>;
|
|
131
131
|
declare function sourceFallbackCallerEvidenceMap(db: ScipDatabase, definitions: ReadonlyArray<IndexedDefinition>): Map<number, Set<string>>;
|
|
132
132
|
|
|
133
|
-
|
|
134
|
-
paramCount: number;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Pull a function's parameter count from the AST. Used by similar-pair
|
|
138
|
-
* filtering to avoid declaring a 1-arg helper similar to a 7-arg orchestrator
|
|
139
|
-
* just because they happen to share infrastructure callees.
|
|
140
|
-
*
|
|
141
|
-
* On first call per file, walks the entire AST once and indexes every
|
|
142
|
-
* callable's signature by (startLine, endLine). Subsequent calls are O(1)
|
|
143
|
-
* Map lookups — critical when called for thousands of candidates.
|
|
144
|
-
*
|
|
145
|
-
* scip-query: ignore-wrapper — public AST-signature primitive used through
|
|
146
|
-
* ProjectIndex; callers should not know the per-tree signature cache shape.
|
|
147
|
-
*/
|
|
148
|
-
declare function getCallableSignature(db: ScipDatabase, relativePath: string, startLine: number, endLine: number): CallableSignature | null;
|
|
133
|
+
type FrameworkSourceReferenceKind = 'cross-language-dispatch' | 'rust-attribute';
|
|
149
134
|
|
|
150
135
|
/**
|
|
151
136
|
* Identifier-attribution module — one owner of "given a textual identifier
|
|
@@ -182,7 +167,7 @@ interface SymbolRef {
|
|
|
182
167
|
*/
|
|
183
168
|
declare function attributeIdentifier(db: ScipDatabase, file: string, identifier: string): SymbolRef[];
|
|
184
169
|
|
|
185
|
-
type SourceReferenceKind = 'identifier' |
|
|
170
|
+
type SourceReferenceKind = 'identifier' | FrameworkSourceReferenceKind;
|
|
186
171
|
type DefaultSourceReferenceTarget = ReturnType<typeof attributeIdentifier>[number];
|
|
187
172
|
interface SourceReferenceTarget {
|
|
188
173
|
symbolId: number;
|
|
@@ -221,6 +206,12 @@ interface ProductionCallableDefinitionsOptions {
|
|
|
221
206
|
excludeSymbol?: string;
|
|
222
207
|
excludeEntrySurfaces?: boolean;
|
|
223
208
|
excludeTypesFiles?: boolean;
|
|
209
|
+
/**
|
|
210
|
+
* Skip externally-live symbols (package surface / entryRoots config).
|
|
211
|
+
* For detectors whose advice is "inline or delete this" — published API
|
|
212
|
+
* has consumers the index cannot see, so that advice would be wrong.
|
|
213
|
+
*/
|
|
214
|
+
excludeRootedSymbols?: boolean;
|
|
224
215
|
excludeRustTraitImplMembers?: boolean;
|
|
225
216
|
includeSuppressed?: boolean;
|
|
226
217
|
requireFunctionLikeSymbol?: boolean;
|
|
@@ -255,7 +246,9 @@ declare class ProjectIndex {
|
|
|
255
246
|
hasSuppressionComment(definition: Pick<IndexedDefinition, 'relativePath' | 'startLine'>): boolean;
|
|
256
247
|
sourceFiles(): string[];
|
|
257
248
|
scanSourceReferences(opts: Parameters<typeof scanSourceReferences>[1], visit: Parameters<typeof scanSourceReferences>[2]): void;
|
|
258
|
-
callableSignature(definition: Pick<IndexedDefinition, 'relativePath' | 'startLine' | 'endLine'>):
|
|
249
|
+
callableSignature(definition: Pick<IndexedDefinition, 'relativePath' | 'startLine' | 'endLine'>): {
|
|
250
|
+
paramCount: number;
|
|
251
|
+
} | null;
|
|
259
252
|
}
|
|
260
253
|
|
|
261
254
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a}from"./chunk-TKDJQ2WD.js";import{a as s}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-TKDJQ2WD.js";import{a as s}from"./chunk-NOVKLH2F.js";import"./chunk-TQTVM27C.js";import"./chunk-RIXOMSOR.js";import"./chunk-EAU4RDFG.js";import"./chunk-PCMVXWDC.js";import"./chunk-6ZFKI5EP.js";import"./chunk-64UY7VTR.js";import"./chunk-7I6KNKE3.js";import"./chunk-APLCSDXL.js";import"./chunk-WEJYUS5O.js";import"./chunk-PBGTMPJ7.js";import{a as i,c as n,d as l}from"./chunk-SOGLYIJ4.js";import"./chunk-WQFOZIID.js";import"./chunk-NN3O7TPH.js";import"./chunk-VDZL45XI.js";import c from"better-sqlite3";var d=["node_modules",".git","dist","build","out","coverage","target",".next",".nuxt",".cache",".turbo",".scipquery-cache","__pycache__",".venv","venv"],o=class{db;config;pathFilter;constructor(t,e){this.config=t,this.pathFilter=e??null,this.db=new c(t.dbPath,{readonly:!0}),this.db.pragma("busy_timeout = 5000")}isIgnored(t){return this.pathFilter?.isIgnored(t)??!1}get localSymbolPredicate(){return`(
|
|
2
2
|
EXISTS (
|
|
3
3
|
SELECT 1
|
|
4
4
|
FROM defn_enclosing_ranges local_der
|
package/dist/postinstall.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{b as
|
|
3
|
-
${
|
|
4
|
-
scip CLI not found on PATH. Attempting auto-install...`),
|
|
5
|
-
scip CLI: ${
|
|
2
|
+
import{b as k,c as g,d as f,e as m}from"./chunk-LWYIGRHR.js";import{existsSync as p,mkdirSync as L,symlinkSync as v,readlinkSync as b,unlinkSync as C}from"fs";import{join as s,dirname as S,resolve as d}from"path";import{homedir as u,platform as q}from"os";import{fileURLToPath as N}from"url";var R=q()==="win32",T=["concrete-plan","scip-ai-cleanup","scip-explore","scip-debloat","scip-maintainability","scip-verify","scip-language-playbook"];function A(n={}){let e=n.quiet?()=>{}:console.log,o=N(import.meta.url),I=d(S(o),"..","skills"),$=[s(u(),".claude","skills"),s(u(),".codex","skills"),s(u(),".agents","skills")],i={installed:[],skipped:[],alreadyLinked:[]};for(let r of $){let h=S(r);if(!p(h))continue;L(r,{recursive:!0});let t=j(r);for(let l of T){let a=s(I,l),c=s(r,l);if(!p(a)){i.skipped.push(`${t}/${l}`);continue}if(p(c)){try{let x=b(c);if(d(x)===d(a)){i.alreadyLinked.push(`${t}/${l}`),e(` ok: ${l} \u2192 ${t} (already linked)`);continue}}catch{i.skipped.push(`${t}/${l}`),e(` skip: ${l} \u2192 ${t} (exists, not a symlink)`);continue}C(c)}v(a,c,R?"junction":"dir"),i.installed.push(`${t}/${l}`),e(` done: ${l} \u2192 ${t}`)}}return i}function j(n){return n.includes(".codex")?"Codex":n.includes(".agents")?"Agents":"Claude"}function y(){console.log("scip-query: installing skills...");let n=A({quiet:!1});if(n.installed.length+n.alreadyLinked.length>0&&console.log(`
|
|
3
|
+
${n.installed.length} skill(s) installed, ${n.alreadyLinked.length} already linked.`),!k())console.log(`
|
|
4
|
+
scip CLI not found on PATH. Attempting auto-install...`),m(console.log)||f();else{let o=g();console.log(`
|
|
5
|
+
scip CLI: ${o??"installed"}`)}console.log("")}y();
|
|
6
6
|
//# sourceMappingURL=postinstall.js.map
|
package/dist/queries/affected.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-UUDYI3FF.js";import"../chunk-EAU4RDFG.js";import"../chunk-PCMVXWDC.js";import"../chunk-6ZFKI5EP.js";import"../chunk-64UY7VTR.js";import"../chunk-7I6KNKE3.js";import"../chunk-APLCSDXL.js";import"../chunk-WEJYUS5O.js";import"../chunk-PBGTMPJ7.js";import"../chunk-SOGLYIJ4.js";import"../chunk-WQFOZIID.js";import"../chunk-NN3O7TPH.js";import"../chunk-VDZL45XI.js";export{a as affected};
|
|
2
2
|
//# sourceMappingURL=affected.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-XSZ5NC4O.js";import"../chunk-MX6F756F.js";import"../chunk-NOVKLH2F.js";import"../chunk-TQTVM27C.js";import"../chunk-RIXOMSOR.js";import"../chunk-EAU4RDFG.js";import"../chunk-PCMVXWDC.js";import"../chunk-6ZFKI5EP.js";import"../chunk-64UY7VTR.js";import"../chunk-7I6KNKE3.js";import"../chunk-APLCSDXL.js";import"../chunk-WEJYUS5O.js";import"../chunk-PBGTMPJ7.js";import"../chunk-SOGLYIJ4.js";import"../chunk-WQFOZIID.js";import"../chunk-NN3O7TPH.js";import"../chunk-VDZL45XI.js";export{a as bottlenecks};
|
|
2
2
|
//# sourceMappingURL=bottlenecks.js.map
|
package/dist/queries/by-kind.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-RCRK4E7E.js";import"../chunk-SOGLYIJ4.js";import"../chunk-WQFOZIID.js";import"../chunk-NN3O7TPH.js";import"../chunk-VDZL45XI.js";export{a as byKind,b as kindCounts};
|
|
2
2
|
//# sourceMappingURL=by-kind.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-D43L5PQF.js";import"../chunk-MX6F756F.js";import"../chunk-EAU4RDFG.js";import"../chunk-PCMVXWDC.js";import"../chunk-6ZFKI5EP.js";import"../chunk-64UY7VTR.js";import"../chunk-7I6KNKE3.js";import"../chunk-APLCSDXL.js";import"../chunk-WEJYUS5O.js";import"../chunk-PBGTMPJ7.js";import"../chunk-SOGLYIJ4.js";import"../chunk-WQFOZIID.js";import"../chunk-NN3O7TPH.js";import"../chunk-VDZL45XI.js";export{a as callGraph};
|
|
2
2
|
//# sourceMappingURL=call-graph.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-4B7YLRXX.js";import"../chunk-WC43FMAB.js";import"../chunk-NOVKLH2F.js";import"../chunk-TQTVM27C.js";import"../chunk-RIXOMSOR.js";import"../chunk-EAU4RDFG.js";import"../chunk-PCMVXWDC.js";import"../chunk-6ZFKI5EP.js";import"../chunk-64UY7VTR.js";import"../chunk-7I6KNKE3.js";import"../chunk-APLCSDXL.js";import"../chunk-WEJYUS5O.js";import"../chunk-PBGTMPJ7.js";import"../chunk-SOGLYIJ4.js";import"../chunk-WQFOZIID.js";import"../chunk-NN3O7TPH.js";import"../chunk-VDZL45XI.js";export{a as changeSurface};
|
|
2
2
|
//# sourceMappingURL=change-surface.js.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { S as ScipDatabase } from '../db-DdTPetj5.js';
|
|
2
|
+
import 'better-sqlite3';
|
|
3
|
+
import '../config-types-CGIeLEpY.js';
|
|
4
|
+
|
|
5
|
+
interface CleanupPlanEntry {
|
|
6
|
+
symbol: string;
|
|
7
|
+
shortName: string;
|
|
8
|
+
file: string;
|
|
9
|
+
startLine: number;
|
|
10
|
+
endLine: number;
|
|
11
|
+
loc: number;
|
|
12
|
+
/**
|
|
13
|
+
* 'graph-fact': zero references anywhere — deletable today.
|
|
14
|
+
* 'cascade': becomes dead once earlier batches are deleted.
|
|
15
|
+
*/
|
|
16
|
+
evidence: 'graph-fact' | 'cascade';
|
|
17
|
+
}
|
|
18
|
+
interface CleanupBatch {
|
|
19
|
+
/** 0 = deletable now; n = deletable after batch n-1 is applied. */
|
|
20
|
+
depth: number;
|
|
21
|
+
entries: CleanupPlanEntry[];
|
|
22
|
+
loc: number;
|
|
23
|
+
/** Files whose every definition is removed once this batch lands. */
|
|
24
|
+
filesEmptied: string[];
|
|
25
|
+
}
|
|
26
|
+
interface CleanupPlanResult {
|
|
27
|
+
batches: CleanupBatch[];
|
|
28
|
+
totalSymbols: number;
|
|
29
|
+
totalLoc: number;
|
|
30
|
+
/** Cascade candidates blocked by references outside the removal set. */
|
|
31
|
+
blocked: Array<{
|
|
32
|
+
shortName: string;
|
|
33
|
+
file: string;
|
|
34
|
+
blockingFiles: string[];
|
|
35
|
+
}>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Cascade cleanup plan: dead-code analysis is single-pass, but deletion
|
|
39
|
+
* cascades — once batch 0 is gone, symbols referenced only from batch 0
|
|
40
|
+
* become dead too. This runs the fixpoint and emits an ordered plan.
|
|
41
|
+
*
|
|
42
|
+
* Cascade rule (conservative): a symbol joins batch n+1 only when every
|
|
43
|
+
* resolved reference site lies inside an already-removed definition's range.
|
|
44
|
+
* Any reference that can't be placed inside the removal set — including
|
|
45
|
+
* unattributable file-level references — blocks the cascade for that symbol.
|
|
46
|
+
*
|
|
47
|
+
* Apply batch by batch, re-running the project's typecheck between batches.
|
|
48
|
+
*/
|
|
49
|
+
declare function cleanupPlan(db: ScipDatabase, opts?: {
|
|
50
|
+
scope?: string;
|
|
51
|
+
minLoc?: number;
|
|
52
|
+
maxDepth?: number;
|
|
53
|
+
scanLimit?: number;
|
|
54
|
+
}): CleanupPlanResult;
|
|
55
|
+
/** Line-range membership for the removal set, per file. */
|
|
56
|
+
declare class RemovedRangeIndex {
|
|
57
|
+
private readonly ranges;
|
|
58
|
+
add(entry: {
|
|
59
|
+
file: string;
|
|
60
|
+
startLine: number;
|
|
61
|
+
endLine: number;
|
|
62
|
+
}): void;
|
|
63
|
+
contains(file: string, line: number): boolean;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { type CleanupBatch, type CleanupPlanEntry, type CleanupPlanResult, RemovedRangeIndex, cleanupPlan };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b}from"../chunk-FTBT4RP2.js";import"../chunk-OIMM7KMI.js";import"../chunk-MX6F756F.js";import"../chunk-NOVKLH2F.js";import"../chunk-TQTVM27C.js";import"../chunk-RIXOMSOR.js";import"../chunk-EAU4RDFG.js";import"../chunk-PCMVXWDC.js";import"../chunk-6ZFKI5EP.js";import"../chunk-64UY7VTR.js";import"../chunk-7I6KNKE3.js";import"../chunk-APLCSDXL.js";import"../chunk-WEJYUS5O.js";import"../chunk-PBGTMPJ7.js";import"../chunk-SOGLYIJ4.js";import"../chunk-WQFOZIID.js";import"../chunk-NN3O7TPH.js";import"../chunk-VDZL45XI.js";export{b as RemovedRangeIndex,a as cleanupPlan};
|
|
2
|
+
//# sourceMappingURL=cleanup-plan.js.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { S as ScipDatabase } from '../db-DdTPetj5.js';
|
|
2
|
+
import 'better-sqlite3';
|
|
3
|
+
import '../config-types-CGIeLEpY.js';
|
|
4
|
+
|
|
5
|
+
interface CoChangeFinding {
|
|
6
|
+
fileA: string;
|
|
7
|
+
fileB: string;
|
|
8
|
+
/** Commits in the analyzed window where both files changed. */
|
|
9
|
+
together: number;
|
|
10
|
+
/** max(P(B|A), P(A|B)) over the analyzed window. */
|
|
11
|
+
confidence: number;
|
|
12
|
+
changesA: number;
|
|
13
|
+
changesB: number;
|
|
14
|
+
/** True when a dependency edge already explains the coupling. */
|
|
15
|
+
structurallyLinked: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface CoChangeResult {
|
|
18
|
+
/** False when git history is unavailable (not a repo, git missing). */
|
|
19
|
+
available: boolean;
|
|
20
|
+
commitsAnalyzed: number;
|
|
21
|
+
findings: CoChangeFinding[];
|
|
22
|
+
}
|
|
23
|
+
declare function isCoChangeNoiseFile(file: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Hidden coupling from the change graph: file pairs that repeatedly change
|
|
26
|
+
* in the same commits but have NO dependency edge between them.
|
|
27
|
+
*
|
|
28
|
+
* The reference graph cannot see that two mechanisms implement one concept —
|
|
29
|
+
* a config list and the test that checks it share no symbols. The commit
|
|
30
|
+
* history can: if editing one reliably means editing the other, a maintainer
|
|
31
|
+
* who edits only one is probably introducing drift. With a `file` argument,
|
|
32
|
+
* reports that file's co-change partners instead (including structurally
|
|
33
|
+
* linked ones — exploration mode).
|
|
34
|
+
*/
|
|
35
|
+
declare function coChange(db: ScipDatabase, file?: string, opts?: {
|
|
36
|
+
minTogether?: number;
|
|
37
|
+
minConfidence?: number;
|
|
38
|
+
limit?: number;
|
|
39
|
+
includeLinked?: boolean;
|
|
40
|
+
}): CoChangeResult;
|
|
41
|
+
|
|
42
|
+
export { type CoChangeFinding, type CoChangeResult, coChange, isCoChangeNoiseFile };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b}from"../chunk-4A4JFNWG.js";import"../chunk-N5D5ZCBW.js";import"../chunk-TQTVM27C.js";import"../chunk-RIXOMSOR.js";import"../chunk-APLCSDXL.js";import"../chunk-WEJYUS5O.js";import"../chunk-PBGTMPJ7.js";import"../chunk-WQFOZIID.js";import"../chunk-NN3O7TPH.js";import"../chunk-VDZL45XI.js";export{b as coChange,a as isCoChangeNoiseFile};
|
|
2
|
+
//# sourceMappingURL=co-change.js.map
|
package/dist/queries/code.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-Z2AJQ7VA.js";import"../chunk-WC43FMAB.js";import"../chunk-7I6KNKE3.js";import"../chunk-SOGLYIJ4.js";import"../chunk-WQFOZIID.js";import"../chunk-NN3O7TPH.js";import"../chunk-VDZL45XI.js";export{a as code};
|
|
2
2
|
//# sourceMappingURL=code.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-K6YIGVL7.js";import"../chunk-V76FCF5F.js";import"../chunk-MX6F756F.js";import"../chunk-NOVKLH2F.js";import"../chunk-TQTVM27C.js";import"../chunk-RIXOMSOR.js";import"../chunk-EAU4RDFG.js";import"../chunk-PCMVXWDC.js";import"../chunk-6ZFKI5EP.js";import"../chunk-64UY7VTR.js";import"../chunk-7I6KNKE3.js";import"../chunk-APLCSDXL.js";import"../chunk-WEJYUS5O.js";import"../chunk-PBGTMPJ7.js";import"../chunk-SOGLYIJ4.js";import"../chunk-WQFOZIID.js";import"../chunk-NN3O7TPH.js";import"../chunk-VDZL45XI.js";export{a as complexityHotspots};
|
|
2
2
|
//# sourceMappingURL=complexity-hotspots.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-EM2PPDN7.js";import"../chunk-NOVKLH2F.js";import"../chunk-TQTVM27C.js";import"../chunk-RIXOMSOR.js";import"../chunk-EAU4RDFG.js";import"../chunk-PCMVXWDC.js";import"../chunk-6ZFKI5EP.js";import"../chunk-64UY7VTR.js";import"../chunk-7I6KNKE3.js";import"../chunk-APLCSDXL.js";import"../chunk-WEJYUS5O.js";import"../chunk-PBGTMPJ7.js";import"../chunk-SOGLYIJ4.js";import"../chunk-WQFOZIID.js";import"../chunk-NN3O7TPH.js";import"../chunk-VDZL45XI.js";export{a as complexity};
|
|
2
2
|
//# sourceMappingURL=complexity.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-I7OTKWNY.js";import"../chunk-PCMVXWDC.js";import"../chunk-6ZFKI5EP.js";import"../chunk-64UY7VTR.js";import"../chunk-7I6KNKE3.js";import"../chunk-APLCSDXL.js";import"../chunk-WEJYUS5O.js";import"../chunk-PBGTMPJ7.js";import"../chunk-SOGLYIJ4.js";import"../chunk-WQFOZIID.js";import"../chunk-NN3O7TPH.js";import"../chunk-VDZL45XI.js";export{a as convergence};
|
|
2
2
|
//# sourceMappingURL=convergence.js.map
|
package/dist/queries/coupling.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-46ILZVMX.js";import"../chunk-WC43FMAB.js";import"../chunk-7I6KNKE3.js";import"../chunk-SOGLYIJ4.js";import"../chunk-WQFOZIID.js";import"../chunk-NN3O7TPH.js";import"../chunk-VDZL45XI.js";export{a as coupling,b as topCoupling};
|
|
2
2
|
//# sourceMappingURL=coupling.js.map
|
package/dist/queries/cycles.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-EKP7XJ6L.js";import"../chunk-TQTVM27C.js";import"../chunk-RIXOMSOR.js";import"../chunk-APLCSDXL.js";import"../chunk-WEJYUS5O.js";import"../chunk-PBGTMPJ7.js";import"../chunk-WQFOZIID.js";import"../chunk-NN3O7TPH.js";import"../chunk-VDZL45XI.js";export{a as cycles};
|
|
2
2
|
//# sourceMappingURL=cycles.js.map
|
package/dist/queries/dataflow.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-BCFED24F.js";import"../chunk-MX6F756F.js";import"../chunk-EAU4RDFG.js";import"../chunk-PCMVXWDC.js";import"../chunk-6ZFKI5EP.js";import"../chunk-64UY7VTR.js";import"../chunk-7I6KNKE3.js";import"../chunk-APLCSDXL.js";import"../chunk-WEJYUS5O.js";import"../chunk-PBGTMPJ7.js";import"../chunk-SOGLYIJ4.js";import"../chunk-WQFOZIID.js";import"../chunk-NN3O7TPH.js";import"../chunk-VDZL45XI.js";export{a as dataflow};
|
|
2
2
|
//# sourceMappingURL=dataflow.js.map
|
package/dist/queries/dead.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as a}from"../chunk-
|
|
1
|
+
import{b as a}from"../chunk-OIMM7KMI.js";import"../chunk-MX6F756F.js";import"../chunk-NOVKLH2F.js";import"../chunk-TQTVM27C.js";import"../chunk-RIXOMSOR.js";import"../chunk-EAU4RDFG.js";import"../chunk-PCMVXWDC.js";import"../chunk-6ZFKI5EP.js";import"../chunk-64UY7VTR.js";import"../chunk-7I6KNKE3.js";import"../chunk-APLCSDXL.js";import"../chunk-WEJYUS5O.js";import"../chunk-PBGTMPJ7.js";import"../chunk-SOGLYIJ4.js";import"../chunk-WQFOZIID.js";import"../chunk-NN3O7TPH.js";import"../chunk-VDZL45XI.js";export{a as dead};
|
|
2
2
|
//# sourceMappingURL=dead.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-PE4EJOLN.js";import"../chunk-RIXOMSOR.js";import"../chunk-APLCSDXL.js";import"../chunk-WEJYUS5O.js";import"../chunk-WQFOZIID.js";import"../chunk-NN3O7TPH.js";import"../chunk-VDZL45XI.js";export{a as deepChains};
|
|
2
2
|
//# sourceMappingURL=deep-chains.js.map
|
package/dist/queries/deps.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-AGW2MVIO.js";import"../chunk-WC43FMAB.js";import"../chunk-7I6KNKE3.js";import"../chunk-SOGLYIJ4.js";import"../chunk-WQFOZIID.js";import"../chunk-NN3O7TPH.js";import"../chunk-VDZL45XI.js";export{a as deps,b as rdeps};
|
|
2
2
|
//# sourceMappingURL=deps.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { S as ScipDatabase } from '../db-DdTPetj5.js';
|
|
2
|
+
import 'better-sqlite3';
|
|
3
|
+
import '../config-types-CGIeLEpY.js';
|
|
4
|
+
|
|
5
|
+
type DiffGateCheck = 'echo' | 'co-change-partner' | 'doc-reference' | 'unused-params' | 'new-dead' | 'baseline';
|
|
6
|
+
interface DiffGateFinding {
|
|
7
|
+
check: DiffGateCheck;
|
|
8
|
+
message: string;
|
|
9
|
+
/** Concrete remediation an agent can act on without human triage. */
|
|
10
|
+
remediation: string;
|
|
11
|
+
}
|
|
12
|
+
interface DiffGateResult {
|
|
13
|
+
base: string;
|
|
14
|
+
changedFiles: string[];
|
|
15
|
+
changedSymbols: number;
|
|
16
|
+
checksRun: DiffGateCheck[];
|
|
17
|
+
/** Checks that could not run (no git history, no baseline file, ...). */
|
|
18
|
+
skipped: Array<{
|
|
19
|
+
check: DiffGateCheck;
|
|
20
|
+
reason: string;
|
|
21
|
+
}>;
|
|
22
|
+
findings: DiffGateFinding[];
|
|
23
|
+
note?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Slop prevention at the moment of creation: every detector, scoped to what
|
|
27
|
+
* THIS diff introduces. O(diff), no LLM calls, exit-code friendly — the
|
|
28
|
+
* leading-indicator companion to the repo-wide ratchet.
|
|
29
|
+
*
|
|
30
|
+
* Checks:
|
|
31
|
+
* - echo: a symbol this diff touched closely resembles
|
|
32
|
+
* established code elsewhere — likely re-implementation.
|
|
33
|
+
* - co-change-partner: a changed file's strong historical partner is NOT in
|
|
34
|
+
* the diff — the change-graph contract says they move
|
|
35
|
+
* together (auto-derived sync enforcement).
|
|
36
|
+
* - doc-reference: a doc cites a changed file but isn't updated in the
|
|
37
|
+
* diff — the drift starts here.
|
|
38
|
+
* - unused-params: changed files now contain trailing parameters no body
|
|
39
|
+
* uses — speculative generality landing fresh.
|
|
40
|
+
* - new-dead: changed symbols with zero indexed consumers — possibly
|
|
41
|
+
* a half-wired feature.
|
|
42
|
+
* - baseline: the committed health baseline gained new findings.
|
|
43
|
+
*/
|
|
44
|
+
declare function diffGate(db: ScipDatabase, opts?: {
|
|
45
|
+
base?: string;
|
|
46
|
+
minTogether?: number;
|
|
47
|
+
minConfidence?: number;
|
|
48
|
+
maxEchoChecks?: number;
|
|
49
|
+
minSimilarity?: number;
|
|
50
|
+
}): DiffGateResult;
|
|
51
|
+
|
|
52
|
+
export { type DiffGateCheck, type DiffGateFinding, type DiffGateResult, diffGate };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as a}from"../chunk-XBFLIGWU.js";import"../chunk-HVGNOUYP.js";import"../chunk-AQYBOORI.js";import"../chunk-DJTJ3DLZ.js";import"../chunk-SSINY7HL.js";import"../chunk-CVRXOP6M.js";import"../chunk-QYQXPPDI.js";import"../chunk-SLOIQKY7.js";import"../chunk-K4Z3FCUJ.js";import"../chunk-RKTDEIHF.js";import"../chunk-HVXIXDLV.js";import"../chunk-6P5W4U6G.js";import"../chunk-OQSV6OS2.js";import"../chunk-2EC4JTHC.js";import"../chunk-OIMM7KMI.js";import"../chunk-4A4JFNWG.js";import"../chunk-N5D5ZCBW.js";import"../chunk-V76FCF5F.js";import"../chunk-EKP7XJ6L.js";import"../chunk-MX6F756F.js";import"../chunk-NOVKLH2F.js";import"../chunk-TQTVM27C.js";import"../chunk-RIXOMSOR.js";import"../chunk-EAU4RDFG.js";import"../chunk-PCMVXWDC.js";import"../chunk-6ZFKI5EP.js";import"../chunk-64UY7VTR.js";import"../chunk-7I6KNKE3.js";import"../chunk-APLCSDXL.js";import"../chunk-WEJYUS5O.js";import"../chunk-PBGTMPJ7.js";import"../chunk-SOGLYIJ4.js";import"../chunk-WQFOZIID.js";import"../chunk-NN3O7TPH.js";import"../chunk-VDZL45XI.js";export{a as diffGate};
|
|
2
|
+
//# sourceMappingURL=diff-gate.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d}from"../chunk-
|
|
1
|
+
import{a,b,c,d}from"../chunk-6P5W4U6G.js";import"../chunk-NOVKLH2F.js";import"../chunk-TQTVM27C.js";import"../chunk-RIXOMSOR.js";import"../chunk-EAU4RDFG.js";import"../chunk-PCMVXWDC.js";import"../chunk-6ZFKI5EP.js";import"../chunk-64UY7VTR.js";import"../chunk-7I6KNKE3.js";import"../chunk-APLCSDXL.js";import"../chunk-WEJYUS5O.js";import"../chunk-PBGTMPJ7.js";import"../chunk-SOGLYIJ4.js";import"../chunk-WQFOZIID.js";import"../chunk-NN3O7TPH.js";import"../chunk-VDZL45XI.js";export{a as diffImpact,c as diffImpactPartial,b as diffImpactPlan,d as mergeDiffImpactPartials};
|
|
2
2
|
//# sourceMappingURL=diff-impact.js.map
|