@opengsd/gsd-path 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/AGENTS.md +397 -0
  2. package/DOCS.md +341 -0
  3. package/FULL.md +475 -0
  4. package/GUIDE.md +23 -0
  5. package/HOOKS.md +273 -0
  6. package/LICENSE +21 -0
  7. package/MIGRATE.md +100 -0
  8. package/QUICK.md +146 -0
  9. package/README.md +280 -0
  10. package/RUNTIME.md +229 -0
  11. package/UPDATE.md +196 -0
  12. package/WORKFLOW.md +683 -0
  13. package/package.json +80 -0
  14. package/platforms/claude/dispatch.md +63 -0
  15. package/platforms/copilot/dispatch.md +61 -0
  16. package/platforms/cursor/agent.md +17 -0
  17. package/platforms/cursor/dispatch.md +63 -0
  18. package/platforms/grok/dispatch.md +61 -0
  19. package/platforms/kimi/dispatch.md +64 -0
  20. package/platforms/kiro/dispatch.md +58 -0
  21. package/platforms/opencode/dispatch.md +62 -0
  22. package/platforms/qwen/dispatch.md +60 -0
  23. package/platforms/shared-agents/dispatch.md +131 -0
  24. package/plugin.json +14 -0
  25. package/scripts/_common.py +180 -0
  26. package/scripts/archive_milestone.py +2265 -0
  27. package/scripts/bootstrap_repository.py +710 -0
  28. package/scripts/build_state.py +854 -0
  29. package/scripts/check_docs_audit.py +463 -0
  30. package/scripts/check_handoffs.py +1855 -0
  31. package/scripts/check_task_briefs.py +376 -0
  32. package/scripts/check_update.py +93 -0
  33. package/scripts/core_hook_gate.py +34 -0
  34. package/scripts/core_hook_settings.py +119 -0
  35. package/scripts/detect_project.py +1517 -0
  36. package/scripts/discussion_records.py +619 -0
  37. package/scripts/discussion_validate.py +1321 -0
  38. package/scripts/dispatch_driver.py +1812 -0
  39. package/scripts/git_guard.py +759 -0
  40. package/scripts/guard_hook.py +2124 -0
  41. package/scripts/install.mjs +3239 -0
  42. package/scripts/install.py +3008 -0
  43. package/scripts/integration.py +1433 -0
  44. package/scripts/isolation.py +3538 -0
  45. package/scripts/lean_verification.py +256 -0
  46. package/scripts/loop_run.py +837 -0
  47. package/scripts/migrate_core.py +169 -0
  48. package/scripts/pipeline_diagnose.py +715 -0
  49. package/scripts/pipeline_git.py +940 -0
  50. package/scripts/pipeline_state.py +2291 -0
  51. package/scripts/pipeline_undo.py +1039 -0
  52. package/scripts/promote_lookahead.py +415 -0
  53. package/scripts/review_findings.py +714 -0
  54. package/scripts/review_panel.py +553 -0
  55. package/scripts/skill-resources.json +340 -0
  56. package/scripts/state_checkpoint.py +1039 -0
  57. package/scripts/state_promote.py +743 -0
  58. package/scripts/status_runtime.py +122 -0
  59. package/scripts/sync_skill_resources.py +259 -0
  60. package/scripts/token_budget.py +146 -0
  61. package/scripts/wizard.mjs +179 -0
  62. package/scripts/workflow_run.py +117 -0
  63. package/skills/gsd-path/BUILD.md +700 -0
  64. package/skills/gsd-path/DECIDE.md +115 -0
  65. package/skills/gsd-path/DEFINE.md +297 -0
  66. package/skills/gsd-path/DOCS-AUDIT.md +190 -0
  67. package/skills/gsd-path/INSPECT.md +167 -0
  68. package/skills/gsd-path/PLAN.md +411 -0
  69. package/skills/gsd-path/RESEARCH.md +159 -0
  70. package/skills/gsd-path/ROADMAP.md +215 -0
  71. package/skills/gsd-path/SHIP.md +412 -0
  72. package/skills/gsd-path/SKILL.md +471 -0
  73. package/skills/gsd-path/agents/openai.yaml +6 -0
  74. package/skills/gsd-path/references/codebase-mapper.md +52 -0
  75. package/skills/gsd-path/references/coder.md +90 -0
  76. package/skills/gsd-path/references/decider.md +36 -0
  77. package/skills/gsd-path/references/dispatch.md +131 -0
  78. package/skills/gsd-path/references/docs-auditor.md +60 -0
  79. package/skills/gsd-path/references/planner.md +104 -0
  80. package/skills/gsd-path/references/researcher.md +42 -0
  81. package/skills/gsd-path/references/reviewer.md +188 -0
  82. package/skills/gsd-path/references/roadmapper.md +48 -0
  83. package/skills/gsd-path/scripts/_common.py +180 -0
  84. package/skills/gsd-path/scripts/archive_milestone.py +2265 -0
  85. package/skills/gsd-path/scripts/bootstrap_repository.py +710 -0
  86. package/skills/gsd-path/scripts/build_state.py +854 -0
  87. package/skills/gsd-path/scripts/check_docs_audit.py +463 -0
  88. package/skills/gsd-path/scripts/check_handoffs.py +1855 -0
  89. package/skills/gsd-path/scripts/check_task_briefs.py +376 -0
  90. package/skills/gsd-path/scripts/check_update.py +93 -0
  91. package/skills/gsd-path/scripts/detect_project.py +1517 -0
  92. package/skills/gsd-path/scripts/discussion_records.py +619 -0
  93. package/skills/gsd-path/scripts/discussion_validate.py +1321 -0
  94. package/skills/gsd-path/scripts/dispatch_driver.py +1812 -0
  95. package/skills/gsd-path/scripts/integration.py +1433 -0
  96. package/skills/gsd-path/scripts/isolation.py +3538 -0
  97. package/skills/gsd-path/scripts/lean_verification.py +256 -0
  98. package/skills/gsd-path/scripts/loop_run.py +837 -0
  99. package/skills/gsd-path/scripts/pipeline_git.py +940 -0
  100. package/skills/gsd-path/scripts/pipeline_state.py +2291 -0
  101. package/skills/gsd-path/scripts/promote_lookahead.py +415 -0
  102. package/skills/gsd-path/scripts/review_findings.py +714 -0
  103. package/skills/gsd-path/scripts/review_panel.py +553 -0
  104. package/skills/gsd-path/scripts/state_checkpoint.py +1039 -0
  105. package/skills/gsd-path/scripts/state_promote.py +743 -0
  106. package/skills/gsd-path/scripts/token_budget.py +146 -0
  107. package/skills/gsd-path/scripts/workflow_run.py +117 -0
  108. package/skills/gsd-path/templates/answers.md +29 -0
  109. package/skills/gsd-path/templates/archive-manifest.md +37 -0
  110. package/skills/gsd-path/templates/charter.md +50 -0
  111. package/skills/gsd-path/templates/codebase.md +46 -0
  112. package/skills/gsd-path/templates/dialogue.md +21 -0
  113. package/skills/gsd-path/templates/docs-audit.md +69 -0
  114. package/skills/gsd-path/templates/evidence.md +24 -0
  115. package/skills/gsd-path/templates/final-review.md +27 -0
  116. package/skills/gsd-path/templates/gap-review.md +20 -0
  117. package/skills/gsd-path/templates/intent.md +98 -0
  118. package/skills/gsd-path/templates/loop.md +59 -0
  119. package/skills/gsd-path/templates/patch-findings.md +16 -0
  120. package/skills/gsd-path/templates/plan-panel.md +25 -0
  121. package/skills/gsd-path/templates/plan.md +89 -0
  122. package/skills/gsd-path/templates/repository.md +16 -0
  123. package/skills/gsd-path/templates/research-handoff.md +25 -0
  124. package/skills/gsd-path/templates/roadmap.md +38 -0
  125. package/skills/gsd-path/templates/skeptic.md +36 -0
  126. package/skills/gsd-path/templates/state.md +27 -0
  127. package/skills/gsd-path/templates/synthesis.md +36 -0
  128. package/skills/gsd-path/templates/task.md +74 -0
  129. package/skills/gsd-path/templates/wave-panel.md +25 -0
  130. package/skills/gsd-path/templates/wave-review.md +64 -0
  131. package/skills/gsd-path-build/SKILL.md +700 -0
  132. package/skills/gsd-path-build/agents/openai.yaml +6 -0
  133. package/skills/gsd-path-build/references/coder.md +90 -0
  134. package/skills/gsd-path-build/references/dispatch.md +131 -0
  135. package/skills/gsd-path-build/references/reviewer.md +188 -0
  136. package/skills/gsd-path-build/scripts/_common.py +180 -0
  137. package/skills/gsd-path-build/scripts/archive_milestone.py +2265 -0
  138. package/skills/gsd-path-build/scripts/build_state.py +854 -0
  139. package/skills/gsd-path-build/scripts/check_handoffs.py +1855 -0
  140. package/skills/gsd-path-build/scripts/check_task_briefs.py +376 -0
  141. package/skills/gsd-path-build/scripts/discussion_records.py +619 -0
  142. package/skills/gsd-path-build/scripts/discussion_validate.py +1321 -0
  143. package/skills/gsd-path-build/scripts/dispatch_driver.py +1812 -0
  144. package/skills/gsd-path-build/scripts/integration.py +1433 -0
  145. package/skills/gsd-path-build/scripts/isolation.py +3538 -0
  146. package/skills/gsd-path-build/scripts/loop_run.py +837 -0
  147. package/skills/gsd-path-build/scripts/pipeline_git.py +940 -0
  148. package/skills/gsd-path-build/scripts/pipeline_state.py +2291 -0
  149. package/skills/gsd-path-build/scripts/review_findings.py +714 -0
  150. package/skills/gsd-path-build/scripts/review_panel.py +553 -0
  151. package/skills/gsd-path-build/scripts/state_checkpoint.py +1039 -0
  152. package/skills/gsd-path-build/scripts/state_promote.py +743 -0
  153. package/skills/gsd-path-build/scripts/token_budget.py +146 -0
  154. package/skills/gsd-path-build/scripts/workflow_run.py +117 -0
  155. package/skills/gsd-path-build/templates/skeptic.md +36 -0
  156. package/skills/gsd-path-build/templates/task.md +74 -0
  157. package/skills/gsd-path-build/templates/wave-panel.md +25 -0
  158. package/skills/gsd-path-build/templates/wave-review.md +64 -0
  159. package/skills/gsd-path-decide/SKILL.md +115 -0
  160. package/skills/gsd-path-decide/agents/openai.yaml +6 -0
  161. package/skills/gsd-path-decide/references/decider.md +36 -0
  162. package/skills/gsd-path-decide/references/dispatch.md +131 -0
  163. package/skills/gsd-path-decide/scripts/_common.py +180 -0
  164. package/skills/gsd-path-decide/scripts/check_handoffs.py +1855 -0
  165. package/skills/gsd-path-decide/scripts/check_task_briefs.py +376 -0
  166. package/skills/gsd-path-decide/scripts/discussion_records.py +619 -0
  167. package/skills/gsd-path-decide/scripts/isolation.py +3538 -0
  168. package/skills/gsd-path-decide/scripts/pipeline_git.py +940 -0
  169. package/skills/gsd-path-decide/scripts/pipeline_state.py +2291 -0
  170. package/skills/gsd-path-decide/scripts/state_checkpoint.py +1039 -0
  171. package/skills/gsd-path-decide/scripts/state_promote.py +743 -0
  172. package/skills/gsd-path-decide/templates/synthesis.md +36 -0
  173. package/skills/gsd-path-define/SKILL.md +297 -0
  174. package/skills/gsd-path-define/agents/openai.yaml +6 -0
  175. package/skills/gsd-path-define/scripts/_common.py +180 -0
  176. package/skills/gsd-path-define/scripts/check_handoffs.py +1855 -0
  177. package/skills/gsd-path-define/scripts/check_task_briefs.py +376 -0
  178. package/skills/gsd-path-define/scripts/detect_project.py +1517 -0
  179. package/skills/gsd-path-define/scripts/discussion_records.py +619 -0
  180. package/skills/gsd-path-define/scripts/isolation.py +3538 -0
  181. package/skills/gsd-path-define/scripts/pipeline_git.py +940 -0
  182. package/skills/gsd-path-define/scripts/pipeline_state.py +2291 -0
  183. package/skills/gsd-path-define/scripts/state_checkpoint.py +1039 -0
  184. package/skills/gsd-path-define/scripts/state_promote.py +743 -0
  185. package/skills/gsd-path-define/templates/charter.md +50 -0
  186. package/skills/gsd-path-define/templates/intent.md +98 -0
  187. package/skills/gsd-path-define/templates/state.md +27 -0
  188. package/skills/gsd-path-discuss/SKILL.md +162 -0
  189. package/skills/gsd-path-discuss/agents/openai.yaml +6 -0
  190. package/skills/gsd-path-discuss/scripts/_common.py +180 -0
  191. package/skills/gsd-path-discuss/scripts/discussion_records.py +619 -0
  192. package/skills/gsd-path-discuss/templates/answers.md +29 -0
  193. package/skills/gsd-path-discuss/templates/dialogue.md +21 -0
  194. package/skills/gsd-path-docs-audit/SKILL.md +190 -0
  195. package/skills/gsd-path-docs-audit/agents/openai.yaml +6 -0
  196. package/skills/gsd-path-docs-audit/references/dispatch.md +131 -0
  197. package/skills/gsd-path-docs-audit/references/docs-auditor.md +60 -0
  198. package/skills/gsd-path-docs-audit/scripts/_common.py +180 -0
  199. package/skills/gsd-path-docs-audit/scripts/check_docs_audit.py +463 -0
  200. package/skills/gsd-path-docs-audit/scripts/check_handoffs.py +1855 -0
  201. package/skills/gsd-path-docs-audit/scripts/check_task_briefs.py +376 -0
  202. package/skills/gsd-path-docs-audit/scripts/discussion_records.py +619 -0
  203. package/skills/gsd-path-docs-audit/scripts/isolation.py +3538 -0
  204. package/skills/gsd-path-docs-audit/scripts/pipeline_git.py +940 -0
  205. package/skills/gsd-path-docs-audit/scripts/pipeline_state.py +2291 -0
  206. package/skills/gsd-path-docs-audit/scripts/state_checkpoint.py +1039 -0
  207. package/skills/gsd-path-docs-audit/scripts/state_promote.py +743 -0
  208. package/skills/gsd-path-docs-audit/templates/docs-audit.md +69 -0
  209. package/skills/gsd-path-forensics/SKILL.md +39 -0
  210. package/skills/gsd-path-forensics/agents/openai.yaml +6 -0
  211. package/skills/gsd-path-forensics/scripts/_common.py +180 -0
  212. package/skills/gsd-path-forensics/scripts/discussion_records.py +619 -0
  213. package/skills/gsd-path-forensics/scripts/pipeline_diagnose.py +715 -0
  214. package/skills/gsd-path-forensics/scripts/pipeline_undo.py +1039 -0
  215. package/skills/gsd-path-inspect/SKILL.md +167 -0
  216. package/skills/gsd-path-inspect/agents/openai.yaml +6 -0
  217. package/skills/gsd-path-inspect/references/codebase-mapper.md +52 -0
  218. package/skills/gsd-path-inspect/references/dispatch.md +131 -0
  219. package/skills/gsd-path-inspect/references/docs-auditor.md +60 -0
  220. package/skills/gsd-path-inspect/scripts/_common.py +180 -0
  221. package/skills/gsd-path-inspect/scripts/check_docs_audit.py +463 -0
  222. package/skills/gsd-path-inspect/scripts/check_handoffs.py +1855 -0
  223. package/skills/gsd-path-inspect/scripts/check_task_briefs.py +376 -0
  224. package/skills/gsd-path-inspect/scripts/detect_project.py +1517 -0
  225. package/skills/gsd-path-inspect/scripts/discussion_records.py +619 -0
  226. package/skills/gsd-path-inspect/scripts/isolation.py +3538 -0
  227. package/skills/gsd-path-inspect/scripts/pipeline_git.py +940 -0
  228. package/skills/gsd-path-inspect/scripts/pipeline_state.py +2291 -0
  229. package/skills/gsd-path-inspect/scripts/state_checkpoint.py +1039 -0
  230. package/skills/gsd-path-inspect/scripts/state_promote.py +743 -0
  231. package/skills/gsd-path-inspect/templates/codebase.md +46 -0
  232. package/skills/gsd-path-inspect/templates/docs-audit.md +69 -0
  233. package/skills/gsd-path-inspect/templates/state.md +27 -0
  234. package/skills/gsd-path-loop/SKILL.md +98 -0
  235. package/skills/gsd-path-loop/agents/openai.yaml +6 -0
  236. package/skills/gsd-path-loop/examples/ci-repair.LOOP.md +61 -0
  237. package/skills/gsd-path-loop/scripts/_common.py +180 -0
  238. package/skills/gsd-path-loop/scripts/discussion_records.py +619 -0
  239. package/skills/gsd-path-loop/scripts/loop_run.py +837 -0
  240. package/skills/gsd-path-loop/templates/loop.md +59 -0
  241. package/skills/gsd-path-migrate/SKILL.md +134 -0
  242. package/skills/gsd-path-migrate/agents/openai.yaml +6 -0
  243. package/skills/gsd-path-migrate/scripts/core_hook_gate.py +34 -0
  244. package/skills/gsd-path-migrate/scripts/core_hook_settings.py +119 -0
  245. package/skills/gsd-path-migrate/scripts/discussion_records.py +619 -0
  246. package/skills/gsd-path-migrate/scripts/migrate_core.py +169 -0
  247. package/skills/gsd-path-plan/SKILL.md +411 -0
  248. package/skills/gsd-path-plan/agents/openai.yaml +6 -0
  249. package/skills/gsd-path-plan/references/dispatch.md +131 -0
  250. package/skills/gsd-path-plan/references/planner.md +104 -0
  251. package/skills/gsd-path-plan/scripts/_common.py +180 -0
  252. package/skills/gsd-path-plan/scripts/check_handoffs.py +1855 -0
  253. package/skills/gsd-path-plan/scripts/check_task_briefs.py +376 -0
  254. package/skills/gsd-path-plan/scripts/discussion_records.py +619 -0
  255. package/skills/gsd-path-plan/scripts/isolation.py +3538 -0
  256. package/skills/gsd-path-plan/scripts/pipeline_git.py +940 -0
  257. package/skills/gsd-path-plan/scripts/pipeline_state.py +2291 -0
  258. package/skills/gsd-path-plan/scripts/review_panel.py +553 -0
  259. package/skills/gsd-path-plan/scripts/state_checkpoint.py +1039 -0
  260. package/skills/gsd-path-plan/scripts/state_promote.py +743 -0
  261. package/skills/gsd-path-plan/scripts/workflow_run.py +117 -0
  262. package/skills/gsd-path-plan/templates/patch-findings.md +16 -0
  263. package/skills/gsd-path-plan/templates/plan-panel.md +25 -0
  264. package/skills/gsd-path-plan/templates/plan.md +89 -0
  265. package/skills/gsd-path-plan/templates/task.md +74 -0
  266. package/skills/gsd-path-research/SKILL.md +159 -0
  267. package/skills/gsd-path-research/agents/openai.yaml +6 -0
  268. package/skills/gsd-path-research/references/dispatch.md +131 -0
  269. package/skills/gsd-path-research/references/researcher.md +42 -0
  270. package/skills/gsd-path-research/scripts/_common.py +180 -0
  271. package/skills/gsd-path-research/scripts/check_handoffs.py +1855 -0
  272. package/skills/gsd-path-research/scripts/check_task_briefs.py +376 -0
  273. package/skills/gsd-path-research/scripts/discussion_records.py +619 -0
  274. package/skills/gsd-path-research/scripts/isolation.py +3538 -0
  275. package/skills/gsd-path-research/scripts/pipeline_git.py +940 -0
  276. package/skills/gsd-path-research/scripts/pipeline_state.py +2291 -0
  277. package/skills/gsd-path-research/scripts/state_checkpoint.py +1039 -0
  278. package/skills/gsd-path-research/scripts/state_promote.py +743 -0
  279. package/skills/gsd-path-research/templates/evidence.md +24 -0
  280. package/skills/gsd-path-research/templates/research-handoff.md +25 -0
  281. package/skills/gsd-path-roadmap/SKILL.md +215 -0
  282. package/skills/gsd-path-roadmap/agents/openai.yaml +6 -0
  283. package/skills/gsd-path-roadmap/references/dispatch.md +131 -0
  284. package/skills/gsd-path-roadmap/references/roadmapper.md +48 -0
  285. package/skills/gsd-path-roadmap/scripts/_common.py +180 -0
  286. package/skills/gsd-path-roadmap/scripts/archive_milestone.py +2265 -0
  287. package/skills/gsd-path-roadmap/scripts/check_handoffs.py +1855 -0
  288. package/skills/gsd-path-roadmap/scripts/check_task_briefs.py +376 -0
  289. package/skills/gsd-path-roadmap/scripts/detect_project.py +1517 -0
  290. package/skills/gsd-path-roadmap/scripts/discussion_records.py +619 -0
  291. package/skills/gsd-path-roadmap/scripts/discussion_validate.py +1321 -0
  292. package/skills/gsd-path-roadmap/scripts/integration.py +1433 -0
  293. package/skills/gsd-path-roadmap/scripts/isolation.py +3538 -0
  294. package/skills/gsd-path-roadmap/scripts/pipeline_git.py +940 -0
  295. package/skills/gsd-path-roadmap/scripts/pipeline_state.py +2291 -0
  296. package/skills/gsd-path-roadmap/scripts/promote_lookahead.py +415 -0
  297. package/skills/gsd-path-roadmap/scripts/review_panel.py +553 -0
  298. package/skills/gsd-path-roadmap/scripts/state_checkpoint.py +1039 -0
  299. package/skills/gsd-path-roadmap/scripts/state_promote.py +743 -0
  300. package/skills/gsd-path-roadmap/templates/roadmap.md +38 -0
  301. package/skills/gsd-path-ship/SKILL.md +412 -0
  302. package/skills/gsd-path-ship/agents/openai.yaml +6 -0
  303. package/skills/gsd-path-ship/references/dispatch.md +131 -0
  304. package/skills/gsd-path-ship/references/reviewer.md +188 -0
  305. package/skills/gsd-path-ship/scripts/_common.py +180 -0
  306. package/skills/gsd-path-ship/scripts/archive_milestone.py +2265 -0
  307. package/skills/gsd-path-ship/scripts/build_state.py +854 -0
  308. package/skills/gsd-path-ship/scripts/check_handoffs.py +1855 -0
  309. package/skills/gsd-path-ship/scripts/check_task_briefs.py +376 -0
  310. package/skills/gsd-path-ship/scripts/discussion_records.py +619 -0
  311. package/skills/gsd-path-ship/scripts/discussion_validate.py +1321 -0
  312. package/skills/gsd-path-ship/scripts/integration.py +1433 -0
  313. package/skills/gsd-path-ship/scripts/isolation.py +3538 -0
  314. package/skills/gsd-path-ship/scripts/lean_verification.py +256 -0
  315. package/skills/gsd-path-ship/scripts/pipeline_git.py +940 -0
  316. package/skills/gsd-path-ship/scripts/pipeline_state.py +2291 -0
  317. package/skills/gsd-path-ship/scripts/review_panel.py +553 -0
  318. package/skills/gsd-path-ship/scripts/state_checkpoint.py +1039 -0
  319. package/skills/gsd-path-ship/scripts/state_promote.py +743 -0
  320. package/skills/gsd-path-ship/scripts/workflow_run.py +117 -0
  321. package/skills/gsd-path-ship/templates/archive-manifest.md +37 -0
  322. package/skills/gsd-path-ship/templates/final-review.md +27 -0
  323. package/skills/gsd-path-ship/templates/gap-review.md +20 -0
  324. package/skills/gsd-path-ship/templates/patch-findings.md +16 -0
  325. package/skills/gsd-path-ship/templates/wave-review.md +64 -0
  326. package/skills/gsd-path-undo/SKILL.md +45 -0
  327. package/skills/gsd-path-undo/agents/openai.yaml +6 -0
  328. package/skills/gsd-path-undo/scripts/_common.py +180 -0
  329. package/skills/gsd-path-undo/scripts/discussion_records.py +619 -0
  330. package/skills/gsd-path-undo/scripts/pipeline_undo.py +1039 -0
  331. package/skills/path/BUILD.md +700 -0
  332. package/skills/path/DECIDE.md +115 -0
  333. package/skills/path/DEFINE.md +297 -0
  334. package/skills/path/DOCS-AUDIT.md +190 -0
  335. package/skills/path/INSPECT.md +167 -0
  336. package/skills/path/PLAN.md +411 -0
  337. package/skills/path/RESEARCH.md +159 -0
  338. package/skills/path/ROADMAP.md +215 -0
  339. package/skills/path/SHIP.md +412 -0
  340. package/skills/path/SKILL.md +471 -0
  341. package/skills/path/agents/openai.yaml +6 -0
  342. package/skills/path/references/codebase-mapper.md +52 -0
  343. package/skills/path/references/coder.md +90 -0
  344. package/skills/path/references/decider.md +36 -0
  345. package/skills/path/references/dispatch.md +131 -0
  346. package/skills/path/references/docs-auditor.md +60 -0
  347. package/skills/path/references/planner.md +104 -0
  348. package/skills/path/references/researcher.md +42 -0
  349. package/skills/path/references/reviewer.md +188 -0
  350. package/skills/path/references/roadmapper.md +48 -0
  351. package/skills/path/scripts/_common.py +180 -0
  352. package/skills/path/scripts/archive_milestone.py +2265 -0
  353. package/skills/path/scripts/bootstrap_repository.py +710 -0
  354. package/skills/path/scripts/build_state.py +854 -0
  355. package/skills/path/scripts/check_docs_audit.py +463 -0
  356. package/skills/path/scripts/check_handoffs.py +1855 -0
  357. package/skills/path/scripts/check_task_briefs.py +376 -0
  358. package/skills/path/scripts/check_update.py +93 -0
  359. package/skills/path/scripts/detect_project.py +1517 -0
  360. package/skills/path/scripts/discussion_records.py +619 -0
  361. package/skills/path/scripts/discussion_validate.py +1321 -0
  362. package/skills/path/scripts/dispatch_driver.py +1812 -0
  363. package/skills/path/scripts/integration.py +1433 -0
  364. package/skills/path/scripts/isolation.py +3538 -0
  365. package/skills/path/scripts/lean_verification.py +256 -0
  366. package/skills/path/scripts/loop_run.py +837 -0
  367. package/skills/path/scripts/pipeline_git.py +940 -0
  368. package/skills/path/scripts/pipeline_state.py +2291 -0
  369. package/skills/path/scripts/promote_lookahead.py +415 -0
  370. package/skills/path/scripts/review_findings.py +714 -0
  371. package/skills/path/scripts/review_panel.py +553 -0
  372. package/skills/path/scripts/state_checkpoint.py +1039 -0
  373. package/skills/path/scripts/state_promote.py +743 -0
  374. package/skills/path/scripts/token_budget.py +146 -0
  375. package/skills/path/scripts/workflow_run.py +117 -0
  376. package/skills/path/templates/answers.md +29 -0
  377. package/skills/path/templates/archive-manifest.md +37 -0
  378. package/skills/path/templates/charter.md +50 -0
  379. package/skills/path/templates/codebase.md +46 -0
  380. package/skills/path/templates/dialogue.md +21 -0
  381. package/skills/path/templates/docs-audit.md +69 -0
  382. package/skills/path/templates/evidence.md +24 -0
  383. package/skills/path/templates/final-review.md +27 -0
  384. package/skills/path/templates/gap-review.md +20 -0
  385. package/skills/path/templates/intent.md +98 -0
  386. package/skills/path/templates/loop.md +59 -0
  387. package/skills/path/templates/patch-findings.md +16 -0
  388. package/skills/path/templates/plan-panel.md +25 -0
  389. package/skills/path/templates/plan.md +89 -0
  390. package/skills/path/templates/repository.md +16 -0
  391. package/skills/path/templates/research-handoff.md +25 -0
  392. package/skills/path/templates/roadmap.md +38 -0
  393. package/skills/path/templates/skeptic.md +36 -0
  394. package/skills/path/templates/state.md +27 -0
  395. package/skills/path/templates/synthesis.md +36 -0
  396. package/skills/path/templates/task.md +74 -0
  397. package/skills/path/templates/wave-panel.md +25 -0
  398. package/skills/path/templates/wave-review.md +64 -0
package/WORKFLOW.md ADDED
@@ -0,0 +1,683 @@
1
+ # WORKFLOW.md — GSD Path Pipeline SOP
2
+
3
+ Idea to shipped code through a gated pipeline. The `gsd-path` router reads
4
+ `.project/STATE.md`, reports the current state, and invokes the next skill.
5
+ Every handoff is on disk; the any-phase discussion sidecar also records its
6
+ dialogue and answers on disk. AGENTS.md supplies the shared operating rules.
7
+
8
+ **Program flow.** When the work is a multi-milestone program, define runs in
9
+ program mode and writes `.project/CHARTER.md` (enduring scope and vetoes),
10
+ research and decide work at program scope, and the roadmap phase slices the
11
+ charter into `.project/ROADMAP.md` — milestone-granularity scope for every
12
+ milestone. The first milestone after roadmap approval runs define
13
+ (milestone mode), research and decide only when its roadmap entry has open
14
+ questions, then plan → build → ship. Each later milestone inspects the
15
+ now-shipped codebase, then runs define (milestone + brownfield), the same
16
+ open-question branch, and plan → build → ship, until the program completes.
17
+ While a milestone builds, the router may offer to plan the
18
+ next dependency-ready milestone in parallel under `.project/next/` (the
19
+ lookahead track, starting at inspect); at the milestone boundary the router
20
+ promotes it to the active paths in one commit. An explicit user ruling can instead abandon a
21
+ building milestone: its partial artifacts archive without review gates, its
22
+ roadmap entry becomes immutable `abandoned`, and the roadmap re-slices the
23
+ remaining entries. CHARTER.md, ROADMAP.md, and the program `.project/SYNTHESIS.md`
24
+ persist across milestones and never archive. Without CHARTER.md the pipeline
25
+ is the single-milestone flow below.
26
+
27
+ ## Agent and concurrency contract
28
+
29
+ Use the host-specific child-agent tool defined by the runtime dispatch contract
30
+ bundled in the `gsd-path` skill, or the build contract's
31
+ [dispatch driver](RUNTIME.md#dispatch-driver) when the owner supplies a child
32
+ command. Spawn independent work up to the available
33
+ child capacity and batch any remainder. Every spawned agent has isolated
34
+ context, so its brief must include the absolute role path, exact input paths,
35
+ one distinct output path, relevant constraints, the output contract, and the
36
+ deterministic logical task name defined by the dispatch contract. Do not rely
37
+ on conversation context.
38
+
39
+ Within a wave, readiness is continuous: a parallel dispatch round gives every
40
+ coder a distinct linked worktree at the clean primary HEAD recorded as its
41
+ task base; a serial round (one ready task) uses the bound branch in the
42
+ primary worktree. A dependent task dispatches in a fresh round as soon as its
43
+ dependencies land — never idling behind unrelated in-flight tasks. Task
44
+ landing stays serial, processing completions as they arrive. A same-wave task
45
+ never runs before its same-wave dependencies are done. Task verification
46
+ reconstructs the recorded base plus only that task patch; combined branch-tip
47
+ evidence does not count. The orchestrator calls `scripts/isolation.py` for
48
+ isolate, recover, land, and retire; it never invents `git worktree add` or
49
+ `--detach`.
50
+
51
+ The parent orchestrator owns dispatch and lifecycle. It binds one structured
52
+ run when the host provides one, creates one task per independent brief, waits
53
+ for terminal results, validates provenance, transfers staged artifacts from
54
+ disposable roots, and cleans up every child and temporary root before applying
55
+ a gate. Children never delegate another GSD Path child. A timeout or
56
+ cancellation is a blocked result, not a skipped result.
57
+
58
+ | Stage | Independent children | Scheduling | Parent hand-off |
59
+ | --- | --- | --- | --- |
60
+ | inspect | codebase mapper, docs auditor | two concurrent briefs | validate and transfer both artifacts |
61
+ | define | none | coordinator-led user gate | write approved INTENT.md (program mode: CHARTER.md) |
62
+ | research | assigned dimensions | concurrent up to capacity, then batches | validate each evidence file as it returns; RESEARCH.md gate after all settle |
63
+ | decide | one decider | serial | validate SYNTHESIS.md |
64
+ | roadmap | one roadmapper | serial; program flow only | validate ROADMAP.md |
65
+ | plan | one planner; zero in quick mode | serial | validate PLAN.md and task wave assignments |
66
+ | build | dependency-ready coders; wave reviewers | coder rounds, then wave review | commit code and wave artifacts |
67
+ | ship | final integration and gap reviewers | independent reviewers concurrent | verify, approve, archive, and ship |
68
+
69
+ Non-interactive phases auto-advance when their artifacts pass their gates.
70
+ User approval remains required at define, roadmap, plan, final-review patch
71
+ selection, and final shipping checkpoints. Decide auto-advances after its evidence gate
72
+ unless a `NEEDS-USER` decision remains.
73
+
74
+ Every user-facing checkpoint follows one handoff shape: **Outcome** states what
75
+ was produced or learned, **Review** links the primary canonical artifact by its
76
+ resolved absolute path, and **Next** asks the single required question or names
77
+ the next action. Text the user is expected to send back verbatim goes in its
78
+ own fenced code block, never a blockquote, so it pastes cleanly. Supporting
79
+ artifacts are summarized or linked only when they
80
+ help the decision. Write the artifact before asking, never present a bare
81
+ approval question, and after the answer relink the updated artifact before the
82
+ router continues or a direct invocation names its exact next skill.
83
+
84
+ `$gsd-path status` reports the `pipeline_state.py status` snapshot and stops —
85
+ it does not auto-advance. `$gsd-path-forensics` is read-only diagnosis when a
86
+ helper blocks. `$gsd-path-undo` previews then applies helper-owned undo of
87
+ unpublished work; it never invents `git reset`.
88
+
89
+ ### Plain-prompt re-entry
90
+
91
+ <!-- gsd-path/plain-prompt-reentry/v1 -->
92
+
93
+ Project installs include the router's read-only status engine at
94
+ `.gsd-path/runtime/` and its stable launcher at `.gsd-path/status_runtime.py`.
95
+ On any turn that did not explicitly invoke a GSD Path
96
+ skill, an owned `.project/STATE.md` activates re-entry. Informational prompts
97
+ finish read-only and end with the current **Outcome** / **Review** / **Next**
98
+ handoff. Mutation prompts make no changes and point to the status result's
99
+ `next_skill` only when `route.action` is `run-phase`. Every other route reports
100
+ its exact `route.action` and `route.reason`. The status engine never initializes state
101
+ or advances a phase.
102
+
103
+ The optional pre-tool guard backs this up where it has deterministic evidence.
104
+ See [HOOKS.md](HOOKS.md#what-gets-blocked) for write restrictions, including
105
+ closed milestone branches and target worktrees. Shell provenance
106
+ cannot prove which skill initiated a command, so the always-loaded AGENTS.md
107
+ contract owns shell cases.
108
+
109
+ ### New GitHub repository creation
110
+
111
+ An explicit request to create a GitHub repository enters a pre-initialization
112
+ gate. Resolve and preview the GitHub owner/name, visibility, normal default
113
+ checkout, `gsd-path/M001` branch, and a distinct linked-worktree path.
114
+ Create no repository, checkout, worktree, pipeline state, journal, or preview
115
+ file until the user approves every target; present the pre-creation review
116
+ inline from the bootstrap helper's read-only `preview` result.
117
+
118
+ After approval, the bundled bootstrap helper writes an exact transaction
119
+ journal under the approved workspace before mutation. Its `create` command
120
+ creates or verifies the GitHub repository and bootstrap README, clones the
121
+ default branch, resolves its exact SHA, creates or adopts the approved GSD Path
122
+ branch and linked worktree at that SHA, then publishes STATE.md and a
123
+ fixed-format `.project/REPOSITORY.md` together with one same-filesystem
124
+ `.project/` directory rename. The default checkout remains clean,
125
+ and all pipeline artifacts live only in the linked worktree. A retry with the
126
+ same approved targets resumes from the first missing stage; any mismatch or
127
+ unowned collision blocks without deletion. The journal is removed only after
128
+ both artifacts are durable. Existing repositories do not pass through this
129
+ transaction.
130
+
131
+ ## Phase 0 — Inspect (`gsd-path-inspect`)
132
+
133
+ **Input:** an existing codebase with no `.project/STATE.md`, or owned v2 state
134
+ at `inspect/active|blocked`. **Output:**
135
+ `.project/research/evidence-codebase.md` and
136
+ `.project/research/DOCS-AUDIT.md`.
137
+
138
+ When STATE.md is absent, the router runs the bundled
139
+ `scripts/detect_project.py initialize --repo <absolute-root> --template
140
+ <absolute-state-template>` helper before asking anything and routes from its
141
+ returned JSON. `brownfield` initializes `inspect/active` and routes here;
142
+ `greenfield` initializes `define/active` and skips to define; `orphan` blocks.
143
+ Owned state routes by STATE.md without rerunning the helper. Reserve `classify`
144
+ for read-only inspection; do not re-derive a verdict from a directory listing.
145
+
146
+ For a newly initialized existing Git repository, the state router returns
147
+ `bind-initial` while `STATE.branch` is null. The router fetches `origin/main`,
148
+ runs `pipeline_git.py bind-initial` with that exact SHA, and records the
149
+ returned `gsd-path/M00N` binding through `pipeline_state.py transition` before
150
+ entering inspect or define. Build consumes this binding and never creates or
151
+ selects the milestone branch.
152
+
153
+ Before either inspect agent writes a phase artifact, freeze a sorted Markdown
154
+ inventory that excludes `.project/**` and all vendored/generated trees. Two
155
+ read-only agents then run in parallel. The codebase mapper establishes what
156
+ actually exists: stack, entry points, architecture, conventions, maturity,
157
+ recent activity, load-bearing surprises, and open questions only the user
158
+ can settle. The docs auditor inventories every `.md`, extracts testable
159
+ claims (commands, features, structure, status, config, integrations),
160
+ verifies each against the code by the cheapest sufficient method, and
161
+ issues verdicts — `verified`, `stale`, `aspirational`, `unverifiable` —
162
+ with recorded evidence, plus a remediation queue classified `fix-doc`,
163
+ `fix-code`, or `NEEDS-USER`. The auditor uses the frozen inventory verbatim in
164
+ alignment-false mode, so neither agent's output can enter the scan.
165
+
166
+ Build, test, lint, and help commands run only in orchestrator-created,
167
+ agent-specific disposable worktrees at a recorded clean revision. If one is
168
+ not available, agents use static evidence or record `unverifiable`; they never
169
+ run project commands in the source worktree.
170
+
171
+ The orchestrator presents ground truth in one screen — what the project is,
172
+ what demonstrably works, where docs and code disagree — then enters the
173
+ define in brownfield mode. Inspect changes nothing outside `.project/`.
174
+
175
+ **Gate:** both artifacts match their templates; every claim has a verdict and
176
+ every claimless doc appears once in the descriptive list, together covering
177
+ the frozen inventory exactly; ground truth was presented before any question
178
+ was asked.
179
+
180
+ ## Phase 1 — Define (`gsd-path-define`)
181
+
182
+ **Input:** a raw idea — or, brownfield, the inspection artifacts. **Output:**
183
+ `.project/intent/INTENT.md`; program mode instead writes `.project/CHARTER.md`
184
+ and defers INTENT.md to per-milestone derivation (milestone mode, `Lane:
185
+ milestone`).
186
+
187
+ Brownfield mode inverts the opening: present ground truth first, then
188
+ interview only on deltas — this milestone's goal, what must change, what
189
+ must not break (recorded as vetoes). Established facts are stated for
190
+ correction, never asked. Milestone + brownfield still does not re-interview
191
+ charter or roadmap scope; it presents ground truth, fills Current state, and
192
+ collects doc-vs-code rulings before confirmation. Every doc-vs-code conflict from the audit gets a
193
+ user ruling (`fix-doc`, `fix-code`, or `accept-drift`) recorded verbatim in
194
+ both INTENT.md and DOCS-AUDIT.md's durable User rulings table. Actionable rows
195
+ start at `planned: no`; accepted
196
+ `fix-code` items become scope. The codebase map fills INTENT.md's
197
+ `## Current state` so downstream phases inherit ground truth.
198
+
199
+ Cover the problem, users, observable success, scope in, scope out, constraints,
200
+ risks, and surfaces — what a person opens, sees, or types into to get the
201
+ result. INTENT.md records them as `Surfaces:` (`none` only when nobody touches
202
+ the work directly), and every named surface carries a success criterion
203
+ observable there rather than a passing test standing in for it. Chase contradictions and challenge the core assumption. Record
204
+ vetoes and corrections verbatim. Unresolved items remain tagged `RESEARCH` or
205
+ `NEEDS-USER`. A user-supplied document (PRD, issue, design doc) is read
206
+ first and presented as settled coverage for correction; the interview covers
207
+ only its gaps and contradictions.
208
+
209
+ At approval define classifies the milestone lane in INTENT.md: `quick`
210
+ when scope fits at most two deliverable-sized tasks in one wave with no open
211
+ questions and no cross-wave risk; otherwise `standard`. Milestone mode — a
212
+ program milestone derived from an approved roadmap entry — records `Lane:
213
+ milestone` instead: research and decide run only when the roadmap entry lists
214
+ open questions, and planning writes a Settled-only milestone SYNTHESIS.md from
215
+ the program synthesis before dispatching the planner. The quick lane skips
216
+ research and decide — planning enters directly from `define/done`, writes
217
+ a Settled-only SYNTHESIS.md and a single wave (verify-only review depth
218
+ permitted, at most two tasks) without a planner agent, and the rest of the
219
+ pipeline runs unchanged. A quick plan that outgrows those bounds corrects the
220
+ lane to `standard` and reroutes through research.
221
+
222
+ **Gate:** the user receives the playback summary, lane, and absolute-path
223
+ Markdown link to INTENT.md before approving it.
224
+
225
+ ## Phase 2 — Research (`gsd-path-research`)
226
+
227
+ **Input:** INTENT.md. **Output:** `research/RESEARCH.md` plus one evidence
228
+ file per dispatched dimension, drawn from the four standard dimensions:
229
+
230
+ - `research/evidence-domain.md`
231
+ - `research/evidence-stack.md`
232
+ - `research/evidence-pitfalls.md`
233
+ - `research/evidence-similar.md`
234
+
235
+ Brownfield: `research/evidence-codebase.md` from inspect counts as a
236
+ fifth standard input downstream — researchers read it so recommendations
237
+ fit the code that exists (the stack researcher weighs migration cost, the
238
+ pitfalls researcher checks which traps are already sprung).
239
+
240
+ Follow the [research phase contract](skills/gsd-path-research/SKILL.md) for
241
+ dispatch eligibility, skipped dimensions, question assignments, and evidence
242
+ paths. Every finding needs a checked source,
243
+ confidence, and a tie-back to INTENT.md.
244
+
245
+ **Gate:** RESEARCH.md records every standard dimension exactly once, every
246
+ dispatched file exists, matches the evidence template, contains at least one
247
+ finding, and answers its assigned `RESEARCH` questions; every skipped
248
+ dimension is recorded with its reason. Each file is validated as its
249
+ researcher returns. A missing or invalid file gets one corrected redispatch
250
+ as soon as a child slot opens, ahead of queued initial dimensions and while
251
+ other researchers may still be running. The cross-file gate runs only after
252
+ all dimensions settle.
253
+
254
+ ## Phase 3 — Decide (`gsd-path-decide`)
255
+
256
+ **Input:** INTENT.md and every dispatched evidence file. **Output:**
257
+ `.project/research/SYNTHESIS.md`.
258
+
259
+ The decider turns evidence into commitments. Each genuinely open decision
260
+ names the selection, runner-up and why it lost, cited evidence, and
261
+ confidence. A choice already settled by an intent constraint or the existing
262
+ codebase is one line under Settled citing the settling source — never a full
263
+ block with an invented runner-up.
264
+ Conflicts are ruled on or escalated; unanswered intent questions remain
265
+ visible. `## For the planner` identifies wave-one blockers, the walking
266
+ skeleton, and pitfall-to-task guidance.
267
+
268
+ **Gate:** all required decision areas are resolved and cited — as a decision
269
+ block or a Settled line naming its source; all evidence
270
+ files were considered; the planner brief is complete; and every `NEEDS-USER`
271
+ item has a recorded user ruling. Any missing, optional, or unresolved decision
272
+ blocks advancement.
273
+
274
+ ## Phase 3.5 — Roadmap (`gsd-path-roadmap`)
275
+
276
+ Program flow only — requires `.project/CHARTER.md` and a program
277
+ `.project/SYNTHESIS.md`. **Input:** charter, program synthesis, and the
278
+ dispatched evidence set. **Output:** `.project/ROADMAP.md`.
279
+
280
+ The roadmapper slices the charter's full scope into the fewest
281
+ dependency-ordered, independently shippable milestones. M001 is the thinnest
282
+ end-to-end skeleton that burns the riskiest decisions. Rolling-wave: entries
283
+ carry goal, dependencies, scope in/out, success criteria, risks, and open
284
+ questions — never waves, tasks, or file lists. Charter scope coverage is
285
+ total: every `Full scope: in` item maps to a milestone, and silent scope cuts
286
+ are forbidden (`NEEDS-USER` instead). A non-empty `Open questions` entry
287
+ inserts milestone-scoped research and decide before that milestone's
288
+ planning. An approved roadmap may be re-sliced only at a milestone boundary;
289
+ `shipped` entries are immutable except Status/Archive/Integrated.
290
+
291
+ **Gate:** total charter coverage, unique ordered ids, acyclic earlier-id
292
+ dependencies, complete entry fields, no task-level detail, no vetoed scope —
293
+ and the user approves the milestone list. Approval transitions STATE to
294
+ `roadmap/done`, marks the first `pending` entry `active`, and is
295
+ checkpointed as a `.project/`-only Git commit (deferred to build's
296
+ transition commit during a new-repository transaction or before Git
297
+ exists).
298
+
299
+ ## Phase 4 — Plan (`gsd-path-plan`)
300
+
301
+ **Input:** both `.project/intent/INTENT.md` and
302
+ `.project/research/SYNTHESIS.md`, plus relevant existing code. **Output:**
303
+ `.project/plan/PLAN.md` and one full task file per task in `.project/tasks/`.
304
+
305
+ Order work by risk and dependency:
306
+
307
+ 1. Wave one burns down assumptions that could invalidate the plan.
308
+ 2. Wave two delivers the thinnest running end-to-end slice.
309
+ 3. Later waves add features, then polish.
310
+
311
+ Tasks are deliverable-sized: each is the largest coherent vertical slice —
312
+ feature plus its tests and wiring — one agent run can complete, split only
313
+ when file scopes, dependencies, or capacity force it. Every task contains
314
+ inlined context, real paths, approach constraints, an interface contract
315
+ naming the exact shapes exchanged with other tasks (`None` when
316
+ independent), an Intent coverage section, observable acceptance criteria, a
317
+ meaningful `verify` command that names a path from that task's files,
318
+ declared files, deps, and
319
+ orchestrator-owned `base`/`worktree`/`task_branch` fields initialized
320
+ to null. PLAN.md Intent coverage maps every INTENT.md success criterion to a
321
+ task AC; that task's Verify must fail if the SC is skipped. When INTENT.md
322
+ names surfaces, PLAN.md also carries a `## Surface contract`: per surface, the
323
+ entry point, what empty, loading, error, and success show, the walkthrough a
324
+ reviewer performs, the task that delivers it, and the criteria it is proven
325
+ by — which that task must own, in the same wave as the capability behind it.
326
+ `check_handoffs.py final` then requires each of those criteria to name its
327
+ surface in FINAL.md with the walkthrough as its Check, so a surface criterion
328
+ cannot be marked `met` on internal test output.
329
+ `scripts/check_handoffs.py plan` gates the table; `wave` and `final`
330
+ require a verdict per owned SC id. Acceptance criteria,
331
+ owned SCs, and Verify are the contract; the coder owns
332
+ implementation decisions inside the stated constraints. The planner reads
333
+ `.project/LESSONS.md` when present and assigns each wave a `Review depth` —
334
+ `full`, `verify-only` for low-risk waves, or sparingly `deep` for
335
+ irreversible or security-critical waves; wave 1 and any wave touching
336
+ authentication, payments, data migration, or concurrency stays `full` or
337
+ `deep`. PLAN.md Config may name an optional `review_panel` (`off` by
338
+ default, or `detected` / a named family list). In program flow CHARTER.md
339
+ holds the durable default; each milestone INTENT copies it and may
340
+ override. After the structural gate
341
+ and before approval, the planner runs `scripts/review_panel.py` against
342
+ advertised host model slugs and may write `.project/review/PLAN-PANEL.md`.
343
+ The panel is advisory: it never averages findings or replaces user
344
+ approval. Quick lane stays `off`. Config may also set
345
+ `finding_skeptics: on` (default `off`) to have the build spawn one
346
+ read-only skeptic per failed criterion group from a blocking `deep` review
347
+ before fix tasks are opened; a refuted group spawns no fix task unless the
348
+ user explicitly overrides all refutations for that cycle.
349
+ Same-wave tasks may depend on each other only when their file scopes do not
350
+ overlap; the build executes those tasks in dependency layers. No two tasks
351
+ that can run concurrently may share a file.
352
+
353
+ **Gate:** both required inputs exist; deps resolve without cycles and each one
354
+ carries named data or a named prerequisite effect; layer and
355
+ file-scope rules hold; criteria and verifies can fail meaningfully; every
356
+ INTENT success criterion is in the Intent coverage table; tasks are
357
+ deliverable-sized with no unforced splits; INTENT and SYNTHESIS are honored;
358
+ and the user approves the wave summary. Approval is checkpointed the same
359
+ way — a `.project/`-only commit carrying the approved PLAN.md, task set, and
360
+ STATE transition — so planning artifacts never sit uncommitted until build
361
+ (the same deferral exceptions apply; patch-mode approvals are committed by
362
+ build's re-entry transition instead).
363
+
364
+ ## Phase 5 — Build (`gsd-path-build`)
365
+
366
+ **Input:** the approved plan and tasks. **Output:** committed code, updated
367
+ task files, and wave reviews.
368
+
369
+ The build contract is not restated here. Branch binding, the wave loop, task
370
+ isolation and landing, wave review, fix batching, completion, and milestone
371
+ abandon live only in the canonical
372
+ [skills/gsd-path-build/SKILL.md](skills/gsd-path-build/SKILL.md).
373
+ `skills/gsd-path/BUILD.md` is its generated mirror. The build orchestrator
374
+ reads the canonical file; no build agent receives this section.
375
+
376
+ Program lookahead starts at inspect under `.project/next/`, then runs define
377
+ in milestone + brownfield mode. `roadmap/done` always routes to define in
378
+ milestone mode; only the first roadmap approval produces that state. Later
379
+ non-lookahead milestones enter inspect directly — through the router's
380
+ next-milestone transition after ship, or the post-abandon re-slice transition
381
+ — and never pass through `roadmap/done`.
382
+
383
+ ## Phase 6 — Ship (`gsd-path-ship`)
384
+
385
+ ### Final review (`gsd-path-ship final`)
386
+
387
+ **Input:** INTENT.md success criteria and the running system. **Output:**
388
+ `.project/review/FINAL.md`, one distinct `.project/review/final-gap-N.md` per
389
+ cross-wave risk, and (when blocked) `.project/review/PATCH-FINDINGS.md`.
390
+
391
+ Run `workflow_run.py prepare-final` to collect project Verify and reuse valid
392
+ final evidence. A quick lane's single full wave may cover final scope, including
393
+ surface walkthroughs, in its existing review. The runtime proves freshness and
394
+ generates FINAL.md from that record. Dispatch an integration reviewer only when
395
+ that proof is incomplete or stale; dispatch gap reviewers only for uncovered
396
+ cross-wave risks through the shared capacity-aware contract. The integration reviewer marks each success
397
+ criterion `met`, `not-met`, or `unverifiable` with checked evidence. Each gap
398
+ reviewer records `pass` or `blocked` for its assigned end-to-end or cross-wave
399
+ risk. List only genuine
400
+ risks that could plausibly fail; never pad the list. The runtime
401
+ runs PLAN.md's project Verify once, stores exact stdout/stderr in the existing
402
+ command/commit ledger, and generates its gap view; other gap
403
+ reviewers do not re-run it. The orchestrator
404
+ creates one disposable worktree at exact reviewed HEAD
405
+ per reviewer; project commands never run in the primary worktree. Every final
406
+ artifact records that full reviewed HEAD. The parent validates and atomically
407
+ transfers each staged reviewer output to the canonical `.project/review/` path
408
+ before removing its exact disposable root. Retry may reuse an uncommitted output
409
+ only when its SHA and complete numbered risk mapping still match. Stale
410
+ uncommitted assigned outputs are regenerated. A prior blocked output committed
411
+ by the patch build may be replaced only when its findings were copied verbatim
412
+ into approved, now-done patch tasks; otherwise a stale committed output blocks.
413
+
414
+ **Gate:** `not-met`, `unverifiable`, or any blocked gap blocks shipment. Turn
415
+ the findings into a user-approved patch wave via `gsd-path-plan` patch mode and
416
+ return through the build/review loop. Passing the final gate leaves STATE.md at
417
+ `ship/active` while the archive transaction runs; `shipped/done` is written
418
+ only after the archive and manifest validate.
419
+
420
+ A missing or malformed reviewer output gets one corrective follow-up, then a
421
+ `NEEDS-USER` block rather than a fabricated patch. Project Verify's gap view is generated from its recorded execution. Rebuild a
422
+ missing view from that receipt; never rerun a command to repair a report. A failed
423
+ execution stops further reviewer dispatch until its evidence is resolved. Only valid evidenced FINAL/gap findings
424
+ enter PATCH-FINDINGS.md and patch planning, and the build orchestrator commits
425
+ that finding set with the approved patch artifacts before executing the new
426
+ wave.
427
+
428
+ ### Archive transaction
429
+
430
+ **Input:** the shipped milestone's `.project/` artifacts. **Output:**
431
+ `.project/archive/<NNN>-<milestone-slug>/` with a MANIFEST.md.
432
+
433
+ STATE.archive is a write-ahead transaction id. The bundled Python archive helper
434
+ chooses one plus the maximum numeric prefix, persists the exact target before
435
+ creating or moving, and reuses it on every retry. Shipping moves — never
436
+ deletes — every supporting document into that numbered archive: `intent/`,
437
+ `research/`, `plan/`, `tasks/`, `review/`, and optional `discuss/`.
438
+ REPOSITORY.md, LESSONS.md, and the program artifacts (CHARTER.md,
439
+ ROADMAP.md, top-level SYNTHESIS.md) remain active project metadata; a program
440
+ ship also marks the milestone's roadmap entry `Status: shipped` with its
441
+ archive pointer inside the ship commit. MANIFEST.md is
442
+ written by same-directory temporary file plus atomic rename and lists actual
443
+ archive contents, ship date, final verdicts, wave/task/cycle counts, and
444
+ carried-forward items. A precommit helper gate validates canonical files, the
445
+ active-root allowlist, metadata, success rows, counts, and exact contents before
446
+ STATE may become shipped.
447
+
448
+ The helper rejects a CLI slug that does not match STATE.milestone, fake or
449
+ symlinked Markdown artifacts, dirty older archives, and any target already in
450
+ HEAD. Manifest criteria must match FINAL.md, cycle counts come from contiguous
451
+ real wave-review files, every final artifact names the reviewed HEAD, and Notes
452
+ must be completed. A committed target is immutable and routes only to
453
+ validation.
454
+
455
+ One exception: a DOCS-AUDIT.md with pending `planned: no` rulings is copied
456
+ atomically back into a recreated `research/` so the alignment queue survives;
457
+ the archived original keeps full history. Active and archived research may
458
+ coexist only for that byte-identical carry-forward.
459
+
460
+ Archives become read-only when committed. No phase may modify a committed
461
+ archive; the next milestone's inspection may read it. A retry with a persisted
462
+ archive path bypasses missing active review preconditions and resumes that
463
+ same transaction. The router validates every shipped state before reporting
464
+ or starting new work. An exact `.STATE.md.gsd-path-tmp` left before the
465
+ write-ahead rename is removed only by `prepare`. A crash after STATE becomes
466
+ `shipped/done` but before commit may run `prepare` and preflight only while the
467
+ target is absent from HEAD, then creates the single ship commit without
468
+ rewriting the transition.
469
+
470
+ If discussion resumes after `prepare` but before the ship commit, it copies the
471
+ archived pair back to active storage and appends there. A repeated `prepare`
472
+ accepts only a complete, valid active pair whose bytes extend both archived
473
+ files, atomically replaces the archived records, removes the active copy, and
474
+ forces manifest regeneration. Divergence or an incomplete pair blocks.
475
+
476
+ The ship phase closes the milestone with exactly one commit on the bound
477
+ branch: the shipped STATE.md, the final-review artifacts, and the archive
478
+ move with its MANIFEST.md, staged from `.project/` only, subject
479
+ `ship: M00N — <milestone-slug>` and a body naming `Archive:` and
480
+ `Reviewed-HEAD:`. Every other commit on the bound branch
481
+ belongs to the build orchestrator. The commit must contain only `.project/`
482
+ paths. There is no untracked-project fallback. Every pipeline commit carries
483
+ the subject and field body defined by its canonical phase contract; task-land
484
+ fields live only in the
485
+ [build contract](skills/gsd-path-build/SKILL.md).
486
+
487
+ ### Integration
488
+
489
+ After the postcommit validator passes, ship performs integration — the only
490
+ path from the bound branch to the default branch. The bound branch never
491
+ receives merges or back-merges, and the default checkout is never entered;
492
+ the local default branch ref may lag origin, which is harmless because
493
+ binding resolves remote SHAs. `STATE.integration_default` stores the project
494
+ choice and `STATE.integration` stores the current milestone choice. Both are
495
+ `direct` or `pull-request`; they may change only before build, and the current
496
+ milestone resets to the project default at the next handoff. Older v2 state
497
+ without these fields means `direct`. `STATE.integration_source` is `default` or
498
+ `milestone` so an explicit override remains distinct when its value happens to
499
+ match the project default.
500
+
501
+ Ship fetches origin, refreshes `origin/HEAD`, mirrors published milestone tags,
502
+ and requires the remote default to be `main`. It then follows the locked mode:
503
+
504
+ - `direct` creates a temporary named worktree (`gsd-path-integrate/M00N`) at
505
+ the fetched remote-default SHA and merges the ship commit with `--no-ff`
506
+ under subject `integrate: M00N — merge gsd-path/M00N into main`. A clean
507
+ merge is pushed to `main`; a conflict is aborted and surfaced to the user.
508
+ Path never resolves it automatically. The bound branch and annotated
509
+ `milestone/<NNN>-<slug>` tag are then published, and the temporary worktree
510
+ is removed.
511
+ - `pull-request` requires `gh` authentication for GitHub.com and a GitHub.com
512
+ origin. Path publishes the exact ship commit and creates or reuses the one
513
+ eligible PR to `main` with a GSD Path credit footer. It returns
514
+ `awaiting-merge` until a human GitHub user merges it with a merge commit; Path
515
+ never enables auto-merge or merges the PR. After validation, Path creates the
516
+ annotated milestone tag. The [ship contract](skills/gsd-path-ship/SKILL.md)
517
+ owns the candidate, provenance, topology, publication, and recovery rules.
518
+
519
+ Ship leaves the primary worktree and `STATE.branch` on the shipped local
520
+ `gsd-path/M00N`; the router owns the later branch handoff. NNN always comes
521
+ from the persisted `STATE.archive` sequence. Integration is pending from the
522
+ ship commit until the selected mode's merge and tag proof passes. The ship
523
+ commit is the crash-recovery transaction id. Resume is idempotent: direct mode
524
+ resumes its merge/tag/push transaction; PR mode reuses the exact PR and waits
525
+ or completes its tag after merge.
526
+ The router must not report shipped or start the next milestone while
527
+ integration is pending — it routes back to ship. Once validation passes, the
528
+ router fetches the latest `origin/main`, binds the next milestone there, and
529
+ records both that base and the earlier milestone landing. A missing remote
530
+ bound branch is allowed only for validated PR integration.
531
+
532
+ **Gate:** the bundled validator proves the committed shipped state, complete
533
+ archive and manifest, valid carry-forward, clean worktree, the newest commit
534
+ with a recognized ship subject in HEAD history, `.project/`-only paths in that
535
+ commit, and no `.project` change after it; the bundled `validate-integrated`
536
+ command then proves the matching integration merge commit, its
537
+ `milestone/<NNN>-<slug>` tag, and the merge on origin/main before the router
538
+ reports shipped or starts a new milestone. The ship contract owns accepted
539
+ historical subject forms. Direct-mode commits use the canonical form above;
540
+ PR-mode validation requires origin network access to prove live publication
541
+ and uses tag metadata and topology instead of merge text.
542
+ `integrate:` subjects in HEAD history are expected in direct mode; the
543
+ no-`.project`-change-after-ship drift rule lives on the gsd-path branch, which
544
+ receives no further `.project` commits before the next milestone. Product
545
+ commits after shipping do not disturb a validated shipment.
546
+
547
+ ## Standing process — Discussion (`gsd-path-discuss`)
548
+
549
+ Runs as an explicit sidecar from any active non-shipped phase: inspect,
550
+ define, research, decide, roadmap, plan, build, or ship. It does not
551
+ advance the pipeline, own STATE.md, or edit a phase handoff. A shipped
552
+ milestone is archived and must not be reopened for discussion; start a new
553
+ milestone first.
554
+
555
+ **Input:** the current user question, `AGENTS.md`, `WORKFLOW.md`,
556
+ `.project/STATE.md`, the existing `.project/discuss/` records, and the
557
+ phase-specific artifacts and code needed to answer it. **Output:**
558
+ `.project/discuss/DIALOGUE.md` and `.project/discuss/ANSWERS.md`.
559
+
560
+ The discussion skill never commits. The current phase orchestrator verifies
561
+ that each change is append-only and includes it in the next normal `.project/`
562
+ checkpoint. During build this happens before the next clean layer base; during
563
+ ship the records move into the archive and enter the single ship commit.
564
+
565
+ The discussion skill reads intent vetoes, settled synthesis decisions, and
566
+ current plan/task contracts as governing constraints. It checks the smallest
567
+ relevant code paths, callers, tests, and artifacts, distinguishes fact from
568
+ inference, and pushes back on unsupported premises with cited reasoning. It
569
+ records the user's corrections, vetoes, decisions, evidence, confidence,
570
+ unresolved `RESEARCH`/`NEEDS-USER` items, and the phase owner for follow-up.
571
+
572
+ Use existing research evidence first. If a current external fact, unfamiliar
573
+ library behavior, or unresolved risk requires more evidence, perform focused
574
+ research and record its query, sources, and confidence. Do not launch the full
575
+ research phase from an arbitrary phase: its STATE transition and RESEARCH.md
576
+ handoff belong to the router and research skill. If the answer needs formal
577
+ milestone evidence, leave a tagged follow-up for that owner.
578
+
579
+ Append one verbatim user turn and assistant answer to DIALOGUE.md, plus one
580
+ self-contained answer record to ANSWERS.md, before returning the response.
581
+ The bundled deterministic helper locks STATE, validates or recovers the pair,
582
+ allocates IDs and lineage, journals the paired publication, reports pending
583
+ receipts, and appends dispositions; the model supplies only the grounded
584
+ semantic fields.
585
+ Every record carries stable `T###` thread identity, `D###`/`A###` linkage, and
586
+ supersession. Mark a bounded resolved answer `final`; use `working` only for an
587
+ explicitly provisional turn. A required formal follow-up remains pending until
588
+ the named owner appends a `Disposition X###` receipt. The router and every phase
589
+ scan pending receipts before work and before advancement; they apply the answer
590
+ through a legal gate or block visibly rather than continuing from stale input.
591
+ A final discussion answer is durable context, not approval by itself.
592
+
593
+ **Gate:** the two append-only records exist, include the current phase/status,
594
+ and contain the evidence, research status, confidence, unresolved items, and
595
+ next owner needed to resume without chat history.
596
+
597
+ ## Standing process — Docs audit (`gsd-path-docs-audit`)
598
+
599
+ Runs inside inspection and standalone only at a stable pre-build phase boundary
600
+ or `ship/blocked` with no active task. It requires owned v2 STATE and blocks
601
+ during build, active review, or shipped history. Answers one question with
602
+ evidence: does the project do what its documents say?
603
+
604
+ Inventory every `.md` → extract testable claims → verify each by the
605
+ cheapest sufficient method (run the command, read the code, run the test,
606
+ check history) → verdict with recorded evidence → remediation queue. With
607
+ `.project/` present it also audits the pipeline against itself: done tasks
608
+ must have a proven landing commit and a passing Verify, SYNTHESIS decisions must
609
+ match the code's actual shape, STATE must agree with task
610
+ frontmatter. Useful mid-project as a drift check before a milestone review.
611
+ The auditor never edits anything.
612
+
613
+ **Audit-to-plan path.** Standalone runs end with a ruling walk: the user
614
+ rules `fix-code`, `fix-doc`, or `accept-drift` on each queue item, recorded
615
+ verbatim in DOCS-AUDIT.md (`accept-drift` suppresses the item in future
616
+ audits). Actionable rulings are queued, not executed: each sits in
617
+ DOCS-AUDIT.md marked `planned: no` until the user is ready. The audit
618
+ offers alignment once at close; after that, the `gsd-path` router mentions the queue in
619
+ its status line and `gsd-path-plan` offers — per item, before any planning —
620
+ to absorb queued rulings: folded into a normal plan as ordinary tasks, or
621
+ appended via **patch mode** as one gated wave on the approved PLAN.md (one
622
+ full task per finding, evidence inlined, `fix-doc` tasks verified by
623
+ re-running the audit's claim check). Absorbed rulings get their task id in
624
+ the queue row; declined ones stay queued and are offered again. The queue
625
+ never blocks the pipeline and never enters a plan wholesale unseen. Builds
626
+ from patch waves run the normal review-gate loop. A shipped milestone never
627
+ reopens because its plan is archived; start and inspect a new milestone, then
628
+ offer carried-forward rulings during its normal planning. Final review's
629
+ evidenced `not-met` criteria and blocked gaps travel the same patch-mode road,
630
+ with their exact ordered source-file and row list.
631
+
632
+ ## Handoff contract
633
+
634
+ ```text
635
+ .project/
636
+ STATE.md pipeline owner, phase, branch, archive transaction, log
637
+ REPOSITORY.md persistent new-GitHub checkout/worktree binding
638
+ LESSONS.md cross-milestone lessons; appended at ship, read by the planner
639
+ CHARTER.md program scope and vetoes (program flow); never archives
640
+ ROADMAP.md milestone slicing (program flow); never archives
641
+ SYNTHESIS.md program decisions at top level (program flow); never archives
642
+ next/ lookahead track: next milestone's STATE.md and phase
643
+ artifacts while the active milestone builds (program flow)
644
+ intent/INTENT.md approved intent and hard constraints
645
+ research/evidence-codebase.md brownfield ground truth (inspect)
646
+ research/DOCS-AUDIT.md doc-vs-code verdicts and remediation queue
647
+ research/RESEARCH.md research dispatch/question/output manifest
648
+ research/evidence-*.md four required evidence dimensions
649
+ research/SYNTHESIS.md decision artifact; authoritative after decide gate
650
+ plan/PLAN.md waves, config, and project verify
651
+ tasks/T###-slug.md full contract, clean base SHA, status
652
+ review/wave-N.cycleC.md per-wave verdicts (deep uses contract/adversarial lenses)
653
+ review/wave-N.cycleC.skeptic-<locator>.md optional deep-review refutation evidence
654
+ review/wave-N.cycleC.panel.md optional cross-model wave panel
655
+ review/PLAN-PANEL.md optional cross-model plan panel
656
+ review/final-gap-N.md cross-wave gap verdicts
657
+ review/FINAL.md success-criteria verdicts
658
+ review/PATCH-FINDINGS.md ordered evidenced findings for patch planning
659
+ discuss/DIALOGUE.md append-only any-phase discussion transcript
660
+ discuss/ANSWERS.md append-only discussion answers and decisions
661
+ archive/<NNN>-<slug>/ read-only shipped milestones, each with MANIFEST.md
662
+ ```
663
+
664
+ At ship, everything except `STATE.md`, `REPOSITORY.md`, `LESSONS.md`, `archive/`, `next/`, and
665
+ the program artifacts (`CHARTER.md`, `ROADMAP.md`, top-level `SYNTHESIS.md`)
666
+ moves into the numbered archive; active paths above describe the current milestone
667
+ only, including the discussion records. The ship step appends one lesson line per repeat-offender criterion and
668
+ STATE.md log escalation to LESSONS.md before committing.
669
+
670
+ Artifact formats are bundled with the installed `gsd-path` skill. Each phase
671
+ resolves and passes their absolute paths. A missing or malformed artifact
672
+ fails its phase gate.
673
+
674
+ ## Error handling
675
+
676
+ - Missing precondition: route to the phase that produces it.
677
+ - Missing or empty agent output: respawn once, then surface the failure.
678
+ - Conflicting sources of truth: stop and report; never average.
679
+ - Cycle cap, threatened veto, or checkpoint `NEEDS-USER`: ask the user —
680
+ through an interactive user-input tool when available, with the
681
+ recommended option listed first and justified in one line, alongside the
682
+ real alternatives.
683
+ - Otherwise handle the problem, record it on disk, and continue.