gsd-opencode 1.3.33 → 1.4.2

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 (67) hide show
  1. package/LICENSE +21 -0
  2. package/command/gsd/add-phase.md +3 -3
  3. package/command/gsd/add-todo.md +182 -0
  4. package/command/gsd/check-todos.md +217 -0
  5. package/command/gsd/complete-milestone.md +4 -3
  6. package/command/gsd/consider-issues.md +5 -5
  7. package/command/gsd/create-roadmap.md +4 -4
  8. package/command/gsd/debug.md +58 -0
  9. package/command/gsd/discuss-phase.md +3 -4
  10. package/command/gsd/execute-phase.md +137 -0
  11. package/command/gsd/execute-plan.md +70 -95
  12. package/command/gsd/help.md +83 -6
  13. package/command/gsd/insert-phase.md +16 -16
  14. package/command/gsd/list-phase-assumptions.md +8 -8
  15. package/command/gsd/map-codebase.md +11 -11
  16. package/command/gsd/new-milestone.md +1 -1
  17. package/command/gsd/new-project.md +26 -7
  18. package/command/gsd/pause-work.md +4 -3
  19. package/command/gsd/plan-fix.md +8 -8
  20. package/command/gsd/plan-phase.md +9 -9
  21. package/command/gsd/progress.md +20 -11
  22. package/command/gsd/remove-phase.md +15 -15
  23. package/command/gsd/research-phase.md +10 -10
  24. package/command/gsd/resume-work.md +4 -5
  25. package/command/gsd/status.md +127 -0
  26. package/command/gsd/verify-work.md +8 -8
  27. package/get-shit-done/references/continuation-format.md +8 -8
  28. package/get-shit-done/references/debugging/debugging-mindset.md +253 -0
  29. package/get-shit-done/references/debugging/hypothesis-testing.md +373 -0
  30. package/get-shit-done/references/debugging/investigation-techniques.md +337 -0
  31. package/get-shit-done/references/debugging/verification-patterns.md +425 -0
  32. package/get-shit-done/references/debugging/when-to-research.md +361 -0
  33. package/get-shit-done/references/plan-format.md +68 -21
  34. package/get-shit-done/references/questioning.md +12 -12
  35. package/get-shit-done/references/research-pitfalls.md +2 -2
  36. package/get-shit-done/references/scope-estimation.md +95 -11
  37. package/get-shit-done/templates/DEBUG.md +159 -0
  38. package/get-shit-done/templates/agent-history.md +263 -0
  39. package/get-shit-done/templates/checkpoint-return.md +204 -0
  40. package/get-shit-done/templates/codebase/architecture.md +4 -4
  41. package/get-shit-done/templates/codebase/concerns.md +1 -1
  42. package/get-shit-done/templates/codebase/structure.md +11 -11
  43. package/get-shit-done/templates/config.json +8 -0
  44. package/get-shit-done/templates/context.md +0 -21
  45. package/get-shit-done/templates/continuation-prompt.md +235 -0
  46. package/get-shit-done/templates/milestone-archive.md +1 -1
  47. package/get-shit-done/templates/phase-prompt.md +289 -129
  48. package/get-shit-done/templates/roadmap.md +1 -1
  49. package/get-shit-done/templates/state.md +11 -0
  50. package/get-shit-done/templates/subagent-task-prompt.md +95 -0
  51. package/get-shit-done/templates/summary.md +2 -2
  52. package/get-shit-done/workflows/_archive/execute-phase.md +899 -0
  53. package/get-shit-done/workflows/complete-milestone.md +1 -1
  54. package/get-shit-done/workflows/create-milestone.md +1 -1
  55. package/get-shit-done/workflows/create-roadmap.md +2 -2
  56. package/get-shit-done/workflows/debug.md +426 -0
  57. package/get-shit-done/workflows/discovery-phase.md +1 -1
  58. package/get-shit-done/workflows/discuss-milestone.md +6 -6
  59. package/get-shit-done/workflows/discuss-phase.md +12 -22
  60. package/get-shit-done/workflows/execute-phase.md +272 -1504
  61. package/get-shit-done/workflows/execute-plan.md +1813 -0
  62. package/get-shit-done/workflows/map-codebase.md +9 -9
  63. package/get-shit-done/workflows/plan-phase.md +262 -49
  64. package/get-shit-done/workflows/resume-project.md +28 -2
  65. package/get-shit-done/workflows/transition.md +4 -4
  66. package/get-shit-done/workflows/verify-work.md +4 -4
  67. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  <purpose>
2
- Orchestrate parallel Explore agents to analyze codebase and produce structured documents in .planning/codebase/
2
+ Orchestrate parallel explore agents to analyze codebase and produce structured documents in .planning/codebase/
3
3
 
4
4
  Each agent has fresh context and focuses on specific aspects. Output is concise and actionable for planning.
5
5
  </purpose>
@@ -69,15 +69,15 @@ Continue to spawn_agents.
69
69
  </step>
70
70
 
71
71
  <step name="spawn_agents">
72
- Spawn 4 parallel Explore agents to analyze codebase.
72
+ Spawn 4 parallel explore agents to analyze codebase.
73
73
 
74
- Use Task tool with `subagent_type="Explore"` and `run_in_background=true` for parallel execution.
74
+ Use Task tool with `subagent_type="explore"` and `run_in_background=true` for parallel execution.
75
75
 
76
76
  **Agent 1: Stack + Integrations (Technology Focus)**
77
77
 
78
78
  Task tool parameters:
79
79
  ```
80
- subagent_type: "Explore"
80
+ subagent_type: "explore"
81
81
  run_in_background: true
82
82
  task_description: "Analyze codebase technology stack and external integrations"
83
83
  ```
@@ -121,7 +121,7 @@ If something is not found, note "Not detected" for that category.
121
121
 
122
122
  Task tool parameters:
123
123
  ```
124
- subagent_type: "Explore"
124
+ subagent_type: "explore"
125
125
  run_in_background: true
126
126
  task_description: "Analyze codebase architecture patterns and directory structure"
127
127
  ```
@@ -164,7 +164,7 @@ If something is not clear, provide best-guess interpretation based on code struc
164
164
 
165
165
  Task tool parameters:
166
166
  ```
167
- subagent_type: "Explore"
167
+ subagent_type: "explore"
168
168
  run_in_background: true
169
169
  task_description: "Analyze coding conventions and test patterns"
170
170
  ```
@@ -208,7 +208,7 @@ Look at actual code files to infer conventions if config files are missing.
208
208
 
209
209
  Task tool parameters:
210
210
  ```
211
- subagent_type: "Explore"
211
+ subagent_type: "explore"
212
212
  run_in_background: true
213
213
  task_description: "Identify technical debt and areas of concern"
214
214
  ```
@@ -405,7 +405,7 @@ Created .planning/codebase/:
405
405
 
406
406
  `/gsd:new-project`
407
407
 
408
- <sub>`/clear` first → fresh context window</sub>
408
+ *`/clear` first → fresh context window*
409
409
 
410
410
  ---
411
411
 
@@ -424,7 +424,7 @@ End workflow.
424
424
 
425
425
  <success_criteria>
426
426
  - .planning/codebase/ directory created
427
- - 4 parallel Explore agents spawned with run_in_background=true
427
+ - 4 parallel explore agents spawned with run_in_background=true
428
428
  - Agent prompts are specific and actionable
429
429
  - TaskOutput used to collect all agent results
430
430
  - All 7 codebase documents written using template filling
@@ -30,10 +30,18 @@ Decimal phases enable urgent work insertion without renumbering:
30
30
  </required_reading>
31
31
 
32
32
  <purpose>
33
- Create an executable phase prompt (PLAN.md). PLAN.md IS the prompt that Claude executes - not a document that gets transformed.
33
+ Create executable phase prompts (PLAN.md files) optimized for parallel execution.
34
+
35
+ PLAN.md IS the prompt that Claude executes. Plans are grouped into execution waves based on dependencies - independent plans run in parallel, dependent plans wait for predecessors.
34
36
  </purpose>
35
37
 
36
38
  <planning_principles>
39
+ **Parallel by default:** Think in dependency graphs, not sequential lists. Ask "what does this need?" not "what comes next?"
40
+
41
+ **Vertical slices over horizontal layers:** Group by feature (User: model + API + UI) not by type (all models → all APIs → all UIs).
42
+
43
+ **Explicit dependencies:** Every plan declares what it needs (`depends_on`) and what it touches (`files_modified`). Empty dependencies = parallel candidate.
44
+
37
45
  **Secure by design:** Assume hostile input on every boundary. Validate, parameterize, authenticate, fail closed.
38
46
 
39
47
  **Performance by design:** Assume production load, not demo conditions. Plan for efficient data access, appropriate caching, minimal round trips.
@@ -233,7 +241,12 @@ cat .planning/phases/XX-name/${PHASE}-CONTEXT.md 2>/dev/null
233
241
  </step>
234
242
 
235
243
  <step name="break_into_tasks">
236
- Decompose phase into tasks and identify TDD candidates.
244
+ Decompose phase into tasks. **Think dependencies first, not sequence.**
245
+
246
+ For each potential task, ask:
247
+ 1. **What does this task NEED?** (files, types, APIs that must exist)
248
+ 2. **What does this task CREATE?** (files, types, APIs others might need)
249
+ 3. **Can this run independently?** (no dependencies = Wave 1 candidate)
237
250
 
238
251
  **Standard tasks need:**
239
252
  - **Type**: auto, checkpoint:human-verify, checkpoint:decision (human-action rarely needed)
@@ -277,8 +290,165 @@ See `~/.config/opencode/get-shit-done/references/tdd.md` for TDD plan structure.
277
290
  See ~/.config/opencode/get-shit-done/references/checkpoints.md for checkpoint structure.
278
291
  </step>
279
292
 
293
+ <step name="build_dependency_graph">
294
+ **Map task dependencies explicitly before grouping into plans.**
295
+
296
+ **1. For each task identified, record:**
297
+ - `needs`: What must exist before this task runs (files, types, prior task outputs)
298
+ - `creates`: What this task produces (files, types, exports)
299
+ - `has_checkpoint`: Does this task require user interaction?
300
+
301
+ **2. Build the dependency graph:**
302
+
303
+ ```
304
+ Example phase with 6 tasks:
305
+
306
+ Task A (User model): needs nothing, creates src/models/user.ts
307
+ Task B (Product model): needs nothing, creates src/models/product.ts
308
+ Task C (User API): needs Task A, creates src/api/users.ts
309
+ Task D (Product API): needs Task B, creates src/api/products.ts
310
+ Task E (Dashboard): needs Task C + D, creates src/components/Dashboard.tsx
311
+ Task F (Verify UI): checkpoint:human-verify, needs Task E
312
+
313
+ Dependency graph:
314
+ A ──→ C ──┐
315
+ ├──→ E ──→ F
316
+ B ──→ D ──┘
317
+
318
+ Wave analysis:
319
+ Wave 1: A, B (independent roots)
320
+ Wave 2: C, D (depend only on Wave 1)
321
+ Wave 3: E (depends on Wave 2)
322
+ Wave 4: F (checkpoint, depends on Wave 3)
323
+ ```
324
+
325
+ **3. Identify parallelization opportunities:**
326
+
327
+ | Pattern | Result |
328
+ |---------|--------|
329
+ | No dependencies | Wave 1 (parallel) |
330
+ | Depends only on Wave 1 | Wave 2 (parallel) |
331
+ | Has checkpoint | Runs in wave, but can pause/resume |
332
+ | Shared file conflict | Must be sequential |
333
+
334
+ **4. Detect and prefer vertical slices:**
335
+
336
+ **Sequential (horizontal layers) - AVOID:**
337
+ ```
338
+ Plan 01: Create User model, Product model, Order model
339
+ Plan 02: Create User API, Product API, Order API
340
+ Plan 03: Create User UI, Product UI, Order UI
341
+ ```
342
+ Result: Fully sequential (02 needs 01, 03 needs 02)
343
+
344
+ **Parallel (vertical slices) - PREFER:**
345
+ ```
346
+ Plan 01: User feature (model + API + UI)
347
+ Plan 02: Product feature (model + API + UI)
348
+ Plan 03: Order feature (model + API + UI)
349
+ ```
350
+ Result: All three can run in parallel (Wave 1)
351
+
352
+ **When vertical slices work:**
353
+ - Features are independent (no shared types/data)
354
+ - Each slice is self-contained
355
+ - No cross-feature dependencies
356
+
357
+ **When horizontal layers are necessary:**
358
+ - Shared foundation required (auth before protected features)
359
+ - Genuine type dependencies (Order needs User type)
360
+ - Infrastructure setup (database before all features)
361
+
362
+ **5. Output: Dependency map for each plan**
363
+
364
+ For each plan, determine:
365
+ - `depends_on: []` - plan IDs this plan requires (empty = parallel candidate)
366
+ - `files_modified: []` - files this plan touches (for conflict detection)
367
+ - `autonomous: true|false` - has checkpoints requiring user interaction?
368
+ </step>
369
+
370
+ <step name="assign_waves">
371
+ **Compute wave numbers before writing plans.**
372
+
373
+ Wave assignment algorithm (run in memory before writing any files):
374
+
375
+ ```
376
+ waves = {} # plan_id -> wave_number
377
+
378
+ for each plan in plan_order:
379
+ if plan.depends_on is empty:
380
+ plan.wave = 1
381
+ else:
382
+ # Wave = max wave of dependencies + 1
383
+ plan.wave = max(waves[dep] for dep in plan.depends_on) + 1
384
+
385
+ waves[plan.id] = plan.wave
386
+ ```
387
+
388
+ **Example:**
389
+
390
+ ```
391
+ Plan 01: depends_on: [] → wave: 1
392
+ Plan 02: depends_on: [] → wave: 1
393
+ Plan 03: depends_on: ["01"] → wave: 2
394
+ Plan 04: depends_on: ["02"] → wave: 2
395
+ Plan 05: depends_on: ["03", "04"] → wave: 3
396
+ ```
397
+
398
+ Store wave number with each plan in memory. Write to frontmatter in next step.
399
+ </step>
400
+
401
+ <step name="group_into_plans">
402
+ **Group tasks into plans based on dependency waves and autonomy.**
403
+
404
+ **Grouping rules:**
405
+
406
+ 1. **Same-wave tasks with no file conflicts → can be in parallel plans**
407
+ 2. **Tasks with shared files → must be in same plan or sequential plans**
408
+ 3. **Checkpoint tasks → mark plan as `autonomous: false`**
409
+ 4. **Each plan: 2-3 tasks max, single concern, ~50% context target**
410
+
411
+ **Plan assignment algorithm:**
412
+
413
+ ```
414
+ 1. Start with Wave 1 tasks (no dependencies)
415
+ 2. Group into plans by:
416
+ - Feature affinity (vertical slice)
417
+ - File ownership (no conflicts)
418
+ - Checkpoint presence (group checkpoints with related auto tasks)
419
+ 3. Move to Wave 2 tasks, repeat
420
+ 4. Continue until all tasks assigned
421
+ ```
422
+
423
+ **Example grouping:**
424
+
425
+ ```
426
+ Tasks identified:
427
+ - A: User model (Wave 1, auto)
428
+ - B: Product model (Wave 1, auto)
429
+ - C: User API (Wave 2, auto)
430
+ - D: Product API (Wave 2, auto)
431
+ - E: Dashboard (Wave 3, auto)
432
+ - F: Verify Dashboard (Wave 3, checkpoint)
433
+
434
+ Grouping into plans:
435
+ Plan 01: [A, C] - User feature (model + API)
436
+ depends_on: [], autonomous: true
437
+
438
+ Plan 02: [B, D] - Product feature (model + API)
439
+ depends_on: [], autonomous: true
440
+
441
+ Plan 03: [E, F] - Dashboard (build + verify)
442
+ depends_on: ["01", "02"], autonomous: false
443
+
444
+ Wave structure:
445
+ Wave 1 (parallel): Plan 01, Plan 02
446
+ Wave 2: Plan 03 (has checkpoint, runs after Wave 1)
447
+ ```
448
+ </step>
449
+
280
450
  <step name="estimate_scope">
281
- After tasks, assess against quality degradation curve.
451
+ After grouping, verify each plan fits context budget.
282
452
 
283
453
  **Check depth setting:**
284
454
  ```bash
@@ -302,8 +472,6 @@ cat .planning/config.json 2>/dev/null | grep depth
302
472
  For comprehensive depth:
303
473
  - Create MORE plans when the work warrants it, not bigger ones
304
474
  - If a phase has 15 tasks, that's 5-8 plans (not 3 plans with 5 tasks each)
305
- - Don't compress to look efficient—thoroughness is the goal
306
- - Let small phases stay small—don't pad to hit a number
307
475
  - Each plan stays focused: 2-3 tasks, single concern
308
476
 
309
477
  For quick depth:
@@ -314,14 +482,8 @@ For quick depth:
314
482
 
315
483
  **ALWAYS split if:** >3 tasks, multiple subsystems, >5 files in any task, complex domains (auth, payments).
316
484
 
317
- **If scope appropriate (2-3 tasks, single subsystem, <5 files/task):** Proceed to confirm_breakdown.
318
-
319
- **If large (>3 tasks):** Split by subsystem, dependency, complexity, or autonomous vs interactive.
320
-
321
485
  **Each plan must be:** 2-3 tasks max, ~50% context target, independently committable.
322
486
 
323
- **Autonomous optimization:** No checkpoints → subagent (fresh context). Has checkpoints → main context. Group autonomous work together.
324
-
325
487
  See ~/.config/opencode/get-shit-done/references/scope-estimation.md for complete guidance.
326
488
  </step>
327
489
 
@@ -331,22 +493,39 @@ Auto-approve and proceed to write_phase_prompt.
331
493
  </if>
332
494
 
333
495
  <if mode="interactive">
334
- Present breakdown inline:
496
+ Present breakdown with wave structure:
335
497
 
336
498
  ```
337
499
  Phase [X] breakdown:
338
500
 
339
- ### Tasks ({phase}-01-PLAN.md)
340
- 1. [Task] - [brief] [type]
341
- 2. [Task] - [brief] [type]
501
+ ## Execution Waves
502
+
503
+ **Wave 1 (parallel):**
504
+ {phase}-01: [Plan Name] [autonomous]
505
+ - Task: [brief]
506
+ - Task: [brief]
507
+
508
+ {phase}-02: [Plan Name] [autonomous]
509
+ - Task: [brief]
510
+ - Task: [brief]
342
511
 
343
- Autonomous: [yes/no]
512
+ **Wave 2 (parallel):**
513
+ {phase}-03: [Plan Name] (depends: 01, 02) [autonomous]
514
+ - Task: [brief]
515
+
516
+ **Wave 3:**
517
+ {phase}-04: [Plan Name] (depends: 03) [has checkpoint]
518
+ - Task: [brief]
519
+ - Checkpoint: [type]
520
+
521
+ ---
522
+ Total: [N] plans in [M] waves
523
+ Parallel plans: [X]
524
+ Sequential plans: [Y]
344
525
 
345
526
  Does this look right? (yes / adjust / start over)
346
527
  ```
347
528
 
348
- For multiple plans, show each plan with its tasks.
349
-
350
529
  Wait for confirmation. If "adjust": revise. If "start over": return to gather_phase_context.
351
530
  </if>
352
531
  </step>
@@ -359,16 +538,33 @@ Use template from `~/.config/opencode/get-shit-done/templates/phase-prompt.md`.
359
538
  **Multiple plans:** Write separate files ({phase}-01-PLAN.md, {phase}-02-PLAN.md, etc.)
360
539
 
361
540
  Each plan follows template structure with:
362
- - Frontmatter (phase, plan, type, domain)
541
+ - Frontmatter (phase, plan, type, depends_on, files_modified, autonomous, domain)
363
542
  - Objective (plan-specific goal, purpose, output)
364
- - Execution context (execute-phase.md, summary template, checkpoints.md if needed)
365
- - Context (@references to PROJECT, ROADMAP, STATE, codebase docs, RESEARCH/DISCOVERY/CONTEXT if exist, prior summaries, source files, prior decisions, deferred issues, concerns)
543
+ - Execution context (execute-plan.md, summary template, checkpoints.md if needed)
544
+ - Context (@references to PROJECT, ROADMAP, STATE, codebase docs, RESEARCH/DISCOVERY/CONTEXT if exist, prior summaries, source files)
366
545
  - Tasks (XML format with types)
367
546
  - Verification, Success criteria, Output specification
368
547
 
369
- **Context section population from frontmatter analysis:**
548
+ **Plan frontmatter:**
549
+
550
+ ```yaml
551
+ ---
552
+ phase: XX-name
553
+ plan: NN
554
+ type: execute
555
+ wave: N # Execution wave (1, 2, 3...). Computed at plan time.
556
+ depends_on: [] # Plan IDs this plan requires.
557
+ files_modified: [] # Files this plan touches.
558
+ autonomous: true # false if plan has checkpoints requiring user interaction
559
+ domain: [optional]
560
+ ---
561
+ ```
562
+
563
+ **Wave is pre-computed:** Wave numbers are assigned during planning (see `assign_waves` step). `/gsd:execute-phase` reads `wave` directly from frontmatter and groups plans by wave number. No runtime dependency analysis needed.
370
564
 
371
- Inject automatically-assembled context package from read_project_history step:
565
+ **Context section - parallel-aware:**
566
+
567
+ Only include prior plan SUMMARY references if this plan genuinely needs decisions/outputs:
372
568
 
373
569
  ```markdown
374
570
  <context>
@@ -376,27 +572,30 @@ Inject automatically-assembled context package from read_project_history step:
376
572
  @.planning/ROADMAP.md
377
573
  @.planning/STATE.md
378
574
 
379
- # Auto-selected based on dependency graph (from frontmatter):
380
- @.planning/phases/XX-name/YY-ZZ-SUMMARY.md
381
- @.planning/phases/AA-name/BB-CC-SUMMARY.md
382
-
383
- # Key files from frontmatter (relevant to this phase):
384
- @path/to/important/file.ts
385
- @path/to/another/file.ts
386
-
387
- **Tech stack available:** [extracted from frontmatter tech-stack.added]
388
- **Established patterns:** [extracted from frontmatter patterns-established]
389
- **Constraining decisions:**
390
- - [Phase X]: [decision from frontmatter]
391
- - [Phase Y]: [decision from frontmatter]
575
+ # Only reference prior plans if genuinely needed:
576
+ # - This plan uses types/exports from prior plan
577
+ # - This plan continues work from prior plan
578
+ # - Prior plan made decision that affects this plan
579
+ #
580
+ # Do NOT reflexively chain: Plan 02 refs 01, Plan 03 refs 02...
581
+ # Independent plans need no prior SUMMARY references.
392
582
 
393
- **Issues being addressed:** [If any from ISSUES.md]
583
+ @path/to/relevant/source.ts
394
584
  </context>
395
585
  ```
396
586
 
397
- This ensures every PLAN.md gets optimal context automatically assembled via dependency graph, making execution as informed as possible.
587
+ **For plans with checkpoints:**
398
588
 
399
- For multi-plan phases: each plan has focused scope, references previous plan summaries (via frontmatter selection), last plan's success criteria includes "Phase X complete".
589
+ Include checkpoint reference in execution_context:
590
+ ```markdown
591
+ <execution_context>
592
+ @~/.config/opencode/get-shit-done/workflows/execute-plan.md
593
+ @~/.config/opencode/get-shit-done/templates/summary.md
594
+ @~/.config/opencode/get-shit-done/references/checkpoints.md
595
+ </execution_context>
596
+ ```
597
+
598
+ Checkpoint plans can still run in parallel waves. When they hit a checkpoint, they pause and return to the orchestrator. User responds, orchestrator resumes the agent.
400
599
  </step>
401
600
 
402
601
  <step name="git_commit">
@@ -413,8 +612,8 @@ git commit -m "$(cat <<'EOF'
413
612
  docs(${PHASE}): create phase plan
414
613
 
415
614
  Phase ${PHASE}: ${PHASE_NAME}
416
- - [N] plan(s) created
417
- - [X] total tasks defined
615
+ - [N] plan(s) in [M] wave(s)
616
+ - [X] parallel, [Y] sequential
418
617
  - Ready for execution
419
618
  EOF
420
619
  )"
@@ -425,24 +624,35 @@ Confirm: "Committed: docs(${PHASE}): create phase plan"
425
624
 
426
625
  <step name="offer_next">
427
626
  ```
428
- Phase plan created: .planning/phases/XX-name/{phase}-01-PLAN.md
429
- [X] tasks defined.
627
+ Phase {X} planned: {N} plan(s) in {M} wave(s)
628
+
629
+ ## Wave Structure
630
+ Wave 1 (parallel): {plan-01}, {plan-02}
631
+ Wave 2: {plan-03}
632
+ ...
430
633
 
431
634
  ---
432
635
 
433
636
  ## Next Up
434
637
 
638
+ [If 1 plan created:]
435
639
  **{phase}-01: [Plan Name]** - [objective summary]
436
640
 
437
641
  `/gsd:execute-plan .planning/phases/XX-name/{phase}-01-PLAN.md`
438
642
 
439
- <sub>`/clear` first - fresh context window</sub>
643
+ [If 2+ plans created:]
644
+ **Phase {X}: [Phase Name]** - {N} plans in {M} waves
645
+
646
+ `/gsd:execute-phase {X}`
647
+
648
+ *`/clear` first - fresh context window*
440
649
 
441
650
  ---
442
651
 
443
652
  **Also available:**
444
- - Review/adjust tasks before executing
445
- [If multiple plans: - View all plans: `ls .planning/phases/XX-name/*-PLAN.md`]
653
+ - Review/adjust plans before executing
654
+ [If 2+ plans: - `/gsd:execute-plan {phase}-01-PLAN.md` - run plans one at a time]
655
+ [If 2+ plans: - View all plans: `ls .planning/phases/XX-name/*-PLAN.md`]
446
656
 
447
657
  ---
448
658
  ```
@@ -468,6 +678,7 @@ If you can't specify Files + Action + Verify + Done, the task is too vague.
468
678
  - No team assignments
469
679
  - No acceptance criteria committees
470
680
  - No sub-sub-sub tasks
681
+ - **No reflexive sequential chaining** (Plan 02 depends on 01 "just because")
471
682
  Tasks are instructions for Claude, not Jira tickets.
472
683
  </anti_patterns>
473
684
 
@@ -476,13 +687,15 @@ Phase planning complete when:
476
687
  - [ ] STATE.md read, project history absorbed
477
688
  - [ ] Mandatory discovery completed (Level 0-3)
478
689
  - [ ] Prior decisions, issues, concerns synthesized
690
+ - [ ] Dependency graph built (needs/creates for each task)
691
+ - [ ] Tasks grouped into plans by wave, not by sequence
479
692
  - [ ] PLAN file(s) exist with XML structure
693
+ - [ ] Each plan: depends_on, files_modified, autonomous in frontmatter
480
694
  - [ ] Each plan: Objective, context, tasks, verification, success criteria, output
481
- - [ ] @context references included (STATE, RESEARCH/DISCOVERY if exist, relevant summaries)
482
695
  - [ ] Each plan: 2-3 tasks (~50% context)
483
696
  - [ ] Each task: Type, Files (if auto), Action, Verify, Done
484
697
  - [ ] Checkpoints properly structured
485
- - [ ] If RESEARCH.md exists: "don't hand-roll" items NOT being custom-built
698
+ - [ ] Wave structure maximizes parallelism
486
699
  - [ ] PLAN file(s) committed to git
487
- - [ ] User knows next steps
700
+ - [ ] User knows next steps and wave structure
488
701
  </success_criteria>
@@ -69,6 +69,12 @@ for plan in .planning/phases/*/*-PLAN.md; do
69
69
  summary="${plan/PLAN/SUMMARY}"
70
70
  [ ! -f "$summary" ] && echo "Incomplete: $plan"
71
71
  done 2>/dev/null
72
+
73
+ # Check for interrupted agents
74
+ if [ -f .planning/current-agent-id.txt ] && [ -s .planning/current-agent-id.txt ]; then
75
+ AGENT_ID=$(cat .planning/current-agent-id.txt | tr -d '\n')
76
+ echo "Interrupted agent: $AGENT_ID"
77
+ fi
72
78
  ```
73
79
 
74
80
  **If .continue-here file exists:**
@@ -81,6 +87,12 @@ done 2>/dev/null
81
87
 
82
88
  - Execution was started but not completed
83
89
  - Flag: "Found incomplete plan execution"
90
+
91
+ **If interrupted agent found:**
92
+
93
+ - Subagent was spawned but session ended before completion
94
+ - Read agent-history.json for task details
95
+ - Flag: "Found interrupted agent"
84
96
  </step>
85
97
 
86
98
  <step name="present_status">
@@ -103,6 +115,14 @@ Present complete project status to user:
103
115
  ⚠️ Incomplete work detected:
104
116
  - [.continue-here file or incomplete plan]
105
117
 
118
+ [If interrupted agent found:]
119
+ ⚠️ Interrupted agent detected:
120
+ Agent ID: [id]
121
+ Task: [task description from agent-history.json]
122
+ Interrupted: [timestamp]
123
+
124
+ Resume with: /gsd:resume-task
125
+
106
126
  [If deferred issues exist:]
107
127
  📋 [N] deferred issues awaiting attention
108
128
 
@@ -120,6 +140,10 @@ Present complete project status to user:
120
140
  <step name="determine_next_action">
121
141
  Based on project state, determine the most logical next action:
122
142
 
143
+ **If interrupted agent exists:**
144
+ → Primary: Resume interrupted agent (/gsd:resume-task)
145
+ → Option: Start fresh (abandon agent work)
146
+
123
147
  **If .continue-here file exists:**
124
148
  → Primary: Resume from checkpoint
125
149
  → Option: Start fresh on current plan
@@ -154,6 +178,8 @@ Present contextual options based on project state:
154
178
  What would you like to do?
155
179
 
156
180
  [Primary action based on state - e.g.:]
181
+ 1. Resume interrupted agent (/gsd:resume-task) [if interrupted agent found]
182
+ OR
157
183
  1. Resume from checkpoint (/gsd:execute-plan .planning/phases/XX-name/.continue-here-02-01.md)
158
184
  OR
159
185
  1. Execute next plan (/gsd:execute-plan .planning/phases/XX-name/02-02-PLAN.md)
@@ -193,7 +219,7 @@ Based on user selection, route to appropriate workflow:
193
219
 
194
220
  `/gsd:execute-plan [path]`
195
221
 
196
- <sub>`/clear` first → fresh context window</sub>
222
+ *`/clear` first → fresh context window*
197
223
 
198
224
  ---
199
225
  ```
@@ -207,7 +233,7 @@ Based on user selection, route to appropriate workflow:
207
233
 
208
234
  `/gsd:plan-phase [phase-number]`
209
235
 
210
- <sub>`/clear` first → fresh context window</sub>
236
+ *`/clear` first → fresh context window*
211
237
 
212
238
  ---
213
239
 
@@ -449,7 +449,7 @@ Next: Phase [X+1] — [Name]
449
449
  ⚡ Auto-continuing: Plan Phase [X+1] in detail
450
450
  ```
451
451
 
452
- Exit skill and invoke SlashCommand("/gsd:plan-phase [X+1]")
452
+ Exit skill and invoke [removed - use /command syntax]("/gsd:plan-phase [X+1]")
453
453
 
454
454
  </if>
455
455
 
@@ -466,7 +466,7 @@ Exit skill and invoke SlashCommand("/gsd:plan-phase [X+1]")
466
466
 
467
467
  `/gsd:plan-phase [X+1]`
468
468
 
469
- <sub>`/clear` first → fresh context window</sub>
469
+ *`/clear` first → fresh context window*
470
470
 
471
471
  ---
472
472
 
@@ -494,7 +494,7 @@ Phase {X} marked complete.
494
494
  ⚡ Auto-continuing: Complete milestone and archive
495
495
  ```
496
496
 
497
- Exit skill and invoke SlashCommand("/gsd:complete-milestone {version}")
497
+ Exit skill and invoke [removed - use /command syntax]("/gsd:complete-milestone {version}")
498
498
 
499
499
  </if>
500
500
 
@@ -513,7 +513,7 @@ Exit skill and invoke SlashCommand("/gsd:complete-milestone {version}")
513
513
 
514
514
  `/gsd:complete-milestone {version}`
515
515
 
516
- <sub>`/clear` first → fresh context window</sub>
516
+ *`/clear` first → fresh context window*
517
517
 
518
518
  ---
519
519
 
@@ -81,7 +81,7 @@ Present this checklist to user.
81
81
  <step name="guide">
82
82
  **Guide user through each test:**
83
83
 
84
- For each test item, use AskUserQuestion:
84
+ For each test item, use question:
85
85
  - header: "[Feature name]"
86
86
  - question: "[Test description] - Did this work as expected?"
87
87
  - options:
@@ -93,7 +93,7 @@ For each test item, use AskUserQuestion:
93
93
  **If Pass:** Move to next test
94
94
 
95
95
  **If Fail or Partial:**
96
- Follow up with AskUserQuestion:
96
+ Follow up with question:
97
97
  - header: "Issue details"
98
98
  - question: "What went wrong?"
99
99
  - options:
@@ -172,7 +172,7 @@ If any issues found:
172
172
  <step name="offer">
173
173
  **Offer next actions based on results:**
174
174
 
175
- Use AskUserQuestion:
175
+ Use question:
176
176
  - header: "Next"
177
177
  - question: "What would you like to do?"
178
178
  - options (based on results):
@@ -194,7 +194,7 @@ If issues found:
194
194
  <success_criteria>
195
195
  - [ ] Test scope identified from SUMMARY.md
196
196
  - [ ] Checklist generated based on deliverables
197
- - [ ] User guided through each test via AskUserQuestion
197
+ - [ ] User guided through each test via question
198
198
  - [ ] All test results captured (pass/fail/partial/skip)
199
199
  - [ ] Any issues logged to phase-scoped ISSUES.md
200
200
  - [ ] Summary presented with verdict
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gsd-opencode",
3
- "version": "1.3.33",
3
+ "version": "1.4.2",
4
4
  "description": "A meta-prompting, context engineering and spec-driven development system for OpenCode by TÂCHES.",
5
5
  "keywords": [
6
6
  "opencode",