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
@@ -26,7 +26,7 @@ import type {
26
26
  } from './run.js';
27
27
 
28
28
  /**
29
- * The **`advance` LOOP DRIVER** (prd `advance-loop`, task
29
+ * The **`advance` LOOP DRIVER** (spec `advance-loop`, task
30
30
  * `advance-drivers-and-gates`, US #7/22/26/31) — the second of the two drivers
31
31
  * over the substrate-agnostic advance TICK. Where the one-shot driver
32
32
  * (`advance-drivers.ts`) runs the tick over named item(s) SEQUENTIALLY, this
@@ -113,7 +113,7 @@ export interface AdvanceOnceOptions {
113
113
 
114
114
  /** One advanced item's result + the identity it was for (input order preserved). */
115
115
  export interface AdvanceBatchItem {
116
- /** The namespaced arg the tick was run on (`prd:<slug>` / bare slug). */
116
+ /** The namespaced arg the tick was run on (`spec:<slug>` / bare slug). */
117
117
  arg: string;
118
118
  /** The tick's result, or a captured throw mapped to a usage-error result. */
119
119
  result: AdvanceResult;
@@ -549,7 +549,7 @@ export interface AdvanceRunTickDeps extends Omit<
549
549
  * Adapt the {@link advanceOnce} LOOP DRIVER to the {@link RunTick} swap SEAM so
550
550
  * `run` (≡ CI, US #7) drives the ADVANCE tick over the mirror-side eligible pool
551
551
  * instead of the build tick. `run.ts` deliberately writes {@link runLoop} against
552
- * {@link RunTick} (NOT against `runOnce`) precisely so the advance-loop prd can
552
+ * {@link RunTick} (NOT against `runOnce`) precisely so the advance-loop spec can
553
553
  * swap the tick WITHOUT re-architecting the loop — this is that swap.
554
554
  *
555
555
  * The seam is `(RunOnceOptions) => Promise<RunOnceResult>`; one advance batch is
@@ -34,7 +34,7 @@ import {runAsync} from './git.js';
34
34
  *
35
35
  * **C2 rebase-until-real-conflict (task `c2-rebase-until-real-on-durable-main-
36
36
  * promotions`).** This same `HEAD:main` push carries the won't-proceed terminal
37
- * `tasks/ready → tasks/cancelled` / `prds/ready → prds/dropped` (slug-RELOCATION
37
+ * `tasks/ready → tasks/cancelled` / `specs/ready → specs/dropped` (slug-RELOCATION
38
38
  * family) when `apply-persist.ts` resolves a `dropped` disposition; under sustained
39
39
  * parallel load on the shared `main` ref two DIFFERENT items' concurrent promotions
40
40
  * can falsely-contend even though nothing tree-conflicts, exhausting a small fixed
package/src/advance.ts CHANGED
@@ -70,9 +70,9 @@ import type {VerifyConfig} from './verify.js';
70
70
  import type {NewQuestion} from './sidecar.js';
71
71
 
72
72
  /**
73
- * The **`advance` verb SKELETON** (prd `advance-loop`, task
73
+ * The **`advance` verb SKELETON** (spec `advance-loop`, task
74
74
  * `advance-verb-resolver`, US #1/5/6/18). `advance` is the SIBLING top-level verb
75
- * (NOT a `do` subcommand — `do` subcommands are REJECTED in the prd) that drives
75
+ * (NOT a `do` subcommand — `do` subcommands are REJECTED in the spec) that drives
76
76
  * a `work/` item ONE lifecycle rung toward "ready/built", reusing the SAME shared
77
77
  * `prefix:arg` resolver `do` uses (extended with the `obs:` namespace, see
78
78
  * {@link resolveAdvanceArg}).
@@ -96,7 +96,7 @@ import type {NewQuestion} from './sidecar.js';
96
96
  * (`advance-rung-surface`), `apply` (`advance-rung-apply`), and
97
97
  * `triage-observation` (`advance-rung-triage`) dispatch through the clearly-named
98
98
  * executor SEAM ({@link RungExecutor}); the build/task rungs ORCHESTRATE
99
- * `do`/`do prd:`. What this verb does NOT do (LATER tasks):
99
+ * `do`/`do spec:`. What this verb does NOT do (LATER tasks):
100
100
  * - The two **DRIVERS** (one-shot sequential / loop) + `-n` + the gate-FAMILY
101
101
  * WIRING that resolves `autoBuild`/`autoTask`/`observationTriage` and threads
102
102
  * them into the build/task gate composition — task `advance-drivers-and-gates`.
@@ -144,7 +144,7 @@ export type AdvanceExitCode = 0 | 1 | 2 | 3;
144
144
  * The injectable rung-executor SEAM — WHAT happens once the tick has classified a
145
145
  * rung AND won the `advancing` lock. It is the boundary between the skeleton (this
146
146
  * task) and the rung bodies (later tasks): the surface/apply/triage rungs are
147
- * filled by their own tasks; the build/task rungs ORCHESTRATE `do`/`do prd:`.
147
+ * filled by their own tasks; the build/task rungs ORCHESTRATE `do`/`do spec:`.
148
148
  *
149
149
  * Production wires {@link defaultRungExecutor}; tests inject a spy to assert the
150
150
  * classify→lock→dispatch ORDER (and that a CAS loser never reaches the executor).
@@ -164,7 +164,7 @@ export interface RungExecutor {
164
164
 
165
165
  /** What a rung executor is handed: the resolved identity + the run context. */
166
166
  export interface RungExecInput {
167
- /** The canonical namespaced identity (`task:<slug>` / `prd:<slug>` / `observation:<slug>`). */
167
+ /** The canonical namespaced identity (`task:<slug>` / `spec:<slug>` / `observation:<slug>`). */
168
168
  item: string;
169
169
  /** The resolved namespace (`task` / `prd` / `observation`). */
170
170
  namespace: SlugNamespace;
@@ -172,7 +172,7 @@ export interface RungExecInput {
172
172
  slug: string;
173
173
  /** The classification that selected this rung (the two signals are visible). */
174
174
  classification: TickClassification;
175
- /** The tick's run context (cwd, arbiter, …) — threaded to `do`/`do prd:`. */
175
+ /** The tick's run context (cwd, arbiter, …) — threaded to `do`/`do spec:`. */
176
176
  context: AdvanceContext;
177
177
  }
178
178
 
@@ -250,14 +250,14 @@ export interface AdvanceContext {
250
250
  * The AGENTIC apply DECISION seam (task
251
251
  * `agentic-apply-retire-disposition-vocabulary`): the fresh-context decision
252
252
  * agent the apply rung runs on a fully-answered OBSERVATION to choose what to DO
253
- * with the signal (`mint-task | mint-prd | mint-adr | delete-source |
253
+ * with the signal (`mint-task | mint-spec | mint-adr | delete-source |
254
254
  * ask-follow-up`),
255
255
  * grounded in the source's full context. It is the injected
256
256
  * {@link ApplyDecider} the shared `decide(input, allowedOutcomes)` engine runs;
257
257
  * tests inject a CANNED verdict (no model). `undefined` ⇒ the apply rung defaults
258
258
  * to {@link harnessApplyDecider} (a NullHarness, no real model) so the seam is
259
259
  * never a crash — but the CLI threads the real harness-backed decider. The
260
- * verdict's type SELECTION (task vs prd vs adr) replaces the retired `promote-*`
260
+ * verdict's type SELECTION (task vs spec vs adr) replaces the retired `promote-*`
261
261
  * disposition token; `adr` is now WIRED (task `agentic-apply-mint-adr-route`).
262
262
  */
263
263
  applyDecide?: ApplyDecider;
@@ -325,7 +325,7 @@ export interface AdvanceContext {
325
325
  * to the dispatcher, so an answered `kind: merge` entry is REFUSED (clean
326
326
  * surfacing); the answer stays for a follow-up. The registry-set advance
327
327
  * driver threads the resolved `workspacesDir` here.
328
- * (prd `land-time-reverify-and-parallel-merge-ceiling`, task
328
+ * (spec `land-time-reverify-and-parallel-merge-ceiling`, task
329
329
  * `apply-rung-merge-disposition`)
330
330
  */
331
331
  workspacesDir?: string;
@@ -353,7 +353,7 @@ export interface AdvanceContext {
353
353
  /**
354
354
  * Resolved `strictMergeApproval` boolean (sibling task
355
355
  * `strict-merge-approval-gate`). Default OFF ⇒ honour the prior approval +
356
- * land on a green re-verify (cheap, the PRD-applied OQ6 default). ON ⇒
356
+ * land on a green re-verify (cheap, the SPEC-applied OQ6 default). ON ⇒
357
357
  * re-surface the merge-question when the merge-base moved between the
358
358
  * surfacer's question and this apply (the host-agnostic analogue of
359
359
  * GitHub's "dismiss stale approvals when the base changes").
@@ -377,7 +377,7 @@ export interface AdvanceContext {
377
377
  /** The options one `advance` tick consumes. */
378
378
  export interface AdvanceOptions extends AdvanceContext {
379
379
  /**
380
- * The raw CLI slug argument: bare (= task), `task:<slug>`, `prd:<slug>`, or
380
+ * The raw CLI slug argument: bare (= task), `task:<slug>`, `spec:<slug>`, or
381
381
  * `obs:<slug>` / `observation:<slug>`. Omit/empty ⇒ the bare eligible-SET form,
382
382
  * which needs the driver task (a clear error here — see `## Decisions`).
383
383
  */
@@ -420,7 +420,7 @@ export interface ItemSignals {
420
420
  export interface ReadSignalsInput {
421
421
  /** The repo working-tree root. */
422
422
  repoPath: string;
423
- /** The item type (task / prd / observation). */
423
+ /** The item type (task / spec / observation). */
424
424
  type: SidecarType;
425
425
  /** The bare slug. */
426
426
  slug: string;
@@ -469,14 +469,14 @@ export function readItemSignals(input: ReadSignalsInput): ItemSignals {
469
469
  * The lifecycle folders each item type may rest in (frontmatter source). After
470
470
  * the capstone cut-over (task
471
471
  * `cutover-retire-slicing-advancing-markers-and-trim-folder-sets`) the transient
472
- * `tasking/` folder is GONE — a prd rests in `prds/ready` (source) or
473
- * `prds/tasked` (tasked); while it is being tasked the body STAYS in
474
- * `prds/ready` (the lock no longer moves it), so `tasking/` is never a
472
+ * `tasking/` folder is GONE — a spec rests in `specs/ready` (source) or
473
+ * `specs/tasked` (tasked); while it is being tasked the body STAYS in
474
+ * `specs/ready` (the lock no longer moves it), so `tasking/` is never a
475
475
  * frontmatter source.
476
476
  *
477
477
  * STAGING IS INCLUDED (`tasks-backlog` / `prds-proposed`): with `surfaceStaging`
478
478
  * on (the user-visible default) the lifecycle surface pool enumerates
479
- * `needsAnswers` items resting in STAGING as `task:`/`prd:` legs
479
+ * `needsAnswers` items resting in STAGING as `task:`/`spec:` legs
480
480
  * (`lifecycle-gather.ts`). The rung CLASSIFIER's signal read MUST see those
481
481
  * staged bodies, or `needsAnswers` reads back `undefined`, the classifier
482
482
  * mis-routes the item to the BUILD rung, and claim dies with "not found on
@@ -512,11 +512,11 @@ function readNeedsAnswers(
512
512
 
513
513
  /**
514
514
  * The PRODUCTION rung executor: build/task rungs ORCHESTRATE the existing
515
- * `do`/`do prd:` machinery ({@link performDo}); the `surface`/`apply`/
515
+ * `do`/`do spec:` machinery ({@link performDo}); the `surface`/`apply`/
516
516
  * `triage-observation` rung bodies are filled by their own tasks
517
517
  * ({@link surfaceRung} / {@link applyRung} / {@link triageRung}). It NEVER
518
518
  * re-implements the build/task path — it hands the resolved arg to `performDo`,
519
- * which spans both namespaces (the task path is the `do prd:` rung the prd's
519
+ * which spans both namespaces (the task path is the `do spec:` rung the spec's
520
520
  * 2026-06-09 UPDATE confirms routes through `performIntegration`).
521
521
  */
522
522
  export const defaultRungExecutor: RungExecutor = {
@@ -807,7 +807,7 @@ async function triageRung(input: RungExecInput): Promise<RungExecResult> {
807
807
  * apply rung is now AGENT-DRIVEN: it runs the shared `decide(input, allowedOutcomes)`
808
808
  * engine ({@link decide}) over `(the answered question(s) + the SOURCE item + its
809
809
  * type/context)` via the injected {@link ApplyDecider}, allowing the set
810
- * `{task | prd | adr | delete | ask}` (= `{mint-task | mint-prd | mint-adr |
810
+ * `{task | prd | adr | delete | ask}` (= `{mint-task | mint-spec | mint-adr |
811
811
  * delete-source | ask-follow-up}`; `adr` is now WIRED by task
812
812
  * `agentic-apply-mint-adr-route`, which added the {@link mintAdr} route). The
813
813
  * verdict ROUTES:
@@ -823,9 +823,9 @@ async function triageRung(input: RungExecInput): Promise<RungExecResult> {
823
823
  * - `delete` → {@link applyAnsweredQuestions} discharge-by-deletion (`git rm`
824
824
  * source + sidecar in one revertible commit, the reason in the commit message).
825
825
  *
826
- * For a TASK/PRD (answering its OWN open questions) or a caller-supplied follow-up
826
+ * For a TASK/SPEC (answering its OWN open questions) or a caller-supplied follow-up
827
827
  * batch, it delegates straight to {@link applyAnsweredQuestions} (resolve fully /
828
- * re-pause) — the lifecycle path is untouched (a task/prd is dropped by its own
828
+ * re-pause) — the lifecycle path is untouched (a task/spec is dropped by its own
829
829
  * lifecycle, not by a question answer).
830
830
  *
831
831
  * Under the `advancing` CAS lock (held by {@link performAdvance} BEFORE this runs
@@ -844,7 +844,7 @@ async function applyRung(input: RungExecInput): Promise<RungExecResult> {
844
844
  return vanishedSkip({rung: 'apply', item});
845
845
  }
846
846
 
847
- // RUNNER-ACTION KIND-CHECK (task `apply-rung-merge-disposition`, prd
847
+ // RUNNER-ACTION KIND-CHECK (task `apply-rung-merge-disposition`, spec
848
848
  // `land-time-reverify-and-parallel-merge-ceiling`): an answered `kind: merge`
849
849
  // sidecar entry is a DETERMINISTIC land action, NOT a content decision. It
850
850
  // dispatches HERE (a sibling of the agentic `decide()`), keyed off the
@@ -862,7 +862,7 @@ async function applyRung(input: RungExecInput): Promise<RungExecResult> {
862
862
  // AGENTIC APPLY for an answered OBSERVATION (the subsumed triage rung): run the
863
863
  // shared decision engine over the answer(s) + source, route the verdict. A
864
864
  // caller-supplied follow-up batch (`applyFollowups`) bypasses the decision and
865
- // re-pauses directly (a test/driver hook). TASK/PRD items resolve in place
865
+ // re-pauses directly (a test/driver hook). TASK/SPEC items resolve in place
866
866
  // (their own lifecycle), so they skip the decision and fall through to the
867
867
  // persist below.
868
868
  const runAgenticDecision =
@@ -910,7 +910,7 @@ async function applyRung(input: RungExecInput): Promise<RungExecResult> {
910
910
  * the merge-question surfacer) through the EXISTING land primitive
911
911
  * (`performIntegration` with `committedRecovery: true` + `freshWorktreeGate:
912
912
  * true`) via the EXISTING per-job worktree seam (`workspace.ts` `createJob`).
913
- * The deterministic SIBLING of the agentic `decide()` content-decision (PRD
913
+ * The deterministic SIBLING of the agentic `decide()` content-decision (SPEC
914
914
  * `land-time-reverify-and-parallel-merge-ceiling`, task
915
915
  * `apply-rung-merge-disposition`; Stories #15, #16): a merge-acceptance has no
916
916
  * judgement content (the human's plain `merge | hold | drop` answer IS the
@@ -919,7 +919,7 @@ async function applyRung(input: RungExecInput): Promise<RungExecResult> {
919
919
  *
920
920
  * Returns `undefined` when there is no answered `kind: merge` entry to dispatch
921
921
  * (the apply rung then proceeds to the existing path — agentic for
922
- * observations, normal `applyAnsweredQuestions` for task/prd content questions).
922
+ * observations, normal `applyAnsweredQuestions` for task/spec content questions).
923
923
  * Returns a {@link RungExecResult} when the dispatcher handled the rung:
924
924
  *
925
925
  * - `landed` / `already-integrated` ⇒ the kept commit landed on `main` (or
@@ -1113,7 +1113,7 @@ function findItemPath(
1113
1113
  * The AGENTIC apply DECISION for a fully-answered OBSERVATION (task
1114
1114
  * `agentic-apply-retire-disposition-vocabulary`): run the shared
1115
1115
  * `decide(input, allowedOutcomes)` engine over the answer(s) + source, then ROUTE
1116
- * the verdict. The artifact-type selection (task vs prd) comes from the agent's
1116
+ * the verdict. The artifact-type selection (task vs spec) comes from the agent's
1117
1117
  * VERDICT, NOT a human `promote-*` field (which is retired). Replaces the old
1118
1118
  * `answeredPromoteArtifact` + disposition picker.
1119
1119
  *
@@ -1353,13 +1353,13 @@ export async function performAdvance(
1353
1353
  const message =
1354
1354
  '`advance` with no item is the eligible-SET form (the one-shot driver). ' +
1355
1355
  'The single-item tick needs a named item: ' +
1356
- '`advance <slug>` / `advance prd:<slug>` / `advance obs:<slug>`.';
1356
+ '`advance <slug>` / `advance spec:<slug>` / `advance obs:<slug>`.';
1357
1357
  note(message);
1358
1358
  return {exitCode: 1, outcome: 'usage-error', message};
1359
1359
  }
1360
1360
 
1361
1361
  // 1. RESOLVE the arg via the SHARED resolver (extended with `obs:`). `advance`
1362
- // spans task / prd / observation; a collision / bad arg is a loud usage error.
1362
+ // spans task / spec / observation; a collision / bad arg is a loud usage error.
1363
1363
  let resolved;
1364
1364
  try {
1365
1365
  resolved = resolveAdvanceArg({
@@ -1419,7 +1419,7 @@ export async function performAdvance(
1419
1419
  // 3. LOCK — take the `advancing` CAS borrow for the classified rung, keyed on
1420
1420
  // the item's `<type>-<slug>` identity. The expensive phase is POST-lock.
1421
1421
  //
1422
- // UNIFIED PER-ITEM LOCK, TREE-LESS RUNGS ONLY (prd
1422
+ // UNIFIED PER-ITEM LOCK, TREE-LESS RUNGS ONLY (spec
1423
1423
  // `ledger-status-per-item-lock-refs` US #1/#3/#18; ADR
1424
1424
  // `ledger-status-on-per-item-lock-refs`). The rung kind is KNOWN here
1425
1425
  // (`classification.kind`, classified pre-lock), so the tree-less-only policy
@@ -1428,7 +1428,7 @@ export async function performAdvance(
1428
1428
  // TREE-LESS rung (`surface`/`apply`/`triage-observation`) the advancing acquire
1429
1429
  // ALSO takes the item's unified lock (`action: advance`) — these rungs have NO
1430
1430
  // inner `do`, so the unified hold is what realises advance∥claim / advance∥task
1431
- // exclusion. For a BUILD-TASK / TASK-PRD rung we do NOT take the unified lock
1431
+ // exclusion. For a BUILD-TASK / TASK-SPEC rung we do NOT take the unified lock
1432
1432
  // at the advance layer: `performAdvance` ORCHESTRATES an inner `performDo` that
1433
1433
  // ITSELF acquires the SAME `task-<slug>`/`prd-<slug>` ref (the create-only CAS
1434
1434
  // with NO re-entrancy/auto-steal, per the ADR), so taking it here too would
@@ -7,11 +7,11 @@ import {acquireItemLock, releaseItemLock} from './item-lock.js';
7
7
  import {realSleep, type Sleep} from './retry-backoff.js';
8
8
 
9
9
  /**
10
- * The **advancing-lock BORROW** (prd `advance-loop`, task
10
+ * The **advancing-lock BORROW** (spec `advance-loop`, task
11
11
  * `advancing-lock-borrow`, US #19–24).
12
12
  *
13
13
  * The surface/apply/triage phase's SHORT borrow. As of the capstone cut-over
14
- * (task `cutover-retire-slicing-advancing-markers-and-trim-folder-sets`, prd
14
+ * (task `cutover-retire-slicing-advancing-markers-and-trim-folder-sets`, spec
15
15
  * `ledger-status-per-item-lock-refs`; ADR `ledger-status-on-per-item-lock-refs`)
16
16
  * the legacy `work/advancing/<entry>.md` presence-MARKER on `main` is GONE. The
17
17
  * advancing borrow now rides ONLY the UNIFIED per-item lock
@@ -21,7 +21,7 @@ import {realSleep, type Sleep} from './retry-backoff.js';
21
21
  *
22
22
  * The borrow is keyed by item IDENTITY (`<type>-<slug>`, via
23
23
  * {@link resolveSidecarIdentity} — the single source of truth the unified lock,
24
- * the sidecar, and the work branch all share), so a task, a prd, and an
24
+ * the sidecar, and the work branch all share), so a task, a spec, and an
25
25
  * observation that share a slug NEVER collide, and the SAME `<entry>` ref means an
26
26
  * `advance` hold is MUTUALLY EXCLUSIVE with a claim/task hold of the SAME item BY
27
27
  * CONSTRUCTION (the second acquirer loses the SAME create-only ref CAS).
@@ -29,7 +29,7 @@ import {realSleep, type Sleep} from './retry-backoff.js';
29
29
  * It is file-ORTHOGONAL to the item it locks: the item's own lifecycle file NEVER
30
30
  * moves (the borrow is a LOCK, not a lifecycle transition), which is exactly why
31
31
  * it can lock items resting in DIFFERENT source folders (a backlog task, a `prds/`
32
- * prd, an `observations/` note) with one uniform mechanism.
32
+ * spec, an `observations/` note) with one uniform mechanism.
33
33
  *
34
34
  * **TREE-LESS vs BUILD/TASK RUNGS (`acquireUnified`).** The advance tick sets
35
35
  * `acquireUnified` PER RUNG (the policy lives in `advance.ts`, where the rung is
@@ -40,7 +40,7 @@ import {realSleep, type Sleep} from './retry-backoff.js';
40
40
  * IS the advance∥claim / advance∥task exclusion. Acquire/release delegate to
41
41
  * {@link acquireItemLock} / {@link releaseItemLock} (a parentless ref CAS, no
42
42
  * working-tree write, no retry budget).
43
- * - **BUILD-TASK / TASK-PRD rungs** never take the unified lock at the advance
43
+ * - **BUILD-TASK / TASK-SPEC rungs** never take the unified lock at the advance
44
44
  * layer (`acquireUnified` false): `performAdvance` orchestrates an inner
45
45
  * `performDo` that ITSELF acquires the SAME `task-<slug>`/`prd-<slug>` ref
46
46
  * (the create-only CAS with NO re-entrancy/auto-steal), so taking it again here
@@ -81,7 +81,7 @@ export type AcquireAdvancingLockExitCode = 0 | 1 | 2 | 3;
81
81
 
82
82
  export interface AcquireAdvancingLockOptions {
83
83
  /**
84
- * The NAMESPACED item identity to lock (`task:<slug>` / `prd:<slug>` /
84
+ * The NAMESPACED item identity to lock (`task:<slug>` / `spec:<slug>` /
85
85
  * `obs:<slug>` / `observation:<slug>`, or a bare `<slug>` = task). The
86
86
  * resolver derives the type-encoded entry `<type>-<slug>` from it.
87
87
  */
@@ -11,7 +11,7 @@ import {
11
11
  } from './decision-engine.js';
12
12
 
13
13
  /**
14
- * The **AGENTIC apply DECIDER** (prd
14
+ * The **AGENTIC apply DECIDER** (spec
15
15
  * `agentic-question-resolution-retire-disposition-vocabulary` US #1/#2/#3, task
16
16
  * `agentic-apply-retire-disposition-vocabulary`) — the input-ADAPTER + prompt +
17
17
  * production decider for the apply rung's call into the SHARED
@@ -35,7 +35,7 @@ import {
35
35
  * `agentic-apply-mint-adr-route`, which added the {@link
36
36
  * import('./mint-adr.js').mintAdr} route and widened this set. Intake's set is
37
37
  * UNCHANGED (`{task | spec | ask | bounce}`) \u2014 the engine stays outcome-AGNOSTIC
38
- * (PRD decision 14), so widening this caller's subset does NOT touch intake or the
38
+ * (SPEC decision 14), so widening this caller's subset does NOT touch intake or the
39
39
  * engine's superset union.
40
40
  *
41
41
  * The INPUT adapter ({@link buildApplyDecisionInput}) sits HERE in the caller, not
@@ -17,7 +17,7 @@ import {
17
17
  import type {VerifyConfig} from './verify.js';
18
18
 
19
19
  /**
20
- * The **answered MERGE-QUESTION ACTION DISPATCH** (prd
20
+ * The **answered MERGE-QUESTION ACTION DISPATCH** (spec
21
21
  * `land-time-reverify-and-parallel-merge-ceiling`, task
22
22
  * `apply-rung-merge-disposition`; Stories #15, #16) — the deterministic,
23
23
  * answer-driven RUNNER-ACTION layer that turns an answered
@@ -29,7 +29,7 @@ import type {VerifyConfig} from './verify.js';
29
29
  * `apply-decide.ts`, NOT a route through it: a merge-acceptance has no
30
30
  * judgement content (the human's plain `merge | hold | drop` answer IS the
31
31
  * decision; the apply-time fresh-worktree re-verify on the rebased tip is the
32
- * real correctness gate). Per the PRD's resolved mechanism, routing this
32
+ * real correctness gate). Per the SPEC's resolved mechanism, routing this
33
33
  * through an LLM only adds cost and non-determinism, so the apply rung
34
34
  * KIND-CHECKS the sidecar BEFORE calling the agentic decider: a sidecar entry
35
35
  * carrying `kind: merge` (the typed dispatch field from `sidecar-kind-field`,
@@ -54,7 +54,7 @@ import type {VerifyConfig} from './verify.js';
54
54
  * branch itself is out of this task's scope — the question is recorded as
55
55
  * "drop" and the human / a later surfacer handles the artifact.)
56
56
  *
57
- * The STALE-APPROVAL POLICY (PRD OQ6, applied answer q1): default is the cheap
57
+ * The STALE-APPROVAL POLICY (SPEC OQ6, applied answer q1): default is the cheap
58
58
  * "HONOUR the prior approval + land on a green re-verify" path; opt-in
59
59
  * `strictMergeApproval` (resolved per-repo via the gate-family precedence chain
60
60
  * by the sibling task `strict-merge-approval-gate`, default OFF) RE-SURFACES
@@ -120,7 +120,7 @@ export function parseMergeAnswer(text: string): MergeActionVerb | undefined {
120
120
  * a fully-answered sidecar (the apply rung's pre-decider kind-check). Returns
121
121
  * `undefined` when the sidecar carries no answered `kind: merge` entry (the
122
122
  * apply rung then proceeds to the existing path — agentic for observations,
123
- * normal apply for task/prd content questions).
123
+ * normal apply for task/spec content questions).
124
124
  *
125
125
  * The sidecar is read OFF DISK keyed off the namespaced item identity; the
126
126
  * model is parsed via the SAME `parseSidecar` the rest of the engine uses.
@@ -266,7 +266,7 @@ function resolveArbiterUrl(input: MergeActionInput): string | undefined {
266
266
  }
267
267
 
268
268
  /**
269
- * The `strictMergeApproval` re-stale check (PRD OQ6 opt-in): did `<arbiter>/
269
+ * The `strictMergeApproval` re-stale check (SPEC OQ6 opt-in): did `<arbiter>/
270
270
  * main` move past the merge-base of the work branch since the surfacer
271
271
  * authored the question? The git-alone analogue of GitHub's "dismiss stale
272
272
  * approvals when the base changes" — host-agnostic by reachability.
@@ -17,7 +17,7 @@ import {
17
17
  } from './item-path.js';
18
18
 
19
19
  /**
20
- * The engine-owned APPLY PERSIST (prd `advance-loop`, task `advance-rung-apply`;
20
+ * The engine-owned APPLY PERSIST (spec `advance-loop`, task `advance-rung-apply`;
21
21
  * AGENTIC apply, task `agentic-apply-retire-disposition-vocabulary`) — the half of
22
22
  * the APPLY rung the ENGINE owns. On `classify=apply` (ALL sidecar entries
23
23
  * answered), it applies the HUMAN's answers to the item ATOMICALLY (item body +
@@ -45,9 +45,9 @@ import {
45
45
  * `promoteObservation` for a mint). A signal is still-open, acted-on, or deleted
46
46
  * — there is no \"retain as resolved\" state.
47
47
  *
48
- * The work-item (task/prd) terminal MOVES (`tasks/cancelled`, `prds/dropped`) and
48
+ * The work-item (task/spec) terminal MOVES (`tasks/cancelled`, `specs/dropped`) and
49
49
  * the `needs-attention/` LIFECYCLE state are a SEPARATE lifecycle concern (a
50
- * task/prd is dropped by its own lifecycle, not by a question answer) — they are
50
+ * task/spec is dropped by its own lifecycle, not by a question answer) — they are
51
51
  * NOT routed from here any more (they were the removed disposition vocabulary).
52
52
  *
53
53
  * It is the SIBLING of {@link import('./surface-persist.js').persistSurfacedQuestions}:
@@ -87,7 +87,7 @@ const APPLIED_HEADING = '## Applied answers';
87
87
  * resolved (no leftover "these are still open" prose above `## Applied answers`).
88
88
  *
89
89
  * The strip is STRUCTURAL (marker-pair based), NOT a heading-text regex — the
90
- * prd's D1 decision: a `## Open questions` heading match would be fragile to
90
+ * spec's D1 decision: a `## Open questions` heading match would be fragile to
91
91
  * author wording (`## Open questions (clear needsAnswers when resolved)` vs.
92
92
  * `## Open questions`). Items authored WITHOUT the markers are left untouched
93
93
  * (backward compat — no marker ⇒ nothing to strip ⇒ identical bytes).
@@ -102,7 +102,7 @@ export const OPEN_QUESTIONS_MARKER_CLOSE = '<!-- /open-questions -->';
102
102
  export interface ApplyAnsweredQuestionsOptions {
103
103
  /** Working clone/worktree the apply commits in. */
104
104
  cwd: string;
105
- /** The namespaced item identity (`task:foo` / `prd:bar` / `observation:baz`). */
105
+ /** The namespaced item identity (`task:foo` / `spec:bar` / `observation:baz`). */
106
106
  item: string;
107
107
  /**
108
108
  * The item file path RELATIVE to `cwd` (e.g. `work/backlog/foo.md`). The
@@ -274,7 +274,7 @@ function withAppliedAnswers(body: string, entries: SidecarEntry[]): string {
274
274
 
275
275
  /**
276
276
  * Strip ALL marker-fenced open-questions blocks from an item body — the FULL
277
- * RESOLUTION reconcile step (prd `apply-reconciles-stale-open-questions`,
277
+ * RESOLUTION reconcile step (spec `apply-reconciles-stale-open-questions`,
278
278
  * decisions D1 / D3). Removes each `<!-- open-questions -->` … `<!--
279
279
  * /open-questions -->` pair (markers included) plus the blank lines that
280
280
  * flanked it, so the answers in `## Applied answers` no longer sit beneath a
@@ -342,11 +342,11 @@ export function applyAnsweredQuestions(
342
342
 
343
343
  const {model, path: sidecarPath} = readSidecar(cwd, item);
344
344
 
345
- // FOLDER-AGNOSTIC at WRITE-TIME (F3a, prd
345
+ // FOLDER-AGNOSTIC at WRITE-TIME (F3a, spec
346
346
  // `staging-surface-and-apply-promote-safety`): re-resolve the item's CURRENT
347
347
  // path by IDENTITY, mirroring the sidecar's already-folder-agnostic
348
348
  // resolution. The captured `itemPath` is ADVISORY — a concurrent `promote`
349
- // (`tasks/backlog → tasks/ready`, `prds/proposed → prds/ready`) may have
349
+ // (`tasks/backlog → tasks/ready`, `specs/proposed → specs/ready`) may have
350
350
  // moved the item between capture and now, and we MUST write the post-move
351
351
  // path, never the stale one. If the item has vanished entirely, exit CLEAN
352
352
  // (no commit, no ghost file) — the matching benign skip the surface/triage
@@ -1,7 +1,7 @@
1
1
  /**
2
- * The SINGLE owner of the buildable-task (and PRD-body) markdown SECTION SCHEMA
3
- * (prd `centralize-buildable-task-renderer-shared-by-intake-and-promotion`, US
4
- * #1/#4/#7). dorfl has TWO independent producers of a buildable task/PRD body —
2
+ * The SINGLE owner of the buildable-task (and SPEC-body) markdown SECTION SCHEMA
3
+ * (spec `centralize-buildable-task-renderer-shared-by-intake-and-promotion`, US
4
+ * #1/#4/#7). dorfl has TWO independent producers of a buildable task/SPEC body —
5
5
  * `intake.ts` (`renderBacklogTask`/`renderSpec`, a wrapper+fallback) and
6
6
  * `triage-persist.ts` (`buildPromotedBody`, a structured renderer) — and until
7
7
  * this module they each HAND-ROLLED the `## What to build` / `## Acceptance
@@ -28,14 +28,14 @@
28
28
  * mechanism prose, and NO `## Acceptance criteria`. Reproduced by omitting
29
29
  * `acceptanceCriteria` and passing the open-questions block + the seed prose.
30
30
  *
31
- * Symmetrically, {@link renderSpecBody} owns the FULL PRD section schema both PRD
32
- * producers need: intake's default PRD scaffold is `## Problem Statement` +
31
+ * Symmetrically, {@link renderSpecBody} owns the FULL SPEC section schema both SPEC
32
+ * producers need: intake's default SPEC scaffold is `## Problem Statement` +
33
33
  * `## Solution` + `## User Stories` (reproduced by passing all three), while
34
- * promotion's structured PRD body is `## Problem Statement` + optional
34
+ * promotion's structured SPEC body is `## Problem Statement` + optional
35
35
  * `## Open questions` (reproduced by omitting `solution`/`userStories`). Each
36
36
  * optional section is emitted only when its input is non-empty.
37
37
  *
38
- * `## Prompt` is TASK-ONLY: a PRD is not dispatched by `do`/`run`, so a PRD body
38
+ * `## Prompt` is TASK-ONLY: a SPEC is not dispatched by `do`/`run`, so a SPEC body
39
39
  * carries none (the symmetric reason the task body MUST carry one — the consumer
40
40
  * `extractPromptSection`/`resolveTask` in `prompt.ts` throws "has no '## Prompt'
41
41
  * section" at dispatch time without it). {@link renderTaskBody} always emits a
@@ -136,28 +136,28 @@ export interface RenderSpecBodyInput {
136
136
  problemStatement: string;
137
137
  /**
138
138
  * The `## Solution` prose (markdown). OMIT it (or pass empty) to drop the
139
- * section — promotion's structured PRD body carries no Solution section, intake's
140
- * default PRD scaffold does.
139
+ * section — promotion's structured SPEC body carries no Solution section, intake's
140
+ * default SPEC scaffold does.
141
141
  */
142
142
  solution?: string;
143
143
  /**
144
144
  * The `## User Stories` block (markdown, e.g. a numbered list). OMIT it (or pass
145
- * empty) to drop the section — promotion's structured PRD body carries no User
146
- * Stories section, intake's default PRD scaffold does.
145
+ * empty) to drop the section — promotion's structured SPEC body carries no User
146
+ * Stories section, intake's default SPEC scaffold does.
147
147
  */
148
148
  userStories?: string;
149
149
  /**
150
150
  * The `## Open questions` block (markdown). OMIT it (or pass empty) to drop the
151
- * section. A PRD carries NO `## Prompt` (it is not dispatched).
151
+ * section. A SPEC carries NO `## Prompt` (it is not dispatched).
152
152
  */
153
153
  openQuestions?: string;
154
154
  }
155
155
 
156
156
  /**
157
- * Render a PRD body (the markdown AFTER the frontmatter fence). Emits, in the
157
+ * Render a SPEC body (the markdown AFTER the frontmatter fence). Emits, in the
158
158
  * canonical order, `## Problem Statement`, then `## Solution`, `## User Stories`,
159
159
  * and `## Open questions` (each only when its input is given), and NEVER a
160
- * `## Prompt` — a PRD is a north-star doc, not a dispatchable task. The symmetric twin of
160
+ * `## Prompt` — a SPEC is a north-star doc, not a dispatchable task. The symmetric twin of
161
161
  * {@link renderTaskBody}, owning the FULL SPEC section schema both producers need
162
162
  * (intake's default scaffold supplies Problem Statement + Solution + User Stories;
163
163
  * promotion's structured body supplies Problem Statement + optional Open
package/src/claim-cas.ts CHANGED
@@ -10,7 +10,7 @@ import {workItemRel} from './work-layout.js';
10
10
  * `scripts/CLAIM-PROTOCOL.md`. This is the first-class `dorfl claim`
11
11
  * command (ADR §9: dorfl is the PRIMARY implementation of the claim
12
12
  * protocol; `scripts/claim.sh` is retained as the portable, zero-dependency
13
- * bootstrap / reference). The lock-substrate cut-over (prd
13
+ * bootstrap / reference). The lock-substrate cut-over (spec
14
14
  * `ledger-status-per-item-lock-refs`) has since diverged it from `claim.sh`'s
15
15
  * body-move semantics — see the lock note below — but the exit codes are the same.
16
16
  *
@@ -26,7 +26,7 @@ import {workItemRel} from './work-layout.js';
26
26
  * 3 (legacy) push contention — no longer reachable: the per-item lock never
27
27
  * falsely contends, so there is no retry budget to exhaust
28
28
  *
29
- * UNIFIED PER-ITEM LOCK (prd `ledger-status-per-item-lock-refs` US #1/#15/#16,
29
+ * UNIFIED PER-ITEM LOCK (spec `ledger-status-per-item-lock-refs` US #1/#15/#16,
30
30
  * ADR `ledger-status-on-per-item-lock-refs`): a claim ACQUIRES the item's
31
31
  * per-item lock (`action: implement`) via the lock module and writes NOTHING to
32
32
  * `main` — the body STAYS at `work/backlog/<slug>.md`. The claimable predicate is
@@ -86,7 +86,7 @@ export interface ClaimCasOptions {
86
86
  */
87
87
  override?: boolean;
88
88
  /**
89
- * `--allow-backlog` (prd
89
+ * `--allow-backlog` (spec
90
90
  * `do-allow-backlog-drive-staged-tasks-without-promotion`): WIDEN the claimable
91
91
  * predicate to ALSO accept a `tasks/backlog/`-resident body (staging), so a
92
92
  * human can drive a staged task in place WITHOUT promoting it to the pool. The
@@ -336,7 +336,7 @@ async function runClaim(
336
336
  }
337
337
  }
338
338
 
339
- // UNIFIED PER-ITEM LOCK — the WHOLE of the claim now (prd
339
+ // UNIFIED PER-ITEM LOCK — the WHOLE of the claim now (spec
340
340
  // `ledger-status-per-item-lock-refs` US #1/#15/#16; ADR
341
341
  // `ledger-status-on-per-item-lock-refs`). The interim dual-write is GONE: claim
342
342
  // acquires the item's per-item lock (`action: implement`) and writes NOTHING to