@gobing-ai/spur 0.3.95 → 0.3.97

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 (165) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/config/plugin-scripts.json +0 -54
  3. package/config/rules/boundary/sp-script-placement.yaml +19 -0
  4. package/config/rules/strict/runtime-boundaries.yaml +6 -0
  5. package/config/rules/structure/test-location.yaml +2 -0
  6. package/config/rules/typescript/no-syscall-emulation-in-boundary-mock.yaml +1 -1
  7. package/config/rules/typescript/output-boundaries.yaml +15 -2
  8. package/config/script-placement-baseline.json +51 -0
  9. package/config/templates/AGENTS.md +3 -3
  10. package/config/workflows/feature-verification.yaml +1 -1
  11. package/config/workflows/history-anatomy.yaml +23 -11
  12. package/config/workflows/idea-pipeline.yaml +80 -85
  13. package/config/workflows/pr-review.yaml +18 -9
  14. package/config/workflows/task-pipeline.yaml +42 -95
  15. package/config/workflows/wrapup-pipeline.yaml +91 -38
  16. package/package.json +2 -2
  17. package/plugins/sp/README.md +14 -10
  18. package/plugins/sp/agents/super-reviewer.md +43 -18
  19. package/plugins/sp/commands/dev-fixgha.md +83 -0
  20. package/plugins/sp/commands/dev-gitmsg.md +8 -6
  21. package/plugins/sp/commands/dev-gtd.md +2 -2
  22. package/plugins/sp/commands/dev-idea.md +22 -12
  23. package/plugins/sp/commands/dev-job-dump.md +29 -0
  24. package/plugins/sp/commands/dev-job-resume.md +29 -0
  25. package/plugins/sp/commands/dev-plan.md +8 -9
  26. package/plugins/sp/commands/dev-review.md +22 -13
  27. package/plugins/sp/commands/dev-verifyall.md +1 -1
  28. package/plugins/sp/commands/spur-init.md +2 -2
  29. package/plugins/sp/lib/history-anatomy.generated.d.mts +112 -0
  30. package/plugins/sp/lib/history-anatomy.generated.mjs +686 -0
  31. package/plugins/sp/lib/idea-handoff.generated.mjs +5 -4
  32. package/plugins/sp/lib/inline-run.generated.d.mts +11 -0
  33. package/plugins/sp/lib/inline-run.generated.mjs +39 -13
  34. package/plugins/sp/lib/quality-gate.generated.d.mts +104 -0
  35. package/plugins/sp/lib/quality-gate.generated.mjs +445 -0
  36. package/plugins/sp/lib/residual-scan.generated.d.mts +63 -0
  37. package/plugins/sp/lib/residual-scan.generated.mjs +226 -0
  38. package/plugins/sp/lib/spur-bin.ts +36 -0
  39. package/plugins/sp/lib/step-profile.generated.d.mts +71 -0
  40. package/plugins/sp/lib/step-profile.generated.mjs +174 -0
  41. package/plugins/sp/plugin.json +1 -1
  42. package/plugins/sp/references/roles.md +3 -3
  43. package/plugins/sp/scripts/feature-verification-steps.mjs +14 -1
  44. package/plugins/sp/scripts/feature-verification-steps.ts +14 -1
  45. package/plugins/sp/scripts/history-anatomy-cache.mjs +20 -19
  46. package/plugins/sp/scripts/history-anatomy-cache.ts +23 -928
  47. package/plugins/sp/scripts/inline-run-setup.mjs +85 -320
  48. package/plugins/sp/scripts/inline-run-setup.ts +104 -667
  49. package/plugins/sp/scripts/quality-gate.mjs +46 -24
  50. package/plugins/sp/scripts/quality-gate.ts +13 -659
  51. package/plugins/sp/scripts/residual-scan.mjs +179 -174
  52. package/plugins/sp/scripts/residual-scan.ts +125 -517
  53. package/plugins/sp/scripts/script-root.mjs +5 -1
  54. package/plugins/sp/scripts/script-root.ts +5 -1
  55. package/plugins/sp/scripts/workflow-step-profile.mjs +25 -17
  56. package/plugins/sp/scripts/workflow-step-profile.ts +21 -315
  57. package/plugins/sp/scripts/wrapup-drift-probe.mjs +8 -2
  58. package/plugins/sp/scripts/wrapup-drift-probe.ts +3 -2
  59. package/plugins/sp/scripts/wrapup-steps.mjs +72 -33
  60. package/plugins/sp/scripts/wrapup-steps.ts +128 -37
  61. package/plugins/sp/skills/code-improvement/SKILL.md +5 -4
  62. package/plugins/sp/skills/code-verification/SKILL.md +34 -9
  63. package/plugins/sp/skills/code-verification/references/verdict-schema.md +3 -3
  64. package/plugins/sp/skills/functional-review/SKILL.md +7 -4
  65. package/plugins/sp/skills/functional-review/references/verdict-schema.md +1 -1
  66. package/plugins/sp/skills/history-anatomy/references/modes.md +2 -1
  67. package/plugins/sp/skills/next-feature/references/handoff-routing.md +1 -1
  68. package/plugins/sp/skills/next-router/references/routing-table.md +1 -1
  69. package/plugins/sp/skills/source-driven-development/SKILL.md +11 -0
  70. package/plugins/sp/skills/spur-cli/SKILL.md +3 -3
  71. package/plugins/sp/skills/spur-cli/references/agent.md +10 -10
  72. package/plugins/sp/skills/spur-cli/references/features.md +17 -6
  73. package/plugins/sp/skills/spur-cli/references/init.md +17 -16
  74. package/plugins/sp/skills/spur-cli/references/self.md +3 -2
  75. package/plugins/sp/skills/spur-cli/references/serve.md +10 -10
  76. package/plugins/sp/skills/spur-cli/references/tasks/section-editing.md +9 -5
  77. package/plugins/sp/skills/spur-cli/references/tasks/verbs.md +21 -6
  78. package/plugins/sp/skills/spur-cli/references/tasks.md +14 -8
  79. package/plugins/sp/skills/spur-cli/references/workflows.md +17 -14
  80. package/plugins/sp/skills/spur-dev/SKILL.md +2 -0
  81. package/plugins/sp/skills/spur-dev/references/ac-style-guide.md +4 -3
  82. package/plugins/sp/skills/spur-dev/references/cross-cutting.md +14 -10
  83. package/plugins/sp/skills/spur-dev/references/decision-brief.md +1 -1
  84. package/plugins/sp/skills/spur-dev/references/dev-operations.md +165 -75
  85. package/plugins/sp/skills/spur-dev/references/done-housekeeping.md +7 -5
  86. package/plugins/sp/skills/spur-dev/references/execution-batch.md +84 -39
  87. package/plugins/sp/skills/spur-dev/references/execution-workflow.md +8 -12
  88. package/plugins/sp/skills/spur-dev/references/feature-link-helper.md +3 -3
  89. package/plugins/sp/skills/spur-dev/references/flag-glossary.md +40 -21
  90. package/plugins/sp/skills/spur-dev/references/gate-checklists.md +19 -19
  91. package/plugins/sp/skills/spur-dev/references/idea-evaluation.md +4 -3
  92. package/plugins/sp/skills/spur-dev/references/inline-pipeline-driver.md +72 -15
  93. package/plugins/sp/skills/spur-doctor/SKILL.md +1 -1
  94. package/plugins/sp/skills/sys-architecture/SKILL.md +3 -2
  95. package/spur.js +4461 -2085
  96. package/web/_astro/{BoardApp.Cpxntzad.js → BoardApp.Bmv5WkJ9.js} +1 -1
  97. package/web/_astro/BoardApp.vveLOdDq.js +322 -0
  98. package/web/_astro/{TaskDetail.C5bW4WGV.js → TaskDetail.IKc3uDYV.js} +1 -1
  99. package/web/_astro/{arc.CyjRvNMY.js → arc.C63Ufg35.js} +1 -1
  100. package/web/_astro/{architectureDiagram-3BPJPVTR.B4lWRzJA.js → architectureDiagram-3BPJPVTR.CP8Hyldk.js} +1 -1
  101. package/web/_astro/{blockDiagram-GPEHLZMM.Be38USQ2.js → blockDiagram-GPEHLZMM.Bo_48MRA.js} +1 -1
  102. package/web/_astro/{c4Diagram-AAUBKEIU.DT9Fj5Qx.js → c4Diagram-AAUBKEIU.Ch61sw-O.js} +1 -1
  103. package/web/_astro/channel.BKCmJpWM.js +1 -0
  104. package/web/_astro/{chunk-2J33WTMH.SeSBWLg5.js → chunk-2J33WTMH.CHpzS7xf.js} +1 -1
  105. package/web/_astro/{chunk-4BX2VUAB.DoO4VE14.js → chunk-4BX2VUAB.DzMNNWIw.js} +1 -1
  106. package/web/_astro/{chunk-55IACEB6.DrmTFA53.js → chunk-55IACEB6.BqPrDw_Q.js} +1 -1
  107. package/web/_astro/{chunk-727SXJPM.Bi-TUb_V.js → chunk-727SXJPM.ZzBHhNw-.js} +1 -1
  108. package/web/_astro/{chunk-AQP2D5EJ.B-xp8Uhi.js → chunk-AQP2D5EJ.1_O_LLkx.js} +1 -1
  109. package/web/_astro/{chunk-FMBD7UC4.DGWrDnUU.js → chunk-FMBD7UC4.GS4UHg7_.js} +1 -1
  110. package/web/_astro/{chunk-ND2GUHAM._BagvPDy.js → chunk-ND2GUHAM.BnqotN4g.js} +1 -1
  111. package/web/_astro/{chunk-QZHKN3VN.VOboYWQ0.js → chunk-QZHKN3VN.Ghuh8zoJ.js} +1 -1
  112. package/web/_astro/{classDiagram-4FO5ZUOK.D_apfHS7.js → classDiagram-4FO5ZUOK.BW9vC3zg.js} +1 -1
  113. package/web/_astro/{classDiagram-v2-Q7XG4LA2.D_apfHS7.js → classDiagram-v2-Q7XG4LA2.BW9vC3zg.js} +1 -1
  114. package/web/_astro/{cose-bilkent-S5V4N54A.DNLU_L-x.js → cose-bilkent-S5V4N54A.D6jNC0ti.js} +1 -1
  115. package/web/_astro/{cynefin-OW5HDTMX.D8borhV-.js → cynefin-OW5HDTMX.BOGoCs4L.js} +1 -1
  116. package/web/_astro/{dagre-BM42HDAG.Uc0lvjcV.js → dagre-BM42HDAG.8iU5VcWi.js} +1 -1
  117. package/web/_astro/{diagram-2AECGRRQ.DDIxtDBo.js → diagram-2AECGRRQ.CVt88HwH.js} +1 -1
  118. package/web/_astro/{diagram-5GNKFQAL.DVoDnD3H.js → diagram-5GNKFQAL.C9HxUUMl.js} +1 -1
  119. package/web/_astro/{diagram-KO2AKTUF.CRubTJ-0.js → diagram-KO2AKTUF.4ywkQN3t.js} +1 -1
  120. package/web/_astro/{diagram-LMA3HP47.m9SeYcXQ.js → diagram-LMA3HP47.C48A6gpz.js} +1 -1
  121. package/web/_astro/{diagram-OG6HWLK6.C6s2ZjV5.js → diagram-OG6HWLK6.DxFieQW4.js} +1 -1
  122. package/web/_astro/{erDiagram-TEJ5UH35.nSzr5KTj.js → erDiagram-TEJ5UH35.CtjtQqYs.js} +1 -1
  123. package/web/_astro/{flowDiagram-I6XJVG4X.DrZcys16.js → flowDiagram-I6XJVG4X.C5zAiahU.js} +1 -1
  124. package/web/_astro/{ganttDiagram-6RSMTGT7.Do4M1b-K.js → ganttDiagram-6RSMTGT7.D_L6zsny.js} +1 -1
  125. package/web/_astro/{gitGraphDiagram-PVQCEYII.BWc9oJ4l.js → gitGraphDiagram-PVQCEYII.Ignnrk3V.js} +1 -1
  126. package/web/_astro/index.CbNz17Sx.css +1 -0
  127. package/web/_astro/{infoDiagram-5YYISTIA.BIdOctFk.js → infoDiagram-5YYISTIA.DLv8-P5u.js} +1 -1
  128. package/web/_astro/{ishikawaDiagram-YF4QCWOH.CV5SuG2t.js → ishikawaDiagram-YF4QCWOH.p0OTpwFO.js} +1 -1
  129. package/web/_astro/{journeyDiagram-JHISSGLW.CxE-rEJ-.js → journeyDiagram-JHISSGLW.CIaBt-DD.js} +1 -1
  130. package/web/_astro/{kanban-definition-UN3LZRKU.BPRdKWs_.js → kanban-definition-UN3LZRKU.DGySIntq.js} +1 -1
  131. package/web/_astro/{linear.zRsuuDTE.js → linear.BATV4RXu.js} +1 -1
  132. package/web/_astro/{mermaid.core.jAJTcMKc.js → mermaid.core.DzkwM3VX.js} +4 -4
  133. package/web/_astro/{mindmap-definition-RKZ34NQL.BffJxfCr.js → mindmap-definition-RKZ34NQL.3piBRRzA.js} +1 -1
  134. package/web/_astro/{pieDiagram-4H26LBE5.CacwWaE3.js → pieDiagram-4H26LBE5.DUNueLub.js} +1 -1
  135. package/web/_astro/{quadrantDiagram-W4KKPZXB.hXELD06-.js → quadrantDiagram-W4KKPZXB.9bihVbrt.js} +1 -1
  136. package/web/_astro/{requirementDiagram-4Y6WPE33.DdEbPcqT.js → requirementDiagram-4Y6WPE33.CkjsC-YT.js} +1 -1
  137. package/web/_astro/{sankeyDiagram-5OEKKPKP.DgaDocKv.js → sankeyDiagram-5OEKKPKP.Dbq4vaoQ.js} +1 -1
  138. package/web/_astro/{sequenceDiagram-3UESZ5HK.B0KScnAu.js → sequenceDiagram-3UESZ5HK.BivrH99P.js} +1 -1
  139. package/web/_astro/{stateDiagram-AJRCARHV.CV9M_WNc.js → stateDiagram-AJRCARHV.CqLQ1Vzz.js} +1 -1
  140. package/web/_astro/{stateDiagram-v2-BHNVJYJU.BOAo74Et.js → stateDiagram-v2-BHNVJYJU.DvvoLD3b.js} +1 -1
  141. package/web/_astro/{timeline-definition-PNZ67QCA.CqqepUMe.js → timeline-definition-PNZ67QCA.B-KR78gv.js} +1 -1
  142. package/web/_astro/{vennDiagram-CIIHVFJN.DDqe4dOG.js → vennDiagram-CIIHVFJN.Ck0Eieb5.js} +1 -1
  143. package/web/_astro/{wardleyDiagram-YWT4CUSO.B3R9OPdO.js → wardleyDiagram-YWT4CUSO.CRfdd_do.js} +1 -1
  144. package/web/_astro/{xychartDiagram-2RQKCTM6.B3SvgXpQ.js → xychartDiagram-2RQKCTM6.Ck_Jxk9C.js} +1 -1
  145. package/web/index.html +2 -2
  146. package/plugins/sp/lib/artifact-digest.generated.d.mts +0 -7
  147. package/plugins/sp/lib/artifact-digest.generated.mjs +0 -48
  148. package/plugins/sp/scripts/feature-sync-bounded.mjs +0 -301
  149. package/plugins/sp/scripts/feature-sync-bounded.ts +0 -481
  150. package/plugins/sp/scripts/idea-coverage-check.ts +0 -168
  151. package/plugins/sp/scripts/inline-pipeline-parity-check.ts +0 -298
  152. package/plugins/sp/scripts/record-feature-sync.mjs +0 -63
  153. package/plugins/sp/scripts/record-feature-sync.ts +0 -84
  154. package/plugins/sp/scripts/script-contract-check.ts +0 -506
  155. package/plugins/sp/scripts/stage-registry-adapter.ts +0 -1533
  156. package/plugins/sp/scripts/surface-drift-inventory.ts +0 -989
  157. package/plugins/sp/scripts/task-evidence-precheck.ts +0 -189
  158. package/plugins/sp/scripts/task-size-precheck.ts +0 -212
  159. package/plugins/sp/scripts/transition-shim-check.ts +0 -238
  160. package/plugins/sp/scripts/validate-commands.ts +0 -689
  161. package/plugins/sp/scripts/validate-flag-contracts.ts +0 -890
  162. package/plugins/sp/scripts/verify-answer-lint.ts +0 -549
  163. package/web/_astro/BoardApp.BxJuwD7I.js +0 -191
  164. package/web/_astro/channel.CI6N_tCg.js +0 -1
  165. package/web/_astro/index.CENnIEqT.css +0 -1
@@ -2,7 +2,7 @@
2
2
  name: inline-pipeline-driver
3
3
  description: "Interactive host-session interpreter for Spur state-machine pipelines: execute the existing FSM without a workflow agent subprocess while preserving actions, guards, artifacts, and provenance."
4
4
  owner: spur-dev-maintainers
5
- retirement-criterion: "The per-task interpreter retires once the engine covers per-task execution for /sp:dev-runall with real terminal runs and the parity check (plugins/sp/scripts/inline-pipeline-parity-check.ts) is green (D8 decision D7). Batch orchestration wrapper may remain."
5
+ retirement-criterion: "The per-task interpreter retires once the engine covers per-task execution for /sp:dev-runall with real terminal runs and the parity check (scripts/commands/inline-pipeline-parity-check.ts) is green (D8 decision D7). Batch orchestration wrapper may remain."
6
6
  see_also:
7
7
  - spur-dev
8
8
  - execution-workflow
@@ -11,6 +11,10 @@ see_also:
11
11
 
12
12
  # Inline Pipeline Driver
13
13
 
14
+ **Installed-copy drift (1046):** Superskill converts `/sp:dev-*` command spellings to
15
+ `/sp-dev-*` for Codex. After `superskill install sp`, this adapter-only difference remains;
16
+ the interpreter and trace instructions must match. Never hand-edit the installed reference.
17
+
14
18
  **Owner:** `spur-dev-maintainers` (per task 0755 R1). Reach the named owner via the frontmatter; no need to read the originating task.
15
19
 
16
20
  **Retirement criterion (0755 R5, D8 decision D7):** the per-task interpreter retires once the engine covers per-task execution for `/sp:dev-runall` with real terminal runs **and** the parity check (this doc's documented action/guard set ≡ the resolved action/guard set of every `.spur/workflows/*.yaml`) is green. Recording the criterion is part of this task; acting on it is not — that is a separate A3-gate decision.
@@ -18,7 +22,7 @@ see_also:
18
22
  ## Supported action and guard set (0755 R2 parity contract)
19
23
 
20
24
  The action and guard kinds this driver implements. The parity check
21
- (`plugins/sp/scripts/inline-pipeline-parity-check.ts`) compares this set against
25
+ (`scripts/commands/inline-pipeline-parity-check.ts`) compares this set against
22
26
  the resolved actions and guards of every `.spur/workflows/*.yaml`; any element present
23
27
  in one and absent in the other fails the check. Add a new kind here when the driver
24
28
  implements it; remove the entry when the corresponding kind is dropped from the YAML.
@@ -69,8 +73,8 @@ the human/native presentation layer — labels are display addresses only, never
69
73
  1. Resolve the command inputs, `--auto`, and any explicit `--vars` — **without reading the selected
70
74
  YAML yet**. An explicit non-inline executor selection chooses the subprocess workflow path.
71
75
  2. Allocate a collision-resistant inline run id (`uuidgen`, with a timestamp/pid fallback), create
72
- `.spur/run/`, and use the two-file run record (task 0927) — append lines to
73
- `.spur/run/<run-id>.md` and read machine state from `.spur/run/<run-id>.state.json`.
76
+ `.spur/run/` for attempt staging and `.spur/memory/runs/` for retained records, and use the two-file run record (task 0927) — append lines to
77
+ `.spur/memory/runs/<run-id>.md` and read machine state from `.spur/memory/runs/<run-id>.state.json`.
74
78
  3. **Authoritative run identity (task 0804 R1, fail-closed).** Persist the run row through the
75
79
  internal delegate before any stage executes — this is what makes bound `run.artifact` record
76
80
  accept the inline run (0785 R3):
@@ -91,7 +95,7 @@ the human/native presentation layer — labels are display addresses only, never
91
95
  obtains the selected definition from the existing CLI `workflow show --format todo --json`
92
96
  projection and revalidates its schema/name/digest before preserving its source layer.
93
97
  Both paths create-or-attach the row,
94
- and writes the run-record state `.spur/run/<run-id>.state.json` plus the `.md` run-start
98
+ and writes the run-record state `.spur/memory/runs/<run-id>.state.json` plus the `.md` run-start
95
99
  header (task 0927; a legacy pre-0927 run keeps its `<run-id>-inline-setup.json` sidecar).
96
100
  Seed `__runId` and `__definitionDigest`
97
101
  from that state so proof capture and bound registration verify against the persisted identity.
@@ -201,7 +205,7 @@ Expected artifacts per stage (all run-scoped under `.spur/run/<run-id>-*`):
201
205
  | start | `-idea-input.md` (verbatim idea), `-idea-precheck-doctor.status` |
202
206
  | discovery | `-idea-eval-report.md` (with `## Requirement inventory`), `-idea-needs-design.json` |
203
207
  | feature-create | `-idea-feature-id.txt`, `-idea-goal.md`, `-idea-scope.md` |
204
- | ac-generate | `-idea-ac-content.md`, `-idea-ac-check.status`, `-idea-coverage.status` |
208
+ | ac-generate | `-idea-ac-content.md`, `-idea-ac-check.status` |
205
209
  | system-design | `-idea-design-review.md`, `-idea-design-check.status` |
206
210
  | decompose | `-idea-task-batch.json`, `-idea-task-order.json` |
207
211
  | batch-create-run | `-idea-batch-create-result.json`, `-idea-batch-create.done`/`.failed` |
@@ -236,6 +240,19 @@ Start at `initialState`. For each current state, execute its `onEnter` actions i
236
240
  then evaluate outgoing transitions in declaration order and take the first passing guard. Stop only
237
241
  at a declared terminal state or a surfaced HITL pause. The `iterationBound` remains mandatory.
238
242
 
243
+ After each executed action settles, record its boundary before the next action, transition guard,
244
+ or terminal close. Measure its actual duration and preserve its declared failure policy:
245
+
246
+ ```bash
247
+ bun "$SETUP_SCRIPT" --action --run-id "$RUN_ID" --node <state-id> --kind <action-kind> \
248
+ --status <done|failed> --ok <true|false> --duration-ms <measured-ms>
249
+ ```
250
+
251
+ For a multi-action state, `--actions-file` may emit the measured boundaries together before leaving
252
+ that state. Follow [Structured trace emission](#structured-trace-emission-adr-117-task-0868) for the
253
+ payload, delegated `decide` emission and best-effort failure handling. Never retry a failed batch
254
+ or backfill at close; a zero-row done close fails with `NO_ACTION_ROWS`.
255
+
239
256
  Action semantics come from the YAML and the workflow action contract:
240
257
 
241
258
  - `shell` — run the expanded command in the project working tree with resolved vars exported as
@@ -247,6 +264,13 @@ Action semantics come from the YAML and the workflow action contract:
247
264
  actions/guards.
248
265
  - `hitl.confirm` — under `profile=auto`, follow the YAML's auto-skip transition. Otherwise pause,
249
266
  surface the prompt, and resume from the same state with the operator's answer.
267
+ **Host-session rendering:** ask the gate as ONE `AskUserQuestion`
268
+ [decision brief](decision-brief.md), never a typed yes/no. Read the state's evidence (the
269
+ artifacts its prompt names and the recorded `.status` files) and derive the recommendation;
270
+ map options to the `yes` / `no` / `cancel` answers the guards route on, recommended option
271
+ first, each with a one-line reason from that evidence. When a `no` needs operator feedback
272
+ (design-approval's `## Operator feedback`), take it from the operator's notes/"Other" text
273
+ and write it into the named artifact yourself before resuming. Never ask them to edit the file.
250
274
  - `hitl.input` — pause, surface the declared prompt (the agent's operator question, 0933), and
251
275
  resume from the same state with the operator's answer written into the declared var (default
252
276
  `__hitlInput`); the subsequent guards route on answer presence exactly as the engine does.
@@ -273,12 +297,12 @@ Action semantics come from the YAML and the workflow action contract:
273
297
  and pass the same `--feature-file` the run folded in — omitting it, or running from elsewhere,
274
298
  yields a different digest and the mismatch surfaces later as a refused `run.artifact`
275
299
  registration — and the run-scoped review-completion marker exists — then appends one provenance
276
- line to `.spur/run/<run-id>.md` naming the equivalence (artifact kind, path, verdict, digest) and
300
+ line to `.spur/memory/runs/<run-id>.md` naming the equivalence (artifact kind, path, verdict, digest) and
277
301
  proceeds to `spur task record`. A failed validation stops at the state and follows the failure
278
302
  contract; the step is never silently skipped. Artifact-provenance consumers read that run-log
279
303
  line on the inline path — there is no ledger row. The validation also includes **run/definition
280
304
  identity agreement from authoritative evidence** (task 0809 R4): the verdict's `proof.runId` and
281
- `proof.definitionDigest` must agree with the run-record state `.spur/run/<run-id>.state.json`
305
+ `proof.definitionDigest` must agree with the run-record state `.spur/memory/runs/<run-id>.state.json`
282
306
  (legacy pre-0927 runs: `<run-id>-inline-setup.json`) and the persisted run row; if that identity
283
307
  is absent or conflicts, STOP — recreating a row is
284
308
  not a diagnostic operation. The app-service bound-artifact fixture (which writes a real engine
@@ -307,6 +331,18 @@ Action semantics come from the YAML and the workflow action contract:
307
331
  with no `estimate_hours` passes this condition unchanged. The driver reads the frontmatter value
308
332
  directly — never estimates size itself.
309
333
 
334
+ **Diffstat arm (verify only, 1033 R1).** When the current state id is `verify`, condition 5
335
+ fails when the triage diffstat file `.spur/run/<wbs>-diffstat.json` exists and shows a
336
+ small, non-sensitive diff: `([.files, .insertions, .deletions] | all(type == "number")) and
337
+ .files <= 3 and (.insertions + .deletions) <= 60 and
338
+ .sensitive == false` (literal thresholds; the driver reads the file with `jq` — it never
339
+ estimates size itself). A missing, unparsable or `sensitive: true` diffstat leaves condition 5
340
+ as above, so the failure mode is more isolation, never less. A missing or null count also leaves
341
+ condition 5 as above. Below the floor on this arm, the
342
+ run log carries `stage verify executed inline in session <session-id> (below dispatch floor:
343
+ diffstat files <f> lines <n>)`. Only `verify` eligibility changes: `implement` and `review`
344
+ keep the estimate floor, and the pipeline state graph is unchanged.
345
+
310
346
  All five pass → dispatch. Any pre-dispatch failure → execute the stage **once** in the host session.
311
347
  An `agent.run` whose `input` is free-form prose rather than a pure slash command fails condition 2
312
348
  and is never dispatch-eligible: the driver executes it in the host session and logs it with the
@@ -458,7 +494,7 @@ or an operator decision returns a blocker; the host pauses at the current state
458
494
  subagent cannot approve, infer consent, or recursively invoke the full pipeline.
459
495
 
460
496
  After every successful inline `agent.run` action append exactly one provenance line (inline or
461
- subagent form above) to `.spur/run/<run-id>.md`, where `<id>` is the current YAML state id. Also
497
+ subagent form above) to `.spur/memory/runs/<run-id>.md`, where `<id>` is the current YAML state id. Also
462
498
  log start/failure and the ignored timeout value so an inline run remains auditable without
463
499
  fabricating an `AgentRunTracedResult`.
464
500
 
@@ -470,7 +506,7 @@ in one file and makes the run unauditable (task 0726 mixed both forms).
470
506
 
471
507
  ## Structured trace emission (ADR-117, task 0868)
472
508
 
473
- `.spur/run/<run-id>.md` is the human half of the two-file run record — evidence, **not the record
509
+ `.spur/memory/runs/<run-id>.md` is the human half of the two-file run record — evidence, **not the record
474
510
  of truth**. A run's
475
511
  observability is a property of the run, so the inline driver owes the same structured trace the
476
512
  engine subprocess writes — and it owes it through the **same writer**, never a parallel
@@ -500,6 +536,25 @@ The driver reaches it through the existing run delegate (`$SETUP_SCRIPT`,
500
536
  (0887 R8), so `completed_at − started_at == duration_ms` exactly; a back-date failure is
501
537
  recorded (`action.backdate`) and never affects the run.
502
538
 
539
+ - **A state with several actions (1007 R5)** — emit the whole state's boundaries in one call
540
+ instead of one `--action` invocation per action. Write a JSON array
541
+ (`[{node,kind,status,ok,durationMs}, …]` — same fields the `--action` flags carry) to a temp
542
+ file and pass it with `--actions-file`:
543
+
544
+ ```bash
545
+ bun "$SETUP_SCRIPT" --actions-file <actions.json> --run-id "$RUN_ID"
546
+ ```
547
+
548
+ Every row is recorded through the same writer as `--action` (one `action_runs` row per entry);
549
+ the batch is validated in full before the first write, so an invalid row or unreadable file
550
+ exits `1` with `{"ok":false}` and leaves **no** partial rows — fix the batch and re-emit. On
551
+ success it prints `{"ok":true,"runId":…,"recorded":<n>}` and exits `0`. Row emission stays
552
+ best-effort exactly like `--action`: if a row's write fails mid-batch, the failure is recorded
553
+ to the run record and the call reports `{"ok":false,…,"error":…}` but still exits `0` — the run
554
+ continues; never retry the batch or backfill by hand. `--actions-file` is exclusive with the
555
+ other mode flags (`--action`, `--decide`, `--close`, …): mixing them is a usage error (exit 2),
556
+ and a mixed call must be corrected, not silently split.
557
+
503
558
  - **A `decide` action (0941)** — the driver never executes the DecisionMaker itself; it delegates
504
559
  to the same app runner the engine registers, which writes the resultFile row (schemaVersion 1)
505
560
  and returns the decision, then the delegate records the `action_runs` row (`kind=decide`)
@@ -544,7 +599,7 @@ The driver reaches it through the existing run delegate (`$SETUP_SCRIPT`,
544
599
  nothing), and any `done` close with `actionRows ≥ 1` exits `0`.
545
600
 
546
601
  **Best-effort at the action boundary only (ADR-117).** An `--action` persistence failure is
547
- recorded — the delegate appends a `trace-emission-failed` line to `.spur/run/<run-id>.md` and
602
+ recorded — the delegate appends a `trace-emission-failed` line to `.spur/memory/runs/<run-id>.md` and
548
603
  prints `{"ok":false}` on stdout — and the run continues to its declared terminal state; the
549
604
  delegate exits `0` for that outcome and the driver must never treat an emission failure as a run
550
605
  failure, retry it in a loop, or substitute a hand-written row. The run-row closure (`--close`) is
@@ -568,10 +623,12 @@ Order matters for the `testing → done` hop. The A3 batch hit the same clobberi
568
623
  tasks (0617, 0619) because the sections were hand-written **before** the verdict artifact existed:
569
624
 
570
625
  1. **Write the verdict artifact first.** `spur task record --solution-from-diff --transition testing`
571
- reads `.spur/run/<wbs>-verdict.json` (default). With no artifact it emits a **UNKNOWN** verdict and
572
- **overwrites** a hand-authored `## Testing` with an auto-generated "No requirements recorded" table,
573
- plus replaces `## Solution` with a bare auto change-map. Creating the artifact first (PASS, with
574
- requirement rows keyed by scenario title) makes `task record` the compliant path.
626
+ reads `.spur/run/<wbs>-verdict.json` (default attempt output) on every invocation and atomically retains the recorded verdict under `.spur/memory/evidence/`. A missing or malformed artifact
627
+ yields **UNKNOWN**: bare Testing receives a "No requirements recorded" stub, while already-authored
628
+ Testing is preserved. `--solution-from-diff` backfills only a bare Solution. The A3 clobbering above
629
+ describes the historical behavior, corrected by the authored-Testing safeguard. Creating the
630
+ artifact first (PASS, with requirement rows keyed by scenario title) remains the standard order;
631
+ re-running record after a real verdict arrives refreshes Testing from that verdict.
575
632
 
576
633
  ```bash
577
634
  # verdict artifact first (shape: {wbs, verdict, requirements:[{id,status,evidence}], checks:[], source})
@@ -105,7 +105,7 @@ rows stay per file. Flagged rows wait for the operator's answer.
105
105
 
106
106
  ## Workflow step profile and cache-window flags
107
107
 
108
- The step profile (`plugins/sp/scripts/workflow-step-profile`, ADR-065 plugin entrypoint) reads
108
+ The step profile (`plugins/sp/scripts/workflow-step-profile`, ADR-065 plugin entrypoint whose aggregation core lives in `packages/app/src/workflow/step-profile.ts`) reads
109
109
  `spur workflow trace` for a workflow's last N completed, non-dry runs. Per node and action kind it
110
110
  reports run count, executions, p50 and max `durationMs`, p50 idle gap before the step, session mode
111
111
  (`fresh`, `resumed` or `mixed`) and `cacheHit` p50 with its coverage — satellite §10 step evidence.
@@ -73,8 +73,9 @@ codebase (or a named module tree) for **shallow modules and deepening opportunit
73
73
  them as candidates for the planning half. This is a *generator*, not a fixer — it never refactors;
74
74
  it produces a ranked candidate report an operator can turn into a task.
75
75
 
76
- **Not `/sp:dev-review`.** `/sp:dev-review` is a per-task DIFF review (a WBS, forward, findings written
77
- to the task's `## Review`, backed by `sp:code-verification`). The survey has no WBS and no diff — it
76
+ **Not `/sp:dev-review`.** `/sp:dev-review` is a DIFF review of a task set (`--tasks`/`--feature`) or an advisory `--scope` path review
77
+ (task targets: forward, findings written to each task's `## Review`; paths: advisory report, no task
78
+ mutation; backed by `sp:code-verification`). The survey has no task set and no diff — it
78
79
  audits the standing codebase and feeds the planning half. Folding it into `dev-review` would overload
79
80
  that verb and pollute `code-verification` with a codebase scanner; it earns its own operation here.
80
81