scip-query 0.3.2 → 0.3.4

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/dist/cli.js CHANGED
@@ -965,7 +965,7 @@ var Watcher = class {
965
965
  return new Promise((resolve4, reject) => {
966
966
  const start = Date.now();
967
967
  const tmpDb = this.indexPaths.dbPath + ".tmp";
968
- const tmpScip = this.indexPaths.indexPath + ".tmp";
968
+ const tmpScip = tempScipPath(this.indexPaths.indexPath);
969
969
  const child = fork(
970
970
  new URL("./reindex-worker.js", import.meta.url).pathname,
971
971
  [],
@@ -1006,6 +1006,9 @@ var Watcher = class {
1006
1006
  this.onStatus(status);
1007
1007
  }
1008
1008
  };
1009
+ function tempScipPath(indexPath) {
1010
+ return indexPath.endsWith(".scip") ? indexPath.slice(0, -".scip".length) + ".tmp.scip" : indexPath + ".tmp.scip";
1011
+ }
1009
1012
 
1010
1013
  // src/queries/stats.ts
1011
1014
  function stats(db) {
package/dist/index.js CHANGED
@@ -1115,7 +1115,7 @@ var Watcher = class {
1115
1115
  return new Promise((resolve3, reject) => {
1116
1116
  const start = Date.now();
1117
1117
  const tmpDb = this.indexPaths.dbPath + ".tmp";
1118
- const tmpScip = this.indexPaths.indexPath + ".tmp";
1118
+ const tmpScip = tempScipPath(this.indexPaths.indexPath);
1119
1119
  const child = fork(
1120
1120
  new URL("./reindex-worker.js", import.meta.url).pathname,
1121
1121
  [],
@@ -1156,6 +1156,9 @@ var Watcher = class {
1156
1156
  this.onStatus(status);
1157
1157
  }
1158
1158
  };
1159
+ function tempScipPath(indexPath) {
1160
+ return indexPath.endsWith(".scip") ? indexPath.slice(0, -".scip".length) + ".tmp.scip" : indexPath + ".tmp.scip";
1161
+ }
1159
1162
 
1160
1163
  // src/setup.ts
1161
1164
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scip-query",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "Language-agnostic code intelligence CLI powered by SCIP indexes",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -241,7 +241,7 @@ After stress-testing is complete:
241
241
  2. **Verify references**: Spawn parallel subagents (one per phase) using the **Subagent Briefing Template**. Each agent confirms that every file path exists, every line number is within +-5 lines, and every described behavior matches reality. Reject output that doesn't cite scip-query commands.
242
242
  3. **Fix drift**: Update any stale references.
243
243
  4. **Check execution order**: No phase depends on a later phase. No step within a phase depends on a later step.
244
- 5. **Check test coverage**: Every behavior-changing step should have a corresponding test step. Flag gaps.
244
+ 5. **Check validation coverage**: Every behavior-changing step should have a corresponding validation step. Flag gaps in tests, manual checks, or runtime verification.
245
245
  6. **Run diff-impact**: `scip-query diff-impact` to verify the blast radius matches what the plan predicted.
246
246
 
247
247
  ---
@@ -210,7 +210,7 @@ Types, interfaces, and classes with 0-1 cross-file consumers. An interface with
210
210
  ### Angle 10: Pattern Drift (convention violations)
211
211
 
212
212
  ```bash
213
- scip-query drift --min-deviation 30
213
+ scip-query drift
214
214
  ```
215
215
 
216
216
  Files that deviate from their directory's typical dependency pattern. If 8 of 10 services import a validator and 2 don't, those 2 are flagged.
@@ -263,7 +263,6 @@ scip-query deep-chains --min-depth 5 # Excessively deep dependency chains
263
263
  scip-query bottlenecks -n 10 # Coupling pressure points
264
264
  scip-query complexity-hotspots -n 10 # Riskiest symbols
265
265
  scip-query hotspots -n 10 # Most-referenced symbols
266
- scip-query test-coverage # Test coverage percentage
267
266
  scip-query doc-coverage --min-loc 5 # Documentation coverage
268
267
  ```
269
268
 
@@ -350,7 +349,6 @@ The report is a markdown file with:
350
349
  - Max dependency chain depth: N
351
350
  - Coupling bottlenecks: [top 5]
352
351
  - Complexity hotspots: [top 5]
353
- - Test coverage: N%
354
352
  - Doc coverage: N%
355
353
  ```
356
354
 
@@ -398,13 +396,12 @@ Do NOT use grep, rg, or Read. Use only scip-query commands.
398
396
  | Wrappers | `scip-query wrapper-candidates --max-loc 15` |
399
397
  | Passthroughs | `scip-query passthrough-candidates` |
400
398
  | Stale abstractions | `scip-query stale-abstractions --min-loc 3` |
401
- | Pattern drift | `scip-query drift --min-deviation 30` |
399
+ | Pattern drift | `scip-query drift` |
402
400
  | Circular dependencies | `scip-query cycles` |
403
401
  | Dependency depth | `scip-query deep-chains --min-depth 5` |
404
402
  | Coupling pressure | `scip-query bottlenecks -n 10` |
405
403
  | Complexity hotspots | `scip-query complexity-hotspots -n 10` |
406
404
  | Most-referenced | `scip-query hotspots -n 10` |
407
- | Test coverage | `scip-query test-coverage` |
408
405
  | Doc coverage | `scip-query doc-coverage` |
409
406
  | Redundant re-exports | `scip-query redundant-reexports` |
410
407
  | Similar signatures | `scip-query similar-signatures --min-loc 5` |
@@ -124,7 +124,7 @@ Identify the riskiest parts of the system:
124
124
  scip-query complexity <symbol> # Per-symbol: branches, cyclomatic, fan-in/out
125
125
  scip-query complexity-hotspots # Top N most complex symbols
126
126
  scip-query bottlenecks # Coupling pressure points
127
- scip-query change-surface <file> # Per-file risk: consumers, test coverage
127
+ scip-query change-surface <file> # Per-file risk: external consumers, blast radius
128
128
  ```
129
129
 
130
130
  ### Step 6: Check structural health
@@ -161,9 +161,8 @@ scip-query complexity X # How complex is it
161
161
  ### "Is it safe to change X?"
162
162
 
163
163
  ```bash
164
- scip-query change-surface <file> # Risk per symbol: consumers, tests
164
+ scip-query change-surface <file> # Risk per symbol: consumers, blast radius
165
165
  scip-query affected X --max-depth 3 # Full transitive blast radius
166
- scip-query test-coverage X # Do tests reference this?
167
166
  scip-query similar X # Is there duplicated logic to consolidate?
168
167
  ```
169
168
 
@@ -197,7 +196,7 @@ When reporting exploration results, structure them as:
197
196
  4. **Data flow** — What data enters, how it transforms, where it ends up
198
197
  5. **Dependencies** — What the system depends on (with `deps` citations)
199
198
  6. **Consumers** — What depends on this system (with `rdeps`/`surface` citations)
200
- 7. **Risk areas** — Complex symbols, high fan-in, missing tests (with `complexity`/`change-surface` citations)
199
+ 7. **Risk areas** — Complex symbols, high fan-in, high-consumer surfaces, or broad blast radius (with `complexity`/`change-surface` citations)
201
200
 
202
201
  Every file path, line number, and behavioral claim includes the scip-query command that verified it.
203
202
 
@@ -230,6 +229,5 @@ Every file path, line number, and behavioral claim includes the scip-query comma
230
229
  | Dependency depth | `scip-query deep-chains` |
231
230
  | Similar functions | `scip-query similar <symbol>` |
232
231
  | Same-shape functions | `scip-query similar-signatures` |
233
- | Test coverage | `scip-query test-coverage <symbol>` |
234
232
 
235
233
  Full documentation: Run `scip-query --help` or read the README at the scip-query repo.
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: scip-verify
3
- description: Post-implementation verification using scip-query. Confirms changes are wired correctly — no broken references, no new cycles, no orphaned code, no test gaps, no health regressions. Run after making changes and before committing.
3
+ description: Post-implementation verification using scip-query. Confirms changes are wired correctly — no broken references, no new cycles, no orphaned code, no structural regressions, no health regressions. Run after making changes and before committing.
4
4
  allowed-tools: [Bash, Write, Edit, Glob, Agent, TaskCreate, TaskUpdate, TaskGet, TaskList]
5
- keywords: [verify, check, validate, wire, confirm, post-implementation, review, regression, health, test]
5
+ keywords: [verify, check, validate, wire, confirm, post-implementation, review, regression, health]
6
6
  ---
7
7
 
8
8
  # Post-Implementation Verification with scip-query
9
9
 
10
- You are verifying that a code change was implemented correctly. Every check must use `scip-query` to confirm the change didn't break references, introduce cycles, orphan code, or miss test coverage. This is the "measure twice" step — run it after making changes, before committing.
10
+ You are verifying that a code change was implemented correctly. Every check must use `scip-query` to confirm the change didn't break references, introduce cycles, orphan code, or widen structural risk unexpectedly. This is the "measure twice" step — run it after making changes, before committing.
11
11
 
12
12
  ---
13
13
 
@@ -27,7 +27,7 @@ You are verifying that a code change was implemented correctly. Every check must
27
27
 
28
28
  1. **Reindex first.** Always run `scip-query reindex` before verification. You're checking the current code, not the old index.
29
29
 
30
- 2. **Every check must produce evidence.** Don't say "looks good." Say "scip-query cycles returned 0 cycles, scip-query diff-impact shows 3 changed symbols affecting 12 files, all 3 have test coverage."
30
+ 2. **Every check must produce evidence.** Don't say "looks good." Say "scip-query cycles returned 0 cycles, scip-query diff-impact shows 3 changed symbols affecting 12 files, and change-surface shows the blast radius stayed within expectations."
31
31
 
32
32
  3. **Fail loudly.** If any check fails, stop and report the exact failure with the scip-query command output. Do not proceed to "looks mostly fine."
33
33
 
@@ -70,7 +70,7 @@ scip-query code 'src/modules/chat/chat.service.ts:100-200'
70
70
 
71
71
  ---
72
72
 
73
- ## The 8 Verification Checks
73
+ ## The 7 Verification Checks
74
74
 
75
75
  Run every one of these. Each catches a different class of implementation error.
76
76
 
@@ -81,12 +81,11 @@ scip-query reindex
81
81
  scip-query diff-impact
82
82
  ```
83
83
 
84
- **What you're checking:** Which symbols changed, how many consumer files are affected, and whether test coverage exists for changed symbols.
84
+ **What you're checking:** Which symbols changed and how many downstream consumers are affected.
85
85
 
86
86
  **Pass criteria:**
87
87
  - Every changed symbol is intentional (no accidental modifications)
88
88
  - The number of affected consumer files matches expectations
89
- - Changed symbols have test references (or test gaps are acknowledged)
90
89
 
91
90
  **Fail if:** Unexpected symbols appear in the diff, or the affected file count is much larger than expected (blast radius exceeded plan).
92
91
 
@@ -141,19 +140,7 @@ scip-query fan-in <changed-symbol>
141
140
 
142
141
  **Fail if:** A changed symbol's fan-in dropped — a consumer was disconnected.
143
142
 
144
- ### Check 6: Test Coverage for Changes
145
-
146
- ```bash
147
- scip-query test-coverage <changed-symbol>
148
- ```
149
-
150
- For each changed symbol, verify test files reference it.
151
-
152
- **Pass criteria:** Every changed symbol is referenced by at least one test file.
153
-
154
- **Fail if:** Changed symbols with zero test references. Report which ones need tests.
155
-
156
- ### Check 7: Change Surface Risk Check
143
+ ### Check 6: Change Surface Risk Check
157
144
 
158
145
  For each modified file:
159
146
 
@@ -161,13 +148,13 @@ For each modified file:
161
148
  scip-query change-surface <modified-file>
162
149
  ```
163
150
 
164
- **What you're checking:** High-risk symbols in modified files (high consumer count + no tests).
151
+ **What you're checking:** High-risk symbols in modified files based on consumer count, blast radius, and structural exposure.
165
152
 
166
- **Pass criteria:** No HIGH RISK symbols, or all high-risk symbols were intentionally modified.
153
+ **Pass criteria:** No unexpectedly high-risk surfaces, or all high-risk symbols were intentionally modified with the blast radius understood.
167
154
 
168
- **Fail if:** A HIGH RISK symbol was modified without test coverage.
155
+ **Fail if:** A HIGH RISK symbol was modified without acknowledging the blast radius or downstream consumers.
169
156
 
170
- ### Check 8: Health Score
157
+ ### Check 7: Health Score
171
158
 
172
159
  ```bash
173
160
  scip-query health
@@ -190,7 +177,7 @@ scip-query reindex
190
177
  scip-query diff-impact
191
178
  ```
192
179
 
193
- Record: changed files, changed symbols, affected consumers, test coverage %.
180
+ Record: changed files, changed symbols, affected consumers, and any unexpectedly large blast-radius surfaces.
194
181
 
195
182
  ### Phase 2: Structural Checks (parallel)
196
183
 
@@ -209,7 +196,6 @@ For each changed symbol from diff-impact:
209
196
  ```bash
210
197
  scip-query refs <symbol>
211
198
  scip-query fan-in <symbol>
212
- scip-query test-coverage <symbol>
213
199
  ```
214
200
 
215
201
  ### Phase 4: Per-File Checks
@@ -246,7 +232,7 @@ The verification report is structured as:
246
232
  - Changed files: N
247
233
  - Changed symbols: N
248
234
  - Affected consumer files: N
249
- - Test coverage: N%
235
+ - High-risk symbols touched: N
250
236
 
251
237
  ## Check Results
252
238
 
@@ -257,9 +243,8 @@ The verification report is structured as:
257
243
  | 3 | No new dead code | PASS/FAIL | [count] |
258
244
  | 4 | No new isolated | PASS/FAIL | [count] |
259
245
  | 5 | References intact | PASS/FAIL | [fan-in changes] |
260
- | 6 | Test coverage | PASS/FAIL | [uncovered symbols] |
261
- | 7 | Risk assessment | PASS/FAIL | [high-risk symbols] |
262
- | 8 | Health score | PASS/FAIL | [score delta] |
246
+ | 6 | Risk assessment | PASS/FAIL | [high-risk symbols] |
247
+ | 7 | Health score | PASS/FAIL | [score delta] |
263
248
 
264
249
  ## Failures
265
250
  [Detailed explanation of any failures with scip-query output]
@@ -316,7 +301,6 @@ Do NOT use grep, rg, or Read. Use only scip-query commands.
316
301
  | Isolated | `scip-query isolated --min-loc 3` |
317
302
  | References | `scip-query refs <symbol>` |
318
303
  | Fan-in | `scip-query fan-in <symbol>` |
319
- | Test coverage | `scip-query test-coverage <symbol>` |
320
304
  | Change surface | `scip-query change-surface <file>` |
321
305
  | Health | `scip-query health` |
322
306
  | Full blast radius | `scip-query affected <symbol>` |