gsd-opencode 1.10.2 → 1.20.1

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 (164) hide show
  1. package/agents/gsd-codebase-mapper.md +29 -3
  2. package/agents/gsd-debugger.md +19 -21
  3. package/agents/gsd-executor.md +213 -528
  4. package/agents/gsd-integration-checker.md +20 -0
  5. package/agents/gsd-phase-researcher.md +189 -267
  6. package/agents/gsd-plan-checker.md +278 -279
  7. package/agents/gsd-planner.md +299 -490
  8. package/agents/gsd-project-researcher.md +103 -345
  9. package/agents/gsd-research-synthesizer.md +5 -22
  10. package/agents/gsd-roadmapper.md +43 -6
  11. package/agents/gsd-verifier.md +158 -377
  12. package/{lib → bin/dm/lib}/constants.js +10 -3
  13. package/{src → bin/dm/src}/commands/install.js +5 -4
  14. package/{src → bin/dm/src}/commands/uninstall.js +3 -1
  15. package/{src → bin/dm/src}/services/backup-manager.js +1 -1
  16. package/{src → bin/dm/src}/services/config.js +1 -1
  17. package/{src → bin/dm/src}/services/file-ops.js +20 -4
  18. package/{src → bin/dm/src}/services/health-checker.js +3 -1
  19. package/{src → bin/dm/src}/services/repair-service.js +3 -1
  20. package/{src → bin/dm/src}/services/settings.js +1 -1
  21. package/{src → bin/dm/src}/services/update-service.js +2 -2
  22. package/bin/gsd-install.js +0 -0
  23. package/bin/gsd.js +9 -9
  24. package/commands/gsd/gsd-add-phase.md +43 -0
  25. package/commands/gsd/gsd-add-todo.md +47 -0
  26. package/commands/gsd/gsd-audit-milestone.md +36 -0
  27. package/commands/gsd/gsd-check-todos.md +45 -0
  28. package/commands/gsd/gsd-cleanup.md +18 -0
  29. package/commands/gsd/{complete-milestone.md → gsd-complete-milestone.md} +1 -1
  30. package/commands/gsd/{debug.md → gsd-debug.md} +16 -21
  31. package/commands/gsd/{discuss-phase.md → gsd-discuss-phase.md} +6 -9
  32. package/commands/gsd/gsd-execute-phase.md +41 -0
  33. package/commands/gsd/gsd-health.md +22 -0
  34. package/commands/gsd/gsd-help.md +22 -0
  35. package/commands/gsd/gsd-insert-phase.md +32 -0
  36. package/commands/gsd/gsd-join-discord.md +18 -0
  37. package/commands/gsd/{list-phase-assumptions.md → gsd-list-phase-assumptions.md} +3 -7
  38. package/commands/gsd/{map-codebase.md → gsd-map-codebase.md} +3 -3
  39. package/commands/gsd/gsd-new-milestone.md +44 -0
  40. package/commands/gsd/gsd-new-project.md +42 -0
  41. package/commands/gsd/gsd-pause-work.md +38 -0
  42. package/commands/gsd/gsd-plan-milestone-gaps.md +34 -0
  43. package/commands/gsd/gsd-plan-phase.md +44 -0
  44. package/commands/gsd/gsd-progress.md +24 -0
  45. package/commands/gsd/gsd-quick.md +41 -0
  46. package/commands/gsd/gsd-reapply-patches.md +119 -0
  47. package/commands/gsd/gsd-remove-phase.md +31 -0
  48. package/commands/gsd/{research-phase.md → gsd-research-phase.md} +38 -49
  49. package/commands/gsd/{resume-work.md → gsd-resume-work.md} +2 -2
  50. package/commands/gsd/gsd-set-profile.md +34 -0
  51. package/commands/gsd/gsd-settings.md +36 -0
  52. package/commands/gsd/gsd-update.md +37 -0
  53. package/commands/gsd/gsd-verify-work.md +38 -0
  54. package/get-shit-done/bin/gsd-tools.cjs +553 -0
  55. package/get-shit-done/bin/gsd-tools.test.cjs +2346 -0
  56. package/get-shit-done/bin/lib/commands.cjs +556 -0
  57. package/get-shit-done/bin/lib/config.cjs +162 -0
  58. package/get-shit-done/bin/lib/core.cjs +377 -0
  59. package/get-shit-done/bin/lib/frontmatter.cjs +299 -0
  60. package/get-shit-done/bin/lib/init.cjs +694 -0
  61. package/get-shit-done/bin/lib/milestone.cjs +215 -0
  62. package/get-shit-done/bin/lib/phase.cjs +877 -0
  63. package/get-shit-done/bin/lib/roadmap.cjs +298 -0
  64. package/get-shit-done/bin/lib/state.cjs +490 -0
  65. package/get-shit-done/bin/lib/template.cjs +222 -0
  66. package/get-shit-done/bin/lib/verify.cjs +772 -0
  67. package/get-shit-done/references/checkpoints.md +62 -364
  68. package/get-shit-done/references/decimal-phase-calculation.md +65 -0
  69. package/get-shit-done/references/git-integration.md +10 -16
  70. package/get-shit-done/references/git-planning-commit.md +38 -0
  71. package/get-shit-done/references/model-profile-resolution.md +34 -0
  72. package/get-shit-done/references/model-profiles.md +54 -66
  73. package/get-shit-done/references/phase-argument-parsing.md +61 -0
  74. package/get-shit-done/references/planning-config.md +112 -10
  75. package/get-shit-done/references/questioning.md +4 -0
  76. package/get-shit-done/references/ui-brand.md +1 -1
  77. package/get-shit-done/templates/UAT.md +1 -1
  78. package/get-shit-done/templates/VALIDATION.md +104 -0
  79. package/get-shit-done/templates/codebase/structure.md +6 -6
  80. package/get-shit-done/templates/config.json +37 -0
  81. package/get-shit-done/templates/context.md +2 -10
  82. package/get-shit-done/templates/continue-here.md +6 -6
  83. package/get-shit-done/templates/debug-subagent-prompt.md +2 -2
  84. package/get-shit-done/templates/discovery.md +6 -6
  85. package/get-shit-done/templates/milestone-archive.md +3 -3
  86. package/get-shit-done/templates/phase-prompt.md +9 -7
  87. package/get-shit-done/templates/planner-subagent-prompt.md +6 -6
  88. package/get-shit-done/templates/research-project/ARCHITECTURE.md +1 -1
  89. package/get-shit-done/templates/research.md +29 -6
  90. package/get-shit-done/templates/roadmap.md +1 -1
  91. package/get-shit-done/templates/state.md +0 -30
  92. package/get-shit-done/templates/summary-complex.md +59 -0
  93. package/get-shit-done/templates/summary-minimal.md +41 -0
  94. package/get-shit-done/templates/summary-standard.md +48 -0
  95. package/get-shit-done/templates/summary.md +16 -37
  96. package/get-shit-done/templates/user-setup.md +1 -13
  97. package/get-shit-done/templates/verification-report.md +5 -5
  98. package/get-shit-done/workflows/add-phase.md +111 -0
  99. package/{commands/gsd → get-shit-done/workflows}/add-todo.md +24 -60
  100. package/{commands/gsd → get-shit-done/workflows}/audit-milestone.md +83 -63
  101. package/{commands/gsd → get-shit-done/workflows}/check-todos.md +21 -73
  102. package/get-shit-done/workflows/cleanup.md +152 -0
  103. package/get-shit-done/workflows/complete-milestone.md +251 -312
  104. package/get-shit-done/workflows/diagnose-issues.md +6 -31
  105. package/get-shit-done/workflows/discovery-phase.md +11 -11
  106. package/get-shit-done/workflows/discuss-phase.md +156 -49
  107. package/get-shit-done/workflows/execute-phase.md +238 -396
  108. package/get-shit-done/workflows/execute-plan.md +180 -1609
  109. package/get-shit-done/workflows/health.md +156 -0
  110. package/{commands/gsd → get-shit-done/workflows}/help.md +33 -35
  111. package/get-shit-done/workflows/insert-phase.md +129 -0
  112. package/get-shit-done/workflows/list-phase-assumptions.md +3 -3
  113. package/get-shit-done/workflows/map-codebase.md +73 -80
  114. package/get-shit-done/workflows/new-milestone.md +382 -0
  115. package/{commands/gsd → get-shit-done/workflows}/new-project.md +281 -234
  116. package/get-shit-done/workflows/oc-set-profile.md +320 -0
  117. package/{commands/gsd → get-shit-done/workflows}/pause-work.md +31 -43
  118. package/{commands/gsd → get-shit-done/workflows}/plan-milestone-gaps.md +29 -50
  119. package/get-shit-done/workflows/plan-phase.md +478 -0
  120. package/{commands/gsd → get-shit-done/workflows}/progress.md +64 -47
  121. package/get-shit-done/workflows/quick.md +453 -0
  122. package/get-shit-done/workflows/remove-phase.md +154 -0
  123. package/get-shit-done/workflows/research-phase.md +73 -0
  124. package/get-shit-done/workflows/resume-project.md +17 -26
  125. package/get-shit-done/workflows/set-profile.md +80 -0
  126. package/get-shit-done/workflows/settings.md +213 -0
  127. package/get-shit-done/workflows/transition.md +84 -104
  128. package/{commands/gsd → get-shit-done/workflows}/update.md +70 -28
  129. package/get-shit-done/workflows/verify-phase.md +106 -492
  130. package/get-shit-done/workflows/verify-work.md +26 -53
  131. package/package.json +7 -4
  132. package/rules/gsd-oc-work-hard.md +36 -0
  133. package/skills/gsd-oc-select-model/SKILL.md +348 -0
  134. package/skills/gsd-oc-select-model/scripts/select-models.cjs +268 -0
  135. package/agents/gsd-set-model.md +0 -287
  136. package/agents/gsd-set-profile.md +0 -239
  137. package/agents/gsd-settings.md +0 -749
  138. package/bin/install.js +0 -323
  139. package/commands/gsd/add-phase.md +0 -207
  140. package/commands/gsd/execute-phase.md +0 -339
  141. package/commands/gsd/insert-phase.md +0 -227
  142. package/commands/gsd/new-milestone.md +0 -721
  143. package/commands/gsd/plan-phase.md +0 -525
  144. package/commands/gsd/quick.md +0 -309
  145. package/commands/gsd/remove-phase.md +0 -349
  146. package/commands/gsd/set-model.md +0 -77
  147. package/commands/gsd/set-profile.md +0 -46
  148. package/commands/gsd/settings.md +0 -33
  149. package/commands/gsd/verify-work.md +0 -219
  150. package/commands/gsd/whats-new.md +0 -124
  151. /package/{src → bin/dm/src}/commands/check.js +0 -0
  152. /package/{src → bin/dm/src}/commands/config.js +0 -0
  153. /package/{src → bin/dm/src}/commands/list.js +0 -0
  154. /package/{src → bin/dm/src}/commands/repair.js +0 -0
  155. /package/{src → bin/dm/src}/commands/update.js +0 -0
  156. /package/{src → bin/dm/src}/services/manifest-manager.js +0 -0
  157. /package/{src → bin/dm/src}/services/migration-service.js +0 -0
  158. /package/{src → bin/dm/src}/services/scope-manager.js +0 -0
  159. /package/{src → bin/dm/src}/services/structure-detector.js +0 -0
  160. /package/{src → bin/dm/src}/utils/hash.js +0 -0
  161. /package/{src → bin/dm/src}/utils/interactive.js +0 -0
  162. /package/{src → bin/dm/src}/utils/logger.js +0 -0
  163. /package/{src → bin/dm/src}/utils/npm-registry.js +0 -0
  164. /package/{src → bin/dm/src}/utils/path-resolver.js +0 -0
@@ -7,10 +7,7 @@ Use this workflow when:
7
7
  </trigger>
8
8
 
9
9
  <purpose>
10
- Instantly restore full project context and present clear status.
11
- Enables seamless session continuity for fully autonomous workflows.
12
-
13
- "Where were we?" should have an immediate, complete answer.
10
+ Instantly restore full project context so "Where were we?" has an immediate, complete answer.
14
11
  </purpose>
15
12
 
16
13
  <required_reading>
@@ -19,18 +16,18 @@ Enables seamless session continuity for fully autonomous workflows.
19
16
 
20
17
  <process>
21
18
 
22
- <step name="detect_existing_project">
23
- Check if this is an existing project:
19
+ <step name="initialize">
20
+ Load all context in one call:
24
21
 
25
22
  ```bash
26
- ls .planning/STATE.md 2>/dev/null && echo "Project exists"
27
- ls .planning/ROADMAP.md 2>/dev/null && echo "Roadmap exists"
28
- ls .planning/PROJECT.md 2>/dev/null && echo "Project file exists"
23
+ INIT=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs init resume)
29
24
  ```
30
25
 
31
- **If STATE.md exists:** Proceed to load_state
32
- **If only ROADMAP.md/PROJECT.md exist:** Offer to reconstruct STATE.md
33
- **If .planning/ doesn't exist:** This is a new project - route to /gsd-new-project
26
+ Parse JSON for: `state_exists`, `roadmap_exists`, `project_exists`, `planning_exists`, `has_interrupted_agent`, `interrupted_agent_id`, `commit_docs`.
27
+
28
+ **If `state_exists` is true:** Proceed to load_state
29
+ **If `state_exists` is false but `roadmap_exists` or `project_exists` is true:** Offer to reconstruct STATE.md
30
+ **If `planning_exists` is false:** This is a new project - route to /gsd-new-project
34
31
  </step>
35
32
 
36
33
  <step name="load_state">
@@ -74,10 +71,9 @@ for plan in .planning/phases/*/*-PLAN.md; do
74
71
  [ ! -f "$summary" ] && echo "Incomplete: $plan"
75
72
  done 2>/dev/null
76
73
 
77
- # Check for interrupted agents
78
- if [ -f .planning/current-agent-id.txt ] && [ -s .planning/current-agent-id.txt ]; then
79
- AGENT_ID=$(cat .planning/current-agent-id.txt | tr -d '\n')
80
- echo "Interrupted agent: $AGENT_ID"
74
+ # Check for interrupted agents (use has_interrupted_agent and interrupted_agent_id from init)
75
+ if [ "$has_interrupted_agent" = "true" ]; then
76
+ echo "Interrupted agent: $interrupted_agent_id"
81
77
  fi
82
78
  ```
83
79
 
@@ -122,10 +118,10 @@ Present complete project status to user:
122
118
  [If interrupted agent found:]
123
119
  ⚠️ Interrupted agent detected:
124
120
  Agent ID: [id]
125
- Task: [task description from agent-history.json]
121
+ task: [task description from agent-history.json]
126
122
  Interrupted: [timestamp]
127
123
 
128
- Resume with: Task tool (resume parameter with agent ID)
124
+ Resume with: task tool (resume parameter with agent ID)
129
125
 
130
126
  [If pending todos exist:]
131
127
  📋 [N] pending todos — /gsd-check-todos to review
@@ -145,7 +141,7 @@ Present complete project status to user:
145
141
  Based on project state, determine the most logical next action:
146
142
 
147
143
  **If interrupted agent exists:**
148
- → Primary: Resume interrupted agent (Task tool with resume parameter)
144
+ → Primary: Resume interrupted agent (task tool with resume parameter)
149
145
  → Option: Start fresh (abandon agent work)
150
146
 
151
147
  **If .continue-here file exists:**
@@ -200,7 +196,7 @@ What would you like to do?
200
196
  **Note:** When offering phase planning, check for CONTEXT.md existence first:
201
197
 
202
198
  ```bash
203
- ls .planning/phases/XX-name/CONTEXT.md 2>/dev/null
199
+ ls .planning/phases/XX-name/*-CONTEXT.md 2>/dev/null
204
200
  ```
205
201
 
206
202
  If missing, suggest discuss-phase before plan. If exists, offer plan directly.
@@ -290,17 +286,12 @@ This handles cases where:
290
286
  </reconstruction>
291
287
 
292
288
  <quick_resume>
293
- For users who want minimal friction:
294
-
295
- If user says just "continue" or "go":
296
-
289
+ If user says "continue" or "go":
297
290
  - Load state silently
298
291
  - Determine primary action
299
292
  - Execute immediately without presenting options
300
293
 
301
294
  "Continuing from [state]... [action]"
302
-
303
- This enables fully autonomous "just keep going" workflow.
304
295
  </quick_resume>
305
296
 
306
297
  <success_criteria>
@@ -0,0 +1,80 @@
1
+ <purpose>
2
+ Switch the model profile used by GSD agents. Controls which OpenCode model each agent uses, balancing quality vs token spend.
3
+ </purpose>
4
+
5
+ <required_reading>
6
+ read all files referenced by the invoking prompt's execution_context before starting.
7
+ </required_reading>
8
+
9
+ <process>
10
+
11
+ <step name="validate">
12
+ Validate argument:
13
+
14
+ ```
15
+ if $ARGUMENTS.profile not in ["quality", "balanced", "budget"]:
16
+ Error: Invalid profile "$ARGUMENTS.profile"
17
+ Valid profiles: quality, balanced, budget
18
+ EXIT
19
+ ```
20
+ </step>
21
+
22
+ <step name="ensure_and_load_config">
23
+ Ensure config exists and load current state:
24
+
25
+ ```bash
26
+ node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs config-ensure-section
27
+ INIT=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs state load)
28
+ ```
29
+
30
+ This creates `.planning/config.json` with defaults if missing and loads current config.
31
+ </step>
32
+
33
+ <step name="update_config">
34
+ read current config from state load or directly:
35
+
36
+ Update `model_profile` field:
37
+ ```json
38
+ {
39
+ "model_profile": "$ARGUMENTS.profile"
40
+ }
41
+ ```
42
+
43
+ write updated config back to `.planning/config.json`.
44
+ </step>
45
+
46
+ <step name="confirm">
47
+ Display confirmation with model table for selected profile:
48
+
49
+ ```
50
+ ✓ Model profile set to: $ARGUMENTS.profile
51
+
52
+ Agents will now use:
53
+
54
+ [Show table from MODEL_PROFILES in gsd-tools.cjs for selected profile]
55
+
56
+ Example:
57
+ | Agent | Model |
58
+ |-------|-------|
59
+ | gsd-planner | opus |
60
+ | gsd-executor | sonnet |
61
+ | gsd-verifier | haiku |
62
+ | ... | ... |
63
+
64
+ Next spawned agents will use the new profile.
65
+ ```
66
+
67
+ Map profile names:
68
+ - quality: use "quality" column from MODEL_PROFILES
69
+ - balanced: use "balanced" column from MODEL_PROFILES
70
+ - budget: use "budget" column from MODEL_PROFILES
71
+ </step>
72
+
73
+ </process>
74
+
75
+ <success_criteria>
76
+ - [ ] Argument validated
77
+ - [ ] Config file ensured
78
+ - [ ] Config updated with new model_profile
79
+ - [ ] Confirmation displayed with model table
80
+ </success_criteria>
@@ -0,0 +1,213 @@
1
+ <purpose>
2
+ Interactive configuration of GSD workflow agents (research, plan_check, verifier) and model profile selection via multi-question prompt. Updates .planning/config.json with user preferences. Optionally saves settings as global defaults (~/.gsd/defaults.json) for future projects.
3
+ </purpose>
4
+
5
+ <required_reading>
6
+ read all files referenced by the invoking prompt's execution_context before starting.
7
+ </required_reading>
8
+
9
+ <process>
10
+
11
+ <step name="ensure_and_load_config">
12
+ Ensure config exists and load current state:
13
+
14
+ ```bash
15
+ node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs config-ensure-section
16
+ INIT=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs state load)
17
+ ```
18
+
19
+ Creates `.planning/config.json` with defaults if missing and loads current config values.
20
+ </step>
21
+
22
+ <step name="read_current">
23
+ ```bash
24
+ cat .planning/config.json
25
+ ```
26
+
27
+ Parse current values (default to `true` if not present):
28
+ - `workflow.research` — spawn researcher during plan-phase
29
+ - `workflow.plan_check` — spawn plan checker during plan-phase
30
+ - `workflow.verifier` — spawn verifier during execute-phase
31
+ - `workflow.nyquist_validation` — validation architecture research during plan-phase
32
+ - `model_profile` — which model each agent uses (default: `simple`)
33
+ - `git.branching_strategy` — branching approach (default: `"none"`)
34
+ </step>
35
+
36
+ <step name="present_settings">
37
+ Use question with current values pre-selected:
38
+
39
+ ```
40
+ question([
41
+ {
42
+ question: "Which model profile for agents?",
43
+ header: "Model",
44
+ multiSelect: false,
45
+ options: [
46
+ { label: "Simple", description: "One model for all agents (not flexible)" },
47
+ { label: "Smart (Recommended)", description: "Two models: one for reseach and planing, other for execution and verification" },
48
+ { label: "Custom (most flexible)", description: "Three models: different for every stage" }
49
+ ]
50
+ },
51
+ {
52
+ question: "Spawn Plan Researcher? (researches domain before planning)",
53
+ header: "Research",
54
+ multiSelect: false,
55
+ options: [
56
+ { label: "Yes", description: "Research phase goals before planning" },
57
+ { label: "No", description: "Skip research, plan directly" }
58
+ ]
59
+ },
60
+ {
61
+ question: "Spawn Plan Checker? (verifies plans before execution)",
62
+ header: "Plan Check",
63
+ multiSelect: false,
64
+ options: [
65
+ { label: "Yes", description: "Verify plans meet phase goals" },
66
+ { label: "No", description: "Skip plan verification" }
67
+ ]
68
+ },
69
+ {
70
+ question: "Spawn Execution Verifier? (verifies phase completion)",
71
+ header: "Verifier",
72
+ multiSelect: false,
73
+ options: [
74
+ { label: "Yes", description: "Verify must-haves after execution" },
75
+ { label: "No", description: "Skip post-execution verification" }
76
+ ]
77
+ },
78
+ {
79
+ question: "Auto-advance pipeline? (discuss → plan → execute automatically)",
80
+ header: "Auto",
81
+ multiSelect: false,
82
+ options: [
83
+ { label: "No (Recommended)", description: "Manual /new + paste between stages" },
84
+ { label: "Yes", description: "Chain stages via task() subagents (same isolation)" }
85
+ ]
86
+ },
87
+ {
88
+ question: "Enable Nyquist Validation? (researches test coverage during planning)",
89
+ header: "Nyquist",
90
+ multiSelect: false,
91
+ options: [
92
+ { label: "Yes (Recommended)", description: "Research automated test coverage during plan-phase. Adds validation requirements to plans. Blocks approval if tasks lack automated verify." },
93
+ { label: "No", description: "Skip validation research. Good for rapid prototyping or no-test phases." }
94
+ ]
95
+ },
96
+ {
97
+ question: "Git branching strategy?",
98
+ header: "Branching",
99
+ multiSelect: false,
100
+ options: [
101
+ { label: "None (Recommended)", description: "Commit directly to current branch" },
102
+ { label: "Per Phase", description: "Create branch for each phase (gsd/phase-{N}-{name})" },
103
+ { label: "Per Milestone", description: "Create branch for entire milestone (gsd/{version}-{name})" }
104
+ ]
105
+ }
106
+ ])
107
+ ```
108
+ </step>
109
+
110
+ <step name="update_config">
111
+ Merge new settings into existing config.json:
112
+
113
+ ```json
114
+ {
115
+ ...existing_config,
116
+ "model_profile": "simple" | "smart" | "custom",
117
+ "workflow": {
118
+ "research": true/false,
119
+ "plan_check": true/false,
120
+ "verifier": true/false,
121
+ "auto_advance": true/false,
122
+ "nyquist_validation": true/false
123
+ },
124
+ "git": {
125
+ "branching_strategy": "none" | "phase" | "milestone"
126
+ }
127
+ }
128
+ ```
129
+
130
+ write updated config to `.planning/config.json`.
131
+ </step>
132
+
133
+ <step name="save_as_defaults">
134
+ Ask whether to save these settings as global defaults for future projects:
135
+
136
+ ```
137
+ question([
138
+ {
139
+ question: "Save these as default settings for all new projects?",
140
+ header: "Defaults",
141
+ multiSelect: false,
142
+ options: [
143
+ { label: "Yes", description: "New projects start with these settings (saved to ~/.gsd/defaults.json)" },
144
+ { label: "No", description: "Only apply to this project" }
145
+ ]
146
+ }
147
+ ])
148
+ ```
149
+
150
+ If "Yes": write the same config object (minus project-specific fields like `brave_search`) to `~/.gsd/defaults.json`:
151
+
152
+ ```bash
153
+ mkdir -p ~/.gsd
154
+ ```
155
+
156
+ write `~/.gsd/defaults.json` with:
157
+ ```json
158
+ {
159
+ "mode": <current>,
160
+ "depth": <current>,
161
+ "model_profile": <current>,
162
+ "commit_docs": <current>,
163
+ "parallelization": <current>,
164
+ "branching_strategy": <current>,
165
+ "workflow": {
166
+ "research": <current>,
167
+ "plan_check": <current>,
168
+ "verifier": <current>,
169
+ "auto_advance": <current>,
170
+ "nyquist_validation": <current>
171
+ }
172
+ }
173
+ ```
174
+ </step>
175
+
176
+ <step name="confirm">
177
+ Display:
178
+
179
+ ```
180
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
181
+ GSD ► SETTINGS UPDATED
182
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
183
+
184
+ | Setting | Value |
185
+ |----------------------|-------|
186
+ | Model Profile | {simple/smart/custom} |
187
+ | Plan Researcher | {On/Off} |
188
+ | Plan Checker | {On/Off} |
189
+ | Execution Verifier | {On/Off} |
190
+ | Auto-Advance | {On/Off} |
191
+ | Nyquist Validation | {On/Off} |
192
+ | Git Branching | {None/Per Phase/Per Milestone} |
193
+ | Saved as Defaults | {Yes/No} |
194
+
195
+ These settings apply to future /gsd-plan-phase and /gsd-execute-phase runs.
196
+
197
+ Quick commands:
198
+ - /gsd-set-profile <profile> — switch model profile
199
+ - /gsd-plan-phase --research — force research
200
+ - /gsd-plan-phase --skip-research — skip research
201
+ - /gsd-plan-phase --skip-verify — skip plan check
202
+ ```
203
+ </step>
204
+
205
+ </process>
206
+
207
+ <success_criteria>
208
+ - [ ] Current config read
209
+ - [ ] User presented with 7 settings (profile + 5 workflow toggles + git branching)
210
+ - [ ] Config updated with model_profile, workflow, and git sections
211
+ - [ ] User offered to save as global defaults (~/.gsd/defaults.json)
212
+ - [ ] Changes confirmed to user
213
+ </success_criteria>
@@ -118,39 +118,22 @@ If found, delete them — phase is complete, handoffs are stale.
118
118
 
119
119
  </step>
120
120
 
121
- <step name="update_roadmap">
121
+ <step name="update_roadmap_and_state">
122
122
 
123
- Update the roadmap file:
123
+ **Delegate ROADMAP.md and STATE.md updates to gsd-tools:**
124
124
 
125
125
  ```bash
126
- ROADMAP_FILE=".planning/ROADMAP.md"
126
+ TRANSITION=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs phase complete "${current_phase}")
127
127
  ```
128
128
 
129
- Update the file:
129
+ The CLI handles:
130
+ - Marking the phase checkbox as `[x]` complete with today's date
131
+ - Updating plan count to final (e.g., "3/3 plans complete")
132
+ - Updating the Progress table (Status → Complete, adding date)
133
+ - Advancing STATE.md to next phase (Current Phase, Status → Ready to plan, Current Plan → Not started)
134
+ - Detecting if this is the last phase in the milestone
130
135
 
131
- - Mark current phase: `[x] Complete`
132
- - Add completion date
133
- - Update plan count to final (e.g., "3/3 plans complete")
134
- - Update Progress table
135
- - Keep next phase as `[ ] Not started`
136
-
137
- **Example:**
138
-
139
- ```markdown
140
- ## Phases
141
-
142
- - [x] Phase 1: Foundation (completed 2025-01-15)
143
- - [ ] Phase 2: Authentication ← Next
144
- - [ ] Phase 3: Core Features
145
-
146
- ## Progress
147
-
148
- | Phase | Plans Complete | Status | Completed |
149
- | ----------------- | -------------- | ----------- | ---------- |
150
- | 1. Foundation | 3/3 | Complete | 2025-01-15 |
151
- | 2. Authentication | 0/2 | Not started | - |
152
- | 3. Core Features | 0/1 | Not started | - |
153
- ```
136
+ Extract from result: `completed_phase`, `plans_executed`, `next_phase`, `next_phase_name`, `is_last_phase`.
154
137
 
155
138
  </step>
156
139
 
@@ -250,61 +233,21 @@ After (Phase 2 shipped JWT auth, discovered rate limiting needed):
250
233
 
251
234
  <step name="update_current_position_after_transition">
252
235
 
253
- Update Current Position section in STATE.md to reflect phase completion and transition.
236
+ **Note:** Basic position updates (Current Phase, Status, Current Plan, Last Activity) were already handled by `gsd-tools phase complete` in the update_roadmap_and_state step.
254
237
 
255
- **Format:**
238
+ Verify the updates are correct by reading STATE.md. If the progress bar needs updating, use:
256
239
 
257
- ```markdown
258
- Phase: [next] of [total] ([Next phase name])
259
- Plan: Not started
260
- Status: Ready to plan
261
- Last activity: [today] — Phase [X] complete, transitioned to Phase [X+1]
262
-
263
- Progress: [updated progress bar]
264
- ```
265
-
266
- **Instructions:**
267
-
268
- - Increment phase number to next phase
269
- - Reset plan to "Not started"
270
- - Set status to "Ready to plan"
271
- - Update last activity to describe transition
272
- - Recalculate progress bar based on completed plans
273
-
274
- **Example — transitioning from Phase 2 to Phase 3:**
275
-
276
- Before:
277
-
278
- ```markdown
279
- ## Current Position
280
-
281
- Phase: 2 of 4 (Authentication)
282
- Plan: 2 of 2 in current phase
283
- Status: Phase complete
284
- Last activity: 2025-01-20 — Completed 02-02-PLAN.md
285
-
286
- Progress: ███████░░░ 60%
240
+ ```bash
241
+ PROGRESS=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs progress bar --raw)
287
242
  ```
288
243
 
289
- After:
290
-
291
- ```markdown
292
- ## Current Position
293
-
294
- Phase: 3 of 4 (Core Features)
295
- Plan: Not started
296
- Status: Ready to plan
297
- Last activity: 2025-01-20 — Phase 2 complete, transitioned to Phase 3
298
-
299
- Progress: ███████░░░ 60%
300
- ```
244
+ Update the progress bar line in STATE.md with the result.
301
245
 
302
246
  **Step complete when:**
303
247
 
304
- - [ ] Phase number incremented to next phase
305
- - [ ] Plan status reset to "Not started"
306
- - [ ] Status shows "Ready to plan"
307
- - [ ] Last activity describes the transition
248
+ - [ ] Phase number incremented to next phase (done by phase complete)
249
+ - [ ] Plan status reset to "Not started" (done by phase complete)
250
+ - [ ] Status shows "Ready to plan" (done by phase complete)
308
251
  - [ ] Progress bar reflects total completed plans
309
252
 
310
253
  </step>
@@ -394,26 +337,20 @@ Resume file: None
394
337
 
395
338
  **MANDATORY: Verify milestone status before presenting next steps.**
396
339
 
397
- **Step 1: read ROADMAP.md and identify phases in current milestone**
398
-
399
- read the ROADMAP.md file and extract:
400
- 1. Current phase number (the phase just transitioned from)
401
- 2. All phase numbers in the current milestone section
340
+ **Use the transition result from `gsd-tools phase complete`:**
402
341
 
403
- To find phases, look for:
404
- - Phase headers: lines starting with `### Phase` or `#### Phase`
405
- - Phase list items: lines like `- [ ] **Phase X:` or `- [x] **Phase X:`
342
+ The `is_last_phase` field from the phase complete result tells you directly:
343
+ - `is_last_phase: false` More phases remain Go to **Route A**
344
+ - `is_last_phase: true` Milestone complete Go to **Route B**
406
345
 
407
- Count total phases and identify the highest phase number in the milestone.
346
+ The `next_phase` and `next_phase_name` fields give you the next phase details.
408
347
 
409
- State: "Current phase is {X}. Milestone has {N} phases (highest: {Y})."
410
-
411
- **Step 2: Route based on milestone status**
348
+ If you need additional context, use:
349
+ ```bash
350
+ ROADMAP=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs roadmap analyze)
351
+ ```
412
352
 
413
- | Condition | Meaning | Action |
414
- |-----------|---------|--------|
415
- | current phase < highest phase | More phases remain | Go to **Route A** |
416
- | current phase = highest phase | Milestone complete | Go to **Route B** |
353
+ This returns all phases with goals, disk status, and completion info.
417
354
 
418
355
  ---
419
356
 
@@ -421,10 +358,18 @@ State: "Current phase is {X}. Milestone has {N} phases (highest: {Y})."
421
358
 
422
359
  read ROADMAP.md to get the next phase's name and goal.
423
360
 
361
+ **Check if next phase has CONTEXT.md:**
362
+
363
+ ```bash
364
+ ls .planning/phases/*[X+1]*/*-CONTEXT.md 2>/dev/null
365
+ ```
366
+
424
367
  **If next phase exists:**
425
368
 
426
369
  <if mode="yolo">
427
370
 
371
+ **If CONTEXT.md exists:**
372
+
428
373
  ```
429
374
  Phase [X] marked complete.
430
375
 
@@ -433,12 +378,26 @@ Next: Phase [X+1] — [Name]
433
378
  ⚡ Auto-continuing: Plan Phase [X+1] in detail
434
379
  ```
435
380
 
436
- Exit skill and invoke Command("/gsd-plan-phase [X+1]")
381
+ Exit skill and invoke command("/gsd-plan-phase [X+1] --auto")
382
+
383
+ **If CONTEXT.md does NOT exist:**
384
+
385
+ ```
386
+ Phase [X] marked complete.
387
+
388
+ Next: Phase [X+1] — [Name]
389
+
390
+ ⚡ Auto-continuing: Discuss Phase [X+1] first
391
+ ```
392
+
393
+ Exit skill and invoke command("/gsd-discuss-phase [X+1] --auto")
437
394
 
438
395
  </if>
439
396
 
440
397
  <if mode="interactive" OR="custom with gates.confirm_transition true">
441
398
 
399
+ **If CONTEXT.md does NOT exist:**
400
+
442
401
  ```
443
402
  ## ✓ Phase [X] Complete
444
403
 
@@ -448,6 +407,31 @@ Exit skill and invoke Command("/gsd-plan-phase [X+1]")
448
407
 
449
408
  **Phase [X+1]: [Name]** — [Goal from ROADMAP.md]
450
409
 
410
+ `/gsd-discuss-phase [X+1]` — gather context and clarify approach
411
+
412
+ *`/new` first → fresh context window*
413
+
414
+ ---
415
+
416
+ **Also available:**
417
+ - `/gsd-plan-phase [X+1]` — skip discussion, plan directly
418
+ - `/gsd-research-phase [X+1]` — investigate unknowns
419
+
420
+ ---
421
+ ```
422
+
423
+ **If CONTEXT.md exists:**
424
+
425
+ ```
426
+ ## ✓ Phase [X] Complete
427
+
428
+ ---
429
+
430
+ ## ▶ Next Up
431
+
432
+ **Phase [X+1]: [Name]** — [Goal from ROADMAP.md]
433
+ *✓ Context gathered, ready to plan*
434
+
451
435
  `/gsd-plan-phase [X+1]`
452
436
 
453
437
  *`/new` first → fresh context window*
@@ -455,9 +439,8 @@ Exit skill and invoke Command("/gsd-plan-phase [X+1]")
455
439
  ---
456
440
 
457
441
  **Also available:**
458
- - `/gsd-discuss-phase [X+1]` — gather context first
442
+ - `/gsd-discuss-phase [X+1]` — revisit context
459
443
  - `/gsd-research-phase [X+1]` — investigate unknowns
460
- - Review roadmap
461
444
 
462
445
  ---
463
446
  ```
@@ -468,6 +451,11 @@ Exit skill and invoke Command("/gsd-plan-phase [X+1]")
468
451
 
469
452
  **Route B: Milestone complete (all phases done)**
470
453
 
454
+ **Clear auto-advance** — milestone boundary is the natural stopping point:
455
+ ```bash
456
+ node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs config-set workflow.auto_advance false
457
+ ```
458
+
471
459
  <if mode="yolo">
472
460
 
473
461
  ```
@@ -478,7 +466,7 @@ Phase {X} marked complete.
478
466
  ⚡ Auto-continuing: Complete milestone and archive
479
467
  ```
480
468
 
481
- Exit skill and invoke Command("/gsd-complete-milestone {version}")
469
+ Exit skill and invoke command("/gsd-complete-milestone {version}")
482
470
 
483
471
  </if>
484
472
 
@@ -514,15 +502,7 @@ Exit skill and invoke Command("/gsd-complete-milestone {version}")
514
502
  </process>
515
503
 
516
504
  <implicit_tracking>
517
-
518
- Progress tracking is IMPLICIT:
519
-
520
- - "Plan phase 2" → Phase 1 must be done (or ask)
521
- - "Plan phase 3" → Phases 1-2 must be done (or ask)
522
- - Transition workflow makes it explicit in ROADMAP.md
523
-
524
- No separate "update progress" step. Forward motion IS progress.
525
-
505
+ Progress tracking is IMPLICIT: planning phase N implies phases 1-(N-1) complete. No separate progress step—forward motion IS progress.
526
506
  </implicit_tracking>
527
507
 
528
508
  <partial_completion>