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
package/src/item-path.ts CHANGED
@@ -25,7 +25,7 @@ import type {WorkFolderKey} from './work-layout.js';
25
25
  * (`tasks-backlog`, `prds-proposed`) on purpose: a concurrent `promote` may have
26
26
  * just `git mv`'d the item from staging into the pool between an apply's CAPTURE
27
27
  * and WRITE, and the apply must resolve to the post-move path — the whole point of
28
- * folder-agnostic apply (F3a of prd `staging-surface-and-apply-promote-safety`).
28
+ * folder-agnostic apply (F3a of spec `staging-surface-and-apply-promote-safety`).
29
29
  * Terminal-only folders (`cancelled`, `prds-dropped`, `needs-attention`) are NOT
30
30
  * here — once an item has reached a terminal, the apply is OVER, and a re-resolve
31
31
  * into a terminal would mean the item has effectively vanished from the active
@@ -55,7 +55,7 @@ export const APPLY_LIFECYCLE_FOLDERS: Record<
55
55
  * move) — the apply rung then exits CLEAN (no commit, no ghost file), routed as the
56
56
  * `vanished` outcome.
57
57
  *
58
- * This is the F3a fix from prd `staging-surface-and-apply-promote-safety`: the
58
+ * This is the F3a fix from spec `staging-surface-and-apply-promote-safety`: the
59
59
  * sidecar is already identity-keyed and folder-agnostic; the item path is now the
60
60
  * same. A concurrent `promote` that `git mv`'d the item out from under a captured
61
61
  * path can no longer cause a stale-path write.
@@ -12,7 +12,7 @@ import {
12
12
  } from './work-layout.js';
13
13
 
14
14
  /**
15
- * The **one-slug-one-folder LINT** over the `work/` lifecycle ledger (prd
15
+ * The **one-slug-one-folder LINT** over the `work/` lifecycle ledger (spec
16
16
  * `ledger-integrity`, story 3 — the READ-side belt-and-suspenders for defect 1).
17
17
  *
18
18
  * `work/` IS the ledger: a task's STATUS is the FOLDER its single `.md` lives in
@@ -40,14 +40,14 @@ import {
40
40
  * The `work/` STATUS folders a task's ledger file can rest in — the
41
41
  * one-slug-one-folder set this lint is asserted over (WORK-CONTRACT.md
42
42
  * "status = the folder"). After the capstone cut-over (task
43
- * `cutover-retire-slicing-advancing-markers-and-trim-folder-sets`, prd
43
+ * `cutover-retire-slicing-advancing-markers-and-trim-folder-sets`, spec
44
44
  * `ledger-status-per-item-lock-refs`; ADR `ledger-status-on-per-item-lock-refs`)
45
45
  * the ONLY `work/` moves on `main` are the DURABLE RESTING transitions, so a
46
46
  * task's ledger file can rest only in the DURABLE set: the pool `backlog/`, the
47
47
  * terminal `done/`, and the task regime's PER-REGIME "won't-proceed" terminal
48
- * `tasks/cancelled/` (the per-regime split of the previous shared `dropped/`, prd
48
+ * `tasks/cancelled/` (the per-regime split of the previous shared `dropped/`, spec
49
49
  * `folder-taxonomy-reorg-and-rename` US #10; the specific REASON lives in the item
50
- * BODY as a `reason:` value). The prd regime's terminal `prds/dropped/` is a
50
+ * BODY as a `reason:` value). The spec regime's terminal `specs/dropped/` is a
51
51
  * SEPARATE namespace and is NOT a task-status folder. The transient
52
52
  * `in-progress`/`needs-attention`/`tasking`/
53
53
  * `advancing` are GONE from `main`'s tree — they are per-item lock-ref state
@@ -58,11 +58,11 @@ import {
58
58
  * `cancelled`). A read-side lint surfaces a slug that ends up in `tasks/cancelled/`
59
59
  * AND another status folder, so the lint covers all three.
60
60
  *
61
- * The capture buckets (`ideas`/`observations`/`findings`) and the prd-flow folders
62
- * (`prds/ready`/`prds/tasked`) are NOT task-status folders (WORK-CONTRACT.md: the buckets
63
- * are "exempt from status = folder"; the prd folders carry prds, a separate
61
+ * The capture buckets (`ideas`/`observations`/`findings`) and the spec-flow folders
62
+ * (`specs/ready`/`specs/tasked`) are NOT task-status folders (WORK-CONTRACT.md: the buckets
63
+ * are "exempt from status = folder"; the spec folders carry prds, a separate
64
64
  * namespace) — they are deliberately EXCLUDED so a slug that legitimately has both
65
- * a task and a same-named note/prd is never a false positive.
65
+ * a task and a same-named note/spec is never a false positive.
66
66
  */
67
67
  export {LEDGER_STATUS_FOLDERS, type LedgerStatusFolder} from './work-layout.js';
68
68
 
@@ -279,7 +279,7 @@ export interface LedgerSweepResult {
279
279
  }
280
280
 
281
281
  /**
282
- * The `gc`-STYLE ledger SWEEP (prd story 3's belt-and-suspenders): on demand,
282
+ * The `gc`-STYLE ledger SWEEP (spec story 3's belt-and-suspenders): on demand,
283
283
  * REPORT every slug present in more than one status folder of a LOCAL `work/`
284
284
  * ledger, naming the folders and the CANDIDATE canonical folder — and NEVER
285
285
  * auto-delete. A human confirms the cleanup (keep the canonical copy, delete the
@@ -72,47 +72,47 @@ export interface LedgerReadyItem {
72
72
  }
73
73
 
74
74
  /**
75
- * The result of a prd-existence read (ADR §3a): does a prd named `<slug>` exist,
76
- * and where. A prd lives at `work/prds/ready/<slug>.md`; once TASKED it rests at
77
- * `work/prds/tasked/<slug>.md` (the tasked resting state, the source of truth for
75
+ * The result of a spec-existence read (ADR §3a): does a spec named `<slug>` exist,
76
+ * and where. A spec lives at `work/specs/ready/<slug>.md`; once TASKED it rests at
77
+ * `work/specs/tasked/<slug>.md` (the tasked resting state, the source of truth for
78
78
  * tasked-ness — task `prd-sliced-folder-step-a`). BOTH folders are consulted (any
79
- * is enough): a prd that is up-for-tasking OR already tasked still occupies its
80
- * slug, so collision detection must see it. While a prd IS being tasked its body
81
- * STAYS in `work/prds/ready/` (the tasking lock no longer moves it — task
79
+ * is enough): a spec that is up-for-tasking OR already tasked still occupies its
80
+ * slug, so collision detection must see it. While a spec IS being tasked its body
81
+ * STAYS in `work/specs/ready/` (the tasking lock no longer moves it — task
82
82
  * `cutover-retire-slicing-advancing-markers-and-trim-folder-sets`; the transient
83
83
  * `tasking/` folder is retired, the in-flight state is the per-item lock ref), so a
84
- * mid-tasking prd is detected via its `work/prds/ready/` residence. The slug is resolved
84
+ * mid-tasking spec is detected via its `work/specs/ready/` residence. The slug is resolved
85
85
  * from frontmatter `slug:`, falling back to the filename — the SAME shape the task
86
86
  * readers use.
87
87
  */
88
88
  export interface SpecExistence {
89
89
  /**
90
- * Whether a prd named `<slug>` exists in `work/prds/ready/` and/or `work/prds/tasked/`
90
+ * Whether a spec named `<slug>` exists in `work/specs/ready/` and/or `work/specs/tasked/`
91
91
  * (up-for-tasking OR already tasked — either still claims the slug).
92
92
  */
93
93
  exists: boolean;
94
- /** The spec source file, when present (`work/prds/ready/<slug>.md`). */
94
+ /** The spec source file, when present (`work/specs/ready/<slug>.md`). */
95
95
  specFile: string | undefined;
96
96
  /**
97
- * The tasked resting file, when present (`work/prds/tasked/<slug>.md`) — i.e. the
97
+ * The tasked resting file, when present (`work/specs/tasked/<slug>.md`) — i.e. the
98
98
  * spec HAS BEEN tasked (the source of truth for tasked-ness, task
99
- * `prd-sliced-folder-step-a`). A re-task moves it back `prds/tasked/ -> prds/ready/`.
99
+ * `prd-sliced-folder-step-a`). A re-task moves it back `specs/tasked/ -> specs/ready/`.
100
100
  */
101
101
  specTaskedFile: string | undefined;
102
102
  }
103
103
 
104
104
  /**
105
- * One prd enumerated for the AUTO-TASK selection pool (ADR §3 — the
106
- * "tasks-first then specs to task" priority). A prd is NOT in the task
107
- * scan/candidate model, so the auto-pick pool is built HERE from `work/prds/ready/`
108
- * through this single shared prd read path (the same path
105
+ * One spec enumerated for the AUTO-TASK selection pool (ADR §3 — the
106
+ * "tasks-first then specs to task" priority). A spec is NOT in the task
107
+ * scan/candidate model, so the auto-pick pool is built HERE from `work/specs/ready/`
108
+ * through this single shared spec read path (the same path
109
109
  * {@link SpecExistence} uses, widened from existence to the gate axes the tasking
110
110
  * predicate needs). The tasking-eligibility predicate (`autoslice-gate`'s
111
111
  * `resolveTaskingEligibility`) is applied to these by the selection layer; this
112
112
  * reader does NOT itself decide eligibility (it just surfaces the inputs).
113
113
  */
114
114
  export interface LedgerSpecItem {
115
- /** Filename within `work/prds/ready/` (e.g. `auto-slice.md`). */
115
+ /** Filename within `work/specs/ready/` (e.g. `auto-slice.md`). */
116
116
  file: string;
117
117
  /** Resolved slug (frontmatter `slug:`, falling back to the filename). */
118
118
  slug: string;
@@ -120,25 +120,25 @@ export interface LedgerSpecItem {
120
120
  humanOnly: boolean | undefined;
121
121
  /** Autonomy axis 2 (DISCOVERED): `true` (open questions) | `undefined`. */
122
122
  needsAnswers: boolean | undefined;
123
- /** Spec-only cross-prd order: prd slugs that must already be TASKED first. */
123
+ /** Spec-only cross-spec order: spec slugs that must already be TASKED first. */
124
124
  taskedAfter: string[];
125
125
  }
126
126
 
127
127
  /**
128
- * The prd pool of ONE repo, resolved from `work/prds/ready/` (the auto-task candidate
129
- * source). Carries every prd's gate axes PLUS the set of already-TASKED slugs so
130
- * the selection layer can resolve each prd's `taskedAfter` against `work/prds/tasked/`
131
- * RESIDENCE (task `prd-sliced-folder-step-a` / prd `slicing-coherence` US #9): the
128
+ * The spec pool of ONE repo, resolved from `work/specs/ready/` (the auto-task candidate
129
+ * source). Carries every spec's gate axes PLUS the set of already-TASKED slugs so
130
+ * the selection layer can resolve each spec's `taskedAfter` against `work/specs/tasked/`
131
+ * RESIDENCE (task `prd-sliced-folder-step-a` / spec `slicing-coherence` US #9): the
132
132
  * FOLDER is the source of truth, like `done/` for tasks (the auto-tasker reads
133
133
  * folder-residence; the `tasked:` marker was removed in
134
134
  * `remove-sliced-marker-step-b`). Built
135
- * through the SAME prd read path as {@link SpecExistence}; there is no second prd
135
+ * through the SAME spec read path as {@link SpecExistence}; there is no second spec
136
136
  * reader.
137
137
  */
138
138
  export interface LedgerSpecPool {
139
- /** Every prd in `work/prds/ready/`, sorted by slug. */
139
+ /** Every spec in `work/specs/ready/`, sorted by slug. */
140
140
  specs: LedgerSpecItem[];
141
- /** Slugs whose spec resides in `work/prds/tasked/` (resolves `taskedAfter`). */
141
+ /** Slugs whose spec resides in `work/specs/tasked/` (resolves `taskedAfter`). */
142
142
  taskedSlugs: Set<string>;
143
143
  }
144
144
 
@@ -201,17 +201,17 @@ export interface ResolveLocalStateInput {
201
201
  repoPath: string;
202
202
  }
203
203
 
204
- /** What the prd-existence resolve method needs: which repo + which slug. */
204
+ /** What the spec-existence resolve method needs: which repo + which slug. */
205
205
  export interface ResolveSpecExistenceInput {
206
- /** The repo root whose `work/prds/ready/`+`work/prds/tasked/` to read. */
206
+ /** The repo root whose `work/specs/ready/`+`work/specs/tasked/` to read. */
207
207
  repoPath: string;
208
208
  /** The slug to look up (matched against frontmatter `slug:`, then filename). */
209
209
  slug: string;
210
210
  }
211
211
 
212
- /** What the prd-pool resolve method needs: which repo's `work/prds/ready/` to enumerate. */
212
+ /** What the spec-pool resolve method needs: which repo's `work/specs/ready/` to enumerate. */
213
213
  export interface ResolveSpecPoolInput {
214
- /** The repo working-tree root whose `work/prds/ready/` to read. */
214
+ /** The repo working-tree root whose `work/specs/ready/` to read. */
215
215
  repoPath: string;
216
216
  }
217
217
 
@@ -233,13 +233,13 @@ export interface ResolveMirrorStateInput {
233
233
  }
234
234
 
235
235
  /**
236
- * What the MIRROR-ref prd-pool method needs: which bare hub mirror's committed
237
- * `work/prds/ready/`+`work/prds/tasked/` tree to enumerate.
236
+ * What the MIRROR-ref spec-pool method needs: which bare hub mirror's committed
237
+ * `work/specs/ready/`+`work/specs/tasked/` tree to enumerate.
238
238
  */
239
239
  export interface ResolveMirrorSpecPoolInput {
240
240
  /** The bare hub mirror directory (`<workspacesDir>/repos/<key>.git`). */
241
241
  mirrorPath: string;
242
- /** The mirror-LOCAL ref whose `work/prds*` tree to read (default `main`). */
242
+ /** The mirror-LOCAL ref whose `work/specs*` tree to read (default `main`). */
243
243
  ref?: string;
244
244
  /** Environment for child git processes. */
245
245
  env?: NodeJS.ProcessEnv;
@@ -279,8 +279,8 @@ export interface LedgerReadStrategy {
279
279
  */
280
280
  resolveMirrorState(input: ResolveMirrorStateInput): Promise<LocalLedgerState>;
281
281
  /**
282
- * Enumerate the repo's prd pool from a BARE hub mirror's committed `work/prds/ready/`
283
- * tree (+ already-TASKED slugs from `work/prds/tasked/` residence) — the
282
+ * Enumerate the repo's spec pool from a BARE hub mirror's committed `work/specs/ready/`
283
+ * tree (+ already-TASKED slugs from `work/specs/tasked/` residence) — the
284
284
  * mirror-ref counterpart of {@link LedgerReadStrategy.resolveSpecPool}, for the
285
285
  * NO-CHECKOUT mirror-side auto-pick (`run`'s isolated loop + the one-shot/CI
286
286
  * `advance --remote -n`). A mirror is bare, so this reads the committed tree via
@@ -293,36 +293,36 @@ export interface LedgerReadStrategy {
293
293
  input: ResolveMirrorSpecPoolInput,
294
294
  ): Promise<LedgerSpecPool>;
295
295
  /**
296
- * Resolve whether a prd named `<slug>` exists in the LOCAL working tree's
297
- * `work/prds/ready/` (the prd source — where a mid-tasking prd ALSO rests now that the
298
- * `tasking/` folder is retired) and/or `work/prds/tasked/` (the tasked resting
296
+ * Resolve whether a spec named `<slug>` exists in the LOCAL working tree's
297
+ * `work/specs/ready/` (the spec source — where a mid-tasking spec ALSO rests now that the
298
+ * `tasking/` folder is retired) and/or `work/specs/tasked/` (the tasked resting
299
299
  * state). The slug is resolved from each candidate file's frontmatter `slug:`,
300
300
  * falling back to the filename — the SAME shape the task readers use.
301
301
  *
302
- * This is the FIRST prd read path in the seam: `ledger-read.ts`/`scan.ts` read
303
- * only `backlog`/`done`, NEVER `work/prds/ready/`. It is added here
304
- * so the §3a slug-namespace resolver, and later the auto-tasking / `do prd:` work,
305
- * share ONE prd read path rather than each growing a bespoke scan. Synchronous
302
+ * This is the FIRST spec read path in the seam: `ledger-read.ts`/`scan.ts` read
303
+ * only `backlog`/`done`, NEVER `work/specs/ready/`. It is added here
304
+ * so the §3a slug-namespace resolver, and later the auto-tasking / `do spec:` work,
305
+ * share ONE spec read path rather than each growing a bespoke scan. Synchronous
306
306
  * and OFFLINE (a working-tree read), like {@link resolveLocalState}.
307
307
  */
308
308
  resolveSpecExistence(input: ResolveSpecExistenceInput): SpecExistence;
309
309
  /**
310
- * Enumerate the repo's prd pool from `work/prds/ready/` (the auto-task candidate
310
+ * Enumerate the repo's spec pool from `work/specs/ready/` (the auto-task candidate
311
311
  * source for the `do`/`run` "tasks-first then specs to task" priority, ADR
312
- * §3). Returns every prd's gate axes (`humanOnly`/`needsAnswers`/`taskedAfter`)
312
+ * §3). Returns every spec's gate axes (`humanOnly`/`needsAnswers`/`taskedAfter`)
313
313
  * PLUS the set of already-TASKED slugs so the selection layer can resolve
314
- * `taskedAfter` against `work/prds/tasked/` residence (the FOLDER is the source of
314
+ * `taskedAfter` against `work/specs/tasked/` residence (the FOLDER is the source of
315
315
  * truth) and apply `autoslice-gate`'s
316
- * predicate. This is the SAME prd read path {@link resolveSpecExistence} uses,
316
+ * predicate. This is the SAME spec read path {@link resolveSpecExistence} uses,
317
317
  * widened from a single-slug existence check to a full enumeration — NOT a
318
- * second prd reader. Synchronous and OFFLINE (a working-tree read), like
318
+ * second spec reader. Synchronous and OFFLINE (a working-tree read), like
319
319
  * {@link resolveLocalState}.
320
320
  */
321
321
  resolveSpecPool(input: ResolveSpecPoolInput): LedgerSpecPool;
322
322
  /**
323
323
  * Enumerate `work/tasks/backlog/*.md` (the TASK STAGING folder) into the SAME
324
324
  * {@link LedgerReadyItem} shape `resolveLocalState().ready` returns for the pool
325
- * — the SURFACE-on-staging widening (prd
325
+ * — the SURFACE-on-staging widening (spec
326
326
  * `staging-surface-and-apply-promote-safety` F2). Synchronous + OFFLINE
327
327
  * (working-tree read), like {@link resolveLocalState}. The pool / staging
328
328
  * folders are distinct durable status folders (one-slug-one-folder — a slug
@@ -333,19 +333,19 @@ export interface LedgerReadStrategy {
333
333
  */
334
334
  resolveLocalTaskStaging(input: ResolveLocalStateInput): LedgerReadyItem[];
335
335
  /**
336
- * Enumerate `work/prds/proposed/*.md` (the PRD STAGING folder) into the
336
+ * Enumerate `work/specs/proposed/*.md` (the SPEC STAGING folder) into the
337
337
  * SAME {@link LedgerSpecItem} shape `resolveSpecPool().specs` returns for the
338
- * pool — the PRD-symmetric `surfaceStaging` widening (prd
339
- * `staging-surface-and-apply-promote-safety` F2, prd q4 answer). Sync + OFFLINE.
338
+ * pool — the SPEC-symmetric `surfaceStaging` widening (spec
339
+ * `staging-surface-and-apply-promote-safety` F2, spec q4 answer). Sync + OFFLINE.
340
340
  */
341
341
  resolveLocalSpecStaging(input: ResolveSpecPoolInput): LedgerSpecItem[];
342
342
  /**
343
- * Enumerate `work/prds/tasked/*.md` (the TASKED resting folder) into the SAME
343
+ * Enumerate `work/specs/tasked/*.md` (the TASKED resting folder) into the SAME
344
344
  * {@link LedgerSpecItem} shape `resolveSpecPool().specs` returns. UNLIKE the pool
345
- * (`prds/ready/`) and staging (`prds/proposed/`) readers, this exists so the
346
- * lifecycle GATHER can surface/apply a `needsAnswers:true` prd that drifted
347
- * AFTER it was tasked and rests IN PLACE in `prds/tasked/` (WORK-CONTRACT
348
- * "A PRD that has drifted AFTER it was TASKED"). Without it, such a prd's
345
+ * (`specs/ready/`) and staging (`specs/proposed/`) readers, this exists so the
346
+ * lifecycle GATHER can surface/apply a `needsAnswers:true` spec that drifted
347
+ * AFTER it was tasked and rests IN PLACE in `specs/tasked/` (WORK-CONTRACT
348
+ * "A SPEC that has drifted AFTER it was TASKED"). Without it, such a spec's
349
349
  * ANSWERED sidecar is enumerated by no pool and the human's answer is STRANDED
350
350
  * (observation `tasked-prd-needsanswers-sidecar-stranded-no-apply-pool`).
351
351
  * `resolveSpecPool` deliberately returns tasked specs only as `taskedSlugs`
@@ -363,15 +363,15 @@ export interface LedgerReadStrategy {
363
363
  ): Promise<LedgerReadyItem[]>;
364
364
  /**
365
365
  * Mirror-ref counterpart of {@link resolveLocalSpecStaging}: read
366
- * `<ref>:work/prds/proposed/*.md` from a bare mirror.
366
+ * `<ref>:work/specs/proposed/*.md` from a bare mirror.
367
367
  */
368
368
  resolveMirrorSpecStaging(
369
369
  input: ResolveMirrorSpecPoolInput,
370
370
  ): Promise<LedgerSpecItem[]>;
371
371
  /**
372
372
  * Mirror-ref counterpart of {@link resolveLocalSpecTasked}: read
373
- * `<ref>:work/prds/tasked/*.md` from a bare mirror, so a `needsAnswers` tasked
374
- * prd's answered sidecar is never stranded on the mirror-side advance path
373
+ * `<ref>:work/specs/tasked/*.md` from a bare mirror, so a `needsAnswers` tasked
374
+ * spec's answered sidecar is never stranded on the mirror-side advance path
375
375
  * either.
376
376
  */
377
377
  resolveMirrorSpecTasked(
@@ -430,7 +430,7 @@ function readLocalReady(repoPath: string): LedgerReadyItem[] {
430
430
  }
431
431
 
432
432
  /**
433
- * Read `work/tasks/backlog/*.md` (the TASK STAGING folder, prd
433
+ * Read `work/tasks/backlog/*.md` (the TASK STAGING folder, spec
434
434
  * `staging-surface-and-apply-promote-safety` F2) from the local tree. Same
435
435
  * {@link LedgerReadyItem} shape as the pool reader — the SURFACE-on-staging
436
436
  * widening only enumerates items; it does NOT promote them.
@@ -440,8 +440,8 @@ function readLocalTaskStaging(repoPath: string): LedgerReadyItem[] {
440
440
  }
441
441
 
442
442
  /**
443
- * Read `work/prds/proposed/*.md` (the PRD STAGING folder, the prd twin
444
- * of {@link readLocalTaskStaging}, prd q4 answer) from the local tree. Returns
443
+ * Read `work/specs/proposed/*.md` (the SPEC STAGING folder, the spec twin
444
+ * of {@link readLocalTaskStaging}, spec q4 answer) from the local tree. Returns
445
445
  * the SAME {@link LedgerSpecItem} shape `resolveSpecPool().specs` returns.
446
446
  */
447
447
  function readLocalSpecStaging(repoPath: string): LedgerSpecItem[] {
@@ -449,16 +449,16 @@ function readLocalSpecStaging(repoPath: string): LedgerSpecItem[] {
449
449
  }
450
450
 
451
451
  /**
452
- * Read `work/prds/tasked/*.md` (the TASKED resting folder) into the SAME
452
+ * Read `work/specs/tasked/*.md` (the TASKED resting folder) into the SAME
453
453
  * {@link LedgerSpecItem} shape. Used by the lifecycle gather to surface/apply a
454
- * `needsAnswers` prd that drifted after tasking and rests in place in
455
- * `prds/tasked/` — so its answered sidecar is never stranded.
454
+ * `needsAnswers` spec that drifted after tasking and rests in place in
455
+ * `specs/tasked/` — so its answered sidecar is never stranded.
456
456
  */
457
457
  function readLocalSpecTasked(repoPath: string): LedgerSpecItem[] {
458
458
  return readLocalSpecFolder(repoPath, 'specs-tasked');
459
459
  }
460
460
 
461
- /** Shared body for the local prd-FOLDER readers (proposed/tasked) — same item shape. */
461
+ /** Shared body for the local spec-FOLDER readers (proposed/tasked) — same item shape. */
462
462
  function readLocalSpecFolder(
463
463
  repoPath: string,
464
464
  folder: 'specs-proposed' | 'specs-tasked',
@@ -518,9 +518,9 @@ function readLocalObservations(repoPath: string): LedgerObservationItem[] {
518
518
  }
519
519
 
520
520
  /**
521
- * Does a prd named `slug` exist in `<repoPath>/work/<folder>/`? A prd source file
522
- * is `work/prds/ready/*.md` (where a mid-tasking prd also rests — the `tasking/` folder is
523
- * retired); a tasked prd rests at `work/prds/tasked/*.md` (the source of truth for
521
+ * Does a spec named `slug` exist in `<repoPath>/work/<folder>/`? A spec source file
522
+ * is `work/specs/ready/*.md` (where a mid-tasking spec also rests — the `tasking/` folder is
523
+ * retired); a tasked spec rests at `work/specs/tasked/*.md` (the source of truth for
524
524
  * tasked-ness). We match the slug against each file's
525
525
  * frontmatter `slug:` (falling back to the filename) — the SAME shape the task
526
526
  * readers use — so a renamed file whose frontmatter slug matches still resolves.
@@ -541,15 +541,15 @@ function findSpecFileBySlug(
541
541
  }
542
542
 
543
543
  /**
544
- * Enumerate `work/prds/ready/*.md` into the auto-task prd pool (the tasks-first/prd
545
- * priority's prd source) — the SAME prd read path {@link findSpecFileBySlug} uses,
546
- * widened from a single-slug existence check to a full enumeration. Each prd's
544
+ * Enumerate `work/specs/ready/*.md` into the auto-task spec pool (the tasks-first/spec
545
+ * priority's spec source) — the SAME spec read path {@link findSpecFileBySlug} uses,
546
+ * widened from a single-slug existence check to a full enumeration. Each spec's
547
547
  * slug is resolved from frontmatter `slug:` (falling back to the filename) and
548
548
  * its gate axes (`humanOnly`/`needsAnswers`/`taskedAfter`) parsed. The
549
- * already-TASKED set is RESIDENCE in `work/prds/tasked/` (task
550
- * `prd-sliced-folder-step-a` / prd `slicing-coherence` US #9): the FOLDER is the
549
+ * already-TASKED set is RESIDENCE in `work/specs/tasked/` (task
550
+ * `prd-sliced-folder-step-a` / spec `slicing-coherence` US #9): the FOLDER is the
551
551
  * source of truth (the build-machine `done/` analogue), so `taskedAfter` resolves
552
- * against `prds/tasked/` residence (mirroring `blockedBy` -> `done/`). The `tasked:`
552
+ * against `specs/tasked/` residence (mirroring `blockedBy` -> `done/`). The `tasked:`
553
553
  * frontmatter marker was removed entirely in `remove-sliced-marker-step-b`. This
554
554
  * matches `tasking.ts`'s `readTaskedSlugs`. Missing folders read as empty.
555
555
  */
@@ -569,7 +569,7 @@ function readLocalSpecPool(repoPath: string): LocalSpecPool {
569
569
  }
570
570
  specs.sort((a, b) => a.slug.localeCompare(b.slug));
571
571
 
572
- // Tasked-ness is RESIDENCE in `work/prds/tasked/` — the FOLDER is the source of
572
+ // Tasked-ness is RESIDENCE in `work/specs/tasked/` — the FOLDER is the source of
573
573
  // truth, like `done/` for tasks (the `tasked:` marker was removed in
574
574
  // `remove-sliced-marker-step-b`), mirroring tasking.ts's readTaskedSlugs. Missing
575
575
  // folder reads as empty.
@@ -731,7 +731,7 @@ async function readTaskStagingFromTree(
731
731
  return readTaskFolderFromTree('tasks-backlog', ref, cwd, env);
732
732
  }
733
733
 
734
- /** Parse `<ref>:work/prds/proposed/*.md` (PRD STAGING) into prd items, sorted by slug. */
734
+ /** Parse `<ref>:work/specs/proposed/*.md` (SPEC STAGING) into spec items, sorted by slug. */
735
735
  async function readSpecStagingFromTree(
736
736
  ref: string,
737
737
  cwd: string,
@@ -740,7 +740,7 @@ async function readSpecStagingFromTree(
740
740
  return readSpecFolderFromTree('specs-proposed', ref, cwd, env);
741
741
  }
742
742
 
743
- /** Parse `<ref>:work/prds/tasked/*.md` (TASKED resting) into prd items, sorted by slug. */
743
+ /** Parse `<ref>:work/specs/tasked/*.md` (TASKED resting) into spec items, sorted by slug. */
744
744
  async function readSpecTaskedFromTree(
745
745
  ref: string,
746
746
  cwd: string,
@@ -749,7 +749,7 @@ async function readSpecTaskedFromTree(
749
749
  return readSpecFolderFromTree('specs-tasked', ref, cwd, env);
750
750
  }
751
751
 
752
- /** Shared body for the mirror-ref prd-FOLDER readers (proposed/tasked) — same item shape. */
752
+ /** Shared body for the mirror-ref spec-FOLDER readers (proposed/tasked) — same item shape. */
753
753
  async function readSpecFolderFromTree(
754
754
  folder: 'specs-proposed' | 'specs-tasked',
755
755
  ref: string,
@@ -776,8 +776,8 @@ async function readSpecFolderFromTree(
776
776
  }
777
777
 
778
778
  /**
779
- * Parse `<ref>:work/prds/ready/*.md` into the auto-task prd pool, sorted by slug, plus
780
- * the already-TASKED slugs from `<ref>:work/prds/tasked/` RESIDENCE (the folder is
779
+ * Parse `<ref>:work/specs/ready/*.md` into the auto-task spec pool, sorted by slug, plus
780
+ * the already-TASKED slugs from `<ref>:work/specs/tasked/` RESIDENCE (the folder is
781
781
  * the source of truth, mirroring the working-tree {@link readLocalSpecPool}). Reads
782
782
  * a committed tree (bare-mirror or any ref) via `ls-tree`/`show`. Missing folders
783
783
  * read as empty.
@@ -805,7 +805,7 @@ async function readSpecPoolFromTree(
805
805
  }
806
806
  specs.sort((a, b) => a.slug.localeCompare(b.slug));
807
807
 
808
- // Tasked-ness is RESIDENCE in `work/prds/tasked/` — the FOLDER is the source of
808
+ // Tasked-ness is RESIDENCE in `work/specs/tasked/` — the FOLDER is the source of
809
809
  // truth (the `tasked:` marker was removed in `remove-sliced-marker-step-b`),
810
810
  // exactly as the working-tree reader resolves it.
811
811
  const taskedBase = `${ref}:${workFolderRel('specs-tasked')}`;
@@ -910,7 +910,7 @@ export const currentLedgerRead: LedgerReadStrategy = {
910
910
  return {ready, doneSlugs, observations};
911
911
  },
912
912
  async resolveMirrorSpecPool({mirrorPath, ref = 'main', env}) {
913
- // The prd pool from the bare mirror's committed `<ref>:work/prds*` tree — the
913
+ // The spec pool from the bare mirror's committed `<ref>:work/specs*` tree — the
914
914
  // mirror-ref counterpart of `resolveSpecPool` (a working-tree read). Same shape,
915
915
  // so `taskableSpecs` applies identically to either source.
916
916
  return readSpecPoolFromTree(ref, mirrorPath, env);