dorfl 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. package/dist/advance-drivers.d.ts +1 -1
  2. package/dist/advance-drivers.d.ts.map +1 -1
  3. package/dist/advance-drivers.js +15 -3
  4. package/dist/advance-drivers.js.map +1 -1
  5. package/dist/advance-lifecycle-template.d.ts.map +1 -1
  6. package/dist/advance-lifecycle-template.js +76 -4
  7. package/dist/advance-lifecycle-template.js.map +1 -1
  8. package/dist/advance-treeless-publish.d.ts +23 -0
  9. package/dist/advance-treeless-publish.d.ts.map +1 -1
  10. package/dist/advance-treeless-publish.js +41 -0
  11. package/dist/advance-treeless-publish.js.map +1 -1
  12. package/dist/advance.d.ts +59 -7
  13. package/dist/advance.d.ts.map +1 -1
  14. package/dist/advance.js +389 -82
  15. package/dist/advance.js.map +1 -1
  16. package/dist/advancing-lock.d.ts +30 -2
  17. package/dist/advancing-lock.d.ts.map +1 -1
  18. package/dist/advancing-lock.js +50 -0
  19. package/dist/advancing-lock.js.map +1 -1
  20. package/dist/agent-launch.d.ts +12 -0
  21. package/dist/agent-launch.d.ts.map +1 -1
  22. package/dist/agent-launch.js +22 -12
  23. package/dist/agent-launch.js.map +1 -1
  24. package/dist/agent-stop.d.ts +40 -2
  25. package/dist/agent-stop.d.ts.map +1 -1
  26. package/dist/agent-stop.js +30 -2
  27. package/dist/agent-stop.js.map +1 -1
  28. package/dist/apply-decide.d.ts +17 -3
  29. package/dist/apply-decide.d.ts.map +1 -1
  30. package/dist/apply-decide.js +36 -7
  31. package/dist/apply-decide.js.map +1 -1
  32. package/dist/apply-merge-action.d.ts +17 -5
  33. package/dist/apply-merge-action.d.ts.map +1 -1
  34. package/dist/apply-merge-action.js +43 -8
  35. package/dist/apply-merge-action.js.map +1 -1
  36. package/dist/apply-persist.d.ts +57 -26
  37. package/dist/apply-persist.d.ts.map +1 -1
  38. package/dist/apply-persist.js +166 -37
  39. package/dist/apply-persist.js.map +1 -1
  40. package/dist/apply-stuck-action.d.ts +151 -0
  41. package/dist/apply-stuck-action.d.ts.map +1 -0
  42. package/dist/apply-stuck-action.js +125 -0
  43. package/dist/apply-stuck-action.js.map +1 -0
  44. package/dist/brand.d.ts +12 -1
  45. package/dist/brand.d.ts.map +1 -1
  46. package/dist/brand.js +2 -1
  47. package/dist/brand.js.map +1 -1
  48. package/dist/cli-spinner.d.ts +1 -1
  49. package/dist/cli-spinner.js +1 -1
  50. package/dist/cli.d.ts +10 -0
  51. package/dist/cli.d.ts.map +1 -1
  52. package/dist/cli.js +320 -63
  53. package/dist/cli.js.map +1 -1
  54. package/dist/close-job-template.js +1 -1
  55. package/dist/complete.d.ts +6 -3
  56. package/dist/complete.d.ts.map +1 -1
  57. package/dist/complete.js +91 -37
  58. package/dist/complete.js.map +1 -1
  59. package/dist/config.d.ts +55 -9
  60. package/dist/config.d.ts.map +1 -1
  61. package/dist/config.js +56 -4
  62. package/dist/config.js.map +1 -1
  63. package/dist/continue-branch.d.ts.map +1 -1
  64. package/dist/continue-branch.js +22 -0
  65. package/dist/continue-branch.js.map +1 -1
  66. package/dist/decision-engine.d.ts +38 -10
  67. package/dist/decision-engine.d.ts.map +1 -1
  68. package/dist/decision-engine.js +10 -6
  69. package/dist/decision-engine.js.map +1 -1
  70. package/dist/do-autopick.d.ts.map +1 -1
  71. package/dist/do-autopick.js +11 -1
  72. package/dist/do-autopick.js.map +1 -1
  73. package/dist/do-config.d.ts +1 -1
  74. package/dist/do.d.ts +49 -56
  75. package/dist/do.d.ts.map +1 -1
  76. package/dist/do.js +419 -30
  77. package/dist/do.js.map +1 -1
  78. package/dist/env-config.d.ts.map +1 -1
  79. package/dist/env-config.js +12 -4
  80. package/dist/env-config.js.map +1 -1
  81. package/dist/failure-cause.d.ts +3 -2
  82. package/dist/failure-cause.d.ts.map +1 -1
  83. package/dist/failure-cause.js +28 -1
  84. package/dist/failure-cause.js.map +1 -1
  85. package/dist/format.d.ts +6 -6
  86. package/dist/format.d.ts.map +1 -1
  87. package/dist/format.js +10 -27
  88. package/dist/format.js.map +1 -1
  89. package/dist/frontmatter.d.ts +16 -4
  90. package/dist/frontmatter.d.ts.map +1 -1
  91. package/dist/frontmatter.js +27 -1
  92. package/dist/frontmatter.js.map +1 -1
  93. package/dist/gc.d.ts +65 -6
  94. package/dist/gc.d.ts.map +1 -1
  95. package/dist/gc.js +126 -9
  96. package/dist/gc.js.map +1 -1
  97. package/dist/github.d.ts +14 -0
  98. package/dist/github.d.ts.map +1 -1
  99. package/dist/github.js +73 -0
  100. package/dist/github.js.map +1 -1
  101. package/dist/harness.d.ts +25 -0
  102. package/dist/harness.d.ts.map +1 -1
  103. package/dist/harness.js.map +1 -1
  104. package/dist/index.d.ts +4 -1
  105. package/dist/index.d.ts.map +1 -1
  106. package/dist/index.js +2 -1
  107. package/dist/index.js.map +1 -1
  108. package/dist/install-ci-branch-protection.d.ts +132 -38
  109. package/dist/install-ci-branch-protection.d.ts.map +1 -1
  110. package/dist/install-ci-branch-protection.js +190 -48
  111. package/dist/install-ci-branch-protection.js.map +1 -1
  112. package/dist/install-ci-core.d.ts +21 -1
  113. package/dist/install-ci-core.d.ts.map +1 -1
  114. package/dist/install-ci-core.js +10 -3
  115. package/dist/install-ci-core.js.map +1 -1
  116. package/dist/install-ci-github.d.ts +32 -0
  117. package/dist/install-ci-github.d.ts.map +1 -1
  118. package/dist/install-ci-github.js +73 -0
  119. package/dist/install-ci-github.js.map +1 -1
  120. package/dist/install-skills.d.ts +123 -0
  121. package/dist/install-skills.d.ts.map +1 -0
  122. package/dist/install-skills.js +100 -0
  123. package/dist/install-skills.js.map +1 -0
  124. package/dist/intake-trigger-template.js +1 -1
  125. package/dist/intake.d.ts +17 -4
  126. package/dist/intake.d.ts.map +1 -1
  127. package/dist/intake.js +23 -7
  128. package/dist/intake.js.map +1 -1
  129. package/dist/integration-core.d.ts +10 -7
  130. package/dist/integration-core.d.ts.map +1 -1
  131. package/dist/integration-core.js +174 -60
  132. package/dist/integration-core.js.map +1 -1
  133. package/dist/integrator.d.ts +1 -1
  134. package/dist/integrator.d.ts.map +1 -1
  135. package/dist/integrator.js +19 -3
  136. package/dist/integrator.js.map +1 -1
  137. package/dist/isolation.d.ts +2 -2
  138. package/dist/isolation.d.ts.map +1 -1
  139. package/dist/isolation.js +9 -0
  140. package/dist/isolation.js.map +1 -1
  141. package/dist/item-lock.d.ts +196 -129
  142. package/dist/item-lock.d.ts.map +1 -1
  143. package/dist/item-lock.js +329 -254
  144. package/dist/item-lock.js.map +1 -1
  145. package/dist/ledger-write.d.ts +31 -26
  146. package/dist/ledger-write.d.ts.map +1 -1
  147. package/dist/ledger-write.js +100 -122
  148. package/dist/ledger-write.js.map +1 -1
  149. package/dist/lifecycle-gather.d.ts +17 -0
  150. package/dist/lifecycle-gather.d.ts.map +1 -1
  151. package/dist/lifecycle-gather.js +7 -1
  152. package/dist/lifecycle-gather.js.map +1 -1
  153. package/dist/lifecycle-pools.d.ts +40 -3
  154. package/dist/lifecycle-pools.d.ts.map +1 -1
  155. package/dist/lifecycle-pools.js +26 -6
  156. package/dist/lifecycle-pools.js.map +1 -1
  157. package/dist/merge-question-surfacer.d.ts +15 -1
  158. package/dist/merge-question-surfacer.d.ts.map +1 -1
  159. package/dist/merge-question-surfacer.js +18 -3
  160. package/dist/merge-question-surfacer.js.map +1 -1
  161. package/dist/migrate-stuck-locks.d.ts +129 -0
  162. package/dist/migrate-stuck-locks.d.ts.map +1 -0
  163. package/dist/migrate-stuck-locks.js +355 -0
  164. package/dist/migrate-stuck-locks.js.map +1 -0
  165. package/dist/needs-attention.d.ts +293 -16
  166. package/dist/needs-attention.d.ts.map +1 -1
  167. package/dist/needs-attention.js +532 -57
  168. package/dist/needs-attention.js.map +1 -1
  169. package/dist/orphan-sidecar.d.ts +8 -4
  170. package/dist/orphan-sidecar.d.ts.map +1 -1
  171. package/dist/orphan-sidecar.js +35 -2
  172. package/dist/orphan-sidecar.js.map +1 -1
  173. package/dist/pi-harness.d.ts +16 -0
  174. package/dist/pi-harness.d.ts.map +1 -1
  175. package/dist/pi-harness.js +82 -2
  176. package/dist/pi-harness.js.map +1 -1
  177. package/dist/placement.d.ts +3 -3
  178. package/dist/placement.js +1 -1
  179. package/dist/prd-to-spec.d.ts.map +1 -1
  180. package/dist/prd-to-spec.js +9 -5
  181. package/dist/prd-to-spec.js.map +1 -1
  182. package/dist/protocol/CLAIM-PROTOCOL.md +17 -10
  183. package/dist/protocol/REVIEW-PROTOCOL.md +4 -1
  184. package/dist/protocol/SURFACE-PROTOCOL.md +16 -2
  185. package/dist/protocol/TASKING-PROTOCOL.md +3 -1
  186. package/dist/protocol/WORK-CONTRACT.md +22 -18
  187. package/dist/protocol/task-template.md +1 -1
  188. package/dist/reap-branches.d.ts +12 -9
  189. package/dist/reap-branches.d.ts.map +1 -1
  190. package/dist/reap-branches.js +25 -7
  191. package/dist/reap-branches.js.map +1 -1
  192. package/dist/recover-isolated.d.ts +12 -0
  193. package/dist/recover-isolated.d.ts.map +1 -1
  194. package/dist/recover-isolated.js +5 -0
  195. package/dist/recover-isolated.js.map +1 -1
  196. package/dist/repo-config.d.ts +23 -2
  197. package/dist/repo-config.d.ts.map +1 -1
  198. package/dist/repo-config.js +53 -7
  199. package/dist/repo-config.js.map +1 -1
  200. package/dist/repo-mirror.d.ts.map +1 -1
  201. package/dist/repo-mirror.js +18 -2
  202. package/dist/repo-mirror.js.map +1 -1
  203. package/dist/review-verdict.js +1 -1
  204. package/dist/review-verdict.js.map +1 -1
  205. package/dist/run.d.ts +1 -1
  206. package/dist/run.d.ts.map +1 -1
  207. package/dist/run.js +54 -19
  208. package/dist/run.js.map +1 -1
  209. package/dist/scan.d.ts +17 -8
  210. package/dist/scan.d.ts.map +1 -1
  211. package/dist/scan.js +22 -8
  212. package/dist/scan.js.map +1 -1
  213. package/dist/select-priority.d.ts +2 -2
  214. package/dist/select-priority.js +1 -1
  215. package/dist/select-priority.js.map +1 -1
  216. package/dist/sidecar-apply.js +1 -1
  217. package/dist/sidecar-apply.js.map +1 -1
  218. package/dist/sidecar.d.ts +45 -10
  219. package/dist/sidecar.d.ts.map +1 -1
  220. package/dist/sidecar.js +82 -2
  221. package/dist/sidecar.js.map +1 -1
  222. package/dist/skills/answer-questions/SKILL.md +89 -0
  223. package/dist/skills/capture-signal/SKILL.md +52 -0
  224. package/dist/skills/convert-from-prd-to-spec/SKILL.md +90 -0
  225. package/dist/skills/drive-tasks/SKILL.md +218 -0
  226. package/dist/skills/from-idea/SKILL.md +83 -0
  227. package/dist/skills/merge-prs/SKILL.md +70 -0
  228. package/dist/skills/orchestrate/SKILL.md +101 -0
  229. package/dist/skills/promote/SKILL.md +35 -0
  230. package/dist/skills/review/SKILL.md +16 -0
  231. package/dist/skills/setup/SKILL.md +258 -0
  232. package/dist/skills/setup/protocol/ADR-FORMAT.md +47 -0
  233. package/dist/skills/setup/protocol/CLAIM-PROTOCOL.md +224 -0
  234. package/dist/skills/setup/protocol/REVIEW-PROTOCOL.md +122 -0
  235. package/dist/skills/setup/protocol/SURFACE-PROTOCOL.md +135 -0
  236. package/dist/skills/setup/protocol/TASKING-PROTOCOL.md +124 -0
  237. package/dist/skills/setup/protocol/WORK-CONTRACT.md +280 -0
  238. package/dist/skills/setup/protocol/spec-template.md +71 -0
  239. package/dist/skills/setup/protocol/task-template.md +65 -0
  240. package/dist/skills/surface-questions/SKILL.md +16 -0
  241. package/dist/skills/to-spec/SKILL.md +34 -0
  242. package/dist/skills/to-task/SKILL.md +19 -0
  243. package/dist/skills/triage-observations/SKILL.md +78 -0
  244. package/dist/skills/work/SKILL.md +51 -0
  245. package/dist/slug-namespace.d.ts +5 -5
  246. package/dist/slug-namespace.js +5 -5
  247. package/dist/slug-namespace.js.map +1 -1
  248. package/dist/spec-complete.d.ts.map +1 -1
  249. package/dist/spec-complete.js +2 -3
  250. package/dist/spec-complete.js.map +1 -1
  251. package/dist/start.d.ts.map +1 -1
  252. package/dist/start.js +51 -57
  253. package/dist/start.js.map +1 -1
  254. package/dist/surface-gate.d.ts.map +1 -1
  255. package/dist/surface-gate.js +10 -3
  256. package/dist/surface-gate.js.map +1 -1
  257. package/dist/surface-persist.js +1 -1
  258. package/dist/surface-persist.js.map +1 -1
  259. package/dist/tasker-review-loop.d.ts +4 -3
  260. package/dist/tasker-review-loop.d.ts.map +1 -1
  261. package/dist/tasker-review-loop.js.map +1 -1
  262. package/dist/tasking-lock.d.ts +2 -2
  263. package/dist/tasking-lock.d.ts.map +1 -1
  264. package/dist/tasking-lock.js +53 -32
  265. package/dist/tasking-lock.js.map +1 -1
  266. package/dist/tasking.d.ts +40 -6
  267. package/dist/tasking.d.ts.map +1 -1
  268. package/dist/tasking.js +224 -12
  269. package/dist/tasking.js.map +1 -1
  270. package/dist/triage-persist.d.ts +10 -6
  271. package/dist/triage-persist.d.ts.map +1 -1
  272. package/dist/triage-persist.js +34 -4
  273. package/dist/triage-persist.js.map +1 -1
  274. package/dist/vendor/incur/agents.d.ts +58 -0
  275. package/dist/vendor/incur/agents.d.ts.map +1 -0
  276. package/dist/vendor/incur/agents.js +343 -0
  277. package/dist/vendor/incur/agents.js.map +1 -0
  278. package/dist/verify-workflow-template.js +1 -1
  279. package/dist/watch-session.d.ts +11 -3
  280. package/dist/watch-session.d.ts.map +1 -1
  281. package/dist/watch-session.js +94 -7
  282. package/dist/watch-session.js.map +1 -1
  283. package/dist/work-layout.d.ts +7 -3
  284. package/dist/work-layout.d.ts.map +1 -1
  285. package/dist/work-layout.js +6 -3
  286. package/dist/work-layout.js.map +1 -1
  287. package/dist/workspace.d.ts +1 -1
  288. package/package.json +2 -2
  289. package/src/advance-drivers.ts +16 -3
  290. package/src/advance-lifecycle-template.ts +89 -4
  291. package/src/advance-treeless-publish.ts +45 -0
  292. package/src/advance.ts +467 -87
  293. package/src/advancing-lock.ts +96 -1
  294. package/src/agent-launch.ts +37 -12
  295. package/src/agent-stop.ts +60 -2
  296. package/src/apply-decide.ts +36 -7
  297. package/src/apply-merge-action.ts +45 -7
  298. package/src/apply-persist.ts +228 -54
  299. package/src/apply-stuck-action.ts +260 -0
  300. package/src/brand.ts +14 -2
  301. package/src/cli-spinner.ts +1 -1
  302. package/src/cli.ts +401 -70
  303. package/src/close-job-template.ts +1 -1
  304. package/src/complete.ts +110 -52
  305. package/src/config.ts +107 -13
  306. package/src/continue-branch.ts +22 -0
  307. package/src/decision-engine.ts +55 -17
  308. package/src/do-autopick.ts +12 -1
  309. package/src/do-config.ts +1 -1
  310. package/src/do.ts +511 -38
  311. package/src/env-config.ts +12 -4
  312. package/src/failure-cause.ts +30 -1
  313. package/src/format.ts +10 -30
  314. package/src/frontmatter.ts +35 -5
  315. package/src/gc.ts +172 -9
  316. package/src/github.ts +78 -0
  317. package/src/harness.ts +25 -0
  318. package/src/index.ts +10 -0
  319. package/src/install-ci-branch-protection.ts +282 -57
  320. package/src/install-ci-core.ts +30 -3
  321. package/src/install-ci-github.ts +86 -0
  322. package/src/install-skills.ts +166 -0
  323. package/src/intake-trigger-template.ts +1 -1
  324. package/src/intake.ts +46 -11
  325. package/src/integration-core.ts +199 -65
  326. package/src/integrator.ts +22 -9
  327. package/src/isolation.ts +11 -2
  328. package/src/item-lock.ts +485 -341
  329. package/src/ledger-write.ts +135 -150
  330. package/src/lifecycle-gather.ts +29 -6
  331. package/src/lifecycle-pools.ts +67 -9
  332. package/src/merge-question-surfacer.ts +28 -4
  333. package/src/migrate-stuck-locks.ts +451 -0
  334. package/src/needs-attention.ts +857 -84
  335. package/src/orphan-sidecar.ts +47 -6
  336. package/src/pi-harness.ts +82 -2
  337. package/src/placement.ts +3 -3
  338. package/src/prd-to-spec.ts +13 -5
  339. package/src/reap-branches.ts +38 -14
  340. package/src/recover-isolated.ts +17 -0
  341. package/src/repo-config.ts +55 -6
  342. package/src/repo-mirror.ts +23 -1
  343. package/src/review-verdict.ts +1 -1
  344. package/src/run.ts +64 -18
  345. package/src/scan.ts +22 -8
  346. package/src/select-priority.ts +3 -3
  347. package/src/sidecar-apply.ts +1 -1
  348. package/src/sidecar.ts +138 -11
  349. package/src/slug-namespace.ts +7 -7
  350. package/src/spec-complete.ts +2 -3
  351. package/src/start.ts +53 -59
  352. package/src/surface-gate.ts +10 -3
  353. package/src/surface-persist.ts +1 -1
  354. package/src/tasker-review-loop.ts +4 -3
  355. package/src/tasking-lock.ts +52 -36
  356. package/src/tasking.ts +261 -17
  357. package/src/triage-persist.ts +56 -12
  358. package/src/vendor/incur/LICENSE +21 -0
  359. package/src/vendor/incur/README.md +19 -0
  360. package/src/vendor/incur/agents.ts +392 -0
  361. package/src/verify-workflow-template.ts +1 -1
  362. package/src/watch-session.ts +102 -7
  363. package/src/work-layout.ts +6 -3
  364. package/src/workspace.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"sidecar.js","sourceRoot":"","sources":["../src/sidecar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAqB,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAuG7C,MAAM,aAAa,GAA6B,IAAI,GAAG,CAAc;IACpE,OAAO;IACP,OAAO;IACP,QAAQ;IACR,MAAM;CACN,CAAC,CAAC;AA2CH,yEAAyE;AACzE,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAC3C,YAAY,OAAe;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IACjC,CAAC;CACD;AAED;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,KAAmB;IAClD,IAAI,KAAK,CAAC,gBAAgB,KAAK,SAAS,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IACD,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;AACnC,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,cAAc,CAAC,KAAmB;IACjD,OAAO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C1B,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC;QACrB,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,EAAC,GAAG,KAAK,EAAE,OAAO,EAAC,CAAC;AAC5B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CACzB,QAAgB,EAChB,YAA2B;IAE3B,MAAM,QAAQ,GAAG,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IAClD,MAAM,IAAI,GAAiB;QAC1B,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,OAAO,EAAE,EAAE;KACX,CAAC;IACF,OAAO,eAAe,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: answer-questions
3
+ disable-model-invocation: true
4
+ description: 'Human-facing: go over the open question sidecars in work/questions/, RESOLVE the factual ones into draft answers FOR THE HUMAN TO RATIFY, and DEFER the genuine-judgement ones with full context + a suggested default. Proposes; never finalises. The human is the clock.'
5
+ ---
6
+
7
+ # answer-questions
8
+
9
+ **The read-side mirror of `surface-questions`.** `surface-questions` FORMULATES the open questions for an item and writes nothing. `answer-questions` walks the questions that already exist (`work/questions/*.md` sidecars) and, for each, does the cheap legwork to **propose a draft answer the human ratifies** — OR, when the answer is genuine judgement, **defers it to the human with enough context to answer in one pass**. It is the operator's "let's clear the question backlog together" skill.
10
+
11
+ It is a **user-invoked operator skill** (`disable-model-invocation: true`), human-facing like `review` / `promote` — NOT an autonomous engine rung. This invocation boundary is load-bearing: the autonomous `advance` engine applies ONLY human-authored answers and NEVER invents one (the humility law, shared with `surface-questions`). So this skill exists only where a human IS present, and even then it **proposes; it never finalises**. A drafted answer is a candidate the human reads and ratifies (or edits, or rejects) — it is not an answer until the human owns it. Reach for it by name; it never fires on its own.
12
+
13
+ > **Protocol-native.** Assumes the `work/` contract (rules in the repo's `work/protocol/`, copied by `setup`). Every bare "WORK-CONTRACT" / "sidecar" mention is `work/protocol/WORK-CONTRACT.md` / the documented question-sidecar format in the repo under work.
14
+
15
+ ## The one law (it keeps the tool honest)
16
+
17
+ **Propose, never finalise — the human is the clock.** You may RESOLVE a question only when the answer is **factual / discoverable** (settled in the code, an ADR, the contract, a `tasks/done/` record, or external truth) — and even then you present it as a DRAFT for the human to ratify, never as a committed answer. The moment a question turns on **preference, product/design/security judgement, or an unresolved fork**, you do NOT answer it — you DEFER it with context and an optional suggested default (the humility aid, never a decision). When in doubt between "factual" and "judgement", treat it as judgement and defer. A confident wrong answer to a judgement question produces drifted work that costs far more than asking.
18
+
19
+ ## When to use vs. not
20
+
21
+ - **Use** when there is a populated `work/questions/` and a human present who wants to clear it: to go question-by-question, knock out the ones whose answers are just legwork (drafted for ratification), and hand the human a tight batch of the ones that genuinely need them. Compose it from `orchestrate`'s apply step, or invoke it directly to drain the question backlog.
22
+ - **Don't** use it to FORMULATE questions (that is `surface-questions`), to PERSIST / commit an answer or advance the item (that is the `advance` verb's apply rung, or the human writing the answer into the sidecar), or to invent an answer to a judgement question (the law forbids it). It READS sidecars and DRAFTS; it does not own the write.
23
+
24
+ ## How to use
25
+
26
+ For each open sidecar in `work/questions/` (each `<type>-<slug>.md` with an unanswered entry), per question:
27
+
28
+ 1. **Read the question + its context** from the sidecar (the bold question, the blockquote context, any suggested default). A sidecar entry is BINARY (no-answer | answered) — there is no disposition token to read; the human answers in plain language. Open the item it asks about (`<type>:<slug>`) only if the inline context is not enough.
29
+ 2. **Classify factual vs judgement** — do the cheap legwork to decide:
30
+ - **FACTUAL / resolvable** — the answer is settled somewhere checkable: a landed `tasks/done/` record, an ADR in `docs/adr/`, a `work/protocol/` rule, the current code, or external/world fact. Investigate it against current reality (the same honesty `surface-questions`/triage demand) so the draft is grounded, not guessed.
31
+ - **JUDGEMENT** — the answer turns on preference, a design/product/security call, a `humanOnly` concern, or an open fork the evidence does not settle.
32
+ 3. **Act on the classification:**
33
+ - **FACTUAL → PROPOSE a draft answer.** State the answer in PLAIN LANGUAGE, and cite the EVIDENCE (the `file:line` / ADR / done-record / contract clause that settles it) so the human can ratify in seconds rather than re-investigate. For an observation's "what becomes of this signal?" question, the draft is a plain-language recommendation (e.g. "turn this into a task", "this is a duplicate of `<x>` — delete it") with the evidence for it; the apply rung's decision agent reads that answer and acts, and an outright throw-away can also go via the direct-delete path. Mark it clearly as a DRAFT awaiting ratification.
34
+ - **JUDGEMENT → DEFER.** Surface the question with: inline context (so the human need not open the item), the consequence of each plausible answer, and an **optional suggested default** where you honestly have a view (the humility aid — never a decision). Do NOT draft a committed answer.
35
+ 4. **Batch the output** (below). In phase 1 you WRITE nothing to the sidecar. You write a `**Your answer**` slot ONLY in the optional phase 2, and ONLY for the handles the human explicitly ratified (see "Phase 2" below).
36
+
37
+ ## Your output
38
+
39
+ Emit, across the open sidecars, a single batch the human can act on in one pass — ordered by leverage (the answer that unblocks the most downstream work first), each tagged PROPOSE or DEFER. Give every entry a **batch-stable handle** (`P1`, `P2`, … for PROPOSE; `D1`, `D2`, … for DEFER), numbered across the WHOLE batch independent of which sidecar it came from, so the human can approve / reject / amend by number in one line (e.g. "approve P1-P6, D3; amend D9 (...); reject D14") instead of re-quoting `<type>:<slug> (qN)`. Keep the `item:`/`(qN)` line too — the handle is for acting, the item id is for locating where the answer persists:
40
+
41
+ ```
42
+ question backlog: <N sidecars, M open questions>
43
+
44
+ PROPOSE (factual — ratify or correct):
45
+ - P1 item: <type>:<slug> (qN)
46
+ question: <verbatim>
47
+ draft: <the proposed answer>
48
+ evidence: <file:line / ADR / tasks/done record / contract clause that settles it>
49
+
50
+ DEFER (judgement — needs you):
51
+ - D1 item: <type>:<slug> (qN)
52
+ question: <verbatim>
53
+ context: <inline context to answer without opening the item>
54
+ consequence:<what each plausible answer implies>
55
+ default: <optional suggested default — humility aid, omit if none>
56
+ ```
57
+
58
+ (A sidecar entry is binary — no-answer | answered — so a PROPOSE or DEFER is just plain-language answer text; there is no disposition token to fill.)
59
+
60
+ The verbatim `question:` (and, for DEFER, the `context:`) is MANDATORY on every entry — it is the whole point of the batch: the human must be able to DECIDE from the batch alone, without opening each file. A compact TABLE keyed on the same `P#`/`D#` handles is fine for a large batch ONLY IF every row still carries the verbatim question + (for DEFER) context + item id + draft/default + (for PROPOSE) evidence. If that does not fit a table row, use the block form — do NOT drop the question to make it fit. A batch that elides the question forces a manual file lookup to decide and has failed at its job. Where several entries collapse to ONE decision (e.g. a recurring pattern across many sidecars), give the cluster a single handle and list the items it covers, so the human spends one ratification, not N.
61
+
62
+ If a sidecar's open questions are ALL judgement, it appears only under DEFER; if all factual, only under PROPOSE. An empty backlog (nothing open) is a valid, honest result — say so; never manufacture a question or an answer to look busy.
63
+
64
+ ### Phase 2 (OPTIONAL, human-initiated): ratify-by-handle, then the skill writes the accepted answers
65
+
66
+ The batch above is phase 1 and writes NOTHING. If — and only if — the human replies naming the handles they accept (e.g. "write P1-P6, D4, D9" or "accept P3, amend D9 to <text>"), you MAY enter phase 2 and write THOSE answers into their `**Your answer** (write below this line):` slots. This is NOT a violation of "propose, never finalise": a handle the human explicitly named is HUMAN-AUTHORED — the human ratified it by naming it — so transcribing it into the slot is a faithful recording, not an invention. The ironclad rules for phase 2:
67
+
68
+ - **Write ONLY handles the human explicitly named.** Never write an un-named entry, never "helpfully" fill the rest, never write a DEFER's suggested `default:` unless the human named that handle. An entry the human left out stays blank.
69
+ - **Amendments are the human's text, verbatim.** If the human says "accept D9 but change X", write their amended text, not your original draft.
70
+ - **For an observation's triage entry, write the plain-language answer the human ratified** (e.g. "make this a task" / "delete it"). Match the sidecar's documented `**Your answer**` format exactly — there is no disposition token, the human's prose IS the answer.
71
+ - **Still NEVER** set `answered:`/`allAnswered`, never `git mv`, never commit, never touch the per-entry/identity machine comments. You write ONLY the prose under the `**Your answer**` marker; the apply rung (or the human) owns everything else (see below).
72
+ - **If the human's reply is ambiguous about a handle, do not write it — ask.** A wrong transcription into the trusted slot is the exact forgery the law forbids; when unsure, leave it blank and surface the ambiguity.
73
+
74
+ > **Why phase 1 goes to the human and never auto-writes the slot.** The only writable human slot per entry (`**Your answer** (write below this line):`) is the one the `advance` apply rung trusts as the human's ratified answer; writing an UNRATIFIED draft there forges the human's signature and an unattended `advance` would apply the guess (the humility law forbids exactly this). So phase 1 emits to the human and writes nothing; phase 2 writes ONLY what the human ratified by handle. There is no sanctioned "draft, ignored-until-ratified" CARRIER in the sidecar (a draft cannot rest in the file across sessions without risking that mistake), so a parked, browsable in-file draft is out of scope for this skill.
75
+
76
+ ## How the answer gets PERSISTED (NOT your job — for orientation)
77
+
78
+ You draft; the HUMAN owns the write. Once the human ratifies a PROPOSE (or answers a DEFER), the answer is recorded by:
79
+
80
+ - **The `advance` verb's apply rung** — it applies the HUMAN's answered sidecar atomically (item body + sidecar in one commit): a decision agent reads the answer + source and resolves / re-pauses / acts on the item (mint / delete-source / ask-follow-up). It applies only human-authored answers; a ratified draft is human-authored the moment the human accepts it. (A human with no runner hand-writes the answer into the sidecar per the documented format.)
81
+ - **Hand-writing the answer** into `work/questions/<type>-<slug>.md` under the entry's `**Your answer** (write below this line):` marker (the documented human-readable sidecar format). The ratified draft text drops straight in — it is a transcription, because you already shaped it as the answer.
82
+
83
+ Your ONLY write is the optional phase-2 transcription: dropping the HUMAN-RATIFIED answer text under the `**Your answer**` marker for the handles the human explicitly named. Beyond that you never set `answered:`/`allAnswered`, never touch machine comments, never `git mv`, never commit. You propose and defer; the human ratifies (and may name handles for you to transcribe); the apply rung (or the human's own edit) does the rest — reads the answered slot, sets `answered:`/`allAnswered`, runs the decision agent over the answer + source to act on it (mint / delete-source / ask-follow-up), and commits.
84
+
85
+ ## Boundaries (the scope fence)
86
+
87
+ - **`surface-questions` and `answer-questions` are duals.** Surface FORMULATES open questions for one item and writes nothing; answer READS the formulated questions and drafts/defers (phase 1, write-nothing) and, ONLY on explicit human ratification, transcribes the named answers into their slots (phase 2). Neither FORMULATES nor APPLIES: do not let answer re-formulate (that is surface) or set `answered:` / act on the answer / commit (that is apply). Phase-2 transcription writes the answer PROSE only; it is not "persisting" in the apply sense.
88
+ - **Propose, never finalise.** Restated because it is the whole point: you resolve only factual questions, and only into DRAFTS the human ratifies; genuine judgement is DEFERRED with context, never auto-answered. You write a slot ONLY for a handle the human explicitly named (that text is then human-authored); you NEVER write an un-named entry or your own suggested default into a slot. The human is the clock.
89
+ - **Compose, don't reimplement.** Use `review` / the item bodies / the ADRs / the contract as the single sources of truth your draft cites; do not re-derive their judgement. You gather evidence and shape it into a ratifiable answer.
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: capture-signal
3
+ description: "Record a noticed signal into the right work/ bucket (observations / findings / ideas / ADR / needs-attention) before it evaporates. Fire the MOMENT you notice something off the current task's path: drift (docs vs code), a recurring failure, surprising external behaviour, an out-of-scope opportunity, or a decision worth recording. The trigger is NOTICING, not being asked."
4
+ ---
5
+
6
+ # capture-signal
7
+
8
+ Turn a noticed signal into a durable file in the `work/` contract, in the **right bucket**, immediately — so it is not lost to the conversation. Capturing beats losing: do not agonise over the perfect bucket; pick the best fit and write it.
9
+
10
+ The bucket _definitions_ are authoritative in [WORK-CONTRACT.md](work/protocol/WORK-CONTRACT.md) (the repo-local protocol copy setup writes; read it if unsure) — this skill is the **routing reflex + the discipline**, not a restatement of the contract.
11
+
12
+ ## When this fires (the trigger is NOTICING)
13
+
14
+ The hard part is not _how_ to write the note — it is _remembering to_ at the moment a signal appears. Fire this skill when, mid-task, you notice any of:
15
+
16
+ - a **discrepancy / drift** (a doc contradicts the code; a task/spec assumes something no longer true; a dependency landed differently than assumed);
17
+ - a **recurring tool/process failure** (the same error twice — yours or the system's; a wasted-round-trip pattern);
18
+ - **surprising external/domain behaviour** you had to learn (an API's real behaviour, a protocol quirk) — verified ground truth;
19
+ - an **out-of-scope idea/opportunity** ("we could also…") that would derail the current task;
20
+ - a **decision** you/the user just made and reasoned through;
21
+ - the user nudging: "shouldn't that be captured / an observation?".
22
+
23
+ If you catch yourself _narrating_ a signal in prose ("interesting — X keeps happening") instead of _recording_ it, that is the trigger. Record it.
24
+
25
+ ## Route to the right bucket
26
+
27
+ | The signal is… | Bucket | Mutability |
28
+ | --- | --- | --- |
29
+ | spotted, **unverified** ("I noticed maybe-X") — INCLUDING agent/harness **conduct** signals | `work/notes/observations/<slug>.md` | append-only |
30
+ | **verified external/domain** ground truth (a real API/protocol behaviour) | `work/notes/findings/<slug>.md` | accumulates |
31
+ | a **proposed** enhancement, pre-spec ("we might build X") | `work/notes/ideas/<slug>.md` | editable |
32
+ | a **decision WE made** + its why | `docs/adr/<slug>.md` | durable |
33
+ | a **claimed item that got stuck** (gate red, conflict, ambiguity) | needs-attention (the runner marks its per-item lock `state: stuck`) | lock-ref state |
34
+
35
+ Tie-breakers:
36
+
37
+ - **observation vs finding:** internal "spotted, unverified" → observation; only _verified external/domain_ truth → finding. An internal investigation is an observation (it may spawn a fix task / an ADR), NOT a finding. **A finding MUST carry a `source:` (provenance)** — what the source is AND how current (a captured trace, a _dated_ external spec, or the code you read). A would-be finding with no source is really an `observation`. Describing OUR OWN code is never a finding (→ `CONTEXT.md`/`docs/`); a finding records the _external_ world we integrate with.
38
+ - **observation vs ADR:** "I spotted X" → observation; "we DECIDED X because Y" → ADR.
39
+ - **agent/harness conduct signals** (e.g. "the agent kept misusing a tool"): these are not repo-domain signals, but **capture > lose** — put them in `observations/` and **flag in the note that it is a conduct signal, not a domain signal** so a future reader does not hunt for a code bug. (Include refs: the offending tool calls, `file:line`, or commit.)
40
+
41
+ ## Discipline (from WORK-CONTRACT.md — honour, don't relitigate)
42
+
43
+ - **Content-derived slug**, never a counter (`agent-skipped-edit-skill`, not `note-3`).
44
+ - **Frontmatter:** `title`, `type` (`observation`/`finding`/`idea`), `status` (`spotted`/`incubating`), and a `spotted:`/`created:` date. **For a `finding`, also `source:` (REQUIRED provenance: what the source is + how current; no separate confidence field)** — see WORK-CONTRACT.md findings box.
45
+ - **`observations/` are APPEND-ONLY** — add an `## Update` block; don't rewrite what was first seen.
46
+ - **Capture buckets do NOT flow** (they are not work items / status≠folder); they leave only by deletion once no longer useful. A note may _spawn_ work (a task, an ADR) created separately — the note is not `git mv`'d into it.
47
+ - **Make it actionable:** state what was seen, where (refs/`file:line`/commit), and why it matters — enough that a future reader (or you) can act without the conversation.
48
+ - **Do NOT auto-commit** when firing standalone in an interactive session — write the file, report the path, leave it for the maintainer (per the repo's git etiquette). (EXCEPTION: when a conductor/autonomous caller — e.g. `drive-tasks` / `orchestrate` — captures the note as part of a run that commits its own observations, it commits this note too and reports it; the no-auto-commit default is for the standalone interactive reflex.)
49
+
50
+ ## Anti-pattern this skill exists to prevent
51
+
52
+ Knowing what observations _are_ (a glossary entry in CONTEXT.md) does NOT make you _record_ one at the right moment — that is a reflex, not a fact. If you find you described a signal but never wrote it down, you hit the anti-pattern. Write the file.
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: convert-from-prd-to-spec
3
+ disable-model-invocation: true
4
+ description: 'Migrate a repo off the retired `prd` vocabulary end-to-end: drive `dorfl prd-to-spec` for the deterministic half, then sweep the prose the command skips, gated by the bi-word leak scan.'
5
+ ---
6
+
7
+ # convert-from-prd-to-spec
8
+
9
+ Drive the WHOLE `prd → spec` vocabulary cutover end-to-end for a repo that is ALREADY on the `work/` contract, so a maintainer invokes ONE thing and the agent does both halves: the deterministic, gated DATA conversion (which the `dorfl prd-to-spec` command owns) AND the judgement-heavy PROSE sweep the command deliberately skips. This is an OPERATOR skill (protocol-native, runner-agnostic, human-invoked) — it lives ONLY under `skills/`; it has NO `work/protocol/` mirror and NO `dist/protocol/` vendor, exactly like the sibling operator skills `to-spec` and `to-task`.
10
+
11
+ It is authored for the ONE cutover that exists (`prd → spec`), not pre-generalised to an arbitrary `<from> → <to>`. The DATA engine's `VocabularyMigration` parameterisation is the reuse mechanism if a future cutover ever appears; this skill is not pre-generalised (decision 3 below).
12
+
13
+ ## The two-half orchestration (run these IN ORDER)
14
+
15
+ ### Half 1 — deterministic: CALL `dorfl prd-to-spec` (do NOT re-implement it)
16
+
17
+ Run the purpose-named migration command; it owns everything deterministic and gated. Do NOT re-implement its layers in the skill — the skill CALLS the command and reads its report.
18
+
19
+ 1. **Preview first:** run `dorfl prd-to-spec --dry-run`. It reports exactly what each layer WOULD do, touching nothing. Read the report; proceed only if it looks right.
20
+ 2. **Apply:** run `dorfl prd-to-spec`. In ONE command it: checks quiescence (refuses loudly on a dirty tree / a held per-item lock / an in-progress work-branch, NAMING the offender); re-syncs the repo's `work/protocol/*` contract from the package-canonical source (never the target's old copy) and bumps `work/protocol/VERSION`; converts the DATA — the `work/**` folders (via `git mv`), the item frontmatter + inert path/token refs across ALL items INCLUDING terminal history (`work/tasks/done/`, `work/specs/tasked/`), the `.dorfl.json` config keys, and the inert git refs (lock refs + work-branches); and then runs its OWN forward+reverse leak scan over the converted tree as the command's acceptance gate.
21
+ 3. **Gate on green:** only proceed to Half 2 when the command reports a clean/green result (no quiescence refusal, no leaks). If it refused, resolve the named offender (commit/stash, release the lock, land/prune the branch) and re-run. The command is idempotent: a second run on an already-migrated repo is a no-op.
22
+
23
+ ### Half 2 — judgement: sweep the prose the command SKIPS
24
+
25
+ The command's DATA migration is scoped to `work/**` + config + refs + the `work/protocol/*` re-sync. It deliberately does NOT touch the artifact WORD in the LIVING PROSE trees, because sweeping those correctly needs judgement a blind keep-case find/replace cannot safely apply (it would over-rewrite slugs, symbols, and English). Sweep those trees BY HAND with the reusable pattern below:
26
+
27
+ - `CONTEXT.md`, `README.md`, `AGENTS.md`
28
+ - `docs/**` (including the ADRs)
29
+ - source comments + string literals
30
+
31
+ For each surviving artifact-word occurrence, propose a keep-case rewrite to the new spelling and DEFER the ambiguous ones (word vs slug vs English vs immutable provenance) to the human. Apply the identity allow-list and the provenance-vs-living split (below) so you never rewrite a file identity or falsify history.
32
+
33
+ **Preview-only pass (mirrors the command's `--dry-run`).** Offer a write-nothing mode first: WALK the prose trees, PROPOSE every rewrite as a diff, and write NOTHING, so the human can review the judgement calls before they land. Only after the human accepts do you apply them. This is the skill's `--dry-run` equivalent.
34
+
35
+ Note (out of scope): a stale `.github/workflows/*.yml` is regenerated by `dorfl install-ci`, NOT hand-edited. If you notice one still carries the retired word, NOTE it for a regen; do not edit it here.
36
+
37
+ ### Half 3 — acceptance: the widened BI-WORD leak scan is the PROOF
38
+
39
+ The repo is DONE only when the bi-word leak scan is green over BOTH halves' output — the converted `work/**`+config+refs tree AND the swept prose trees. A green scan is the exhaustive-by-construction proof the cutover is complete; the only survivors it permits are marker spans, backtick spans, enumerated slug identities, genuine English, and immutable provenance.
40
+
41
+ ## Runner-agnostic fallback (when `dorfl` is ABSENT)
42
+
43
+ The command is the FAST PATH, not a hard dependency (adopt/convert is a runner-agnostic protocol — ADR §9; the `dorfl prd-to-spec` command is ONE implementation). If `dorfl` is not installed, complete the cutover BY HAND by following the SAME layers the command exposes as documented, independent pieces (see `packages/dorfl/src/prd-to-spec.ts`), in the same order:
44
+
45
+ 1. `checkQuiescence` — refuse over a dirty tree / a held lock / an in-progress work-branch.
46
+ 2. `resyncProtocol` — copy the canonical `work/protocol/*` contract and bump `VERSION`.
47
+ 3. `migrateFolders` — `git mv` the `work/**` lifecycle folders to the new spelling.
48
+ 4. `migrateItemContent` — rewrite the frontmatter field key + inert path/token refs across every item (including terminal history).
49
+ 5. `migrateConfig` — rename the `.dorfl.json` config keys, preserving their values.
50
+ 6. `migrateRefs` — rename the inert lock refs + work-branches.
51
+ 7. `scanForLeaks` — run the forward+reverse gate over the converted tree.
52
+
53
+ Then do Half 2 (the prose sweep) and Half 3 (the bi-word leak scan) exactly as above. The result is identical to the command path; the command just does layers 1-7 for you.
54
+
55
+ ## The reusable pattern toolkit (this skill's authoritative discipline)
56
+
57
+ The hand-sweep of the dorfl self-cutover proved out a small, transferable toolkit. TEACH it and REUSE it; do NOT fork the detector logic. The two existing scans already ENCODE this discipline and are its REFERENCE IMPLEMENTATION — point at them, read them, do not re-derive them:
58
+
59
+ - `packages/dorfl/test/prd-src-prose-leak-scan.test.ts` — the source comment/JSDoc + runtime-string scan over `packages/dorfl/src`.
60
+ - `packages/dorfl/test/prd-word-cutover-leak-scan.test.ts` — the tree-wide WORD/prose scan over `CONTEXT.md`/`README.md`/`AGENTS.md`/`skills/**`/`docs/**`/`work/**`.
61
+
62
+ Both encode the marker-strip, the bi-word lens, the English allow-list, the per-tree provenance-vs-living scoping, and the enumerated identity allow-list. The five load-bearing items:
63
+
64
+ 1. **The `''…''` provenance marker (double-single-quote).** When a live doc or comment must name a RETIRED token ONLY as provenance ("the old `''prd''` outcome is gone"), wrap it in the double-single-quote marker. It is uniquely greppable (`grep "''prd''"` finds exactly those provenance mentions, distinct from the ~40 ordinary backtick spans) and the scan STRIPS a `''…''` span exactly like a backtick span, so it is not read as the live noun.
65
+
66
+ 2. **The BI-WORD scan.** This cutover has a REVERT in its history (the `spec → brief → spec` thrash), so the scan must FAIL on the retired word (`prd`) OR the reverted-away word (`brief`). A forward-only scan silently passes a stray `brief` (it once did). Any future cutover with a thrash needs this two-word lens.
67
+
68
+ 3. **The coined-vs-real-word English asymmetry.** `prd` is a COINED acronym with ZERO English collisions, so its lens carries no English allow-list. `brief` is REAL English (`debrief`, `briefly`, "a brief note"), so its lens DOES carry an English allow-list plus a following-noun heuristic (bare "a brief" is the retired noun and must flag; "a brief note" is the English adjective and is exempt). Record which class each word is; apply the real-word allow-list only to the real word.
69
+
70
+ 4. **The provenance-vs-living per-tree split.** The retired word is IMMUTABLE PROVENANCE in some positions and a LIVE LEAK in others; encode the split as concrete per-tree scoping, NOT a blanket exemption. GATE the current-guidance surface: `CONTEXT.md`/`README.md`/`AGENTS.md`, `skills/**`, and the live-reference ADR text. EXEMPT the provenance trees: terminal-history bodies (`work/tasks/done/`, `work/specs/tasked/`, append-only notes), dated incident narration in ACTIVE task bodies, and ADR text that RECORDS what was retired or names the migration's pre-cutover INPUT. Rewriting a provenance mention falsifies history.
71
+
72
+ 5. **The concrete IDENTITY allow-list.** NEVER rewrite a `prd`-containing hyphenated slug, filename, `slug:`/`spec:`/`blockedBy:`/`covers:`/`taskedAfter:` value, camelCase symbol, or historical API name — each is a FILE IDENTITY or proper noun whose rename would break a cross-reference or desync history. Enumerate the survivors concretely and keep the list non-vacuous (every entry names a real identity present in the tree); do not use a blanket wildcard.
73
+
74
+ ## Domain vocabulary
75
+
76
+ - A **spec** is a north-star launch doc in `work/specs/`; a **task** is a buildable item in `work/tasks/`.
77
+ - The **`work/` contract** is the on-disk protocol every set-up repo carries.
78
+ - **`dorfl prd-to-spec`** is the purpose-named migration COMMAND (ADR §7e) whose DATA migration is scoped to `work/**`+config+refs and which ALSO re-syncs `work/protocol/*`.
79
+ - The **leak scan** is the acceptance GATE — a green bi-word scan is the proof the cutover is complete.
80
+ - Adopt/convert work is a SKILL, execute work is a COMMAND (ADR §8). That is why this prose sweep is a skill, not a new command layer.
81
+
82
+ ## The three maintainer decisions
83
+
84
+ 1. **A NEW standalone skill named `convert-from-prd-to-spec`** — NOT folded into the `migrate` skill. `migrate` maps a FOREIGN format onto the contract; this is a same-format keep-case vocabulary sweep of a repo ALREADY on the contract, so it stands alone.
85
+ 2. **This skill OWNS the doc-sweep coverage; `dorfl prd-to-spec` is NOT extended with a report-line fallback.** Invoking this skill IS the complete path (deterministic command + prose sweep), so the bare command need not print a manual grep. A user who runs only the bare command still gets a correctly-converted `work/`+config+refs+protocol; the residual prose is this skill's job.
86
+ 3. **This skill is `prd`-SPECIFIC** — authored for the `prd → spec` cutover (today's only cutover), NOT generalised to an arbitrary `<from> → <to>` from day one. The DATA engine's `VocabularyMigration` parameterisation remains the reuse mechanism for a future cutover; this skill is not pre-generalised.
87
+
88
+ ## Git
89
+
90
+ Do NOT stage/commit/push from this skill. The `git mv` folder moves + the ref renames are the command's job (Half 1); the prose edits are ordinary working-tree changes the maintainer reviews and commits. Report what was converted and what was swept; leave the commit to the human.
@@ -0,0 +1,218 @@
1
+ ---
2
+ name: drive-tasks
3
+ disable-model-invocation: true
4
+ description: 'The supervised conductor: build every ready work/ task in a loop via dorfl, reviewing each diff and merging, until none can advance. Requires the dorfl CLI.'
5
+ ---
6
+
7
+ # drive-tasks
8
+
9
+ **Be the conductor, not the player.** `dorfl do task:<slug> --isolated` already builds ONE task autonomously (claim → build agent → acceptance gate → optional Gate-2 review → PR) in a worktree off the arbiter. `drive-tasks` is the layer ABOVE: it looks at the _whole_ board, checks each ready task is still _fresh_, decides _what_ to build and in _what order_, drives `do` per task, then acts as a **third reviewer** (Gate-3, the conductor's own diff-vs-criteria pass — see step 4b) over each PR before merging it.
10
+
11
+ It is a **methodology skill** (prose you follow), like `to-task` / `review` — NOT a runner command. **Precondition:** it drives the **`dorfl` CLI** over a repo using the **`work/` contract** — if neither is present, this skill does not apply. (It is the ONE skill that leans on the runner CLI directly; that is its job. The other skills stay protocol-native.) It composes:
12
+
13
+ - **`dorfl do task:<slug> --isolated`** — the per-task worker (build + acceptance gate + optional PR/code-review gate), run `--isolated` ALWAYS (a job worktree off the arbiter, never the human checkout). The harness, model, acceptance gate, review mode, and integration mode all come from dorfl CONFIG (per-repo / global) — do NOT hardcode them; `--isolated` is the one flag this skill pins, and any other flag (`--review`/`--merge`/…) is a user-confirmed per-run override only.
14
+ - **`review`** (`skills/review/`) — the discipline for your own diff-vs-criteria pass over each opened PR.
15
+ - **`to-task`** (`skills/to-task/`) — for the forward-note step and any re-tasking the human asks for.
16
+
17
+ It is **scoped to building ready TASKS.** The broader job — survey _everything_ (observations, ideas, specs, tasks), figure out what can advance, fill judgement gaps conversationally until new tasks are READY, then build them — is `orchestrate`, which delegates the BUILDING back to this skill. Keep `drive-tasks` focused on building ready tasks; hand the deep survey up to `orchestrate`.
18
+
19
+ ## How it stalls (the stuck-set)
20
+
21
+ There is ONE loop. The skill **advances every task it can** and, whenever it hits a wall on a particular task, it does NOT halt — it records that task + its specific question in a **stuck-set** and moves to the next independent ready task (the [accumulate-don't-block rule](#the-accumulate-dont-block-rule)). Only when nothing more can advance does it deal with the stuck-set, and HERE is the only behavioural fork — it depends purely on whether a human is reachable in this session:
22
+
23
+ - **A human is present** (the normal case — you are running in their session): present the accumulated stuck-set as one [batched set of questions](#batching-the-questions), take the answers, and **continue the loop** (a task whose question is resolved becomes buildable again; one the human defers stays parked).
24
+ - **No human is reachable** (you were invoked to run unattended): do not block waiting — finish everything that can advance, then **stop and report the stuck-set** (plus the built/merged/needs-attention summary) as your result.
25
+
26
+ That is the whole difference; the loop, the selection, and the stuck-set are identical either way.
27
+
28
+ ### Selection + isolation
29
+
30
+ This skill does its OWN intelligent per-task selection (graph order + freshness + diff review) and dispatches `do` **per chosen slug** — it never uses `do`'s auto-pick (that is `run`'s daemon mechanism, not a conductor's). It builds **one task at a time, end-to-end**, and it builds **`--isolated`, ALWAYS** — never in-place.
31
+
32
+ `do task:<slug> --isolated` builds in a per-job worktree off THIS repo's arbiter (the SAME isolation `run` uses), inferring the arbiter from cwd. The human checkout is **never touched**: no dirty-tree refusal, no claim/done-move churn in your tree, no entanglement with the human's (or your own) uncommitted work, no rebuild-the-dist-mid-drive dance. The conductor is a pure observer of the arbiter. (`do --remote <url>` is the same isolation against a FOREIGN repo with no checkout; `--isolated` is its same-repo sibling.)
33
+
34
+ The ONE consequence to respect: an isolated build reads the task + its `blockedBy` deps from the **arbiter's `main`**, so a **local-only / un-pushed task is INVISIBLE** to it. Do NOT fall back to in-place for such a task — **push it (and its deps) to the arbiter first** (the arbiter is the source of truth; a task that isn't on it isn't ready to drive). There is no in-place mode in this skill.
35
+
36
+ The loop, selection, freshness check, Gate-3 review, and stuck-set are exactly as described below; `--isolated` is simply the standing build mode.
37
+
38
+ ## When to use vs. not
39
+
40
+ - **Use** to take a `work/tasks/ready/` from "N ready tasks" to "no ready task can advance", building + reviewing + merging each, in dependency-and-practical order; to conduct the dorfl worker through a phase of task-building; as the building engine `orchestrate` delegates to.
41
+ - **Don't** use it as the unattended daemon — that's `run` (genuine parallelism, no human). `drive-tasks` is **one task at a time, end-to-end**. Don't use it to _author_ tasks from scratch (that's `to-task`), or to _task specs / triage observations / fill judgement gaps / answer scattered open questions across the whole tree_ (that's `orchestrate`). Don't use it to FORCE a blocked task — it respects the gate.
42
+
43
+ ## The golden rules (do not violate)
44
+
45
+ 1. **One task at a time, end-to-end** (build → Gate-3 review → merge) so each merge unlocks the next cleanly and rebases stay trivial. Parallelism is `run`'s job.
46
+ 2. **Never force a failed task.** A red gate / Gate-2 block / rebase conflict routes the item to needs-attention (its per-item lock is marked `state: stuck`) — leave it there, branch preserved, skip its dependents, continue with independent ready tasks, report it at the end.
47
+ 3. **Capture, don't fix-in-place, off-path findings.** Spot drift outside a task's scope → write a `work/notes/observations/` note (and COMMIT + PUSH it when a later build depends on it — see rule 5), don't expand the task.
48
+ 4. **You merge the approval.** GitHub refuses `gh pr review --approve` on a PR whose commits are under your own identity — so post the verdict as a PR **comment** (`gh pr comment <n> --body-file …`, lead with `APPROVE ✅` / `BLOCK`), then `gh pr merge <n> --squash --delete-branch`. The comment + merge IS the approval.
49
+ 5. **Commit + PUSH your own `work/notes/observations/` notes before they need to matter.** Because builds are `--isolated` (off the arbiter), a dirty local tree does NOT block dispatch — but an un-pushed note or task is INVISIBLE to an isolated build until it lands on the arbiter. So commit your contract-native notes (append-only, low-risk) AND push them when a soon-to-build task depends on them being on `main` (e.g. a forward-note planted in a task body — step 2). Report what you committed/pushed in the summary. **What a conductor commits:** its own `work/notes/observations/` notes; a load-bearing **forward-note it plants in a task body** (step 2 — it MUST be committed to take effect before that task's `do`, and it is a small protocol-mechanical edit, not authored content); and the protocol's own moves the runner/`do`/`complete` make (claim reverts, done-moves, PR merges). It does NOT hand-author-and-commit a full spec or a fresh task SET — producing those is `to-spec`/`to-task`' job and they are left for human review. Report every commit in the summary.
50
+ 6. **Accumulate, don't stall.** When ONE task is stuck or needs a judgement call, write it into the stuck-set and move to the next INDEPENDENT ready task — never block the whole loop on one item. When nothing more can advance, surface the stuck-set: ask the human if one is present, else report it. See [the rule](#the-accumulate-dont-block-rule).
51
+ 7. **Never touch the target checkout; be checkout-agnostic.** Driving is a side-effect-free observation of the arbiter, so as a side-effect of driving you perform NO git mutation in the target repo's working checkout — no `git switch`/`checkout -B`/`branch -D`/`reset`/`rebase`/commit in the human's working tree. If you need a working tree for a cheap verification (e.g. re-run a task's own tests off its pushed branch), use a THROWAWAY clone / the job worktree / a temp dir — NEVER the human checkout. The human's uncommitted work and current branch are sacrosanct; leave the tree exactly as you found it. And because you need only the arbiter (a URL/remote) + `gh` + a scratch area, you can RUN FROM ANYWHERE: resolve the arbiter EXPLICITLY rather than assuming `cwd` is the repo, and if `cwd` happens to BE the human's checkout, treat it as READ-ONLY. Your own `work/notes/observations/` note commits (rule 5) go to the arbiter without dirtying the working tree. (UNLESS the human explicitly asks to drive in-place in a specific checkout.) This is the same arbiter-is-truth posture `do --remote`/`run` already use; the repeated `git rebase origin/main` reconciliations a checkout-bound drive needs are the symptom this rule removes.
52
+
53
+ ## The accumulate-don't-block rule
54
+
55
+ The loop's job is to **advance as much as possible**, not to halt at the first judgement call. Whenever you hit a **wall** on a task —
56
+
57
+ - it looks **stale/drifted** (the freshness check in step 1 fires),
58
+ - a **forward-note** seems needed but you're unsure it's wanted,
59
+ - a **Gate-3 review** surfaces a genuine judgement call (a maybe-blocking nit, an ambiguously-met criterion), or
60
+ - the task is otherwise ambiguous / rests on an unresolved decision
61
+
62
+ — do NOT stop the loop. **Record the item + the specific question in a STUCK-SET** (a running list you keep for the session), SKIP that task (and its dependents), and **continue with the next independent ready task.** Only when nothing more can advance do you deal with the stuck-set:
63
+
64
+ - **A human is present** → present the stuck-set as a [batched set of questions](#batching-the-questions), take answers, and resume the loop (a task whose question is resolved becomes buildable again; one the human defers stays parked).
65
+ - **No human reachable** → finish all you can, then stop and report the stuck-set (+ the built/merged/needs-attention summary) as your result; do not block waiting.
66
+
67
+ Either way the discipline is the same: do as much as can be done, then surface the residue in ONE batch — never dribble out one question at a time, never stall the whole loop on a single item.
68
+
69
+ ## Recovering a needs-attention item (requeue)
70
+
71
+ When a task has routed to needs-attention (a red gate / Gate-2 block / rebase conflict / a build-time STOP marks its per-item lock `state: stuck`), its body carries the reason and its `work/<type>-<slug>` branch is **preserved on the arbiter** — nothing is lost. Whether you can re-drive it depends on the reason:
72
+
73
+ - **A fixable problem the agent can resolve on a retry** — a real bug the gate caught, a scoping miss, a flaky-test red — is a CONDUCTOR move, not a human question. Recover it with **`dorfl requeue <slug> --arbiter origin`** (DEFAULT = keep + continue: releases the stuck lock; the body is already resting in the pool `tasks/ready/`, and the branch is left UNTOUCHED so the next claim CONTINUES from its tip). Optionally add a precise handoff with **`-m "<what to fix>"`** (appended to the body). Then `do task:<slug>` again: the re-claim CONTINUES from the kept branch, and the merged `agent-prompt-continue-context` puts the prior work + the needs-attention reason
74
+ - your `-m` note into the agent's prompt — so it BUILDS ON the good code and fixes the gap rather than restarting.
75
+ - **A genuine human-decision block** — the task is ambiguous / drifted / rests on an unresolved fork — is NOT something a retry fixes. Leave it parked; it is a stuck-set question (ask it if a human is present, else report it). Do NOT requeue a task whose premise is wrong — re-scope it first (that is `orchestrate`/human work).
76
+ - **`requeue --reset`** (DISCARD + fresh: deletes the remote branch first, then releases the lock so the next claim starts CLEAN) is for when the kept work is worthless. It is guarded and NEVER the default — only on an explicit human call; the conductor's default recovery is keep+continue.
77
+
78
+ AFTER any requeue, re-sync (`git fetch && pull --rebase`) so the re-`do` claims off the latest main. A requeued-and-rebuilt task then flows through the normal step-4 BUILD → REVIEW → MERGE.
79
+
80
+ > **Let `do` re-drive a recovered branch — do NOT hand-roll a parallel `pr/<slug>` branch.** When a flake-recovered task's `work/<type>-<slug>` branch already holds green work but needs only a small lifecycle fixup before its PR (release the stuck lock, strip the runner's "aborted/needs-attention" commit subjects), the right move is `requeue` (keep+continue) + re-`do`: the re-claim continues from the kept branch tip and the runner ITSELF opens the PR — no manual PR at all. If you genuinely must fix up by hand, commit the fixup **ON the existing `work/<type>-<slug>` branch** and PR that branch (`gh pr create --head work/<type>-<slug>`). NEVER spin a separate `pr/<slug>` branch off `main` and re-apply the tree: it **orphans** the canonical `work/<type>-<slug>` branch on the remote (it then has to be remembered and hand-deleted — easy to miss) and **discards** the branch's real history for mere cosmetic single-commit tidiness. One branch, its own history, no orphan.
81
+
82
+ ## The loop
83
+
84
+ ### 0. ANALYSE the task set + dependency graph
85
+
86
+ Read every `work/tasks/ready/*.md` frontmatter (`slug`, `blockedBy`/`deps`, `needsAnswers`, `humanOnly`, `spec`, `covers`) and the `work/tasks/done/` set. Build the graph:
87
+
88
+ - **READY** = every `blockedBy` is in `work/tasks/done/` AND `needsAnswers !== true` AND `humanOnly !== true`. (BOTH gate fields exclude a task from READY: `needsAnswers` means open questions a human must answer first; `humanOnly` means a human must DRIVE it. Check BOTH in the frontmatter scan, not just `needsAnswers`. A `humanOnly` task dispatched to `do` will rightly STOP at build time, wasting a claim/surface cycle, so catch it UP FRONT.)
89
+ - **BLOCKED** = a `blockedBy` is still in the pool `tasks/ready/`, held (in-progress on its lock), or stuck (needs-attention on its lock).
90
+ - **GATED** = `needsAnswers: true` OR `humanOnly: true` (needs a human first, by question or by drive-ownership; not part of the AUTONOMOUS READY set; list it but do not AUTO-build it, even once its deps land). The agent-buildable READY set is the tasks that are neither blocked nor gated by EITHER field.
91
+ - **"GATED" gates AUTONOMOUS SELECTION, not explicit human dispatch.** `humanOnly`/`needsAnswers` keep a task out of the set THIS LOOP (and `run`/`advance`/auto-pick) picks ON ITS OWN; they do NOT make the task unbuildable. An EXPLICIT `dorfl do task:<slug>` typed by a human (or by THIS conductor on a human's explicit instruction to build that named slug) STILL builds it — the readiness guard does not consult `humanOnly` on the human path ("a human is never bound by `humanOnly`"), and explicit dispatch drops the policy term ("the pool gates the policy, not the explicit claim"). So a `humanOnly` task is the human's to drive by NAME, never the conductor's to AUTO-select. (This is also why `humanOnly` can serve, off-label, as a "keep CI/`run` off while I drive this by hand" latch — but prefer POSITION/staging for that; see WORK-CONTRACT.md "Task `humanOnly` is NARROW".)
92
+
93
+ (A task in the STAGING slot `tasks/backlog/` is review-first, awaiting a human's promotion into the pool `tasks/ready/`; it is NOT in the READY set — surface it, don't build it.) Note which tasks **unlock the most downstream work** when they land — those go first.
94
+
95
+ > **This is the DEFAULT and it does NOT change:** the READY set is computed from the agent POOL `work/tasks/ready/`, and `work/tasks/backlog/` is review-first STAGING the conductor does NOT build (it surfaces those, it never dispatches `do` against them). Unless the caller explicitly opts into the drive-from-backlog mode below, behave exactly as documented above.
96
+
97
+ #### Opt-in: drive tasks from `tasks/backlog/` (the staging folder)
98
+
99
+ **OPT-IN ONLY — never the default.** When, and ONLY when, the **caller EXPLICITLY instructs** this skill to drive tasks from the staging folder `work/tasks/backlog/` (e.g. "drive the tasks in backlog/", "build the backlog tasks <slugs>", an explicit drive-from-backlog mode), the conductor builds those staged tasks too, using the **identical** loop, selection, freshness check, Gate-3 review, requeue recovery, and stuck-set discipline described in this whole skill — the ONLY change is WHERE the READY set is read from. Absent that explicit instruction, `tasks/backlog/` stays review-first staging you surface but do NOT build (the default above). If you are unsure whether the caller meant this, do NOT assume it — treat the staging folder as review-first and ask.
100
+
101
+ In this mode the READY computation reads **`work/tasks/backlog/`** instead of `work/tasks/ready/` (or, if the caller explicitly says to drive BOTH, the UNION of `tasks/backlog/` + `tasks/ready/`). Everything else is unchanged:
102
+
103
+ - **READY** = every `blockedBy` is in `work/tasks/done/` AND `needsAnswers !== true` AND `humanOnly !== true` — the SAME gating, just over the staging set (and, when the caller scopes the run to specific slugs, restricted to those). `blockedBy` still resolves against `work/tasks/done/` exactly as in the default; deps held in `tasks/backlog/` (or `tasks/ready/`) that are not yet `done/` are BLOCKED, so honour the same dependency ordering.
104
+ - **GATED** (`needsAnswers`/`humanOnly`) and **BLOCKED** mean exactly what they mean above; a `humanOnly`/`needsAnswers` staged task is NEVER agent-buildable here either.
105
+ - The build is the SAME `dorfl do task:<slug> --isolated --allow-backlog`, the SAME Gate-3 diff-vs-criteria review, the SAME merge-via-PR-comment, and the SAME accumulate-don't-block stuck-set. The one added flag is **`--allow-backlog`**: it widens `do`'s task resolution to also search `tasks/backlog/`, so the isolated build can resolve a staged slug. WITHOUT it, `do` searches only `tasks/ready/` + in-progress and would throw `no task '<slug>' found in work/in-progress/, work/tasks/ready/` — i.e. this opt-in mode is a spec without a mechanism unless you pass the flag. Everything else about the build (claim, lock, gate, Gate-2) is identical to driving a ready task; the staged task done-moves `tasks/backlog/ → tasks/done/` directly, because your explicit drive IS the promotion. (The staged task must be on the arbiter's `main` for the isolated build to see it — per [Selection + isolation](#selection--isolation), push it and its deps first if they are local-only.)
106
+
107
+ This mode exists so a caller who has already decided a set of staged tasks is good can have the conductor build them straight from `tasks/backlog/` without first promoting them into `tasks/ready/`. It does NOT relax the review-first nature of staging for any OTHER caller or run; it is a per-invocation, explicitly-requested override of the read location only.
108
+
109
+ **Why drive in place beats promote-then-drive (the competition window).** The obvious-but-wrong way to build a staged task is to first promote it `tasks/backlog/ → tasks/ready/`, then drive it. But `tasks/ready/` is the AGENT POOL: the instant a task lands there on the arbiter, a CI `advance` leg OR a machine-local `run` daemon can CLAIM it (both pull from `tasks-ready`). So promote-then-drive opens a **competition window** — the autonomous claimer races the human who wanted to drive the work themselves. Driving in place with `--allow-backlog` keeps the body resting in `tasks/backlog/` (never the pool), so no CI leg or `run` daemon can claim it: the human keeps sole control of the set they are driving until they decide (if ever) to promote. Staging is not only review-first admission; it is the human-control position — promotion to the pool is EXACTLY what makes an item claimable-by-anyone. So drive in place; never promote-then-drive.
110
+
111
+ ### 1. CHECK freshness / up-to-dateness of each ready task
112
+
113
+ **A ready task is not necessarily a CORRECT task.** Tasks are authored ahead of time; by the time one is ready its load-bearing premises may have **drifted** — something it says is "unconsumed / not yet built / still TODO" may already have landed in `work/tasks/done/` + the code. Building a drifted task wastes a full `do` run (the build agent will rightly STOP, or worse, churn working code) — and the conductor, which sees the WHOLE graph, can catch it cheaply UP FRONT.
114
+
115
+ For each ready task, before dispatching `do`, sanity-check its premises against current reality:
116
+
117
+ - Read the task's "What to build" + any **drift-check / READ-FIRST** block (tasks often name the exact files + the premise to confirm).
118
+ - Spot-check the load-bearing claims: if it says "X has zero consumers", "Y still uses the old path", "the seam is unwired" — grep `work/tasks/done/` + `src/` to confirm that is STILL true. Recently-merged tasks are the usual culprit (a convergence that already happened, a verb already renamed, a primitive already adopted).
119
+ - Glance at `work/notes/observations/` for a `*-premise-drifted` / drift note naming this task.
120
+
121
+ If the task still holds → proceed. **If it smells stale → it's a WALL**: record it in the stuck-set with the specific premise that no longer holds + a suggested re-scope, SKIP it (per the accumulate-don't-block rule), and move on. (This catches drift cheaply up front. The build-time backstop also exists: a task that IS drifted and slips past this check makes the build agent raise a STOP — the runner routes it to needs-attention with the agent's reason, skipping the wasted gate — but catching it here saves the whole `do` run.)
122
+
123
+ This is also the natural place for a **light look-ahead**: skim `work/specs/ready/` (and, if cheap, `work/notes/observations/` + `work/notes/ideas/`) for what's coming — it informs the forward-notes in step 2. The DEEP survey-everything pass is `orchestrate`'s job, not this skill's; keep this shallow.
124
+
125
+ ### 2. CHECK for forward-looking notes a soon-to-be-tasked spec will need
126
+
127
+ Before building, scan `work/specs/ready/` for a spec that will be tasked soon and whose design **depends on the shape** of tasks you're about to land (a `taskedAfter:` / "builds on the X convergence" relationship). If a ready task should carry a `> FORWARD-POINTER` note so that spec can be tasked later WITHOUT amending the spec (e.g. "keep this loop/tick separable", "keep `-n` sequential", "don't rename X — the advance migration owns it", "shape this as a named callable unit"), **add the note to the task body now** (compose `to-task`' forward-note discipline). These notes are load-bearing: they prevent the downstream spec from needing changes. A note you're CONFIDENT about: plant it and COMMIT it (it must land before that task's `do` to take effect; per rule 5 this small protocol edit is committed, unlike authored artifacts). If a note is non-trivial or you're unsure it's wanted, that is a WALL → record it in the stuck-set (surface it with the batch when the loop stalls) rather than planting a guessed note.
128
+
129
+ > This is the step that earns the conductor its keep — a per-task `do` agent only sees its own task; only the conductor sees the whole graph + the pending specs and can plant the cross-task notes.
130
+
131
+ ### 3. SELECT the tasks + a practical order
132
+
133
+ From the READY set, order by: (a) **dependency** (a task that unlocks others first), then (b) **practical** concerns — serialise tasks that edit the SAME hot file (e.g. one big `cli.ts`) so rebases stay trivial; prefer the order that keeps each subsequent claim rebasing cleanly off fresh `main`. State the planned order (and why) before you start.
134
+
135
+ ### 4. For EACH fresh, ready task, in order — BUILD → REVIEW → MERGE
136
+
137
+ **4a. Build it** — ALWAYS `--isolated`:
138
+
139
+ ```sh
140
+ dorfl do task:<slug> --isolated
141
+ ```
142
+
143
+ **`--isolated` is the one flag this skill mandates. Everything else — review mode, integration mode, harness, model — is LET TO CONFIG** (resolved `flag > env > per-repo > global > default`), so do NOT hardcode `--review`/`--propose`/`--merge` here: the repo's `.dorfl.json` decides, and `do --propose` is already the default. (`--isolated` reads the target repo's committed `.dorfl.json` from the arbiter's main, so per-repo `harness`/`verify`/`noPR`/`review` apply automatically — no `--harness`/env workaround.) **At the START of a drive, CONFIRM the run mode with the user** — do they want Gate 2 (`--review`, off by default — the human-first family default), and propose vs merge integration? — and add `--review` / `--merge` / etc. as explicit per-run OVERRIDES only when the user asks; otherwise let config drive every build of the drive.
144
+
145
+ After a failed/aborted isolated run, a stale job worktree can linger and block the next build's mirror fetch — run `dorfl gc` (or `gc --force --yes` once you've confirmed the work is safe on the arbiter) to reap it before continuing. Use a **generous timeout** — `do` runs a build agent + the full gate + (if enabled) the Gate-2 review and can take well over an hour for a big task. If you interrupt it, KILL the spawned `do`/agent process tree explicitly (an abort of your wrapper does NOT stop the child); the isolated worktree is then reaped/recovered via `gc` + the kept arbiter branch (your checkout is untouched).
146
+
147
+ - **Non-zero exit** (red gate / Gate-2 block / rebase conflict) → the item is now in needs-attention (its lock is `state: stuck`) with its reason in the body and its branch preserved on the arbiter. STOP that task (golden rule 2), skip its dependents, move to the next INDEPENDENT ready task. If the reason is a FIXABLE problem (not a human-decision block), it is recoverable IN-LOOP via `requeue` + re-`do` (continues from the kept branch) — see [Recovering a needs-attention item](#recovering-a-needs-attention-item-requeue); otherwise it becomes a stuck-set question.
148
+
149
+ **4b. Gate-3 — review the opened PR yourself** (the conductor's own review, the third review layer after Gate-1 = `do`'s acceptance gate and Gate-2 = `do`'s PR/code-review gate — the discipline that makes you a real reviewer of the result, not a rubber stamp). `do` already ran Gate-1 AND Gate-2 before opening the PR, so **trust that green** — do NOT re-run the (potentially slow) acceptance gate here. Your job is the JUDGEMENT the gates can't fully do: does the diff actually deliver THIS task?
150
+
151
+ - Read the **diff against the task's acceptance criteria** — tick each criterion (apply the `review` skill's lenses + destination check).
152
+ - **Verify every drift note / forward-pointer / must-fix-before-consume** the task carried was actually honoured (these are exactly where a `do` agent silently drifts — e.g. "don't rename X", "keep it sequential", "make the omitted path REFUSE"). Grep the branch to confirm.
153
+ - Read the gate-generated `work/notes/observations/review-nits-<slug>-*.md` and triage each nit (blocking? benign? a real off-path finding worth its own observation?).
154
+ - **Verdict:** if a drift note was violated or an acceptance criterion is unmet → **BLOCK** (comment the blocking findings; do NOT merge). If it is a clear BLOCK or clear APPROVE, act on it. If it is a genuine **judgement call** (a maybe-blocking nit, an ambiguously-met criterion), that is a WALL → record it in the stuck-set and skip (do not merge on a coin-flip), per the [accumulate-don't-block rule](#the-accumulate-dont-block-rule). Otherwise **APPROVE**.
155
+
156
+ > Dropping the Gate-3 re-verify is SOUND by default: `do`'s OWN acceptance gate runs against the merged artifact, because the `freshWorktreeGate` config (ON by default) runs `prepare`+`verify` in a CLEAN throwaway worktree cut from the work branch REBASED onto `<arbiter>/main` (the exact tree that integrates) — closing the checkout-vs-pushed-tree divergence at the root, so there is no separate per-task re-verify to re-introduce. (The opt-out `--no-fresh-worktree-gate` reverts to the old in-build-worktree pre-rebase gate, where that rare divergence is consciously accepted.)
157
+
158
+ **4c. Merge** (golden rule 4):
159
+
160
+ ```sh
161
+ gh pr comment <n> --body-file /tmp/approve-<n>.md # leads with APPROVE ✅ + per-criterion reasoning
162
+ gh pr merge <n> --squash --delete-branch
163
+ ```
164
+
165
+ Use `--body-file` (PR bodies are backtick-heavy and break inline `--body` shell quoting).
166
+
167
+ > PROVIDER ASSUMPTION: the verdict-as-PR-comment + `gh pr merge` flow above assumes **`--propose` mode + a GitHub arbiter** (the only review-surface this skill knows today). In `--merge` mode `do` integrates directly with no PR — then your Gate-3 diff review still applies, but you record the verdict in the task/observation, not a PR comment, and there is nothing to `gh pr merge`. A non-GitHub arbiter has no `gh` at all. Making the approval/merge surface provider-agnostic (a likely future `dorfl` command, e.g. an `approve`/`land` verb) is NOT built yet; until then this step is GitHub-propose-specific — adapt the merge mechanics to the repo's actual integration mode.
168
+
169
+ **4d. Re-sync + re-evaluate:** recompute the READY set from the ARBITER (read-only) — `git fetch origin` and read the refreshed `origin/main` `work/` state (or use the mirror-side scan). You do NOT need to mutate a working checkout to do this:
170
+
171
+ ```sh
172
+ git fetch origin # then read origin/main's work/ state to recompute the ready set
173
+ ```
174
+
175
+ Builds run `--isolated` on the arbiter, NOT your checkout, so a `git fetch` against the arbiter is all you need to RECOMPUTE the READY set — there is no local rebase dance, no branch switch, and no clean-tree precondition for the next dispatch (per golden rule 7, do not `git checkout`/`pull` INTO the human's working tree as a driving side-effect; if you are driving from a scratch clone you own, fast-forwarding IT is fine). If the next `do` runs from a BUILT copy of dorfl (e.g. a local checkout of this very repo), rebuild it so the merge you just made is in the binary the next `do` invokes. The merge landed `work/tasks/done/<slug>.md` on `main`; any task blocked only by it is now unlocked. Recompute the READY set (steps 0–1, including a fresh freshness check on newly-unlocked tasks) and continue.
176
+
177
+ ### 5. CONTINUE until nothing can advance
178
+
179
+ Repeat step 4 until no ready task can advance (the READY set is empty OR every remaining ready task is parked in the stuck-set). THEN deal with the stuck-set ([the rule](#the-accumulate-dont-block-rule)): if a human is present, ask the batched questions and resume the loop from the answers; if not, report the stuck-set and stop.
180
+
181
+ ### 6. SUMMARISE — the conductor's report
182
+
183
+ End with a structured rundown (this is a first-class deliverable, not an afterthought):
184
+
185
+ - **Built + merged** — each task with its PR number + a one-line note on any drift/forward-pointer/must-fix it honoured (`do` ran the acceptance + review gates; you reviewed the diff).
186
+ - **Routed to needs-attention** — each, with the EXACT blocking reason, whether the agent produced no code vs. a real bug the gate caught, and that the branch is preserved on the arbiter (recoverable via `requeue` + re-claim, or `work-on`).
187
+ - **Still blocked / gated** — what remains and on what (a needs-attention item? a `needsAnswers` human gate?).
188
+ - **What's now UNLOCKED in the project** — new commands, new behaviours/capabilities, retired verbs, and crucially **which specs are now taskable / unblocked** by what landed (the cross-cutting view only the conductor has).
189
+ - **Observations filed** (committed as you go, per rule 5) — list them so the human can find them in `git log`.
190
+ - **Housekeeping** — any direct-to-`main` chore commits you made (claim reverts, forward-notes), so the human can see them in `git log`.
191
+
192
+ When you run unattended (no human reachable), this report (plus the stuck-set) is your RESULT to whoever invoked you, not a message to a human.
193
+
194
+ ## Batching the questions
195
+
196
+ When the loop stalls with a non-empty stuck-set, do NOT ask one question at a time. **Regroup the stuck-set into a single, well-organised batch** (the way a good conductor surfaces everything at once for one efficient answering pass):
197
+
198
+ - Group by item, each with: the task, the SPECIFIC question, why it's stuck (stale premise / uncertain forward-note / review judgement call), enough inline context to answer WITHOUT opening the file, and a **suggested default** where you have one.
199
+ - Order by leverage (a question whose answer unblocks the most downstream work first).
200
+ - If a human is present: present the batch, take answers, resume the loop (resolved → buildable again; deferred → stays parked). If not: this batch is the residue you report and stop on.
201
+
202
+ The batch is conversational (asked) or reported (unattended), not a written file.
203
+
204
+ ## Beyond tasks
205
+
206
+ This skill builds READY TASKS. Two things sit ABOVE it, sharing its loop shape:
207
+
208
+ - **`orchestrate`** — the human-in-the-loop META conductor: surveys _everything_ (observations / ideas / specs / tasks), advances what it can (tasking specs, triaging), fills judgement gaps with the human conversationally until new tasks are READY, then **delegates the building to THIS skill** and surfaces the stuck-set to the human.
209
+ - **`advance`** — the AUTONOMOUS, file-mediated version of the same idea, driven by `run`/CI with a `work/questions/` sidecar. `drive-tasks` + `orchestrate` are the human-agency, synchronous siblings of `advance`; they share the same tick contract.
210
+
211
+ The conductor is **tick-agnostic**: today the per-item action is `dorfl do task:<slug>` (build a task); as `advance`-class ticks land (task / triage / surface / apply), the SAME loop applies — only the per-item command in step 4a changes. (Mirrors the loop/tick split in `run`: the conductor is a _loop_; the per-item command is the _tick_.)
212
+
213
+ ## Pitfalls
214
+
215
+ - **The interrupt footgun.** Aborting your `do` wrapper does NOT kill the spawned agent — it keeps editing files in the background. After any interrupt, `ps`-find + kill the `do`/agent/`tsc` tree, discard its partial edits, and release the claim (the runner reverts the lock; the body is already resting in the pool `tasks/ready/`) before redoing.
216
+ - **Flaky tests red a good gate.** If a task's gate fails ONLY on a known-flaky test with everything else green, re-run before treating it as a real block (and the flake itself is a `notes/observations/` note, not a task fix).
217
+ - **A `do` that delivers no code is NOT a success** (nothing changed → the gate passes vacuously). The runner catches this two ways — an agent STOP (drift) routes to needs-attention before the gate, and Gate-2 (plus your Gate-3) check the _diff against the criteria_, not just the gate. Trust the block; never merge an empty-or-criteria-unmet diff.
218
+ - **Don't sum two freshness models.** When reporting cross-repo + local state, keep them distinct.