scip-query 0.10.3 → 0.10.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/README.md +9 -8
- package/dist/{chunk-YVLHL6KQ.js → chunk-237YUOPK.js} +2 -2
- package/dist/chunk-56UN3DMK.js +2 -0
- package/dist/chunk-5UDFZC4D.js +2 -0
- package/dist/{chunk-X474LKJX.js → chunk-6UFMPECA.js} +2 -2
- package/dist/chunk-7JOTOWZO.js +4 -0
- package/dist/chunk-A7RNHUJH.js +20 -0
- package/dist/chunk-AYYIZ4BA.js +4 -0
- package/dist/chunk-BNKE4TT5.js +2 -0
- package/dist/chunk-MA7OVFHI.js +2 -0
- package/dist/chunk-QUJBXLBY.js +2 -0
- package/dist/chunk-WBJZNPUT.js +2 -0
- package/dist/{chunk-4HOMAEDD.js → chunk-YUTRW57I.js} +2 -2
- package/dist/cli.js +209 -197
- package/dist/frontend-behavior-evidence-BxKpKWUu.d.ts +4 -0
- package/dist/postinstall.js +3 -3
- package/dist/queries/diff-gate.d.ts +4 -2
- package/dist/queries/diff-gate.js +1 -1
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/health.js +1 -1
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +1 -0
- package/dist/queries/index.js +1 -1
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.d.ts +3 -2
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.d.ts +3 -2
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/runtime.js +1 -1
- package/docs/AGENT_GUIDE.md +42 -5
- package/docs/AI_FAILURE_MODES.md +28 -21
- package/docs/COMMAND_REFERENCE.md +4 -2
- package/docs/analyzer-inventory.md +5 -1
- package/docs/analyzer-validation-ledger.md +8 -0
- package/package.json +3 -2
- package/skills/concrete-plan/SKILL.md +3 -5
- package/skills/concrete-plan/agents/openai.yaml +4 -0
- package/skills/scip-adoption/SKILL.md +120 -0
- package/skills/scip-adoption/agents/openai.yaml +4 -0
- package/skills/scip-ai-cleanup/SKILL.md +12 -4
- package/skills/scip-ai-cleanup/agents/openai.yaml +4 -0
- package/skills/scip-api-impact/SKILL.md +147 -0
- package/skills/scip-api-impact/agents/openai.yaml +4 -0
- package/skills/scip-debloat/SKILL.md +15 -13
- package/skills/scip-debloat/agents/openai.yaml +4 -0
- package/skills/scip-debug/SKILL.md +119 -0
- package/skills/scip-debug/agents/openai.yaml +4 -0
- package/skills/scip-diagram/SKILL.md +138 -0
- package/skills/scip-diagram/agents/openai.yaml +4 -0
- package/skills/scip-directory-architecture/SKILL.md +2 -2
- package/skills/scip-directory-architecture/agents/openai.yaml +4 -0
- package/skills/scip-doc-reconcile/SKILL.md +1 -3
- package/skills/scip-doc-reconcile/agents/openai.yaml +4 -0
- package/skills/scip-explore/SKILL.md +8 -2
- package/skills/scip-explore/agents/openai.yaml +4 -0
- package/skills/scip-health-audit/SKILL.md +158 -0
- package/skills/scip-health-audit/agents/openai.yaml +4 -0
- package/skills/scip-health-improve/SKILL.md +151 -0
- package/skills/scip-health-improve/agents/openai.yaml +4 -0
- package/skills/scip-language-playbook/SKILL.md +7 -4
- package/skills/scip-language-playbook/agents/openai.yaml +4 -0
- package/skills/scip-maintainability/SKILL.md +7 -3
- package/skills/scip-maintainability/agents/openai.yaml +4 -0
- package/skills/scip-query/SKILL.md +74 -33
- package/skills/scip-query/agents/openai.yaml +4 -0
- package/skills/scip-query-setup/SKILL.md +65 -18
- package/skills/scip-query-setup/agents/openai.yaml +3 -0
- package/skills/scip-react-maintainability/SKILL.md +2 -2
- package/skills/scip-react-maintainability/agents/openai.yaml +4 -0
- package/skills/scip-triage-issue/SKILL.md +112 -0
- package/skills/scip-triage-issue/agents/openai.yaml +4 -0
- package/skills/scip-verify/SKILL.md +83 -232
- package/skills/scip-verify/agents/openai.yaml +4 -0
- package/skills/scip-vue-maintainability/SKILL.md +2 -3
- package/skills/scip-vue-maintainability/agents/openai.yaml +4 -0
- package/dist/chunk-7ADUXFRZ.js +0 -2
- package/dist/chunk-GLJAAKDW.js +0 -4
- package/dist/chunk-GS33KGAY.js +0 -2
- package/dist/chunk-I7TSQZ3J.js +0 -4
- package/dist/chunk-NP5HYVLX.js +0 -20
- package/dist/chunk-O4L4AB3T.js +0 -2
- package/dist/chunk-TO54DY4O.js +0 -2
- package/dist/chunk-UMNENNTX.js +0 -2
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scip-doc-reconcile
|
|
3
3
|
description: Reconcile standards docs and living documentation with the current code using scip-query doc-drift evidence. Updates descriptive claims, repairs broken file references, and escalates normative violations instead of silently blessing them. Ends with staleness driven to zero.
|
|
4
|
-
allowed-tools: [Bash, Read, Write, Edit, Glob, Agent, TaskCreate, TaskUpdate, TaskGet, TaskList]
|
|
5
|
-
keywords: [docs, standards, reconcile, doc-drift, stale-docs, agent-os, spec, documentation, drift, sync]
|
|
6
4
|
---
|
|
7
5
|
|
|
8
6
|
# Doc Reconciliation with scip-query
|
|
@@ -76,7 +74,7 @@ Then edit the doc:
|
|
|
76
74
|
|
|
77
75
|
```bash
|
|
78
76
|
scip-query doc-drift <doc> # staleness must drop to 0, broken refs to none
|
|
79
|
-
scip-query diff-gate
|
|
77
|
+
scip-query diff-gate --json # your own doc edits gate clean before commit
|
|
80
78
|
```
|
|
81
79
|
|
|
82
80
|
A doc still showing staleness after your edit means a subject changed in
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scip-explore
|
|
3
3
|
description: Deep codebase exploration using scip-query. Trace how any system works end-to-end — call graphs, data flow, dependencies, blast radius — using compiler-resolved analysis. Use when you need to understand how something works before answering questions or making changes.
|
|
4
|
-
allowed-tools: [Bash, Write, Edit, Glob, Agent, TaskCreate, TaskUpdate, TaskGet, TaskList]
|
|
5
|
-
keywords: [explore, understand, trace, investigate, how-does, explain, architecture, flow, debug, navigate, codebase]
|
|
6
4
|
---
|
|
7
5
|
|
|
8
6
|
# Codebase Exploration with scip-query
|
|
@@ -90,8 +88,10 @@ Start with the high-level map. Run these first:
|
|
|
90
88
|
|
|
91
89
|
```bash
|
|
92
90
|
scip-query stats # How big is this codebase?
|
|
91
|
+
scip-query kind-counts # What symbol kinds dominate?
|
|
93
92
|
scip-query system <module> # Full module map: files, symbols, deps
|
|
94
93
|
scip-query outline <entry-file> # What's in the entry point?
|
|
94
|
+
scip-query by-kind function --scope <module> # Inventory one kind in scope
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
**Output:** List all files in the module, the key symbols, what it depends on, and what depends on it. This is your map.
|
|
@@ -115,6 +115,7 @@ Understand what the system depends on and who depends on it:
|
|
|
115
115
|
```bash
|
|
116
116
|
scip-query deps <file> # Forward: what does this file need?
|
|
117
117
|
scip-query rdeps <file> # Reverse: who breaks if this changes?
|
|
118
|
+
scip-query fan-out <file> # External symbols this file reaches for
|
|
118
119
|
scip-query surface <module> # True public API (what consumers use)
|
|
119
120
|
scip-query affected <symbol> # Full transitive blast radius
|
|
120
121
|
```
|
|
@@ -158,6 +159,7 @@ scip-query coupling <file1> <file2> # How tightly coupled are two files?
|
|
|
158
159
|
|
|
159
160
|
```bash
|
|
160
161
|
scip-query code X # Read the source
|
|
162
|
+
scip-query hierarchy X # Symbol ancestry: method -> class -> module
|
|
161
163
|
scip-query call-graph X # What it calls, who calls it
|
|
162
164
|
scip-query dataflow X # What data flows through it
|
|
163
165
|
scip-query complexity X # How complex is it
|
|
@@ -222,13 +224,17 @@ Every file path, line number, and behavioral claim includes the scip-query comma
|
|
|
222
224
|
| Read source code | `scip-query code <symbol> [-C N]` |
|
|
223
225
|
| All symbols in a file | `scip-query outline <file>` |
|
|
224
226
|
| Find files | `scip-query files <pattern>` |
|
|
227
|
+
| Symbol kind histogram | `scip-query kind-counts` |
|
|
228
|
+
| Symbols by kind | `scip-query by-kind <kind>` |
|
|
225
229
|
| Full module map | `scip-query system <module>` |
|
|
226
230
|
| True public API | `scip-query surface <module>` |
|
|
231
|
+
| Symbol ancestry | `scip-query hierarchy <symbol>` |
|
|
227
232
|
| Callers + callees | `scip-query call-graph <symbol>` |
|
|
228
233
|
| Every reference | `scip-query refs <symbol>` |
|
|
229
234
|
| Definition + references | `scip-query trace <symbol>` |
|
|
230
235
|
| Forward dependencies | `scip-query deps <file>` |
|
|
231
236
|
| Reverse dependencies | `scip-query rdeps <file>` |
|
|
237
|
+
| External symbol reach | `scip-query fan-out [file]` |
|
|
232
238
|
| Transitive blast radius | `scip-query affected <symbol>` |
|
|
233
239
|
| Pre-change risk briefing | `scip-query change-surface <file>` |
|
|
234
240
|
| Dataflow analysis | `scip-query dataflow <symbol>` |
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scip-health-audit
|
|
3
|
+
description: Confirm and prioritize scip-query health signals before cleanup. Use after `scip-query setup`, when reviewing `docs/scip-query/health-dossier.*`, when a user asks for a health audit, issue cleanup, perfect-code pass, setup follow-through, or confirmation of raw scip-query findings before an agent starts fixing them.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SCIP Health Audit
|
|
7
|
+
|
|
8
|
+
Use this skill to turn raw scip-query health output into a confirmed cleanup queue.
|
|
9
|
+
|
|
10
|
+
A health signal is a scip-query reported fact about source code, references, docs, or capability coverage that may indicate maintenance risk. A confirmed issue is a health signal the agent has checked against the current code and SCIP evidence, then classified as a real fix target, an intentional design choice, a false positive, or a blocked investigation.
|
|
11
|
+
|
|
12
|
+
For autonomous score improvement after this confirmation pass, invoke
|
|
13
|
+
`scip-health-improve`. This skill is the confirmation and ranking pass; the
|
|
14
|
+
improvement skill owns the keep-working cleanup loop.
|
|
15
|
+
|
|
16
|
+
## Non-Negotiables
|
|
17
|
+
|
|
18
|
+
1. Start from current evidence. Run `scip-query reindex` when the index is stale, missing, or uncertain.
|
|
19
|
+
2. Do not start cleanup before telling the user the health score and listing the confirmed items that need attention.
|
|
20
|
+
3. Do not call raw analyzer output an issue until you inspect the code or graph evidence that makes it real.
|
|
21
|
+
4. Do not defer confirmed fix targets into vague future work. If the active user request asks for cleanup, start the safest confirmed batch after the visible health report.
|
|
22
|
+
5. Do not use `scip-query setup-ci` in this workflow. CI setup is intentionally outside first-run setup and health cleanup for now.
|
|
23
|
+
|
|
24
|
+
## Evidence Collection
|
|
25
|
+
|
|
26
|
+
If setup just ran, read the dossier first:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
scip-query setup --json
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Then collect the current state:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
scip-query doctor
|
|
36
|
+
scip-query status --capabilities
|
|
37
|
+
scip-query reindex
|
|
38
|
+
scip-query health --json --full
|
|
39
|
+
scip-query diff-gate --json
|
|
40
|
+
scip-query capability-matrix --json
|
|
41
|
+
scip-query config-validate --json
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
If `doctor`, `status`, or `capability-matrix` reports unavailable capabilities, record them as unavailable checks. Unavailable is not clean; it means this signal class was not proven in this repository.
|
|
45
|
+
|
|
46
|
+
## Signal Sweep
|
|
47
|
+
|
|
48
|
+
Run the relevant commands for the repository and scope. Prefer `--json` where supported so the dossier can be updated without scraping prose.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
scip-query cleanup-plan --verify --json
|
|
52
|
+
scip-query recent-duplicates --json --full
|
|
53
|
+
scip-query incomplete-migration --json --full
|
|
54
|
+
scip-query unused-params --json --full
|
|
55
|
+
scip-query stale-abstractions --json --full
|
|
56
|
+
scip-query wrapper-candidates --json --full
|
|
57
|
+
scip-query passthrough-candidates --json --full
|
|
58
|
+
scip-query dead --json --full
|
|
59
|
+
scip-query isolated --json --full
|
|
60
|
+
scip-query cycles
|
|
61
|
+
scip-query co-change --json --full
|
|
62
|
+
scip-query doc-drift --json --full
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
For React projects, add:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
scip-query react-component-duplicates --json --full
|
|
69
|
+
scip-query react-hook-candidates --json --full
|
|
70
|
+
scip-query react-large-component-pressure --json --full
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
For Vue projects, add:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
scip-query vue-component-duplicates --json --full
|
|
77
|
+
scip-query vue-composable-candidates --json --full
|
|
78
|
+
scip-query vue-large-view-pressure --json --full
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Confirm Findings
|
|
82
|
+
|
|
83
|
+
For every candidate that could become a fix target, inspect the relevant code and graph evidence.
|
|
84
|
+
|
|
85
|
+
Use these probes as needed:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
scip-query code <symbol-or-file>
|
|
89
|
+
scip-query refs <symbol>
|
|
90
|
+
scip-query fan-in <symbol>
|
|
91
|
+
scip-query fan-out <symbol>
|
|
92
|
+
scip-query affected <symbol> --json
|
|
93
|
+
scip-query change-surface <file> --json --full
|
|
94
|
+
scip-query convergence <symbolA> <symbolB>
|
|
95
|
+
scip-query co-change <file> --json --full
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Classify each candidate:
|
|
99
|
+
|
|
100
|
+
- `confirmed fix target`: the code evidence shows unnecessary code, broken migration, stale docs, accidental duplication, hidden coupling, or another real maintenance burden.
|
|
101
|
+
- `intentional design`: the finding is real but the current shape exists for a documented product, compatibility, performance, API, or ownership reason.
|
|
102
|
+
- `false positive`: the analyzer report contradicts inspected code or graph evidence. Record the analyzer improvement needed.
|
|
103
|
+
- `blocked`: confirmation needs a missing toolchain, missing test command, missing product decision, or unavailable capability.
|
|
104
|
+
|
|
105
|
+
Use `scip-query suppress <id> --reason "<specific reason>"` only for accepted findings that have stable finding IDs and a durable reason. A suppression is an explicit design record, not a way to hide uncertainty.
|
|
106
|
+
|
|
107
|
+
## User Handoff Before Cleanup
|
|
108
|
+
|
|
109
|
+
Before editing application code, send the user a compact report in this order:
|
|
110
|
+
|
|
111
|
+
```markdown
|
|
112
|
+
Health score: N/100
|
|
113
|
+
|
|
114
|
+
Confirmed items to address:
|
|
115
|
+
- [priority] <finding> - <evidence command> - <first safe action>
|
|
116
|
+
|
|
117
|
+
Unconfirmed signals:
|
|
118
|
+
- <signal> - <what evidence is still needed>
|
|
119
|
+
|
|
120
|
+
Unavailable or blocked checks:
|
|
121
|
+
- <check> - <why it could not be proven>
|
|
122
|
+
|
|
123
|
+
Recommended first cleanup batch:
|
|
124
|
+
- <batch> - <why this is safe to start now>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
If there are no confirmed fix targets, say that clearly and list remaining unconfirmed or unavailable signals.
|
|
128
|
+
|
|
129
|
+
## Cleanup Order
|
|
130
|
+
|
|
131
|
+
When the user has asked for cleanup or the current workflow is post-setup cleanup, start after the handoff with the safest confirmed batch:
|
|
132
|
+
|
|
133
|
+
1. Compiler-verified deletion batches from `scip-query cleanup-plan --verify --json`, applied with `scip-query cleanup-apply --verified --batch <n>`.
|
|
134
|
+
2. Broken or stale docs from `scip-query doc-drift --json --full`.
|
|
135
|
+
3. Incomplete migrations and recent duplicate echoes from `scip-query incomplete-migration --json --full` and `scip-query recent-duplicates --json --full`.
|
|
136
|
+
4. Unused trailing parameters from `scip-query unused-params --json --full`.
|
|
137
|
+
5. Thin wrappers, passthroughs, stale abstractions, and hidden co-change couplings after confirming behavior.
|
|
138
|
+
|
|
139
|
+
After every batch:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
scip-query reindex
|
|
143
|
+
scip-query diff-gate --json
|
|
144
|
+
scip-query health --json --full
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Update `docs/scip-query/health-dossier.md` and `docs/scip-query/health-dossier.json` when they exist. Preserve raw signals, confirmation status, evidence commands, fixes applied, and remaining blockers.
|
|
148
|
+
|
|
149
|
+
## Finish Criteria
|
|
150
|
+
|
|
151
|
+
The audit is complete only when every collected signal is one of:
|
|
152
|
+
|
|
153
|
+
- fixed and verified;
|
|
154
|
+
- confirmed intentional with a durable reason;
|
|
155
|
+
- recorded as a false positive with analyzer-improvement notes;
|
|
156
|
+
- blocked by a named external constraint or user decision.
|
|
157
|
+
|
|
158
|
+
End with the final health score, the verification commands run, and the remaining blocked or intentionally accepted items.
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scip-health-improve
|
|
3
|
+
description: Autonomously raise a scip-query repository's health score with verified, bounded cleanup. Use when the user asks to improve, raise, or maximize the health score; clean up as much as reasonable; continue after setup; pursue perfect code; or keep working with minimal interaction until no safe confirmed work remains.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SCIP Health Improve
|
|
7
|
+
|
|
8
|
+
Use this skill for an autonomous health-improvement campaign. The target is not
|
|
9
|
+
score chasing: fix confirmed issues that make the codebase harder to understand,
|
|
10
|
+
verify, or change, then stop when the remaining score movement is unsafe,
|
|
11
|
+
unproven, blocked, or not worth the risk.
|
|
12
|
+
|
|
13
|
+
A confirmed issue is a raw scip-query signal that the agent has checked against
|
|
14
|
+
current code, graph evidence, or repository checks and classified as real,
|
|
15
|
+
intentional, false positive, or blocked.
|
|
16
|
+
|
|
17
|
+
## Non-Negotiables
|
|
18
|
+
|
|
19
|
+
1. If the environment supports durable goals and the user asked for autonomous
|
|
20
|
+
health improvement, create or continue a concrete goal: raise the scip-query
|
|
21
|
+
health score as high as reasonably possible by fixing confirmed actionable
|
|
22
|
+
findings while preserving behavior.
|
|
23
|
+
2. Start from current evidence. Run setup first only if the repository has not
|
|
24
|
+
been bootstrapped; otherwise refresh the index and collect current signals.
|
|
25
|
+
3. Before editing code, tell the user the current health score and the first
|
|
26
|
+
confirmed batch you will address.
|
|
27
|
+
4. Do not treat raw health output as actionable until you inspect the relevant
|
|
28
|
+
code, graph, or verification evidence.
|
|
29
|
+
5. Prioritize worst confirmed offenders first: high risk, high confidence, low
|
|
30
|
+
blast radius, strong expected score movement, and clear verification path.
|
|
31
|
+
6. Keep working batch by batch until no safe confirmed improvement remains, the
|
|
32
|
+
score stabilizes, or a real external decision blocks progress.
|
|
33
|
+
7. Do not run `scip-query setup-ci` in this workflow. CI setup is intentionally
|
|
34
|
+
separate until that path is mature.
|
|
35
|
+
|
|
36
|
+
## Evidence Baseline
|
|
37
|
+
|
|
38
|
+
Collect the baseline before ranking:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
scip-query doctor
|
|
42
|
+
scip-query status --capabilities
|
|
43
|
+
scip-query reindex
|
|
44
|
+
scip-query health --json --full
|
|
45
|
+
scip-query diff-gate --json
|
|
46
|
+
scip-query capability-matrix --json
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Unavailable capabilities are not clean results. Record them as unproven signal
|
|
50
|
+
classes and fix missing local prerequisites when that is in scope.
|
|
51
|
+
|
|
52
|
+
## Priority Ladder
|
|
53
|
+
|
|
54
|
+
Work from the safest, highest-confidence improvements toward broader design
|
|
55
|
+
work:
|
|
56
|
+
|
|
57
|
+
1. Compiler-verified cleanup-plan deletion batches.
|
|
58
|
+
2. Incomplete migrations and recent duplicate echoes.
|
|
59
|
+
3. Unused params, unused imports, dead symbols, and isolated symbols.
|
|
60
|
+
4. Broken or stale docs, config validation issues, and missing co-change
|
|
61
|
+
partners.
|
|
62
|
+
5. Thin wrappers, passthrough layers, stale abstractions, and speculative
|
|
63
|
+
generality.
|
|
64
|
+
6. React or Vue duplicate components, hooks, composables, and large
|
|
65
|
+
component/view pressure.
|
|
66
|
+
7. Directory architecture and maintainability repairs only when the evidence is
|
|
67
|
+
strong and the blast radius is bounded.
|
|
68
|
+
|
|
69
|
+
## Confirmation Sweep
|
|
70
|
+
|
|
71
|
+
Run the relevant commands for the current repository and scope:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
scip-query cleanup-plan --verify --json
|
|
75
|
+
scip-query recent-duplicates --json --full
|
|
76
|
+
scip-query incomplete-migration --json --full
|
|
77
|
+
scip-query unused-params --json --full
|
|
78
|
+
scip-query stale-abstractions --json --full
|
|
79
|
+
scip-query wrapper-candidates --json --full
|
|
80
|
+
scip-query passthrough-candidates --json --full
|
|
81
|
+
scip-query doc-drift --json --full
|
|
82
|
+
scip-query co-change --json --full
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
For frontend projects, add the relevant React or Vue maintainability commands.
|
|
86
|
+
|
|
87
|
+
Confirm candidates with targeted probes before editing:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
scip-query code <symbol-or-file>
|
|
91
|
+
scip-query refs <symbol>
|
|
92
|
+
scip-query fan-in <symbol>
|
|
93
|
+
scip-query fan-out <symbol>
|
|
94
|
+
scip-query affected <symbol> --json
|
|
95
|
+
scip-query change-surface <file> --json --full
|
|
96
|
+
scip-query co-change <file> --json --full
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Autonomous Loop
|
|
100
|
+
|
|
101
|
+
Before the first edit, report:
|
|
102
|
+
|
|
103
|
+
```markdown
|
|
104
|
+
Health score: N/100
|
|
105
|
+
|
|
106
|
+
First confirmed batch:
|
|
107
|
+
- <finding> - <evidence> - <planned fix> - <verification>
|
|
108
|
+
|
|
109
|
+
Remaining notable signals:
|
|
110
|
+
- <signal> - <status: unconfirmed, intentional, false positive, blocked>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Then repeat:
|
|
114
|
+
|
|
115
|
+
1. Apply one verified deletion batch or one small targeted refactor.
|
|
116
|
+
2. Run the project check that proves the touched behavior.
|
|
117
|
+
3. Run:
|
|
118
|
+
```bash
|
|
119
|
+
scip-query reindex
|
|
120
|
+
scip-query diff-gate --json
|
|
121
|
+
scip-query health --json --full
|
|
122
|
+
```
|
|
123
|
+
4. Fix new diff-gate findings immediately unless they are documented,
|
|
124
|
+
intentional, or blocked.
|
|
125
|
+
5. Update `docs/scip-query/health-dossier.md` and
|
|
126
|
+
`docs/scip-query/health-dossier.json` when they exist.
|
|
127
|
+
6. Pick the next highest-priority confirmed item.
|
|
128
|
+
|
|
129
|
+
Use `scip-query cleanup-apply --verified --batch <n>` for verified deletion
|
|
130
|
+
batches. Use `--all` only with explicit human approval. Use `--force-dirty`
|
|
131
|
+
only after inspecting the touched files and confirming existing edits are
|
|
132
|
+
unrelated to the cleanup batch.
|
|
133
|
+
|
|
134
|
+
## Stop Criteria
|
|
135
|
+
|
|
136
|
+
Stop the campaign when one of these is true:
|
|
137
|
+
|
|
138
|
+
- the health score stabilizes after a verified batch;
|
|
139
|
+
- only intentional, false-positive, blocked, or unconfirmed items remain;
|
|
140
|
+
- the next improvement requires a product, API, compatibility, or ownership
|
|
141
|
+
decision from the user;
|
|
142
|
+
- a missing toolchain or unavailable capability prevents trustworthy
|
|
143
|
+
verification;
|
|
144
|
+
- further work would be broad architectural redesign rather than bounded health
|
|
145
|
+
improvement.
|
|
146
|
+
|
|
147
|
+
## Closeout
|
|
148
|
+
|
|
149
|
+
End with the starting and final health scores, batches applied, important files
|
|
150
|
+
changed, verification commands run, remaining accepted or blocked items, and the
|
|
151
|
+
next highest-value follow-up if one exists.
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scip-language-playbook
|
|
3
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
4
|
---
|
|
7
5
|
|
|
8
6
|
# Best scip-query Commands by Language
|
|
@@ -26,9 +24,12 @@ Run these in almost every codebase, regardless of language:
|
|
|
26
24
|
|
|
27
25
|
```bash
|
|
28
26
|
scip-query stats
|
|
27
|
+
scip-query kind-counts
|
|
29
28
|
scip-query files <feature-or-module-name>
|
|
30
29
|
scip-query outline <file>
|
|
30
|
+
scip-query by-kind function --scope <feature-or-module-name>
|
|
31
31
|
scip-query trace <symbol>
|
|
32
|
+
scip-query hierarchy <symbol>
|
|
32
33
|
scip-query code <symbol>
|
|
33
34
|
```
|
|
34
35
|
|
|
@@ -69,7 +70,7 @@ Vue note: `.vue` single-file components are handled by the same path. scip-query
|
|
|
69
70
|
Use first:
|
|
70
71
|
```bash
|
|
71
72
|
scip-query outline <file>
|
|
72
|
-
scip-query
|
|
73
|
+
scip-query kind-counts --scope <module-or-file>
|
|
73
74
|
scip-query system <module-or-file>
|
|
74
75
|
scip-query imports <file>
|
|
75
76
|
scip-query imported-by <symbol>
|
|
@@ -210,7 +211,7 @@ scip-query trace <symbol>
|
|
|
210
211
|
scip-query call-graph <symbol>
|
|
211
212
|
scip-query refs <symbol>
|
|
212
213
|
scip-query outline <file>
|
|
213
|
-
scip-query
|
|
214
|
+
scip-query fan-out <file>
|
|
214
215
|
```
|
|
215
216
|
|
|
216
217
|
Skip:
|
|
@@ -348,6 +349,8 @@ scip-query extract-candidates
|
|
|
348
349
|
```bash
|
|
349
350
|
scip-query files <feature>
|
|
350
351
|
scip-query outline <file>
|
|
352
|
+
scip-query kind-counts --scope <feature>
|
|
353
|
+
scip-query fan-out <file>
|
|
351
354
|
scip-query trace <entry-symbol>
|
|
352
355
|
scip-query call-graph <entry-symbol>
|
|
353
356
|
scip-query code <entry-symbol>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scip-maintainability
|
|
3
3
|
description: Principled maintainability review using scip-query. Finds hidden policies, scattered concepts, accidental variation, weak boundaries, and system-compression opportunities, then proposes or executes structural improvements and verifies post-change wiring without chasing health scores.
|
|
4
|
-
allowed-tools: [Bash, Write, Edit, Glob, Agent, TaskCreate, TaskUpdate, TaskGet, TaskList]
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# SCIP Maintainability Review
|
|
@@ -41,6 +40,11 @@ System compression belongs inside this review. A system compression is a maintai
|
|
|
41
40
|
|
|
42
41
|
6. **Prefer small named mechanisms.** Delete, inline, merge, generate, or enforce before adding broad frameworks.
|
|
43
42
|
|
|
43
|
+
7. **Treat suppressions as accepted design records.** Prefer fixing findings.
|
|
44
|
+
Use `scip-query suppress <id> --reason "<specific reason>"` only for
|
|
45
|
+
intentional design, compatibility shims, framework entry points, or accepted
|
|
46
|
+
false positives. Run `scip-query config-validate` afterward.
|
|
47
|
+
|
|
44
48
|
---
|
|
45
49
|
|
|
46
50
|
## Core Concepts
|
|
@@ -259,8 +263,8 @@ Then run the post-change checks that match what the fix actually did:
|
|
|
259
263
|
Always finish implemented maintainability work with:
|
|
260
264
|
|
|
261
265
|
```bash
|
|
262
|
-
scip-query diff-impact
|
|
263
|
-
scip-query reindex && scip-query diff-gate
|
|
266
|
+
scip-query diff-impact --json
|
|
267
|
+
scip-query reindex && scip-query diff-gate --json
|
|
264
268
|
```
|
|
265
269
|
|
|
266
270
|
Treat `diff-gate` findings as unfinished work. Fix them or state a concrete acceptance reason; do not silently report success.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scip-query
|
|
3
3
|
description: Router for codebase work in scip-query-indexed projects. Use whenever exploring, planning, implementing, refactoring, extracting helpers, verifying changes, hunting duplication or bloat, fixing stale docs, or cleaning up after an AI coding session — or when unsure which scip-* skill applies. Picks the right specialist skill and the commands that must run for each phase of work.
|
|
4
|
-
allowed-tools: [Bash, Skill]
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# scip-query Router
|
|
@@ -21,26 +20,59 @@ When the user asks you to build, change, or fix something non-trivial:
|
|
|
21
20
|
1. **Plan first** — invoke `concrete-plan` (every claim in the plan must come
|
|
22
21
|
from a scip-query command, anchored by `scip-query plan-context <target>`).
|
|
23
22
|
2. **Implement** the plan.
|
|
24
|
-
3. **
|
|
25
|
-
|
|
26
|
-
4. **Gate before done** — `scip-query reindex
|
|
27
|
-
findings or state explicitly why each is
|
|
23
|
+
3. **Verify** — invoke `scip-verify`, then run the post-checks that match what
|
|
24
|
+
you changed (table below).
|
|
25
|
+
4. **Gate before done** — run `scip-query reindex`, then
|
|
26
|
+
`scip-query diff-gate --json`; fix findings or state explicitly why each is
|
|
27
|
+
accepted.
|
|
28
28
|
|
|
29
29
|
## Route by phase of work
|
|
30
30
|
|
|
31
|
-
| You are about to...
|
|
32
|
-
|
|
33
|
-
| Understand how something works, trace a system end-to-end
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
31
|
+
| You are about to... | Invoke | Anchor commands |
|
|
32
|
+
| ------------------------------------------------------------------------------------------------------------------ | ----------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
33
|
+
| Understand how something works, trace a system end-to-end | `scip-explore` | `scip-query system <module>`, `scip-query trace <symbol>` |
|
|
34
|
+
| Debug a bug, regression, failing behavior, or wrong data flow | `scip-debug` | `scip-query trace <symbol>`, `scip-query dataflow <symbol>`, `scip-query change-surface <file>` |
|
|
35
|
+
| Triage a bug report or issue into evidence and a fix plan | `scip-triage-issue` | `scip-query files <term>`, `scip-query trace <symbol>`, `scip-query affected <symbol>` |
|
|
36
|
+
| Create a visual explanation, flow map, dependency map, or HTML diagram | `scip-diagram` | `scip-query call-graph <symbol>`, `scip-query dataflow <symbol>`, `scip-query affected <symbol>` |
|
|
37
|
+
| Plan a feature, fix, or refactor | `concrete-plan` | `scip-query plan-context <target>` |
|
|
38
|
+
| Assess a public API, route, CLI, config, schema, or boundary change | `scip-api-impact` | `scip-query surface <module>`, `scip-query affected <symbol>`, `scip-query co-change <file>` |
|
|
39
|
+
| Pick high-signal commands for an unfamiliar language | `scip-language-playbook` | — |
|
|
40
|
+
| Adopt or bootstrap scip-query in a repository | `scip-adoption` | `scip-query setup --json`, `scip-query check-deps`, `scip-query capability-matrix --json` |
|
|
41
|
+
| Verify work you just finished (any implementation, refactor, or extraction) | `scip-verify` | `scip-query reindex`, `scip-query diff-gate --json` |
|
|
42
|
+
| Confirm post-setup health signals before cleanup | `scip-health-audit` | `scip-query health --json --full`, `scip-query diff-gate --json` |
|
|
43
|
+
| Raise the health score as high as reasonably possible with autonomous verified cleanup | `scip-health-improve` | `scip-query health --json --full`, `scip-query cleanup-plan --verify --json`, `scip-query diff-gate --json` |
|
|
44
|
+
| Audit dead code, duplication, unnecessary abstractions, or structural bloat and produce a prioritized cleanup plan | `scip-debloat` | `scip-query health` |
|
|
45
|
+
| Clean up recent AI-assisted coding rot, copied echoes, incomplete migrations, speculative params, or doc drift | `scip-ai-cleanup` | `scip-query recent-duplicates`, `scip-query incomplete-migration` |
|
|
46
|
+
| Reconcile docs/standards that drifted from the code | `scip-doc-reconcile` | `scip-query doc-drift <doc>` |
|
|
47
|
+
| Review or redesign source folder structure and ownership boundaries | `scip-directory-architecture` | `scip-query locality-candidates --json --full`, `scip-query similar-files --full` |
|
|
48
|
+
| Review architecture, hidden policies, weak boundaries beyond folder structure | `scip-maintainability` | `scip-query bottlenecks`, `scip-query coupling` |
|
|
49
|
+
| Review React frontend reuse, components, hooks, or TSX/JSX maintainability | `scip-react-maintainability` | `scip-query react-component-duplicates --full`, `scip-query react-hook-candidates --full` |
|
|
50
|
+
| Review Vue frontend reuse, SFCs, templates, or composables | `scip-vue-maintainability` | `scip-query vue-component-duplicates --full`, `scip-query vue-composable-candidates --full` |
|
|
51
|
+
|
|
52
|
+
## Tie-break close calls
|
|
53
|
+
|
|
54
|
+
Use these boundaries before loading a specialist skill:
|
|
55
|
+
|
|
56
|
+
- `scip-health-audit` confirms, ranks, and reports health signals before code
|
|
57
|
+
changes. It is the right first step when the user asks "what needs fixing?"
|
|
58
|
+
or when setup produced a health dossier.
|
|
59
|
+
- `scip-health-improve` is the autonomous campaign. Use it when the user asks
|
|
60
|
+
to raise/maximize the health score, keep working with minimal interaction, or
|
|
61
|
+
get the repo as clean as reasonably possible.
|
|
62
|
+
- `scip-debloat` is a bloat audit and cleanup plan. Use it when the user wants
|
|
63
|
+
dead code, duplication, unnecessary abstractions, wrappers, or structural
|
|
64
|
+
waste found and prioritized, but has not asked for a score-maxing campaign.
|
|
65
|
+
- `scip-ai-cleanup` is for AI-session residue: recent re-implementations of
|
|
66
|
+
established code, incomplete helper migrations, speculative parameters,
|
|
67
|
+
stale docs caused by generated changes, and echo code introduced in the
|
|
68
|
+
current or recent work.
|
|
69
|
+
- `scip-maintainability` is for deeper design pressure: hidden policies,
|
|
70
|
+
scattered concepts, weak boundaries, accidental variation, and system
|
|
71
|
+
compression. Use it when the problem is not just "delete waste" but "make the
|
|
72
|
+
codebase easier to reason about."
|
|
73
|
+
- `scip-directory-architecture` is only for folder ownership and migration
|
|
74
|
+
questions. Use it when the user asks where code should live, whether
|
|
75
|
+
boundaries are mature, or how to reorganize source directories.
|
|
44
76
|
|
|
45
77
|
Invoke skills by name (Skill tool or slash command). If skill invocation is
|
|
46
78
|
unavailable in this harness, read `~/.agents/skills/<name>/SKILL.md` and
|
|
@@ -51,16 +83,16 @@ follow it directly.
|
|
|
51
83
|
After implementing, run the checks for what the change actually did — every
|
|
52
84
|
row, every time it applies:
|
|
53
85
|
|
|
54
|
-
| You just...
|
|
55
|
-
|
|
56
|
-
| Extracted a helper / created an abstraction
|
|
57
|
-
| Wrote a brand-new helper or module
|
|
58
|
-
| Added parameters, options, or config flags
|
|
59
|
-
| Added a forwarding or wrapper layer
|
|
60
|
-
| Added an interface, base class, or type alias
|
|
61
|
-
| Changed a schema, contract, config, or generated file | `scip-query co-change <file>` — update the historical partners or confirm the coupling broke
|
|
62
|
-
| Changed code that docs describe
|
|
63
|
-
| Deleted code
|
|
86
|
+
| You just... | Run |
|
|
87
|
+
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
88
|
+
| Extracted a helper / created an abstraction | `scip-query incomplete-migration` — lists call sites that still hold the logic inline; migrate them or state why they differ |
|
|
89
|
+
| Wrote a brand-new helper or module | `scip-query similar <it>` and `scip-query recent-duplicates` — reuse beats re-implementation; delete the echo |
|
|
90
|
+
| Added parameters, options, or config flags | `scip-query unused-params` — speculative "for later" params must go |
|
|
91
|
+
| Added a forwarding or wrapper layer | `scip-query wrapper-candidates` and `scip-query passthrough-candidates` — indirection must earn its keep |
|
|
92
|
+
| Added an interface, base class, or type alias | `scip-query stale-abstractions` — one real consumer is not an abstraction |
|
|
93
|
+
| Changed a schema, contract, config, or generated file | `scip-query co-change <file>` — update the historical partners or confirm the coupling broke |
|
|
94
|
+
| Changed code that docs describe | `scip-query doc-drift` — update the docs that now lie |
|
|
95
|
+
| Deleted code | `scip-query cleanup-plan --verify` — take the whole cascade with compiler proof |
|
|
64
96
|
|
|
65
97
|
Confusable detectors (full guide: docs/DETECTOR_GUIDE.md): `unused-params` is
|
|
66
98
|
parameter-level; `passthrough-candidates` = one **callee** (only forwards);
|
|
@@ -69,13 +101,22 @@ type-level. `recent-duplicates` = similarity + git age (which copy is the
|
|
|
69
101
|
echo); `incomplete-migration` = the inverse (the new helper is canonical, the
|
|
70
102
|
old inline copies must go).
|
|
71
103
|
|
|
72
|
-
**Before declaring any change done** — run `scip-query diff-gate`. Exit 1
|
|
104
|
+
**Before declaring any change done** — run `scip-query diff-gate --json`. Exit 1
|
|
73
105
|
means findings, each with a remediation. Fix them or knowingly accept them
|
|
74
106
|
with a stated reason; never ignore them silently.
|
|
75
107
|
|
|
76
108
|
## One-time project setup
|
|
77
109
|
|
|
78
|
-
If this project has
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
110
|
+
If this project has not been bootstrapped yet, run `scip-query setup`. It
|
|
111
|
+
installs bundled skills, checks indexer readiness, refreshes the index, runs
|
|
112
|
+
capability and health checks, writes the health dossier, and seeds agent
|
|
113
|
+
guidance. Use `scip-query setup-agent` only when you specifically need to
|
|
114
|
+
refresh AGENTS.md/CLAUDE.md guidance without the full setup pass.
|
|
115
|
+
Use `scip-query setup-hooks --json` to repair the current repository's
|
|
116
|
+
project-local Codex/Claude Code lifecycle hooks.
|
|
117
|
+
After setup, use `scip-health-audit` to confirm and rank raw health signals, or
|
|
118
|
+
`scip-health-improve` when the user wants the agent to raise the score as high
|
|
119
|
+
as reasonably possible with minimal interaction.
|
|
120
|
+
|
|
121
|
+
Do not use `scip-query setup-ci` as part of first-run setup. The CI workflow is
|
|
122
|
+
intentionally separate until its validation story is mature.
|