get-shit-done-cc 1.0.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.
Files changed (49) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +192 -0
  3. package/bin/install.js +53 -0
  4. package/commands/gsd/add-phase.md +201 -0
  5. package/commands/gsd/complete-milestone.md +105 -0
  6. package/commands/gsd/discuss-milestone.md +45 -0
  7. package/commands/gsd/discuss-phase.md +47 -0
  8. package/commands/gsd/execute-plan.md +108 -0
  9. package/commands/gsd/help.md +252 -0
  10. package/commands/gsd/insert-phase.md +218 -0
  11. package/commands/gsd/list-phase-assumptions.md +49 -0
  12. package/commands/gsd/new-milestone.md +58 -0
  13. package/commands/gsd/new-project.md +177 -0
  14. package/commands/gsd/pause-work.md +123 -0
  15. package/commands/gsd/plan-phase.md +60 -0
  16. package/commands/gsd/progress.md +182 -0
  17. package/commands/gsd/resume-work.md +50 -0
  18. package/get-shit-done/references/checkpoints.md +594 -0
  19. package/get-shit-done/references/cli-automation.md +527 -0
  20. package/get-shit-done/references/git-integration.md +126 -0
  21. package/get-shit-done/references/plan-format.md +397 -0
  22. package/get-shit-done/references/principles.md +97 -0
  23. package/get-shit-done/references/questioning.md +138 -0
  24. package/get-shit-done/references/research-pitfalls.md +215 -0
  25. package/get-shit-done/references/scope-estimation.md +451 -0
  26. package/get-shit-done/templates/config.json +17 -0
  27. package/get-shit-done/templates/context.md +385 -0
  28. package/get-shit-done/templates/continue-here.md +78 -0
  29. package/get-shit-done/templates/issues.md +32 -0
  30. package/get-shit-done/templates/milestone-archive.md +123 -0
  31. package/get-shit-done/templates/milestone.md +115 -0
  32. package/get-shit-done/templates/phase-prompt.md +290 -0
  33. package/get-shit-done/templates/project.md +207 -0
  34. package/get-shit-done/templates/research-prompt.md +133 -0
  35. package/get-shit-done/templates/roadmap.md +196 -0
  36. package/get-shit-done/templates/state.md +226 -0
  37. package/get-shit-done/templates/summary.md +200 -0
  38. package/get-shit-done/workflows/complete-milestone.md +490 -0
  39. package/get-shit-done/workflows/create-milestone.md +379 -0
  40. package/get-shit-done/workflows/create-roadmap.md +443 -0
  41. package/get-shit-done/workflows/discuss-milestone.md +144 -0
  42. package/get-shit-done/workflows/discuss-phase.md +254 -0
  43. package/get-shit-done/workflows/execute-phase.md +1261 -0
  44. package/get-shit-done/workflows/list-phase-assumptions.md +178 -0
  45. package/get-shit-done/workflows/plan-phase.md +783 -0
  46. package/get-shit-done/workflows/research-phase.md +293 -0
  47. package/get-shit-done/workflows/resume-project.md +248 -0
  48. package/get-shit-done/workflows/transition.md +488 -0
  49. package/package.json +30 -0
@@ -0,0 +1,1261 @@
1
+ <purpose>
2
+ Execute a phase prompt (PLAN.md) and create the outcome summary (SUMMARY.md).
3
+ </purpose>
4
+
5
+ <required_reading>
6
+ Read STATE.md before any operation to load project context.
7
+ </required_reading>
8
+
9
+ <process>
10
+
11
+ <step name="load_project_state" priority="first">
12
+ Before any operation, read project state:
13
+
14
+ ```bash
15
+ cat .planning/STATE.md 2>/dev/null
16
+ ```
17
+
18
+ **If file exists:** Parse and internalize:
19
+
20
+ - Current position (phase, plan, status)
21
+ - Accumulated decisions (constraints on this execution)
22
+ - Deferred issues (context for deviations)
23
+ - Blockers/concerns (things to watch for)
24
+ - Brief alignment status
25
+
26
+ **If file missing but .planning/ exists:**
27
+
28
+ ```
29
+ STATE.md missing but planning artifacts exist.
30
+ Options:
31
+ 1. Reconstruct from existing artifacts
32
+ 2. Continue without project state (may lose accumulated context)
33
+ ```
34
+
35
+ **If .planning/ doesn't exist:** Error - project not initialized.
36
+
37
+ This ensures every execution has full project context.
38
+ </step>
39
+
40
+ <step name="identify_plan">
41
+ Find the next plan to execute:
42
+ - Check roadmap for "In progress" phase
43
+ - Find plans in that phase directory
44
+ - Identify first plan without corresponding SUMMARY
45
+
46
+ ```bash
47
+ cat .planning/ROADMAP.md
48
+ # Look for phase with "In progress" status
49
+ # Then find plans in that phase
50
+ ls .planning/phases/XX-name/*-PLAN.md 2>/dev/null | sort
51
+ ls .planning/phases/XX-name/*-SUMMARY.md 2>/dev/null | sort
52
+ ```
53
+
54
+ **Logic:**
55
+
56
+ - If `01-01-PLAN.md` exists but `01-01-SUMMARY.md` doesn't → execute 01-01
57
+ - If `01-01-SUMMARY.md` exists but `01-02-SUMMARY.md` doesn't → execute 01-02
58
+ - Pattern: Find first PLAN file without matching SUMMARY file
59
+
60
+ **Decimal phase handling:**
61
+
62
+ Phase directories can be integer or decimal format:
63
+
64
+ - Integer: `.planning/phases/01-foundation/01-01-PLAN.md`
65
+ - Decimal: `.planning/phases/01.1-hotfix/01.1-01-PLAN.md`
66
+
67
+ Parse phase number from path (handles both formats):
68
+
69
+ ```bash
70
+ # Extract phase number (handles XX or XX.Y format)
71
+ PHASE=$(echo "$PLAN_PATH" | grep -oE '[0-9]+(\.[0-9]+)?-[0-9]+')
72
+ ```
73
+
74
+ SUMMARY naming follows same pattern:
75
+
76
+ - Integer: `01-01-SUMMARY.md`
77
+ - Decimal: `01.1-01-SUMMARY.md`
78
+
79
+ Confirm with user if ambiguous.
80
+
81
+ **Check workflow config for gate behavior:**
82
+
83
+ ```bash
84
+ cat .planning/config.json 2>/dev/null
85
+ ```
86
+
87
+ Parse the config:
88
+
89
+ - If `mode: "yolo"` → auto-approve execution
90
+ - If `mode: "interactive"` → prompt user
91
+ - If `mode: "custom"` → check `gates.execute_next_plan`
92
+
93
+ **If auto-approved:**
94
+
95
+ ```
96
+ ⚡ Auto-approved: Execute {phase}-{plan}-PLAN.md
97
+ [Plan X of Y for Phase Z]
98
+
99
+ Starting execution...
100
+ ```
101
+
102
+ Proceed directly to parse_segments.
103
+
104
+ **If prompting:**
105
+
106
+ Present:
107
+
108
+ ```
109
+ Found plan to execute: {phase}-{plan}-PLAN.md
110
+ [Plan X of Y for Phase Z]
111
+
112
+ Proceed with execution?
113
+ ```
114
+
115
+ Wait for confirmation.
116
+ </step>
117
+
118
+ <step name="record_start_time">
119
+ Record execution start time for performance tracking:
120
+
121
+ ```bash
122
+ PLAN_START_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
123
+ PLAN_START_EPOCH=$(date +%s)
124
+ ```
125
+
126
+ Store in shell variables for duration calculation at completion.
127
+ </step>
128
+
129
+ <step name="parse_segments">
130
+ **Intelligent segmentation: Parse plan into execution segments.**
131
+
132
+ Plans are divided into segments by checkpoints. Each segment is routed to optimal execution context (subagent or main).
133
+
134
+ **1. Check for checkpoints:**
135
+
136
+ ```bash
137
+ # Find all checkpoints and their types
138
+ grep -n "type=\"checkpoint" .planning/phases/XX-name/{phase}-{plan}-PLAN.md
139
+ ```
140
+
141
+ **2. Analyze execution strategy:**
142
+
143
+ **If NO checkpoints found:**
144
+
145
+ - **Fully autonomous plan** - spawn single subagent for entire plan
146
+ - Subagent gets fresh 200k context, executes all tasks, creates SUMMARY, commits
147
+ - Main context: Just orchestration (~5% usage)
148
+
149
+ **If checkpoints found, parse into segments:**
150
+
151
+ Segment = tasks between checkpoints (or start→first checkpoint, or last checkpoint→end)
152
+
153
+ **For each segment, determine routing:**
154
+
155
+ ```
156
+ Segment routing rules:
157
+
158
+ IF segment has no prior checkpoint:
159
+ → SUBAGENT (first segment, nothing to depend on)
160
+
161
+ IF segment follows checkpoint:human-verify:
162
+ → SUBAGENT (verification is just confirmation, doesn't affect next work)
163
+
164
+ IF segment follows checkpoint:decision OR checkpoint:human-action:
165
+ → MAIN CONTEXT (next tasks need the decision/result)
166
+ ```
167
+
168
+ **3. Execution pattern:**
169
+
170
+ **Pattern A: Fully autonomous (no checkpoints)**
171
+
172
+ ```
173
+ Spawn subagent → execute all tasks → SUMMARY → commit → report back
174
+ ```
175
+
176
+ **Pattern B: Segmented with verify-only checkpoints**
177
+
178
+ ```
179
+ Segment 1 (tasks 1-3): Spawn subagent → execute → report back
180
+ Checkpoint 4 (human-verify): Main context → you verify → continue
181
+ Segment 2 (tasks 5-6): Spawn NEW subagent → execute → report back
182
+ Checkpoint 7 (human-verify): Main context → you verify → continue
183
+ Aggregate results → SUMMARY → commit
184
+ ```
185
+
186
+ **Pattern C: Decision-dependent (must stay in main)**
187
+
188
+ ```
189
+ Checkpoint 1 (decision): Main context → you decide → continue in main
190
+ Tasks 2-5: Main context (need decision from checkpoint 1)
191
+ No segmentation benefit - execute entirely in main
192
+ ```
193
+
194
+ **4. Why this works:**
195
+
196
+ **Segmentation benefits:**
197
+
198
+ - Fresh context for each autonomous segment (0% start every time)
199
+ - Main context only for checkpoints (~10-20% total)
200
+ - Can handle 10+ task plans if properly segmented
201
+ - Quality impossible to degrade in autonomous segments
202
+
203
+ **When segmentation provides no benefit:**
204
+
205
+ - Checkpoint is decision/human-action and following tasks depend on outcome
206
+ - Better to execute sequentially in main than break flow
207
+
208
+ **5. Implementation:**
209
+
210
+ **For fully autonomous plans:**
211
+
212
+ ```
213
+ Use Task tool with subagent_type="general-purpose":
214
+
215
+ Prompt: "Execute plan at .planning/phases/{phase}-{plan}-PLAN.md
216
+
217
+ This is an autonomous plan (no checkpoints). Execute all tasks, create SUMMARY.md in phase directory, commit with message following plan's commit guidance.
218
+
219
+ Follow all deviation rules and authentication gate protocols from the plan.
220
+
221
+ When complete, report: plan name, tasks completed, SUMMARY path, commit hash."
222
+ ```
223
+
224
+ **For segmented plans (has verify-only checkpoints):**
225
+
226
+ ```
227
+ Execute segment-by-segment:
228
+
229
+ For each autonomous segment:
230
+ Spawn subagent with prompt: "Execute tasks [X-Y] from plan at .planning/phases/{phase}-{plan}-PLAN.md. Read the plan for full context and deviation rules. Do NOT create SUMMARY or commit - just execute these tasks and report results."
231
+
232
+ Wait for subagent completion
233
+
234
+ For each checkpoint:
235
+ Execute in main context
236
+ Wait for user interaction
237
+ Continue to next segment
238
+
239
+ After all segments complete:
240
+ Aggregate all results
241
+ Create SUMMARY.md
242
+ Commit with all changes
243
+ ```
244
+
245
+ **For decision-dependent plans:**
246
+
247
+ ```
248
+ Execute in main context (standard flow below)
249
+ No subagent routing
250
+ Quality maintained through small scope (2-3 tasks per plan)
251
+ ```
252
+
253
+ See step name="segment_execution" for detailed segment execution loop.
254
+ </step>
255
+
256
+ <step name="segment_execution">
257
+ **Detailed segment execution loop for segmented plans.**
258
+
259
+ **This step applies ONLY to segmented plans (Pattern B: has checkpoints, but they're verify-only).**
260
+
261
+ For Pattern A (fully autonomous) and Pattern C (decision-dependent), skip this step.
262
+
263
+ **Execution flow:**
264
+
265
+ ````
266
+ 1. Parse plan to identify segments:
267
+ - Read plan file
268
+ - Find checkpoint locations: grep -n "type=\"checkpoint" PLAN.md
269
+ - Identify checkpoint types: grep "type=\"checkpoint" PLAN.md | grep -o 'checkpoint:[^"]*'
270
+ - Build segment map:
271
+ * Segment 1: Start → first checkpoint (tasks 1-X)
272
+ * Checkpoint 1: Type and location
273
+ * Segment 2: After checkpoint 1 → next checkpoint (tasks X+1 to Y)
274
+ * Checkpoint 2: Type and location
275
+ * ... continue for all segments
276
+
277
+ 2. For each segment in order:
278
+
279
+ A. Determine routing (apply rules from parse_segments):
280
+ - No prior checkpoint? → Subagent
281
+ - Prior checkpoint was human-verify? → Subagent
282
+ - Prior checkpoint was decision/human-action? → Main context
283
+
284
+ B. If routing = Subagent:
285
+ ```
286
+ Spawn Task tool with subagent_type="general-purpose":
287
+
288
+ Prompt: "Execute tasks [task numbers/names] from plan at [plan path].
289
+
290
+ **Context:**
291
+ - Read the full plan for objective, context files, and deviation rules
292
+ - You are executing a SEGMENT of this plan (not the full plan)
293
+ - Other segments will be executed separately
294
+
295
+ **Your responsibilities:**
296
+ - Execute only the tasks assigned to you
297
+ - Follow all deviation rules and authentication gate protocols
298
+ - Track deviations for later Summary
299
+ - DO NOT create SUMMARY.md (will be created after all segments complete)
300
+ - DO NOT commit (will be done after all segments complete)
301
+
302
+ **Report back:**
303
+ - Tasks completed
304
+ - Files created/modified
305
+ - Deviations encountered
306
+ - Any issues or blockers"
307
+
308
+ Wait for subagent to complete
309
+ Capture results (files changed, deviations, etc.)
310
+ ```
311
+
312
+ C. If routing = Main context:
313
+ Execute tasks in main using standard execution flow (step name="execute")
314
+ Track results locally
315
+
316
+ D. After segment completes (whether subagent or main):
317
+ Continue to next checkpoint/segment
318
+
319
+ 3. After ALL segments complete:
320
+
321
+ A. Aggregate results from all segments:
322
+ - Collect files created/modified from all segments
323
+ - Collect deviations from all segments
324
+ - Collect decisions from all checkpoints
325
+ - Merge into complete picture
326
+
327
+ B. Create SUMMARY.md:
328
+ - Use aggregated results
329
+ - Document all work from all segments
330
+ - Include deviations from all segments
331
+ - Note which segments were subagented
332
+
333
+ C. Commit:
334
+ - Stage all files from all segments
335
+ - Stage SUMMARY.md
336
+ - Commit with message following plan guidance
337
+ - Include note about segmented execution if relevant
338
+
339
+ D. Report completion
340
+
341
+ **Example execution trace:**
342
+
343
+ ````
344
+
345
+ Plan: 01-02-PLAN.md (8 tasks, 2 verify checkpoints)
346
+
347
+ Parsing segments...
348
+
349
+ - Segment 1: Tasks 1-3 (autonomous)
350
+ - Checkpoint 4: human-verify
351
+ - Segment 2: Tasks 5-6 (autonomous)
352
+ - Checkpoint 7: human-verify
353
+ - Segment 3: Task 8 (autonomous)
354
+
355
+ Routing analysis:
356
+
357
+ - Segment 1: No prior checkpoint → SUBAGENT ✓
358
+ - Checkpoint 4: Verify only → MAIN (required)
359
+ - Segment 2: After verify → SUBAGENT ✓
360
+ - Checkpoint 7: Verify only → MAIN (required)
361
+ - Segment 3: After verify → SUBAGENT ✓
362
+
363
+ Execution:
364
+ [1] Spawning subagent for tasks 1-3...
365
+ → Subagent completes: 3 files modified, 0 deviations
366
+ [2] Executing checkpoint 4 (human-verify)...
367
+ ════════════════════════════════════════
368
+ CHECKPOINT: Verification Required
369
+ Task 4 of 8: Verify database schema
370
+ I built: User and Session tables with relations
371
+ How to verify: Check src/db/schema.ts for correct types
372
+ ════════════════════════════════════════
373
+ User: "approved"
374
+ [3] Spawning subagent for tasks 5-6...
375
+ → Subagent completes: 2 files modified, 1 deviation (added error handling)
376
+ [4] Executing checkpoint 7 (human-verify)...
377
+ User: "approved"
378
+ [5] Spawning subagent for task 8...
379
+ → Subagent completes: 1 file modified, 0 deviations
380
+
381
+ Aggregating results...
382
+
383
+ - Total files: 6 modified
384
+ - Total deviations: 1
385
+ - Segmented execution: 3 subagents, 2 checkpoints
386
+
387
+ Creating SUMMARY.md...
388
+ Committing...
389
+ ✓ Complete
390
+
391
+ ````
392
+
393
+ **Benefits of this pattern:**
394
+ - Main context usage: ~20% (just orchestration + checkpoints)
395
+ - Subagent 1: Fresh 0-30% (tasks 1-3)
396
+ - Subagent 2: Fresh 0-30% (tasks 5-6)
397
+ - Subagent 3: Fresh 0-20% (task 8)
398
+ - All autonomous work: Peak quality
399
+ - Can handle large plans with many tasks if properly segmented
400
+
401
+ **When NOT to use segmentation:**
402
+ - Plan has decision/human-action checkpoints that affect following tasks
403
+ - Following tasks depend on checkpoint outcome
404
+ - Better to execute in main sequentially in those cases
405
+ </step>
406
+
407
+ <step name="load_prompt">
408
+ Read the plan prompt:
409
+ ```bash
410
+ cat .planning/phases/XX-name/{phase}-{plan}-PLAN.md
411
+ ````
412
+
413
+ This IS the execution instructions. Follow it exactly.
414
+
415
+ **If plan references CONTEXT.md:**
416
+ The CONTEXT.md file provides phase-level objectives, constraints, and success indicators gathered before planning. This context informs implementation decisions throughout execution.
417
+ </step>
418
+
419
+ <step name="previous_phase_check">
420
+ Before executing, check if previous phase had issues:
421
+
422
+ ```bash
423
+ # Find previous phase summary
424
+ ls .planning/phases/*/SUMMARY.md 2>/dev/null | sort -r | head -2 | tail -1
425
+ ```
426
+
427
+ If previous phase SUMMARY.md has "Issues Encountered" != "None" or "Next Phase Readiness" mentions blockers:
428
+
429
+ Use AskUserQuestion:
430
+
431
+ - header: "Previous Issues"
432
+ - question: "Previous phase had unresolved items: [summary]. How to proceed?"
433
+ - options:
434
+ - "Proceed anyway" - Issues won't block this phase
435
+ - "Address first" - Let's resolve before continuing
436
+ - "Review previous" - Show me the full summary
437
+ </step>
438
+
439
+ <step name="execute">
440
+ Execute each task in the prompt. **Deviations are normal** - handle them automatically using embedded rules below.
441
+
442
+ 1. Read the @context files listed in the prompt
443
+
444
+ 2. For each task:
445
+
446
+ **If `type="auto"`:**
447
+
448
+ - Work toward task completion
449
+ - **If CLI/API returns authentication error:** Handle as authentication gate (see below)
450
+ - **When you discover additional work not in plan:** Apply deviation rules (see below) automatically
451
+ - Continue implementing, applying rules as needed
452
+ - Run the verification
453
+ - Confirm done criteria met
454
+ - Track any deviations for Summary documentation
455
+ - Continue to next task
456
+
457
+ **If `type="checkpoint:*"`:**
458
+
459
+ - STOP immediately (do not continue to next task)
460
+ - Execute checkpoint_protocol (see below)
461
+ - Wait for user response
462
+ - Verify if possible (check files, env vars, etc.)
463
+ - Only after user confirmation: continue to next task
464
+
465
+ 3. Run overall verification checks from `<verification>` section
466
+ 4. Confirm all success criteria from `<success_criteria>` section met
467
+ 5. Document all deviations in Summary (automatic - see deviation_documentation below)
468
+ </step>
469
+
470
+ <authentication_gates>
471
+
472
+ ## Handling Authentication Errors During Execution
473
+
474
+ **When you encounter authentication errors during `type="auto"` task execution:**
475
+
476
+ This is NOT a failure. Authentication gates are expected and normal. Handle them dynamically:
477
+
478
+ **Authentication error indicators:**
479
+
480
+ - CLI returns: "Error: Not authenticated", "Not logged in", "Unauthorized", "401", "403"
481
+ - API returns: "Authentication required", "Invalid API key", "Missing credentials"
482
+ - Command fails with: "Please run {tool} login" or "Set {ENV_VAR} environment variable"
483
+
484
+ **Authentication gate protocol:**
485
+
486
+ 1. **Recognize it's an auth gate** - Not a bug, just needs credentials
487
+ 2. **STOP current task execution** - Don't retry repeatedly
488
+ 3. **Create dynamic checkpoint:human-action** - Present it to user immediately
489
+ 4. **Provide exact authentication steps** - CLI commands, where to get keys
490
+ 5. **Wait for user to authenticate** - Let them complete auth flow
491
+ 6. **Verify authentication works** - Test that credentials are valid
492
+ 7. **Retry the original task** - Resume automation where you left off
493
+ 8. **Continue normally** - Don't treat this as an error in Summary
494
+
495
+ **Example: Vercel deployment hits auth error**
496
+
497
+ ```
498
+ Task 3: Deploy to Vercel
499
+ Running: vercel --yes
500
+
501
+ Error: Not authenticated. Please run 'vercel login'
502
+
503
+ [Create checkpoint dynamically]
504
+
505
+ ════════════════════════════════════════
506
+ CHECKPOINT: Authentication Required
507
+ ════════════════════════════════════════
508
+
509
+ Task 3 of 8: Authenticate Vercel CLI
510
+
511
+ I tried to deploy but got authentication error.
512
+
513
+ What you need to do:
514
+ Run: vercel login
515
+
516
+ This will open your browser - complete the authentication flow.
517
+
518
+ I'll verify after: vercel whoami returns your account
519
+
520
+ Type "done" when authenticated
521
+ ════════════════════════════════════════
522
+
523
+ [Wait for user response]
524
+
525
+ [User types "done"]
526
+
527
+ Verifying authentication...
528
+ Running: vercel whoami
529
+ ✓ Authenticated as: user@example.com
530
+
531
+ Retrying deployment...
532
+ Running: vercel --yes
533
+ ✓ Deployed to: https://myapp-abc123.vercel.app
534
+
535
+ Task 3 complete. Continuing to task 4...
536
+ ```
537
+
538
+ **In Summary documentation:**
539
+
540
+ Document authentication gates as normal flow, not deviations:
541
+
542
+ ```markdown
543
+ ## Authentication Gates
544
+
545
+ During execution, I encountered authentication requirements:
546
+
547
+ 1. Task 3: Vercel CLI required authentication
548
+ - Paused for `vercel login`
549
+ - Resumed after authentication
550
+ - Deployed successfully
551
+
552
+ These are normal gates, not errors.
553
+ ```
554
+
555
+ **Key principles:**
556
+
557
+ - Authentication gates are NOT failures or bugs
558
+ - They're expected interaction points during first-time setup
559
+ - Handle them gracefully and continue automation after unblocked
560
+ - Don't mark tasks as "failed" or "incomplete" due to auth gates
561
+ - Document them as normal flow, separate from deviations
562
+ </authentication_gates>
563
+
564
+ <deviation_rules>
565
+
566
+ ## Automatic Deviation Handling
567
+
568
+ **While executing tasks, you WILL discover work not in the plan.** This is normal.
569
+
570
+ Apply these rules automatically. Track all deviations for Summary documentation.
571
+
572
+ ---
573
+
574
+ **RULE 1: Auto-fix bugs**
575
+
576
+ **Trigger:** Code doesn't work as intended (broken behavior, incorrect output, errors)
577
+
578
+ **Action:** Fix immediately, track for Summary
579
+
580
+ **Examples:**
581
+
582
+ - Wrong SQL query returning incorrect data
583
+ - Logic errors (inverted condition, off-by-one, infinite loop)
584
+ - Type errors, null pointer exceptions, undefined references
585
+ - Broken validation (accepts invalid input, rejects valid input)
586
+ - Security vulnerabilities (SQL injection, XSS, CSRF, insecure auth)
587
+ - Race conditions, deadlocks
588
+ - Memory leaks, resource leaks
589
+
590
+ **Process:**
591
+
592
+ 1. Fix the bug inline
593
+ 2. Add/update tests to prevent regression
594
+ 3. Verify fix works
595
+ 4. Continue task
596
+ 5. Track in deviations list: `[Rule 1 - Bug] [description]`
597
+
598
+ **No user permission needed.** Bugs must be fixed for correct operation.
599
+
600
+ ---
601
+
602
+ **RULE 2: Auto-add missing critical functionality**
603
+
604
+ **Trigger:** Code is missing essential features for correctness, security, or basic operation
605
+
606
+ **Action:** Add immediately, track for Summary
607
+
608
+ **Examples:**
609
+
610
+ - Missing error handling (no try/catch, unhandled promise rejections)
611
+ - No input validation (accepts malicious data, type coercion issues)
612
+ - Missing null/undefined checks (crashes on edge cases)
613
+ - No authentication on protected routes
614
+ - Missing authorization checks (users can access others' data)
615
+ - No CSRF protection, missing CORS configuration
616
+ - No rate limiting on public APIs
617
+ - Missing required database indexes (causes timeouts)
618
+ - No logging for errors (can't debug production)
619
+
620
+ **Process:**
621
+
622
+ 1. Add the missing functionality inline
623
+ 2. Add tests for the new functionality
624
+ 3. Verify it works
625
+ 4. Continue task
626
+ 5. Track in deviations list: `[Rule 2 - Missing Critical] [description]`
627
+
628
+ **Critical = required for correct/secure/performant operation**
629
+ **No user permission needed.** These are not "features" - they're requirements for basic correctness.
630
+
631
+ ---
632
+
633
+ **RULE 3: Auto-fix blocking issues**
634
+
635
+ **Trigger:** Something prevents you from completing current task
636
+
637
+ **Action:** Fix immediately to unblock, track for Summary
638
+
639
+ **Examples:**
640
+
641
+ - Missing dependency (package not installed, import fails)
642
+ - Wrong types blocking compilation
643
+ - Broken import paths (file moved, wrong relative path)
644
+ - Missing environment variable (app won't start)
645
+ - Database connection config error
646
+ - Build configuration error (webpack, tsconfig, etc.)
647
+ - Missing file referenced in code
648
+ - Circular dependency blocking module resolution
649
+
650
+ **Process:**
651
+
652
+ 1. Fix the blocking issue
653
+ 2. Verify task can now proceed
654
+ 3. Continue task
655
+ 4. Track in deviations list: `[Rule 3 - Blocking] [description]`
656
+
657
+ **No user permission needed.** Can't complete task without fixing blocker.
658
+
659
+ ---
660
+
661
+ **RULE 4: Ask about architectural changes**
662
+
663
+ **Trigger:** Fix/addition requires significant structural modification
664
+
665
+ **Action:** STOP, present to user, wait for decision
666
+
667
+ **Examples:**
668
+
669
+ - Adding new database table (not just column)
670
+ - Major schema changes (changing primary key, splitting tables)
671
+ - Introducing new service layer or architectural pattern
672
+ - Switching libraries/frameworks (React → Vue, REST → GraphQL)
673
+ - Changing authentication approach (sessions → JWT)
674
+ - Adding new infrastructure (message queue, cache layer, CDN)
675
+ - Changing API contracts (breaking changes to endpoints)
676
+ - Adding new deployment environment
677
+
678
+ **Process:**
679
+
680
+ 1. STOP current task
681
+ 2. Present clearly:
682
+
683
+ ```
684
+ ⚠️ Architectural Decision Needed
685
+
686
+ Current task: [task name]
687
+ Discovery: [what you found that prompted this]
688
+ Proposed change: [architectural modification]
689
+ Why needed: [rationale]
690
+ Impact: [what this affects - APIs, deployment, dependencies, etc.]
691
+ Alternatives: [other approaches, or "none apparent"]
692
+
693
+ Proceed with proposed change? (yes / different approach / defer)
694
+ ```
695
+
696
+ 3. WAIT for user response
697
+ 4. If approved: implement, track as `[Rule 4 - Architectural] [description]`
698
+ 5. If different approach: discuss and implement
699
+ 6. If deferred: log to ISSUES.md, continue without change
700
+
701
+ **User decision required.** These changes affect system design.
702
+
703
+ ---
704
+
705
+ **RULE 5: Log non-critical enhancements**
706
+
707
+ **Trigger:** Improvement that would enhance code but isn't essential now
708
+
709
+ **Action:** Add to .planning/ISSUES.md automatically, continue task
710
+
711
+ **Examples:**
712
+
713
+ - Performance optimization (works correctly, just slower than ideal)
714
+ - Code refactoring (works, but could be cleaner/DRY-er)
715
+ - Better naming (works, but variables could be clearer)
716
+ - Organizational improvements (works, but file structure could be better)
717
+ - Nice-to-have UX improvements (works, but could be smoother)
718
+ - Additional test coverage beyond basics (basics exist, could be more thorough)
719
+ - Documentation improvements (code works, docs could be better)
720
+ - Accessibility enhancements beyond minimum
721
+
722
+ **Process:**
723
+
724
+ 1. Create .planning/ISSUES.md if doesn't exist (use `~/.claude/get-shit-done/templates/issues.md`)
725
+ 2. Add entry with ISS-XXX number (auto-increment)
726
+ 3. Brief notification: `📋 Logged enhancement: [brief] (ISS-XXX)`
727
+ 4. Continue task without implementing
728
+
729
+ **No user permission needed.** Logging for future consideration.
730
+
731
+ ---
732
+
733
+ **RULE PRIORITY (when multiple could apply):**
734
+
735
+ 1. **If Rule 4 applies** → STOP and ask (architectural decision)
736
+ 2. **If Rules 1-3 apply** → Fix automatically, track for Summary
737
+ 3. **If Rule 5 applies** → Log to ISSUES.md, continue
738
+ 4. **If genuinely unsure which rule** → Apply Rule 4 (ask user)
739
+
740
+ **Edge case guidance:**
741
+
742
+ - "This validation is missing" → Rule 2 (critical for security)
743
+ - "This validation could be better" → Rule 5 (enhancement)
744
+ - "This crashes on null" → Rule 1 (bug)
745
+ - "This could be faster" → Rule 5 (enhancement) UNLESS actually timing out → Rule 2 (critical)
746
+ - "Need to add table" → Rule 4 (architectural)
747
+ - "Need to add column" → Rule 1 or 2 (depends: fixing bug or adding critical field)
748
+
749
+ **When in doubt:** Ask yourself "Does this affect correctness, security, or ability to complete task?"
750
+
751
+ - YES → Rules 1-3 (fix automatically)
752
+ - NO → Rule 5 (log it)
753
+ - MAYBE → Rule 4 (ask user)
754
+
755
+ </deviation_rules>
756
+
757
+ <deviation_documentation>
758
+
759
+ ## Documenting Deviations in Summary
760
+
761
+ After all tasks complete, Summary MUST include deviations section.
762
+
763
+ **If no deviations:**
764
+
765
+ ```markdown
766
+ ## Deviations from Plan
767
+
768
+ None - plan executed exactly as written.
769
+ ```
770
+
771
+ **If deviations occurred:**
772
+
773
+ ```markdown
774
+ ## Deviations from Plan
775
+
776
+ ### Auto-fixed Issues
777
+
778
+ **1. [Rule 1 - Bug] Fixed case-sensitive email uniqueness constraint**
779
+
780
+ - **Found during:** Task 4 (Follow/unfollow API implementation)
781
+ - **Issue:** User.email unique constraint was case-sensitive - Test@example.com and test@example.com were both allowed, causing duplicate accounts
782
+ - **Fix:** Changed to `CREATE UNIQUE INDEX users_email_unique ON users (LOWER(email))`
783
+ - **Files modified:** src/models/User.ts, migrations/003_fix_email_unique.sql
784
+ - **Verification:** Unique constraint test passes - duplicate emails properly rejected
785
+ - **Commit:** abc123f
786
+
787
+ **2. [Rule 2 - Missing Critical] Added JWT expiry validation to auth middleware**
788
+
789
+ - **Found during:** Task 3 (Protected route implementation)
790
+ - **Issue:** Auth middleware wasn't checking token expiry - expired tokens were being accepted
791
+ - **Fix:** Added exp claim validation in middleware, reject with 401 if expired
792
+ - **Files modified:** src/middleware/auth.ts, src/middleware/auth.test.ts
793
+ - **Verification:** Expired token test passes - properly rejects with 401
794
+ - **Commit:** def456g
795
+
796
+ ### Deferred Enhancements
797
+
798
+ Logged to .planning/ISSUES.md for future consideration:
799
+
800
+ - ISS-001: Refactor UserService into smaller modules (discovered in Task 3)
801
+ - ISS-002: Add connection pooling for Redis (discovered in Task 6)
802
+
803
+ ---
804
+
805
+ **Total deviations:** 4 auto-fixed (1 bug, 1 missing critical, 1 blocking, 1 architectural with approval), 3 deferred
806
+ **Impact on plan:** All auto-fixes necessary for correctness/security/performance. No scope creep.
807
+ ```
808
+
809
+ **This provides complete transparency:**
810
+
811
+ - Every deviation documented
812
+ - Why it was needed
813
+ - What rule applied
814
+ - What was done
815
+ - User can see exactly what happened beyond the plan
816
+
817
+ </deviation_documentation>
818
+
819
+ <step name="checkpoint_protocol">
820
+ When encountering `type="checkpoint:*"`:
821
+
822
+ **Critical: Claude automates everything with CLI/API before checkpoints.** Checkpoints are for verification and decisions, not manual work.
823
+
824
+ **Display checkpoint clearly:**
825
+
826
+ ```
827
+ ════════════════════════════════════════
828
+ CHECKPOINT: [Type]
829
+ ════════════════════════════════════════
830
+
831
+ Task [X] of [Y]: [Action/What-Built/Decision]
832
+
833
+ [Display task-specific content based on type]
834
+
835
+ [Resume signal instruction]
836
+ ════════════════════════════════════════
837
+ ```
838
+
839
+ **For checkpoint:human-verify (90% of checkpoints):**
840
+
841
+ ```
842
+ I automated: [what was automated - deployed, built, configured]
843
+
844
+ How to verify:
845
+ 1. [Step 1 - exact command/URL]
846
+ 2. [Step 2 - what to check]
847
+ 3. [Step 3 - expected behavior]
848
+
849
+ [Resume signal - e.g., "Type 'approved' or describe issues"]
850
+ ```
851
+
852
+ **For checkpoint:decision (9% of checkpoints):**
853
+
854
+ ```
855
+ Decision needed: [decision]
856
+
857
+ Context: [why this matters]
858
+
859
+ Options:
860
+ 1. [option-id]: [name]
861
+ Pros: [pros]
862
+ Cons: [cons]
863
+
864
+ 2. [option-id]: [name]
865
+ Pros: [pros]
866
+ Cons: [cons]
867
+
868
+ [Resume signal - e.g., "Select: option-id"]
869
+ ```
870
+
871
+ **For checkpoint:human-action (1% - rare, only for truly unavoidable manual steps):**
872
+
873
+ ```
874
+ I automated: [what Claude already did via CLI/API]
875
+
876
+ Need your help with: [the ONE thing with no CLI/API - email link, 2FA code]
877
+
878
+ Instructions:
879
+ [Single unavoidable step]
880
+
881
+ I'll verify after: [verification]
882
+
883
+ [Resume signal - e.g., "Type 'done' when complete"]
884
+ ```
885
+
886
+ **After displaying:** WAIT for user response. Do NOT hallucinate completion. Do NOT continue to next task.
887
+
888
+ **After user responds:**
889
+
890
+ - Run verification if specified (file exists, env var set, tests pass, etc.)
891
+ - If verification passes or N/A: continue to next task
892
+ - If verification fails: inform user, wait for resolution
893
+
894
+ See ~/.claude/get-shit-done/references/checkpoints.md for complete checkpoint guidance.
895
+ </step>
896
+
897
+ <step name="verification_failure_gate">
898
+ If any task verification fails:
899
+
900
+ STOP. Do not continue to next task.
901
+
902
+ Present inline:
903
+ "Verification failed for Task [X]: [task name]
904
+
905
+ Expected: [verification criteria]
906
+ Actual: [what happened]
907
+
908
+ How to proceed?
909
+
910
+ 1. Retry - Try the task again
911
+ 2. Skip - Mark as incomplete, continue
912
+ 3. Stop - Pause execution, investigate"
913
+
914
+ Wait for user decision.
915
+
916
+ If user chose "Skip", note it in SUMMARY.md under "Issues Encountered".
917
+ </step>
918
+
919
+ <step name="record_completion_time">
920
+ Record execution end time and calculate duration:
921
+
922
+ ```bash
923
+ PLAN_END_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
924
+ PLAN_END_EPOCH=$(date +%s)
925
+
926
+ DURATION_SEC=$(( PLAN_END_EPOCH - PLAN_START_EPOCH ))
927
+ DURATION_MIN=$(( DURATION_SEC / 60 ))
928
+
929
+ if [[ $DURATION_MIN -ge 60 ]]; then
930
+ HRS=$(( DURATION_MIN / 60 ))
931
+ MIN=$(( DURATION_MIN % 60 ))
932
+ DURATION="${HRS}h ${MIN}m"
933
+ else
934
+ DURATION="${DURATION_MIN} min"
935
+ fi
936
+ ```
937
+
938
+ Pass timing data to SUMMARY.md creation.
939
+ </step>
940
+
941
+ <step name="create_summary">
942
+ Create `{phase}-{plan}-SUMMARY.md` as specified in the prompt's `<output>` section.
943
+ Use ~/.claude/get-shit-done/templates/summary.md for structure.
944
+
945
+ **File location:** `.planning/phases/XX-name/{phase}-{plan}-SUMMARY.md`
946
+
947
+ **Title format:** `# Phase [X] Plan [Y]: [Name] Summary`
948
+
949
+ The one-liner must be SUBSTANTIVE:
950
+
951
+ - Good: "JWT auth with refresh rotation using jose library"
952
+ - Bad: "Authentication implemented"
953
+
954
+ **Include performance data:**
955
+
956
+ - Duration: `$DURATION`
957
+ - Started: `$PLAN_START_TIME`
958
+ - Completed: `$PLAN_END_TIME`
959
+ - Tasks completed: (count from execution)
960
+ - Files modified: (count from execution)
961
+
962
+ **Next Step section:**
963
+
964
+ - If more plans exist in this phase: "Ready for {phase}-{next-plan}-PLAN.md"
965
+ - If this is the last plan: "Phase complete, ready for transition"
966
+ </step>
967
+
968
+ <step name="update_current_position">
969
+ Update Current Position section in STATE.md to reflect plan completion.
970
+
971
+ **Format:**
972
+
973
+ ```markdown
974
+ Phase: [current] of [total] ([phase name])
975
+ Plan: [just completed] of [total in phase]
976
+ Status: [In progress / Phase complete]
977
+ Last activity: [today] - Completed {phase}-{plan}-PLAN.md
978
+
979
+ Progress: [progress bar]
980
+ ```
981
+
982
+ **Calculate progress bar:**
983
+
984
+ - Count total plans across all phases (from ROADMAP.md or ROADMAP.md)
985
+ - Count completed plans (count SUMMARY.md files that exist)
986
+ - Progress = (completed / total) × 100%
987
+ - Render: ░ for incomplete, █ for complete
988
+
989
+ **Example - completing 02-01-PLAN.md (plan 5 of 10 total):**
990
+
991
+ Before:
992
+
993
+ ```markdown
994
+ ## Current Position
995
+
996
+ Phase: 2 of 4 (Authentication)
997
+ Plan: Not started
998
+ Status: Ready to execute
999
+ Last activity: 2025-01-18 - Phase 1 complete
1000
+
1001
+ Progress: ██████░░░░ 40%
1002
+ ```
1003
+
1004
+ After:
1005
+
1006
+ ```markdown
1007
+ ## Current Position
1008
+
1009
+ Phase: 2 of 4 (Authentication)
1010
+ Plan: 1 of 2 in current phase
1011
+ Status: In progress
1012
+ Last activity: 2025-01-19 - Completed 02-01-PLAN.md
1013
+
1014
+ Progress: ███████░░░ 50%
1015
+ ```
1016
+
1017
+ **Step complete when:**
1018
+
1019
+ - [ ] Phase number shows current phase (X of total)
1020
+ - [ ] Plan number shows plans complete in current phase (N of total-in-phase)
1021
+ - [ ] Status reflects current state (In progress / Phase complete)
1022
+ - [ ] Last activity shows today's date and the plan just completed
1023
+ - [ ] Progress bar calculated correctly from total completed plans
1024
+ </step>
1025
+
1026
+ <step name="extract_decisions_and_issues">
1027
+ Extract decisions, issues, and concerns from SUMMARY.md into STATE.md accumulated context.
1028
+
1029
+ **Decisions Made:**
1030
+
1031
+ - Read SUMMARY.md "## Decisions Made" section
1032
+ - If content exists (not "None"):
1033
+ - Add each decision to STATE.md Decisions table
1034
+ - Format: `| [phase number] | [decision summary] | [rationale] |`
1035
+
1036
+ **Deferred Issues:**
1037
+
1038
+ - Read SUMMARY.md to check if new issues were logged to ISSUES.md
1039
+ - If new ISS-XXX entries created:
1040
+ - Update STATE.md "Deferred Issues" section
1041
+
1042
+ **Blockers/Concerns:**
1043
+
1044
+ - Read SUMMARY.md "## Next Phase Readiness" section
1045
+ - If contains blockers or concerns:
1046
+ - Add to STATE.md "Blockers/Concerns Carried Forward"
1047
+ </step>
1048
+
1049
+ <step name="update_session_continuity">
1050
+ Update Session Continuity section in STATE.md to enable resumption in future sessions.
1051
+
1052
+ **Format:**
1053
+
1054
+ ```markdown
1055
+ Last session: [current date and time]
1056
+ Stopped at: Completed {phase}-{plan}-PLAN.md
1057
+ Resume file: [path to .continue-here if exists, else "None"]
1058
+ ```
1059
+
1060
+ **Size constraint note:** Keep STATE.md under 150 lines total.
1061
+ </step>
1062
+
1063
+ <step name="issues_review_gate">
1064
+ Before proceeding, check SUMMARY.md content:
1065
+
1066
+ **Check workflow config for gate behavior:**
1067
+
1068
+ - If `mode: "yolo"` → auto-approve (but still log issues)
1069
+ - If `mode: "interactive"` → prompt user
1070
+
1071
+ If "Issues Encountered" is NOT "None":
1072
+
1073
+ **If auto-approved:**
1074
+
1075
+ ```
1076
+ ⚡ Auto-approved: Issues acknowledgment
1077
+ ⚠️ Note: Issues were encountered during execution:
1078
+ - [Issue 1]
1079
+ - [Issue 2]
1080
+ (Logged - continuing in yolo mode)
1081
+ ```
1082
+
1083
+ Continue without waiting.
1084
+
1085
+ **If prompting:**
1086
+ Present issues and wait for acknowledgment.
1087
+ </step>
1088
+
1089
+ <step name="update_roadmap">
1090
+ Update the roadmap file:
1091
+
1092
+ ```bash
1093
+ ROADMAP_FILE=".planning/ROADMAP.md"
1094
+ ```
1095
+
1096
+ **If more plans remain in this phase:**
1097
+
1098
+ - Update plan count: "2/3 plans complete"
1099
+ - Keep phase status as "In progress"
1100
+
1101
+ **If this was the last plan in the phase:**
1102
+
1103
+ - Mark phase complete: status → "Complete"
1104
+ - Add completion date
1105
+ </step>
1106
+
1107
+ <step name="git_commit_plan">
1108
+ Commit plan completion (SUMMARY + PROJECT-STATE + ROADMAP + modified code files):
1109
+
1110
+ **Critical: Stage only files this plan actually modified.**
1111
+
1112
+ NEVER use:
1113
+
1114
+ - `git add .`
1115
+ - `git add -A`
1116
+ - `git add src/` or any broad directory add
1117
+
1118
+ **1. Stage planning artifacts:**
1119
+
1120
+ ```bash
1121
+ git add .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
1122
+ git add .planning/STATE.md
1123
+ ```
1124
+
1125
+ **2. Stage roadmap file:**
1126
+
1127
+ ```bash
1128
+ if [ -f .planning/ROADMAP.md ]; then
1129
+ git add .planning/ROADMAP.md
1130
+ else
1131
+ git add .planning/ROADMAP.md
1132
+ fi
1133
+ ```
1134
+
1135
+ **3. Stage only code files from the modified-files list**
1136
+
1137
+ **4. Verify staging before commit:**
1138
+
1139
+ ```bash
1140
+ git status
1141
+ # Confirm only expected files are staged
1142
+ ```
1143
+
1144
+ **5. Commit:**
1145
+
1146
+ ```bash
1147
+ git commit -m "$(cat <<'EOF'
1148
+ feat({phase}-{plan}): [one-liner from SUMMARY.md]
1149
+
1150
+ - [Key accomplishment 1]
1151
+ - [Key accomplishment 2]
1152
+ - [Key accomplishment 3]
1153
+ EOF
1154
+ )"
1155
+ ```
1156
+
1157
+ For commit message conventions and git workflow patterns, see ~/.claude/get-shit-done/references/git-integration.md
1158
+ </step>
1159
+
1160
+ <step name="offer_next">
1161
+ **Check workflow config for gate behavior:**
1162
+
1163
+ - If `mode: "yolo"` → auto-continue to next action
1164
+ - If `mode: "interactive"` → prompt user
1165
+
1166
+ **If more plans in this phase:**
1167
+
1168
+ **If auto-approved:**
1169
+
1170
+ ```
1171
+ Plan {phase}-{plan} complete.
1172
+ Summary: .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
1173
+
1174
+ [X] of [Y] plans complete for Phase Z.
1175
+
1176
+ ⚡ Auto-continuing: Execute next plan ({phase}-{next-plan})
1177
+ ```
1178
+
1179
+ Loop back to identify_plan step automatically.
1180
+
1181
+ **If prompting:**
1182
+
1183
+ ```
1184
+ Plan {phase}-{plan} complete.
1185
+ Summary: .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
1186
+
1187
+ [X] of [Y] plans complete for Phase Z.
1188
+
1189
+ What's next?
1190
+ 1. Execute next plan (/gsd:execute-plan .planning/phases/XX-name/{phase}-{next-plan}-PLAN.md)
1191
+ 2. Review what was built
1192
+ 3. Done for now
1193
+ ```
1194
+
1195
+ **If phase complete (last plan done):**
1196
+
1197
+ First, check if this is also the last phase in the milestone (milestone complete):
1198
+
1199
+ ```bash
1200
+ # Count total phases in ROADMAP.md
1201
+ TOTAL_PHASES=$(grep -c "^### Phase [0-9]" .planning/ROADMAP.md)
1202
+
1203
+ # Get current phase number from the just-completed plan
1204
+ CURRENT_PHASE=$(echo "{phase}" | grep -oE '^[0-9]+')
1205
+
1206
+ # Check if current phase == total phases
1207
+ if [[ "$CURRENT_PHASE" -eq "$TOTAL_PHASES" ]]; then
1208
+ # Milestone complete
1209
+ MILESTONE_COMPLETE=true
1210
+ fi
1211
+ ```
1212
+
1213
+ **If milestone complete (final phase of roadmap done):**
1214
+
1215
+ ```
1216
+ 🎉 MILESTONE COMPLETE!
1217
+
1218
+ Plan {phase}-{plan} complete.
1219
+ Summary: .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
1220
+
1221
+ Phase [Z]: [Name] COMPLETE - all [Y] plans finished.
1222
+
1223
+ ════════════════════════════════════════
1224
+ All [N] phases complete!
1225
+ This milestone is 100% done.
1226
+ ════════════════════════════════════════
1227
+
1228
+ What's next?
1229
+ 1. Complete milestone (/gsd:complete-milestone) - Archive and start fresh
1230
+ 2. Add another phase (/gsd:add-phase) - Extend this milestone
1231
+ 3. Review accomplishments - See what was built
1232
+ 4. Done for now
1233
+ ```
1234
+
1235
+ **If phase complete but more phases remain:**
1236
+
1237
+ ```
1238
+ Plan {phase}-{plan} complete.
1239
+ Summary: .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
1240
+
1241
+ Phase [Z]: [Name] COMPLETE - all [Y] plans finished.
1242
+
1243
+ What's next?
1244
+ 1. Discuss Phase [X+1] context (/gsd:discuss-phase [X+1])
1245
+ 2. Plan Phase [X+1] in detail (/gsd:plan-phase [X+1])
1246
+ 3. Review phase accomplishments
1247
+ 4. Done for now
1248
+ ```
1249
+
1250
+ </step>
1251
+
1252
+ </process>
1253
+
1254
+ <success_criteria>
1255
+
1256
+ - All tasks from PLAN.md completed
1257
+ - All verifications pass
1258
+ - SUMMARY.md created with substantive content
1259
+ - STATE.md updated (position, decisions, issues, session)
1260
+ - ROADMAP.md updated
1261
+ </success_criteria>