@opengsd/gsd-path 1.0.0 → 1.2.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 (498) hide show
  1. package/AGENTS.md +33 -13
  2. package/CHANGELOG.md +68 -0
  3. package/DOCS.md +75 -6
  4. package/FULL.md +12 -15
  5. package/HOOKS.md +18 -9
  6. package/QUICK.md +8 -6
  7. package/README.md +218 -14
  8. package/RUNTIME.md +16 -5
  9. package/UPDATE.md +30 -11
  10. package/WORKFLOW.md +35 -16
  11. package/package.json +23 -1
  12. package/platforms/claude/dispatch.md +4 -4
  13. package/platforms/copilot/dispatch.md +4 -4
  14. package/platforms/cursor/dispatch.md +5 -10
  15. package/platforms/grok/dispatch.md +4 -6
  16. package/platforms/kimi/dispatch.md +4 -4
  17. package/platforms/kiro/dispatch.md +4 -6
  18. package/platforms/opencode/dispatch.md +4 -4
  19. package/platforms/qwen/dispatch.md +4 -4
  20. package/platforms/shared-agents/dispatch.md +12 -19
  21. package/scripts/_common.py +5 -0
  22. package/scripts/archive_milestone.py +30 -124
  23. package/scripts/bootstrap_repository.py +33 -4
  24. package/scripts/build_recovery.py +292 -0
  25. package/scripts/build_state.py +2 -0
  26. package/scripts/check_docs_audit.py +7 -3
  27. package/scripts/check_handoffs.py +7 -1
  28. package/scripts/check_task_briefs.py +3 -0
  29. package/scripts/detect_project.py +22 -3
  30. package/scripts/discussion_records.py +3 -0
  31. package/scripts/discussion_validate.py +8 -3
  32. package/scripts/dispatch_driver.py +233 -22
  33. package/scripts/git_guard.py +14 -5
  34. package/scripts/guard_hook.py +11 -1
  35. package/scripts/install.mjs +54 -1448
  36. package/scripts/install.py +155 -188
  37. package/scripts/integration.py +54 -28
  38. package/scripts/isolation.py +24 -6
  39. package/scripts/jev_review.py +138 -0
  40. package/scripts/lean_verification.py +3 -1
  41. package/scripts/loop_run.py +2 -0
  42. package/scripts/model_policy.py +279 -0
  43. package/scripts/path_config.py +248 -0
  44. package/scripts/pipeline_diagnose.py +15 -3
  45. package/scripts/pipeline_git.py +3 -0
  46. package/scripts/pipeline_state.py +117 -186
  47. package/scripts/pipeline_undo.py +14 -7
  48. package/scripts/promote_lookahead.py +33 -162
  49. package/scripts/review_panel.py +11 -0
  50. package/scripts/roadmap.py +326 -0
  51. package/scripts/runtime_store.py +278 -0
  52. package/scripts/skill-resources.json +182 -4
  53. package/scripts/state_checkpoint.py +114 -72
  54. package/scripts/state_promote.py +47 -44
  55. package/scripts/status_runtime.py +92 -6
  56. package/scripts/task_context.py +73 -0
  57. package/scripts/token_budget.py +40 -1
  58. package/scripts/workflow_run.py +128 -8
  59. package/scripts/worktree_paths.py +94 -0
  60. package/skills/gsd-path/BUILD.md +54 -575
  61. package/skills/gsd-path/DECIDE.md +4 -6
  62. package/skills/gsd-path/DEFINE.md +23 -21
  63. package/skills/gsd-path/DOCS-AUDIT.md +2 -0
  64. package/skills/gsd-path/INSPECT.md +32 -8
  65. package/skills/gsd-path/PLAN.md +29 -19
  66. package/skills/gsd-path/RESEARCH.md +5 -6
  67. package/skills/gsd-path/ROADMAP.md +24 -58
  68. package/skills/gsd-path/SHIP.md +29 -17
  69. package/skills/gsd-path/SKILL.md +46 -22
  70. package/skills/gsd-path/references/build-abandon.md +33 -0
  71. package/skills/gsd-path/references/build-native.md +502 -0
  72. package/skills/gsd-path/references/build-recovery.md +78 -0
  73. package/skills/gsd-path/references/coder.md +8 -3
  74. package/skills/gsd-path/references/config.md +57 -0
  75. package/skills/gsd-path/references/dispatch.md +12 -19
  76. package/skills/gsd-path/references/docs-auditor.md +14 -0
  77. package/skills/gsd-path/references/jev-review.md +82 -0
  78. package/skills/gsd-path/references/model-policy.md +139 -0
  79. package/skills/gsd-path/references/reviewer-final.md +21 -0
  80. package/skills/gsd-path/references/reviewer-panel.md +17 -0
  81. package/skills/gsd-path/references/reviewer-skeptic.md +20 -0
  82. package/skills/gsd-path/references/reviewer-wave.md +89 -0
  83. package/skills/gsd-path/references/reviewer.md +12 -148
  84. package/skills/gsd-path/references/runtime-selection.md +25 -0
  85. package/skills/gsd-path/scripts/__pycache__/_common.cpython-312.pyc +0 -0
  86. package/skills/gsd-path/scripts/__pycache__/check_handoffs.cpython-312.pyc +0 -0
  87. package/skills/gsd-path/scripts/_common.py +5 -0
  88. package/skills/gsd-path/scripts/archive_milestone.py +30 -124
  89. package/skills/gsd-path/scripts/bootstrap_repository.py +33 -4
  90. package/skills/gsd-path/scripts/build_recovery.py +292 -0
  91. package/skills/gsd-path/scripts/build_state.py +2 -0
  92. package/skills/gsd-path/scripts/check_docs_audit.py +7 -3
  93. package/skills/gsd-path/scripts/check_handoffs.py +7 -1
  94. package/skills/gsd-path/scripts/check_task_briefs.py +3 -0
  95. package/skills/gsd-path/scripts/detect_project.py +22 -3
  96. package/skills/gsd-path/scripts/discussion_records.py +3 -0
  97. package/skills/gsd-path/scripts/discussion_validate.py +8 -3
  98. package/skills/gsd-path/scripts/dispatch_driver.py +233 -22
  99. package/skills/gsd-path/scripts/git_guard.py +768 -0
  100. package/skills/gsd-path/scripts/integration.py +54 -28
  101. package/skills/gsd-path/scripts/isolation.py +24 -6
  102. package/skills/gsd-path/scripts/jev_review.py +138 -0
  103. package/skills/gsd-path/scripts/lean_verification.py +3 -1
  104. package/skills/gsd-path/scripts/loop_run.py +2 -0
  105. package/skills/gsd-path/scripts/model_policy.py +279 -0
  106. package/skills/gsd-path/scripts/path_config.py +248 -0
  107. package/skills/gsd-path/scripts/pipeline_git.py +3 -0
  108. package/skills/gsd-path/scripts/pipeline_state.py +117 -186
  109. package/skills/gsd-path/scripts/promote_lookahead.py +33 -162
  110. package/skills/gsd-path/scripts/review_panel.py +11 -0
  111. package/skills/gsd-path/scripts/roadmap.py +326 -0
  112. package/skills/gsd-path/scripts/state_checkpoint.py +114 -72
  113. package/skills/gsd-path/scripts/state_promote.py +47 -44
  114. package/skills/gsd-path/scripts/status_runtime.py +208 -0
  115. package/skills/gsd-path/scripts/task_context.py +73 -0
  116. package/skills/gsd-path/scripts/token_budget.py +40 -1
  117. package/skills/gsd-path/scripts/workflow_run.py +128 -8
  118. package/skills/gsd-path/scripts/worktree_paths.py +94 -0
  119. package/skills/gsd-path/templates/skeptic.md +1 -1
  120. package/skills/gsd-path/templates/task.md +2 -0
  121. package/skills/gsd-path/templates/wave-panel.md +1 -1
  122. package/skills/gsd-path/templates/wave-review.md +1 -1
  123. package/skills/gsd-path-build/SKILL.md +54 -575
  124. package/skills/gsd-path-build/references/build-abandon.md +33 -0
  125. package/skills/gsd-path-build/references/build-native.md +502 -0
  126. package/skills/gsd-path-build/references/build-recovery.md +78 -0
  127. package/skills/gsd-path-build/references/coder.md +8 -3
  128. package/skills/gsd-path-build/references/dispatch.md +12 -19
  129. package/skills/gsd-path-build/references/jev-review.md +82 -0
  130. package/skills/gsd-path-build/references/model-policy.md +139 -0
  131. package/skills/gsd-path-build/references/reviewer-final.md +21 -0
  132. package/skills/gsd-path-build/references/reviewer-panel.md +17 -0
  133. package/skills/gsd-path-build/references/reviewer-skeptic.md +20 -0
  134. package/skills/gsd-path-build/references/reviewer-wave.md +89 -0
  135. package/skills/gsd-path-build/references/reviewer.md +12 -148
  136. package/skills/gsd-path-build/references/runtime-selection.md +25 -0
  137. package/skills/gsd-path-build/scripts/__pycache__/_common.cpython-312.pyc +0 -0
  138. package/skills/gsd-path-build/scripts/__pycache__/check_handoffs.cpython-312.pyc +0 -0
  139. package/skills/gsd-path-build/scripts/_common.py +5 -0
  140. package/skills/gsd-path-build/scripts/archive_milestone.py +30 -124
  141. package/skills/gsd-path-build/scripts/build_recovery.py +292 -0
  142. package/skills/gsd-path-build/scripts/build_state.py +2 -0
  143. package/skills/gsd-path-build/scripts/check_handoffs.py +7 -1
  144. package/skills/gsd-path-build/scripts/check_task_briefs.py +3 -0
  145. package/skills/gsd-path-build/scripts/detect_project.py +1536 -0
  146. package/skills/gsd-path-build/scripts/discussion_records.py +3 -0
  147. package/skills/gsd-path-build/scripts/discussion_validate.py +8 -3
  148. package/skills/gsd-path-build/scripts/dispatch_driver.py +233 -22
  149. package/skills/gsd-path-build/scripts/integration.py +54 -28
  150. package/skills/gsd-path-build/scripts/isolation.py +24 -6
  151. package/skills/gsd-path-build/scripts/jev_review.py +138 -0
  152. package/skills/gsd-path-build/scripts/loop_run.py +2 -0
  153. package/skills/gsd-path-build/scripts/model_policy.py +279 -0
  154. package/skills/gsd-path-build/scripts/path_config.py +248 -0
  155. package/skills/gsd-path-build/scripts/pipeline_git.py +3 -0
  156. package/skills/gsd-path-build/scripts/pipeline_state.py +117 -186
  157. package/skills/gsd-path-build/scripts/promote_lookahead.py +286 -0
  158. package/skills/gsd-path-build/scripts/review_panel.py +11 -0
  159. package/skills/gsd-path-build/scripts/roadmap.py +326 -0
  160. package/skills/gsd-path-build/scripts/state_checkpoint.py +114 -72
  161. package/skills/gsd-path-build/scripts/state_promote.py +47 -44
  162. package/skills/gsd-path-build/scripts/task_context.py +73 -0
  163. package/skills/gsd-path-build/scripts/token_budget.py +40 -1
  164. package/skills/gsd-path-build/scripts/workflow_run.py +128 -8
  165. package/skills/gsd-path-build/scripts/worktree_paths.py +94 -0
  166. package/skills/gsd-path-build/templates/skeptic.md +1 -1
  167. package/skills/gsd-path-build/templates/task.md +2 -0
  168. package/skills/gsd-path-build/templates/wave-panel.md +1 -1
  169. package/skills/gsd-path-build/templates/wave-review.md +1 -1
  170. package/skills/gsd-path-decide/SKILL.md +4 -6
  171. package/skills/gsd-path-decide/references/dispatch.md +12 -19
  172. package/skills/gsd-path-decide/references/model-policy.md +139 -0
  173. package/skills/gsd-path-decide/references/runtime-selection.md +25 -0
  174. package/skills/gsd-path-decide/scripts/_common.py +5 -0
  175. package/skills/gsd-path-decide/scripts/archive_milestone.py +2171 -0
  176. package/skills/gsd-path-decide/scripts/build_recovery.py +292 -0
  177. package/skills/gsd-path-decide/scripts/check_handoffs.py +7 -1
  178. package/skills/gsd-path-decide/scripts/check_task_briefs.py +3 -0
  179. package/skills/gsd-path-decide/scripts/detect_project.py +1536 -0
  180. package/skills/gsd-path-decide/scripts/discussion_records.py +3 -0
  181. package/skills/gsd-path-decide/scripts/discussion_validate.py +1326 -0
  182. package/skills/gsd-path-decide/scripts/integration.py +1459 -0
  183. package/skills/gsd-path-decide/scripts/isolation.py +24 -6
  184. package/skills/gsd-path-decide/scripts/loop_run.py +839 -0
  185. package/skills/gsd-path-decide/scripts/model_policy.py +279 -0
  186. package/skills/gsd-path-decide/scripts/path_config.py +248 -0
  187. package/skills/gsd-path-decide/scripts/pipeline_git.py +3 -0
  188. package/skills/gsd-path-decide/scripts/pipeline_state.py +117 -186
  189. package/skills/gsd-path-decide/scripts/promote_lookahead.py +286 -0
  190. package/skills/gsd-path-decide/scripts/review_panel.py +564 -0
  191. package/skills/gsd-path-decide/scripts/roadmap.py +326 -0
  192. package/skills/gsd-path-decide/scripts/state_checkpoint.py +114 -72
  193. package/skills/gsd-path-decide/scripts/state_promote.py +47 -44
  194. package/skills/gsd-path-decide/scripts/worktree_paths.py +94 -0
  195. package/skills/gsd-path-define/SKILL.md +23 -21
  196. package/skills/gsd-path-define/references/build-recovery.md +78 -0
  197. package/skills/gsd-path-define/references/runtime-selection.md +25 -0
  198. package/skills/gsd-path-define/scripts/_common.py +5 -0
  199. package/skills/gsd-path-define/scripts/archive_milestone.py +2171 -0
  200. package/skills/gsd-path-define/scripts/build_recovery.py +292 -0
  201. package/skills/gsd-path-define/scripts/check_handoffs.py +7 -1
  202. package/skills/gsd-path-define/scripts/check_task_briefs.py +3 -0
  203. package/skills/gsd-path-define/scripts/detect_project.py +22 -3
  204. package/skills/gsd-path-define/scripts/discussion_records.py +3 -0
  205. package/skills/gsd-path-define/scripts/discussion_validate.py +1326 -0
  206. package/skills/gsd-path-define/scripts/integration.py +1459 -0
  207. package/skills/gsd-path-define/scripts/isolation.py +24 -6
  208. package/skills/gsd-path-define/scripts/loop_run.py +839 -0
  209. package/skills/gsd-path-define/scripts/model_policy.py +279 -0
  210. package/skills/gsd-path-define/scripts/path_config.py +248 -0
  211. package/skills/gsd-path-define/scripts/pipeline_git.py +3 -0
  212. package/skills/gsd-path-define/scripts/pipeline_state.py +117 -186
  213. package/skills/gsd-path-define/scripts/promote_lookahead.py +286 -0
  214. package/skills/gsd-path-define/scripts/review_panel.py +564 -0
  215. package/skills/gsd-path-define/scripts/roadmap.py +326 -0
  216. package/skills/gsd-path-define/scripts/state_checkpoint.py +114 -72
  217. package/skills/gsd-path-define/scripts/state_promote.py +47 -44
  218. package/skills/gsd-path-define/scripts/worktree_paths.py +94 -0
  219. package/skills/gsd-path-discuss/SKILL.md +2 -0
  220. package/skills/gsd-path-discuss/references/runtime-selection.md +25 -0
  221. package/skills/gsd-path-discuss/scripts/_common.py +5 -0
  222. package/skills/gsd-path-discuss/scripts/discussion_records.py +3 -0
  223. package/skills/gsd-path-discuss/scripts/loop_run.py +839 -0
  224. package/skills/gsd-path-discuss/scripts/model_policy.py +279 -0
  225. package/skills/gsd-path-discuss/scripts/path_config.py +248 -0
  226. package/skills/gsd-path-discuss/scripts/review_panel.py +564 -0
  227. package/skills/gsd-path-discuss/scripts/worktree_paths.py +94 -0
  228. package/skills/gsd-path-docs-audit/SKILL.md +2 -0
  229. package/skills/gsd-path-docs-audit/references/dispatch.md +12 -19
  230. package/skills/gsd-path-docs-audit/references/docs-auditor.md +14 -0
  231. package/skills/gsd-path-docs-audit/references/model-policy.md +139 -0
  232. package/skills/gsd-path-docs-audit/references/runtime-selection.md +25 -0
  233. package/skills/gsd-path-docs-audit/scripts/_common.py +5 -0
  234. package/skills/gsd-path-docs-audit/scripts/archive_milestone.py +2171 -0
  235. package/skills/gsd-path-docs-audit/scripts/build_recovery.py +292 -0
  236. package/skills/gsd-path-docs-audit/scripts/check_docs_audit.py +7 -3
  237. package/skills/gsd-path-docs-audit/scripts/check_handoffs.py +7 -1
  238. package/skills/gsd-path-docs-audit/scripts/check_task_briefs.py +3 -0
  239. package/skills/gsd-path-docs-audit/scripts/detect_project.py +1536 -0
  240. package/skills/gsd-path-docs-audit/scripts/discussion_records.py +3 -0
  241. package/skills/gsd-path-docs-audit/scripts/discussion_validate.py +1326 -0
  242. package/skills/gsd-path-docs-audit/scripts/integration.py +1459 -0
  243. package/skills/gsd-path-docs-audit/scripts/isolation.py +24 -6
  244. package/skills/gsd-path-docs-audit/scripts/loop_run.py +839 -0
  245. package/skills/gsd-path-docs-audit/scripts/model_policy.py +279 -0
  246. package/skills/gsd-path-docs-audit/scripts/path_config.py +248 -0
  247. package/skills/gsd-path-docs-audit/scripts/pipeline_git.py +3 -0
  248. package/skills/gsd-path-docs-audit/scripts/pipeline_state.py +117 -186
  249. package/skills/gsd-path-docs-audit/scripts/promote_lookahead.py +286 -0
  250. package/skills/gsd-path-docs-audit/scripts/review_panel.py +564 -0
  251. package/skills/gsd-path-docs-audit/scripts/roadmap.py +326 -0
  252. package/skills/gsd-path-docs-audit/scripts/state_checkpoint.py +114 -72
  253. package/skills/gsd-path-docs-audit/scripts/state_promote.py +47 -44
  254. package/skills/gsd-path-docs-audit/scripts/worktree_paths.py +94 -0
  255. package/skills/gsd-path-forensics/SKILL.md +9 -5
  256. package/skills/gsd-path-forensics/references/runtime-selection.md +25 -0
  257. package/skills/gsd-path-forensics/scripts/_common.py +5 -0
  258. package/skills/gsd-path-forensics/scripts/discussion_records.py +3 -0
  259. package/skills/gsd-path-forensics/scripts/loop_run.py +839 -0
  260. package/skills/gsd-path-forensics/scripts/model_policy.py +279 -0
  261. package/skills/gsd-path-forensics/scripts/path_config.py +248 -0
  262. package/skills/gsd-path-forensics/scripts/pipeline_diagnose.py +15 -3
  263. package/skills/gsd-path-forensics/scripts/pipeline_undo.py +14 -7
  264. package/skills/gsd-path-forensics/scripts/review_panel.py +564 -0
  265. package/skills/gsd-path-forensics/scripts/worktree_paths.py +94 -0
  266. package/skills/gsd-path-inspect/SKILL.md +32 -8
  267. package/skills/gsd-path-inspect/references/dispatch.md +12 -19
  268. package/skills/gsd-path-inspect/references/docs-auditor.md +14 -0
  269. package/skills/gsd-path-inspect/references/model-policy.md +139 -0
  270. package/skills/gsd-path-inspect/references/runtime-selection.md +25 -0
  271. package/skills/gsd-path-inspect/scripts/__pycache__/_common.cpython-312.pyc +0 -0
  272. package/skills/gsd-path-inspect/scripts/_common.py +5 -0
  273. package/skills/gsd-path-inspect/scripts/archive_milestone.py +2171 -0
  274. package/skills/gsd-path-inspect/scripts/build_recovery.py +292 -0
  275. package/skills/gsd-path-inspect/scripts/check_docs_audit.py +7 -3
  276. package/skills/gsd-path-inspect/scripts/check_handoffs.py +7 -1
  277. package/skills/gsd-path-inspect/scripts/check_task_briefs.py +3 -0
  278. package/skills/gsd-path-inspect/scripts/detect_project.py +22 -3
  279. package/skills/gsd-path-inspect/scripts/discussion_records.py +3 -0
  280. package/skills/gsd-path-inspect/scripts/discussion_validate.py +1326 -0
  281. package/skills/gsd-path-inspect/scripts/integration.py +1459 -0
  282. package/skills/gsd-path-inspect/scripts/isolation.py +24 -6
  283. package/skills/gsd-path-inspect/scripts/loop_run.py +839 -0
  284. package/skills/gsd-path-inspect/scripts/model_policy.py +279 -0
  285. package/skills/gsd-path-inspect/scripts/path_config.py +248 -0
  286. package/skills/gsd-path-inspect/scripts/pipeline_git.py +3 -0
  287. package/skills/gsd-path-inspect/scripts/pipeline_state.py +117 -186
  288. package/skills/gsd-path-inspect/scripts/promote_lookahead.py +286 -0
  289. package/skills/gsd-path-inspect/scripts/review_panel.py +564 -0
  290. package/skills/gsd-path-inspect/scripts/roadmap.py +326 -0
  291. package/skills/gsd-path-inspect/scripts/state_checkpoint.py +114 -72
  292. package/skills/gsd-path-inspect/scripts/state_promote.py +47 -44
  293. package/skills/gsd-path-inspect/scripts/workflow_run.py +237 -0
  294. package/skills/gsd-path-inspect/scripts/worktree_paths.py +94 -0
  295. package/skills/gsd-path-loop/SKILL.md +2 -0
  296. package/skills/gsd-path-loop/references/runtime-selection.md +25 -0
  297. package/skills/gsd-path-loop/scripts/_common.py +5 -0
  298. package/skills/gsd-path-loop/scripts/discussion_records.py +3 -0
  299. package/skills/gsd-path-loop/scripts/loop_run.py +2 -0
  300. package/skills/gsd-path-loop/scripts/model_policy.py +279 -0
  301. package/skills/gsd-path-loop/scripts/path_config.py +248 -0
  302. package/skills/gsd-path-loop/scripts/review_panel.py +564 -0
  303. package/skills/gsd-path-loop/scripts/worktree_paths.py +94 -0
  304. package/skills/gsd-path-migrate/SKILL.md +2 -0
  305. package/skills/gsd-path-migrate/references/runtime-selection.md +25 -0
  306. package/skills/gsd-path-migrate/scripts/_common.py +185 -0
  307. package/skills/gsd-path-migrate/scripts/discussion_records.py +3 -0
  308. package/skills/gsd-path-migrate/scripts/loop_run.py +839 -0
  309. package/skills/gsd-path-migrate/scripts/model_policy.py +279 -0
  310. package/skills/gsd-path-migrate/scripts/path_config.py +248 -0
  311. package/skills/gsd-path-migrate/scripts/review_panel.py +564 -0
  312. package/skills/gsd-path-plan/SKILL.md +29 -19
  313. package/skills/gsd-path-plan/references/build-recovery.md +78 -0
  314. package/skills/gsd-path-plan/references/dispatch.md +12 -19
  315. package/skills/gsd-path-plan/references/model-policy.md +139 -0
  316. package/skills/gsd-path-plan/references/runtime-selection.md +25 -0
  317. package/skills/gsd-path-plan/scripts/__pycache__/_common.cpython-312.pyc +0 -0
  318. package/skills/gsd-path-plan/scripts/_common.py +5 -0
  319. package/skills/gsd-path-plan/scripts/archive_milestone.py +2171 -0
  320. package/skills/gsd-path-plan/scripts/build_recovery.py +292 -0
  321. package/skills/gsd-path-plan/scripts/check_handoffs.py +7 -1
  322. package/skills/gsd-path-plan/scripts/check_task_briefs.py +3 -0
  323. package/skills/gsd-path-plan/scripts/detect_project.py +1536 -0
  324. package/skills/gsd-path-plan/scripts/discussion_records.py +3 -0
  325. package/skills/gsd-path-plan/scripts/discussion_validate.py +1326 -0
  326. package/skills/gsd-path-plan/scripts/integration.py +1459 -0
  327. package/skills/gsd-path-plan/scripts/isolation.py +24 -6
  328. package/skills/gsd-path-plan/scripts/loop_run.py +839 -0
  329. package/skills/gsd-path-plan/scripts/model_policy.py +279 -0
  330. package/skills/gsd-path-plan/scripts/path_config.py +248 -0
  331. package/skills/gsd-path-plan/scripts/pipeline_git.py +3 -0
  332. package/skills/gsd-path-plan/scripts/pipeline_state.py +117 -186
  333. package/skills/gsd-path-plan/scripts/promote_lookahead.py +286 -0
  334. package/skills/gsd-path-plan/scripts/review_panel.py +11 -0
  335. package/skills/gsd-path-plan/scripts/roadmap.py +326 -0
  336. package/skills/gsd-path-plan/scripts/state_checkpoint.py +114 -72
  337. package/skills/gsd-path-plan/scripts/state_promote.py +47 -44
  338. package/skills/gsd-path-plan/scripts/workflow_run.py +128 -8
  339. package/skills/gsd-path-plan/scripts/worktree_paths.py +94 -0
  340. package/skills/gsd-path-plan/templates/task.md +2 -0
  341. package/skills/gsd-path-research/SKILL.md +5 -6
  342. package/skills/gsd-path-research/references/dispatch.md +12 -19
  343. package/skills/gsd-path-research/references/model-policy.md +139 -0
  344. package/skills/gsd-path-research/references/runtime-selection.md +25 -0
  345. package/skills/gsd-path-research/scripts/_common.py +5 -0
  346. package/skills/gsd-path-research/scripts/archive_milestone.py +2171 -0
  347. package/skills/gsd-path-research/scripts/build_recovery.py +292 -0
  348. package/skills/gsd-path-research/scripts/check_handoffs.py +7 -1
  349. package/skills/gsd-path-research/scripts/check_task_briefs.py +3 -0
  350. package/skills/gsd-path-research/scripts/detect_project.py +1536 -0
  351. package/skills/gsd-path-research/scripts/discussion_records.py +3 -0
  352. package/skills/gsd-path-research/scripts/discussion_validate.py +1326 -0
  353. package/skills/gsd-path-research/scripts/integration.py +1459 -0
  354. package/skills/gsd-path-research/scripts/isolation.py +24 -6
  355. package/skills/gsd-path-research/scripts/loop_run.py +839 -0
  356. package/skills/gsd-path-research/scripts/model_policy.py +279 -0
  357. package/skills/gsd-path-research/scripts/path_config.py +248 -0
  358. package/skills/gsd-path-research/scripts/pipeline_git.py +3 -0
  359. package/skills/gsd-path-research/scripts/pipeline_state.py +117 -186
  360. package/skills/gsd-path-research/scripts/promote_lookahead.py +286 -0
  361. package/skills/gsd-path-research/scripts/review_panel.py +564 -0
  362. package/skills/gsd-path-research/scripts/roadmap.py +326 -0
  363. package/skills/gsd-path-research/scripts/state_checkpoint.py +114 -72
  364. package/skills/gsd-path-research/scripts/state_promote.py +47 -44
  365. package/skills/gsd-path-research/scripts/worktree_paths.py +94 -0
  366. package/skills/gsd-path-roadmap/SKILL.md +24 -58
  367. package/skills/gsd-path-roadmap/references/dispatch.md +12 -19
  368. package/skills/gsd-path-roadmap/references/model-policy.md +139 -0
  369. package/skills/gsd-path-roadmap/references/runtime-selection.md +25 -0
  370. package/skills/gsd-path-roadmap/scripts/_common.py +5 -0
  371. package/skills/gsd-path-roadmap/scripts/archive_milestone.py +30 -124
  372. package/skills/gsd-path-roadmap/scripts/build_recovery.py +292 -0
  373. package/skills/gsd-path-roadmap/scripts/check_handoffs.py +7 -1
  374. package/skills/gsd-path-roadmap/scripts/check_task_briefs.py +3 -0
  375. package/skills/gsd-path-roadmap/scripts/detect_project.py +22 -3
  376. package/skills/gsd-path-roadmap/scripts/discussion_records.py +3 -0
  377. package/skills/gsd-path-roadmap/scripts/discussion_validate.py +8 -3
  378. package/skills/gsd-path-roadmap/scripts/integration.py +54 -28
  379. package/skills/gsd-path-roadmap/scripts/isolation.py +24 -6
  380. package/skills/gsd-path-roadmap/scripts/loop_run.py +839 -0
  381. package/skills/gsd-path-roadmap/scripts/model_policy.py +279 -0
  382. package/skills/gsd-path-roadmap/scripts/path_config.py +248 -0
  383. package/skills/gsd-path-roadmap/scripts/pipeline_git.py +3 -0
  384. package/skills/gsd-path-roadmap/scripts/pipeline_state.py +117 -186
  385. package/skills/gsd-path-roadmap/scripts/promote_lookahead.py +33 -162
  386. package/skills/gsd-path-roadmap/scripts/review_panel.py +11 -0
  387. package/skills/gsd-path-roadmap/scripts/roadmap.py +326 -0
  388. package/skills/gsd-path-roadmap/scripts/state_checkpoint.py +114 -72
  389. package/skills/gsd-path-roadmap/scripts/state_promote.py +47 -44
  390. package/skills/gsd-path-roadmap/scripts/worktree_paths.py +94 -0
  391. package/skills/gsd-path-ship/SKILL.md +29 -17
  392. package/skills/gsd-path-ship/references/dispatch.md +12 -19
  393. package/skills/gsd-path-ship/references/jev-review.md +82 -0
  394. package/skills/gsd-path-ship/references/model-policy.md +139 -0
  395. package/skills/gsd-path-ship/references/reviewer-final.md +21 -0
  396. package/skills/gsd-path-ship/references/reviewer-panel.md +17 -0
  397. package/skills/gsd-path-ship/references/reviewer-skeptic.md +20 -0
  398. package/skills/gsd-path-ship/references/reviewer-wave.md +89 -0
  399. package/skills/gsd-path-ship/references/reviewer.md +12 -148
  400. package/skills/gsd-path-ship/references/runtime-selection.md +25 -0
  401. package/skills/gsd-path-ship/scripts/__pycache__/_common.cpython-312.pyc +0 -0
  402. package/skills/gsd-path-ship/scripts/_common.py +5 -0
  403. package/skills/gsd-path-ship/scripts/archive_milestone.py +30 -124
  404. package/skills/gsd-path-ship/scripts/build_recovery.py +292 -0
  405. package/skills/gsd-path-ship/scripts/build_state.py +2 -0
  406. package/skills/gsd-path-ship/scripts/check_handoffs.py +7 -1
  407. package/skills/gsd-path-ship/scripts/check_task_briefs.py +3 -0
  408. package/skills/gsd-path-ship/scripts/detect_project.py +1536 -0
  409. package/skills/gsd-path-ship/scripts/discussion_records.py +3 -0
  410. package/skills/gsd-path-ship/scripts/discussion_validate.py +8 -3
  411. package/skills/gsd-path-ship/scripts/integration.py +54 -28
  412. package/skills/gsd-path-ship/scripts/isolation.py +24 -6
  413. package/skills/gsd-path-ship/scripts/jev_review.py +138 -0
  414. package/skills/gsd-path-ship/scripts/lean_verification.py +3 -1
  415. package/skills/gsd-path-ship/scripts/loop_run.py +839 -0
  416. package/skills/gsd-path-ship/scripts/model_policy.py +279 -0
  417. package/skills/gsd-path-ship/scripts/path_config.py +248 -0
  418. package/skills/gsd-path-ship/scripts/pipeline_git.py +3 -0
  419. package/skills/gsd-path-ship/scripts/pipeline_state.py +117 -186
  420. package/skills/gsd-path-ship/scripts/promote_lookahead.py +286 -0
  421. package/skills/gsd-path-ship/scripts/review_panel.py +11 -0
  422. package/skills/gsd-path-ship/scripts/roadmap.py +326 -0
  423. package/skills/gsd-path-ship/scripts/state_checkpoint.py +114 -72
  424. package/skills/gsd-path-ship/scripts/state_promote.py +47 -44
  425. package/skills/gsd-path-ship/scripts/workflow_run.py +128 -8
  426. package/skills/gsd-path-ship/scripts/worktree_paths.py +94 -0
  427. package/skills/gsd-path-ship/templates/wave-review.md +1 -1
  428. package/skills/gsd-path-undo/SKILL.md +2 -0
  429. package/skills/gsd-path-undo/references/runtime-selection.md +25 -0
  430. package/skills/gsd-path-undo/scripts/_common.py +5 -0
  431. package/skills/gsd-path-undo/scripts/discussion_records.py +3 -0
  432. package/skills/gsd-path-undo/scripts/loop_run.py +839 -0
  433. package/skills/gsd-path-undo/scripts/model_policy.py +279 -0
  434. package/skills/gsd-path-undo/scripts/path_config.py +248 -0
  435. package/skills/gsd-path-undo/scripts/pipeline_undo.py +14 -7
  436. package/skills/gsd-path-undo/scripts/review_panel.py +564 -0
  437. package/skills/gsd-path-undo/scripts/worktree_paths.py +94 -0
  438. package/skills/path/BUILD.md +54 -575
  439. package/skills/path/DECIDE.md +4 -6
  440. package/skills/path/DEFINE.md +23 -21
  441. package/skills/path/DOCS-AUDIT.md +2 -0
  442. package/skills/path/INSPECT.md +32 -8
  443. package/skills/path/PLAN.md +29 -19
  444. package/skills/path/RESEARCH.md +5 -6
  445. package/skills/path/ROADMAP.md +24 -58
  446. package/skills/path/SHIP.md +29 -17
  447. package/skills/path/SKILL.md +46 -22
  448. package/skills/path/references/build-abandon.md +33 -0
  449. package/skills/path/references/build-native.md +502 -0
  450. package/skills/path/references/build-recovery.md +78 -0
  451. package/skills/path/references/coder.md +8 -3
  452. package/skills/path/references/config.md +57 -0
  453. package/skills/path/references/dispatch.md +12 -19
  454. package/skills/path/references/docs-auditor.md +14 -0
  455. package/skills/path/references/jev-review.md +82 -0
  456. package/skills/path/references/model-policy.md +139 -0
  457. package/skills/path/references/reviewer-final.md +21 -0
  458. package/skills/path/references/reviewer-panel.md +17 -0
  459. package/skills/path/references/reviewer-skeptic.md +20 -0
  460. package/skills/path/references/reviewer-wave.md +89 -0
  461. package/skills/path/references/reviewer.md +12 -148
  462. package/skills/path/references/runtime-selection.md +25 -0
  463. package/skills/path/scripts/_common.py +5 -0
  464. package/skills/path/scripts/archive_milestone.py +30 -124
  465. package/skills/path/scripts/bootstrap_repository.py +33 -4
  466. package/skills/path/scripts/build_recovery.py +292 -0
  467. package/skills/path/scripts/build_state.py +2 -0
  468. package/skills/path/scripts/check_docs_audit.py +7 -3
  469. package/skills/path/scripts/check_handoffs.py +7 -1
  470. package/skills/path/scripts/check_task_briefs.py +3 -0
  471. package/skills/path/scripts/detect_project.py +22 -3
  472. package/skills/path/scripts/discussion_records.py +3 -0
  473. package/skills/path/scripts/discussion_validate.py +8 -3
  474. package/skills/path/scripts/dispatch_driver.py +233 -22
  475. package/skills/path/scripts/git_guard.py +768 -0
  476. package/skills/path/scripts/integration.py +54 -28
  477. package/skills/path/scripts/isolation.py +24 -6
  478. package/skills/path/scripts/jev_review.py +138 -0
  479. package/skills/path/scripts/lean_verification.py +3 -1
  480. package/skills/path/scripts/loop_run.py +2 -0
  481. package/skills/path/scripts/model_policy.py +279 -0
  482. package/skills/path/scripts/path_config.py +248 -0
  483. package/skills/path/scripts/pipeline_git.py +3 -0
  484. package/skills/path/scripts/pipeline_state.py +117 -186
  485. package/skills/path/scripts/promote_lookahead.py +33 -162
  486. package/skills/path/scripts/review_panel.py +11 -0
  487. package/skills/path/scripts/roadmap.py +326 -0
  488. package/skills/path/scripts/state_checkpoint.py +114 -72
  489. package/skills/path/scripts/state_promote.py +47 -44
  490. package/skills/path/scripts/status_runtime.py +208 -0
  491. package/skills/path/scripts/task_context.py +73 -0
  492. package/skills/path/scripts/token_budget.py +40 -1
  493. package/skills/path/scripts/workflow_run.py +128 -8
  494. package/skills/path/scripts/worktree_paths.py +94 -0
  495. package/skills/path/templates/skeptic.md +1 -1
  496. package/skills/path/templates/task.md +2 -0
  497. package/skills/path/templates/wave-panel.md +1 -1
  498. package/skills/path/templates/wave-review.md +1 -1
@@ -0,0 +1,502 @@
1
+ # Native dispatch and build recovery
2
+
3
+ Read only when no owner-supplied child command exists, a driver receipt requires
4
+ manual recovery, or the wave uses verify-only review. Entry and bookkeeping
5
+ preconditions remain in the build skill. Do not repeat a proven driver step.
6
+
7
+ ## Wave loop
8
+
9
+ For each `## Wave N` in PLAN.md order (a wave's tasks are the task files whose
10
+ `wave` equals N):
11
+
12
+ **Dispatch driver.** Steps 1–5 below are deterministic, and the bundled
13
+ `scripts/dispatch_driver.py` runs them: recover, settle exited coders, the
14
+ bookkeeping checkpoint, `ready`, brief lint, `prepare-task`, `activate-task`,
15
+ one child per ready task, then Verify in the isolate, Log append, `land`,
16
+ `verify-record`, and `retire` in task-id order. Prefer it whenever the owner
17
+ supplies a child command (a headless CLI that reads the brief on stdin, for
18
+ example `claude -p --output-format json ...` or `codex exec --json ...`; the
19
+ owner's flags own the child's permissions):
20
+
21
+ ```text
22
+ python3 <absolute dispatch_driver.py> round --repo <absolute primary> --wave <N> \
23
+ --child-command '<owner command>' [--wait <owner seconds>] \
24
+ [--child-timeout <owner seconds>]
25
+ ```
26
+
27
+ `round` owns the entry transition described in Preconditions and branch
28
+ binding, checkpointed as `build: start milestone`, and sets `build/blocked`
29
+ on a dependency deadlock or a blocked
30
+ recovery; every other stop stays with the parent. Act only on its receipt:
31
+ `done` means every wave task landed — run
32
+ `review --wave <N> --cycle <C> --child-command '<owner command>' [--wait
33
+ <owner seconds>]` for step 6 at `full` or `deep` depth: it records the clean
34
+ review base, creates one verify sidecar per lens, briefs one reviewer child
35
+ per lens with every task's base and landing commit, validates each file in
36
+ its sidecar, copies it to the canonical path, retires the sidecar, and only
37
+ after every lens settles concludes: a passing cycle with no panel is
38
+ checkpointed; with a panel configured (`panel_required: true`) run `panel
39
+ --wave <N> --cycle <C> --advertised <slugs> [--parent-slug <slug>]
40
+ --child-command '<owner command>'`, using the
41
+ [model-policy CLI contract](model-policy.md#cli-lifecycle). The panel command
42
+ resolves membership,
43
+ persists a skipped receipt or runs one panelist per family in its own
44
+ sidecar, merges the family files, and makes the single on-pass checkpoint;
45
+ `blocked` returns the `review_findings.py collect` grouping; when its
46
+ `skeptic_groups` is non-empty, `skeptics --wave <N> --cycle <C>
47
+ --child-command '<owner command>'` runs one read-only skeptic per locator in
48
+ its own sidecar at the review base, validates and collects each file, and
49
+ reruns the helper; then `fix-tasks --wave <N> --cycle <C>` writes one
50
+ lint-clean fix task per batch carrying the failed criteria and observations
51
+ verbatim, or returns `escalate` for structural blockers, skeptic groups, the
52
+ cycle cap, or an all-refuted ruling, which stay with step 7 and the user.
53
+ The driver never writes a `verify-only` file (`status: not-applicable`);
54
+ `in-flight` means call `round` again; `question` means answer from the
55
+ approved artifacts or the user, record it with `answer --task-id <id>
56
+ --answer '<answer> — <citation>'`, and call `round` again, which redispatches
57
+ the retained isolate; `blocked` names the task, reason, and output and leaves
58
+ an existing isolate in place. A model-selection rejection before launch creates
59
+ no isolate; follow the [model-policy contract](model-policy.md). For other
60
+ blocks, apply the recovery, retry, or plan-defect procedure in
61
+ steps 1–2 by hand, then call `round` again. The driver counts dispatches per
62
+ task per milestone and stops at `--max-attempts` (default 2: the first
63
+ dispatch plus this contract's one logged redispatch); owner token limits, when
64
+ supplied, gate every dispatch through the milestone's budget ledger. Do not repeat a step the receipt
65
+ already proves. Without a child command, dispatch through the runtime
66
+ dispatch contract and perform steps 1–5 by hand.
67
+
68
+ 1. **Recover before dispatch.** Run `python3 <absolute isolation.py> recover
69
+ --repo <absolute primary>`. It is read-only and proves every `done` task's
70
+ landing commit from its exact stamped base (first-parent scan for
71
+ `<task-id>: <task title>`, body `Task:`/`Base:`/`Files:`, the base task's
72
+ declared path allow-list from the task file at that base, exact landing
73
+ metadata, append-only task-file body, and
74
+ patch equality with a retained task branch). Pending and `in-progress`
75
+ tasks bypass landing-history proof and report retained resume state or
76
+ `none`; failed and blocked tasks with retained isolation report
77
+ `reconcile`. Act only on its verdicts;
78
+ do not re-derive them in prose, rerun Verify on a proven commit, use an
79
+ unanchored log grep, infer a SHA from `done`, or reset unknown work.
80
+ - `attested`: an owner ruling stands in for the landing commit (see the
81
+ block escalation below); treat it as landed and never redispatch.
82
+ - `recovered`: the task is landed (`land` already stamped `status: done`
83
+ and `base`). Retire a still-present task worktree with `isolation.py
84
+ retire` only when the report shows it present, clean, and on the task
85
+ branch. If only `task_branch` remains, finish its proven interrupted
86
+ retirement with `retire --branch <task_branch> --force --landed-commit
87
+ <commit>`; both absent is valid.
88
+ - `resume`: continue from the returned `base`, `task_branch`, and worktree
89
+ (the primary itself when no task branch exists); when the report shows
90
+ the worktree absent, return the task to `pending` only when ownership is
91
+ clear. When `dispatch_retry` is true, reuse the returned clean isolate,
92
+ write fresh dispatch metadata and agent there, then dispatch; do not
93
+ recreate it. When `landing_retry` is true, do not resume implementation
94
+ or redispatch; rerun `land` against the returned isolate and base.
95
+ - `reconcile`: do not resume implementation. Preserve the returned isolate
96
+ evidence and follow the failed/blocked reconciliation in step 2.
97
+ - `block` on a `done` task with reason `done but no landing commit proves
98
+ it` or `done task has invalid base`: the work was committed outside
99
+ `land`. Never repair history or task frontmatter by hand. Set
100
+ `build/blocked`, present **Outcome** naming every such task, and ask the
101
+ user for a ruling per task; put any suggested ruling text in its own
102
+ fenced code block so it pastes cleanly. On an explicit ruling, run that task's Verify
103
+ at HEAD, record it with `python3 <absolute build_state.py> verify-record
104
+ --repo <absolute primary> --command <task Verify> --commit <HEAD>
105
+ --result pass`, then run `python3 <absolute isolation.py> attest --repo
106
+ <absolute primary> --task-file <task file> --ruling <ruling verbatim>`
107
+ (add `--base <SHA>` only to repair an abbreviated or invalid recorded
108
+ base). The helper stamps the task and creates the attestation commit
109
+ itself; each one moves HEAD, so attest tasks one at a time and rerun
110
+ `recover` afterwards.
111
+ - Rewritten lineage: when every `done` task is rejected with `commit does
112
+ not descend from its Base:` after a rebase or replay, the owner may run
113
+ `python3 <absolute isolation.py> adopt-rebase --repo <absolute primary>
114
+ --original-head <preserved original tip> --head <HEAD> --ruling
115
+ "<ruling verbatim>"`, commit the receipt
116
+ `.project/build/rebase-adoption.json` as `.project/` bookkeeping, and
117
+ rerun `recover`. The original lineage must stay reachable: keep a local
118
+ branch on the old tip until the milestone ships. Adopted tasks report
119
+ `attested` with `provenance: owner-authorized-rebase`.
120
+ - `block` for any other reason: set `build/blocked` with the returned
121
+ reason and stop.
122
+ - `none`: take no recovery action for that task.
123
+
124
+ 2. **Prepare the ready set.** Run `python3 <absolute build_state.py> ready
125
+ --repo <absolute primary>`. It is read-only: it validates every task's
126
+ frontmatter against its dispatch metadata and the recovery report, then
127
+ returns `ready` — the current wave's `pending` tasks whose dependencies are
128
+ all `done`, each with `id`, `title`, `deps`, `files`, `task_file`, and
129
+ `verify_heavy` — after proving that ready and `in-progress` tasks have
130
+ disjoint `files`. Dispatch exactly the tasks it returns; do not select,
131
+ order, or overlap-check tasks in prose. Readiness is continuous, not
132
+ layered: a task becomes selectable the moment its last dependency lands,
133
+ even while unrelated tasks still run, so rerun `ready` after each landing.
134
+ A `NEEDS-ORCHESTRATOR` block stays unselectable until its `Orchestrator
135
+ answer` is recorded in the task Log and the task is back to `pending`.
136
+ Its typed errors are the recovery rule:
137
+ - `task-recovery-required`: for each listed failed or blocked task run
138
+ `python3 <absolute build_state.py> reconcile --repo <absolute primary>
139
+ --task-id <id>` and act on its `classification`. `proven-landed`: the
140
+ task already landed at `landed_commit` and its frontmatter is stale —
141
+ reconcile the task file to that landed state and checkpoint it.
142
+ `resumable` or `reconcile`: apply the retry procedure below with the
143
+ returned `history.candidates` as the rejected evidence. `blocked`: set
144
+ `build/blocked` with the returned `reasons` and stop.
145
+ - `dependency-deadlock`: set `build/blocked` with its `tasks` list and stop.
146
+ - `ready-file-overlap` or `invalid-task-state`: a documented plan defect or
147
+ drifted bookkeeping; repair it before a new clean base.
148
+ A documented plan
149
+ defect may be repaired against INTENT.md and SYNTHESIS.md and logged before
150
+ a new clean base. A repair edits only the fields the lint or ruling named
151
+ in the tasks it named — `files`, Verify, Interface contract text, Intent
152
+ coverage rows, an ambiguous AC. It never adds, removes, splits, merges, or
153
+ renames tasks, moves a task between waves, or rewrites another task's
154
+ acceptance criteria; a defect that needs any of those sets `build/blocked`
155
+ with the lint output and follows [build recovery](build-recovery.md) to
156
+ plan, which owns the task inventory.
157
+ A user ruling that changes a success criterion,
158
+ constraint, or veto is not a plan defect: set `build/blocked`, do not
159
+ rewrite the AC, and follow [build recovery](build-recovery.md) to
160
+ `$gsd-path-define` to append INTENT.md
161
+ `## Corrections` before plan re-gates. A task Log is not that record. One failed implementation gets one logged redispatch when
162
+ its contract remains valid. Repeated failure, ambiguous ownership, a user
163
+ ruling, or a dependency deadlock sets build state to `blocked` and stops.
164
+ Concurrent tasks must have disjoint `files`; serialize overlapping fix
165
+ tasks. A retry never reuses a rejected dirty worktree: first copy its
166
+ validated append-only task Log delta into the primary task file, record the
167
+ rejected diff's exact path set and hash, and checkpoint the block bookkeeping.
168
+ After confirming every old change is task-owned, retire that exact worktree
169
+ with `python3 <absolute isolation.py> retire --repo <absolute primary>
170
+ --worktree <path> --branch <task_branch> --force --task-file <task path>`,
171
+ then create the retry. If retirement was interrupted after removing the
172
+ worktree, rerun the same command; the recorded failed or blocked task and
173
+ its exact base prove the remaining branch before deletion. Create the retry
174
+ from the new clean primary HEAD. After
175
+ resolving a recoverable `build/blocked` condition, use
176
+ `pipeline_state.py transition` with the blocked state and bound branch as
177
+ expected fields to set `build/active` and log the resolution. Checkpoint it
178
+ through the bookkeeping rule before recording that new dispatch-round base.
179
+
180
+ 3. **Isolate every task.** Checkpoint pending bookkeeping through the rule
181
+ above, then record clean `HEAD` as
182
+ this dispatch round's base — tasks dispatched in the same round share it;
183
+ a later round unlocked by fresh landings records the later HEAD — and
184
+ lint every ready task's brief with the bundled
185
+ `scripts/check_task_briefs.py --repo <absolute repo root> --base <recorded
186
+ base>` and re-check Intent coverage with
187
+ `python3 <absolute check_handoffs.py> plan --repo <absolute repo root>`
188
+ before creating any worktree; a lint or coverage failure is a documented plan
189
+ defect — repair it against INTENT.md and SYNTHESIS.md, then re-establish
190
+ the base. Then isolate each ready task with
191
+ `python3 <absolute workflow_run.py> prepare-task --repo <absolute primary>
192
+ --expected-head <recorded base> --task-id <id> --round-size <N>` where N is the
193
+ number of tasks in this dispatch round. Serial (`N=1`) returns the primary
194
+ worktree and `task_branch: null` — the coder works on the bound branch.
195
+ The runner also creates a named verification sidecar at this clean base
196
+ before dispatch. Retain both helper results in the dispatch evidence.
197
+ Parallel (`N>=2`) creates a named `gsd-path-task/<id>` branch and linked
198
+ worktree at that base; never a detached HEAD. Record dispatch through
199
+ `python3 <absolute isolation.py> activate-task --repo <returned worktree>
200
+ --base <recorded base> --task-id <id> --agent build_<id> --task-file
201
+ <exact selected task-file path> [--task-branch <returned task_branch>]`.
202
+ The helper sets `base`, `worktree`, `task_branch`, `status: in-progress`,
203
+ and `agent` in the isolated task and records parallel build authorization.
204
+ Do not edit those fields directly. Do not commit this dispatch state: it lands
205
+ inside the task's own commit, and `recover` derives it from the task
206
+ branch and worktree meanwhile. The primary stays clean during a parallel
207
+ round. Do not append a dispatch Log entry: the isolated task later appends
208
+ at that location, and two parallel appends make the cherry-pick ambiguous. Reuse a retained worktree only when
209
+ its recorded base, branch, and task agree exactly.
210
+
211
+ 4. **Dispatch the round.** Following the local runtime dispatch contract,
212
+ spawn one implementation-capable child per task with deterministic logical
213
+ task name `build_<task_id>`.
214
+ Its brief contains the absolute isolated-worktree root, coder role, task
215
+ file, task template, and the absolute INTENT.md path in that worktree.
216
+ Generate the coder's intent view with `python3 <absolute task_context.py>
217
+ --repo <absolute isolated-worktree> --task <absolute task file>` and include
218
+ its output in the brief. The helper preserves all global rules and falls
219
+ back to full intent when projection is ambiguous. Never summarize it by hand.
220
+ Add no hidden implementation context; repair a
221
+ defective task contract before establishing the round base. Run ready work
222
+ up to capacity. Verify commands marked `Heavy: yes` (`verify_heavy` in the
223
+ ready set) run one at a time across every concurrent task, including the
224
+ step 5 rerun; light ones are unconstrained. Do not wait for the whole
225
+ round before unlocking dependents: each task landing in step 5 re-opens
226
+ step 2, and a newly ready
227
+ task dispatches in a fresh round at the current clean HEAD while unrelated
228
+ tasks still run. The wave advances to review only when every wave task is
229
+ `done`.
230
+
231
+ 5. **Verify and land serially as results arrive.** A coder returns only
232
+ `ready` or `blocked`; it never owns frontmatter or Git. Process each
233
+ completion when it lands — never wait for slower in-flight tasks first;
234
+ when several results wait, land them in task-id order.
235
+
236
+ - For `ready`, compare the complete worktree diff to `base`. Permit only
237
+ declared `files` plus append-only Log changes in that task file. Include
238
+ additions, deletions, renames, and binary changes; an unexpected path
239
+ blocks before any product commit.
240
+ - For a returned `ready` coder, run `python3 <absolute dispatch_driver.py>
241
+ finish --repo <absolute primary> --task-id <id>`. This action works with
242
+ native child tools; no child command is needed. It reproduces serial work
243
+ in its prepared sidecar, runs authoritative Verify, records exact output,
244
+ lands through `isolation.py`, records eligible ledger evidence, and retires
245
+ the isolate. A `landed` receipt proves those steps; do not run them again
246
+ or author another implementation narrative. A blocked receipt preserves
247
+ its failure evidence and follows the recovery rule, never a manual bypass.
248
+ Keep the pre-finish declared-path check above. Each landing re-opens step 2
249
+ so ready dependents can run while unrelated children remain in flight.
250
+ - A block whose Log delta leads with `NEEDS-ORCHESTRATOR:` is a contract
251
+ question, not a failure. When the approved artifacts (PLAN.md,
252
+ INTENT.md, SYNTHESIS.md, and the Interface contracts of every involved
253
+ task) pin exactly one answer, append `Orchestrator answer: <answer> —
254
+ <artifact citation>` to the task Log, return the task to `pending`,
255
+ checkpoint the bookkeeping, and let a later layer redispatch it; a question
256
+ redispatch never consumes the failed-implementation redispatch. When the
257
+ runtime's structured layer exposes a blocking ask/reply channel, relay
258
+ the answer through it with the worker held alive per the runtime
259
+ dispatch contract instead of redispatching. A dispatch-driver question
260
+ keeps the isolate active: record the answer with `dispatch_driver.py
261
+ answer`, and the next `round` redispatches that same isolate. When
262
+ the artifacts admit more than one reading, ask the user through an
263
+ interactive user-input tool when available, record the ruling verbatim
264
+ as the answer, and repair the task contract as a documented plan defect
265
+ when the ruling changes it — except a ruling that changes a success
266
+ criterion, constraint, or veto, which follows the define-Corrections
267
+ path above. A question block creates no product commit
268
+ and preserves the isolated worktree under the same retirement rule. Before
269
+ changing its canonical bookkeeping, revoke a parallel isolate's active
270
+ dispatch with `python3 <absolute isolation.py> deactivate-task --repo
271
+ <isolated worktree> --task-id <id> --task-branch <task_branch>`.
272
+ - A blocked report, invalid diff, or failed Verify creates no product
273
+ commit. Validate and copy the isolated task's append-only Log delta once;
274
+ it is the coder's sole block/implementation narrative. Add orchestrator
275
+ evidence only for a distinct diff or Verify rejection. Before changing the
276
+ task to `blocked` or `failed`, revoke a parallel isolate's active dispatch
277
+ with `python3 <absolute isolation.py> deactivate-task
278
+ --repo <isolated worktree> --task-id <id> --task-branch <task_branch>`.
279
+ Then update and checkpoint the bookkeeping and apply the recovery
280
+ rule. Preserve the isolated worktree unless and until the explicit clean
281
+ retry-retirement procedure in step 2 owns and removes it.
282
+
283
+ 6. **Review the wave.** The build orchestrator owns wave reviews; ship never
284
+ runs them. Only after every wave task is done, read the wave's
285
+ `Review depth` from PLAN.md (default `full`). At `full` or `deep` the
286
+ dispatch driver's `review` action performs the sidecar, brief, validate,
287
+ collect, and retire work of this step; perform it by hand only without a
288
+ child command.
289
+ - `full`: spawn one independent reviewer using deterministic logical task
290
+ name `review_wave_<wave>_cycle_<cycle>`. Supply every task path, its
291
+ recorded base and proven landing commit, the reviewer role, and
292
+ wave-review template, and the absolute INTENT.md path.
293
+ When INTENT selects quick lane and PLAN has one full wave, also assign
294
+ final scope: supply PLAN.md's Surface contract and the recorded review HEAD.
295
+ The same reviewer checks all success criteria and any remaining walkthrough
296
+ in this pass, records `Review scope: final` and `Reviewed HEAD`, and adds
297
+ Surface/Check/Observed fields to each surface criterion. Reuse recorded
298
+ command evidence when it already proves the named walkthrough; execute
299
+ only missing checks. Ship can then derive FINAL.md without another reviewer.
300
+ Record current clean primary HEAD as the review collection base. Create
301
+ a fresh review sidecar there; the serial task verification sidecar belongs
302
+ to the earlier task base and cannot be collected after landing.
303
+ Use `python3 <absolute isolation.py> isolate-verify --repo <absolute primary>
304
+ --base <recorded review base> --name wave-<N>-cycle-<C>`. Each task's
305
+ recorded base and landing commit still define its isolated review diff.
306
+ Keep primary HEAD fixed until collection completes. Brief the
307
+ recorded isolated Verify output per task (the Log entry the
308
+ orchestrator appended at landing). The reviewer must not re-run that
309
+ command or PLAN.md's project Verify. The reviewer
310
+ stages `.project/review/wave-N.cycleC.md` there; the
311
+ orchestrator validates it, atomically copies it to the primary canonical
312
+ path, and only then retires that sidecar with `retire`.
313
+ - `deep`: spawn two independent reviewers in parallel, each with a fresh
314
+ isolated context and its own verify sidecar from `isolate-verify` at the
315
+ recorded review base (`--name wave-<N>-cycle-<C>-contract` and
316
+ `wave-<N>-cycle-<C>-adversarial`). Supply both every task path, its
317
+ recorded base and proven landing commit, the reviewer role, and the
318
+ wave-review template, and the absolute INTENT.md path. The contract lens —
319
+ logical task name `review_wave_<wave>_cycle_<cycle>_contract` — does the
320
+ full review: apply each task's `commit^..commit` product patch to the
321
+ recorded base, check the recorded Verify plus the isolated diff, and
322
+ check every acceptance criterion,
323
+ owned INTENT success criterion, and interface contract. The adversarial
324
+ lens — logical task name
325
+ `review_wave_<wave>_cycle_<cycle>_adversarial` — tries to kill the work:
326
+ security holes, unhandled edge cases, failure modes, data-loss and
327
+ concurrency risks, and missing error handling. Each stages its own file
328
+ in its own worktree — `.project/review/wave-N.cycleC.contract.md` and
329
+ `.project/review/wave-N.cycleC.adversarial.md`; the orchestrator validates
330
+ each, atomically copies both to their primary canonical paths, and only
331
+ then retires those sidecars. The wave passes only when both lenses
332
+ return `pass`; any `blocked` lens blocks the wave, and both files'
333
+ findings feed the fix-task batching in step 7.
334
+ - A review file is written only during that cycle, at that cycle's recorded
335
+ base, by the writer the selected depth names: a dispatched reviewer at
336
+ `full` or `deep`, or the orchestrator at `verify-only`. Never backfill,
337
+ split, rename, or reconstruct a review file for a cycle that already ran,
338
+ and never write a placeholder verdict for a task that did not exist at
339
+ that cycle. A missing or non-canonical earlier artifact is reported to
340
+ the user; the
341
+ only repair is a new review cycle at the current HEAD, which counts
342
+ toward the cap.
343
+ - `verify-only`: spawn no reviewer. The orchestrator writes
344
+ `.project/review/wave-N.cycleC.md` itself from evidence it already
345
+ holds — per task, the Verify evidence and the declared-files diff
346
+ check — recording `Depth: verify-only`. Same command, same commit
347
+ reuses the recorded pass: the task's Verify evidence is the ledger
348
+ entry when `python3 <absolute build_state.py> verify-lookup --repo
349
+ <absolute primary> --command <task Verify> --commit <landed commit>`
350
+ returns `reuse: true`; otherwise run the command in an
351
+ `isolate-verify --historical-task <task id>` sidecar at that commit, record it with
352
+ `verify-record`, and use that result. A re-review after a fix cycle
353
+ follows the same rule. It checks each acceptance
354
+ criterion and each INTENT success criterion owned by the wave's tasks
355
+ against that evidence and the diff; anything it cannot
356
+ confirm from them is a finding, not a pass. Never spawn a review panel
357
+ at `verify-only`.
358
+ - After the canonical reviewer (or orchestrator-written
359
+ `verify-only` file) is collected, run the optional review panel only
360
+ for `full` and `deep`. Inspect advertised model slugs and run
361
+ `python3 <absolute review_panel.py> resolve --plan <absolute PLAN.md>
362
+ --intent <absolute INTENT.md> --advertised <comma slugs>
363
+ --parent-slug <current model slug when known>
364
+ --exclude-family <known canonical-reviewer family>`; repeat
365
+ `--exclude-family` for every known parent and canonical-reviewer family,
366
+ including all deep review lenses, before persisting the roster. Omit
367
+ unknown identities. Also pass `--charter
368
+ <absolute .project/CHARTER.md>` when that file exists. `status: off`
369
+ continues with no current-cycle panel artifact. For `skipped`,
370
+ persist the helper's exact JSON stdout as
371
+ `.project/review/wave-N.cycleC.panel.skipped.json` and continue without
372
+ a panel; do not translate or summarize the receipt. Exit 2 / `error`
373
+ blocks the wave. `ready` requires that skipped-receipt path to be absent,
374
+ then spawns one child per selected family with
375
+ logical task name `review_wave_<wave>_cycle_<cycle>_panel_<family>`,
376
+ the reviewer role in wave-panel mode, the wave-panel template, and the
377
+ exact helper-returned model slug when the host advertises model
378
+ selection. On `deep`, each panel brief is the adversarial lens only.
379
+ Resolve model choices through the dispatch model-policy contract. Each child stages
380
+ its family file in its own verify sidecar from `isolate-verify`
381
+ (`--name wave-<N>-cycle-<C>-panel-<family>`); the parent validates
382
+ those files and runs `python3 <absolute review_panel.py> merge --kind
383
+ wave --wave <N> --cycle <C> --inputs <family files> --output
384
+ <absolute .project/review/wave-N.cycleC.panel.md> --mode
385
+ <detected|named>`. The canonical reviewer remains the only Wave verdict.
386
+ Do not average panel findings into that verdict or auto-create fix
387
+ tasks from preference findings.
388
+ - After the canonical reviewer file (and each deep lens file) is
389
+ on the primary path, run
390
+ `python3 <absolute check_handoffs.py> wave --repo <absolute primary>
391
+ --review <canonical wave-review path>`. A non-zero exit is a blocked
392
+ wave, not a pass, including `verify-only`. Do not advance on helper
393
+ failure.
394
+
395
+ 7. **Fix or advance.** A valid canonical `pass` advances unless an
396
+ actionable review-panel finding is waiting for a user ruling. On
397
+ `blocked`, run `python3 <absolute review_findings.py> collect --repo
398
+ <absolute primary> --wave <N> --cycle <C>`, adding one `--helper-failure
399
+ "<helper and stderr>"` per bundled helper that exited non-zero in this
400
+ cycle. The helper alone reads PLAN.md Config (`max_review_cycles`,
401
+ `finding_skeptics`, `wave_budget`), the cycle's lens files, and every
402
+ skeptic file of the wave; it groups blocking findings by criterion
403
+ locator, collapses true duplicates, carries earlier refutations forward,
404
+ separates structural blockers, batches fix groups by disjoint file scope,
405
+ and reports `cap_reached`. Exit 2 blocks the wave. Never regroup,
406
+ re-derive a locator, or re-decide refutation in model reasoning; act on
407
+ the result in this order:
408
+ - `structural_blockers` non-empty: a missing or invalid lens, panel, or
409
+ skeptic artifact, a helper failure, or a finding that names no
410
+ contract criterion never enters skeptic filtering. Keep it blocking
411
+ through the ordinary blocked-wave handling — a fix task when applicable
412
+ or `build/blocked` escalation otherwise.
413
+ - `cap_reached` true: skip every branch below and use the cycle-cap
414
+ escalation at the end of this step.
415
+ - `skeptic_groups` non-empty: spawn one independent read-only skeptic
416
+ per listed locator, concurrently up to the advertised child capacity,
417
+ with logical task name
418
+ `review_wave_<wave>_cycle_<cycle>_skeptic_<criterion_locator>`, the
419
+ reviewer role in skeptic mode, the skeptic template, and its own verify
420
+ sidecar from `isolate-verify`
421
+ (`--name wave-<N>-cycle-<C>-skeptic-<criterion_locator>`) at the
422
+ recorded review base. Brief each with the group's `locator`,
423
+ `criterion` verbatim, every `observations` entry verbatim, the group's
424
+ `tasks` files, their recorded bases and proven landing commits, and the
425
+ absolute INTENT.md path. Each skeptic stages
426
+ `.project/review/wave-N.cycleC.skeptic-<criterion_locator>.md` in its
427
+ sidecar; validate each against the skeptic template, atomically copy it
428
+ to the primary canonical path, then retire that sidecar. Rerun the
429
+ helper; a locator refuted in an earlier cycle never gets a second
430
+ skeptic, and the helper already routes it.
431
+ - `all_refuted` true: stop and ask. Present **Outcome** with the blocked
432
+ verdict and the refutation count, **Review** linking the lens and
433
+ skeptic files, and **Next** listing `Re-run the review cycle with the
434
+ skeptic files in the reviewer briefs (recommended — no finding survived
435
+ scrutiny)` first, then `Open fix tasks from the findings anyway (an
436
+ explicit ruling that overrides their refutations)`. A selected re-run
437
+ consumes a cycle. After the user selects either option, record exact
438
+ full HEAD, then use `pipeline_state.py transition` with the exact
439
+ current phase, status, branch, and archive as expected and unchanged
440
+ phase/status as the result. Append `wave <N> cycle <C> all-refuted
441
+ ruling: <selected option verbatim>` to the STATE.md Log and require the
442
+ returned position to remain `build/active`. Checkpoint STATE.md and the
443
+ collected skeptic artifacts through the Bookkeeping checkpoint rule with
444
+ subject `build: record wave <N> cycle <C> skeptic ruling`, body `Why:
445
+ persist the all-refuted user ruling before acting`, and `Wave: <N>`. Do
446
+ not start the selected review cycle or create, batch, or dispatch fix
447
+ tasks until the checkpoint returns its commit. When the persisted ruling
448
+ selects `Open fix tasks from the findings anyway`, the override set is
449
+ every `refuted_groups` locator with its preserved `observations`; its
450
+ governing refutation is the group's `skeptic` entry (the current
451
+ cycle's file, or the earlier cycle's file for a same-evidence repeat).
452
+ Add that set to `fix_groups` for batching. No other ruling re-admits
453
+ refuted groups. Preserve their skeptic verdicts and eligibility
454
+ history. After a crash, resume the recorded choice without asking
455
+ again.
456
+ - Otherwise batch `fix_batches` into complete fix tasks from the task
457
+ template — one task per batch, never one per finding — each carrying
458
+ its groups' failed criteria and observed evidence verbatim. A group
459
+ with `repeat` true is evidence its earlier fix failed, never a new
460
+ finding; a re-review never spawns a duplicate fix task for a finding
461
+ already carried. Write each fix task to `.project/tasks/` with `wave`
462
+ set to the current wave or a newly appended `## Wave N` heading in
463
+ PLAN.md before dispatch. Its dependencies include every source task in
464
+ the batch; its files match the batch. In `## Review findings`, use one
465
+ `### <locator>` block per group, `Criterion: <verbatim criterion>`, and
466
+ every observation verbatim. Run the repair through the same isolated
467
+ layer loop, even when its appended wave repairs an earlier blocked wave.
468
+ After landing, call `review_findings.py repair-evidence --repo <primary>
469
+ --wave <source wave> --cycle <source cycle> --task <repair id>` and save
470
+ its JSON as the repair evidence for the next review. The helper validates
471
+ the carried batch, original and repair landings, isolated product scope,
472
+ unchanged source reports and reusable Verify. On success, brief the next
473
+ original-wave review with this receipt and the reviewer role's
474
+ **Re-review after a proven repair** contract. Reuse command evidence;
475
+ the new review judges the repaired product against the original criteria.
476
+ Preserve prior verdicts and source tasks. On helper rejection, resolve
477
+ the evidence blocker rather than redispatching an already proven fix.
478
+ At the cap, record all attempts in the STATE.md log and ask the user —
479
+ through an interactive user-input tool when available — after linking
480
+ the resolved absolute blocking wave review, every deep lens file for the
481
+ cycle, and every skeptic file collected for the wave, plus the STATE.md
482
+ attempt log. Ask whether to redirect the approach, raise the cap, or send
483
+ define to amend INTENT.md `## Corrections` — never rewrite an AC from a
484
+ Log waiver — or, in program flow (ROADMAP.md exists), to abandon the
485
+ milestone under the Milestone abandon procedure — listing the
486
+ orchestrator's recommended option first marked `(recommended)` with a
487
+ one-line reason drawn from the review evidence. Never choose silently.
488
+ When the canonical verdict is `pass` and `wave-N.cycleC.panel.md` reports
489
+ `Actionable` greater than 0, do not advance silently: present **Outcome**
490
+ with the canonical pass plus the actionable count, **Review** linking the
491
+ panel file, and **Next** listing `Open fix tasks from panel findings
492
+ (recommended)` first, then `Advance and keep panel findings as warnings`.
493
+ Preference-only panel warnings do not block advance. On pass, checkpoint
494
+ the review artifact, the panel file when present, STATE.md, and wave
495
+ bookkeeping, then report `wave N/M done, C review cycle(s)`.
496
+
497
+ ## Completion
498
+
499
+ Run `python3 <absolute dispatch_driver.py> complete --repo <absolute primary>`
500
+ even when the coders used native child tools. Follow the build skill's Completion
501
+ handoff. The runtime owns landing evidence, transition, and checkpoint; ship owns
502
+ project Verify. Never repeat a proven operation in a manual sequence.
@@ -0,0 +1,78 @@
1
+ # Return a blocked build to its contract owner
2
+
3
+ Use this contract only for an active milestone at `build/blocked`: a documented
4
+ structural plan defect, or an explicit user ruling that changes approved intent.
5
+ It does not reopen ship, archived milestones, or lookahead. Build owns entry;
6
+ Define owns intent corrections; Plan owns the replacement task inventory and
7
+ approval. Routing remains a caller handoff under AGENTS.md.
8
+
9
+ ## Build: checkpoint and enter
10
+
11
+ 1. Record the finding or verbatim user ruling in STATE through its helper.
12
+ Stop dispatch. Use the normal recovery and retirement procedures until
13
+ every task is either unstarted `pending` with null dispatch metadata or
14
+ proven `done`. Preserve owned uncommitted work before any retirement.
15
+ Settle reviewers and their sidecars too. Dispatch records must have no pending
16
+ cleanup; records with reviewer `worktree` and `branch` ownership must also
17
+ record `cleanup_complete`. A `blocked` or `collected` outcome alone does not
18
+ prove retirement. Records that never owned a reviewer sidecar do not require
19
+ that retirement receipt. Use the existing dispatch retirement procedures;
20
+ recovery does not retire sidecars itself. Never infer that a timed-out child
21
+ stopped. Checkpoint the blocked state and artifacts using the Build
22
+ bookkeeping contract; the primary must be clean.
23
+ 2. Run `pipeline_state.py transition` with the complete current state expected,
24
+ `--set-status active`, and the matching target and event:
25
+
26
+ | Cause | Target | Exact event |
27
+ | --- | --- | --- |
28
+ | User changes a criterion, constraint, or veto | `--set-phase define` | `build intent corrections requested` |
29
+ | Task inventory, dependency, or wave repair | `--set-phase plan` | `build plan repair requested` |
30
+
31
+ The helper records the committed recovery base in STATE atomically. Do not
32
+ author or edit that record. Milestone, branch, integration settings, and
33
+ landed task contracts remain fixed throughout recovery.
34
+ 3. Return to the router or name the selected explicit skill. The route names
35
+ `corrections` for Define and `build-repair` for Plan. Other blocked-build
36
+ failures continue through ordinary Build recovery.
37
+
38
+ ## Define and Plan: prepare before editing
39
+
40
+ Run the bundled `pipeline_state.py prepare-build-recovery --repo <absolute-root>`
41
+ before changing any recovery artifact. This repeatable operation preserves the
42
+ old review directory under `plan/build-recovery-<base>/review` and starts a fresh
43
+ active review directory. STATE's recorded base owns an interrupted move; rerun
44
+ this command to finish it. The helper validates the preserved bytes against Git.
45
+ Do not remove, rewrite, or use the preserved reviews as current approval.
46
+
47
+ **Define corrections.** Read the existing intent and governing program artifacts.
48
+ Interview only the requested change; append the user's words under
49
+ `## Corrections`, revise the affected intent, and present the delta for approval.
50
+ Keep the milestone identity. Reclassify the lane using the normal lane rules.
51
+ After approval, use the normal `define/active → define/done` transition and route
52
+ from the approved lane. Standard intent goes through Research and Decide again;
53
+ quick and milestone intent use their existing evidence gates. A program charter
54
+ or roadmap conflict still requires its legal owner gate; this path cannot waive it.
55
+
56
+ **Plan build-repair.** Read the corrected intent, current synthesis, existing plan,
57
+ task files, and recovery base. Use the normal planner, lint, panel, and approval
58
+ gates. Repair the remaining task inventory as needed, including split, rename,
59
+ dependency, or wave changes. Keep IDs ordered and contiguous. Preserve every
60
+ landed task file byte-for-byte, including its recorded base and proof. Any new
61
+ work to satisfy a corrected criterion belongs in new pending tasks, not rewritten
62
+ landed contracts. A plan-only recovery must not change approved intent.
63
+
64
+ ## Approve and return to Build
65
+
66
+ Use normal `pipeline_state.py approve --kind plan --expected-head <HEAD>`.
67
+ Neither `--patch` nor `--defer-checkpoint` is legal for recovery. The helper
68
+ checks landed-task preservation and restored intent ownership, restores review
69
+ evidence only for unchanged contracts, and creates the normal journaled plan
70
+ checkpoint. A failed approval leaves recovery open.
71
+
72
+ Return through `plan/done → build/active` with event `build started`. The dispatch
73
+ driver uses a separate record directory for this recovery base, while retaining
74
+ the milestone budget ledger. Resume only from the new approved task inventory.
75
+ Unchanged wave evidence remains usable; changed waves need review in the new
76
+ record directory. Retained task Verify receipts remain historical evidence for
77
+ their original task and base, never proof for a changed task. Final review still
78
+ requires current-HEAD evidence before shipment.
@@ -7,12 +7,17 @@ Execute exactly one task for `$gsd-path-build`.
7
7
  - Require the brief to name the assigned task file, task template, and
8
8
  `.project/intent/INTENT.md` by absolute path, plus the isolated
9
9
  linked-worktree root returned by `isolation.py isolate-task`. Read the
10
- task file, template, and INTENT.md fully from that worktree.
10
+ task file fully from that worktree. Use the generated intent context in the
11
+ brief when supplied; it retains global rules, corrections, and owned or
12
+ explicitly referenced criteria with source hashes. Otherwise read INTENT.md
13
+ fully. Read the task template only to resolve a missing or ambiguous field;
14
+ the completed task already supplies the implementation contract.
11
15
  On a serial dispatch round that root is the primary worktree on the bound
12
16
  branch; still never edit a sibling task's files. On a parallel round never
13
17
  edit the primary worktree.
14
- - Read the project `AGENTS.md` and every existing path listed in the task's
15
- `files` frontmatter before editing.
18
+ - Apply the project `AGENTS.md`; read it if the host has not already supplied
19
+ that exact file. Read every existing path listed in the task's `files`
20
+ frontmatter before editing. Load WORKFLOW.md only for a workflow ambiguity.
16
21
  - Treat Context, Approach, Interface contract, owned INTENT success
17
22
  criteria, Acceptance criteria, and Verify as the implementation contract.
18
23
  Owned SCs, Criteria, Verify, and the Interface contract define done;