@opengsd/gsd-core 1.2.0-rc.1

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