@gobing-ai/spur 0.3.93 → 0.3.95

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 (153) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/README.md +42 -0
  3. package/board/index.d.ts +38 -0
  4. package/config/plugin-scripts.json +5 -0
  5. package/config/rules/boundary/test-subpath-boundary.yaml +48 -0
  6. package/config/rules/strict/runtime-boundaries.yaml +2 -1
  7. package/config/rules/structure/protected-files.yaml +4 -0
  8. package/config/workflows/feature-verification.yaml +7 -4
  9. package/config/workflows/idea-pipeline.yaml +10 -4
  10. package/config/workflows/task-pipeline.yaml +71 -52
  11. package/config/workflows/wrapup-pipeline.yaml +92 -17
  12. package/package.json +15 -11
  13. package/plugins/sp/README.md +1 -1
  14. package/plugins/sp/commands/dev-review-session.md +4 -4
  15. package/plugins/sp/commands/dev-review.md +16 -5
  16. package/plugins/sp/commands/dev-verify.md +7 -4
  17. package/plugins/sp/commands/dev-verifyall.md +4 -3
  18. package/plugins/sp/commands/dev-wrap.md +1 -1
  19. package/plugins/sp/hooks/context-post-tool.ts +2 -2
  20. package/plugins/sp/hooks/context-session-start.ts +2 -1
  21. package/plugins/sp/hooks/context-session-stop.ts +22 -14
  22. package/plugins/sp/hooks/pi/guard-extension.ts +112 -172
  23. package/plugins/sp/lib/idea-handoff.generated.mjs +2 -2
  24. package/plugins/sp/lib/inline-run.generated.d.mts +4 -2
  25. package/plugins/sp/lib/inline-run.generated.mjs +35 -14
  26. package/plugins/sp/plugin.json +1 -1
  27. package/plugins/sp/scripts/daily-summary/daily-summary.mjs +3 -3
  28. package/plugins/sp/scripts/daily-summary/daily-summary.ts +3 -3
  29. package/plugins/sp/scripts/dogfood-testing/detect-pipeline-driving.mjs +2 -0
  30. package/plugins/sp/scripts/dogfood-testing/detect-pipeline-driving.ts +1 -0
  31. package/plugins/sp/scripts/dogfood-testing/validate-report.mjs +9 -7
  32. package/plugins/sp/scripts/dogfood-testing/validate-report.ts +8 -7
  33. package/plugins/sp/scripts/feature-sync-bounded.mjs +5 -2
  34. package/plugins/sp/scripts/feature-sync-bounded.ts +3 -1
  35. package/plugins/sp/scripts/feature-verification-steps.ts +6 -6
  36. package/plugins/sp/scripts/history-anatomy-cache.mjs +3 -3
  37. package/plugins/sp/scripts/history-anatomy-cache.ts +4 -4
  38. package/plugins/sp/scripts/inline-run-setup.mjs +60 -12
  39. package/plugins/sp/scripts/inline-run-setup.ts +122 -15
  40. package/plugins/sp/scripts/pr-reviewing.mjs +2 -0
  41. package/plugins/sp/scripts/pr-reviewing.ts +1 -0
  42. package/plugins/sp/scripts/quality-gate.mjs +15 -6
  43. package/plugins/sp/scripts/quality-gate.ts +30 -9
  44. package/plugins/sp/scripts/residual-scan.mjs +4 -4
  45. package/plugins/sp/scripts/residual-scan.ts +5 -4
  46. package/plugins/sp/scripts/script-contract-check.ts +175 -46
  47. package/plugins/sp/scripts/script-root.mjs +125 -0
  48. package/plugins/sp/scripts/script-root.ts +195 -0
  49. package/plugins/sp/scripts/stage-registry-adapter.ts +1 -1
  50. package/plugins/sp/scripts/task-evidence-precheck.ts +4 -2
  51. package/plugins/sp/scripts/task-size-precheck.ts +3 -1
  52. package/plugins/sp/scripts/validate-commands.ts +12 -12
  53. package/plugins/sp/scripts/validate-flag-contracts.ts +42 -30
  54. package/plugins/sp/scripts/verify-answer-lint.ts +3 -1
  55. package/plugins/sp/scripts/workflow-step-profile.mjs +5 -2
  56. package/plugins/sp/scripts/workflow-step-profile.ts +3 -1
  57. package/plugins/sp/scripts/wrapup-drift-probe.mjs +5 -2
  58. package/plugins/sp/scripts/wrapup-drift-probe.ts +4 -2
  59. package/plugins/sp/scripts/wrapup-steps.mjs +32 -8
  60. package/plugins/sp/scripts/wrapup-steps.ts +56 -10
  61. package/plugins/sp/skills/code-verification/SKILL.md +12 -7
  62. package/plugins/sp/skills/code-verification/references/verdict-schema.md +11 -0
  63. package/plugins/sp/skills/functional-review/SKILL.md +1 -1
  64. package/plugins/sp/skills/next-router/references/routing-table.md +1 -1
  65. package/plugins/sp/skills/session-review/SKILL.md +11 -9
  66. package/plugins/sp/skills/spur-cli/references/tasks/verbs.md +9 -1
  67. package/plugins/sp/skills/spur-dev/references/dev-operations.md +8 -2
  68. package/plugins/sp/skills/spur-dev/references/execution-batch.md +65 -17
  69. package/plugins/sp/skills/spur-dev/references/flag-glossary.md +16 -3
  70. package/plugins/sp/skills/spur-dev/references/inline-pipeline-driver.md +22 -5
  71. package/plugins/sp/tsconfig.json +8 -0
  72. package/spur.js +20934 -21087
  73. package/web/_astro/{BoardApp.CerSBgis.js → BoardApp.BxJuwD7I.js} +151 -152
  74. package/web/_astro/BoardApp.Cpxntzad.js +1 -0
  75. package/web/_astro/TaskDetail.C5bW4WGV.js +1 -0
  76. package/web/_astro/_commonjsHelpers.CqkleIqs.js +1 -0
  77. package/web/_astro/arc.CyjRvNMY.js +1 -0
  78. package/web/_astro/architectureDiagram-3BPJPVTR.B4lWRzJA.js +36 -0
  79. package/web/_astro/{blockDiagram-GPEHLZMM.DXVIiv0p.js → blockDiagram-GPEHLZMM.Be38USQ2.js} +1 -1
  80. package/web/_astro/board-facade-react-dom-client.B2U5wMvk.js +1 -0
  81. package/web/_astro/board-facade-react-dom.Cd2MuMhF.js +1 -0
  82. package/web/_astro/board-facade-react-jsx-dev-runtime.B_L3JzfC.js +1 -0
  83. package/web/_astro/board-facade-react-jsx-runtime.BY2yfHRi.js +1 -0
  84. package/web/_astro/board-facade-react-router-dom.Dy5pjzOw.js +1 -0
  85. package/web/_astro/board-facade-react-router.DjjqU27_.js +1 -0
  86. package/web/_astro/board-facade-react.Dgf4GRyj.js +1 -0
  87. package/web/_astro/{c4Diagram-AAUBKEIU.BbF_zCxW.js → c4Diagram-AAUBKEIU.DT9Fj5Qx.js} +1 -1
  88. package/web/_astro/channel.CI6N_tCg.js +1 -0
  89. package/web/_astro/{chunk-2J33WTMH.CAgQHpPC.js → chunk-2J33WTMH.SeSBWLg5.js} +1 -1
  90. package/web/_astro/{chunk-4BX2VUAB.BN-5tpw4.js → chunk-4BX2VUAB.DoO4VE14.js} +1 -1
  91. package/web/_astro/{chunk-55IACEB6.CnPkEEr0.js → chunk-55IACEB6.DrmTFA53.js} +1 -1
  92. package/web/_astro/{chunk-727SXJPM.BQzQeMVm.js → chunk-727SXJPM.Bi-TUb_V.js} +4 -4
  93. package/web/_astro/{chunk-AQP2D5EJ.B6xNyDnL.js → chunk-AQP2D5EJ.B-xp8Uhi.js} +1 -1
  94. package/web/_astro/{chunk-FMBD7UC4.C7f9Ih78.js → chunk-FMBD7UC4.DGWrDnUU.js} +1 -1
  95. package/web/_astro/chunk-JMJ3UQ3L.BQJEJHu4.js +34 -0
  96. package/web/_astro/{chunk-ND2GUHAM.CNV1dFXT.js → chunk-ND2GUHAM._BagvPDy.js} +1 -1
  97. package/web/_astro/{chunk-QZHKN3VN.Cudn2TkJ.js → chunk-QZHKN3VN.VOboYWQ0.js} +1 -1
  98. package/web/_astro/chunk-YNUBSHFH.CxeAygfi.js +7 -0
  99. package/web/_astro/{classDiagram-4FO5ZUOK.D1NwP50q.js → classDiagram-4FO5ZUOK.D_apfHS7.js} +1 -1
  100. package/web/_astro/{classDiagram-v2-Q7XG4LA2.D1NwP50q.js → classDiagram-v2-Q7XG4LA2.D_apfHS7.js} +1 -1
  101. package/web/_astro/client.BhluLQqe.js +1 -0
  102. package/web/_astro/client.DBpSRLnx.js +9 -0
  103. package/web/_astro/cose-bilkent-S5V4N54A.DNLU_L-x.js +1 -0
  104. package/web/_astro/{cynefin-OW5HDTMX.BmK52w8G.js → cynefin-OW5HDTMX.D8borhV-.js} +1 -1
  105. package/web/_astro/{dagre-BM42HDAG.Bfy5CTDT.js → dagre-BM42HDAG.Uc0lvjcV.js} +2 -2
  106. package/web/_astro/diagram-2AECGRRQ.DDIxtDBo.js +43 -0
  107. package/web/_astro/diagram-5GNKFQAL.DVoDnD3H.js +10 -0
  108. package/web/_astro/{diagram-KO2AKTUF.CW_vMJ4z.js → diagram-KO2AKTUF.CRubTJ-0.js} +3 -3
  109. package/web/_astro/{diagram-LMA3HP47.B_8ZGF67.js → diagram-LMA3HP47.m9SeYcXQ.js} +1 -1
  110. package/web/_astro/{diagram-OG6HWLK6.BppnHsdS.js → diagram-OG6HWLK6.C6s2ZjV5.js} +1 -1
  111. package/web/_astro/{erDiagram-TEJ5UH35.BEuHXcjJ.js → erDiagram-TEJ5UH35.nSzr5KTj.js} +5 -5
  112. package/web/_astro/{flowDiagram-I6XJVG4X.CH-UlnGr.js → flowDiagram-I6XJVG4X.DrZcys16.js} +4 -4
  113. package/web/_astro/ganttDiagram-6RSMTGT7.Do4M1b-K.js +292 -0
  114. package/web/_astro/{gitGraphDiagram-PVQCEYII.XnPxPPZN.js → gitGraphDiagram-PVQCEYII.BWc9oJ4l.js} +1 -1
  115. package/web/_astro/index.5dn-Zm-2.js +1 -0
  116. package/web/_astro/index.C-IqPpW2.js +1 -0
  117. package/web/_astro/index.CENnIEqT.css +1 -0
  118. package/web/_astro/index.Cyc_GA4f.js +1 -0
  119. package/web/_astro/index.tZfqwSut.js +1 -0
  120. package/web/_astro/{infoDiagram-5YYISTIA.JyjYRu_T.js → infoDiagram-5YYISTIA.BIdOctFk.js} +1 -1
  121. package/web/_astro/{ishikawaDiagram-YF4QCWOH.BBRBF-Fo.js → ishikawaDiagram-YF4QCWOH.CV5SuG2t.js} +5 -5
  122. package/web/_astro/{journeyDiagram-JHISSGLW.C_iymSyp.js → journeyDiagram-JHISSGLW.CxE-rEJ-.js} +1 -1
  123. package/web/_astro/jsx-runtime.DWOiEOII.js +1 -0
  124. package/web/_astro/{kanban-definition-UN3LZRKU.DdfW-Oqt.js → kanban-definition-UN3LZRKU.BPRdKWs_.js} +7 -7
  125. package/web/_astro/{linear.C2_IkbZT.js → linear.zRsuuDTE.js} +1 -1
  126. package/web/_astro/mermaid.core.jAJTcMKc.js +301 -0
  127. package/web/_astro/{mindmap-definition-RKZ34NQL.DAZIxQSK.js → mindmap-definition-RKZ34NQL.BffJxfCr.js} +2 -2
  128. package/web/_astro/{pieDiagram-4H26LBE5.CN8sIhKM.js → pieDiagram-4H26LBE5.CacwWaE3.js} +3 -3
  129. package/web/_astro/{quadrantDiagram-W4KKPZXB.3dGcX5GP.js → quadrantDiagram-W4KKPZXB.hXELD06-.js} +1 -1
  130. package/web/_astro/{requirementDiagram-4Y6WPE33.BV2y4dd6.js → requirementDiagram-4Y6WPE33.DdEbPcqT.js} +3 -3
  131. package/web/_astro/{sankeyDiagram-5OEKKPKP.Cqo15Tvo.js → sankeyDiagram-5OEKKPKP.DgaDocKv.js} +4 -4
  132. package/web/_astro/{sequenceDiagram-3UESZ5HK.CROCPMJB.js → sequenceDiagram-3UESZ5HK.B0KScnAu.js} +1 -1
  133. package/web/_astro/{stateDiagram-AJRCARHV.RfXZrkFE.js → stateDiagram-AJRCARHV.CV9M_WNc.js} +1 -1
  134. package/web/_astro/{stateDiagram-v2-BHNVJYJU.CPXmbBs9.js → stateDiagram-v2-BHNVJYJU.BOAo74Et.js} +1 -1
  135. package/web/_astro/{timeline-definition-PNZ67QCA.DdgKTiO8.js → timeline-definition-PNZ67QCA.CqqepUMe.js} +3 -3
  136. package/web/_astro/{vennDiagram-CIIHVFJN.CPNVSHF1.js → vennDiagram-CIIHVFJN.DDqe4dOG.js} +5 -5
  137. package/web/_astro/{wardleyDiagram-YWT4CUSO.CQhA0Jyr.js → wardleyDiagram-YWT4CUSO.B3R9OPdO.js} +3 -3
  138. package/web/_astro/{xychartDiagram-2RQKCTM6.n61BWyy4.js → xychartDiagram-2RQKCTM6.B3SvgXpQ.js} +1 -1
  139. package/web/board-runtime.json +69 -0
  140. package/web/index.html +2 -2
  141. package/web/_astro/BoardApp.eoTz0pZs.js +0 -1
  142. package/web/_astro/TaskDetail.DCqiC-OZ.js +0 -1
  143. package/web/_astro/arc.CPwg6Rw0.js +0 -1
  144. package/web/_astro/architectureDiagram-3BPJPVTR.DM_vp_hO.js +0 -36
  145. package/web/_astro/channel.MYZLKNwy.js +0 -1
  146. package/web/_astro/client.yhYJvxCU.js +0 -9
  147. package/web/_astro/cose-bilkent-S5V4N54A.B1wSL-Xb.js +0 -1
  148. package/web/_astro/diagram-2AECGRRQ.DhNnvUvX.js +0 -43
  149. package/web/_astro/diagram-5GNKFQAL.lTX5KwnS.js +0 -10
  150. package/web/_astro/ganttDiagram-6RSMTGT7.BO81S85v.js +0 -292
  151. package/web/_astro/index.De90oHcH.js +0 -1
  152. package/web/_astro/index.Hjbr15fG.css +0 -1
  153. package/web/_astro/mermaid.core.GAOYeSR0.js +0 -303
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: session-review
3
- description: "Review the active coding-agent session: separate resolved from open issues with evidence, propose bounded improvements. With --triage, apply pure-doc / 1–2-line fixes inline and file the rest as one task. Triggers: review this session, wrap-up, triage findings."
3
+ description: "Review the active coding-agent session: separate resolved from open issues with evidence, propose bounded improvements. With --triage, apply pure-doc / 1–2-line fixes inline and file the rest as one or more tasks. Triggers: review this session, wrap-up, triage findings."
4
4
  license: Apache-2.0
5
5
  version: 1.1.0
6
6
  metadata:
@@ -31,7 +31,7 @@ cross-agent windows, recurrence, trends, or quantitative performance forensics.
31
31
  | Argument | Description | Default |
32
32
  | --- | --- | --- |
33
33
  | `[focus]` | Question or operation to emphasize. It changes ordering, not evidence collection. | full active session |
34
- | `--triage` | Opt into bounded remediation after the report: apply direct fixes (pure docs / one-to-two-line fixes) inline, then file all remaining actionable findings as exactly one new task via the CLI-gated corpus surface. | off (report-only) |
34
+ | `--triage` | Opt into bounded remediation after the report: apply direct fixes (pure docs / one-to-two-line fixes) inline, then file all remaining actionable findings as one or more implement-ready tasks via the CLI-gated corpus surface. | off (report-only) |
35
35
 
36
36
  ## Evidence boundary
37
37
 
@@ -64,13 +64,15 @@ three buckets — never skip triage and start fixing from the raw findings list.
64
64
  - **Note** — pre-existing, environmental, or ownerless observations; report only.
65
65
  2. **Apply direct fixes inline** — smallest surgical diff, project style, and re-verify each
66
66
  with the targeted check (lint / test / the exact command that exhibited the issue).
67
- 3. **Create exactly one task** for the Task bucket through the CLI-gated corpus surface
68
- (`spur task create`, then `spur task update <wbs> --section <s> --from-file` per section).
69
- One task, not one per finding: each finding keeps its evidence, a suggested fix direction,
70
- and an AC where verifiable. Exclude what direct fixes already resolved — say so in the task
71
- Background instead.
67
+ 3. **File the Task bucket as one or more tasks** by the shared filing rule in
68
+ [dev-operations.md § 2. review](../spur-dev/references/dev-operations.md#2-review) (Triage
69
+ step 3): one task per cohesive unit one agent can implement and verify in one run, under the
70
+ existing feature that owns the surface (never a new root feature), implement-ready, written
71
+ only through `spur task create --skip-ready` + `spur task update <wbs> --section <s> --from-file`.
72
+ Not one task per finding: each finding keeps its evidence, fix direction, and an AC where
73
+ verifiable. Exclude what direct fixes already resolved — say so in the task Background.
72
74
  4. **Report** — add a Triage section: applied fixes (path + one-line what + verification) and
73
- the created task WBS. The Resolved/Open tables keep their evidence rules unchanged.
75
+ each created task WBS. The Resolved/Open tables keep their evidence rules unchanged.
74
76
 
75
77
  ## Protocol
76
78
 
@@ -156,7 +158,7 @@ improvement. Use `None` when the session is complete and no follow-up is justifi
156
158
  to imported-history analysis.
157
159
  - Report-only by default: do not create or update corpus items or edit files. The single exception
158
160
  is `--triage` mode, which permits exactly two mutation classes — direct fixes from the triage
159
- bucket, and the one triage task. Anything beyond that stays a proposal.
161
+ bucket, and the triage tasks. Anything beyond that stays a proposal.
160
162
  - Do not turn a single low-impact observation into a new policy. Report it as a candidate until it
161
163
  recurs or demonstrates a high-impact contract violation.
162
164
 
@@ -156,7 +156,7 @@ backfill, and a lifecycle transition. Collapses the pipeline's record step to on
156
156
  | ---- | ------ |
157
157
  | `--verdict-file <path>` | Verdict JSON (default `.spur/run/<wbs>-verdict.json`). |
158
158
  | `--solution-from-diff` | Backfill `Solution` from `git diff -U0` **only when Solution is bare**. |
159
- | `--transition <status>` | Optional lifecycle transition after writing. **Never `done`.** |
159
+ | `--transition <status>` | Optional lifecycle transition after writing. `done` is a **guarded** path: it requires a PASS verdict, auto-walks `wip → testing → done`, and auto-creates the pipeline run-link; a non-PASS verdict errors instead of transitioning. |
160
160
 
161
161
  **Verdict shape** (`.spur/run/<wbs>-verdict.json`):
162
162
 
@@ -334,6 +334,14 @@ column to distinguish AC rows from requirement rows:
334
334
  `Status`: `MET` | `PARTIAL` | `UNMET` | `N/A`. `Evidence Type`: `test` | `command` | `static-ref`
335
335
  (or `static`) | `manual-review` (or `manual`) | `llm-judge` (or `judge`) | `n/a` (or `na`).
336
336
 
337
+ **Graduating tasks — one row keyed to both checks (0993).** A task whose linked feature has
338
+ `ac_altitude: graduating` must satisfy two independent id spaces: the feature scenario alias
339
+ `AC-<i>` (which credits the scenario) and the task checkbox id `AC<i>` (which the box flip needs).
340
+ Key the row **`AC<n> — <scenario title>`**, omitting the scenario's own `R<n>` label — then one row
341
+ does both: `normalizeTitle` strips the `AC<n>` prefix so the row still matches the scenario title,
342
+ and `prefixId` normalizes `AC<n>` so the box flips. A bare `AC<n>` credits no scenario; a bare
343
+ `AC-<i>` flips no box; a title carrying the scenario's `R<n>` label matches neither.
344
+
337
345
  **Evidence rule (behavior-bearing AC):** an AC row with `status: MET` on a behavior-bearing id
338
346
  (no `[advisory]`/`[non-core]`/`[non-behavior]`/`[docs-only]` marker) MUST carry `test` or
339
347
  `command` evidence; any other evidence type downgrades the row to `PARTIAL` and caps the verdict.
@@ -68,7 +68,7 @@ each would be scope creep for one-liner procedures.
68
68
  | # | Operation | Command | Backing | Skill / Verb | Arg-hint |
69
69
  | --- | ---------- | ------------------- | ----------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
70
70
  | 1 | unit | `dev-unit` | `Skill()` | `sp:code-testing` | `<target> [--coverage <pct>] [--agent <inline\|auto\|name>] [--auto]` |
71
- | 2 | review | `dev-review` | `Skill()` | `sp:code-verification` (`review`) + `sp:functional-review` + `sp:code-improvement` | `[<wbs\|path>] [--agent <inline\|auto\|name>] [--focus <dims>] [--fix (deprecated)]` |
71
+ | 2 | review | `dev-review` | `Skill()` | `sp:code-verification` (`review`) + `sp:functional-review` + `sp:code-improvement` | `[<wbs\|path>] [--agent <inline\|auto\|name>] [--focus <dims>] [--triage] [--worktree [<name>]]` |
72
72
  | 3 | verify | `dev-verify` | `Skill()` | `sp:code-verification` (`verify`) | `<wbs> [--agent <inline\|auto\|name>] [--fix <none\|blockers-first\|all>] [--focus <lens>] [--bdd] [--auto] [--force] [--next] [--skip-shippable]` |
73
73
  | 3a | verifyall | `dev-verifyall` | `Skill()` → agent | `sp:spur-dev` (`verifyall`) | `--tasks <selector> [--feature <id>] [--agent <inline\|auto\|name>] [--fix <none\|blockers-first\|all>] [--focus <lens>] [--bdd] [--auto] [--force] [--next] [--json] [--skip-shippable] [--worktree [<name>]]` |
74
74
  | 4 | run | `dev-run` | `Skill()` | `sp:spur-dev` (`run` / `implement`) | `<wbs> [--mode <full\|implement>] [--agent <inline\|auto\|name>] [--auto] [--next] [--wrap] [--continue] [--worktree [<name>]]` |
@@ -116,7 +116,13 @@ must not be changed without updating the backing skill.
116
116
  - **Modes:**
117
117
  - **WBS mode (`<wbs>`)**: Runs functional requirements traceability (`sp:functional-review`), SECUA framework (`sp:code-verification`), and architectural depth (`sp:code-improvement`). The three skills return review fragments; the coordinator writes the combined `## Review` (F92 0593 R1).
118
118
  - **Path mode (`<path>`)**: Runs advisory SECUA framework (`sp:code-verification`) and architectural depth (`sp:code-improvement`). Performs no task mutation.
119
- - **Inputs:** `<wbs|path>` (required). Review executes inline (in-session) by default. `--agent <inline|auto|name>` selector accepted (see [SSOT](cross-cutting.md#inline-default-execution-surface)). `--focus <lens>` narrows to one SECUA dimension. Note: `--fix` and `--next` are **deprecated** (no-op with warning; route remediation to `/sp:dev-verify --fix` and progression to `/sp:dev-next`).
119
+ - **Inputs:** `<wbs|path>` (required). Review executes inline (in-session) by default. `--agent <inline|auto|name>` selector accepted (see [SSOT](cross-cutting.md#inline-default-execution-surface)). `--focus <lens>` narrows to one SECUA dimension. `--triage` opts into bounded remediation after the report (below). `--worktree [<name>]` isolates the triage writes (below; requires `--triage`). Note: `--fix` and `--next` are **deprecated** (no-op with warning; route remediation to `--triage` or `/sp:dev-verify --fix` and progression to `/sp:dev-next`). The task pipeline's review stage never passes `--triage` or `--worktree`.
120
+ - **Triage (`--triage`):** runs inline in the invoking session after the merged report — never inside `sp:super-reviewer` or the review skills, which stay report-only. With `--agent <name>`, only the review is delegated; triage still runs inline on the returned findings. Never fix straight from the raw findings list:
121
+ 1. **Bucket every finding exactly once.** **Direct fix** — local, low-risk, obvious root cause: no design choice, no public-surface / schema / dependency change, not a shared write path, verifiable by a targeted check (docs, a guard, a missing throw, a wrong path helper, a stale comment). **Task** — real and actionable but needs design, crosses modules, touches a public surface, or is not verifiable locally; skip it when an existing task already owns it (cite that WBS). **Note** — pre-existing, environmental, or ownerless; report only.
122
+ 2. **Apply direct fixes** — smallest surgical diff in project style, then re-verify each with its targeted check (focused test, lint, or the exact command that exhibited the defect). A fix that grows beyond the bar or fails its check moves to the Task bucket with what was learned; do not leave it half-applied.
123
+ 3. **File the Task bucket as one or more tasks**, one per cohesive unit of work that one agent can implement and verify in one run — split unrelated fixes, merge findings that share a root cause or file set. File under the existing feature that owns the affected surface; if none fits, create a child feature under the closest existing parent — never a new root feature. Write through the CLI-gated corpus surface only (`spur task create --feature <id> --skip-ready`, then `spur task update <wbs> --section <s> --from-file`). Each task must meet the implement-ready bar ([§ 5. refine](#5-refine), `--depth ready`) so it cannot drift: per finding the evidence (`file:line`), the defect, the chosen fix direction with rejected alternatives, file targets, AC, and out-of-scope; promote `backlog → todo` only when `spur task check <wbs> --json` is clean. Name what the direct fixes already resolved in each task's Background.
124
+ 4. **Gate and report.** Run the project gate once after the direct fixes. Report a Triage section: each applied fix (path + one-line what + verification), each filed task (WBS + feature + scope), and the Notes. Never commit or create a branch outside `--worktree`.
125
+ - **Worktree (`--worktree [<name>]`):** omitted → all writes land in the current working tree on the current branch; no branch creation, checkout, or commit (the operator commits). Given → the [execution-batch.md § Worktree isolation](execution-batch.md#worktree-isolation---worktree-name) lifecycle as a run of one: marker `command` = `dev-review`, `selector` = the review target, derived branch/directory slug = the WBS or the path's basename (`sp/review-<slug>-<short-id>`). Admission is "the target resolves" (a known WBS or an existing path) — no `quickReadiness` task-set check. Review and triage both run in the tree; WT-3b commits the fixes and filed tasks. The WT-4 success condition reads as "every direct fix passed its check and the project gate is green"; a failed check or gate takes the WT-5 retention path. Rejected without `--triage` (WT-7) — to review another worktree read-only, pass a path inside it.
120
126
  - **Backing:** `sp:functional-review`, `sp:code-verification` (review mode), `sp:code-improvement`.
121
127
  - **Behavior:** WBS mode runs functional traceability + SECUA + architecture depth, ranking findings P1–P4, and hands the merged report to the review coordinator, which writes `## Review`. Component skills never write `## Review` in coordinated mode. Path mode runs advisory SECUA + architecture depth with no task mutation.
122
128
  - **Delegation:** WBS mode: `sp:functional-review` + `sp:code-verification` (review) + `sp:code-improvement`; Path mode: `sp:code-verification` (review) + `sp:code-improvement`.
@@ -490,16 +490,41 @@ Evidence persistence precedes destructive cleanup: a persistence failure (unread
490
490
  disk-full, missing directory) routes to **WT-5** — the worktree and branch are retained so a green
491
491
  batch can never destroy its own evidence. Reuse mode retains its operator-owned tree but still
492
492
  persists the Step 5 report under the invoking tree; the reused tree's `.spur/run/` remains the live
493
- copy while that tree lives on.
494
-
495
- **Stage records are worktree-local too (0948 R9, E7 Finding 5).** The persisted report and verdict
496
- JSONs above are the batch's *summary* evidence. Each task's own per-stage run record
497
- (`.spur/run/<runId>.md` + `.state.json`, plus gate/answer artifacts) is written inside the
498
- worktree's `.spur/run/` and **is removed with the worktree** in create mode. A merged batch
499
- therefore leaves no per-stage run record in the invoking tree unless it is copied out. Anything
500
- auditing "what did this batch actually run?" must copy those records out **before** WT-4 removal —
501
- the E7 batch lost exactly this evidence this way. The rule is the same one above: copy out first,
502
- then remove; a copy failure retains the worktree.
493
+ copy while that tree lives on. The per-run provenance — the worktree DB's run/action rows and the
494
+ `.spur/run/<runId>.md` + `.state.json` records — is persisted mechanically by WT-4a's
495
+ `inline-run-setup.ts --persist-out --from <worktree> [--task-file <merged-task>]...` call,
496
+ not by hand.
497
+
498
+ **Stage records are worktree-local too (0948 R9, E7 Finding 5; persisted by 0975 R1).** Each task's
499
+ own per-stage run record (`.spur/run/<runId>.md` + `.state.json`) and the worktree DB's run rows are
500
+ written inside the worktree and **are removed with it** in create mode — the E7 batch lost exactly
501
+ this evidence. Copying them out is no longer a manual audit-time duty: WT-4a (create-mode block
502
+ below) runs `inline-run-setup.ts --persist-out --from "$WT_PATH"` **before** WT-4b holder cleanup,
503
+ which copies the run/action/phase/transition/workflow-state rows and both record files into the
504
+ invoking tree.
505
+
506
+ **Cited evidence rides the same call (0984 R1/R2).** The driver forwards each merged task file with
507
+ repeatable `--task-file <path>` (paths resolved in the invoking tree after the FF merge, e.g.
508
+ `spur task show <wbs> --json` → `.filePath`), and persist-out then copies/verifies every literal
509
+ `.spur/run/<file>` that file cites — WBS verdicts, check receipts, test-gate logs, run-ID records —
510
+ so a merged task file never anchors a path that died with the tree. Abbreviated references
511
+ (`fadca099-…`, `run-*-ac87.log`, `{batch-report.md,…}`) are not literal files and carry no
512
+ obligation; neither do root-qualified paths (`knowledge-kit/.spur/run/…`, `/abs/.spur/run/…`),
513
+ which cite another project's evidence — cite foreign run artifacts that way, never bare. A citation missing in BOTH trees, a divergent cited file (never overwritten — reconcile
514
+ by hand), an unreadable task file, or more than 64 distinct cited files fails the pass → WT-5.
515
+
516
+ The shapes are pinned (task 0975 R1; `record-missing` and citation behavior per 0984): idempotent on re-persist;
517
+ success exits 0 printing
518
+ `{"ok":true,"persisted":<n>,"skipped":[{"id":<run-id>,"reason":"id-exists"|"external-key-conflict"|"record-conflict:<file>"|"record-missing:<file>"|"cited-directory:<name>"|"cited-symlink:<name>"|"cited-non-file:<name>"}]}`
519
+ — an `id-exists` / `external-key-conflict` skip never modifies the pre-existing target rows, a
520
+ `record-conflict:<file>` skip never overwrites a divergent invoking-tree record, and a
521
+ `record-missing:<file>` skip is a known `task-lifecycle`/`feature-lifecycle` row with no record file
522
+ at all (its inserted DB row still counts in `persisted` — 0984 R5). Any failure
523
+ exits 1 printing `{"ok":false,"error":<message>}` (a worktree DB run id that is not a single safe
524
+ filename component is rejected before any target write). Any persist-out failure
525
+ routes to **WT-5** — worktree and branch retained — the same copy-out-first contract as the
526
+ verdict persistence above. After a green persist-out, `spur workflow progress --json` in the
527
+ invoking tree shows the merged run `done` with its per-action rows.
503
528
 
504
529
  ## Step 6 — Batch wrap (`--wrap` / `--next`) (F96 task 0952 R1)
505
530
 
@@ -538,7 +563,7 @@ all subsequent tools, agents, task/feature writes, and run artifacts use the con
538
563
  tree's cwd. A stale or empty selector, an unsupported mode, or an invalid target creates no tree and
539
564
  no marker (WT-2/WT-7), and the required Git safety checks (WT-1) still precede creation.
540
565
 
541
- > **Command wiring (task 0814 R3).** The four worktree-capable commands (`dev-run`, `dev-runall`,
566
+ > **Command wiring (task 0814 R3).** The four task-set worktree commands (`dev-run`, `dev-runall`,
542
567
  > `dev-refineall`, `dev-verifyall`) each call `quickReadiness` with their operation (`run`/`refine`/
543
568
  > `verify`), the resolved selector/status, and the filtered-set size **before** WT-1/WT-2. The
544
569
  > admission outcome gates the tree: an invalid/empty selector, unsupported mode, or a target that
@@ -557,6 +582,13 @@ non-PASS verify verdict, or a HITL pause that ends the run take the WT-5 retenti
557
582
  full pipeline is eligible — `--worktree --mode implement` is rejected (WT-7), because that mode is
558
583
  the pipeline's implement stage and already runs in the driver's tree.
559
584
 
585
+ **Review triage `dev-review` (run of one).** `/sp:dev-review <target> --triage --worktree [<name>]`
586
+ runs this lifecycle around one review-plus-triage pass: WT-1…WT-6 apply unchanged, the marker's
587
+ `command` is `dev-review` and its `selector` is the review target, and the slug is the WBS or the
588
+ path's basename (`sp/review-<slug>-<short-id>`). It skips `quickReadiness` (there is no task set;
589
+ admission is "the target resolves"). WT-4 success reads as "every direct fix passed its check and the
590
+ project gate is green"; anything else takes WT-5. Contract: [dev-operations.md § 2. review](dev-operations.md#2-review).
591
+
560
592
  One flag, two modes (see the glossary entry for the ownership rule). Bare `--worktree` is **create
561
593
  mode** (cut a fresh branch + sibling tree). `--worktree <name>` is **reuse mode** (attach to a tree
562
594
  that already exists); name resolution (§ WT-2 below) runs before WT-1. The deltas each mode applies
@@ -805,13 +837,27 @@ git checkout "$BASE_REF"
805
837
  [ "$(git rev-list --count "$BASE_SHA..$BRANCH")" -gt 0 ] \
806
838
  || { echo "halt: branch carries no commits - nothing to merge" >&2; false; } # -> WT-5
807
839
  git merge --ff-only "$BRANCH" # FF-only: never rebase, merge-commit, or resolve conflicts
808
- # if FF succeeded — WT-4a evidence persistence (Step 5, task 0720 R3) runs FIRST:
809
- # persist the batch report + verdict artifacts into the invoking tree's .spur/run/
810
- # before anything below touches the worktree. Persistence failure routes to WT-5.
840
+ # if FF succeeded — WT-4a evidence persistence runs FIRST (Step 5, task 0720 R3):
841
+ # persist the batch report + verdict artifacts AND the per-run provenance (task
842
+ # 0975 R1) into the invoking tree before anything below touches the worktree.
843
+ # Any persistence failure routes to WT-5 — the worktree and branch are retained.
844
+ WT_PATH="$(cd "../<worktree-dir>" && pwd)" # hoisted: needed by WT-4a AND WT-4b below
845
+ # WT-4a provenance persist-out (task 0975 R1): copy the worktree DB's run rows plus
846
+ # the .spur/run/<runId>.md + .state.json records into THIS tree. Run from the main
847
+ # tree (cwd = the invoking tree). --task-file (0984 R2) forwards each merged task
848
+ # file (post-merge path) so the cited .spur/run/<file> evidence is copied/verified
849
+ # too. Resolve the merged path(s) BEFORE this block — an empty value exits 2:
850
+ # TASK_FILE="$(spur task show <wbs> --json | jq -r .filePath)" # per done task;
851
+ # build TASK_FILE_ARGS=(--task-file "$TASK_FILE") # one flag each
852
+ # Idempotent; conflicts are reported, never overwritten. A non-zero exit —
853
+ # including an unresolved or divergent citation, or a half-readable worktree — must
854
+ # NOT proceed to WT-4b removal:
855
+ SETUP_SCRIPT=plugins/sp/scripts/inline-run-setup.ts; [ -f config/plugin-scripts.json -a -f "$SETUP_SCRIPT" ] || SETUP_SCRIPT="$(superskill script path sp inline-run-setup.mjs 2>/dev/null)"
856
+ bun "$SETUP_SCRIPT" --persist-out --from "$WT_PATH" "${TASK_FILE_ARGS[@]}" \
857
+ || { echo "halt: worktree run-record persist-out failed - worktree retained (WT-5)" >&2; exit 1; }
811
858
  #
812
- # WT-4b — bounded CWD-holder cleanup (task 0720 R1). Resolve the EXACT absolute
813
- # worktree path; a relative path or a stale entry matches the wrong processes.
814
- WT_PATH="$(cd "../<worktree-dir>" && pwd)"
859
+ # WT-4b — bounded CWD-holder cleanup (task 0720 R1). $WT_PATH above is the EXACT
860
+ # absolute worktree path; a relative path or a stale entry matches the wrong processes.
815
861
  # Holders = processes with any open fd under the worktree tree (lsof +D walks the
816
862
  # tree; CWD holders are the common case but +D also catches open-file holders —
817
863
  # over-match errs toward removal success; a plain -t <dir> matches only the
@@ -976,6 +1022,8 @@ fallback, because `<name>` was explicit and unambiguous intent.
976
1022
  - **`--mode implement`** is rejected when combined with `--worktree` on `dev-run` — that mode *is*
977
1023
  the pipeline's implement stage (bug-742) and runs in whatever tree the driver set up; a second
978
1024
  worktree would split one task's evidence across two trees.
1025
+ - **`dev-review` without `--triage`** is rejected when combined with `--worktree` — a read-only
1026
+ review writes nothing worth isolating; review another worktree by passing a path inside it.
979
1027
  - **No** create-with-name (`--worktree <name>` never creates; an unresolvable name is an error),
980
1028
  no `--worktree-keep` variant, no auto-cleanup of stale worktrees or markers from prior runs.
981
1029
 
@@ -410,6 +410,17 @@ Full checklist: [dev-operations.md](dev-operations.md) § refine (depth ready).
410
410
  Use the task's Gherkin scenarios as the verification lens on verify-family commands (`dev-verify`,
411
411
  `dev-verifyall`).
412
412
 
413
+ ### `--triage` — fix small findings, file the rest as tasks
414
+
415
+ **Anchor:** `#flag-triage`.
416
+
417
+ Review commands (`dev-review`, `dev-review-session`): after the report, bucket every finding once
418
+ (direct fix / task / note), apply the direct fixes inline with a targeted check each, and file the
419
+ remainder through `spur task` — never fix straight from the raw findings list. Off by default
420
+ (report-only). Both file one or more implement-ready tasks sized per cohesive unit, under existing
421
+ features ([dev-operations.md § 2. review](dev-operations.md#2-review)); `dev-review-session` keeps
422
+ the stricter direct-fix bar (pure docs / one-to-two-line fixes).
423
+
413
424
  ### `--approve-taste` — pre-clear all taste gates this run
414
425
 
415
426
  **Anchor:** `#flag-approve-taste`.
@@ -422,9 +433,11 @@ flag sets both.
422
433
 
423
434
  **Anchor:** `#flag-worktree`.
424
435
 
425
- Batch commands plus single-task `dev-run` (`dev-refineall`, `dev-runall`, `dev-verifyall`,
426
- `dev-run`): run the entire driver loop inside an isolated git worktree instead of the operator's
427
- working directory. One flag, two modes:
436
+ Batch commands plus single-task `dev-run` and review triage (`dev-refineall`, `dev-runall`,
437
+ `dev-verifyall`, `dev-run`, `dev-review`): run the entire driver loop inside an isolated git
438
+ worktree instead of the operator's working directory. On `dev-review` the flag requires `--triage`
439
+ and wraps the review-plus-triage pass
440
+ ([dev-operations.md § 2. review](dev-operations.md#2-review)). One flag, two modes:
428
441
 
429
442
  - **Create mode** — bare `--worktree` (no value). Cut a fresh branch from the current HEAD's ref,
430
443
  create a sibling worktree with a derived name, run the batch there. On a fully successful batch
@@ -76,11 +76,14 @@ the human/native presentation layer — labels are display addresses only, never
76
76
  accept the inline run (0785 R3):
77
77
 
78
78
  ```bash
79
- SETUP_SCRIPT="plugins/sp/scripts/inline-run-setup.ts";
80
- [ -f "$SETUP_SCRIPT" ] || SETUP_SCRIPT="$(superskill script path sp inline-run-setup.mjs 2>/dev/null)";
79
+ SETUP_SCRIPT=plugins/sp/scripts/inline-run-setup.ts; [ -f config/plugin-scripts.json -a -f "$SETUP_SCRIPT" ] || SETUP_SCRIPT="$(superskill script path sp inline-run-setup.mjs 2>/dev/null)";
80
+ # 0960 R2: record the run's script-resolution identity beside the run row (the same file the
81
+ # pipelines' run-start action writes) so the inline path carries the same provenance.
82
+ RS=plugins/sp/scripts/script-root.ts; [ -f config/plugin-scripts.json -a -f "$RS" ] || RS="$(superskill script path sp script-root.mjs 2>/dev/null)";
83
+ RUNNER=bun; case "$RS" in *.mjs) RUNNER=node ;; esac; [ -f "$RS" ] && "$RUNNER" "$RS" --run-id "$RUN_ID" || echo "script-root failed closed — run 'superskill install sp --marketplace gobing-ai/spur'" >&2
81
84
  [ -n "$SETUP_SCRIPT" ] && [ -f "$SETUP_SCRIPT" ] && \
82
85
  bun "$SETUP_SCRIPT" --run-id "$RUN_ID" --file <selected-pipeline-yaml> \
83
- || { echo "inline run setup failed closed — checker not found; run 'superskill install sp'" >&2; exit 1; }
86
+ || { echo "inline run setup failed closed — checker not found; run 'superskill install sp --marketplace gobing-ai/spur'" >&2; exit 1; }
84
87
  ```
85
88
 
86
89
  The delegate uses the source app service when the SPUR_BIN chain identifies a checkout;
@@ -511,7 +514,10 @@ The driver reaches it through the existing run delegate (`$SETUP_SCRIPT`,
511
514
  against the project workdir. The decision never pauses and never fails the run for model
512
515
  problems: a degraded outcome (feature switch off, no backend, error, timeout, low confidence)
513
516
  prints `ok:true` with `degraded:true`, the declared `reason`, and `value = default`, and exits
514
- `0` — route on the resultFile's `.value` with the declared file guards. Only an invalid options
517
+ `0` — route on the resultFile's `.value` with the declared file guards. Every row carries
518
+ `source: model|default` (0976 R2), and the delegate appends
519
+ `decide node=<id> value=<v> source=<s> reason=<r>` to the run log, so a declared-default
520
+ fallback is never read as a model decision. Only an invalid options
515
521
  schema exits `1` (fail closed), and usage errors exit `2`. The `action_runs` trace row is
516
522
  best-effort exactly like `--action`.
517
523
 
@@ -524,7 +530,18 @@ The driver reaches it through the existing run delegate (`$SETUP_SCRIPT`,
524
530
  ```
525
531
 
526
532
  `--status` is the declared terminal state's verdict, not a guess: a run that reached a terminal
527
- state is `done`; a run halted by a failing action under its error policy is `failed`.
533
+ state is `done`; a run halted by a failing action under its error policy is `failed`. On success
534
+ the close reports the recorded evidence: `{"ok":true,"runId":…,"actionRows":<n>}`.
535
+
536
+ **Zero-row done closes are a named failure (task 0975 R2).** A run closed `done` with **zero**
537
+ `action_runs` rows (`actionRows:0`) finalizes the row but exits `1` with
538
+ `{"ok":false,"code":"NO_ACTION_ROWS","actionRows":0}` — a run that claims success without a
539
+ single recorded action is exactly the untraced-runs gap ADR-117 closes, so the driver must
540
+ surface the code in its final report instead of reporting a clean close. The failure must NOT
541
+ be repaired by backfilling rows: the run row is already terminal, and hand-written rows are
542
+ forbidden (ADR-117) — record the finding and let the task's evidence show the gap. A `failed`
543
+ close with zero rows stays a clean `0` (a halt before the first boundary legitimately records
544
+ nothing), and any `done` close with `actionRows ≥ 1` exits `0`.
528
545
 
529
546
  **Best-effort at the action boundary only (ADR-117).** An `--action` persistence failure is
530
547
  recorded — the delegate appends a `trace-emission-failed` line to `.spur/run/<run-id>.md` and
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "../../tooling/typescript/base.json",
3
+ "compilerOptions": {
4
+ "types": ["bun"],
5
+ "paths": { "@gobing-ai/spur-app": ["../../packages/app/src/index.ts"] }
6
+ },
7
+ "include": ["**/*.ts"]
8
+ }