gsd-opencode 1.22.1 → 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 (188) hide show
  1. package/agents/gsd-advisor-researcher.md +112 -0
  2. package/agents/gsd-assumptions-analyzer.md +110 -0
  3. package/agents/gsd-codebase-mapper.md +0 -2
  4. package/agents/gsd-debugger.md +117 -2
  5. package/agents/gsd-doc-verifier.md +207 -0
  6. package/agents/gsd-doc-writer.md +608 -0
  7. package/agents/gsd-executor.md +45 -4
  8. package/agents/gsd-integration-checker.md +0 -2
  9. package/agents/gsd-nyquist-auditor.md +0 -2
  10. package/agents/gsd-phase-researcher.md +191 -5
  11. package/agents/gsd-plan-checker.md +152 -5
  12. package/agents/gsd-planner.md +131 -157
  13. package/agents/gsd-project-researcher.md +28 -3
  14. package/agents/gsd-research-synthesizer.md +0 -2
  15. package/agents/gsd-roadmapper.md +29 -2
  16. package/agents/gsd-security-auditor.md +129 -0
  17. package/agents/gsd-ui-auditor.md +485 -0
  18. package/agents/gsd-ui-checker.md +305 -0
  19. package/agents/gsd-ui-researcher.md +368 -0
  20. package/agents/gsd-user-profiler.md +173 -0
  21. package/agents/gsd-verifier.md +207 -22
  22. package/commands/gsd/gsd-add-backlog.md +76 -0
  23. package/commands/gsd/gsd-analyze-dependencies.md +34 -0
  24. package/commands/gsd/gsd-audit-uat.md +24 -0
  25. package/commands/gsd/gsd-autonomous.md +45 -0
  26. package/commands/gsd/gsd-cleanup.md +5 -0
  27. package/commands/gsd/gsd-debug.md +29 -21
  28. package/commands/gsd/gsd-discuss-phase.md +15 -36
  29. package/commands/gsd/gsd-do.md +30 -0
  30. package/commands/gsd/gsd-docs-update.md +48 -0
  31. package/commands/gsd/gsd-execute-phase.md +24 -2
  32. package/commands/gsd/gsd-fast.md +30 -0
  33. package/commands/gsd/gsd-forensics.md +56 -0
  34. package/commands/gsd/gsd-help.md +2 -0
  35. package/commands/gsd/gsd-join-discord.md +2 -1
  36. package/commands/gsd/gsd-list-workspaces.md +19 -0
  37. package/commands/gsd/gsd-manager.md +40 -0
  38. package/commands/gsd/gsd-milestone-summary.md +51 -0
  39. package/commands/gsd/gsd-new-project.md +4 -0
  40. package/commands/gsd/gsd-new-workspace.md +44 -0
  41. package/commands/gsd/gsd-next.md +24 -0
  42. package/commands/gsd/gsd-note.md +34 -0
  43. package/commands/gsd/gsd-plan-phase.md +8 -1
  44. package/commands/gsd/gsd-plant-seed.md +28 -0
  45. package/commands/gsd/gsd-pr-branch.md +25 -0
  46. package/commands/gsd/gsd-profile-user.md +46 -0
  47. package/commands/gsd/gsd-quick.md +7 -3
  48. package/commands/gsd/gsd-reapply-patches.md +178 -45
  49. package/commands/gsd/gsd-remove-workspace.md +26 -0
  50. package/commands/gsd/gsd-research-phase.md +7 -12
  51. package/commands/gsd/gsd-review-backlog.md +62 -0
  52. package/commands/gsd/gsd-review.md +38 -0
  53. package/commands/gsd/gsd-secure-phase.md +35 -0
  54. package/commands/gsd/gsd-session-report.md +19 -0
  55. package/commands/gsd/gsd-set-profile.md +24 -23
  56. package/commands/gsd/gsd-ship.md +23 -0
  57. package/commands/gsd/gsd-stats.md +18 -0
  58. package/commands/gsd/gsd-thread.md +127 -0
  59. package/commands/gsd/gsd-ui-phase.md +34 -0
  60. package/commands/gsd/gsd-ui-review.md +32 -0
  61. package/commands/gsd/gsd-workstreams.md +71 -0
  62. package/get-shit-done/bin/gsd-tools.cjs +450 -90
  63. package/get-shit-done/bin/lib/commands.cjs +489 -24
  64. package/get-shit-done/bin/lib/config.cjs +329 -48
  65. package/get-shit-done/bin/lib/core.cjs +1143 -102
  66. package/get-shit-done/bin/lib/docs.cjs +267 -0
  67. package/get-shit-done/bin/lib/frontmatter.cjs +125 -43
  68. package/get-shit-done/bin/lib/init.cjs +918 -106
  69. package/get-shit-done/bin/lib/milestone.cjs +65 -33
  70. package/get-shit-done/bin/lib/model-profiles.cjs +70 -0
  71. package/get-shit-done/bin/lib/phase.cjs +434 -404
  72. package/get-shit-done/bin/lib/profile-output.cjs +1048 -0
  73. package/get-shit-done/bin/lib/profile-pipeline.cjs +539 -0
  74. package/get-shit-done/bin/lib/roadmap.cjs +156 -101
  75. package/get-shit-done/bin/lib/schema-detect.cjs +238 -0
  76. package/get-shit-done/bin/lib/security.cjs +384 -0
  77. package/get-shit-done/bin/lib/state.cjs +711 -79
  78. package/get-shit-done/bin/lib/template.cjs +2 -2
  79. package/get-shit-done/bin/lib/uat.cjs +282 -0
  80. package/get-shit-done/bin/lib/verify.cjs +254 -42
  81. package/get-shit-done/bin/lib/workstream.cjs +495 -0
  82. package/get-shit-done/references/agent-contracts.md +79 -0
  83. package/get-shit-done/references/artifact-types.md +113 -0
  84. package/get-shit-done/references/checkpoints.md +12 -10
  85. package/get-shit-done/references/context-budget.md +49 -0
  86. package/get-shit-done/references/continuation-format.md +15 -15
  87. package/get-shit-done/references/decimal-phase-calculation.md +2 -3
  88. package/get-shit-done/references/domain-probes.md +125 -0
  89. package/get-shit-done/references/gate-prompts.md +100 -0
  90. package/get-shit-done/references/git-integration.md +47 -0
  91. package/get-shit-done/references/model-profile-resolution.md +2 -0
  92. package/get-shit-done/references/model-profiles.md +62 -16
  93. package/get-shit-done/references/phase-argument-parsing.md +2 -2
  94. package/get-shit-done/references/planner-gap-closure.md +62 -0
  95. package/get-shit-done/references/planner-reviews.md +39 -0
  96. package/get-shit-done/references/planner-revision.md +87 -0
  97. package/get-shit-done/references/planning-config.md +18 -1
  98. package/get-shit-done/references/revision-loop.md +97 -0
  99. package/get-shit-done/references/ui-brand.md +2 -2
  100. package/get-shit-done/references/universal-anti-patterns.md +58 -0
  101. package/get-shit-done/references/user-profiling.md +681 -0
  102. package/get-shit-done/references/workstream-flag.md +111 -0
  103. package/get-shit-done/templates/SECURITY.md +61 -0
  104. package/get-shit-done/templates/UAT.md +21 -3
  105. package/get-shit-done/templates/UI-SPEC.md +100 -0
  106. package/get-shit-done/templates/VALIDATION.md +3 -3
  107. package/get-shit-done/templates/claude-md.md +145 -0
  108. package/get-shit-done/templates/config.json +14 -3
  109. package/get-shit-done/templates/context.md +61 -6
  110. package/get-shit-done/templates/debug-subagent-prompt.md +2 -6
  111. package/get-shit-done/templates/dev-preferences.md +21 -0
  112. package/get-shit-done/templates/discussion-log.md +63 -0
  113. package/get-shit-done/templates/phase-prompt.md +46 -5
  114. package/get-shit-done/templates/planner-subagent-prompt.md +2 -10
  115. package/get-shit-done/templates/project.md +2 -0
  116. package/get-shit-done/templates/state.md +2 -2
  117. package/get-shit-done/templates/user-profile.md +146 -0
  118. package/get-shit-done/workflows/add-phase.md +4 -4
  119. package/get-shit-done/workflows/add-tests.md +4 -4
  120. package/get-shit-done/workflows/add-todo.md +4 -4
  121. package/get-shit-done/workflows/analyze-dependencies.md +96 -0
  122. package/get-shit-done/workflows/audit-milestone.md +20 -16
  123. package/get-shit-done/workflows/audit-uat.md +109 -0
  124. package/get-shit-done/workflows/autonomous.md +1036 -0
  125. package/get-shit-done/workflows/check-todos.md +4 -4
  126. package/get-shit-done/workflows/cleanup.md +4 -4
  127. package/get-shit-done/workflows/complete-milestone.md +22 -10
  128. package/get-shit-done/workflows/diagnose-issues.md +21 -7
  129. package/get-shit-done/workflows/discovery-phase.md +2 -2
  130. package/get-shit-done/workflows/discuss-phase-assumptions.md +671 -0
  131. package/get-shit-done/workflows/discuss-phase-power.md +291 -0
  132. package/get-shit-done/workflows/discuss-phase.md +558 -47
  133. package/get-shit-done/workflows/do.md +104 -0
  134. package/get-shit-done/workflows/docs-update.md +1093 -0
  135. package/get-shit-done/workflows/execute-phase.md +741 -58
  136. package/get-shit-done/workflows/execute-plan.md +77 -12
  137. package/get-shit-done/workflows/fast.md +105 -0
  138. package/get-shit-done/workflows/forensics.md +265 -0
  139. package/get-shit-done/workflows/health.md +28 -6
  140. package/get-shit-done/workflows/help.md +127 -7
  141. package/get-shit-done/workflows/insert-phase.md +4 -4
  142. package/get-shit-done/workflows/list-phase-assumptions.md +2 -2
  143. package/get-shit-done/workflows/list-workspaces.md +56 -0
  144. package/get-shit-done/workflows/manager.md +363 -0
  145. package/get-shit-done/workflows/map-codebase.md +83 -44
  146. package/get-shit-done/workflows/milestone-summary.md +223 -0
  147. package/get-shit-done/workflows/new-milestone.md +133 -25
  148. package/get-shit-done/workflows/new-project.md +216 -54
  149. package/get-shit-done/workflows/new-workspace.md +237 -0
  150. package/get-shit-done/workflows/next.md +97 -0
  151. package/get-shit-done/workflows/node-repair.md +92 -0
  152. package/get-shit-done/workflows/note.md +156 -0
  153. package/get-shit-done/workflows/pause-work.md +132 -15
  154. package/get-shit-done/workflows/plan-milestone-gaps.md +6 -7
  155. package/get-shit-done/workflows/plan-phase.md +513 -62
  156. package/get-shit-done/workflows/plant-seed.md +169 -0
  157. package/get-shit-done/workflows/pr-branch.md +129 -0
  158. package/get-shit-done/workflows/profile-user.md +450 -0
  159. package/get-shit-done/workflows/progress.md +154 -29
  160. package/get-shit-done/workflows/quick.md +285 -111
  161. package/get-shit-done/workflows/remove-phase.md +2 -2
  162. package/get-shit-done/workflows/remove-workspace.md +90 -0
  163. package/get-shit-done/workflows/research-phase.md +13 -9
  164. package/get-shit-done/workflows/resume-project.md +37 -18
  165. package/get-shit-done/workflows/review.md +281 -0
  166. package/get-shit-done/workflows/secure-phase.md +154 -0
  167. package/get-shit-done/workflows/session-report.md +146 -0
  168. package/get-shit-done/workflows/set-profile.md +2 -2
  169. package/get-shit-done/workflows/settings.md +91 -11
  170. package/get-shit-done/workflows/ship.md +237 -0
  171. package/get-shit-done/workflows/stats.md +60 -0
  172. package/get-shit-done/workflows/transition.md +150 -23
  173. package/get-shit-done/workflows/ui-phase.md +292 -0
  174. package/get-shit-done/workflows/ui-review.md +183 -0
  175. package/get-shit-done/workflows/update.md +262 -30
  176. package/get-shit-done/workflows/validate-phase.md +14 -17
  177. package/get-shit-done/workflows/verify-phase.md +143 -11
  178. package/get-shit-done/workflows/verify-work.md +141 -39
  179. package/package.json +1 -1
  180. package/skills/gsd-audit-milestone/SKILL.md +29 -0
  181. package/skills/gsd-cleanup/SKILL.md +19 -0
  182. package/skills/gsd-complete-milestone/SKILL.md +131 -0
  183. package/skills/gsd-discuss-phase/SKILL.md +54 -0
  184. package/skills/gsd-execute-phase/SKILL.md +49 -0
  185. package/skills/gsd-plan-phase/SKILL.md +37 -0
  186. package/skills/gsd-ui-phase/SKILL.md +24 -0
  187. package/skills/gsd-ui-review/SKILL.md +24 -0
  188. package/skills/gsd-verify-work/SKILL.md +30 -0
@@ -0,0 +1,154 @@
1
+ <objective>
2
+ Verify threat mitigations for a completed phase. Confirm PLAN.md threat register dispositions are resolved. Update SECURITY.md.
3
+ </objective>
4
+
5
+ <required_reading>
6
+ @$HOME/.config/opencode/get-shit-done/references/ui-brand.md
7
+ </required_reading>
8
+
9
+ <available_agent_types>
10
+ Valid GSD subagent types (use exact names — do not fall back to 'general'):
11
+ - gsd-security-auditor — Verifies threat mitigation coverage
12
+ </available_agent_types>
13
+
14
+ <process>
15
+
16
+ ## 0. Initialize
17
+
18
+ ```bash
19
+ INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init phase-op "${PHASE_ARG}")
20
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
21
+ AGENT_SKILLS_AUDITOR=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" agent-skills gsd-security-auditor 2>/dev/null)
22
+ ```
23
+
24
+ Parse: `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`.
25
+
26
+ ```bash
27
+ AUDITOR_MODEL=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" resolve-model gsd-security-auditor --raw)
28
+ SECURITY_CFG=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config-get workflow.security_enforcement --raw 2>/dev/null || echo "true")
29
+ ```
30
+
31
+ If `SECURITY_CFG` is `false`: exit with "Security enforcement disabled. Enable via /gsd-settings."
32
+
33
+ Display banner: `GSD > SECURE PHASE {N}: {name}`
34
+
35
+ ## 1. Detect Input State
36
+
37
+ ```bash
38
+ SECURITY_FILE=$(ls "${PHASE_DIR}"/*-SECURITY.md 2>/dev/null | head -1)
39
+ PLAN_FILES=$(ls "${PHASE_DIR}"/*-PLAN.md 2>/dev/null)
40
+ SUMMARY_FILES=$(ls "${PHASE_DIR}"/*-SUMMARY.md 2>/dev/null)
41
+ ```
42
+
43
+ - **State A** (`SECURITY_FILE` non-empty): Audit existing
44
+ - **State B** (`SECURITY_FILE` empty, `PLAN_FILES` and `SUMMARY_FILES` non-empty): Run from artifacts
45
+ - **State C** (`SUMMARY_FILES` empty): Exit — "Phase {N} not executed. Run /gsd-execute-phase {N} first."
46
+
47
+ ## 2. Discovery
48
+
49
+ ### 2a. read Phase Artifacts
50
+
51
+ read PLAN.md — extract `<threat_model>` block: trust boundaries, STRIDE register (`threat_id`, `category`, `component`, `disposition`, `mitigation_plan`).
52
+
53
+ ### 2b. read Summary Threat Flags
54
+
55
+ read SUMMARY.md — extract `## Threat Flags` entries.
56
+
57
+ ### 2c. Build Threat Register
58
+
59
+ Per threat: `{ threat_id, category, component, disposition, mitigation_pattern, files_to_check }`
60
+
61
+ ## 3. Threat Classification
62
+
63
+ Classify each threat:
64
+
65
+ | Status | Criteria |
66
+ |--------|----------|
67
+ | CLOSED | mitigation found OR accepted risk documented in SECURITY.md OR transfer documented |
68
+ | OPEN | none of the above |
69
+
70
+ Build: `{ threat_id, category, component, disposition, status, evidence }`
71
+
72
+ If `threats_open: 0` → skip to Step 6 directly.
73
+
74
+ ## 4. Present Threat Plan
75
+
76
+ Call question with threat table and options:
77
+ 1. "Verify all open threats" → Step 5
78
+ 2. "Accept all open — document in accepted risks log" → add to SECURITY.md accepted risks, set all CLOSED, Step 6
79
+ 3. "Cancel" → exit
80
+
81
+ ## 5. Spawn gsd-security-auditor
82
+
83
+ ```
84
+ @gsd-security-auditor "read $HOME/.config/opencode/agents/gsd-security-auditor.md for instructions.\n\n"
85
+ ```
86
+
87
+ Handle return:
88
+ - `## SECURED` → record closures → Step 6
89
+ - `## OPEN_THREATS` → record closed + open, present user with accept/block choice → Step 6
90
+ - `## ESCALATE` → present to user → Step 6
91
+
92
+ ## 6. write/Update SECURITY.md
93
+
94
+ **State B (create):**
95
+ 1. read template from `$HOME/.config/opencode/get-shit-done/templates/SECURITY.md`
96
+ 2. Fill: frontmatter, threat register, accepted risks, audit trail
97
+ 3. write to `${PHASE_DIR}/${PADDED_PHASE}-SECURITY.md`
98
+
99
+ **State A (update):**
100
+ 1. Update threat register statuses, append to audit trail:
101
+
102
+ ```markdown
103
+ ## Security Audit {date}
104
+ | Metric | Count |
105
+ |--------|-------|
106
+ | Threats found | {N} |
107
+ | Closed | {M} |
108
+ | Open | {K} |
109
+ ```
110
+
111
+ **ENFORCING GATE:** If `threats_open > 0` after all options exhausted (user did not accept, not all verified closed):
112
+
113
+ ```
114
+ GSD > PHASE {N} SECURITY BLOCKED
115
+ {K} threats open — phase advancement blocked until threats_open: 0
116
+ ▶ Fix mitigations then re-run: /gsd-secure-phase {N}
117
+ ▶ Or document accepted risks in SECURITY.md and re-run.
118
+ ```
119
+
120
+ Do NOT emit next-phase routing. Stop here.
121
+
122
+ ## 7. Commit
123
+
124
+ ```bash
125
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs(phase-${PHASE}): add/update security threat verification"
126
+ ```
127
+
128
+ ## 8. Results + Routing
129
+
130
+ **Secured (threats_open: 0):**
131
+ ```
132
+ GSD > PHASE {N} THREAT-SECURE
133
+ threats_open: 0 — all threats have dispositions.
134
+ ▶ /gsd-validate-phase {N} validate test coverage
135
+ ▶ /gsd-verify-work {N} run UAT
136
+ ```
137
+
138
+ Display `/new` reminder.
139
+
140
+ </process>
141
+
142
+ <success_criteria>
143
+ - [ ] Security enforcement checked — exit if false
144
+ - [ ] Input state detected (A/B/C) — state C exits cleanly
145
+ - [ ] PLAN.md threat model parsed, register built
146
+ - [ ] SUMMARY.md threat flags incorporated
147
+ - [ ] threats_open: 0 → skip directly to Step 6
148
+ - [ ] User gate with threat table presented
149
+ - [ ] Auditor spawned with complete context
150
+ - [ ] All three return formats (SECURED/OPEN_THREATS/ESCALATE) handled
151
+ - [ ] SECURITY.md created or updated
152
+ - [ ] threats_open > 0 BLOCKS advancement (no next-phase routing emitted)
153
+ - [ ] Results with routing presented on success
154
+ </success_criteria>
@@ -0,0 +1,146 @@
1
+ <objective>
2
+ Generate a post-session summary document capturing work performed, outcomes achieved, and estimated resource usage. Writes SESSION_REPORT.md to .planning/reports/ for human review and stakeholder sharing.
3
+ </objective>
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="gather_session_data">
12
+ Collect session data from available sources:
13
+
14
+ 1. **STATE.md** — current phase, milestone, progress, blockers, decisions
15
+ 2. **Git log** — commits made during this session (last 24h or since last report)
16
+ 3. **Plan/Summary files** — plans executed, summaries written
17
+ 4. **ROADMAP.md** — milestone context and phase goals
18
+
19
+ ```bash
20
+ # Get recent commits (last 24 hours)
21
+ git log --oneline --since="24 hours ago" --no-merges 2>/dev/null || echo "No recent commits"
22
+
23
+ # Count files changed
24
+ git diff --stat HEAD~10 HEAD 2>/dev/null | tail -1 || echo "No diff available"
25
+ ```
26
+
27
+ read `.planning/STATE.md` to get:
28
+ - Current milestone and phase
29
+ - Progress percentage
30
+ - Active blockers
31
+ - Recent decisions
32
+
33
+ read `.planning/ROADMAP.md` to get milestone name and goals.
34
+
35
+ Check for existing reports:
36
+ ```bash
37
+ ls -la .planning/reports/SESSION_REPORT*.md 2>/dev/null || echo "No previous reports"
38
+ ```
39
+ </step>
40
+
41
+ <step name="estimate_usage">
42
+ Estimate token usage from observable signals:
43
+
44
+ - Count of tool calls is not directly available, so estimate from git activity and file operations
45
+ - Note: This is an **estimate** — exact token counts require API-level instrumentation not available to hooks
46
+
47
+ Estimation heuristics:
48
+ - Each commit ≈ 1 plan cycle (research + plan + execute + verify)
49
+ - Each plan file ≈ 2,000-5,000 tokens of agent context
50
+ - Each summary file ≈ 1,000-2,000 tokens generated
51
+ - Subagent spawns multiply by ~1.5x per agent type used
52
+ </step>
53
+
54
+ <step name="generate_report">
55
+ Create the report directory and file:
56
+
57
+ ```bash
58
+ mkdir -p .planning/reports
59
+ ```
60
+
61
+ write `.planning/reports/SESSION_REPORT.md` (or `.planning/reports/YYYYMMDD-session-report.md` if previous reports exist):
62
+
63
+ ```markdown
64
+ # GSD Session Report
65
+
66
+ **Generated:** [timestamp]
67
+ **Project:** [from PROJECT.md title or directory name]
68
+ **Milestone:** [N] — [milestone name from ROADMAP.md]
69
+
70
+ ---
71
+
72
+ ## Session Summary
73
+
74
+ **Duration:** [estimated from first to last commit timestamp, or "Single session"]
75
+ **Phase Progress:** [from STATE.md]
76
+ **Plans Executed:** [count of summaries written this session]
77
+ **Commits Made:** [count from git log]
78
+
79
+ ## Work Performed
80
+
81
+ ### Phases Touched
82
+ [List phases worked on with brief description of what was done]
83
+
84
+ ### Key Outcomes
85
+ [Bullet list of concrete deliverables: files created, features implemented, bugs fixed]
86
+
87
+ ### Decisions Made
88
+ [From STATE.md decisions table, if any were added this session]
89
+
90
+ ## Files Changed
91
+
92
+ [Summary of files modified, created, deleted — from git diff stat]
93
+
94
+ ## Blockers & Open Items
95
+
96
+ [Active blockers from STATE.md]
97
+ [Any TODO items created during session]
98
+
99
+ ## Estimated Resource Usage
100
+
101
+ | Metric | Estimate |
102
+ |--------|----------|
103
+ | Commits | [N] |
104
+ | Files changed | [N] |
105
+ | Plans executed | [N] |
106
+ | Subagents spawned | [estimated] |
107
+
108
+ > **Note:** Token and cost estimates require API-level instrumentation.
109
+ > These metrics reflect observable session activity only.
110
+
111
+ ---
112
+
113
+ *Generated by `/gsd-session-report`*
114
+ ```
115
+ </step>
116
+
117
+ <step name="display_result">
118
+ Show the user:
119
+
120
+ ```
121
+ ## Session Report Generated
122
+
123
+ 📄 `.planning/reports/[filename].md`
124
+
125
+ ### Highlights
126
+ - **Commits:** [N]
127
+ - **Files changed:** [N]
128
+ - **Phase progress:** [X]%
129
+ - **Plans executed:** [N]
130
+ ```
131
+
132
+ If this is the first report, mention:
133
+ ```
134
+ 💡 Run `/gsd-session-report` at the end of each session to build a history of project activity.
135
+ ```
136
+ </step>
137
+
138
+ </process>
139
+
140
+ <success_criteria>
141
+ - [ ] Session data gathered from STATE.md, git log, and plan files
142
+ - [ ] Report written to .planning/reports/
143
+ - [ ] Report includes work summary, outcomes, and file changes
144
+ - [ ] Filename includes date to prevent overwrites
145
+ - [ ] Result summary displayed to user
146
+ </success_criteria>
@@ -1,6 +1,6 @@
1
- <purpose>
1
+ <objective>
2
2
  Switch the model profile used by GSD agents. Controls which OpenCode model each agent uses, balancing quality vs token spend.
3
- </purpose>
3
+ </objective>
4
4
 
5
5
  <required_reading>
6
6
  read all files referenced by the invoking prompt's execution_context before starting.
@@ -1,6 +1,6 @@
1
- <purpose>
1
+ <objective>
2
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>
3
+ </objective>
4
4
 
5
5
  <required_reading>
6
6
  read all files referenced by the invoking prompt's execution_context before starting.
@@ -30,8 +30,11 @@ Parse current values (default to `true` if not present):
30
30
  - `workflow.plan_check` — spawn plan checker during plan-phase
31
31
  - `workflow.verifier` — spawn verifier during execute-phase
32
32
  - `workflow.nyquist_validation` — validation architecture research during plan-phase (default: true if absent)
33
+ - `workflow.ui_phase` — generate UI-SPEC.md design contracts for frontend phases (default: true if absent)
34
+ - `workflow.ui_safety_gate` — prompt to run /gsd-ui-phase before planning frontend phases (default: true if absent)
33
35
  - `model_profile` — which model each agent uses (default: `simple`)
34
36
  - `git.branching_strategy` — branching approach (default: `"none"`)
37
+ - `workflow.use_worktrees` — whether parallel executor agents run in worktree isolation (default: `true`)
35
38
  </step>
36
39
 
37
40
  <step name="present_settings">
@@ -45,8 +48,9 @@ question([
45
48
  multiSelect: false,
46
49
  options: [
47
50
  { label: "Simple", description: "One model for all agents (not flexible)" },
48
- { label: "Smart (Recommended)", description: "Two models: one for reseach and planing, other for execution and verification" },
49
- { label: "Genius (most flexible)", description: "Three models: different for every stage" }
51
+ { label: "Smart (Recommended)", description: "Opus for planning, Sonnet for research/execution/verification" },
52
+ { label: "Genius (most flexible)", description: "Three models: different for every stage" },
53
+ { label: "Inherit", description: "Use current session model for all agents (best for OpenRouter, local models, or runtime model switching)" }
50
54
  ]
51
55
  },
52
56
  {
@@ -94,6 +98,26 @@ question([
94
98
  { label: "No", description: "Skip validation research. Good for rapid prototyping or no-test phases." }
95
99
  ]
96
100
  },
101
+ // Note: Nyquist validation depends on research output. If research is disabled,
102
+ // plan-phase automatically skips Nyquist steps (no RESEARCH.md to extract from).
103
+ {
104
+ question: "Enable UI Phase? (generates UI-SPEC.md design contracts for frontend phases)",
105
+ header: "UI Phase",
106
+ multiSelect: false,
107
+ options: [
108
+ { label: "Yes (Recommended)", description: "Generate UI design contracts before planning frontend phases. Locks spacing, typography, color, and copywriting." },
109
+ { label: "No", description: "Skip UI-SPEC generation. Good for backend-only projects or API phases." }
110
+ ]
111
+ },
112
+ {
113
+ question: "Enable UI Safety Gate? (prompts to run /gsd-ui-phase before planning frontend phases)",
114
+ header: "UI Gate",
115
+ multiSelect: false,
116
+ options: [
117
+ { label: "Yes (Recommended)", description: "plan-phase asks to run /gsd-ui-phase first when frontend indicators detected." },
118
+ { label: "No", description: "No prompt — plan-phase proceeds without UI-SPEC check." }
119
+ ]
120
+ },
97
121
  {
98
122
  question: "Git branching strategy?",
99
123
  header: "Branching",
@@ -103,6 +127,42 @@ question([
103
127
  { label: "Per Phase", description: "Create branch for each phase (gsd/phase-{N}-{name})" },
104
128
  { label: "Per Milestone", description: "Create branch for entire milestone (gsd/{version}-{name})" }
105
129
  ]
130
+ },
131
+ {
132
+ question: "Enable context window warnings? (injects advisory messages when context is getting full)",
133
+ header: "Ctx Warnings",
134
+ multiSelect: false,
135
+ options: [
136
+ { label: "Yes (Recommended)", description: "Warn when context usage exceeds 65%. Helps avoid losing work." },
137
+ { label: "No", description: "Disable warnings. Allows OpenCode to reach auto-compact naturally. Good for long unattended runs." }
138
+ ]
139
+ },
140
+ {
141
+ question: "Research best practices before asking questions? (web search during new-project and discuss-phase)",
142
+ header: "Research Qs",
143
+ multiSelect: false,
144
+ options: [
145
+ { label: "No (Recommended)", description: "Ask questions directly. Faster, uses fewer tokens." },
146
+ { label: "Yes", description: "Search web for best practices before each question group. More informed questions but uses more tokens." }
147
+ ]
148
+ },
149
+ {
150
+ question: "Skip discuss-phase in autonomous mode? (use ROADMAP phase goals as spec)",
151
+ header: "Skip Discuss",
152
+ multiSelect: false,
153
+ options: [
154
+ { label: "No (Recommended)", description: "Run smart discuss before each phase — surfaces gray areas and captures decisions." },
155
+ { label: "Yes", description: "Skip discuss in /gsd-autonomous — chain directly to plan. Best for backend/pipeline work where phase descriptions are the spec." }
156
+ ]
157
+ },
158
+ {
159
+ question: "Use git worktrees for parallel agent isolation?",
160
+ header: "Worktrees",
161
+ multiSelect: false,
162
+ options: [
163
+ { label: "Yes (Recommended)", description: "Each parallel executor runs in its own worktree branch — no conflicts between agents." },
164
+ { label: "No", description: "Disable worktree isolation. Use on platforms where EnterWorktree is broken (e.g. Windows with feature branches). Agents run sequentially on the main working tree." }
165
+ ]
106
166
  }
107
167
  ])
108
168
  ```
@@ -114,16 +174,28 @@ Merge new settings into existing config.json:
114
174
  ```json
115
175
  {
116
176
  ...existing_config,
117
- "model_profile": "simple" | "smart" | "genius",
177
+ "model_profile": "simple" | "smart" | "genius" | "inherit",
118
178
  "workflow": {
119
179
  "research": true/false,
120
180
  "plan_check": true/false,
121
181
  "verifier": true/false,
122
182
  "auto_advance": true/false,
123
- "nyquist_validation": true/false
183
+ "nyquist_validation": true/false,
184
+ "ui_phase": true/false,
185
+ "ui_safety_gate": true/false,
186
+ "text_mode": true/false,
187
+ "research_before_questions": true/false,
188
+ "discuss_mode": "discuss" | "assumptions",
189
+ "skip_discuss": true/false,
190
+ "use_worktrees": true/false
124
191
  },
125
192
  "git": {
126
- "branching_strategy": "none" | "phase" | "milestone"
193
+ "branching_strategy": "none" | "phase" | "milestone",
194
+ "quick_branch_template": <string|null>
195
+ },
196
+ "hooks": {
197
+ "context_warnings": true/false,
198
+ "workflow_guard": true/false
127
199
  }
128
200
  }
129
201
  ```
@@ -163,12 +235,16 @@ write `~/.gsd/defaults.json` with:
163
235
  "commit_docs": <current>,
164
236
  "parallelization": <current>,
165
237
  "branching_strategy": <current>,
238
+ "quick_branch_template": <current>,
166
239
  "workflow": {
167
240
  "research": <current>,
168
241
  "plan_check": <current>,
169
242
  "verifier": <current>,
170
243
  "auto_advance": <current>,
171
- "nyquist_validation": <current>
244
+ "nyquist_validation": <current>,
245
+ "ui_phase": <current>,
246
+ "ui_safety_gate": <current>,
247
+ "skip_discuss": <current>
172
248
  }
173
249
  }
174
250
  ```
@@ -184,19 +260,23 @@ Display:
184
260
 
185
261
  | Setting | Value |
186
262
  |----------------------|-------|
187
- | Model Profile | {simple/smart/genius} |
263
+ | Model Profile | {simple/smart/genius/inherit} |
188
264
  | Plan Researcher | {On/Off} |
189
265
  | Plan Checker | {On/Off} |
190
266
  | Execution Verifier | {On/Off} |
191
267
  | Auto-Advance | {On/Off} |
192
268
  | Nyquist Validation | {On/Off} |
269
+ | UI Phase | {On/Off} |
270
+ | UI Safety Gate | {On/Off} |
193
271
  | Git Branching | {None/Per Phase/Per Milestone} |
272
+ | Skip Discuss | {On/Off} |
273
+ | Context Warnings | {On/Off} |
194
274
  | Saved as Defaults | {Yes/No} |
195
275
 
196
276
  These settings apply to future /gsd-plan-phase and /gsd-execute-phase runs.
197
277
 
198
278
  Quick commands:
199
- - /gsd-set-profile <profile> — switch model profile/choose models
279
+ - /gsd-set-profile <profile> — switch model profile
200
280
  - /gsd-plan-phase --research — force research
201
281
  - /gsd-plan-phase --skip-research — skip research
202
282
  - /gsd-plan-phase --skip-verify — skip plan check
@@ -207,7 +287,7 @@ Quick commands:
207
287
 
208
288
  <success_criteria>
209
289
  - [ ] Current config read
210
- - [ ] User presented with 7 settings (profile + 5 workflow toggles + git branching)
290
+ - [ ] User presented with 10 settings (profile + 8 workflow toggles + git branching)
211
291
  - [ ] Config updated with model_profile, workflow, and git sections
212
292
  - [ ] User offered to save as global defaults (~/.gsd/defaults.json)
213
293
  - [ ] Changes confirmed to user