@opengsd/gsd-path 1.4.0 → 1.6.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 (476) hide show
  1. package/CHANGELOG.md +460 -341
  2. package/DOCS.md +16 -5
  3. package/FULL.md +67 -6
  4. package/HOOKS.md +158 -10
  5. package/MIGRATE.md +12 -0
  6. package/QUICK.md +4 -2
  7. package/README.md +136 -116
  8. package/RUNTIME.md +24 -6
  9. package/UPDATE.md +39 -3
  10. package/WORKFLOW.md +80 -4
  11. package/package.json +5 -2
  12. package/platforms/shared-agents/dispatch.md +13 -0
  13. package/scripts/_common.py +256 -2
  14. package/scripts/archive_milestone.py +14 -13
  15. package/scripts/build_recovery.py +155 -58
  16. package/scripts/build_state.py +274 -8
  17. package/scripts/check_docs_audit.py +77 -4
  18. package/scripts/check_handoffs.py +635 -57
  19. package/scripts/check_task_briefs.py +293 -32
  20. package/scripts/detect_project.py +260 -20
  21. package/scripts/discussion_records.py +9 -1
  22. package/scripts/discussion_validate.py +93 -35
  23. package/scripts/dispatch_driver.py +549 -53
  24. package/scripts/git_guard.py +27 -8
  25. package/scripts/guard_hook.py +2630 -210
  26. package/scripts/install.mjs +99 -11
  27. package/scripts/install.py +231 -46
  28. package/scripts/integration.py +244 -65
  29. package/scripts/isolation.py +539 -70
  30. package/scripts/loop_run.py +16 -4
  31. package/scripts/members.py +77 -32
  32. package/scripts/migrate_core.py +2 -0
  33. package/scripts/model_policy.py +5 -1
  34. package/scripts/path_config.py +3 -3
  35. package/scripts/pipeline_diagnose.py +17 -2
  36. package/scripts/pipeline_git.py +131 -42
  37. package/scripts/pipeline_state.py +139 -39
  38. package/scripts/pipeline_undo.py +118 -16
  39. package/scripts/promote_lookahead.py +3 -3
  40. package/scripts/review_findings.py +180 -44
  41. package/scripts/roadmap.py +9 -1
  42. package/scripts/runtime_store.py +21 -2
  43. package/scripts/skill-resources.json +9 -2
  44. package/scripts/state_checkpoint.py +39 -36
  45. package/scripts/state_promote.py +15 -4
  46. package/scripts/status_runtime.py +22 -4
  47. package/scripts/task_context.py +14 -3
  48. package/scripts/wizard.mjs +1 -0
  49. package/scripts/workflow_run.py +14 -4
  50. package/scripts/worktree_paths.py +54 -2
  51. package/skills/gsd-path/DEFINE.md +34 -5
  52. package/skills/gsd-path/PLAN.md +14 -3
  53. package/skills/gsd-path/RESEARCH.md +11 -0
  54. package/skills/gsd-path/ROADMAP.md +16 -6
  55. package/skills/gsd-path/SHIP.md +32 -5
  56. package/skills/gsd-path/SKILL.md +52 -24
  57. package/skills/gsd-path/references/build-native.md +112 -10
  58. package/skills/gsd-path/references/build-recovery.md +13 -0
  59. package/skills/gsd-path/references/coder.md +7 -3
  60. package/skills/gsd-path/references/dispatch.md +13 -0
  61. package/skills/gsd-path/references/docs-auditor.md +5 -0
  62. package/skills/gsd-path/references/operating-rules.md +11 -3
  63. package/skills/gsd-path/references/planner.md +26 -4
  64. package/skills/gsd-path/references/reviewer-final.md +20 -2
  65. package/skills/gsd-path/references/reviewer-wave.md +56 -12
  66. package/skills/gsd-path/references/reviewer.md +3 -1
  67. package/skills/gsd-path/references/runtime-selection.md +9 -0
  68. package/skills/gsd-path/references/spec-probes.md +150 -0
  69. package/skills/gsd-path/scripts/_common.py +256 -2
  70. package/skills/gsd-path/scripts/archive_milestone.py +14 -13
  71. package/skills/gsd-path/scripts/build_recovery.py +155 -58
  72. package/skills/gsd-path/scripts/build_state.py +274 -8
  73. package/skills/gsd-path/scripts/check_docs_audit.py +77 -4
  74. package/skills/gsd-path/scripts/check_handoffs.py +635 -57
  75. package/skills/gsd-path/scripts/check_task_briefs.py +293 -32
  76. package/skills/gsd-path/scripts/detect_project.py +260 -20
  77. package/skills/gsd-path/scripts/discussion_records.py +9 -1
  78. package/skills/gsd-path/scripts/discussion_validate.py +93 -35
  79. package/skills/gsd-path/scripts/dispatch_driver.py +549 -53
  80. package/skills/gsd-path/scripts/git_guard.py +27 -8
  81. package/skills/gsd-path/scripts/integration.py +244 -65
  82. package/skills/gsd-path/scripts/isolation.py +539 -70
  83. package/skills/gsd-path/scripts/loop_run.py +16 -4
  84. package/skills/gsd-path/scripts/members.py +77 -32
  85. package/skills/gsd-path/scripts/model_policy.py +5 -1
  86. package/skills/gsd-path/scripts/path_config.py +3 -3
  87. package/skills/gsd-path/scripts/pipeline_git.py +131 -42
  88. package/skills/gsd-path/scripts/pipeline_state.py +139 -39
  89. package/skills/gsd-path/scripts/promote_lookahead.py +3 -3
  90. package/skills/gsd-path/scripts/review_findings.py +180 -44
  91. package/skills/gsd-path/scripts/roadmap.py +9 -1
  92. package/skills/gsd-path/scripts/state_checkpoint.py +39 -36
  93. package/skills/gsd-path/scripts/state_promote.py +15 -4
  94. package/skills/gsd-path/scripts/status_runtime.py +22 -4
  95. package/skills/gsd-path/scripts/task_context.py +14 -3
  96. package/skills/gsd-path/scripts/workflow_run.py +14 -4
  97. package/skills/gsd-path/scripts/worktree_paths.py +54 -2
  98. package/skills/gsd-path/templates/docs-audit.md +5 -1
  99. package/skills/gsd-path/templates/final-review.md +11 -2
  100. package/skills/gsd-path/templates/intent.md +30 -0
  101. package/skills/gsd-path/templates/patch-findings.md +3 -3
  102. package/skills/gsd-path/templates/plan.md +17 -2
  103. package/skills/gsd-path/templates/research-handoff.md +14 -3
  104. package/skills/gsd-path/templates/state.md +2 -1
  105. package/skills/gsd-path/templates/task.md +1 -0
  106. package/skills/gsd-path/templates/wave-review.md +28 -9
  107. package/skills/gsd-path-build/references/build-native.md +112 -10
  108. package/skills/gsd-path-build/references/build-recovery.md +13 -0
  109. package/skills/gsd-path-build/references/coder.md +7 -3
  110. package/skills/gsd-path-build/references/dispatch.md +13 -0
  111. package/skills/gsd-path-build/references/operating-rules.md +11 -3
  112. package/skills/gsd-path-build/references/reviewer-final.md +20 -2
  113. package/skills/gsd-path-build/references/reviewer-wave.md +56 -12
  114. package/skills/gsd-path-build/references/reviewer.md +3 -1
  115. package/skills/gsd-path-build/references/runtime-selection.md +9 -0
  116. package/skills/gsd-path-build/references/spec-probes.md +150 -0
  117. package/skills/gsd-path-build/scripts/_common.py +256 -2
  118. package/skills/gsd-path-build/scripts/archive_milestone.py +14 -13
  119. package/skills/gsd-path-build/scripts/build_recovery.py +155 -58
  120. package/skills/gsd-path-build/scripts/build_state.py +274 -8
  121. package/skills/gsd-path-build/scripts/check_handoffs.py +635 -57
  122. package/skills/gsd-path-build/scripts/check_task_briefs.py +293 -32
  123. package/skills/gsd-path-build/scripts/detect_project.py +260 -20
  124. package/skills/gsd-path-build/scripts/discussion_records.py +9 -1
  125. package/skills/gsd-path-build/scripts/discussion_validate.py +93 -35
  126. package/skills/gsd-path-build/scripts/dispatch_driver.py +549 -53
  127. package/skills/gsd-path-build/scripts/integration.py +244 -65
  128. package/skills/gsd-path-build/scripts/isolation.py +539 -70
  129. package/skills/gsd-path-build/scripts/loop_run.py +16 -4
  130. package/skills/gsd-path-build/scripts/members.py +77 -32
  131. package/skills/gsd-path-build/scripts/model_policy.py +5 -1
  132. package/skills/gsd-path-build/scripts/path_config.py +3 -3
  133. package/skills/gsd-path-build/scripts/pipeline_git.py +131 -42
  134. package/skills/gsd-path-build/scripts/pipeline_state.py +139 -39
  135. package/skills/gsd-path-build/scripts/promote_lookahead.py +3 -3
  136. package/skills/gsd-path-build/scripts/review_findings.py +180 -44
  137. package/skills/gsd-path-build/scripts/roadmap.py +9 -1
  138. package/skills/gsd-path-build/scripts/state_checkpoint.py +39 -36
  139. package/skills/gsd-path-build/scripts/state_promote.py +15 -4
  140. package/skills/gsd-path-build/scripts/task_context.py +14 -3
  141. package/skills/gsd-path-build/scripts/workflow_run.py +14 -4
  142. package/skills/gsd-path-build/scripts/worktree_paths.py +54 -2
  143. package/skills/gsd-path-build/templates/task.md +1 -0
  144. package/skills/gsd-path-build/templates/wave-review.md +28 -9
  145. package/skills/gsd-path-decide/references/dispatch.md +13 -0
  146. package/skills/gsd-path-decide/references/operating-rules.md +11 -3
  147. package/skills/gsd-path-decide/references/runtime-selection.md +9 -0
  148. package/skills/gsd-path-decide/scripts/_common.py +256 -2
  149. package/skills/gsd-path-decide/scripts/archive_milestone.py +14 -13
  150. package/skills/gsd-path-decide/scripts/build_recovery.py +155 -58
  151. package/skills/gsd-path-decide/scripts/check_handoffs.py +635 -57
  152. package/skills/gsd-path-decide/scripts/check_task_briefs.py +293 -32
  153. package/skills/gsd-path-decide/scripts/detect_project.py +260 -20
  154. package/skills/gsd-path-decide/scripts/discussion_records.py +9 -1
  155. package/skills/gsd-path-decide/scripts/discussion_validate.py +93 -35
  156. package/skills/gsd-path-decide/scripts/integration.py +244 -65
  157. package/skills/gsd-path-decide/scripts/isolation.py +539 -70
  158. package/skills/gsd-path-decide/scripts/loop_run.py +16 -4
  159. package/skills/gsd-path-decide/scripts/members.py +77 -32
  160. package/skills/gsd-path-decide/scripts/model_policy.py +5 -1
  161. package/skills/gsd-path-decide/scripts/path_config.py +3 -3
  162. package/skills/gsd-path-decide/scripts/pipeline_git.py +131 -42
  163. package/skills/gsd-path-decide/scripts/pipeline_state.py +139 -39
  164. package/skills/gsd-path-decide/scripts/promote_lookahead.py +3 -3
  165. package/skills/gsd-path-decide/scripts/roadmap.py +9 -1
  166. package/skills/gsd-path-decide/scripts/state_checkpoint.py +39 -36
  167. package/skills/gsd-path-decide/scripts/state_promote.py +15 -4
  168. package/skills/gsd-path-decide/scripts/worktree_paths.py +54 -2
  169. package/skills/gsd-path-define/SKILL.md +34 -5
  170. package/skills/gsd-path-define/references/build-recovery.md +13 -0
  171. package/skills/gsd-path-define/references/operating-rules.md +11 -3
  172. package/skills/gsd-path-define/references/runtime-selection.md +9 -0
  173. package/skills/gsd-path-define/references/spec-probes.md +150 -0
  174. package/skills/gsd-path-define/scripts/_common.py +256 -2
  175. package/skills/gsd-path-define/scripts/archive_milestone.py +14 -13
  176. package/skills/gsd-path-define/scripts/build_recovery.py +155 -58
  177. package/skills/gsd-path-define/scripts/check_handoffs.py +635 -57
  178. package/skills/gsd-path-define/scripts/check_task_briefs.py +293 -32
  179. package/skills/gsd-path-define/scripts/detect_project.py +260 -20
  180. package/skills/gsd-path-define/scripts/discussion_records.py +9 -1
  181. package/skills/gsd-path-define/scripts/discussion_validate.py +93 -35
  182. package/skills/gsd-path-define/scripts/integration.py +244 -65
  183. package/skills/gsd-path-define/scripts/isolation.py +539 -70
  184. package/skills/gsd-path-define/scripts/loop_run.py +16 -4
  185. package/skills/gsd-path-define/scripts/members.py +77 -32
  186. package/skills/gsd-path-define/scripts/model_policy.py +5 -1
  187. package/skills/gsd-path-define/scripts/path_config.py +3 -3
  188. package/skills/gsd-path-define/scripts/pipeline_git.py +131 -42
  189. package/skills/gsd-path-define/scripts/pipeline_state.py +139 -39
  190. package/skills/gsd-path-define/scripts/promote_lookahead.py +3 -3
  191. package/skills/gsd-path-define/scripts/roadmap.py +9 -1
  192. package/skills/gsd-path-define/scripts/state_checkpoint.py +39 -36
  193. package/skills/gsd-path-define/scripts/state_promote.py +15 -4
  194. package/skills/gsd-path-define/scripts/worktree_paths.py +54 -2
  195. package/skills/gsd-path-define/templates/intent.md +30 -0
  196. package/skills/gsd-path-define/templates/state.md +2 -1
  197. package/skills/gsd-path-discuss/references/operating-rules.md +11 -3
  198. package/skills/gsd-path-discuss/references/runtime-selection.md +9 -0
  199. package/skills/gsd-path-discuss/scripts/_common.py +256 -2
  200. package/skills/gsd-path-discuss/scripts/discussion_records.py +9 -1
  201. package/skills/gsd-path-discuss/scripts/loop_run.py +16 -4
  202. package/skills/gsd-path-discuss/scripts/model_policy.py +5 -1
  203. package/skills/gsd-path-discuss/scripts/path_config.py +3 -3
  204. package/skills/gsd-path-discuss/scripts/worktree_paths.py +54 -2
  205. package/skills/gsd-path-docs-audit/references/dispatch.md +13 -0
  206. package/skills/gsd-path-docs-audit/references/docs-auditor.md +5 -0
  207. package/skills/gsd-path-docs-audit/references/operating-rules.md +11 -3
  208. package/skills/gsd-path-docs-audit/references/runtime-selection.md +9 -0
  209. package/skills/gsd-path-docs-audit/scripts/_common.py +256 -2
  210. package/skills/gsd-path-docs-audit/scripts/archive_milestone.py +14 -13
  211. package/skills/gsd-path-docs-audit/scripts/build_recovery.py +155 -58
  212. package/skills/gsd-path-docs-audit/scripts/check_docs_audit.py +77 -4
  213. package/skills/gsd-path-docs-audit/scripts/check_handoffs.py +635 -57
  214. package/skills/gsd-path-docs-audit/scripts/check_task_briefs.py +293 -32
  215. package/skills/gsd-path-docs-audit/scripts/detect_project.py +260 -20
  216. package/skills/gsd-path-docs-audit/scripts/discussion_records.py +9 -1
  217. package/skills/gsd-path-docs-audit/scripts/discussion_validate.py +93 -35
  218. package/skills/gsd-path-docs-audit/scripts/integration.py +244 -65
  219. package/skills/gsd-path-docs-audit/scripts/isolation.py +539 -70
  220. package/skills/gsd-path-docs-audit/scripts/loop_run.py +16 -4
  221. package/skills/gsd-path-docs-audit/scripts/members.py +77 -32
  222. package/skills/gsd-path-docs-audit/scripts/model_policy.py +5 -1
  223. package/skills/gsd-path-docs-audit/scripts/path_config.py +3 -3
  224. package/skills/gsd-path-docs-audit/scripts/pipeline_git.py +131 -42
  225. package/skills/gsd-path-docs-audit/scripts/pipeline_state.py +139 -39
  226. package/skills/gsd-path-docs-audit/scripts/promote_lookahead.py +3 -3
  227. package/skills/gsd-path-docs-audit/scripts/roadmap.py +9 -1
  228. package/skills/gsd-path-docs-audit/scripts/state_checkpoint.py +39 -36
  229. package/skills/gsd-path-docs-audit/scripts/state_promote.py +15 -4
  230. package/skills/gsd-path-docs-audit/scripts/worktree_paths.py +54 -2
  231. package/skills/gsd-path-docs-audit/templates/docs-audit.md +5 -1
  232. package/skills/gsd-path-forensics/references/operating-rules.md +11 -3
  233. package/skills/gsd-path-forensics/references/runtime-selection.md +9 -0
  234. package/skills/gsd-path-forensics/scripts/_common.py +256 -2
  235. package/skills/gsd-path-forensics/scripts/discussion_records.py +9 -1
  236. package/skills/gsd-path-forensics/scripts/loop_run.py +16 -4
  237. package/skills/gsd-path-forensics/scripts/model_policy.py +5 -1
  238. package/skills/gsd-path-forensics/scripts/path_config.py +3 -3
  239. package/skills/gsd-path-forensics/scripts/pipeline_diagnose.py +17 -2
  240. package/skills/gsd-path-forensics/scripts/pipeline_undo.py +118 -16
  241. package/skills/gsd-path-forensics/scripts/worktree_paths.py +54 -2
  242. package/skills/gsd-path-inspect/references/dispatch.md +13 -0
  243. package/skills/gsd-path-inspect/references/docs-auditor.md +5 -0
  244. package/skills/gsd-path-inspect/references/operating-rules.md +11 -3
  245. package/skills/gsd-path-inspect/references/runtime-selection.md +9 -0
  246. package/skills/gsd-path-inspect/scripts/_common.py +256 -2
  247. package/skills/gsd-path-inspect/scripts/archive_milestone.py +14 -13
  248. package/skills/gsd-path-inspect/scripts/build_recovery.py +155 -58
  249. package/skills/gsd-path-inspect/scripts/check_docs_audit.py +77 -4
  250. package/skills/gsd-path-inspect/scripts/check_handoffs.py +635 -57
  251. package/skills/gsd-path-inspect/scripts/check_task_briefs.py +293 -32
  252. package/skills/gsd-path-inspect/scripts/detect_project.py +260 -20
  253. package/skills/gsd-path-inspect/scripts/discussion_records.py +9 -1
  254. package/skills/gsd-path-inspect/scripts/discussion_validate.py +93 -35
  255. package/skills/gsd-path-inspect/scripts/integration.py +244 -65
  256. package/skills/gsd-path-inspect/scripts/isolation.py +539 -70
  257. package/skills/gsd-path-inspect/scripts/loop_run.py +16 -4
  258. package/skills/gsd-path-inspect/scripts/members.py +77 -32
  259. package/skills/gsd-path-inspect/scripts/model_policy.py +5 -1
  260. package/skills/gsd-path-inspect/scripts/path_config.py +3 -3
  261. package/skills/gsd-path-inspect/scripts/pipeline_git.py +131 -42
  262. package/skills/gsd-path-inspect/scripts/pipeline_state.py +139 -39
  263. package/skills/gsd-path-inspect/scripts/promote_lookahead.py +3 -3
  264. package/skills/gsd-path-inspect/scripts/roadmap.py +9 -1
  265. package/skills/gsd-path-inspect/scripts/state_checkpoint.py +39 -36
  266. package/skills/gsd-path-inspect/scripts/state_promote.py +15 -4
  267. package/skills/gsd-path-inspect/scripts/workflow_run.py +14 -4
  268. package/skills/gsd-path-inspect/scripts/worktree_paths.py +54 -2
  269. package/skills/gsd-path-inspect/templates/docs-audit.md +5 -1
  270. package/skills/gsd-path-inspect/templates/state.md +2 -1
  271. package/skills/gsd-path-loop/references/operating-rules.md +11 -3
  272. package/skills/gsd-path-loop/references/runtime-selection.md +9 -0
  273. package/skills/gsd-path-loop/scripts/_common.py +256 -2
  274. package/skills/gsd-path-loop/scripts/discussion_records.py +9 -1
  275. package/skills/gsd-path-loop/scripts/loop_run.py +16 -4
  276. package/skills/gsd-path-loop/scripts/model_policy.py +5 -1
  277. package/skills/gsd-path-loop/scripts/path_config.py +3 -3
  278. package/skills/gsd-path-loop/scripts/worktree_paths.py +54 -2
  279. package/skills/gsd-path-migrate/SKILL.md +8 -0
  280. package/skills/gsd-path-migrate/references/operating-rules.md +11 -3
  281. package/skills/gsd-path-migrate/references/runtime-selection.md +9 -0
  282. package/skills/gsd-path-migrate/scripts/_common.py +256 -2
  283. package/skills/gsd-path-migrate/scripts/discussion_records.py +9 -1
  284. package/skills/gsd-path-migrate/scripts/loop_run.py +16 -4
  285. package/skills/gsd-path-migrate/scripts/migrate_core.py +2 -0
  286. package/skills/gsd-path-migrate/scripts/model_policy.py +5 -1
  287. package/skills/gsd-path-migrate/scripts/path_config.py +3 -3
  288. package/skills/gsd-path-plan/SKILL.md +14 -3
  289. package/skills/gsd-path-plan/references/build-recovery.md +13 -0
  290. package/skills/gsd-path-plan/references/dispatch.md +13 -0
  291. package/skills/gsd-path-plan/references/operating-rules.md +11 -3
  292. package/skills/gsd-path-plan/references/planner.md +26 -4
  293. package/skills/gsd-path-plan/references/runtime-selection.md +9 -0
  294. package/skills/gsd-path-plan/references/spec-probes.md +150 -0
  295. package/skills/gsd-path-plan/scripts/_common.py +256 -2
  296. package/skills/gsd-path-plan/scripts/archive_milestone.py +14 -13
  297. package/skills/gsd-path-plan/scripts/build_recovery.py +155 -58
  298. package/skills/gsd-path-plan/scripts/check_handoffs.py +635 -57
  299. package/skills/gsd-path-plan/scripts/check_task_briefs.py +293 -32
  300. package/skills/gsd-path-plan/scripts/detect_project.py +260 -20
  301. package/skills/gsd-path-plan/scripts/discussion_records.py +9 -1
  302. package/skills/gsd-path-plan/scripts/discussion_validate.py +93 -35
  303. package/skills/gsd-path-plan/scripts/integration.py +244 -65
  304. package/skills/gsd-path-plan/scripts/isolation.py +539 -70
  305. package/skills/gsd-path-plan/scripts/loop_run.py +16 -4
  306. package/skills/gsd-path-plan/scripts/members.py +77 -32
  307. package/skills/gsd-path-plan/scripts/model_policy.py +5 -1
  308. package/skills/gsd-path-plan/scripts/path_config.py +3 -3
  309. package/skills/gsd-path-plan/scripts/pipeline_git.py +131 -42
  310. package/skills/gsd-path-plan/scripts/pipeline_state.py +139 -39
  311. package/skills/gsd-path-plan/scripts/promote_lookahead.py +3 -3
  312. package/skills/gsd-path-plan/scripts/roadmap.py +9 -1
  313. package/skills/gsd-path-plan/scripts/state_checkpoint.py +39 -36
  314. package/skills/gsd-path-plan/scripts/state_promote.py +15 -4
  315. package/skills/gsd-path-plan/scripts/workflow_run.py +14 -4
  316. package/skills/gsd-path-plan/scripts/worktree_paths.py +54 -2
  317. package/skills/gsd-path-plan/templates/patch-findings.md +3 -3
  318. package/skills/gsd-path-plan/templates/plan.md +17 -2
  319. package/skills/gsd-path-plan/templates/task.md +1 -0
  320. package/skills/gsd-path-research/SKILL.md +11 -0
  321. package/skills/gsd-path-research/references/dispatch.md +13 -0
  322. package/skills/gsd-path-research/references/operating-rules.md +11 -3
  323. package/skills/gsd-path-research/references/runtime-selection.md +9 -0
  324. package/skills/gsd-path-research/scripts/_common.py +256 -2
  325. package/skills/gsd-path-research/scripts/archive_milestone.py +14 -13
  326. package/skills/gsd-path-research/scripts/build_recovery.py +155 -58
  327. package/skills/gsd-path-research/scripts/check_handoffs.py +635 -57
  328. package/skills/gsd-path-research/scripts/check_task_briefs.py +293 -32
  329. package/skills/gsd-path-research/scripts/detect_project.py +260 -20
  330. package/skills/gsd-path-research/scripts/discussion_records.py +9 -1
  331. package/skills/gsd-path-research/scripts/discussion_validate.py +93 -35
  332. package/skills/gsd-path-research/scripts/integration.py +244 -65
  333. package/skills/gsd-path-research/scripts/isolation.py +539 -70
  334. package/skills/gsd-path-research/scripts/loop_run.py +16 -4
  335. package/skills/gsd-path-research/scripts/members.py +77 -32
  336. package/skills/gsd-path-research/scripts/model_policy.py +5 -1
  337. package/skills/gsd-path-research/scripts/path_config.py +3 -3
  338. package/skills/gsd-path-research/scripts/pipeline_git.py +131 -42
  339. package/skills/gsd-path-research/scripts/pipeline_state.py +139 -39
  340. package/skills/gsd-path-research/scripts/promote_lookahead.py +3 -3
  341. package/skills/gsd-path-research/scripts/roadmap.py +9 -1
  342. package/skills/gsd-path-research/scripts/state_checkpoint.py +39 -36
  343. package/skills/gsd-path-research/scripts/state_promote.py +15 -4
  344. package/skills/gsd-path-research/scripts/worktree_paths.py +54 -2
  345. package/skills/gsd-path-research/templates/research-handoff.md +14 -3
  346. package/skills/gsd-path-roadmap/SKILL.md +16 -6
  347. package/skills/gsd-path-roadmap/references/dispatch.md +13 -0
  348. package/skills/gsd-path-roadmap/references/operating-rules.md +11 -3
  349. package/skills/gsd-path-roadmap/references/runtime-selection.md +9 -0
  350. package/skills/gsd-path-roadmap/scripts/_common.py +256 -2
  351. package/skills/gsd-path-roadmap/scripts/archive_milestone.py +14 -13
  352. package/skills/gsd-path-roadmap/scripts/build_recovery.py +155 -58
  353. package/skills/gsd-path-roadmap/scripts/check_handoffs.py +635 -57
  354. package/skills/gsd-path-roadmap/scripts/check_task_briefs.py +293 -32
  355. package/skills/gsd-path-roadmap/scripts/detect_project.py +260 -20
  356. package/skills/gsd-path-roadmap/scripts/discussion_records.py +9 -1
  357. package/skills/gsd-path-roadmap/scripts/discussion_validate.py +93 -35
  358. package/skills/gsd-path-roadmap/scripts/integration.py +244 -65
  359. package/skills/gsd-path-roadmap/scripts/isolation.py +539 -70
  360. package/skills/gsd-path-roadmap/scripts/loop_run.py +16 -4
  361. package/skills/gsd-path-roadmap/scripts/members.py +77 -32
  362. package/skills/gsd-path-roadmap/scripts/model_policy.py +5 -1
  363. package/skills/gsd-path-roadmap/scripts/path_config.py +3 -3
  364. package/skills/gsd-path-roadmap/scripts/pipeline_git.py +131 -42
  365. package/skills/gsd-path-roadmap/scripts/pipeline_state.py +139 -39
  366. package/skills/gsd-path-roadmap/scripts/promote_lookahead.py +3 -3
  367. package/skills/gsd-path-roadmap/scripts/roadmap.py +9 -1
  368. package/skills/gsd-path-roadmap/scripts/state_checkpoint.py +39 -36
  369. package/skills/gsd-path-roadmap/scripts/state_promote.py +15 -4
  370. package/skills/gsd-path-roadmap/scripts/worktree_paths.py +54 -2
  371. package/skills/gsd-path-ship/SKILL.md +32 -5
  372. package/skills/gsd-path-ship/references/dispatch.md +13 -0
  373. package/skills/gsd-path-ship/references/operating-rules.md +11 -3
  374. package/skills/gsd-path-ship/references/reviewer-final.md +20 -2
  375. package/skills/gsd-path-ship/references/reviewer-wave.md +56 -12
  376. package/skills/gsd-path-ship/references/reviewer.md +3 -1
  377. package/skills/gsd-path-ship/references/runtime-selection.md +9 -0
  378. package/skills/gsd-path-ship/references/spec-probes.md +150 -0
  379. package/skills/gsd-path-ship/scripts/_common.py +256 -2
  380. package/skills/gsd-path-ship/scripts/archive_milestone.py +14 -13
  381. package/skills/gsd-path-ship/scripts/build_recovery.py +155 -58
  382. package/skills/gsd-path-ship/scripts/build_state.py +274 -8
  383. package/skills/gsd-path-ship/scripts/check_handoffs.py +635 -57
  384. package/skills/gsd-path-ship/scripts/check_task_briefs.py +293 -32
  385. package/skills/gsd-path-ship/scripts/detect_project.py +260 -20
  386. package/skills/gsd-path-ship/scripts/discussion_records.py +9 -1
  387. package/skills/gsd-path-ship/scripts/discussion_validate.py +93 -35
  388. package/skills/gsd-path-ship/scripts/integration.py +244 -65
  389. package/skills/gsd-path-ship/scripts/isolation.py +539 -70
  390. package/skills/gsd-path-ship/scripts/loop_run.py +16 -4
  391. package/skills/gsd-path-ship/scripts/members.py +77 -32
  392. package/skills/gsd-path-ship/scripts/model_policy.py +5 -1
  393. package/skills/gsd-path-ship/scripts/path_config.py +3 -3
  394. package/skills/gsd-path-ship/scripts/pipeline_git.py +131 -42
  395. package/skills/gsd-path-ship/scripts/pipeline_state.py +139 -39
  396. package/skills/gsd-path-ship/scripts/promote_lookahead.py +3 -3
  397. package/skills/gsd-path-ship/scripts/roadmap.py +9 -1
  398. package/skills/gsd-path-ship/scripts/state_checkpoint.py +39 -36
  399. package/skills/gsd-path-ship/scripts/state_promote.py +15 -4
  400. package/skills/gsd-path-ship/scripts/workflow_run.py +14 -4
  401. package/skills/gsd-path-ship/scripts/worktree_paths.py +54 -2
  402. package/skills/gsd-path-ship/templates/final-review.md +11 -2
  403. package/skills/gsd-path-ship/templates/patch-findings.md +3 -3
  404. package/skills/gsd-path-ship/templates/wave-review.md +28 -9
  405. package/skills/gsd-path-undo/references/operating-rules.md +11 -3
  406. package/skills/gsd-path-undo/references/runtime-selection.md +9 -0
  407. package/skills/gsd-path-undo/scripts/_common.py +256 -2
  408. package/skills/gsd-path-undo/scripts/discussion_records.py +9 -1
  409. package/skills/gsd-path-undo/scripts/loop_run.py +16 -4
  410. package/skills/gsd-path-undo/scripts/model_policy.py +5 -1
  411. package/skills/gsd-path-undo/scripts/path_config.py +3 -3
  412. package/skills/gsd-path-undo/scripts/pipeline_undo.py +118 -16
  413. package/skills/gsd-path-undo/scripts/worktree_paths.py +54 -2
  414. package/skills/path/DEFINE.md +34 -5
  415. package/skills/path/PLAN.md +14 -3
  416. package/skills/path/RESEARCH.md +11 -0
  417. package/skills/path/ROADMAP.md +16 -6
  418. package/skills/path/SHIP.md +32 -5
  419. package/skills/path/SKILL.md +52 -24
  420. package/skills/path/references/build-native.md +112 -10
  421. package/skills/path/references/build-recovery.md +13 -0
  422. package/skills/path/references/coder.md +7 -3
  423. package/skills/path/references/dispatch.md +13 -0
  424. package/skills/path/references/docs-auditor.md +5 -0
  425. package/skills/path/references/operating-rules.md +11 -3
  426. package/skills/path/references/planner.md +26 -4
  427. package/skills/path/references/reviewer-final.md +20 -2
  428. package/skills/path/references/reviewer-wave.md +56 -12
  429. package/skills/path/references/reviewer.md +3 -1
  430. package/skills/path/references/runtime-selection.md +9 -0
  431. package/skills/path/references/spec-probes.md +150 -0
  432. package/skills/path/scripts/_common.py +256 -2
  433. package/skills/path/scripts/archive_milestone.py +14 -13
  434. package/skills/path/scripts/build_recovery.py +155 -58
  435. package/skills/path/scripts/build_state.py +274 -8
  436. package/skills/path/scripts/check_docs_audit.py +77 -4
  437. package/skills/path/scripts/check_handoffs.py +635 -57
  438. package/skills/path/scripts/check_task_briefs.py +293 -32
  439. package/skills/path/scripts/detect_project.py +260 -20
  440. package/skills/path/scripts/discussion_records.py +9 -1
  441. package/skills/path/scripts/discussion_validate.py +93 -35
  442. package/skills/path/scripts/dispatch_driver.py +549 -53
  443. package/skills/path/scripts/git_guard.py +27 -8
  444. package/skills/path/scripts/integration.py +244 -65
  445. package/skills/path/scripts/isolation.py +539 -70
  446. package/skills/path/scripts/loop_run.py +16 -4
  447. package/skills/path/scripts/members.py +77 -32
  448. package/skills/path/scripts/model_policy.py +5 -1
  449. package/skills/path/scripts/path_config.py +3 -3
  450. package/skills/path/scripts/pipeline_git.py +131 -42
  451. package/skills/path/scripts/pipeline_state.py +139 -39
  452. package/skills/path/scripts/promote_lookahead.py +3 -3
  453. package/skills/path/scripts/review_findings.py +180 -44
  454. package/skills/path/scripts/roadmap.py +9 -1
  455. package/skills/path/scripts/state_checkpoint.py +39 -36
  456. package/skills/path/scripts/state_promote.py +15 -4
  457. package/skills/path/scripts/status_runtime.py +22 -4
  458. package/skills/path/scripts/task_context.py +14 -3
  459. package/skills/path/scripts/workflow_run.py +14 -4
  460. package/skills/path/scripts/worktree_paths.py +54 -2
  461. package/skills/path/templates/docs-audit.md +5 -1
  462. package/skills/path/templates/final-review.md +11 -2
  463. package/skills/path/templates/intent.md +30 -0
  464. package/skills/path/templates/patch-findings.md +3 -3
  465. package/skills/path/templates/plan.md +17 -2
  466. package/skills/path/templates/research-handoff.md +14 -3
  467. package/skills/path/templates/state.md +2 -1
  468. package/skills/path/templates/task.md +1 -0
  469. package/skills/path/templates/wave-review.md +28 -9
  470. package/skills/gsd-path/scripts/__pycache__/_common.cpython-312.pyc +0 -0
  471. package/skills/gsd-path/scripts/__pycache__/check_handoffs.cpython-312.pyc +0 -0
  472. package/skills/gsd-path-build/scripts/__pycache__/_common.cpython-312.pyc +0 -0
  473. package/skills/gsd-path-build/scripts/__pycache__/check_handoffs.cpython-312.pyc +0 -0
  474. package/skills/gsd-path-inspect/scripts/__pycache__/_common.cpython-312.pyc +0 -0
  475. package/skills/gsd-path-plan/scripts/__pycache__/_common.cpython-312.pyc +0 -0
  476. package/skills/gsd-path-ship/scripts/__pycache__/_common.cpython-312.pyc +0 -0
@@ -1,23 +1,27 @@
1
1
  #!/usr/bin/env python3
2
+ # gsd-path project runtime
2
3
  """Render a read-only coder intent view from the approved task and intent."""
3
4
 
4
5
  import argparse
5
6
  import hashlib
6
7
  import re
7
8
  import sys
9
+ sys.dont_write_bytecode = True
8
10
  from pathlib import Path
9
11
 
10
12
  try:
11
13
  from scripts import check_handoffs as contracts
14
+ from scripts import _common
12
15
  except ImportError:
13
16
  import check_handoffs as contracts
17
+ import _common
14
18
 
15
19
 
16
20
  def render(repo: Path, task: Path) -> str:
17
21
  intent_path = repo.resolve() / '.project/intent/INTENT.md'
18
22
  task = task.resolve()
19
- intent = intent_path.read_bytes().decode('utf-8')
20
- task_text = task.read_bytes().decode('utf-8')
23
+ intent = _common.read_user_text(intent_path)
24
+ task_text = _common.read_user_text(task)
21
25
  owned = contracts._owned_criteria(task_text, task.stem)
22
26
  criteria = contracts._success_criteria(intent)
23
27
  unknown = set(owned) - set(criteria)
@@ -40,7 +44,14 @@ def render(repo: Path, task: Path) -> str:
40
44
  if simple:
41
45
  before, after = intent[:section.start('body')], intent[section.end('body'):]
42
46
  # Corrections and task interfaces can explicitly refer to another SC.
43
- required = set(owned) | set(re.findall(r'\bSC\d+\b', before + after + task_text))
47
+ # The spec-probe tables name every SC by design, so they select nothing.
48
+ scanned = re.sub(r'(?ms)^## (?:Edge coverage|Prohibitions)[ \t]*\n.*?(?=^## |\Z)', '',
49
+ before + after)
50
+ required = set(owned) | set(re.findall(r'\bSC\d+\b', scanned + task_text))
51
+ # An owned criterion's edge or prohibition ruled into another SC needs that SC's text.
52
+ for rows in (contracts.edge_coverage(intent, criteria), contracts.prohibitions(intent, criteria)):
53
+ required |= {row['target'] for row in (rows or {}).values()
54
+ if row['target'] and row['criterion'] in owned}
44
55
  selected = ''.join(chunk for item, chunk in zip(items, chunks) if f'SC{item[1]}' in required)
45
56
  projected = before + '\n' + (selected or '- No criteria assigned.\n\n') + after
46
57
  mode = 'owned-criteria'
@@ -77,7 +77,7 @@ def run_workflow(repo: Path, action: str, project_dir: str, expected_head: str =
77
77
  head = subprocess.run(["git", "rev-parse", "--verify", "HEAD"],
78
78
  cwd=repo, capture_output=True, encoding="utf-8", errors="replace", check=True).stdout.strip()
79
79
  step("check_task_briefs.py", "--repo", str(repo), "--base", head,
80
- "--tasks-dir", f"{project_dir}/tasks")
80
+ "--tasks-dir", f"{project_dir}/tasks", "--project-dir", project_dir)
81
81
  panel = ["validate-plan", "--plan", str(repo / project_dir / "plan/PLAN.md"),
82
82
  "--intent", str(repo / project_dir / "intent/INTENT.md")]
83
83
  charter = repo / ".project/CHARTER.md"
@@ -199,7 +199,7 @@ def run_workflow(repo: Path, action: str, project_dir: str, expected_head: str =
199
199
  head = subprocess.run(["git", "rev-parse", "--verify", "HEAD"],
200
200
  cwd=repo, capture_output=True, encoding="utf-8", errors="replace", check=True).stdout.strip()
201
201
  step("check_task_briefs.py", "--repo", str(repo), "--base", head,
202
- "--tasks-dir", f"{project_dir}/tasks")
202
+ "--tasks-dir", f"{project_dir}/tasks", "--project-dir", project_dir)
203
203
  step("check_handoffs.py", "plan", *common)
204
204
  elif action == "prepare-task" and _task_member(repo, project_dir, task_id):
205
205
  # A member task works in a sidecar of its member; its Verify runs there at finish.
@@ -210,8 +210,14 @@ def run_workflow(repo: Path, action: str, project_dir: str, expected_head: str =
210
210
  "--base", expected_head, "--task-id", task_id,
211
211
  "--round-size", str(round_size))
212
212
  if task["mode"] == "serial":
213
+ name = f"task-{task_id.lower()}-verify"
214
+ stale = isolation.sidecar_root(repo, "verify", name)
215
+ if os.path.lexists(stale / ".git"):
216
+ # An earlier prepare-task left this sidecar. Only one that is proven untouched is replaced.
217
+ steps.append({"script": "isolation.py", "result": isolation.retire_stale_verify(
218
+ repo, stale, isolation.verify_branch_name(name))})
213
219
  step("isolation.py", "isolate-verify", "--repo", str(repo),
214
- "--base", expected_head, "--name", f"task-{task_id.lower()}-verify")
220
+ "--base", expected_head, "--name", name)
215
221
  elif action == "build-evidence":
216
222
  proof = step("build_state.py", "verify-landed", *common, "--head", expected_head)
217
223
  # The landing proof has one canonical home; lean final-review reuse allows only this path.
@@ -257,6 +263,9 @@ def run_workflow(repo: Path, action: str, project_dir: str, expected_head: str =
257
263
  ruled.add(row[0])
258
264
  if any(len(row) == 6 and row[4] == "NEEDS-USER" and row[0] not in ruled for row in queue):
259
265
  raise StepFailed("DOCS-AUDIT.md has NEEDS-USER rows without a user ruling")
266
+ if kind == "intent":
267
+ # Malformed or incomplete spec-probe tables are not a pre-approvable draft.
268
+ step("check_handoffs.py", "intent", *common)
260
269
  if kind == "plan":
261
270
  if gate_plan()["mode"] != "off":
262
271
  raise StepFailed("pre-approval requires review_panel off")
@@ -275,7 +284,8 @@ def run_workflow(repo: Path, action: str, project_dir: str, expected_head: str =
275
284
  if action == "approve-plan":
276
285
  step("pipeline_state.py", "approve", *common, "--kind", "plan",
277
286
  "--expected-head", expected_head)
278
- except (StepFailed, OSError, subprocess.CalledProcessError, ValueError, KeyError, TypeError) as error:
287
+ except (StepFailed, isolation.IsolationError, OSError, subprocess.CalledProcessError,
288
+ ValueError, KeyError, TypeError) as error:
279
289
  return {"status": "blocked", "reason": str(error), "steps": steps,
280
290
  "next": next_step}
281
291
  return {"status": "complete", "steps": steps, **outputs}
@@ -22,6 +22,27 @@ else:
22
22
  from scripts import _common
23
23
 
24
24
 
25
+ def _worktree_list_porcelain(primary: Path) -> tuple[str, bool]:
26
+ try:
27
+ if __package__:
28
+ from . import pipeline_git as pg
29
+ else:
30
+ from scripts import pipeline_git as pg
31
+ except ImportError:
32
+ try:
33
+ import pipeline_git as pg
34
+ except ImportError:
35
+ pg = None
36
+ if pg is not None:
37
+ return pg.worktree_list_porcelain(primary)
38
+ try:
39
+ output = _git(primary, "worktree", "list", "--porcelain", "-z")
40
+ return output, True
41
+ except ValueError:
42
+ output = _git(primary, "worktree", "list", "--porcelain")
43
+ return output, False
44
+
45
+
25
46
  def _git(primary: Path, *args: str) -> str:
26
47
  result = _common.run_git(primary, *args)
27
48
  if result.returncode:
@@ -82,6 +103,33 @@ def _workspace(primary: Path, pin: bool) -> Path:
82
103
  return workspace
83
104
 
84
105
 
106
+ def release_workspace(primary: Path) -> bool:
107
+ """Forget the pinned placement receipt once no linked worktrees remain.
108
+
109
+ Lets GSD_PATH_WORKTREE_ROOT (or a new default) apply again at the next
110
+ milestone's first allocation. Returns True when a receipt was removed;
111
+ any remaining linked worktree (including one only still registered) keeps
112
+ the pin.
113
+ """
114
+ primary = primary.resolve()
115
+ common = Path(_git(primary, "rev-parse", "--git-common-dir"))
116
+ common = (primary / common).resolve()
117
+ receipt = common / "gsd-path" / "workspaces" / f"{_identity(primary)}.json"
118
+ if not receipt.is_file():
119
+ return False
120
+ output, nul_separated = _worktree_list_porcelain(primary)
121
+ records = output.split("\0\0") if nul_separated else [
122
+ block for block in output.strip().split("\n\n") if block.strip()
123
+ ]
124
+ for record in records:
125
+ fields = record.split("\0") if nul_separated else record.splitlines()
126
+ for field in fields:
127
+ if field.startswith("worktree ") and Path(field[len("worktree "):]).resolve() != primary:
128
+ return False
129
+ receipt.unlink()
130
+ return True
131
+
132
+
85
133
  def worktree_path(primary: Path, kind: str, name: str, *, pin: bool = False) -> Path:
86
134
  primary = primary.resolve()
87
135
  if kind not in {"task", "verify", "integrate", "bound"} or not name or Path(name).name != name or name in {".", ".."}:
@@ -91,9 +139,13 @@ def worktree_path(primary: Path, kind: str, name: str, *, pin: bool = False) ->
91
139
  legacy = (primary.parent / f".{primary.name}-gsd-path-integrate-{name}"
92
140
  if kind == "integrate" else primary.parent / f"{primary.name}.gsd-path" / kind / name)
93
141
  branch = f"refs/heads/gsd-path-{kind}/{name}"
94
- records = _git(primary, "worktree", "list", "--porcelain", "-z").split("\0\0")
142
+ output, nul_separated = _worktree_list_porcelain(primary)
143
+ if nul_separated:
144
+ records = output.split("\0\0")
145
+ else:
146
+ records = [block for block in output.strip().split("\n\n") if block.strip()]
95
147
  for record in records:
96
- fields = record.split("\0")
148
+ fields = record.split("\0") if nul_separated else record.splitlines()
97
149
  # Compare as paths: git prints forward slashes on Windows.
98
150
  worktrees = [Path(field[len("worktree "):]) for field in fields if field.startswith("worktree ")]
99
151
  if legacy in worktrees and f"branch {branch}" in fields:
@@ -62,7 +62,11 @@ Worst drift: <one sentence — the most misleading claim found>
62
62
  ## Remediation queue
63
63
 
64
64
  <!-- Every non-verified claim, classified. The user rules on this queue;
65
- the auditor never fixes anything. -->
65
+ the auditor never fixes anything.
66
+ Numbers are unique and strictly increasing, not necessarily contiguous.
67
+ A persisting row keeps its number; a new row takes a number above every
68
+ prior queue number and every User rulings Queue #. Never reuse a retired
69
+ number: a ruling stays bound to the item it was made for. -->
66
70
 
67
71
  | # | Doc | Claim | Verdict | Class | Suggested action |
68
72
  |---|-----|-------|---------|-------|------------------|
@@ -13,11 +13,20 @@ Reviewed HEAD: <full SHA>
13
13
  Overall verdict: <pass | blocked>
14
14
 
15
15
  <!-- pass only when every criterion is met; blocked when any criterion is
16
- not-met or unverifiable. -->
16
+ not-met or unverifiable.
17
+ A criterion with a held-out edge (E#) or judgment prohibition (N#) in
18
+ INTENT.md is met only when Check, Observed, or Reference cites every such
19
+ id with its evidence; otherwise it is unverifiable with
20
+ `Finding: insufficient spec evidence: <id> ...`. -->
17
21
 
18
22
  ## Success criteria
19
23
 
20
- ### SC1 — <criterion copied verbatim from INTENT.md>
24
+ <!-- Each `### SCn —` title has every word of the criterion in INTENT.md
25
+ `## Success criteria`: join continuation lines and sub-bullets with a
26
+ single space (the `- ` markers of sub-bullets are optional). The gate
27
+ compares every other word. -->
28
+
29
+ ### SC1 — <criterion from INTENT.md>
21
30
 
22
31
  - **Verdict**: <met | not-met | unverifiable>
23
32
  - **Surface**: <exactly the surface name PLAN.md's Surface contract lists this criterion under, with no detail after it; omit the whole field for any other criterion>
@@ -57,6 +57,36 @@ paragraph the user signed off on — do not edit without a new sign-off.>
57
57
  1. <criterion — a thing you can run/measure/see>
58
58
  2. ...
59
59
 
60
+ ## Edge coverage
61
+
62
+ <!-- Written by define's edge probe (references/spec-probes.md). Walk every
63
+ success criterion; each applicable edge gets one row ruled by the user.
64
+ Disposition: criterion SCn (stated in that criterion) | held-out (a named
65
+ test pins the ruling written in Detail) | dismissed (Detail says why the
66
+ edge cannot occur). Every SCn appears at least once; a criterion with no
67
+ data shape gets category none, dismissed. Categories: boundary,
68
+ adjacency, empty, encoding, ordering, precision, idempotency,
69
+ concurrency, none. `check_handoffs.py intent` gates this table. -->
70
+
71
+ | Edge | Criterion | Category | Disposition | Detail |
72
+ |------|-----------|----------|-------------|--------|
73
+ | E1 | SC1 | <category> | <disposition> | <ruling, examples, or dismissal reason> |
74
+
75
+ ## Prohibitions
76
+
77
+ <!-- Written by define's prohibition probe. What each criterion must never
78
+ silently become: values, safety, privacy, fairness, transparency. Not
79
+ routine engineering, not generic security canon.
80
+ Disposition: criterion SCn (checkable; stated in that criterion) |
81
+ judgment (final reviewer judges it; Detail says what to look for) |
82
+ dismissed. A single row with Criterion `all`, Must not `none`, and
83
+ disposition dismissed, and no other row, records work that affects no
84
+ person directly. -->
85
+
86
+ | Prohibition | Criterion | Must not | Disposition | Detail |
87
+ |-------------|-----------|----------|-------------|--------|
88
+ | N1 | SC1 | <what it must never become> | <disposition> | <what the reviewer looks for, or why dismissed> |
89
+
60
90
  ## Scope: in
61
91
 
62
92
  <The smallest version that hits the success criteria. Bullet list.>
@@ -11,6 +11,6 @@ State: ship/blocked
11
11
  ### P001 — <short finding title>
12
12
 
13
13
  - **Source**: `.project/review/FINAL.md`
14
- - **Locator**: `<SC number or gap risk row>`
15
- - **Evidence**: <observed result copied from the source review>
16
- - **Fix direction**: <concrete direction for the patch task>
14
+ - **Locator**: <copy the full `Risk: ...` line from a gap review, or the `SC<n>` id from `FINAL.md`>
15
+ - **Evidence**: <copy the gap review's `Found` or `FINAL.md`'s `Finding` field verbatim>
16
+ - **Fix direction**: <copy the source's `Fix direction` field verbatim>
@@ -47,8 +47,8 @@ Goal: <the end-to-end slice that runs>
47
47
  Review depth: <full | deep | verify-only>
48
48
 
49
49
  <!-- More waves: features by dependency, then polish. Rules:
50
- - deps only in earlier waves, or same wave with no file overlap
51
- - no two same-wave tasks share files
50
+ - deps only in earlier waves or the same wave
51
+ - same-wave tasks share files only when one transitively depends on the other
52
52
  - nothing from INTENT.md scope-out appears anywhere -->
53
53
 
54
54
  ## Surface contract
@@ -83,6 +83,21 @@ Walkthrough:
83
83
  |-----------|------|------------|
84
84
  | SC1 | T001 | AC1 |
85
85
 
86
+ ## Held-out checks
87
+
88
+ <!-- Required when INTENT.md Edge coverage has a held-out edge; omit the
89
+ section entirely when it has none. One row per held-out edge, given to
90
+ the task that owns the edge's criterion. Test is a file listed in that
91
+ task's files (optionally `path::test_name`); the task's Verify runs it
92
+ and its Acceptance
93
+ criteria state the edge id and the ruling from INTENT.md Detail. Final
94
+ review cites this test's recorded result for the edge.
95
+ `scripts/check_handoffs.py plan` gates this table. -->
96
+
97
+ | Edge | Task | Test |
98
+ |------|------|------|
99
+ | E1 | T001 | <test path from T001 files> |
100
+
86
101
  ## Dependency notes
87
102
 
88
103
  <Per non-obvious edge: the exact data or landed effect that makes X precede Y,
@@ -14,12 +14,23 @@ Intent: `.project/intent/INTENT.md`
14
14
  <!-- Include every standard dimension exactly once. A custom dimension may
15
15
  supplement these rows, never replace a standard row. -->
16
16
  - `domain` — dispatched → `.project/research/evidence-domain.md` — <why this dimension ran>
17
- - `stack` — skipped → none — <why this dimension was skipped>
17
+ - `stack` — dispatched → `.project/research/evidence-stack.md` — <why this dimension ran>
18
18
  - `pitfalls` — skipped → none — <why this dimension was skipped>
19
19
  - `similar` — skipped → none — <why this dimension was skipped>
20
20
 
21
21
  ## Question assignments
22
22
 
23
23
  <!-- Copy every [RESEARCH] question from INTENT.md exactly once. Use `- none`
24
- only when INTENT.md has no [RESEARCH] questions. -->
25
- - `[RESEARCH] <question copied from INTENT.md>` → `domain`
24
+ only when INTENT.md has no [RESEARCH] questions. The question is a
25
+ CommonMark code span: choose a fence length not used by a backtick run in
26
+ the question (a longer fence is usually easiest), with one space of
27
+ padding on each side. Each row may target one or more dispatched
28
+ dimensions, each in its own code span and separated by commas. Every
29
+ dispatched dimension must receive a question and answer all its assigned
30
+ questions in its evidence file. For example:
31
+ - `` [RESEARCH] Does `Widget` match `sample.json`? `` → `domain`, `stack`
32
+ A question that ends in a backtick also needs padding, as in:
33
+ - `` [RESEARCH] Does the label end with `Widget`?` `` → `domain`
34
+ After removing the fence and CommonMark padding, the text must equal the
35
+ INTENT question exactly. -->
36
+ - `` [RESEARCH] <question copied from INTENT.md> `` → `domain`, `stack`
@@ -10,9 +10,10 @@ branch: null # bound per milestone as gsd-path/M00N; after integration
10
10
  # the router rebinds before any next-milestone file change
11
11
  # the bound branch is never main; ship integrates it there
12
12
  archive: null # persisted archive transaction path; never recomputed
13
- integration_default: direct # direct | pull-request; project setting
13
+ integration_default: direct # direct | pull-request | external-landing; project setting
14
14
  integration: direct # current milestone; may override the default before build
15
15
  integration_source: default # default | milestone; preserves override provenance
16
+ default_branch: main # origin default branch; initialization records it once, nothing changes it
16
17
  ---
17
18
 
18
19
  # Project State
@@ -11,6 +11,7 @@ task_branch: null # orchestrator-owned: gsd-path-task/<id> while parallel; nul
11
11
  # Optional explicit dispatch overrides: model: <advertised slug|inherit>
12
12
  # effort: <advertised effort|inherit>
13
13
  # repo: <member> # multi-repo only: the MEMBERS.md member this task changes; omit for the coordinator
14
+ # supersedes: [<task id>] # only when INTENT requires it: earlier-wave tasks whose behavior this task replaces; retires their Verify
14
15
  files: # every file this task may touch — dispatch checks overlap
15
16
  - <path>
16
17
  ---
@@ -10,10 +10,11 @@
10
10
  with actual values, otherwise omit them:
11
11
  Reviewed HEAD: <full review commit SHA>
12
12
  Review scope: final
13
- In each surface SC block also include Surface, Check, and Observed fields
14
- using the final-review format. Surface holds exactly the surface name from
15
- PLAN.md's Surface contract; put walkthrough detail in Check and Observed.
16
- Record the actual walkthrough evidence once. -->
13
+ In each surface SC block keep the mandatory `- ✅` / `- ❌` evidence line
14
+ (the wave gate requires it). Also include Surface, Check, and Observed
15
+ fields using the final-review format. Surface holds exactly the surface name
16
+ from PLAN.md's Surface contract; put walkthrough detail in Check and Observed.
17
+ The `- ✅` line may summarize Observed; do not omit it. -->
17
18
 
18
19
  Wave verdict: <pass | blocked — blocked if any task fails>
19
20
  Cycle: <C>
@@ -25,9 +26,17 @@ Tasks reviewed: <count>
25
26
 
26
27
  ## T001 — <title>: <pass | fail>
27
28
 
28
- <!-- Per task criterion: copy the full acceptance/interface criterion verbatim
29
- before the em dash; join wrapped lines with spaces. An AC id or summary
30
- alone cannot be matched by review_findings.py. -->
29
+ <!-- Task sections go in task id order (T001 before T002), not in the order
30
+ of the PLAN.md wave table. The heading title is the exact `title:` of
31
+ the task file. An evidence line starts with `- ✅ ` (pass) or `- ❌ `
32
+ (fail). A section needs one or more lines with the marker of its own
33
+ verdict, so a failed task needs a `- ❌ ` criterion line.
34
+ Per task criterion: copy every word of the acceptance/interface
35
+ criterion before the em dash; join wrapped lines and sub-bullets with
36
+ spaces (the `- ` markers of sub-bullets are optional). An AC id or
37
+ summary alone cannot be matched by review_findings.py.
38
+ Write literal markup and code in backticks inside a sentence: text
39
+ such as <b> outside backticks reads as an unfilled placeholder. -->
31
40
  - ✅ <criterion> — <evidence: verify output / file:line checked>
32
41
  - ❌ <criterion> — found: <what exists instead, file:line>
33
42
  fix: <concrete direction a coder can execute without re-investigating>
@@ -45,12 +54,22 @@ Contract violations (blocking):
45
54
  <!-- One heading per INTENT.md success criterion owned by a task in this
46
55
  wave, ending `: pass` or `: fail`. `scripts/check_handoffs.py wave
47
56
  --review <this file>` gates the SC id set and verdicts. Omit this
48
- section when no task in the wave owns an SC. -->
57
+ section when no task in the wave owns an SC.
58
+ Copy every word of the criterion from INTENT.md `## Success criteria`:
59
+ join indented continuation lines and sub-bullets with a single space
60
+ (the `- ` markers of sub-bullets are optional). The gate compares every
61
+ other word: no paraphrase, no dropped sub-bullet.
62
+ Each SC block needs an evidence line with the marker of its own
63
+ verdict: `- ✅ ` (pass) or `- ❌ ` (fail). -->
49
64
 
50
- ### SC1 — <criterion>: <pass | fail>
65
+ ### SC1 — <criterion from INTENT.md>: <pass | fail>
51
66
  - ✅ <evidence: verify output / file:line checked>
52
67
  - ❌ <criterion> — found: <what exists instead, file:line>
53
68
  fix: <concrete direction a coder can execute without re-investigating>
69
+ <!-- Quick-lane final scope (Review scope: final): add after the evidence line:
70
+ - **Surface**: <surface name from PLAN.md>
71
+ - **Check**: `<walkthrough command>`
72
+ - **Observed**: <what was seen> -->
54
73
 
55
74
  ## Fixed since last cycle
56
75
 
@@ -24,6 +24,14 @@ python3 <absolute dispatch_driver.py> round --repo <absolute primary> --wave <N>
24
24
  [--child-timeout <owner seconds>]
25
25
  ```
26
26
 
27
+ Use the absolute `dispatch_driver.py` from the active installed
28
+ `gsd-path-build` skill when orchestrating a consuming project's build; that
29
+ copy resolves role briefs and templates from its own skill bundle. The
30
+ repository or npm package also supports the top-level `scripts/dispatch_driver.py`:
31
+ when a default is not beside that script, it resolves from the shipped
32
+ `skills/gsd-path` bundle. Explicit `--role-brief`, `--task-template`, and
33
+ `--template` paths override those defaults and must name existing files.
34
+
27
35
  `round` owns the entry transition described in Preconditions and branch
28
36
  binding, checkpointed as `build: start milestone`, and sets `build/blocked`
29
37
  on a dependency deadlock or a blocked
@@ -120,6 +128,10 @@ dispatch contract and perform steps 1–5 by hand.
120
128
  rerun `recover`. The original lineage must stay reachable: keep a local
121
129
  branch on the old tip until the milestone ships. Adopted tasks report
122
130
  `attested` with `provenance: owner-authorized-rebase`.
131
+ - `block` with a `leftover` path: the task is landed, and that path is what
132
+ a failed removal left of its isolate; it holds nothing that Git does not
133
+ have. Do not set `build/blocked`. Stop with the returned reason; after
134
+ the path is removed, rerun `recover`.
123
135
  - `block` for any other reason: set `build/blocked` with the returned
124
136
  reason and stop.
125
137
  - `none`: take no recovery action for that task.
@@ -134,8 +146,27 @@ dispatch contract and perform steps 1–5 by hand.
134
146
  order, or overlap-check tasks in prose. Readiness is continuous, not
135
147
  layered: a task becomes selectable the moment its last dependency lands,
136
148
  even while unrelated tasks still run, so rerun `ready` after each landing.
149
+ Two tasks that each share a file with the same `done` task of an earlier
150
+ wave never run together: `ready` returns one and holds the other until the
151
+ first is `done`. The second then starts from a base that has the first
152
+ landing, and the step 5 rerun of the earlier Verify checks both edits. A
153
+ task with a retained isolate keeps its turn. A task that a `supersedes`
154
+ field retires still counts: the superseding task never runs together
155
+ with a task that shares a file with the superseded task.
137
156
  A `NEEDS-ORCHESTRATOR` block stays unselectable until its `Orchestrator
138
157
  answer` is recorded in the task Log and the task is back to `pending`.
158
+ An all-done wave whose latest canonical review cycle has any blocked lens
159
+ gates later waves: `ready` selects unfinished later tasks with a `## Review
160
+ findings` section that depend on it, sets `current_wave` to the earliest
161
+ repair wave, and adds `repair_for_wave` with the source wave. When no such
162
+ repair remains, `ready` returns no tasks and adds `blocked_review` (`wave`,
163
+ `cycle`, `waiting_waves`); a later passing canonical review cycle releases
164
+ the waiting waves.
165
+ `unreviewed_waves`, when present, lists earlier waves whose tasks are all
166
+ `done` and that have no canonical review file. A repair wave is not
167
+ listed: the next review cycle of its source wave judges it. `ready` reports
168
+ the listed waves and does not hold the returned tasks: run step 6 for each
169
+ listed wave before you dispatch.
139
170
  Its typed errors are the recovery rule:
140
171
  - `task-recovery-required`: for each listed failed or blocked task run
141
172
  `python3 <absolute build_state.py> reconcile --repo <absolute primary>
@@ -196,7 +227,7 @@ dispatch contract and perform steps 1–5 by hand.
196
227
  a later round unlocked by fresh landings records the later HEAD — and
197
228
  lint every ready task's brief with the bundled
198
229
  `scripts/check_task_briefs.py --repo <absolute repo root> --base <recorded
199
- base>` and re-check Intent coverage with
230
+ base> --project-dir <routed project dir>` and re-check Intent coverage with
200
231
  `python3 <absolute check_handoffs.py> plan --repo <absolute repo root>`
201
232
  before creating any worktree; a lint or coverage failure is a documented plan
202
233
  defect — repair it against INTENT.md and SYNTHESIS.md, then re-establish
@@ -248,7 +279,8 @@ dispatch contract and perform steps 1–5 by hand.
248
279
  defective task contract before establishing the round base. Run ready work
249
280
  up to capacity. Verify commands marked `Heavy: yes` (`verify_heavy` in the
250
281
  ready set) run one at a time across every concurrent task, including the
251
- step 5 rerun; light ones are unconstrained. Do not wait for the whole
282
+ step 5 rerun; light ones are unconstrained. `verify_heavy` is also true
283
+ when step 5 reruns a heavy Verify of an earlier task. Do not wait for the whole
252
284
  round before unlocking dependents: each task landing in step 5 re-opens
253
285
  step 2, and a newly ready
254
286
  task dispatches in a fresh round at the current clean HEAD while unrelated
@@ -274,8 +306,35 @@ dispatch contract and perform steps 1–5 by hand.
274
306
  native child tools; no child command is needed. It reproduces serial work
275
307
  in its prepared sidecar, runs authoritative Verify, records exact output,
276
308
  lands through `isolation.py`, records eligible ledger evidence, and retires
277
- the isolate. A `landed` receipt proves those steps; do not run them again
278
- or author another implementation narrative. A blocked receipt preserves
309
+ the isolate. Authoritative Verify is the task's own Verify, then the
310
+ Verify of each `done` task of an earlier wave, in the same repo, that
311
+ shares a declared file with this task. `finish` selects those commands;
312
+ never select them by hand. An earlier command does not run again in two
313
+ cases only: it is identical to the own Verify, or the own Verify is the
314
+ unchanged Verify that `fix-tasks` wrote from the task's `deps` and the
315
+ command belongs to one of them. A Verify that only contains the command
316
+ text does not replace the rerun. A failed earlier-task Verify blocks the landing as a
317
+ failed own Verify does. The receipt (`regressions`) and the task Log
318
+ entry `orchestrator regression Verify of <task id>` name the earlier
319
+ task. The ledger records only the own command.
320
+ A plan-approved `supersedes` field retires the Verify of each earlier
321
+ task that it names: `finish` does not run that Verify for the task, or
322
+ for a task that lands after the task is `done`. The receipt (`retired`)
323
+ and the task Log entry `orchestrator regression Verify of <task id>
324
+ retired: superseded by <task id>` name both tasks. When the generated
325
+ Verify of a fix task loses only the copy of a retired Verify, the
326
+ `retired` entry has the key `part` and the Log entry is `orchestrator
327
+ regression Verify of <fix task id>: part of <task id> retired:
328
+ superseded by <task id>`. The superseding
329
+ task inherits the role of each task that it names, also through a
330
+ chain: after it is `done`, its Verify runs in the place of the retired
331
+ Verify for each later landing that shares a file with a superseded
332
+ task, also in its own wave. The Log entry is `orchestrator regression
333
+ Verify of <task id> (supersedes <task id>)`.
334
+ A `landed` receipt proves those steps; do not run them again
335
+ or author another implementation narrative. A `cleanup_warning` on a
336
+ landing means only that the isolate was not removed: the task is landed,
337
+ and the next `round` or `finish` checks the isolate again. A blocked receipt preserves
279
338
  its failure evidence and follows the recovery rule, never a manual bypass.
280
339
  Keep the pre-finish declared-path check above. Each landing re-opens step 2
281
340
  so ready dependents can run while unrelated children remain in flight.
@@ -488,26 +547,69 @@ dispatch contract and perform steps 1–5 by hand.
488
547
  again.
489
548
  - Otherwise batch `fix_batches` into complete fix tasks from the task
490
549
  template — one task per batch, never one per finding — each carrying
491
- its groups' failed criteria and observed evidence verbatim. A group
550
+ its groups' failed criteria and observed evidence verbatim. Each batch
551
+ is in one repo: a batch with `repo` is for that member and its fix task
552
+ has `repo: <member>`; a batch without `repo` is for the coordinator. A
553
+ finding whose source tasks are in two repos gives one batch for each
554
+ repo. A group
492
555
  with `repeat` true is evidence its earlier fix failed, never a new
493
556
  finding; a re-review never spawns a duplicate fix task for a finding
494
- already carried. Write each fix task to `.project/tasks/` with `wave`
557
+ that a fix task not yet `done` already carries in the same repo. A
558
+ repeat after its fix
559
+ landed gets the next fix task. After a build recovery, a changed wave
560
+ is reviewed again from cycle 1; the fix tasks and PLAN.md repair wave
561
+ of the review that recovery set aside do not count for the new one.
562
+ Write each fix task to `.project/tasks/` with `wave`
495
563
  set to the current wave or a newly appended `## Wave N` heading in
496
- PLAN.md before dispatch. Its dependencies include every source task in
497
- the batch; its files match the batch. In `## Review findings`, use one
564
+ PLAN.md before dispatch. Its dependencies include every source task of
565
+ the batch that is in the same repo, and every landed fix task of the
566
+ same source wave and repo that carried one of its findings; its Verify
567
+ runs the Verify of those source tasks; its files are the batch files or a subset of them, never
568
+ none. When a finding names a fix site outside the batch files, follow
569
+ [build recovery](build-recovery.md) to plan, which adds a repair task
570
+ with those files, the batch's `## Review findings` and the same
571
+ dependencies; `repair-evidence` accepts that task. In
572
+ `## Review findings`, use one
498
573
  `### <locator>` block per group, `Criterion: <verbatim criterion>`, and
499
574
  every observation verbatim. Run the repair through the same isolated
500
575
  layer loop, even when its appended wave repairs an earlier blocked wave.
576
+ An appended repair wave has the highest wave number and still runs before
577
+ the pending waves, because `ready` gates them on the blocked wave (step
578
+ 2). Do not renumber waves or move the repair wave.
501
579
  After landing, call `review_findings.py repair-evidence --repo <primary>
502
580
  --wave <source wave> --cycle <source cycle> --task <repair id>` and save
503
- its JSON as the repair evidence for the next review. The helper validates
581
+ its JSON as the repair evidence for the next review. The helper selects
582
+ the batch by the repair's locators and repo, then validates
504
583
  the carried batch, original and repair landings, isolated product scope,
505
- unchanged source reports and reusable Verify. On success, brief the next
584
+ unchanged source reports and reusable Verify. For a member repair it
585
+ checks the product in the member repository, against the member commits
586
+ and the member Verify record, and the receipt adds `member`,
587
+ `member_base` and `member_commit`. Another change to the checked files
588
+ is accepted only when it is the landing of a linked repair: a `done`
589
+ task of the same repo that carries one of the repair's findings in
590
+ `## Review findings`, with the same locator and criterion, and is
591
+ joined to the repair by `deps`. A finding on an acceptance criterion of
592
+ a fix task counts as the finding that this fix task carries with the
593
+ same criterion; the same criterion text under another locator is
594
+ another finding. Linked
595
+ repairs in the repair base are in `earlier_repairs`. Linked repairs
596
+ after the repair are in `later_repairs`; then the landing and the
597
+ recorded Verify of the last one are the evidence, and `chain_files`
598
+ lists the files checked from the repair base to the tip: those of the
599
+ repair and of every later linked repair. From the repair base to the
600
+ parent of the repair landing, no landing can change these files, also
601
+ not a linked one. On success, brief the next
506
602
  original-wave review with this receipt and the reviewer role's
507
603
  **Re-review after a proven repair** contract. Reuse command evidence;
508
604
  the new review judges the repaired product against the original criteria.
509
605
  Preserve prior verdicts and source tasks. On helper rejection, resolve
510
606
  the evidence blocker rather than redispatching an already proven fix.
607
+ When the blocker cannot be resolved, for example `repair base contains
608
+ unlinked changes to original product` or `product changed after the
609
+ repair landing` because a task that is not a linked repair changed the
610
+ same files, run the next review cycle of the source wave in full at the
611
+ current HEAD, without the receipt. This is the supported fallback: it
612
+ needs no ruling and no plan change.
511
613
  At the cap, record all attempts in the STATE.md log and ask the user —
512
614
  through an interactive user-input tool when available — after linking
513
615
  the resolved absolute blocking wave review, every deep lens file for the
@@ -69,6 +69,19 @@ checks landed-task preservation and restored intent ownership, restores review
69
69
  evidence only for unchanged contracts, and creates the normal journaled plan
70
70
  checkpoint. A failed approval leaves recovery open.
71
71
 
72
+ A wave keeps its review evidence when INTENT.md, its own `## Wave N` section,
73
+ its task files, and every other non-wave PLAN.md section are byte-identical to
74
+ the recovery base. Two edits are exempt: the value of the `max_review_cycles`
75
+ and `wave_budget` lines in `## Config`, and all of `## Dependency notes`. In
76
+ `## Config` only those two values may change; any other edit there, a comment
77
+ edit included, drops the evidence of every wave, as does any other non-wave
78
+ edit. A `- review_panel:` line that is added, removed, or changed anywhere in
79
+ PLAN.md also drops the evidence of every wave. The approval result reports
80
+ this in `recovery_reviews`: `restored` lists the waves that kept their evidence, and
81
+ `review_again` lists each wave that lost it, with the reason. Review every
82
+ `review_again` wave again after build resumes; completion refuses a wave
83
+ without a passing review.
84
+
72
85
  Return through `plan/done → build/active` with event `build started`. The dispatch
73
86
  driver uses a separate record directory for this recovery base, while retaining
74
87
  the milestone budget ledger. Resume only from the new approved task inventory.
@@ -51,9 +51,13 @@ costs the run.
51
51
  2. Satisfy every acceptance criterion and every owned INTENT success
52
52
  criterion within the Approach constraints, matching conventions in the
53
53
  listed files.
54
- 3. Edit only exact paths in `files`, plus the task file's Log. There is no
55
- exception for imports, routes, generated files, or wiring.
56
- 4. Run Verify. Fix failures only within the allowed paths.
54
+ 3. Edit only paths in `files`, plus the task file's Log. A declared
55
+ directory covers the files below it; a declared file covers only itself.
56
+ There is no exception for imports, routes, generated files, or wiring.
57
+ 4. Run Verify. Fix failures only within the allowed paths. The orchestrator
58
+ also runs the Verify of each earlier-wave task that shares a file with
59
+ yours. A Log entry `orchestrator regression Verify of <task id>` with
60
+ `fail` names a task you broke; make its Verify pass too.
57
61
  5. Append the implementation and Verify result to Log. On a block, append the
58
62
  specific reason. Do not edit frontmatter state.
59
63