scip-query 0.10.2 → 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-FGCL6NDB.js → chunk-237YUOPK.js} +2 -2
- package/dist/chunk-56UN3DMK.js +2 -0
- package/dist/chunk-5UDFZC4D.js +2 -0
- package/dist/{chunk-MHK7Z53U.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-CNTEQMHA.js → chunk-EYLXU575.js} +2 -2
- package/dist/chunk-KRGBLZT2.js +7 -0
- package/dist/chunk-MA7OVFHI.js +2 -0
- package/dist/chunk-QUJBXLBY.js +2 -0
- package/dist/chunk-UQJGTVHV.js +5 -0
- package/dist/chunk-WBJZNPUT.js +2 -0
- package/dist/{chunk-UNJG7P2I.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/co-change.js +1 -1
- package/dist/queries/diff-gate.d.ts +10 -3
- 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/similar.d.ts +9 -1
- package/dist/queries/similar.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-5B53WB6E.js +0 -4
- package/dist/chunk-DRAZH77R.js +0 -7
- package/dist/chunk-FPMVCDIJ.js +0 -2
- package/dist/chunk-GS33KGAY.js +0 -2
- package/dist/chunk-MHTDOFV7.js +0 -5
- 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
- package/dist/chunk-WDUTG2ZR.js +0 -4
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scip-diagram
|
|
3
|
+
description: Create evidence-backed HTML diagrams of how code works using scip-query. Use when the user asks for a code flow diagram, architecture diagram, data-flow diagram, dependency map, blast-radius visualization, module map, or an HTML artifact that explains a system.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SCIP Diagram
|
|
7
|
+
|
|
8
|
+
Use this skill to build a visual explanation from compiler-resolved code facts. A code diagram is an HTML artifact that turns source units, calls, dependencies, data flow, or blast radius into a visual map. Its defining trait is that every node and edge comes from scip-query evidence, not from guessed folder structure.
|
|
9
|
+
|
|
10
|
+
## Rules
|
|
11
|
+
|
|
12
|
+
1. Run scip-query evidence first, then draw. Do not invent nodes or arrows.
|
|
13
|
+
2. Make a self-contained HTML file unless the user asks for another format.
|
|
14
|
+
3. Include command provenance in the HTML so readers can see which scip-query commands produced the diagram.
|
|
15
|
+
4. Keep diagrams scoped. If the graph is huge, summarize clusters and link to detailed evidence rather than rendering a hairball.
|
|
16
|
+
5. Verify the HTML opens cleanly and contains the expected diagram content.
|
|
17
|
+
|
|
18
|
+
## Pick the Diagram Type
|
|
19
|
+
|
|
20
|
+
| User wants | Use |
|
|
21
|
+
|---|---|
|
|
22
|
+
| "How does this feature work?" | Call-flow diagram |
|
|
23
|
+
| "Where does this value come from?" | Data-flow diagram |
|
|
24
|
+
| "What depends on this?" | Blast-radius diagram |
|
|
25
|
+
| "What is this module's architecture?" | Module/dependency diagram |
|
|
26
|
+
| "Why is this hard to change?" | Change-surface or bottleneck diagram |
|
|
27
|
+
| "Show classes or ownership" | Hierarchy and surface diagram |
|
|
28
|
+
|
|
29
|
+
## Evidence Commands
|
|
30
|
+
|
|
31
|
+
Start with current graph facts:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
scip-query status --capabilities
|
|
35
|
+
scip-query reindex
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Collect only the commands needed for the diagram:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
scip-query system <module>
|
|
42
|
+
scip-query surface <module>
|
|
43
|
+
scip-query outline <file>
|
|
44
|
+
scip-query trace <symbol>
|
|
45
|
+
scip-query code <symbol>
|
|
46
|
+
scip-query call-graph <symbol>
|
|
47
|
+
scip-query dataflow <symbol>
|
|
48
|
+
scip-query slice <symbol>
|
|
49
|
+
scip-query slice <symbol> --forward
|
|
50
|
+
scip-query deps <file>
|
|
51
|
+
scip-query rdeps <file>
|
|
52
|
+
scip-query affected <symbol> --json
|
|
53
|
+
scip-query change-surface <file> --json --full
|
|
54
|
+
scip-query hierarchy <symbol> --json
|
|
55
|
+
scip-query fan-out <file> --json
|
|
56
|
+
scip-query bottlenecks
|
|
57
|
+
scip-query cycles
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Use `scip-query kind-counts --scope <scope>` and `scip-query by-kind <kind> --scope <scope>` when the diagram needs an inventory of symbols.
|
|
61
|
+
|
|
62
|
+
## Build the HTML
|
|
63
|
+
|
|
64
|
+
Write the artifact under:
|
|
65
|
+
|
|
66
|
+
```text
|
|
67
|
+
docs/scip-query/diagrams/YYYY-MM-DD-<scope>.html
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
If the repo has a different reports convention, follow it. The file should include:
|
|
71
|
+
|
|
72
|
+
- title and scope;
|
|
73
|
+
- short textual summary;
|
|
74
|
+
- the visual diagram;
|
|
75
|
+
- legend for node colors, edge styles, and risk labels;
|
|
76
|
+
- evidence table listing every scip-query command used;
|
|
77
|
+
- notes for omitted nodes, collapsed clusters, or unavailable capabilities.
|
|
78
|
+
|
|
79
|
+
Implementation guidance:
|
|
80
|
+
|
|
81
|
+
- Use inline CSS and either semantic HTML layout or inline SVG.
|
|
82
|
+
- Use stable dimensions and labels that wrap cleanly.
|
|
83
|
+
- Use one visual encoding per meaning: call edges, data edges, dependency edges, and risk edges should look different.
|
|
84
|
+
- Keep colors accessible and avoid relying on color alone; include labels or edge styles.
|
|
85
|
+
- For large graphs, group by module, ownership, lifecycle phase, or public surface.
|
|
86
|
+
|
|
87
|
+
## Diagram Recipes
|
|
88
|
+
|
|
89
|
+
### Call Flow
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
scip-query trace <entry-symbol>
|
|
93
|
+
scip-query call-graph <entry-symbol>
|
|
94
|
+
scip-query code <entry-symbol>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Render entry point -> major callees -> side effects or terminal outputs. Label each edge with the call or branch reason when `code` proves it.
|
|
98
|
+
|
|
99
|
+
### Data Flow
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
scip-query dataflow <value-symbol>
|
|
103
|
+
scip-query slice <value-symbol>
|
|
104
|
+
scip-query slice <value-symbol> --forward
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Render producers, transformations, validators, storage, and consumers. Mark inferred or unavailable parts explicitly.
|
|
108
|
+
|
|
109
|
+
### Dependency or Module Map
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
scip-query system <module>
|
|
113
|
+
scip-query deps <file>
|
|
114
|
+
scip-query rdeps <file>
|
|
115
|
+
scip-query surface <module>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Render internal files, imported modules, reverse consumers, and public surfaces. Distinguish internal dependencies from external consumers.
|
|
119
|
+
|
|
120
|
+
### Blast Radius
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
scip-query affected <symbol> --json
|
|
124
|
+
scip-query change-surface <file> --json --full
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Render the changed symbol, direct consumers, transitive consumers, and high-risk surfaces. Show depth so the user can see how far the change travels.
|
|
128
|
+
|
|
129
|
+
## Verification
|
|
130
|
+
|
|
131
|
+
After writing the HTML:
|
|
132
|
+
|
|
133
|
+
1. Open it locally or use a browser/screenshot tool when available.
|
|
134
|
+
2. Confirm the diagram is nonblank and labels do not overlap badly.
|
|
135
|
+
3. Confirm every major node and edge is traceable to the evidence table.
|
|
136
|
+
4. Run `scip-query diff-gate --json` if the diagram is part of a code or docs change.
|
|
137
|
+
|
|
138
|
+
End by giving the file path and a short summary of what the diagram proves.
|
|
@@ -24,7 +24,7 @@ A migration slice is the smallest set of file moves and import updates that can
|
|
|
24
24
|
3. Preserve working conventions. Existing boundaries are not wrong just because they are broad; central folders such as `errors`, `routes`, `workflows`, `schemas`, `contracts`, or `features` may be doing real work.
|
|
25
25
|
4. Do not reward generic `shared`. A shared folder is justified only when the shared concept has a name, owner, and consumers across real boundaries.
|
|
26
26
|
5. Treat messy repos honestly. If ownership concepts are not stable, produce a discovery map and decision list instead of pretending the repo has a clean target structure.
|
|
27
|
-
6. Prefer small verified moves. Broad reorganizations need staged migration slices with import updates, tests, `scip-query reindex`, and `scip-query diff-gate`.
|
|
27
|
+
6. Prefer small verified moves. Broad reorganizations need staged migration slices with import updates, tests, `scip-query reindex`, and `scip-query diff-gate --json`.
|
|
28
28
|
|
|
29
29
|
## Workflow
|
|
30
30
|
|
|
@@ -159,7 +159,7 @@ scip-query reindex
|
|
|
159
159
|
scip-query incomplete-migration
|
|
160
160
|
scip-query recent-duplicates
|
|
161
161
|
scip-query co-change <moved-file-or-config>
|
|
162
|
-
scip-query diff-gate
|
|
162
|
+
scip-query diff-gate --json
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
Also run the repo's normal tests or typecheck for the affected workspace. If the migration adds or changes `.scipquery.json` locality settings, run:
|
|
@@ -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.
|