gsd-opencode 1.30.0 → 1.33.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 (112) hide show
  1. package/agents/gsd-debugger.md +0 -1
  2. package/agents/gsd-doc-verifier.md +207 -0
  3. package/agents/gsd-doc-writer.md +608 -0
  4. package/agents/gsd-executor.md +22 -1
  5. package/agents/gsd-phase-researcher.md +41 -0
  6. package/agents/gsd-plan-checker.md +82 -0
  7. package/agents/gsd-planner.md +123 -194
  8. package/agents/gsd-security-auditor.md +129 -0
  9. package/agents/gsd-ui-auditor.md +40 -0
  10. package/agents/gsd-user-profiler.md +2 -2
  11. package/agents/gsd-verifier.md +84 -18
  12. package/commands/gsd/gsd-add-backlog.md +1 -1
  13. package/commands/gsd/gsd-analyze-dependencies.md +34 -0
  14. package/commands/gsd/gsd-autonomous.md +6 -2
  15. package/commands/gsd/gsd-cleanup.md +5 -0
  16. package/commands/gsd/gsd-debug.md +24 -21
  17. package/commands/gsd/gsd-discuss-phase.md +7 -2
  18. package/commands/gsd/gsd-docs-update.md +48 -0
  19. package/commands/gsd/gsd-execute-phase.md +4 -0
  20. package/commands/gsd/gsd-help.md +2 -0
  21. package/commands/gsd/gsd-join-discord.md +2 -1
  22. package/commands/gsd/gsd-manager.md +1 -0
  23. package/commands/gsd/gsd-new-project.md +4 -0
  24. package/commands/gsd/gsd-plan-phase.md +5 -0
  25. package/commands/gsd/gsd-quick.md +5 -3
  26. package/commands/gsd/gsd-reapply-patches.md +171 -39
  27. package/commands/gsd/gsd-research-phase.md +2 -12
  28. package/commands/gsd/gsd-review-backlog.md +1 -0
  29. package/commands/gsd/gsd-review.md +3 -2
  30. package/commands/gsd/gsd-secure-phase.md +35 -0
  31. package/commands/gsd/gsd-thread.md +1 -1
  32. package/commands/gsd/gsd-workstreams.md +7 -2
  33. package/get-shit-done/bin/gsd-tools.cjs +42 -8
  34. package/get-shit-done/bin/lib/commands.cjs +68 -14
  35. package/get-shit-done/bin/lib/config.cjs +18 -10
  36. package/get-shit-done/bin/lib/core.cjs +383 -80
  37. package/get-shit-done/bin/lib/docs.cjs +267 -0
  38. package/get-shit-done/bin/lib/frontmatter.cjs +47 -2
  39. package/get-shit-done/bin/lib/init.cjs +85 -5
  40. package/get-shit-done/bin/lib/milestone.cjs +21 -0
  41. package/get-shit-done/bin/lib/model-profiles.cjs +2 -0
  42. package/get-shit-done/bin/lib/phase.cjs +232 -189
  43. package/get-shit-done/bin/lib/profile-output.cjs +97 -1
  44. package/get-shit-done/bin/lib/roadmap.cjs +137 -113
  45. package/get-shit-done/bin/lib/schema-detect.cjs +238 -0
  46. package/get-shit-done/bin/lib/security.cjs +5 -3
  47. package/get-shit-done/bin/lib/state.cjs +366 -44
  48. package/get-shit-done/bin/lib/verify.cjs +158 -14
  49. package/get-shit-done/bin/lib/workstream.cjs +6 -2
  50. package/get-shit-done/references/agent-contracts.md +79 -0
  51. package/get-shit-done/references/artifact-types.md +113 -0
  52. package/get-shit-done/references/context-budget.md +49 -0
  53. package/get-shit-done/references/continuation-format.md +15 -15
  54. package/get-shit-done/references/domain-probes.md +125 -0
  55. package/get-shit-done/references/gate-prompts.md +100 -0
  56. package/get-shit-done/references/model-profiles.md +2 -2
  57. package/get-shit-done/references/planner-gap-closure.md +62 -0
  58. package/get-shit-done/references/planner-reviews.md +39 -0
  59. package/get-shit-done/references/planner-revision.md +87 -0
  60. package/get-shit-done/references/planning-config.md +15 -0
  61. package/get-shit-done/references/revision-loop.md +97 -0
  62. package/get-shit-done/references/ui-brand.md +2 -2
  63. package/get-shit-done/references/universal-anti-patterns.md +58 -0
  64. package/get-shit-done/references/workstream-flag.md +56 -3
  65. package/get-shit-done/templates/SECURITY.md +61 -0
  66. package/get-shit-done/templates/VALIDATION.md +3 -3
  67. package/get-shit-done/templates/claude-md.md +27 -4
  68. package/get-shit-done/templates/config.json +4 -0
  69. package/get-shit-done/templates/debug-subagent-prompt.md +2 -6
  70. package/get-shit-done/templates/planner-subagent-prompt.md +2 -10
  71. package/get-shit-done/workflows/add-phase.md +2 -2
  72. package/get-shit-done/workflows/add-todo.md +1 -1
  73. package/get-shit-done/workflows/analyze-dependencies.md +96 -0
  74. package/get-shit-done/workflows/audit-milestone.md +8 -12
  75. package/get-shit-done/workflows/autonomous.md +158 -13
  76. package/get-shit-done/workflows/check-todos.md +2 -2
  77. package/get-shit-done/workflows/complete-milestone.md +13 -4
  78. package/get-shit-done/workflows/diagnose-issues.md +8 -6
  79. package/get-shit-done/workflows/discovery-phase.md +1 -1
  80. package/get-shit-done/workflows/discuss-phase-assumptions.md +22 -4
  81. package/get-shit-done/workflows/discuss-phase-power.md +291 -0
  82. package/get-shit-done/workflows/discuss-phase.md +149 -11
  83. package/get-shit-done/workflows/docs-update.md +1093 -0
  84. package/get-shit-done/workflows/execute-phase.md +362 -66
  85. package/get-shit-done/workflows/execute-plan.md +1 -1
  86. package/get-shit-done/workflows/help.md +9 -6
  87. package/get-shit-done/workflows/insert-phase.md +2 -2
  88. package/get-shit-done/workflows/manager.md +27 -26
  89. package/get-shit-done/workflows/map-codebase.md +10 -32
  90. package/get-shit-done/workflows/new-milestone.md +14 -8
  91. package/get-shit-done/workflows/new-project.md +48 -25
  92. package/get-shit-done/workflows/next.md +1 -1
  93. package/get-shit-done/workflows/note.md +1 -1
  94. package/get-shit-done/workflows/pause-work.md +73 -10
  95. package/get-shit-done/workflows/plan-milestone-gaps.md +2 -2
  96. package/get-shit-done/workflows/plan-phase.md +184 -32
  97. package/get-shit-done/workflows/progress.md +20 -20
  98. package/get-shit-done/workflows/quick.md +102 -84
  99. package/get-shit-done/workflows/research-phase.md +2 -6
  100. package/get-shit-done/workflows/resume-project.md +4 -4
  101. package/get-shit-done/workflows/review.md +56 -3
  102. package/get-shit-done/workflows/secure-phase.md +154 -0
  103. package/get-shit-done/workflows/settings.md +13 -2
  104. package/get-shit-done/workflows/ship.md +13 -4
  105. package/get-shit-done/workflows/transition.md +6 -6
  106. package/get-shit-done/workflows/ui-phase.md +4 -14
  107. package/get-shit-done/workflows/ui-review.md +25 -7
  108. package/get-shit-done/workflows/update.md +165 -16
  109. package/get-shit-done/workflows/validate-phase.md +1 -11
  110. package/get-shit-done/workflows/verify-phase.md +127 -6
  111. package/get-shit-done/workflows/verify-work.md +69 -21
  112. package/package.json +1 -1
@@ -92,6 +92,46 @@ This gate runs unconditionally on every audit. The .gitignore ensures screenshot
92
92
 
93
93
  </gitignore_gate>
94
94
 
95
+ <playwright_mcp_approach>
96
+
97
+ ## Automated Screenshot Capture via Playwright-MCP (preferred when available)
98
+
99
+ Before attempting the CLI screenshot approach, check whether `mcp__playwright__*`
100
+ tools are available in this session. If they are, use them instead of the CLI approach:
101
+
102
+ ```
103
+ # Preferred: Playwright-MCP automated verification
104
+ # 1. Navigate to the component URL
105
+ mcp__playwright__navigate(url="http://localhost:3000")
106
+
107
+ # 2. Take desktop screenshot
108
+ mcp__playwright__screenshot(name="desktop", width=1440, height=900)
109
+
110
+ # 3. Take mobile screenshot
111
+ mcp__playwright__screenshot(name="mobile", width=375, height=812)
112
+
113
+ # 4. For specific components listed in UI-SPEC.md, navigate to each
114
+ # component route and capture targeted screenshots for comparison
115
+ # against the spec's stated dimensions, colors, and layout.
116
+
117
+ # 5. Compare screenshots against UI-SPEC.md requirements:
118
+ # - Dimensions: Is component X width 70vw as specified?
119
+ # - Color: Is the accent color applied only on declared elements?
120
+ # - Layout: Are spacing values within the declared spacing scale?
121
+ # Report any visual discrepancies as automated findings.
122
+ ```
123
+
124
+ **When Playwright-MCP is available:**
125
+ - Use it for all screenshot capture (skip the CLI approach below)
126
+ - Each UI checkpoint from UI-SPEC.md can be verified automatically
127
+ - Discrepancies are reported as pillar findings with screenshot evidence
128
+ - Items requiring subjective judgment are flagged as `needs_human_review: true`
129
+
130
+ **When Playwright-MCP is NOT available:** fall back to the CLI screenshot approach
131
+ below. Behavior is unchanged from the standard code-only audit path.
132
+
133
+ </playwright_mcp_approach>
134
+
95
135
  <screenshot_approach>
96
136
 
97
137
  ## Screenshot Capture (CLI only — no MCP, no persistent browser)
@@ -40,7 +40,7 @@ Key characteristics of the input:
40
40
  </input>
41
41
 
42
42
  <reference>
43
- @get-shit-done/references/user-profiling.md
43
+ @$HOME/.config/opencode/get-shit-done/references/user-profiling.md
44
44
 
45
45
  This is the detection heuristics rubric. read it in full before analyzing any messages. It defines:
46
46
  - The 8 dimensions and their rating spectrums
@@ -54,7 +54,7 @@ This is the detection heuristics rubric. read it in full before analyzing any me
54
54
  <process>
55
55
 
56
56
  <step name="load_rubric">
57
- read the user-profiling reference document at `get-shit-done/references/user-profiling.md` to load:
57
+ read the user-profiling reference document at `$HOME/.config/opencode/get-shit-done/references/user-profiling.md` to load:
58
58
  - All 8 dimension definitions with rating spectrums
59
59
  - Signal patterns and detection heuristics per dimension
60
60
  - Confidence scoring thresholds (HIGH: 10+ signals across 2+ projects, MEDIUM: 5-9, LOW: <5, UNSCORED: 0)
@@ -94,13 +94,21 @@ Extract phase goal from ROADMAP.md — this is the outcome to verify, not the ta
94
94
 
95
95
  In re-verification mode, must-haves come from Step 0.
96
96
 
97
- **Option A: Must-haves in PLAN frontmatter**
97
+ **Step 2a: Always load ROADMAP Success Criteria**
98
+
99
+ ```bash
100
+ PHASE_DATA=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" roadmap get-phase "$PHASE_NUM" --raw)
101
+ ```
102
+
103
+ Parse the `success_criteria` array from the JSON output. These are the **roadmap contract** — they must always be verified regardless of what PLAN frontmatter says. Store them as `roadmap_truths`.
104
+
105
+ **Step 2b: Load PLAN frontmatter must-haves (if present)**
98
106
 
99
107
  ```bash
100
108
  grep -l "must_haves:" "$PHASE_DIR"/*-PLAN.md 2>/dev/null
101
109
  ```
102
110
 
103
- If found, extract and use:
111
+ If found, extract:
104
112
 
105
113
  ```yaml
106
114
  must_haves:
@@ -116,25 +124,20 @@ must_haves:
116
124
  via: "fetch in useEffect"
117
125
  ```
118
126
 
119
- **Option B: Use Success Criteria from ROADMAP.md**
127
+ **Step 2c: Merge must-haves**
120
128
 
121
- If no must_haves in frontmatter, check for Success Criteria:
129
+ Combine all sources into a single must-haves list:
122
130
 
123
- ```bash
124
- PHASE_DATA=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" roadmap get-phase "$PHASE_NUM" --raw)
125
- ```
131
+ 1. **Start with `roadmap_truths`** from Step 2a (these are non-negotiable)
132
+ 2. **Merge PLAN frontmatter truths** from Step 2b (these add plan-specific detail)
133
+ 3. **Deduplicate:** If a PLAN truth clearly restates a roadmap SC, keep the roadmap SC wording (it's the contract)
134
+ 4. **If neither 2a nor 2b produced any truths**, fall back to Option C below
126
135
 
127
- Parse the `success_criteria` array from the JSON output. If non-empty:
128
- 1. **Use each Success Criterion directly as a truth** (they are already observable, testable behaviors)
129
- 2. **Derive artifacts:** For each truth, "What must EXIST?" — map to concrete file paths
130
- 3. **Derive key links:** For each artifact, "What must be CONNECTED?" — this is where stubs hide
131
- 4. **Document must-haves** before proceeding
132
-
133
- Success Criteria from ROADMAP.md are the contract — they take priority over Goal-derived truths.
136
+ **CRITICAL:** PLAN frontmatter must-haves must NOT reduce scope. If ROADMAP.md defines 5 Success Criteria but the plan only lists 3 in must_haves, all 5 must still be verified. The plan can ADD must-haves but never subtract roadmap SCs.
134
137
 
135
138
  **Option C: Derive from phase goal (fallback)**
136
139
 
137
- If no must_haves in frontmatter AND no Success Criteria in ROADMAP:
140
+ If no Success Criteria in ROADMAP AND no must_haves in frontmatter:
138
141
 
139
142
  1. **State the goal** from ROADMAP.md
140
143
  2. **Derive truths:** "What must be TRUE?" — list 3-7 observable, testable behaviors
@@ -448,16 +451,53 @@ npm test -- --grep "$PHASE_TEST_PATTERN" 2>&1 | grep -q "passing"
448
451
 
449
452
  ## Step 9: Determine Overall Status
450
453
 
451
- **Status: passed** All truths VERIFIED, all artifacts pass levels 1-3, all key links WIRED, no blocker anti-patterns.
454
+ Classify status using this decision tree IN ORDER (most restrictive first):
455
+
456
+ 1. IF any truth FAILED, artifact MISSING/STUB, key link NOT_WIRED, or blocker anti-pattern found:
457
+ → **status: gaps_found**
452
458
 
453
- **Status: gaps_found** One or more truths FAILED, artifacts MISSING/STUB, key links NOT_WIRED, or blocker anti-patterns found.
459
+ 2. IF Step 8 produced ANY human verification items (section is non-empty):
460
+ → **status: human_needed**
461
+ (Even if all truths are VERIFIED and score is N/N — human items take priority)
454
462
 
455
- **Status: human_needed** All automated checks pass but items flagged for human verification.
463
+ 3. IF all truths VERIFIED, all artifacts pass, all links WIRED, no blockers, AND no human verification items:
464
+ → **status: passed**
465
+
466
+ **passed is ONLY valid when the human verification section is empty.** If you identified items requiring human testing in Step 8, status MUST be human_needed.
456
467
 
457
468
  **Score:** `verified_truths / total_truths`
458
469
 
470
+ ## Step 9b: Filter Deferred Items
471
+
472
+ Before reporting gaps, check if any identified gaps are explicitly addressed in later phases of the current milestone. This prevents false-positive gap reports for items intentionally scheduled for future work.
473
+
474
+ **Load the full milestone roadmap:**
475
+
476
+ ```bash
477
+ ROADMAP_DATA=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" roadmap analyze --raw)
478
+ ```
479
+
480
+ Parse the JSON to extract all phases. Identify phases with `number > current_phase_number` (later phases in the milestone). For each later phase, extract its `goal` and `success_criteria`.
481
+
482
+ **For each potential gap identified in Step 9:**
483
+
484
+ 1. Check if the gap's failed truth or missing item is covered by a later phase's goal or success criteria
485
+ 2. **Match criteria:** The gap's concern appears in a later phase's goal text, success criteria text, or the later phase's name clearly suggests it covers this area of work
486
+ 3. If a match is found → move the gap to the `deferred` list, recording which phase addresses it and the matching evidence (goal text or success criterion)
487
+ 4. If the gap does not match any later phase → keep it as a real `gap`
488
+
489
+ **Important:** Be conservative when matching. Only defer a gap when there is clear, specific evidence in a later phase's roadmap section. Vague or tangential matches should NOT cause a gap to be deferred — when in doubt, keep it as a real gap.
490
+
491
+ **Deferred items do NOT affect the status determination.** After filtering, recalculate:
492
+
493
+ - If the gaps list is now empty and no human verification items exist → `passed`
494
+ - If the gaps list is now empty but human verification items exist → `human_needed`
495
+ - If the gaps list still has items → `gaps_found`
496
+
459
497
  ## Step 10: Structure Gap Output (If Gaps Found)
460
498
 
499
+ Before writing VERIFICATION.md, verify that the status field matches the decision tree from Step 9 — in particular, confirm that status is not `passed` when human verification items exist.
500
+
461
501
  Structure gaps in YAML frontmatter for `/gsd-plan-phase --gaps`:
462
502
 
463
503
  ```yaml
@@ -478,6 +518,17 @@ gaps:
478
518
  - `artifacts`: Files with issues
479
519
  - `missing`: Specific things to add/fix
480
520
 
521
+ If Step 9b identified deferred items, add a `deferred` section after `gaps`:
522
+
523
+ ```yaml
524
+ deferred: # Items addressed in later phases — not actionable gaps
525
+ - truth: "Observable truth not yet met"
526
+ addressed_in: "Phase 5"
527
+ evidence: "Phase 5 success criteria: 'Implement RuntimeConfigC FFI bindings'"
528
+ ```
529
+
530
+ Deferred items are informational only — they do not require closure plans.
531
+
481
532
  **Group related gaps by concern** — if multiple truths fail from the same root cause, note this to help the planner create focused plans.
482
533
 
483
534
  </verification_process>
@@ -512,6 +563,10 @@ gaps: # Only if status: gaps_found
512
563
  issue: "What's wrong"
513
564
  missing:
514
565
  - "Specific thing to add/fix"
566
+ deferred: # Only if deferred items exist (Step 9b)
567
+ - truth: "Observable truth addressed in a later phase"
568
+ addressed_in: "Phase N"
569
+ evidence: "Matching goal or success criteria text"
515
570
  human_verification: # Only if status: human_needed
516
571
  - test: "What to do"
517
572
  expected: "What should happen"
@@ -536,6 +591,15 @@ human_verification: # Only if status: human_needed
536
591
 
537
592
  **Score:** {N}/{M} truths verified
538
593
 
594
+ ### Deferred Items
595
+
596
+ Items not yet met but explicitly addressed in later milestone phases.
597
+ Only include this section if deferred items exist (from Step 9b).
598
+
599
+ | # | Item | Addressed In | Evidence |
600
+ |---|------|-------------|----------|
601
+ | 1 | {truth} | Phase {N} | {matching goal or success criteria} |
602
+
539
603
  ### Required Artifacts
540
604
 
541
605
  | Artifact | Expected | Status | Details |
@@ -699,7 +763,9 @@ return <div>No messages</div> // Always shows "no messages"
699
763
  - [ ] Behavioral spot-checks run on runnable code (or skipped with reason)
700
764
  - [ ] Human verification items identified
701
765
  - [ ] Overall status determined
766
+ - [ ] Deferred items filtered against later milestone phases (Step 9b)
702
767
  - [ ] Gaps structured in YAML frontmatter (if gaps_found)
768
+ - [ ] Deferred items structured in YAML frontmatter (if deferred items exist)
703
769
  - [ ] Re-verification metadata included (if previous existed)
704
770
  - [ ] VERIFICATION.md created with complete report
705
771
  - [ ] Results returned to orchestrator (NOT committed)
@@ -29,7 +29,7 @@ the normal phase sequence and accumulate context over time.
29
29
 
30
30
  3. **Create the phase directory:**
31
31
  ```bash
32
- SLUG=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" generate-slug "$ARGUMENTS")
32
+ SLUG=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" generate-slug "$ARGUMENTS" --raw)
33
33
  mkdir -p ".planning/phases/${NEXT}-${SLUG}"
34
34
  touch ".planning/phases/${NEXT}-${SLUG}/.gitkeep"
35
35
  ```
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: gsd-analyze-dependencies
3
+ description: Analyze phase dependencies and suggest Depends on entries for ROADMAP.md
4
+ permissions:
5
+ read: true
6
+ write: true
7
+ bash: true
8
+ glob: true
9
+ grep: true
10
+ question: true
11
+ ---
12
+ <objective>
13
+ Analyze the phase dependency graph for the current milestone. For each phase pair, determine if there is a dependency relationship based on:
14
+ - File overlap (phases that modify the same files must be ordered)
15
+ - Semantic dependencies (a phase that uses an API built by another phase)
16
+ - Data flow (a phase that consumes output from another phase)
17
+
18
+ Then suggest `Depends on` updates to ROADMAP.md.
19
+ </objective>
20
+
21
+ <execution_context>
22
+ @$HOME/.config/opencode/get-shit-done/workflows/analyze-dependencies.md
23
+ </execution_context>
24
+
25
+ <context>
26
+ No arguments required. Requires an active milestone with ROADMAP.md.
27
+
28
+ Run this command BEFORE `/gsd-manager` to fill in missing `Depends on` fields and prevent merge conflicts from unordered parallel execution.
29
+ </context>
30
+
31
+ <process>
32
+ Execute the analyze-dependencies workflow from @$HOME/.config/opencode/get-shit-done/workflows/analyze-dependencies.md end-to-end.
33
+ Present dependency suggestions clearly and apply confirmed updates to ROADMAP.md.
34
+ </process>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: gsd-autonomous
3
3
  description: Run all remaining phases autonomously — discuss→plan→execute per phase
4
- argument-hint: "[--from N]"
4
+ argument-hint: "[--from N] [--to N] [--only N] [--interactive]"
5
5
  permissions:
6
6
  read: true
7
7
  write: true
@@ -30,7 +30,11 @@ Uses ROADMAP.md phase discovery and skill() flat invocations for each phase comm
30
30
  </execution_context>
31
31
 
32
32
  <context>
33
- Optional flag: `--from N` — start from phase N instead of the first incomplete phase.
33
+ Optional flags:
34
+ - `--from N` — start from phase N instead of the first incomplete phase.
35
+ - `--to N` — stop after phase N completes (halt instead of advancing to next phase).
36
+ - `--only N` — execute only phase N (single-phase mode).
37
+ - `--interactive` — run discuss inline with questions (not auto-answered), then dispatch plan→execute as background agents. Keeps the main context lean while preserving user input on decisions.
34
38
 
35
39
  Project context, phase list, and state are resolved inside the workflow using init commands (`gsd-tools.cjs init milestone-op`, `gsd-tools.cjs roadmap analyze`). No upfront context loading needed.
36
40
  </context>
@@ -1,6 +1,11 @@
1
1
  ---
2
2
  name: gsd-cleanup
3
3
  description: Archive accumulated phase directories from completed milestones
4
+ permissions:
5
+ read: true
6
+ write: true
7
+ bash: true
8
+ question: true
4
9
  ---
5
10
  <objective>
6
11
  Archive phase directories from completed milestones into `.planning/milestones/v{X.Y}-phases/`.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: gsd-debug
3
3
  description: Systematic debugging with persistent state across context resets
4
- argument-hint: [issue description]
4
+ argument-hint: [--diagnose] [issue description]
5
5
  permissions:
6
6
  read: true
7
7
  bash: true
@@ -15,6 +15,9 @@ Debug issues using scientific method with subagent isolation.
15
15
  **Orchestrator role:** Gather symptoms, spawn gsd-debugger agent, handle checkpoints, spawn continuations.
16
16
 
17
17
  **Why subagent:** Investigation burns context fast (reading files, forming hypotheses, testing). Fresh 200k context per investigation. Main context stays lean for user interaction.
18
+
19
+ **Flags:**
20
+ - `--diagnose` — Diagnose only. Find root cause without applying a fix. Returns a structured Root Cause Report. Use when you want to validate the diagnosis before committing to a fix.
18
21
  </objective>
19
22
 
20
23
  <available_agent_types>
@@ -25,6 +28,10 @@ Valid GSD subagent types (use exact names — do not fall back to 'general'):
25
28
  <context>
26
29
  User's issue: $ARGUMENTS
27
30
 
31
+ Parse flags from $ARGUMENTS:
32
+ - If `--diagnose` is present, set `diagnose_only=true` and remove the flag from the issue description.
33
+ - Otherwise, `diagnose_only=false`.
34
+
28
35
  Check for active sessions:
29
36
  ```bash
30
37
  ls .planning/debug/*.md 2>/dev/null | grep -v resolved | head -5
@@ -87,7 +94,7 @@ timeline: {timeline}
87
94
 
88
95
  <mode>
89
96
  symptoms_prefilled: true
90
- goal: find_and_fix
97
+ goal: {if diagnose_only: "find_root_cause_only", else: "find_and_fix"}
91
98
  </mode>
92
99
 
93
100
  <debug_file>
@@ -96,22 +103,23 @@ Create: .planning/debug/{slug}.md
96
103
  ```
97
104
 
98
105
  ```
99
- task(
100
- prompt=filled_prompt,
101
- subagent_type="gsd-debugger",
102
- model="{debugger_model}",
103
- description="Debug {slug}"
104
- )
106
+ @gsd-debugger filled_prompt
105
107
  ```
106
108
 
107
109
  ## 4. Handle Agent Return
108
110
 
109
- **If `## ROOT CAUSE FOUND`:**
110
- - Display root cause and evidence summary
111
+ **If `## ROOT CAUSE FOUND` (diagnose-only mode):**
112
+ - Display root cause, confidence level, files involved, and suggested fix strategies
113
+ - Offer options:
114
+ - "Fix now" — spawn a continuation agent with `goal: find_and_fix` to apply the fix (see step 5)
115
+ - "Plan fix" — suggest `/gsd-plan-phase --gaps`
116
+ - "Manual fix" — done
117
+
118
+ **If `## DEBUG COMPLETE` (find_and_fix mode):**
119
+ - Display root cause and fix summary
111
120
  - Offer options:
112
- - "Fix now" - spawn fix subagent
113
- - "Plan fix" - suggest /gsd-plan-phase --gaps
114
- - "Manual fix" - done
121
+ - "Plan fix" — suggest `/gsd-plan-phase --gaps` if further work needed
122
+ - "Done" mark resolved
115
123
 
116
124
  **If `## CHECKPOINT REACHED`:**
117
125
  - Present checkpoint details to user
@@ -128,9 +136,9 @@ task(
128
136
  - "Manual investigation" - done
129
137
  - "Add more context" - gather more symptoms, spawn again
130
138
 
131
- ## 5. Spawn Continuation Agent (After Checkpoint)
139
+ ## 5. Spawn Continuation Agent (After Checkpoint or "Fix now")
132
140
 
133
- When user responds to checkpoint, spawn fresh agent:
141
+ When user responds to checkpoint OR selects "Fix now" from diagnose-only results, spawn fresh agent:
134
142
 
135
143
  ```markdown
136
144
  <objective>
@@ -154,12 +162,7 @@ goal: find_and_fix
154
162
  ```
155
163
 
156
164
  ```
157
- task(
158
- prompt=continuation_prompt,
159
- subagent_type="gsd-debugger",
160
- model="{debugger_model}",
161
- description="Continue debug {slug}"
162
- )
165
+ @gsd-debugger continuation_prompt
163
166
  ```
164
167
 
165
168
  </process>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: gsd-discuss-phase
3
- description: Gather phase context through adaptive questioning before planning. Use --auto to skip interactive questions (OpenCode picks recommended defaults).
4
- argument-hint: "<phase> [--auto] [--batch] [--analyze] [--text]"
3
+ description: Gather phase context through adaptive questioning before planning. Use --auto to skip interactive questions (OpenCode picks recommended defaults). Use --chain for interactive discuss followed by automatic plan+execute. Use --power for bulk question generation into a file-based UI (answer at your own pace).
4
+ argument-hint: "<phase> [--auto] [--chain] [--batch] [--analyze] [--text] [--power]"
5
5
  permissions:
6
6
  read: true
7
7
  write: true
@@ -31,9 +31,14 @@ Extract implementation decisions that downstream agents need — researcher and
31
31
  <execution_context>
32
32
  @$HOME/.config/opencode/get-shit-done/workflows/discuss-phase.md
33
33
  @$HOME/.config/opencode/get-shit-done/workflows/discuss-phase-assumptions.md
34
+ @$HOME/.config/opencode/get-shit-done/workflows/discuss-phase-power.md
34
35
  @$HOME/.config/opencode/get-shit-done/templates/context.md
35
36
  </execution_context>
36
37
 
38
+ <runtime_note>
39
+ **Copilot (VS Code):** Use `vscode_askquestions` wherever this workflow calls `question`. They are equivalent — `vscode_askquestions` is the VS Code Copilot implementation of the same interactive question API.
40
+ </runtime_note>
41
+
37
42
  <context>
38
43
  Phase number: $ARGUMENTS (required)
39
44
 
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: gsd-docs-update
3
+ description: Generate or update project documentation verified against the codebase
4
+ argument-hint: "[--force] [--verify-only]"
5
+ permissions:
6
+ read: true
7
+ write: true
8
+ edit: true
9
+ bash: true
10
+ glob: true
11
+ grep: true
12
+ task: true
13
+ question: true
14
+ ---
15
+ <objective>
16
+ Generate and update up to 9 documentation files for the current project. Each doc type is written by a gsd-doc-writer subagent that explores the codebase directly — no hallucinated paths, phantom endpoints, or stale signatures.
17
+
18
+ Flag handling rule:
19
+ - The optional flags documented below are available behaviors, not implied active behaviors
20
+ - A flag is active only when its literal token appears in `$ARGUMENTS`
21
+ - If a documented flag is absent from `$ARGUMENTS`, treat it as inactive
22
+ - `--force`: skip preservation prompts, regenerate all docs regardless of existing content or GSD markers
23
+ - `--verify-only`: check existing docs for accuracy against codebase, no generation (full verification requires Phase 4 verifier)
24
+ - If `--force` and `--verify-only` both appear in `$ARGUMENTS`, `--force` takes precedence
25
+ </objective>
26
+
27
+ <execution_context>
28
+ @$HOME/.config/opencode/get-shit-done/workflows/docs-update.md
29
+ </execution_context>
30
+
31
+ <context>
32
+ Arguments: $ARGUMENTS
33
+
34
+ **Available optional flags (documentation only — not automatically active):**
35
+ - `--force` — Regenerate all docs. Overwrites hand-written and GSD docs alike. No preservation prompts.
36
+ - `--verify-only` — Check existing docs for accuracy against the codebase. No files are written. Reports VERIFY marker count. Full codebase fact-checking requires the gsd-doc-verifier agent (Phase 4).
37
+
38
+ **Active flags must be derived from `$ARGUMENTS`:**
39
+ - `--force` is active only if the literal `--force` token is present in `$ARGUMENTS`
40
+ - `--verify-only` is active only if the literal `--verify-only` token is present in `$ARGUMENTS`
41
+ - If neither token appears, run the standard full-phase generation flow
42
+ - Do not infer that a flag is active just because it is documented in this prompt
43
+ </context>
44
+
45
+ <process>
46
+ Execute the docs-update workflow from @$HOME/.config/opencode/get-shit-done/workflows/docs-update.md end-to-end.
47
+ Preserve all workflow gates (preservation_check, flag handling, wave execution, monorepo dispatch, commit, reporting).
48
+ </process>
@@ -35,6 +35,10 @@ Context budget: ~15% orchestrator, 100% fresh per subagent.
35
35
  @$HOME/.config/opencode/get-shit-done/references/ui-brand.md
36
36
  </execution_context>
37
37
 
38
+ <runtime_note>
39
+ **Copilot (VS Code):** Use `vscode_askquestions` wherever this workflow calls `question`. They are equivalent — `vscode_askquestions` is the VS Code Copilot implementation of the same interactive question API.
40
+ </runtime_note>
41
+
38
42
  <context>
39
43
  Phase: $ARGUMENTS
40
44
 
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: gsd-help
3
3
  description: Show available GSD commands and usage guide
4
+ permissions:
5
+ read: true
4
6
  ---
5
7
  <objective>
6
8
  Display the complete GSD command reference.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: gsd-join-discord
3
3
  description: Join the GSD Discord community
4
+ permissions: []
4
5
  ---
5
6
 
6
7
  <objective>
@@ -12,7 +13,7 @@ Display the Discord invite link for the GSD community server.
12
13
 
13
14
  Connect with other GSD users, get help, share what you're building, and stay updated.
14
15
 
15
- **Invite link:** https://discord.gg/gsd
16
+ **Invite link:** https://discord.gg/mYgfVNfA2r
16
17
 
17
18
  Click the link or paste it into your browser to join.
18
19
  </output>
@@ -8,6 +8,7 @@ permissions:
8
8
  glob: true
9
9
  grep: true
10
10
  question: true
11
+ - skill
11
12
  task: true
12
13
  ---
13
14
  <objective>
@@ -9,6 +9,10 @@ permissions:
9
9
  task: true
10
10
  question: true
11
11
  ---
12
+ <runtime_note>
13
+ **Copilot (VS Code):** Use `vscode_askquestions` wherever this workflow calls `question`. They are equivalent — `vscode_askquestions` is the VS Code Copilot implementation of the same interactive question API.
14
+ </runtime_note>
15
+
12
16
  <context>
13
17
  **Flags:**
14
18
  - `--auto` — Automatic mode. After config questions, runs research → requirements → roadmap without further interaction. Expects idea document via @ reference.
@@ -10,6 +10,7 @@ permissions:
10
10
  glob: true
11
11
  grep: true
12
12
  task: true
13
+ question: true
13
14
  webfetch: true
14
15
  mcp__context7__*: true
15
16
  ---
@@ -26,6 +27,10 @@ Create executable phase prompts (PLAN.md files) for a roadmap phase with integra
26
27
  @$HOME/.config/opencode/get-shit-done/references/ui-brand.md
27
28
  </execution_context>
28
29
 
30
+ <runtime_note>
31
+ **Copilot (VS Code):** Use `vscode_askquestions` wherever this workflow calls `question`. They are equivalent — `vscode_askquestions` is the VS Code Copilot implementation of the same interactive question API. Do not skip questioning steps because `question` appears unavailable; use `vscode_askquestions` instead.
32
+ </runtime_note>
33
+
29
34
  <context>
30
35
  Phase number: $ARGUMENTS (optional — auto-detects next unplanned phase if omitted)
31
36
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: gsd-quick
3
3
  description: Execute a quick task with GSD guarantees (atomic commits, state tracking) but skip optional agents
4
- argument-hint: "[--full] [--discuss] [--research]"
4
+ argument-hint: "[--full] [--validate] [--discuss] [--research]"
5
5
  permissions:
6
6
  read: true
7
7
  write: true
@@ -24,11 +24,13 @@ Quick mode is the same system with a shorter path:
24
24
 
25
25
  **`--discuss` flag:** Lightweight discussion phase before planning. Surfaces assumptions, clarifies gray areas, captures decisions in CONTEXT.md. Use when the task has ambiguity worth resolving upfront.
26
26
 
27
- **`--full` flag:** Enables plan-checking (max 2 iterations) and post-execution verification. Use when you want quality guarantees without full milestone ceremony.
27
+ **`--full` flag:** Enables the complete quality pipeline discussion + research + plan-checking + verification. One flag for everything.
28
+
29
+ **`--validate` flag:** Enables plan-checking (max 2 iterations) and post-execution verification only. Use when you want quality guarantees without discussion or research.
28
30
 
29
31
  **`--research` flag:** Spawns a focused research agent before planning. Investigates implementation approaches, library options, and pitfalls for the task. Use when you're unsure of the best approach.
30
32
 
31
- Flags are composable: `--discuss --research --full` gives discussion + research + plan-checking + verification.
33
+ Granular flags are composable: `--discuss --research --validate` gives the same result as `--full`.
32
34
  </objective>
33
35
 
34
36
  <execution_context>