@gobing-ai/spur 0.3.47 → 0.3.49

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 (148) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/config/config.example.yaml +94 -15
  3. package/config/transition-shims.json +33 -0
  4. package/config/workflows/basic.yaml +2 -0
  5. package/config/workflows/docs-pipeline.yaml +2 -0
  6. package/config/workflows/feature-dev.yaml +8 -0
  7. package/config/workflows/idea-pipeline.yaml +10 -0
  8. package/config/workflows/planning-pipeline.yaml +4 -0
  9. package/config/workflows/pr-review.yaml +338 -0
  10. package/config/workflows/task-pipeline.yaml +8 -0
  11. package/config/workflows/wayfinder-resolution.yaml +4 -0
  12. package/config/workflows/wrapup-pipeline.yaml +18 -1
  13. package/package.json +8 -8
  14. package/plugins/sp/README.md +9 -6
  15. package/plugins/sp/agents/expert-spur.md +1 -0
  16. package/plugins/sp/commands/dev-arch.md +2 -1
  17. package/plugins/sp/commands/dev-brainstorm.md +2 -1
  18. package/plugins/sp/commands/dev-changelog.md +1 -0
  19. package/plugins/sp/commands/dev-daily.md +1 -0
  20. package/plugins/sp/commands/dev-debug.md +2 -1
  21. package/plugins/sp/commands/dev-dogfood.md +2 -1
  22. package/plugins/sp/commands/{dev-featurechange.md → dev-feature-change.md} +8 -10
  23. package/plugins/sp/commands/dev-find-conflict.md +2 -1
  24. package/plugins/sp/commands/dev-find-issue.md +36 -43
  25. package/plugins/sp/commands/dev-find-next.md +5 -4
  26. package/plugins/sp/commands/dev-fixall.md +1 -0
  27. package/plugins/sp/commands/dev-gitmsg.md +1 -0
  28. package/plugins/sp/commands/dev-gtd.md +12 -12
  29. package/plugins/sp/commands/dev-handover.md +1 -0
  30. package/plugins/sp/commands/dev-history-load.md +63 -0
  31. package/plugins/sp/commands/dev-idea.md +1 -0
  32. package/plugins/sp/commands/dev-next.md +2 -1
  33. package/plugins/sp/commands/dev-parallel.md +2 -1
  34. package/plugins/sp/commands/dev-plan.md +2 -1
  35. package/plugins/sp/commands/dev-pr-review.md +39 -0
  36. package/plugins/sp/commands/dev-refine.md +5 -3
  37. package/plugins/sp/commands/dev-refineall.md +2 -1
  38. package/plugins/sp/commands/dev-refresh.md +2 -1
  39. package/plugins/sp/commands/dev-reverse.md +2 -1
  40. package/plugins/sp/commands/dev-review.md +2 -1
  41. package/plugins/sp/commands/dev-run.md +3 -2
  42. package/plugins/sp/commands/dev-runall.md +3 -2
  43. package/plugins/sp/commands/dev-simplify.md +2 -1
  44. package/plugins/sp/commands/dev-unit.md +2 -1
  45. package/plugins/sp/commands/dev-verify.md +2 -1
  46. package/plugins/sp/commands/dev-verifyall.md +2 -1
  47. package/plugins/sp/commands/dev-wrap.md +7 -5
  48. package/plugins/sp/commands/dev-wrapall.md +7 -5
  49. package/plugins/sp/commands/rule-add.md +1 -0
  50. package/plugins/sp/commands/rule-refine.md +1 -0
  51. package/plugins/sp/commands/rule-scan.md +1 -0
  52. package/plugins/sp/commands/spur-init.md +1 -0
  53. package/plugins/sp/commands/workflow-add.md +1 -0
  54. package/plugins/sp/commands/workflow-refine.md +1 -0
  55. package/plugins/sp/hooks/careful-guard.ts +5 -80
  56. package/plugins/sp/hooks/destructive-policy.ts +146 -0
  57. package/plugins/sp/hooks/pi/guard-extension.ts +33 -46
  58. package/plugins/sp/hooks/task-file-policy.ts +31 -0
  59. package/plugins/sp/hooks/task-write-guard.ts +4 -0
  60. package/plugins/sp/plugin.json +1 -1
  61. package/plugins/sp/references/roles.md +106 -0
  62. package/plugins/sp/scripts/feature-sync-bounded.ts +28 -2
  63. package/plugins/sp/scripts/history-load.ts +400 -0
  64. package/plugins/sp/scripts/pr-reviewing.ts +867 -0
  65. package/plugins/sp/scripts/stage-registry-adapter.ts +66 -31
  66. package/plugins/sp/scripts/surface-drift-inventory.ts +908 -0
  67. package/plugins/sp/scripts/task-size-precheck.ts +30 -4
  68. package/plugins/sp/scripts/transition-shim-check.ts +238 -0
  69. package/plugins/sp/scripts/validate-commands.ts +33 -2
  70. package/plugins/sp/scripts/validate-flag-contracts.ts +5 -2
  71. package/plugins/sp/skills/code-implementation/SKILL.md +9 -1
  72. package/plugins/sp/skills/code-verification/SKILL.md +29 -28
  73. package/plugins/sp/skills/issue-finding/SKILL.md +123 -141
  74. package/plugins/sp/skills/issue-finding/examples/expected-findings.json +1 -1
  75. package/plugins/sp/skills/issue-finding/references/session-formats.md +87 -90
  76. package/plugins/sp/skills/next-feature/SKILL.md +6 -6
  77. package/plugins/sp/skills/next-feature/references/handoff-routing.md +5 -5
  78. package/plugins/sp/skills/next-feature/references/signal-derivation.md +7 -2
  79. package/plugins/sp/skills/next-router/SKILL.md +1 -1
  80. package/plugins/sp/skills/parallel-execution/references/dispatch-surface.md +40 -2
  81. package/plugins/sp/skills/pr-reviewing/SKILL.md +285 -0
  82. package/plugins/sp/skills/spur-cli/SKILL.md +3 -0
  83. package/plugins/sp/skills/spur-cli/references/agent.md +12 -7
  84. package/plugins/sp/skills/spur-cli/references/features/hierarchy-mece.md +5 -5
  85. package/plugins/sp/skills/spur-cli/references/features.md +1 -1
  86. package/plugins/sp/skills/spur-cli/references/team.md +10 -3
  87. package/plugins/sp/skills/spur-dev/SKILL.md +2 -0
  88. package/plugins/sp/skills/spur-dev/references/ac-style-guide.md +17 -0
  89. package/plugins/sp/skills/spur-dev/references/cross-cutting.md +44 -23
  90. package/plugins/sp/skills/spur-dev/references/dev-operations.md +14 -11
  91. package/plugins/sp/skills/spur-dev/references/execution-workflow.md +14 -12
  92. package/plugins/sp/skills/spur-dev/references/flag-glossary.md +28 -7
  93. package/plugins/sp/skills/spur-dev/references/gate-checklists.md +2 -0
  94. package/plugins/sp/skills/spur-dev/references/inline-pipeline-driver.md +12 -2
  95. package/schemas/spur-config.schema.json +47 -3
  96. package/spur.js +12223 -7716
  97. package/web/_astro/BoardApp.8hiqShQn.js +1 -0
  98. package/web/_astro/{BoardApp.DKyrGxdo.js → BoardApp.BjQUNhuj.js} +74 -74
  99. package/web/_astro/{TaskDetail.6-27_LMa.js → TaskDetail.CVBuD6dF.js} +1 -1
  100. package/web/_astro/{arc.Df-9AQvS.js → arc.BMMjdODi.js} +1 -1
  101. package/web/_astro/{architectureDiagram-3BPJPVTR.VAI_-paS.js → architectureDiagram-3BPJPVTR.BU5ShzXf.js} +1 -1
  102. package/web/_astro/{blockDiagram-GPEHLZMM.DFpUY1ue.js → blockDiagram-GPEHLZMM.Bj1iEqPD.js} +1 -1
  103. package/web/_astro/{c4Diagram-AAUBKEIU.CF8doOpg.js → c4Diagram-AAUBKEIU.vX8wepCL.js} +1 -1
  104. package/web/_astro/channel.EwdSemIC.js +1 -0
  105. package/web/_astro/{chunk-2J33WTMH.BnjK3fjt.js → chunk-2J33WTMH.BKAipTym.js} +1 -1
  106. package/web/_astro/{chunk-4BX2VUAB.x6ZDnJKq.js → chunk-4BX2VUAB.B68XkPG7.js} +1 -1
  107. package/web/_astro/{chunk-55IACEB6.zY-0uu7w.js → chunk-55IACEB6.BmeDLcrc.js} +1 -1
  108. package/web/_astro/{chunk-727SXJPM.BZxKg_Vi.js → chunk-727SXJPM.PDuBA3Kw.js} +1 -1
  109. package/web/_astro/{chunk-AQP2D5EJ.Cpi9G9Td.js → chunk-AQP2D5EJ.C7A044za.js} +1 -1
  110. package/web/_astro/{chunk-FMBD7UC4.DWTB-Pif.js → chunk-FMBD7UC4.BtzKKFqR.js} +1 -1
  111. package/web/_astro/{chunk-ND2GUHAM.BPDQbiOG.js → chunk-ND2GUHAM.BJuDeeOy.js} +1 -1
  112. package/web/_astro/{chunk-QZHKN3VN.BRWIcuoM.js → chunk-QZHKN3VN.DSeMDgcQ.js} +1 -1
  113. package/web/_astro/{classDiagram-4FO5ZUOK.mGTCZsDO.js → classDiagram-4FO5ZUOK.D53Q4tCw.js} +1 -1
  114. package/web/_astro/{classDiagram-v2-Q7XG4LA2.mGTCZsDO.js → classDiagram-v2-Q7XG4LA2.D53Q4tCw.js} +1 -1
  115. package/web/_astro/{cose-bilkent-S5V4N54A.D1GEut-z.js → cose-bilkent-S5V4N54A.c712AFRH.js} +1 -1
  116. package/web/_astro/{dagre-BM42HDAG.BV0XG9Do.js → dagre-BM42HDAG.D-idisph.js} +1 -1
  117. package/web/_astro/{diagram-2AECGRRQ.DzpYxsjo.js → diagram-2AECGRRQ.DLgnsJCU.js} +1 -1
  118. package/web/_astro/{diagram-5GNKFQAL.Cm9YzJh4.js → diagram-5GNKFQAL.BiaxBVqx.js} +1 -1
  119. package/web/_astro/{diagram-KO2AKTUF.BjhottUj.js → diagram-KO2AKTUF.C8HX1vd8.js} +1 -1
  120. package/web/_astro/{diagram-LMA3HP47.BFsQW5kb.js → diagram-LMA3HP47.CfqDLLes.js} +1 -1
  121. package/web/_astro/{diagram-OG6HWLK6.8pdpzSWO.js → diagram-OG6HWLK6.15SDiEed.js} +1 -1
  122. package/web/_astro/{erDiagram-TEJ5UH35.Bd7KUJmJ.js → erDiagram-TEJ5UH35.DksYtOYM.js} +1 -1
  123. package/web/_astro/{flowDiagram-I6XJVG4X.7LWffkaE.js → flowDiagram-I6XJVG4X.DR_Au-HV.js} +1 -1
  124. package/web/_astro/{ganttDiagram-6RSMTGT7.BeDcO5tI.js → ganttDiagram-6RSMTGT7.CHhHrffI.js} +1 -1
  125. package/web/_astro/{gitGraphDiagram-PVQCEYII.Ca4n730A.js → gitGraphDiagram-PVQCEYII.B2Xehvam.js} +1 -1
  126. package/web/_astro/{index.Dbvuw6d4.css → index.DAxu50UF.css} +1 -1
  127. package/web/_astro/{infoDiagram-5YYISTIA.B0OakQYb.js → infoDiagram-5YYISTIA.C9c3CNNN.js} +1 -1
  128. package/web/_astro/{ishikawaDiagram-YF4QCWOH.DSmNQe-1.js → ishikawaDiagram-YF4QCWOH.BibUHkh8.js} +1 -1
  129. package/web/_astro/{journeyDiagram-JHISSGLW.Cy5ruEUu.js → journeyDiagram-JHISSGLW.BYoVHiyO.js} +1 -1
  130. package/web/_astro/{kanban-definition-UN3LZRKU.CUJXub0p.js → kanban-definition-UN3LZRKU.CM1K5wHE.js} +1 -1
  131. package/web/_astro/{linear.DC1jCCXn.js → linear.SPpjJUb-.js} +1 -1
  132. package/web/_astro/{mermaid.core.DxVP99Ab.js → mermaid.core.BAgx3nnb.js} +4 -4
  133. package/web/_astro/{mindmap-definition-RKZ34NQL.D0MaV6sJ.js → mindmap-definition-RKZ34NQL.D35oPG1R.js} +1 -1
  134. package/web/_astro/{pieDiagram-4H26LBE5.DCC6_q32.js → pieDiagram-4H26LBE5.DiWuRwk7.js} +1 -1
  135. package/web/_astro/{quadrantDiagram-W4KKPZXB.BeUOAM7C.js → quadrantDiagram-W4KKPZXB.B9PBzTWn.js} +1 -1
  136. package/web/_astro/{requirementDiagram-4Y6WPE33.Dbl4MASO.js → requirementDiagram-4Y6WPE33.CYuuamFN.js} +1 -1
  137. package/web/_astro/{sankeyDiagram-5OEKKPKP.HsLg0VS4.js → sankeyDiagram-5OEKKPKP.W24UhhtD.js} +1 -1
  138. package/web/_astro/{sequenceDiagram-3UESZ5HK.DT7DJTnZ.js → sequenceDiagram-3UESZ5HK.BpbNjA51.js} +1 -1
  139. package/web/_astro/{stateDiagram-AJRCARHV.d_ju1Vr1.js → stateDiagram-AJRCARHV.DqVsHudf.js} +1 -1
  140. package/web/_astro/{stateDiagram-v2-BHNVJYJU.DMCAjMJ4.js → stateDiagram-v2-BHNVJYJU.CzwHYX81.js} +1 -1
  141. package/web/_astro/{timeline-definition-PNZ67QCA.DNOHr62_.js → timeline-definition-PNZ67QCA.Bc3B6djw.js} +1 -1
  142. package/web/_astro/{vennDiagram-CIIHVFJN.B7dUy-1W.js → vennDiagram-CIIHVFJN.C-D5rh8O.js} +1 -1
  143. package/web/_astro/{wardley-L42UT6IY.DEqOXvBh.js → wardley-L42UT6IY.D7PdYCqn.js} +1 -1
  144. package/web/_astro/{wardleyDiagram-YWT4CUSO.BCRb2p6x.js → wardleyDiagram-YWT4CUSO.CwmJKXF3.js} +1 -1
  145. package/web/_astro/{xychartDiagram-2RQKCTM6.NxVQLdBh.js → xychartDiagram-2RQKCTM6.avDYnLsb.js} +1 -1
  146. package/web/index.html +2 -2
  147. package/web/_astro/BoardApp.Ce6zJYAH.js +0 -1
  148. package/web/_astro/channel.Uhm9O3UV.js +0 -1
@@ -33,10 +33,13 @@ each would be scope creep for one-liner procedures.
33
33
  > it does not map to a numbered dev-\* operation. See its command file and the backing skill for details.
34
34
 
35
35
  > **`dev-find-issue`** is not in this table. It is a thin `Skill()` wrapper over **`sp:issue-finding`**
36
- > (session-log forensics → optional CLI-gated fix task). Hygiene / post-batch analysis — not a spine
37
- > pipeline stage. See `plugins/sp/commands/dev-find-issue.md` and
38
- > `plugins/sp/skills/issue-finding/SKILL.md`. After a slow `/sp:dev-runall`, prefer
39
- > `/sp:dev-find-issue [<topic>]` before re-running the batch.
36
+ >(session-log forensics report → optional CLI-gated fix task via `--create-task`). Hygiene /
37
+ >post-batch analysis — not a spine pipeline stage. Report-first (task 0556): the default run
38
+ >renders the `spur history report --mode forensics` data plane plus model-authored analysis and
39
+ >creates nothing; task creation is opt-in behind `--create-task` (`--use-history`/`--no-task` are
40
+ >removed). See `plugins/sp/commands/dev-find-issue.md` and
41
+ >`plugins/sp/skills/issue-finding/SKILL.md`. After a slow `/sp:dev-runall`, prefer
42
+ >`/sp:dev-find-issue [<topic>]` before re-running the batch.
40
43
 
41
44
  > **`dev-find-conflict`** is not in this table. It is a thin `Skill()` wrapper over
42
45
  > **`sp:conflict-finding`** (authority-aware four-pillar semantic audit → optional confirmed,
@@ -137,12 +140,12 @@ must not be changed without updating the backing skill.
137
140
  ### 4. run
138
141
 
139
142
  - **Purpose:** Run a task through the execution pipeline (full) or execute a single pipeline step (implement).
140
- - **Inputs:** `<wbs>` (required). `--mode <full|implement>` selects the execution mode. `implement` invokes `sp:code-implementation` inline by default. Interactive `full` with omit/`--agent inline` reads `task-pipeline.yaml` and drives its actions/guards in the host session — host-controlled and non-subprocess, with eligible `agent.run` stages dispatching once to a native subagent and host fallback (task 0508); `--agent auto`, a name, or headless invocation launches the workflow subprocess. `--agent <inline|auto|name>` selects the execution surface (see [SSOT](cross-cutting.md#inline-default-execution-surface)). `--auto` skips the HITL approve gate / confirmations and propagates down the `--next` chain. `--next` controls chaining only and never changes the mode; a pipeline implement stage must invoke `/sp:dev-run <wbs> --mode implement`. On implement success with `--next`, transition `todo → wip → testing` through the FSM (guards honored — no `--no-lifecycle`) + chain to `/sp:dev-verify <wbs> --auto --next`. On a guard failure, stop as review-pending. **Partial-deliverable rule:** if the task ships only part of its requirements (e.g. an R1/R2 split with the rest in a follow-up task), the `## Solution` section must state that explicitly and the verify verdict will record the scope. `--wrap` hands off to `/sp:dev-wrap <wbs>` after the main step; the `--agent` selector is preserved into that handoff when supplied (omission remains omission), and the wrap hop reports its own trigger-3 subprocess override per the wrap contract.
143
+ - **Inputs:** `<wbs>` (required). `--mode <full|implement>` selects the execution mode. `implement` invokes `sp:code-implementation` inline by default. Interactive `full` with omitted `--agent` or explicit `--agent inline` reads `task-pipeline.yaml` and drives its actions/guards in the host session — host-controlled and non-subprocess; **omitted** `--agent` keeps 0508 eligibility (eligible `agent.run` stages dispatch once to a native subagent, host fallback), while explicit `--agent inline` is the zero-dispatch carve-out (every stage executes in the invoking session). `--agent auto`, a name, or headless invocation launches the workflow subprocess. `--agent <inline|auto|name>` selects the execution surface (see [SSOT](cross-cutting.md#inline-default-execution-surface)). `--auto` skips the HITL approve gate / confirmations and propagates down the `--next` chain. `--next` controls chaining only and never changes the mode; a pipeline implement stage must invoke `/sp:dev-run <wbs> --mode implement`. On implement success with `--next`, transition `todo → wip → testing` through the FSM (guards honored — no `--no-lifecycle`) + chain to `/sp:dev-verify <wbs> --auto --next`. On a guard failure, stop as review-pending. **Partial-deliverable rule:** if the task ships only part of its requirements (e.g. an R1/R2 split with the rest in a follow-up task), the `## Solution` section must state that explicitly and the verify verdict will record the scope. `--wrap` hands off to `/sp:dev-wrap <wbs>` after the main step; the `--agent` selector is preserved into that handoff when supplied (omission remains omission), and the wrap hop reports its own trigger-3 subprocess override per the wrap contract.
141
144
  - **Backing:** `sp:spur-dev` skill — `run` operation for the full pipeline (the spine drives it); `sp:code-implementation` competency skill for the implement step (the spine dispatches to it).
142
145
  - **Modes:**
143
146
  - **`full`** (default): Drive the full pipeline — precheck → implement → test → review → approve(HITL) → verify → record → done. Interactive omit/inline uses [inline-pipeline-driver.md](inline-pipeline-driver.md) (host-controlled; eligible stages may use a native subagent); explicit/headless executor selection invokes `spur workflow run .spur/workflows/task-pipeline.yaml --vars '{"wbs":"<wbs>"}'` (with `profile: auto` when `--auto`). Both monitor/surface HITL and preserve the YAML gates. `--next` never changes this mode.
144
147
  - **`implement`** (explicit `--mode implement` only): Execute only the implement step. Read the task's `## Requirements` / `## Design` / `## Plan`, write the code that satisfies them, author the `## Solution` change-map section (file:line + what/why per changed file) via `spur task update <wbs> --section Solution --from-file`. This is the implement step the pipeline calls — it is NOT the pipeline driver. With `--next`: on success, transition `todo → wip → testing` through the FSM (guards honored — no `--no-lifecycle`) + chain to `/sp:dev-verify <wbs> --auto --next`; on a guard failure, stop as review-pending. **Partial-deliverable rule:** if the task ships only part of its requirements (e.g. an R1/R2 split with the rest in a follow-up task), the `## Solution` and `## Review` sections MUST carry a `⚠️ PARTIAL` marker naming the deferred part and the follow-up WBS — see `plugins/sp/commands/dev-run.md` → "Section ownership".
145
- - **Delegation:** `Skill(skill="sp:spur-dev", args="run-inline $ARGUMENTS")` for interactive full omit/inline; `Skill(skill="sp:spur-dev", args="run $ARGUMENTS")` for explicit/headless full mode; `Skill(skill="sp:code-implementation", args="$ARGUMENTS")` for implement mode.
148
+ - **Delegation:** `Skill(skill="sp:spur-dev", args="run-inline $ARGUMENTS")` for interactive full omit/inline (explicit `inline` = zero-dispatch carve-out); `Skill(skill="sp:spur-dev", args="run $ARGUMENTS")` for explicit/headless full mode; `Skill(skill="sp:code-implementation", args="$ARGUMENTS")` for implement mode.
146
149
 
147
150
  ### 5. refine
148
151
 
@@ -249,11 +252,11 @@ must not be changed without updating the backing skill.
249
252
  ### 6. plan
250
253
 
251
254
  - **Purpose:** Plan a feature from a description — intake → feature create → AC generation → feature check gate → decomposition → batch-create (with **Design by default**).
252
- - **Inputs:** `"<description>"` (required). `--feature <id>` links to an existing feature. `--parent <feature-id>` nests under a parent. The planning pipeline's `agent.run` stages always dispatch a subprocess; `--agent <inline|auto|name>` selector accepted (see [SSOT](cross-cutting.md#inline-default-execution-surface)). **Design package flags (unified with `/sp:dev-idea`):**
255
+ - **Inputs:** `"<description>"` (required). `--feature <id>` links to an existing feature. `--parent <feature-id>` nests under a parent. The planning pipeline's `agent.run` stages always dispatch a subprocess; `--agent <inline|auto|name>` selector accepted — explicit `inline` is rejected on this headless surface with the stable special error (see [SSOT](cross-cutting.md#inline-default-execution-surface)). **Design package flags (unified with `/sp:dev-idea`):**
253
256
  - **Default:** author task `design` on every batch item + feature satellite when the seam heuristic fires (**ties lean design**). There is **no** `--design` force flag.
254
257
  - `--skip-design` — skip feature satellite **and** omit task `design` fields (scaffold only; refine fills later). Sole design opt-out.
255
258
  - `--approve-taste` — with `--auto`, pre-clear design-approval taste pause when that gate is used (`design_approved=true`). Alias: `--design-approved`.
256
- - **Backing:** `sp:spur-dev` skill, `plan` operation. Stage `plan` floors at `capable-2` (fallback `capable-3`).
259
+ - **Backing:** `sp:spur-dev` skill, `plan` operation. Stage floor: the `planner` role per [`roles.md`](../../../references/roles.md) — this file names roles, never tiers (0538 R4).
257
260
  - **Behavior:** Clarify scope → `spur feature create` → author BDD AC → `spur feature check` gate → decompose into task-batch JSON **including `design` (unless `--skip-design`)** → `spur task batch-create` gate. Design package details: [planning-workflow.md](planning-workflow.md) Step 5.5.
258
261
  - **Delegation:** `Skill(skill="sp:spur-dev", args="plan $ARGUMENTS")`
259
262
 
@@ -297,7 +300,7 @@ must not be changed without updating the backing skill.
297
300
  ### 14. wrap
298
301
 
299
302
  - **Purpose:** Wrap up a single completed task — capture learnings, record metrics, sync docs, and optionally advance the feature / clean up the branch.
300
- - **Inputs:** `<wbs>` (required, positional). `--agent <inline|auto|name>` names the wrap's model-bearing executor (default: `agent.default`); wrap is workflow-backed, so omit/`inline` resolves to `agent.default` under objective trigger 3 (durable auditable run record required), `auto` tier-resolves an executor, and a name pins that executor into `vars.agent` (see [SSOT](cross-cutting.md#inline-default-execution-surface)). `--auto` skips objective confirmations (the branch-cleanup HITL gate still pauses — irreversible). `--merge` triggers branch cleanup (irreversible HITL gate).
303
+ - **Inputs:** `<wbs>` (required, positional). `--agent <inline|auto|name>` names the wrap's model-bearing executor (default: `agent.default`); wrap is workflow-backed, so omitted `--agent` resolves to `agent.default` under objective trigger 3 (durable auditable run record required) while explicit `--agent inline` is rejected with the stable special error (headless workflow surface), `auto` tier-resolves an executor, and a name pins that executor into `vars.agent` (see [SSOT](cross-cutting.md#inline-default-execution-surface)). `--auto` skips objective confirmations (the branch-cleanup HITL gate still pauses — irreversible). `--merge` triggers branch cleanup (irreversible HITL gate).
301
304
  - **Backing:** `spur workflow run .spur/workflows/wrapup-pipeline.yaml` — direct workflow invocation (no backing skill; the pipeline IS the procedure).
302
305
  - **Behavior:** Resolves the executor (`agent.default` for omit/`inline`, tier-resolved for `auto`, unchanged for a name), emits a pre-dispatch notice naming the subprocess override — `execution surface: subprocess`, `reason: trigger 3 — durable auditable run record required`, `requested agent: <selector>`, `executor: <resolved>` — then builds `--vars '{"tasks":"[\"<wbs>\"]","agent":"<resolved>","profile":"interactive|auto","merge":"true|false"}'` and invokes the wrapup pipeline. The pipeline runs: task-resolve → doc-sync → learning-capture → metrics-record → (feature-transition) → (branch-cleanup) → done. Task statuses are NOT mutated. Branch cleanup is an irreversible HITL gate that always pauses, even under `--auto`.
303
306
  - **Vars string typing:** `tasks` is a JSON-encoded **string**, not a JSON array — `spur workflow run --vars` accepts only string values (`--vars values must be strings`); the pipeline's guards parse the string with `jq length`. `jq -nc` guarantees the shape:
@@ -313,9 +316,9 @@ must not be changed without updating the backing skill.
313
316
  ### 15. wrapall
314
317
 
315
318
  - **Purpose:** Wrap up a batch of completed tasks — capture learnings, record metrics, sync docs, advance a feature through legal lifecycle edges, and optionally clean up branches.
316
- - **Inputs:** `--since <iso-date>` filters done tasks by frontmatter `updated_at >= date` (v1 approximation). `--feature <id>` selects all tasks under a feature AND advances the feature through legal lifecycle edges (`backlog → active → verifying → done`, guards honored). `--status <s>` (default: `done`) filters by task status. `--agent <inline|auto|name>` names the wrap's model-bearing executor (default: `agent.default`); wrap is workflow-backed, so omit/`inline` resolves to `agent.default` under objective trigger 3 (durable auditable run record required), `auto` tier-resolves an executor, and a name pins that executor into `vars.agent` (see [SSOT](cross-cutting.md#inline-default-execution-surface)). `--auto` skips objective confirmations. `--merge` triggers branch cleanup (irreversible HITL gate).
319
+ - **Inputs:** `--since <iso-date>` filters done tasks by frontmatter `updated_at >= date` (v1 approximation). `--feature <id>` selects all tasks under a feature AND advances the feature through legal lifecycle edges (`backlog → active → verifying → done`, guards honored). `--status <s>` (default: `done`) filters by task status. `--agent <inline|auto|name>` names the wrap's model-bearing executor (default: `agent.default`); wrap is workflow-backed, so omitted `--agent` resolves to `agent.default` under objective trigger 3 (durable auditable run record required) while explicit `--agent inline` is rejected with the stable special error (headless workflow surface), `auto` tier-resolves an executor, and a name pins that executor into `vars.agent` (see [SSOT](cross-cutting.md#inline-default-execution-surface)). `--auto` skips objective confirmations. `--merge` triggers branch cleanup (irreversible HITL gate).
317
320
  - **Backing:** `spur workflow run .spur/workflows/wrapup-pipeline.yaml` — direct workflow invocation.
318
- - **Behavior:** Resolves the task list via `spur task list --json` (filtered by `--feature`, `--since`, `--status`), resolves the executor (`agent.default` for omit/`inline`, tier-resolved for `auto`, unchanged for a name), emits a pre-dispatch notice naming the subprocess override — `execution surface: subprocess`, `reason: trigger 3 — durable auditable run record required`, `requested agent: <selector>`, `executor: <resolved>` — then builds `--vars '{"tasks":"[...]","feature":"<id>","agent":"<resolved>","profile":"interactive|auto","merge":"true|false"}'` and invokes the wrapup pipeline. The pipeline runs the same states as `wrap` but with the full task list and optional feature transition. Task statuses are NOT mutated. Feature transitions go through `spur feature update` so lifecycle guards apply. Branch cleanup is an irreversible HITL gate.
321
+ - **Behavior:** Resolves the task list via `spur task list --json` (filtered by `--feature`, `--since`, `--status`), resolves the executor (`agent.default` for omitted `--agent`, tier-resolved for `auto`, unchanged for a name; explicit `--agent inline` is rejected with the stable special error), emits a pre-dispatch notice naming the subprocess override — `execution surface: subprocess`, `reason: trigger 3 — durable auditable run record required`, `requested agent: <selector>`, `executor: <resolved>` — then builds `--vars '{"tasks":"[...]","feature":"<id>","agent":"<resolved>","profile":"interactive|auto","merge":"true|false"}'` and invokes the wrapup pipeline. The pipeline runs the same states as `wrap` but with the full task list and optional feature transition. Task statuses are NOT mutated. Feature transitions go through `spur feature update` so lifecycle guards apply. Branch cleanup is an irreversible HITL gate.
319
322
  - **Vars string typing:** `tasks` is a JSON-encoded **string**, not a JSON array — `--vars` values must be strings (the CLI rejects raw arrays); `jq -nc` passes the array text through as a string value:
320
323
 
321
324
  ```bash
@@ -134,7 +134,7 @@ On the subprocess path, when `--agent <value>` is set (passed through from the t
134
134
  `--vars '{"wbs":"<wbs>","agent":"<value>","implementAgent":"<value>"}'`. The pipeline YAML reads
135
135
  `${vars.agent}` for review/verify/test-fix and `${vars.implementAgent}` for implement — setting
136
136
  both keys ensures the pinned executor reaches every hop. The full value-semantics contract (one
137
- rule, value table, objective triggers, and headless `inline`→`agent.default` resolution per ADR-047)
137
+ rule, value table, objective triggers, and headless `inline` rejection (stable special error) per the ADR-047 G5 amendment)
138
138
  lives in [cross-cutting.md](cross-cutting.md#inline-default-execution-surface) — the SSOT.
139
139
  This file documents only the **workflow-pipeline mechanics**: how the selector reaches `agent.run`
140
140
  steps. Precedence chain: `--agent` / explicit `--vars` → `agent.default` → YAML literal (see SSOT
@@ -245,12 +245,13 @@ an executor failed — the executor is swappable via config, the pipeline is not
245
245
  **When an `agent.run` step fails (timeout, non-zero exit, empty output):**
246
246
 
247
247
  1. **Diagnose, don't bypass.** Check `spur agent doctor <executor>` — is the agent
248
- installed? Is auth present? Then check `.spur/config.yaml` → which executor does the
249
- phase resolve to? Which model does that executor use? Could that model be out of tokens,
250
- rate-limited, or deprecated?
248
+ installed? Is auth present? Then check `.spur/config.yaml` → which role/executor does the
249
+ run resolve to (`agent.default` role stage-registry tier ladder)? Which model does that
250
+ executor use? Could that model be out of tokens, rate-limited, or deprecated?
251
251
  2. **Switch executors, don't abandon the pipeline.** Override the agent for the run:
252
- `spur workflow run ... --vars '{"wbs":"<wbs>","agent":"<alt-executor>"}'` or re-run with
253
- a different `default-by-phase` mapping. The operator can also update config in-flight.
252
+ `spur workflow run ... --vars '{"wbs":"<wbs>","agent":"<alt-executor-or-role>"}'`, or change
253
+ the `agent.default` role / stage-registry tier floor in config. The operator can also update
254
+ config in-flight.
254
255
  3. **Surface to the operator.** If you cannot determine the cause, ask. Do NOT silently
255
256
  fall back to direct implementation. A pipeline step failure is a recoverable event; a
256
257
  bypass is an irrecoverable provenance loss.
@@ -299,17 +300,18 @@ the partial work still in the working tree. The failure output names the partial
299
300
  (honest `done_reason`, verdict regeneration).
300
301
 
301
302
  **3. Match the executor to the size (task 0487 R3).** Size and executor capability are one
302
- decision, not two. **≥ 6 requirements or ≥ 9 Plan items → a `capable-1`+ executor, or split the
303
+ decision, not two. **≥ 6 requirements or ≥ 9 Plan items → a `reviewer`-role executor (the
304
+ `reviewer` row of [`roles.md`](../../../references/roles.md) declares the floor), or split the
303
305
  task.** A `cheap`/`standard`-tier model handed a task that big does not fail fast: it consumes the
304
306
  entire `implementTimeoutMs` and exits 3 with a partial tree (run `ca130182` — 7 reqs / 9 plan
305
307
  items / 12+ files → 30 minutes, 6 of 12 files, no tests, no docs, no `## Solution`).
306
308
 
307
309
  The precheck size gate enforces this: it resolves `$implementAgent`'s capability tier
308
- (`spur agent doctor <exec> --json` → `capabilityTier`) and writes FAIL for a large task on a
309
- sub-`capable-1` executor, naming the executor and its tier. An unknown or undeclared tier reads as
310
- `standard`, so the block is the default. Clear it deliberately — `--agent <capable>` /
311
- `--vars '{"implementAgent":"<capable>"}'`, or split — never by raising `maxImplementReqs`: the caps
312
- accept a big task, they do not make a flash model able to finish one.
310
+ (`spur agent doctor <exec> --json` → `capabilityTier`) and writes FAIL for a large task on an
311
+ executor below the `reviewer` role's floor, naming the executor and its tier. An unknown or
312
+ undeclared tier reads as the `coder` floor, so the block is the default. Clear it deliberately —
313
+ `--agent <capable>` / `--vars '{"implementAgent":"<capable>"}'`, or split — never by raising
314
+ `maxImplementReqs`: the caps accept a big task, they do not make a flash model able to finish one.
313
315
 
314
316
  The empty-implement guard (`requireDiff` on the task-pipeline `implement` step, R3) fails the
315
317
  run fast when an implement exits 0 with zero non-corpus changes — a no-op never drifts into
@@ -47,14 +47,25 @@ The value table below is the C3a cross-file parity surface (kept in lockstep wit
47
47
 
48
48
  | Value | Who does the work | Derived surface |
49
49
  | ------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
50
- | `inline` (default when omitted) | Whoever is running this session (interactive) or `agent.default` (headless) | Interactive: inline — host-controlled, eligible model stages may use a native subagent (0508); headless: subprocess of `agent.default` |
51
- | `auto` | Tier-resolved from the stage's `min_tier` + `fallback` | Subprocess |
50
+ | `(omitted)` | The agent running this session | Host session — host-controlled; eligible model stages may use a native subagent (0508) |
51
+ | `inline` | The agent running this session | Host session — hard guarantee: zero dispatch, never a subprocess, never a workflow hop; headless surfaces reject `inline` (exit 2, stable special error) |
52
+ | `auto` | The role the caller declared — this command's `role:` frontmatter or the workflow step's `role:` (Layer 1, `plugins/sp/references/roles.md`); with nothing declared, `agent.default`'s role (0542) | Subprocess |
52
53
  | `<name>` | That coding agent or configured executor | Inline when it is the current session's agent; subprocess otherwise |
53
54
 
55
+ **Declared-role threading (0538 R1).** Every command file declares `role: <scribe|coder|reviewer|planner>`
56
+ in its YAML frontmatter, taken from its row in `plugins/sp/references/roles.md`; the dispatcher
57
+ threads it into `--agent` so subprocess dispatch routes by the declared role. An explicit `--agent`
58
+ value always wins; the declared role is the default when the flag is `auto`/omitted at a subprocess
59
+ boundary. The same declaration exists on workflow `agent.run` steps (`role:` beside `agent:`) and is
60
+ threaded by `AgentRunActionRunner`; a pin still beats role routing permanently (0536 R2).
61
+
54
62
  The previous `--inline` and `--subprocess` flags (feature H82, task 0413) are collapsed into this
55
63
  selector: `--inline` → `--agent inline`, `--subprocess` → `--agent auto`. Those two flags are no
56
64
  longer part of the command surface; their anchors (`#flag-inline`, `#flag-subprocess`) are retained
57
- as stubs below so external links do not dangle. Operator-layer vocabulary (task 0405): `agent` names
65
+ as stubs below so external links do not dangle. **Superseded (feature G5):** the `--inline`
66
+ `--agent inline` leg of the collapse no longer means "equivalent to omitting the flag" — explicit
67
+ `inline` is the zero-dispatch host-session carve-out (see
68
+ [cross-cutting.md](cross-cutting.md#inline-default-execution-surface)). Operator-layer vocabulary (task 0405): `agent` names
58
69
  the concrete coding-agent tool; `executor` remains the domain-layer role and is not a command flag.
59
70
  `inline` and `auto` are reserved values — config validation rejects an executor claiming either.
60
71
 
@@ -193,13 +204,13 @@ Select an execution mode: `full|implement` on `dev-run` (full pipeline vs implem
193
204
  `briefing|structure|architecture|design|full` on `dev-reverse`. Mode selection is explicit and orthogonal
194
205
  to `--next`.
195
206
 
196
- ### `--task [<feature-id>]`seed a task from the current result
207
+ ### `--task <wbs>` — task work or task narrowing
197
208
 
198
209
  **Anchor:** `#flag-task`.
199
210
 
200
- Connect the current command's result to task work (`dev-brainstorm`, `dev-debug`, `dev-dogfood`,
201
- `dev-find-next`). The optional value and the effect are per-command — this flag is a family, not one
202
- behavior:
211
+ Connect the current command's result to task work, or narrow a history analysis to one task
212
+ (`dev-brainstorm`, `dev-debug`, `dev-dogfood`, `dev-find-next`, `dev-history-load`). The value and
213
+ the effect are per-command — this flag is a family, not one behavior:
203
214
 
204
215
  - `dev-brainstorm` `[<feature-id>]` — **creates** one task from the chosen approach, landing at
205
216
  `todo` ready for refine. Optional feature id scopes it.
@@ -210,6 +221,7 @@ behavior:
210
221
  id names the target instead of offering rank 1.
211
222
  - `dev-debug` `[<wbs>]` — **attaches** findings to an existing task. Optional WBS names it.
212
223
  - `dev-dogfood` (no value) — **records** run outcomes against the task under test.
224
+ - `dev-history-load` `<wbs>` — narrows the `analyze` step to that task's messages.
213
225
 
214
226
  ### `--since <ref>` — lower bound on a range
215
227
 
@@ -234,6 +246,15 @@ Remediation policy on verify-family commands (`dev-verify`, `dev-verifyall`):
234
246
  Upper bound on a range: a git ref on `dev-changelog` (defaults to `HEAD`), or an ISO date on
235
247
  `dev-find-issue` (defaults to now).
236
248
 
249
+ ### `--source <source>` — agent source to scope the operation
250
+
251
+ **Anchor:** `#flag-source`.
252
+
253
+ Scope the operation to one agent source (`dev-find-issue`, `dev-history-load`): one of
254
+ `pi|claude|codex|gemini|opencode|antigravity|openclaw|omp|grok|agy` (or `all`). On
255
+ `dev-history-load` the value is forwarded to **both** `spur history import` and
256
+ `spur history analyze`; on `dev-find-issue` it narrows the report scan to that source's sessions.
257
+
237
258
  ### `--status <s>` — filter by task status
238
259
 
239
260
  **Anchor:** `#flag-status`.
@@ -153,6 +153,8 @@ transition to `done`.
153
153
  > an answer file or debugging an UNKNOWN verdict.
154
154
 
155
155
  > **Corpus baseline discipline (`corpus-check`).** `corpus-check` sweeps every task/feature and fails on any structural finding outside `config/corpus-baseline.json`. The baseline is two-sided: an unlisted finding fails, **and** a listed entry that no longer reproduces fails. When introducing or tightening finding rules, reconcile the fallout in the same commit (constitution **T10**).
156
+ >
157
+ > **Transition-shim discipline (`transition-shim-check`, task 0541 / ADR-058).** Wired as the last step of `spur-check` / `spur-check-new`. Two-sided against `config/transition-shims.json`: an `@transition-shim(<id>)` marker with no manifest entry fails as a **new unregistered shim**, **and** a listed entry whose marker is gone from source fails as a **stale entry**. Emptying the manifest is the definition of the agent-role transition being complete. A removal condition must be objectively checkable against the repository. Shapes: `docs/04_DESIGN.md` §2.5.
156
158
 
157
159
  > **Sandbox test baseline (`bun run test` / `spur-check`).** In the restricted Bash sandbox
158
160
  > `bun run spur-check` exits **1 regardless of code health**: ~24 tests bind real ports and the
@@ -62,7 +62,9 @@ Action semantics come from the YAML and the workflow action contract:
62
62
  **Native-subagent dispatch (R2 eligibility, evaluated before each action):**
63
63
 
64
64
  1. The invocation is one of the two interactive inline full-pipeline surfaces (`dev-run --mode full`
65
- or sequential `dev-runall`, omit/`inline`).
65
+ or sequential `dev-runall`) with the `--agent` flag **omitted**. Explicit `--agent inline` is the
66
+ zero-dispatch carve-out: every model stage executes in the invoking host session — the
67
+ native-subagent leg below never applies to it.
66
68
  2. The YAML action kind is `agent.run` and its input is a pure slash command. Shell, note, file,
67
69
  guard, and operator-interaction actions remain host-executed.
68
70
  3. The current state/action has no operator-confirmation action, `pause: true`, approve/taste/ask
@@ -71,10 +73,18 @@ Action semantics come from the YAML and the workflow action contract:
71
73
  and Spur task/run-artifact access.
72
74
 
73
75
  All four pass → dispatch. Any pre-dispatch failure → execute the stage **once** in the host session.
76
+ An `agent.run` whose `input` is free-form prose rather than a pure slash command fails condition 2
77
+ and is never dispatch-eligible: the driver executes it in the host session and logs it with the
78
+ existing host-fallback line `stage <id> executed inline in session <session-id>` — it does not
79
+ reformulate the prose into a command, spawn a subagent for it, or silently promote it to dispatch.
74
80
  No token estimate, stage-size threshold, model heuristic, or configuration switch is added.
75
81
 
76
82
  **Dispatch and join:** before dispatch, capture the same pre-action git snapshot used by
77
- `requireDiff` enforcement. Send only: the stage id, the YAML's exact pure slash command, and
83
+ `requireDiff` enforcement, and resolve `answerFile`/`expectFile` against the worktree root the
84
+ resolved absolute path, not the YAML's relative string, is what the dispatched agent is instructed
85
+ to write and what post-join validation reads. Resolving once at the dispatch boundary fixes every
86
+ surface at once; a relative path would resolve against whatever cwd the writer process happens to
87
+ have. Send only: the stage id, the YAML's exact pure slash command, and
78
88
  `execution surface already resolved: native subagent; do not dispatch this stage again`. The WBS/path
79
89
  already carried by the slash command is the handoff — do not paste task/session transcripts or embed
80
90
  machine-specific session paths. Dispatch exactly one native subagent and wait for it; the inline FSM
@@ -103,7 +103,7 @@
103
103
  "properties": {
104
104
  "default": {
105
105
  "type": "string",
106
- "description": "Default executor selector for `--agent auto` (resolved as an executor name first, then a legacy agent name e.g. pi, claude, codex)."
106
+ "description": "Default role for `--agent auto` when nothing is declared (0542 R2). A role id (scribe, coder, reviewer, planner) selects its tier's cheapest eligible executor; a configured executor name still resolves during the transition with a one-time warning; any other value is rejected naming both accepted sets."
107
107
  },
108
108
  "executors": {
109
109
  "type": "array",
@@ -135,6 +135,26 @@
135
135
  }
136
136
  }
137
137
  },
138
+ "roles": {
139
+ "type": "object",
140
+ "description": "Per-role tier/stage overrides over DEFAULT_AGENT_ROLES (0572 / ADR-061). Keys are the closed role vocabulary (scribe, coder, reviewer, planner); a present field replaces the default for that role, an omitted field keeps it. Mirrors @gobing-ai/spur-config AgentRoleConfigSchema (Zod is SSOT).",
141
+ "additionalProperties": {
142
+ "type": "object",
143
+ "properties": {
144
+ "tier": {
145
+ "type": "string",
146
+ "enum": ["cheap", "standard", "capable-1", "capable-2", "capable-3"],
147
+ "description": "Replacement capability tier for the role. Must not sit below the highest min_tier among the role's folded stages (enforced at the CLI boundary)."
148
+ },
149
+ "stages": {
150
+ "type": "array",
151
+ "minItems": 1,
152
+ "items": { "type": "string", "minLength": 1 },
153
+ "description": "Replacement folded-stage list for the role. Ids must come from the canonical stage registry (validated at the CLI boundary). Omit the field to keep the default — an empty array is rejected."
154
+ }
155
+ }
156
+ }
157
+ },
138
158
  "team": {
139
159
  "type": "object",
140
160
  "description": "Declarative agent teams keyed by team id (the map key is the teamId). Each team materializes a roster of agent specs (feature M). Mirrors @gobing-ai/spur-config TeamConfigSchema (Zod is SSOT).",
@@ -168,12 +188,11 @@
168
188
  },
169
189
  {
170
190
  "type": "object",
171
- "required": ["executor"],
172
191
  "properties": {
173
192
  "executor": {
174
193
  "type": "string",
175
194
  "minLength": 1,
176
- "description": "Executor name \u2014 resolved against agent.executors first, else a raw canonical agent type."
195
+ "description": "Executor name \u2014 resolved against agent.executors first, else a raw canonical agent type. Optional since 0543: a role-only member (no executor) resolves one through the tier ladder at materialization; at least one of role or executor is required."
177
196
  },
178
197
  "id": {
179
198
  "type": "string",
@@ -183,6 +202,11 @@
183
202
  "purpose": {
184
203
  "type": "string"
185
204
  },
205
+ "role": {
206
+ "type": "string",
207
+ "enum": ["scribe", "coder", "reviewer", "planner"],
208
+ "description": "Layer-1 role id (0538 R3): typed routing field carried onto the materialized spec; purpose stays prose."
209
+ },
186
210
  "workspace": {
187
211
  "type": "string",
188
212
  "minLength": 1,
@@ -251,6 +275,26 @@
251
275
  }
252
276
  }
253
277
  },
278
+ "history": {
279
+ "type": "object",
280
+ "description": "History import/analyze configuration (feature E3). Opt-in operation-triggered refresh.",
281
+ "properties": {
282
+ "refresh": {
283
+ "type": "object",
284
+ "properties": {
285
+ "on_completion": {
286
+ "type": "boolean",
287
+ "description": "Enqueue a coalesced history refresh when a task or pipeline run completes. Default false (opt-in; hidden automation is out of contract)."
288
+ },
289
+ "debounce_ms": {
290
+ "type": "integer",
291
+ "minimum": 0,
292
+ "description": "Coalescing window in milliseconds. Completions inside the window join one pending refresh. Default 60000."
293
+ }
294
+ }
295
+ }
296
+ }
297
+ },
254
298
  "tasks": {
255
299
  "type": "object",
256
300
  "description": "Task-folder registration (design \u00a79). Absorbs the legacy docs/.tasks/config.json folders + baseCounter concepts. Mirrors @gobing-ai/spur-config tasksConfigSchema (Zod is SSOT).",