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.
Files changed (87) hide show
  1. package/README.md +9 -8
  2. package/dist/{chunk-YVLHL6KQ.js → chunk-237YUOPK.js} +2 -2
  3. package/dist/chunk-56UN3DMK.js +2 -0
  4. package/dist/chunk-5UDFZC4D.js +2 -0
  5. package/dist/{chunk-X474LKJX.js → chunk-6UFMPECA.js} +2 -2
  6. package/dist/chunk-7JOTOWZO.js +4 -0
  7. package/dist/chunk-A7RNHUJH.js +20 -0
  8. package/dist/chunk-AYYIZ4BA.js +4 -0
  9. package/dist/chunk-BNKE4TT5.js +2 -0
  10. package/dist/chunk-MA7OVFHI.js +2 -0
  11. package/dist/chunk-QUJBXLBY.js +2 -0
  12. package/dist/chunk-WBJZNPUT.js +2 -0
  13. package/dist/{chunk-4HOMAEDD.js → chunk-YUTRW57I.js} +2 -2
  14. package/dist/cli.js +209 -197
  15. package/dist/frontend-behavior-evidence-BxKpKWUu.d.ts +4 -0
  16. package/dist/postinstall.js +3 -3
  17. package/dist/queries/diff-gate.d.ts +4 -2
  18. package/dist/queries/diff-gate.js +1 -1
  19. package/dist/queries/diff-impact.js +1 -1
  20. package/dist/queries/doc-drift.js +1 -1
  21. package/dist/queries/health.js +1 -1
  22. package/dist/queries/incomplete-migration.js +1 -1
  23. package/dist/queries/index.d.ts +1 -0
  24. package/dist/queries/index.js +1 -1
  25. package/dist/queries/plan-context.js +1 -1
  26. package/dist/queries/react-component-duplicates.js +1 -1
  27. package/dist/queries/react-hook-candidates.d.ts +3 -2
  28. package/dist/queries/react-hook-candidates.js +1 -1
  29. package/dist/queries/recent-duplicates.js +1 -1
  30. package/dist/queries/vue-component-duplicates.js +1 -1
  31. package/dist/queries/vue-composable-candidates.d.ts +3 -2
  32. package/dist/queries/vue-composable-candidates.js +1 -1
  33. package/dist/runtime.js +1 -1
  34. package/docs/AGENT_GUIDE.md +42 -5
  35. package/docs/AI_FAILURE_MODES.md +28 -21
  36. package/docs/COMMAND_REFERENCE.md +4 -2
  37. package/docs/analyzer-inventory.md +5 -1
  38. package/docs/analyzer-validation-ledger.md +8 -0
  39. package/package.json +3 -2
  40. package/skills/concrete-plan/SKILL.md +3 -5
  41. package/skills/concrete-plan/agents/openai.yaml +4 -0
  42. package/skills/scip-adoption/SKILL.md +120 -0
  43. package/skills/scip-adoption/agents/openai.yaml +4 -0
  44. package/skills/scip-ai-cleanup/SKILL.md +12 -4
  45. package/skills/scip-ai-cleanup/agents/openai.yaml +4 -0
  46. package/skills/scip-api-impact/SKILL.md +147 -0
  47. package/skills/scip-api-impact/agents/openai.yaml +4 -0
  48. package/skills/scip-debloat/SKILL.md +15 -13
  49. package/skills/scip-debloat/agents/openai.yaml +4 -0
  50. package/skills/scip-debug/SKILL.md +119 -0
  51. package/skills/scip-debug/agents/openai.yaml +4 -0
  52. package/skills/scip-diagram/SKILL.md +138 -0
  53. package/skills/scip-diagram/agents/openai.yaml +4 -0
  54. package/skills/scip-directory-architecture/SKILL.md +2 -2
  55. package/skills/scip-directory-architecture/agents/openai.yaml +4 -0
  56. package/skills/scip-doc-reconcile/SKILL.md +1 -3
  57. package/skills/scip-doc-reconcile/agents/openai.yaml +4 -0
  58. package/skills/scip-explore/SKILL.md +8 -2
  59. package/skills/scip-explore/agents/openai.yaml +4 -0
  60. package/skills/scip-health-audit/SKILL.md +158 -0
  61. package/skills/scip-health-audit/agents/openai.yaml +4 -0
  62. package/skills/scip-health-improve/SKILL.md +151 -0
  63. package/skills/scip-health-improve/agents/openai.yaml +4 -0
  64. package/skills/scip-language-playbook/SKILL.md +7 -4
  65. package/skills/scip-language-playbook/agents/openai.yaml +4 -0
  66. package/skills/scip-maintainability/SKILL.md +7 -3
  67. package/skills/scip-maintainability/agents/openai.yaml +4 -0
  68. package/skills/scip-query/SKILL.md +74 -33
  69. package/skills/scip-query/agents/openai.yaml +4 -0
  70. package/skills/scip-query-setup/SKILL.md +65 -18
  71. package/skills/scip-query-setup/agents/openai.yaml +3 -0
  72. package/skills/scip-react-maintainability/SKILL.md +2 -2
  73. package/skills/scip-react-maintainability/agents/openai.yaml +4 -0
  74. package/skills/scip-triage-issue/SKILL.md +112 -0
  75. package/skills/scip-triage-issue/agents/openai.yaml +4 -0
  76. package/skills/scip-verify/SKILL.md +83 -232
  77. package/skills/scip-verify/agents/openai.yaml +4 -0
  78. package/skills/scip-vue-maintainability/SKILL.md +2 -3
  79. package/skills/scip-vue-maintainability/agents/openai.yaml +4 -0
  80. package/dist/chunk-7ADUXFRZ.js +0 -2
  81. package/dist/chunk-GLJAAKDW.js +0 -4
  82. package/dist/chunk-GS33KGAY.js +0 -2
  83. package/dist/chunk-I7TSQZ3J.js +0 -4
  84. package/dist/chunk-NP5HYVLX.js +0 -20
  85. package/dist/chunk-O4L4AB3T.js +0 -2
  86. package/dist/chunk-TO54DY4O.js +0 -2
  87. package/dist/chunk-UMNENNTX.js +0 -2
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: scip-query-setup
3
- description: Set up or refresh scip-query in a repository so agents can use compiler-resolved code intelligence effectively. Use when adopting scip-query in a repo, fixing stale setup, adding AGENTS.md guidance, checking capability coverage, configuring .scipquery.json, or calibrating locality architectural boundaries.
4
- allowed-tools: [Bash, Read, Edit, Write, Glob, Skill]
3
+ description: Set up or refresh scip-query in a repository so agents can use compiler-resolved code intelligence effectively. Use when adopting scip-query in a repo, running the robust `scip-query setup` bootstrap, fixing stale setup, adding AGENTS.md guidance, checking capability coverage, generating the health dossier, configuring .scipquery.json, or calibrating locality architectural boundaries.
5
4
  ---
6
5
 
7
6
  # scip-query Setup
@@ -25,38 +24,73 @@ git rev-parse --show-toplevel
25
24
 
26
25
  ```bash
27
26
  scip-query --version
28
- scip-query status --json
27
+ scip-query doctor
29
28
  ```
30
29
 
31
30
  If the command is missing, install or link it using the repo's package manager, then rerun this step.
32
31
 
33
- 3. Create or refresh the index.
32
+ 3. Ensure bundled skills are available and project-local lifecycle hooks are configured.
34
33
 
35
34
  ```bash
36
- scip-query reindex
37
- scip-query stats
35
+ scip-query install-skills
36
+ scip-query setup-hooks --json
37
+ ```
38
+
39
+ The setup command also installs skills and configures project-local hooks, but running `install-skills` directly is useful when refreshing a user-level Codex, Claude Code, or shared agents skill root. Use `setup-hooks` when the user wants to repair the current repository's reviewable `.codex/hooks.json` and `.claude/settings.json` files without rerunning the full setup pass.
40
+
41
+ 4. Run the robust local setup pass.
42
+
43
+ ```bash
44
+ scip-query setup --json
38
45
  ```
39
46
 
40
- If indexing fails, run `scip-query status --json` and fix the reported missing indexer, language, or config problem before continuing.
47
+ This pass installs bundled skills, configures project-local hooks, checks indexer readiness, attempts configured indexer remediation, refreshes the index, verifies capabilities, smoke-tests representative command families, writes `docs/scip-query/health-dossier.md` and `docs/scip-query/health-dossier.json`, and seeds agent guidance.
41
48
 
42
- 4. Seed durable agent guidance.
49
+ If setup reports `blocked`, run:
43
50
 
44
51
  ```bash
45
- scip-query setup-agent
52
+ scip-query check-deps
53
+ scip-query capability-matrix --json
46
54
  ```
47
55
 
48
- Use `scip-query setup-agent --git-hook` only when the user wants the repository to enforce `diff-gate` before commits.
56
+ Fix the reported missing indexer, toolchain, language, or config problem before continuing. Do not call a missing capability "clean"; record it as unavailable or blocked.
57
+
58
+ 5. Initialize minimal config only when the project needs one.
59
+
60
+ ```bash
61
+ scip-query init
62
+ scip-query config-validate
63
+ ```
64
+
65
+ Keep `.scipquery.json` minimal. Add settings only when they are justified by observed repo facts, reviewed false positives, declared coupling, or explicit suppressions.
66
+
67
+ 6. Refresh the index and inspect project status when setup repairs anything.
68
+
69
+ ```bash
70
+ scip-query reindex
71
+ scip-query status --capabilities
72
+ scip-query capabilities --json
73
+ scip-query stats
74
+ ```
49
75
 
50
- 5. Check capability coverage.
76
+ If an upstream indexer skipped source files that should still be searchable or visible to agents, run:
51
77
 
52
78
  ```bash
53
- scip-query capability-matrix
54
- scip-query health
79
+ scip-query augment-sources
55
80
  ```
56
81
 
57
- Record unsupported or partial capabilities in the setup notes. Do not describe an analyzer as "clean" when the capability matrix says its evidence is unavailable for the language.
82
+ Use `scip-query watch` only for an active local session where repeated source edits need automatic reindexing. It is not part of the default setup proof.
83
+
84
+ 7. Confirm health signals before cleanup.
85
+
86
+ Invoke `scip-health-audit` after setup when the user wants cleanup, a post-setup follow-through, or a perfect-code pass. The agent must tell the user the health score and list confirmed items before changing application code.
87
+
88
+ ```bash
89
+ scip-query health --json --full
90
+ scip-query diff-gate --json
91
+ ```
58
92
 
59
- 6. Calibrate project config.
93
+ 8. Calibrate project config.
60
94
 
61
95
  Open or create `.scipquery.json`. Keep config minimal and tied to observed repo facts.
62
96
 
@@ -83,7 +117,7 @@ For an unstructured repo, setup runs in discovery mode. Discovery mode means the
83
117
 
84
118
  Use `locality.architecturalBoundarySegments` only when validation finds a repo-specific mature boundary that is not already in the built-in list. Add folder names, not paths.
85
119
 
86
- 7. Validate directory-organization signals when setup touches locality.
120
+ 9. Validate directory-organization signals when setup touches locality.
87
121
 
88
122
  ```bash
89
123
  scip-query locality-candidates --json --full
@@ -95,15 +129,28 @@ Validate both suppression and emission. Suppression means a bad generic home was
95
129
 
96
130
  If the repo has no mature boundaries, the correct setup result is a note, not a config guess: "locality boundaries not configured; repo needs architecture ownership decisions first." A slop codebase is a codebase whose files are arranged by accident, convenience, or recent edits rather than by stable ownership rules. Its defining trait is that directory names do not reliably predict where code should live, so the setup skill must not make `locality-candidates` appear more certain than the repo itself.
97
131
 
98
- 8. Finish with the standard gate.
132
+ 10. Finish with the standard gate.
99
133
 
100
134
  ```bash
101
135
  scip-query reindex
102
- scip-query diff-gate
136
+ scip-query diff-gate --json
103
137
  ```
104
138
 
105
139
  Fix findings or state the explicit acceptance reason.
106
140
 
141
+ Do not run `scip-query setup-ci` as part of this setup workflow. CI setup is intentionally deferred until that command has a mature validation path.
142
+
143
+ ## Suppressions
144
+
145
+ Prefer fixing findings. Use suppressions only for intentional design, compatibility shims, framework entry points, or accepted false positives with a specific reason.
146
+
147
+ ```bash
148
+ scip-query suppress <id> --reason "<specific reason>"
149
+ scip-query config-validate
150
+ ```
151
+
152
+ A suppression is a durable acceptance record. It should explain why the code should remain as-is, not merely silence a noisy report.
153
+
107
154
  ## Handoff Notes
108
155
 
109
156
  When setup changes are complete, record:
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "scip-query setup"
3
+ short_description: "Adopt or refresh scip-query indexing, agent guidance, capability checks, and project config"
@@ -73,7 +73,7 @@ After implementing a component reuse, hook extraction, or large-component split,
73
73
  Run the checks that match what changed:
74
74
 
75
75
  ```bash
76
- scip-query diff-impact
76
+ scip-query diff-impact --json
77
77
  scip-query react-component-duplicates --scope <react-source-scope> --full --json
78
78
  scip-query react-hook-candidates --scope <react-source-scope> --full --json
79
79
  scip-query react-large-component-pressure --scope <react-source-scope> --full --json
@@ -83,7 +83,7 @@ scip-query unused-params
83
83
  scip-query wrapper-candidates --scope <react-source-scope> --full --json
84
84
  scip-query passthrough-candidates --scope <react-source-scope> --full --json
85
85
  scip-query stale-abstractions --scope <react-source-scope> --include-low-confidence --full --json
86
- scip-query reindex && scip-query diff-gate
86
+ scip-query reindex && scip-query diff-gate --json
87
87
  ```
88
88
 
89
89
  Use the results this way:
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "SCIP React Maintainability"
3
+ short_description: "Review React reuse and component pressure"
4
+ default_prompt: "Use $scip-react-maintainability to review React reuse, hooks, components, and frontend health pressure."
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: scip-triage-issue
3
+ description: Triage bug reports and issues with scip-query evidence. Use when the user shares a GitHub issue, bug report, failing test, support report, TODO, vague defect, or asks to investigate, classify, root-cause, write an issue, or produce a test-first fix plan before implementation.
4
+ ---
5
+
6
+ # SCIP Issue Triage
7
+
8
+ Use this skill to turn a report into a grounded fix plan. An issue is a described mismatch between expected and observed behavior that needs a tracked decision or code change. Triage is the evidence pass that determines whether the issue is reproducible, where it enters the codebase, what root cause is most likely, and what test should fail before the fix.
9
+
10
+ ## Rules
11
+
12
+ 1. Do not file or implement from the title alone. Extract concrete observed behavior, expected behavior, scope, and reproduction first.
13
+ 2. Use scip-query for code evidence: entry points, references, call flow, data flow, blast radius, and similar implementations.
14
+ 3. Prefer a failing test plan before a code plan. If no test harness exists, name the smoke command or manual check that will prove the fix.
15
+ 4. If the user asks only for triage, stop at the triage packet. If they asked to fix it too, implement after the packet is clear.
16
+
17
+ ## Workflow
18
+
19
+ ### 1. Normalize the report
20
+
21
+ Record:
22
+
23
+ - title or short summary;
24
+ - observed behavior;
25
+ - expected behavior;
26
+ - reproduction steps or missing reproduction data;
27
+ - affected surface: CLI command, API route, UI view, job, library export, docs, or config;
28
+ - severity and user impact;
29
+ - known logs, stack traces, screenshots, failing tests, or issue links.
30
+
31
+ If key facts are missing but the repo can answer them, investigate. Ask the user only when the missing fact is product intent, credentials, private data, or an external system state you cannot inspect.
32
+
33
+ ### 2. Map likely code ownership
34
+
35
+ ```bash
36
+ scip-query status --capabilities
37
+ scip-query reindex
38
+ scip-query files <issue-term>
39
+ scip-query outline <candidate-file>
40
+ scip-query system <module-or-scope>
41
+ scip-query surface <module-or-scope>
42
+ ```
43
+
44
+ Use `scip-query kind-counts --scope <scope>` and `scip-query by-kind function --scope <scope>` when the issue names a broad subsystem and you need an inventory.
45
+
46
+ ### 3. Trace the failing path
47
+
48
+ ```bash
49
+ scip-query trace <entry-or-error-symbol>
50
+ scip-query code <entry-or-error-symbol>
51
+ scip-query call-graph <entry-symbol>
52
+ scip-query dataflow <state-or-input-symbol>
53
+ scip-query slice <state-or-input-symbol>
54
+ ```
55
+
56
+ If a stack trace names a file and line, use `scip-query code '<file>:<start>-<end>'` to read the exact region before following symbols.
57
+
58
+ ### 4. Look for known-good comparisons
59
+
60
+ ```bash
61
+ scip-query similar <suspect-symbol> --json --full
62
+ scip-query convergence <suspect-symbol> <comparison-symbol>
63
+ scip-query similar-files <suspect-file> --json --full
64
+ scip-query co-change <suspect-file> --json --full
65
+ ```
66
+
67
+ Use comparisons to identify a missing guard, validation step, conversion, docs partner, generated artifact, or test fixture.
68
+
69
+ ### 5. Bound impact and test shape
70
+
71
+ ```bash
72
+ scip-query change-surface <suspect-file> --json --full
73
+ scip-query affected <suspect-symbol> --json
74
+ scip-query diff-impact --json
75
+ ```
76
+
77
+ Choose the narrowest failing test that proves the bug. If the issue crosses a public API or generated contract, include `scip-query co-change <file> --json --full` in the plan.
78
+
79
+ ## Triage Packet
80
+
81
+ Write the packet before filing or fixing:
82
+
83
+ ```markdown
84
+ ## Issue
85
+ <one-sentence mismatch>
86
+
87
+ ## Reproduction
88
+ <steps, command, failing test, or missing data>
89
+
90
+ ## Evidence
91
+ - <scip-query command>: <fact>
92
+
93
+ ## Suspected Root Cause
94
+ <earliest code fact that explains the symptom>
95
+
96
+ ## Impact
97
+ - users/surfaces affected
98
+ - blast radius from `scip-query affected` or `change-surface`
99
+
100
+ ## Fix Plan
101
+ 1. Add or update failing test/smoke check.
102
+ 2. Make the smallest code change.
103
+ 3. Run targeted test.
104
+ 4. Run `scip-query reindex`.
105
+ 5. Run `scip-query diff-gate --json`.
106
+ 6. Invoke `scip-verify`.
107
+
108
+ ## Open Questions
109
+ - <product intent or external state only>
110
+ ```
111
+
112
+ If creating a GitHub issue, use the packet as the issue body and include exact file/symbol references. If no root cause is proven, label the result as `needs reproduction` or `needs product decision`, not as ready to implement.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "SCIP Triage Issue"
3
+ short_description: "Turn bug reports into evidence-backed fix plans"
4
+ default_prompt: "Triage this issue with scip-query evidence, identify the root cause, and write a test-first fix plan."