@jokerized/getresearchdone 0.4.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 (711) hide show
  1. package/.claude-plugin/plugin.json +103 -0
  2. package/README.md +211 -0
  3. package/agents/grd-baseline-assessor.md +684 -0
  4. package/agents/grd-code-reviewer.md +300 -0
  5. package/agents/grd-codebase-mapper.md +355 -0
  6. package/agents/grd-critique-agent.md +119 -0
  7. package/agents/grd-debugger.md +519 -0
  8. package/agents/grd-deep-diver.md +737 -0
  9. package/agents/grd-eval-planner.md +913 -0
  10. package/agents/grd-eval-reporter.md +717 -0
  11. package/agents/grd-executor.md +683 -0
  12. package/agents/grd-feasibility-analyst.md +624 -0
  13. package/agents/grd-integration-checker.md +367 -0
  14. package/agents/grd-knowledge-miner.md +81 -0
  15. package/agents/grd-migrator.md +88 -0
  16. package/agents/grd-phase-researcher.md +697 -0
  17. package/agents/grd-plan-checker.md +443 -0
  18. package/agents/grd-planner.md +1532 -0
  19. package/agents/grd-product-owner.md +562 -0
  20. package/agents/grd-project-researcher.md +513 -0
  21. package/agents/grd-research-synthesizer.md +273 -0
  22. package/agents/grd-roadmapper.md +798 -0
  23. package/agents/grd-surveyor.md +566 -0
  24. package/agents/grd-verifier.md +893 -0
  25. package/bin/gd.js +4 -0
  26. package/bin/gd.ts +227 -0
  27. package/bin/grd-manifest.js +4 -0
  28. package/bin/grd-manifest.ts +286 -0
  29. package/bin/grd-mcp-server.js +4 -0
  30. package/bin/grd-mcp-server.ts +124 -0
  31. package/bin/grd-tools.js +4 -0
  32. package/bin/grd-tools.ts +2471 -0
  33. package/bin/postinstall.js +4 -0
  34. package/bin/postinstall.ts +80 -0
  35. package/commands/add-phase.md +123 -0
  36. package/commands/add-todo.md +87 -0
  37. package/commands/assess-baseline.md +289 -0
  38. package/commands/autopilot.md +100 -0
  39. package/commands/autoplan.md +55 -0
  40. package/commands/check-todos.md +87 -0
  41. package/commands/compare-methods.md +262 -0
  42. package/commands/complete-milestone.md +225 -0
  43. package/commands/debug.md +372 -0
  44. package/commands/deep-dive.md +288 -0
  45. package/commands/discover.md +281 -0
  46. package/commands/discuss-phase.md +188 -0
  47. package/commands/discuss.md +55 -0
  48. package/commands/eval-report.md +310 -0
  49. package/commands/evolve.md +79 -0
  50. package/commands/execute-phase.md +1017 -0
  51. package/commands/feasibility.md +292 -0
  52. package/commands/help.md +407 -0
  53. package/commands/init.md +1508 -0
  54. package/commands/insert-phase.md +113 -0
  55. package/commands/iterate.md +327 -0
  56. package/commands/list-phase-assumptions.md +217 -0
  57. package/commands/long-term-roadmap.md +202 -0
  58. package/commands/map-codebase.md +111 -0
  59. package/commands/migrate.md +159 -0
  60. package/commands/new-milestone.md +169 -0
  61. package/commands/pause-work.md +83 -0
  62. package/commands/plan-milestone-gaps.md +373 -0
  63. package/commands/plan-phase.md +655 -0
  64. package/commands/principles.md +328 -0
  65. package/commands/product-plan.md +319 -0
  66. package/commands/progress.md +481 -0
  67. package/commands/quick.md +167 -0
  68. package/commands/reapply-patches.md +154 -0
  69. package/commands/remove-phase.md +97 -0
  70. package/commands/requirement.md +96 -0
  71. package/commands/resume-project.md +113 -0
  72. package/commands/settings.md +1144 -0
  73. package/commands/survey.md +242 -0
  74. package/commands/sync.md +246 -0
  75. package/commands/tracker-setup.md +322 -0
  76. package/commands/update.md +202 -0
  77. package/commands/verify-phase.md +335 -0
  78. package/commands/verify-work.md +701 -0
  79. package/commands/wireup.md +29 -0
  80. package/dist/bin/gd.d.ts +3 -0
  81. package/dist/bin/gd.d.ts.map +1 -0
  82. package/dist/bin/gd.js +178 -0
  83. package/dist/bin/gd.js.map +1 -0
  84. package/dist/bin/grd-manifest.d.ts +3 -0
  85. package/dist/bin/grd-manifest.d.ts.map +1 -0
  86. package/dist/bin/grd-manifest.js +202 -0
  87. package/dist/bin/grd-manifest.js.map +1 -0
  88. package/dist/bin/grd-mcp-server.d.ts +3 -0
  89. package/dist/bin/grd-mcp-server.d.ts.map +1 -0
  90. package/dist/bin/grd-mcp-server.js +71 -0
  91. package/dist/bin/grd-mcp-server.js.map +1 -0
  92. package/dist/bin/grd-tools.d.ts +3 -0
  93. package/dist/bin/grd-tools.d.ts.map +1 -0
  94. package/dist/bin/grd-tools.js +1680 -0
  95. package/dist/bin/grd-tools.js.map +1 -0
  96. package/dist/bin/postinstall.d.ts +3 -0
  97. package/dist/bin/postinstall.d.ts.map +1 -0
  98. package/dist/bin/postinstall.js +61 -0
  99. package/dist/bin/postinstall.js.map +1 -0
  100. package/dist/lib/autopilot-milestone.d.ts +2 -0
  101. package/dist/lib/autopilot-milestone.d.ts.map +1 -0
  102. package/dist/lib/autopilot-milestone.js +94 -0
  103. package/dist/lib/autopilot-milestone.js.map +1 -0
  104. package/dist/lib/autopilot-pipeline.d.ts +2 -0
  105. package/dist/lib/autopilot-pipeline.d.ts.map +1 -0
  106. package/dist/lib/autopilot-pipeline.js +830 -0
  107. package/dist/lib/autopilot-pipeline.js.map +1 -0
  108. package/dist/lib/autopilot-waves.d.ts +2 -0
  109. package/dist/lib/autopilot-waves.d.ts.map +1 -0
  110. package/dist/lib/autopilot-waves.js +266 -0
  111. package/dist/lib/autopilot-waves.js.map +1 -0
  112. package/dist/lib/autopilot.d.ts +2 -0
  113. package/dist/lib/autopilot.d.ts.map +1 -0
  114. package/dist/lib/autopilot.js +1314 -0
  115. package/dist/lib/autopilot.js.map +1 -0
  116. package/dist/lib/autoplan.d.ts +2 -0
  117. package/dist/lib/autoplan.d.ts.map +1 -0
  118. package/dist/lib/autoplan.js +198 -0
  119. package/dist/lib/autoplan.js.map +1 -0
  120. package/dist/lib/autoresearch.d.ts +2 -0
  121. package/dist/lib/autoresearch.d.ts.map +1 -0
  122. package/dist/lib/autoresearch.js +626 -0
  123. package/dist/lib/autoresearch.js.map +1 -0
  124. package/dist/lib/backend.d.ts +2 -0
  125. package/dist/lib/backend.d.ts.map +1 -0
  126. package/dist/lib/backend.js +1036 -0
  127. package/dist/lib/backend.js.map +1 -0
  128. package/dist/lib/benchmark.d.ts +99 -0
  129. package/dist/lib/benchmark.d.ts.map +1 -0
  130. package/dist/lib/benchmark.js +278 -0
  131. package/dist/lib/benchmark.js.map +1 -0
  132. package/dist/lib/citations.d.ts +2 -0
  133. package/dist/lib/citations.d.ts.map +1 -0
  134. package/dist/lib/citations.js +642 -0
  135. package/dist/lib/citations.js.map +1 -0
  136. package/dist/lib/cleanup.d.ts +2 -0
  137. package/dist/lib/cleanup.d.ts.map +1 -0
  138. package/dist/lib/cleanup.js +1222 -0
  139. package/dist/lib/cleanup.js.map +1 -0
  140. package/dist/lib/cli/adapters.d.ts +10 -0
  141. package/dist/lib/cli/adapters.d.ts.map +1 -0
  142. package/dist/lib/cli/adapters.js +27 -0
  143. package/dist/lib/cli/adapters.js.map +1 -0
  144. package/dist/lib/cli/agent.d.ts +17 -0
  145. package/dist/lib/cli/agent.d.ts.map +1 -0
  146. package/dist/lib/cli/agent.js +53 -0
  147. package/dist/lib/cli/agent.js.map +1 -0
  148. package/dist/lib/cli/index.d.ts +21 -0
  149. package/dist/lib/cli/index.d.ts.map +1 -0
  150. package/dist/lib/cli/index.js +264 -0
  151. package/dist/lib/cli/index.js.map +1 -0
  152. package/dist/lib/cli/output.d.ts +20 -0
  153. package/dist/lib/cli/output.d.ts.map +1 -0
  154. package/dist/lib/cli/output.js +22 -0
  155. package/dist/lib/cli/output.js.map +1 -0
  156. package/dist/lib/cli/scan-dispatch.d.ts +9 -0
  157. package/dist/lib/cli/scan-dispatch.d.ts.map +1 -0
  158. package/dist/lib/cli/scan-dispatch.js +107 -0
  159. package/dist/lib/cli/scan-dispatch.js.map +1 -0
  160. package/dist/lib/cli/tools.d.ts +16 -0
  161. package/dist/lib/cli/tools.d.ts.map +1 -0
  162. package/dist/lib/cli/tools.js +168 -0
  163. package/dist/lib/cli/tools.js.map +1 -0
  164. package/dist/lib/commands/_dashboard-parsers.d.ts +2 -0
  165. package/dist/lib/commands/_dashboard-parsers.d.ts.map +1 -0
  166. package/dist/lib/commands/_dashboard-parsers.js +192 -0
  167. package/dist/lib/commands/_dashboard-parsers.js.map +1 -0
  168. package/dist/lib/commands/analysis.d.ts +2 -0
  169. package/dist/lib/commands/analysis.d.ts.map +1 -0
  170. package/dist/lib/commands/analysis.js +1418 -0
  171. package/dist/lib/commands/analysis.js.map +1 -0
  172. package/dist/lib/commands/assumptions.d.ts +2 -0
  173. package/dist/lib/commands/assumptions.d.ts.map +1 -0
  174. package/dist/lib/commands/assumptions.js +166 -0
  175. package/dist/lib/commands/assumptions.js.map +1 -0
  176. package/dist/lib/commands/blame.d.ts +2 -0
  177. package/dist/lib/commands/blame.d.ts.map +1 -0
  178. package/dist/lib/commands/blame.js +133 -0
  179. package/dist/lib/commands/blame.js.map +1 -0
  180. package/dist/lib/commands/budget.d.ts +2 -0
  181. package/dist/lib/commands/budget.d.ts.map +1 -0
  182. package/dist/lib/commands/budget.js +100 -0
  183. package/dist/lib/commands/budget.js.map +1 -0
  184. package/dist/lib/commands/check-plans.d.ts +2 -0
  185. package/dist/lib/commands/check-plans.d.ts.map +1 -0
  186. package/dist/lib/commands/check-plans.js +190 -0
  187. package/dist/lib/commands/check-plans.js.map +1 -0
  188. package/dist/lib/commands/config.d.ts +2 -0
  189. package/dist/lib/commands/config.d.ts.map +1 -0
  190. package/dist/lib/commands/config.js +188 -0
  191. package/dist/lib/commands/config.js.map +1 -0
  192. package/dist/lib/commands/dashboard.d.ts +2 -0
  193. package/dist/lib/commands/dashboard.d.ts.map +1 -0
  194. package/dist/lib/commands/dashboard.js +466 -0
  195. package/dist/lib/commands/dashboard.js.map +1 -0
  196. package/dist/lib/commands/estimate.d.ts +2 -0
  197. package/dist/lib/commands/estimate.d.ts.map +1 -0
  198. package/dist/lib/commands/estimate.js +148 -0
  199. package/dist/lib/commands/estimate.js.map +1 -0
  200. package/dist/lib/commands/eval-diff.d.ts +2 -0
  201. package/dist/lib/commands/eval-diff.d.ts.map +1 -0
  202. package/dist/lib/commands/eval-diff.js +213 -0
  203. package/dist/lib/commands/eval-diff.js.map +1 -0
  204. package/dist/lib/commands/freshness.d.ts +2 -0
  205. package/dist/lib/commands/freshness.d.ts.map +1 -0
  206. package/dist/lib/commands/freshness.js +163 -0
  207. package/dist/lib/commands/freshness.js.map +1 -0
  208. package/dist/lib/commands/health.d.ts +2 -0
  209. package/dist/lib/commands/health.d.ts.map +1 -0
  210. package/dist/lib/commands/health.js +435 -0
  211. package/dist/lib/commands/health.js.map +1 -0
  212. package/dist/lib/commands/index.d.ts +2 -0
  213. package/dist/lib/commands/index.d.ts.map +1 -0
  214. package/dist/lib/commands/index.js +128 -0
  215. package/dist/lib/commands/index.js.map +1 -0
  216. package/dist/lib/commands/install.d.ts +56 -0
  217. package/dist/lib/commands/install.d.ts.map +1 -0
  218. package/dist/lib/commands/install.js +214 -0
  219. package/dist/lib/commands/install.js.map +1 -0
  220. package/dist/lib/commands/knowhow-aggregator.d.ts +2 -0
  221. package/dist/lib/commands/knowhow-aggregator.d.ts.map +1 -0
  222. package/dist/lib/commands/knowhow-aggregator.js +279 -0
  223. package/dist/lib/commands/knowhow-aggregator.js.map +1 -0
  224. package/dist/lib/commands/knowledge-search.d.ts +2 -0
  225. package/dist/lib/commands/knowledge-search.d.ts.map +1 -0
  226. package/dist/lib/commands/knowledge-search.js +113 -0
  227. package/dist/lib/commands/knowledge-search.js.map +1 -0
  228. package/dist/lib/commands/long-term-roadmap.d.ts +2 -0
  229. package/dist/lib/commands/long-term-roadmap.d.ts.map +1 -0
  230. package/dist/lib/commands/long-term-roadmap.js +272 -0
  231. package/dist/lib/commands/long-term-roadmap.js.map +1 -0
  232. package/dist/lib/commands/patterns.d.ts +91 -0
  233. package/dist/lib/commands/patterns.d.ts.map +1 -0
  234. package/dist/lib/commands/patterns.js +391 -0
  235. package/dist/lib/commands/patterns.js.map +1 -0
  236. package/dist/lib/commands/phase-info.d.ts +2 -0
  237. package/dist/lib/commands/phase-info.d.ts.map +1 -0
  238. package/dist/lib/commands/phase-info.js +509 -0
  239. package/dist/lib/commands/phase-info.js.map +1 -0
  240. package/dist/lib/commands/plan-lint.d.ts +56 -0
  241. package/dist/lib/commands/plan-lint.d.ts.map +1 -0
  242. package/dist/lib/commands/plan-lint.js +481 -0
  243. package/dist/lib/commands/plan-lint.js.map +1 -0
  244. package/dist/lib/commands/plan-phase.d.ts +53 -0
  245. package/dist/lib/commands/plan-phase.d.ts.map +1 -0
  246. package/dist/lib/commands/plan-phase.js +288 -0
  247. package/dist/lib/commands/plan-phase.js.map +1 -0
  248. package/dist/lib/commands/progress.d.ts +2 -0
  249. package/dist/lib/commands/progress.d.ts.map +1 -0
  250. package/dist/lib/commands/progress.js +266 -0
  251. package/dist/lib/commands/progress.js.map +1 -0
  252. package/dist/lib/commands/quality.d.ts +2 -0
  253. package/dist/lib/commands/quality.d.ts.map +1 -0
  254. package/dist/lib/commands/quality.js +80 -0
  255. package/dist/lib/commands/quality.js.map +1 -0
  256. package/dist/lib/commands/rollback.d.ts +2 -0
  257. package/dist/lib/commands/rollback.d.ts.map +1 -0
  258. package/dist/lib/commands/rollback.js +145 -0
  259. package/dist/lib/commands/rollback.js.map +1 -0
  260. package/dist/lib/commands/scan.d.ts +25 -0
  261. package/dist/lib/commands/scan.d.ts.map +1 -0
  262. package/dist/lib/commands/scan.js +28 -0
  263. package/dist/lib/commands/scan.js.map +1 -0
  264. package/dist/lib/commands/search.d.ts +2 -0
  265. package/dist/lib/commands/search.d.ts.map +1 -0
  266. package/dist/lib/commands/search.js +212 -0
  267. package/dist/lib/commands/search.js.map +1 -0
  268. package/dist/lib/commands/select-candidate.d.ts +128 -0
  269. package/dist/lib/commands/select-candidate.d.ts.map +1 -0
  270. package/dist/lib/commands/select-candidate.js +518 -0
  271. package/dist/lib/commands/select-candidate.js.map +1 -0
  272. package/dist/lib/commands/singularity.d.ts +2 -0
  273. package/dist/lib/commands/singularity.d.ts.map +1 -0
  274. package/dist/lib/commands/singularity.js +185 -0
  275. package/dist/lib/commands/singularity.js.map +1 -0
  276. package/dist/lib/commands/slug-timestamp.d.ts +2 -0
  277. package/dist/lib/commands/slug-timestamp.d.ts.map +1 -0
  278. package/dist/lib/commands/slug-timestamp.js +54 -0
  279. package/dist/lib/commands/slug-timestamp.js.map +1 -0
  280. package/dist/lib/commands/tail.d.ts +2 -0
  281. package/dist/lib/commands/tail.d.ts.map +1 -0
  282. package/dist/lib/commands/tail.js +100 -0
  283. package/dist/lib/commands/tail.js.map +1 -0
  284. package/dist/lib/commands/todo.d.ts +2 -0
  285. package/dist/lib/commands/todo.d.ts.map +1 -0
  286. package/dist/lib/commands/todo.js +200 -0
  287. package/dist/lib/commands/todo.js.map +1 -0
  288. package/dist/lib/commands/watch.d.ts +2 -0
  289. package/dist/lib/commands/watch.d.ts.map +1 -0
  290. package/dist/lib/commands/watch.js +72 -0
  291. package/dist/lib/commands/watch.js.map +1 -0
  292. package/dist/lib/complexity.d.ts +55 -0
  293. package/dist/lib/complexity.d.ts.map +1 -0
  294. package/dist/lib/complexity.js +80 -0
  295. package/dist/lib/complexity.js.map +1 -0
  296. package/dist/lib/context/agents.d.ts +2 -0
  297. package/dist/lib/context/agents.d.ts.map +1 -0
  298. package/dist/lib/context/agents.js +344 -0
  299. package/dist/lib/context/agents.js.map +1 -0
  300. package/dist/lib/context/base.d.ts +2 -0
  301. package/dist/lib/context/base.d.ts.map +1 -0
  302. package/dist/lib/context/base.js +81 -0
  303. package/dist/lib/context/base.js.map +1 -0
  304. package/dist/lib/context/execute.d.ts +2 -0
  305. package/dist/lib/context/execute.d.ts.map +1 -0
  306. package/dist/lib/context/execute.js +753 -0
  307. package/dist/lib/context/execute.js.map +1 -0
  308. package/dist/lib/context/index.d.ts +2 -0
  309. package/dist/lib/context/index.d.ts.map +1 -0
  310. package/dist/lib/context/index.js +88 -0
  311. package/dist/lib/context/index.js.map +1 -0
  312. package/dist/lib/context/progress.d.ts +2 -0
  313. package/dist/lib/context/progress.d.ts.map +1 -0
  314. package/dist/lib/context/progress.js +178 -0
  315. package/dist/lib/context/progress.js.map +1 -0
  316. package/dist/lib/context/project.d.ts +2 -0
  317. package/dist/lib/context/project.d.ts.map +1 -0
  318. package/dist/lib/context/project.js +413 -0
  319. package/dist/lib/context/project.js.map +1 -0
  320. package/dist/lib/context/research.d.ts +2 -0
  321. package/dist/lib/context/research.d.ts.map +1 -0
  322. package/dist/lib/context/research.js +466 -0
  323. package/dist/lib/context/research.js.map +1 -0
  324. package/dist/lib/dead-ends.d.ts +28 -0
  325. package/dist/lib/dead-ends.d.ts.map +1 -0
  326. package/dist/lib/dead-ends.js +451 -0
  327. package/dist/lib/dead-ends.js.map +1 -0
  328. package/dist/lib/deps.d.ts +2 -0
  329. package/dist/lib/deps.d.ts.map +1 -0
  330. package/dist/lib/deps.js +630 -0
  331. package/dist/lib/deps.js.map +1 -0
  332. package/dist/lib/discussion.d.ts +2 -0
  333. package/dist/lib/discussion.d.ts.map +1 -0
  334. package/dist/lib/discussion.js +1041 -0
  335. package/dist/lib/discussion.js.map +1 -0
  336. package/dist/lib/drift.d.ts +36 -0
  337. package/dist/lib/drift.d.ts.map +1 -0
  338. package/dist/lib/drift.js +481 -0
  339. package/dist/lib/drift.js.map +1 -0
  340. package/dist/lib/evolve/_dimensions-features.d.ts +2 -0
  341. package/dist/lib/evolve/_dimensions-features.d.ts.map +1 -0
  342. package/dist/lib/evolve/_dimensions-features.js +369 -0
  343. package/dist/lib/evolve/_dimensions-features.js.map +1 -0
  344. package/dist/lib/evolve/_dimensions.d.ts +2 -0
  345. package/dist/lib/evolve/_dimensions.d.ts.map +1 -0
  346. package/dist/lib/evolve/_dimensions.js +358 -0
  347. package/dist/lib/evolve/_dimensions.js.map +1 -0
  348. package/dist/lib/evolve/_product-ideation.d.ts +2 -0
  349. package/dist/lib/evolve/_product-ideation.d.ts.map +1 -0
  350. package/dist/lib/evolve/_product-ideation.js +281 -0
  351. package/dist/lib/evolve/_product-ideation.js.map +1 -0
  352. package/dist/lib/evolve/_prompts.d.ts +2 -0
  353. package/dist/lib/evolve/_prompts.d.ts.map +1 -0
  354. package/dist/lib/evolve/_prompts.js +153 -0
  355. package/dist/lib/evolve/_prompts.js.map +1 -0
  356. package/dist/lib/evolve/cli.d.ts +2 -0
  357. package/dist/lib/evolve/cli.d.ts.map +1 -0
  358. package/dist/lib/evolve/cli.js +224 -0
  359. package/dist/lib/evolve/cli.js.map +1 -0
  360. package/dist/lib/evolve/discovery.d.ts +2 -0
  361. package/dist/lib/evolve/discovery.d.ts.map +1 -0
  362. package/dist/lib/evolve/discovery.js +391 -0
  363. package/dist/lib/evolve/discovery.js.map +1 -0
  364. package/dist/lib/evolve/index.d.ts +2 -0
  365. package/dist/lib/evolve/index.d.ts.map +1 -0
  366. package/dist/lib/evolve/index.js +88 -0
  367. package/dist/lib/evolve/index.js.map +1 -0
  368. package/dist/lib/evolve/orchestrator.d.ts +2 -0
  369. package/dist/lib/evolve/orchestrator.d.ts.map +1 -0
  370. package/dist/lib/evolve/orchestrator.js +851 -0
  371. package/dist/lib/evolve/orchestrator.js.map +1 -0
  372. package/dist/lib/evolve/scoring.d.ts +2 -0
  373. package/dist/lib/evolve/scoring.d.ts.map +1 -0
  374. package/dist/lib/evolve/scoring.js +118 -0
  375. package/dist/lib/evolve/scoring.js.map +1 -0
  376. package/dist/lib/evolve/state.d.ts +2 -0
  377. package/dist/lib/evolve/state.d.ts.map +1 -0
  378. package/dist/lib/evolve/state.js +264 -0
  379. package/dist/lib/evolve/state.js.map +1 -0
  380. package/dist/lib/evolve/types.d.ts +249 -0
  381. package/dist/lib/evolve/types.d.ts.map +1 -0
  382. package/dist/lib/evolve/types.js +3 -0
  383. package/dist/lib/evolve/types.js.map +1 -0
  384. package/dist/lib/frontmatter.d.ts +2 -0
  385. package/dist/lib/frontmatter.d.ts.map +1 -0
  386. package/dist/lib/frontmatter.js +513 -0
  387. package/dist/lib/frontmatter.js.map +1 -0
  388. package/dist/lib/gates.d.ts +2 -0
  389. package/dist/lib/gates.d.ts.map +1 -0
  390. package/dist/lib/gates.js +578 -0
  391. package/dist/lib/gates.js.map +1 -0
  392. package/dist/lib/genome.d.ts +10 -0
  393. package/dist/lib/genome.d.ts.map +1 -0
  394. package/dist/lib/genome.js +368 -0
  395. package/dist/lib/genome.js.map +1 -0
  396. package/dist/lib/got.d.ts +2 -0
  397. package/dist/lib/got.d.ts.map +1 -0
  398. package/dist/lib/got.js +280 -0
  399. package/dist/lib/got.js.map +1 -0
  400. package/dist/lib/invariants.d.ts +2 -0
  401. package/dist/lib/invariants.d.ts.map +1 -0
  402. package/dist/lib/invariants.js +298 -0
  403. package/dist/lib/invariants.js.map +1 -0
  404. package/dist/lib/knowledge.d.ts +2 -0
  405. package/dist/lib/knowledge.d.ts.map +1 -0
  406. package/dist/lib/knowledge.js +658 -0
  407. package/dist/lib/knowledge.js.map +1 -0
  408. package/dist/lib/long-term-roadmap.d.ts +2 -0
  409. package/dist/lib/long-term-roadmap.d.ts.map +1 -0
  410. package/dist/lib/long-term-roadmap.js +602 -0
  411. package/dist/lib/long-term-roadmap.js.map +1 -0
  412. package/dist/lib/markdown-split.d.ts +2 -0
  413. package/dist/lib/markdown-split.d.ts.map +1 -0
  414. package/dist/lib/markdown-split.js +199 -0
  415. package/dist/lib/markdown-split.js.map +1 -0
  416. package/dist/lib/mcp-server.d.ts +2 -0
  417. package/dist/lib/mcp-server.d.ts.map +1 -0
  418. package/dist/lib/mcp-server.js +2424 -0
  419. package/dist/lib/mcp-server.js.map +1 -0
  420. package/dist/lib/metrics.d.ts +16 -0
  421. package/dist/lib/metrics.d.ts.map +1 -0
  422. package/dist/lib/metrics.js +48 -0
  423. package/dist/lib/metrics.js.map +1 -0
  424. package/dist/lib/overstory.d.ts +2 -0
  425. package/dist/lib/overstory.d.ts.map +1 -0
  426. package/dist/lib/overstory.js +211 -0
  427. package/dist/lib/overstory.js.map +1 -0
  428. package/dist/lib/parallel.d.ts +2 -0
  429. package/dist/lib/parallel.d.ts.map +1 -0
  430. package/dist/lib/parallel.js +349 -0
  431. package/dist/lib/parallel.js.map +1 -0
  432. package/dist/lib/paths.d.ts +2 -0
  433. package/dist/lib/paths.d.ts.map +1 -0
  434. package/dist/lib/paths.js +254 -0
  435. package/dist/lib/paths.js.map +1 -0
  436. package/dist/lib/phase-complete-llm.d.ts +22 -0
  437. package/dist/lib/phase-complete-llm.d.ts.map +1 -0
  438. package/dist/lib/phase-complete-llm.js +331 -0
  439. package/dist/lib/phase-complete-llm.js.map +1 -0
  440. package/dist/lib/phase-complete.d.ts +46 -0
  441. package/dist/lib/phase-complete.d.ts.map +1 -0
  442. package/dist/lib/phase-complete.js +278 -0
  443. package/dist/lib/phase-complete.js.map +1 -0
  444. package/dist/lib/phase-io.d.ts +2 -0
  445. package/dist/lib/phase-io.d.ts.map +1 -0
  446. package/dist/lib/phase-io.js +126 -0
  447. package/dist/lib/phase-io.js.map +1 -0
  448. package/dist/lib/phase.d.ts +2 -0
  449. package/dist/lib/phase.d.ts.map +1 -0
  450. package/dist/lib/phase.js +1344 -0
  451. package/dist/lib/phase.js.map +1 -0
  452. package/dist/lib/plan-tournament.d.ts +63 -0
  453. package/dist/lib/plan-tournament.d.ts.map +1 -0
  454. package/dist/lib/plan-tournament.js +353 -0
  455. package/dist/lib/plan-tournament.js.map +1 -0
  456. package/dist/lib/refinement.d.ts +74 -0
  457. package/dist/lib/refinement.d.ts.map +1 -0
  458. package/dist/lib/refinement.js +283 -0
  459. package/dist/lib/refinement.js.map +1 -0
  460. package/dist/lib/requirements.d.ts +2 -0
  461. package/dist/lib/requirements.d.ts.map +1 -0
  462. package/dist/lib/requirements.js +355 -0
  463. package/dist/lib/requirements.js.map +1 -0
  464. package/dist/lib/research-bundle.d.ts +2 -0
  465. package/dist/lib/research-bundle.d.ts.map +1 -0
  466. package/dist/lib/research-bundle.js +246 -0
  467. package/dist/lib/research-bundle.js.map +1 -0
  468. package/dist/lib/roadmap.d.ts +2 -0
  469. package/dist/lib/roadmap.d.ts.map +1 -0
  470. package/dist/lib/roadmap.js +541 -0
  471. package/dist/lib/roadmap.js.map +1 -0
  472. package/dist/lib/sample.d.ts +16 -0
  473. package/dist/lib/sample.d.ts.map +1 -0
  474. package/dist/lib/sample.js +20 -0
  475. package/dist/lib/sample.js.map +1 -0
  476. package/dist/lib/scaffold.d.ts +2 -0
  477. package/dist/lib/scaffold.d.ts.map +1 -0
  478. package/dist/lib/scaffold.js +355 -0
  479. package/dist/lib/scaffold.js.map +1 -0
  480. package/dist/lib/scan/_utils.d.ts +11 -0
  481. package/dist/lib/scan/_utils.d.ts.map +1 -0
  482. package/dist/lib/scan/_utils.js +36 -0
  483. package/dist/lib/scan/_utils.js.map +1 -0
  484. package/dist/lib/scan/base64.d.ts +15 -0
  485. package/dist/lib/scan/base64.d.ts.map +1 -0
  486. package/dist/lib/scan/base64.js +66 -0
  487. package/dist/lib/scan/base64.js.map +1 -0
  488. package/dist/lib/scan/ignorefile.d.ts +30 -0
  489. package/dist/lib/scan/ignorefile.d.ts.map +1 -0
  490. package/dist/lib/scan/ignorefile.js +101 -0
  491. package/dist/lib/scan/ignorefile.js.map +1 -0
  492. package/dist/lib/scan/injection.d.ts +14 -0
  493. package/dist/lib/scan/injection.d.ts.map +1 -0
  494. package/dist/lib/scan/injection.js +39 -0
  495. package/dist/lib/scan/injection.js.map +1 -0
  496. package/dist/lib/scan/patterns.d.ts +17 -0
  497. package/dist/lib/scan/patterns.d.ts.map +1 -0
  498. package/dist/lib/scan/patterns.js +123 -0
  499. package/dist/lib/scan/patterns.js.map +1 -0
  500. package/dist/lib/scan/strip-markdown.d.ts +7 -0
  501. package/dist/lib/scan/strip-markdown.d.ts.map +1 -0
  502. package/dist/lib/scan/strip-markdown.js +38 -0
  503. package/dist/lib/scan/strip-markdown.js.map +1 -0
  504. package/dist/lib/scan/types.d.ts +23 -0
  505. package/dist/lib/scan/types.d.ts.map +1 -0
  506. package/dist/lib/scan/types.js +3 -0
  507. package/dist/lib/scan/types.js.map +1 -0
  508. package/dist/lib/scheduler-wait.d.ts +2 -0
  509. package/dist/lib/scheduler-wait.d.ts.map +1 -0
  510. package/dist/lib/scheduler-wait.js +59 -0
  511. package/dist/lib/scheduler-wait.js.map +1 -0
  512. package/dist/lib/scheduler.d.ts +254 -0
  513. package/dist/lib/scheduler.d.ts.map +1 -0
  514. package/dist/lib/scheduler.js +1147 -0
  515. package/dist/lib/scheduler.js.map +1 -0
  516. package/dist/lib/state.d.ts +2 -0
  517. package/dist/lib/state.d.ts.map +1 -0
  518. package/dist/lib/state.js +744 -0
  519. package/dist/lib/state.js.map +1 -0
  520. package/dist/lib/think.d.ts +18 -0
  521. package/dist/lib/think.d.ts.map +1 -0
  522. package/dist/lib/think.js +317 -0
  523. package/dist/lib/think.js.map +1 -0
  524. package/dist/lib/tracker.d.ts +2 -0
  525. package/dist/lib/tracker.d.ts.map +1 -0
  526. package/dist/lib/tracker.js +1121 -0
  527. package/dist/lib/tracker.js.map +1 -0
  528. package/dist/lib/types.d.ts +1514 -0
  529. package/dist/lib/types.d.ts.map +1 -0
  530. package/dist/lib/types.js +4 -0
  531. package/dist/lib/types.js.map +1 -0
  532. package/dist/lib/utils.d.ts +2 -0
  533. package/dist/lib/utils.d.ts.map +1 -0
  534. package/dist/lib/utils.js +1363 -0
  535. package/dist/lib/utils.js.map +1 -0
  536. package/dist/lib/verify.d.ts +2 -0
  537. package/dist/lib/verify.d.ts.map +1 -0
  538. package/dist/lib/verify.js +1153 -0
  539. package/dist/lib/verify.js.map +1 -0
  540. package/dist/lib/wireup/autofix.d.ts +2 -0
  541. package/dist/lib/wireup/autofix.d.ts.map +1 -0
  542. package/dist/lib/wireup/autofix.js +188 -0
  543. package/dist/lib/wireup/autofix.js.map +1 -0
  544. package/dist/lib/wireup/cli.d.ts +2 -0
  545. package/dist/lib/wireup/cli.d.ts.map +1 -0
  546. package/dist/lib/wireup/cli.js +194 -0
  547. package/dist/lib/wireup/cli.js.map +1 -0
  548. package/dist/lib/wireup/detection.d.ts +47 -0
  549. package/dist/lib/wireup/detection.d.ts.map +1 -0
  550. package/dist/lib/wireup/detection.js +410 -0
  551. package/dist/lib/wireup/detection.js.map +1 -0
  552. package/dist/lib/wireup/discovery.d.ts +2 -0
  553. package/dist/lib/wireup/discovery.d.ts.map +1 -0
  554. package/dist/lib/wireup/discovery.js +934 -0
  555. package/dist/lib/wireup/discovery.js.map +1 -0
  556. package/dist/lib/wireup/execution.d.ts +2 -0
  557. package/dist/lib/wireup/execution.d.ts.map +1 -0
  558. package/dist/lib/wireup/execution.js +573 -0
  559. package/dist/lib/wireup/execution.js.map +1 -0
  560. package/dist/lib/wireup/index.d.ts +2 -0
  561. package/dist/lib/wireup/index.d.ts.map +1 -0
  562. package/dist/lib/wireup/index.js +85 -0
  563. package/dist/lib/wireup/index.js.map +1 -0
  564. package/dist/lib/wireup/orchestrator.d.ts +2 -0
  565. package/dist/lib/wireup/orchestrator.d.ts.map +1 -0
  566. package/dist/lib/wireup/orchestrator.js +366 -0
  567. package/dist/lib/wireup/orchestrator.js.map +1 -0
  568. package/dist/lib/wireup/report.d.ts +47 -0
  569. package/dist/lib/wireup/report.d.ts.map +1 -0
  570. package/dist/lib/wireup/report.js +201 -0
  571. package/dist/lib/wireup/report.js.map +1 -0
  572. package/dist/lib/wireup/scenarios.d.ts +2 -0
  573. package/dist/lib/wireup/scenarios.d.ts.map +1 -0
  574. package/dist/lib/wireup/scenarios.js +516 -0
  575. package/dist/lib/wireup/scenarios.js.map +1 -0
  576. package/dist/lib/wireup/state.d.ts +2 -0
  577. package/dist/lib/wireup/state.d.ts.map +1 -0
  578. package/dist/lib/wireup/state.js +102 -0
  579. package/dist/lib/wireup/state.js.map +1 -0
  580. package/dist/lib/wireup/types.d.ts +376 -0
  581. package/dist/lib/wireup/types.d.ts.map +1 -0
  582. package/dist/lib/wireup/types.js +3 -0
  583. package/dist/lib/wireup/types.js.map +1 -0
  584. package/dist/lib/worktree.d.ts +2 -0
  585. package/dist/lib/worktree.d.ts.map +1 -0
  586. package/dist/lib/worktree.js +999 -0
  587. package/dist/lib/worktree.js.map +1 -0
  588. package/lib/autopilot-milestone.ts +136 -0
  589. package/lib/autopilot-pipeline.ts +1179 -0
  590. package/lib/autopilot-waves.ts +361 -0
  591. package/lib/autopilot.ts +1874 -0
  592. package/lib/autoplan.ts +280 -0
  593. package/lib/autoresearch.js +4 -0
  594. package/lib/autoresearch.ts +886 -0
  595. package/lib/backend.ts +1252 -0
  596. package/lib/benchmark.ts +341 -0
  597. package/lib/citations.ts +760 -0
  598. package/lib/cleanup.ts +1588 -0
  599. package/lib/cli/adapters.ts +41 -0
  600. package/lib/cli/agent.ts +83 -0
  601. package/lib/cli/index.ts +273 -0
  602. package/lib/cli/output.ts +33 -0
  603. package/lib/cli/scan-dispatch.ts +130 -0
  604. package/lib/cli/tools.ts +198 -0
  605. package/lib/commands/_dashboard-parsers.ts +275 -0
  606. package/lib/commands/analysis.ts +1851 -0
  607. package/lib/commands/assumptions.ts +232 -0
  608. package/lib/commands/blame.ts +174 -0
  609. package/lib/commands/budget.ts +148 -0
  610. package/lib/commands/check-plans.ts +233 -0
  611. package/lib/commands/config.ts +287 -0
  612. package/lib/commands/dashboard.ts +680 -0
  613. package/lib/commands/estimate.ts +204 -0
  614. package/lib/commands/eval-diff.ts +252 -0
  615. package/lib/commands/freshness.ts +213 -0
  616. package/lib/commands/health.ts +607 -0
  617. package/lib/commands/index.ts +266 -0
  618. package/lib/commands/install.ts +307 -0
  619. package/lib/commands/knowhow-aggregator.ts +345 -0
  620. package/lib/commands/knowledge-search.ts +153 -0
  621. package/lib/commands/long-term-roadmap.ts +390 -0
  622. package/lib/commands/patterns.ts +465 -0
  623. package/lib/commands/phase-info.ts +698 -0
  624. package/lib/commands/plan-lint.ts +546 -0
  625. package/lib/commands/plan-phase.ts +375 -0
  626. package/lib/commands/progress.ts +319 -0
  627. package/lib/commands/quality.ts +138 -0
  628. package/lib/commands/rollback.ts +195 -0
  629. package/lib/commands/scan.ts +72 -0
  630. package/lib/commands/search.ts +300 -0
  631. package/lib/commands/select-candidate.ts +687 -0
  632. package/lib/commands/singularity.ts +222 -0
  633. package/lib/commands/slug-timestamp.ts +74 -0
  634. package/lib/commands/tail.ts +129 -0
  635. package/lib/commands/todo.ts +273 -0
  636. package/lib/commands/watch.ts +80 -0
  637. package/lib/complexity.ts +117 -0
  638. package/lib/context/agents.ts +505 -0
  639. package/lib/context/base.ts +123 -0
  640. package/lib/context/execute.ts +977 -0
  641. package/lib/context/index.ts +110 -0
  642. package/lib/context/progress.ts +278 -0
  643. package/lib/context/project.ts +531 -0
  644. package/lib/context/research.ts +646 -0
  645. package/lib/dead-ends.ts +506 -0
  646. package/lib/deps.ts +773 -0
  647. package/lib/discussion.ts +1275 -0
  648. package/lib/drift.ts +519 -0
  649. package/lib/evolve/_dimensions-features.ts +525 -0
  650. package/lib/evolve/_dimensions.ts +511 -0
  651. package/lib/evolve/_product-ideation.ts +405 -0
  652. package/lib/evolve/_prompts.ts +178 -0
  653. package/lib/evolve/cli.ts +330 -0
  654. package/lib/evolve/discovery.ts +571 -0
  655. package/lib/evolve/index.ts +105 -0
  656. package/lib/evolve/orchestrator.ts +1139 -0
  657. package/lib/evolve/scoring.ts +167 -0
  658. package/lib/evolve/state.ts +330 -0
  659. package/lib/evolve/types.ts +290 -0
  660. package/lib/frontmatter.ts +615 -0
  661. package/lib/gates.ts +695 -0
  662. package/lib/genome.ts +402 -0
  663. package/lib/got.js +4 -0
  664. package/lib/got.ts +361 -0
  665. package/lib/invariants.ts +378 -0
  666. package/lib/knowledge.ts +768 -0
  667. package/lib/long-term-roadmap.ts +806 -0
  668. package/lib/markdown-split.ts +273 -0
  669. package/lib/mcp-server.ts +3292 -0
  670. package/lib/metrics.ts +49 -0
  671. package/lib/overstory.ts +270 -0
  672. package/lib/parallel.ts +570 -0
  673. package/lib/paths.ts +293 -0
  674. package/lib/phase-complete-llm.ts +376 -0
  675. package/lib/phase-complete.ts +366 -0
  676. package/lib/phase-io.ts +101 -0
  677. package/lib/phase.ts +1981 -0
  678. package/lib/plan-tournament.ts +426 -0
  679. package/lib/refinement.ts +349 -0
  680. package/lib/requirements.ts +469 -0
  681. package/lib/research-bundle.ts +300 -0
  682. package/lib/roadmap.ts +775 -0
  683. package/lib/scaffold.ts +480 -0
  684. package/lib/scan/_utils.ts +37 -0
  685. package/lib/scan/base64.ts +90 -0
  686. package/lib/scan/ignorefile.ts +109 -0
  687. package/lib/scan/injection.ts +67 -0
  688. package/lib/scan/patterns.ts +139 -0
  689. package/lib/scan/strip-markdown.ts +39 -0
  690. package/lib/scan/types.ts +28 -0
  691. package/lib/scheduler-wait.ts +58 -0
  692. package/lib/scheduler.ts +1370 -0
  693. package/lib/state.ts +1000 -0
  694. package/lib/think.ts +365 -0
  695. package/lib/tracker.ts +1591 -0
  696. package/lib/types.ts +1663 -0
  697. package/lib/utils.ts +1479 -0
  698. package/lib/verify.ts +1434 -0
  699. package/lib/wireup/autofix.ts +241 -0
  700. package/lib/wireup/cli.ts +278 -0
  701. package/lib/wireup/detection.ts +542 -0
  702. package/lib/wireup/discovery.ts +1063 -0
  703. package/lib/wireup/execution.ts +686 -0
  704. package/lib/wireup/index.ts +117 -0
  705. package/lib/wireup/orchestrator.ts +519 -0
  706. package/lib/wireup/report.ts +286 -0
  707. package/lib/wireup/scenarios.ts +616 -0
  708. package/lib/wireup/state.ts +139 -0
  709. package/lib/wireup/types.ts +436 -0
  710. package/lib/worktree.ts +1309 -0
  711. package/package.json +67 -0
@@ -0,0 +1,1508 @@
1
+ ---
2
+ description: Initialize a new R&D project from idea to roadmap
3
+ argument-hint: [--auto @document.md | --yolo]
4
+ ---
5
+
6
+ <purpose>
7
+ Initialize a new R&D project through unified flow: questioning, research (optional), requirements, roadmap, research landscape, and product-level quality targets. 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.
8
+ </purpose>
9
+
10
+ <required_reading>
11
+ Read all files referenced by the invoking prompt's execution_context before starting.
12
+ </required_reading>
13
+
14
+ <auto_mode>
15
+ ## Auto Mode Detection
16
+
17
+ Check if `--auto` flag is present in $ARGUMENTS.
18
+
19
+ **If auto mode:**
20
+ - Skip brownfield mapping offer (assume greenfield)
21
+ - Skip deep questioning (extract context from provided document)
22
+ - Config questions still required (Step 5)
23
+ - After config: run Steps 6-9 automatically with smart defaults:
24
+ - Research: Always yes
25
+ - Requirements: Include all table stakes + features from provided document
26
+ - Requirements approval: Auto-approve
27
+ - Roadmap approval: Auto-approve
28
+ - Research landscape initialization is automatic
29
+ - If research context (papers, benchmarks) is provided in document, populate LANDSCAPE.md
30
+
31
+ **Document requirement:**
32
+ Auto mode requires an idea document via @ reference (e.g., `/grd:init --auto @prd.md`). If no document provided, error:
33
+
34
+ ```
35
+ Error: --auto requires an idea document via @ reference.
36
+
37
+ Usage: /grd:init --auto @your-idea.md
38
+
39
+ The document should describe what you want to build.
40
+ ```
41
+ </auto_mode>
42
+
43
+ <yolo_mode>
44
+ ## YOLO Mode Detection
45
+
46
+ Check if `autonomous_mode` is true in `.planning/config.json` (or if `--yolo` flag is present).
47
+
48
+ **If YOLO mode:**
49
+ - Skip deep questioning entirely — synthesize PROJECT.md from available context (README, existing code, any provided documents)
50
+ - Skip all approval gates (requirements, roadmap)
51
+ - Auto-select "Research first" with smart defaults
52
+ - Auto-approve config with: YOLO mode, Standard depth, Parallel, Yes git tracking, all agents enabled
53
+ - Research landscape initialized automatically
54
+ - Proceed through entire flow without human interaction
55
+ </yolo_mode>
56
+
57
+ <process>
58
+
59
+ ## 1. Setup
60
+
61
+ **MANDATORY FIRST STEP — Execute these checks before ANY user interaction:**
62
+
63
+ ```bash
64
+ INIT=$(node ${CLAUDE_PLUGIN_ROOT}/bin/grd-tools.js init new-project)
65
+ ```
66
+
67
+ Parse JSON for: `researcher_model`, `synthesizer_model`, `roadmapper_model`, `commit_docs`, `project_exists`, `has_codebase_map`, `planning_exists`, `has_existing_code`, `has_package_file`, `is_brownfield`, `needs_codebase_map`, `has_git`, `autonomous_mode`, `research_dir`, `phases_dir`, `codebase_dir`.
68
+
69
+ **If `project_exists` is true:** Skip to **Step 5 (Workflow Preferences)** — reconfigure settings with existing values pre-populated. Show the user:
70
+
71
+ ```
72
+ Project already initialized. Entering configuration mode.
73
+ Current settings will be shown as defaults — change what you need.
74
+ ```
75
+
76
+ **If `has_git` is false:** Initialize git:
77
+ ```bash
78
+ git init
79
+ ```
80
+
81
+ ## 2. Brownfield Offer
82
+
83
+ **If auto mode or YOLO mode:** Skip to Step 4 (assume greenfield, synthesize PROJECT.md from provided document or available context).
84
+
85
+ **If `needs_codebase_map` is true** (from init — existing code detected but no codebase map):
86
+
87
+ Use AskUserQuestion:
88
+ - header: "Existing Code"
89
+ - question: "I detected existing code in this directory. Would you like to map the codebase first?"
90
+ - options:
91
+ - "Map codebase first" — Run /grd:map-codebase to understand existing architecture (Recommended)
92
+ - "Skip mapping" — Proceed with project initialization
93
+
94
+ **If "Map codebase first":**
95
+ ```
96
+ Run `/grd:map-codebase` first, then return to `/grd:init`
97
+ ```
98
+ Exit command.
99
+
100
+ **If "Skip mapping" OR `needs_codebase_map` is false:** Continue to Step 3.
101
+
102
+ ## 3. Deep Questioning
103
+
104
+ **If auto mode:** Skip. Extract project context from provided document instead and proceed to Step 4.
105
+
106
+ **If YOLO mode:** Skip. Synthesize from README, existing code analysis, and any available context. Proceed to Step 4.
107
+
108
+ **Display stage banner:**
109
+
110
+ ```
111
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
112
+ GRD ► QUESTIONING
113
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
114
+ ```
115
+
116
+ **Open the conversation:**
117
+
118
+ Ask inline (freeform, NOT AskUserQuestion):
119
+
120
+ "What do you want to build?"
121
+
122
+ Wait for their response. This gives you the context needed to ask intelligent follow-up questions.
123
+
124
+ **Follow the thread:**
125
+
126
+ 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.
127
+
128
+ Keep following threads. Each answer opens new threads to explore. Ask about:
129
+ - What excited them
130
+ - What problem sparked this
131
+ - What they mean by vague terms
132
+ - What it would actually look like
133
+ - What's already decided
134
+ - What research or papers informed this
135
+ - What baselines or benchmarks matter
136
+
137
+ Consult `questioning.md` for techniques:
138
+ - Challenge vagueness
139
+ - Make abstract concrete
140
+ - Surface assumptions
141
+ - Find edges
142
+ - Reveal motivation
143
+
144
+ **Check context (background, not out loud):**
145
+
146
+ As you go, mentally check the context checklist from `questioning.md`. If gaps remain, weave questions naturally. Don't suddenly switch to checklist mode.
147
+
148
+ **Decision gate:**
149
+
150
+ When you could write a clear PROJECT.md, use AskUserQuestion:
151
+
152
+ - header: "Ready?"
153
+ - question: "I think I understand what you're after. Ready to create PROJECT.md?"
154
+ - options:
155
+ - "Create PROJECT.md" — Let's move forward
156
+ - "Keep exploring" — I want to share more / ask me more
157
+
158
+ If "Keep exploring" — ask what they want to add, or identify gaps and probe naturally.
159
+
160
+ Loop until "Create PROJECT.md" selected.
161
+
162
+ ## 4. Write PROJECT.md
163
+
164
+ **If auto mode:** Synthesize from provided document. No "Ready?" gate was shown — proceed directly to commit.
165
+
166
+ **If YOLO mode:** Synthesize from all available context (README, code, docs). Proceed directly to commit.
167
+
168
+ Synthesize all context into `.planning/PROJECT.md` using the template from `templates/project.md`.
169
+
170
+ **For greenfield projects:**
171
+
172
+ Initialize requirements as hypotheses:
173
+
174
+ ```markdown
175
+ ## Requirements
176
+
177
+ ### Validated
178
+
179
+ (None yet — ship to validate)
180
+
181
+ ### Active
182
+
183
+ - [ ] [Requirement 1]
184
+ - [ ] [Requirement 2]
185
+ - [ ] [Requirement 3]
186
+
187
+ ### Out of Scope
188
+
189
+ - [Exclusion 1] — [why]
190
+ - [Exclusion 2] — [why]
191
+ ```
192
+
193
+ All Active requirements are hypotheses until shipped and validated.
194
+
195
+ **For brownfield projects (codebase map exists):**
196
+
197
+ Infer Validated requirements from existing code:
198
+
199
+ 1. Read `${codebase_dir}/ARCHITECTURE.md` and `STACK.md`
200
+ 2. Identify what the codebase already does
201
+ 3. These become the initial Validated set
202
+
203
+ ```markdown
204
+ ## Requirements
205
+
206
+ ### Validated
207
+
208
+ - V [Existing capability 1] — existing
209
+ - V [Existing capability 2] — existing
210
+ - V [Existing capability 3] — existing
211
+
212
+ ### Active
213
+
214
+ - [ ] [New requirement 1]
215
+ - [ ] [New requirement 2]
216
+
217
+ ### Out of Scope
218
+
219
+ - [Exclusion 1] — [why]
220
+ ```
221
+
222
+ **Key Decisions:**
223
+
224
+ Initialize with any decisions made during questioning:
225
+
226
+ ```markdown
227
+ ## Key Decisions
228
+
229
+ | Decision | Rationale | Outcome |
230
+ |----------|-----------|---------|
231
+ | [Choice from questioning] | [Why] | — Pending |
232
+ ```
233
+
234
+ **Last updated footer:**
235
+
236
+ ```markdown
237
+ ---
238
+ *Last updated: [date] after initialization*
239
+ ```
240
+
241
+ Do not compress. Capture everything gathered.
242
+
243
+ **Commit PROJECT.md:**
244
+
245
+ ```bash
246
+ mkdir -p .planning
247
+ node ${CLAUDE_PLUGIN_ROOT}/bin/grd-tools.js commit "docs: initialize project" --files .planning/PROJECT.md
248
+ ```
249
+
250
+ ## 4.5. Initialize Research Landscape
251
+
252
+ **Create research landscape directory and files:**
253
+
254
+ ```bash
255
+ mkdir -p ${research_dir}
256
+ ```
257
+
258
+ Create `${research_dir}/LANDSCAPE.md`:
259
+ ```markdown
260
+ # Research Landscape
261
+
262
+ ## Domain
263
+ [Extracted from PROJECT.md — the research area / problem space]
264
+
265
+ ## Key Methods
266
+ <!-- Updated by /grd:survey -->
267
+
268
+ ## State of the Art
269
+ <!-- Updated by /grd:survey -->
270
+
271
+ ## Open Problems
272
+ <!-- Identified gaps and opportunities -->
273
+
274
+ ---
275
+ *Initialized: [date]*
276
+ ```
277
+
278
+ Create `${research_dir}/PAPERS.md`:
279
+ ```markdown
280
+ # Paper Registry
281
+
282
+ ## Reviewed
283
+ <!-- Papers analyzed via /grd:deep-dive -->
284
+
285
+ ## Queue
286
+ <!-- Papers to review -->
287
+
288
+ ---
289
+ *Initialized: [date]*
290
+ ```
291
+
292
+ Create `${research_dir}/BENCHMARKS.md`:
293
+ ```markdown
294
+ # Benchmarks & Baselines
295
+
296
+ ## Metrics
297
+ <!-- Key metrics for this project -->
298
+
299
+ ## Baselines
300
+ <!-- Current performance baselines -->
301
+
302
+ ## Targets
303
+ <!-- Quality targets by phase -->
304
+
305
+ ---
306
+ *Initialized: [date]*
307
+ ```
308
+
309
+ Create `${research_dir}/KNOWHOW.md`:
310
+ ```markdown
311
+ # Know-How Registry
312
+
313
+ ## Techniques
314
+ <!-- Proven techniques and their conditions -->
315
+
316
+ ## Anti-Patterns
317
+ <!-- What to avoid and why -->
318
+
319
+ ## Implementation Notes
320
+ <!-- Practical notes from execution -->
321
+
322
+ ---
323
+ *Initialized: [date]*
324
+ ```
325
+
326
+ **Commit research landscape:**
327
+
328
+ ```bash
329
+ node ${CLAUDE_PLUGIN_ROOT}/bin/grd-tools.js commit "docs: initialize research landscape" --files ${research_dir}/LANDSCAPE.md ${research_dir}/PAPERS.md ${research_dir}/BENCHMARKS.md ${research_dir}/KNOWHOW.md
330
+ ```
331
+
332
+ ## 5. Workflow Preferences
333
+
334
+ **Pre-population from existing config:** If `.planning/config.json` already exists, read it first. For each question below, pre-select the option matching the current config value. This lets users see and confirm or change their current settings. When presenting questions, indicate the current value with "(current)" appended to the matching option label.
335
+
336
+ **If YOLO mode:** Auto-set config with defaults and skip to Step 5.5:
337
+ ```json
338
+ {
339
+ "mode": "yolo",
340
+ "depth": "standard",
341
+ "parallelization": true,
342
+ "commit_docs": true,
343
+ "model_profile": "balanced",
344
+ "autonomous_mode": true,
345
+ "workflow": {
346
+ "research": true,
347
+ "plan_check": true,
348
+ "verifier": true
349
+ },
350
+ "research_gates": {
351
+ "verification_design": false,
352
+ "method_selection": false,
353
+ "baseline_review": false
354
+ }
355
+ }
356
+ ```
357
+
358
+ **Round 1 — Core workflow settings (4 questions):**
359
+
360
+ ```
361
+ questions: [
362
+ {
363
+ header: "Mode",
364
+ question: "How do you want to work?",
365
+ multiSelect: false,
366
+ options: [
367
+ { label: "YOLO (Recommended)", description: "Auto-approve, just execute" },
368
+ { label: "Interactive", description: "Confirm at each step" }
369
+ ]
370
+ },
371
+ {
372
+ header: "Depth",
373
+ question: "How thorough should planning be?",
374
+ multiSelect: false,
375
+ options: [
376
+ { label: "Quick", description: "Ship fast (3-5 phases, 1-3 plans each)" },
377
+ { label: "Standard", description: "Balanced scope and speed (5-8 phases, 3-5 plans each)" },
378
+ { label: "Comprehensive", description: "Thorough coverage (8-12 phases, 5-10 plans each)" }
379
+ ]
380
+ },
381
+ {
382
+ header: "Execution",
383
+ question: "Run plans in parallel?",
384
+ multiSelect: false,
385
+ options: [
386
+ { label: "Parallel (Recommended)", description: "Independent plans run simultaneously" },
387
+ { label: "Sequential", description: "One plan at a time" }
388
+ ]
389
+ },
390
+ {
391
+ header: "Git Tracking",
392
+ question: "Commit planning docs to git?",
393
+ multiSelect: false,
394
+ options: [
395
+ { label: "Yes (Recommended)", description: "Planning docs tracked in version control" },
396
+ { label: "No", description: "Keep .planning/ local-only (add to .gitignore)" }
397
+ ]
398
+ }
399
+ ]
400
+ ```
401
+
402
+ **Round 2 — Workflow agents:**
403
+
404
+ These spawn additional agents during planning/execution. They add tokens and time but improve quality.
405
+
406
+ | Agent | When it runs | What it does |
407
+ |-------|--------------|--------------|
408
+ | **Researcher** | Before planning each phase | Investigates domain, finds patterns, surfaces gotchas |
409
+ | **Plan Checker** | After plan is created | Verifies plan actually achieves the phase goal |
410
+ | **Verifier** | After phase execution | Confirms must-haves were delivered |
411
+
412
+ All recommended for important projects. Skip for quick experiments.
413
+
414
+ ```
415
+ questions: [
416
+ {
417
+ header: "Research",
418
+ question: "Research before planning each phase? (adds tokens/time)",
419
+ multiSelect: false,
420
+ options: [
421
+ { label: "Yes (Recommended)", description: "Investigate domain, find patterns, surface gotchas" },
422
+ { label: "No", description: "Plan directly from requirements" }
423
+ ]
424
+ },
425
+ {
426
+ header: "Plan Check",
427
+ question: "Verify plans will achieve their goals? (adds tokens/time)",
428
+ multiSelect: false,
429
+ options: [
430
+ { label: "Yes (Recommended)", description: "Catch gaps before execution starts" },
431
+ { label: "No", description: "Execute plans without verification" }
432
+ ]
433
+ },
434
+ {
435
+ header: "Verifier",
436
+ question: "Verify work satisfies requirements after each phase? (adds tokens/time)",
437
+ multiSelect: false,
438
+ options: [
439
+ { label: "Yes (Recommended)", description: "Confirm deliverables match phase goals" },
440
+ { label: "No", description: "Trust execution, skip verification" }
441
+ ]
442
+ },
443
+ {
444
+ header: "Model Profile",
445
+ question: "Which AI models for planning agents?",
446
+ multiSelect: false,
447
+ options: [
448
+ { label: "Balanced (Recommended)", description: "Sonnet for most agents — good quality/cost ratio" },
449
+ { label: "Quality", description: "Opus for research/roadmap — higher cost, deeper analysis" },
450
+ { label: "Budget", description: "Haiku where possible — fastest, lowest cost" }
451
+ ]
452
+ }
453
+ ]
454
+ ```
455
+
456
+ **Round 3 — Research gates (R&D-specific):**
457
+
458
+ ```
459
+ questions: [
460
+ {
461
+ header: "Research Gates",
462
+ question: "Pause for human review at these research checkpoints?",
463
+ multiSelect: true,
464
+ options: [
465
+ { label: "Verification Design", description: "Review EVAL.md before execution (recommended for novel methods)" },
466
+ { label: "Method Selection", description: "Review method choice before planning" },
467
+ { label: "Baseline Review", description: "Review baseline assessment before setting targets" }
468
+ ]
469
+ }
470
+ ]
471
+ ```
472
+
473
+ **Round 4 — Execution backend:**
474
+
475
+ ```
476
+ questions: [
477
+ {
478
+ header: "Execution Backend",
479
+ question: "How should GRD execute work?",
480
+ multiSelect: false,
481
+ options: [
482
+ { label: "GRD (Default)", description: "Use GRD's own commands/skills with the configured AI backend" },
483
+ { label: "Superpowers", description: "Use Superpowers plugin system — supports multi-account rotation across AI backends" },
484
+ { label: "Overstory", description: "Use Overstory multi-agent orchestration — tmux + git worktrees" },
485
+ { label: "Claude Code", description: "Use Claude Code native subagents directly" },
486
+ { label: "Codex", description: "Use OpenAI Codex CLI" },
487
+ { label: "Gemini", description: "Use Google Gemini CLI" },
488
+ { label: "OpenCode", description: "Use OpenCode CLI (provider-agnostic)" }
489
+ ]
490
+ }
491
+ ]
492
+ ```
493
+
494
+ Backend mapping:
495
+ - "GRD (Default)" → `backend: "grd"`
496
+ - "Superpowers" → `backend: "superpowers"`
497
+ - "Overstory" → `backend: "overstory"`
498
+ - "Claude Code" → `backend: "claude"`
499
+ - "Codex" → `backend: "codex"`
500
+ - "Gemini" → `backend: "gemini"`
501
+ - "OpenCode" → `backend: "opencode"`
502
+
503
+ **Round 5 — AI Accounts (always shown, not conditional on backend choice):**
504
+
505
+ Account rotation works with ANY execution backend — it controls which AI service credentials the scheduler uses when spawning subprocesses. This round detects which CLIs are installed, then asks the user about their accounts.
506
+
507
+ **Step 5a: Detect installed CLIs only (NOT config dirs).**
508
+
509
+ ```bash
510
+ which claude 2>/dev/null && echo "DETECTED: claude"
511
+ which codex 2>/dev/null && echo "DETECTED: codex"
512
+ which gemini 2>/dev/null && echo "DETECTED: gemini"
513
+ which opencode 2>/dev/null && echo "DETECTED: opencode"
514
+ ```
515
+
516
+ Do NOT scan for config directories — the filesystem cannot tell you which directories are real authenticated accounts vs. backups, test dirs, or leftover state. Only the user knows how many accounts they have.
517
+
518
+ **Step 5b: Ask about account rotation.**
519
+
520
+ ```
521
+ I found these AI CLIs installed:
522
+ ✓ claude
523
+ ✓ codex
524
+ ✗ gemini (not installed)
525
+ ✗ opencode (not installed)
526
+ ```
527
+
528
+ ```
529
+ questions: [
530
+ {
531
+ header: "AI Account Rotation",
532
+ question: "Do you have multiple AI service accounts (e.g., personal + work subscriptions) that you want GRD to rotate between? This avoids rate limits during long autopilot runs.",
533
+ multiSelect: false,
534
+ options: [
535
+ { label: "Yes — I have multiple accounts", description: "I'll tell you about each one" },
536
+ { label: "No — just one account", description: "Use my default CLI credentials" }
537
+ ]
538
+ }
539
+ ]
540
+ ```
541
+
542
+ If "No" → skip to Step 5f (single-account defaults).
543
+
544
+ **Step 5c: For each installed CLI, ask how many accounts the user has.**
545
+
546
+ Only ask about CLIs that were detected in Step 5a. Ask one backend at a time:
547
+
548
+ ```
549
+ questions: [
550
+ {
551
+ header: "Claude Accounts",
552
+ question: "How many Claude accounts do you want to rotate between?",
553
+ multiSelect: false,
554
+ options: [
555
+ { label: "1 (default only)", description: "Just ~/.claude or your default config" },
556
+ { label: "2" },
557
+ { label: "3" },
558
+ { label: "More (I'll specify)" }
559
+ ]
560
+ }
561
+ ]
562
+ ```
563
+
564
+ Repeat for each detected backend (codex, gemini, opencode).
565
+
566
+ If the user answers "1" for every backend, there's nothing to rotate — skip to Step 5f.
567
+
568
+ **Step 5d: For each account, ask where its config directory is.**
569
+
570
+ For backends where the user has 2+ accounts, ask for each config directory path. Pre-fill the first account with the CLI's default path:
571
+
572
+ ```
573
+ Claude account 1 — config directory:
574
+ [~/.claude] ← default, press Enter to accept
575
+
576
+ Claude account 2 — config directory:
577
+ [Enter path, e.g. ~/.claude-work]
578
+
579
+ Claude account 3 — config directory:
580
+ [Enter path]
581
+ ```
582
+
583
+ After each path, explain how to set it up if the user hasn't already:
584
+
585
+ ```
586
+ ℹ To authenticate a new account at that path:
587
+ CLAUDE_CONFIG_DIR=~/.claude-work claude auth login
588
+ ```
589
+
590
+ The equivalent for each backend:
591
+ - Claude: `CLAUDE_CONFIG_DIR=<path> claude auth login`
592
+ - Codex: `CODEX_HOME=<path> codex auth login`
593
+ - Gemini: `GEMINI_CLI_HOME=<path> gemini auth login`
594
+ - OpenCode: `OPENCODE_CONFIG_DIR=<path> opencode auth login`
595
+
596
+ **Step 5e: Ask for priority order and fallback.**
597
+
598
+ Only if the user has 2+ backends:
599
+
600
+ ```
601
+ questions: [
602
+ {
603
+ header: "Backend Priority",
604
+ question: "Which AI backend should GRD try first?",
605
+ multiSelect: false,
606
+ options: [
607
+ // Only show backends the user configured accounts for:
608
+ { label: "Claude first, then Codex", description: "Try Claude accounts first; use Codex if all Claude accounts hit rate limits" },
609
+ { label: "Codex first, then Claude" }
610
+ ]
611
+ },
612
+ {
613
+ header: "Fallback",
614
+ question: "If ALL your accounts are rate-limited, which backend should GRD fall back to?",
615
+ multiSelect: false,
616
+ options: [
617
+ { label: "Same as primary (wait for recovery)", description: "GRD waits up to 90 minutes for an account to recover — recommended" },
618
+ { label: "Gemini", description: "Use Gemini as a last resort" },
619
+ { label: "OpenCode", description: "Use OpenCode as a last resort" }
620
+ ]
621
+ }
622
+ ]
623
+ ```
624
+
625
+ If the user only has one backend (e.g., 3 Claude accounts but no Codex), skip the priority question.
626
+
627
+ **Step 5f: Validate each path.**
628
+
629
+ For each config directory the user entered:
630
+
631
+ ```bash
632
+ test -d "<path>" && echo "OK" || echo "MISSING"
633
+ ```
634
+
635
+ If missing:
636
+
637
+ ```
638
+ ⚠ <path> does not exist yet.
639
+
640
+ To create it and authenticate:
641
+ CLAUDE_CONFIG_DIR=<path> claude auth login
642
+
643
+ Include it anyway? (You can authenticate later) [Yes / No]
644
+ ```
645
+
646
+ **Step 5g: Confirm and write config.**
647
+
648
+ Show a summary before writing:
649
+
650
+ ```
651
+ Account rotation configuration:
652
+
653
+ Claude (3 accounts):
654
+ 1. ~/.claude (validated ✓)
655
+ 2. ~/.claude-personal (validated ✓)
656
+ 3. ~/.claude-work (validated ✓)
657
+
658
+ Priority: claude
659
+ Fallback: wait for recovery (max 90 min)
660
+
661
+ Token optimization: balanced (change later with `gd settings token_profile`)
662
+
663
+ Save this configuration? [Yes / No]
664
+ ```
665
+
666
+ If "No" → let user re-enter.
667
+
668
+ **Step 5h: If "No" to rotation or single account, configure minimal defaults.**
669
+
670
+ Write a scheduler config with no rotation:
671
+
672
+ ```json
673
+ {
674
+ "scheduler": {
675
+ "backend_priority": ["claude"],
676
+ "free_fallback": { "backend": "claude" }
677
+ }
678
+ }
679
+ ```
680
+
681
+ No `superpowers.accounts` needed. The scheduler still provides token tracking, rate-limit wait-for-recovery, budget pressure detection, and idle watchdog — just without multi-account rotation.
682
+
683
+ **Conditional: If "Overstory" selected, ask sub-options:**
684
+
685
+ ```
686
+ questions: [
687
+ {
688
+ header: "Runtime",
689
+ question: "Overstory runtime adapter for workers?",
690
+ multiSelect: false,
691
+ options: [
692
+ { label: "claude (Default)", description: "Claude Code as the worker runtime" },
693
+ { label: "codex", description: "OpenAI Codex as the worker runtime" },
694
+ { label: "cursor", description: "Cursor as the worker runtime" },
695
+ { label: "copilot", description: "GitHub Copilot as the worker runtime" }
696
+ ]
697
+ },
698
+ {
699
+ header: "Merge Strategy",
700
+ question: "Merge strategy for completed agent results?",
701
+ multiSelect: false,
702
+ options: [
703
+ { label: "Auto (Default)", description: "FIFO merge queue — automatically merge as agents complete" },
704
+ { label: "Manual", description: "Prompt for confirmation before each merge" }
705
+ ]
706
+ }
707
+ ]
708
+ ```
709
+
710
+ Create `.planning/config.json` with all settings:
711
+
712
+ ```json
713
+ {
714
+ "mode": "yolo|interactive",
715
+ "depth": "quick|standard|comprehensive",
716
+ "parallelization": true|false,
717
+ "commit_docs": true|false,
718
+ "model_profile": "quality|balanced|budget",
719
+ "autonomous_mode": false,
720
+ "backend": "grd|superpowers|overstory|claude|codex|gemini|opencode",
721
+ "workflow": {
722
+ "research": true|false,
723
+ "plan_check": true|false,
724
+ "verifier": true|false
725
+ },
726
+ "research_gates": {
727
+ "verification_design": true|false,
728
+ "method_selection": true|false,
729
+ "baseline_review": true|false
730
+ },
731
+ "superpowers": {
732
+ "default_backend": "claude|codex|gemini|opencode",
733
+ "account_rotation": true|false,
734
+ "accounts": {
735
+ // Populated from Round 5 auto-detection + user selection:
736
+ "claude": [{ "config_dir": "~/.claude" }, { "config_dir": "~/.claude-personal" }],
737
+ "codex": [{ "config_dir": "~/.codex" }]
738
+ }
739
+ },
740
+ "scheduler": {
741
+ "backend_priority": ["claude", "codex", "gemini", "opencode"],
742
+ "free_fallback": { "backend": "opencode" },
743
+ "prediction": {
744
+ "window_minutes": 15,
745
+ "ewma_alpha": 0.3,
746
+ "safety_margin_tasks": 1.5,
747
+ "min_samples": 3
748
+ }
749
+ },
750
+ "overstory": {
751
+ "runtime": "claude|codex|cursor|copilot",
752
+ "merge_strategy": "auto|manual",
753
+ "poll_interval_ms": 5000
754
+ }
755
+ }
756
+ ```
757
+
758
+ Include `superpowers` section only when backend is "superpowers".
759
+ Include `scheduler` section only when backend is "superpowers" and account_rotation is true.
760
+ Include `overstory` section only when backend is "overstory".
761
+
762
+ Superpowers Accounts:
763
+ - Parse comma-separated paths for each backend
764
+ - For each non-empty backend, create `superpowers.accounts.<backend>` array of `{ config_dir: "<path>" }` objects
765
+ - Empty entries are omitted from config
766
+
767
+ Backend Priority:
768
+ - Parse comma-separated backend names → `scheduler.backend_priority` array
769
+ - Only include backends that have accounts configured
770
+
771
+ Free Fallback:
772
+ - "OpenCode (Default)" → `scheduler.free_fallback: { "backend": "opencode" }`
773
+ - "Claude Code" → `scheduler.free_fallback: { "backend": "claude" }`
774
+ - "Codex" → `scheduler.free_fallback: { "backend": "codex" }`
775
+ - "Gemini" → `scheduler.free_fallback: { "backend": "gemini" }`
776
+
777
+ Prediction defaults are always included in `scheduler.prediction` — these are sensible defaults that users rarely need to change.
778
+ When reconfiguring an existing project (`project_exists` is true), merge new values into existing config — do not overwrite unrelated fields.
779
+
780
+ **If commit_docs = No:**
781
+ - Set `commit_docs: false` in config.json
782
+ - Add `.planning/` to `.gitignore` (create if needed)
783
+
784
+ **If commit_docs = Yes:**
785
+ - No additional gitignore entries needed
786
+
787
+ **Commit config.json:**
788
+
789
+ ```bash
790
+ node ${CLAUDE_PLUGIN_ROOT}/bin/grd-tools.js commit "chore: add project config" --files .planning/config.json
791
+ ```
792
+
793
+ **Note:** Run `/grd:settings` anytime to update these preferences.
794
+
795
+ ## 5.5. Resolve Model Profile
796
+
797
+ Use models from init: `researcher_model`, `synthesizer_model`, `roadmapper_model`.
798
+
799
+ ## 6. Research Decision
800
+
801
+ **If auto mode or YOLO mode:** Default to "Research first" without asking.
802
+
803
+ Use AskUserQuestion:
804
+ - header: "Research"
805
+ - question: "Research the domain ecosystem before defining requirements?"
806
+ - options:
807
+ - "Research first (Recommended)" — Discover standard stacks, expected features, architecture patterns
808
+ - "Skip research" — I know this domain well, go straight to requirements
809
+
810
+ **If "Research first":**
811
+
812
+ Display stage banner:
813
+ ```
814
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
815
+ GRD ► RESEARCHING
816
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
817
+
818
+ Researching [domain] ecosystem...
819
+ ```
820
+
821
+ Create research directory:
822
+ ```bash
823
+ mkdir -p ${research_dir}
824
+ ```
825
+
826
+ **Determine milestone context:**
827
+
828
+ Check if this is greenfield or subsequent milestone:
829
+ - If no "Validated" requirements in PROJECT.md -> Greenfield (building from scratch)
830
+ - If "Validated" requirements exist -> Subsequent milestone (adding to existing app)
831
+
832
+ Display spawning indicator:
833
+ ```
834
+ * Spawning 4 researchers in parallel...
835
+ -> Stack research
836
+ -> Features research
837
+ -> Architecture research
838
+ -> Pitfalls research
839
+ ```
840
+
841
+ Spawn 4 parallel grd-project-researcher agents with rich context:
842
+
843
+ ```
844
+ Task(prompt="First, read ${CLAUDE_PLUGIN_ROOT}/agents/grd-project-researcher.md for your role and instructions.
845
+
846
+ PATHS:
847
+ research_dir: ${research_dir}
848
+ codebase_dir: ${codebase_dir}
849
+ phases_dir: ${phases_dir}
850
+
851
+ <research_type>
852
+ Project Research — Stack dimension for [domain].
853
+ </research_type>
854
+
855
+ <milestone_context>
856
+ [greenfield OR subsequent]
857
+
858
+ Greenfield: Research the standard stack for building [domain] from scratch.
859
+ Subsequent: Research what's needed to add [target features] to an existing [domain] app. Don't re-research the existing system.
860
+ </milestone_context>
861
+
862
+ <question>
863
+ What's the standard 2025 stack for [domain]?
864
+ </question>
865
+
866
+ <project_context>
867
+ [PROJECT.md summary - core value, constraints, what they're building]
868
+ </project_context>
869
+
870
+ <downstream_consumer>
871
+ Your STACK.md feeds into roadmap creation. Be prescriptive:
872
+ - Specific libraries with versions
873
+ - Clear rationale for each choice
874
+ - What NOT to use and why
875
+ </downstream_consumer>
876
+
877
+ <quality_gate>
878
+ - [ ] Versions are current (verify with Context7/official docs, not training data)
879
+ - [ ] Rationale explains WHY, not just WHAT
880
+ - [ ] Confidence levels assigned to each recommendation
881
+ </quality_gate>
882
+
883
+ <output>
884
+ Write to: ${research_dir}/STACK.md
885
+ Use template: ${CLAUDE_PLUGIN_ROOT}/templates/research-project/STACK.md
886
+ </output>
887
+ ", subagent_type="general-purpose", model="{researcher_model}", description="Stack research")
888
+
889
+ Task(prompt="First, read ${CLAUDE_PLUGIN_ROOT}/agents/grd-project-researcher.md for your role and instructions.
890
+
891
+ PATHS:
892
+ research_dir: ${research_dir}
893
+ codebase_dir: ${codebase_dir}
894
+ phases_dir: ${phases_dir}
895
+
896
+ <research_type>
897
+ Project Research — Features dimension for [domain].
898
+ </research_type>
899
+
900
+ <milestone_context>
901
+ [greenfield OR subsequent]
902
+
903
+ Greenfield: What features do [domain] products have? What's table stakes vs differentiating?
904
+ Subsequent: How do [target features] typically work? What's expected behavior?
905
+ </milestone_context>
906
+
907
+ <question>
908
+ What features do [domain] products have? What's table stakes vs differentiating?
909
+ </question>
910
+
911
+ <project_context>
912
+ [PROJECT.md summary]
913
+ </project_context>
914
+
915
+ <downstream_consumer>
916
+ Your FEATURES.md feeds into requirements definition. Categorize clearly:
917
+ - Table stakes (must have or users leave)
918
+ - Differentiators (competitive advantage)
919
+ - Anti-features (things to deliberately NOT build)
920
+ </downstream_consumer>
921
+
922
+ <quality_gate>
923
+ - [ ] Categories are clear (table stakes vs differentiators vs anti-features)
924
+ - [ ] Complexity noted for each feature
925
+ - [ ] Dependencies between features identified
926
+ </quality_gate>
927
+
928
+ <output>
929
+ Write to: ${research_dir}/FEATURES.md
930
+ Use template: ${CLAUDE_PLUGIN_ROOT}/templates/research-project/FEATURES.md
931
+ </output>
932
+ ", subagent_type="general-purpose", model="{researcher_model}", description="Features research")
933
+
934
+ Task(prompt="First, read ${CLAUDE_PLUGIN_ROOT}/agents/grd-project-researcher.md for your role and instructions.
935
+
936
+ PATHS:
937
+ research_dir: ${research_dir}
938
+ codebase_dir: ${codebase_dir}
939
+ phases_dir: ${phases_dir}
940
+
941
+ <research_type>
942
+ Project Research — Architecture dimension for [domain].
943
+ </research_type>
944
+
945
+ <milestone_context>
946
+ [greenfield OR subsequent]
947
+
948
+ Greenfield: How are [domain] systems typically structured? What are major components?
949
+ Subsequent: How do [target features] integrate with existing [domain] architecture?
950
+ </milestone_context>
951
+
952
+ <question>
953
+ How are [domain] systems typically structured? What are major components?
954
+ </question>
955
+
956
+ <project_context>
957
+ [PROJECT.md summary]
958
+ </project_context>
959
+
960
+ <downstream_consumer>
961
+ Your ARCHITECTURE.md informs phase structure in roadmap. Include:
962
+ - Component boundaries (what talks to what)
963
+ - Data flow (how information moves)
964
+ - Suggested build order (dependencies between components)
965
+ </downstream_consumer>
966
+
967
+ <quality_gate>
968
+ - [ ] Components clearly defined with boundaries
969
+ - [ ] Data flow direction explicit
970
+ - [ ] Build order implications noted
971
+ </quality_gate>
972
+
973
+ <output>
974
+ Write to: ${research_dir}/ARCHITECTURE.md
975
+ Use template: ${CLAUDE_PLUGIN_ROOT}/templates/research-project/ARCHITECTURE.md
976
+ </output>
977
+ ", subagent_type="general-purpose", model="{researcher_model}", description="Architecture research")
978
+
979
+ Task(prompt="First, read ${CLAUDE_PLUGIN_ROOT}/agents/grd-project-researcher.md for your role and instructions.
980
+
981
+ PATHS:
982
+ research_dir: ${research_dir}
983
+ codebase_dir: ${codebase_dir}
984
+ phases_dir: ${phases_dir}
985
+
986
+ <research_type>
987
+ Project Research — Pitfalls dimension for [domain].
988
+ </research_type>
989
+
990
+ <milestone_context>
991
+ [greenfield OR subsequent]
992
+
993
+ Greenfield: What do [domain] projects commonly get wrong? Critical mistakes?
994
+ Subsequent: What are common mistakes when adding [target features] to [domain]?
995
+ </milestone_context>
996
+
997
+ <question>
998
+ What do [domain] projects commonly get wrong? Critical mistakes?
999
+ </question>
1000
+
1001
+ <project_context>
1002
+ [PROJECT.md summary]
1003
+ </project_context>
1004
+
1005
+ <downstream_consumer>
1006
+ Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
1007
+ - Warning signs (how to detect early)
1008
+ - Prevention strategy (how to avoid)
1009
+ - Which phase should address it
1010
+ </downstream_consumer>
1011
+
1012
+ <quality_gate>
1013
+ - [ ] Pitfalls are specific to this domain (not generic advice)
1014
+ - [ ] Prevention strategies are actionable
1015
+ - [ ] Phase mapping included where relevant
1016
+ </quality_gate>
1017
+
1018
+ <output>
1019
+ Write to: ${research_dir}/PITFALLS.md
1020
+ Use template: ${CLAUDE_PLUGIN_ROOT}/templates/research-project/PITFALLS.md
1021
+ </output>
1022
+ ", subagent_type="general-purpose", model="{researcher_model}", description="Pitfalls research")
1023
+ ```
1024
+
1025
+ After all 4 agents complete, spawn synthesizer to create SUMMARY.md:
1026
+
1027
+ ```
1028
+ Task(prompt="
1029
+ <task>
1030
+ Synthesize research outputs into SUMMARY.md.
1031
+ </task>
1032
+
1033
+ <research_files>
1034
+ Read these files:
1035
+ - ${research_dir}/STACK.md
1036
+ - ${research_dir}/FEATURES.md
1037
+ - ${research_dir}/ARCHITECTURE.md
1038
+ - ${research_dir}/PITFALLS.md
1039
+ </research_files>
1040
+
1041
+ PATHS:
1042
+ research_dir: ${research_dir}
1043
+ codebase_dir: ${codebase_dir}
1044
+ phases_dir: ${phases_dir}
1045
+
1046
+ <output>
1047
+ Write to: ${research_dir}/SUMMARY.md
1048
+ Use template: ${CLAUDE_PLUGIN_ROOT}/templates/research-project/SUMMARY.md
1049
+ Commit after writing.
1050
+ </output>
1051
+ ", subagent_type="grd:grd-research-synthesizer", model="{synthesizer_model}", description="Synthesize research")
1052
+ ```
1053
+
1054
+ Display research complete banner and key findings:
1055
+ ```
1056
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1057
+ GRD ► RESEARCH COMPLETE
1058
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1059
+
1060
+ ## Key Findings
1061
+
1062
+ **Stack:** [from SUMMARY.md]
1063
+ **Table Stakes:** [from SUMMARY.md]
1064
+ **Watch Out For:** [from SUMMARY.md]
1065
+
1066
+ Files: `${research_dir}/`
1067
+ ```
1068
+
1069
+ **If "Skip research":** Continue to Step 7.
1070
+
1071
+ ## 7. Define Requirements
1072
+
1073
+ Display stage banner:
1074
+ ```
1075
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1076
+ GRD ► DEFINING REQUIREMENTS
1077
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1078
+ ```
1079
+
1080
+ **Load context:**
1081
+
1082
+ Read PROJECT.md and extract:
1083
+ - Core value (the ONE thing that must work)
1084
+ - Stated constraints (budget, timeline, tech limitations)
1085
+ - Any explicit scope boundaries
1086
+
1087
+ **If research exists:** Read research/FEATURES.md and extract feature categories.
1088
+
1089
+ **If auto mode or YOLO mode:**
1090
+ - Auto-include all table stakes features (users expect these)
1091
+ - Include features explicitly mentioned in provided document
1092
+ - Auto-defer differentiators not mentioned in document
1093
+ - Skip per-category AskUserQuestion loops
1094
+ - Skip "Any additions?" question
1095
+ - Skip requirements approval gate
1096
+ - Generate REQUIREMENTS.md and commit directly
1097
+
1098
+ **Present features by category (interactive mode only):**
1099
+
1100
+ ```
1101
+ Here are the features for [domain]:
1102
+
1103
+ ## Authentication
1104
+ **Table stakes:**
1105
+ - Sign up with email/password
1106
+ - Email verification
1107
+ - Password reset
1108
+ - Session management
1109
+
1110
+ **Differentiators:**
1111
+ - Magic link login
1112
+ - OAuth (Google, GitHub)
1113
+ - 2FA
1114
+
1115
+ **Research notes:** [any relevant notes]
1116
+
1117
+ ---
1118
+
1119
+ ## [Next Category]
1120
+ ...
1121
+ ```
1122
+
1123
+ **If no research:** Gather requirements through conversation instead.
1124
+
1125
+ Ask: "What are the main things users need to be able to do?"
1126
+
1127
+ For each capability mentioned:
1128
+ - Ask clarifying questions to make it specific
1129
+ - Probe for related capabilities
1130
+ - Group into categories
1131
+
1132
+ **Scope each category:**
1133
+
1134
+ For each category, use AskUserQuestion:
1135
+
1136
+ - header: "[Category name]"
1137
+ - question: "Which [category] features are in v1?"
1138
+ - multiSelect: true
1139
+ - options:
1140
+ - "[Feature 1]" — [brief description]
1141
+ - "[Feature 2]" — [brief description]
1142
+ - "[Feature 3]" — [brief description]
1143
+ - "None for v1" — Defer entire category
1144
+
1145
+ Track responses:
1146
+ - Selected features -> v1 requirements
1147
+ - Unselected table stakes -> v2 (users expect these)
1148
+ - Unselected differentiators -> out of scope
1149
+
1150
+ **Identify gaps:**
1151
+
1152
+ Use AskUserQuestion:
1153
+ - header: "Additions"
1154
+ - question: "Any requirements research missed? (Features specific to your vision)"
1155
+ - options:
1156
+ - "No, research covered it" — Proceed
1157
+ - "Yes, let me add some" — Capture additions
1158
+
1159
+ **Validate core value:**
1160
+
1161
+ Cross-check requirements against Core Value from PROJECT.md. If gaps detected, surface them.
1162
+
1163
+ **Generate REQUIREMENTS.md:**
1164
+
1165
+ Create `.planning/REQUIREMENTS.md` with:
1166
+ - v1 Requirements grouped by category (checkboxes, REQ-IDs)
1167
+ - v2 Requirements (deferred)
1168
+ - Out of Scope (explicit exclusions with reasoning)
1169
+ - Traceability section (empty, filled by roadmap)
1170
+
1171
+ **REQ-ID format:** `[CATEGORY]-[NUMBER]` (AUTH-01, CONTENT-02)
1172
+
1173
+ **Requirement quality criteria:**
1174
+
1175
+ Good requirements are:
1176
+ - **Specific and testable:** "User can reset password via email link" (not "Handle password reset")
1177
+ - **User-centric:** "User can X" (not "System does Y")
1178
+ - **Atomic:** One capability per requirement (not "User can login and manage profile")
1179
+ - **Independent:** Minimal dependencies on other requirements
1180
+
1181
+ Reject vague requirements. Push for specificity:
1182
+ - "Handle authentication" -> "User can log in with email/password and stay logged in across sessions"
1183
+ - "Support sharing" -> "User can share post via link that opens in recipient's browser"
1184
+
1185
+ **Present full requirements list (interactive mode only):**
1186
+
1187
+ Show every requirement (not counts) for user confirmation:
1188
+
1189
+ ```
1190
+ ## v1 Requirements
1191
+
1192
+ ### Authentication
1193
+ - [ ] **AUTH-01**: User can create account with email/password
1194
+ - [ ] **AUTH-02**: User can log in and stay logged in across sessions
1195
+ - [ ] **AUTH-03**: User can log out from any page
1196
+
1197
+ ### Content
1198
+ - [ ] **CONT-01**: User can create posts with text
1199
+ - [ ] **CONT-02**: User can edit their own posts
1200
+
1201
+ [... full list ...]
1202
+
1203
+ ---
1204
+
1205
+ Does this capture what you're building? (yes / adjust)
1206
+ ```
1207
+
1208
+ If "adjust": Return to scoping.
1209
+
1210
+ **Commit requirements:**
1211
+
1212
+ ```bash
1213
+ node ${CLAUDE_PLUGIN_ROOT}/bin/grd-tools.js commit "docs: define v1 requirements" --files .planning/REQUIREMENTS.md
1214
+ ```
1215
+
1216
+ ## 8. Create Roadmap
1217
+
1218
+ Display stage banner:
1219
+ ```
1220
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1221
+ GRD ► CREATING ROADMAP
1222
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1223
+
1224
+ * Spawning roadmapper...
1225
+ ```
1226
+
1227
+ Spawn grd-roadmapper agent with context:
1228
+
1229
+ ```
1230
+ Task(prompt="
1231
+ <planning_context>
1232
+
1233
+ **Project:**
1234
+ @.planning/PROJECT.md
1235
+
1236
+ **Requirements:**
1237
+ @.planning/REQUIREMENTS.md
1238
+
1239
+ **Research (if exists):**
1240
+ @${research_dir}/SUMMARY.md
1241
+
1242
+ **Config:**
1243
+ @.planning/config.json
1244
+
1245
+ </planning_context>
1246
+
1247
+ <instructions>
1248
+ Create roadmap:
1249
+ 1. Derive phases from requirements (don't impose structure)
1250
+ 2. Map every v1 requirement to exactly one phase
1251
+ 3. Derive 2-5 success criteria per phase (observable user behaviors)
1252
+ 4. Validate 100% coverage
1253
+ 5. Write files immediately (ROADMAP.md, STATE.md, update REQUIREMENTS.md traceability)
1254
+ 6. Return ROADMAP CREATED with summary
1255
+
1256
+ Write files first, then return. This ensures artifacts persist even if context is lost.
1257
+ </instructions>
1258
+ ", subagent_type="grd:grd-roadmapper", model="{roadmapper_model}", description="Create roadmap")
1259
+ ```
1260
+
1261
+ **Handle roadmapper return:**
1262
+
1263
+ **If `## ROADMAP BLOCKED`:**
1264
+ - Present blocker information
1265
+ - Work with user to resolve
1266
+ - Re-spawn when resolved
1267
+
1268
+ **If `## ROADMAP CREATED`:**
1269
+
1270
+ Read the created ROADMAP.md and present it nicely inline:
1271
+
1272
+ ```
1273
+ ---
1274
+
1275
+ ## Proposed Roadmap
1276
+
1277
+ **[N] phases** | **[X] requirements mapped** | All v1 requirements covered
1278
+
1279
+ | # | Phase | Goal | Requirements | Success Criteria |
1280
+ |---|-------|------|--------------|------------------|
1281
+ | 1 | [Name] | [Goal] | [REQ-IDs] | [count] |
1282
+ | 2 | [Name] | [Goal] | [REQ-IDs] | [count] |
1283
+ | 3 | [Name] | [Goal] | [REQ-IDs] | [count] |
1284
+ ...
1285
+
1286
+ ### Phase Details
1287
+
1288
+ **Phase 1: [Name]**
1289
+ Goal: [goal]
1290
+ Requirements: [REQ-IDs]
1291
+ Success criteria:
1292
+ 1. [criterion]
1293
+ 2. [criterion]
1294
+ 3. [criterion]
1295
+
1296
+ **Phase 2: [Name]**
1297
+ Goal: [goal]
1298
+ Requirements: [REQ-IDs]
1299
+ Success criteria:
1300
+ 1. [criterion]
1301
+ 2. [criterion]
1302
+
1303
+ [... continue for all phases ...]
1304
+
1305
+ ---
1306
+ ```
1307
+
1308
+ **If auto mode or YOLO mode:** Skip approval gate — auto-approve and commit directly.
1309
+
1310
+ **CRITICAL: Ask for approval before committing (interactive mode only):**
1311
+
1312
+ Use AskUserQuestion:
1313
+ - header: "Roadmap"
1314
+ - question: "Does this roadmap structure work for you?"
1315
+ - options:
1316
+ - "Approve" — Commit and continue
1317
+ - "Adjust phases" — Tell me what to change
1318
+ - "Review full file" — Show raw ROADMAP.md
1319
+
1320
+ **If "Approve":** Continue to commit.
1321
+
1322
+ **If "Adjust phases":**
1323
+ - Get user's adjustment notes
1324
+ - Re-spawn roadmapper with revision context:
1325
+ ```
1326
+ Task(prompt="
1327
+ <revision>
1328
+ User feedback on roadmap:
1329
+ [user's notes]
1330
+
1331
+ Current ROADMAP.md: @.planning/ROADMAP.md
1332
+
1333
+ Update the roadmap based on feedback. Edit files in place.
1334
+ Return ROADMAP REVISED with changes made.
1335
+ </revision>
1336
+ ", subagent_type="grd:grd-roadmapper", model="{roadmapper_model}", description="Revise roadmap")
1337
+ ```
1338
+ - Present revised roadmap
1339
+ - Loop until user approves
1340
+
1341
+ **If "Review full file":** Display raw `cat .planning/ROADMAP.md`, then re-ask.
1342
+
1343
+ **Commit roadmap (after approval or auto/YOLO mode):**
1344
+
1345
+ ```bash
1346
+ node ${CLAUDE_PLUGIN_ROOT}/bin/grd-tools.js commit "docs: create roadmap ([N] phases)" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md
1347
+ ```
1348
+
1349
+ ## 8.5. Product-Level Quality Targets
1350
+
1351
+ **After roadmap is committed, offer product-level planning:**
1352
+
1353
+ **If YOLO mode:** Skip — quality targets will be set during eval planning.
1354
+
1355
+ Use AskUserQuestion:
1356
+ - header: "Quality Targets"
1357
+ - question: "Set product-level quality targets now? These define success metrics for the whole project."
1358
+ - options:
1359
+ - "Set targets now" — Define metrics, baselines, and targets
1360
+ - "Skip for now" — Set targets during phase planning instead
1361
+
1362
+ **If "Set targets now":**
1363
+ ```
1364
+ Run `/grd:product-plan` to create product-level quality targets
1365
+ ```
1366
+
1367
+ ## 8.7. Baseline Assessment
1368
+
1369
+ **If `has_existing_code` is true (brownfield):**
1370
+
1371
+ **If YOLO mode:** Auto-run baseline assessment.
1372
+
1373
+ Use AskUserQuestion:
1374
+ - header: "Baseline"
1375
+ - question: "Assess current code quality baseline? This measures where you are now so improvements are measurable."
1376
+ - options:
1377
+ - "Assess baseline" — Run quantitative assessment of current code
1378
+ - "Skip baseline" — Start fresh without baseline measurements
1379
+
1380
+ **If "Assess baseline":**
1381
+ ```
1382
+ Run `/grd:assess-baseline` to establish performance baseline
1383
+ ```
1384
+
1385
+ ## 8.9. Long-Term Roadmap
1386
+
1387
+ **After roadmap is committed, offer long-term roadmap creation:**
1388
+
1389
+ **If YOLO mode:** Skip — LT roadmap can be created later.
1390
+
1391
+ Check if LONG-TERM-ROADMAP.md already exists:
1392
+ ```bash
1393
+ node ${CLAUDE_PLUGIN_ROOT}/bin/grd-tools.js long-term-roadmap list --raw 2>/dev/null
1394
+ ```
1395
+
1396
+ **If no LT roadmap exists:**
1397
+
1398
+ Use AskUserQuestion:
1399
+ - header: "LT Roadmap"
1400
+ - question: "Create a long-term roadmap? This groups milestones into strategic LT milestones for multi-milestone planning."
1401
+ - options:
1402
+ - "Create LT roadmap" — Initialize from current milestones and define future LT milestones
1403
+ - "Skip for now" — Create later with `/grd:long-term-roadmap init`
1404
+
1405
+ **If "Create LT roadmap":**
1406
+ ```bash
1407
+ node ${CLAUDE_PLUGIN_ROOT}/bin/grd-tools.js long-term-roadmap init
1408
+ node ${CLAUDE_PLUGIN_ROOT}/bin/grd-tools.js commit "docs: initialize long-term roadmap" --files .planning/LONG-TERM-ROADMAP.md
1409
+ ```
1410
+ Display the created roadmap and offer refinement:
1411
+ ```
1412
+ Long-term roadmap created. Use `/grd:long-term-roadmap add` to add more LT milestones.
1413
+ ```
1414
+
1415
+ ## 9. Done
1416
+
1417
+ Present completion with next steps:
1418
+
1419
+ ```
1420
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1421
+ GRD ► PROJECT INITIALIZED
1422
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1423
+
1424
+ **[Project Name]**
1425
+
1426
+ | Artifact | Location |
1427
+ |-------------------|--------------------------------|
1428
+ | Project | `.planning/PROJECT.md` |
1429
+ | Config | `.planning/config.json` |
1430
+ | Research | `${research_dir}/` |
1431
+ | Research Landscape| `${research_dir}/LANDSCAPE.md` |
1432
+ | Papers Registry | `${research_dir}/PAPERS.md` |
1433
+ | Benchmarks | `${research_dir}/BENCHMARKS.md`|
1434
+ | Know-How | `${research_dir}/KNOWHOW.md` |
1435
+ | Requirements | `.planning/REQUIREMENTS.md` |
1436
+ | Roadmap | `.planning/ROADMAP.md` |
1437
+
1438
+ **[N] phases** | **[X] requirements** | Ready to build
1439
+
1440
+ ---
1441
+
1442
+ ## Next Up
1443
+
1444
+ **Phase 1: [Phase Name]** — [Goal from ROADMAP.md]
1445
+
1446
+ /grd:discuss-phase 1 — gather context and clarify approach
1447
+
1448
+ <sub>/clear first -> fresh context window</sub>
1449
+
1450
+ ---
1451
+
1452
+ **Also available:**
1453
+ - /grd:plan-phase 1 — skip discussion, plan directly
1454
+ - /grd:survey — scan research landscape for your domain
1455
+ - /grd:assess-baseline — measure current code quality (if brownfield)
1456
+
1457
+ ---
1458
+ ```
1459
+
1460
+ </process>
1461
+
1462
+ <output>
1463
+
1464
+ - `.planning/PROJECT.md`
1465
+ - `.planning/config.json`
1466
+ - `${research_dir}/` (if research selected)
1467
+ - `STACK.md`
1468
+ - `FEATURES.md`
1469
+ - `ARCHITECTURE.md`
1470
+ - `PITFALLS.md`
1471
+ - `SUMMARY.md`
1472
+ - `${research_dir}/LANDSCAPE.md`
1473
+ - `${research_dir}/PAPERS.md`
1474
+ - `${research_dir}/BENCHMARKS.md`
1475
+ - `${research_dir}/KNOWHOW.md`
1476
+ - `.planning/REQUIREMENTS.md`
1477
+ - `.planning/ROADMAP.md`
1478
+ - `.planning/STATE.md`
1479
+
1480
+ </output>
1481
+
1482
+ <success_criteria>
1483
+
1484
+ - [ ] .planning/ directory created
1485
+ - [ ] Git repo initialized
1486
+ - [ ] Brownfield detection completed
1487
+ - [ ] Deep questioning completed (threads followed, not rushed) — or skipped in YOLO mode
1488
+ - [ ] PROJECT.md captures full context -> **committed**
1489
+ - [ ] Research landscape initialized (LANDSCAPE.md, PAPERS.md, BENCHMARKS.md, KNOWHOW.md) -> **committed**
1490
+ - [ ] config.json has workflow mode, depth, parallelization, research_gates, autonomous_mode -> **committed**
1491
+ - [ ] Research completed (if selected) — 4 parallel agents spawned -> **committed**
1492
+ - [ ] Requirements gathered (from research or conversation)
1493
+ - [ ] User scoped each category (v1/v2/out of scope) — or auto-scoped in YOLO mode
1494
+ - [ ] REQUIREMENTS.md created with REQ-IDs -> **committed**
1495
+ - [ ] grd-roadmapper spawned with context
1496
+ - [ ] Roadmap files written immediately (not draft)
1497
+ - [ ] User feedback incorporated (if any)
1498
+ - [ ] ROADMAP.md created with phases, requirement mappings, success criteria
1499
+ - [ ] STATE.md initialized
1500
+ - [ ] REQUIREMENTS.md traceability updated
1501
+ - [ ] Product-level quality targets offered (if interactive)
1502
+ - [ ] Baseline assessment offered (if brownfield)
1503
+ - [ ] Long-term roadmap creation offered (if interactive)
1504
+ - [ ] User knows next step is `/grd:discuss-phase 1`
1505
+
1506
+ **Atomic commits:** Each phase commits its artifacts immediately. If context is lost, artifacts persist.
1507
+
1508
+ </success_criteria>