scip-query 0.3.3 → 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/package.json
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
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
|
|
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
|
|
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,
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
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
|
|
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
|
|
155
|
+
**Fail if:** A HIGH RISK symbol was modified without acknowledging the blast radius or downstream consumers.
|
|
169
156
|
|
|
170
|
-
### Check
|
|
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,
|
|
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
|
-
-
|
|
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 |
|
|
261
|
-
| 7 |
|
|
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>` |
|