@gobing-ai/spur 0.4.15 → 0.4.17

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 (107) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/config/config.global.yaml +21 -8
  3. package/config/decisions/executor.yaml +53 -0
  4. package/config/decisions/task-pipeline.yaml +44 -28
  5. package/config/workflows/task-pipeline.yaml +66 -54
  6. package/package.json +11 -10
  7. package/plugins/sp/README.md +4 -4
  8. package/plugins/sp/agents/expert-spur.md +3 -0
  9. package/plugins/sp/agents/super-planner.md +5 -1
  10. package/plugins/sp/agents/super-reviewer.md +43 -12
  11. package/plugins/sp/commands/dev-find-conflict.md +18 -6
  12. package/plugins/sp/commands/dev-fixall.md +7 -2
  13. package/plugins/sp/commands/dev-idea.md +6 -1
  14. package/plugins/sp/commands/dev-run.md +3 -0
  15. package/plugins/sp/commands/dev-runall.md +6 -3
  16. package/plugins/sp/commands/dev-verify.md +1 -1
  17. package/plugins/sp/plugin.json +1 -1
  18. package/plugins/sp/skills/code-implementation/SKILL.md +8 -8
  19. package/plugins/sp/skills/code-improvement/SKILL.md +3 -3
  20. package/plugins/sp/skills/code-review/references/verification-before-completion.md +5 -4
  21. package/plugins/sp/skills/code-verification/SKILL.md +4 -4
  22. package/plugins/sp/skills/code-verification/references/verdict-schema.md +27 -11
  23. package/plugins/sp/skills/conflict-finding/SKILL.md +46 -16
  24. package/plugins/sp/skills/conflict-finding/references/comparison-protocol.md +4 -2
  25. package/plugins/sp/skills/conflict-finding/references/finding-contract.md +2 -2
  26. package/plugins/sp/skills/conflict-finding/references/remediation-routing.md +22 -3
  27. package/plugins/sp/skills/fleet-join/SKILL.md +2 -0
  28. package/plugins/sp/skills/functional-review/SKILL.md +1 -1
  29. package/plugins/sp/skills/functional-review/references/verdict-schema.md +1 -1
  30. package/plugins/sp/skills/next-router/references/routing-table.md +1 -1
  31. package/plugins/sp/skills/spur-check/SKILL.md +1 -1
  32. package/plugins/sp/skills/spur-cli/SKILL.md +23 -2
  33. package/plugins/sp/skills/spur-cli/references/agent.md +12 -0
  34. package/plugins/sp/skills/spur-cli/references/decision/lifecycle.md +166 -0
  35. package/plugins/sp/skills/spur-cli/references/decision.md +146 -16
  36. package/plugins/sp/skills/spur-cli/references/features.md +12 -0
  37. package/plugins/sp/skills/spur-cli/references/rules.md +2 -0
  38. package/plugins/sp/skills/spur-cli/references/tasks.md +13 -0
  39. package/plugins/sp/skills/spur-cli/references/workflows/authoring-workflows.md +1 -1
  40. package/plugins/sp/skills/spur-cli/references/workflows/workflow-fit-and-tuning.md +3 -2
  41. package/plugins/sp/skills/spur-cli/references/workflows.md +9 -0
  42. package/plugins/sp/skills/spur-composer/SKILL.md +20 -1
  43. package/plugins/sp/skills/spur-dev/SKILL.md +16 -16
  44. package/plugins/sp/skills/spur-dev/references/cross-cutting.md +5 -4
  45. package/plugins/sp/skills/spur-dev/references/decision-points.md +97 -0
  46. package/plugins/sp/skills/spur-dev/references/dev-operations.md +9 -9
  47. package/plugins/sp/skills/spur-dev/references/execution-batch-report.md +1 -1
  48. package/plugins/sp/skills/spur-dev/references/execution-batch.md +13 -3
  49. package/plugins/sp/skills/spur-dev/references/execution-parallel-isolation.md +4 -4
  50. package/plugins/sp/skills/spur-dev/references/execution-workflow.md +41 -29
  51. package/plugins/sp/skills/spur-dev/references/execution-worktree-landing.md +33 -0
  52. package/plugins/sp/skills/spur-dev/references/flag-glossary.md +11 -10
  53. package/plugins/sp/skills/spur-dev/references/gate-checklists.md +3 -2
  54. package/plugins/sp/skills/spur-dev/references/glossary.md +12 -3
  55. package/plugins/sp/skills/spur-doctor/SKILL.md +23 -0
  56. package/spur.js +7378 -6052
  57. package/web/_astro/{BoardApp.Bjdp3XWV.js → BoardApp.CC7Mwswv.js} +65 -65
  58. package/web/_astro/{BoardApp.DCDZxLlQ.js → BoardApp.mWyrWCAR.js} +1 -1
  59. package/web/_astro/{TaskDetail.B3vBxynO.js → TaskDetail.CtAXuiv8.js} +1 -1
  60. package/web/_astro/{arc.DcuHTB_T.js → arc.Duf4u60i.js} +1 -1
  61. package/web/_astro/{architectureDiagram-3BPJPVTR.ClOFWBON.js → architectureDiagram-3BPJPVTR.JoymtqxN.js} +1 -1
  62. package/web/_astro/{blockDiagram-GPEHLZMM.otYyr7Zb.js → blockDiagram-GPEHLZMM.BvmhcioC.js} +1 -1
  63. package/web/_astro/{c4Diagram-AAUBKEIU.BCjpc9LP.js → c4Diagram-AAUBKEIU.CfaWkgoQ.js} +1 -1
  64. package/web/_astro/channel.DtEPXXcH.js +1 -0
  65. package/web/_astro/{chunk-2J33WTMH.D5Wpnpt_.js → chunk-2J33WTMH.B7uR02cD.js} +1 -1
  66. package/web/_astro/{chunk-4BX2VUAB.DkQGtWNz.js → chunk-4BX2VUAB.SwiEauYR.js} +1 -1
  67. package/web/_astro/{chunk-55IACEB6.B7dqjAip.js → chunk-55IACEB6.6ZRCK8PO.js} +1 -1
  68. package/web/_astro/{chunk-727SXJPM.BDQvnKE2.js → chunk-727SXJPM.Cxra_G3N.js} +1 -1
  69. package/web/_astro/{chunk-AQP2D5EJ.D92doBX5.js → chunk-AQP2D5EJ.Cxd7gZeX.js} +1 -1
  70. package/web/_astro/{chunk-FMBD7UC4.C968oI5G.js → chunk-FMBD7UC4.DCLhFkVc.js} +1 -1
  71. package/web/_astro/{chunk-ND2GUHAM.AkkYC1bY.js → chunk-ND2GUHAM.B9AmKcv6.js} +1 -1
  72. package/web/_astro/{chunk-QZHKN3VN.sCc-rKKo.js → chunk-QZHKN3VN.DOjCvl6S.js} +1 -1
  73. package/web/_astro/{classDiagram-4FO5ZUOK.pOQ9u0mY.js → classDiagram-4FO5ZUOK.BMiT_mNf.js} +1 -1
  74. package/web/_astro/{classDiagram-v2-Q7XG4LA2.pOQ9u0mY.js → classDiagram-v2-Q7XG4LA2.BMiT_mNf.js} +1 -1
  75. package/web/_astro/{cose-bilkent-S5V4N54A.CRaeD6FY.js → cose-bilkent-S5V4N54A.mLBCEGjI.js} +1 -1
  76. package/web/_astro/{cynefin-OW5HDTMX.BiCPBu54.js → cynefin-OW5HDTMX.CjDAY0qn.js} +1 -1
  77. package/web/_astro/{dagre-BM42HDAG.C1-q3vkT.js → dagre-BM42HDAG._G_sP8fP.js} +1 -1
  78. package/web/_astro/{diagram-2AECGRRQ.BSVOv30O.js → diagram-2AECGRRQ.39OcfSuz.js} +1 -1
  79. package/web/_astro/{diagram-5GNKFQAL.CHMkjJ-V.js → diagram-5GNKFQAL.D7v_eNC4.js} +1 -1
  80. package/web/_astro/{diagram-KO2AKTUF.CKY9M564.js → diagram-KO2AKTUF.Da1x-lhg.js} +1 -1
  81. package/web/_astro/{diagram-LMA3HP47.B9yNJiTP.js → diagram-LMA3HP47.C8EnzbEb.js} +1 -1
  82. package/web/_astro/{diagram-OG6HWLK6.Dk8AUGsk.js → diagram-OG6HWLK6.DPnBj69F.js} +1 -1
  83. package/web/_astro/{erDiagram-TEJ5UH35.BQHR89TZ.js → erDiagram-TEJ5UH35.CXMu2TIh.js} +1 -1
  84. package/web/_astro/{flowDiagram-I6XJVG4X.oNkWVgoK.js → flowDiagram-I6XJVG4X.ZklePVtQ.js} +1 -1
  85. package/web/_astro/{ganttDiagram-6RSMTGT7.Kz2U2nu9.js → ganttDiagram-6RSMTGT7.BhYOkdqk.js} +1 -1
  86. package/web/_astro/{gitGraphDiagram-PVQCEYII.DHIZ_wPq.js → gitGraphDiagram-PVQCEYII.CADyX8a1.js} +1 -1
  87. package/web/_astro/{infoDiagram-5YYISTIA.D0NJLcv9.js → infoDiagram-5YYISTIA.BsdmwjHt.js} +1 -1
  88. package/web/_astro/{ishikawaDiagram-YF4QCWOH.CFEfTWRG.js → ishikawaDiagram-YF4QCWOH.CzjZ3Crd.js} +1 -1
  89. package/web/_astro/{journeyDiagram-JHISSGLW.Dc7IE7I4.js → journeyDiagram-JHISSGLW.Bxj-ZH_t.js} +1 -1
  90. package/web/_astro/{kanban-definition-UN3LZRKU.D5v0xO9k.js → kanban-definition-UN3LZRKU.Cbg3wVvX.js} +1 -1
  91. package/web/_astro/{linear.wR5KzXnE.js → linear.DJNUrBI9.js} +1 -1
  92. package/web/_astro/{mermaid.core.BDQ2FoPd.js → mermaid.core.DVHQV3SF.js} +4 -4
  93. package/web/_astro/{mindmap-definition-RKZ34NQL.W6_INsia.js → mindmap-definition-RKZ34NQL.DyomosRU.js} +1 -1
  94. package/web/_astro/{pieDiagram-4H26LBE5.61ihbgkK.js → pieDiagram-4H26LBE5.DajtFknN.js} +1 -1
  95. package/web/_astro/{quadrantDiagram-W4KKPZXB.B5lEpFLo.js → quadrantDiagram-W4KKPZXB.Bjq6SjGe.js} +1 -1
  96. package/web/_astro/{requirementDiagram-4Y6WPE33.CmhVBVX0.js → requirementDiagram-4Y6WPE33.ubBVqGLP.js} +1 -1
  97. package/web/_astro/{sankeyDiagram-5OEKKPKP.D7Vvj9Wf.js → sankeyDiagram-5OEKKPKP.I4q46xd-.js} +1 -1
  98. package/web/_astro/{sequenceDiagram-3UESZ5HK.B1vPLixM.js → sequenceDiagram-3UESZ5HK.DsCgZIa8.js} +1 -1
  99. package/web/_astro/{stateDiagram-AJRCARHV.BnACmrGi.js → stateDiagram-AJRCARHV.DcYjYSqT.js} +1 -1
  100. package/web/_astro/{stateDiagram-v2-BHNVJYJU.CW4pnmc3.js → stateDiagram-v2-BHNVJYJU.Dt8yPqiS.js} +1 -1
  101. package/web/_astro/{timeline-definition-PNZ67QCA.CkzMCPnC.js → timeline-definition-PNZ67QCA.0YTkoa5F.js} +1 -1
  102. package/web/_astro/{vennDiagram-CIIHVFJN.CY4aNdAR.js → vennDiagram-CIIHVFJN.BNl0l1hs.js} +1 -1
  103. package/web/_astro/{wardleyDiagram-YWT4CUSO.BtoU9UFk.js → wardleyDiagram-YWT4CUSO.BYSX6cfn.js} +1 -1
  104. package/web/_astro/{xychartDiagram-2RQKCTM6._9ijUUAs.js → xychartDiagram-2RQKCTM6.DzxxpixK.js} +1 -1
  105. package/web/index.html +1 -1
  106. package/worker/laya_worker.py +219 -0
  107. package/web/_astro/channel.qgOLXjI_.js +0 -1
@@ -70,8 +70,10 @@ Only when invoked under the pipeline do blocker/major findings block a gate.
70
70
 
71
71
  Invoked by `task-pipeline.yaml`'s `review` step. The pipeline hands you the task WBS and the
72
72
  `--focus` dimensions. You run the review, write findings to the task's `## Review` section, and
73
- return a PASS/PARTIAL/FAIL verdict to the pipeline's `approve(HITL)` gate. `blocker`/`major`
74
- findings block the gate; `minor`/`advisory` are recorded but do not block.
73
+ return a PASS/PARTIAL/FAIL verdict. `spur task verdict` certifies the answer; a PASS then reaches the
74
+ approval decision point before `done`, and a non-PASS feeds the `review-failure-class` decision
75
+ (`fix` → `remediate`, `stop` → `failed`). `blocker`/`major` findings block certification;
76
+ `minor`/`advisory` are recorded but do not block.
75
77
 
76
78
  ### Multi-target coordination (task 1023)
77
79
 
@@ -181,11 +183,11 @@ with the commit) drops the row from the sweep; `DEFER(<reason>)` reclassifies a
181
183
  the cell, not the sentence. `OPEN` states "still live", and `ACCEPTED` marks a non-blocking P4
182
184
  observation you are deliberately not acting on; both behave as an ordinary open row.
183
185
 
184
- **Pipeline cost of an open finding (1122).** The review PASS edges run this same classification
185
- before verify (`spur task residual <wbs> review-gate`): a PASS whose table still carries an open P1-P3 row
186
- routes into `review-fail-triage` → the bounded repair hop instead of verify. Open P1-P3 findings
187
- block `done`; fixing one invalidates the certified digest and re-runs quality → review → verify on
188
- a fresh digest. Only P4 rows and `DEFER`-ed P3 rows are wrap residuals — disposition the finding in
186
+ **Pipeline cost of an open finding (1122).** The review certification runs this same classification
187
+ (`spur task residual <wbs> review-gate`): a PASS whose table still carries an open P1-P3 row is a
188
+ non-PASS review, so the `review-failure-class` decision routes it to `remediate` instead of `done`.
189
+ Open P1-P3 findings block `done`; fixing one invalidates the certified digest and re-runs
190
+ gate → review on a fresh digest. Only P4 rows and `DEFER`-ed P3 rows are wrap residuals — disposition the finding in
189
191
  its cell now, while you hold the context, instead of leaving the cost to be rediscovered after a
190
192
  full cycle.
191
193
 
@@ -220,9 +222,9 @@ shallower.
220
222
  ```
221
223
 
222
224
  The **Verdict line is machine-read** by the task pipeline (session finding after 1088): `review →
223
- verify|approve` requires a line matching `Verdict: PASS` (plain or bold), and ANYTHING ELSE —
224
- FAIL, PARTIAL, a missing line, a line split across two lines — routes the run into
225
- `review-fail-triage` and its bounded repair hop. Keep it on one line, in that shape, in every
225
+ done` requires a line matching `Verdict: PASS` (plain or bold), and ANYTHING ELSE —
226
+ FAIL, PARTIAL, a missing line, a line split across two lines — routes the run through the
227
+ `review-failure-class` decision into the bounded `remediate` hop. Keep it on one line, in that shape, in every
226
228
  review answer; never restate it as prose only.
227
229
 
228
230
  **State `Confidence: HIGH | MEDIUM | LOW` — the gate derives it from your dispositions (ADR-141).**
@@ -243,6 +245,35 @@ No verdict-artifact field, no receipt level, no per-finding grade, and no operat
243
245
  (ADR-138 stands for every other carrier). Evidence gaps still belong in the report body: name them,
244
246
  then let the dispositions decide the level.
245
247
 
248
+ **Two artifacts, one `Confidence:` line each (1254).** The body you write into `### Review` states
249
+ the disposition-derived level above. When the pipeline also captures your final answer as the
250
+ certification input for `spur task verdict`, that text is a *second* artifact with a *different*
251
+ consumer, and it carries the **evidence-derived** level (`deriveVerifyConfidence`): PASS with every
252
+ AC row MET on executable evidence (`test`/`command`) is HIGH; a citation-only (`static-ref`),
253
+ `manual-review`, `llm-judge` or `N/A` AC is MEDIUM; a non-PASS verdict or any PARTIAL/UNMET row is
254
+ LOW. It ends with exactly one plain `Verdict: PASS|PARTIAL|FAIL` line preceded by both tables, in
255
+ this exact shape:
256
+
257
+ | Req | Status | Evidence |
258
+ | --- | --- | --- |
259
+ | R1 | MET | `src/api/users.ts:42` |
260
+
261
+ | AC | Status | Evidence Type | Evidence |
262
+ | --- | --- | --- | --- |
263
+ | AC1 — the guard rejects an unsafe input | MET | test | `packages/app/tests/guard.test.ts:12` |
264
+
265
+ One row per declared requirement (`MET | PARTIAL | UNMET`, none omitted or merged) and one row per
266
+ acceptance criterion (`MET | PARTIAL | UNMET | N/A`), with the evidence-type token alone in its own
267
+ cell — `test | command | static-ref | manual-review | llm-judge | n/a`, or a `+` compound when more
268
+ than one kind applies. Evidence cells cite a repo-relative `path:line` or a named test/command. AC
269
+ identities stay the task's own (checklist label, title, bold head, `Scenario:` prefix, bracket tag or
270
+ declared `AC-N` alias): a linked feature's scenario title covers the task that implements it, and a
271
+ task-local criterion is legal as-is — it needs no feature credit.
272
+ Never repeat the section's disposition-derived `Confidence:` line here: a second `Confidence:` line is
273
+ a `confidence-duplicate` rejection of the whole answer, and so is a level the rows do not derive. A
274
+ PASS with executable AC and one accepted P4 therefore certifies as `Confidence: HIGH` in the answer
275
+ while the section keeps `Confidence: MEDIUM`.
276
+
246
277
  **Source citations for external claims (one claim contract, 2026-10-12).** A Finding cell or a
247
278
  Functional Traceability `Evidence` cell that asserts an external API/library claim carries a
248
279
  verifiable citation in the SAME cell — a repo `path:line(-end)`, the external named-origin form
@@ -258,8 +289,8 @@ as an explicit gap in the report body (above), so a reader can re-check it.
258
289
 
259
290
  **Machine-checked at the gate (findings table).** `spur task residual <wbs> review-gate` applies the same two
260
291
  predicates to every finding row: a Finding cell carrying one of the verify lint's claim markers with
261
- no citation form becomes a **blocking** `review-contract` item, so `review → verify` stops and the
262
- run enters `review-fail-triage`. The `Location` column is deliberately not consulted as a citation —
292
+ no citation form becomes a **blocking** `review-contract` item, so `review → done` stops and the
293
+ run enters the `review-failure-class` decision. The `Location` column is deliberately not consulted as a citation —
263
294
  that is the rule stated above, and a gate that accepted it would pass every row that has an anchor.
264
295
  Functional Traceability `Evidence` cells stay reviewer-enforced (SECUA review): they are free prose
265
296
  in a table the gate does not parse.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  description: "Authority-aware semantic audit across source, task files, feature files, and project authority files — discover conflicts, resolve claim-specific authority, collect reproducible evidence, and route confirmed repairs through owner surfaces. Triggers: find conflict, conflict audit, semantic conflict, authority mismatch, stale projection."
3
3
  role: reviewer
4
- argument-hint: "[<scope>] [--pillar <source|tasks|features|authority|all>] [--mode <adaptive|full>] [--resolve] [--agent <inline|auto|name>] [--json]"
4
+ argument-hint: "[--tasks <selector> | --feature <id>[,<id>] | --scope <path>[,<path>]] [--pillar <source|tasks|features|authority|all>] [--mode <adaptive|full>] [--resolve] [--auto] [--agent <inline|auto|name>] [--json]"
5
5
  allowed-tools: ["Bash", "Read", "Write", "Grep", "Glob", "Skill"]
6
6
  ---
7
7
 
@@ -15,10 +15,14 @@ owner-routed remediation.
15
15
 
16
16
  | Flag | Description | Default |
17
17
  | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
18
- | `<scope>` | Optional path, WBS, feature ID, symbol, command, config key, or free-form subject to scope the audit. | current project |
18
+ | `--tasks <selector>` | Audit a task set — batch selector grammar ([execution-batch.md § Step 1](../skills/spur-dev/references/execution-batch.md#step-1--selector-resolution-r1)): comma WBS list or `feature:<id>`. Resolved once and frozen; the tasks seed one audit (below). | — |
19
+ | `--feature <id>[,<id>]` | Sugar for the union of the `feature:<id>` sets plus the feature records themselves — resolved once, frozen, audited as one seed set. | — |
20
+ | `--scope <path>[,<path>]` | Audit the tracked files under one or more paths: paths must exist (exit 2 otherwise), are normalized, duplicates dropped and nested paths collapse to the ancestor (`--scope apps,apps/cli` → `apps`). | — |
21
+ | `[<wbs\|path>]` | **Deprecated positional alias** (one release): a `^\d{4}$` token with a resolvable task → `--tasks <wbs>`; an existing path → `--scope <path>`; otherwise exit 2. Prints a deprecation warning naming the replacement. | — |
19
22
  | `--pillar` `<source\|tasks\|features\|authority\|all>` | Limit the internal audit to one pillar; the minimum authorities needed to judge it still load. | all |
20
23
  | `--mode` `<adaptive\|full>` | Scan protocol — adaptive reuses fresh indexed context and discloses skipped areas; full forces a cold comprehensive scan. | adaptive |
21
24
  | `--resolve` | Enable the proposal, confirmation, and owner-routed remediation workflow. Its absence guarantees no source/corpus/numbered-doc mutation. | off |
25
+ | `--auto` | Under `--resolve`, pre-approve the eligible repair set instead of pausing at the confirmation gate (see the skill's Step 10). Authority decisions still pause. Requires `--resolve` (exit 2 otherwise). | off |
22
26
  | `--agent` `<inline\|auto\|name>` | Who runs the model-bearing analysis. | omit |
23
27
  | `--json` | Emit the same result envelope as Markdown as JSON. | off |
24
28
 
@@ -28,13 +32,21 @@ For shared semantics, see the [flag glossary](../skills/spur-dev/references/flag
28
32
 
29
33
  ```
30
34
  /sp:dev-find-conflict
31
- /sp:dev-find-conflict docs/00_ADR.md
35
+ /sp:dev-find-conflict --scope docs/00_ADR.md
32
36
  /sp:dev-find-conflict --pillar authority
33
- /sp:dev-find-conflict --pillar tasks --mode full
34
- /sp:dev-find-conflict 0486 --resolve
35
- /sp:dev-find-conflict "command surface" --json
37
+ /sp:dev-find-conflict --tasks 0486,0487 --pillar tasks --mode full
38
+ /sp:dev-find-conflict --feature H11,H12 --resolve
39
+ /sp:dev-find-conflict --scope apps/cli,docs/design --resolve --auto --json
36
40
  ```
37
41
 
42
+ Target selection: **at most one** of `--tasks`, `--feature`, `--scope` per invocation — more than
43
+ one (a positional beside an explicit selector counts as a second kind) → exit 2 naming the
44
+ conflicting selectors. None → the whole project (the audit's natural default, unlike `dev-review`).
45
+ The target set is resolved once and frozen through the shared batch resolver — no find-conflict
46
+ parser; status pseudo-lists and `ready` are rejected (they select work to do, not artifacts to
47
+ audit). The frozen objects seed **one** audit, not one audit per object, so conflicts *between*
48
+ selected objects (two tasks, a task and a feature) stay visible.
49
+
38
50
  Audit mode is read-only with respect to source, corpus, and numbered documentation. Findings are
39
51
  presented before any repair. Approved repairs route through the artifact owner's existing harness
40
52
  surface (`spur task` / `spur feature`, `sp:doc-evolve`, the Spur development lifecycle, or
@@ -27,12 +27,17 @@ For shared semantics, see the [flag glossary](../skills/spur-dev/references/flag
27
27
 
28
28
  ## Implementation
29
29
 
30
- Follow the inline procedure in [dev-operations.md](../skills/spur-dev/references/dev-operations.md#10-fixall) (fixall). Pipeline signal: when `--gate-log` is set (the `test-fix` hop), run no full gate — the `test-recheck` state immediately after is the deciding run (R4, task 0483).
30
+ Follow the inline procedure in [dev-operations.md](../skills/spur-dev/references/dev-operations.md#10-fixall) (fixall). Pipeline signal: when `--gate-log` is set (the `remediate` hop), run no full gate — the `gate` state's recheck immediately after is the deciding run (R4, task 0483).
31
31
 
32
- When dispatched from the pipeline's test-fix stage (F96, task 0950), the gate log carries a
32
+ When dispatched from the pipeline's `remediate` hop (F96, task 0950), the gate log carries a
33
33
  `residual artifact` block (`<wbs>-residuals.json`) and the findings file already
34
34
  contains the merged residual anchors: treat those items as fix targets, in order,
35
35
  alongside gate anchors. The fixer may write `.spur/run/<wbs>-residual-deferrals.json`
36
36
  — one `{id, reason}` entry per item — but only for P3 findings or diff markers it
37
37
  cannot fix inside the task; the done stage settles deferrals into follow-up tasks.
38
38
 
39
+ The `remediate` hop is entered only after a `fix` decision (`failure-class` on a red gate,
40
+ `review-failure-class` on a non-PASS review). A `stop` decision ends the run before this command
41
+ runs, so do not invoke it by hand to overrule a `stop`
42
+ ([decision points](../skills/spur-dev/references/decision-points.md)).
43
+
@@ -44,7 +44,7 @@ trace records the answering source. `--auto` takes the recommended option at eac
44
44
 
45
45
  | Gate | Pauses when | Recommendation comes from | `--auto` takes |
46
46
  | --- | --- | --- | --- |
47
- | idea-eval | after discovery | eval report `## Recommendation` (`proceed` / `reshape` / `drop`) | `proceed`/`reshape` → continue; `drop` → cancel; missing → still asks |
47
+ | idea-eval | after discovery | eval report `## Recommendation` (`proceed` / `reshape` / `drop`); when unparseable, a model answer from the `idea-recommendation` decision | `proceed`/`reshape` → continue; `drop` → cancel; neither → the gate asks, and under `--auto` its `gate-evidence` decision answers (a deferred answer denies) |
48
48
  | design-approval | after system-design (skipped by `--skip-design`) | recorded design check | PASS → approve; FAIL → still asks |
49
49
 
50
50
  The AC check and the batch create are deterministic pipeline steps, not gates: `ac-generate`
@@ -52,6 +52,11 @@ runs `spur feature check` and routes on the recorded result (a FAIL retries the
52
52
  and `batch-create-run` runs `spur task batch-create` and routes on its own recorded result.
53
53
  Neither ever pauses, under any profile.
54
54
 
55
+ The rescue decisions and the gate answers are catalog decision points; their rows and switches
56
+ are in [decision points](../skills/spur-dev/references/decision-points.md). With both switches off
57
+ (the default) no model is called and a `--auto` run with no parseable recommendation stops at
58
+ idea-eval as a denial rather than creating a feature.
59
+
55
60
  Flag → vars: `--auto` sets `profile=auto`, `idea_approved=true`, `design_approved=true`;
56
61
  `--skip-design` sets `design=skip`.
57
62
 
@@ -50,6 +50,9 @@ For shared semantics, see the [flag glossary](../skills/spur-dev/references/flag
50
50
  - Implement step only (`--mode implement`): `Skill(skill="sp:code-implementation", args="$ARGUMENTS")`
51
51
  - After a full-mode run settles (done, failed or paused), print the
52
52
  [execution summary](../skills/spur-dev/references/dev-operations.md#execution-summary) unless `--no-summary`.
53
+ - Then report the run's decision points (triage lane, failure classes, approval) from their rows
54
+ ([reporting a run](../skills/spur-dev/references/decision-points.md#reporting-a-run)). A `failed` or `remediate` route is explained by the row
55
+ that chose it; quote its value, source and reason, never a fresh judgment.
53
56
 
54
57
  **Flags:**
55
58
 
@@ -26,7 +26,7 @@ Wraps the **sp:spur-dev** skill.
26
26
  | `--worktree` `[<name>]` | Run the batch in an isolated git worktree; FF-merge on success, retain on failure. Bare `--worktree` creates a fresh tree; `--worktree <name>` adopts an existing worktree by name/path/branch. | off |
27
27
  | `--no-summary` | Skip the measured execution summary (one row per task run: time, wait, tool calls, total / non-cached tokens) printed after the batch report. | off (summary printed) |
28
28
  | `--concurrency` `<n>` | Parallel-mode worker bound: at most `<n>` task pipelines run at once (task 0931); a dependent starts only after its in-set dependencies are integrated onto the base ref. No-op in sequential mode (ignored). | 2 |
29
- | `--defer-gate` | Opt-in parallel-batch gate policy (task 1111): each task's `test` hop runs the light tier and writes `DEFERRED`; the batch runs one integrated full gate on the base ref before the feature sync. Requires `--mode parallel`, or `--mode auto` resolved to parallel (dropped with a note otherwise); default off. | off |
29
+ | `--defer-gate` | Opt-in parallel-batch gate policy (task 1111): each task's `gate` state runs the light tier and writes `DEFERRED`; the batch runs one integrated full gate on the base ref before the feature sync. Requires `--mode parallel`, or `--mode auto` resolved to parallel (dropped with a note otherwise); default off. | off |
30
30
 
31
31
  For shared semantics, see the [flag glossary](../skills/spur-dev/references/flag-glossary.md).
32
32
 
@@ -82,8 +82,8 @@ FF-merge on success. This is expected, not a bug.
82
82
 
83
83
  **`--next` (batch-once wrap).** `--next`
84
84
  is chain-to-completion with propagation. On `dev-runall`, each task in the batch runs its
85
- `task-pipeline.yaml` to terminal status (the pipeline already drives precheck → implement → test →
86
- review → approve → verify → record → done); when the batch is complete, the wrap hop runs **once
85
+ `task-pipeline.yaml` to terminal status (the pipeline already drives precheck → implement → gate ⇄ remediate →
86
+ review → done); when the batch is complete, the wrap hop runs **once
87
87
  for the batch** — mirroring the batch-once shippable gate `dev-verifyall` uses — rather than once
88
88
  per task. Without `--next`, `--wrap` is wrap-without-chaining (the single batch wraps without
89
89
  advancing the feature lifecycle). **was: `--next` deliberately omitted; the old no-`--next` rationale argued against the old per-task-transition meaning and does not carry.**
@@ -111,3 +111,6 @@ full distinction.
111
111
  - Explicit executor (any mode, including `auto`) or parallel mode: `Skill(skill="sp:spur-dev", args="runall $ARGUMENTS")` → `sp:super-planner` agent.
112
112
  - After the batch report, print the [execution summary](../skills/spur-dev/references/dev-operations.md#execution-summary) over every attempted run unless
113
113
  `--no-summary`.
114
+ - A failed task's report row names the decision row that ended it (`failure-class` or
115
+ `review-failure-class` = `stop`, or approval `DENIED`) per
116
+ [reporting a run](../skills/spur-dev/references/decision-points.md#reporting-a-run); the batch failure policy then applies unchanged.
@@ -45,7 +45,7 @@ See `sp:code-verification` § Shippable readiness gate.
45
45
  run `spur task residual <wbs> scan` + `fold` (observe-only; folds the verdict's `residual-sweep` check,
46
46
  PASS → PARTIAL when a blocking residual exists) — under every `--fix` mode — then, only on a
47
47
  downgrade, re-run `spur task record <wbs> --verdict-file .spur/run/<wbs>-verdict.json` so Testing
48
- carries the final verdict. Same order as the pipeline `record` state (0983): scanning before
48
+ carries the final verdict. Same order as the pipeline `done` state's record close (0983): scanning before
49
49
  record reads unticked-but-proven boxes and folds a clean PASS to PARTIAL. When the task reaches
50
50
  `done` through `--next`, run `spur task residual <wbs> settle` (best-effort). On a folded PARTIAL: the bounded remediation loop has
51
51
  already run — a residual-failed task is routed to router C6 (HITL STOP), never another
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "sp",
3
- "version": "0.4.15",
3
+ "version": "0.4.17",
4
4
  "description": "Spur — a local-first harness engineering toolkit that wraps mainstream coding agents with constraint checking, workflow orchestration, and history analytics."
5
5
  }
@@ -103,7 +103,7 @@ surfaces is what keeps that gate quiet.
103
103
 
104
104
  ## Implement scope: do not run the project quality gate
105
105
 
106
- During implement, the pipeline's `test` hop runs `${vars.qualityGateCmd}` (the full project gate:
106
+ During implement, the pipeline's `gate` state runs `${vars.qualityGateCmd}` (the full project gate:
107
107
  `spur self exec check`) immediately after this step and is the gate that actually
108
108
  decides pass/fail. Running it inside implement is pure redundancy — it cannot change the outcome and
109
109
  only burns wall clock and context budget.
@@ -118,9 +118,9 @@ only burns wall clock and context budget.
118
118
  re-select the execution tree inside the call (`cd -- "$TREE"` plus the identity check) instead of
119
119
  relying on a `cd` a previous call left behind.
120
120
  - **NEVER run** `spur self exec test`, `spur self exec check`, `bun run check`, or any other full-suite /
121
- project-gate command from inside implement. These belong to the pipeline's `test` hop.
121
+ project-gate command from inside implement. These belong to the pipeline's `gate` state.
122
122
  - **Full-suite budget: at most 2 per task** (task 0436 R2) — counted across the whole task run
123
- (implement probes + the pipeline `test` hop + verify/recheck), not per step. When a check fails,
123
+ (implement probes + the pipeline `gate` state and its rechecks), not per step. When a check fails,
124
124
  run the narrow target (`bun test <file> --test-name-pattern <test>`) to green before any full
125
125
  suite; reach for the second full run only when the narrow target cannot reproduce the failure.
126
126
  - **Consolidate dogfood runs**: one combined real-data execution that exercises all scenarios,
@@ -128,7 +128,7 @@ only burns wall clock and context budget.
128
128
  rerunning the same dogfood command with one flag changed, stop and fold the variants into a
129
129
  single run — repeated identical commands are loop-detector findings and pure cost.
130
130
  - If a targeted probe reveals a failure you cannot fix within implement scope, note it in
131
- `## Solution` and let the `test` hop's fixall handle it — do not pre-empt the gate.
131
+ `## Solution` and let the `gate` state's `remediate` hop handle it — do not pre-empt the gate.
132
132
 
133
133
  ### Public-surface probe (task 1135 R1/R6/R8)
134
134
 
@@ -155,7 +155,7 @@ changed no public surface, report the single line
155
155
  - the paired-script parity test when `package.json` changed (a half-updated `spur-check` /
156
156
  `spur-check:full` chain).
157
157
 
158
- The single full project check stays the pipeline `test` hop's job (see the section above); these are
158
+ The single full project check stays the pipeline `gate` state's job (see the section above); these are
159
159
  changed-path checks, not that gate.
160
160
 
161
161
  ## Changed-path targeted checks (dependency-aware verification, task 0510 R3 / task 1142 R3)
@@ -164,14 +164,14 @@ changed-path checks, not that gate.
164
164
  surface can break a downstream consumer. The matrix below is dependency-aware — domain → app →
165
165
  CLI — so a shared change verifies its consumers without recreating the full project check inside
166
166
  implement. **It augments narrow behavior tests; it never authorizes `spur self exec check`,
167
- `spur self exec test`, or another full project check inside implement** — the pipeline's `test` hop owns
167
+ `spur self exec test`, or another full project check inside implement** — the pipeline's `gate` state owns
168
168
  that single full gate.
169
169
 
170
170
  **Worker iteration check order (task 1142 R3):**
171
171
  1. The **changed-path matrix** below (narrow behavior tests + affected consumers);
172
172
  2. `spur task gate <wbs> light` (biome on changed files, per-workspace typecheck, rule presets `rules:pre`/`rules:post`, related tests).
173
173
 
174
- Neither step takes the full project gate. The full gate is named only for the pipeline's `test` and `test-recheck` hops.
174
+ Neither step takes the full project gate. The full gate is named only for the pipeline's `gate` state (first visit and rechecks).
175
175
 
176
176
  | Changed surface | Required targeted tests | Required typechecks |
177
177
  | --- | --- | --- |
@@ -189,7 +189,7 @@ Neither step takes the full project gate. The full gate is named only for the pi
189
189
  (a flag the plugin layer consumes) actually changes, so an unconditional parity suite does not
190
190
  creep into every plugin edit.
191
191
  - Run the applicable rows, then stop: the single full project check belongs to the pipeline's
192
- `test` hop (`task-pipeline.yaml` `${vars.qualityGateCmd}`).
192
+ `gate` state (`task-pipeline.yaml` `${vars.qualityGateCmd}`).
193
193
  - **Mirrored surfaces: an edit lands on all of them.** When the change is one instance of a repeated
194
194
  pattern — the same wiring rule on two runbooks, a signature in both a generator and its generated
195
195
  `.d.mts`, a command chain in both `spur-check` and `spur-check:full` — grep for the siblings and
@@ -89,8 +89,8 @@ and the deepening direction. Full definitions and examples in
89
89
  | **minor** | advisory | Local friction: a module slightly too shallow, coupling that's awkward but not coordinated. |
90
90
  | **advisory** | advisory | Deepening opportunity: the code works and is testable, but would be cleaner with a deeper module. Always non-blocking. |
91
91
 
92
- **Under the pipeline** (`/sp:dev-review` in a task run), `blocker` and `major` block the
93
- `approve(HITL)` gate. `minor` and `advisory` are recorded but do not block. **Standalone** reviews
92
+ **Under the pipeline** (`/sp:dev-review` in a task run), `blocker` and `major` block review
93
+ certification (a non-PASS review goes to the `review-failure-class` decision). `minor` and `advisory` are recorded but do not block. **Standalone** reviews
94
94
  are advisory-only — the operator decides what to act on.
95
95
 
96
96
  ---
@@ -185,7 +185,7 @@ Each candidate is a structured finding:
185
185
  When invoked as the `--focus architecture` dimension of `/sp:dev-review`:
186
186
 
187
187
  - The scope is the task's diff (pipeline) or the `path` arg (standalone).
188
- - `blocker`/`major` candidates block the `approve(HITL)` gate alongside any SECUA blockers from
188
+ - `blocker`/`major` candidates block review certification alongside any SECUA blockers from
189
189
  `sp:code-verification`.
190
190
  - The candidate list is returned as a **review fragment**; the review coordinator
191
191
  (`sp:super-reviewer` — the invoking session under `/sp:dev-review`) merges it into the combined
@@ -42,10 +42,11 @@ Before reporting a task as complete, a test as passing, a bug as fixed, or a fea
42
42
 
43
43
  ## Under the pipeline
44
44
 
45
- `task-pipeline.yaml`'s `verify` step (Phase 8) and `record` step enforce this gate. The `verify`
46
- step runs `sp:code-verification` verify mode, which produces a `VerifyVerdict` artifact; the
47
- `record` step transcribes it to the task's `## Testing` section. A `done` transition requires a
48
- PASS verdict.
45
+ `task-pipeline.yaml` enforces this gate deterministically. The `gate` state runs `spur task gate`
46
+ and a red result goes through the `failure-class` decision to `remediate`; the `review` state
47
+ certifies the review answer with `spur task verdict`, which writes the `VerifyVerdict` artifact.
48
+ `review → done` requires that PASS plus the approval decision point, and `done`'s `spur task record`
49
+ close transcribes the verdict to the task's `## Testing` section.
49
50
 
50
51
  Under manual execution (no pipeline), the agent must still run the gates and paste the evidence.
51
52
  "Manual" is not an exemption — it just means the agent, not the pipeline, runs the commands.
@@ -29,7 +29,7 @@ The **verifier** in the Spur execution loop. A coding agent reports "done" with
29
29
  this skill is the deterministic counterweight that proves — or disproves — the claim against the
30
30
  task's own requirements and Acceptance Criteria, then emits the canonical verdict artifact
31
31
  through CLI verbs (section writes are owned by the review coordinator and the deterministic
32
- `record` step — F92 0593 R1).
32
+ `spur task record` close in `done` — F92 0593 R1).
33
33
 
34
34
  It backs two commands:
35
35
 
@@ -321,7 +321,7 @@ spur task residual <wbs> fold
321
321
  > **Do not write `## Review` directly, ever.** The `## Review` section is owned by the
322
322
  > `review` coordinator (`/sp:dev-review` → `sp:super-reviewer`), which merges
323
323
  > `functional-review` + `code-verification` review mode + `code-improvement` fragments. The
324
- > `record` step backfills `## Review` from the verdict artifact **only** if the section is bare
324
+ > `spur task record` close backfills `## Review` from the verdict artifact **only** if the section is bare
325
325
  > (`sectionIsBare` guard, `task-section-bodies.ts`) — a standalone compatibility fallback, never an
326
326
  > overwrite of authored Review. Writing `## Review` here destroys the review step's
327
327
  > three-dimensional findings.
@@ -546,7 +546,7 @@ Flags: `--agent <inline|auto|name>` (execution surface — inline default, with
546
546
 
547
547
  ## When to use
548
548
 
549
- - **Verify a task before `done`** — the pipeline's `verify` step, or a manual `/sp:dev-verify`.
549
+ - **Verify a task before `done`** — the pipeline's `review` state certifies it (`spur task verdict`), or a manual `/sp:dev-verify`.
550
550
  - **Audit completed work** — `--force` re-verifies a `done` task (compliance, post-merge).
551
551
  - **Focused code review** — `/sp:dev-review` for SECUA findings on a diff.
552
552
 
@@ -581,7 +581,7 @@ Do **not** use this skill for:
581
581
  rubric.
582
582
  - `plugins/sp/references/roles.md` — the Layer-1 role→tier table; this skill's verify/review modes
583
583
  run under the `reviewer` role (0538 R4: this file points at roles.md, it does not restate tiers).
584
- - `task-pipeline.yaml` — the `verify → record` gate that consumes the verdict.
584
+ - `task-pipeline.yaml` — the `review → done` gate that consumes the verdict.
585
585
  - **`sp:spur-dev`** — the execution-half umbrella that drives the pipeline this skill gates.
586
586
  - [references/code-improvement.md](references/code-improvement.md) — architecture-improvement lens
587
587
  for module depth, seam placement, locality, coupling, and testability.
@@ -64,6 +64,14 @@ no level (ADR-131, 1196), no operator `ackLowConfidence`-style var exists, and h
64
64
  findings carry no per-finding grade. A verifier that can write a PASS can still write a wrong
65
65
  `HIGH` — which is exactly why the gate derives the level instead of trusting it.
66
66
 
67
+ **A review run carries two answer artifacts, one `Confidence:` line each (1254).** The `## Review`
68
+ section states the disposition-derived level (`deriveReviewConfidence`); the captured answer handed
69
+ to `spur task verdict --from-answer` states the evidence-derived level (`deriveVerifyConfidence`)
70
+ under the table above and carries exactly one `Confidence:` line. The two legitimately disagree — a
71
+ PASS with executable AC and one carried P4 is section `MEDIUM`, answer `HIGH` — so the captured
72
+ answer must not repeat the section's line (`confidence-duplicate` rejects the whole answer). The
73
+ review stage's prompt owns that instruction; this schema owns the shape it must produce.
74
+
67
75
  ## Compatibility alias: `scenario` row key
68
76
 
69
77
  Task 0410 hardened the verdict reader. Producers SHOULD use the canonical `id` field for every
@@ -241,25 +249,33 @@ Wave C verification can emit the following additive `checks[]` rows:
241
249
 
242
250
  ## How the gate reads it
243
251
 
244
- `task-pipeline.yaml`, transition `verify → record`:
252
+ In `task-pipeline.yaml` the `review` state writes this artifact: `spur task verdict <wbs>
253
+ --from-answer` lints the review answer and derives `.spur/run/<wbs>-verdict.json`. A fold step then
254
+ writes `.spur/run/<wbs>-review.status` = PASS only when the typed verdict is PASS, the artifact's own
255
+ `verdict` is PASS (`jq -r '.verdict // empty'`) and `spur task residual <wbs> review-gate` is clean.
256
+ The `review → done` guard reads that status **and** the approval decision point's token:
245
257
 
246
258
  ```yaml
247
259
  guard:
248
260
  kind: shell
249
261
  options:
250
- command: 'test "$(jq -r .verdict .spur/run/${vars.wbs}-verdict.json)" = PASS'
262
+ command: >-
263
+ test "$(cat ".spur/run/$wbs-review.status" 2>/dev/null)" = PASS &&
264
+ test "$(cat ".spur/run/$wbs-approval.status" 2>/dev/null)" = APPROVED
251
265
  ```
252
266
 
253
- with a sibling `verify → failed` guarded on the negation. So a missing file, malformed JSON, or any
254
- non-`PASS` verdict routes the run to `failed` rather than `done` — the pipeline cannot certify
255
- completion without an explicit PASS artifact.
267
+ A missing file, malformed JSON or any non-`PASS` verdict leaves the status FAIL, which the
268
+ `review-failure-class` decision routes to `remediate` (`fix`) or `failed` (`stop`). The pipeline
269
+ cannot certify completion without an explicit PASS artifact.
256
270
 
257
271
  ## Lifecycle
258
272
 
259
- - **Written:** Step 9 of verify mode, *after* the verdict is final (never partially).
260
- - **Read:** by the workflow gate on the `verify → record` transition.
261
- - **Location:** `.spur/run/` (the run-scratch dir the pipeline's `record` step also uses).
262
- - **Lifetime:** per execution attempt; overwritten on the next verify of the same WBS.
273
+ - **Written:** by `spur task verdict` in the pipeline's `review` state, or by Step 9 of standalone
274
+ verify mode, *after* the verdict is final (never partially).
275
+ - **Read:** by the review fold and the `review → done` guard, then by `done`'s `spur task record`
276
+ close, which transcribes it.
277
+ - **Location:** `.spur/run/`.
278
+ - **Lifetime:** per execution attempt; overwritten on the next certification of the same WBS.
263
279
 
264
280
  ## Optional check severity (task 0592, feature F92)
265
281
 
@@ -304,6 +320,6 @@ The prose shape above is executed by a single runtime-validated contract:
304
320
  failure can never yield PASS.
305
321
  - A row-less artifact aggregates to UNKNOWN — a stored PASS that does not recompute to PASS
306
322
  (including a row-less PASS) is treated as non-PASS at the done gate. The done-transition choke
307
- point (`done-transition-guard.ts` `evaluateDoneTransition`) is the final authority; workflow JSON
308
- routing may select `verify → record/failed` but cannot weaken the final transition.
323
+ point (`done-transition-guard.ts` `evaluateDoneTransition`) is the final authority; workflow
324
+ routing may select `review → done/failed` but cannot weaken the final transition.
309
325
  - `--force-done --reason` on `spur task update <wbs> done` remains the sole auditable override.
@@ -57,24 +57,29 @@ dependency, or dedicated subagent.
57
57
  - Code review — use `sp:code-review` / `sp:code-verification`.
58
58
  - General documentation drift maintenance — use `sp:doc-evolve`.
59
59
  - Performing repairs automatically — this skill only audits and (with `--resolve`) proposes
60
- confirmed, owner-routed repairs; it never mutates without explicit confirmation.
60
+ confirmed, owner-routed repairs; it never mutates without explicit confirmation (interactive, or
61
+ the operator's explicit `--auto` pre-approval of eligible items).
61
62
 
62
63
  ## Arguments
63
64
 
64
65
  | Argument | Description | Default |
65
66
  | ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
66
- | `[scope]` | Optional path, WBS, feature ID, symbol, command, config key, or free-form subject to scope the audit. | current project |
67
+ | `--tasks <selector>` | Task set (comma WBS list or `feature:<id>`, batch selector grammar) seeding the audit. | — |
68
+ | `--feature <id>[,<id>]` | Union of the `feature:<id>` task sets plus the feature records themselves, seeding the audit. | — |
69
+ | `--scope <path>[,<path>]` | Tracked files under one or more existing paths, seeding the audit. | — |
70
+ | `[<wbs\|path>]` | Deprecated positional alias for `--tasks <wbs>` / `--scope <path>` (one release). | — |
67
71
  | `--pillar <source\|tasks\|features\|authority\|all>` | Limit the internal audit to one pillar; the minimum authorities needed to judge it still load. | `all` |
68
72
  | `--mode <adaptive\|full>` | Scan protocol — `adaptive` reuses fresh, provenance-verifiable indexed context and discloses skipped areas; `full` forces a cold comprehensive scan. | `adaptive` |
69
73
  | `--resolve` | Enable the proposal, confirmation, and owner-routed remediation workflow. Its absence guarantees no source/corpus/numbered-doc mutation. | off |
74
+ | `--auto` | Under `--resolve`, pre-approve the eligible repair set at the confirmation gate (Step 10). Requires `--resolve`. | off |
70
75
  | `--agent <inline\|auto\|name>` | Who runs the model-bearing analysis. `inline` is the default; `--agent auto`/a named executor isolates the analysis. Not a dedicated subagent. | `inline` |
71
76
  | `--json` | Emit the same result envelope as Markdown as JSON. Never implies deterministic semantic reasoning. | off |
72
77
 
73
78
  ## The 10-Step Audit Protocol
74
79
 
75
80
  ```
76
- scope + flags
77
- → PARSE & GUARD resolve scope/flags; confirm repository root; set audit-only vs resolve mode
81
+ target + flags
82
+ → PARSE & GUARD resolve + freeze the target set; confirm repository root; set audit-only vs resolve mode
78
83
  → DISCOVER AUTHORITY read entry/process rules; build the claim-specific authority matrix
79
84
  → PREFLIGHT git, rg, spur task/feature --json, relevant spur … check, doc-evolve audit
80
85
  → INVENTORY four-pillar inventory: pillar, identity, path, anchor, freshness, scan status
@@ -84,13 +89,35 @@ scope + flags
84
89
  → CROSS-PILLAR all six applicable boundaries
85
90
  → CLASSIFY lifecycle, supersession, abstraction-level, intentional-deprecation challenges
86
91
  → REPORT order by severity then confidence; coverage, unresolved authority, scan cost
87
- → REMEDIATE only with --resolve and explicit confirmation + freshness recheck
92
+ → REMEDIATE only with --resolve and explicit (or --auto pre-) confirmation + freshness recheck
88
93
  ```
89
94
 
90
95
  ### Step 1 — Parse and guard
91
96
 
92
- Resolve `<scope>` and `--pillar`; confirm the repository root; establish **audit-only** versus
93
- `--resolve` mode. Without `--resolve`, the run is strictly read-only: no source, corpus, or
97
+ Resolve the target and `--pillar`; confirm the repository root; establish **audit-only** versus
98
+ `--resolve` mode.
99
+
100
+ **Target selection.** At most one of `--tasks`, `--feature`, `--scope` (a deprecated positional
101
+ beside an explicit selector counts as a second kind) — more than one refuses the audit naming the
102
+ conflicting selectors. None → the whole project. Resolve the set **once** and freeze it:
103
+
104
+ - `--tasks` / `--feature` go through the shared batch resolver
105
+ ([execution-batch.md § Step 1](../spur-dev/references/execution-batch.md#step-1--selector-resolution-r1));
106
+ `--feature <id>[,<id>]` is sugar for the union of the `feature:<id>` sets, and the feature records
107
+ join the seed set. Status pseudo-lists and `ready` are refused. An unresolvable WBS/feature refuses
108
+ the audit.
109
+ - `--scope` paths must exist; normalize them, drop duplicates, collapse nested paths to the ancestor.
110
+ - Deprecated positional: a `^\d{4}$` token with a resolvable task → `--tasks <wbs>`; an existing path
111
+ → `--scope <path>`; anything else refuses. Emit a deprecation warning naming the replacement.
112
+
113
+ The frozen objects **seed one audit** — they are the starting nodes of the candidate graph (Step 5),
114
+ not the boundary of what may be read: the authorities and counterpart artifacts needed to judge them
115
+ still load. One audit, not one per object, so conflicts *between* selected objects stay visible.
116
+ Every finding names the seed object(s) it traces to; `coverage` accounts per seed object.
117
+
118
+ `--auto` without `--resolve` refuses the audit (it has no gate to skip in audit mode).
119
+
120
+ Without `--resolve`, the run is strictly read-only: no source, corpus, or
94
121
  numbered-document mutation of any kind. With `--resolve`, no write happens until a repair set is
95
122
  presented, explicitly confirmed, and freshness-revalidated.
96
123
 
@@ -98,7 +125,7 @@ Validate every enum flag against the domain declared by the command surface
98
125
  (`plugins/sp/commands/dev-find-conflict.md`): `--pillar` ∈ `source|tasks|features|authority|all`,
99
126
  `--mode` ∈ `adaptive|full`, `--agent` ∈ `inline|auto|name`. An out-of-domain value **refuses** the
100
127
  audit before any discovery work — report the received value, the flag's valid domain, and stop;
101
- never silently coerce or ignore it. Only `<scope>` is free-form and exempt from this check.
128
+ never silently coerce or ignore it.
102
129
 
103
130
  ### Step 2 — Discover local authority
104
131
 
@@ -157,8 +184,9 @@ findings, evidence, authority provenance, coverage, unresolved decisions, and re
157
184
 
158
185
  ### Step 10 — Remediate only when requested
159
186
 
160
- With `--resolve`: present the proposed repair set, obtain explicit confirmation, revalidate evidence
161
- freshness, then route each approved repair through its verified owner surface. Report the completed,
187
+ With `--resolve`: present the proposed repair set, obtain explicit confirmation (or, under
188
+ `--auto`, the pre-approval of the eligible subset — [remediation-routing.md §2.2a](references/remediation-routing.md#22a---auto-pre-approval)),
189
+ revalidate evidence freshness, then route each approved repair through its verified owner surface. Report the completed,
162
190
  failed, and untouched sets; never silently roll forward past a partial failure. See
163
191
  [references/remediation-routing.md](references/remediation-routing.md).
164
192
 
@@ -173,7 +201,7 @@ items; no mutation.
173
201
  {
174
202
  "schema_version": 1,
175
203
  "command": "dev-find-conflict",
176
- "scope": "docs/00_ADR.md",
204
+ "scope": "scope:docs/00_ADR.md",
177
205
  "mode": "adaptive",
178
206
  "pillars": ["authority"],
179
207
  "authority_map": {},
@@ -226,10 +254,10 @@ Thin wrapper: `Skill(skill="sp:conflict-finding", args="$ARGUMENTS")`.
226
254
 
227
255
  ```
228
256
  /sp:dev-find-conflict
229
- /sp:dev-find-conflict docs/00_ADR.md
230
- /sp:dev-find-conflict --pillar tasks --mode full
231
- /sp:dev-find-conflict 0486 --resolve
232
- /sp:dev-find-conflict "command surface" --json
257
+ /sp:dev-find-conflict --scope docs/00_ADR.md
258
+ /sp:dev-find-conflict --tasks 0486,0487 --pillar tasks --mode full
259
+ /sp:dev-find-conflict --feature H11 --resolve
260
+ /sp:dev-find-conflict --scope apps/cli --resolve --auto --json
233
261
  ```
234
262
 
235
263
  ## Common rationalizations
@@ -240,6 +268,7 @@ Thin wrapper: `Skill(skill="sp:conflict-finding", args="$ARGUMENTS")`.
240
268
  | "Lower-numbered docs always win." | Authority is claim-specific; the constitution's precedence applies only within its stated boundary. |
241
269
  | "Code is always right." | Code is authoritative for what currently happens, not automatically for what should happen. |
242
270
  | "`--resolve` authorizes automatic repair." | It opens the proposal/confirmation workflow; every repair still needs explicit confirmation and a freshness check, then the owner surface. |
271
+ | "`--auto` approves everything." | It pre-approves only eligible items (resolved authority, `high` confidence, verified owner surface); authority decisions still pause; freshness still applies. |
243
272
  | "Adaptive can reuse any context." | Reuse requires freshness + verifiable provenance; absent/stale/unverifiable context degrades to a cold scan or an explicit incomplete-coverage result. |
244
273
 
245
274
  ## Red flags
@@ -248,7 +277,8 @@ Thin wrapper: `Skill(skill="sp:conflict-finding", args="$ARGUMENTS")`.
248
277
  - Forcing an ambiguous/missing authority through a global ranking instead of an unresolved HITL item.
249
278
  - Silently omitting a selected pillar or a tool failure (no coverage accounting).
250
279
  - Claiming "comprehensive" when `coverage.complete` is false.
251
- - Any mutation in audit mode, or automatic mutation merely because `--resolve` is present.
280
+ - Any mutation in audit mode, or automatic mutation merely because `--resolve` is present (without `--auto`).
281
+ - Under `--auto`, applying an ineligible item or settling a `needs-authority-decision` item.
252
282
  - Editing a derived projection before correcting a defective authority, or changing a correct authority merely to repair its stale projection.
253
283
  - Adding a production analyzer, index/cache/database, dependency, or dedicated subagent in v1.
254
284
 
@@ -76,8 +76,10 @@ Join keys, in priority order:
76
76
 
77
77
  Construction protocol:
78
78
 
79
- 1. **Seed from scope.** If `<scope>` is a path/WBS/feature-id/symbol/command/config-key, seed the
80
- graph with every artifact whose identity or content references that scope.
79
+ 1. **Seed from the frozen target.** Every object in the `--tasks` / `--feature` / `--scope` set is
80
+ a seed, plus every artifact whose identity or content references one of them (its WBS, feature
81
+ ID, or path). Multiple seeds share one graph, so edges between seeds are compared too. No
82
+ selector → the whole project is the seed set.
81
83
  2. **Grow by shared keys.** For each seed, add an edge to any artifact sharing one of the keys
82
84
  above for the _same subject_. A key matches only when it refers to the same subject, not merely
83
85
  the same string in an unrelated context (see normalize).