dorfl 0.1.1 → 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 (492) hide show
  1. package/dist/advance-ci-template.d.ts +3 -3
  2. package/dist/advance-ci-template.js +1 -1
  3. package/dist/advance-ci-template.js.map +1 -1
  4. package/dist/advance-classify.d.ts +5 -5
  5. package/dist/advance-classify.d.ts.map +1 -1
  6. package/dist/advance-classify.js +4 -4
  7. package/dist/advance-drivers.d.ts +8 -8
  8. package/dist/advance-drivers.d.ts.map +1 -1
  9. package/dist/advance-drivers.js +20 -8
  10. package/dist/advance-drivers.js.map +1 -1
  11. package/dist/advance-isolated.d.ts +3 -3
  12. package/dist/advance-isolated.d.ts.map +1 -1
  13. package/dist/advance-isolated.js +1 -1
  14. package/dist/advance-lifecycle-template.d.ts +2 -2
  15. package/dist/advance-lifecycle-template.d.ts.map +1 -1
  16. package/dist/advance-lifecycle-template.js +85 -13
  17. package/dist/advance-lifecycle-template.js.map +1 -1
  18. package/dist/advance-loop-driver.d.ts +3 -3
  19. package/dist/advance-loop-driver.d.ts.map +1 -1
  20. package/dist/advance-loop-driver.js +1 -1
  21. package/dist/advance-treeless-publish.d.ts +24 -1
  22. package/dist/advance-treeless-publish.d.ts.map +1 -1
  23. package/dist/advance-treeless-publish.js +41 -0
  24. package/dist/advance-treeless-publish.js.map +1 -1
  25. package/dist/advance.d.ts +69 -17
  26. package/dist/advance.d.ts.map +1 -1
  27. package/dist/advance.js +409 -102
  28. package/dist/advance.js.map +1 -1
  29. package/dist/advancing-lock.d.ts +31 -3
  30. package/dist/advancing-lock.d.ts.map +1 -1
  31. package/dist/advancing-lock.js +55 -5
  32. package/dist/advancing-lock.js.map +1 -1
  33. package/dist/agent-launch.d.ts +12 -0
  34. package/dist/agent-launch.d.ts.map +1 -1
  35. package/dist/agent-launch.js +22 -12
  36. package/dist/agent-launch.js.map +1 -1
  37. package/dist/agent-stop.d.ts +40 -2
  38. package/dist/agent-stop.d.ts.map +1 -1
  39. package/dist/agent-stop.js +30 -2
  40. package/dist/agent-stop.js.map +1 -1
  41. package/dist/apply-decide.d.ts +19 -5
  42. package/dist/apply-decide.d.ts.map +1 -1
  43. package/dist/apply-decide.js +38 -9
  44. package/dist/apply-decide.js.map +1 -1
  45. package/dist/apply-merge-action.d.ts +20 -8
  46. package/dist/apply-merge-action.d.ts.map +1 -1
  47. package/dist/apply-merge-action.js +44 -9
  48. package/dist/apply-merge-action.js.map +1 -1
  49. package/dist/apply-persist.d.ts +62 -31
  50. package/dist/apply-persist.d.ts.map +1 -1
  51. package/dist/apply-persist.js +173 -44
  52. package/dist/apply-persist.js.map +1 -1
  53. package/dist/apply-stuck-action.d.ts +151 -0
  54. package/dist/apply-stuck-action.d.ts.map +1 -0
  55. package/dist/apply-stuck-action.js +125 -0
  56. package/dist/apply-stuck-action.js.map +1 -0
  57. package/dist/brand.d.ts +12 -1
  58. package/dist/brand.d.ts.map +1 -1
  59. package/dist/brand.js +2 -1
  60. package/dist/brand.js.map +1 -1
  61. package/dist/buildable-body.d.ts +14 -14
  62. package/dist/buildable-body.js +9 -9
  63. package/dist/claim-cas.d.ts +3 -3
  64. package/dist/claim-cas.js +1 -1
  65. package/dist/claim-cas.js.map +1 -1
  66. package/dist/cli-spinner.d.ts +1 -1
  67. package/dist/cli-spinner.js +1 -1
  68. package/dist/cli.d.ts +10 -0
  69. package/dist/cli.d.ts.map +1 -1
  70. package/dist/cli.js +385 -128
  71. package/dist/cli.js.map +1 -1
  72. package/dist/close-job-template.d.ts +3 -3
  73. package/dist/close-job-template.js +9 -9
  74. package/dist/close-job.d.ts +8 -8
  75. package/dist/close-job.js +25 -25
  76. package/dist/close-job.js.map +1 -1
  77. package/dist/complete.d.ts +9 -6
  78. package/dist/complete.d.ts.map +1 -1
  79. package/dist/complete.js +99 -45
  80. package/dist/complete.js.map +1 -1
  81. package/dist/concurrency.d.ts +1 -1
  82. package/dist/concurrency.js +1 -1
  83. package/dist/config.d.ts +86 -40
  84. package/dist/config.d.ts.map +1 -1
  85. package/dist/config.js +61 -9
  86. package/dist/config.js.map +1 -1
  87. package/dist/continue-branch.d.ts +1 -1
  88. package/dist/continue-branch.d.ts.map +1 -1
  89. package/dist/continue-branch.js +23 -1
  90. package/dist/continue-branch.js.map +1 -1
  91. package/dist/cwd-section.js +1 -1
  92. package/dist/cwd-section.js.map +1 -1
  93. package/dist/decision-engine.d.ts +39 -11
  94. package/dist/decision-engine.d.ts.map +1 -1
  95. package/dist/decision-engine.js +10 -6
  96. package/dist/decision-engine.js.map +1 -1
  97. package/dist/do-autopick.d.ts +6 -6
  98. package/dist/do-autopick.d.ts.map +1 -1
  99. package/dist/do-autopick.js +16 -6
  100. package/dist/do-autopick.js.map +1 -1
  101. package/dist/do-config.d.ts +4 -4
  102. package/dist/do-config.js +3 -3
  103. package/dist/do-config.js.map +1 -1
  104. package/dist/do-remote-auto.d.ts +2 -2
  105. package/dist/do-remote-auto.js +1 -1
  106. package/dist/do.d.ts +74 -81
  107. package/dist/do.d.ts.map +1 -1
  108. package/dist/do.js +439 -50
  109. package/dist/do.js.map +1 -1
  110. package/dist/drop-source.d.ts +2 -2
  111. package/dist/env-config.d.ts.map +1 -1
  112. package/dist/env-config.js +19 -11
  113. package/dist/env-config.js.map +1 -1
  114. package/dist/failure-cause.d.ts +3 -2
  115. package/dist/failure-cause.d.ts.map +1 -1
  116. package/dist/failure-cause.js +28 -1
  117. package/dist/failure-cause.js.map +1 -1
  118. package/dist/format.d.ts +6 -6
  119. package/dist/format.d.ts.map +1 -1
  120. package/dist/format.js +13 -30
  121. package/dist/format.js.map +1 -1
  122. package/dist/frontmatter.d.ts +28 -15
  123. package/dist/frontmatter.d.ts.map +1 -1
  124. package/dist/frontmatter.js +38 -24
  125. package/dist/frontmatter.js.map +1 -1
  126. package/dist/gc.d.ts +65 -6
  127. package/dist/gc.d.ts.map +1 -1
  128. package/dist/gc.js +126 -9
  129. package/dist/gc.js.map +1 -1
  130. package/dist/github.d.ts +14 -0
  131. package/dist/github.d.ts.map +1 -1
  132. package/dist/github.js +73 -0
  133. package/dist/github.js.map +1 -1
  134. package/dist/harness.d.ts +25 -0
  135. package/dist/harness.d.ts.map +1 -1
  136. package/dist/harness.js.map +1 -1
  137. package/dist/index.d.ts +4 -1
  138. package/dist/index.d.ts.map +1 -1
  139. package/dist/index.js +2 -1
  140. package/dist/index.js.map +1 -1
  141. package/dist/install-ci-branch-protection.d.ts +133 -39
  142. package/dist/install-ci-branch-protection.d.ts.map +1 -1
  143. package/dist/install-ci-branch-protection.js +191 -49
  144. package/dist/install-ci-branch-protection.js.map +1 -1
  145. package/dist/install-ci-capabilities/advance-lifecycle.d.ts +1 -1
  146. package/dist/install-ci-capabilities/advance-lifecycle.js +1 -1
  147. package/dist/install-ci-capabilities/close-job.d.ts +1 -1
  148. package/dist/install-ci-capabilities/close-job.js +1 -1
  149. package/dist/install-ci-capabilities/example-noop.d.ts +1 -1
  150. package/dist/install-ci-capabilities/example-noop.js +1 -1
  151. package/dist/install-ci-capabilities/intake.d.ts +2 -2
  152. package/dist/install-ci-capabilities/intake.js +2 -2
  153. package/dist/install-ci-capabilities/verify.d.ts +1 -1
  154. package/dist/install-ci-capabilities/verify.js +1 -1
  155. package/dist/install-ci-core.d.ts +24 -4
  156. package/dist/install-ci-core.d.ts.map +1 -1
  157. package/dist/install-ci-core.js +12 -5
  158. package/dist/install-ci-core.js.map +1 -1
  159. package/dist/install-ci-github.d.ts +33 -1
  160. package/dist/install-ci-github.d.ts.map +1 -1
  161. package/dist/install-ci-github.js +74 -1
  162. package/dist/install-ci-github.js.map +1 -1
  163. package/dist/install-ci.d.ts +1 -1
  164. package/dist/install-ci.js +4 -4
  165. package/dist/install-ci.js.map +1 -1
  166. package/dist/install-skills.d.ts +123 -0
  167. package/dist/install-skills.d.ts.map +1 -0
  168. package/dist/install-skills.js +100 -0
  169. package/dist/install-skills.js.map +1 -0
  170. package/dist/intake-event.d.ts +6 -6
  171. package/dist/intake-event.js +6 -6
  172. package/dist/intake-marker.d.ts +3 -3
  173. package/dist/intake-marker.d.ts.map +1 -1
  174. package/dist/intake-triage.d.ts +1 -1
  175. package/dist/intake-triage.js +2 -2
  176. package/dist/intake-trigger-template.d.ts +8 -8
  177. package/dist/intake-trigger-template.d.ts.map +1 -1
  178. package/dist/intake-trigger-template.js +17 -17
  179. package/dist/intake-trigger-template.js.map +1 -1
  180. package/dist/intake.d.ts +65 -52
  181. package/dist/intake.d.ts.map +1 -1
  182. package/dist/intake.js +92 -76
  183. package/dist/intake.js.map +1 -1
  184. package/dist/integration-core.d.ts +27 -24
  185. package/dist/integration-core.d.ts.map +1 -1
  186. package/dist/integration-core.js +191 -77
  187. package/dist/integration-core.js.map +1 -1
  188. package/dist/integrator.d.ts +1 -1
  189. package/dist/integrator.d.ts.map +1 -1
  190. package/dist/integrator.js +19 -3
  191. package/dist/integrator.js.map +1 -1
  192. package/dist/isolation.d.ts +4 -4
  193. package/dist/isolation.d.ts.map +1 -1
  194. package/dist/isolation.js +9 -0
  195. package/dist/isolation.js.map +1 -1
  196. package/dist/issue-provider.d.ts +4 -4
  197. package/dist/issue-provider.js +1 -1
  198. package/dist/item-lock.d.ts +216 -149
  199. package/dist/item-lock.d.ts.map +1 -1
  200. package/dist/item-lock.js +345 -270
  201. package/dist/item-lock.js.map +1 -1
  202. package/dist/item-path.d.ts +2 -2
  203. package/dist/item-path.js +2 -2
  204. package/dist/ledger-lint.d.ts +9 -9
  205. package/dist/ledger-lint.js +9 -9
  206. package/dist/ledger-read.d.ts +57 -57
  207. package/dist/ledger-read.d.ts.map +1 -1
  208. package/dist/ledger-read.js +24 -24
  209. package/dist/ledger-read.js.map +1 -1
  210. package/dist/ledger-write.d.ts +33 -28
  211. package/dist/ledger-write.d.ts.map +1 -1
  212. package/dist/ledger-write.js +100 -122
  213. package/dist/ledger-write.js.map +1 -1
  214. package/dist/lifecycle-gather.d.ts +18 -1
  215. package/dist/lifecycle-gather.d.ts.map +1 -1
  216. package/dist/lifecycle-gather.js +23 -17
  217. package/dist/lifecycle-gather.js.map +1 -1
  218. package/dist/lifecycle-pools.d.ts +44 -7
  219. package/dist/lifecycle-pools.d.ts.map +1 -1
  220. package/dist/lifecycle-pools.js +27 -7
  221. package/dist/lifecycle-pools.js.map +1 -1
  222. package/dist/merge-question-surfacer.d.ts +18 -4
  223. package/dist/merge-question-surfacer.d.ts.map +1 -1
  224. package/dist/merge-question-surfacer.js +20 -5
  225. package/dist/merge-question-surfacer.js.map +1 -1
  226. package/dist/migrate-stuck-locks.d.ts +129 -0
  227. package/dist/migrate-stuck-locks.d.ts.map +1 -0
  228. package/dist/migrate-stuck-locks.js +355 -0
  229. package/dist/migrate-stuck-locks.js.map +1 -0
  230. package/dist/mint-adr.js +4 -4
  231. package/dist/mirror-pool-scan.d.ts +2 -2
  232. package/dist/mirror-pool-scan.js +3 -3
  233. package/dist/mirror-pool-scan.js.map +1 -1
  234. package/dist/needs-attention.d.ts +304 -27
  235. package/dist/needs-attention.d.ts.map +1 -1
  236. package/dist/needs-attention.js +542 -67
  237. package/dist/needs-attention.js.map +1 -1
  238. package/dist/orphan-sidecar.d.ts +10 -6
  239. package/dist/orphan-sidecar.d.ts.map +1 -1
  240. package/dist/orphan-sidecar.js +35 -2
  241. package/dist/orphan-sidecar.js.map +1 -1
  242. package/dist/pi-harness.d.ts +16 -0
  243. package/dist/pi-harness.d.ts.map +1 -1
  244. package/dist/pi-harness.js +82 -2
  245. package/dist/pi-harness.js.map +1 -1
  246. package/dist/placement.d.ts +8 -8
  247. package/dist/placement.js +3 -3
  248. package/dist/prd-to-spec.d.ts.map +1 -1
  249. package/dist/prd-to-spec.js +9 -5
  250. package/dist/prd-to-spec.js.map +1 -1
  251. package/dist/prompt.d.ts +16 -19
  252. package/dist/prompt.d.ts.map +1 -1
  253. package/dist/prompt.js +17 -19
  254. package/dist/prompt.js.map +1 -1
  255. package/dist/protocol/CLAIM-PROTOCOL.md +17 -10
  256. package/dist/protocol/REVIEW-PROTOCOL.md +4 -1
  257. package/dist/protocol/SURFACE-PROTOCOL.md +16 -2
  258. package/dist/protocol/TASKING-PROTOCOL.md +3 -1
  259. package/dist/protocol/WORK-CONTRACT.md +22 -18
  260. package/dist/protocol/task-template.md +1 -1
  261. package/dist/readiness.d.ts +1 -1
  262. package/dist/reap-branches.d.ts +12 -9
  263. package/dist/reap-branches.d.ts.map +1 -1
  264. package/dist/reap-branches.js +25 -7
  265. package/dist/reap-branches.js.map +1 -1
  266. package/dist/recover-isolated.d.ts +12 -0
  267. package/dist/recover-isolated.d.ts.map +1 -1
  268. package/dist/recover-isolated.js +6 -1
  269. package/dist/recover-isolated.js.map +1 -1
  270. package/dist/repo-config.d.ts +23 -2
  271. package/dist/repo-config.d.ts.map +1 -1
  272. package/dist/repo-config.js +64 -18
  273. package/dist/repo-config.js.map +1 -1
  274. package/dist/repo-mirror.d.ts.map +1 -1
  275. package/dist/repo-mirror.js +18 -2
  276. package/dist/repo-mirror.js.map +1 -1
  277. package/dist/review-gate.d.ts +3 -3
  278. package/dist/review-gate.d.ts.map +1 -1
  279. package/dist/review-gate.js +11 -10
  280. package/dist/review-gate.js.map +1 -1
  281. package/dist/review-verdict.d.ts +2 -2
  282. package/dist/review-verdict.d.ts.map +1 -1
  283. package/dist/review-verdict.js +2 -2
  284. package/dist/review-verdict.js.map +1 -1
  285. package/dist/run.d.ts +2 -2
  286. package/dist/run.d.ts.map +1 -1
  287. package/dist/run.js +58 -23
  288. package/dist/run.js.map +1 -1
  289. package/dist/scan.d.ts +26 -17
  290. package/dist/scan.d.ts.map +1 -1
  291. package/dist/scan.js +29 -15
  292. package/dist/scan.js.map +1 -1
  293. package/dist/select-order.d.ts +1 -1
  294. package/dist/select-priority.d.ts +14 -14
  295. package/dist/select-priority.d.ts.map +1 -1
  296. package/dist/select-priority.js +5 -5
  297. package/dist/select-priority.js.map +1 -1
  298. package/dist/sidecar-apply.js +1 -1
  299. package/dist/sidecar-apply.js.map +1 -1
  300. package/dist/sidecar.d.ts +47 -12
  301. package/dist/sidecar.d.ts.map +1 -1
  302. package/dist/sidecar.js +84 -4
  303. package/dist/sidecar.js.map +1 -1
  304. package/dist/skills/answer-questions/SKILL.md +89 -0
  305. package/dist/skills/capture-signal/SKILL.md +52 -0
  306. package/dist/skills/convert-from-prd-to-spec/SKILL.md +90 -0
  307. package/dist/skills/drive-tasks/SKILL.md +218 -0
  308. package/dist/skills/from-idea/SKILL.md +83 -0
  309. package/dist/skills/merge-prs/SKILL.md +70 -0
  310. package/dist/skills/orchestrate/SKILL.md +101 -0
  311. package/dist/skills/promote/SKILL.md +35 -0
  312. package/dist/skills/review/SKILL.md +16 -0
  313. package/dist/skills/setup/SKILL.md +258 -0
  314. package/dist/skills/setup/protocol/ADR-FORMAT.md +47 -0
  315. package/dist/skills/setup/protocol/CLAIM-PROTOCOL.md +224 -0
  316. package/dist/skills/setup/protocol/REVIEW-PROTOCOL.md +122 -0
  317. package/dist/skills/setup/protocol/SURFACE-PROTOCOL.md +135 -0
  318. package/dist/skills/setup/protocol/TASKING-PROTOCOL.md +124 -0
  319. package/dist/skills/setup/protocol/WORK-CONTRACT.md +280 -0
  320. package/dist/skills/setup/protocol/spec-template.md +71 -0
  321. package/dist/skills/setup/protocol/task-template.md +65 -0
  322. package/dist/skills/surface-questions/SKILL.md +16 -0
  323. package/dist/skills/to-spec/SKILL.md +34 -0
  324. package/dist/skills/to-task/SKILL.md +19 -0
  325. package/dist/skills/triage-observations/SKILL.md +78 -0
  326. package/dist/skills/work/SKILL.md +51 -0
  327. package/dist/slug-namespace.d.ts +6 -6
  328. package/dist/slug-namespace.js +8 -8
  329. package/dist/slug-namespace.js.map +1 -1
  330. package/dist/spec-complete.d.ts.map +1 -1
  331. package/dist/spec-complete.js +4 -5
  332. package/dist/spec-complete.js.map +1 -1
  333. package/dist/start.d.ts +1 -1
  334. package/dist/start.d.ts.map +1 -1
  335. package/dist/start.js +54 -60
  336. package/dist/start.js.map +1 -1
  337. package/dist/status.d.ts +3 -3
  338. package/dist/status.js +4 -4
  339. package/dist/status.js.map +1 -1
  340. package/dist/surface-gate.d.ts +2 -2
  341. package/dist/surface-gate.d.ts.map +1 -1
  342. package/dist/surface-gate.js +10 -3
  343. package/dist/surface-gate.js.map +1 -1
  344. package/dist/surface-persist.d.ts +2 -2
  345. package/dist/surface-persist.d.ts.map +1 -1
  346. package/dist/surface-persist.js +1 -1
  347. package/dist/surface-persist.js.map +1 -1
  348. package/dist/tasker-review-loop.d.ts +11 -10
  349. package/dist/tasker-review-loop.d.ts.map +1 -1
  350. package/dist/tasker-review-loop.js +8 -8
  351. package/dist/tasker-review-loop.js.map +1 -1
  352. package/dist/tasking-eligibility.d.ts +21 -21
  353. package/dist/tasking-eligibility.d.ts.map +1 -1
  354. package/dist/tasking-eligibility.js +10 -10
  355. package/dist/tasking-lock.d.ts +10 -10
  356. package/dist/tasking-lock.d.ts.map +1 -1
  357. package/dist/tasking-lock.js +69 -49
  358. package/dist/tasking-lock.js.map +1 -1
  359. package/dist/tasking.d.ts +73 -39
  360. package/dist/tasking.d.ts.map +1 -1
  361. package/dist/tasking.js +309 -95
  362. package/dist/tasking.js.map +1 -1
  363. package/dist/triage-gate.d.ts +1 -1
  364. package/dist/triage-persist.d.ts +15 -11
  365. package/dist/triage-persist.d.ts.map +1 -1
  366. package/dist/triage-persist.js +48 -18
  367. package/dist/triage-persist.js.map +1 -1
  368. package/dist/vendor/incur/agents.d.ts +58 -0
  369. package/dist/vendor/incur/agents.d.ts.map +1 -0
  370. package/dist/vendor/incur/agents.js +343 -0
  371. package/dist/vendor/incur/agents.js.map +1 -0
  372. package/dist/verify-workflow-template.d.ts +1 -1
  373. package/dist/verify-workflow-template.js +3 -3
  374. package/dist/watch-session.d.ts +11 -3
  375. package/dist/watch-session.d.ts.map +1 -1
  376. package/dist/watch-session.js +94 -7
  377. package/dist/watch-session.js.map +1 -1
  378. package/dist/work-layout.d.ts +15 -9
  379. package/dist/work-layout.d.ts.map +1 -1
  380. package/dist/work-layout.js +14 -9
  381. package/dist/work-layout.js.map +1 -1
  382. package/dist/workspace.d.ts +2 -2
  383. package/package.json +2 -2
  384. package/src/advance-ci-template.ts +4 -4
  385. package/src/advance-classify.ts +5 -5
  386. package/src/advance-drivers.ts +26 -13
  387. package/src/advance-isolated.ts +3 -3
  388. package/src/advance-lifecycle-template.ts +98 -13
  389. package/src/advance-loop-driver.ts +3 -3
  390. package/src/advance-treeless-publish.ts +46 -1
  391. package/src/advance.ts +495 -115
  392. package/src/advancing-lock.ts +102 -7
  393. package/src/agent-launch.ts +37 -12
  394. package/src/agent-stop.ts +60 -2
  395. package/src/apply-decide.ts +38 -9
  396. package/src/apply-merge-action.ts +49 -11
  397. package/src/apply-persist.ts +236 -62
  398. package/src/apply-stuck-action.ts +260 -0
  399. package/src/brand.ts +14 -2
  400. package/src/buildable-body.ts +14 -14
  401. package/src/claim-cas.ts +4 -4
  402. package/src/cli-spinner.ts +1 -1
  403. package/src/cli.ts +472 -141
  404. package/src/close-job-template.ts +9 -9
  405. package/src/close-job.ts +26 -26
  406. package/src/complete.ts +121 -63
  407. package/src/concurrency.ts +1 -1
  408. package/src/config.ts +143 -49
  409. package/src/continue-branch.ts +23 -1
  410. package/src/cwd-section.ts +1 -1
  411. package/src/decision-engine.ts +57 -19
  412. package/src/do-autopick.ts +21 -10
  413. package/src/do-config.ts +7 -7
  414. package/src/do-remote-auto.ts +2 -2
  415. package/src/do.ts +558 -85
  416. package/src/drop-source.ts +2 -2
  417. package/src/env-config.ts +19 -11
  418. package/src/failure-cause.ts +30 -1
  419. package/src/format.ts +13 -33
  420. package/src/frontmatter.ts +55 -35
  421. package/src/gc.ts +172 -9
  422. package/src/github.ts +78 -0
  423. package/src/harness.ts +25 -0
  424. package/src/index.ts +10 -0
  425. package/src/install-ci-branch-protection.ts +283 -58
  426. package/src/install-ci-capabilities/advance-lifecycle.ts +1 -1
  427. package/src/install-ci-capabilities/close-job.ts +1 -1
  428. package/src/install-ci-capabilities/example-noop.ts +1 -1
  429. package/src/install-ci-capabilities/intake.ts +2 -2
  430. package/src/install-ci-capabilities/verify.ts +1 -1
  431. package/src/install-ci-core.ts +34 -7
  432. package/src/install-ci-github.ts +87 -1
  433. package/src/install-ci.ts +4 -4
  434. package/src/install-skills.ts +166 -0
  435. package/src/intake-event.ts +6 -6
  436. package/src/intake-marker.ts +3 -3
  437. package/src/intake-triage.ts +2 -2
  438. package/src/intake-trigger-template.ts +18 -18
  439. package/src/intake.ts +138 -103
  440. package/src/integration-core.ts +234 -100
  441. package/src/integrator.ts +22 -9
  442. package/src/isolation.ts +13 -4
  443. package/src/issue-provider.ts +4 -4
  444. package/src/item-lock.ts +505 -361
  445. package/src/item-path.ts +2 -2
  446. package/src/ledger-lint.ts +9 -9
  447. package/src/ledger-read.ts +81 -81
  448. package/src/ledger-write.ts +137 -152
  449. package/src/lifecycle-gather.ts +45 -22
  450. package/src/lifecycle-pools.ts +71 -13
  451. package/src/merge-question-surfacer.ts +32 -8
  452. package/src/migrate-stuck-locks.ts +451 -0
  453. package/src/mint-adr.ts +4 -4
  454. package/src/mirror-pool-scan.ts +5 -5
  455. package/src/needs-attention.ts +877 -104
  456. package/src/orphan-sidecar.ts +49 -8
  457. package/src/pi-harness.ts +82 -2
  458. package/src/placement.ts +8 -8
  459. package/src/prd-to-spec.ts +13 -5
  460. package/src/prompt.ts +20 -25
  461. package/src/readiness.ts +1 -1
  462. package/src/reap-branches.ts +38 -14
  463. package/src/recover-isolated.ts +18 -1
  464. package/src/repo-config.ts +66 -17
  465. package/src/repo-mirror.ts +23 -1
  466. package/src/review-gate.ts +12 -11
  467. package/src/review-verdict.ts +3 -3
  468. package/src/run.ts +69 -23
  469. package/src/scan.ts +36 -22
  470. package/src/select-order.ts +1 -1
  471. package/src/select-priority.ts +15 -15
  472. package/src/sidecar-apply.ts +1 -1
  473. package/src/sidecar.ts +141 -14
  474. package/src/slug-namespace.ts +10 -10
  475. package/src/spec-complete.ts +4 -5
  476. package/src/start.ts +57 -63
  477. package/src/status.ts +7 -7
  478. package/src/surface-gate.ts +12 -5
  479. package/src/surface-persist.ts +3 -3
  480. package/src/tasker-review-loop.ts +18 -17
  481. package/src/tasking-eligibility.ts +21 -21
  482. package/src/tasking-lock.ts +75 -60
  483. package/src/tasking.ts +381 -135
  484. package/src/triage-gate.ts +1 -1
  485. package/src/triage-persist.ts +71 -27
  486. package/src/vendor/incur/LICENSE +21 -0
  487. package/src/vendor/incur/README.md +19 -0
  488. package/src/vendor/incur/agents.ts +392 -0
  489. package/src/verify-workflow-template.ts +3 -3
  490. package/src/watch-session.ts +102 -7
  491. package/src/work-layout.ts +14 -9
  492. package/src/workspace.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"intake.d.ts","sourceRoot":"","sources":["../src/intake.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAC,eAAe,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAErE,OAAO,KAAK,EAAC,eAAe,EAAE,WAAW,EAAC,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAMlD,OAAO,EAGN,KAAK,QAAQ,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAc,KAAK,OAAO,EAAC,MAAM,cAAc,CAAC;AAGvD,OAAO,EAGN,KAAK,KAAK,EACV,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACN,kBAAkB,EAGlB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAAe,KAAK,oBAAoB,EAAC,MAAM,oBAAoB,CAAC;AAG3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE/D;;;;;;GAMG;AACH,MA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I,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,WAAW,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,oFAAoF;IACpF,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,GAAG,EAAE,MAAM,CAAC;IACZ,+CAA+C;IAC/C,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAChC,KAAK,EAAE,uBAAuB,KAC1B,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAuMpC,uEAAuE;AACvE,MAAM,WAAW,gCAAgC;IAChD,sEAAsE;IACtE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACxC,OAAO,GAAE,gCAAqC,GAC5C,kBAAkB,CA0BpB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CACxC,KAAK,EAAE,uBAAuB,GAC5B,MAAM,CAsDR;AAED;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,2BAAqB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,uBAAuB,CACtC,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,YAAY,EAAE,EACxB,MAAM,CAAC,EAAE,oBAAoB,GAC3B,MAAM,CA4HR"}
package/dist/intake.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { mkdirSync, writeFileSync } from 'node:fs';
2
2
  import { dirname, join } from 'node:path';
3
3
  import { runAsync } from './git.js';
4
- import { workFolderRel, workItemRel } from './work-layout.js';
4
+ import { workFolderRel, workFolderPrefix, workItemRel } from './work-layout.js';
5
5
  import { paramCase } from './brand.js';
6
6
  import { performIntegration, } from './integration-core.js';
7
7
  import { integrationFromFlags } from './complete.js';
@@ -18,15 +18,15 @@ import { triageIntake } from './intake-triage.js';
18
18
  import { renderTaskBody, renderSpecBody } from './buildable-body.js';
19
19
  const DEFAULT_ARBITER = 'origin';
20
20
  /**
21
- * **The STAGED-prds dir** (prd `staging-pool-position-gate-and-trust-model`,
21
+ * **The STAGED-prds dir** (spec `staging-pool-position-gate-and-trust-model`,
22
22
  * task `pre-prd-staging-pool-split-and-untrusted-prd-placement`, governing
23
23
  * ADR `placement-is-runner-deterministic-humanonly-is-agent-judgement`). When
24
24
  * the runner-deterministic placement resolver picks the staging side for an
25
- * `intake`-authored prd, the runner writes the prd file HERE instead of in
26
- * `work/prds/ready/`. An item born in `prds/proposed/` is durable + readable but NOT in
27
- * the tasking candidate POOL (`work/prds/ready/` is the pool). A runner/human-owned promotion
28
- * ({@link promoteFromPreSpec} in `needs-attention.ts`) moves an approved prd
29
- * `prds/proposed/ → prds/ready/` to make it taskable.
25
+ * `intake`-authored spec, the runner writes the spec file HERE instead of in
26
+ * `work/specs/ready/`. An item born in `specs/proposed/` is durable + readable but NOT in
27
+ * the tasking candidate POOL (`work/specs/ready/` is the pool). A runner/human-owned promotion
28
+ * ({@link promoteFromPreSpec} in `needs-attention.ts`) moves an approved spec
29
+ * `specs/proposed/ → specs/ready/` to make it taskable.
30
30
  */
31
31
  export const STAGED_SPECS_DIR = workFolderRel('specs-proposed');
32
32
  /**
@@ -75,10 +75,10 @@ function granularFromFlags(type, merge, propose) {
75
75
  }
76
76
  }
77
77
  /**
78
- * The PURE per-outcome integration mode resolution (prd `issue-intake` US #9 —
78
+ * The PURE per-outcome integration mode resolution (spec `issue-intake` US #9 —
79
79
  * the canonical table). Given ONLY the flag set, resolve BOTH per-type modes in
80
80
  * one eager pass (so a usage error is caught before the runtime verdict is even
81
- * known). The rules, all decided in the prd:
81
+ * known). The rules, all decided in the spec:
82
82
  *
83
83
  * - **unset ⇒ propose for BOTH** (conservative default; matches `do`).
84
84
  * - **aggregates:** `--merge` ⇒ merge both; `--propose` ⇒ propose both (this axis
@@ -182,7 +182,7 @@ export async function performIntake(options) {
182
182
  note(message);
183
183
  return { exitCode: 1, outcome: 'usage-error', issueNumber, message };
184
184
  }
185
- // 2. ACQUIRE the `processing` LOCK (prd `issue-intake` US #10): a TRANSIENT concurrency mutex
185
+ // 2. ACQUIRE the `processing` LOCK (spec `issue-intake` US #10): a TRANSIENT concurrency mutex
186
186
  // that serialises two concurrent runs on the SAME issue. Read the labels; if
187
187
  // the lock is ALREADY present, BACK OFF (do nothing — another run owns it). The
188
188
  // winner ADDS the label and proceeds; the label is REMOVED on finish (success
@@ -389,12 +389,12 @@ async function decideAndDispatch(options, cwd, issue, comments, ctx) {
389
389
  note(message);
390
390
  return { exitCode: 1, outcome: 'agent-failed', issueNumber, message };
391
391
  }
392
- // DISPATCH on the verdict — the FULL four-outcome decision table (prd
392
+ // DISPATCH on the verdict — the FULL four-outcome decision table (spec
393
393
  // `issue-intake`). The agent only DRAFTED the verdict; the runner owns every
394
394
  // git/seam side-effect below (the in-band boundary): the write + integrate
395
- // (task/prd) and the `postIssueComment` (ask/bounce).
395
+ // (task/spec) and the `postIssueComment` (ask/bounce).
396
396
  //
397
- // PER-OUTCOME integration (prd `issue-intake` US #9): the resolved mode is keyed on the runtime
397
+ // PER-OUTCOME integration (spec `issue-intake` US #9): the resolved mode is keyed on the runtime
398
398
  // artifact TYPE — a `task` verdict integrates with the task mode, a `spec`
399
399
  // verdict with the spec mode. Unset ⇒ propose for both. ask/bounce never
400
400
  // integrate, so the modes are no-ops for them.
@@ -411,6 +411,9 @@ async function decideAndDispatch(options, cwd, issue, comments, ctx) {
411
411
  cwd,
412
412
  arbiter,
413
413
  integration: modes.task,
414
+ // The resolved cross-job CAS-retry cap (config `mergeRetries`) — threaded so
415
+ // intake's lone-task emit lands under the same per-repo cap the build path uses.
416
+ mergeRetries: options.mergeRetries,
414
417
  // The origin-trust STAMP, passed IN (not resolved here): the emitted task
415
418
  // carries `origin: issue` + this verdict so the becomes-code checkpoint is
416
419
  // not laundered. Unset ⇒ unstamped (a local intake ⇒ human/trusted).
@@ -429,7 +432,7 @@ async function decideAndDispatch(options, cwd, issue, comments, ctx) {
429
432
  note,
430
433
  });
431
434
  // The `spec` outcome is the parent-spec verdict; it dispatches through
432
- // `modes.spec`. HARD CUTOVER: the legacy `prd` outcome case is GONE.
435
+ // `modes.spec`. HARD CUTOVER: the legacy ''prd'' outcome case is GONE.
433
436
  case 'spec':
434
437
  return dispatchSpec({
435
438
  verdict,
@@ -437,7 +440,10 @@ async function decideAndDispatch(options, cwd, issue, comments, ctx) {
437
440
  cwd,
438
441
  arbiter,
439
442
  integration: modes.spec,
440
- // Same origin-trust stamp on the prd outcome (propagated onto its tasks
443
+ // The resolved cross-job CAS-retry cap (config `mergeRetries`) threaded so
444
+ // intake's spec emit lands under the same per-repo cap the build path uses.
445
+ mergeRetries: options.mergeRetries,
446
+ // Same origin-trust stamp on the spec outcome (propagated onto its tasks
441
447
  // later by the tasker). Passed IN; not resolved here.
442
448
  originTrust: options.originTrust,
443
449
  noPR: options.noPR,
@@ -445,7 +451,7 @@ async function decideAndDispatch(options, cwd, issue, comments, ctx) {
445
451
  // `pre-prd-staging-pool-split-and-untrusted-prd-placement`): the
446
452
  // configured-default + explicit-flag rungs, fed into the SHARED placement
447
453
  // resolver alongside the `originTrust` stamp above. The resolver decides
448
- // `prds/proposed/` (staging) vs `prds/ready/` (the tasking pool); `intake` never
454
+ // `specs/proposed/` (staging) vs `specs/ready/` (the tasking pool); `intake` never
449
455
  // places itself.
450
456
  specsLandIn: options.specsLandIn,
451
457
  explicitSpecsLandIn: options.explicitSpecsLandIn,
@@ -502,7 +508,7 @@ async function decideAndDispatch(options, cwd, issue, comments, ctx) {
502
508
  *
503
509
  * - **ask** (non-terminal): `postIssueComment` the drafted question, emit NOTHING,
504
510
  * and LEAVE THE ISSUE OPEN — it waits for the thread to be answered (a later run
505
- * resumes from it). The task/prd path also never closes (CI's close-job does,
511
+ * resumes from it). The task/spec path also never closes (CI's close-job does,
506
512
  * via the `issue:` field). Intake closes ONLY on BOUNCE.
507
513
  * - **bounce** (TERMINAL): the asks are unrelated and must be re-filed, so an OPEN
508
514
  * issue is a dishonest "still in play" signal. Intake CLOSES the issue
@@ -572,7 +578,7 @@ async function dispatchComment(params) {
572
578
  }
573
579
  /**
574
580
  * DISPATCH the `task` outcome: derive a content-derived slug, write
575
- * `work/backlog/<slug>.md` (`covers: []`, NO `prd:`) carrying `issue: N` (the
581
+ * `work/backlog/<slug>.md` (`covers: []`, NO `spec:`) carrying `issue: N` (the
576
582
  * lone-task closure link, NOT `Fixes #N`), and integrate via {@link
577
583
  * performIntegration}. The runner owns the git: it onboards a
578
584
  * `work/<slug>` branch off fresh `<arbiter>/main`, then the lifecycle `stage`
@@ -580,8 +586,8 @@ async function dispatchComment(params) {
580
586
  * agent did NO git/seam ops.
581
587
  */
582
588
  async function dispatchTask(params) {
583
- const { verdict, issueNumber, cwd, arbiter, integration, originTrust, noPR, providerInstance, issueProvider, reviewTask, seen, env, agentEnv, note, } = params;
584
- // A content-derived slug — NEVER a counter (prd `issue-intake` US #8). Prefer the drafted
589
+ const { verdict, issueNumber, cwd, arbiter, integration, mergeRetries, originTrust, noPR, providerInstance, issueProvider, reviewTask, seen, env, agentEnv, note, } = params;
590
+ // A content-derived slug — NEVER a counter (spec `issue-intake` US #8). Prefer the drafted
585
591
  // `taskSlug`, else derive from the drafted title; sanitise either through
586
592
  // `paramCase` so the filename + frontmatter slug are well-formed.
587
593
  const slug = resolveSlug(verdict);
@@ -594,7 +600,7 @@ async function dispatchTask(params) {
594
600
  const relPath = workItemRel('tasks-ready', `${slug}.md`);
595
601
  // BOUNDED INTERNAL REVIEW (observation
596
602
  // `intake-lone-task-skips-adversarial-review-the-prd-path-gets`, rulings A/B/C):
597
- // the `do prd:` path gets `runTaskReviewLoop`; the lone-TASK path got NOTHING.
603
+ // the `do spec:` path gets `runTaskReviewLoop`; the lone-TASK path got NOTHING.
598
604
  // AFTER the `task` verdict and BEFORE the write/integrate, run a bounded (3-round,
599
605
  // HARD-CAPPED) adversarial self-review on the SINGLE drafted task. It mutates the
600
606
  // candidate body IN MEMORY (no `work/backlog/` write pre-convergence). A launch/
@@ -684,6 +690,12 @@ async function dispatchTask(params) {
684
690
  // EXPLICITLY-chosen mode proceeds as-is: a future `--merge-task` lands on main
685
691
  // (`merge` IS the auto-land mode, never downgraded).
686
692
  mode: integration,
693
+ // The cross-job merge-serialiser CAS-retry cap (config `mergeRetries`) — the
694
+ // git-alone floor of the cross-job land queue, resolved through the gate-
695
+ // family precedence chain in the CLI and threaded here so intake's lone-task
696
+ // emit lands under the same per-repo cap the build path uses. Unset ⇒ the
697
+ // engine default (byte-for-byte unchanged).
698
+ mergeRetries,
687
699
  noPR,
688
700
  providerInstance,
689
701
  type: 'feat',
@@ -713,8 +725,8 @@ async function dispatchTask(params) {
713
725
  });
714
726
  }
715
727
  /**
716
- * DISPATCH the `spec` outcome (canonical; the legacy `prd` outcome routes here too
717
- * through the cutover): derive a content-derived slug, write the spec file
728
+ * DISPATCH the `spec` outcome (the SOLE parent-spec outcome after the HARD CUTOVER;
729
+ * the legacy ''prd'' outcome token is GONE): derive a content-derived slug, write the spec file
718
730
  * (`work/specs/ready/<slug>.md`) carrying `issue: N` (the loop-closure linkage the
719
731
  * close JOB reaches via `task.spec: → spec issue:`; on a fanned spec the number
720
732
  * lives ONLY on the spec — a fanned task uses `spec:`, NOT its own `issue:`, which
@@ -725,8 +737,8 @@ async function dispatchTask(params) {
725
737
  * runner owns the git exactly as the task branch does; the agent did NO git/seam ops.
726
738
  */
727
739
  async function dispatchSpec(params) {
728
- const { verdict, issueNumber, cwd, arbiter, integration, originTrust, noPR, specsLandIn, explicitSpecsLandIn, providerInstance, issueProvider, seen, env, note, } = params;
729
- // A content-derived slug — NEVER a counter (prd `issue-intake` US #8). Prefer the drafted
740
+ const { verdict, issueNumber, cwd, arbiter, integration, mergeRetries, originTrust, noPR, specsLandIn, explicitSpecsLandIn, providerInstance, issueProvider, seen, env, note, } = params;
741
+ // A content-derived slug — NEVER a counter (spec `issue-intake` US #8). Prefer the drafted
730
742
  // `specSlug`, else derive from the drafted title.
731
743
  const slug = resolveSpecSlug(verdict);
732
744
  if (slug === '') {
@@ -738,7 +750,7 @@ async function dispatchSpec(params) {
738
750
  // RUNNER-DETERMINISTIC PLACEMENT (task
739
751
  // `pre-prd-staging-pool-split-and-untrusted-prd-placement`, governing ADR
740
752
  // `placement-is-runner-deterministic-humanonly-is-agent-judgement`). Resolve
741
- // which folder the runner writes the intake-authored prd into BEFORE handing
753
+ // which folder the runner writes the intake-authored spec into BEFORE handing
742
754
  // it to the shared integrate band: the SAME precedence chain the tasker uses
743
755
  // (`explicit > untrusted-origin ⇒ staging > specsLandIn > built-in (staging)`),
744
756
  // the SAME shared resolver — only the lifecycle SLOTS differ. The agent
@@ -770,16 +782,20 @@ async function dispatchSpec(params) {
770
782
  slug,
771
783
  source: 'in-progress',
772
784
  recovering: false,
773
- // An intake-emitted prd has no `verify` floor of its own (it is a new spec,
785
+ // An intake-emitted spec has no `verify` floor of its own (it is a new spec,
774
786
  // not a build), exactly as the task branch + the tasking transition skip it.
775
787
  skipVerify: true,
776
788
  mode: integration,
789
+ // The cross-job merge-serialiser CAS-retry cap (config `mergeRetries`) — same
790
+ // rationale as the lone-task emit above; threaded so intake's spec emit lands
791
+ // under the same per-repo cap. Unset ⇒ the engine default (byte-for-byte).
792
+ mergeRetries,
777
793
  noPR,
778
794
  providerInstance,
779
795
  type: 'feat',
780
796
  lifecycle: {
781
- // The emitted prd IS the title source. Pass the DRAFTED title EXPLICITLY (same
782
- // race as the task path: `stage()` writes the prd file AFTER the title
797
+ // The emitted spec IS the title source. Pass the DRAFTED title EXPLICITLY (same
798
+ // race as the task path: `stage()` writes the spec file AFTER the title
783
799
  // read). `titlePath` stays set but is IGNORED while `title` is present.
784
800
  titlePath: join(cwd, relPath),
785
801
  title: verdict.specTitle ?? slug,
@@ -817,9 +833,9 @@ async function integrationToIntakeResult(core, ctx) {
817
833
  const landed = core.integration?.mode === 'merge'
818
834
  ? 'landed it on the arbiter main'
819
835
  : 'opened a PR carrying it (main untouched)';
820
- // Both a lone task and a prd carry `issue: N` as their closure link (the task
821
- // closes its own issue; a prd is reached via `task.prd: → prd issue:`). On the
822
- // task/prd path `intake` never closes the issue (CI's close-job does, via the
836
+ // Both a lone task and a spec carry `issue: N` as their closure link (the task
837
+ // closes its own issue; a spec is reached via `task.spec: → spec issue:`). On the
838
+ // task/spec path `intake` never closes the issue (CI's close-job does, via the
823
839
  // `issue:` field; intake closes ONLY on BOUNCE) and emits no `Fixes #N` (a
824
840
  // deferred GitHub-only optimisation).
825
841
  const link = `issue: ${issueNumber}`;
@@ -885,7 +901,7 @@ async function integrationToIntakeResult(core, ctx) {
885
901
  * `commit` (the additive {@link IntegrateResult.commit}) in merge. A degraded
886
902
  * propose (no `url`) or a failed merge-tip read (no `commit`) simply OMITS the
887
903
  * link — the comment still confirms what was created (the artifact is safe on the
888
- * branch/main regardless). No prd link beyond the slug.
904
+ * branch/main regardless). No spec link beyond the slug.
889
905
  * - carries the FULL intake MARKER via the SHARED {@link stampIntakeMarker} helper
890
906
  * (`kind=created slug=<slug> seen=<id>,…`) so the triage's `already-terminal`
891
907
  * branch consumes it — the comment cannot re-trigger intake.
@@ -918,7 +934,7 @@ export function composeIntakeCompletionComment(params) {
918
934
  * does, via the `issue:` field); this comment changes NO issue state.
919
935
  * - LINKS the artifact by INTEGRATION MODE: the PR `url` in propose, the landed
920
936
  * `commit` (the additive {@link IntegrateResult.commit} this task surfaces) in
921
- * merge. No prd link beyond the slug.
937
+ * merge. No spec link beyond the slug.
922
938
  * - carries the FULL intake MARKER via the SHARED {@link stampIntakeMarker} helper
923
939
  * (`kind=created slug=<slug> seen=<id>,…`). `kind=created` is TERMINAL, so the
924
940
  * triage's `already-terminal` branch then treats the issue as already-transformed
@@ -953,7 +969,7 @@ async function postCompletionComment(params) {
953
969
  return posted.posted;
954
970
  }
955
971
  /**
956
- * Resolve a content-derived slug from the verdict — NEVER a counter (prd `issue-intake` US #8).
972
+ * Resolve a content-derived slug from the verdict — NEVER a counter (spec `issue-intake` US #8).
957
973
  * Prefer the drafted `taskSlug`, else derive from the drafted title; both go
958
974
  * through `paramCase` (the brand case-transform) so the result is a clean
959
975
  * lowercase-`-`-joined slug. An empty result (no slug AND no title) signals the
@@ -966,7 +982,7 @@ function resolveSlug(verdict) {
966
982
  return paramCase(candidate);
967
983
  }
968
984
  /**
969
- * Resolve a content-derived slug for the spec outcome — NEVER a counter (prd `issue-intake` US #8).
985
+ * Resolve a content-derived slug for the spec outcome — NEVER a counter (spec `issue-intake` US #8).
970
986
  * Prefer the drafted `specSlug`, else derive from the drafted spec title; both go
971
987
  * through `paramCase`. An empty result signals the caller to refuse.
972
988
  */
@@ -978,13 +994,13 @@ function resolveSpecSlug(verdict) {
978
994
  }
979
995
  /**
980
996
  * Render the backlog task file: the frontmatter (`title`/`slug`/`covers: []`, NO
981
- * `prd:` — its own source of truth, prd `issue-intake` decision table) carrying the lone-task
997
+ * `spec:` — its own source of truth, spec `issue-intake` decision table) carrying the lone-task
982
998
  * `issue: N` closure link + the drafted body. The task closes its source issue
983
999
  * via its `issue:` field (the provider-agnostic link a FUTURE CI close-job reads
984
1000
  * from folder + field state); it carries NO `Fixes #N` (a deferred GitHub-only
985
1001
  * optimisation, structurally unplaceable on the `--merge` path). The number is
986
- * the task's own closure path — `issue:` XOR `prd:`; a lone task never carries a
987
- * `prd:` (prd `issue-intake` decision table). When the agent drafted no body, a thin default
1002
+ * the task's own closure path — `issue:` XOR `spec:`; a lone task never carries a
1003
+ * `spec:` (spec `issue-intake` decision table). When the agent drafted no body, a thin default
988
1004
  * scaffold keeps the file a valid task.
989
1005
  */
990
1006
  export function renderBacklogTask(params) {
@@ -1002,7 +1018,7 @@ export function renderBacklogTask(params) {
1002
1018
  const frontmatter = lines.join('\n');
1003
1019
  // The drafted body (agent-authored, headings and all) is wrapped VERBATIM.
1004
1020
  // Only the empty-body DEFAULT SCAFFOLD is sourced from the shared section
1005
- // skeleton owner (`renderTaskBody`, prd
1021
+ // skeleton owner (`renderTaskBody`, spec
1006
1022
  // `centralize-buildable-task-renderer-shared-by-intake-and-promotion` US #2),
1007
1023
  // so intake's fallback and promotion's body cannot drift on section
1008
1024
  // names/order. The shared renderer ends its body with a trailing newline (its
@@ -1019,16 +1035,16 @@ export function renderBacklogTask(params) {
1019
1035
  return `${frontmatter}\n\n${drafted}\n`;
1020
1036
  }
1021
1037
  /**
1022
- * Render the emitted prd file: the frontmatter (`title`/`slug` + the loop-closure
1023
- * `issue: N` + the gate axes the prompt JUDGED) followed by the drafted prd body.
1024
- * For a FANNED prd the `issue: N` lives ONLY on the prd — never duplicated across
1025
- * the N fanned tasks, which reach it via `task.prd: → prd issue:` (a fanned
1026
- * task carries `prd:`, NOT its own `issue:`; the lone-task outcome is the only
1027
- * one that puts `issue:` on a task). The close JOB reaches the prd's number via
1028
- * `task.prd: → prd issue:`. The gate axes (`humanOnly`/`needsAnswers`) are emitted ONLY when the
1038
+ * Render the emitted spec file: the frontmatter (`title`/`slug` + the loop-closure
1039
+ * `issue: N` + the gate axes the prompt JUDGED) followed by the drafted spec body.
1040
+ * For a FANNED spec the `issue: N` lives ONLY on the spec — never duplicated across
1041
+ * the N fanned tasks, which reach it via `task.spec: → spec issue:` (a fanned
1042
+ * task carries `spec:`, NOT its own `issue:`; the lone-task outcome is the only
1043
+ * one that puts `issue:` on a task). The close JOB reaches the spec's number via
1044
+ * `task.spec: → spec issue:`. The gate axes (`humanOnly`/`needsAnswers`) are emitted ONLY when the
1029
1045
  * verdict declared them `true` — an omitted axis is `undefined` (undeclared), the
1030
1046
  * same convention `frontmatter.ts` parses. When the agent drafted no body, a thin
1031
- * default scaffold keeps the file a valid prd that `do prd:` can later task.
1047
+ * default scaffold keeps the file a valid spec that `do spec:` can later task.
1032
1048
  */
1033
1049
  export function renderSpec(params) {
1034
1050
  const { slug, title, body, issueNumber, humanOnly, needsAnswers, originTrust } = params;
@@ -1044,7 +1060,7 @@ export function renderSpec(params) {
1044
1060
  if (originTrust !== undefined) {
1045
1061
  lines.push('origin: issue', `originTrust: ${originTrust}`);
1046
1062
  }
1047
- // Surface the gate axes AS THE PROMPT JUDGED THEM (prd `issue-intake` US #8). Only emit a `true`
1063
+ // Surface the gate axes AS THE PROMPT JUDGED THEM (spec `issue-intake` US #8). Only emit a `true`
1048
1064
  // axis — an undeclared axis stays absent (parsed as `undefined`).
1049
1065
  if (humanOnly === true) {
1050
1066
  lines.push('humanOnly: true');
@@ -1054,18 +1070,18 @@ export function renderSpec(params) {
1054
1070
  }
1055
1071
  lines.push('---');
1056
1072
  const frontmatter = lines.join('\n');
1057
- // As with `renderBacklogTask`: the drafted PRD body is wrapped VERBATIM; only
1073
+ // As with `renderBacklogTask`: the drafted SPEC body is wrapped VERBATIM; only
1058
1074
  // the empty-body DEFAULT SCAFFOLD is sourced from the shared section skeleton
1059
- // owner (`renderSpecBody` with `solution` + `userStories`, prd
1075
+ // owner (`renderSpecBody` with `solution` + `userStories`, spec
1060
1076
  // `centralize-buildable-task-renderer-shared-by-intake-and-promotion` US #2),
1061
- // so intake's PRD fallback and promotion's PRD body cannot drift. `trimEnd()`
1077
+ // so intake's SPEC fallback and promotion's SPEC body cannot drift. `trimEnd()`
1062
1078
  // drops the renderer's trailing blank line so intake's single trailing `\n`
1063
1079
  // (owned by the join below) keeps the bytes identical to the pre-rewire literal.
1064
1080
  const drafted = body && body.trim() !== ''
1065
1081
  ? body.trim()
1066
1082
  : renderSpecBody({
1067
1083
  problemStatement: `Transformed from issue #${issueNumber}: ${title}`,
1068
- solution: '(to be detailed; this prd needs tasking via `do prd:`).',
1084
+ solution: '(to be detailed; this spec needs tasking via `do spec:`).',
1069
1085
  userStories: `1. As a user, I want issue #${issueNumber} addressed.`,
1070
1086
  }).trimEnd();
1071
1087
  return `${frontmatter}\n\n${drafted}\n`;
@@ -1091,7 +1107,7 @@ async function stageIntakeContent(params) {
1091
1107
  * `intake-` PRODUCER prefix keeps this short-lived "create the item" branch
1092
1108
  * DISTINCT from the later build branch (`work/task-<slug>`) for the same slug
1093
1109
  * — the firing `intake` × `do task:` collision the observation traced. The
1094
- * task-emit path passes `'task'`, the prd-emit path `'prd'`. A pre-existing
1110
+ * task-emit path passes `'task'`, the spec-emit path `'spec'`. A pre-existing
1095
1111
  * local branch (a re-run) is force-recreated off fresh main.
1096
1112
  */
1097
1113
  async function switchToWorkBranch(cwd, arbiter, type, slug, env) {
@@ -1112,7 +1128,7 @@ async function runDecision(options, cwd, issue, comments, prompt) {
1112
1128
  if (options.decide) {
1113
1129
  return options.decide({ cwd, issue, comments, prompt, env: options.env });
1114
1130
  }
1115
- // PRODUCTION: launch the harness with the decision prd, then PARSE the verdict
1131
+ // PRODUCTION: launch the harness with the decision spec, then PARSE the verdict
1116
1132
  // the agent emitted out of its ANSWER channel (`launched.output`) — the SAME wire
1117
1133
  // the review gate runs (launch → `parseReviewVerdict(readOutput(launched.output))`;
1118
1134
  // `harnessReviewGate`). The agent emits a single fenced ```json block (the OUTPUT
@@ -1184,7 +1200,7 @@ export function parseIntakeVerdict(output) {
1184
1200
  outcome !== 'spec' &&
1185
1201
  outcome !== 'bounce') {
1186
1202
  // The prompt teaches the LLM to emit `spec`, so the accepted outcome set is
1187
- // `ask|task|spec|bounce`. HARD CUTOVER: the legacy `prd` outcome token is
1203
+ // `ask|task|spec|bounce`. HARD CUTOVER: the legacy ''prd'' outcome token is
1188
1204
  // fully gone (rejected here + removed from the `IntakeOutcome` type + the
1189
1205
  // dispatch `case`).
1190
1206
  throw new Error(`intake verdict 'outcome' was not one of ask|task|spec|bounce (got ` +
@@ -1224,7 +1240,7 @@ export function parseIntakeVerdict(output) {
1224
1240
  // The LONE-TASK bounded internal review (observation
1225
1241
  // `intake-lone-task-skips-adversarial-review-the-prd-path-gets`, rulings A/B/C).
1226
1242
  //
1227
- // Give intake's lone-TASK outcome the adversarial refinement the `do prd:` path
1243
+ // Give intake's lone-TASK outcome the adversarial refinement the `do spec:` path
1228
1244
  // already gets — but as a small intake-NATIVE bounded review, NOT by integrating
1229
1245
  // the tasker loop. This is a NEW prompt + a small loop + an injectable gate seam,
1230
1246
  // MIRRORING the tasker loop's verdict/output CONVENTIONS (fenced JSON
@@ -1497,20 +1513,20 @@ export function buildLoneTaskReviewPrompt(input) {
1497
1513
  */
1498
1514
  export const parseLoneTaskReviewVerdict = parseReviewVerdict;
1499
1515
  /**
1500
- * Build the intake decision PRD (an inline prompt builder, like `buildTaskingPrd`
1516
+ * Build the intake decision SPEC (an inline prompt builder, like `buildTaskingPrd`
1501
1517
  * in `tasking.ts` / the reviewer prompts in `review-gate.ts` — NOT a standalone
1502
1518
  * asset/`.md` file; no such convention exists in this package). It encodes the FULL
1503
- * four-outcome decision table (prd `issue-intake` — the source of truth) and the
1519
+ * four-outcome decision table (spec `issue-intake` — the source of truth) and the
1504
1520
  * three DECISION AIDS stated once there:
1505
1521
  *
1506
1522
  * 1. the **"clear?" bar** = `to-task`/`needsAnswers`' "would I build the wrong
1507
1523
  * thing if I guessed?" — if a material requirement/scope/acceptance question is
1508
1524
  * unanswered, ASK (never guess a spec from a vague issue);
1509
1525
  * 2. the **"one task?" bar** = `to-task`' tracer-bullet test (one thin end-to-end
1510
- * path, demoable on its own) — fits → TASK, needs splitting → PRD;
1511
- * 3. **PRD vs BOUNCE** turns on a **SHARED VISION**: coupled (even if small) → PRD;
1526
+ * path, demoable on its own) — fits → TASK, needs splitting → SPEC;
1527
+ * 3. **SPEC vs BOUNCE** turns on a **SHARED VISION**: coupled (even if small) → SPEC;
1512
1528
  * genuinely unrelated → BOUNCE. Size NEVER forces a bounce — only unrelatedness
1513
- * (the over-bounce guard: a coupled-but-small pair gets a light PRD, never a
1529
+ * (the over-bounce guard: a coupled-but-small pair gets a light SPEC, never a
1514
1530
  * bounce).
1515
1531
  *
1516
1532
  * The prompt anchors to `to-task`/`to-spec` for the task/spec SHAPES it drafts. Its
@@ -1524,7 +1540,7 @@ export function buildIntakeDecisionSpec(issue, comments, triage) {
1524
1540
  : comments
1525
1541
  .map((c, i) => `#${i + 1} ${c.author ? `@${c.author}` : '(unknown)'}: ${c.body}`)
1526
1542
  .join('\n\n');
1527
- // TRIAGE ENRICHMENT (prd `issue-intake`): on the raced PROCEED path the prompt is
1543
+ // TRIAGE ENRICHMENT (spec `issue-intake`): on the raced PROCEED path the prompt is
1528
1544
  // told which comment(s) PRE-DATE intake's last turn (context for a prior state,
1529
1545
  // not necessarily a fresh answer) and — only then — how many previously-SEEN
1530
1546
  // comments were DELETED (a flag + count; the bodies are gone, so do not name them).
@@ -1560,42 +1576,42 @@ export function buildIntakeDecisionSpec(issue, comments, triage) {
1560
1576
  ' (a single thin end-to-end path, demoable on its own — `to-task`’ criterion).',
1561
1577
  ' Draft that ONE task in the `to-task` shape (a `## What to build`,',
1562
1578
  ' `## Acceptance criteria`, and `## Prompt`). The runner writes',
1563
- ' `work/backlog/<slug>.md` (`covers: []`, NO `prd:`) carrying `issue: N` (the',
1579
+ ' `work/backlog/<slug>.md` (`covers: []`, NO `spec:`) carrying `issue: N` (the',
1564
1580
  ' lone-task closure link, NOT `Fixes #N`) and integrates it.',
1565
1581
  '',
1566
- '- **PRD** — the issue is CLEAR *and* coherent but needs MORE THAN ONE task (it',
1582
+ '- **SPEC** — the issue is CLEAR *and* coherent but needs MORE THAN ONE task (it',
1567
1583
  ' cannot be one tracer-bullet path — it splits for scope/architecture). >1 task',
1568
1584
  ' ⟺ a shared vision worth recording ⟺ a spec. Draft a spec in the `to-spec` shape',
1569
1585
  ' (`## Problem Statement`, `## Solution`, `## User Stories`, `## Out of Scope`).',
1570
- ' The runner writes the prd file (`work/prds/ready/<slug>.md`) with `issue: N` and integrates it;',
1571
- ' TASKING the prd is a SEPARATE later step (`do prd:`) — do not task it here.',
1586
+ ` The runner writes the spec file (\`${workFolderPrefix('specs-ready')}<slug>.md\`) with \`issue: N\` and integrates it;`,
1587
+ ' TASKING the spec is a SEPARATE later step (`do spec:`) — do not task it here.',
1572
1588
  ' **INCLUDES a coupled-but-SMALL pair: if two asks share a vision they get a',
1573
- ' (light) prd — they are NEVER bounced.**',
1589
+ ' (light) spec — they are NEVER bounced.**',
1574
1590
  '',
1575
1591
  '- **BOUNCE** — the issue is really MULTIPLE UNRELATED concerns wearing one issue:',
1576
1592
  ' you cannot articulate a SINGLE shared vision tying them together. Draft a short',
1577
1593
  ' message asking the author to file separate issues. A bounce is TERMINAL, so the',
1578
1594
  ' runner CLOSES the issue ATOMICALLY — your message as the closing comment +',
1579
1595
  ' reason "not planned" (the honest signal that the asks must be re-filed). Intake',
1580
- ' closes on BOUNCE only; never on task/prd (CI’s close-job) / ask.',
1596
+ ' closes on BOUNCE only; never on task/spec (CI’s close-job) / ask.',
1581
1597
  '',
1582
1598
  '## The three decision aids (apply them in order)',
1583
1599
  '',
1584
1600
  '1. **"clear?"** (ASK vs the rest): the `needsAnswers` bar — would acting now risk',
1585
1601
  ' building the wrong thing? If yes → ASK. Otherwise it is clear; continue.',
1586
- '2. **"one task?"** (TASK vs PRD): the `to-task` tracer-bullet test — one thin',
1587
- ' end-to-end path, demoable alone? Fits → TASK; needs splitting → PRD.',
1588
- '3. **"shared vision?"** (PRD vs BOUNCE): coupled (even if small) → PRD; genuinely',
1602
+ '2. **"one task?"** (TASK vs SPEC): the `to-task` tracer-bullet test — one thin',
1603
+ ' end-to-end path, demoable alone? Fits → TASK; needs splitting → SPEC.',
1604
+ '3. **"shared vision?"** (SPEC vs BOUNCE): coupled (even if small) → SPEC; genuinely',
1589
1605
  ' unrelated → BOUNCE. SIZE NEVER forces a bounce — only UNRELATEDNESS does. Do',
1590
- ' not over-bounce a small coupled pair: it is a light prd.',
1606
+ ' not over-bounce a small coupled pair: it is a light spec.',
1591
1607
  '',
1592
1608
  '## Boundary',
1593
1609
  '',
1594
- 'You only DRAFT the verdict + its content (the task/prd body, or the comment',
1610
+ 'You only DRAFT the verdict + its content (the task/spec body, or the comment',
1595
1611
  'text). You do NOT perform ANY git operation and you do NOT post any comment — the',
1596
- 'runner owns every git/seam side-effect (write, integrate, postComment). For a prd',
1612
+ 'runner owns every git/seam side-effect (write, integrate, postComment). For a spec',
1597
1613
  'verdict, also judge its gate axes (humanOnly / needsAnswers) so the runner can',
1598
- 'surface them on the emitted prd.',
1614
+ 'surface them on the emitted spec.',
1599
1615
  '',
1600
1616
  '## Output — hand the verdict back as ONE fenced JSON block',
1601
1617
  '',