@tekyzinc/gsd-t 2.50.12 → 2.53.10
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/CHANGELOG.md +24 -0
- package/README.md +379 -372
- package/bin/component-registry.js +250 -0
- package/bin/graph-cgc.js +510 -510
- package/bin/graph-indexer.js +147 -147
- package/bin/graph-overlay.js +195 -195
- package/bin/graph-parsers.js +327 -327
- package/bin/graph-query.js +453 -452
- package/bin/graph-store.js +154 -154
- package/bin/qa-calibrator.js +194 -0
- package/bin/scan-data-collector.js +153 -153
- package/bin/scan-diagrams-generators.js +187 -187
- package/bin/scan-diagrams.js +79 -79
- package/bin/scan-renderer.js +92 -92
- package/bin/scan-report-sections.js +121 -121
- package/bin/scan-report.js +184 -184
- package/bin/scan-schema-parsers.js +199 -199
- package/bin/scan-schema.js +103 -103
- package/bin/token-budget.js +246 -0
- package/commands/Claude-md.md +10 -10
- package/commands/branch.md +15 -15
- package/commands/checkin.md +45 -45
- package/commands/global-change.md +209 -209
- package/commands/gsd-t-audit.md +199 -0
- package/commands/gsd-t-backlog-add.md +94 -94
- package/commands/gsd-t-backlog-edit.md +111 -111
- package/commands/gsd-t-backlog-list.md +63 -63
- package/commands/gsd-t-backlog-move.md +94 -94
- package/commands/gsd-t-backlog-promote.md +123 -123
- package/commands/gsd-t-backlog-remove.md +86 -86
- package/commands/gsd-t-backlog-settings.md +158 -158
- package/commands/gsd-t-complete-milestone.md +528 -515
- package/commands/gsd-t-debug.md +506 -399
- package/commands/gsd-t-discuss.md +174 -174
- package/commands/gsd-t-execute.md +758 -634
- package/commands/gsd-t-feature.md +276 -276
- package/commands/gsd-t-health.md +142 -142
- package/commands/gsd-t-help.md +465 -457
- package/commands/gsd-t-impact.md +302 -302
- package/commands/gsd-t-init.md +320 -280
- package/commands/gsd-t-integrate.md +365 -249
- package/commands/gsd-t-milestone.md +87 -87
- package/commands/gsd-t-partition.md +442 -361
- package/commands/gsd-t-pause.md +82 -82
- package/commands/gsd-t-plan.md +345 -344
- package/commands/gsd-t-populate.md +111 -111
- package/commands/gsd-t-prd.md +326 -326
- package/commands/gsd-t-project.md +211 -211
- package/commands/gsd-t-promote-debt.md +123 -123
- package/commands/gsd-t-prompt.md +137 -137
- package/commands/gsd-t-qa.md +266 -266
- package/commands/gsd-t-quick.md +357 -234
- package/commands/gsd-t-reflect.md +134 -134
- package/commands/gsd-t-resume.md +72 -72
- package/commands/gsd-t-scan.md +615 -615
- package/commands/gsd-t-setup.md +76 -0
- package/commands/gsd-t-status.md +192 -166
- package/commands/gsd-t-test-sync.md +381 -381
- package/commands/gsd-t-triage-and-merge.md +171 -171
- package/commands/gsd-t-verify.md +382 -382
- package/commands/gsd-t-visualize.md +118 -118
- package/commands/gsd-t-wave.md +401 -378
- package/docs/GSD-T-README.md +425 -422
- package/docs/architecture.md +385 -369
- package/docs/harness-design-analysis.md +371 -0
- package/docs/infrastructure.md +205 -205
- package/docs/prd-graph-engine.md +398 -398
- package/docs/prd-gsd2-hybrid.md +559 -559
- package/docs/prd-harness-evolution.md +583 -0
- package/docs/requirements.md +14 -0
- package/docs/workflows.md +226 -226
- package/examples/.gsd-t/domains/example-domain/scope.md +13 -13
- package/package.json +40 -40
- package/scripts/gsd-t-auto-route.js +39 -39
- package/scripts/gsd-t-dashboard-mockup.html +1143 -1143
- package/scripts/gsd-t-dashboard-server.js +171 -171
- package/scripts/gsd-t-dashboard.html +262 -262
- package/scripts/gsd-t-event-writer.js +128 -128
- package/scripts/gsd-t-statusline.js +94 -94
- package/scripts/gsd-t-tools.js +175 -175
- package/templates/CLAUDE-global.md +639 -614
- package/templates/CLAUDE-project.md +24 -0
- package/templates/backlog-settings.md +18 -18
- package/templates/backlog.md +1 -1
- package/templates/progress.md +40 -40
- package/templates/shared-services-contract.md +60 -60
- package/templates/stacks/desktop.ini +2 -2
- package/bin/desktop.ini +0 -2
- package/commands/desktop.ini +0 -2
- package/docs/ci-examples/desktop.ini +0 -2
- package/docs/desktop.ini +0 -2
- package/examples/.gsd-t/contracts/desktop.ini +0 -2
- package/examples/.gsd-t/desktop.ini +0 -2
- package/examples/.gsd-t/domains/desktop.ini +0 -2
- package/examples/.gsd-t/domains/example-domain/desktop.ini +0 -2
- package/examples/desktop.ini +0 -2
- package/examples/rules/desktop.ini +0 -2
- package/scripts/desktop.ini +0 -2
- package/templates/desktop.ini +0 -2
package/commands/gsd-t-impact.md
CHANGED
|
@@ -1,302 +1,302 @@
|
|
|
1
|
-
# GSD-T: Impact — Downstream Effect Analysis
|
|
2
|
-
|
|
3
|
-
You are analyzing the downstream effects of planned changes before execution. Your job is to identify what might break, what needs updating, and what risks exist.
|
|
4
|
-
|
|
5
|
-
This command is:
|
|
6
|
-
- **Auto-invoked** between plan and execute phases in `/user:gsd-t-wave`
|
|
7
|
-
- **Standalone** when user wants to evaluate potential changes
|
|
8
|
-
|
|
9
|
-
## Step 1: Load Context
|
|
10
|
-
|
|
11
|
-
Read:
|
|
12
|
-
1. `CLAUDE.md` — project conventions
|
|
13
|
-
2. `.gsd-t/progress.md` — current state
|
|
14
|
-
3. `.gsd-t/contracts/` — all contracts
|
|
15
|
-
4. `.gsd-t/domains/{current}/tasks.md` — planned changes
|
|
16
|
-
|
|
17
|
-
If run standalone, ask: "What changes are you considering?"
|
|
18
|
-
|
|
19
|
-
## Step 2: Identify Changed Files
|
|
20
|
-
|
|
21
|
-
From the plan or user description, list:
|
|
22
|
-
- Files to be created
|
|
23
|
-
- Files to be modified
|
|
24
|
-
- Files to be deleted
|
|
25
|
-
- Functions/classes/endpoints being changed
|
|
26
|
-
|
|
27
|
-
## Step 2.5: Graph-Enhanced Analysis (if available)
|
|
28
|
-
|
|
29
|
-
Check if a graph index exists: read `.gsd-t/graph/meta.json`. If it exists:
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
For each changed file/function, query the graph:
|
|
33
|
-
1. query('getCallers', { entity: '{function_name}' }) → all direct callers
|
|
34
|
-
2. query('getTransitiveCallers', { entity: '{name}', depth: 5 }) → full caller chain
|
|
35
|
-
3. query('getDomainOwner', { entity: '{name}' }) → which domain owns this
|
|
36
|
-
4. query('getContractFor', { entity: '{name}' }) → which contract it implements
|
|
37
|
-
5. query('getSurfaceConsumers', { entity: '{name}' }) → which surfaces consume it
|
|
38
|
-
6. query('getDomainBoundaryViolations', {}) → cross-domain access issues
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Use graph results to build a **complete blast radius** that includes transitive callers, contract violations, and cross-surface impact. This replaces the grep-based search in Step 3A when available but grep remains the fallback when no graph exists.
|
|
42
|
-
|
|
43
|
-
## Step 3: Trace Dependencies
|
|
44
|
-
|
|
45
|
-
For each changed file/function:
|
|
46
|
-
|
|
47
|
-
### A) Who Calls This?
|
|
48
|
-
|
|
49
|
-
**If graph available** (Step 2.5): use graph results — they include transitive callers that grep misses.
|
|
50
|
-
|
|
51
|
-
**If no graph** (fallback):
|
|
52
|
-
```bash
|
|
53
|
-
# Find all imports/requires of this module
|
|
54
|
-
grep -r "import.*{module}" src/
|
|
55
|
-
grep -r "from.*{module}" src/
|
|
56
|
-
grep -r "require.*{module}" src/
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### B) Who Does This Call?
|
|
60
|
-
- List dependencies this code relies on
|
|
61
|
-
- Note if any of those are also changing
|
|
62
|
-
|
|
63
|
-
### C) Contract Consumers
|
|
64
|
-
- Check `.gsd-t/contracts/api-contract.md` — does this change an endpoint?
|
|
65
|
-
- Check `.gsd-t/contracts/schema-contract.md` — does this change data shape?
|
|
66
|
-
- Check `.gsd-t/contracts/component-contract.md` — does this change props/interface?
|
|
67
|
-
|
|
68
|
-
### D) New Consumer Analysis
|
|
69
|
-
|
|
70
|
-
**Trigger**: Run this section when the planned change adds a new client surface (web app, mobile app, CLI, external API, admin panel, etc.) that will consume the existing backend.
|
|
71
|
-
|
|
72
|
-
If no new consumer surface is being added, skip this section.
|
|
73
|
-
|
|
74
|
-
**Step 1 — List what the new consumer needs:**
|
|
75
|
-
```
|
|
76
|
-
Operations the new consumer requires:
|
|
77
|
-
- {operation-name}: {brief description}
|
|
78
|
-
- {operation-name}: {brief description}
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
**Step 2 — Compare against existing backend operations:**
|
|
82
|
-
```bash
|
|
83
|
-
# Search for existing implementations of each needed operation
|
|
84
|
-
grep -r "{operation-name}" src/
|
|
85
|
-
grep -r "{operation-name}" commands/
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
**Step 3 — Classify each needed operation:**
|
|
89
|
-
|
|
90
|
-
| Operation | Classification | Action |
|
|
91
|
-
|-----------|---------------|--------|
|
|
92
|
-
| {op} | REUSE — identical operation exists | Call existing endpoint/function |
|
|
93
|
-
| {op} | EXTEND — similar operation exists, needs a variant | Add param or thin adapter |
|
|
94
|
-
| {op} | DUPLICATE — new endpoint would replicate existing logic | 🔴 Must route through shared layer |
|
|
95
|
-
| {op} | NEW — no equivalent exists | Build new, consider SharedCore placement |
|
|
96
|
-
|
|
97
|
-
**DUPLICATE items become 🔴 Breaking Changes** in Step 4 — they block execution until the shared layer is designed. Add them to the impact report under "Breaking Changes" with:
|
|
98
|
-
- Required Action: "Extract `{operation}` to shared-core domain; {new-consumer} and {existing-consumer} both call it from there."
|
|
99
|
-
|
|
100
|
-
### E) Test Coverage
|
|
101
|
-
- Which tests cover this code?
|
|
102
|
-
- Will they still pass after changes?
|
|
103
|
-
- Are there tests that assert current behavior that will become wrong?
|
|
104
|
-
|
|
105
|
-
## Step 4: Classify Impacts
|
|
106
|
-
|
|
107
|
-
Categorize each finding:
|
|
108
|
-
|
|
109
|
-
### 🔴 Breaking Changes
|
|
110
|
-
Changes that WILL break something if not addressed:
|
|
111
|
-
- API signature changes with existing consumers
|
|
112
|
-
- Database schema changes with existing queries
|
|
113
|
-
- Removed functions still being called
|
|
114
|
-
- Changed return types
|
|
115
|
-
|
|
116
|
-
### 🟡 Requires Updates
|
|
117
|
-
Changes that need coordinated updates:
|
|
118
|
-
- Tests asserting old behavior
|
|
119
|
-
- Documentation references
|
|
120
|
-
- Related UI components
|
|
121
|
-
- Dependent domain tasks
|
|
122
|
-
|
|
123
|
-
### 🟢 Safe Changes
|
|
124
|
-
Changes with no downstream impact:
|
|
125
|
-
- New files with no consumers yet
|
|
126
|
-
- Internal refactors with same interface
|
|
127
|
-
- Additive changes (new optional params)
|
|
128
|
-
|
|
129
|
-
### ⚪ Unknown
|
|
130
|
-
Can't determine impact — needs investigation:
|
|
131
|
-
- Dynamic imports
|
|
132
|
-
- Reflection-based code
|
|
133
|
-
- External integrations
|
|
134
|
-
|
|
135
|
-
## Step 5: Check Contract Compliance
|
|
136
|
-
|
|
137
|
-
For each contract:
|
|
138
|
-
- Will planned changes violate the contract?
|
|
139
|
-
- Does the contract need to be updated first?
|
|
140
|
-
- Are there consumers not yet updated for contract changes?
|
|
141
|
-
|
|
142
|
-
Flag: "Contract violation detected — {contract} specifies {X}, but plan changes to {Y}"
|
|
143
|
-
|
|
144
|
-
## Step 6: Produce Impact Report
|
|
145
|
-
|
|
146
|
-
Create/update `.gsd-t/impact-report.md`:
|
|
147
|
-
|
|
148
|
-
```markdown
|
|
149
|
-
# Impact Analysis — {date}
|
|
150
|
-
|
|
151
|
-
## Summary
|
|
152
|
-
- Breaking changes: {N}
|
|
153
|
-
- Requires updates: {N}
|
|
154
|
-
- Safe changes: {N}
|
|
155
|
-
- Unknown: {N}
|
|
156
|
-
- **Recommendation**: {PROCEED | PROCEED WITH CAUTION | BLOCK}
|
|
157
|
-
|
|
158
|
-
## Planned Changes
|
|
159
|
-
| File | Change Type | Description |
|
|
160
|
-
|------|-------------|-------------|
|
|
161
|
-
| {file} | {create/modify/delete} | {what} |
|
|
162
|
-
|
|
163
|
-
---
|
|
164
|
-
|
|
165
|
-
## 🔴 Breaking Changes
|
|
166
|
-
|
|
167
|
-
### IMP-001: {title}
|
|
168
|
-
- **Change**: {what's changing}
|
|
169
|
-
- **Affected**: {files/functions/consumers}
|
|
170
|
-
- **Impact**: {what will break}
|
|
171
|
-
- **Required Action**: {what must be done}
|
|
172
|
-
- **Blocking**: YES — cannot proceed without addressing
|
|
173
|
-
|
|
174
|
-
---
|
|
175
|
-
|
|
176
|
-
## 🟡 Requires Updates
|
|
177
|
-
|
|
178
|
-
### IMP-010: {title}
|
|
179
|
-
- **Change**: {what's changing}
|
|
180
|
-
- **Affected**: {files/tests/docs}
|
|
181
|
-
- **Action**: {update X to reflect Y}
|
|
182
|
-
- **Blocking**: NO — can be done during or after execution
|
|
183
|
-
|
|
184
|
-
---
|
|
185
|
-
|
|
186
|
-
## 🟢 Safe Changes
|
|
187
|
-
|
|
188
|
-
- {file}: {change} — no downstream impact
|
|
189
|
-
- {file}: {change} — additive only
|
|
190
|
-
|
|
191
|
-
---
|
|
192
|
-
|
|
193
|
-
## ⚪ Unknown Impact
|
|
194
|
-
|
|
195
|
-
### IMP-020: {title}
|
|
196
|
-
- **Change**: {what}
|
|
197
|
-
- **Uncertainty**: {why we can't determine impact}
|
|
198
|
-
- **Recommendation**: {manual review / test thoroughly / ask user}
|
|
199
|
-
|
|
200
|
-
---
|
|
201
|
-
|
|
202
|
-
## Contract Status
|
|
203
|
-
|
|
204
|
-
| Contract | Status | Notes |
|
|
205
|
-
|----------|--------|-------|
|
|
206
|
-
| api-contract.md | {OK / VIOLATION / UPDATE NEEDED} | {details} |
|
|
207
|
-
| schema-contract.md | {OK / VIOLATION / UPDATE NEEDED} | {details} |
|
|
208
|
-
| component-contract.md | {OK / VIOLATION / UPDATE NEEDED} | {details} |
|
|
209
|
-
|
|
210
|
-
---
|
|
211
|
-
|
|
212
|
-
## Test Impact
|
|
213
|
-
|
|
214
|
-
| Test File | Status | Action Needed |
|
|
215
|
-
|-----------|--------|---------------|
|
|
216
|
-
| {test} | {WILL PASS / WILL FAIL / NEEDS UPDATE} | {action} |
|
|
217
|
-
|
|
218
|
-
---
|
|
219
|
-
|
|
220
|
-
## Recommended Execution Order
|
|
221
|
-
|
|
222
|
-
1. {First, update X because...}
|
|
223
|
-
2. {Then, modify Y...}
|
|
224
|
-
3. {Finally, Z...}
|
|
225
|
-
|
|
226
|
-
## Generated Tasks
|
|
227
|
-
|
|
228
|
-
If breaking changes require pre-work, add to domain tasks:
|
|
229
|
-
- [ ] IMP-001: {remediation task}
|
|
230
|
-
- [ ] IMP-002: {remediation task}
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
## Step 7: Document Ripple
|
|
234
|
-
|
|
235
|
-
After producing the impact report, update affected documentation:
|
|
236
|
-
|
|
237
|
-
### Always update:
|
|
238
|
-
1. **`.gsd-t/progress.md`** — Log the impact analysis in the Decision Log with date and key findings
|
|
239
|
-
|
|
240
|
-
### Check if affected:
|
|
241
|
-
2. **`docs/architecture.md`** — If the analysis revealed architectural concerns or proposed changes, document them
|
|
242
|
-
3. **`docs/requirements.md`** — If the analysis found requirements that would be affected by the planned changes, note the impact
|
|
243
|
-
4. **`.gsd-t/contracts/`** — If contract violations or needed updates were found, flag them clearly in the contracts (mark as "PENDING UPDATE")
|
|
244
|
-
5. **`.gsd-t/techdebt.md`** — If the analysis uncovered new debt or risk areas, add them
|
|
245
|
-
|
|
246
|
-
### Skip what's not affected.
|
|
247
|
-
|
|
248
|
-
## Step 8: Test Verification
|
|
249
|
-
|
|
250
|
-
Validate the test landscape before recommending proceed/block:
|
|
251
|
-
|
|
252
|
-
1. **Run existing tests**: Execute the full test suite to establish current state
|
|
253
|
-
2. **Verify passing**: Confirm what passes today — any pre-existing failures should be noted in the impact report
|
|
254
|
-
3. **Map test impact**: For each planned change in Step 2, identify which tests will need updating — include this in the "Test Impact" section of the report
|
|
255
|
-
|
|
256
|
-
## Step 9: Decision Gate
|
|
257
|
-
|
|
258
|
-
### If PROCEED:
|
|
259
|
-
"✅ Impact analysis complete. No blocking issues found. Ready for execution."
|
|
260
|
-
- Continue to execute phase (if auto-invoked)
|
|
261
|
-
- Or report and exit (if standalone)
|
|
262
|
-
|
|
263
|
-
### If PROCEED WITH CAUTION:
|
|
264
|
-
"⚠️ Impact analysis found {N} items requiring attention:"
|
|
265
|
-
- List the yellow items
|
|
266
|
-
|
|
267
|
-
**Level 3 (Full Auto)**: Log the caution items and auto-advance to execute. Do NOT wait for user input.
|
|
268
|
-
|
|
269
|
-
**Level 1–2**: "These can be addressed during execution. Proceed?" Wait for user confirmation. If user declines, pause for remediation.
|
|
270
|
-
|
|
271
|
-
### If BLOCK:
|
|
272
|
-
"🛑 Impact analysis found breaking changes that must be addressed first:"
|
|
273
|
-
- List the red items
|
|
274
|
-
- Generate remediation tasks
|
|
275
|
-
- Add tasks to current domain's task list
|
|
276
|
-
- "Run `/user:gsd-t-execute` to address these first, then re-run impact analysis."
|
|
277
|
-
- Do NOT proceed to execute phase
|
|
278
|
-
|
|
279
|
-
## Standalone Mode
|
|
280
|
-
|
|
281
|
-
When run independently (not as part of wave):
|
|
282
|
-
|
|
283
|
-
```
|
|
284
|
-
/user:gsd-t-impact "considering adding user roles to the auth system"
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
1. Ask clarifying questions about the change
|
|
288
|
-
2. Run full analysis
|
|
289
|
-
3. Produce report
|
|
290
|
-
4. Do NOT auto-proceed — just inform
|
|
291
|
-
|
|
292
|
-
### Autonomy Behavior
|
|
293
|
-
|
|
294
|
-
**Level 3 (Full Auto)**: If PROCEED or PROCEED WITH CAUTION, log findings and auto-advance to execute phase. If BLOCK, stop and report breaking changes to user — do NOT auto-advance. When run standalone, always report and exit without auto-proceeding.
|
|
295
|
-
|
|
296
|
-
**Level 1–2**: Present the full impact report. Wait for user confirmation before proceeding (PROCEED) or pause for remediation (BLOCK). For PROCEED WITH CAUTION, ask "These can be addressed during execution. Proceed?"
|
|
297
|
-
|
|
298
|
-
$ARGUMENTS
|
|
299
|
-
|
|
300
|
-
## Auto-Clear
|
|
301
|
-
|
|
302
|
-
All work is committed to project files. Execute `/clear` to free the context window for the next command.
|
|
1
|
+
# GSD-T: Impact — Downstream Effect Analysis
|
|
2
|
+
|
|
3
|
+
You are analyzing the downstream effects of planned changes before execution. Your job is to identify what might break, what needs updating, and what risks exist.
|
|
4
|
+
|
|
5
|
+
This command is:
|
|
6
|
+
- **Auto-invoked** between plan and execute phases in `/user:gsd-t-wave`
|
|
7
|
+
- **Standalone** when user wants to evaluate potential changes
|
|
8
|
+
|
|
9
|
+
## Step 1: Load Context
|
|
10
|
+
|
|
11
|
+
Read:
|
|
12
|
+
1. `CLAUDE.md` — project conventions
|
|
13
|
+
2. `.gsd-t/progress.md` — current state
|
|
14
|
+
3. `.gsd-t/contracts/` — all contracts
|
|
15
|
+
4. `.gsd-t/domains/{current}/tasks.md` — planned changes
|
|
16
|
+
|
|
17
|
+
If run standalone, ask: "What changes are you considering?"
|
|
18
|
+
|
|
19
|
+
## Step 2: Identify Changed Files
|
|
20
|
+
|
|
21
|
+
From the plan or user description, list:
|
|
22
|
+
- Files to be created
|
|
23
|
+
- Files to be modified
|
|
24
|
+
- Files to be deleted
|
|
25
|
+
- Functions/classes/endpoints being changed
|
|
26
|
+
|
|
27
|
+
## Step 2.5: Graph-Enhanced Analysis (if available)
|
|
28
|
+
|
|
29
|
+
Check if a graph index exists: read `.gsd-t/graph/meta.json`. If it exists:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
For each changed file/function, query the graph:
|
|
33
|
+
1. query('getCallers', { entity: '{function_name}' }) → all direct callers
|
|
34
|
+
2. query('getTransitiveCallers', { entity: '{name}', depth: 5 }) → full caller chain
|
|
35
|
+
3. query('getDomainOwner', { entity: '{name}' }) → which domain owns this
|
|
36
|
+
4. query('getContractFor', { entity: '{name}' }) → which contract it implements
|
|
37
|
+
5. query('getSurfaceConsumers', { entity: '{name}' }) → which surfaces consume it
|
|
38
|
+
6. query('getDomainBoundaryViolations', {}) → cross-domain access issues
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Use graph results to build a **complete blast radius** that includes transitive callers, contract violations, and cross-surface impact. This replaces the grep-based search in Step 3A when available but grep remains the fallback when no graph exists.
|
|
42
|
+
|
|
43
|
+
## Step 3: Trace Dependencies
|
|
44
|
+
|
|
45
|
+
For each changed file/function:
|
|
46
|
+
|
|
47
|
+
### A) Who Calls This?
|
|
48
|
+
|
|
49
|
+
**If graph available** (Step 2.5): use graph results — they include transitive callers that grep misses.
|
|
50
|
+
|
|
51
|
+
**If no graph** (fallback):
|
|
52
|
+
```bash
|
|
53
|
+
# Find all imports/requires of this module
|
|
54
|
+
grep -r "import.*{module}" src/
|
|
55
|
+
grep -r "from.*{module}" src/
|
|
56
|
+
grep -r "require.*{module}" src/
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### B) Who Does This Call?
|
|
60
|
+
- List dependencies this code relies on
|
|
61
|
+
- Note if any of those are also changing
|
|
62
|
+
|
|
63
|
+
### C) Contract Consumers
|
|
64
|
+
- Check `.gsd-t/contracts/api-contract.md` — does this change an endpoint?
|
|
65
|
+
- Check `.gsd-t/contracts/schema-contract.md` — does this change data shape?
|
|
66
|
+
- Check `.gsd-t/contracts/component-contract.md` — does this change props/interface?
|
|
67
|
+
|
|
68
|
+
### D) New Consumer Analysis
|
|
69
|
+
|
|
70
|
+
**Trigger**: Run this section when the planned change adds a new client surface (web app, mobile app, CLI, external API, admin panel, etc.) that will consume the existing backend.
|
|
71
|
+
|
|
72
|
+
If no new consumer surface is being added, skip this section.
|
|
73
|
+
|
|
74
|
+
**Step 1 — List what the new consumer needs:**
|
|
75
|
+
```
|
|
76
|
+
Operations the new consumer requires:
|
|
77
|
+
- {operation-name}: {brief description}
|
|
78
|
+
- {operation-name}: {brief description}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Step 2 — Compare against existing backend operations:**
|
|
82
|
+
```bash
|
|
83
|
+
# Search for existing implementations of each needed operation
|
|
84
|
+
grep -r "{operation-name}" src/
|
|
85
|
+
grep -r "{operation-name}" commands/
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Step 3 — Classify each needed operation:**
|
|
89
|
+
|
|
90
|
+
| Operation | Classification | Action |
|
|
91
|
+
|-----------|---------------|--------|
|
|
92
|
+
| {op} | REUSE — identical operation exists | Call existing endpoint/function |
|
|
93
|
+
| {op} | EXTEND — similar operation exists, needs a variant | Add param or thin adapter |
|
|
94
|
+
| {op} | DUPLICATE — new endpoint would replicate existing logic | 🔴 Must route through shared layer |
|
|
95
|
+
| {op} | NEW — no equivalent exists | Build new, consider SharedCore placement |
|
|
96
|
+
|
|
97
|
+
**DUPLICATE items become 🔴 Breaking Changes** in Step 4 — they block execution until the shared layer is designed. Add them to the impact report under "Breaking Changes" with:
|
|
98
|
+
- Required Action: "Extract `{operation}` to shared-core domain; {new-consumer} and {existing-consumer} both call it from there."
|
|
99
|
+
|
|
100
|
+
### E) Test Coverage
|
|
101
|
+
- Which tests cover this code?
|
|
102
|
+
- Will they still pass after changes?
|
|
103
|
+
- Are there tests that assert current behavior that will become wrong?
|
|
104
|
+
|
|
105
|
+
## Step 4: Classify Impacts
|
|
106
|
+
|
|
107
|
+
Categorize each finding:
|
|
108
|
+
|
|
109
|
+
### 🔴 Breaking Changes
|
|
110
|
+
Changes that WILL break something if not addressed:
|
|
111
|
+
- API signature changes with existing consumers
|
|
112
|
+
- Database schema changes with existing queries
|
|
113
|
+
- Removed functions still being called
|
|
114
|
+
- Changed return types
|
|
115
|
+
|
|
116
|
+
### 🟡 Requires Updates
|
|
117
|
+
Changes that need coordinated updates:
|
|
118
|
+
- Tests asserting old behavior
|
|
119
|
+
- Documentation references
|
|
120
|
+
- Related UI components
|
|
121
|
+
- Dependent domain tasks
|
|
122
|
+
|
|
123
|
+
### 🟢 Safe Changes
|
|
124
|
+
Changes with no downstream impact:
|
|
125
|
+
- New files with no consumers yet
|
|
126
|
+
- Internal refactors with same interface
|
|
127
|
+
- Additive changes (new optional params)
|
|
128
|
+
|
|
129
|
+
### ⚪ Unknown
|
|
130
|
+
Can't determine impact — needs investigation:
|
|
131
|
+
- Dynamic imports
|
|
132
|
+
- Reflection-based code
|
|
133
|
+
- External integrations
|
|
134
|
+
|
|
135
|
+
## Step 5: Check Contract Compliance
|
|
136
|
+
|
|
137
|
+
For each contract:
|
|
138
|
+
- Will planned changes violate the contract?
|
|
139
|
+
- Does the contract need to be updated first?
|
|
140
|
+
- Are there consumers not yet updated for contract changes?
|
|
141
|
+
|
|
142
|
+
Flag: "Contract violation detected — {contract} specifies {X}, but plan changes to {Y}"
|
|
143
|
+
|
|
144
|
+
## Step 6: Produce Impact Report
|
|
145
|
+
|
|
146
|
+
Create/update `.gsd-t/impact-report.md`:
|
|
147
|
+
|
|
148
|
+
```markdown
|
|
149
|
+
# Impact Analysis — {date}
|
|
150
|
+
|
|
151
|
+
## Summary
|
|
152
|
+
- Breaking changes: {N}
|
|
153
|
+
- Requires updates: {N}
|
|
154
|
+
- Safe changes: {N}
|
|
155
|
+
- Unknown: {N}
|
|
156
|
+
- **Recommendation**: {PROCEED | PROCEED WITH CAUTION | BLOCK}
|
|
157
|
+
|
|
158
|
+
## Planned Changes
|
|
159
|
+
| File | Change Type | Description |
|
|
160
|
+
|------|-------------|-------------|
|
|
161
|
+
| {file} | {create/modify/delete} | {what} |
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## 🔴 Breaking Changes
|
|
166
|
+
|
|
167
|
+
### IMP-001: {title}
|
|
168
|
+
- **Change**: {what's changing}
|
|
169
|
+
- **Affected**: {files/functions/consumers}
|
|
170
|
+
- **Impact**: {what will break}
|
|
171
|
+
- **Required Action**: {what must be done}
|
|
172
|
+
- **Blocking**: YES — cannot proceed without addressing
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## 🟡 Requires Updates
|
|
177
|
+
|
|
178
|
+
### IMP-010: {title}
|
|
179
|
+
- **Change**: {what's changing}
|
|
180
|
+
- **Affected**: {files/tests/docs}
|
|
181
|
+
- **Action**: {update X to reflect Y}
|
|
182
|
+
- **Blocking**: NO — can be done during or after execution
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## 🟢 Safe Changes
|
|
187
|
+
|
|
188
|
+
- {file}: {change} — no downstream impact
|
|
189
|
+
- {file}: {change} — additive only
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## ⚪ Unknown Impact
|
|
194
|
+
|
|
195
|
+
### IMP-020: {title}
|
|
196
|
+
- **Change**: {what}
|
|
197
|
+
- **Uncertainty**: {why we can't determine impact}
|
|
198
|
+
- **Recommendation**: {manual review / test thoroughly / ask user}
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Contract Status
|
|
203
|
+
|
|
204
|
+
| Contract | Status | Notes |
|
|
205
|
+
|----------|--------|-------|
|
|
206
|
+
| api-contract.md | {OK / VIOLATION / UPDATE NEEDED} | {details} |
|
|
207
|
+
| schema-contract.md | {OK / VIOLATION / UPDATE NEEDED} | {details} |
|
|
208
|
+
| component-contract.md | {OK / VIOLATION / UPDATE NEEDED} | {details} |
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Test Impact
|
|
213
|
+
|
|
214
|
+
| Test File | Status | Action Needed |
|
|
215
|
+
|-----------|--------|---------------|
|
|
216
|
+
| {test} | {WILL PASS / WILL FAIL / NEEDS UPDATE} | {action} |
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Recommended Execution Order
|
|
221
|
+
|
|
222
|
+
1. {First, update X because...}
|
|
223
|
+
2. {Then, modify Y...}
|
|
224
|
+
3. {Finally, Z...}
|
|
225
|
+
|
|
226
|
+
## Generated Tasks
|
|
227
|
+
|
|
228
|
+
If breaking changes require pre-work, add to domain tasks:
|
|
229
|
+
- [ ] IMP-001: {remediation task}
|
|
230
|
+
- [ ] IMP-002: {remediation task}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## Step 7: Document Ripple
|
|
234
|
+
|
|
235
|
+
After producing the impact report, update affected documentation:
|
|
236
|
+
|
|
237
|
+
### Always update:
|
|
238
|
+
1. **`.gsd-t/progress.md`** — Log the impact analysis in the Decision Log with date and key findings
|
|
239
|
+
|
|
240
|
+
### Check if affected:
|
|
241
|
+
2. **`docs/architecture.md`** — If the analysis revealed architectural concerns or proposed changes, document them
|
|
242
|
+
3. **`docs/requirements.md`** — If the analysis found requirements that would be affected by the planned changes, note the impact
|
|
243
|
+
4. **`.gsd-t/contracts/`** — If contract violations or needed updates were found, flag them clearly in the contracts (mark as "PENDING UPDATE")
|
|
244
|
+
5. **`.gsd-t/techdebt.md`** — If the analysis uncovered new debt or risk areas, add them
|
|
245
|
+
|
|
246
|
+
### Skip what's not affected.
|
|
247
|
+
|
|
248
|
+
## Step 8: Test Verification
|
|
249
|
+
|
|
250
|
+
Validate the test landscape before recommending proceed/block:
|
|
251
|
+
|
|
252
|
+
1. **Run existing tests**: Execute the full test suite to establish current state
|
|
253
|
+
2. **Verify passing**: Confirm what passes today — any pre-existing failures should be noted in the impact report
|
|
254
|
+
3. **Map test impact**: For each planned change in Step 2, identify which tests will need updating — include this in the "Test Impact" section of the report
|
|
255
|
+
|
|
256
|
+
## Step 9: Decision Gate
|
|
257
|
+
|
|
258
|
+
### If PROCEED:
|
|
259
|
+
"✅ Impact analysis complete. No blocking issues found. Ready for execution."
|
|
260
|
+
- Continue to execute phase (if auto-invoked)
|
|
261
|
+
- Or report and exit (if standalone)
|
|
262
|
+
|
|
263
|
+
### If PROCEED WITH CAUTION:
|
|
264
|
+
"⚠️ Impact analysis found {N} items requiring attention:"
|
|
265
|
+
- List the yellow items
|
|
266
|
+
|
|
267
|
+
**Level 3 (Full Auto)**: Log the caution items and auto-advance to execute. Do NOT wait for user input.
|
|
268
|
+
|
|
269
|
+
**Level 1–2**: "These can be addressed during execution. Proceed?" Wait for user confirmation. If user declines, pause for remediation.
|
|
270
|
+
|
|
271
|
+
### If BLOCK:
|
|
272
|
+
"🛑 Impact analysis found breaking changes that must be addressed first:"
|
|
273
|
+
- List the red items
|
|
274
|
+
- Generate remediation tasks
|
|
275
|
+
- Add tasks to current domain's task list
|
|
276
|
+
- "Run `/user:gsd-t-execute` to address these first, then re-run impact analysis."
|
|
277
|
+
- Do NOT proceed to execute phase
|
|
278
|
+
|
|
279
|
+
## Standalone Mode
|
|
280
|
+
|
|
281
|
+
When run independently (not as part of wave):
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
/user:gsd-t-impact "considering adding user roles to the auth system"
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
1. Ask clarifying questions about the change
|
|
288
|
+
2. Run full analysis
|
|
289
|
+
3. Produce report
|
|
290
|
+
4. Do NOT auto-proceed — just inform
|
|
291
|
+
|
|
292
|
+
### Autonomy Behavior
|
|
293
|
+
|
|
294
|
+
**Level 3 (Full Auto)**: If PROCEED or PROCEED WITH CAUTION, log findings and auto-advance to execute phase. If BLOCK, stop and report breaking changes to user — do NOT auto-advance. When run standalone, always report and exit without auto-proceeding.
|
|
295
|
+
|
|
296
|
+
**Level 1–2**: Present the full impact report. Wait for user confirmation before proceeding (PROCEED) or pause for remediation (BLOCK). For PROCEED WITH CAUTION, ask "These can be addressed during execution. Proceed?"
|
|
297
|
+
|
|
298
|
+
$ARGUMENTS
|
|
299
|
+
|
|
300
|
+
## Auto-Clear
|
|
301
|
+
|
|
302
|
+
All work is committed to project files. Execute `/clear` to free the context window for the next command.
|