scip-query 0.19.4 → 0.19.5

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 (41) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-SVLTAG5O.js → chunk-7UY7SD7D.js} +119 -119
  4. package/dist/{chunk-VMNZB6WI.js → chunk-TW4OG5FC.js} +2 -2
  5. package/dist/chunk-XAGAZSFE.js +6 -0
  6. package/dist/cli.js +3 -3
  7. package/dist/command-descriptors-N2TL4XM2.js +613 -0
  8. package/dist/direct-navigation-DUCZCTOE.js +3 -0
  9. package/docs/AI_FAILURE_MODES.md +1 -1
  10. package/docs/COMMAND_REFERENCE.md +5 -5
  11. package/docs/DETECTOR_GUIDE.md +1 -1
  12. package/package.json +1 -1
  13. package/skills/_shared/SKILL.md +6 -16
  14. package/skills/scip-api-impact/SKILL.md +22 -21
  15. package/skills/scip-claim-audit/SKILL.md +18 -17
  16. package/skills/scip-cleanup-audit/SKILL.md +24 -20
  17. package/skills/scip-cleanup-improve/SKILL.md +19 -18
  18. package/skills/scip-concrete-plan/HIGH_ASSURANCE.md +317 -0
  19. package/skills/scip-concrete-plan/SKILL.md +70 -227
  20. package/skills/scip-conductor/SKILL.md +14 -14
  21. package/skills/scip-debug/SKILL.md +21 -21
  22. package/skills/scip-diagram/SKILL.md +27 -27
  23. package/skills/scip-directory-architecture/SKILL.md +44 -32
  24. package/skills/scip-doc-reconcile/SKILL.md +17 -17
  25. package/skills/scip-explore/SKILL.md +23 -23
  26. package/skills/scip-hyper-optimization/SKILL.md +23 -23
  27. package/skills/scip-language-playbook/SKILL.md +34 -34
  28. package/skills/scip-maintainability/SKILL.md +21 -21
  29. package/skills/scip-probe-reachability/SKILL.md +10 -9
  30. package/skills/scip-query/SKILL.md +39 -39
  31. package/skills/scip-react-maintainability/SKILL.md +21 -21
  32. package/skills/scip-root-cause/SKILL.md +21 -20
  33. package/skills/scip-setup/SKILL.md +25 -24
  34. package/skills/scip-tla-model-system/SKILL.md +7 -7
  35. package/skills/scip-triage-issue/SKILL.md +27 -20
  36. package/skills/scip-twin-drift/SKILL.md +18 -16
  37. package/skills/scip-verify/SKILL.md +25 -9
  38. package/skills/scip-vue-maintainability/SKILL.md +21 -21
  39. package/dist/chunk-ZAIILQNP.js +0 -5
  40. package/dist/command-descriptors-MFU4BCJ7.js +0 -612
  41. package/dist/direct-navigation-MRMQFIRB.js +0 -3
@@ -1,262 +1,105 @@
1
1
  ---
2
2
  name: scip-concrete-plan
3
- description: Plan code changes with scip-query evidence and testable design. Use for non-trivial implementation, refactor, migration, API, or bug-fix plans before editing code; require contextual definitions, cited premises, reuse audit, test seams, counterexample attacks, and a derived verdict.
3
+ description: Make an implementation plan or checklist before a non-trivial code change, refactor, migration, API edit, or bug fix. Uses scip-query to establish the end-to-end flow, affected consumers, and reuse options, then orders validated slices. Escalates for security, money, data migration, concurrency, and irreversible changes.
4
4
  commands:
5
- - template: "scip-query status --capabilities"
6
- when: "Discover: confirm the index is fresh before citing graph facts."
7
- - template: "scip-query plan-context <target>"
8
- when: "Discover: anchor the plan with pre-edit context for the target."
9
- - template: "scip-query refs <symbol>"
10
- when: "Premises: enumerate every writer and reader of a touched state surface; reuse audit: find existing consumers."
11
- - template: "scip-query dataflow <symbol-or-variable>"
12
- when: "Premises: producers and consumers backing a state-authority premise."
13
- - template: "scip-query code <symbol>"
14
- when: "Premises: read source before citing a behavior claim."
15
- - template: "scip-query trace <symbol>"
16
- when: "Verify the plan: rerun source-producing context for cited targets."
5
+ - template: 'scip-query status --capabilities'
6
+ when: 'Discover: confirm the index is fresh before citing graph facts.'
7
+ - template: 'scip-query plan-context <target>'
8
+ when: 'Discover: the one call that anchors the plan — flow, consumers, impact, reuse, history.'
9
+ - template: 'scip-query refs <symbol>'
10
+ when: 'Scope: enumerate consumers when plan-context bounds a section you need in full.'
11
+ - template: 'scip-query affected <symbol>'
12
+ when: 'Scope: transitive blast radius when the change is not consumer-local.'
13
+ - template: 'scip-query code <symbol>'
14
+ when: 'Flow: read source behind a behavior claim you are about to write down.'
17
15
  ---
18
16
 
19
17
  # Concrete Plan
20
18
 
21
- Use this skill to write an implementation plan that another agent can execute without guessing and a reviewer can check without re-deriving. A concrete plan is a certificate: a dated Markdown document whose conclusion — ready to implement — is derived from numbered, source-cited premises, defended against constructed counterexamples, and shaped so the intended behavior is easy to test before it is easy to ship.
19
+ Write an implementation plan another agent can execute without guessing and a reviewer can check
20
+ without re-deriving. Two modes: **ordinary** by default, **high-assurance** when the change earns
21
+ it. Pick the mode first — running the certificate on routine work is how planning becomes a tax
22
+ people route around.
22
23
 
23
- Load shared mechanics from [`../_shared/SKILL.md`](../_shared/SKILL.md) when you need lookup tips, command families, postchecks, or subagent rules.
24
+ Load shared mechanics from [`../_shared/SKILL.md`](../_shared/SKILL.md) when you need lookup tips,
25
+ command families, postchecks, or subagent rules.
24
26
 
25
27
  <!-- BEGIN GENERATED SKILL COMMANDS -->
26
28
  ## Commands for this skill
27
29
 
28
- | Command | Purpose | When |
29
- | --- | --- | --- |
30
- | `scip-query status --capabilities` | Show index status for this project | Discover: confirm the index is fresh before citing graph facts. |
31
- | `scip-query plan-context <target>` | Pre-edit planning context for a symbol, file, or module | Discover: anchor the plan with pre-edit context for the target. |
32
- | `scip-query refs <symbol>` | Find all files referencing a symbol | Premises: enumerate every writer and reader of a touched state surface; reuse audit: find existing consumers. |
33
- | `scip-query dataflow <symbol-or-variable>` | Reference-level dataflow: definition sites, usage sites, producers, consumers | Premises: producers and consumers backing a state-authority premise. |
34
- | `scip-query code <symbol>` | Read the source code for a symbol (bounded to its definition range) | Premises: read source before citing a behavior claim. |
35
- | `scip-query trace <symbol>` | Trace a symbol: definition + all references | Verify the plan: rerun source-producing context for cited targets. |
30
+ | Command | Purpose | Returns | Coverage | When |
31
+ | --- | --- | --- | --- | --- |
32
+ | `scip-query status --capabilities` | Show index status for this project | freshness, generation, language shards, watcher, and optional capabilities | `complete` | Discover: confirm the index is fresh before citing graph facts. |
33
+ | `scip-query plan-context <target>` | Pre-edit planning context for a symbol, file, or module | definitions and references; callers and callees; dataflow producers and consumers; backward and forward slices; affected symbols; change-surface risk; dependencies and reverse dependencies; module files and exports; external surface use; complexity; churn; co-change partners; active suppressions | `bounded` | Discover: the one call that anchors the plan — flow, consumers, impact, reuse, history. |
34
+ | `scip-query refs <symbol>` | Find all files referencing a symbol | referencing file paths; reference line numbers grouped by file | `bounded` | Scope: enumerate consumers when plan-context bounds a section you need in full. |
35
+ | `scip-query affected <symbol>` | Transitive closure of symbols that could break if this symbol changes | affected symbol identities, files, and traversal depths | `bounded` | Scope: transitive blast radius when the change is not consumer-local. |
36
+ | `scip-query code <symbol>` | Read the source code for a symbol (bounded to its definition range) | definition identity, source, and line range | `complete` | Flow: read source behind a behavior claim you are about to write down. |
36
37
 
37
38
  Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
38
39
  <!-- END GENERATED SKILL COMMANDS -->
39
40
 
40
- ## Rules
41
+ ## Pick the mode
41
42
 
42
- 1. Start with `scip-query status --capabilities`; reindex only when freshness is `stale`, `missing`, or `unknown`.
43
- 2. Anchor the plan with `scip-query plan-context <target>`. If the target is not indexed, record that fact and use scip-query for every code-adjacent claim it can answer.
44
- 3. Put the plan in `docs/plans/YYYY-MM-DD-<short-name>.md`.
45
- 4. Define every load-bearing concept contextually and state every invariant in `iff` or `must always` form. A definition without referents (a `Source:` line) is a guess.
46
- 5. Evidence lives in numbered premises (`P1`, `P2`, ...), each with a `Source` naming the scip-query command that produced it. Every shared-state surface the plan touches gets a state-authority premise enumerating its complete writer and reader sets.
47
- 6. Steps and defenses cite the premises they depend on. A claim no premise supports is either new evidence to gather or an explicit `ASSUMPTION` — never silent.
48
- 7. Do not propose a new helper, wrapper, type, parameter, config flag, component, hook, or module until the reuse audit proves reuse or extension is not the better move.
49
- 8. Every behavior-changing step includes a testability design: test seam, injected dependencies, pure core, side-effect boundary, and validation.
50
- 9. Attack entries must be constructed scenarios — actor, starting state, sequence — and each ends in a recorded outcome: `HELD` citing the defending step and premises, or `HOLE` with its repair step or accepted reason. An assertion of absence ("no new shared mutable state") is not a defense; it cannot fail, so it cannot catch anything.
51
- 10. Installing an enforcer — trigger, constraint, guard, gate — opens an enforcement window: every existing writer in the relevant state-authority premise must be brought into compliance in the same or an earlier step, or the window recorded as an accepted hole. Every step declares `Deployable`.
52
- 11. The verdict is derived, not asserted: `PLANNED-COMPLETE` only when the coverage matrix has no blank rows and every attack ends in `HELD` with citations or an accepted hole. An attack record where nothing ever broke is a red flag — attacks run against a draft should find holes; if none did, rerun the pass as falsification, preferably in a fresh subagent context.
43
+ Load [`HIGH_ASSURANCE.md`](HIGH_ASSURANCE.md) — numbered premises, state-authority inventories,
44
+ counterexample attacks, enforcement windows, a derived verdict — when the change touches any of:
53
45
 
54
- ## Planning Terms
46
+ - a security boundary or authorization decision;
47
+ - money, billing, or anything with an external financial effect;
48
+ - a destructive or irreversible operation;
49
+ - a persistent-data migration;
50
+ - shared-state concurrency;
51
+ - a broad public API change;
52
+ - a rollout that cannot be rolled back;
53
+ - or the user explicitly asks for the rigorous version.
55
54
 
56
- A reuse audit is the part of a plan that proves a proposed new symbol, file, option, wrapper, or contract is needed; what makes it useful is that it ties the new shape to existing definitions, consumers, and rejected extension points.
55
+ Otherwise use ordinary mode below. When genuinely unsure, ask rather than defaulting up: the
56
+ certificate is expensive, and the cost lands on every future change through the same skill.
57
57
 
58
- A test seam is the entry point a test can call to prove a behavior without replaying the whole product path; what makes it valuable in a plan is that it names the exact unit or boundary where correctness will be observed.
58
+ ## Ordinary mode
59
59
 
60
- A side-effect boundary is the edge where deterministic program decisions meet files, processes, clocks, networks, databases, or other external capabilities; what makes it important is that failures and fakes can be isolated there while core decisions stay easy to test.
61
-
62
- A contract is the stable promise one code unit exposes to another, including accepted inputs, returned outputs, errors, timing expectations, and side effects that callers may rely on.
63
-
64
- An invariant is a property of the changed system that must hold at every observable moment; what makes it load-bearing is that attacks are judged against it and the final verdict is derived from whether it survives them all.
65
-
66
- A premise is a numbered, source-cited statement of fact about the current code; what makes it a premise rather than a note is that steps and defenses cite it by ID, so a false premise is traceable to everything built on it.
67
-
68
- A state-authority premise is a premise that enumerates the complete writer and reader sets of one shared state surface; what makes it powerful is that "complete" is falsifiable with `refs` and `dataflow`, turning a forgotten write path from an unknowable into a checkable omission.
69
-
70
- A counterexample attack is a concrete actor, starting state, and action sequence constructed to violate an invariant; what makes it evidence is that its defense cites premises and steps, so "we considered failure" becomes "this specific failure is blocked here."
71
-
72
- An enforcement window is the interval between the step that installs an invariant enforcer and the step that brings the last existing writer into compliance; what makes it dangerous is that during it, every unupdated writer fails the new check in production, so the plan that adds safety is itself the outage.
73
-
74
- ## Workflow
75
-
76
- ### 1. Discover
77
-
78
- Run:
60
+ Start here:
79
61
 
80
62
  ```bash
81
- scip-query status --capabilities
82
- scip-query plan-context <target>
83
- ```
84
-
85
- Use the shared reference for follow-up commands. Fill four gates before designing:
86
-
87
- ```markdown
88
- ## Goal
89
- What the user is trying to accomplish and what done looks like for them.
90
-
91
- ## Definitions & Invariants
92
- For each load-bearing concept: its wider class, then the one trait that causally
93
- explains its other traits in this codebase — with the referents. Then the
94
- invariants the change must preserve, in iff / must-always form.
95
-
96
- ## Current State
97
- A short narrative of the affected end-to-end flow. Every factual sentence
98
- cites a premise by ID.
99
-
100
- ## Reuse Audit
101
- For every new symbol or file being considered: reuse target, extension target,
102
- or evidence-backed reason new code is justified.
103
- ```
104
-
105
- Definition discipline: place the concept in its wider class, then name the essential trait — the one that makes the concept's other traits in this codebase possible and explains them. Do not label genus or differentia; write it as prose. Ban circular and synonym definitions ("the refresh coordinator coordinates refreshes" defines nothing). Any new term the plan introduces gets defined the same way. Good definitions condense: they imply the concept's other traits instead of listing them, and derived requirements fall out of them — if restore is defined as the inverse of cancel, then the privilege to restore must not be weaker than the privilege to cancel, and a plan that gates them asymmetrically must defend that asymmetry.
106
-
107
- This step is complete only when the concepts are defined with referents, the invariants are stated formally, and every proposed new unit has a reuse decision with citations.
108
-
109
- ### 2. Establish Premises
110
-
111
- Number every fact the plan depends on:
112
-
113
- ```markdown
114
- ## Premises
115
-
116
- - P1. <current behavior fact> — Source: `scip-query code <symbol>`
117
- - P2. Writers of `<state surface>`: <complete list>. Readers: <complete list>.
118
- — Source: `scip-query refs <symbol>` + `scip-query dataflow <symbol>`
119
- - P3. ASSUMPTION: <belief the evidence cannot yet confirm, and what would confirm it>
120
- ```
121
-
122
- State-authority rule: for every state surface the plan touches — database column, store field, event topic, endpoint, cache entry — write one premise enumerating its complete writer and reader sets. Completeness comes from `refs` and `dataflow`, not memory.
123
-
124
- Why this premise class exists: a sprint-restore plan hardened `restore()` and the cancellation path but never enumerated the writers of sprint status. Review found `PATCH /sprints/:id` could set `status: 'active'` around every restore invariant, and transition automations wrote `sprintId` straight past the new membership guard — two of that review's five ship-blockers, both sitting in the writer list one `refs` call would have produced. With a state-authority premise, each writer in the list must be visited by an attack; without it, the side doors are invisible until review.
125
-
126
- This step is complete only when every state surface named in any phase has a state-authority premise and every remaining unknown is an explicit `ASSUMPTION`.
127
-
128
- ### 3. Shape for Tests
129
-
130
- Before writing implementation phases, add:
131
-
132
- ```markdown
133
- ## Testability Design
134
-
135
- | Behavior | Test seam | Dependencies to inject | Pure core | Side-effect shell | Contract |
136
- | --- | --- | --- | --- | --- | --- |
137
- | <behavior> | <test entry point> | <clock/db/http/logger/etc.> | <calculation/decision function> | <I/O wrapper> | <small interface or call shape> |
63
+ scip-query status --capabilities # reindex only if stale, missing, or unknown
64
+ scip-query plan-context <target> # flow, consumers, impact, reuse signals, history
138
65
  ```
139
66
 
140
- Plan the code so tests can call the pure core directly and exercise the side-effect shell with injected replacements. Prefer this shape:
67
+ `plan-context` already returns definitions, references, callers, callees, dataflow, forward and
68
+ backward slices, affected symbols, change-surface risk, dependencies, module exports, external
69
+ surface use, complexity, churn, co-change partners, and suppressions. Your job is to interpret
70
+ that composite — not to rebuild a proof system on top of it. Reach for a second command only when
71
+ a section you need came back bounded, or the target was not indexed.
141
72
 
142
- 1. Parse and validate at the boundary.
143
- 2. Pass domain data and injected dependencies into a small orchestrator.
144
- 3. Put calculations, filtering, selection, formatting decisions, and state transitions in pure functions.
145
- 4. Keep database, network, filesystem, clock, randomness, logging, email, and payment calls in thin side-effect shells.
146
- 5. Depend on small contracts at boundaries; avoid broad option objects, booleans that hide behavior, and wrappers that merely forward.
73
+ Put the plan in `docs/plans/YYYY-MM-DD-<short-name>.md` with these sections:
147
74
 
148
- This step is complete only when every changed behavior has a named test seam and the plan makes clear which logic can be tested without real external services.
75
+ **Goal** — what the user is trying to accomplish, and what done looks like for them.
149
76
 
150
- ### 4. Design the Checklist
77
+ **Current flow** — the affected path from entry point to observable effect, in prose, with the
78
+ evidence behind each claim. If you cannot describe the current behavior end to end, you are not
79
+ ready to change it.
151
80
 
152
- Write phases in execution order. Keep each phase deployable or explicitly mark why it is not. Use this step format:
81
+ **Affected consumers** — who calls, imports, or reads what you are about to change, and what
82
+ breaks if the contract shifts. Say whether the list is complete or bounded; a capped list you
83
+ present as complete is worse than one you flag.
153
84
 
154
- ```markdown
155
- ### N.M - Imperative title
156
-
157
- - [ ] **File**: `path/to/file.ts:LINE-LINE`
158
- - **Premises**: P<n>, P<m>
159
- - **Deployable**: yes | no — <reason> | part of single-deploy group <name>
160
- - **What**: Current behavior verified from source.
161
- - **Change**: Exact edit to make.
162
- - **Testability**:
163
- - Test seam:
164
- - Injected dependencies:
165
- - Pure core:
166
- - Side-effect shell:
167
- - Contract:
168
- - **Validation**: Targeted test, smoke command, or manual check that proves the behavior.
169
- - **Why**: Why this step is needed and why this order is safe, citing the premises it rests on.
170
- ```
171
-
172
- If a step installs an enforcer — trigger, constraint, guard, gate — check its enforcement window here: every existing writer in the relevant state-authority premise is brought into compliance in the same or an earlier step, or the window is carried into the attack record as a hole to accept or repair.
173
-
174
- This step is complete only when no checklist item says "update this file" without exact current behavior, target behavior, cited premises, a deployability declaration, and validation.
175
-
176
- ### 5. Attack the Plan
177
-
178
- Construct counterexamples against every invariant. This pass is falsification, not defense: it succeeds by finding holes, and against a draft it should find some. Prefer delegating it to a fresh subagent when the environment can spawn one — give the adversary only the Definitions & Invariants, Premises, state-authority maps, and the checklist, not your design rationale, and brief it that it wins by producing holes; fold its findings back as HOLE entries and repair steps. Solo fallback: enumerate the full attack list from the coverage-matrix rows below before writing any Outcome line, so attacks cannot be shaped around defenses you already have.
179
-
180
- Use the lenses as attack prompts — purpose, blast radius, valid intermediate state, reversibility, failure, concurrency, boundaries, data integrity, observability, human experience, efficiency, reuse, testability — and record each attack in this form:
181
-
182
- ```markdown
183
- ### A<n>. <invariant> via <lens>
184
- - Attack: <actor> + <starting state> + <action sequence>
185
- - Outcome: HELD — defended by step <N.M> (P<i>, P<j>)
186
- | HOLE — repaired by new step <N.M>
187
- | HOLE — accepted: <reason>
188
- ```
189
-
190
- A `HELD` that cannot name its defending step and premises is not `HELD`; it is a hole wearing confidence. A repaired hole keeps its `HOLE — repaired by step N.M` label permanently — do not rewrite it to `HELD` after the repair, because the repair history is the evidence that the pass falsified. The verdict's repaired count must equal the number of `HOLE — repaired` entries in the record. Close the record with a coverage matrix — one row per writer in every state-authority premise and per applicable lens (valid intermediate state is always applicable when any step installs an enforcer or migration):
191
-
192
- ```markdown
193
- | Surface or lens | Attacks |
194
- | --- | --- |
195
- | <writer, reader, or lens> | A2, A7 |
196
- ```
197
-
198
- A blank row is an unattacked writer. The record is incomplete until every row names an attack or carries an accepted reason. Spread attacks across rows before deepening one: depth on the axis you already anticipated does not protect the axes you did not — the leaks come from blank rows, not from the tenth variation of the race you already modeled.
199
-
200
- Invalid entry — this exact shape preceded three post-review remediation rounds on a real plan:
201
-
202
- > **Concurrency**: Validation happens before database writes; no new shared mutable state or retry behavior is introduced.
203
-
204
- It names no actor, no interleaving, and cites nothing. It is an assertion of absence: it cannot fail, so it caught nothing — review later found exactly the race it waved away. A valid entry for the same phase:
205
-
206
- > ### A3. "Every stored value is a member of its field's option set" via concurrency
207
- > - Attack: admin removes option O in transaction A while a user writes value O in transaction B; interleaving B-validates → A-commits → B-commits persists an orphaned value.
208
- > - Outcome: HOLE — repaired by new step 2.2: validation reads the option definition outside B's lock (P4), so serialize definition changes with every value writer via FOR UPDATE on the definition row; regression proves both interleavings against PostgreSQL.
209
-
210
- This step is complete only when the coverage matrix has no blank rows and every attack entry ends in a cited `HELD` or a recorded `HOLE`.
211
-
212
- ### 6. Verify the Plan and Derive the Verdict
213
-
214
- Run or delegate phase-by-phase reference checks. Each verifier confirms:
215
-
216
- - every path exists;
217
- - every line range is still within about five lines;
218
- - every premise reproduces when its `Source` command is rerun — a premise that no longer reproduces is false, and everything citing it is suspect until fixed;
219
- - every behavior claim matches source;
220
- - every new unit has reuse evidence;
221
- - every behavior-changing step has cited premises, a validation command, and a testability design.
222
-
223
- Then rerun the source-producing context for the cited targets:
224
-
225
- ```bash
226
- scip-query plan-context <target>
227
- ```
228
-
229
- Use the shared reference for subagent briefing text when delegating. Close the plan by applying the definitions to the record — do not summarize feelings:
230
-
231
- ```markdown
232
- ## Verdict
233
-
234
- A plan is PLANNED-COMPLETE iff the coverage matrix has no blank rows, every
235
- attack ends in HELD with cited steps and premises or an accepted hole with a
236
- written reason, and no premise failed reverification.
237
-
238
- Result: PLANNED-COMPLETE | INCOMPLETE — <n> attacks, <x> holes repaired,
239
- <y> holes accepted; <unresolved items>
240
- ```
85
+ **Reuse decision** — for every new helper, wrapper, type, parameter, flag, component, hook, or
86
+ module: the thing it could have extended instead, and why extension loses. New parallel code with
87
+ no reuse decision is the single most common defect this skill exists to prevent.
241
88
 
242
- The counts are part of the verdict. "16 attacks, 0 holes repaired" against a fresh draft is not a strong plan; it is an attack pass that defended instead of falsified — rerun it before shipping the plan.
89
+ **Slices** — ordered implementation steps. Each names its files and symbols, the behavior change,
90
+ and the validation that proves it: a test, a command, or a specific manual check. A slice with no
91
+ validation is a wish.
243
92
 
244
- This step is complete only when stale references are fixed, every premise reverified, and the verdict line is derived from the attack record.
93
+ **Risks and unknowns** — what could go wrong, what you could not establish, and any rollout
94
+ constraint. Unknowns stay explicit; do not round them to assumptions.
245
95
 
246
- ## Output Shape
96
+ ## Done when
247
97
 
248
- The plan file contains:
98
+ - the entry-to-effect path is described and evidenced;
99
+ - every affected consumer is assigned to a slice or explicitly out of scope;
100
+ - every new unit has a reuse decision;
101
+ - every slice has validation;
102
+ - unknowns are written down rather than resolved by guessing.
249
103
 
250
- 1. Title and date.
251
- 2. Goal.
252
- 3. Definitions & Invariants.
253
- 4. Premises (including state-authority premises and explicit assumptions).
254
- 5. Current State (narrative citing premise IDs).
255
- 6. Reuse Audit.
256
- 7. Testability Design.
257
- 8. Design Phases (steps citing premises, each with a deployability declaration).
258
- 9. Attack Record (attacks with outcomes, holes repaired or accepted, coverage matrix).
259
- 10. Execution Order and deployable phase notes.
260
- 11. Ship Order with one-way doors flagged.
261
- 12. Verdict with attack and hole counts.
262
- 13. Summary of files to create, edit, delete, and verify.
104
+ Then implement the plan in the smallest coherent slice, and run `scip-verify` when the change
105
+ lands.
@@ -2,17 +2,17 @@
2
2
  name: scip-conductor
3
3
  description: Plan and conduct multi-step engineering programs like a skeptical principal engineer. Use for writing executable multi-phase plans, delegating implementation, reviewing another agent's work, or carrying a large change end to end with verification at every handoff.
4
4
  commands:
5
- - template: "scip-query plan-context <target>"
5
+ - template: 'scip-query plan-context <target>'
6
6
  when: "Anchor each phase's step before delegating it."
7
- - template: "scip-query diff-gate --json"
8
- when: "Verify a handoff before accepting it and before closing the program."
9
- - template: "scip-query health --json"
10
- when: "Pre-register or check a program-level health benchmark."
7
+ - template: 'scip-query diff-gate --json'
8
+ when: 'Verify a handoff before accepting it and before closing the program.'
9
+ - template: 'scip-query health --json'
10
+ when: 'Pre-register or check a program-level health benchmark.'
11
11
  ---
12
12
 
13
13
  # scip-conductor
14
14
 
15
- This skill is how to run a *program* of work — planning, delegation, review,
15
+ This skill is how to run a _program_ of work — planning, delegation, review,
16
16
  and closure — not how to write one change plan (use a dedicated planning
17
17
  skill such as `scip-concrete-plan` for individual changes when one is available).
18
18
 
@@ -21,11 +21,11 @@ Load shared mechanics from [`../_shared/SKILL.md`](../_shared/SKILL.md).
21
21
  <!-- BEGIN GENERATED SKILL COMMANDS -->
22
22
  ## Commands for this skill
23
23
 
24
- | Command | Purpose | When |
25
- | --- | --- | --- |
26
- | `scip-query plan-context <target>` | Pre-edit planning context for a symbol, file, or module | Anchor each phase's step before delegating it. |
27
- | `scip-query diff-gate --json` | Gate the current diff: architecture regressions plus echo, migration, coordination, doc-drift, unused-param, and new-dead candidates; exit 1 on blocking findings | Verify a handoff before accepting it and before closing the program. |
28
- | `scip-query health --json` | Composite codebase health report with prioritized action list | Pre-register or check a program-level health benchmark. |
24
+ | Command | Purpose | Returns | Coverage | When |
25
+ | --- | --- | --- | --- | --- |
26
+ | `scip-query plan-context <target>` | Pre-edit planning context for a symbol, file, or module | definitions and references; callers and callees; dataflow producers and consumers; backward and forward slices; affected symbols; change-surface risk; dependencies and reverse dependencies; module files and exports; external surface use; complexity; churn; co-change partners; active suppressions | `bounded` | Anchor each phase's step before delegating it. |
27
+ | `scip-query diff-gate --json` | Gate the current diff: architecture regressions plus echo, migration, coordination, doc-drift, unused-param, and new-dead candidates; exit 1 on blocking findings | blocking findings with check id, message, and remediation; advisory findings; root-cause groups; changed file and symbol counts; process exit status (1 when blocking findings exist) | `bounded` | Verify a handoff before accepting it and before closing the program. |
28
+ | `scip-query health --json` | Composite codebase health report with prioritized action list | health score, findings, priorities, baselines, and coverage notes | `bounded` | Pre-register or check a program-level health benchmark. |
29
29
 
30
30
  Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
31
31
  <!-- END GENERATED SKILL COMMANDS -->
@@ -53,7 +53,7 @@ Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only
53
53
  - **Every step carries five fields**: file anchor with verified current
54
54
  behavior (cite how you know); the exact change; the validation command
55
55
  with expected output; testability design (pure core, injected effects);
56
- why this step is safe *in this order*. "Update X" with no current/target
56
+ why this step is safe _in this order_. "Update X" with no current/target
57
57
  behavior is a wish, not a step.
58
58
  - **Order phases by information gain and risk**: blockers and
59
59
  evidence-integrity first; cheap discriminating probes before expensive
@@ -82,7 +82,7 @@ Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only
82
82
  If a collision happens anyway: stop racing, apply-verify-commit
83
83
  atomically in one action, and re-sequence to a single writer.
84
84
  - **Never accept a report — reproduce its evidence.** On every handoff,
85
- choose the *minimal discriminating probe*: the one command most likely to
85
+ choose the _minimal discriminating probe_: the one command most likely to
86
86
  expose the report being wrong (a mutation input, a hand count, the
87
87
  benchmark number), and run it yourself. A report verified by reading it
88
88
  is not verified.
@@ -123,7 +123,7 @@ the pre-registered benchmarks and their before/after values; each handoff's
123
123
  discriminating probe and its OBSERVED result (a probe listed but not run
124
124
  counts as not run); the deviation ledger; the DEFER list;
125
125
  which learnings were folded back and where. A reviewer must be able to
126
- audit the *conduct*, not just the artifact.
126
+ audit the _conduct_, not just the artifact.
127
127
 
128
128
  ## Completion
129
129
 
@@ -1,19 +1,19 @@
1
1
  ---
2
2
  name: scip-debug
3
- description: Debug bugs and regressions with scip-query evidence. Use for failing behavior, wrong data flow, confusing runtime paths, broken tests, root-cause analysis, reproduction, tracing, or minimal fixes.
3
+ description: Debug why something is broken, does not work, crashes, fails a test, returns wrong data, or regressed. Uses scip-query to trace the runtime path and data flow, separate rival causes, and make the smallest verified fix.
4
4
  commands:
5
- - template: "scip-query files <feature-or-error-term>"
6
- when: "Find the entry point from a feature name or error term."
7
- - template: "scip-query trace <candidate-symbol>"
8
- when: "Find the entry point: definition plus every reference."
9
- - template: "scip-query call-graph <entry-symbol>"
10
- when: "Follow execution: callers and callees along the failing path."
11
- - template: "scip-query dataflow <symbol-or-variable>"
12
- when: "Follow data: producers, consumers, and usage sites."
13
- - template: "scip-query similar <suspect-symbol> --json --full"
14
- when: "Compare nearby implementations for missing guards or handling."
15
- - template: "scip-query change-surface <suspect-file> --json --full"
16
- when: "Bound the fix: exports, consumers, and blast-radius risk."
5
+ - template: 'scip-query files <feature-or-error-term>'
6
+ when: 'Find the entry point from a feature name or error term.'
7
+ - template: 'scip-query trace <candidate-symbol>'
8
+ when: 'Find the entry point: definition plus every reference.'
9
+ - template: 'scip-query call-graph <entry-symbol>'
10
+ when: 'Follow execution: callers and callees along the failing path.'
11
+ - template: 'scip-query dataflow <symbol-or-variable>'
12
+ when: 'Follow data: producers, consumers, and usage sites.'
13
+ - template: 'scip-query similar <suspect-symbol> --json --full'
14
+ when: 'Compare nearby implementations for missing guards or handling.'
15
+ - template: 'scip-query change-surface <suspect-file> --json --full'
16
+ when: 'Bound the fix: exports, consumers, and blast-radius risk.'
17
17
  ---
18
18
 
19
19
  # scip-debug
@@ -25,14 +25,14 @@ Load shared mechanics from [`../_shared/SKILL.md`](../_shared/SKILL.md).
25
25
  <!-- BEGIN GENERATED SKILL COMMANDS -->
26
26
  ## Commands for this skill
27
27
 
28
- | Command | Purpose | When |
29
- | --- | --- | --- |
30
- | `scip-query files <feature-or-error-term>` | Find files matching a pattern | Find the entry point from a feature name or error term. |
31
- | `scip-query trace <candidate-symbol>` | Trace a symbol: definition + all references | Find the entry point: definition plus every reference. |
32
- | `scip-query call-graph <entry-symbol>` | Show incoming callers and outgoing callees for a symbol | Follow execution: callers and callees along the failing path. |
33
- | `scip-query dataflow <symbol-or-variable>` | Reference-level dataflow: definition sites, usage sites, producers, consumers | Follow data: producers, consumers, and usage sites. |
34
- | `scip-query similar <suspect-symbol> --json --full` | Find heuristic function similarity candidates from callee fingerprints | Compare nearby implementations for missing guards or handling. |
35
- | `scip-query change-surface <suspect-file> --json --full` | Pre-change briefing: exports, consumers, and blast-radius risk | Bound the fix: exports, consumers, and blast-radius risk. |
28
+ | Command | Purpose | Returns | Coverage | When |
29
+ | --- | --- | --- | --- | --- |
30
+ | `scip-query files <feature-or-error-term>` | Find files matching a pattern | matching file paths | `complete` | Find the entry point from a feature name or error term. |
31
+ | `scip-query trace <candidate-symbol>` | Trace a symbol: definition + all references | definition sites with source and signature; referencing files with line numbers | `bounded` | Find the entry point: definition plus every reference. |
32
+ | `scip-query call-graph <entry-symbol>` | Show incoming callers and outgoing callees for a symbol | caller and callee symbol identities with files | `bounded` | Follow execution: callers and callees along the failing path. |
33
+ | `scip-query dataflow <symbol-or-variable>` | Reference-level dataflow: definition sites, usage sites, producers, consumers | definition sites, usage sites, producer symbols, and consumer symbols | `bounded` | Follow data: producers, consumers, and usage sites. |
34
+ | `scip-query similar <suspect-symbol> --json --full` | Find heuristic function similarity candidates from callee fingerprints | symbol pairs, similarity scores, and shared evidence | `bounded` | Compare nearby implementations for missing guards or handling. |
35
+ | `scip-query change-surface <suspect-file> --json --full` | Pre-change briefing: exports, consumers, and blast-radius risk | defined symbols, external consumer counts, and risk levels | `bounded` | Bound the fix: exports, consumers, and blast-radius risk. |
36
36
 
37
37
  Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
38
38
  <!-- END GENERATED SKILL COMMANDS -->
@@ -2,18 +2,18 @@
2
2
  name: scip-diagram
3
3
  description: Diagram code with scip-query evidence. Use for code flow diagrams, architecture diagrams, data-flow maps, dependency maps, blast-radius visuals, module maps, or HTML artifacts explaining a system.
4
4
  commands:
5
- - template: "scip-query system <module>"
6
- when: "Collect evidence: module map for a dependency or architecture diagram."
7
- - template: "scip-query trace <symbol>"
8
- when: "Collect evidence: definition plus references for a call-flow diagram."
9
- - template: "scip-query call-graph <symbol>"
10
- when: "Collect evidence: callers/callees for a call-flow diagram."
11
- - template: "scip-query dataflow <symbol>"
12
- when: "Collect evidence: producers/consumers for a data-flow diagram."
13
- - template: "scip-query affected <symbol> --json"
14
- when: "Collect evidence: blast-radius nodes and edges."
15
- - template: "scip-query change-surface <file> --json --full"
16
- when: "Collect evidence: exports and consumers for a change-surface map."
5
+ - template: 'scip-query system <module>'
6
+ when: 'Collect evidence: module map for a dependency or architecture diagram.'
7
+ - template: 'scip-query trace <symbol>'
8
+ when: 'Collect evidence: definition plus references for a call-flow diagram.'
9
+ - template: 'scip-query call-graph <symbol>'
10
+ when: 'Collect evidence: callers/callees for a call-flow diagram.'
11
+ - template: 'scip-query dataflow <symbol>'
12
+ when: 'Collect evidence: producers/consumers for a data-flow diagram.'
13
+ - template: 'scip-query affected <symbol> --json'
14
+ when: 'Collect evidence: blast-radius nodes and edges.'
15
+ - template: 'scip-query change-surface <file> --json --full'
16
+ when: 'Collect evidence: exports and consumers for a change-surface map.'
17
17
  ---
18
18
 
19
19
  # scip-diagram
@@ -25,14 +25,14 @@ Load shared mechanics from [`../_shared/SKILL.md`](../_shared/SKILL.md).
25
25
  <!-- BEGIN GENERATED SKILL COMMANDS -->
26
26
  ## Commands for this skill
27
27
 
28
- | Command | Purpose | When |
29
- | --- | --- | --- |
30
- | `scip-query system <module>` | Full module map: files, symbols, deps in/out | Collect evidence: module map for a dependency or architecture diagram. |
31
- | `scip-query trace <symbol>` | Trace a symbol: definition + all references | Collect evidence: definition plus references for a call-flow diagram. |
32
- | `scip-query call-graph <symbol>` | Show incoming callers and outgoing callees for a symbol | Collect evidence: callers/callees for a call-flow diagram. |
33
- | `scip-query dataflow <symbol>` | Reference-level dataflow: definition sites, usage sites, producers, consumers | Collect evidence: producers/consumers for a data-flow diagram. |
34
- | `scip-query affected <symbol> --json` | Transitive closure of symbols that could break if this symbol changes | Collect evidence: blast-radius nodes and edges. |
35
- | `scip-query change-surface <file> --json --full` | Pre-change briefing: exports, consumers, and blast-radius risk | Collect evidence: exports and consumers for a change-surface map. |
28
+ | Command | Purpose | Returns | Coverage | When |
29
+ | --- | --- | --- | --- | --- |
30
+ | `scip-query system <module>` | Full module map: files, symbols, deps in/out | module file paths; exported symbols with line ranges; internal dependencies; reverse dependencies | `complete` | Collect evidence: module map for a dependency or architecture diagram. |
31
+ | `scip-query trace <symbol>` | Trace a symbol: definition + all references | definition sites with source and signature; referencing files with line numbers | `bounded` | Collect evidence: definition plus references for a call-flow diagram. |
32
+ | `scip-query call-graph <symbol>` | Show incoming callers and outgoing callees for a symbol | caller and callee symbol identities with files | `bounded` | Collect evidence: callers/callees for a call-flow diagram. |
33
+ | `scip-query dataflow <symbol>` | Reference-level dataflow: definition sites, usage sites, producers, consumers | definition sites, usage sites, producer symbols, and consumer symbols | `bounded` | Collect evidence: producers/consumers for a data-flow diagram. |
34
+ | `scip-query affected <symbol> --json` | Transitive closure of symbols that could break if this symbol changes | affected symbol identities, files, and traversal depths | `bounded` | Collect evidence: blast-radius nodes and edges. |
35
+ | `scip-query change-surface <file> --json --full` | Pre-change briefing: exports, consumers, and blast-radius risk | defined symbols, external consumer counts, and risk levels | `bounded` | Collect evidence: exports and consumers for a change-surface map. |
36
36
 
37
37
  Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only when it is insufficient.
38
38
  <!-- END GENERATED SKILL COMMANDS -->
@@ -49,14 +49,14 @@ Use this shortlist first. Open [`../_shared/SKILL.md`](../_shared/SKILL.md) only
49
49
 
50
50
  ### 1. Pick diagram type
51
51
 
52
- | User wants | Diagram |
53
- | --- | --- |
54
- | Feature flow | Call flow |
55
- | Value origin or mutation | Data flow |
56
- | Dependents | Blast radius |
57
- | Module architecture | Dependency map |
52
+ | User wants | Diagram |
53
+ | -------------------------- | -------------------------------- |
54
+ | Feature flow | Call flow |
55
+ | Value origin or mutation | Data flow |
56
+ | Dependents | Blast radius |
57
+ | Module architecture | Dependency map |
58
58
  | Hard-to-change explanation | Change surface or bottleneck map |
59
- | Classes or ownership | Hierarchy and surface map |
59
+ | Classes or ownership | Hierarchy and surface map |
60
60
 
61
61
  This step is complete only when the diagram's node and edge types are chosen.
62
62