@opengsd/gsd-path 1.4.0 → 1.5.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 (347) hide show
  1. package/CHANGELOG.md +325 -344
  2. package/DOCS.md +12 -2
  3. package/FULL.md +3 -2
  4. package/HOOKS.md +95 -8
  5. package/QUICK.md +1 -1
  6. package/README.md +78 -110
  7. package/RUNTIME.md +1 -1
  8. package/UPDATE.md +4 -3
  9. package/WORKFLOW.md +22 -1
  10. package/package.json +5 -2
  11. package/platforms/shared-agents/dispatch.md +13 -0
  12. package/scripts/_common.py +149 -1
  13. package/scripts/archive_milestone.py +14 -13
  14. package/scripts/build_recovery.py +96 -31
  15. package/scripts/build_state.py +79 -3
  16. package/scripts/check_docs_audit.py +77 -4
  17. package/scripts/check_handoffs.py +546 -30
  18. package/scripts/check_task_briefs.py +279 -23
  19. package/scripts/detect_project.py +243 -18
  20. package/scripts/discussion_validate.py +86 -29
  21. package/scripts/dispatch_driver.py +392 -22
  22. package/scripts/git_guard.py +3 -3
  23. package/scripts/guard_hook.py +1416 -165
  24. package/scripts/install.mjs +23 -8
  25. package/scripts/install.py +49 -9
  26. package/scripts/integration.py +146 -1
  27. package/scripts/isolation.py +392 -60
  28. package/scripts/loop_run.py +16 -4
  29. package/scripts/members.py +11 -9
  30. package/scripts/path_config.py +3 -3
  31. package/scripts/pipeline_git.py +63 -12
  32. package/scripts/pipeline_state.py +111 -33
  33. package/scripts/pipeline_undo.py +101 -8
  34. package/scripts/runtime_store.py +20 -2
  35. package/scripts/skill-resources.json +9 -2
  36. package/scripts/state_checkpoint.py +9 -27
  37. package/scripts/status_runtime.py +22 -4
  38. package/scripts/task_context.py +12 -3
  39. package/scripts/wizard.mjs +1 -0
  40. package/scripts/workflow_run.py +5 -2
  41. package/scripts/worktree_paths.py +54 -2
  42. package/skills/gsd-path/DEFINE.md +28 -3
  43. package/skills/gsd-path/PLAN.md +11 -3
  44. package/skills/gsd-path/RESEARCH.md +11 -0
  45. package/skills/gsd-path/SHIP.md +6 -1
  46. package/skills/gsd-path/references/build-native.md +16 -1
  47. package/skills/gsd-path/references/dispatch.md +13 -0
  48. package/skills/gsd-path/references/docs-auditor.md +5 -0
  49. package/skills/gsd-path/references/planner.md +14 -4
  50. package/skills/gsd-path/references/reviewer-final.md +20 -2
  51. package/skills/gsd-path/references/reviewer-wave.md +15 -4
  52. package/skills/gsd-path/references/reviewer.md +3 -1
  53. package/skills/gsd-path/references/spec-probes.md +150 -0
  54. package/skills/gsd-path/scripts/_common.py +149 -1
  55. package/skills/gsd-path/scripts/archive_milestone.py +14 -13
  56. package/skills/gsd-path/scripts/build_recovery.py +96 -31
  57. package/skills/gsd-path/scripts/build_state.py +79 -3
  58. package/skills/gsd-path/scripts/check_docs_audit.py +77 -4
  59. package/skills/gsd-path/scripts/check_handoffs.py +546 -30
  60. package/skills/gsd-path/scripts/check_task_briefs.py +279 -23
  61. package/skills/gsd-path/scripts/detect_project.py +243 -18
  62. package/skills/gsd-path/scripts/discussion_validate.py +86 -29
  63. package/skills/gsd-path/scripts/dispatch_driver.py +392 -22
  64. package/skills/gsd-path/scripts/git_guard.py +3 -3
  65. package/skills/gsd-path/scripts/integration.py +146 -1
  66. package/skills/gsd-path/scripts/isolation.py +392 -60
  67. package/skills/gsd-path/scripts/loop_run.py +16 -4
  68. package/skills/gsd-path/scripts/members.py +11 -9
  69. package/skills/gsd-path/scripts/path_config.py +3 -3
  70. package/skills/gsd-path/scripts/pipeline_git.py +63 -12
  71. package/skills/gsd-path/scripts/pipeline_state.py +111 -33
  72. package/skills/gsd-path/scripts/state_checkpoint.py +9 -27
  73. package/skills/gsd-path/scripts/status_runtime.py +22 -4
  74. package/skills/gsd-path/scripts/task_context.py +12 -3
  75. package/skills/gsd-path/scripts/workflow_run.py +5 -2
  76. package/skills/gsd-path/scripts/worktree_paths.py +54 -2
  77. package/skills/gsd-path/templates/docs-audit.md +5 -1
  78. package/skills/gsd-path/templates/final-review.md +11 -2
  79. package/skills/gsd-path/templates/intent.md +30 -0
  80. package/skills/gsd-path/templates/patch-findings.md +3 -3
  81. package/skills/gsd-path/templates/plan.md +17 -2
  82. package/skills/gsd-path/templates/research-handoff.md +14 -3
  83. package/skills/gsd-path/templates/state.md +1 -1
  84. package/skills/gsd-path/templates/wave-review.md +16 -6
  85. package/skills/gsd-path-build/references/build-native.md +16 -1
  86. package/skills/gsd-path-build/references/dispatch.md +13 -0
  87. package/skills/gsd-path-build/references/reviewer-final.md +20 -2
  88. package/skills/gsd-path-build/references/reviewer-wave.md +15 -4
  89. package/skills/gsd-path-build/references/reviewer.md +3 -1
  90. package/skills/gsd-path-build/references/spec-probes.md +150 -0
  91. package/skills/gsd-path-build/scripts/_common.py +149 -1
  92. package/skills/gsd-path-build/scripts/archive_milestone.py +14 -13
  93. package/skills/gsd-path-build/scripts/build_recovery.py +96 -31
  94. package/skills/gsd-path-build/scripts/build_state.py +79 -3
  95. package/skills/gsd-path-build/scripts/check_handoffs.py +546 -30
  96. package/skills/gsd-path-build/scripts/check_task_briefs.py +279 -23
  97. package/skills/gsd-path-build/scripts/detect_project.py +243 -18
  98. package/skills/gsd-path-build/scripts/discussion_validate.py +86 -29
  99. package/skills/gsd-path-build/scripts/dispatch_driver.py +392 -22
  100. package/skills/gsd-path-build/scripts/integration.py +146 -1
  101. package/skills/gsd-path-build/scripts/isolation.py +392 -60
  102. package/skills/gsd-path-build/scripts/loop_run.py +16 -4
  103. package/skills/gsd-path-build/scripts/members.py +11 -9
  104. package/skills/gsd-path-build/scripts/path_config.py +3 -3
  105. package/skills/gsd-path-build/scripts/pipeline_git.py +63 -12
  106. package/skills/gsd-path-build/scripts/pipeline_state.py +111 -33
  107. package/skills/gsd-path-build/scripts/state_checkpoint.py +9 -27
  108. package/skills/gsd-path-build/scripts/task_context.py +12 -3
  109. package/skills/gsd-path-build/scripts/workflow_run.py +5 -2
  110. package/skills/gsd-path-build/scripts/worktree_paths.py +54 -2
  111. package/skills/gsd-path-build/templates/wave-review.md +16 -6
  112. package/skills/gsd-path-decide/references/dispatch.md +13 -0
  113. package/skills/gsd-path-decide/scripts/_common.py +149 -1
  114. package/skills/gsd-path-decide/scripts/archive_milestone.py +14 -13
  115. package/skills/gsd-path-decide/scripts/build_recovery.py +96 -31
  116. package/skills/gsd-path-decide/scripts/check_handoffs.py +546 -30
  117. package/skills/gsd-path-decide/scripts/check_task_briefs.py +279 -23
  118. package/skills/gsd-path-decide/scripts/detect_project.py +243 -18
  119. package/skills/gsd-path-decide/scripts/discussion_validate.py +86 -29
  120. package/skills/gsd-path-decide/scripts/integration.py +146 -1
  121. package/skills/gsd-path-decide/scripts/isolation.py +392 -60
  122. package/skills/gsd-path-decide/scripts/loop_run.py +16 -4
  123. package/skills/gsd-path-decide/scripts/members.py +11 -9
  124. package/skills/gsd-path-decide/scripts/path_config.py +3 -3
  125. package/skills/gsd-path-decide/scripts/pipeline_git.py +63 -12
  126. package/skills/gsd-path-decide/scripts/pipeline_state.py +111 -33
  127. package/skills/gsd-path-decide/scripts/state_checkpoint.py +9 -27
  128. package/skills/gsd-path-decide/scripts/worktree_paths.py +54 -2
  129. package/skills/gsd-path-define/SKILL.md +28 -3
  130. package/skills/gsd-path-define/references/spec-probes.md +150 -0
  131. package/skills/gsd-path-define/scripts/_common.py +149 -1
  132. package/skills/gsd-path-define/scripts/archive_milestone.py +14 -13
  133. package/skills/gsd-path-define/scripts/build_recovery.py +96 -31
  134. package/skills/gsd-path-define/scripts/check_handoffs.py +546 -30
  135. package/skills/gsd-path-define/scripts/check_task_briefs.py +279 -23
  136. package/skills/gsd-path-define/scripts/detect_project.py +243 -18
  137. package/skills/gsd-path-define/scripts/discussion_validate.py +86 -29
  138. package/skills/gsd-path-define/scripts/integration.py +146 -1
  139. package/skills/gsd-path-define/scripts/isolation.py +392 -60
  140. package/skills/gsd-path-define/scripts/loop_run.py +16 -4
  141. package/skills/gsd-path-define/scripts/members.py +11 -9
  142. package/skills/gsd-path-define/scripts/path_config.py +3 -3
  143. package/skills/gsd-path-define/scripts/pipeline_git.py +63 -12
  144. package/skills/gsd-path-define/scripts/pipeline_state.py +111 -33
  145. package/skills/gsd-path-define/scripts/state_checkpoint.py +9 -27
  146. package/skills/gsd-path-define/scripts/worktree_paths.py +54 -2
  147. package/skills/gsd-path-define/templates/intent.md +30 -0
  148. package/skills/gsd-path-define/templates/state.md +1 -1
  149. package/skills/gsd-path-discuss/scripts/_common.py +149 -1
  150. package/skills/gsd-path-discuss/scripts/loop_run.py +16 -4
  151. package/skills/gsd-path-discuss/scripts/path_config.py +3 -3
  152. package/skills/gsd-path-discuss/scripts/worktree_paths.py +54 -2
  153. package/skills/gsd-path-docs-audit/references/dispatch.md +13 -0
  154. package/skills/gsd-path-docs-audit/references/docs-auditor.md +5 -0
  155. package/skills/gsd-path-docs-audit/scripts/_common.py +149 -1
  156. package/skills/gsd-path-docs-audit/scripts/archive_milestone.py +14 -13
  157. package/skills/gsd-path-docs-audit/scripts/build_recovery.py +96 -31
  158. package/skills/gsd-path-docs-audit/scripts/check_docs_audit.py +77 -4
  159. package/skills/gsd-path-docs-audit/scripts/check_handoffs.py +546 -30
  160. package/skills/gsd-path-docs-audit/scripts/check_task_briefs.py +279 -23
  161. package/skills/gsd-path-docs-audit/scripts/detect_project.py +243 -18
  162. package/skills/gsd-path-docs-audit/scripts/discussion_validate.py +86 -29
  163. package/skills/gsd-path-docs-audit/scripts/integration.py +146 -1
  164. package/skills/gsd-path-docs-audit/scripts/isolation.py +392 -60
  165. package/skills/gsd-path-docs-audit/scripts/loop_run.py +16 -4
  166. package/skills/gsd-path-docs-audit/scripts/members.py +11 -9
  167. package/skills/gsd-path-docs-audit/scripts/path_config.py +3 -3
  168. package/skills/gsd-path-docs-audit/scripts/pipeline_git.py +63 -12
  169. package/skills/gsd-path-docs-audit/scripts/pipeline_state.py +111 -33
  170. package/skills/gsd-path-docs-audit/scripts/state_checkpoint.py +9 -27
  171. package/skills/gsd-path-docs-audit/scripts/worktree_paths.py +54 -2
  172. package/skills/gsd-path-docs-audit/templates/docs-audit.md +5 -1
  173. package/skills/gsd-path-forensics/scripts/_common.py +149 -1
  174. package/skills/gsd-path-forensics/scripts/loop_run.py +16 -4
  175. package/skills/gsd-path-forensics/scripts/path_config.py +3 -3
  176. package/skills/gsd-path-forensics/scripts/pipeline_undo.py +101 -8
  177. package/skills/gsd-path-forensics/scripts/worktree_paths.py +54 -2
  178. package/skills/gsd-path-inspect/references/dispatch.md +13 -0
  179. package/skills/gsd-path-inspect/references/docs-auditor.md +5 -0
  180. package/skills/gsd-path-inspect/scripts/_common.py +149 -1
  181. package/skills/gsd-path-inspect/scripts/archive_milestone.py +14 -13
  182. package/skills/gsd-path-inspect/scripts/build_recovery.py +96 -31
  183. package/skills/gsd-path-inspect/scripts/check_docs_audit.py +77 -4
  184. package/skills/gsd-path-inspect/scripts/check_handoffs.py +546 -30
  185. package/skills/gsd-path-inspect/scripts/check_task_briefs.py +279 -23
  186. package/skills/gsd-path-inspect/scripts/detect_project.py +243 -18
  187. package/skills/gsd-path-inspect/scripts/discussion_validate.py +86 -29
  188. package/skills/gsd-path-inspect/scripts/integration.py +146 -1
  189. package/skills/gsd-path-inspect/scripts/isolation.py +392 -60
  190. package/skills/gsd-path-inspect/scripts/loop_run.py +16 -4
  191. package/skills/gsd-path-inspect/scripts/members.py +11 -9
  192. package/skills/gsd-path-inspect/scripts/path_config.py +3 -3
  193. package/skills/gsd-path-inspect/scripts/pipeline_git.py +63 -12
  194. package/skills/gsd-path-inspect/scripts/pipeline_state.py +111 -33
  195. package/skills/gsd-path-inspect/scripts/state_checkpoint.py +9 -27
  196. package/skills/gsd-path-inspect/scripts/workflow_run.py +5 -2
  197. package/skills/gsd-path-inspect/scripts/worktree_paths.py +54 -2
  198. package/skills/gsd-path-inspect/templates/docs-audit.md +5 -1
  199. package/skills/gsd-path-inspect/templates/state.md +1 -1
  200. package/skills/gsd-path-loop/scripts/_common.py +149 -1
  201. package/skills/gsd-path-loop/scripts/loop_run.py +16 -4
  202. package/skills/gsd-path-loop/scripts/path_config.py +3 -3
  203. package/skills/gsd-path-loop/scripts/worktree_paths.py +54 -2
  204. package/skills/gsd-path-migrate/scripts/_common.py +149 -1
  205. package/skills/gsd-path-migrate/scripts/loop_run.py +16 -4
  206. package/skills/gsd-path-migrate/scripts/path_config.py +3 -3
  207. package/skills/gsd-path-plan/SKILL.md +11 -3
  208. package/skills/gsd-path-plan/references/dispatch.md +13 -0
  209. package/skills/gsd-path-plan/references/planner.md +14 -4
  210. package/skills/gsd-path-plan/references/spec-probes.md +150 -0
  211. package/skills/gsd-path-plan/scripts/_common.py +149 -1
  212. package/skills/gsd-path-plan/scripts/archive_milestone.py +14 -13
  213. package/skills/gsd-path-plan/scripts/build_recovery.py +96 -31
  214. package/skills/gsd-path-plan/scripts/check_handoffs.py +546 -30
  215. package/skills/gsd-path-plan/scripts/check_task_briefs.py +279 -23
  216. package/skills/gsd-path-plan/scripts/detect_project.py +243 -18
  217. package/skills/gsd-path-plan/scripts/discussion_validate.py +86 -29
  218. package/skills/gsd-path-plan/scripts/integration.py +146 -1
  219. package/skills/gsd-path-plan/scripts/isolation.py +392 -60
  220. package/skills/gsd-path-plan/scripts/loop_run.py +16 -4
  221. package/skills/gsd-path-plan/scripts/members.py +11 -9
  222. package/skills/gsd-path-plan/scripts/path_config.py +3 -3
  223. package/skills/gsd-path-plan/scripts/pipeline_git.py +63 -12
  224. package/skills/gsd-path-plan/scripts/pipeline_state.py +111 -33
  225. package/skills/gsd-path-plan/scripts/state_checkpoint.py +9 -27
  226. package/skills/gsd-path-plan/scripts/workflow_run.py +5 -2
  227. package/skills/gsd-path-plan/scripts/worktree_paths.py +54 -2
  228. package/skills/gsd-path-plan/templates/patch-findings.md +3 -3
  229. package/skills/gsd-path-plan/templates/plan.md +17 -2
  230. package/skills/gsd-path-research/SKILL.md +11 -0
  231. package/skills/gsd-path-research/references/dispatch.md +13 -0
  232. package/skills/gsd-path-research/scripts/_common.py +149 -1
  233. package/skills/gsd-path-research/scripts/archive_milestone.py +14 -13
  234. package/skills/gsd-path-research/scripts/build_recovery.py +96 -31
  235. package/skills/gsd-path-research/scripts/check_handoffs.py +546 -30
  236. package/skills/gsd-path-research/scripts/check_task_briefs.py +279 -23
  237. package/skills/gsd-path-research/scripts/detect_project.py +243 -18
  238. package/skills/gsd-path-research/scripts/discussion_validate.py +86 -29
  239. package/skills/gsd-path-research/scripts/integration.py +146 -1
  240. package/skills/gsd-path-research/scripts/isolation.py +392 -60
  241. package/skills/gsd-path-research/scripts/loop_run.py +16 -4
  242. package/skills/gsd-path-research/scripts/members.py +11 -9
  243. package/skills/gsd-path-research/scripts/path_config.py +3 -3
  244. package/skills/gsd-path-research/scripts/pipeline_git.py +63 -12
  245. package/skills/gsd-path-research/scripts/pipeline_state.py +111 -33
  246. package/skills/gsd-path-research/scripts/state_checkpoint.py +9 -27
  247. package/skills/gsd-path-research/scripts/worktree_paths.py +54 -2
  248. package/skills/gsd-path-research/templates/research-handoff.md +14 -3
  249. package/skills/gsd-path-roadmap/references/dispatch.md +13 -0
  250. package/skills/gsd-path-roadmap/scripts/_common.py +149 -1
  251. package/skills/gsd-path-roadmap/scripts/archive_milestone.py +14 -13
  252. package/skills/gsd-path-roadmap/scripts/build_recovery.py +96 -31
  253. package/skills/gsd-path-roadmap/scripts/check_handoffs.py +546 -30
  254. package/skills/gsd-path-roadmap/scripts/check_task_briefs.py +279 -23
  255. package/skills/gsd-path-roadmap/scripts/detect_project.py +243 -18
  256. package/skills/gsd-path-roadmap/scripts/discussion_validate.py +86 -29
  257. package/skills/gsd-path-roadmap/scripts/integration.py +146 -1
  258. package/skills/gsd-path-roadmap/scripts/isolation.py +392 -60
  259. package/skills/gsd-path-roadmap/scripts/loop_run.py +16 -4
  260. package/skills/gsd-path-roadmap/scripts/members.py +11 -9
  261. package/skills/gsd-path-roadmap/scripts/path_config.py +3 -3
  262. package/skills/gsd-path-roadmap/scripts/pipeline_git.py +63 -12
  263. package/skills/gsd-path-roadmap/scripts/pipeline_state.py +111 -33
  264. package/skills/gsd-path-roadmap/scripts/state_checkpoint.py +9 -27
  265. package/skills/gsd-path-roadmap/scripts/worktree_paths.py +54 -2
  266. package/skills/gsd-path-ship/SKILL.md +6 -1
  267. package/skills/gsd-path-ship/references/dispatch.md +13 -0
  268. package/skills/gsd-path-ship/references/reviewer-final.md +20 -2
  269. package/skills/gsd-path-ship/references/reviewer-wave.md +15 -4
  270. package/skills/gsd-path-ship/references/reviewer.md +3 -1
  271. package/skills/gsd-path-ship/references/spec-probes.md +150 -0
  272. package/skills/gsd-path-ship/scripts/_common.py +149 -1
  273. package/skills/gsd-path-ship/scripts/archive_milestone.py +14 -13
  274. package/skills/gsd-path-ship/scripts/build_recovery.py +96 -31
  275. package/skills/gsd-path-ship/scripts/build_state.py +79 -3
  276. package/skills/gsd-path-ship/scripts/check_handoffs.py +546 -30
  277. package/skills/gsd-path-ship/scripts/check_task_briefs.py +279 -23
  278. package/skills/gsd-path-ship/scripts/detect_project.py +243 -18
  279. package/skills/gsd-path-ship/scripts/discussion_validate.py +86 -29
  280. package/skills/gsd-path-ship/scripts/integration.py +146 -1
  281. package/skills/gsd-path-ship/scripts/isolation.py +392 -60
  282. package/skills/gsd-path-ship/scripts/loop_run.py +16 -4
  283. package/skills/gsd-path-ship/scripts/members.py +11 -9
  284. package/skills/gsd-path-ship/scripts/path_config.py +3 -3
  285. package/skills/gsd-path-ship/scripts/pipeline_git.py +63 -12
  286. package/skills/gsd-path-ship/scripts/pipeline_state.py +111 -33
  287. package/skills/gsd-path-ship/scripts/state_checkpoint.py +9 -27
  288. package/skills/gsd-path-ship/scripts/workflow_run.py +5 -2
  289. package/skills/gsd-path-ship/scripts/worktree_paths.py +54 -2
  290. package/skills/gsd-path-ship/templates/final-review.md +11 -2
  291. package/skills/gsd-path-ship/templates/patch-findings.md +3 -3
  292. package/skills/gsd-path-ship/templates/wave-review.md +16 -6
  293. package/skills/gsd-path-undo/scripts/_common.py +149 -1
  294. package/skills/gsd-path-undo/scripts/loop_run.py +16 -4
  295. package/skills/gsd-path-undo/scripts/path_config.py +3 -3
  296. package/skills/gsd-path-undo/scripts/pipeline_undo.py +101 -8
  297. package/skills/gsd-path-undo/scripts/worktree_paths.py +54 -2
  298. package/skills/path/DEFINE.md +28 -3
  299. package/skills/path/PLAN.md +11 -3
  300. package/skills/path/RESEARCH.md +11 -0
  301. package/skills/path/SHIP.md +6 -1
  302. package/skills/path/references/build-native.md +16 -1
  303. package/skills/path/references/dispatch.md +13 -0
  304. package/skills/path/references/docs-auditor.md +5 -0
  305. package/skills/path/references/planner.md +14 -4
  306. package/skills/path/references/reviewer-final.md +20 -2
  307. package/skills/path/references/reviewer-wave.md +15 -4
  308. package/skills/path/references/reviewer.md +3 -1
  309. package/skills/path/references/spec-probes.md +150 -0
  310. package/skills/path/scripts/_common.py +149 -1
  311. package/skills/path/scripts/archive_milestone.py +14 -13
  312. package/skills/path/scripts/build_recovery.py +96 -31
  313. package/skills/path/scripts/build_state.py +79 -3
  314. package/skills/path/scripts/check_docs_audit.py +77 -4
  315. package/skills/path/scripts/check_handoffs.py +546 -30
  316. package/skills/path/scripts/check_task_briefs.py +279 -23
  317. package/skills/path/scripts/detect_project.py +243 -18
  318. package/skills/path/scripts/discussion_validate.py +86 -29
  319. package/skills/path/scripts/dispatch_driver.py +392 -22
  320. package/skills/path/scripts/git_guard.py +3 -3
  321. package/skills/path/scripts/integration.py +146 -1
  322. package/skills/path/scripts/isolation.py +392 -60
  323. package/skills/path/scripts/loop_run.py +16 -4
  324. package/skills/path/scripts/members.py +11 -9
  325. package/skills/path/scripts/path_config.py +3 -3
  326. package/skills/path/scripts/pipeline_git.py +63 -12
  327. package/skills/path/scripts/pipeline_state.py +111 -33
  328. package/skills/path/scripts/state_checkpoint.py +9 -27
  329. package/skills/path/scripts/status_runtime.py +22 -4
  330. package/skills/path/scripts/task_context.py +12 -3
  331. package/skills/path/scripts/workflow_run.py +5 -2
  332. package/skills/path/scripts/worktree_paths.py +54 -2
  333. package/skills/path/templates/docs-audit.md +5 -1
  334. package/skills/path/templates/final-review.md +11 -2
  335. package/skills/path/templates/intent.md +30 -0
  336. package/skills/path/templates/patch-findings.md +3 -3
  337. package/skills/path/templates/plan.md +17 -2
  338. package/skills/path/templates/research-handoff.md +14 -3
  339. package/skills/path/templates/state.md +1 -1
  340. package/skills/path/templates/wave-review.md +16 -6
  341. package/skills/gsd-path/scripts/__pycache__/_common.cpython-312.pyc +0 -0
  342. package/skills/gsd-path/scripts/__pycache__/check_handoffs.cpython-312.pyc +0 -0
  343. package/skills/gsd-path-build/scripts/__pycache__/_common.cpython-312.pyc +0 -0
  344. package/skills/gsd-path-build/scripts/__pycache__/check_handoffs.cpython-312.pyc +0 -0
  345. package/skills/gsd-path-inspect/scripts/__pycache__/_common.cpython-312.pyc +0 -0
  346. package/skills/gsd-path-plan/scripts/__pycache__/_common.cpython-312.pyc +0 -0
  347. package/skills/gsd-path-ship/scripts/__pycache__/_common.cpython-312.pyc +0 -0
@@ -24,7 +24,7 @@ if __package__:
24
24
  )
25
25
  from .pipeline_git import task_commit_subject
26
26
  from .pipeline_state import PipelineStateError, load_state
27
- from . import _common
27
+ from . import _common, check_handoffs
28
28
  else:
29
29
  try:
30
30
  from check_task_briefs import _frontmatter, _sections
@@ -37,6 +37,7 @@ else:
37
37
  from pipeline_git import task_commit_subject
38
38
  from pipeline_state import PipelineStateError, load_state
39
39
  import _common
40
+ import check_handoffs
40
41
  except ImportError: # pragma: no cover - package imports used by tests
41
42
  from scripts.check_task_briefs import _frontmatter, _sections
42
43
  from scripts.isolation import (
@@ -47,7 +48,7 @@ else:
47
48
  )
48
49
  from scripts.pipeline_git import task_commit_subject
49
50
  from scripts.pipeline_state import PipelineStateError, load_state
50
- from scripts import _common
51
+ from scripts import _common, check_handoffs
51
52
 
52
53
 
53
54
  DEFAULT_PROJECT_DIR = ".project"
@@ -57,6 +58,10 @@ FULL_SHA_RE = re.compile(r"^[0-9a-f]{40}$")
57
58
  # recover verdicts that count as landed, mapped to their evidence classification.
58
59
  LANDED_VERDICTS = {"recovered": "proven-landed", "attested": "attested"}
59
60
  WAVE_HEADING_RE = re.compile(r"(?m)^## Wave (?P<wave>\d+)\b.*$")
61
+ REVIEW_VERDICT_RE = re.compile(
62
+ r"(?m)^Wave verdict:\s*(?P<verdict>pass|blocked)\s*(?:<!--.*?-->)?\s*$"
63
+ )
64
+ REVIEW_FINDINGS_HEADING = "Review findings"
60
65
  VERIFY_HEAVY_RE = re.compile(r"(?m)^Heavy:\s*(?P<value>yes|no)\s*(?:<!--.*-->)?\s*$")
61
66
  VALID_TASK_STATUSES = {"pending", "in-progress", "done", "failed", "blocked"}
62
67
  VERIFY_RESULTS = _common.VERIFY_RESULTS
@@ -88,6 +93,7 @@ class Task:
88
93
  task_file: str
89
94
  verify_heavy: bool
90
95
  repo: str = ""
96
+ review_findings: bool = False
91
97
 
92
98
 
93
99
  @dataclass(frozen=True)
@@ -241,6 +247,7 @@ def _parse_task(path: Path, relative_path: str, task_file: Optional[str] = None)
241
247
  task_file=task_file or relative_path,
242
248
  verify_heavy=_verify_heavy(text, label),
243
249
  repo=str(fields.get("repo") or ""),
250
+ review_findings=REVIEW_FINDINGS_HEADING in _sections(text),
244
251
  )
245
252
 
246
253
 
@@ -485,6 +492,36 @@ def _overlap(left: Task, right: Task) -> List[str]:
485
492
  return sorted(set(left.files) & set(right.files))
486
493
 
487
494
 
495
+ def _blocked_wave_reviews(project: Project) -> Dict[int, int]:
496
+ """Return waves whose highest canonical review cycle has a blocked lens."""
497
+
498
+ review_dir = project.tasks_dir.parent / "review"
499
+ if review_dir.is_symlink() or not review_dir.is_dir():
500
+ return {}
501
+
502
+ latest: Dict[int, int] = {}
503
+ verdicts: Dict[Tuple[int, int], List[str]] = {}
504
+ for path in sorted(review_dir.iterdir()):
505
+ named = check_handoffs.WAVE_REVIEW_NAME.fullmatch(path.name)
506
+ if named is None or path.is_symlink() or not path.is_file():
507
+ continue
508
+ wave, cycle = int(named.group("wave")), int(named.group("cycle"))
509
+ latest[wave] = max(latest.get(wave, 0), cycle)
510
+ try:
511
+ text = path.read_text(encoding="utf-8")
512
+ except (OSError, UnicodeDecodeError):
513
+ continue
514
+ verdict = REVIEW_VERDICT_RE.search(text)
515
+ if verdict is not None:
516
+ verdicts.setdefault((wave, cycle), []).append(verdict.group("verdict"))
517
+
518
+ return {
519
+ wave: cycle
520
+ for wave, cycle in latest.items()
521
+ if "blocked" in verdicts.get((wave, cycle), [])
522
+ }
523
+
524
+
488
525
  def ready(repo: str, project_dir: str = DEFAULT_PROJECT_DIR, *,
489
526
  allow_done: bool = False) -> Dict[str, object]:
490
527
  """Return task readiness, optionally accepting build/done for completion checks."""
@@ -494,6 +531,39 @@ def ready(repo: str, project_dir: str = DEFAULT_PROJECT_DIR, *,
494
531
  by_id = {task.task_id: task for task in project.tasks}
495
532
  unfinished_waves = sorted({task.wave for task in project.tasks if task.status != "done"})
496
533
  current_wave = unfinished_waves[0] if unfinished_waves else None
534
+ blocked_reviews = _blocked_wave_reviews(project)
535
+ blocked_wave = min(
536
+ (
537
+ wave
538
+ for wave in blocked_reviews
539
+ if (current_wave is None or wave < current_wave)
540
+ and any(task.wave == wave for task in project.tasks)
541
+ and all(task.status == "done" for task in project.tasks if task.wave == wave)
542
+ ),
543
+ default=None,
544
+ )
545
+ repair_for_wave: Optional[int] = None
546
+ blocked_review: Optional[Dict[str, object]] = None
547
+ if blocked_wave is not None:
548
+ source_ids = {task.task_id for task in project.tasks if task.wave == blocked_wave}
549
+ repairs = [
550
+ task
551
+ for task in project.tasks
552
+ if task.status != "done"
553
+ and task.wave > blocked_wave
554
+ and task.review_findings
555
+ and source_ids.intersection(task.deps)
556
+ ]
557
+ if repairs:
558
+ repair_for_wave = blocked_wave
559
+ current_wave = min(task.wave for task in repairs)
560
+ else:
561
+ current_wave = blocked_wave
562
+ blocked_review = {
563
+ "wave": blocked_wave,
564
+ "cycle": blocked_reviews[blocked_wave],
565
+ "waiting_waves": unfinished_waves,
566
+ }
497
567
  active = [task for task in project.tasks if task.status == "in-progress"]
498
568
  if current_wave is not None and any(task.wave != current_wave for task in active):
499
569
  task = next(task for task in active if task.wave != current_wave)
@@ -536,7 +606,7 @@ def ready(repo: str, project_dir: str = DEFAULT_PROJECT_DIR, *,
536
606
  )
537
607
 
538
608
  wave_active = any(task.wave == current_wave for task in active)
539
- if current_wave is not None and not selectable and not wave_active:
609
+ if current_wave is not None and blocked_review is None and not selectable and not wave_active:
540
610
  stalled = [
541
611
  {
542
612
  "id": task.task_id,
@@ -556,11 +626,17 @@ def ready(repo: str, project_dir: str = DEFAULT_PROJECT_DIR, *,
556
626
  {"wave": current_wave, "tasks": stalled},
557
627
  )
558
628
 
629
+ typed: Dict[str, object] = {}
630
+ if repair_for_wave is not None:
631
+ typed["repair_for_wave"] = repair_for_wave
632
+ if blocked_review is not None:
633
+ typed["blocked_review"] = blocked_review
559
634
  return {
560
635
  "command": "ready",
561
636
  "branch": project.branch,
562
637
  "head": project.head,
563
638
  "current_wave": current_wave,
639
+ **typed,
564
640
  "ready": [
565
641
  {
566
642
  "id": task.task_id,
@@ -8,6 +8,10 @@ with testable claims where every claim row carries a valid type, a valid
8
8
  verdict, and real evidence, a `## Descriptive docs` list for claimless docs,
9
9
  the two sets disjoint and together equal to the frozen inventory, and a
10
10
  remediation queue with one classified row per non-verified claim.
11
+ Queue numbers are unique, positive and strictly increasing, not necessarily
12
+ contiguous. With `--prior-audit`, persisting rows keep their number and new
13
+ rows use a number above every prior queue number and User rulings Queue #.
14
+ Numbers stay bound to their original (doc, claim); never reuse a retired one.
11
15
  `## User rulings` is fixed-format durable memory. Pass the pre-rewrite audit
12
16
  with `--prior-audit FILE`; every prior row, including its Planned value, must
13
17
  remain an exact ordered prefix.
@@ -96,6 +100,12 @@ def _table_rows(body: str, width: int, label: str) -> List[List[str]]:
96
100
  return rows
97
101
 
98
102
 
103
+ def _remediation_queue_rows(body: str, label: str, required: bool = False) -> List[List[str]]:
104
+ if not required and "|" not in body:
105
+ return []
106
+ return _table_rows(body, 6, label)
107
+
108
+
99
109
  def _not_placeholder(value: str, label: str) -> None:
100
110
  normalized = value.strip().strip("`\"").strip()
101
111
  if (
@@ -247,6 +257,63 @@ def _check_carried(
247
257
  raise AuditError(f"{label}: doc or evidence changed since the prior audit: {', '.join(moved)}")
248
258
 
249
259
 
260
+ def _queue_number(number: str, label: str) -> int:
261
+ if not re.fullmatch(r"[1-9][0-9]*", number):
262
+ raise AuditError(f"{label}: queue numbers must be positive integers")
263
+ return int(number)
264
+
265
+
266
+ def _check_queue_number_history(
267
+ queue: Sequence[Sequence[str]],
268
+ prior_sections: Dict[str, str],
269
+ ) -> None:
270
+ if "Remediation queue" not in prior_sections:
271
+ raise AuditError("prior audit is missing section: ## Remediation queue")
272
+ if "User rulings" not in prior_sections:
273
+ raise AuditError("prior audit is missing section: ## User rulings")
274
+
275
+ prior_queue = _remediation_queue_rows(
276
+ prior_sections["Remediation queue"], "Prior remediation queue"
277
+ )
278
+ prior_items_by_number: Dict[int, tuple] = {}
279
+ prior_numbers_by_item: Dict[tuple, int] = {}
280
+ for number, doc, claim, *_ in prior_queue:
281
+ numeric_number = _queue_number(number, "Prior remediation queue")
282
+ identity = (doc, claim)
283
+ prior_items_by_number[numeric_number] = identity
284
+ prior_numbers_by_item[identity] = numeric_number
285
+
286
+ prior_rulings = _user_rulings(
287
+ prior_sections["User rulings"], "Prior user rulings"
288
+ )
289
+ prior_ruling_numbers = {int(row[0]) for row in prior_rulings}
290
+ prior_max = max(
291
+ [*prior_items_by_number, *prior_ruling_numbers],
292
+ default=0,
293
+ )
294
+
295
+ for number, doc, claim, *_ in queue:
296
+ numeric_number = _queue_number(number, "Remediation queue")
297
+ identity = (doc, claim)
298
+ prior_number = prior_numbers_by_item.get(identity)
299
+ if numeric_number in prior_ruling_numbers and prior_items_by_number.get(numeric_number) != identity:
300
+ raise AuditError(
301
+ f"Remediation queue #{number}: Queue # {number} is already retired by a prior "
302
+ "User rulings row for a different item; give new items a number above every "
303
+ "prior queue number and User rulings Queue #"
304
+ )
305
+ if prior_number is not None and numeric_number != prior_number:
306
+ raise AuditError(
307
+ f"Remediation queue #{number}: persisting item must keep its prior queue "
308
+ f"number #{prior_number}"
309
+ )
310
+ if prior_number is None and numeric_number <= prior_max:
311
+ raise AuditError(
312
+ f"Remediation queue #{number}: new items must use a number above every prior "
313
+ f"queue number and User rulings Queue # (maximum {prior_max})"
314
+ )
315
+
316
+
250
317
  def validate(
251
318
  repo: Path,
252
319
  audit_relative: str,
@@ -354,7 +421,9 @@ def validate(
354
421
 
355
422
  queue_body = sections["Remediation queue"]
356
423
  non_verified = sum(tallies[verdict] for verdict in VERDICTS if verdict != "verified")
357
- queue = _table_rows(queue_body, 6, "Remediation queue") if non_verified or "|" in queue_body else []
424
+ queue = _remediation_queue_rows(
425
+ queue_body, "Remediation queue", required=bool(non_verified)
426
+ )
358
427
  expected_queue = sorted(
359
428
  (doc, claim["claim"], claim["verdict"])
360
429
  for doc, claims in docs.items()
@@ -371,9 +440,13 @@ def validate(
371
440
  _not_placeholder(action, f"Remediation queue #{number}: action")
372
441
  if len(queue) != non_verified:
373
442
  raise AuditError(f"Remediation queue has {len(queue)} rows for {non_verified} non-verified claims")
374
- numbers = [row[0] for row in queue]
375
- if numbers != [str(number) for number in range(1, len(queue) + 1)]:
376
- raise AuditError("Remediation queue numbers must be contiguous and ordered from 1")
443
+ numbers = [_queue_number(row[0], "Remediation queue") for row in queue]
444
+ if any(later <= earlier for earlier, later in zip(numbers, numbers[1:])):
445
+ raise AuditError(
446
+ "Remediation queue numbers must be unique and strictly increasing"
447
+ )
448
+ if prior_sections is not None:
449
+ _check_queue_number_history(queue, prior_sections)
377
450
  actual_queue = sorted((doc, claim, verdict) for _, doc, claim, verdict, _, _ in queue)
378
451
  if actual_queue != expected_queue:
379
452
  raise AuditError(