dorfl 0.1.2 → 0.2.1

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
@@ -20,7 +20,7 @@ import {extractJsonObjectSpan} from './verdict-json.js';
20
20
  * "the INPUT adapter differs per front door and is NOT forced to be shared").
21
21
  * - **the ALLOWED-OUTCOME SET** ({@link decide}'s `allowedOutcomes`): each caller
22
22
  * passes the SUBSET of {@link DecisionOutcome} it permits — advance-apply allows
23
- * `{task | prd | adr | delete | ask}`, intake keeps its own `{task | spec | ask |
23
+ * `{task | spec | adr | dispose | ask}`, intake keeps its own `{task | spec | ask |
24
24
  * bounce}` (intake is NOT refactored onto this engine here — decision 13). The
25
25
  * engine never hard-codes which outcomes a caller permits; it only VALIDATES the
26
26
  * returned verdict against the set and rejects (loudly) one outside it
@@ -43,8 +43,23 @@ import {extractJsonObjectSpan} from './verdict-json.js';
43
43
  * - **adr** — mint an adr from the input (NO caller wires this yet; the keystone's
44
44
  * allowed set will, and `agentic-apply-mint-adr-route` adds the route — decision
45
45
  * 14 keeps the engine agnostic so this is added without re-architecting).
46
- * - **delete** — delete the SOURCE the input is about (a direct, git-recoverable
47
- * removal decision 12).
46
+ * - **dispose** — DISPOSE the SOURCE the input is about, POLYMORPHIC on the
47
+ * source's regime (spec `surface-stuck-as-questions-and-retire-stuck-lock-state`
48
+ * resolved decision #5; task
49
+ * `apply-disposition-delete-to-dispose-regime-polymorphic`): an OBSERVATION is
50
+ * `git rm`-ed (notes leave by deletion, decision 12); a TASK is `git mv`-ed to
51
+ * its regime's won't-proceed terminal `tasks/cancelled/` (RETAINED — a task
52
+ * cannot be hard-deleted by the apply rung, only disposed to its terminal); a
53
+ * SPEC is `git mv`-ed to `specs/dropped/` (RETAINED). Making the token
54
+ * polymorphic (rather than adding a second `cancel` beside a literal `delete`)
55
+ * makes "a task cannot be deleted, only disposed to its terminal" true BY
56
+ * CONSTRUCTION.
57
+ * - **resolve** — the answer SETTLES the item with NO artifact to mint and the
58
+ * note RETAINED: route to the apply persist's resolve-fully path (harvest the
59
+ * answers into the body, clear `needsAnswers`, delete the sidecar) so the
60
+ * already-answered question stops re-surfacing. The SIBLING of `dispose` (both
61
+ * end the question-loop minting nothing), but `resolve` KEEPS the note whereas
62
+ * `dispose` drops-or-terminals it (task `apply-decide-resolve-verdict-mint-nothing`).
48
63
  * - **ask** — ask the operator a follow-up (re-pause; the conversation
49
64
  * accumulates — decision 5).
50
65
  *
@@ -52,17 +67,23 @@ import {extractJsonObjectSpan} from './verdict-json.js';
52
67
  * {@link decide}. The engine is agnostic to which subset a caller permits.
53
68
  */
54
69
  // MIGRATE step (spec `prd-to-spec-vocabulary-cutover-and-migration-command`): the
55
- // parent-spec verdict outcome is `'spec'` (renamed from `'prd'`); the decider
70
+ // parent-spec verdict outcome is `'spec'` (renamed from ''prd''); the decider
56
71
  // prompt emits it and the parser accepts it. This is a fresh per-call LLM verdict
57
- // (nothing `'prd'`-valued is persisted), so the rename needs no on-disk alias.
58
- export type DecisionOutcome = 'task' | 'spec' | 'adr' | 'delete' | 'ask';
72
+ // (nothing ''prd''-valued is persisted), so the rename needs no on-disk alias.
73
+ export type DecisionOutcome =
74
+ | 'task'
75
+ | 'spec'
76
+ | 'adr'
77
+ | 'dispose'
78
+ | 'resolve'
79
+ | 'ask';
59
80
 
60
81
  /**
61
82
  * The VERDICT the decider returns — the chosen {@link DecisionOutcome} plus the
62
83
  * DRAFTED content for that outcome (the analogue of {@link IntakeVerdict}). Every
63
84
  * content field is OPTIONAL on the shape: a given verdict only fills the channels
64
85
  * its outcome consumes (a `task` fills the task channels, an `ask` fills
65
- * `question`, a `delete` may carry only a `reason`). The dispatching CALLER
86
+ * `question`, a `dispose` may carry only a `reason`). The dispatching CALLER
66
87
  * decides which channels it requires for each outcome it allows — the engine only
67
88
  * guards the `outcome` discriminator against the allowed set, never the content
68
89
  * (it stays outcome-agnostic).
@@ -93,11 +114,24 @@ export interface DecisionVerdict {
93
114
  /** The drafted adr BODY (`adr` outcome) — the markdown AFTER the frontmatter. */
94
115
  adrBody?: string;
95
116
  /**
96
- * The reason the source should be deleted (`delete` outcome) — the caller
97
- * carries it into the revertible deletion's commit message (decision 12: the
98
- * delete is git-recoverable, the reason in the commit message).
117
+ * The reason the source should be DISPOSED (`dispose` outcome) — carried by
118
+ * the caller into the regime-polymorphic disposal: an OBSERVATION's reason
119
+ * rides the revertible git-rm commit message (decision 12: notes leave by
120
+ * deletion, git history = archive); a TASK/SPEC's reason is written into the
121
+ * moved item's `reason:` frontmatter so the durable body records why the
122
+ * item won't proceed (the file is RETAINED at the regime's terminal —
123
+ * `tasks/cancelled/` or `specs/dropped/`).
99
124
  */
100
- deleteReason?: string;
125
+ disposeReason?: string;
126
+ /**
127
+ * Why the item is settled with NOTHING to mint (`resolve` outcome) — the
128
+ * SIBLING of {@link disposeReason}, but the note is RETAINED (the apply rung
129
+ * routes this to the resolve-fully path, which harvests the answers into the
130
+ * body rather than deleting the note). The reason is advisory context for the
131
+ * human/reviewer; the durable disposition record is the `## Applied answers`
132
+ * block the resolve-fully path writes.
133
+ */
134
+ resolveReason?: string;
101
135
  /**
102
136
  * The drafted follow-up question(s) (`ask` outcome) — the caller appends them
103
137
  * to the conversation and re-pauses (decision 5: reuse the existing
@@ -200,7 +234,7 @@ export async function decide<TInput>(
200
234
  * object carrying an `"outcome"` field via the SHARED {@link extractJsonObjectSpan}
201
235
  * (the same extractor every prompt→verdict→dispatch seam in this package uses —
202
236
  * NOT a forked copy), `JSON.parse`s it, and validates the shape:
203
- * `outcome ∈ {task,spec,adr,delete,ask}`.
237
+ * `outcome ∈ {task,spec,adr,dispose,resolve,ask}`.
204
238
  *
205
239
  * This validates the verdict is a WELL-FORMED member of the SUPERSET; the
206
240
  * caller-specific allowed-outcome guard ({@link decide}) then rejects one outside
@@ -235,12 +269,13 @@ export function parseDecisionVerdict(output: string): DecisionVerdict {
235
269
  outcome !== 'task' &&
236
270
  outcome !== 'spec' &&
237
271
  outcome !== 'adr' &&
238
- outcome !== 'delete' &&
272
+ outcome !== 'dispose' &&
273
+ outcome !== 'resolve' &&
239
274
  outcome !== 'ask'
240
275
  ) {
241
276
  throw new Error(
242
- `decision verdict 'outcome' was not one of task|spec|adr|delete|ask (got ` +
243
- `${JSON.stringify(outcome)}).`,
277
+ `decision verdict 'outcome' was not one of task|spec|adr|dispose|resolve|ask ` +
278
+ `(got ${JSON.stringify(outcome)}).`,
244
279
  );
245
280
  }
246
281
  // Map the per-outcome fields onto the verdict shape, keeping ONLY the strings
@@ -264,8 +299,11 @@ export function parseDecisionVerdict(output: string): DecisionVerdict {
264
299
  ...(str(obj.adrSlug) !== undefined ? {adrSlug: str(obj.adrSlug)} : {}),
265
300
  ...(str(obj.adrTitle) !== undefined ? {adrTitle: str(obj.adrTitle)} : {}),
266
301
  ...(str(obj.adrBody) !== undefined ? {adrBody: str(obj.adrBody)} : {}),
267
- ...(str(obj.deleteReason) !== undefined
268
- ? {deleteReason: str(obj.deleteReason)}
302
+ ...(str(obj.disposeReason) !== undefined
303
+ ? {disposeReason: str(obj.disposeReason)}
304
+ : {}),
305
+ ...(str(obj.resolveReason) !== undefined
306
+ ? {resolveReason: str(obj.resolveReason)}
269
307
  : {}),
270
308
  ...(str(obj.question) !== undefined ? {question: str(obj.question)} : {}),
271
309
  };
@@ -1,5 +1,6 @@
1
1
  import {performDo, type DoOptions, type DoResult} from './do.js';
2
2
  import {scanRepoPaths} from './scan.js';
3
+ import {heldTaskSlugs} from './item-lock.js';
3
4
  import {ledgerRead, type LedgerReadStrategy} from './ledger-read.js';
4
5
  import {
5
6
  selectPrioritised,
@@ -105,6 +106,16 @@ export async function performDoAuto(
105
106
  const cwd = options.cwd;
106
107
  const count = options.count ?? 1;
107
108
 
109
+ // Held-slug subtraction (task
110
+ // `in-place-scan-subtracts-held-locked-slugs-from-propose-matrix`): read the
111
+ // coordination arbiter's held task-lock refs and pass them into `scanRepoPaths`
112
+ // so a held item (state `active`/`stuck`) does not enter the item pool NOR the
113
+ // lifecycle surface/apply pools. `heldTaskSlugs` is the GRACEFUL variant (empty
114
+ // set on any read fault): the follow-on claim CAS is still the load-bearing
115
+ // safety net locally — this subtraction is a courtesy that avoids selecting an
116
+ // item that would immediately lose its claim race.
117
+ const heldSlugs = await heldTaskSlugs(cwd, options.arbiter, options.env);
118
+
108
119
  // Pool 1 — eligible TASKS via the EXISTING scan/select path (task-only).
109
120
  // Thread `override` so the per-machine override is applied per repo (the
110
121
  // inner `resolveRepoConfig` re-applies it AFTER the committed file, restoring
@@ -112,7 +123,7 @@ export async function performDoAuto(
112
123
  const report = scanRepoPaths(
113
124
  [cwd],
114
125
  options.config,
115
- new Set(),
126
+ heldSlugs,
116
127
  options.override,
117
128
  );
118
129
 
package/src/do-config.ts CHANGED
@@ -375,7 +375,7 @@ export function surfaceBlockersFlagOverrides(
375
375
 
376
376
  /**
377
377
  * **The cross-job merge-serialiser CAS-retry cap CLI flag** (`--merge-retries
378
- * <n>`) — prd `land-time-reverify-and-parallel-merge-ceiling` Story 5 / Applied
378
+ * <n>`) — spec `land-time-reverify-and-parallel-merge-ceiling` Story 5 / Applied
379
379
  * Answer q1 (a). The git-alone FLOOR of the cross-job land-queue; a wide-matrix
380
380
  * CI raises the cap so more contenders converge before any spurious bounce to
381
381
  * needs-attention. Offered by `do`/`run`/`complete`. Resolved through the SAME