gsd-remix 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 (554) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +939 -0
  3. package/README.zh-CN.md +876 -0
  4. package/agents/gsd-advisor-researcher.md +127 -0
  5. package/agents/gsd-ai-researcher.md +133 -0
  6. package/agents/gsd-assumptions-analyzer.md +105 -0
  7. package/agents/gsd-code-fixer.md +517 -0
  8. package/agents/gsd-code-reviewer.md +371 -0
  9. package/agents/gsd-codebase-mapper.md +781 -0
  10. package/agents/gsd-debug-session-manager.md +314 -0
  11. package/agents/gsd-debugger.md +1452 -0
  12. package/agents/gsd-doc-classifier.md +168 -0
  13. package/agents/gsd-doc-synthesizer.md +204 -0
  14. package/agents/gsd-doc-verifier.md +217 -0
  15. package/agents/gsd-doc-writer.md +615 -0
  16. package/agents/gsd-domain-researcher.md +153 -0
  17. package/agents/gsd-eval-auditor.md +191 -0
  18. package/agents/gsd-eval-planner.md +154 -0
  19. package/agents/gsd-executor.md +603 -0
  20. package/agents/gsd-framework-selector.md +160 -0
  21. package/agents/gsd-integration-checker.md +470 -0
  22. package/agents/gsd-intel-updater.md +334 -0
  23. package/agents/gsd-nyquist-auditor.md +203 -0
  24. package/agents/gsd-pattern-mapper.md +335 -0
  25. package/agents/gsd-phase-researcher.md +841 -0
  26. package/agents/gsd-plan-checker.md +978 -0
  27. package/agents/gsd-planner.md +1251 -0
  28. package/agents/gsd-project-researcher.md +677 -0
  29. package/agents/gsd-research-synthesizer.md +247 -0
  30. package/agents/gsd-roadmapper.md +688 -0
  31. package/agents/gsd-security-auditor.md +155 -0
  32. package/agents/gsd-ui-auditor.md +495 -0
  33. package/agents/gsd-ui-checker.md +309 -0
  34. package/agents/gsd-ui-researcher.md +380 -0
  35. package/agents/gsd-user-profiler.md +171 -0
  36. package/agents/gsd-verifier.md +830 -0
  37. package/bin/install.js +7062 -0
  38. package/commands/gsd/add-backlog.md +79 -0
  39. package/commands/gsd/add-phase.md +43 -0
  40. package/commands/gsd/add-tests.md +41 -0
  41. package/commands/gsd/add-todo.md +47 -0
  42. package/commands/gsd/ai-integration-phase.md +36 -0
  43. package/commands/gsd/analyze-dependencies.md +34 -0
  44. package/commands/gsd/audit-fix.md +33 -0
  45. package/commands/gsd/audit-milestone.md +36 -0
  46. package/commands/gsd/audit-uat.md +24 -0
  47. package/commands/gsd/autonomous.md +46 -0
  48. package/commands/gsd/check-todos.md +45 -0
  49. package/commands/gsd/cleanup.md +23 -0
  50. package/commands/gsd/code-review-fix.md +52 -0
  51. package/commands/gsd/code-review.md +55 -0
  52. package/commands/gsd/complete-milestone.md +136 -0
  53. package/commands/gsd/debug.md +263 -0
  54. package/commands/gsd/discuss-phase.md +69 -0
  55. package/commands/gsd/do.md +30 -0
  56. package/commands/gsd/docs-update.md +48 -0
  57. package/commands/gsd/eval-review.md +32 -0
  58. package/commands/gsd/execute-phase.md +63 -0
  59. package/commands/gsd/explore.md +27 -0
  60. package/commands/gsd/extract_learnings.md +22 -0
  61. package/commands/gsd/fast.md +30 -0
  62. package/commands/gsd/forensics.md +56 -0
  63. package/commands/gsd/from-gsd2.md +47 -0
  64. package/commands/gsd/graphify.md +201 -0
  65. package/commands/gsd/health.md +22 -0
  66. package/commands/gsd/help.md +24 -0
  67. package/commands/gsd/import.md +37 -0
  68. package/commands/gsd/inbox.md +38 -0
  69. package/commands/gsd/ingest-docs.md +42 -0
  70. package/commands/gsd/insert-phase.md +32 -0
  71. package/commands/gsd/intel.md +179 -0
  72. package/commands/gsd/join-discord.md +19 -0
  73. package/commands/gsd/list-phase-assumptions.md +46 -0
  74. package/commands/gsd/list-workspaces.md +19 -0
  75. package/commands/gsd/manager.md +40 -0
  76. package/commands/gsd/map-codebase.md +71 -0
  77. package/commands/gsd/milestone-summary.md +51 -0
  78. package/commands/gsd/new-milestone.md +44 -0
  79. package/commands/gsd/new-project.md +46 -0
  80. package/commands/gsd/new-workspace.md +44 -0
  81. package/commands/gsd/next.md +28 -0
  82. package/commands/gsd/note.md +34 -0
  83. package/commands/gsd/pause-work.md +38 -0
  84. package/commands/gsd/plan-milestone-gaps.md +34 -0
  85. package/commands/gsd/plan-phase.md +52 -0
  86. package/commands/gsd/plan-review-convergence.md +52 -0
  87. package/commands/gsd/plant-seed.md +28 -0
  88. package/commands/gsd/pr-branch.md +25 -0
  89. package/commands/gsd/profile-user.md +46 -0
  90. package/commands/gsd/progress.md +25 -0
  91. package/commands/gsd/quick.md +173 -0
  92. package/commands/gsd/reapply-patches.md +331 -0
  93. package/commands/gsd/remove-phase.md +31 -0
  94. package/commands/gsd/remove-workspace.md +26 -0
  95. package/commands/gsd/research-phase.md +195 -0
  96. package/commands/gsd/resume-work.md +40 -0
  97. package/commands/gsd/review-backlog.md +62 -0
  98. package/commands/gsd/review.md +40 -0
  99. package/commands/gsd/scan.md +26 -0
  100. package/commands/gsd/secure-phase.md +35 -0
  101. package/commands/gsd/session-report.md +19 -0
  102. package/commands/gsd/set-profile.md +12 -0
  103. package/commands/gsd/settings.md +36 -0
  104. package/commands/gsd/ship.md +23 -0
  105. package/commands/gsd/sketch-wrap-up.md +31 -0
  106. package/commands/gsd/sketch.md +49 -0
  107. package/commands/gsd/spec-phase.md +62 -0
  108. package/commands/gsd/spike-wrap-up.md +31 -0
  109. package/commands/gsd/spike.md +46 -0
  110. package/commands/gsd/stats.md +18 -0
  111. package/commands/gsd/sync-skills.md +19 -0
  112. package/commands/gsd/thread.md +227 -0
  113. package/commands/gsd/ui-phase.md +34 -0
  114. package/commands/gsd/ui-review.md +32 -0
  115. package/commands/gsd/ultraplan-phase.md +33 -0
  116. package/commands/gsd/undo.md +34 -0
  117. package/commands/gsd/update.md +37 -0
  118. package/commands/gsd/validate-phase.md +35 -0
  119. package/commands/gsd/verify-work.md +38 -0
  120. package/commands/gsd/workstreams.md +69 -0
  121. package/get-shit-done/bin/gsd-tools.cjs +1263 -0
  122. package/get-shit-done/bin/lib/artifacts.cjs +52 -0
  123. package/get-shit-done/bin/lib/audit.cjs +757 -0
  124. package/get-shit-done/bin/lib/commands.cjs +1023 -0
  125. package/get-shit-done/bin/lib/config-schema.cjs +79 -0
  126. package/get-shit-done/bin/lib/config.cjs +463 -0
  127. package/get-shit-done/bin/lib/core.cjs +1794 -0
  128. package/get-shit-done/bin/lib/docs.cjs +267 -0
  129. package/get-shit-done/bin/lib/frontmatter.cjs +379 -0
  130. package/get-shit-done/bin/lib/graphify.cjs +494 -0
  131. package/get-shit-done/bin/lib/gsd2-import.cjs +511 -0
  132. package/get-shit-done/bin/lib/init.cjs +1878 -0
  133. package/get-shit-done/bin/lib/intel.cjs +639 -0
  134. package/get-shit-done/bin/lib/learnings.cjs +378 -0
  135. package/get-shit-done/bin/lib/milestone.cjs +283 -0
  136. package/get-shit-done/bin/lib/model-profiles.cjs +71 -0
  137. package/get-shit-done/bin/lib/phase.cjs +1058 -0
  138. package/get-shit-done/bin/lib/profile-output.cjs +1080 -0
  139. package/get-shit-done/bin/lib/profile-pipeline.cjs +539 -0
  140. package/get-shit-done/bin/lib/roadmap.cjs +523 -0
  141. package/get-shit-done/bin/lib/schema-detect.cjs +238 -0
  142. package/get-shit-done/bin/lib/security.cjs +504 -0
  143. package/get-shit-done/bin/lib/state.cjs +1649 -0
  144. package/get-shit-done/bin/lib/template.cjs +226 -0
  145. package/get-shit-done/bin/lib/uat.cjs +288 -0
  146. package/get-shit-done/bin/lib/verify.cjs +1184 -0
  147. package/get-shit-done/bin/lib/workstream.cjs +495 -0
  148. package/get-shit-done/bin/repair-sdk.cjs +177 -0
  149. package/get-shit-done/contexts/dev.md +21 -0
  150. package/get-shit-done/contexts/research.md +22 -0
  151. package/get-shit-done/contexts/review.md +22 -0
  152. package/get-shit-done/references/agent-contracts.md +79 -0
  153. package/get-shit-done/references/ai-evals.md +156 -0
  154. package/get-shit-done/references/ai-frameworks.md +186 -0
  155. package/get-shit-done/references/artifact-types.md +131 -0
  156. package/get-shit-done/references/autonomous-smart-discuss.md +277 -0
  157. package/get-shit-done/references/checkpoints.md +808 -0
  158. package/get-shit-done/references/common-bug-patterns.md +114 -0
  159. package/get-shit-done/references/context-budget.md +49 -0
  160. package/get-shit-done/references/continuation-format.md +253 -0
  161. package/get-shit-done/references/debugger-philosophy.md +76 -0
  162. package/get-shit-done/references/decimal-phase-calculation.md +64 -0
  163. package/get-shit-done/references/doc-conflict-engine.md +91 -0
  164. package/get-shit-done/references/domain-probes.md +125 -0
  165. package/get-shit-done/references/executor-examples.md +110 -0
  166. package/get-shit-done/references/few-shot-examples/plan-checker.md +73 -0
  167. package/get-shit-done/references/few-shot-examples/verifier.md +109 -0
  168. package/get-shit-done/references/gate-prompts.md +100 -0
  169. package/get-shit-done/references/gates.md +70 -0
  170. package/get-shit-done/references/git-integration.md +295 -0
  171. package/get-shit-done/references/git-planning-commit.md +40 -0
  172. package/get-shit-done/references/ios-scaffold.md +123 -0
  173. package/get-shit-done/references/mandatory-initial-read.md +2 -0
  174. package/get-shit-done/references/model-profile-resolution.md +38 -0
  175. package/get-shit-done/references/model-profiles.md +145 -0
  176. package/get-shit-done/references/phase-argument-parsing.md +61 -0
  177. package/get-shit-done/references/planner-antipatterns.md +89 -0
  178. package/get-shit-done/references/planner-gap-closure.md +62 -0
  179. package/get-shit-done/references/planner-reviews.md +39 -0
  180. package/get-shit-done/references/planner-revision.md +87 -0
  181. package/get-shit-done/references/planner-source-audit.md +73 -0
  182. package/get-shit-done/references/planning-config.md +460 -0
  183. package/get-shit-done/references/project-skills-discovery.md +19 -0
  184. package/get-shit-done/references/questioning.md +162 -0
  185. package/get-shit-done/references/revision-loop.md +97 -0
  186. package/get-shit-done/references/sketch-interactivity.md +41 -0
  187. package/get-shit-done/references/sketch-theme-system.md +94 -0
  188. package/get-shit-done/references/sketch-tooling.md +45 -0
  189. package/get-shit-done/references/sketch-variant-patterns.md +81 -0
  190. package/get-shit-done/references/tdd.md +330 -0
  191. package/get-shit-done/references/thinking-models-debug.md +44 -0
  192. package/get-shit-done/references/thinking-models-execution.md +50 -0
  193. package/get-shit-done/references/thinking-models-planning.md +62 -0
  194. package/get-shit-done/references/thinking-models-research.md +50 -0
  195. package/get-shit-done/references/thinking-models-verification.md +55 -0
  196. package/get-shit-done/references/thinking-partner.md +96 -0
  197. package/get-shit-done/references/ui-brand.md +160 -0
  198. package/get-shit-done/references/universal-anti-patterns.md +63 -0
  199. package/get-shit-done/references/user-profiling.md +681 -0
  200. package/get-shit-done/references/verification-overrides.md +227 -0
  201. package/get-shit-done/references/verification-patterns.md +612 -0
  202. package/get-shit-done/references/workstream-flag.md +111 -0
  203. package/get-shit-done/templates/AI-SPEC.md +246 -0
  204. package/get-shit-done/templates/DEBUG.md +169 -0
  205. package/get-shit-done/templates/README.md +76 -0
  206. package/get-shit-done/templates/SECURITY.md +61 -0
  207. package/get-shit-done/templates/UAT.md +265 -0
  208. package/get-shit-done/templates/UI-SPEC.md +100 -0
  209. package/get-shit-done/templates/VALIDATION.md +76 -0
  210. package/get-shit-done/templates/claude-md.md +145 -0
  211. package/get-shit-done/templates/codebase/architecture.md +255 -0
  212. package/get-shit-done/templates/codebase/concerns.md +310 -0
  213. package/get-shit-done/templates/codebase/conventions.md +307 -0
  214. package/get-shit-done/templates/codebase/integrations.md +280 -0
  215. package/get-shit-done/templates/codebase/stack.md +186 -0
  216. package/get-shit-done/templates/codebase/structure.md +285 -0
  217. package/get-shit-done/templates/codebase/testing.md +480 -0
  218. package/get-shit-done/templates/config.json +56 -0
  219. package/get-shit-done/templates/context.md +352 -0
  220. package/get-shit-done/templates/continue-here.md +78 -0
  221. package/get-shit-done/templates/copilot-instructions.md +7 -0
  222. package/get-shit-done/templates/debug-subagent-prompt.md +91 -0
  223. package/get-shit-done/templates/dev-preferences.md +21 -0
  224. package/get-shit-done/templates/discovery.md +146 -0
  225. package/get-shit-done/templates/discussion-log.md +63 -0
  226. package/get-shit-done/templates/milestone-archive.md +123 -0
  227. package/get-shit-done/templates/milestone.md +115 -0
  228. package/get-shit-done/templates/phase-prompt.md +610 -0
  229. package/get-shit-done/templates/planner-subagent-prompt.md +117 -0
  230. package/get-shit-done/templates/project.md +186 -0
  231. package/get-shit-done/templates/requirements.md +231 -0
  232. package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
  233. package/get-shit-done/templates/research-project/FEATURES.md +147 -0
  234. package/get-shit-done/templates/research-project/PITFALLS.md +200 -0
  235. package/get-shit-done/templates/research-project/STACK.md +120 -0
  236. package/get-shit-done/templates/research-project/SUMMARY.md +170 -0
  237. package/get-shit-done/templates/research.md +592 -0
  238. package/get-shit-done/templates/retrospective.md +54 -0
  239. package/get-shit-done/templates/roadmap.md +202 -0
  240. package/get-shit-done/templates/spec.md +307 -0
  241. package/get-shit-done/templates/state.md +184 -0
  242. package/get-shit-done/templates/summary-complex.md +59 -0
  243. package/get-shit-done/templates/summary-minimal.md +41 -0
  244. package/get-shit-done/templates/summary-standard.md +48 -0
  245. package/get-shit-done/templates/summary.md +248 -0
  246. package/get-shit-done/templates/user-profile.md +146 -0
  247. package/get-shit-done/templates/user-setup.md +311 -0
  248. package/get-shit-done/templates/verification-report.md +322 -0
  249. package/get-shit-done/workflows/add-phase.md +112 -0
  250. package/get-shit-done/workflows/add-tests.md +354 -0
  251. package/get-shit-done/workflows/add-todo.md +160 -0
  252. package/get-shit-done/workflows/ai-integration-phase.md +284 -0
  253. package/get-shit-done/workflows/analyze-dependencies.md +96 -0
  254. package/get-shit-done/workflows/audit-fix.md +175 -0
  255. package/get-shit-done/workflows/audit-milestone.md +340 -0
  256. package/get-shit-done/workflows/audit-uat.md +109 -0
  257. package/get-shit-done/workflows/autonomous.md +789 -0
  258. package/get-shit-done/workflows/check-todos.md +179 -0
  259. package/get-shit-done/workflows/cleanup.md +154 -0
  260. package/get-shit-done/workflows/code-review-fix.md +497 -0
  261. package/get-shit-done/workflows/code-review.md +515 -0
  262. package/get-shit-done/workflows/complete-milestone.md +847 -0
  263. package/get-shit-done/workflows/diagnose-issues.md +238 -0
  264. package/get-shit-done/workflows/discovery-phase.md +291 -0
  265. package/get-shit-done/workflows/discuss-phase-assumptions.md +670 -0
  266. package/get-shit-done/workflows/discuss-phase-power.md +308 -0
  267. package/get-shit-done/workflows/discuss-phase.md +1378 -0
  268. package/get-shit-done/workflows/do.md +110 -0
  269. package/get-shit-done/workflows/docs-update.md +1155 -0
  270. package/get-shit-done/workflows/eval-review.md +155 -0
  271. package/get-shit-done/workflows/execute-phase.md +1677 -0
  272. package/get-shit-done/workflows/execute-plan.md +533 -0
  273. package/get-shit-done/workflows/explore.md +141 -0
  274. package/get-shit-done/workflows/extract_learnings.md +242 -0
  275. package/get-shit-done/workflows/fast.md +105 -0
  276. package/get-shit-done/workflows/forensics.md +265 -0
  277. package/get-shit-done/workflows/graduation.md +195 -0
  278. package/get-shit-done/workflows/health.md +314 -0
  279. package/get-shit-done/workflows/help.md +667 -0
  280. package/get-shit-done/workflows/import.md +246 -0
  281. package/get-shit-done/workflows/inbox.md +387 -0
  282. package/get-shit-done/workflows/ingest-docs.md +328 -0
  283. package/get-shit-done/workflows/insert-phase.md +130 -0
  284. package/get-shit-done/workflows/list-phase-assumptions.md +178 -0
  285. package/get-shit-done/workflows/list-workspaces.md +56 -0
  286. package/get-shit-done/workflows/manager.md +365 -0
  287. package/get-shit-done/workflows/map-codebase.md +393 -0
  288. package/get-shit-done/workflows/milestone-summary.md +223 -0
  289. package/get-shit-done/workflows/new-milestone.md +611 -0
  290. package/get-shit-done/workflows/new-project.md +1391 -0
  291. package/get-shit-done/workflows/new-workspace.md +239 -0
  292. package/get-shit-done/workflows/next.md +220 -0
  293. package/get-shit-done/workflows/node-repair.md +92 -0
  294. package/get-shit-done/workflows/note.md +158 -0
  295. package/get-shit-done/workflows/pause-work.md +243 -0
  296. package/get-shit-done/workflows/plan-milestone-gaps.md +273 -0
  297. package/get-shit-done/workflows/plan-phase.md +1349 -0
  298. package/get-shit-done/workflows/plan-review-convergence.md +254 -0
  299. package/get-shit-done/workflows/plant-seed.md +172 -0
  300. package/get-shit-done/workflows/pr-branch.md +157 -0
  301. package/get-shit-done/workflows/profile-user.md +452 -0
  302. package/get-shit-done/workflows/progress.md +619 -0
  303. package/get-shit-done/workflows/quick.md +970 -0
  304. package/get-shit-done/workflows/remove-phase.md +155 -0
  305. package/get-shit-done/workflows/remove-workspace.md +92 -0
  306. package/get-shit-done/workflows/research-phase.md +89 -0
  307. package/get-shit-done/workflows/resume-project.md +326 -0
  308. package/get-shit-done/workflows/review.md +344 -0
  309. package/get-shit-done/workflows/scan.md +102 -0
  310. package/get-shit-done/workflows/secure-phase.md +166 -0
  311. package/get-shit-done/workflows/session-report.md +146 -0
  312. package/get-shit-done/workflows/settings.md +319 -0
  313. package/get-shit-done/workflows/ship.md +302 -0
  314. package/get-shit-done/workflows/sketch-wrap-up.md +283 -0
  315. package/get-shit-done/workflows/sketch.md +286 -0
  316. package/get-shit-done/workflows/spec-phase.md +262 -0
  317. package/get-shit-done/workflows/spike-wrap-up.md +281 -0
  318. package/get-shit-done/workflows/spike.md +362 -0
  319. package/get-shit-done/workflows/stats.md +60 -0
  320. package/get-shit-done/workflows/sync-skills.md +182 -0
  321. package/get-shit-done/workflows/transition.md +693 -0
  322. package/get-shit-done/workflows/ui-phase.md +323 -0
  323. package/get-shit-done/workflows/ui-review.md +190 -0
  324. package/get-shit-done/workflows/ultraplan-phase.md +189 -0
  325. package/get-shit-done/workflows/undo.md +314 -0
  326. package/get-shit-done/workflows/update.md +587 -0
  327. package/get-shit-done/workflows/validate-phase.md +176 -0
  328. package/get-shit-done/workflows/verify-phase.md +465 -0
  329. package/get-shit-done/workflows/verify-work.md +740 -0
  330. package/hooks/dist/gsd-check-update-worker.js +108 -0
  331. package/hooks/dist/gsd-check-update.js +64 -0
  332. package/hooks/dist/gsd-context-monitor.js +192 -0
  333. package/hooks/dist/gsd-phase-boundary.sh +28 -0
  334. package/hooks/dist/gsd-prompt-guard.js +97 -0
  335. package/hooks/dist/gsd-read-guard.js +82 -0
  336. package/hooks/dist/gsd-read-injection-scanner.js +152 -0
  337. package/hooks/dist/gsd-session-state.sh +34 -0
  338. package/hooks/dist/gsd-statusline.js +293 -0
  339. package/hooks/dist/gsd-validate-commit.sh +48 -0
  340. package/hooks/dist/gsd-workflow-guard.js +94 -0
  341. package/hooks/gsd-check-update-worker.js +108 -0
  342. package/hooks/gsd-check-update.js +64 -0
  343. package/hooks/gsd-context-monitor.js +192 -0
  344. package/hooks/gsd-phase-boundary.sh +28 -0
  345. package/hooks/gsd-prompt-guard.js +97 -0
  346. package/hooks/gsd-read-guard.js +82 -0
  347. package/hooks/gsd-read-injection-scanner.js +152 -0
  348. package/hooks/gsd-session-state.sh +34 -0
  349. package/hooks/gsd-statusline.js +293 -0
  350. package/hooks/gsd-validate-commit.sh +48 -0
  351. package/hooks/gsd-workflow-guard.js +94 -0
  352. package/package.json +59 -0
  353. package/scripts/base64-scan.sh +262 -0
  354. package/scripts/build-hooks.js +95 -0
  355. package/scripts/gen-inventory-manifest.cjs +109 -0
  356. package/scripts/prompt-injection-scan.sh +201 -0
  357. package/scripts/run-tests.cjs +33 -0
  358. package/scripts/secret-scan.sh +227 -0
  359. package/sdk/package-lock.json +1998 -0
  360. package/sdk/package.json +52 -0
  361. package/sdk/prompts/agents/gsd-executor.md +110 -0
  362. package/sdk/prompts/agents/gsd-phase-researcher.md +158 -0
  363. package/sdk/prompts/agents/gsd-plan-checker.md +160 -0
  364. package/sdk/prompts/agents/gsd-planner.md +214 -0
  365. package/sdk/prompts/agents/gsd-project-researcher.md +323 -0
  366. package/sdk/prompts/agents/gsd-research-synthesizer.md +237 -0
  367. package/sdk/prompts/agents/gsd-roadmapper.md +670 -0
  368. package/sdk/prompts/agents/gsd-verifier.md +159 -0
  369. package/sdk/prompts/templates/project.md +186 -0
  370. package/sdk/prompts/templates/requirements.md +231 -0
  371. package/sdk/prompts/templates/research-project/ARCHITECTURE.md +204 -0
  372. package/sdk/prompts/templates/research-project/FEATURES.md +147 -0
  373. package/sdk/prompts/templates/research-project/PITFALLS.md +200 -0
  374. package/sdk/prompts/templates/research-project/STACK.md +120 -0
  375. package/sdk/prompts/templates/research-project/SUMMARY.md +170 -0
  376. package/sdk/prompts/templates/roadmap.md +202 -0
  377. package/sdk/prompts/templates/state.md +175 -0
  378. package/sdk/prompts/workflows/discuss-phase.md +126 -0
  379. package/sdk/prompts/workflows/execute-plan.md +106 -0
  380. package/sdk/prompts/workflows/plan-phase.md +84 -0
  381. package/sdk/prompts/workflows/research-phase.md +45 -0
  382. package/sdk/prompts/workflows/verify-phase.md +142 -0
  383. package/sdk/src/assembled-prompts.test.ts +349 -0
  384. package/sdk/src/cli-transport.test.ts +388 -0
  385. package/sdk/src/cli-transport.ts +130 -0
  386. package/sdk/src/cli.test.ts +383 -0
  387. package/sdk/src/cli.ts +670 -0
  388. package/sdk/src/config.test.ts +168 -0
  389. package/sdk/src/config.ts +177 -0
  390. package/sdk/src/context-engine.test.ts +295 -0
  391. package/sdk/src/context-engine.ts +170 -0
  392. package/sdk/src/context-truncation.test.ts +163 -0
  393. package/sdk/src/context-truncation.ts +233 -0
  394. package/sdk/src/e2e.integration.test.ts +178 -0
  395. package/sdk/src/errors.ts +72 -0
  396. package/sdk/src/event-stream.test.ts +661 -0
  397. package/sdk/src/event-stream.ts +441 -0
  398. package/sdk/src/failure-memory.test.ts +457 -0
  399. package/sdk/src/failure-memory.ts +1324 -0
  400. package/sdk/src/golden/capture.ts +95 -0
  401. package/sdk/src/golden/fixtures/generate-slug.golden.json +1 -0
  402. package/sdk/src/golden/fixtures/profile-sample-sessions/demo-project/sample.jsonl +3 -0
  403. package/sdk/src/golden/fixtures/summary-extract-sample.md +26 -0
  404. package/sdk/src/golden/fixtures/uat-render-checkpoint-sample.md +15 -0
  405. package/sdk/src/golden/golden-integration-covered.ts +30 -0
  406. package/sdk/src/golden/golden-mutation-covered.ts +7 -0
  407. package/sdk/src/golden/golden-policy.test.ts +8 -0
  408. package/sdk/src/golden/golden-policy.ts +112 -0
  409. package/sdk/src/golden/golden.integration.test.ts +373 -0
  410. package/sdk/src/golden/init-golden-normalize.ts +15 -0
  411. package/sdk/src/golden/read-only-golden-rows.ts +77 -0
  412. package/sdk/src/golden/read-only-parity.integration.test.ts +125 -0
  413. package/sdk/src/golden/registry-canonical-commands.ts +31 -0
  414. package/sdk/src/gsd-tools.test.ts +409 -0
  415. package/sdk/src/gsd-tools.ts +595 -0
  416. package/sdk/src/headless-prompts.test.ts +159 -0
  417. package/sdk/src/index.ts +333 -0
  418. package/sdk/src/init-e2e.integration.test.ts +136 -0
  419. package/sdk/src/init-runner.test.ts +783 -0
  420. package/sdk/src/init-runner.ts +735 -0
  421. package/sdk/src/lifecycle-e2e.integration.test.ts +258 -0
  422. package/sdk/src/logger.test.ts +149 -0
  423. package/sdk/src/logger.ts +113 -0
  424. package/sdk/src/milestone-runner.test.ts +421 -0
  425. package/sdk/src/phase-prompt.test.ts +538 -0
  426. package/sdk/src/phase-prompt.ts +264 -0
  427. package/sdk/src/phase-runner-types.test.ts +421 -0
  428. package/sdk/src/phase-runner.integration.test.ts +377 -0
  429. package/sdk/src/phase-runner.test.ts +2333 -0
  430. package/sdk/src/phase-runner.ts +1203 -0
  431. package/sdk/src/plan-parser.test.ts +528 -0
  432. package/sdk/src/plan-parser.ts +427 -0
  433. package/sdk/src/prompt-builder.test.ts +306 -0
  434. package/sdk/src/prompt-builder.ts +193 -0
  435. package/sdk/src/prompt-sanitizer.test.ts +260 -0
  436. package/sdk/src/prompt-sanitizer.ts +71 -0
  437. package/sdk/src/query/QUERY-HANDLERS.md +317 -0
  438. package/sdk/src/query/audit-open.ts +722 -0
  439. package/sdk/src/query/check-auto-mode.test.ts +77 -0
  440. package/sdk/src/query/check-auto-mode.ts +50 -0
  441. package/sdk/src/query/check-completion.test.ts +113 -0
  442. package/sdk/src/query/check-completion.ts +182 -0
  443. package/sdk/src/query/check-gates.test.ts +103 -0
  444. package/sdk/src/query/check-gates.ts +112 -0
  445. package/sdk/src/query/check-ship-ready.test.ts +77 -0
  446. package/sdk/src/query/check-ship-ready.ts +103 -0
  447. package/sdk/src/query/check-verification-status.test.ts +143 -0
  448. package/sdk/src/query/check-verification-status.ts +160 -0
  449. package/sdk/src/query/commit.test.ts +202 -0
  450. package/sdk/src/query/commit.ts +301 -0
  451. package/sdk/src/query/config-gates.test.ts +89 -0
  452. package/sdk/src/query/config-gates.ts +69 -0
  453. package/sdk/src/query/config-mutation.test.ts +365 -0
  454. package/sdk/src/query/config-mutation.ts +497 -0
  455. package/sdk/src/query/config-query.test.ts +161 -0
  456. package/sdk/src/query/config-query.ts +190 -0
  457. package/sdk/src/query/context-history.test.ts +165 -0
  458. package/sdk/src/query/context-history.ts +467 -0
  459. package/sdk/src/query/decomposed-handlers.test.ts +365 -0
  460. package/sdk/src/query/detect-custom-files.ts +97 -0
  461. package/sdk/src/query/detect-phase-type.test.ts +105 -0
  462. package/sdk/src/query/detect-phase-type.ts +141 -0
  463. package/sdk/src/query/docs-init.ts +257 -0
  464. package/sdk/src/query/failure-capture.ts +58 -0
  465. package/sdk/src/query/frontmatter-array.test.ts +14 -0
  466. package/sdk/src/query/frontmatter-mutation.test.ts +259 -0
  467. package/sdk/src/query/frontmatter-mutation.ts +343 -0
  468. package/sdk/src/query/frontmatter.test.ts +281 -0
  469. package/sdk/src/query/frontmatter.ts +397 -0
  470. package/sdk/src/query/helpers.test.ts +426 -0
  471. package/sdk/src/query/helpers.ts +482 -0
  472. package/sdk/src/query/index.ts +586 -0
  473. package/sdk/src/query/init-complex.test.ts +232 -0
  474. package/sdk/src/query/init-complex.ts +578 -0
  475. package/sdk/src/query/init.test.ts +522 -0
  476. package/sdk/src/query/init.ts +1046 -0
  477. package/sdk/src/query/intel.test.ts +90 -0
  478. package/sdk/src/query/intel.ts +404 -0
  479. package/sdk/src/query/normalize-query-command.test.ts +50 -0
  480. package/sdk/src/query/normalize-query-command.ts +56 -0
  481. package/sdk/src/query/phase-lifecycle.test.ts +1126 -0
  482. package/sdk/src/query/phase-lifecycle.ts +1799 -0
  483. package/sdk/src/query/phase-list-queries.test.ts +88 -0
  484. package/sdk/src/query/phase-list-queries.ts +152 -0
  485. package/sdk/src/query/phase-ready.test.ts +65 -0
  486. package/sdk/src/query/phase-ready.ts +158 -0
  487. package/sdk/src/query/phase.test.ts +307 -0
  488. package/sdk/src/query/phase.ts +340 -0
  489. package/sdk/src/query/pipeline.test.ts +169 -0
  490. package/sdk/src/query/pipeline.ts +243 -0
  491. package/sdk/src/query/plan-execution-route.test.ts +166 -0
  492. package/sdk/src/query/plan-execution-route.ts +209 -0
  493. package/sdk/src/query/plan-task-structure.test.ts +65 -0
  494. package/sdk/src/query/plan-task-structure.ts +63 -0
  495. package/sdk/src/query/profile-extract-messages.ts +247 -0
  496. package/sdk/src/query/profile-output.ts +908 -0
  497. package/sdk/src/query/profile-questionnaire-data.ts +181 -0
  498. package/sdk/src/query/profile-sample.ts +184 -0
  499. package/sdk/src/query/profile-scan-sessions.ts +174 -0
  500. package/sdk/src/query/profile.test.ts +74 -0
  501. package/sdk/src/query/profile.ts +337 -0
  502. package/sdk/src/query/progress.test.ts +156 -0
  503. package/sdk/src/query/progress.ts +566 -0
  504. package/sdk/src/query/registry.test.ts +216 -0
  505. package/sdk/src/query/registry.ts +174 -0
  506. package/sdk/src/query/requirements-extract-from-plans.test.ts +58 -0
  507. package/sdk/src/query/requirements-extract-from-plans.ts +86 -0
  508. package/sdk/src/query/roadmap-update-plan-progress.ts +132 -0
  509. package/sdk/src/query/roadmap.test.ts +359 -0
  510. package/sdk/src/query/roadmap.ts +591 -0
  511. package/sdk/src/query/route-next-action.test.ts +61 -0
  512. package/sdk/src/query/route-next-action.ts +345 -0
  513. package/sdk/src/query/runtime-health.ts +7 -0
  514. package/sdk/src/query/schema-detect.ts +189 -0
  515. package/sdk/src/query/skill-manifest.ts +214 -0
  516. package/sdk/src/query/skills.test.ts +80 -0
  517. package/sdk/src/query/skills.ts +62 -0
  518. package/sdk/src/query/state-mutation.test.ts +450 -0
  519. package/sdk/src/query/state-mutation.ts +1444 -0
  520. package/sdk/src/query/state-project-load.ts +109 -0
  521. package/sdk/src/query/state.test.ts +347 -0
  522. package/sdk/src/query/state.ts +397 -0
  523. package/sdk/src/query/summary.test.ts +95 -0
  524. package/sdk/src/query/summary.ts +296 -0
  525. package/sdk/src/query/template.test.ts +180 -0
  526. package/sdk/src/query/template.ts +242 -0
  527. package/sdk/src/query/uat.test.ts +77 -0
  528. package/sdk/src/query/uat.ts +314 -0
  529. package/sdk/src/query/utils.test.ts +82 -0
  530. package/sdk/src/query/utils.ts +92 -0
  531. package/sdk/src/query/validate.test.ts +656 -0
  532. package/sdk/src/query/validate.ts +807 -0
  533. package/sdk/src/query/verify.test.ts +414 -0
  534. package/sdk/src/query/verify.ts +645 -0
  535. package/sdk/src/query/websearch.test.ts +31 -0
  536. package/sdk/src/query/websearch.ts +82 -0
  537. package/sdk/src/query/workspace.test.ts +119 -0
  538. package/sdk/src/query/workspace.ts +131 -0
  539. package/sdk/src/query/workstream.test.ts +51 -0
  540. package/sdk/src/query/workstream.ts +434 -0
  541. package/sdk/src/research-gate.test.ts +190 -0
  542. package/sdk/src/research-gate.ts +94 -0
  543. package/sdk/src/runtime-health.test.ts +176 -0
  544. package/sdk/src/runtime-health.ts +387 -0
  545. package/sdk/src/session-runner.test.ts +98 -0
  546. package/sdk/src/session-runner.ts +299 -0
  547. package/sdk/src/tool-scoping.test.ts +160 -0
  548. package/sdk/src/tool-scoping.ts +61 -0
  549. package/sdk/src/types.ts +917 -0
  550. package/sdk/src/workstream-utils.ts +33 -0
  551. package/sdk/src/ws-flag.test.ts +285 -0
  552. package/sdk/src/ws-transport.test.ts +161 -0
  553. package/sdk/src/ws-transport.ts +93 -0
  554. package/sdk/tsconfig.json +20 -0
@@ -0,0 +1,1391 @@
1
+ <purpose>
2
+ Initialize a new project through unified flow: questioning, research (optional), requirements, roadmap. This is the most leveraged moment in any project — deep questioning here means better plans, better execution, better outcomes. One workflow takes you from idea to ready-for-planning.
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
+ <available_agent_types>
10
+ Valid GSD subagent types (use exact names — do not fall back to 'general-purpose'):
11
+ - gsd-project-researcher — Researches project-level technical decisions
12
+ - gsd-research-synthesizer — Synthesizes findings from parallel research agents
13
+ - gsd-roadmapper — Creates phased execution roadmaps
14
+ </available_agent_types>
15
+
16
+ <auto_mode>
17
+
18
+ ## Auto Mode Detection
19
+
20
+ Check if `--auto` flag is present in $ARGUMENTS.
21
+
22
+ **If auto mode:**
23
+
24
+ - Skip brownfield mapping offer (assume greenfield)
25
+ - Skip deep questioning (extract context from provided document)
26
+ - Config: YOLO mode is implicit (skip that question), but ask granularity/git/agents FIRST (Step 2a)
27
+ - After config: run Steps 6-9 automatically with smart defaults:
28
+ - Research: Always yes
29
+ - Requirements: Include all table stakes + features from provided document
30
+ - Requirements approval: Auto-approve
31
+ - Roadmap approval: Auto-approve
32
+
33
+ **Document requirement:**
34
+ Auto mode requires an idea document — either:
35
+
36
+ - File reference: `/gsd-new-project --auto @prd.md`
37
+ - Pasted/written text in the prompt
38
+
39
+ If no document content provided, error:
40
+
41
+ ```
42
+ Error: --auto requires an idea document.
43
+
44
+ Usage:
45
+ /gsd-new-project --auto @your-idea.md
46
+ /gsd-new-project --auto [paste or write your idea here]
47
+
48
+ The document should describe what you want to build.
49
+ ```
50
+
51
+ </auto_mode>
52
+
53
+ <process>
54
+
55
+ ## 1. Setup
56
+
57
+ **MANDATORY FIRST STEP — Execute these checks before ANY user interaction:**
58
+
59
+ ```bash
60
+ INIT=$(gsd-remix-sdk query init.new-project)
61
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
62
+ AGENT_SKILLS_RESEARCHER=$(gsd-remix-sdk query agent-skills gsd-project-researcher 2>/dev/null)
63
+ AGENT_SKILLS_SYNTHESIZER=$(gsd-remix-sdk query agent-skills gsd-synthesizer 2>/dev/null)
64
+ AGENT_SKILLS_ROADMAPPER=$(gsd-remix-sdk query agent-skills gsd-roadmapper 2>/dev/null)
65
+ ```
66
+
67
+ Parse JSON for: `researcher_model`, `synthesizer_model`, `roadmapper_model`, `commit_docs`, `project_exists`, `has_codebase_map`, `planning_exists`, `has_existing_code`, `has_package_file`, `is_brownfield`, `needs_codebase_map`, `has_git`, `project_path`, `agents_installed`, `missing_agents`.
68
+
69
+ **If `agents_installed` is false:** Display a warning before proceeding:
70
+ ```
71
+ ⚠ GSD agents not installed. The following agents are missing from your agents directory:
72
+ {missing_agents joined with newline}
73
+
74
+ Subagent spawns (gsd-project-researcher, gsd-research-synthesizer, gsd-roadmapper) will fail
75
+ with "agent type not found". Run the installer with --global to make agents available:
76
+
77
+ npx get-shit-done-cc@latest --global
78
+
79
+ Proceeding without research subagents — roadmap will be generated inline.
80
+ ```
81
+ Skip Steps 6–7 (parallel research and synthesis) and proceed directly to roadmap creation in Step 8.
82
+
83
+ **Detect runtime and set instruction file name:**
84
+
85
+ Derive `RUNTIME` from the invoking prompt's `execution_context` path:
86
+ - Path contains `/.codex/` → `RUNTIME=codex`
87
+ - Path contains `/.gemini/` → `RUNTIME=gemini`
88
+ - Path contains `/.config/opencode/` or `/.opencode/` → `RUNTIME=opencode`
89
+ - Otherwise → `RUNTIME=claude`
90
+
91
+ If `execution_context` path is not available, fall back to env vars:
92
+ ```bash
93
+ if [ -n "$CODEX_HOME" ]; then RUNTIME="codex"
94
+ elif [ -n "$GEMINI_CONFIG_DIR" ]; then RUNTIME="gemini"
95
+ elif [ -n "$OPENCODE_CONFIG_DIR" ] || [ -n "$OPENCODE_CONFIG" ]; then RUNTIME="opencode"
96
+ else RUNTIME="claude"; fi
97
+ ```
98
+
99
+ Set the instruction file variable:
100
+ ```bash
101
+ if [ "$RUNTIME" = "codex" ]; then INSTRUCTION_FILE="AGENTS.md"; else INSTRUCTION_FILE="CLAUDE.md"; fi
102
+ ```
103
+
104
+ All subsequent references to the project instruction file use `$INSTRUCTION_FILE`.
105
+
106
+ **If `project_exists` is true:** Error — project already initialized. Use `/gsd-progress`.
107
+
108
+ **If `has_git` is false:** Initialize git:
109
+
110
+ ```bash
111
+ git init
112
+ ```
113
+
114
+ ## 2. Brownfield Offer
115
+
116
+ **If auto mode:** Skip to Step 4 (assume greenfield, synthesize PROJECT.md from provided document).
117
+
118
+ **If `needs_codebase_map` is true** (from init — existing code detected but no codebase map):
119
+
120
+
121
+ **Text mode (`workflow.text_mode: true` in config or `--text` flag):** Set `TEXT_MODE=true` if `--text` is present in `$ARGUMENTS` OR `text_mode` from init JSON is `true`. When TEXT_MODE is active, replace every `AskUserQuestion` call with a plain-text numbered list and ask the user to type their choice number. This is required for non-Claude runtimes (OpenAI Codex, Gemini CLI, etc.) where `AskUserQuestion` is not available.
122
+ Use AskUserQuestion:
123
+
124
+ - header: "Codebase"
125
+ - question: "I detected existing code in this directory. Would you like to map the codebase first?"
126
+ - options:
127
+ - "Map codebase first" — Run /gsd-map-codebase to understand existing architecture (Recommended)
128
+ - "Skip mapping" — Proceed with project initialization
129
+
130
+ **If "Map codebase first":**
131
+
132
+ ```
133
+ Run `/gsd-map-codebase` first, then return to `/gsd-new-project`
134
+ ```
135
+
136
+ Exit command.
137
+
138
+ **If "Skip mapping" OR `needs_codebase_map` is false:** Continue to Step 3.
139
+
140
+ ## 2a. Auto Mode Config (auto mode only)
141
+
142
+ **If auto mode:** Collect config settings upfront before processing the idea document.
143
+
144
+ YOLO mode is implicit (auto = YOLO). Ask remaining config questions:
145
+
146
+ **Round 1 — Core settings (3 questions, no Mode question):**
147
+
148
+ ```
149
+ AskUserQuestion([
150
+ {
151
+ header: "Granularity",
152
+ question: "How finely should scope be sliced into phases?",
153
+ multiSelect: false,
154
+ options: [
155
+ { label: "Coarse (Recommended)", description: "Fewer, broader phases (3-5 phases, 1-3 plans each)" },
156
+ { label: "Standard", description: "Balanced phase size (5-8 phases, 3-5 plans each)" },
157
+ { label: "Fine", description: "Many focused phases (8-12 phases, 5-10 plans each)" }
158
+ ]
159
+ },
160
+ {
161
+ header: "Execution",
162
+ question: "Run plans in parallel?",
163
+ multiSelect: false,
164
+ options: [
165
+ { label: "Parallel (Recommended)", description: "Independent plans run simultaneously" },
166
+ { label: "Sequential", description: "One plan at a time" }
167
+ ]
168
+ },
169
+ {
170
+ header: "Git Tracking",
171
+ question: "Commit planning docs to git?",
172
+ multiSelect: false,
173
+ options: [
174
+ { label: "Yes (Recommended)", description: "Planning docs tracked in version control" },
175
+ { label: "No", description: "Keep .planning/ local-only (add to .gitignore)" }
176
+ ]
177
+ }
178
+ ])
179
+ ```
180
+
181
+ **Round 2 — Workflow agents (same as Step 5):**
182
+
183
+ ```
184
+ AskUserQuestion([
185
+ {
186
+ header: "Research",
187
+ question: "Research before planning each phase? (adds tokens/time)",
188
+ multiSelect: false,
189
+ options: [
190
+ { label: "Yes (Recommended)", description: "Investigate domain, find patterns, surface gotchas" },
191
+ { label: "No", description: "Plan directly from requirements" }
192
+ ]
193
+ },
194
+ {
195
+ header: "Plan Check",
196
+ question: "Verify plans will achieve their goals? (adds tokens/time)",
197
+ multiSelect: false,
198
+ options: [
199
+ { label: "Yes (Recommended)", description: "Catch gaps before execution starts" },
200
+ { label: "No", description: "Execute plans without verification" }
201
+ ]
202
+ },
203
+ {
204
+ header: "Verifier",
205
+ question: "Verify work satisfies requirements after each phase? (adds tokens/time)",
206
+ multiSelect: false,
207
+ options: [
208
+ { label: "Yes (Recommended)", description: "Confirm deliverables match phase goals" },
209
+ { label: "No", description: "Trust execution, skip verification" }
210
+ ]
211
+ },
212
+ {
213
+ header: "AI Models",
214
+ question: "Which AI models for planning agents?",
215
+ multiSelect: false,
216
+ options: [
217
+ { label: "Balanced (Recommended)", description: "Sonnet for most agents — good quality/cost ratio" },
218
+ { label: "Quality", description: "Opus for research/roadmap — higher cost, deeper analysis" },
219
+ { label: "Budget", description: "Haiku where possible — fastest, lowest cost" },
220
+ { label: "Inherit", description: "Use the current session model for all agents (OpenCode /model)" }
221
+ ]
222
+ }
223
+ ])
224
+ ```
225
+
226
+ Create `.planning/config.json` with all settings (CLI fills in remaining defaults automatically):
227
+
228
+ ```bash
229
+ mkdir -p .planning
230
+ gsd-remix-sdk query config-new-project '{"mode":"yolo","granularity":"[selected]","parallelization":true|false,"commit_docs":true|false,"model_profile":"quality|balanced|budget|inherit","workflow":{"research":true|false,"plan_check":true|false,"verifier":true|false,"nyquist_validation":true|false,"auto_advance":true}}'
231
+ ```
232
+
233
+ **If commit_docs = No:** Add `.planning/` to `.gitignore`.
234
+
235
+ **Commit config.json:**
236
+
237
+ ```bash
238
+ mkdir -p .planning
239
+ gsd-remix-sdk query commit "chore: add project config" .planning/config.json
240
+ ```
241
+
242
+ **Persist auto-advance chain flag to config (survives context compaction):**
243
+
244
+ ```bash
245
+ gsd-remix-sdk query config-set workflow._auto_chain_active true
246
+ ```
247
+
248
+ Proceed to Step 4 (skip Steps 3 and 5).
249
+
250
+ ## 2b. Prior Spike/Sketch Detection
251
+
252
+ Check for existing spike and sketch work that should inform project setup:
253
+
254
+ ```bash
255
+ # Check for spike findings skill (project-local)
256
+ SPIKE_SKILL=$(ls ./.claude/skills/spike-findings-*/SKILL.md 2>/dev/null | head -1)
257
+
258
+ # Check for sketch findings skill (project-local)
259
+ SKETCH_SKILL=$(ls ./.claude/skills/sketch-findings-*/SKILL.md 2>/dev/null | head -1)
260
+
261
+ # Check for raw spikes/sketches in .planning/
262
+ HAS_SPIKES=$(ls .planning/spikes/MANIFEST.md 2>/dev/null)
263
+ HAS_SKETCHES=$(ls .planning/sketches/MANIFEST.md 2>/dev/null)
264
+ ```
265
+
266
+ If any of these exist, surface them before questioning:
267
+
268
+ ```
269
+ ⚡ Prior exploration detected:
270
+ {if SPIKE_SKILL} ✓ Spike findings skill: {path} — validated patterns from experiments
271
+ {if SKETCH_SKILL} ✓ Sketch findings skill: {path} — validated design decisions
272
+ {if HAS_SPIKES && !SPIKE_SKILL} ◆ Raw spikes in .planning/spikes/ — consider `/gsd-spike-wrap-up` to package findings
273
+ {if HAS_SKETCHES && !SKETCH_SKILL} ◆ Raw sketches in .planning/sketches/ — consider `/gsd-sketch-wrap-up` to package findings
274
+
275
+ These findings will be incorporated into project context and available to planning agents.
276
+ ```
277
+
278
+ If spike/sketch findings skills exist, read their SKILL.md files to inform the questioning phase — they contain validated patterns, constraints, and design decisions that should shape the project definition.
279
+
280
+ ## 3. Deep Questioning
281
+
282
+ **If auto mode:** Skip (already handled in Step 2a). Extract project context from provided document instead and proceed to Step 4.
283
+
284
+ **Display stage banner:**
285
+
286
+ ```
287
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
288
+ GSD ► QUESTIONING
289
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
290
+ ```
291
+
292
+ **Open the conversation:**
293
+
294
+ Ask inline (freeform, NOT AskUserQuestion):
295
+
296
+ "What do you want to build?"
297
+
298
+ Wait for their response. This gives you the context needed to ask intelligent follow-up questions.
299
+
300
+ **Research-before-questions mode:** Check if `workflow.research_before_questions` is enabled in `.planning/config.json` (or the config from init context). When enabled, before asking follow-up questions about a topic area:
301
+
302
+ 1. Do a brief web search for best practices related to what the user described
303
+ 2. Mention key findings naturally as you ask questions (e.g., "Most projects like this use X — is that what you're thinking, or something different?")
304
+ 3. This makes questions more informed without changing the conversational flow
305
+
306
+ When disabled (default), ask questions directly as before.
307
+
308
+ **Follow the thread:**
309
+
310
+ Based on what they said, ask follow-up questions that dig into their response. Use AskUserQuestion with options that probe what they mentioned — interpretations, clarifications, concrete examples.
311
+
312
+ Keep following threads. Each answer opens new threads to explore. Ask about:
313
+
314
+ - What excited them
315
+ - What problem sparked this
316
+ - What they mean by vague terms
317
+ - What it would actually look like
318
+ - What's already decided
319
+
320
+ Consult `questioning.md` for techniques:
321
+
322
+ - Challenge vagueness
323
+ - Make abstract concrete
324
+ - Surface assumptions
325
+ - Find edges
326
+ - Reveal motivation
327
+
328
+ **Check context (background, not out loud):**
329
+
330
+ As you go, mentally check the context checklist from `questioning.md`. If gaps remain, weave questions naturally. Don't suddenly switch to checklist mode.
331
+
332
+ **Decision gate:**
333
+
334
+ When you could write a clear PROJECT.md, use AskUserQuestion:
335
+
336
+ - header: "Ready?"
337
+ - question: "I think I understand what you're after. Ready to create PROJECT.md?"
338
+ - options:
339
+ - "Create PROJECT.md" — Let's move forward
340
+ - "Keep exploring" — I want to share more / ask me more
341
+
342
+ If "Keep exploring" — ask what they want to add, or identify gaps and probe naturally.
343
+
344
+ Loop until "Create PROJECT.md" selected.
345
+
346
+ ## 4. Write PROJECT.md
347
+
348
+ **If auto mode:** Synthesize from provided document. No "Ready?" gate was shown — proceed directly to commit.
349
+
350
+ Synthesize all context into `.planning/PROJECT.md` using the template from `templates/project.md`.
351
+
352
+ **For greenfield projects:**
353
+
354
+ Initialize requirements as hypotheses:
355
+
356
+ ```markdown
357
+ ## Requirements
358
+
359
+ ### Validated
360
+
361
+ (None yet — ship to validate)
362
+
363
+ ### Active
364
+
365
+ - [ ] [Requirement 1]
366
+ - [ ] [Requirement 2]
367
+ - [ ] [Requirement 3]
368
+
369
+ ### Out of Scope
370
+
371
+ - [Exclusion 1] — [why]
372
+ - [Exclusion 2] — [why]
373
+ ```
374
+
375
+ All Active requirements are hypotheses until shipped and validated.
376
+
377
+ **For brownfield projects (codebase map exists):**
378
+
379
+ Infer Validated requirements from existing code:
380
+
381
+ 1. Read `.planning/codebase/ARCHITECTURE.md` and `STACK.md`
382
+ 2. Identify what the codebase already does
383
+ 3. These become the initial Validated set
384
+
385
+ ```markdown
386
+ ## Requirements
387
+
388
+ ### Validated
389
+
390
+ - ✓ [Existing capability 1] — existing
391
+ - ✓ [Existing capability 2] — existing
392
+ - ✓ [Existing capability 3] — existing
393
+
394
+ ### Active
395
+
396
+ - [ ] [New requirement 1]
397
+ - [ ] [New requirement 2]
398
+
399
+ ### Out of Scope
400
+
401
+ - [Exclusion 1] — [why]
402
+ ```
403
+
404
+ **Key Decisions:**
405
+
406
+ Initialize with any decisions made during questioning:
407
+
408
+ ```markdown
409
+ ## Key Decisions
410
+
411
+ | Decision | Rationale | Outcome |
412
+ |----------|-----------|---------|
413
+ | [Choice from questioning] | [Why] | — Pending |
414
+ ```
415
+
416
+ **Last updated footer:**
417
+
418
+ ```markdown
419
+ ---
420
+ *Last updated: [date] after initialization*
421
+ ```
422
+
423
+ **Evolution section** (include at the end of PROJECT.md, before the footer):
424
+
425
+ ```markdown
426
+ ## Evolution
427
+
428
+ This document evolves at phase transitions and milestone boundaries.
429
+
430
+ **After each phase transition** (via `/gsd-transition`):
431
+ 1. Requirements invalidated? → Move to Out of Scope with reason
432
+ 2. Requirements validated? → Move to Validated with phase reference
433
+ 3. New requirements emerged? → Add to Active
434
+ 4. Decisions to log? → Add to Key Decisions
435
+ 5. "What This Is" still accurate? → Update if drifted
436
+
437
+ **After each milestone** (via `/gsd-complete-milestone`):
438
+ 1. Full review of all sections
439
+ 2. Core Value check — still the right priority?
440
+ 3. Audit Out of Scope — reasons still valid?
441
+ 4. Update Context with current state
442
+ ```
443
+
444
+ Do not compress. Capture everything gathered.
445
+
446
+ **Commit PROJECT.md:**
447
+
448
+ ```bash
449
+ mkdir -p .planning
450
+ gsd-remix-sdk query commit "docs: initialize project" .planning/PROJECT.md
451
+ ```
452
+
453
+ ## 5. Workflow Preferences
454
+
455
+ **If auto mode:** Skip — config was collected in Step 2a. Proceed to Step 5.5.
456
+
457
+ **Check for global defaults** at `~/.gsd/defaults.json`. If the file exists, read and display its contents before asking:
458
+
459
+ ```bash
460
+ DEFAULTS_RAW=$(cat ~/.gsd/defaults.json 2>/dev/null)
461
+ ```
462
+
463
+ Format the JSON into human-readable bullets using these label mappings:
464
+ - `mode` → "Mode"
465
+ - `granularity` → "Granularity"
466
+ - `parallelization` → "Execution" (`true` → "Parallel", `false` → "Sequential")
467
+ - `commit_docs` → "Git Tracking" (`true` → "Yes", `false` → "No")
468
+ - `model_profile` → "AI Models"
469
+ - `workflow.research` → "Research" (`true` → "Yes", `false` → "No")
470
+ - `workflow.plan_check` → "Plan Check" (`true` → "Yes", `false` → "No")
471
+ - `workflow.verifier` → "Verifier" (`true` → "Yes", `false` → "No")
472
+
473
+ Display above the prompt:
474
+
475
+ ```text
476
+ Your saved defaults (~/.gsd/defaults.json):
477
+ • Mode: [value]
478
+ • Granularity: [value]
479
+ • Execution: [Parallel|Sequential]
480
+ • Git Tracking: [Yes|No]
481
+ • AI Models: [value]
482
+ • Research: [Yes|No]
483
+ • Plan Check: [Yes|No]
484
+ • Verifier: [Yes|No]
485
+ ```
486
+
487
+ Then ask:
488
+
489
+ ```text
490
+ AskUserQuestion([
491
+ {
492
+ question: "Use these saved defaults?",
493
+ header: "Defaults",
494
+ multiSelect: false,
495
+ options: [
496
+ { label: "Use as-is (Recommended)", description: "Proceed with the defaults shown above" },
497
+ { label: "Modify some settings", description: "Keep defaults, change a few" },
498
+ { label: "Configure fresh", description: "Walk through all questions from scratch" }
499
+ ]
500
+ }
501
+ ])
502
+ ```
503
+
504
+ **If "Use as-is":** use the defaults values for config.json and skip directly to **Commit config.json** below.
505
+
506
+ **If "Modify some settings":** present a selection of every setting with its current saved value.
507
+
508
+ **If TEXT_MODE is active** (non-Claude runtimes): display a numbered list and ask the user to type the numbers of settings they want to change (comma-separated). Parse the response and proceed.
509
+
510
+ ```text
511
+ Which settings do you want to change? (enter numbers, comma-separated)
512
+
513
+ 1. Mode — Currently: [value]
514
+ 2. Granularity — Currently: [value]
515
+ 3. Execution — Currently: [Parallel|Sequential]
516
+ 4. Git Tracking — Currently: [Yes|No]
517
+ 5. AI Models — Currently: [value]
518
+ 6. Research — Currently: [Yes|No]
519
+ 7. Plan Check — Currently: [Yes|No]
520
+ 8. Verifier — Currently: [Yes|No]
521
+ ```
522
+
523
+ **Otherwise** (Claude runtime with AskUserQuestion): use multiSelect:
524
+
525
+ ```text
526
+ AskUserQuestion([
527
+ {
528
+ question: "Which settings do you want to change?",
529
+ header: "Change Settings",
530
+ multiSelect: true,
531
+ options: [
532
+ { label: "Mode", description: "Currently: [value]" },
533
+ { label: "Granularity", description: "Currently: [value]" },
534
+ { label: "Execution", description: "Currently: [Parallel|Sequential]" },
535
+ { label: "Git Tracking", description: "Currently: [Yes|No]" },
536
+ { label: "AI Models", description: "Currently: [value]" },
537
+ { label: "Research", description: "Currently: [Yes|No]" },
538
+ { label: "Plan Check", description: "Currently: [Yes|No]" },
539
+ { label: "Verifier", description: "Currently: [Yes|No]" }
540
+ ]
541
+ }
542
+ ])
543
+ ```
544
+
545
+ For each selected setting, ask only that question using the option set from Round 1 / Round 2 below. Merge user answers over the saved defaults — unchanged settings retain their saved values. Then skip to **Commit config.json**.
546
+
547
+ **If "Configure fresh" or `~/.gsd/defaults.json` doesn't exist:** proceed with the questions below.
548
+
549
+ **Round 1 — Core workflow settings (4 questions):**
550
+
551
+ ```
552
+ questions: [
553
+ {
554
+ header: "Mode",
555
+ question: "How do you want to work?",
556
+ multiSelect: false,
557
+ options: [
558
+ { label: "YOLO (Recommended)", description: "Auto-approve, just execute" },
559
+ { label: "Interactive", description: "Confirm at each step" }
560
+ ]
561
+ },
562
+ {
563
+ header: "Granularity",
564
+ question: "How finely should scope be sliced into phases?",
565
+ multiSelect: false,
566
+ options: [
567
+ { label: "Coarse", description: "Fewer, broader phases (3-5 phases, 1-3 plans each)" },
568
+ { label: "Standard", description: "Balanced phase size (5-8 phases, 3-5 plans each)" },
569
+ { label: "Fine", description: "Many focused phases (8-12 phases, 5-10 plans each)" }
570
+ ]
571
+ },
572
+ {
573
+ header: "Execution",
574
+ question: "Run plans in parallel?",
575
+ multiSelect: false,
576
+ options: [
577
+ { label: "Parallel (Recommended)", description: "Independent plans run simultaneously" },
578
+ { label: "Sequential", description: "One plan at a time" }
579
+ ]
580
+ },
581
+ {
582
+ header: "Git Tracking",
583
+ question: "Commit planning docs to git?",
584
+ multiSelect: false,
585
+ options: [
586
+ { label: "Yes (Recommended)", description: "Planning docs tracked in version control" },
587
+ { label: "No", description: "Keep .planning/ local-only (add to .gitignore)" }
588
+ ]
589
+ }
590
+ ]
591
+ ```
592
+
593
+ **Round 2 — Workflow agents:**
594
+
595
+ These spawn additional agents during planning/execution. They add tokens and time but improve quality.
596
+
597
+ | Agent | When it runs | What it does |
598
+ |-------|--------------|--------------|
599
+ | **Researcher** | Before planning each phase | Investigates domain, finds patterns, surfaces gotchas |
600
+ | **Plan Checker** | After plan is created | Verifies plan actually achieves the phase goal |
601
+ | **Verifier** | After phase execution | Confirms must-haves were delivered |
602
+
603
+ All recommended for important projects. Skip for quick experiments.
604
+
605
+ ```
606
+ questions: [
607
+ {
608
+ header: "Research",
609
+ question: "Research before planning each phase? (adds tokens/time)",
610
+ multiSelect: false,
611
+ options: [
612
+ { label: "Yes (Recommended)", description: "Investigate domain, find patterns, surface gotchas" },
613
+ { label: "No", description: "Plan directly from requirements" }
614
+ ]
615
+ },
616
+ {
617
+ header: "Plan Check",
618
+ question: "Verify plans will achieve their goals? (adds tokens/time)",
619
+ multiSelect: false,
620
+ options: [
621
+ { label: "Yes (Recommended)", description: "Catch gaps before execution starts" },
622
+ { label: "No", description: "Execute plans without verification" }
623
+ ]
624
+ },
625
+ {
626
+ header: "Verifier",
627
+ question: "Verify work satisfies requirements after each phase? (adds tokens/time)",
628
+ multiSelect: false,
629
+ options: [
630
+ { label: "Yes (Recommended)", description: "Confirm deliverables match phase goals" },
631
+ { label: "No", description: "Trust execution, skip verification" }
632
+ ]
633
+ },
634
+ {
635
+ header: "AI Models",
636
+ question: "Which AI models for planning agents?",
637
+ multiSelect: false,
638
+ options: [
639
+ { label: "Balanced (Recommended)", description: "Sonnet for most agents — good quality/cost ratio" },
640
+ { label: "Quality", description: "Opus for research/roadmap — higher cost, deeper analysis" },
641
+ { label: "Budget", description: "Haiku where possible — fastest, lowest cost" },
642
+ { label: "Inherit", description: "Use the current session model for all agents (OpenCode /model)" }
643
+ ]
644
+ }
645
+ ]
646
+ ```
647
+
648
+ Create `.planning/config.json` with all settings (CLI fills in remaining defaults automatically):
649
+
650
+ ```bash
651
+ mkdir -p .planning
652
+ gsd-remix-sdk query config-new-project '{"mode":"[yolo|interactive]","granularity":"[selected]","parallelization":true|false,"commit_docs":true|false,"model_profile":"quality|balanced|budget|inherit","workflow":{"research":true|false,"plan_check":true|false,"verifier":true|false,"nyquist_validation":[false if granularity=coarse, true otherwise]}}'
653
+ ```
654
+
655
+ **Note:** Run `/gsd-settings` anytime to update model profile, workflow agents, branching strategy, and other preferences.
656
+
657
+ **If commit_docs = No:**
658
+
659
+ - Set `commit_docs: false` in config.json
660
+ - Add `.planning/` to `.gitignore` (create if needed)
661
+
662
+ **If commit_docs = Yes:**
663
+
664
+ - No additional gitignore entries needed
665
+
666
+ **Commit config.json:**
667
+
668
+ ```bash
669
+ gsd-remix-sdk query commit "chore: add project config" .planning/config.json
670
+ ```
671
+
672
+ ## 5.1. Sub-Repo Detection
673
+
674
+ **Detect multi-repo workspace:**
675
+
676
+ Check for directories with their own `.git` folders (separate repos within the workspace):
677
+
678
+ ```bash
679
+ find . -maxdepth 1 -type d -not -name ".*" -not -name "node_modules" -exec test -d "{}/.git" \; -print
680
+ ```
681
+
682
+ **If sub-repos found:**
683
+
684
+ Strip the `./` prefix to get directory names (e.g., `./backend` → `backend`).
685
+
686
+ Use AskUserQuestion:
687
+
688
+ - header: "Multi-Repo Workspace"
689
+ - question: "I detected separate git repos in this workspace. Which directories contain code that GSD should commit to?"
690
+ - multiSelect: true
691
+ - options: one option per detected directory
692
+ - "[directory name]" — Separate git repo
693
+
694
+ **If user selects one or more directories:**
695
+
696
+ - Set `planning.sub_repos` in config.json to the selected directory names array (e.g., `["backend", "frontend"]`)
697
+ - Auto-set `planning.commit_docs` to `false` (planning docs stay local in multi-repo workspaces)
698
+ - Add `.planning/` to `.gitignore` if not already present
699
+
700
+ Config changes are saved locally — no commit needed since `commit_docs` is `false` in multi-repo mode.
701
+
702
+ **If no sub-repos found or user selects none:** Continue with no changes to config.
703
+
704
+ ## 5.5. Resolve Model Profile
705
+
706
+ Use models from init: `researcher_model`, `synthesizer_model`, `roadmapper_model`.
707
+
708
+ ## 6. Research Decision
709
+
710
+ **If auto mode:** Default to "Research first" without asking.
711
+
712
+ Use AskUserQuestion:
713
+
714
+ - header: "Research"
715
+ - question: "Research the domain ecosystem before defining requirements?"
716
+ - options:
717
+ - "Research first (Recommended)" — Discover standard stacks, expected features, architecture patterns
718
+ - "Skip research" — I know this domain well, go straight to requirements
719
+
720
+ **If "Research first":**
721
+
722
+ Display stage banner:
723
+
724
+ ```
725
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
726
+ GSD ► RESEARCHING
727
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
728
+
729
+ Researching [domain] ecosystem...
730
+ ```
731
+
732
+ Create research directory:
733
+
734
+ ```bash
735
+ mkdir -p .planning/research
736
+ ```
737
+
738
+ **Determine milestone context:**
739
+
740
+ Check if this is greenfield or subsequent milestone:
741
+
742
+ - If no "Validated" requirements in PROJECT.md → Greenfield (building from scratch)
743
+ - If "Validated" requirements exist → Subsequent milestone (adding to existing app)
744
+
745
+ Display spawning indicator:
746
+
747
+ ```
748
+ ◆ Spawning 4 researchers in parallel...
749
+ → Stack research
750
+ → Features research
751
+ → Architecture research
752
+ → Pitfalls research
753
+ ```
754
+
755
+ Spawn 4 parallel gsd-project-researcher agents with path references:
756
+
757
+ ```
758
+ Task(prompt="<research_type>
759
+ Project Research — Stack dimension for [domain].
760
+ </research_type>
761
+
762
+ <milestone_context>
763
+ [greenfield OR subsequent]
764
+
765
+ Greenfield: Research the standard stack for building [domain] from scratch.
766
+ Subsequent: Research what's needed to add [target features] to an existing [domain] app. Don't re-research the existing system.
767
+ </milestone_context>
768
+
769
+ <question>
770
+ What's the standard 2025 stack for [domain]?
771
+ </question>
772
+
773
+ <files_to_read>
774
+ - {project_path} (Project context and goals)
775
+ </files_to_read>
776
+
777
+ ${AGENT_SKILLS_RESEARCHER}
778
+
779
+ <downstream_consumer>
780
+ Your STACK.md feeds into roadmap creation. Be prescriptive:
781
+ - Specific libraries with versions
782
+ - Clear rationale for each choice
783
+ - What NOT to use and why
784
+ </downstream_consumer>
785
+
786
+ <quality_gate>
787
+ - [ ] Versions are current (verify with Context7/official docs, not training data)
788
+ - [ ] Rationale explains WHY, not just WHAT
789
+ - [ ] Confidence levels assigned to each recommendation
790
+ </quality_gate>
791
+
792
+ <output>
793
+ Write to: .planning/research/STACK.md
794
+ Use template: ~/.claude/get-shit-done/templates/research-project/STACK.md
795
+ </output>
796
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Stack research")
797
+
798
+ Task(prompt="<research_type>
799
+ Project Research — Features dimension for [domain].
800
+ </research_type>
801
+
802
+ <milestone_context>
803
+ [greenfield OR subsequent]
804
+
805
+ Greenfield: What features do [domain] products have? What's table stakes vs differentiating?
806
+ Subsequent: How do [target features] typically work? What's expected behavior?
807
+ </milestone_context>
808
+
809
+ <question>
810
+ What features do [domain] products have? What's table stakes vs differentiating?
811
+ </question>
812
+
813
+ <files_to_read>
814
+ - {project_path} (Project context)
815
+ </files_to_read>
816
+
817
+ ${AGENT_SKILLS_RESEARCHER}
818
+
819
+ <downstream_consumer>
820
+ Your FEATURES.md feeds into requirements definition. Categorize clearly:
821
+ - Table stakes (must have or users leave)
822
+ - Differentiators (competitive advantage)
823
+ - Anti-features (things to deliberately NOT build)
824
+ </downstream_consumer>
825
+
826
+ <quality_gate>
827
+ - [ ] Categories are clear (table stakes vs differentiators vs anti-features)
828
+ - [ ] Complexity noted for each feature
829
+ - [ ] Dependencies between features identified
830
+ </quality_gate>
831
+
832
+ <output>
833
+ Write to: .planning/research/FEATURES.md
834
+ Use template: ~/.claude/get-shit-done/templates/research-project/FEATURES.md
835
+ </output>
836
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Features research")
837
+
838
+ Task(prompt="<research_type>
839
+ Project Research — Architecture dimension for [domain].
840
+ </research_type>
841
+
842
+ <milestone_context>
843
+ [greenfield OR subsequent]
844
+
845
+ Greenfield: How are [domain] systems typically structured? What are major components?
846
+ Subsequent: How do [target features] integrate with existing [domain] architecture?
847
+ </milestone_context>
848
+
849
+ <question>
850
+ How are [domain] systems typically structured? What are major components?
851
+ </question>
852
+
853
+ <files_to_read>
854
+ - {project_path} (Project context)
855
+ </files_to_read>
856
+
857
+ ${AGENT_SKILLS_RESEARCHER}
858
+
859
+ <downstream_consumer>
860
+ Your ARCHITECTURE.md informs phase structure in roadmap. Include:
861
+ - Component boundaries (what talks to what)
862
+ - Data flow (how information moves)
863
+ - Suggested build order (dependencies between components)
864
+ </downstream_consumer>
865
+
866
+ <quality_gate>
867
+ - [ ] Components clearly defined with boundaries
868
+ - [ ] Data flow direction explicit
869
+ - [ ] Build order implications noted
870
+ </quality_gate>
871
+
872
+ <output>
873
+ Write to: .planning/research/ARCHITECTURE.md
874
+ Use template: ~/.claude/get-shit-done/templates/research-project/ARCHITECTURE.md
875
+ </output>
876
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Architecture research")
877
+
878
+ Task(prompt="<research_type>
879
+ Project Research — Pitfalls dimension for [domain].
880
+ </research_type>
881
+
882
+ <milestone_context>
883
+ [greenfield OR subsequent]
884
+
885
+ Greenfield: What do [domain] projects commonly get wrong? Critical mistakes?
886
+ Subsequent: What are common mistakes when adding [target features] to [domain]?
887
+ </milestone_context>
888
+
889
+ <question>
890
+ What do [domain] projects commonly get wrong? Critical mistakes?
891
+ </question>
892
+
893
+ <files_to_read>
894
+ - {project_path} (Project context)
895
+ </files_to_read>
896
+
897
+ ${AGENT_SKILLS_RESEARCHER}
898
+
899
+ <downstream_consumer>
900
+ Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
901
+ - Warning signs (how to detect early)
902
+ - Prevention strategy (how to avoid)
903
+ - Which phase should address it
904
+ </downstream_consumer>
905
+
906
+ <quality_gate>
907
+ - [ ] Pitfalls are specific to this domain (not generic advice)
908
+ - [ ] Prevention strategies are actionable
909
+ - [ ] Phase mapping included where relevant
910
+ </quality_gate>
911
+
912
+ <output>
913
+ Write to: .planning/research/PITFALLS.md
914
+ Use template: ~/.claude/get-shit-done/templates/research-project/PITFALLS.md
915
+ </output>
916
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Pitfalls research")
917
+ ```
918
+
919
+ After all 4 agents complete, spawn synthesizer to create SUMMARY.md:
920
+
921
+ ```
922
+ Task(prompt="
923
+ <task>
924
+ Synthesize research outputs into SUMMARY.md.
925
+ </task>
926
+
927
+ <files_to_read>
928
+ - .planning/research/STACK.md
929
+ - .planning/research/FEATURES.md
930
+ - .planning/research/ARCHITECTURE.md
931
+ - .planning/research/PITFALLS.md
932
+ </files_to_read>
933
+
934
+ ${AGENT_SKILLS_SYNTHESIZER}
935
+
936
+ <output>
937
+ Write to: .planning/research/SUMMARY.md
938
+ Use template: ~/.claude/get-shit-done/templates/research-project/SUMMARY.md
939
+ Commit after writing.
940
+ </output>
941
+ ", subagent_type="gsd-research-synthesizer", model="{synthesizer_model}", description="Synthesize research")
942
+ ```
943
+
944
+ Display research complete banner and key findings:
945
+
946
+ ```
947
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
948
+ GSD ► RESEARCH COMPLETE ✓
949
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
950
+
951
+ ## Key Findings
952
+
953
+ **Stack:** [from SUMMARY.md]
954
+ **Table Stakes:** [from SUMMARY.md]
955
+ **Watch Out For:** [from SUMMARY.md]
956
+
957
+ Files: `.planning/research/`
958
+ ```
959
+
960
+ **If "Skip research":** Continue to Step 7.
961
+
962
+ ## 7. Define Requirements
963
+
964
+ Display stage banner:
965
+
966
+ ```
967
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
968
+ GSD ► DEFINING REQUIREMENTS
969
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
970
+ ```
971
+
972
+ **Load context:**
973
+
974
+ Read PROJECT.md and extract:
975
+
976
+ - Core value (the ONE thing that must work)
977
+ - Stated constraints (budget, timeline, tech limitations)
978
+ - Any explicit scope boundaries
979
+
980
+ **If research exists:** Read research/FEATURES.md and extract feature categories.
981
+
982
+ **If auto mode:**
983
+
984
+ - Auto-include all table stakes features (users expect these)
985
+ - Include features explicitly mentioned in provided document
986
+ - Auto-defer differentiators not mentioned in document
987
+ - Skip per-category AskUserQuestion loops
988
+ - Skip "Any additions?" question
989
+ - Skip requirements approval gate
990
+ - Generate REQUIREMENTS.md and commit directly
991
+
992
+ **Present features by category (interactive mode only):**
993
+
994
+ ```
995
+ Here are the features for [domain]:
996
+
997
+ ## Authentication
998
+ **Table stakes:**
999
+ - Sign up with email/password
1000
+ - Email verification
1001
+ - Password reset
1002
+ - Session management
1003
+
1004
+ **Differentiators:**
1005
+ - Magic link login
1006
+ - OAuth (Google, GitHub)
1007
+ - 2FA
1008
+
1009
+ **Research notes:** [any relevant notes]
1010
+
1011
+ ---
1012
+
1013
+ ## [Next Category]
1014
+ ...
1015
+ ```
1016
+
1017
+ **If no research:** Gather requirements through conversation instead.
1018
+
1019
+ Ask: "What are the main things users need to be able to do?"
1020
+
1021
+ For each capability mentioned:
1022
+
1023
+ - Ask clarifying questions to make it specific
1024
+ - Probe for related capabilities
1025
+ - Group into categories
1026
+
1027
+ **Scope each category:**
1028
+
1029
+ For each category, use AskUserQuestion:
1030
+
1031
+ - header: "[Category]" (max 12 chars)
1032
+ - question: "Which [category] features are in v1?"
1033
+ - multiSelect: true
1034
+ - options:
1035
+ - "[Feature 1]" — [brief description]
1036
+ - "[Feature 2]" — [brief description]
1037
+ - "[Feature 3]" — [brief description]
1038
+ - "None for v1" — Defer entire category
1039
+
1040
+ Track responses:
1041
+
1042
+ - Selected features → v1 requirements
1043
+ - Unselected table stakes → v2 (users expect these)
1044
+ - Unselected differentiators → out of scope
1045
+
1046
+ **Identify gaps:**
1047
+
1048
+ Use AskUserQuestion:
1049
+
1050
+ - header: "Additions"
1051
+ - question: "Any requirements research missed? (Features specific to your vision)"
1052
+ - options:
1053
+ - "No, research covered it" — Proceed
1054
+ - "Yes, let me add some" — Capture additions
1055
+
1056
+ **Validate core value:**
1057
+
1058
+ Cross-check requirements against Core Value from PROJECT.md. If gaps detected, surface them.
1059
+
1060
+ **Generate REQUIREMENTS.md:**
1061
+
1062
+ Create `.planning/REQUIREMENTS.md` with:
1063
+
1064
+ - v1 Requirements grouped by category (checkboxes, REQ-IDs)
1065
+ - v2 Requirements (deferred)
1066
+ - Out of Scope (explicit exclusions with reasoning)
1067
+ - Traceability section (empty, filled by roadmap)
1068
+
1069
+ **REQ-ID format:** `[CATEGORY]-[NUMBER]` (AUTH-01, CONTENT-02)
1070
+
1071
+ **Requirement quality criteria:**
1072
+
1073
+ Good requirements are:
1074
+
1075
+ - **Specific and testable:** "User can reset password via email link" (not "Handle password reset")
1076
+ - **User-centric:** "User can X" (not "System does Y")
1077
+ - **Atomic:** One capability per requirement (not "User can login and manage profile")
1078
+ - **Independent:** Minimal dependencies on other requirements
1079
+
1080
+ Reject vague requirements. Push for specificity:
1081
+
1082
+ - "Handle authentication" → "User can log in with email/password and stay logged in across sessions"
1083
+ - "Support sharing" → "User can share post via link that opens in recipient's browser"
1084
+
1085
+ **Present full requirements list (interactive mode only):**
1086
+
1087
+ Show every requirement (not counts) for user confirmation:
1088
+
1089
+ ```
1090
+ ## v1 Requirements
1091
+
1092
+ ### Authentication
1093
+ - [ ] **AUTH-01**: User can create account with email/password
1094
+ - [ ] **AUTH-02**: User can log in and stay logged in across sessions
1095
+ - [ ] **AUTH-03**: User can log out from any page
1096
+
1097
+ ### Content
1098
+ - [ ] **CONT-01**: User can create posts with text
1099
+ - [ ] **CONT-02**: User can edit their own posts
1100
+
1101
+ [... full list ...]
1102
+
1103
+ ---
1104
+
1105
+ Does this capture what you're building? (yes / adjust)
1106
+ ```
1107
+
1108
+ If "adjust": Return to scoping.
1109
+
1110
+ **Commit requirements:**
1111
+
1112
+ ```bash
1113
+ gsd-remix-sdk query commit "docs: define v1 requirements" .planning/REQUIREMENTS.md
1114
+ ```
1115
+
1116
+ ## 8. Create Roadmap
1117
+
1118
+ Display stage banner:
1119
+
1120
+ ```
1121
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1122
+ GSD ► CREATING ROADMAP
1123
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1124
+
1125
+ ◆ Spawning roadmapper...
1126
+ ```
1127
+
1128
+ Spawn gsd-roadmapper agent with path references:
1129
+
1130
+ ```
1131
+ Task(prompt="
1132
+ <planning_context>
1133
+
1134
+ <files_to_read>
1135
+ - .planning/PROJECT.md (Project context)
1136
+ - .planning/REQUIREMENTS.md (v1 Requirements)
1137
+ - .planning/research/SUMMARY.md (Research findings - if exists)
1138
+ - .planning/config.json (Granularity and mode settings)
1139
+ </files_to_read>
1140
+
1141
+ ${AGENT_SKILLS_ROADMAPPER}
1142
+
1143
+ </planning_context>
1144
+
1145
+ <instructions>
1146
+ Create roadmap:
1147
+ 1. Derive phases from requirements (don't impose structure)
1148
+ 2. Map every v1 requirement to exactly one phase
1149
+ 3. Derive 2-5 success criteria per phase (observable user behaviors)
1150
+ 4. Validate 100% coverage
1151
+ 5. Write files immediately (ROADMAP.md, STATE.md, update REQUIREMENTS.md traceability)
1152
+ 6. Return ROADMAP CREATED with summary
1153
+
1154
+ Write files first, then return. This ensures artifacts persist even if context is lost.
1155
+ </instructions>
1156
+ ", subagent_type="gsd-roadmapper", model="{roadmapper_model}", description="Create roadmap")
1157
+ ```
1158
+
1159
+ **Handle roadmapper return:**
1160
+
1161
+ **If `## ROADMAP BLOCKED`:**
1162
+
1163
+ - Present blocker information
1164
+ - Work with user to resolve
1165
+ - Re-spawn when resolved
1166
+
1167
+ **If `## ROADMAP CREATED`:**
1168
+
1169
+ Read the created ROADMAP.md and present it nicely inline:
1170
+
1171
+ ```
1172
+ ---
1173
+
1174
+ ## Proposed Roadmap
1175
+
1176
+ **[N] phases** | **[X] requirements mapped** | All v1 requirements covered ✓
1177
+
1178
+ | # | Phase | Goal | Requirements | Success Criteria |
1179
+ |---|-------|------|--------------|------------------|
1180
+ | 1 | [Name] | [Goal] | [REQ-IDs] | [count] |
1181
+ | 2 | [Name] | [Goal] | [REQ-IDs] | [count] |
1182
+ | 3 | [Name] | [Goal] | [REQ-IDs] | [count] |
1183
+ ...
1184
+
1185
+ ### Phase Details
1186
+
1187
+ **Phase 1: [Name]**
1188
+ Goal: [goal]
1189
+ Requirements: [REQ-IDs]
1190
+ Success criteria:
1191
+ 1. [criterion]
1192
+ 2. [criterion]
1193
+ 3. [criterion]
1194
+
1195
+ **Phase 2: [Name]**
1196
+ Goal: [goal]
1197
+ Requirements: [REQ-IDs]
1198
+ Success criteria:
1199
+ 1. [criterion]
1200
+ 2. [criterion]
1201
+
1202
+ [... continue for all phases ...]
1203
+
1204
+ ---
1205
+ ```
1206
+
1207
+ **If auto mode:** Skip approval gate — auto-approve and commit directly.
1208
+
1209
+ **CRITICAL: Ask for approval before committing (interactive mode only):**
1210
+
1211
+ Use AskUserQuestion:
1212
+
1213
+ - header: "Roadmap"
1214
+ - question: "Does this roadmap structure work for you?"
1215
+ - options:
1216
+ - "Approve" — Commit and continue
1217
+ - "Adjust phases" — Tell me what to change
1218
+ - "Review full file" — Show raw ROADMAP.md
1219
+
1220
+ **If "Approve":** Continue to commit.
1221
+
1222
+ **If "Adjust phases":**
1223
+
1224
+ - Get user's adjustment notes
1225
+ - Re-spawn roadmapper with revision context:
1226
+
1227
+ ```
1228
+ Task(prompt="
1229
+ <revision>
1230
+ User feedback on roadmap:
1231
+ [user's notes]
1232
+
1233
+ <files_to_read>
1234
+ - .planning/ROADMAP.md (Current roadmap to revise)
1235
+ </files_to_read>
1236
+
1237
+ ${AGENT_SKILLS_ROADMAPPER}
1238
+
1239
+ Update the roadmap based on feedback. Edit files in place.
1240
+ Return ROADMAP REVISED with changes made.
1241
+ </revision>
1242
+ ", subagent_type="gsd-roadmapper", model="{roadmapper_model}", description="Revise roadmap")
1243
+ ```
1244
+
1245
+ - Present revised roadmap
1246
+ - Loop until user approves
1247
+
1248
+ **If "Review full file":** Display raw `cat .planning/ROADMAP.md`, then re-ask.
1249
+
1250
+ **Generate or refresh project instruction file before final commit:**
1251
+
1252
+ ```bash
1253
+ gsd-remix-sdk query generate-claude-md --output "$INSTRUCTION_FILE"
1254
+ ```
1255
+
1256
+ This ensures new projects get the default GSD workflow-enforcement guidance and current project context in `$INSTRUCTION_FILE`.
1257
+
1258
+ **Commit roadmap (after approval or auto mode):**
1259
+
1260
+ ```bash
1261
+ gsd-remix-sdk query commit "docs: create roadmap ([N] phases)" .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md "$INSTRUCTION_FILE"
1262
+ ```
1263
+
1264
+ ## 9. Done
1265
+
1266
+ Present completion summary:
1267
+
1268
+ ```
1269
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1270
+ GSD ► PROJECT INITIALIZED ✓
1271
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1272
+
1273
+ **[Project Name]**
1274
+
1275
+ | Artifact | Location |
1276
+ |----------------|-----------------------------|
1277
+ | Project | `.planning/PROJECT.md` |
1278
+ | Config | `.planning/config.json` |
1279
+ | Research | `.planning/research/` |
1280
+ | Requirements | `.planning/REQUIREMENTS.md` |
1281
+ | Roadmap | `.planning/ROADMAP.md` |
1282
+ | Project guide | `$INSTRUCTION_FILE` |
1283
+
1284
+ **[N] phases** | **[X] requirements** | Ready to build ✓
1285
+ ```
1286
+
1287
+ **If auto mode:**
1288
+
1289
+ ```
1290
+ ╔══════════════════════════════════════════╗
1291
+ ║ AUTO-ADVANCING → DISCUSS PHASE 1 ║
1292
+ ╚══════════════════════════════════════════╝
1293
+ ```
1294
+
1295
+ Exit skill and invoke SlashCommand("/gsd-discuss-phase 1 --auto")
1296
+
1297
+ **If interactive mode:**
1298
+
1299
+ Check if Phase 1 has UI indicators (look for `**UI hint**: yes` in Phase 1 detail section of ROADMAP.md):
1300
+
1301
+ ```bash
1302
+ PHASE1_SECTION=$(gsd-remix-sdk query roadmap.get-phase 1 2>/dev/null)
1303
+ PHASE1_HAS_UI=$(echo "$PHASE1_SECTION" | grep -qi "UI hint.*yes" && echo "true" || echo "false")
1304
+ ```
1305
+
1306
+ **If Phase 1 has UI (`PHASE1_HAS_UI` is `true`):**
1307
+
1308
+ ```
1309
+ ───────────────────────────────────────────────────────────────
1310
+
1311
+ ## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}
1312
+
1313
+ **Phase 1: [Phase Name]** — [Goal from ROADMAP.md]
1314
+
1315
+ /clear then:
1316
+
1317
+ /gsd-discuss-phase 1 — gather context and clarify approach
1318
+
1319
+ ---
1320
+
1321
+ **Also available:**
1322
+ - /gsd-ui-phase 1 — generate UI design contract (recommended for frontend phases)
1323
+ - /gsd-plan-phase 1 — skip discussion, plan directly
1324
+
1325
+ ───────────────────────────────────────────────────────────────
1326
+ ```
1327
+
1328
+ **If Phase 1 has no UI:**
1329
+
1330
+ ```
1331
+ ───────────────────────────────────────────────────────────────
1332
+
1333
+ ## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}
1334
+
1335
+ **Phase 1: [Phase Name]** — [Goal from ROADMAP.md]
1336
+
1337
+ /clear then:
1338
+
1339
+ /gsd-discuss-phase 1 — gather context and clarify approach
1340
+
1341
+ ---
1342
+
1343
+ **Also available:**
1344
+ - /gsd-plan-phase 1 — skip discussion, plan directly
1345
+
1346
+ ───────────────────────────────────────────────────────────────
1347
+ ```
1348
+
1349
+ </process>
1350
+
1351
+ <output>
1352
+
1353
+ - `.planning/PROJECT.md`
1354
+ - `.planning/config.json`
1355
+ - `.planning/research/` (if research selected)
1356
+ - `STACK.md`
1357
+ - `FEATURES.md`
1358
+ - `ARCHITECTURE.md`
1359
+ - `PITFALLS.md`
1360
+ - `SUMMARY.md`
1361
+ - `.planning/REQUIREMENTS.md`
1362
+ - `.planning/ROADMAP.md`
1363
+ - `.planning/STATE.md`
1364
+ - `$INSTRUCTION_FILE` (`AGENTS.md` for Codex, `CLAUDE.md` for all other runtimes)
1365
+
1366
+ </output>
1367
+
1368
+ <success_criteria>
1369
+
1370
+ - [ ] .planning/ directory created
1371
+ - [ ] Git repo initialized
1372
+ - [ ] Brownfield detection completed
1373
+ - [ ] Deep questioning completed (threads followed, not rushed)
1374
+ - [ ] PROJECT.md captures full context → **committed**
1375
+ - [ ] config.json has workflow mode, granularity, parallelization → **committed**
1376
+ - [ ] Research completed (if selected) — 4 parallel agents spawned → **committed**
1377
+ - [ ] Requirements gathered (from research or conversation)
1378
+ - [ ] User scoped each category (v1/v2/out of scope)
1379
+ - [ ] REQUIREMENTS.md created with REQ-IDs → **committed**
1380
+ - [ ] gsd-roadmapper spawned with context
1381
+ - [ ] Roadmap files written immediately (not draft)
1382
+ - [ ] User feedback incorporated (if any)
1383
+ - [ ] ROADMAP.md created with phases, requirement mappings, success criteria
1384
+ - [ ] STATE.md initialized
1385
+ - [ ] REQUIREMENTS.md traceability updated
1386
+ - [ ] `$INSTRUCTION_FILE` generated with GSD workflow guidance (AGENTS.md for Codex, CLAUDE.md otherwise)
1387
+ - [ ] User knows next step is `/gsd-discuss-phase 1`
1388
+
1389
+ **Atomic commits:** Each phase commits its artifacts immediately. If context is lost, artifacts persist.
1390
+
1391
+ </success_criteria>