@tekyzinc/gsd-t 2.20.7 → 2.22.0
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 +417 -398
- package/README.md +5 -2
- package/bin/gsd-t.js +114 -123
- package/commands/gsd-t-complete-milestone.md +13 -2
- package/commands/gsd-t-debug.md +13 -0
- package/commands/gsd-t-execute.md +17 -0
- package/commands/gsd-t-help.md +15 -0
- package/commands/gsd-t-integrate.md +13 -0
- package/commands/gsd-t-partition.md +13 -0
- package/commands/gsd-t-plan.md +13 -0
- package/commands/gsd-t-qa.md +169 -0
- package/commands/gsd-t-quick.md +13 -0
- package/commands/gsd-t-test-sync.md +13 -0
- package/commands/gsd-t-triage-and-merge.md +167 -0
- package/commands/gsd-t-verify.md +19 -1
- package/commands/gsd-t-wave.md +4 -0
- package/docs/GSD-T-README.md +2 -0
- package/docs/architecture.md +82 -0
- package/docs/infrastructure.md +72 -0
- package/docs/requirements.md +43 -0
- package/docs/workflows.md +67 -0
- package/examples/.gsd-t/domains/example-domain/scope.md +13 -15
- package/package.json +2 -2
- package/scripts/gsd-t-heartbeat.js +4 -1
- package/scripts/npm-update-check.js +27 -0
- package/templates/CLAUDE-global.md +433 -414
- package/templates/progress.md +40 -38
|
@@ -1,414 +1,433 @@
|
|
|
1
|
-
# Prime Directives
|
|
2
|
-
|
|
3
|
-
1. SIMPLICITY ABOVE ALL. Every change should be minimal and impact as little code as possible. No massive refactors.
|
|
4
|
-
2. ALWAYS check for unwanted downstream effects before writing any new code or changing existing code.
|
|
5
|
-
3. ALWAYS check for completeness that any code creation/change/deletion is implemented thoroughly in every relevant file.
|
|
6
|
-
4. ALWAYS work autonomously. ONLY ask for user input when truly blocked.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
# GSD-T: Contract-Driven Development
|
|
10
|
-
|
|
11
|
-
## Work Hierarchy
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
PROJECT or FEATURE or SCAN
|
|
15
|
-
└── MILESTONE (major deliverable)
|
|
16
|
-
└── PARTITION → DISCUSS → PLAN → IMPACT → EXECUTE → TEST-SYNC → INTEGRATE → VERIFY → COMPLETE
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
- **Project**: Full greenfield project → decomposed into milestones
|
|
20
|
-
- **Feature**: Major new feature for existing codebase → impact analysis → milestones
|
|
21
|
-
- **Scan**: Deep codebase analysis → techdebt.md → promotable to milestones
|
|
22
|
-
- **Milestone**: A significant deliverable (e.g., "User Authentication Complete")
|
|
23
|
-
- **Domain**: An independent area of responsibility within a milestone, with its own scope, tasks, and file boundaries
|
|
24
|
-
- **Contract**: The documented interface between domains — API shapes, schemas, component props
|
|
25
|
-
|
|
26
|
-
## Commands Reference
|
|
27
|
-
|
|
28
|
-
| Command | Purpose |
|
|
29
|
-
|---------|---------|
|
|
30
|
-
| `/user:gsd` | Smart router — describe what you need, auto-routes to the right command |
|
|
31
|
-
| `/user:gsd-t-help` | List all commands or get detailed help |
|
|
32
|
-
| `/user:gsd-t-prompt` | Help formulate your idea before committing |
|
|
33
|
-
| `/user:gsd-t-brainstorm` | Creative exploration and idea generation |
|
|
34
|
-
| `/user:gsd-t-project` | Full project → milestone roadmap |
|
|
35
|
-
| `/user:gsd-t-feature` | Major feature → impact analysis + milestones |
|
|
36
|
-
| `/user:gsd-t-scan` | Deep codebase analysis → techdebt.md |
|
|
37
|
-
| `/user:gsd-t-gap-analysis` | Requirements gap analysis — spec vs. existing code |
|
|
38
|
-
| `/user:gsd-t-promote-debt` | Convert debt items to milestones |
|
|
39
|
-
| `/user:gsd-t-setup` | Generate or restructure project CLAUDE.md |
|
|
40
|
-
| `/user:gsd-t-init` | Initialize project structure |
|
|
41
|
-
| `/user:gsd-t-init-scan-setup` | Full onboarding: git + init + scan + setup in one |
|
|
42
|
-
| `/user:gsd-t-milestone` | Define new milestone |
|
|
43
|
-
| `/user:gsd-t-partition` | Decompose into domains + contracts |
|
|
44
|
-
| `/user:gsd-t-discuss` | Multi-perspective design exploration |
|
|
45
|
-
| `/user:gsd-t-plan` | Create atomic task lists per domain |
|
|
46
|
-
| `/user:gsd-t-impact` | Analyze downstream effects before execution |
|
|
47
|
-
| `/user:gsd-t-execute` | Run tasks (solo or team) |
|
|
48
|
-
| `/user:gsd-t-test-sync` | Keep tests aligned with code changes |
|
|
49
|
-
| `/user:gsd-t-
|
|
50
|
-
| `/user:gsd-t-
|
|
51
|
-
| `/user:gsd-t-
|
|
52
|
-
| `/user:gsd-t-
|
|
53
|
-
| `/user:gsd-t-
|
|
54
|
-
| `/user:gsd-t-
|
|
55
|
-
| `/user:gsd-t-
|
|
56
|
-
| `/user:gsd-t-
|
|
57
|
-
| `/user:gsd-t-
|
|
58
|
-
| `/user:gsd-t-
|
|
59
|
-
| `/user:gsd-t-
|
|
60
|
-
| `/user:gsd-t-version-update
|
|
61
|
-
| `/user:gsd-t-
|
|
62
|
-
| `/user:gsd-t-
|
|
63
|
-
| `/user:gsd-t-backlog-
|
|
64
|
-
| `/user:gsd-t-backlog-
|
|
65
|
-
| `/user:gsd-t-backlog-
|
|
66
|
-
| `/user:gsd-t-backlog-
|
|
67
|
-
| `/user:gsd-t-backlog-
|
|
68
|
-
| `/user:
|
|
69
|
-
| `/user:
|
|
70
|
-
| `/user:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
|
80
|
-
|
|
81
|
-
| **
|
|
82
|
-
| **
|
|
83
|
-
| **
|
|
84
|
-
| **
|
|
85
|
-
| **
|
|
86
|
-
| **
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
├── Is it about
|
|
97
|
-
├── Is it about how
|
|
98
|
-
├── Is it about
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
|
110
|
-
|
|
111
|
-
| **
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
- Version is
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
├──
|
|
127
|
-
├──
|
|
128
|
-
├──
|
|
129
|
-
├──
|
|
130
|
-
├── Removing
|
|
131
|
-
├──
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
- What
|
|
142
|
-
- What
|
|
143
|
-
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
- `.
|
|
185
|
-
-
|
|
186
|
-
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
##
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
├──
|
|
265
|
-
│
|
|
266
|
-
│
|
|
267
|
-
│
|
|
268
|
-
│
|
|
269
|
-
|
|
270
|
-
│
|
|
271
|
-
│
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
If
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
-
|
|
381
|
-
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
#
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
1
|
+
# Prime Directives
|
|
2
|
+
|
|
3
|
+
1. SIMPLICITY ABOVE ALL. Every change should be minimal and impact as little code as possible. No massive refactors.
|
|
4
|
+
2. ALWAYS check for unwanted downstream effects before writing any new code or changing existing code.
|
|
5
|
+
3. ALWAYS check for completeness that any code creation/change/deletion is implemented thoroughly in every relevant file.
|
|
6
|
+
4. ALWAYS work autonomously. ONLY ask for user input when truly blocked.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# GSD-T: Contract-Driven Development
|
|
10
|
+
|
|
11
|
+
## Work Hierarchy
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
PROJECT or FEATURE or SCAN
|
|
15
|
+
└── MILESTONE (major deliverable)
|
|
16
|
+
└── PARTITION → DISCUSS → PLAN → IMPACT → EXECUTE → TEST-SYNC → INTEGRATE → VERIFY → COMPLETE
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
- **Project**: Full greenfield project → decomposed into milestones
|
|
20
|
+
- **Feature**: Major new feature for existing codebase → impact analysis → milestones
|
|
21
|
+
- **Scan**: Deep codebase analysis → techdebt.md → promotable to milestones
|
|
22
|
+
- **Milestone**: A significant deliverable (e.g., "User Authentication Complete")
|
|
23
|
+
- **Domain**: An independent area of responsibility within a milestone, with its own scope, tasks, and file boundaries
|
|
24
|
+
- **Contract**: The documented interface between domains — API shapes, schemas, component props
|
|
25
|
+
|
|
26
|
+
## Commands Reference
|
|
27
|
+
|
|
28
|
+
| Command | Purpose |
|
|
29
|
+
|---------|---------|
|
|
30
|
+
| `/user:gsd` | Smart router — describe what you need, auto-routes to the right command |
|
|
31
|
+
| `/user:gsd-t-help` | List all commands or get detailed help |
|
|
32
|
+
| `/user:gsd-t-prompt` | Help formulate your idea before committing |
|
|
33
|
+
| `/user:gsd-t-brainstorm` | Creative exploration and idea generation |
|
|
34
|
+
| `/user:gsd-t-project` | Full project → milestone roadmap |
|
|
35
|
+
| `/user:gsd-t-feature` | Major feature → impact analysis + milestones |
|
|
36
|
+
| `/user:gsd-t-scan` | Deep codebase analysis → techdebt.md |
|
|
37
|
+
| `/user:gsd-t-gap-analysis` | Requirements gap analysis — spec vs. existing code |
|
|
38
|
+
| `/user:gsd-t-promote-debt` | Convert debt items to milestones |
|
|
39
|
+
| `/user:gsd-t-setup` | Generate or restructure project CLAUDE.md |
|
|
40
|
+
| `/user:gsd-t-init` | Initialize project structure |
|
|
41
|
+
| `/user:gsd-t-init-scan-setup` | Full onboarding: git + init + scan + setup in one |
|
|
42
|
+
| `/user:gsd-t-milestone` | Define new milestone |
|
|
43
|
+
| `/user:gsd-t-partition` | Decompose into domains + contracts |
|
|
44
|
+
| `/user:gsd-t-discuss` | Multi-perspective design exploration |
|
|
45
|
+
| `/user:gsd-t-plan` | Create atomic task lists per domain |
|
|
46
|
+
| `/user:gsd-t-impact` | Analyze downstream effects before execution |
|
|
47
|
+
| `/user:gsd-t-execute` | Run tasks (solo or team) |
|
|
48
|
+
| `/user:gsd-t-test-sync` | Keep tests aligned with code changes |
|
|
49
|
+
| `/user:gsd-t-qa` | QA agent — test generation, execution, gap reporting |
|
|
50
|
+
| `/user:gsd-t-integrate` | Wire domains together |
|
|
51
|
+
| `/user:gsd-t-verify` | Run quality gates |
|
|
52
|
+
| `/user:gsd-t-complete-milestone` | Archive milestone + git tag |
|
|
53
|
+
| `/user:gsd-t-wave` | Full cycle (auto-advances all phases) |
|
|
54
|
+
| `/user:gsd-t-status` | Cross-domain progress view |
|
|
55
|
+
| `/user:gsd-t-debug` | Systematic debugging |
|
|
56
|
+
| `/user:gsd-t-quick` | Fast task, respects contracts |
|
|
57
|
+
| `/user:gsd-t-populate` | Auto-populate docs from existing codebase |
|
|
58
|
+
| `/user:gsd-t-log` | Sync progress Decision Log with recent git activity |
|
|
59
|
+
| `/user:gsd-t-resume` | Restore context, continue |
|
|
60
|
+
| `/user:gsd-t-version-update` | Update GSD-T to latest version |
|
|
61
|
+
| `/user:gsd-t-version-update-all` | Update GSD-T + all registered projects |
|
|
62
|
+
| `/user:gsd-t-triage-and-merge` | Auto-review, merge, and publish GitHub branches |
|
|
63
|
+
| `/user:gsd-t-backlog-add` | Capture item, auto-categorize, append to backlog |
|
|
64
|
+
| `/user:gsd-t-backlog-list` | Filtered, ordered view of backlog items |
|
|
65
|
+
| `/user:gsd-t-backlog-move` | Reorder items by position (priority) |
|
|
66
|
+
| `/user:gsd-t-backlog-edit` | Modify backlog entry fields |
|
|
67
|
+
| `/user:gsd-t-backlog-remove` | Drop item with optional reason |
|
|
68
|
+
| `/user:gsd-t-backlog-promote` | Refine, classify, launch GSD-T workflow |
|
|
69
|
+
| `/user:gsd-t-backlog-settings` | Manage types, apps, categories, defaults |
|
|
70
|
+
| `/user:branch` | Create and switch to a new git branch |
|
|
71
|
+
| `/user:checkin` | Auto-bump version, stage, commit, and push |
|
|
72
|
+
| `/user:Claude-md` | Reload and apply CLAUDE.md directives |
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
# Living Documents
|
|
76
|
+
|
|
77
|
+
These documents MUST be maintained and referenced throughout development:
|
|
78
|
+
|
|
79
|
+
| Document | Location | Purpose |
|
|
80
|
+
|----------|----------|---------|
|
|
81
|
+
| **Requirements** | `docs/requirements.md` | Functional and technical requirements |
|
|
82
|
+
| **Architecture** | `docs/architecture.md` | System design, components, data flow, decisions |
|
|
83
|
+
| **Workflows** | `docs/workflows.md` | User journeys and technical process flows |
|
|
84
|
+
| **Infrastructure** | `docs/infrastructure.md` | Commands, DB setup, server access, creds |
|
|
85
|
+
| **README** | `README.md` | Project overview, setup, features |
|
|
86
|
+
| **Progress** | `.gsd-t/progress.md` | Current milestone/phase state + version |
|
|
87
|
+
| **Contracts** | `.gsd-t/contracts/` | Interfaces between domains |
|
|
88
|
+
| **Tech Debt** | `.gsd-t/techdebt.md` | Debt register from scans |
|
|
89
|
+
|
|
90
|
+
## The "No Re-Research" Rule
|
|
91
|
+
|
|
92
|
+
**BEFORE researching how something works, CHECK THE DOCS FIRST.**
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
NEED TO UNDERSTAND SOMETHING?
|
|
96
|
+
├── Is it about system structure/components? → Read docs/architecture.md
|
|
97
|
+
├── Is it about how a process flows? → Read docs/workflows.md
|
|
98
|
+
├── Is it about what to build? → Read docs/requirements.md
|
|
99
|
+
├── Is it about how to deploy/operate? → Read docs/infrastructure.md
|
|
100
|
+
├── Is it about domain interfaces? → Read .gsd-t/contracts/
|
|
101
|
+
└── Not documented? → Research, then DOCUMENT IT
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
# Versioning
|
|
106
|
+
|
|
107
|
+
GSD-T tracks project version in `.gsd-t/progress.md` using semantic versioning: `Major.Minor.Patch`
|
|
108
|
+
|
|
109
|
+
| Segment | Bumped When | Example |
|
|
110
|
+
|---------|-------------|---------|
|
|
111
|
+
| **Major** | Breaking changes, major rework, v1 launch | 1.0.0 → 2.0.0 |
|
|
112
|
+
| **Minor** | New features, completed feature milestones | 1.1.0 → 1.2.0 |
|
|
113
|
+
| **Patch** | Bug fixes, minor improvements, cleanup | 1.1.1 → 1.1.2 |
|
|
114
|
+
|
|
115
|
+
- Version is set during `gsd-t-init` (starts at `0.1.0`)
|
|
116
|
+
- Version is bumped during `gsd-t-complete-milestone` based on milestone scope
|
|
117
|
+
- Version is reflected in: `progress.md`, `README.md`, package manifest (if any), and git tags (`v{version}`)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
# Destructive Action Guard (MANDATORY)
|
|
121
|
+
|
|
122
|
+
**NEVER perform destructive or structural changes without explicit user approval.** This applies at ALL autonomy levels, including Level 3.
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
BEFORE any of these actions, STOP and ask the user:
|
|
126
|
+
├── DROP TABLE, DROP COLUMN, DROP INDEX, TRUNCATE, DELETE without WHERE
|
|
127
|
+
├── Renaming or removing database tables or columns
|
|
128
|
+
├── Schema migrations that lose data or break existing queries
|
|
129
|
+
├── Replacing an existing architecture pattern (e.g., normalized → denormalized)
|
|
130
|
+
├── Removing or replacing existing files/modules that contain working functionality
|
|
131
|
+
├── Changing ORM models in ways that conflict with the existing database schema
|
|
132
|
+
├── Removing API endpoints or changing response shapes that existing clients depend on
|
|
133
|
+
├── Replacing a dependency or framework with a different one
|
|
134
|
+
└── Any change that would require other parts of the system to be rewritten
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### How to handle schema/architecture mismatches:
|
|
138
|
+
1. **READ the existing schema/code first** — understand what exists before proposing changes
|
|
139
|
+
2. **Adapt new code to match existing structures** — not the other way around
|
|
140
|
+
3. **If restructuring is truly needed**, present the case to the user with:
|
|
141
|
+
- What exists today and why it might have been designed that way
|
|
142
|
+
- What you want to change and why
|
|
143
|
+
- What will break if you make the change
|
|
144
|
+
- What data or functionality will be lost
|
|
145
|
+
- A migration path that preserves existing data
|
|
146
|
+
4. **Wait for explicit approval** before proceeding
|
|
147
|
+
|
|
148
|
+
### Why this matters:
|
|
149
|
+
Even in development, the user may have:
|
|
150
|
+
- Working functionality they've tested and rely on
|
|
151
|
+
- Data they've carefully set up (seed data, test accounts, configuration)
|
|
152
|
+
- Other code that depends on the current structure
|
|
153
|
+
- Design decisions made for reasons not documented
|
|
154
|
+
|
|
155
|
+
**"Adapt to what exists" is always safer than "replace what exists."**
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
# Autonomous Execution Rules
|
|
159
|
+
|
|
160
|
+
## Update Notices
|
|
161
|
+
|
|
162
|
+
On session start, a version check hook outputs one of two messages. Show the result to the user at the **beginning** of your first response:
|
|
163
|
+
|
|
164
|
+
- If `[GSD-T UPDATE]` appears → update is available. Show:
|
|
165
|
+
```
|
|
166
|
+
⬆️ GSD-T update available: {installed} → {latest}
|
|
167
|
+
Run: /user:gsd-t-version-update-all
|
|
168
|
+
Changelog: https://github.com/Tekyz-Inc/get-stuff-done-teams/blob/main/CHANGELOG.md
|
|
169
|
+
```
|
|
170
|
+
Also repeat at the **end** of your first response.
|
|
171
|
+
|
|
172
|
+
- If `[GSD-T]` appears → up to date. Show:
|
|
173
|
+
```
|
|
174
|
+
GSD-T v{version} — up to date
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Conversation vs. Work
|
|
178
|
+
|
|
179
|
+
Only execute GSD-T workflow behavior when a `/gsd-t-*` command is invoked or when actively mid-phase (resumed via `/gsd-t-resume`). **Plain text messages — especially questions — should be answered conversationally.** Do not launch into workflow execution, file reading, or phase advancement from a question or comment. If the user wants work done, they will invoke a command.
|
|
180
|
+
|
|
181
|
+
## Auto-Init Guard
|
|
182
|
+
|
|
183
|
+
Before executing any GSD-T workflow command, check if **any** of these files are missing in the current project:
|
|
184
|
+
- `.gsd-t/progress.md`, `.gsd-t/backlog.md`, `.gsd-t/backlog-settings.md`
|
|
185
|
+
- `.gsd-t/contracts/`, `.gsd-t/domains/`
|
|
186
|
+
- `.claude/settings.local.json` (if `~/.claude/settings.local` exists)
|
|
187
|
+
- `CLAUDE.md`, `README.md`
|
|
188
|
+
- `docs/requirements.md`, `docs/architecture.md`, `docs/workflows.md`, `docs/infrastructure.md`
|
|
189
|
+
|
|
190
|
+
If any are missing:
|
|
191
|
+
1. Run `gsd-t-init` automatically (it skips files that already exist)
|
|
192
|
+
2. Then continue with the originally requested command
|
|
193
|
+
|
|
194
|
+
**Exempt commands** (do not trigger auto-init): `gsd-t-init`, `gsd-t-init-scan-setup`, `gsd-t-help`, `gsd-t-version-update`, `gsd-t-version-update-all`, `gsd-t-prompt`, `gsd-t-brainstorm`.
|
|
195
|
+
|
|
196
|
+
## Playwright Readiness Guard
|
|
197
|
+
|
|
198
|
+
Before any command that involves testing (`gsd-t-execute`, `gsd-t-test-sync`, `gsd-t-verify`, `gsd-t-quick`, `gsd-t-wave`, `gsd-t-milestone`, `gsd-t-complete-milestone`, `gsd-t-debug`), check if `playwright.config.*` exists in the project. If it does not:
|
|
199
|
+
1. Detect the package manager and install Playwright (`@playwright/test` + chromium)
|
|
200
|
+
2. Create a basic `playwright.config.ts` with sensible defaults
|
|
201
|
+
3. Create the E2E test directory with a placeholder spec
|
|
202
|
+
4. Then continue with the original command
|
|
203
|
+
|
|
204
|
+
Playwright must always be ready before any testing occurs. Do not skip this check. Do not defer setup to "later."
|
|
205
|
+
|
|
206
|
+
### Playwright Cleanup
|
|
207
|
+
|
|
208
|
+
After Playwright tests finish (pass or fail), **kill any app/server processes that were started for the tests**. Playwright often launches a dev server (via `webServer` config or manually). These processes must not be left running:
|
|
209
|
+
1. Check for any dev server processes spawned during the test run
|
|
210
|
+
2. Kill them (e.g., `npx kill-port`, or terminate the process directly)
|
|
211
|
+
3. Verify the port is free before proceeding
|
|
212
|
+
|
|
213
|
+
This applies everywhere Playwright tests are executed: execute, test-sync, verify, quick, wave, debug, complete-milestone, and integrate.
|
|
214
|
+
|
|
215
|
+
## QA Agent (Mandatory)
|
|
216
|
+
|
|
217
|
+
Any GSD-T phase that produces or validates code **MUST spawn a QA teammate**. The QA agent's sole job is test generation, execution, and gap reporting. It never writes feature code.
|
|
218
|
+
|
|
219
|
+
**Commands that must spawn QA agent:**
|
|
220
|
+
`partition`, `plan`, `execute`, `verify`, `complete-milestone`, `quick`, `debug`, `integrate`, `test-sync`, `wave`
|
|
221
|
+
|
|
222
|
+
**Spawn instruction:**
|
|
223
|
+
```
|
|
224
|
+
Teammate "qa": Read commands/gsd-t-qa.md for your full instructions.
|
|
225
|
+
Phase context: {current phase}. Read .gsd-t/contracts/ for contract definitions.
|
|
226
|
+
Your job: generate contract tests, run all tests, report gaps.
|
|
227
|
+
You do NOT write feature code.
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
**QA agent failure blocks phase completion.** Lead cannot proceed until QA reports PASS or user explicitly overrides.
|
|
231
|
+
|
|
232
|
+
## API Documentation Guard (Swagger/OpenAPI)
|
|
233
|
+
|
|
234
|
+
**Every API endpoint MUST be documented in a Swagger/OpenAPI spec. No exceptions.**
|
|
235
|
+
|
|
236
|
+
When any GSD-T command creates or modifies an API endpoint:
|
|
237
|
+
1. **If no Swagger/OpenAPI spec exists**: Set one up immediately
|
|
238
|
+
- Detect the framework (Express, Fastify, Hono, Django, FastAPI, etc.)
|
|
239
|
+
- Install the appropriate Swagger integration (e.g., `swagger-jsdoc` + `swagger-ui-express`, `@fastify/swagger`, FastAPI's built-in OpenAPI)
|
|
240
|
+
- Create the OpenAPI spec file or configure auto-generation from code
|
|
241
|
+
- Add a `/docs` or `/api-docs` route serving the Swagger UI
|
|
242
|
+
2. **Update the spec**: Every new or changed endpoint must be reflected in the Swagger/OpenAPI spec — routes, request/response schemas, auth requirements, error responses
|
|
243
|
+
3. **Publish the Swagger URL**: The Swagger/API docs URL MUST appear in:
|
|
244
|
+
- `CLAUDE.md` — under Documentation or Infrastructure section
|
|
245
|
+
- `README.md` — under API section or Getting Started
|
|
246
|
+
- `docs/infrastructure.md` — under API documentation
|
|
247
|
+
4. **Verify**: After any API change, confirm the Swagger UI loads and reflects the current endpoints
|
|
248
|
+
|
|
249
|
+
This applies during: `gsd-t-execute`, `gsd-t-quick`, `gsd-t-integrate`, `gsd-t-wave`, and any command that touches API code.
|
|
250
|
+
|
|
251
|
+
## Prime Rule
|
|
252
|
+
KEEP GOING. Only stop for:
|
|
253
|
+
1. Unrecoverable errors after 2 fix attempts
|
|
254
|
+
2. Ambiguity that fundamentally changes project direction
|
|
255
|
+
3. Milestone completion (checkpoint for user review)
|
|
256
|
+
4. Destructive actions (see Destructive Action Guard above — ALWAYS stop)
|
|
257
|
+
|
|
258
|
+
## Pre-Commit Gate (MANDATORY)
|
|
259
|
+
|
|
260
|
+
NEVER commit code without running this checklist. This is not optional.
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
BEFORE EVERY COMMIT:
|
|
264
|
+
├── Am I on the correct branch?
|
|
265
|
+
│ CHECK → Run `git branch --show-current`
|
|
266
|
+
│ Compare against "Expected branch" in project CLAUDE.md
|
|
267
|
+
│ WRONG BRANCH → STOP. Do NOT commit. Switch to the correct branch first.
|
|
268
|
+
│ No guard set → Proceed (but warn user to set one)
|
|
269
|
+
├── Did I create or change an API endpoint or response shape?
|
|
270
|
+
│ YES → Update .gsd-t/contracts/api-contract.md
|
|
271
|
+
│ YES → Update Swagger/OpenAPI spec (see API Documentation Guard below)
|
|
272
|
+
│ YES → Verify Swagger URL is in CLAUDE.md and README.md
|
|
273
|
+
├── Did I change the database schema?
|
|
274
|
+
│ YES → Update .gsd-t/contracts/schema-contract.md AND docs/schema.md
|
|
275
|
+
├── Did I add/change a UI component interface?
|
|
276
|
+
│ YES → Update .gsd-t/contracts/component-contract.md
|
|
277
|
+
├── Did I add new files or directories?
|
|
278
|
+
│ YES → Update the owning domain's scope.md
|
|
279
|
+
├── Did I implement or change a requirement?
|
|
280
|
+
│ YES → Update docs/requirements.md (mark complete or revise)
|
|
281
|
+
├── Did I add/change/remove a component or change data flow?
|
|
282
|
+
│ YES → Update docs/architecture.md
|
|
283
|
+
├── Did I modify any document, script, or code file?
|
|
284
|
+
│ YES → Add timestamped entry to .gsd-t/progress.md Decision Log
|
|
285
|
+
│ Format: `- YYYY-MM-DD HH:MM: {what was done} — {brief context or result}`
|
|
286
|
+
│ This includes ALL file-modifying activities:
|
|
287
|
+
│ project, feature, scan, gap-analysis, milestone, partition, discuss,
|
|
288
|
+
│ plan, impact, execute, test-sync, integrate, verify, complete-milestone,
|
|
289
|
+
│ wave, quick, debug, promote-debt, populate, setup, init, init-scan-setup,
|
|
290
|
+
│ backlog-add/edit/move/remove/promote/settings, and any manual code changes
|
|
291
|
+
├── Did I make an architectural or design decision?
|
|
292
|
+
│ YES → Also include decision rationale in the progress.md entry
|
|
293
|
+
├── Did I discover or fix tech debt?
|
|
294
|
+
│ YES → Update .gsd-t/techdebt.md
|
|
295
|
+
├── Did I establish a pattern future work should follow?
|
|
296
|
+
│ YES → Update CLAUDE.md or domain constraints.md
|
|
297
|
+
├── Did I add/change tests?
|
|
298
|
+
│ YES → Verify test names and paths are referenced in requirements
|
|
299
|
+
├── Did I change UI, routes, or user flows?
|
|
300
|
+
│ YES → Update affected E2E test specs (Playwright/Cypress)
|
|
301
|
+
└── Did I run the affected tests?
|
|
302
|
+
YES → Verify they pass. NO → Run them now.
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
If ANY answer is YES and the doc is NOT updated, update it BEFORE committing. No exceptions.
|
|
306
|
+
|
|
307
|
+
## Execution Behavior
|
|
308
|
+
- ALWAYS check docs/architecture.md before adding or modifying components.
|
|
309
|
+
- ALWAYS check docs/workflows.md before changing any multi-step process.
|
|
310
|
+
- ALWAYS update docs as part of completing work — not as an afterthought.
|
|
311
|
+
- ALWAYS self-verify work by running tests and verification commands.
|
|
312
|
+
- NEVER re-research how something works if you built it — it should be documented.
|
|
313
|
+
- NEVER pause to show verification steps — execute them.
|
|
314
|
+
- NEVER ask "should I continue?" — just continue.
|
|
315
|
+
- NEVER summarize what you're "about to do" — just do it.
|
|
316
|
+
- IF a test fails, fix it immediately (up to 2 attempts) before reporting.
|
|
317
|
+
|
|
318
|
+
## Autonomy Levels
|
|
319
|
+
|
|
320
|
+
Projects can specify an autonomy level in their project CLAUDE.md:
|
|
321
|
+
|
|
322
|
+
| Level | Behavior |
|
|
323
|
+
|-------|----------|
|
|
324
|
+
| **Level 1: Supervised** | Pause at each phase for confirmation |
|
|
325
|
+
| **Level 2: Standard** | Pause only at milestones |
|
|
326
|
+
| **Level 3: Full Auto** | Only pause for blockers or project completion (default) |
|
|
327
|
+
|
|
328
|
+
If not specified, use Level 3.
|
|
329
|
+
|
|
330
|
+
## Workflow Preferences (Defaults — override in project CLAUDE.md)
|
|
331
|
+
|
|
332
|
+
### Research Policy
|
|
333
|
+
Before planning a phase, evaluate whether research is needed:
|
|
334
|
+
|
|
335
|
+
**Run research when:**
|
|
336
|
+
- Phase involves unfamiliar libraries, APIs, or services
|
|
337
|
+
- Architectural decisions are required
|
|
338
|
+
- Integrating external systems
|
|
339
|
+
- Phase scope is ambiguous or complex
|
|
340
|
+
|
|
341
|
+
**Skip research when:**
|
|
342
|
+
- Patterns are already established from earlier phases
|
|
343
|
+
- Straightforward CRUD, UI, or config work
|
|
344
|
+
- Domain is well understood
|
|
345
|
+
- Phase builds directly on existing code patterns
|
|
346
|
+
|
|
347
|
+
If in doubt, skip research and proceed — research if execution reveals gaps.
|
|
348
|
+
|
|
349
|
+
### Phase Flow
|
|
350
|
+
- Upon completing a phase, automatically proceed to the next phase
|
|
351
|
+
- ONLY run Discussion phase if truly required (clear path → skip to Plan)
|
|
352
|
+
- ALWAYS self-verify work by running verification commands
|
|
353
|
+
- NEVER pause to show verification steps — execute them
|
|
354
|
+
|
|
355
|
+
### Next Command Hint
|
|
356
|
+
|
|
357
|
+
When a GSD-T command completes (and does NOT auto-advance to the next phase), display a hint showing the recommended next command. Format:
|
|
358
|
+
|
|
359
|
+
```
|
|
360
|
+
Next → /user:gsd-t-{command}
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
Successor mapping:
|
|
364
|
+
| Completed | Next |
|
|
365
|
+
|-----------|------|
|
|
366
|
+
| `project` | `gsd-t-milestone` |
|
|
367
|
+
| `feature` | `gsd-t-milestone` |
|
|
368
|
+
| `milestone` | `gsd-t-partition` |
|
|
369
|
+
| `partition` | `gsd-t-plan` (or `gsd-t-discuss` if complex) |
|
|
370
|
+
| `discuss` | `gsd-t-plan` |
|
|
371
|
+
| `plan` | `gsd-t-execute` (or `gsd-t-impact` if risky) |
|
|
372
|
+
| `impact` | `gsd-t-execute` |
|
|
373
|
+
| `execute` | `gsd-t-test-sync` |
|
|
374
|
+
| `test-sync` | `gsd-t-verify` (or `gsd-t-integrate` if multi-domain) |
|
|
375
|
+
| `integrate` | `gsd-t-verify` |
|
|
376
|
+
| `verify` | `gsd-t-complete-milestone` |
|
|
377
|
+
| `complete-milestone` | `gsd-t-status` |
|
|
378
|
+
| `scan` | `gsd-t-promote-debt` or `gsd-t-milestone` |
|
|
379
|
+
| `init` | `gsd-t-scan` or `gsd-t-milestone` |
|
|
380
|
+
| `init-scan-setup` | `gsd-t-milestone` |
|
|
381
|
+
| `gap-analysis` | `gsd-t-milestone` or `gsd-t-feature` |
|
|
382
|
+
| `populate` | `gsd-t-status` |
|
|
383
|
+
| `setup` | `gsd-t-status` |
|
|
384
|
+
|
|
385
|
+
Commands with no successor (standalone): `quick`, `debug`, `brainstorm`, `status`, `help`, `resume`, `prompt`, `log`, backlog commands.
|
|
386
|
+
|
|
387
|
+
Skip the hint if auto-advancing (Level 3 mid-wave) — only show when the user needs to manually invoke the next step.
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
# Don't Do These Things
|
|
391
|
+
|
|
392
|
+
- NEVER perform destructive or structural changes without explicit user approval (see Destructive Action Guard above).
|
|
393
|
+
- NEVER drop database tables, remove columns, or run destructive SQL on an existing database — adapt new code to the existing schema.
|
|
394
|
+
- NEVER replace existing architecture patterns (e.g., normalized → denormalized) without user approval — even if you think the new way is better.
|
|
395
|
+
- NEVER commit code without running the Pre-Commit Gate checklist. EVERY commit.
|
|
396
|
+
- NEVER batch doc updates for later — update docs as part of the same commit as the code change.
|
|
397
|
+
- NEVER start a phase without reading contracts and relevant docs first.
|
|
398
|
+
- NEVER complete a phase without running document ripple on affected docs.
|
|
399
|
+
- NEVER re-research how a component works — read architecture.md and contracts.
|
|
400
|
+
- NEVER let code and contract disagree — fix one or the other immediately.
|
|
401
|
+
- NEVER make changes that touch more than 3 files without pausing to confirm approach.
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
# Code Standards (Defaults — override in project CLAUDE.md)
|
|
405
|
+
|
|
406
|
+
## Patterns
|
|
407
|
+
- Type hints required on all function signatures
|
|
408
|
+
- Dataclasses/interfaces for data models, not raw dicts
|
|
409
|
+
- Functions under 30 lines — split if longer
|
|
410
|
+
- Files under 200 lines — create new modules if needed
|
|
411
|
+
- Enums for state management and fixed option sets
|
|
412
|
+
|
|
413
|
+
## Naming
|
|
414
|
+
```
|
|
415
|
+
files: snake_case (user_service.py)
|
|
416
|
+
classes: PascalCase (UserService)
|
|
417
|
+
functions: snake_case (get_user)
|
|
418
|
+
constants: UPPER_SNAKE_CASE (MAX_RETRIES)
|
|
419
|
+
private: _underscore (_internal_method)
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
# Recovery After Interruption
|
|
424
|
+
|
|
425
|
+
When resuming work (new session or after /clear):
|
|
426
|
+
1. Read `.gsd-t/progress.md` for current state
|
|
427
|
+
2. Read `docs/requirements.md` for what's left to build
|
|
428
|
+
3. Read `docs/architecture.md` for how the system is structured
|
|
429
|
+
4. Read `.gsd-t/contracts/` for domain interfaces
|
|
430
|
+
5. Verify last task's work is intact (files exist, tests pass)
|
|
431
|
+
6. Continue from current task — don't restart the phase
|
|
432
|
+
|
|
433
|
+
**CRITICAL: Do NOT research how the system works. The docs tell you. Read them.**
|