dorfl 0.1.0 → 0.1.2

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 (324) 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 +7 -7
  8. package/dist/advance-drivers.d.ts.map +1 -1
  9. package/dist/advance-drivers.js +5 -5
  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.js +9 -9
  16. package/dist/advance-lifecycle-template.js.map +1 -1
  17. package/dist/advance-loop-driver.d.ts +3 -3
  18. package/dist/advance-loop-driver.d.ts.map +1 -1
  19. package/dist/advance-loop-driver.js +1 -1
  20. package/dist/advance-treeless-publish.d.ts +1 -1
  21. package/dist/advance.d.ts +11 -11
  22. package/dist/advance.d.ts.map +1 -1
  23. package/dist/advance.js +21 -21
  24. package/dist/advance.js.map +1 -1
  25. package/dist/advancing-lock.d.ts +1 -1
  26. package/dist/advancing-lock.js +5 -5
  27. package/dist/apply-decide.d.ts +2 -2
  28. package/dist/apply-decide.js +2 -2
  29. package/dist/apply-merge-action.d.ts +4 -4
  30. package/dist/apply-merge-action.js +2 -2
  31. package/dist/apply-persist.d.ts +5 -5
  32. package/dist/apply-persist.d.ts.map +1 -1
  33. package/dist/apply-persist.js +7 -7
  34. package/dist/apply-persist.js.map +1 -1
  35. package/dist/buildable-body.d.ts +14 -14
  36. package/dist/buildable-body.js +9 -9
  37. package/dist/claim-cas.d.ts +3 -3
  38. package/dist/claim-cas.js +1 -1
  39. package/dist/claim-cas.js.map +1 -1
  40. package/dist/cli.d.ts.map +1 -1
  41. package/dist/cli.js +83 -77
  42. package/dist/cli.js.map +1 -1
  43. package/dist/close-job-template.d.ts +3 -3
  44. package/dist/close-job-template.js +8 -8
  45. package/dist/close-job.d.ts +8 -8
  46. package/dist/close-job.js +25 -25
  47. package/dist/close-job.js.map +1 -1
  48. package/dist/complete.d.ts +3 -3
  49. package/dist/complete.js +8 -8
  50. package/dist/complete.js.map +1 -1
  51. package/dist/concurrency.d.ts +1 -1
  52. package/dist/concurrency.js +1 -1
  53. package/dist/config.d.ts +32 -32
  54. package/dist/config.js +5 -5
  55. package/dist/config.js.map +1 -1
  56. package/dist/continue-branch.d.ts +1 -1
  57. package/dist/continue-branch.js +1 -1
  58. package/dist/cwd-section.js +1 -1
  59. package/dist/cwd-section.js.map +1 -1
  60. package/dist/decision-engine.d.ts +2 -2
  61. package/dist/do-autopick.d.ts +6 -6
  62. package/dist/do-autopick.d.ts.map +1 -1
  63. package/dist/do-autopick.js +5 -5
  64. package/dist/do-autopick.js.map +1 -1
  65. package/dist/do-config.d.ts +3 -3
  66. package/dist/do-config.js +3 -3
  67. package/dist/do-config.js.map +1 -1
  68. package/dist/do-remote-auto.d.ts +2 -2
  69. package/dist/do-remote-auto.js +1 -1
  70. package/dist/do.d.ts +25 -25
  71. package/dist/do.d.ts.map +1 -1
  72. package/dist/do.js +22 -22
  73. package/dist/do.js.map +1 -1
  74. package/dist/drop-source.d.ts +2 -2
  75. package/dist/env-config.js +8 -8
  76. package/dist/env-config.js.map +1 -1
  77. package/dist/format.js +3 -3
  78. package/dist/format.js.map +1 -1
  79. package/dist/frontmatter.d.ts +33 -39
  80. package/dist/frontmatter.d.ts.map +1 -1
  81. package/dist/frontmatter.js +18 -31
  82. package/dist/frontmatter.js.map +1 -1
  83. package/dist/install-ci-branch-protection.d.ts +1 -1
  84. package/dist/install-ci-branch-protection.js +1 -1
  85. package/dist/install-ci-capabilities/advance-lifecycle.d.ts +1 -1
  86. package/dist/install-ci-capabilities/advance-lifecycle.js +1 -1
  87. package/dist/install-ci-capabilities/close-job.d.ts +1 -1
  88. package/dist/install-ci-capabilities/close-job.js +1 -1
  89. package/dist/install-ci-capabilities/example-noop.d.ts +1 -1
  90. package/dist/install-ci-capabilities/example-noop.js +1 -1
  91. package/dist/install-ci-capabilities/intake.d.ts +2 -2
  92. package/dist/install-ci-capabilities/intake.js +2 -2
  93. package/dist/install-ci-capabilities/verify.d.ts +1 -1
  94. package/dist/install-ci-capabilities/verify.js +1 -1
  95. package/dist/install-ci-core.d.ts +3 -3
  96. package/dist/install-ci-core.js +2 -2
  97. package/dist/install-ci-core.js.map +1 -1
  98. package/dist/install-ci-github.d.ts +1 -1
  99. package/dist/install-ci-github.js +1 -1
  100. package/dist/install-ci.d.ts +1 -1
  101. package/dist/install-ci.js +4 -4
  102. package/dist/install-ci.js.map +1 -1
  103. package/dist/intake-event.d.ts +6 -6
  104. package/dist/intake-event.js +6 -6
  105. package/dist/intake-marker.d.ts +3 -3
  106. package/dist/intake-marker.d.ts.map +1 -1
  107. package/dist/intake-triage.d.ts +1 -1
  108. package/dist/intake-triage.js +2 -2
  109. package/dist/intake-trigger-template.d.ts +8 -8
  110. package/dist/intake-trigger-template.d.ts.map +1 -1
  111. package/dist/intake-trigger-template.js +16 -16
  112. package/dist/intake-trigger-template.js.map +1 -1
  113. package/dist/intake.d.ts +50 -50
  114. package/dist/intake.d.ts.map +1 -1
  115. package/dist/intake.js +70 -70
  116. package/dist/intake.js.map +1 -1
  117. package/dist/integration-core.d.ts +17 -17
  118. package/dist/integration-core.js +17 -17
  119. package/dist/integration-core.js.map +1 -1
  120. package/dist/isolation.d.ts +3 -3
  121. package/dist/issue-provider.d.ts +4 -4
  122. package/dist/issue-provider.js +1 -1
  123. package/dist/item-lock.d.ts +21 -21
  124. package/dist/item-lock.d.ts.map +1 -1
  125. package/dist/item-lock.js +16 -16
  126. package/dist/item-path.d.ts +2 -2
  127. package/dist/item-path.js +2 -2
  128. package/dist/ledger-lint.d.ts +9 -9
  129. package/dist/ledger-lint.js +9 -9
  130. package/dist/ledger-read.d.ts +57 -57
  131. package/dist/ledger-read.d.ts.map +1 -1
  132. package/dist/ledger-read.js +24 -24
  133. package/dist/ledger-read.js.map +1 -1
  134. package/dist/ledger-write.d.ts +2 -2
  135. package/dist/ledger-write.js +1 -1
  136. package/dist/lifecycle-gather.d.ts +1 -1
  137. package/dist/lifecycle-gather.js +16 -16
  138. package/dist/lifecycle-gather.js.map +1 -1
  139. package/dist/lifecycle-pools.d.ts +4 -4
  140. package/dist/lifecycle-pools.js +1 -1
  141. package/dist/merge-question-surfacer.d.ts +3 -3
  142. package/dist/merge-question-surfacer.js +2 -2
  143. package/dist/merge-question-surfacer.js.map +1 -1
  144. package/dist/mint-adr.js +4 -4
  145. package/dist/mirror-pool-scan.d.ts +2 -2
  146. package/dist/mirror-pool-scan.js +3 -3
  147. package/dist/mirror-pool-scan.js.map +1 -1
  148. package/dist/needs-attention.d.ts +13 -13
  149. package/dist/needs-attention.d.ts.map +1 -1
  150. package/dist/needs-attention.js +11 -11
  151. package/dist/needs-attention.js.map +1 -1
  152. package/dist/orphan-sidecar.d.ts +2 -2
  153. package/dist/placement.d.ts +6 -6
  154. package/dist/placement.js +2 -2
  155. package/dist/prd-to-spec.d.ts +15 -1
  156. package/dist/prd-to-spec.d.ts.map +1 -1
  157. package/dist/prd-to-spec.js +36 -14
  158. package/dist/prd-to-spec.js.map +1 -1
  159. package/dist/prompt.d.ts +24 -24
  160. package/dist/prompt.d.ts.map +1 -1
  161. package/dist/prompt.js +29 -31
  162. package/dist/prompt.js.map +1 -1
  163. package/dist/protocol/CLAIM-PROTOCOL.md +4 -4
  164. package/dist/protocol/REVIEW-PROTOCOL.md +1 -1
  165. package/dist/protocol/TASKING-PROTOCOL.md +12 -12
  166. package/dist/protocol/WORK-CONTRACT.md +39 -39
  167. package/dist/protocol/spec-template.md +1 -1
  168. package/dist/protocol/task-template.md +3 -3
  169. package/dist/readiness.d.ts +1 -1
  170. package/dist/recover-isolated.js +1 -1
  171. package/dist/repo-config.js +12 -12
  172. package/dist/repo-config.js.map +1 -1
  173. package/dist/review-gate.d.ts +3 -3
  174. package/dist/review-gate.d.ts.map +1 -1
  175. package/dist/review-gate.js +11 -10
  176. package/dist/review-gate.js.map +1 -1
  177. package/dist/review-verdict.d.ts +2 -2
  178. package/dist/review-verdict.d.ts.map +1 -1
  179. package/dist/review-verdict.js +1 -1
  180. package/dist/run.d.ts +1 -1
  181. package/dist/run.js +5 -5
  182. package/dist/run.js.map +1 -1
  183. package/dist/scan.d.ts +10 -10
  184. package/dist/scan.d.ts.map +1 -1
  185. package/dist/scan.js +8 -8
  186. package/dist/scan.js.map +1 -1
  187. package/dist/select-order.d.ts +1 -1
  188. package/dist/select-priority.d.ts +12 -12
  189. package/dist/select-priority.d.ts.map +1 -1
  190. package/dist/select-priority.js +5 -5
  191. package/dist/select-priority.js.map +1 -1
  192. package/dist/sidecar.d.ts +2 -2
  193. package/dist/sidecar.js +2 -2
  194. package/dist/sidecar.js.map +1 -1
  195. package/dist/slug-namespace.d.ts +1 -1
  196. package/dist/slug-namespace.js +3 -3
  197. package/dist/slug-namespace.js.map +1 -1
  198. package/dist/spec-complete.js +2 -2
  199. package/dist/spec-complete.js.map +1 -1
  200. package/dist/start.d.ts +1 -1
  201. package/dist/start.js +3 -3
  202. package/dist/start.js.map +1 -1
  203. package/dist/status.d.ts +3 -3
  204. package/dist/status.js +4 -4
  205. package/dist/status.js.map +1 -1
  206. package/dist/surface-gate.d.ts +2 -2
  207. package/dist/surface-gate.d.ts.map +1 -1
  208. package/dist/surface-persist.d.ts +2 -2
  209. package/dist/surface-persist.d.ts.map +1 -1
  210. package/dist/tasker-review-loop.d.ts +8 -8
  211. package/dist/tasker-review-loop.d.ts.map +1 -1
  212. package/dist/tasker-review-loop.js +8 -8
  213. package/dist/tasker-review-loop.js.map +1 -1
  214. package/dist/tasking-eligibility.d.ts +21 -21
  215. package/dist/tasking-eligibility.d.ts.map +1 -1
  216. package/dist/tasking-eligibility.js +10 -10
  217. package/dist/tasking-lock.d.ts +8 -8
  218. package/dist/tasking-lock.d.ts.map +1 -1
  219. package/dist/tasking-lock.js +20 -21
  220. package/dist/tasking-lock.js.map +1 -1
  221. package/dist/tasking.d.ts +33 -33
  222. package/dist/tasking.d.ts.map +1 -1
  223. package/dist/tasking.js +89 -88
  224. package/dist/tasking.js.map +1 -1
  225. package/dist/triage-gate.d.ts +1 -1
  226. package/dist/triage-persist.d.ts +5 -5
  227. package/dist/triage-persist.js +15 -15
  228. package/dist/triage-persist.js.map +1 -1
  229. package/dist/verify-workflow-template.d.ts +1 -1
  230. package/dist/verify-workflow-template.js +2 -2
  231. package/dist/work-layout.d.ts +9 -7
  232. package/dist/work-layout.d.ts.map +1 -1
  233. package/dist/work-layout.js +9 -7
  234. package/dist/work-layout.js.map +1 -1
  235. package/dist/workspace.d.ts +1 -1
  236. package/package.json +1 -1
  237. package/src/advance-ci-template.ts +4 -4
  238. package/src/advance-classify.ts +5 -5
  239. package/src/advance-drivers.ts +10 -10
  240. package/src/advance-isolated.ts +3 -3
  241. package/src/advance-lifecycle-template.ts +9 -9
  242. package/src/advance-loop-driver.ts +3 -3
  243. package/src/advance-treeless-publish.ts +1 -1
  244. package/src/advance.ts +30 -30
  245. package/src/advancing-lock.ts +6 -6
  246. package/src/apply-decide.ts +2 -2
  247. package/src/apply-merge-action.ts +5 -5
  248. package/src/apply-persist.ts +8 -8
  249. package/src/buildable-body.ts +14 -14
  250. package/src/claim-cas.ts +4 -4
  251. package/src/cli.ts +94 -84
  252. package/src/close-job-template.ts +8 -8
  253. package/src/close-job.ts +26 -26
  254. package/src/complete.ts +11 -11
  255. package/src/concurrency.ts +1 -1
  256. package/src/config.ts +37 -37
  257. package/src/continue-branch.ts +1 -1
  258. package/src/cwd-section.ts +1 -1
  259. package/src/decision-engine.ts +3 -3
  260. package/src/do-autopick.ts +9 -9
  261. package/src/do-config.ts +6 -6
  262. package/src/do-remote-auto.ts +2 -2
  263. package/src/do.ts +49 -49
  264. package/src/drop-source.ts +2 -2
  265. package/src/env-config.ts +8 -8
  266. package/src/format.ts +3 -3
  267. package/src/frontmatter.ts +42 -60
  268. package/src/install-ci-branch-protection.ts +1 -1
  269. package/src/install-ci-capabilities/advance-lifecycle.ts +1 -1
  270. package/src/install-ci-capabilities/close-job.ts +1 -1
  271. package/src/install-ci-capabilities/example-noop.ts +1 -1
  272. package/src/install-ci-capabilities/intake.ts +2 -2
  273. package/src/install-ci-capabilities/verify.ts +1 -1
  274. package/src/install-ci-core.ts +4 -4
  275. package/src/install-ci-github.ts +1 -1
  276. package/src/install-ci.ts +4 -4
  277. package/src/intake-event.ts +6 -6
  278. package/src/intake-marker.ts +3 -3
  279. package/src/intake-triage.ts +2 -2
  280. package/src/intake-trigger-template.ts +17 -17
  281. package/src/intake.ts +97 -97
  282. package/src/integration-core.ts +35 -35
  283. package/src/isolation.ts +3 -3
  284. package/src/issue-provider.ts +4 -4
  285. package/src/item-lock.ts +21 -21
  286. package/src/item-path.ts +2 -2
  287. package/src/ledger-lint.ts +9 -9
  288. package/src/ledger-read.ts +81 -81
  289. package/src/ledger-write.ts +3 -3
  290. package/src/lifecycle-gather.ts +16 -16
  291. package/src/lifecycle-pools.ts +4 -4
  292. package/src/merge-question-surfacer.ts +4 -4
  293. package/src/mint-adr.ts +4 -4
  294. package/src/mirror-pool-scan.ts +5 -5
  295. package/src/needs-attention.ts +22 -22
  296. package/src/orphan-sidecar.ts +2 -2
  297. package/src/placement.ts +6 -6
  298. package/src/prd-to-spec.ts +51 -15
  299. package/src/prompt.ts +33 -35
  300. package/src/readiness.ts +1 -1
  301. package/src/recover-isolated.ts +1 -1
  302. package/src/repo-config.ts +12 -12
  303. package/src/review-gate.ts +12 -11
  304. package/src/review-verdict.ts +2 -2
  305. package/src/run.ts +6 -6
  306. package/src/scan.ts +15 -15
  307. package/src/select-order.ts +1 -1
  308. package/src/select-priority.ts +13 -13
  309. package/src/sidecar.ts +3 -3
  310. package/src/slug-namespace.ts +3 -3
  311. package/src/spec-complete.ts +2 -2
  312. package/src/start.ts +4 -4
  313. package/src/status.ts +7 -7
  314. package/src/surface-gate.ts +2 -2
  315. package/src/surface-persist.ts +2 -2
  316. package/src/tasker-review-loop.ts +15 -15
  317. package/src/tasking-eligibility.ts +21 -21
  318. package/src/tasking-lock.ts +27 -28
  319. package/src/tasking.ts +124 -123
  320. package/src/triage-gate.ts +1 -1
  321. package/src/triage-persist.ts +16 -16
  322. package/src/verify-workflow-template.ts +2 -2
  323. package/src/work-layout.ts +9 -7
  324. package/src/workspace.ts +1 -1
@@ -57,8 +57,8 @@ import {isAncestor} from './gc.js';
57
57
  * integrates), so verify-then-review holds on the merged tree, never split across
58
58
  * two trees. Any failure routes to needs-attention.
59
59
  *
60
- * It is the CORE in the head / core / tail decomposition (prd
61
- * `work/prds/tasked/run-do-integrate-convergence.md`): the caller-specific HEAD
60
+ * It is the CORE in the head / core / tail decomposition (spec
61
+ * `work/specs/tasked/run-do-integrate-convergence.md`): the caller-specific HEAD
62
62
  * (repo/arbiter/branch checks, source resolution, the `recovering` flag) and TAIL
63
63
  * (switch-to-main / `syncLocalMain` / delete-local-branch / `--no-switch` / the
64
64
  * propose next-step block, or — for `run` — the job-record + worktree reap) stay
@@ -98,7 +98,7 @@ export type IntegrationCoreOutcome =
98
98
  /**
99
99
  * The CORE's input — everything the band needs, nothing caller-shaped. Every
100
100
  * divergence between the human `complete` path and the autonomous `do`/`run` path
101
- * maps to a FIELD VALUE here, not an `if (caller === …)` branch (prd: "zero
101
+ * maps to a FIELD VALUE here, not an `if (caller === …)` branch (spec: "zero
102
102
  * caller-identity leakage"). In-place vs worktree = `cwd`; arbiter name =
103
103
  * `arbiter`; human vs autonomous surfacing = `surfaceArbiter`; do's recovery =
104
104
  * `source` + `recovering`; per-repo/lang gate = `verify`.
@@ -108,9 +108,9 @@ export type IntegrationCoreOutcome =
108
108
  * task-shaped done-move + title source. The shared band
109
109
  * (verify→review→commit→rebase→integrate→propose-PR-with-title/body) is
110
110
  * IDENTICAL; only the "which item move + which file to read the title from" step
111
- * is caller-supplied. This is the seam the `do prd:<slug>` TASKING transition
112
- * rides (task `slice-output-through-integration`): its "item move" is the prd
113
- * LIFECYCLE move (`work/prds/ready/<slug>.md → work/prds/tasked/<slug>.md`, residence =
111
+ * is caller-supplied. This is the seam the `do spec:<slug>` TASKING transition
112
+ * rides (task `slice-output-through-integration`): its "item move" is the spec
113
+ * LIFECYCLE move (`work/specs/ready/<slug>.md → work/specs/tasked/<slug>.md`, residence =
114
114
  * tasked-ness) plus its EMITTED backlog files — NOT a task done-move. Supplying it
115
115
  * makes every integrate-time arg (`--propose`/`--merge`, provider, title/body)
116
116
  * apply to tasking BY CONSTRUCTION, because they resolve ONCE here.
@@ -127,7 +127,7 @@ export interface IntegrationLifecycle {
127
127
  /**
128
128
  * Absolute path to the item file whose `title:` frontmatter seeds the default
129
129
  * commit summary AND the synthesised propose-mode PR title. For the tasking
130
- * transition this is the held prd (`work/prds/ready/<slug>.md`) — read BEFORE
130
+ * transition this is the held spec (`work/specs/ready/<slug>.md`) — read BEFORE
131
131
  * {@link stage} moves it. IGNORED when {@link title} is supplied (the explicit
132
132
  * title wins — no file read).
133
133
  */
@@ -137,16 +137,16 @@ export interface IntegrationLifecycle {
137
137
  * uses THIS as the title source for the default commit summary AND the synthesised
138
138
  * propose-mode PR title, INSTEAD of reading {@link titlePath}. This is the seam for
139
139
  * a lifecycle whose output file does NOT yet exist at title-read time — the intake
140
- * lone-task / prd path WRITES `work/backlog/<slug>.md` / `work/prds/ready/<slug>.md` in
140
+ * lone-task / spec path WRITES `work/backlog/<slug>.md` / `work/specs/ready/<slug>.md` in
141
141
  * {@link stage}, which runs AFTER the title read, so a `titlePath` read would race
142
- * the write and fall back to a generic subject. The `do prd:` tasking transition
143
- * leaves this unset (its `titlePath` is an already-existing held prd, read fine).
142
+ * the write and fall back to a generic subject. The `do spec:` tasking transition
143
+ * leaves this unset (its `titlePath` is an already-existing held spec, read fine).
144
144
  */
145
145
  title?: string;
146
146
  /**
147
147
  * STAGE the lifecycle move + emitted files into the index on the current work
148
148
  * branch (runner-owned git; the agent never does git). For the tasking
149
- * transition: `git mv work/prds/ready/<slug>.md → work/prds/tasked/<slug>.md`
149
+ * transition: `git mv work/specs/ready/<slug>.md → work/specs/tasked/<slug>.md`
150
150
  * (residence = tasked-ness; no marker), and write+`git add` the produced
151
151
  * `work/backlog/*.md` files. The band's subsequent `git add -A` + atomic commit
152
152
  * folds this staging
@@ -165,8 +165,8 @@ export interface IntegrationLifecycle {
165
165
 
166
166
  /**
167
167
  * The default LIVENESS CEILING for the merge-mode `${branch}:main` push (the
168
- * durable promotions `tasks/ready → tasks/done` and, via `lifecycle`, `prds/ready
169
- * → prds/tasked`). Task `c2-rebase-until-real-on-durable-main-promotions` turned
168
+ * durable promotions `tasks/ready → tasks/done` and, via `lifecycle`, `specs/ready
169
+ * → specs/tasked`). Task `c2-rebase-until-real-on-durable-main-promotions` turned
170
170
  * the previous SMALL FIXED CAP (was 5, the `run-fleet-claim-integrate-and-sibling-
171
171
  * rebase-concurrency-safe` Race-1 budget) into rebase-until-real-conflict: a CLEAN
172
172
  * re-rebase no longer counts against a tiny give-up budget — only a GENUINE
@@ -271,7 +271,7 @@ export interface IntegrationCoreInput {
271
271
  * `work/<type>-<slug>` identity. When omitted, the core derives it from the
272
272
  * branch HEAD is on (the robust default — the type is encoded IN the name). A
273
273
  * caller that knows the type explicitly may pass it (e.g. the tasking path
274
- * passes its `work/prds/ready-<slug>`).
274
+ * passes its `work/specs/ready-<slug>`).
275
275
  */
276
276
  branch?: string;
277
277
  /**
@@ -279,7 +279,7 @@ export interface IntegrationCoreInput {
279
279
  * freshly-built path — since claim no longer moves the body, a freshly-built
280
280
  * task RESTS in the pool on `main`, task
281
281
  * `cutover-claim-body-stays-and-complete-sources-from-backlog`),
282
- * `tasks-backlog` (the `--allow-backlog` staged-drive path, prd
282
+ * `tasks-backlog` (the `--allow-backlog` staged-drive path, spec
283
283
  * `do-allow-backlog-drive-staged-tasks-without-promotion`: a human drove a
284
284
  * STAGED task in place, so the done-move goes `tasks/backlog/ → tasks/done/`
285
285
  * DIRECTLY — the explicit drive IS the promotion, never bouncing through the
@@ -325,7 +325,7 @@ export interface IntegrationCoreInput {
325
325
  */
326
326
  recovering: boolean;
327
327
  /**
328
- * **RECOVER an already-committed, already-done-moved STRANDED branch** (prd
328
+ * **RECOVER an already-committed, already-done-moved STRANDED branch** (spec
329
329
  * `ledger-integrity` story 6, the `finish-already-committed-branch` task). When
330
330
  * `true`, the work is ALREADY committed on the work branch with the task already
331
331
  * `git mv`'d into `work/done/` (a terminal push failed AFTER steps 2–3, leaving
@@ -564,7 +564,7 @@ export interface IntegrationCoreInput {
564
564
  * `slice-output-through-integration`). When set, the band reads the title from
565
565
  * its {@link IntegrationLifecycle.titlePath}, calls its
566
566
  * {@link IntegrationLifecycle.stage} INSTEAD of the task `git mv → work/done/`,
567
- * and uses the plain rebase ({@link recovering} is irrelevant). The `do prd:`
567
+ * and uses the plain rebase ({@link recovering} is irrelevant). The `do spec:`
568
568
  * TASKING transition supplies it; `do`/`complete`/`run` leave it unset (the
569
569
  * task done-move is unchanged).
570
570
  */
@@ -606,8 +606,8 @@ export interface IntegrationCoreResult {
606
606
  * needs-attention routing can record the findings as the item-body prose. The
607
607
  * tasking path (task `slice-acceptance-gate`) reads this: the core's build
608
608
  * `applyNeedsAttentionTransition` is keyed on a TASK lock, so the tasking path
609
- * routes the prd itself via the lock release's needs-attention redirect (amend the
610
- * `prd:<slug>` unified lock `active -> stuck`, no folder move), using THIS
609
+ * routes the spec itself via the lock release's needs-attention redirect (amend the
610
+ * `spec:<slug>` unified lock `active -> stuck`, no folder move), using THIS
611
611
  * findings text as the body. Absent on every non-`review-blocked` outcome. (The
612
612
  * build path ignores it — its routing already records the findings in-body.)
613
613
  */
@@ -667,7 +667,7 @@ export async function performIntegration(
667
667
  // in the `run` caller, not here.
668
668
  const freshWorktreeGate = input.freshWorktreeGate === true;
669
669
 
670
- // RECOVER an already-committed, already-done-moved STRANDED branch (prd
670
+ // RECOVER an already-committed, already-done-moved STRANDED branch (spec
671
671
  // `ledger-integrity` story 6). The work + the done-move are ALREADY committed on
672
672
  // the work branch (a terminal push failed AFTER steps 2–3); SKIP steps 0–3
673
673
  // (prepare / gate / review / done-move / commit) and run ONLY the
@@ -688,7 +688,7 @@ export async function performIntegration(
688
688
  recoveryRebaseSleep: input.recoveryRebaseSleep,
689
689
  recoveryRebaseRandom: input.recoveryRebaseRandom,
690
690
  // Answered-merge land (task `committed-recovery-honours-fresh-worktree-gate`,
691
- // prd `land-time-reverify-and-parallel-merge-ceiling`): the apply-rung
691
+ // spec `land-time-reverify-and-parallel-merge-ceiling`): the apply-rung
692
692
  // dispatches an answered `merge` through this committed-recovery tail (the
693
693
  // branch already carries its done-move commit, so the build path's
694
694
  // `git mv`+`add -A`+commit would raise `IntegrationNothingStaged`). UNLIKE
@@ -713,7 +713,7 @@ export async function performIntegration(
713
713
  }
714
714
 
715
715
  // The file whose `title:` seeds the commit summary + PR title. For a TASKING
716
- // transition (a non-task `lifecycle`) this is the held prd it supplies; for a
716
+ // transition (a non-task `lifecycle`) this is the held spec it supplies; for a
717
717
  // build it is the task in its source folder. Read BEFORE any move.
718
718
  const lifecycle = input.lifecycle;
719
719
  // CONTINUE-BUILD (`source: 'done'`, task
@@ -869,7 +869,7 @@ export async function performIntegration(
869
869
  }
870
870
  }
871
871
 
872
- // 1b. Gate 2 — the PR/code REVIEW gate (GATES prd `work/prds/tasked/review.md`). It is a
872
+ // 1b. Gate 2 — the PR/code REVIEW gate (GATES spec `work/specs/tasked/review.md`). It is a
873
873
  // JUDGEMENT gate layered ON TOP of the deterministic `verify` floor (ADR §8)
874
874
  // — NEVER a replacement, and ALWAYS verify-THEN-review on the SAME tree.
875
875
  //
@@ -924,10 +924,10 @@ export async function performIntegration(
924
924
  // never be the multi-line commit-subject run-on `--fill` would derive.
925
925
  //
926
926
  // When the lifecycle supplies an EXPLICIT `title`, use it DIRECTLY (no file read):
927
- // the intake lone-task / prd path writes its output file in `stage()`, which runs
927
+ // the intake lone-task / spec path writes its output file in `stage()`, which runs
928
928
  // AFTER this point, so a `titlePath` read would race the write and degrade the
929
- // subject/PR title to the generic fallback. The `do prd:` tasking path leaves
930
- // `title` unset and keeps reading its already-existing held prd (unchanged).
929
+ // subject/PR title to the generic fallback. The `do spec:` tasking path leaves
930
+ // `title` unset and keeps reading its already-existing held spec (unchanged).
931
931
  const explicitTitle = lifecycle?.title;
932
932
  const taskTitle =
933
933
  explicitTitle !== undefined ? explicitTitle : readTaskTitle(sourcePath);
@@ -943,7 +943,7 @@ export async function performIntegration(
943
943
 
944
944
  // 2. STAGE the item move into the index. For a build that is the task done-move
945
945
  // (`work/<source>/<slug>.md → work/done/<slug>.md`); for a TASKING
946
- // transition (a non-task `lifecycle`) it is the caller-supplied prd
946
+ // transition (a non-task `lifecycle`) it is the caller-supplied spec
947
947
  // lifecycle move + emitted backlog files (the runner stages them, the agent
948
948
  // never does git). Either way the subsequent `git add -A` folds the agent's
949
949
  // uncommitted work + this staging into ONE atomic commit.
@@ -1001,7 +1001,7 @@ export async function performIntegration(
1001
1001
  // they are TRACKED, not dropped/untracked. Rule B is extended HERE: the runner REPORTS
1002
1002
  // exactly which note files landed (honest reporting — what actually reached the commit,
1003
1003
  // read from the staged set, not assumed). This is the ONE shared place — BOTH the build
1004
- // path (`do <task>`/`run`/`complete`) and the tasking path (`do prd:`, via the
1004
+ // path (`do <task>`/`run`/`complete`) and the tasking path (`do spec:`, via the
1005
1005
  // `lifecycle` seam) route through it, so the channel is NOT forked. Zero notes ⇒ no
1006
1006
  // report (the no-note case is byte-for-byte unchanged).
1007
1007
  await reportScoopedNotes(cwd, env, note);
@@ -1099,7 +1099,7 @@ export async function performIntegration(
1099
1099
  };
1100
1100
  }
1101
1101
  }
1102
- // PLAIN rebase. After the per-item-lock cut-over (prd
1102
+ // PLAIN rebase. After the per-item-lock cut-over (spec
1103
1103
  // `ledger-status-per-item-lock-refs`, tasks 9a–9d) no transient status
1104
1104
  // lands on a work branch: needs-attention is the lock `state: stuck` (not a
1105
1105
  // `git mv` to `needs-attention/`), the body rests in `backlog/` while
@@ -1580,7 +1580,7 @@ export async function performIntegration(
1580
1580
  }
1581
1581
 
1582
1582
  /**
1583
- * RECOVER an already-committed, already-done-moved STRANDED branch (prd
1583
+ * RECOVER an already-committed, already-done-moved STRANDED branch (spec
1584
1584
  * `ledger-integrity` story 6, the `finish-already-committed-branch` task). The
1585
1585
  * green work AND the `git mv → work/done/` are ALREADY committed on the work
1586
1586
  * branch (a terminal push failed AFTER `performIntegration`'s steps 2–3), and the
@@ -1635,7 +1635,7 @@ async function recoverAlreadyCommitted(params: {
1635
1635
  /**
1636
1636
  * Run the EXISTING `runFreshWorktreeGate` (`prepare` then `verify`) on the
1637
1637
  * rebased tip AFTER the rebase loop and BEFORE `applyCompleteTransition`
1638
- * (task `committed-recovery-honours-fresh-worktree-gate`, prd
1638
+ * (task `committed-recovery-honours-fresh-worktree-gate`, spec
1639
1639
  * `land-time-reverify-and-parallel-merge-ceiling`). The original stranded-
1640
1640
  * recovery caller (`complete --integration`'s already-built strand) leaves
1641
1641
  * this UNSET ⇒ no gate, no extra fetch — byte-identical to before. The
@@ -2322,7 +2322,7 @@ async function stagedCaptureNotes(
2322
2322
  * The DURABLE `work/` status folders a slug's ledger file can resting-live in (the
2323
2323
  * one-slug-one-folder set the invariant is asserted over). After the capstone
2324
2324
  * cut-over (task `cutover-retire-slicing-advancing-markers-and-trim-folder-sets`,
2325
- * prd `ledger-status-per-item-lock-refs`) the ONLY `work/` moves on `main` are the
2325
+ * spec `ledger-status-per-item-lock-refs`) the ONLY `work/` moves on `main` are the
2326
2326
  * durable resting transitions, so the source a build completes FROM is `backlog/`
2327
2327
  * (claim no longer moves the body, task
2328
2328
  * `cutover-claim-body-stays-and-complete-sources-from-backlog`) and the canonical
@@ -2337,7 +2337,7 @@ async function stagedCaptureNotes(
2337
2337
  * The folders {@link readArbiterLedgerPlacement} scans for a slug's source on the
2338
2338
  * arbiter: the durable `LEDGER_STATUS_FOLDERS` (`tasks-ready`/`done`/`cancelled`)
2339
2339
  * PLUS `tasks-backlog` (staging). Staging is included ONLY for the arbiter-side
2340
- * source RESOLUTION of a `--allow-backlog` done-move (prd
2340
+ * source RESOLUTION of a `--allow-backlog` done-move (spec
2341
2341
  * `do-allow-backlog-drive-staged-tasks-without-promotion`) and the one-slug-one-
2342
2342
  * folder guard over the malformed "same slug in `tasks/ready/` AND `tasks/backlog/`"
2343
2343
  * state; it is DELIBERATELY NOT added to the shared `LEDGER_STATUS_FOLDERS` (which
@@ -2384,12 +2384,12 @@ interface ArbiterLedgerPlacement {
2384
2384
  * destination is unambiguous), mirroring the manual `279b542` cleanup.
2385
2385
  *
2386
2386
  * It scans {@link ARBITER_PLACEMENT_FOLDERS} — the durable `LEDGER_STATUS_FOLDERS`
2387
- * PLUS `tasks-backlog`, so a `--allow-backlog` staged drive (prd
2387
+ * PLUS `tasks-backlog`, so a `--allow-backlog` staged drive (spec
2388
2388
  * `do-allow-backlog-drive-staged-tasks-without-promotion`) whose done-move sources
2389
2389
  * from `tasks/backlog/` is DISCOVERED here too (the arbiter is the authority for
2390
2390
  * the actual source folder; the local `source` is the fallback). Including staging
2391
2391
  * also makes the one-slug-one-folder guard cover the malformed "same slug in both
2392
- * `tasks/ready/` and `tasks/backlog/`" state (the prd's decision 5): it FAILS LOUD
2392
+ * `tasks/ready/` and `tasks/backlog/`" state (the spec's decision 5): it FAILS LOUD
2393
2393
  * rather than the resolver silently arbitrating a collision the contract forbids.
2394
2394
  */
2395
2395
  function readArbiterLedgerPlacement(
package/src/isolation.ts CHANGED
@@ -112,10 +112,10 @@ export interface PrepareInput {
112
112
  slug: string;
113
113
  /**
114
114
  * The item TYPE — `'task'` for a build (intake/`do task:`), `'prd'` for a
115
- * prd-tasking run (`do prd:`). It NAMESPACES the work branch via
116
- * {@link workBranchRef} so a same-slug task and prd never collide on the
115
+ * spec-tasking run (`do spec:`). It NAMESPACES the work branch via
116
+ * {@link workBranchRef} so a same-slug task and spec never collide on the
117
117
  * arbiter branch. Defaults to `'task'` (the overwhelmingly-common build
118
- * path); the prd-tasking path passes `'prd'` explicitly.
118
+ * path); the spec-tasking path passes `'prd'` explicitly.
119
119
  */
120
120
  type?: SlugNamespace;
121
121
  /**
@@ -9,7 +9,7 @@ import {brand} from './brand.js';
9
9
 
10
10
  /**
11
11
  * The single provider-native PROCESSING LOCK label (task `intake-processing-lock`,
12
- * prd `issue-intake` US #10): a TRANSIENT concurrency mutex — added on start (the
12
+ * spec `issue-intake` US #10): a TRANSIENT concurrency mutex — added on start (the
13
13
  * winner only), removed on finish — that serialises two concurrent `intake` runs on
14
14
  * the SAME issue. It is namespaced under the brand (`dorfl:processing`) so it
15
15
  * cannot collide with a user's own labels. It carries NO `work/` state — it is NOT a
@@ -19,7 +19,7 @@ import {brand} from './brand.js';
19
19
  export const PROCESSING_LOCK_LABEL = `${brand.base}:processing`;
20
20
 
21
21
  /**
22
- * The **issue seam** (prd `issue-intake`, task `intake-tracer-slice-outcome`):
22
+ * The **issue seam** (spec `issue-intake`, task `intake-tracer-slice-outcome`):
23
23
  * the provider-pluggable surface `intake <N>` reads an issue + its comment thread
24
24
  * through, and posts a clarifying comment back onto. It is the SIBLING of the
25
25
  * review-request `ReviewProvider` (`integrator.ts` / `github.ts`): both name a
@@ -33,7 +33,7 @@ export const PROCESSING_LOCK_LABEL = `${brand.base}:processing`;
33
33
  * `intake-closes-issue-on-bounce`) is the ATOMIC close used on a BOUNCE — a
34
34
  * terminal outcome, so intake closes the issue directly (comment + `not planned`
35
35
  * + close in ONE call). It is ALSO the method CI's future close-job uses for the
36
- * task/prd path; only the BOUNCE close is intake's.
36
+ * task/spec path; only the BOUNCE close is intake's.
37
37
  *
38
38
  * The label ops are a TRANSIENT CONCURRENCY MUTEX carrying NO `work/` state — ONE
39
39
  * lock label, added-on-start / removed-on-finish. They are NOT a label
@@ -295,7 +295,7 @@ export interface IssueProvider {
295
295
  * reason IN THE SAME atomic operation (`gh issue close <N> [--comment <body>]
296
296
  * [--reason "not planned"]`). Used on a BOUNCE (terminal: comment + `not
297
297
  * planned` + close in ONE call — no post-then-close partial-failure window) and,
298
- * later, by CI's task/prd close-job. The RUNNER calls this; the agent stays
298
+ * later, by CI's task/spec close-job. The RUNNER calls this; the agent stays
299
299
  * seam-free. NEVER throws — a missing/unauthenticated `gh` DEGRADES, surfacing
300
300
  * the REAL `gh` stderr via {@link CloseIssueResult.reason} (NOT a hard-coded
301
301
  * guess), so the terminal outcome is unchanged and the cause stays diagnosable.
package/src/item-lock.ts CHANGED
@@ -4,7 +4,7 @@ import {resolveSidecarIdentity, type SidecarType} from './sidecar.js';
4
4
  import {workItemRel} from './work-layout.js';
5
5
 
6
6
  /**
7
- * The **unified item-lock module** (prd `ledger-status-per-item-lock-refs`, ADR
7
+ * The **unified item-lock module** (spec `ledger-status-per-item-lock-refs`, ADR
8
8
  * `ledger-status-on-per-item-lock-refs`). The runner's ONE lock primitive: ONE
9
9
  * lock per item, on a PER-ITEM hidden ref `refs/dorfl/lock/<entry>`,
10
10
  * acquired by an ATOMIC create-only push and released by DELETING the ref, with a
@@ -16,12 +16,12 @@ import {workItemRel} from './work-layout.js';
16
16
  * It GENERALISES the green tracer that proved the dangerous core end-to-end on a
17
17
  * bare `file://` arbiter (the tracer is now this file). The one production
18
18
  * difference from the tracer is the IDENTITY SEAM: callers pass a NAMESPACED item
19
- * identity (`task:<slug>` / `prd:<slug>` / `observation:<slug>` / `obs:<slug>`,
19
+ * identity (`task:<slug>` / `spec:<slug>` / `observation:<slug>` / `obs:<slug>`,
20
20
  * or a bare `<slug>` = task), and this module derives the type-encoded lock
21
21
  * `<entry>` (`<type>-<slug>`) through {@link resolveSidecarIdentity} — the SAME
22
22
  * single source of truth the sidecar (`work/questions/<type>-<slug>.md`) and the
23
23
  * work branch (`work/<type>-<slug>`) already use. There is deliberately NO second
24
- * identity scheme: a task, a prd,
24
+ * identity scheme: a task, a spec,
25
25
  * and an observation that share a slug get DISTINCT lock refs, and the SAME item
26
26
  * under different actions shares ONE ref (so implement / task / advance on one
27
27
  * item are mutually exclusive by construction).
@@ -63,7 +63,7 @@ export const LOCK_REF_PREFIX = 'refs/dorfl/lock';
63
63
  * (`<type>-<slug>`) from a NAMESPACED item identity, through the shared
64
64
  * {@link resolveSidecarIdentity} resolver (the single source of truth, which the
65
65
  * sidecar filename + the advancing-lock marker also key onto). Accepts the same
66
- * forms as that resolver: `task:<slug>` / `prd:<slug>` / `observation:<slug>` /
66
+ * forms as that resolver: `task:<slug>` / `spec:<slug>` / `observation:<slug>` /
67
67
  * `obs:<slug>`, or a bare `<slug>` (= task). Acquire/release/read ALL key
68
68
  * through THIS function, so there is one — and only one — addressing scheme.
69
69
  */
@@ -132,7 +132,7 @@ export interface ReleaseResult {
132
132
 
133
133
  /**
134
134
  * Outcome of an AMEND-style transition (mark-stuck / resume / requeue) — the
135
- * lock-entry STATE MACHINE's interior moves (prd `ledger-status-per-item-lock-refs`,
135
+ * lock-entry STATE MACHINE's interior moves (spec `ledger-status-per-item-lock-refs`,
136
136
  * the C8 lock-entry state machine in the design trail). Each is a single CAS on the
137
137
  * held ref (no retry loop), so the verdict is definitive:
138
138
  * - `transitioned` — we won the CAS; the entry now holds the target `(action, state)`.
@@ -269,7 +269,7 @@ async function gitHardInput(
269
269
  }
270
270
  export interface AcquireOptions {
271
271
  /**
272
- * The NAMESPACED item identity to lock (`task:<slug>` / `prd:<slug>` /
272
+ * The NAMESPACED item identity to lock (`task:<slug>` / `spec:<slug>` /
273
273
  * `observation:<slug>` / `obs:<slug>`, or a bare `<slug>` = task). Resolved to
274
274
  * the type-encoded lock `<entry>` through {@link lockEntryFor}.
275
275
  */
@@ -440,7 +440,7 @@ export interface ReleaseHeldResult {
440
440
  }
441
441
 
442
442
  /**
443
- * GUARDED release for a runner that KNOWS it acquired and HELD the lock (prd
443
+ * GUARDED release for a runner that KNOWS it acquired and HELD the lock (spec
444
444
  * `ledger-status-per-item-lock-refs` US #13): unlike {@link releaseItemLock} —
445
445
  * whose `not-held` is a BENIGN idempotent case the complete/tasking/needs-attention
446
446
  * callers tolerate (the body may predate the lock, or a crash-recovery may have
@@ -866,15 +866,15 @@ export async function readItemLock(
866
866
  * authoritative resting records the cross-substrate reconciliation reads. An
867
867
  * item is TERMINAL on `main` iff ANY of these paths exists on `<arbiter>/main`.
868
868
  * The won't-proceed terminal is PER-REGIME (the slug-collision correctness fix:
869
- * a dropped task and a dropped prd sharing a slug used to collide on one
869
+ * a dropped task and a dropped spec sharing a slug used to collide on one
870
870
  * bare-slug `work/dropped/<slug>.md`):
871
871
  * - a TASK: `work/tasks/done/<slug>.md` (completed) OR
872
872
  * `work/tasks/cancelled/<slug>.md` (the task regime's won't-proceed terminal).
873
- * - a PRD: `work/prds/tasked/<slug>.md` (tasked) OR `work/prds/dropped/<slug>.md`
874
- * (the prd regime's won't-proceed terminal).
873
+ * - a SPEC: `work/specs/tasked/<slug>.md` (tasked) OR `work/specs/dropped/<slug>.md`
874
+ * (the spec regime's won't-proceed terminal).
875
875
  * - an OBSERVATION: NONE. A note has no durable terminal folder — it leaves by
876
876
  * deletion (its absence, not a terminal record, is the end state). A promoted
877
- * observation becomes a NEW task/prd with its own ref.
877
+ * observation becomes a NEW task/spec with its own ref.
878
878
  */
879
879
  export function terminalMainPaths(type: SidecarType, slug: string): string[] {
880
880
  const file = `${slug}.md`;
@@ -895,7 +895,7 @@ export function terminalMainPaths(type: SidecarType, slug: string): string[] {
895
895
  }
896
896
 
897
897
  /** The outcome of a cross-substrate reconciliation of one item's lock against
898
- * the authoritative `main` durable record (prd `ledger-status-per-item-lock-refs`
898
+ * the authoritative `main` durable record (spec `ledger-status-per-item-lock-refs`
899
899
  * US #9/#10; ADR `ledger-status-on-per-item-lock-refs`). */
900
900
  export type ReconcileOutcome =
901
901
  | 'cleared-stale' // `main` is terminal + the lock was `active` (stranded) → cleared
@@ -910,20 +910,20 @@ export interface ReconcileResult {
910
910
  entry: string;
911
911
  ref: string;
912
912
  /** Whether `<arbiter>/main` shows the item terminal (per {@link terminalMainPaths}:
913
- * a task at `tasks/done`/`tasks/cancelled`, a prd at `prds/tasked`/`prds/dropped`). */
913
+ * a task at `tasks/done`/`tasks/cancelled`, a spec at `specs/tasked`/`specs/dropped`). */
914
914
  terminalOnMain: boolean;
915
915
  message: string;
916
916
  }
917
917
 
918
918
  /**
919
919
  * Reconcile ONE item's per-item lock against the AUTHORITATIVE `main` durable
920
- * record — the heart of complete's cross-substrate crash-safety (prd
920
+ * record — the heart of complete's cross-substrate crash-safety (spec
921
921
  * `ledger-status-per-item-lock-refs` US #9/#10; ADR
922
922
  * `ledger-status-on-per-item-lock-refs`; the design trail's Amendment 6).
923
923
  *
924
924
  * complete's order is hold lock → land the DURABLE `main` move FIRST → release
925
925
  * the lock SECOND. A crash BETWEEN the move and the release leaves a
926
- * terminal-on-`main` item (a completed/cancelled task or a tasked/dropped prd,
926
+ * terminal-on-`main` item (a completed/cancelled task or a tasked/dropped spec,
927
927
  * per {@link terminalMainPaths}) with a STILL-HELD lock — a stale lock with no
928
928
  * in-flight work behind it. This is the recovery that converges it.
929
929
  *
@@ -1219,7 +1219,7 @@ export interface LockReportEntry {
1219
1219
  reconcile: ReconcileOutcome;
1220
1220
  }
1221
1221
 
1222
- /** The `gc --ledger` stuck/orphaned-lock REPORT (prd
1222
+ /** The `gc --ledger` stuck/orphaned-lock REPORT (spec
1223
1223
  * `ledger-status-per-item-lock-refs` US #14): every lingering per-item lock on the
1224
1224
  * arbiter, each classified read-only against `main`. An EMPTY list = no locks held
1225
1225
  * (an absent ref namespace reads as `[]`, the recoverable "all locks released"
@@ -1229,7 +1229,7 @@ export interface ItemLockReport {
1229
1229
  }
1230
1230
 
1231
1231
  /**
1232
- * Build the `gc --ledger` stuck/orphaned-lock REPORT (prd
1232
+ * Build the `gc --ledger` stuck/orphaned-lock REPORT (spec
1233
1233
  * `ledger-status-per-item-lock-refs` US #12/#13/#14; ADR
1234
1234
  * `ledger-status-on-per-item-lock-refs`): enumerate every per-item lock currently
1235
1235
  * held on the arbiter ({@link listItemLockEntries} — held active + stuck, with
@@ -1282,7 +1282,7 @@ export async function reportItemLocks(
1282
1282
  */
1283
1283
  /**
1284
1284
  * Does the `gc --ledger` lock report contain a lock that NEEDS HUMAN ATTENTION
1285
- * (prd US#14/#21; ADR `ledger-status-on-per-item-lock-refs`: this surface is the
1285
+ * (spec US#14/#21; ADR `ledger-status-on-per-item-lock-refs`: this surface is the
1286
1286
  * STUCK / crash-orphaned lock, NOT every held one)? TRUE iff some lock is
1287
1287
  * `kept-stuck` (terminal-on-`main` + stuck) or `cleared-stale`-eligible
1288
1288
  * (terminal-on-`main` + a stale active orphan). A `kept-in-flight` (active,
@@ -1391,7 +1391,7 @@ export interface ReapReport {
1391
1391
  }
1392
1392
 
1393
1393
  /**
1394
- * The OPT-IN `gc --ledger --reap-stale-locks` SWEEP (prd
1394
+ * The OPT-IN `gc --ledger --reap-stale-locks` SWEEP (spec
1395
1395
  * `ledger-status-per-item-lock-refs` US #14): a human asserting "clear the dead
1396
1396
  * TERMINAL locks now", so one command sweeps every orphaned terminal lock instead
1397
1397
  * of N hand-run `release-lock`s. It is the WRITE twin of {@link reportItemLocks}
@@ -1631,7 +1631,7 @@ export async function listItemLocks(
1631
1631
 
1632
1632
  /**
1633
1633
  * Read the FULL lock entries currently held on the arbiter — the `status`/`scan`
1634
- * in-flight read path (prd `ledger-status-per-item-lock-refs` US #8; task
1634
+ * in-flight read path (spec `ledger-status-per-item-lock-refs` US #8; task
1635
1635
  * `needs-attention-as-stuck-lock-state`). One fetch of the lock refs, then read
1636
1636
  * each held entry's `lock.md` blob, returning the parsed {@link LockEntry} for
1637
1637
  * every ref (so a caller can surface `active` (in-progress) and `stuck`
@@ -1688,7 +1688,7 @@ export async function listItemLockEntries(
1688
1688
 
1689
1689
  /**
1690
1690
  * List the TASK slugs currently lock-held on the arbiter — the held-slug set the
1691
- * `ready/` pool readers SUBTRACT (prd `ledger-status-per-item-lock-refs` US #15;
1691
+ * `ready/` pool readers SUBTRACT (spec `ledger-status-per-item-lock-refs` US #15;
1692
1692
  * task `claim-acquires-unified-lock-no-body-move`). Enumerates {@link listItemLocks}
1693
1693
  * and keeps only the `task-<slug>` entries (a prd/observation lock does not gate
1694
1694
  * the TASK pool), mapping each to its bare `<slug>`.
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