dorfl 0.1.1 → 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 (313) 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 +76 -76
  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 +20 -20
  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 +14 -13
  80. package/dist/frontmatter.d.ts.map +1 -1
  81. package/dist/frontmatter.js +12 -24
  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/prompt.d.ts +16 -19
  156. package/dist/prompt.d.ts.map +1 -1
  157. package/dist/prompt.js +17 -19
  158. package/dist/prompt.js.map +1 -1
  159. package/dist/readiness.d.ts +1 -1
  160. package/dist/recover-isolated.js +1 -1
  161. package/dist/repo-config.js +12 -12
  162. package/dist/repo-config.js.map +1 -1
  163. package/dist/review-gate.d.ts +3 -3
  164. package/dist/review-gate.d.ts.map +1 -1
  165. package/dist/review-gate.js +11 -10
  166. package/dist/review-gate.js.map +1 -1
  167. package/dist/review-verdict.d.ts +2 -2
  168. package/dist/review-verdict.d.ts.map +1 -1
  169. package/dist/review-verdict.js +1 -1
  170. package/dist/run.d.ts +1 -1
  171. package/dist/run.js +4 -4
  172. package/dist/run.js.map +1 -1
  173. package/dist/scan.d.ts +10 -10
  174. package/dist/scan.d.ts.map +1 -1
  175. package/dist/scan.js +8 -8
  176. package/dist/scan.js.map +1 -1
  177. package/dist/select-order.d.ts +1 -1
  178. package/dist/select-priority.d.ts +12 -12
  179. package/dist/select-priority.d.ts.map +1 -1
  180. package/dist/select-priority.js +5 -5
  181. package/dist/select-priority.js.map +1 -1
  182. package/dist/sidecar.d.ts +2 -2
  183. package/dist/sidecar.js +2 -2
  184. package/dist/sidecar.js.map +1 -1
  185. package/dist/slug-namespace.d.ts +1 -1
  186. package/dist/slug-namespace.js +3 -3
  187. package/dist/slug-namespace.js.map +1 -1
  188. package/dist/spec-complete.js +2 -2
  189. package/dist/spec-complete.js.map +1 -1
  190. package/dist/start.d.ts +1 -1
  191. package/dist/start.js +3 -3
  192. package/dist/start.js.map +1 -1
  193. package/dist/status.d.ts +3 -3
  194. package/dist/status.js +4 -4
  195. package/dist/status.js.map +1 -1
  196. package/dist/surface-gate.d.ts +2 -2
  197. package/dist/surface-gate.d.ts.map +1 -1
  198. package/dist/surface-persist.d.ts +2 -2
  199. package/dist/surface-persist.d.ts.map +1 -1
  200. package/dist/tasker-review-loop.d.ts +8 -8
  201. package/dist/tasker-review-loop.d.ts.map +1 -1
  202. package/dist/tasker-review-loop.js +8 -8
  203. package/dist/tasker-review-loop.js.map +1 -1
  204. package/dist/tasking-eligibility.d.ts +21 -21
  205. package/dist/tasking-eligibility.d.ts.map +1 -1
  206. package/dist/tasking-eligibility.js +10 -10
  207. package/dist/tasking-lock.d.ts +8 -8
  208. package/dist/tasking-lock.d.ts.map +1 -1
  209. package/dist/tasking-lock.js +20 -21
  210. package/dist/tasking-lock.js.map +1 -1
  211. package/dist/tasking.d.ts +33 -33
  212. package/dist/tasking.d.ts.map +1 -1
  213. package/dist/tasking.js +88 -86
  214. package/dist/tasking.js.map +1 -1
  215. package/dist/triage-gate.d.ts +1 -1
  216. package/dist/triage-persist.d.ts +5 -5
  217. package/dist/triage-persist.js +15 -15
  218. package/dist/triage-persist.js.map +1 -1
  219. package/dist/verify-workflow-template.d.ts +1 -1
  220. package/dist/verify-workflow-template.js +2 -2
  221. package/dist/work-layout.d.ts +9 -7
  222. package/dist/work-layout.d.ts.map +1 -1
  223. package/dist/work-layout.js +9 -7
  224. package/dist/work-layout.js.map +1 -1
  225. package/dist/workspace.d.ts +1 -1
  226. package/package.json +1 -1
  227. package/src/advance-ci-template.ts +4 -4
  228. package/src/advance-classify.ts +5 -5
  229. package/src/advance-drivers.ts +10 -10
  230. package/src/advance-isolated.ts +3 -3
  231. package/src/advance-lifecycle-template.ts +9 -9
  232. package/src/advance-loop-driver.ts +3 -3
  233. package/src/advance-treeless-publish.ts +1 -1
  234. package/src/advance.ts +30 -30
  235. package/src/advancing-lock.ts +6 -6
  236. package/src/apply-decide.ts +2 -2
  237. package/src/apply-merge-action.ts +5 -5
  238. package/src/apply-persist.ts +8 -8
  239. package/src/buildable-body.ts +14 -14
  240. package/src/claim-cas.ts +4 -4
  241. package/src/cli.ts +83 -83
  242. package/src/close-job-template.ts +8 -8
  243. package/src/close-job.ts +26 -26
  244. package/src/complete.ts +11 -11
  245. package/src/concurrency.ts +1 -1
  246. package/src/config.ts +37 -37
  247. package/src/continue-branch.ts +1 -1
  248. package/src/cwd-section.ts +1 -1
  249. package/src/decision-engine.ts +3 -3
  250. package/src/do-autopick.ts +9 -9
  251. package/src/do-config.ts +6 -6
  252. package/src/do-remote-auto.ts +2 -2
  253. package/src/do.ts +47 -47
  254. package/src/drop-source.ts +2 -2
  255. package/src/env-config.ts +8 -8
  256. package/src/format.ts +3 -3
  257. package/src/frontmatter.ts +23 -33
  258. package/src/install-ci-branch-protection.ts +1 -1
  259. package/src/install-ci-capabilities/advance-lifecycle.ts +1 -1
  260. package/src/install-ci-capabilities/close-job.ts +1 -1
  261. package/src/install-ci-capabilities/example-noop.ts +1 -1
  262. package/src/install-ci-capabilities/intake.ts +2 -2
  263. package/src/install-ci-capabilities/verify.ts +1 -1
  264. package/src/install-ci-core.ts +4 -4
  265. package/src/install-ci-github.ts +1 -1
  266. package/src/install-ci.ts +4 -4
  267. package/src/intake-event.ts +6 -6
  268. package/src/intake-marker.ts +3 -3
  269. package/src/intake-triage.ts +2 -2
  270. package/src/intake-trigger-template.ts +17 -17
  271. package/src/intake.ts +97 -97
  272. package/src/integration-core.ts +35 -35
  273. package/src/isolation.ts +3 -3
  274. package/src/issue-provider.ts +4 -4
  275. package/src/item-lock.ts +21 -21
  276. package/src/item-path.ts +2 -2
  277. package/src/ledger-lint.ts +9 -9
  278. package/src/ledger-read.ts +81 -81
  279. package/src/ledger-write.ts +3 -3
  280. package/src/lifecycle-gather.ts +16 -16
  281. package/src/lifecycle-pools.ts +4 -4
  282. package/src/merge-question-surfacer.ts +4 -4
  283. package/src/mint-adr.ts +4 -4
  284. package/src/mirror-pool-scan.ts +5 -5
  285. package/src/needs-attention.ts +22 -22
  286. package/src/orphan-sidecar.ts +2 -2
  287. package/src/placement.ts +6 -6
  288. package/src/prompt.ts +20 -25
  289. package/src/readiness.ts +1 -1
  290. package/src/recover-isolated.ts +1 -1
  291. package/src/repo-config.ts +12 -12
  292. package/src/review-gate.ts +12 -11
  293. package/src/review-verdict.ts +2 -2
  294. package/src/run.ts +5 -5
  295. package/src/scan.ts +15 -15
  296. package/src/select-order.ts +1 -1
  297. package/src/select-priority.ts +13 -13
  298. package/src/sidecar.ts +3 -3
  299. package/src/slug-namespace.ts +3 -3
  300. package/src/spec-complete.ts +2 -2
  301. package/src/start.ts +4 -4
  302. package/src/status.ts +7 -7
  303. package/src/surface-gate.ts +2 -2
  304. package/src/surface-persist.ts +2 -2
  305. package/src/tasker-review-loop.ts +15 -15
  306. package/src/tasking-eligibility.ts +21 -21
  307. package/src/tasking-lock.ts +27 -28
  308. package/src/tasking.ts +123 -121
  309. package/src/triage-gate.ts +1 -1
  310. package/src/triage-persist.ts +16 -16
  311. package/src/verify-workflow-template.ts +2 -2
  312. package/src/work-layout.ts +9 -7
  313. package/src/workspace.ts +1 -1
@@ -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);
@@ -89,7 +89,7 @@ export type LedgerTransitionKind =
89
89
  | 'tasking'
90
90
  | 'advancing'
91
91
  /**
92
- * The **promote** transition (prd `staging-pool-position-gate-and-trust-model`,
92
+ * The **promote** transition (spec `staging-pool-position-gate-and-trust-model`,
93
93
  * task `pre-backlog-staging-folder-and-promote-step-a`): move a STAGED task
94
94
  * `work/pre-backlog/<slug>.md → work/backlog/<slug>.md` to enter the
95
95
  * agent-eligible pool. A durable `main` move, the same category as `requeue`
@@ -174,7 +174,7 @@ export type ApplyNeedsAttentionTransitionInput = RouteToNeedsAttentionOptions;
174
174
  * move result the folder-native mechanism produces. The RECOVERABLE branch push
175
175
  * outcome rides on `branchPush` (the caller reads it rather than assuming
176
176
  * "pushed" off the local move). The OBSERVABLE half is now the per-item lock
177
- * `state: stuck` amend (prd `ledger-status-per-item-lock-refs`); there is no
177
+ * `state: stuck` amend (spec `ledger-status-per-item-lock-refs`); there is no
178
178
  * separate on-`main` surface outcome to report.
179
179
  */
180
180
  export type ApplyNeedsAttentionTransitionResult = RouteToNeedsAttentionResult;
@@ -773,7 +773,7 @@ export const currentLedgerWrite: LedgerWriteStrategy = {
773
773
  * The SOLE stuck-state RECORD: amend the item's HELD per-item lock
774
774
  * `active → stuck` + the FULL reason prose + any agent-surfaced questions, via the
775
775
  * state machine's mark-stuck CAS amend ({@link markStuckItemLock}) — task
776
- * `cutover-needs-attention-becomes-lock-stuck-recovery-surface` (decision i+; prd
776
+ * `cutover-needs-attention-becomes-lock-stuck-recovery-surface` (decision i+; spec
777
777
  * `ledger-status-per-item-lock-refs` US #5/#8; ADR
778
778
  * `ledger-status-on-per-item-lock-refs`). This REPLACES the `git mv →
779
779
  * needs-attention/` folder bounce + its on-`main` surface + branch push: the
@@ -65,8 +65,8 @@ function readSidecarInPlace(
65
65
  }
66
66
 
67
67
  /**
68
- * Collect every `needsAnswers:true` task (from `work/backlog`) + prd (from
69
- * `work/prds`) for the in-place repo, through the read seam (the SAME readers the
68
+ * Collect every `needsAnswers:true` task (from `work/backlog`) + spec (from
69
+ * `work/specs`) for the in-place repo, through the read seam (the SAME readers the
70
70
  * build-pool scan uses). These are the SURFACE/APPLY candidates this task draws
71
71
  * into the selection (today they are build/task-INELIGIBLE, so nothing else
72
72
  * surfaces them).
@@ -89,25 +89,25 @@ function blockedItemsInPlace(
89
89
  out.push({namespace: 'spec', slug: spec.slug});
90
90
  }
91
91
  }
92
- // TASKED resting prds (`prds/tasked/`) — enumerated UNCONDITIONALLY (NOT behind
93
- // `surfaceStaging`), because a prd may legitimately carry `needsAnswers:true`
94
- // while resting in `prds/tasked/` (WORK-CONTRACT "A PRD that has drifted AFTER
95
- // it was TASKED"). This is NOT a staging widening: a tasked prd is a durable
92
+ // TASKED resting prds (`specs/tasked/`) — enumerated UNCONDITIONALLY (NOT behind
93
+ // `surfaceStaging`), because a spec may legitimately carry `needsAnswers:true`
94
+ // while resting in `specs/tasked/` (WORK-CONTRACT "A SPEC that has drifted AFTER
95
+ // it was TASKED"). This is NOT a staging widening: a tasked spec is a durable
96
96
  // resting state, like the pool, so it is enumerated like the pool. Routing
97
97
  // still respects the gates in `buildLifecyclePools` (an ANSWERED sidecar -> the
98
98
  // always-on APPLY pool so the human's answer is never STRANDED; a NO-sidecar
99
- // tasked prd -> SURFACE, still gated by `surfaceBlockers`). Without this, a
100
- // tasked prd's answered sidecar is enumerated by no pool and apply never runs
99
+ // tasked spec -> SURFACE, still gated by `surfaceBlockers`). Without this, a
100
+ // tasked spec's answered sidecar is enumerated by no pool and apply never runs
101
101
  // on it (observation `tasked-prd-needsanswers-sidecar-stranded-no-apply-pool`).
102
102
  for (const spec of read.resolveLocalSpecTasked({repoPath})) {
103
103
  if (spec.needsAnswers === true) {
104
104
  out.push({namespace: 'spec', slug: spec.slug});
105
105
  }
106
106
  }
107
- // SURFACE-on-STAGING widening (prd
107
+ // SURFACE-on-STAGING widening (spec
108
108
  // `staging-surface-and-apply-promote-safety` F2): when `surfaceStaging` is
109
109
  // ON, the candidate set ADDITIONALLY enumerates `needsAnswers` items resting
110
- // in STAGING (`tasks/backlog/` + `prds/proposed/`), so a tasked item
110
+ // in STAGING (`tasks/backlog/` + `specs/proposed/`), so a tasked item
111
111
  // surfaces its questions BEFORE the human promotes it. BUILD/claim still
112
112
  // reads POOL-only (`scoreItems` over `state.ready`); only the surface polarity
113
113
  // widens here.
@@ -195,7 +195,7 @@ async function readSidecarMirror(
195
195
  * Gather + build the lifecycle pools for a MIRROR-SIDE bare hub mirror (async).
196
196
  * Reads the SAME logical inputs as {@link gatherLifecycleInPlace} \u2014 observations +
197
197
  * the `needsAnswers` pool from the mirror's committed `main` (via
198
- * `resolveMirrorState`), the prd pool via `resolveMirrorSpecPool`, and each item's
198
+ * `resolveMirrorState`), the spec pool via `resolveMirrorSpecPool`, and each item's
199
199
  * sidecar via `git show` \u2014 then hands them to the SAME shared
200
200
  * {@link buildLifecyclePools}, so the in-place + mirror enumerations AGREE.
201
201
  */
@@ -232,9 +232,9 @@ export async function gatherLifecycleMirror(input: {
232
232
  blocked.push({namespace: 'spec', slug: spec.slug});
233
233
  }
234
234
  }
235
- // TASKED resting prds (`<ref>:work/prds/tasked/`) — enumerated UNCONDITIONALLY,
236
- // the mirror-side counterpart of the in-place tasked-prd enumeration above
237
- // (so a `needsAnswers` tasked prd's answered sidecar is never stranded on the
235
+ // TASKED resting prds (`<ref>:work/specs/tasked/`) — enumerated UNCONDITIONALLY,
236
+ // the mirror-side counterpart of the in-place tasked-spec enumeration above
237
+ // (so a `needsAnswers` tasked spec's answered sidecar is never stranded on the
238
238
  // mirror/CI advance path either). Routing still respects the gates.
239
239
  const specTasked = await read.resolveMirrorSpecTasked({mirrorPath, ref, env});
240
240
  for (const spec of specTasked) {
@@ -242,10 +242,10 @@ export async function gatherLifecycleMirror(input: {
242
242
  blocked.push({namespace: 'spec', slug: spec.slug});
243
243
  }
244
244
  }
245
- // SURFACE-on-STAGING widening (prd
245
+ // SURFACE-on-STAGING widening (spec
246
246
  // `staging-surface-and-apply-promote-safety` F2): mirror-side counterpart of
247
247
  // the in-place widening above — enumerate `needsAnswers` items in
248
- // STAGING (`tasks/backlog/` + `prds/proposed/`) from the bare mirror's
248
+ // STAGING (`tasks/backlog/` + `specs/proposed/`) from the bare mirror's
249
249
  // committed `<ref>` tree, so the in-place + mirror surfaces AGREE. The
250
250
  // staging reads are skipped entirely when the gate is OFF (no extra git
251
251
  // ls-tree work in the legacy mode).
@@ -70,7 +70,7 @@ export interface LifecyclePoolGates {
70
70
  surface?: boolean;
71
71
  /**
72
72
  * Does the SURFACE candidate set widen to include STAGING (`tasks/backlog/` +
73
- * `prds/proposed/`), or stay POOL-ONLY? This field is CONSUMED BY THE
73
+ * `specs/proposed/`), or stay POOL-ONLY? This field is CONSUMED BY THE
74
74
  * GATHER (`lifecycle-gather.ts`), NOT by {@link buildLifecyclePools} — the
75
75
  * builder is pure and only routes already-resolved candidates between surface
76
76
  * / apply by sidecar-answered-state. The gather decides WHICH items become
@@ -112,7 +112,7 @@ export interface NeedsAnswersCandidate {
112
112
  * to the always-on APPLY pool (a CONSUME act — the human's answer is never
113
113
  * stranded), while a NO/PENDING sidecar UNTRIAGED observation stays a TRIAGE
114
114
  * candidate (gated) as today. PURE: the caller resolves the active sidecar (via
115
- * {@link sidecarPathFor} — the SAME resolver the task/prd `needsAnswers`
115
+ * {@link sidecarPathFor} — the SAME resolver the task/spec `needsAnswers`
116
116
  * candidates use); this unit only routes.
117
117
  */
118
118
  export interface ObservationCandidate {
@@ -142,7 +142,7 @@ export interface LifecyclePoolsInput {
142
142
  */
143
143
  observations: ObservationCandidate[];
144
144
  /**
145
- * Every `needsAnswers:true` task/prd (the create-side blocked items), each
145
+ * Every `needsAnswers:true` task/spec (the create-side blocked items), each
146
146
  * with its resolved active sidecar. This unit routes each to SURFACE or APPLY.
147
147
  */
148
148
  needsAnswers: NeedsAnswersCandidate[];
@@ -172,7 +172,7 @@ export interface LifecyclePools {
172
172
  * Build the three lifecycle sub-pools from the raw candidates + the gates, PURE.
173
173
  * Each selected item carries the lifecycle `namespace` discriminator so the
174
174
  * driver's per-item dispatch can map it to the right TICK arg (observation \u2192
175
- * `obs:<slug>`; a blocked task/prd \u2192 `task:`/`prd:<slug>`, which the tick then
175
+ * `obs:<slug>`; a blocked task/spec \u2192 `task:`/`spec:<slug>`, which the tick then
176
176
  * classifies into surface/apply/no-op). This unit decides WHICH sub-pool each item
177
177
  * belongs to (and whether its gate lets it through); the TICK re-classifies and
178
178
  * runs the actual rung (the classifier + rung bodies are unchanged).
@@ -16,7 +16,7 @@ import {
16
16
  import {workItemRel, type WorkFolderKey} from './work-layout.js';
17
17
 
18
18
  /**
19
- * The **MERGE-QUESTION SURFACER** (prd `land-time-reverify-and-parallel-merge-ceiling`,
19
+ * The **MERGE-QUESTION SURFACER** (spec `land-time-reverify-and-parallel-merge-ceiling`,
20
20
  * task `merge-question-surfacer`, US #14) — the SECOND, STATE-sourced surfacer
21
21
  * in the advance loop. It is a clean SIBLING to the existing
22
22
  * `surface-questions` JUDGEMENT surfacer (`surface-gate.ts` +
@@ -41,7 +41,7 @@ import {workItemRel, type WorkFolderKey} from './work-layout.js';
41
41
  * layered on top when a GitHub host is configured; the surfacer functions
42
42
  * identically without it.
43
43
  *
44
- * OUT OF SCOPE for this task (covered by sibling tasks of the same prd):
44
+ * OUT OF SCOPE for this task (covered by sibling tasks of the same spec):
45
45
  *
46
46
  * - The APPLY rung dispatch that lands an answered `kind: merge` through the
47
47
  * land primitive (rebase → re-verify → advance). Task
@@ -185,7 +185,7 @@ const TASK_FOLDERS: readonly WorkFolderKey[] = [
185
185
  * Idempotency: a branch whose sidecar ALREADY carries a PENDING `kind: merge`
186
186
  * entry is SKIPPED (with `already-pending-merge-question`). A branch with no
187
187
  * item body on `main` is SKIPPED (with `no-item-body`) — the cross-cutting
188
- * branch-keyed sidecar identity (PRD sidecar Q5-i) is OOS for this task; an
188
+ * branch-keyed sidecar identity (SPEC sidecar Q5-i) is OOS for this task; an
189
189
  * unmerged-branch-with-no-body lands on the same skip path until that
190
190
  * generalisation arrives.
191
191
  */
@@ -248,7 +248,7 @@ export function surfaceMergeQuestions(
248
248
 
249
249
  const itemPath = findTaskItemPath(cwd, branch.slug);
250
250
  if (itemPath === undefined) {
251
- // The `branch:`/`ref:`-keyed sidecar identity (PRD sidecar Q5-i, the
251
+ // The `branch:`/`ref:`-keyed sidecar identity (SPEC sidecar Q5-i, the
252
252
  // cross-cutting open question SHARED with the stuck-lock surfacer) is
253
253
  // OUT OF SCOPE for this task — without a body to flip `needsAnswers`
254
254
  // on, persist would tear the invariant. Skip with the reason so the
package/src/mint-adr.ts CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  import {resolveSidecarIdentity, sidecarPathFor} from './sidecar.js';
10
10
 
11
11
  /**
12
- * The **ADR-MINT route** (prd
12
+ * The **ADR-MINT route** (spec
13
13
  * `agentic-question-resolution-retire-disposition-vocabulary` US #2, task
14
14
  * `agentic-apply-mint-adr-route`) — the SIBLING of {@link
15
15
  * import('./triage-persist.js').promoteObservation}, for the agentic apply
@@ -17,8 +17,8 @@ import {resolveSidecarIdentity, sidecarPathFor} from './sidecar.js';
17
17
  *
18
18
  * Why a SIBLING and not an `adr` artifact type on `promoteObservation`
19
19
  * (recorded `## Decisions`): `promoteObservation` is `work/`-folder-SHAPED — it
20
- * targets `work/tasks/ready` / `work/prds/proposed` via `workItemRel`, and builds
21
- * a task/prd body (a `## What to build` / `## Problem Statement` lead + an
20
+ * targets `work/tasks/ready` / `work/specs/proposed` via `workItemRel`, and builds
21
+ * a task/spec body (a `## What to build` / `## Problem Statement` lead + an
22
22
  * `## Open questions` block, with `needsAnswers` carried). An ADR is DIFFERENT in
23
23
  * EVERY one of those: it lives in `docs/adr/` (OUTSIDE the work board, so the
24
24
  * `work/`-layout path builder does not fit), it carries NO `needsAnswers`/open-
@@ -331,7 +331,7 @@ function renderAdrFile(slug: string, title: string, body: string): string {
331
331
  * The observation's mechanism PROSE: everything before its first
332
332
  * `## Open questions` heading, with the frontmatter fence dropped. An ADR records
333
333
  * a SETTLED decision, so an observation's open-questions scoping is deliberately
334
- * NOT carried into the ADR body (unlike a promoted task/prd, which keeps the
334
+ * NOT carried into the ADR body (unlike a promoted task/spec, which keeps the
335
335
  * open questions live) — the answered question(s) ARE the decision.
336
336
  */
337
337
  function mechanismOf(observation: string): string {
@@ -24,7 +24,7 @@ import {heldTaskSlugs} from './item-lock.js';
24
24
  * SAME two pools (eligible TASKS + taskable PRDS) but reads a BARE hub mirror's
25
25
  * committed `main` ref (`git ls-tree`/`git show`), NOT a working checkout.
26
26
  *
27
- * This is the ONE reusable enumeration unit the prd's FOLD-IN note demands: BOTH
27
+ * This is the ONE reusable enumeration unit the spec's FOLD-IN note demands: BOTH
28
28
  * the `run` loop driver's isolated+parallel auto-pick AND the one-shot/CI
29
29
  * `advance --remote -n` / the CI matrix consume it, so the `-n`/auto-pick rungs
30
30
  * (both `do` and `advance`, both `run`-loop and one-shot) all call the SAME scan.
@@ -44,7 +44,7 @@ import {heldTaskSlugs} from './item-lock.js';
44
44
  * `scanRepoPaths`/registry `scan` use) over the mirror's `work/backlog` +
45
45
  * `work/done` read via {@link LedgerReadStrategy.resolveMirrorState}.
46
46
  * - **taskable prds** — {@link taskableSpecs} (`autoslice-gate`'s predicate)
47
- * over the mirror's `work/prds/ready` + `work/prds/tasked` read via the mirror-ref
47
+ * over the mirror's `work/specs/ready` + `work/specs/tasked` read via the mirror-ref
48
48
  * {@link LedgerReadStrategy.resolveMirrorSpecPool}.
49
49
  *
50
50
  * Per-repo policy parity: a bare mirror has no checked-out `.dorfl.json`,
@@ -170,7 +170,7 @@ export async function scanMirrorPool(
170
170
  // scored through the EXACT same `scoreItems` the in-place/registry scans use.
171
171
  const state = await read.resolveMirrorState({mirrorPath, ref, env});
172
172
  const counts = {totalItems: 0, totalEligible: 0};
173
- // HELD-SLUG SUBTRACTION (prd `ledger-status-per-item-lock-refs` US #15): a bare
173
+ // HELD-SLUG SUBTRACTION (spec `ledger-status-per-item-lock-refs` US #15): a bare
174
174
  // hub mirror's arbiter is its `origin`; read the held lock refs from there and
175
175
  // exclude those slugs from the enumerated `backlog/` pool. Non-fatal (empty set
176
176
  // on any fault) and redundant-but-harmless while the body still moves — wired now
@@ -179,7 +179,7 @@ export async function scanMirrorPool(
179
179
  // its own lock-ref fetch.
180
180
  const heldSlugs = await heldTaskSlugs(mirrorPath, 'origin', env);
181
181
  const items = scoreItems(state, repoConfig.autoBuild, counts, heldSlugs);
182
- // Pool 2 — TASKABLE PRDS from the bare mirror's `work/prds/ready`+`work/prds/tasked`,
182
+ // Pool 2 — TASKABLE PRDS from the bare mirror's `work/specs/ready`+`work/specs/tasked`,
183
183
  // filtered through `autoslice-gate`'s predicate (NOT reinvented). Read FIRST so
184
184
  // we can populate the `specs[]` companion of `items[]` on the RepoReport below.
185
185
  const pool = await read.resolveMirrorSpecPool({mirrorPath, ref, env});
@@ -195,7 +195,7 @@ export async function scanMirrorPool(
195
195
  autoTask: repoConfig.autoTask,
196
196
  });
197
197
  // The one-slug-one-folder LINT is a HUMAN-FACING surface (`scan`/`status`); this
198
- // mirror-side pool scan exists only to SCORE the task/prd candidate pools for
198
+ // mirror-side pool scan exists only to SCORE the task/spec candidate pools for
199
199
  // autonomous selection, never to render a dashboard, so it carries an empty lint
200
200
  // (the duplicate surface is the user-facing `scan`/`status`, per the task). The
201
201
  // `specs[]` companion of `items[]` is filled via the SAME `scoreSpecs` helper