Commit c623d14
feat(spec-writing): add impact analysis to prevent missing affected code
Problem: When writing specs for refactoring tasks that modify shared
constants or types, the current workflow only searches for "reusable"
code, not ALL affected code. This caused specs to miss critical areas
like duplicate definitions in different packages (e.g., crawler having
its own SUPPORTED_LANGUAGES while shared package has another).
Solution: Add three layers of impact analysis:
1. write-spec.md - New Step 2.5 "Impact Analysis":
- Search for ALL usages of constants/types being modified
- Detect duplicate definitions across packages (RED FLAG)
- Find hardcoded values that should use constants
- Document all affected packages/modules
2. research-spec.md - New impact analysis question:
- Ask users about OTHER packages that might be affected
- Specifically mention crawler, scripts, config files, tests
- Record affected areas for spec-writer to investigate
3. create-tasks-list.md - New Step 1.5 "Verify Spec Completeness":
- Independent grep search before creating tasks
- Compare grep results with files mentioned in spec
- Flag and document any gaps found
- Create additional task groups for missing areas
This ensures refactoring specs capture ALL code that needs updates,
preventing production issues from partially applied changes.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent a386cf3 commit c623d14
File tree
3 files changed
+139
-8
lines changed- profiles/default/workflows
- implementation
- specification
3 files changed
+139
-8
lines changedLines changed: 56 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
20 | 71 | | |
21 | 72 | | |
22 | 73 | | |
| |||
188 | 239 | | |
189 | 240 | | |
190 | 241 | | |
| 242 | + | |
| 243 | + | |
191 | 244 | | |
192 | 245 | | |
193 | 246 | | |
| |||
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
77 | 91 | | |
78 | 92 | | |
79 | 93 | | |
| |||
182 | 196 | | |
183 | 197 | | |
184 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
185 | 210 | | |
186 | 211 | | |
187 | 212 | | |
| |||
251 | 276 | | |
252 | 277 | | |
253 | 278 | | |
| 279 | + | |
254 | 280 | | |
255 | 281 | | |
256 | 282 | | |
257 | 283 | | |
| 284 | + | |
258 | 285 | | |
259 | 286 | | |
260 | 287 | | |
261 | 288 | | |
| 289 | + | |
262 | 290 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
47 | 95 | | |
48 | 96 | | |
49 | 97 | | |
| |||
93 | 141 | | |
94 | 142 | | |
95 | 143 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
0 commit comments