gsd-code-first 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/LICENSE +21 -0
  2. package/README.ja-JP.md +834 -0
  3. package/README.ko-KR.md +823 -0
  4. package/README.md +937 -0
  5. package/README.pt-BR.md +452 -0
  6. package/README.zh-CN.md +800 -0
  7. package/agents/gsd-advisor-researcher.md +104 -0
  8. package/agents/gsd-annotator.md +148 -0
  9. package/agents/gsd-arc-executor.md +537 -0
  10. package/agents/gsd-arc-planner.md +374 -0
  11. package/agents/gsd-assumptions-analyzer.md +105 -0
  12. package/agents/gsd-code-planner.md +155 -0
  13. package/agents/gsd-codebase-mapper.md +770 -0
  14. package/agents/gsd-debugger.md +1373 -0
  15. package/agents/gsd-executor.md +509 -0
  16. package/agents/gsd-integration-checker.md +443 -0
  17. package/agents/gsd-nyquist-auditor.md +176 -0
  18. package/agents/gsd-phase-researcher.md +698 -0
  19. package/agents/gsd-plan-checker.md +773 -0
  20. package/agents/gsd-planner.md +1354 -0
  21. package/agents/gsd-project-researcher.md +654 -0
  22. package/agents/gsd-prototyper.md +161 -0
  23. package/agents/gsd-research-synthesizer.md +247 -0
  24. package/agents/gsd-roadmapper.md +679 -0
  25. package/agents/gsd-ui-auditor.md +439 -0
  26. package/agents/gsd-ui-checker.md +300 -0
  27. package/agents/gsd-ui-researcher.md +357 -0
  28. package/agents/gsd-user-profiler.md +171 -0
  29. package/agents/gsd-verifier.md +700 -0
  30. package/bin/install.js +5009 -0
  31. package/commands/gsd/add-backlog.md +76 -0
  32. package/commands/gsd/add-phase.md +43 -0
  33. package/commands/gsd/add-tests.md +41 -0
  34. package/commands/gsd/add-todo.md +47 -0
  35. package/commands/gsd/annotate.md +54 -0
  36. package/commands/gsd/audit-milestone.md +36 -0
  37. package/commands/gsd/audit-uat.md +24 -0
  38. package/commands/gsd/autonomous.md +41 -0
  39. package/commands/gsd/check-todos.md +45 -0
  40. package/commands/gsd/cleanup.md +18 -0
  41. package/commands/gsd/complete-milestone.md +136 -0
  42. package/commands/gsd/debug.md +173 -0
  43. package/commands/gsd/deep-plan.md +52 -0
  44. package/commands/gsd/discuss-phase.md +64 -0
  45. package/commands/gsd/do.md +30 -0
  46. package/commands/gsd/execute-phase.md +59 -0
  47. package/commands/gsd/extract-plan.md +35 -0
  48. package/commands/gsd/fast.md +30 -0
  49. package/commands/gsd/forensics.md +56 -0
  50. package/commands/gsd/health.md +22 -0
  51. package/commands/gsd/help.md +22 -0
  52. package/commands/gsd/insert-phase.md +32 -0
  53. package/commands/gsd/iterate.md +124 -0
  54. package/commands/gsd/join-discord.md +18 -0
  55. package/commands/gsd/list-phase-assumptions.md +46 -0
  56. package/commands/gsd/list-workspaces.md +19 -0
  57. package/commands/gsd/manager.md +39 -0
  58. package/commands/gsd/map-codebase.md +71 -0
  59. package/commands/gsd/milestone-summary.md +51 -0
  60. package/commands/gsd/new-milestone.md +44 -0
  61. package/commands/gsd/new-project.md +42 -0
  62. package/commands/gsd/new-workspace.md +44 -0
  63. package/commands/gsd/next.md +24 -0
  64. package/commands/gsd/note.md +34 -0
  65. package/commands/gsd/pause-work.md +38 -0
  66. package/commands/gsd/plan-milestone-gaps.md +34 -0
  67. package/commands/gsd/plan-phase.md +47 -0
  68. package/commands/gsd/plant-seed.md +28 -0
  69. package/commands/gsd/pr-branch.md +25 -0
  70. package/commands/gsd/profile-user.md +46 -0
  71. package/commands/gsd/progress.md +24 -0
  72. package/commands/gsd/prototype.md +56 -0
  73. package/commands/gsd/quick.md +47 -0
  74. package/commands/gsd/reapply-patches.md +123 -0
  75. package/commands/gsd/remove-phase.md +31 -0
  76. package/commands/gsd/remove-workspace.md +26 -0
  77. package/commands/gsd/research-phase.md +195 -0
  78. package/commands/gsd/resume-work.md +40 -0
  79. package/commands/gsd/review-backlog.md +61 -0
  80. package/commands/gsd/review.md +37 -0
  81. package/commands/gsd/session-report.md +19 -0
  82. package/commands/gsd/set-mode.md +41 -0
  83. package/commands/gsd/set-profile.md +12 -0
  84. package/commands/gsd/settings.md +36 -0
  85. package/commands/gsd/ship.md +23 -0
  86. package/commands/gsd/stats.md +18 -0
  87. package/commands/gsd/thread.md +127 -0
  88. package/commands/gsd/ui-phase.md +34 -0
  89. package/commands/gsd/ui-review.md +32 -0
  90. package/commands/gsd/update.md +37 -0
  91. package/commands/gsd/validate-phase.md +35 -0
  92. package/commands/gsd/verify-work.md +38 -0
  93. package/commands/gsd/workstreams.md +63 -0
  94. package/get-shit-done/bin/gsd-tools.cjs +946 -0
  95. package/get-shit-done/bin/lib/arc-scanner.cjs +341 -0
  96. package/get-shit-done/bin/lib/commands.cjs +959 -0
  97. package/get-shit-done/bin/lib/config.cjs +466 -0
  98. package/get-shit-done/bin/lib/core.cjs +1230 -0
  99. package/get-shit-done/bin/lib/frontmatter.cjs +336 -0
  100. package/get-shit-done/bin/lib/init.cjs +1442 -0
  101. package/get-shit-done/bin/lib/milestone.cjs +252 -0
  102. package/get-shit-done/bin/lib/model-profiles.cjs +68 -0
  103. package/get-shit-done/bin/lib/phase.cjs +888 -0
  104. package/get-shit-done/bin/lib/profile-output.cjs +952 -0
  105. package/get-shit-done/bin/lib/profile-pipeline.cjs +539 -0
  106. package/get-shit-done/bin/lib/roadmap.cjs +329 -0
  107. package/get-shit-done/bin/lib/security.cjs +382 -0
  108. package/get-shit-done/bin/lib/state.cjs +1031 -0
  109. package/get-shit-done/bin/lib/template.cjs +222 -0
  110. package/get-shit-done/bin/lib/uat.cjs +282 -0
  111. package/get-shit-done/bin/lib/verify.cjs +888 -0
  112. package/get-shit-done/bin/lib/workstream.cjs +491 -0
  113. package/get-shit-done/commands/gsd/workstreams.md +63 -0
  114. package/get-shit-done/references/arc-standard.md +315 -0
  115. package/get-shit-done/references/checkpoints.md +778 -0
  116. package/get-shit-done/references/continuation-format.md +249 -0
  117. package/get-shit-done/references/decimal-phase-calculation.md +64 -0
  118. package/get-shit-done/references/git-integration.md +295 -0
  119. package/get-shit-done/references/git-planning-commit.md +38 -0
  120. package/get-shit-done/references/model-profile-resolution.md +36 -0
  121. package/get-shit-done/references/model-profiles.md +139 -0
  122. package/get-shit-done/references/phase-argument-parsing.md +61 -0
  123. package/get-shit-done/references/planning-config.md +202 -0
  124. package/get-shit-done/references/questioning.md +162 -0
  125. package/get-shit-done/references/tdd.md +263 -0
  126. package/get-shit-done/references/ui-brand.md +160 -0
  127. package/get-shit-done/references/user-profiling.md +681 -0
  128. package/get-shit-done/references/verification-patterns.md +612 -0
  129. package/get-shit-done/references/workstream-flag.md +58 -0
  130. package/get-shit-done/templates/DEBUG.md +164 -0
  131. package/get-shit-done/templates/UAT.md +265 -0
  132. package/get-shit-done/templates/UI-SPEC.md +100 -0
  133. package/get-shit-done/templates/VALIDATION.md +76 -0
  134. package/get-shit-done/templates/claude-md.md +122 -0
  135. package/get-shit-done/templates/codebase/architecture.md +255 -0
  136. package/get-shit-done/templates/codebase/concerns.md +310 -0
  137. package/get-shit-done/templates/codebase/conventions.md +307 -0
  138. package/get-shit-done/templates/codebase/integrations.md +280 -0
  139. package/get-shit-done/templates/codebase/stack.md +186 -0
  140. package/get-shit-done/templates/codebase/structure.md +285 -0
  141. package/get-shit-done/templates/codebase/testing.md +480 -0
  142. package/get-shit-done/templates/config.json +44 -0
  143. package/get-shit-done/templates/context.md +352 -0
  144. package/get-shit-done/templates/continue-here.md +78 -0
  145. package/get-shit-done/templates/copilot-instructions.md +7 -0
  146. package/get-shit-done/templates/debug-subagent-prompt.md +91 -0
  147. package/get-shit-done/templates/dev-preferences.md +21 -0
  148. package/get-shit-done/templates/discovery.md +146 -0
  149. package/get-shit-done/templates/discussion-log.md +63 -0
  150. package/get-shit-done/templates/milestone-archive.md +123 -0
  151. package/get-shit-done/templates/milestone.md +115 -0
  152. package/get-shit-done/templates/phase-prompt.md +610 -0
  153. package/get-shit-done/templates/planner-subagent-prompt.md +117 -0
  154. package/get-shit-done/templates/project.md +186 -0
  155. package/get-shit-done/templates/requirements.md +231 -0
  156. package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
  157. package/get-shit-done/templates/research-project/FEATURES.md +147 -0
  158. package/get-shit-done/templates/research-project/PITFALLS.md +200 -0
  159. package/get-shit-done/templates/research-project/STACK.md +120 -0
  160. package/get-shit-done/templates/research-project/SUMMARY.md +170 -0
  161. package/get-shit-done/templates/research.md +552 -0
  162. package/get-shit-done/templates/retrospective.md +54 -0
  163. package/get-shit-done/templates/roadmap.md +202 -0
  164. package/get-shit-done/templates/state.md +176 -0
  165. package/get-shit-done/templates/summary-complex.md +59 -0
  166. package/get-shit-done/templates/summary-minimal.md +41 -0
  167. package/get-shit-done/templates/summary-standard.md +48 -0
  168. package/get-shit-done/templates/summary.md +248 -0
  169. package/get-shit-done/templates/user-profile.md +146 -0
  170. package/get-shit-done/templates/user-setup.md +311 -0
  171. package/get-shit-done/templates/verification-report.md +322 -0
  172. package/get-shit-done/workflows/add-phase.md +112 -0
  173. package/get-shit-done/workflows/add-tests.md +351 -0
  174. package/get-shit-done/workflows/add-todo.md +158 -0
  175. package/get-shit-done/workflows/audit-milestone.md +340 -0
  176. package/get-shit-done/workflows/audit-uat.md +109 -0
  177. package/get-shit-done/workflows/autonomous.md +891 -0
  178. package/get-shit-done/workflows/check-todos.md +177 -0
  179. package/get-shit-done/workflows/cleanup.md +152 -0
  180. package/get-shit-done/workflows/complete-milestone.md +767 -0
  181. package/get-shit-done/workflows/diagnose-issues.md +231 -0
  182. package/get-shit-done/workflows/discovery-phase.md +289 -0
  183. package/get-shit-done/workflows/discuss-phase-assumptions.md +653 -0
  184. package/get-shit-done/workflows/discuss-phase.md +1049 -0
  185. package/get-shit-done/workflows/do.md +104 -0
  186. package/get-shit-done/workflows/execute-phase.md +846 -0
  187. package/get-shit-done/workflows/execute-plan.md +514 -0
  188. package/get-shit-done/workflows/fast.md +105 -0
  189. package/get-shit-done/workflows/forensics.md +265 -0
  190. package/get-shit-done/workflows/health.md +181 -0
  191. package/get-shit-done/workflows/help.md +634 -0
  192. package/get-shit-done/workflows/insert-phase.md +130 -0
  193. package/get-shit-done/workflows/list-phase-assumptions.md +178 -0
  194. package/get-shit-done/workflows/list-workspaces.md +56 -0
  195. package/get-shit-done/workflows/manager.md +362 -0
  196. package/get-shit-done/workflows/map-codebase.md +377 -0
  197. package/get-shit-done/workflows/milestone-summary.md +223 -0
  198. package/get-shit-done/workflows/new-milestone.md +486 -0
  199. package/get-shit-done/workflows/new-project.md +1250 -0
  200. package/get-shit-done/workflows/new-workspace.md +237 -0
  201. package/get-shit-done/workflows/next.md +97 -0
  202. package/get-shit-done/workflows/node-repair.md +92 -0
  203. package/get-shit-done/workflows/note.md +156 -0
  204. package/get-shit-done/workflows/pause-work.md +176 -0
  205. package/get-shit-done/workflows/plan-milestone-gaps.md +273 -0
  206. package/get-shit-done/workflows/plan-phase.md +859 -0
  207. package/get-shit-done/workflows/plant-seed.md +169 -0
  208. package/get-shit-done/workflows/pr-branch.md +129 -0
  209. package/get-shit-done/workflows/profile-user.md +450 -0
  210. package/get-shit-done/workflows/progress.md +507 -0
  211. package/get-shit-done/workflows/quick.md +757 -0
  212. package/get-shit-done/workflows/remove-phase.md +155 -0
  213. package/get-shit-done/workflows/remove-workspace.md +90 -0
  214. package/get-shit-done/workflows/research-phase.md +82 -0
  215. package/get-shit-done/workflows/resume-project.md +326 -0
  216. package/get-shit-done/workflows/review.md +228 -0
  217. package/get-shit-done/workflows/session-report.md +146 -0
  218. package/get-shit-done/workflows/settings.md +283 -0
  219. package/get-shit-done/workflows/ship.md +228 -0
  220. package/get-shit-done/workflows/stats.md +60 -0
  221. package/get-shit-done/workflows/transition.md +671 -0
  222. package/get-shit-done/workflows/ui-phase.md +302 -0
  223. package/get-shit-done/workflows/ui-review.md +165 -0
  224. package/get-shit-done/workflows/update.md +323 -0
  225. package/get-shit-done/workflows/validate-phase.md +174 -0
  226. package/get-shit-done/workflows/verify-phase.md +254 -0
  227. package/get-shit-done/workflows/verify-work.md +637 -0
  228. package/hooks/dist/gsd-check-update.js +114 -0
  229. package/hooks/dist/gsd-context-monitor.js +156 -0
  230. package/hooks/dist/gsd-prompt-guard.js +96 -0
  231. package/hooks/dist/gsd-statusline.js +119 -0
  232. package/hooks/dist/gsd-workflow-guard.js +94 -0
  233. package/package.json +52 -0
  234. package/scripts/base64-scan.sh +262 -0
  235. package/scripts/build-hooks.js +82 -0
  236. package/scripts/prompt-injection-scan.sh +198 -0
  237. package/scripts/run-tests.cjs +29 -0
  238. package/scripts/secret-scan.sh +227 -0
@@ -0,0 +1,228 @@
1
+ <purpose>
2
+ Cross-AI peer review — invoke external AI CLIs to independently review phase plans.
3
+ Each CLI gets the same prompt (PROJECT.md context, phase plans, requirements) and
4
+ produces structured feedback. Results are combined into REVIEWS.md for the planner
5
+ to incorporate via --reviews flag.
6
+
7
+ This implements adversarial review: different AI models catch different blind spots.
8
+ A plan that survives review from 2-3 independent AI systems is more robust.
9
+ </purpose>
10
+
11
+ <process>
12
+
13
+ <step name="detect_clis">
14
+ Check which AI CLIs are available on the system:
15
+
16
+ ```bash
17
+ # Check each CLI
18
+ command -v gemini >/dev/null 2>&1 && echo "gemini:available" || echo "gemini:missing"
19
+ command -v claude >/dev/null 2>&1 && echo "claude:available" || echo "claude:missing"
20
+ command -v codex >/dev/null 2>&1 && echo "codex:available" || echo "codex:missing"
21
+ ```
22
+
23
+ Parse flags from `$ARGUMENTS`:
24
+ - `--gemini` → include Gemini
25
+ - `--claude` → include Claude
26
+ - `--codex` → include Codex
27
+ - `--all` → include all available
28
+ - No flags → include all available
29
+
30
+ If no CLIs are available:
31
+ ```
32
+ No external AI CLIs found. Install at least one:
33
+ - gemini: https://github.com/google-gemini/gemini-cli
34
+ - codex: https://github.com/openai/codex
35
+ - claude: https://github.com/anthropics/claude-code
36
+
37
+ Then run /gsd:review again.
38
+ ```
39
+ Exit.
40
+
41
+ If only one CLI is the current runtime (e.g. running inside Claude), skip it for the review
42
+ to ensure independence. At least one DIFFERENT CLI must be available.
43
+ </step>
44
+
45
+ <step name="gather_context">
46
+ Collect phase artifacts for the review prompt:
47
+
48
+ ```bash
49
+ INIT=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" init phase-op "${PHASE_ARG}")
50
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
51
+ ```
52
+
53
+ Read from init: `phase_dir`, `phase_number`, `padded_phase`.
54
+
55
+ Then read:
56
+ 1. `.planning/PROJECT.md` (first 80 lines — project context)
57
+ 2. Phase section from `.planning/ROADMAP.md`
58
+ 3. All `*-PLAN.md` files in the phase directory
59
+ 4. `*-CONTEXT.md` if present (user decisions)
60
+ 5. `*-RESEARCH.md` if present (domain research)
61
+ 6. `.planning/REQUIREMENTS.md` (requirements this phase addresses)
62
+ </step>
63
+
64
+ <step name="build_prompt">
65
+ Build a structured review prompt:
66
+
67
+ ```markdown
68
+ # Cross-AI Plan Review Request
69
+
70
+ You are reviewing implementation plans for a software project phase.
71
+ Provide structured feedback on plan quality, completeness, and risks.
72
+
73
+ ## Project Context
74
+ {first 80 lines of PROJECT.md}
75
+
76
+ ## Phase {N}: {phase name}
77
+ ### Roadmap Section
78
+ {roadmap phase section}
79
+
80
+ ### Requirements Addressed
81
+ {requirements for this phase}
82
+
83
+ ### User Decisions (CONTEXT.md)
84
+ {context if present}
85
+
86
+ ### Research Findings
87
+ {research if present}
88
+
89
+ ### Plans to Review
90
+ {all PLAN.md contents}
91
+
92
+ ## Review Instructions
93
+
94
+ Analyze each plan and provide:
95
+
96
+ 1. **Summary** — One-paragraph assessment
97
+ 2. **Strengths** — What's well-designed (bullet points)
98
+ 3. **Concerns** — Potential issues, gaps, risks (bullet points with severity: HIGH/MEDIUM/LOW)
99
+ 4. **Suggestions** — Specific improvements (bullet points)
100
+ 5. **Risk Assessment** — Overall risk level (LOW/MEDIUM/HIGH) with justification
101
+
102
+ Focus on:
103
+ - Missing edge cases or error handling
104
+ - Dependency ordering issues
105
+ - Scope creep or over-engineering
106
+ - Security considerations
107
+ - Performance implications
108
+ - Whether the plans actually achieve the phase goals
109
+
110
+ Output your review in markdown format.
111
+ ```
112
+
113
+ Write to a temp file: `/tmp/gsd-review-prompt-{phase}.md`
114
+ </step>
115
+
116
+ <step name="invoke_reviewers">
117
+ For each selected CLI, invoke in sequence (not parallel — avoid rate limits):
118
+
119
+ **Gemini:**
120
+ ```bash
121
+ gemini -p "$(cat /tmp/gsd-review-prompt-{phase}.md)" 2>/dev/null > /tmp/gsd-review-gemini-{phase}.md
122
+ ```
123
+
124
+ **Claude (separate session):**
125
+ ```bash
126
+ claude -p "$(cat /tmp/gsd-review-prompt-{phase}.md)" --no-input 2>/dev/null > /tmp/gsd-review-claude-{phase}.md
127
+ ```
128
+
129
+ **Codex:**
130
+ ```bash
131
+ codex exec --skip-git-repo-check "$(cat /tmp/gsd-review-prompt-{phase}.md)" 2>/dev/null > /tmp/gsd-review-codex-{phase}.md
132
+ ```
133
+
134
+ If a CLI fails, log the error and continue with remaining CLIs.
135
+
136
+ Display progress:
137
+ ```
138
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
139
+ GSD ► CROSS-AI REVIEW — Phase {N}
140
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
141
+
142
+ ◆ Reviewing with {CLI}... done ✓
143
+ ◆ Reviewing with {CLI}... done ✓
144
+ ```
145
+ </step>
146
+
147
+ <step name="write_reviews">
148
+ Combine all review responses into `{phase_dir}/{padded_phase}-REVIEWS.md`:
149
+
150
+ ```markdown
151
+ ---
152
+ phase: {N}
153
+ reviewers: [gemini, claude, codex]
154
+ reviewed_at: {ISO timestamp}
155
+ plans_reviewed: [{list of PLAN.md files}]
156
+ ---
157
+
158
+ # Cross-AI Plan Review — Phase {N}
159
+
160
+ ## Gemini Review
161
+
162
+ {gemini review content}
163
+
164
+ ---
165
+
166
+ ## Claude Review
167
+
168
+ {claude review content}
169
+
170
+ ---
171
+
172
+ ## Codex Review
173
+
174
+ {codex review content}
175
+
176
+ ---
177
+
178
+ ## Consensus Summary
179
+
180
+ {synthesize common concerns across all reviewers}
181
+
182
+ ### Agreed Strengths
183
+ {strengths mentioned by 2+ reviewers}
184
+
185
+ ### Agreed Concerns
186
+ {concerns raised by 2+ reviewers — highest priority}
187
+
188
+ ### Divergent Views
189
+ {where reviewers disagreed — worth investigating}
190
+ ```
191
+
192
+ Commit:
193
+ ```bash
194
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "docs: cross-AI review for phase {N}" --files {phase_dir}/{padded_phase}-REVIEWS.md
195
+ ```
196
+ </step>
197
+
198
+ <step name="present_results">
199
+ Display summary:
200
+
201
+ ```
202
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
203
+ GSD ► REVIEW COMPLETE
204
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
205
+
206
+ Phase {N} reviewed by {count} AI systems.
207
+
208
+ Consensus concerns:
209
+ {top 3 shared concerns}
210
+
211
+ Full review: {padded_phase}-REVIEWS.md
212
+
213
+ To incorporate feedback into planning:
214
+ /gsd:plan-phase {N} --reviews
215
+ ```
216
+
217
+ Clean up temp files.
218
+ </step>
219
+
220
+ </process>
221
+
222
+ <success_criteria>
223
+ - [ ] At least one external CLI invoked successfully
224
+ - [ ] REVIEWS.md written with structured feedback
225
+ - [ ] Consensus summary synthesized from multiple reviewers
226
+ - [ ] Temp files cleaned up
227
+ - [ ] User knows how to use feedback (/gsd:plan-phase --reviews)
228
+ </success_criteria>
@@ -0,0 +1,146 @@
1
+ <purpose>
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
+ </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="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>
@@ -0,0 +1,283 @@
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 "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" config-ensure-section
16
+ INIT=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" state load)
17
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
18
+ ```
19
+
20
+ Creates `.planning/config.json` with defaults if missing and loads current config values.
21
+ </step>
22
+
23
+ <step name="read_current">
24
+ ```bash
25
+ cat .planning/config.json
26
+ ```
27
+
28
+ Parse current values (default to `true` if not present):
29
+ - `workflow.research` — spawn researcher during plan-phase
30
+ - `workflow.plan_check` — spawn plan checker during plan-phase
31
+ - `workflow.verifier` — spawn verifier during execute-phase
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)
35
+ - `model_profile` — which model each agent uses (default: `balanced`)
36
+ - `git.branching_strategy` — branching approach (default: `"none"`)
37
+ </step>
38
+
39
+ <step name="present_settings">
40
+ Use AskUserQuestion with current values pre-selected:
41
+
42
+ ```
43
+ AskUserQuestion([
44
+ {
45
+ question: "Which model profile for agents?",
46
+ header: "Model",
47
+ multiSelect: false,
48
+ options: [
49
+ { label: "Quality", description: "Opus everywhere except verification (highest cost)" },
50
+ { label: "Balanced (Recommended)", description: "Opus for planning, Sonnet for research/execution/verification" },
51
+ { label: "Budget", description: "Sonnet for writing, Haiku for research/verification (lowest cost)" },
52
+ { label: "Inherit", description: "Use current session model for all agents (best for OpenRouter, local models, or runtime model switching)" }
53
+ ]
54
+ },
55
+ {
56
+ question: "Spawn Plan Researcher? (researches domain before planning)",
57
+ header: "Research",
58
+ multiSelect: false,
59
+ options: [
60
+ { label: "Yes", description: "Research phase goals before planning" },
61
+ { label: "No", description: "Skip research, plan directly" }
62
+ ]
63
+ },
64
+ {
65
+ question: "Spawn Plan Checker? (verifies plans before execution)",
66
+ header: "Plan Check",
67
+ multiSelect: false,
68
+ options: [
69
+ { label: "Yes", description: "Verify plans meet phase goals" },
70
+ { label: "No", description: "Skip plan verification" }
71
+ ]
72
+ },
73
+ {
74
+ question: "Spawn Execution Verifier? (verifies phase completion)",
75
+ header: "Verifier",
76
+ multiSelect: false,
77
+ options: [
78
+ { label: "Yes", description: "Verify must-haves after execution" },
79
+ { label: "No", description: "Skip post-execution verification" }
80
+ ]
81
+ },
82
+ {
83
+ question: "Auto-advance pipeline? (discuss → plan → execute automatically)",
84
+ header: "Auto",
85
+ multiSelect: false,
86
+ options: [
87
+ { label: "No (Recommended)", description: "Manual /clear + paste between stages" },
88
+ { label: "Yes", description: "Chain stages via Task() subagents (same isolation)" }
89
+ ]
90
+ },
91
+ {
92
+ question: "Enable Nyquist Validation? (researches test coverage during planning)",
93
+ header: "Nyquist",
94
+ multiSelect: false,
95
+ options: [
96
+ { label: "Yes (Recommended)", description: "Research automated test coverage during plan-phase. Adds validation requirements to plans. Blocks approval if tasks lack automated verify." },
97
+ { label: "No", description: "Skip validation research. Good for rapid prototyping or no-test phases." }
98
+ ]
99
+ },
100
+ // Note: Nyquist validation depends on research output. If research is disabled,
101
+ // plan-phase automatically skips Nyquist steps (no RESEARCH.md to extract from).
102
+ {
103
+ question: "Enable UI Phase? (generates UI-SPEC.md design contracts for frontend phases)",
104
+ header: "UI Phase",
105
+ multiSelect: false,
106
+ options: [
107
+ { label: "Yes (Recommended)", description: "Generate UI design contracts before planning frontend phases. Locks spacing, typography, color, and copywriting." },
108
+ { label: "No", description: "Skip UI-SPEC generation. Good for backend-only projects or API phases." }
109
+ ]
110
+ },
111
+ {
112
+ question: "Enable UI Safety Gate? (prompts to run /gsd:ui-phase before planning frontend phases)",
113
+ header: "UI Gate",
114
+ multiSelect: false,
115
+ options: [
116
+ { label: "Yes (Recommended)", description: "plan-phase asks to run /gsd:ui-phase first when frontend indicators detected." },
117
+ { label: "No", description: "No prompt — plan-phase proceeds without UI-SPEC check." }
118
+ ]
119
+ },
120
+ {
121
+ question: "Git branching strategy?",
122
+ header: "Branching",
123
+ multiSelect: false,
124
+ options: [
125
+ { label: "None (Recommended)", description: "Commit directly to current branch" },
126
+ { label: "Per Phase", description: "Create branch for each phase (gsd/phase-{N}-{name})" },
127
+ { label: "Per Milestone", description: "Create branch for entire milestone (gsd/{version}-{name})" }
128
+ ]
129
+ },
130
+ {
131
+ question: "Enable context window warnings? (injects advisory messages when context is getting full)",
132
+ header: "Ctx Warnings",
133
+ multiSelect: false,
134
+ options: [
135
+ { label: "Yes (Recommended)", description: "Warn when context usage exceeds 65%. Helps avoid losing work." },
136
+ { label: "No", description: "Disable warnings. Allows Claude to reach auto-compact naturally. Good for long unattended runs." }
137
+ ]
138
+ },
139
+ {
140
+ question: "Research best practices before asking questions? (web search during new-project and discuss-phase)",
141
+ header: "Research Qs",
142
+ multiSelect: false,
143
+ options: [
144
+ { label: "No (Recommended)", description: "Ask questions directly. Faster, uses fewer tokens." },
145
+ { label: "Yes", description: "Search web for best practices before each question group. More informed questions but uses more tokens." }
146
+ ]
147
+ },
148
+ {
149
+ question: "Skip discuss-phase in autonomous mode? (use ROADMAP phase goals as spec)",
150
+ header: "Skip Discuss",
151
+ multiSelect: false,
152
+ options: [
153
+ { label: "No (Recommended)", description: "Run smart discuss before each phase — surfaces gray areas and captures decisions." },
154
+ { label: "Yes", description: "Skip discuss in /gsd:autonomous — chain directly to plan. Best for backend/pipeline work where phase descriptions are the spec." }
155
+ ]
156
+ }
157
+ ])
158
+ ```
159
+ </step>
160
+
161
+ <step name="update_config">
162
+ Merge new settings into existing config.json:
163
+
164
+ ```json
165
+ {
166
+ ...existing_config,
167
+ "model_profile": "quality" | "balanced" | "budget" | "inherit",
168
+ "workflow": {
169
+ "research": true/false,
170
+ "plan_check": true/false,
171
+ "verifier": true/false,
172
+ "auto_advance": true/false,
173
+ "nyquist_validation": true/false,
174
+ "ui_phase": true/false,
175
+ "ui_safety_gate": true/false,
176
+ "text_mode": true/false,
177
+ "research_before_questions": true/false,
178
+ "discuss_mode": "discuss" | "assumptions",
179
+ "skip_discuss": true/false
180
+ },
181
+ "git": {
182
+ "branching_strategy": "none" | "phase" | "milestone",
183
+ "quick_branch_template": <string|null>
184
+ },
185
+ "hooks": {
186
+ "context_warnings": true/false,
187
+ "workflow_guard": true/false
188
+ }
189
+ }
190
+ ```
191
+
192
+ Write updated config to `.planning/config.json`.
193
+ </step>
194
+
195
+ <step name="save_as_defaults">
196
+ Ask whether to save these settings as global defaults for future projects:
197
+
198
+ ```
199
+ AskUserQuestion([
200
+ {
201
+ question: "Save these as default settings for all new projects?",
202
+ header: "Defaults",
203
+ multiSelect: false,
204
+ options: [
205
+ { label: "Yes", description: "New projects start with these settings (saved to ~/.gsd/defaults.json)" },
206
+ { label: "No", description: "Only apply to this project" }
207
+ ]
208
+ }
209
+ ])
210
+ ```
211
+
212
+ If "Yes": write the same config object (minus project-specific fields like `brave_search`) to `~/.gsd/defaults.json`:
213
+
214
+ ```bash
215
+ mkdir -p ~/.gsd
216
+ ```
217
+
218
+ Write `~/.gsd/defaults.json` with:
219
+ ```json
220
+ {
221
+ "mode": <current>,
222
+ "granularity": <current>,
223
+ "model_profile": <current>,
224
+ "commit_docs": <current>,
225
+ "parallelization": <current>,
226
+ "branching_strategy": <current>,
227
+ "quick_branch_template": <current>,
228
+ "workflow": {
229
+ "research": <current>,
230
+ "plan_check": <current>,
231
+ "verifier": <current>,
232
+ "auto_advance": <current>,
233
+ "nyquist_validation": <current>,
234
+ "ui_phase": <current>,
235
+ "ui_safety_gate": <current>,
236
+ "skip_discuss": <current>
237
+ }
238
+ }
239
+ ```
240
+ </step>
241
+
242
+ <step name="confirm">
243
+ Display:
244
+
245
+ ```
246
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
247
+ GSD ► SETTINGS UPDATED
248
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
249
+
250
+ | Setting | Value |
251
+ |----------------------|-------|
252
+ | Model Profile | {quality/balanced/budget/inherit} |
253
+ | Plan Researcher | {On/Off} |
254
+ | Plan Checker | {On/Off} |
255
+ | Execution Verifier | {On/Off} |
256
+ | Auto-Advance | {On/Off} |
257
+ | Nyquist Validation | {On/Off} |
258
+ | UI Phase | {On/Off} |
259
+ | UI Safety Gate | {On/Off} |
260
+ | Git Branching | {None/Per Phase/Per Milestone} |
261
+ | Skip Discuss | {On/Off} |
262
+ | Context Warnings | {On/Off} |
263
+ | Saved as Defaults | {Yes/No} |
264
+
265
+ These settings apply to future /gsd:plan-phase and /gsd:execute-phase runs.
266
+
267
+ Quick commands:
268
+ - /gsd:set-profile <profile> — switch model profile
269
+ - /gsd:plan-phase --research — force research
270
+ - /gsd:plan-phase --skip-research — skip research
271
+ - /gsd:plan-phase --skip-verify — skip plan check
272
+ ```
273
+ </step>
274
+
275
+ </process>
276
+
277
+ <success_criteria>
278
+ - [ ] Current config read
279
+ - [ ] User presented with 10 settings (profile + 8 workflow toggles + git branching)
280
+ - [ ] Config updated with model_profile, workflow, and git sections
281
+ - [ ] User offered to save as global defaults (~/.gsd/defaults.json)
282
+ - [ ] Changes confirmed to user
283
+ </success_criteria>