@gobing-ai/spur 0.4.0 → 0.4.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 (172) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/config/config.global.yaml +4 -2
  3. package/config/decisions/gates.yaml +36 -0
  4. package/config/decisions/history-anatomy.yaml +35 -0
  5. package/config/decisions/idea-pipeline.yaml +38 -0
  6. package/config/plugin-scripts.json +15 -0
  7. package/config/rules/docs/sourced-api-claims.yaml +60 -0
  8. package/config/rules/recommended-pre-check.yaml +8 -3
  9. package/config/rules/structure/scratch-evidence-pointer.yaml +35 -0
  10. package/config/script-placement-baseline.json +2 -2
  11. package/config/templates/AGENTS.md +1 -1
  12. package/config/workflows/feature-lifecycle.yaml +9 -2
  13. package/config/workflows/history-anatomy.yaml +22 -0
  14. package/config/workflows/idea-pipeline.yaml +75 -0
  15. package/config/workflows/task-pipeline.yaml +216 -57
  16. package/config/workflows/wrapup-pipeline.yaml +107 -14
  17. package/package.json +10 -10
  18. package/plugins/sp/README.md +12 -3
  19. package/plugins/sp/agents/super-planner.md +16 -6
  20. package/plugins/sp/agents/super-reviewer.md +14 -0
  21. package/plugins/sp/bunfig.toml +8 -0
  22. package/plugins/sp/commands/dev-brainstorm.md +29 -16
  23. package/plugins/sp/commands/dev-find-way.md +80 -0
  24. package/plugins/sp/commands/dev-idea.md +6 -0
  25. package/plugins/sp/commands/dev-plan.md +6 -0
  26. package/plugins/sp/commands/dev-review-session.md +4 -1
  27. package/plugins/sp/commands/dev-run.md +12 -2
  28. package/plugins/sp/commands/dev-runall.md +32 -15
  29. package/plugins/sp/hooks/context-owner.ts +56 -0
  30. package/plugins/sp/hooks/context-post-tool.ts +23 -0
  31. package/plugins/sp/hooks/context-session-start.ts +49 -27
  32. package/plugins/sp/hooks/context-session-stop.ts +131 -30
  33. package/plugins/sp/hooks/pi/guard-extension.ts +21 -8
  34. package/plugins/sp/lib/idea-handoff.generated.mjs +43 -5
  35. package/plugins/sp/lib/inline-run-app.ts +28 -0
  36. package/plugins/sp/lib/inline-run.generated.d.mts +5 -0
  37. package/plugins/sp/lib/inline-run.generated.mjs +351 -46
  38. package/plugins/sp/lib/plan-projection.generated.d.mts +47 -0
  39. package/plugins/sp/lib/plan-projection.generated.mjs +368 -0
  40. package/plugins/sp/lib/quality-gate.generated.d.mts +35 -1
  41. package/plugins/sp/lib/quality-gate.generated.mjs +30296 -71
  42. package/plugins/sp/lib/residual-scan.generated.d.mts +19 -0
  43. package/plugins/sp/lib/residual-scan.generated.mjs +66 -0
  44. package/plugins/sp/lib/run-summary-core.ts +561 -0
  45. package/plugins/sp/lib/transcript.ts +150 -7
  46. package/plugins/sp/plugin.json +1 -1
  47. package/plugins/sp/references/roles.md +1 -1
  48. package/plugins/sp/scripts/batch-plan.mjs +488 -0
  49. package/plugins/sp/scripts/batch-plan.ts +145 -0
  50. package/plugins/sp/scripts/batch-preflight.mjs +51 -3
  51. package/plugins/sp/scripts/batch-preflight.ts +72 -1
  52. package/plugins/sp/scripts/commit-guard.mjs +216 -0
  53. package/plugins/sp/scripts/commit-guard.ts +249 -0
  54. package/plugins/sp/scripts/inline-run-dispatch.mjs +130 -0
  55. package/plugins/sp/scripts/inline-run-dispatch.ts +135 -0
  56. package/plugins/sp/scripts/inline-run-setup.mjs +562 -80
  57. package/plugins/sp/scripts/inline-run-setup.ts +52 -78
  58. package/plugins/sp/scripts/persist-out-check.mjs +90 -41
  59. package/plugins/sp/scripts/persist-out-check.ts +112 -57
  60. package/plugins/sp/scripts/pr-reviewing.mjs +19 -5
  61. package/plugins/sp/scripts/pr-reviewing.ts +34 -9
  62. package/plugins/sp/scripts/quality-gate.mjs +30213 -61
  63. package/plugins/sp/scripts/quality-gate.ts +21 -5
  64. package/plugins/sp/scripts/residual-scan.mjs +86 -31
  65. package/plugins/sp/scripts/residual-scan.ts +28 -30
  66. package/plugins/sp/scripts/run-summary.mjs +432 -14
  67. package/plugins/sp/scripts/run-summary.ts +41 -177
  68. package/plugins/sp/scripts/session-timeline.mjs +109 -11
  69. package/plugins/sp/scripts/session-timeline.ts +57 -19
  70. package/plugins/sp/scripts/task-diffstat.mjs +32 -29
  71. package/plugins/sp/scripts/task-diffstat.ts +34 -34
  72. package/plugins/sp/scripts/wrapup-steps.mjs +150 -2
  73. package/plugins/sp/scripts/wrapup-steps.ts +203 -1
  74. package/plugins/sp/skills/brainstorm/SKILL.md +9 -47
  75. package/plugins/sp/skills/branch-workflow/SKILL.md +1 -0
  76. package/plugins/sp/skills/branch-workflow/references/worktree-patterns.md +1 -0
  77. package/plugins/sp/skills/code-implementation/SKILL.md +48 -1
  78. package/plugins/sp/skills/code-verification/SKILL.md +3 -4
  79. package/plugins/sp/skills/code-verification/references/secu-review.md +3 -0
  80. package/plugins/sp/skills/code-verification/references/verdict-schema.md +68 -0
  81. package/plugins/sp/skills/fleet-join/SKILL.md +1 -1
  82. package/plugins/sp/skills/indexed-context/SKILL.md +14 -7
  83. package/plugins/sp/skills/parallel-execution/SKILL.md +2 -2
  84. package/plugins/sp/skills/parallel-execution/references/dispatch-surface.md +1 -1
  85. package/plugins/sp/skills/parallel-execution/references/fan-out-patterns.md +2 -2
  86. package/plugins/sp/skills/pr-reviewing/SKILL.md +7 -3
  87. package/plugins/sp/skills/session-review/SKILL.md +40 -7
  88. package/plugins/sp/skills/source-driven-development/SKILL.md +5 -0
  89. package/plugins/sp/skills/spec-decomposition/references/decomposition.md +5 -3
  90. package/plugins/sp/skills/spur-cli/SKILL.md +5 -2
  91. package/plugins/sp/skills/spur-cli/references/agent.md +20 -15
  92. package/plugins/sp/skills/spur-cli/references/decision.md +16 -8
  93. package/plugins/sp/skills/spur-cli/references/message.md +7 -7
  94. package/plugins/sp/skills/spur-cli/references/projects.md +7 -5
  95. package/plugins/sp/skills/spur-cli/references/tasks/verbs.md +19 -3
  96. package/plugins/sp/skills/spur-cli/references/tasks.md +10 -7
  97. package/plugins/sp/skills/spur-cli/references/workflows/authoring-workflows.md +7 -0
  98. package/plugins/sp/skills/spur-cli/references/workflows.md +7 -2
  99. package/plugins/sp/skills/spur-composer/SKILL.md +1 -1
  100. package/plugins/sp/skills/spur-dev/SKILL.md +20 -14
  101. package/plugins/sp/skills/spur-dev/references/ac-style-guide.md +33 -3
  102. package/plugins/sp/skills/spur-dev/references/cross-cutting.md +49 -14
  103. package/plugins/sp/skills/spur-dev/references/dev-operations.md +37 -17
  104. package/plugins/sp/skills/spur-dev/references/execution-batch-continuation.md +68 -0
  105. package/plugins/sp/skills/spur-dev/references/execution-batch-report.md +199 -0
  106. package/plugins/sp/skills/spur-dev/references/execution-batch.md +156 -1024
  107. package/plugins/sp/skills/spur-dev/references/execution-parallel-isolation.md +133 -0
  108. package/plugins/sp/skills/spur-dev/references/execution-workflow.md +6 -0
  109. package/plugins/sp/skills/spur-dev/references/execution-worktree-landing.md +471 -0
  110. package/plugins/sp/skills/spur-dev/references/execution-worktree-setup.md +379 -0
  111. package/plugins/sp/skills/spur-dev/references/flag-glossary.md +44 -12
  112. package/plugins/sp/skills/spur-dev/references/glossary.md +2 -2
  113. package/plugins/sp/skills/spur-dev/references/inline-pipeline-driver.md +340 -165
  114. package/plugins/sp/skills/spur-dev/references/structured-trace-emission.md +178 -0
  115. package/plugins/sp/skills/wayfinder/SKILL.md +10 -14
  116. package/schemas/state-machine-workflow.schema.json +23 -0
  117. package/spur.js +42402 -26889
  118. package/web/_astro/{BoardApp.VeoxxLBy.js → BoardApp.B3GQZvj8.js} +1 -1
  119. package/web/_astro/BoardApp.BT7L2kSb.js +324 -0
  120. package/web/_astro/TaskDetail.Cxov1_N_.js +1 -0
  121. package/web/_astro/{arc.f4e0OYLg.js → arc.vaT7tPOB.js} +1 -1
  122. package/web/_astro/{architectureDiagram-3BPJPVTR.SSIvxi-Z.js → architectureDiagram-3BPJPVTR.DRMmTjkN.js} +1 -1
  123. package/web/_astro/{blockDiagram-GPEHLZMM.DSXIHOFf.js → blockDiagram-GPEHLZMM.cla0LO_q.js} +1 -1
  124. package/web/_astro/{c4Diagram-AAUBKEIU.DG9Ubu85.js → c4Diagram-AAUBKEIU.D4YAIBKn.js} +1 -1
  125. package/web/_astro/channel.D4nG9YLf.js +1 -0
  126. package/web/_astro/{chunk-2J33WTMH.C7QU88Qh.js → chunk-2J33WTMH.BrSJbMRZ.js} +1 -1
  127. package/web/_astro/{chunk-4BX2VUAB.26Z94xBj.js → chunk-4BX2VUAB.CuLMgKF5.js} +1 -1
  128. package/web/_astro/{chunk-55IACEB6.DYRiBkqw.js → chunk-55IACEB6.zkvgu54F.js} +1 -1
  129. package/web/_astro/{chunk-727SXJPM.D5Vfv5pe.js → chunk-727SXJPM.DxWkACh8.js} +1 -1
  130. package/web/_astro/{chunk-AQP2D5EJ.DXHV47bN.js → chunk-AQP2D5EJ.42XrmIlH.js} +1 -1
  131. package/web/_astro/{chunk-FMBD7UC4.D1suAfOs.js → chunk-FMBD7UC4.Bao2wMK9.js} +1 -1
  132. package/web/_astro/{chunk-ND2GUHAM.D6BmdHEY.js → chunk-ND2GUHAM.BhydojD1.js} +1 -1
  133. package/web/_astro/{chunk-QZHKN3VN.rnPU-Ak-.js → chunk-QZHKN3VN.CmZ82g-H.js} +1 -1
  134. package/web/_astro/{classDiagram-4FO5ZUOK.CvEfXIo1.js → classDiagram-4FO5ZUOK.Blr83Gt_.js} +1 -1
  135. package/web/_astro/{classDiagram-v2-Q7XG4LA2.CvEfXIo1.js → classDiagram-v2-Q7XG4LA2.Blr83Gt_.js} +1 -1
  136. package/web/_astro/{cose-bilkent-S5V4N54A.DkMisLSm.js → cose-bilkent-S5V4N54A.qmfv0SPn.js} +1 -1
  137. package/web/_astro/{cynefin-OW5HDTMX.C77Q-pF6.js → cynefin-OW5HDTMX.BtELhXPR.js} +1 -1
  138. package/web/_astro/{dagre-BM42HDAG.YaV8ce27.js → dagre-BM42HDAG.AWmaAvXo.js} +1 -1
  139. package/web/_astro/{diagram-2AECGRRQ.CUyGEKge.js → diagram-2AECGRRQ.DdH34KDi.js} +1 -1
  140. package/web/_astro/{diagram-5GNKFQAL.CRgd8dgj.js → diagram-5GNKFQAL.BmNPix1k.js} +1 -1
  141. package/web/_astro/{diagram-KO2AKTUF.Bmzys9hq.js → diagram-KO2AKTUF.BNQd_Ppo.js} +1 -1
  142. package/web/_astro/{diagram-LMA3HP47.BvmJY4Lw.js → diagram-LMA3HP47.BAPgDi0e.js} +1 -1
  143. package/web/_astro/{diagram-OG6HWLK6.0hEhD30d.js → diagram-OG6HWLK6.DZ4zyLdC.js} +1 -1
  144. package/web/_astro/{erDiagram-TEJ5UH35.Bjt8lrnm.js → erDiagram-TEJ5UH35.Q1TySMmw.js} +1 -1
  145. package/web/_astro/{flowDiagram-I6XJVG4X.CJZTjRDV.js → flowDiagram-I6XJVG4X.BXhFBicG.js} +1 -1
  146. package/web/_astro/{ganttDiagram-6RSMTGT7._VqoVafc.js → ganttDiagram-6RSMTGT7.vHSgcuo2.js} +1 -1
  147. package/web/_astro/{gitGraphDiagram-PVQCEYII.CEDb7tVo.js → gitGraphDiagram-PVQCEYII.Bi1f73C7.js} +1 -1
  148. package/web/_astro/index.BhSwN8yY.css +1 -0
  149. package/web/_astro/{infoDiagram-5YYISTIA.CgwifPpK.js → infoDiagram-5YYISTIA.DPvXZEWm.js} +1 -1
  150. package/web/_astro/{ishikawaDiagram-YF4QCWOH.B99wx2J1.js → ishikawaDiagram-YF4QCWOH.Cz829fsV.js} +1 -1
  151. package/web/_astro/{journeyDiagram-JHISSGLW.2hRwJbEo.js → journeyDiagram-JHISSGLW.enRnB9Me.js} +1 -1
  152. package/web/_astro/{kanban-definition-UN3LZRKU.BahJkKNC.js → kanban-definition-UN3LZRKU.DnTNk6d2.js} +1 -1
  153. package/web/_astro/{linear.DguUUe6V.js → linear.BzGnBwNL.js} +1 -1
  154. package/web/_astro/{mermaid.core.CvgfmqVr.js → mermaid.core.CSbTpIVz.js} +4 -4
  155. package/web/_astro/{mindmap-definition-RKZ34NQL.B3qEA3x9.js → mindmap-definition-RKZ34NQL.DGJDy8zT.js} +1 -1
  156. package/web/_astro/{pieDiagram-4H26LBE5.FlWA-_ru.js → pieDiagram-4H26LBE5.HSPdi5_8.js} +1 -1
  157. package/web/_astro/{quadrantDiagram-W4KKPZXB.9bVn35X7.js → quadrantDiagram-W4KKPZXB.6Gv8mz2Y.js} +1 -1
  158. package/web/_astro/{requirementDiagram-4Y6WPE33.ChykIhct.js → requirementDiagram-4Y6WPE33.CnBCtFwa.js} +1 -1
  159. package/web/_astro/{sankeyDiagram-5OEKKPKP.Z2Y3hkYb.js → sankeyDiagram-5OEKKPKP.5M8VWAu8.js} +1 -1
  160. package/web/_astro/{sequenceDiagram-3UESZ5HK.J7JsHWDt.js → sequenceDiagram-3UESZ5HK.DN41XN-U.js} +1 -1
  161. package/web/_astro/{stateDiagram-AJRCARHV.DAPbiCSS.js → stateDiagram-AJRCARHV.ErOO3W8j.js} +1 -1
  162. package/web/_astro/{stateDiagram-v2-BHNVJYJU.D2jvSi0q.js → stateDiagram-v2-BHNVJYJU.B_ZHICM-.js} +1 -1
  163. package/web/_astro/{timeline-definition-PNZ67QCA.psW2ci29.js → timeline-definition-PNZ67QCA.CWdosr07.js} +1 -1
  164. package/web/_astro/{vennDiagram-CIIHVFJN.DlILYVmg.js → vennDiagram-CIIHVFJN.BHzYjNV5.js} +1 -1
  165. package/web/_astro/{wardleyDiagram-YWT4CUSO.xNWwLJnn.js → wardleyDiagram-YWT4CUSO.h8x4IwPX.js} +1 -1
  166. package/web/_astro/{xychartDiagram-2RQKCTM6.EU_BuH7V.js → xychartDiagram-2RQKCTM6.RTapW2X8.js} +1 -1
  167. package/web/index.html +2 -2
  168. package/plugins/sp/commands/dev-parallel.md +0 -31
  169. package/web/_astro/BoardApp.Bzr4OXrW.js +0 -324
  170. package/web/_astro/TaskDetail.LAyR_Pvn.js +0 -1
  171. package/web/_astro/channel.CUFdtWhm.js +0 -1
  172. package/web/_astro/index.Dg_3bOaJ.css +0 -1
@@ -22,19 +22,19 @@ that before using `run` for fan-out dispatch.
22
22
  | Verb | Purpose | Key flags |
23
23
  | ---- | ------- | --------- |
24
24
  | `run <prompt>` | Execute a prompt or slash command via a coding agent | `--agent <name>` `--spec <id>` `--model <name>` `--mode <mode>` `--continue` `--cwd <path>` `--drain` `--json` |
25
- | `wait [<specId>]` | Identity-pinned wait for an occupant run to reach a lifecycle state (G4 wave 2; `--role` selector per 0685) | `--role <name>` `--run <runId>` `--until <state>...` `--timeout <ms>` `--json` |
25
+ | `wait [<specId>]` | Identity-pinned wait for an occupant run to reach a lifecycle state (G4 wave 2; `--role` selector per 0685) | `--role <name>` `--run <runId>` `--until <state>...` `--timeout <ms>` `--inbox <id>` `--json` |
26
26
  | `trace <runId>` | Print one execution record's lineage — the run, its dispatch parents, agent session ids and streams (1076 R4, ADR-132) | `--follow` `--timeout <ms>` `--json` |
27
27
  | `list` | List detected coding agents, or agent specs with `--specs` (live run status + member session merged from `spur self serve`) | `--specs` `--server <url>` `--json` |
28
28
  | `report` | Report a fleet member lifecycle state (`working`/`idle`/`blocked`) from a host hook (G73 R1/R2, task 1080) | `--state <state>` `--seq <ns>` `--spec <id>` `--json` |
29
29
  | `join` | Join the fleet as a guest occupant — a live session that pulls its own work (G73 R2, task 1081) | `--role <name>` `--id <id>` `--session-id <sid>` `--pid <n>` `--executor <name>` `--json` |
30
- | `leave` | Leave the fleet: release the guest lease, retire the occupant, return claimed messages to pending | `[id]` `--session-id <sid>` `--json` |
30
+ | `leave` | Leave the fleet: release the guest lease, retire the occupant, return claimed messages to `queued` | `[id]` `--session-id <sid>` `--json` |
31
31
  | `status` | Agent specs with live process status and member session (requires `spur self serve`) | `--server <url>` `--json` |
32
32
  | `doctor [agent]` | Check agent readiness | `--json` `--probe-health` `--force-refresh` |
33
33
  | `usage` | Run-once provider usage capture (codexbar) → quota-owned availability refresh; scheduled externally | `--dry-run` `--source <name>` `--json` |
34
34
  | `start <spec-id>` | Start a supervised agent process (requires `spur self serve`) | `--server <url>` `--json` |
35
35
  | `stop <spec-id>` | Stop a supervised agent process (requires `spur self serve`) | `--server <url>` `--json` |
36
36
 
37
- `list`, `status`, `doctor`, `run`, `wait`, `trace`, `start`, and `stop` accept `--json` plus `--json-envelope`. The hidden
37
+ Every verb except `trace` accepts `--json` plus `--json-envelope`; `trace` is `--json` only. The hidden
38
38
  `loop` is a supervisor-internal process surface. **Exit codes:** `0` success, `1` failure, and `2`
39
39
  invalid usage; `run` can also propagate the invoked agent's non-zero result.
40
40
 
@@ -142,24 +142,27 @@ exits 2 naming the accepted vocabulary. Resolution collapses onto the same ident
142
142
 
143
143
  ```bash
144
144
  spur agent list # detected coding agents on this machine
145
- spur agent list --specs # agent specs under .spur/agents/
145
+ spur agent list --specs # agent specs: .spur/agents/*.yaml + agent.fleet members
146
146
  spur agent list --json # machine-readable
147
147
  ```
148
148
 
149
149
  Without `--specs`, lists coding agents detected on the host (by binary on `PATH`). With `--specs`,
150
- lists agent specs (`.spur/agents/*.yaml`) **with live run status merged from the server's
150
+ lists agent specs — hand-authored `.spur/agents/*.yaml` merged with the members declared under
151
+ `agent.fleet.members` (derived in memory, never written to disk; the fleet declaration wins on an
152
+ id clash; stale `fleet:generated` files are ignored) — **with live run status merged from the server's
151
153
  supervisor**: each row carries a trailing status column
152
154
  (`running` / `stopped` / `errored` / `unknown`), `pid=<n>` where a process exists, and the member
153
155
  session (0897): the session mode plus a shortened resume id (`resume id=3f9c2a1d`), or `-` when the
154
- member has no recorded session. When `spur self serve` is unreachable, the listing falls back to all
156
+ member has no recorded session. `--json` rows carry `source: file` (plus `path`) or `source: fleet`
157
+ (no backing file, so no `path`). When `spur self serve` is unreachable, the listing falls back to all
155
158
  `stopped` with a stderr warning. `--server <url>` targets the supervisor API; without it the URL is
156
159
  this project's serve — the port in the cwd's project-registry entry (`http://localhost:<port>/api`),
157
160
  falling back to `http://localhost:3000/api` only when the project has no live entry (1088 R1).
158
161
 
159
162
  ```bash
160
163
  spur agent list --specs
161
- # planner claude reviewer claude plans the work running pid=4132 resume id=3f9c2a1d
162
- # worker-1 pi worker pi implements stopped one-shot
164
+ # myapp-planner-1 claude planner claude orchestrator running pid=4132 resume id=3f9c2a1d
165
+ # myapp-coder-1 pi coder pi implements stopped one-shot
163
166
  ```
164
167
 
165
168
  ## `status` - live status + member session per spec
@@ -180,7 +183,7 @@ unreachable server reports every spec `stopped` with no session. `--server <url>
180
183
 
181
184
  ```bash
182
185
  spur agent report --state working --seq 1759665600000000000
183
- spur agent report --state blocked --seq 1759665600000000000 --spec proj-worker-1 --json
186
+ spur agent report --state blocked --seq 1759665600000000000 --spec myapp-coder-1 --json
184
187
  ```
185
188
 
186
189
  | Flag | Description |
@@ -215,7 +218,7 @@ concrete id only (role/executor selectors count declared members, so a guest is
215
218
  claim table (same TTL/heartbeat semantics as the write slot — R5) and writes
216
219
  `.spur/run/guests/<id>.json` so a host Stop hook can recognize its own session without a CLI call.
217
220
  `leave`, or lease expiry in the reconciler pass, releases the lease, marks the occupant exited,
218
- returns its claimed messages to `pending` and removes the record.
221
+ returns its claimed messages to `queued` and removes the record.
219
222
 
220
223
  | Flag | Description |
221
224
  | --- | --- |
@@ -296,8 +299,8 @@ buffer is only a live view.
296
299
  ## `start` - start a supervised process
297
300
 
298
301
  ```bash
299
- spur agent start worker-1
300
- spur agent start worker-1 --json
302
+ spur agent start myapp-coder-1
303
+ spur agent start myapp-coder-1 --json
301
304
  ```
302
305
 
303
306
  Posts to the `spur self serve` supervisor API
@@ -310,8 +313,8 @@ when the server is unreachable or the start fails.
310
313
  ## `stop` - stop a supervised process
311
314
 
312
315
  ```bash
313
- spur agent stop worker-1
314
- spur agent stop worker-1 --json
316
+ spur agent stop myapp-coder-1
317
+ spur agent stop myapp-coder-1 --json
315
318
  ```
316
319
 
317
320
  Posts to the supervisor API
@@ -388,7 +391,9 @@ one never re-sends settled work; only never-started deliveries release and redel
388
391
  **[dispatch-surface rule](../../parallel-execution/references/dispatch-surface.md)**, not this
389
392
  reference. This reference documents the verbs; that rule decides which surface carries a dispatch.
390
393
  - **Not the fleet orchestrator.** The `spur self serve` supervisor drives the lifecycle: `spur agent
391
- start` / `stop` manage supervised processes and `agent list --specs` reports live state.
394
+ start` / `stop` manage supervised processes and `agent list --specs` reports live state. Dispatch
395
+ policy (`agent.fleet.strategy` `rest|gtd`, the `orchestrator` member, `--agent fleet` routing)
396
+ lives in project config and the workflow executor, not in these verbs.
392
397
 
393
398
  ## See also
394
399
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: spur-cli-decision
3
- description: "spur-cli noun reference: operate `spur decision` as the read/serve surface over the decision catalog - list registered decisions, show one served contract (parameters, criteria vocabulary, effective maker), run a decision to a served outcome (never writes a workflow resultFile), and status the catalog layers. Backed by @gobing-ai/ts-ai-decision 0.5.16 hub; offline by default via the built-in `typesafe` maker. Introduced by task 1093."
3
+ description: "spur-cli noun reference: operate `spur decision` as the read/serve surface over the decision catalog - list registered decisions, show one served contract (parameters, criteria vocabulary, effective maker), run a decision to a served outcome (never writes a workflow resultFile), and status the catalog layers. Backed by @gobing-ai/ts-ai-decision 0.5.22 hub; offline by default via the built-in `typesafe` maker. Introduced by task 1093."
4
4
  see_also:
5
5
  - spur-cli
6
6
  ---
@@ -22,15 +22,15 @@ Decisions resolve first-wins across three layers:
22
22
  | Layer | Root | Notes |
23
23
  | ----- | ---- | ----- |
24
24
  | `project` | `<cwd>/.spur/decisions/*.yaml` | Highest precedence |
25
- | `registered` | programmatic catalog registrations | Agents register in-process |
25
+ | `registered` | folders listed in config `decisions.paths` | Operator-added catalogs |
26
26
  | `shared` | `decisions/` under the bundled config root | Shipped catalogs (`config/decisions/` in-repo) |
27
27
 
28
28
  The bundled shared catalog ships `task-triage`, `failure-class`, and `review-failure-class` (all
29
29
  `choice` type, param `wbs`). Duplicate ids across layers keep the higher layer; duplicates inside
30
30
  one file are a load error.
31
31
 
32
- **Config keys** (under `decisions:` in `config.global.yaml` or project config):
33
- `paths` (extra catalog folders joined to the registered layer), `maker` (default DecisionMaker
32
+ **Config keys** (under `decisions:` in the global `~/.config/spur/config.yaml` or project `.spur/config.yaml`):
33
+ `paths` (extra catalog folders forming the `registered` layer), `maker` (default DecisionMaker
34
34
  for every decision point), `makers` (per-decision-id overrides). An unregistered maker name is a
35
35
  config error, never a silent fallback (design §3.6).
36
36
 
@@ -47,8 +47,9 @@ All verbs support `--json` (bare payload) and `--json-envelope` (`{ok, data|erro
47
47
  ADR-091). Failure output for `--json` commands uses the canonical error envelope only under
48
48
  `--json-envelope`; plain `--json` keeps the human message on stderr.
49
49
 
50
- **Exit codes:** `status` exits 1 on catalog load errors; `show` exits 1 on unknown id; `list` always
51
- exits 0 (design §3.4 — load errors surface via `status`).
50
+ **Exit codes:** `status` exits 1 on any catalog load error or maker-config error; `show` exits 1 on unknown id; `list` exits 0
51
+ (design §3.4 — load errors surface via `status`) except for an invalid `--layer` value (exit 1).
52
+ Error envelopes use `NOT_FOUND` for an unknown id and `VALIDATION_FAILED` for every other caller mistake.
52
53
 
53
54
  **Exit contract for `run` (design §3.4):** any backend-observed outcome — low confidence, model
54
55
  error surfaced as fallback, declined — is still a **successful serve** (exit 0, envelope carries
@@ -78,6 +79,13 @@ exist there). The final `catalog-default` maker is the hub built-in `typesafe`
78
79
  without a configured backend still produce deterministic closed-vocabulary outcomes, which is why
79
80
  `run` is usable in tests and scripts with no model access.
80
81
 
82
+ **Available makers:** the three upstream built-ins (`typesafe`, `fm-local`, `laya-local`) plus
83
+ Spur's hosted `clef` (Cloudflare Workers AI via `@gobing-ai/ts-decision-clef`). `clef` registers
84
+ only when both `CLOUDFLARE_ACCOUNT_ID` and `CLOUDFLARE_AUTH_TOKEN` are set in the environment;
85
+ without them it is absent from `registeredMakers`, so naming it in config or `--maker` is a config
86
+ error, never a silent fallback. Its model defaults to `clef-flash` (a catalog `model` selects
87
+ `clef`).
88
+
81
89
  ## Examples
82
90
 
83
91
  ```bash
@@ -86,12 +94,12 @@ spur decision show task-triage # inspect contract before se
86
94
  spur decision run task-triage --param wbs=1093 --json
87
95
  spur decision run failure-class --param wbs=1093 \
88
96
  --evidence .spur/run/<runId>-test-output.txt # redacted evidence -> instructions
89
- spur decision status --json | jq '.data.errors' # audit catalog health
97
+ spur decision status --json | jq '.loadErrors' # audit catalog health
90
98
  ```
91
99
 
92
100
  ## References
93
101
 
94
102
  - Design: `docs/design/decision-catalog.md` (§2 catalog authoring, §3.4 CLI surface)
95
- - Hub: `@gobing-ai/ts-ai-decision` 0.5.16 (`DecisionService`, catalog schema, maker registry)
103
+ - Hub: `@gobing-ai/ts-ai-decision` 0.5.22 (`DecisionService`, catalog schema, maker registry)
96
104
  - App service: `packages/app/src/decision/decision-service.ts`
97
105
  - Shipped catalogs: `config/decisions/*.yaml`
@@ -31,10 +31,10 @@ All verbs accept `--json` and `--json-envelope`. `watch` applies the envelope pe
31
31
 
32
32
  ```bash
33
33
  spur message send "Please review PR 42" --to reviewer
34
- spur message send "Task 0040 is blocked" --to worker-1 --from operator
34
+ spur message send "Task 0040 is blocked" --to myapp-coder-1 --from operator
35
35
  spur message send "Done" --to planner --json
36
36
  spur message send "Review 0042" --to reviewer --wait --until invoke-exit --timeout 30000
37
- spur message send "Done" --to manager --request-key 0695-report-42 # retry-safe: same key replays the original receipt
37
+ spur message send "Done" --to myapp-planner-1 --request-key 0695-report-42 # retry-safe: same key replays the original receipt
38
38
  spur message send "Start the pass" --role reviewer # resolves to exactly one instance
39
39
  ```
40
40
 
@@ -66,9 +66,9 @@ wait; enqueue is **not** rolled back if the wait later fails.
66
66
  ## `inbox` - list addressed messages
67
67
 
68
68
  ```bash
69
- spur message inbox --agent worker-1
70
- spur message inbox --agent worker-1 --json
71
- spur message inbox --agent worker-1 --unresolved --json
69
+ spur message inbox --agent myapp-coder-1
70
+ spur message inbox --agent myapp-coder-1 --json
71
+ spur message inbox --agent myapp-coder-1 --unresolved --json
72
72
  ```
73
73
 
74
74
  Lists messages addressed to `--agent <id>`, oldest first. The body is truncated in plain-text output;
@@ -107,8 +107,8 @@ Threads a reply to a specific message id. The reply is addressable to the origin
107
107
  ## `watch` - follow an inbox live
108
108
 
109
109
  ```bash
110
- spur message watch --agent worker-1
111
- spur message watch --agent worker-1 --interval 1000 --json
110
+ spur message watch --agent myapp-coder-1
111
+ spur message watch --agent myapp-coder-1 --interval 1000 --json
112
112
  ```
113
113
 
114
114
  Polls the inbox and surfaces each **new** message exactly once as it arrives. `Ctrl-C` to exit. With
@@ -22,7 +22,7 @@ shapes live in `apps/cli/src/commands/projects.ts`.
22
22
  | `clean` | Purge missing project folders and terminate lingering processes (alias: `refresh`) | `--no-terminate-processes` `--json` |
23
23
  | `list` | List entries with live running status | `--json` `--fleet` |
24
24
  | `start <target>` | Start or reuse a detached project server | `--port <n>` `--json` |
25
- | `stop <target>` | Best-effort stop the listener and clear its recorded port | `--json` |
25
+ | `stop <target>` | Ownership-verified stop of the listener and clear its recorded port | `--json` |
26
26
 
27
27
  Every verb also advertises `--json-envelope`; use the facade's machine-output contract. Success is
28
28
  exit `0`; validation, registry, spawn, health, or lookup failure is exit `1`.
@@ -36,8 +36,8 @@ exit `0`; validation, registry, spawn, health, or lookup failure is exit `1`.
36
36
  - `add` requires an existing path, resolves a relative path from the current working directory, and
37
37
  defaults the display name to its basename. It upserts; it does not start a server. The current
38
38
  source does not enforce a `.spur/` marker or directory type.
39
- - `list` automatically heals tilde paths, verifies project directories exist on disk (purging missing entries and terminating lingering processes), and heals stale entries to `port: 0` before reporting `running`.
40
- - `clean` (alias `refresh`) explicitly purges non-existent project directories from `projects.json`, probes live ports for removed entries, and cleanly terminates orphaned listening processes (SIGTERM with bounded wait and SIGKILL escalation). Supports `--no-terminate-processes` to skip process kills.
39
+ - `list` automatically heals tilde paths, verifies project directories exist on disk (purging missing entries and terminating only ownership-verified lingering processes), and heals stale entries to `port: 0` before reporting `running`.
40
+ - `clean` (alias `refresh`) explicitly purges non-existent project directories from `projects.json`, probes live ports for removed entries, and terminates orphaned listeners only after ownership verification (SIGTERM with bounded wait and SIGKILL escalation, each signal gated on `service:spur` identity plus exact project path and a stable PID; foreign or unverified listeners are never signaled). Supports `--no-terminate-processes` to skip process kills.
41
41
  - `list --fleet` (0835/0858) additionally resolves each project's `agent.fleet` section from that
42
42
  project's `.spur/config.yaml` under the existing verb (no new noun). Per project it prints one line
43
43
  per member: instance id (the spec id / mailbox identity), `role`, resolved `executor`,
@@ -76,8 +76,10 @@ port is returned idempotently; otherwise the service allocates a port (3000–39
76
76
  set), spawns `spur serve --host 127.0.0.1 --no-open` detached in the project root, waits for the port,
77
77
  then persists it.
78
78
 
79
- `stop` finds processes bound to the recorded port, sends `SIGTERM` best-effort while excluding the
80
- CLI and its parent, and clears the registry port. It is not a persistent supervisor contract.
79
+ `stop` signals only a listener that proves `service:spur` identity plus the exact registered project
80
+ path with a stable rediscovered PID; it refuses foreign or unverified listeners with exit 1 and
81
+ preserves the port, treats an absent listener as idempotent success, and excludes the CLI and its
82
+ parent. It is not a persistent supervisor contract.
81
83
  `remove` only removes the registry entry; stop a running project first when process cleanup matters.
82
84
 
83
85
  Raw JSON success payloads are verb-specific (`project`, `projects`, `removed`, `stopped`, or start
@@ -258,14 +258,28 @@ the active tasks folder (or `--folder`).
258
258
 
259
259
  ## `migrate-anchors`
260
260
 
261
- Qualify ambiguous in-repo evidence anchors to repo-relative paths across the task corpus. Run
261
+ Qualify in-repo evidence anchors to repo-relative paths across the task corpus. Run
262
262
  `--dry-run` first: unambiguous matches are reported in `qualified`, multiple matches in `ambiguous`
263
263
  without rewriting, and schema-incompatible files in `skipped`. The write path uses the planning
264
264
  service rather than raw file edits.
265
265
 
266
+ **`done_reason` scratch pointers are retargeted** (task 1140, ADR-131): a `.spur/run/<wbs>-verdict.json`
267
+ or `.spur/run/<wbs>/verdict.json` substring becomes `.spur/memory/evidence/<wbs>-verdict.json` when
268
+ that copy exists, else `tracked Testing section (scratch verdict not retained)` when Testing is
269
+ non-empty; otherwise the value is left unchanged and reported in `doneReasonUnresolved`. Each
270
+ `doneReasons` row carries `kind` (`absolute-path` | `durable-evidence` | `tracked-testing`). This is
271
+ the repair for the `no-scratch-verdict-pointer` rule.
272
+
273
+ **`--wbs <wbs>` scopes the pass to one task file** (task 1109 R1) — the wbs is resolved through the
274
+ task locator and exactly that file is scanned, so the pipeline's implement stage can auto-repair a
275
+ task's unique basename anchors without the corpus-wide pass rewriting unrelated files (the unscoped
276
+ apply rewrote 119 on 2026-10-07). An unknown wbs exits `1` with an actionable message and writes
277
+ nothing. Ambiguous basenames are still reported and left untouched in scoped mode.
278
+
266
279
  ```bash
267
280
  spur task migrate-anchors --dry-run --json
268
281
  spur task migrate-anchors --json
282
+ spur task migrate-anchors --wbs 1109 --json # one task file only
269
283
  ```
270
284
 
271
285
  ## `resolve <file-path>`
@@ -358,7 +372,9 @@ and `prefixId` normalizes `AC<n>` so the box flips. A bare `AC-<i>` also does bo
358
372
  resolves it through the feature's scenario order to the AC line aliasing scenario *i*
359
373
  (`AC<k> — [R<n> — ]<scenario title>`) and flips that box — never the same-numbered `AC<i>`; with no
360
374
  aliasing line it flips nothing. A bare `AC<n>` credits no scenario; a title carrying the scenario's
361
- `R<n>` label matches neither.
375
+ `R<n>` label matches neither. When the task's AC section is a Gherkin fence (`Scenario: AC1 — …`
376
+ rows), there is no checklist label: cite each row by its exact scenario title — a bare `AC<i>`
377
+ matches nothing and the verdict is rejected.
362
378
 
363
379
  **Evidence rule (behavior-bearing AC):** an AC row with `status: MET` on a behavior-bearing id
364
380
  (no `[advisory]`/`[non-core]`/`[non-behavior]`/`[docs-only]` marker) MUST carry `test` or
@@ -436,7 +452,7 @@ spur task sections <wbs> <init|add|list> [name] [--folder] [--json]
436
452
  spur task list [--status <s>] [--phase <p>] [--parent <wbs>] [--feature <id>] [--folder] [--json]
437
453
  spur task refresh [--folder] [--json]
438
454
  spur task migrate [--dry-run] [--folder] [--json]
439
- spur task migrate-anchors [--dry-run] [--json]
455
+ spur task migrate-anchors [--wbs <wbs>] [--dry-run] [--json]
440
456
  spur task refresh-roster <wbs> [--folder] [--json]
441
457
  spur task batch-create --file <path> [--skip-ready | --agent <selector>] [--folder] [--json]
442
458
  spur task record <wbs> [--verdict-file <p>] [--solution-from-diff] [--transition <s>] [--folder] [--json]
@@ -23,7 +23,7 @@ does what*, this skill.
23
23
  Start from the WBS, not the corpus layout:
24
24
 
25
25
  ```bash
26
- spur task show <wbs> --json # metadata + full content + filePath
26
+ spur task show <wbs> --json # {wbs, name, status, frontmatter, content, filePath}; priority etc. under .frontmatter
27
27
  spur task get <wbs> --json # alias of `show` — same output, no separate code path
28
28
  spur task path <wbs> --json # absolute path only
29
29
  ```
@@ -38,15 +38,15 @@ re-reading or re-tokenizing the task.
38
38
 
39
39
  | Verb | Purpose | Key flags |
40
40
  | ---- | ------- | --------- |
41
- | `create <title>` | Allocate a new task (race-safe WBS) | `--feature <id>` `--parent <wbs>` `--template <variant>` `--dedupe-within <s>` `--allow-duplicate-name` `--skip-ready` `--agent <selector>` `--folder` `--json` |
41
+ | `create <title>` | Allocate a new task (race-safe WBS) | `--feature <id>` `--no-reopen` `--parent <wbs>` `--template <variant>` `--dedupe-within <s>` `--allow-duplicate-name` `--skip-ready` `--agent <selector>` `--folder` `--json` |
42
42
  | `show <wbs>` | Print one task's frontmatter + body | `--folder` `--json` |
43
- | `update <wbs> [status]` | Lifecycle transition, section replace, **or** frontmatter set | `--section <name> --from-file <path>` `--assignee <spec-id>` (exclusive with `--section`) `--feature <id>` `--priority <p>` `--ac-numbering task-local` `--ac-altitude <a>` `--estimate-hours <n>` `--no-lifecycle` `--force-done` `--reason <text>` `--provenance-bypass` `--verdict-dir <path>` `--folder` `--json` |
43
+ | `update <wbs> [status]` | Lifecycle transition, section replace, **or** frontmatter set | `--section <name> --from-file <path>` `--assignee <spec-id>` (exclusive with `--section`) `--feature <id>` `--no-reopen` `--priority <p>` `--ac-numbering task-local` `--ac-altitude <a>` `--estimate-hours <n>` `--no-lifecycle` `--force-done` `--reason <text>` `--provenance-bypass` `--verdict-dir <path>` `--folder` `--json` |
44
44
  | `deps <wbs> <op> [values...]` | Mutate `dependencies[]` frontmatter array (ops: `set`, `add`, `remove`, `clear`) | `--folder` `--json` |
45
45
  | `sections <wbs> <op> [name]` | Initialize, add, or list canonical task sections (ops: `init`, `add`, `list`) | `--folder` `--json` |
46
46
  | `list` | List tasks, filtered | `--status <s>` `--phase <p>` `--parent <wbs>` `--feature <id>` `--folder` `--json` |
47
47
  | `refresh` | Re-scan the corpus and report counts (**`kanban.md` retired** — web Task Kanban is SSOT) | `--folder` `--json` |
48
48
  | `migrate` | One-time A17 corpus normalization pass | `--dry-run` `--folder` `--json` |
49
- | `migrate-anchors` | Qualify in-repo evidence anchors to repo-relative paths (0583 R1–R3) | `--dry-run` `--json` |
49
+ | `migrate-anchors` | Qualify in-repo evidence anchors to repo-relative paths (0583 R1–R3); `--wbs` scopes to one task file (1109 R1); retargets scratch `done_reason` verdict pointers (1140) | `--wbs` `--dry-run` `--json` |
50
50
  | `refresh-roster <wbs>` | Regenerate a parent task's sub-task roster block in `## Plan` | `--folder` `--json` |
51
51
  | `batch-create` | Create many tasks from a validated JSON array | `--file <path>` `--skip-ready` `--agent <selector>` `--folder` `--json` |
52
52
  | `record <wbs>` | Write `Testing` from a verify verdict (deterministic); bare-`## Review` fallback only; optional Solution + transition | `--verdict-file <path>` `--solution-from-diff` `--transition <status>` `--folder` `--json` |
@@ -67,8 +67,11 @@ tasks folder. **Exit codes:** `0` success, `1` error, `2` invalid usage.
67
67
  spur task create "Add email validation" --feature H2 --parent 0040
68
68
  ```
69
69
 
70
- - **`--feature <id>`** wires traceability: it derives the task's `Background` from the feature's
71
- `Goal` and records `feature_id` in frontmatter (L4 traceability reads this edge).
70
+ - **`--feature <id>`** wires traceability: it derives the task's `Background` from the feature's `Goal`
71
+ and records `feature_id` in frontmatter (L4 traceability reads this edge). The parent feature's
72
+ status is checked before any write: `done`/`cancelled` is rejected with the status plus up to three
73
+ `active` sibling ids, and `verifying` is reopened to `active` through the guarded feature transition
74
+ (`featureReopened` in `--json`); `--no-reopen` suppresses only that reopen.
72
75
  - **`--parent <wbs>`** groups the new task under a parent WBS for sub-task decomposition.
73
76
  - **`--template <variant>`** selects the section-matrix variant that shapes the new file's sections:
74
77
  `standard·feature-impl·issue·review·meta·brainstorm`. The default is **`feature-impl` when
@@ -273,7 +276,7 @@ corpus, or with a WBS for one task:
273
276
 
274
277
  ```bash
275
278
  spur task check --json # whole corpus
276
- spur task check 0040 --json # one task
279
+ spur task check 0040 --json # one task; output is an array — read .[0].pass
277
280
  spur task check --strict --json # elevate ALL warnings to failures
278
281
  spur task check 0040 --as done # evaluate as the done row (lifecycle target, F92 R2)
279
282
  spur task check 0040 --strict-core # compatibility alias; not the done gate (use --as done)
@@ -134,6 +134,13 @@ runner (see [validation-and-extension.md](validation-and-extension.md)).
134
134
  | Guard | `always` | Unconditional pass — the default edge condition / fallback transition |
135
135
  | Guard | `action-ok` | Pass iff the prior action on this state/node succeeded — useful for a single hard shell check |
136
136
 
137
+ Spur's host additionally registers (`registerSpurBuiltins`, `packages/app/src/workflow/builtins.ts`):
138
+
139
+ | Kind | Capability |
140
+ | ---- | ---------- |
141
+ | Action | `agent.run` (model call via `spur agent run`; `executor: 'fleet'` dispatches into the agent fleet), `decide` (inline `id`/`method`/`question`/`choices`/`default`/`evidence` → outcome written to `resultFile`; catalog-id references are pending task 1094 — use `spur decision run` for catalog decisions), `command.gate`, `rule.check`, `doctor.probe`, `response.validate`, `proof.fingerprint`, `run.artifact`, `file.exists`, `file.read`, `file.read.into-var`, `http.request`, `hitl.confirm`, `hitl.select`, `hitl.input`, `shell` (streaming) |
142
+ | Guard | `shell` (env-aware), `contract-violation` |
143
+
137
144
  Order matters for both guards and conditions: **the first that passes wins.** Put the discriminating
138
145
  guard before the unconditional fallback (`always` / no-guard edge). For multi-condition gates (doctor
139
146
  + task check, quality gate + attempt cap), prefer a **soft probe** shell that writes PASS|FAIL and
@@ -112,7 +112,7 @@ The skill's logic divides by **whether the LLM adds value**:
112
112
  | `run` | `spur workflow run` (CLI) | `<file> [--run-id <id>] [--vars <json>] [--dry-run] [--async] [--no-plan] [--quiet/--silent/--verbose] [--detail <level>] [--trace-file] [--no-log] [--steer]` | Terminal state reached (sync) or run started (async); trace readable |
113
113
  | `continue` | `spur workflow continue` (CLI) | `[run-id] [--yes] [--answer <yes\|no\|cancel>] [--answer-text <text>] [--async] [--no-log]` | Resume a paused or interrupted run (omit id -> most recent resumable); `--answer` injects a confirm/select gate answer and `--answer-text` answers an input gate with free text (H1 R27), both before guard re-evaluation; one of them is required headless (0901 R3) and each is validated against the pending gate kind; `--async` detaches the resume (0901 R4) |
114
114
  | `cancel` | `spur workflow cancel` (CLI) | `<run-id>` | Single non-terminal run marked failed (SIGTERM async worker when live) |
115
- | `clean` | `spur workflow clean` (CLI) | `[--older-than <min>] [--force] [--logs] [--dry-run]` | Bulk-finalize stale `running`/`pending` runs as failed **and** reclaim retained run logs older than `workflow.logRetentionDays` (30d default) |
115
+ | `clean` | `spur workflow clean` (CLI) | `[--older-than <min>] [--force] [--logs] [--dry-run]` | Bulk-finalize stale `running`/`pending` runs as failed **and** reclaim retained run logs older than `workflows.logRetentionDays` (30d default) |
116
116
  | `list` | `spur workflow list` (CLI) | — | Available workflow **YAML definition files** (not run records) |
117
117
  | `trace` | `spur workflow trace` (CLI) | `[run-id] [--workflow <n>] [--status <s>] [--since <iso>] [--last <n>] [--follow] [--poll <ms>] [--output] [--timeout <ms>]` | Run history list or per-run timeline |
118
118
  | `progress` | `spur workflow progress` (CLI) | `<run-id>` | The `projectWorkflowProgress` projection for that run — current state, per-action attempts, candidate next transitions, diagnostics. Read-only; the verb renders, `packages/app` derives. Unknown run id exits 1 with `Run <id> not found.` |
@@ -273,6 +273,11 @@ spur workflow progress <run-id> [--json]
273
273
  `spur workflow show <file>` renders the declared graph as Mermaid. `--format todo` instead emits a
274
274
  declared-step checklist; `--json` serializes the selected projection. This verb intentionally does
275
275
  not advertise `--json-envelope` because its JSON projection is a kept-raw document surface.
276
+ Task 1104: for annotated definitions the todo `--json` payload also carries `plan` — the two-layer
277
+ A-Z/1-9 phased plan derived from each state's `display` (`phase`/`phaseTitle`/`title`/`show`);
278
+ `null` when no state declares `display`. `workflow validate` enforces the phase table on annotated
279
+ definitions (every non-terminal state phased, terminals bare, ≤25 phases, ≤9 states per phase,
280
+ consistent `phaseTitle`).
276
281
 
277
282
  | Flag (on `run`) | Effect |
278
283
  | --------------- | ------ |
@@ -361,7 +366,7 @@ redirecting `agent.run` stages (ADR-047).
361
366
  - **Stale-run finalization** (existing): bulk-finalizes orphaned `running`/`pending` runs as `failed`.
362
367
  `--older-than <minutes>` (default 30) and `--force` (all non-terminal regardless of age) apply here only.
363
368
  - **Run-log reclamation** (0429): removes expired `.log` files from `.spur/memory/runs/`
364
- and legacy `.spur/run/`, using `workflow.logRetentionDays` (default 30 days). Non-terminal
369
+ and legacy `.spur/run/`, using `workflows.logRetentionDays` (default 30 days). Non-terminal
365
370
  runs, including paused/interrupted runs, are protected; ownership lookup failures preserve logs.
366
371
  The two-file record (`.md` + `.state.json`) and partial handoffs are retained.
367
372
  - **Checkpoint reclamation**: removes expired terminal checkpoints only when confinement,
@@ -49,7 +49,7 @@ its own output and never runs a recurring loop — evaluation is the doctor's jo
49
49
  | feature | Apply accepted rows through `spur feature update --section --from-file`; keep acceptance criteria in Gherkin | [../spur-cli/references/features.md](../spur-cli/references/features.md) |
50
50
  | rule | The trace-driven tuning loop (§ Rule tuning loop) | [../spur-cli/references/rules.md](../spur-cli/references/rules.md) · [fine-tuning](../spur-cli/references/rules/fine-tuning.md) |
51
51
  | workflow | Catalog selection, the composition ladder, and the ADR-115 budgets (§ below) | [../spur-cli/references/workflows.md](../spur-cli/references/workflows.md) · [operations](../spur-cli/references/workflows/operations.md) |
52
- | agent spec | Read through `spur agent list --specs`; specs are materialized from the fleet declaration at serve start | [../spur-cli/references/agent.md](../spur-cli/references/agent.md) |
52
+ | agent spec | Read through `spur agent list --specs`; fleet member specs are derived in memory from `agent.fleet` (never written to `.spur/agents/`) | [../spur-cli/references/agent.md](../spur-cli/references/agent.md) |
53
53
  | board module | Declare under `bootstrap.modules`, gated by the serve preflight (§ Board module composition) | [../spur-cli/references/serve.md](../spur-cli/references/serve.md) |
54
54
 
55
55
  Do not drive the planning→execution lifecycle from here — that is `sp:spur-dev`.
@@ -39,11 +39,7 @@ metadata:
39
39
  It converts vague intent into shipped work by _orchestrating_, not by doing the work itself: it runs
40
40
  the gates (feature-check, batch-create) and the execution pipeline with human-in-the-loop control,
41
41
  and **dispatches deep competency skills** for each unit of work — it never inlines them. Every write
42
- to the corpus goes through a CLI verb that validates before writing — the spine knows _how to drive
43
- the lifecycle_; the competency skills know _how to do each job_; the CLI knows _what is valid_.
44
-
45
- The skill was decomposed **by function** (ADR-028): design, decomposition, implementation, testing,
46
- and verification each became a standalone competency skill, leaving this spine to orchestrate them.
42
+ to the corpus goes through a CLI verb that validates before writing.
47
43
 
48
44
  **Ownership (ADR-054).** This spine owns multi-step lifecycle orchestration — intake, gates,
49
45
  decomposition, pipeline runs, HITL pauses. CLI noun/verb/flag semantics, including
@@ -104,6 +100,21 @@ run. Resume with `spur workflow continue --answer-text <answer>` — the guard a
104
100
  Full procedure: **[references/execution-workflow.md](references/execution-workflow.md)**.
105
101
  Host-session procedure: **[references/inline-pipeline-driver.md](references/inline-pipeline-driver.md)**.
106
102
 
103
+ ## Bootstrap reads
104
+
105
+ Read this `SKILL.md` plus your mode's files below before the first dispatch; everything else under
106
+ `references/` is on demand, and the per-task delegate `inline-pipeline-driver.md` is read at dispatch
107
+ (budgets: `plugins/sp/tests/bootstrap-budget.test.ts`, task 1128).
108
+
109
+ - sequential-inline: `references/execution-batch.md`
110
+ - --worktree: `references/execution-batch.md`, `references/execution-worktree-setup.md`
111
+ - --mode parallel: `references/execution-batch.md`, `references/execution-parallel-isolation.md`
112
+
113
+ `--mode auto` reads as sequential-inline until § 2.4a resolves it.
114
+
115
+ Byte budgets for these sums live in `plugins/sp/tests/bootstrap-budget.test.ts`
116
+ (`BOOTSTRAP_BUDGETS_BYTES`, task 1128); the test fails the build when a mode's bootstrap grows.
117
+
107
118
  ## Step routing
108
119
 
109
120
  Each step delegates to a CLI verb and is documented in exactly one reference file. Read the
@@ -201,10 +212,8 @@ path <wbs> --json` only when another tool needs the absolute path. Never search
201
212
 
202
213
  ## Additional Resources
203
214
 
204
- **Every reference file and its step is listed once, in [Step routing](#step-routing) above — this
205
- section adds what that table has no room for: per-file content summaries and items with no single
206
- step (glossary, config companions).** Read Step routing to find "which file for step X"; read below
207
- for "what's actually in file Y" or for resources that sit outside the step sequence.
215
+ **Every reference file and its step is listed once, in [Step routing](#step-routing) above.** This
216
+ section adds per-file content summaries and items with no single step (glossary, config companions).
208
217
 
209
218
  - Job transfer: [dump/resume](references/dev-operations.md#11a-job-dump).
210
219
 
@@ -212,12 +221,9 @@ for "what's actually in file Y" or for resources that sit outside the step seque
212
221
  corpus, gate, verdict, noun/verb, half, HITL, WBS, section-write contract — canonical term +
213
222
  Avoid list. Owns term definitions only; `cross-cutting.md` owns the process rules that use them.
214
223
  - [references/flag-glossary.md](references/flag-glossary.md) — the shared-flag glossary (one
215
- canonical entry per flag used by two or more `/sp:dev-*` commands) and the `--next` chain
216
- contract. Moved verbatim from `dev-operations.md` (task 0408) so command files can deep-link
217
- flag entries while this spine reads the operation catalog linearly.
224
+ canonical entry per flag used by two or more `/sp:dev-*` commands) and the `--next` chain contract.
218
225
  - [references/gate-checklists.md](references/gate-checklists.md) — checkbox checklists for the
219
- five gates (feature-check, batch-create, precheck, review, verify). Each checklist is a
220
- `- [ ]` list of prerequisites an agent verifies before entering the gate.
226
+ five gates (feature-check, batch-create, precheck, review, verify).
221
227
  - [references/section-batching.md](references/section-batching.md) — the evidence-section
222
228
  **one-writer protocol** (F92 0593 R1/R2): implement owns `Solution`, the review coordinator owns
223
229
  `Review`, deterministic `record` owns `Testing`; skills query `spur task sections` /
@@ -88,6 +88,33 @@ DD-06 permissive start: treat only the core tier as must-ship initially; promote
88
88
  prove important in a later iteration. (When tiered gating lands in `spur feature check`, these tags
89
89
  become the gate input — the CLI stays the validator; this guide stays the convention.)
90
90
 
91
+ ### Home-node tier (structural, exempt from the orphan sweep)
92
+
93
+ A **home node** carries one structural or placement scenario that states *where the work lives*
94
+ (e.g. "work on the kk workflow-run ledger has a home node"). No task can cover that statement — it
95
+ describes planning placement, not behaviour — so tag it `@home-node` to remove it from the
96
+ feature-side DD-09 orphan sweep (`L4.uncovered-feature-scenario`):
97
+
98
+ ```gherkin
99
+ @home-node
100
+ Scenario: R1 — Work on the kk workflow run ledger has a home node
101
+ Given a change that targets the kk workflow run ledger workflow
102
+ When the change is planned as a feature
103
+ Then it is feature G7 or a child feature of G7
104
+ ```
105
+
106
+ Rules:
107
+
108
+ - **Scenario-level tag only.** A `Feature:`-level `@home-node` exempts nothing; the tag is read per
109
+ scenario.
110
+ - **Exempts the orphan sweep only.** Scenario satisfaction (0340), verdict-row matching, and the
111
+ known-issues ratchet are unchanged — a tagged scenario a task actually covers is classified
112
+ exactly as before.
113
+ - **Never a hiding place.** Use it only for a scenario no task can own. A deliberately uncoverable
114
+ *capability* scenario belongs to `@core`/`@edge` and must stay in the sweep: tagging it
115
+ `@home-node` hides a real gap. Wording is never the signal.
116
+ - A feature with **no linked task** is still flagged as `L4.orphan-scenarios`, tagged or not.
117
+
91
118
  ## Scenario-title stability
92
119
 
93
120
  The scenario title is the **identity key** for traceability. When a task references a
@@ -100,9 +127,12 @@ scenario, it matches by title. Rules:
100
127
  - **No synonyms in cross-references.** The title in the feature file and the title in the
101
128
  task's AC reference must be byte-identical.
102
129
  - **Avoid gate vocabulary in titles.** `spur task check` (L4.gate-language) rejects task sections
103
- containing `HITL`, `approval`/`approved`, `merged`/`merge event`, `content-gate`, `GATED`, or
104
- `capstone` as standalone words; task AC bullets copy scenario titles verbatim, so a title using
105
- them fails every child task. Write "pause for an operator answer" instead of "HITL approval".
130
+ containing `HITL`, `merge event`, `content-gate`, `GATED`, or `capstone` as standalone words;
131
+ ambiguous words (`approval`, `approved`, `merged`) warn only when the same sentence also carries
132
+ a gating cue (`until`, `after`, `once`, `before`, `pending`, `blocked`, `wait for`, `requires`)
133
+ — plain composition prose like "the stages merged back into one step" stays silent. Task AC
134
+ bullets copy scenario titles verbatim, so a title using the unconditional tokens fails every
135
+ child task. Write "pause for an operator answer" instead of "HITL approval".
106
136
 
107
137
  ## Verdict AC ↔ feature scenario linkage
108
138
 
@@ -245,25 +245,36 @@ stage is required, select the subprocess path (`--agent auto` or `--agent <name>
245
245
 
246
246
  The workflow-backed dev commands (`dev-run`, `dev-runall`, `dev-refineall`, `dev-verifyall`) share one
247
247
  startup order. The order is load-bearing and applies on both the inline driver and the subprocess
248
- path; skill-only operations (refine/verify batches with no nested workflow) display their owned
248
+ path. Runs that resolve a workflow definition publish the generated plan as their first action
249
+ (1105 R1); skill-only operations (refine/verify batches with no nested workflow) display their owned
249
250
  procedure and do not fabricate a workflow YAML.
250
251
 
251
- 1. **Publish a compact bootstrap checklist immediately** (host-preparation rows, never copied
252
- workflow states): `A, Quick readiness` · `B, Prepare Git` · `C, Publish workflow plan` ·
253
- `D, Comprehensive checking`.
254
- 2. **Quick deterministic readiness (R2), before isolation.** Evaluate `quickReadiness`
252
+ 1. **Publish the generated plan first (1105 R1), before readiness and isolation.** Resolve the
253
+ selected workflow through the same resolver execution uses and run `spur workflow show
254
+ <resolved-file> --no-logo --format todo --json`; the projection reads the definition and executes
255
+ nothing, so publishing it first is safe. Publish every `.plan` row's `text` verbatim (`A Prepare`,
256
+ `B Implement`, `B1 … · precheck`) as the visible host list — never hand-write rows or copy state
257
+ tables into prose. `.plan` is `null` for unannotated workflows: those keep the flat `steps[]`
258
+ inventory with `columnLabel` labels; the skill-only refine/verify batches keep the bootstrap rows
259
+ below.
260
+ 2. **Quick deterministic readiness (R2) — plan row A1, before isolation.** Evaluate `quickReadiness`
255
261
  (`plugins/sp/scripts/batch-preflight.ts`) with the operation, status, filtered-set size, and the
256
262
  selected matrix required/present sections + content-policy findings. This is an admission decision
257
263
  (runnable / needs-refinement / blocked / skipped / invalid), never an implementation certificate.
258
- 3. **Isolation (R3), only when `--worktree` is valid.** After quick readiness and the required Git
259
- safety checks, create/adopt and switch to the execution tree; confirm absolute cwd, branch, base
260
- SHA, and ownership. An invalid/empty target, unsupported mode, ambiguous ownership, or stale target
261
- stops without creating a tree or discarding work. All subsequent tools, agents, corpus writes, and
262
- run artifacts use the confirmed execution tree.
263
- 4. **Publish the workflow inventory (R4), before reading the YAML.** `spur workflow show
264
- <resolved-file> --no-logo --format todo --json`; validate with `parseWorkflowInventory` and bind to
265
- the run's `__definitionDigest` with `assertInventoryIdentity`. Drift or projection failure stops the
266
- run before any comprehensive/model work — never execute with a misleading plan.
264
+ 3. **Isolation (R3) — plan row A2, only when `--worktree` is valid.** After quick readiness and the
265
+ required Git safety checks, create/adopt and switch to the execution tree; confirm absolute cwd,
266
+ branch, base SHA, and ownership. An invalid/empty target, unsupported mode, ambiguous ownership, or
267
+ stale target stops without creating a tree or discarding work. All subsequent tools, agents, corpus
268
+ writes, and run artifacts use the confirmed execution tree.
269
+ 4. **Bind the published plan to the run digest (R4) — plan row A3.** Validate the step-1 projection
270
+ with `parseWorkflowInventory` and bind it to the run's `__definitionDigest` with
271
+ `assertInventoryIdentity`. Drift or projection failure stops the run before any
272
+ comprehensive/model work — never execute with a misleading plan.
273
+
274
+ **Bootstrap rows without a generated plan (1105 R1).** `dev-refineall` and `dev-verifyall` have no
275
+ workflow plan (their phases are map I13 fog), so until phases exist they keep publishing a compact
276
+ host-preparation checklist immediately, never copied workflow states: A Quick readiness, B Prepare
277
+ Git, C Publish workflow plan, D Comprehensive checking.
267
278
  5. **Load execution detail and run comprehensive checks (R7).** Only after the plan is visible (and
268
279
  after isolation when requested) load the full YAML for the active stage and run the owning
269
280
  comprehensive gates at their boundaries. Prefer deterministic checks; invoke semantic model work
@@ -300,6 +311,12 @@ keeps a malformed task out of `testing`/`done`.
300
311
  lifecycle-*run* creation because it is already a run and a nested one would orphan. The structural
301
312
  gate still runs — `→ testing` and `→ done` invoke `spur task check` regardless of the flag.
302
313
 
314
+ **Worktree interaction (1149 R1/R3).** When an interactive `--next` chain runs inside an isolated
315
+ git worktree (`--worktree`), the un-suppressed transitions create a `task-lifecycle` row in the
316
+ worktree DB. When persist-out runs at landing, the terminal row is classified as non-fatal
317
+ bookkeeping (`external-key-conflict-bookkeeping`) so it does not block teardown, and the receiving
318
+ lifecycle row in the invoking tree is automatically reconciled to `done`.
319
+
303
320
  > **Behavior corrected 2026-08-07.** `--no-lifecycle` previously suppressed enforcement as a side
304
321
  > effect of suppressing the run record, because the FSM guards live inside the lifecycle workflow.
305
322
  > Combined with `--force-done` (which waives the verify **verdict** only) it left nothing: a task
@@ -542,6 +559,24 @@ Do not re-run the full suite per iteration, and do not `spur-check` before you h
542
559
  target. **Target:** full `spur-check` runs ≤2 per task (one during iteration, one final) instead of
543
560
  4 across a chain.
544
561
 
562
+ **Isolation rerun for load-flakes (task 1112 review).** Under concurrent fleet load, subprocess-heavy
563
+ tests can exceed bun's 5s default timeout. Five such timeouts were seen during 1112, and each one
564
+ passed when run alone. A full gate that fails *only* on timeouts in tests outside the change scope
565
+ does not earn another full-gate run:
566
+
567
+ 1. Rerun each timed-out test alone: `(cd <workspace> && bun test <file> --test-name-pattern <test>)`.
568
+ 2. **Green alone** → classify it as a load-flake. Cite the gate failure (test, elapsed ms) and the
569
+ isolated pass receipt in the verify evidence. The original full-gate run stands as the single
570
+ final gate.
571
+ 3. **Red alone**, or a failure that is not a timeout → it is a real failure. Fix it.
572
+ 4. Give the test an explicit per-test timeout and a WHY comment (see
573
+ `plugins/sp/tests/inline-run-close-reason.test.ts:100-102`) as soon as EITHER (a) the same test
574
+ load-flakes in two separate runs, OR (b) it times out once **outside the change scope** and then
575
+ passes green alone on three consecutive isolated reruns. Waiting for a second gate run to license
576
+ the fix cost 21 minutes on 2026-10-08 (task 1128, the 1058 two-tree canary: 5145 ms then 5967 ms
577
+ against bun's 5000 ms default, green 3/3 alone). Never raise the global timeout, skip the test,
578
+ or loop full-gate reruns.
579
+
545
580
  ## Auto-Decision Principles
546
581
 
547
582
  Seven principles governing `--auto` mode. `--auto` sets `profile=auto` in the workflow vars; the