@gobing-ai/spur 0.3.41 → 0.3.42

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 (185) hide show
  1. package/.claude-plugin/marketplace.json +15 -0
  2. package/README.md +15 -1
  3. package/config/templates/AGENTS.md +5 -3
  4. package/config/workflows/task-pipeline.yaml +103 -12
  5. package/package.json +15 -12
  6. package/plugins/README.md +655 -0
  7. package/plugins/sp/README.md +621 -0
  8. package/plugins/sp/agents/expert-spur.md +109 -0
  9. package/plugins/sp/agents/super-coder.md +126 -0
  10. package/plugins/sp/agents/super-planner.md +283 -0
  11. package/plugins/sp/agents/super-reviewer.md +154 -0
  12. package/plugins/sp/commands/dev-arch.md +30 -0
  13. package/plugins/sp/commands/dev-brainstorm.md +40 -0
  14. package/plugins/sp/commands/dev-changelog.md +28 -0
  15. package/plugins/sp/commands/dev-daily.md +29 -0
  16. package/plugins/sp/commands/dev-debug.md +29 -0
  17. package/plugins/sp/commands/dev-dogfood.md +33 -0
  18. package/plugins/sp/commands/dev-featurechange.md +130 -0
  19. package/plugins/sp/commands/dev-find-conflict.md +51 -0
  20. package/plugins/sp/commands/dev-find-issue.md +76 -0
  21. package/plugins/sp/commands/dev-find-next.md +60 -0
  22. package/plugins/sp/commands/dev-fixall.md +33 -0
  23. package/plugins/sp/commands/dev-gitmsg.md +28 -0
  24. package/plugins/sp/commands/dev-gtd.md +97 -0
  25. package/plugins/sp/commands/dev-handover.md +26 -0
  26. package/plugins/sp/commands/dev-idea.md +50 -0
  27. package/plugins/sp/commands/dev-next.md +31 -0
  28. package/plugins/sp/commands/dev-parallel.md +30 -0
  29. package/plugins/sp/commands/dev-plan.md +46 -0
  30. package/plugins/sp/commands/dev-refine.md +48 -0
  31. package/plugins/sp/commands/dev-refineall.md +65 -0
  32. package/plugins/sp/commands/dev-refresh.md +32 -0
  33. package/plugins/sp/commands/dev-reverse.md +32 -0
  34. package/plugins/sp/commands/dev-review.md +31 -0
  35. package/plugins/sp/commands/dev-run.md +63 -0
  36. package/plugins/sp/commands/dev-runall.md +80 -0
  37. package/plugins/sp/commands/dev-simplify.md +39 -0
  38. package/plugins/sp/commands/dev-unit.md +29 -0
  39. package/plugins/sp/commands/dev-verify.md +48 -0
  40. package/plugins/sp/commands/dev-verifyall.md +72 -0
  41. package/plugins/sp/commands/dev-wrap.md +30 -0
  42. package/plugins/sp/commands/dev-wrapall.md +33 -0
  43. package/plugins/sp/commands/rule-add.md +18 -0
  44. package/plugins/sp/commands/rule-refine.md +18 -0
  45. package/plugins/sp/commands/rule-scan.md +18 -0
  46. package/plugins/sp/commands/spur-init.md +22 -0
  47. package/plugins/sp/commands/workflow-add.md +18 -0
  48. package/plugins/sp/commands/workflow-refine.md +18 -0
  49. package/plugins/sp/hooks/agent-hint.ts +60 -0
  50. package/plugins/sp/hooks/careful-guard.ts +147 -0
  51. package/plugins/sp/hooks/context-post-tool.ts +325 -0
  52. package/plugins/sp/hooks/context-session-start.ts +182 -0
  53. package/plugins/sp/hooks/context-session-stop.ts +95 -0
  54. package/plugins/sp/hooks/hooks.json +51 -0
  55. package/plugins/sp/hooks/pi/guard-extension.ts +341 -0
  56. package/plugins/sp/hooks/task-write-guard.ts +84 -0
  57. package/plugins/sp/plugin.json +8 -0
  58. package/plugins/sp/scripts/batch-preflight.ts +204 -0
  59. package/plugins/sp/scripts/daily-summary/daily-summary.ts +606 -0
  60. package/plugins/sp/scripts/daily-summary/logger.ts +28 -0
  61. package/plugins/sp/scripts/dogfood-testing/detect-pipeline-driving.ts +363 -0
  62. package/plugins/sp/scripts/dogfood-testing/validate-report.ts +168 -0
  63. package/plugins/sp/scripts/feature-sync-bounded.ts +451 -0
  64. package/plugins/sp/scripts/stage-registry-adapter.ts +1341 -0
  65. package/plugins/sp/scripts/task-size-precheck.ts +202 -0
  66. package/plugins/sp/scripts/validate-commands.ts +651 -0
  67. package/plugins/sp/scripts/validate-flag-contracts.ts +875 -0
  68. package/plugins/sp/skills/brainstorm/SKILL.md +361 -0
  69. package/plugins/sp/skills/brainstorm/agents/openai.yaml +14 -0
  70. package/plugins/sp/skills/brainstorm/examples/ideation-example.md +209 -0
  71. package/plugins/sp/skills/brainstorm/metadata.openclaw +7 -0
  72. package/plugins/sp/skills/brainstorm/references/grilling-interview.md +68 -0
  73. package/plugins/sp/skills/brainstorm/references/workflows.md +255 -0
  74. package/plugins/sp/skills/branch-workflow/SKILL.md +109 -0
  75. package/plugins/sp/skills/branch-workflow/references/branch-lifecycle.md +69 -0
  76. package/plugins/sp/skills/branch-workflow/references/worktree-patterns.md +100 -0
  77. package/plugins/sp/skills/code-implementation/SKILL.md +176 -0
  78. package/plugins/sp/skills/code-implementation/references/debugging.md +64 -0
  79. package/plugins/sp/skills/code-implementation/references/implementation-patterns.md +113 -0
  80. package/plugins/sp/skills/code-improvement/SKILL.md +231 -0
  81. package/plugins/sp/skills/code-improvement/references/deepening-signals.md +205 -0
  82. package/plugins/sp/skills/code-review/SKILL.md +112 -0
  83. package/plugins/sp/skills/code-review/references/receiving-code-review.md +70 -0
  84. package/plugins/sp/skills/code-review/references/review-lenses.md +117 -0
  85. package/plugins/sp/skills/code-review/references/self-review-checklist.md +53 -0
  86. package/plugins/sp/skills/code-review/references/verification-before-completion.md +68 -0
  87. package/plugins/sp/skills/code-simplification/SKILL.md +225 -0
  88. package/plugins/sp/skills/code-testing/SKILL.md +108 -0
  89. package/plugins/sp/skills/code-testing/references/stacks/bun-ts.md +165 -0
  90. package/plugins/sp/skills/code-testing/references/stacks/go.md +88 -0
  91. package/plugins/sp/skills/code-testing/references/stacks/python.md +117 -0
  92. package/plugins/sp/skills/code-testing/references/test-loop-breaker.md +37 -0
  93. package/plugins/sp/skills/code-testing/references/test-output-discipline.md +52 -0
  94. package/plugins/sp/skills/code-testing/references/unit-testing.md +212 -0
  95. package/plugins/sp/skills/code-verification/SKILL.md +535 -0
  96. package/plugins/sp/skills/code-verification/references/code-improvement.md +39 -0
  97. package/plugins/sp/skills/code-verification/references/secu-review.md +94 -0
  98. package/plugins/sp/skills/code-verification/references/verdict-schema.md +141 -0
  99. package/plugins/sp/skills/conflict-finding/SKILL.md +254 -0
  100. package/plugins/sp/skills/conflict-finding/references/authority-resolution.md +258 -0
  101. package/plugins/sp/skills/conflict-finding/references/comparison-protocol.md +277 -0
  102. package/plugins/sp/skills/conflict-finding/references/finding-contract.md +346 -0
  103. package/plugins/sp/skills/conflict-finding/references/remediation-routing.md +276 -0
  104. package/plugins/sp/skills/daily-summary/SKILL.md +171 -0
  105. package/plugins/sp/skills/daily-summary/agents/openai.yaml +13 -0
  106. package/plugins/sp/skills/doc-evolve/SKILL.md +175 -0
  107. package/plugins/sp/skills/doc-evolve/references/operations.md +93 -0
  108. package/plugins/sp/skills/dogfood-testing/SKILL.md +608 -0
  109. package/plugins/sp/skills/dogfood-testing/references/monitor-ledger.md +211 -0
  110. package/plugins/sp/skills/dogfood-testing/references/report-template.md +351 -0
  111. package/plugins/sp/skills/doubt-driven-development/SKILL.md +136 -0
  112. package/plugins/sp/skills/functional-review/SKILL.md +364 -0
  113. package/plugins/sp/skills/functional-review/references/verdict-schema.md +133 -0
  114. package/plugins/sp/skills/indexed-context/SKILL.md +164 -0
  115. package/plugins/sp/skills/issue-finding/SKILL.md +424 -0
  116. package/plugins/sp/skills/issue-finding/agents/openai.yaml +15 -0
  117. package/plugins/sp/skills/issue-finding/examples/expected-findings.json +27 -0
  118. package/plugins/sp/skills/issue-finding/examples/session-test-loop.jsonl +23 -0
  119. package/plugins/sp/skills/issue-finding/references/session-formats.md +121 -0
  120. package/plugins/sp/skills/next-feature/SKILL.md +125 -0
  121. package/plugins/sp/skills/next-feature/references/handoff-routing.md +92 -0
  122. package/plugins/sp/skills/next-feature/references/proposal-contract.md +49 -0
  123. package/plugins/sp/skills/next-feature/references/ranking-rubric.md +52 -0
  124. package/plugins/sp/skills/next-feature/references/signal-derivation.md +67 -0
  125. package/plugins/sp/skills/next-router/SKILL.md +181 -0
  126. package/plugins/sp/skills/next-router/references/messages.md +90 -0
  127. package/plugins/sp/skills/next-router/references/routing-table.md +216 -0
  128. package/plugins/sp/skills/parallel-execution/SKILL.md +148 -0
  129. package/plugins/sp/skills/parallel-execution/references/dispatch-surface.md +100 -0
  130. package/plugins/sp/skills/parallel-execution/references/fan-out-patterns.md +101 -0
  131. package/plugins/sp/skills/parallel-execution/references/result-synthesis.md +94 -0
  132. package/plugins/sp/skills/reverse-engineering/SKILL.md +375 -0
  133. package/plugins/sp/skills/reverse-engineering/agents/openai.yaml +18 -0
  134. package/plugins/sp/skills/source-driven-development/SKILL.md +124 -0
  135. package/plugins/sp/skills/spec-decomposition/SKILL.md +117 -0
  136. package/plugins/sp/skills/spec-decomposition/references/decomposition.md +539 -0
  137. package/plugins/sp/skills/spur-cli/SKILL.md +133 -0
  138. package/plugins/sp/skills/spur-cli/references/agent.md +179 -0
  139. package/plugins/sp/skills/spur-cli/references/features/acceptance-criteria.md +82 -0
  140. package/plugins/sp/skills/spur-cli/references/features/hierarchy-mece.md +177 -0
  141. package/plugins/sp/skills/spur-cli/references/features/roadmap-priority.md +84 -0
  142. package/plugins/sp/skills/spur-cli/references/features/verbs.md +122 -0
  143. package/plugins/sp/skills/spur-cli/references/features.md +234 -0
  144. package/plugins/sp/skills/spur-cli/references/init.md +119 -0
  145. package/plugins/sp/skills/spur-cli/references/message.md +98 -0
  146. package/plugins/sp/skills/spur-cli/references/rules/authoring-rules.md +212 -0
  147. package/plugins/sp/skills/spur-cli/references/rules/fine-tuning.md +148 -0
  148. package/plugins/sp/skills/spur-cli/references/rules/operations.md +228 -0
  149. package/plugins/sp/skills/spur-cli/references/rules/validation-and-extension.md +129 -0
  150. package/plugins/sp/skills/spur-cli/references/rules.md +209 -0
  151. package/plugins/sp/skills/spur-cli/references/serve.md +58 -0
  152. package/plugins/sp/skills/spur-cli/references/tasks/l3-guard-cheatsheet.md +98 -0
  153. package/plugins/sp/skills/spur-cli/references/tasks/section-editing.md +95 -0
  154. package/plugins/sp/skills/spur-cli/references/tasks/verbs.md +361 -0
  155. package/plugins/sp/skills/spur-cli/references/tasks.md +278 -0
  156. package/plugins/sp/skills/spur-cli/references/team.md +133 -0
  157. package/plugins/sp/skills/spur-cli/references/workflows/authoring-workflows.md +226 -0
  158. package/plugins/sp/skills/spur-cli/references/workflows/operations.md +211 -0
  159. package/plugins/sp/skills/spur-cli/references/workflows/validation-and-extension.md +129 -0
  160. package/plugins/sp/skills/spur-cli/references/workflows.md +355 -0
  161. package/plugins/sp/skills/spur-dev/SKILL.md +224 -0
  162. package/plugins/sp/skills/spur-dev/references/ac-style-guide.md +196 -0
  163. package/plugins/sp/skills/spur-dev/references/cross-cutting.md +664 -0
  164. package/plugins/sp/skills/spur-dev/references/decision-brief.md +80 -0
  165. package/plugins/sp/skills/spur-dev/references/dev-operations.md +546 -0
  166. package/plugins/sp/skills/spur-dev/references/done-housekeeping.md +164 -0
  167. package/plugins/sp/skills/spur-dev/references/execution-batch.md +727 -0
  168. package/plugins/sp/skills/spur-dev/references/execution-workflow.md +350 -0
  169. package/plugins/sp/skills/spur-dev/references/feature-link-helper.md +191 -0
  170. package/plugins/sp/skills/spur-dev/references/flag-glossary.md +417 -0
  171. package/plugins/sp/skills/spur-dev/references/gate-checklists.md +171 -0
  172. package/plugins/sp/skills/spur-dev/references/glossary.md +95 -0
  173. package/plugins/sp/skills/spur-dev/references/idea-evaluation.md +80 -0
  174. package/plugins/sp/skills/spur-dev/references/inline-pipeline-driver.md +88 -0
  175. package/plugins/sp/skills/spur-dev/references/planning-workflow.md +302 -0
  176. package/plugins/sp/skills/spur-dev/references/product-planning.md +206 -0
  177. package/plugins/sp/skills/spur-dev/references/section-batching.md +24 -0
  178. package/plugins/sp/skills/sys-architecture/SKILL.md +155 -0
  179. package/plugins/sp/skills/sys-architecture/references/decision-method.md +137 -0
  180. package/plugins/sp/skills/sys-architecture/references/upkeep-survey.md +75 -0
  181. package/plugins/sp/skills/sys-debugging/SKILL.md +228 -0
  182. package/plugins/sp/skills/sys-debugging/references/debugging-protocol.md +62 -0
  183. package/plugins/sp/skills/test-driven-development/SKILL.md +248 -0
  184. package/plugins/sp/skills/wayfinder/SKILL.md +292 -0
  185. package/spur.js +6093 -5180
@@ -0,0 +1,417 @@
1
+ ---
2
+ name: flag-glossary
3
+ description: "Extracted sections (task 0408): the shared-flag glossary — one canonical entry per flag shared by two or more /sp:dev-* commands — and the --next chain contract that expands the --next entry. Moved verbatim from dev-operations.md; the operation catalog stays there."
4
+ see_also:
5
+ - spur-dev
6
+ - dev-operations
7
+ ---
8
+
9
+ # Flag Glossary
10
+
11
+ The shared-flag glossary and the `--next` chain contract, extracted from `dev-operations.md` (task
12
+ 0408). Every flag shared by two or more `/sp:dev-*` commands has exactly one canonical entry here;
13
+ the chain contract is the prose expansion of the `--next` entry. The operation catalog (map, backing
14
+ patterns, skill-backed, inline) remains in `dev-operations.md`.
15
+
16
+ ## Flag glossary
17
+
18
+ Every flag shared by two or more commands has exactly one entry here. This is the single place a
19
+ shared flag's meaning is stated; command argument-hints and table rows cite it and must not
20
+ re-define it. The shared-flag set is derived mechanically from the 28 command argument-hints (a flag
21
+ counts as shared when it appears in two or more); flags appearing on a single command stay documented
22
+ in that command's body and are not listed here.
23
+
24
+ **Reference form (mechanically detectable).** A command file points at a glossary entry with a
25
+ markdown link whose link target is the entry's anchor — `[`--next`](#flag-next)`. The anchor is
26
+ always `#flag-<name>` where `<name>` is the flag minus its leading `--` (so `--keep-going` →
27
+ `#flag-keep-going`). The test gate (`command-flag-parity.test.ts`, task 0403) finds these references
28
+ with the regex ``\[`--<flag>`\]\(#flag-`` over each command file — **a shared flag declared without
29
+ this reference fails the build.** Prose-only citations (the flag name mentioned in a sentence but not
30
+ in the link form) do not count; the reference must be the link.
31
+
32
+ **Availability rule.** Two flags are only declared where the underlying capability already exists:
33
+ `--json` where the command already produces a structured result a script could consume; `--auto`
34
+ where the command already has at least one HITL gate. The rule forces a declaration only where the
35
+ capability exists — a command that would benefit from `--json` but produces only prose is recorded
36
+ as a follow-up, not quietly left inconsistent.
37
+
38
+ ### `--agent <inline|auto|name>` — name who does the model-bearing work
39
+
40
+ **Anchor:** `#flag-agent`.
41
+
42
+ **SSOT:** the full contract — the one rule, value semantics, executor precedence chain,
43
+ `implementAgent` override, objective triggers, and surface-derivation logic — lives in
44
+ [cross-cutting.md](cross-cutting.md#inline-default-execution-surface).
45
+ The value table below is the C3a cross-file parity surface (kept in lockstep with the SSOT by
46
+ `validate-flag-contracts.ts`), not an independent restatement.
47
+
48
+ | Value | Who does the work | Derived surface |
49
+ | ------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
50
+ | `inline` (default when omitted) | Whoever is running this session (interactive) or `agent.default` (headless) | Interactive: inline (host session); headless: subprocess of `agent.default` |
51
+ | `auto` | Tier-resolved from the stage's `min_tier` + `fallback` | Subprocess |
52
+ | `<name>` | That coding agent or configured executor | Inline when it is the current session's agent; subprocess otherwise |
53
+
54
+ The previous `--inline` and `--subprocess` flags (feature H82, task 0413) are collapsed into this
55
+ selector: `--inline` → `--agent inline`, `--subprocess` → `--agent auto`. Those two flags are no
56
+ 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
58
+ the concrete coding-agent tool; `executor` remains the domain-layer role and is not a command flag.
59
+ `inline` and `auto` are reserved values — config validation rejects an executor claiming either.
60
+
61
+ #### `--inline` (removed — collapsed into `--agent`)
62
+
63
+ **Anchor:** `#flag-inline` (stub retained to avoid dangling external links).
64
+
65
+ Removed in feature H82 (task 0413). `--inline` is now `--agent inline`. See
66
+ [`--agent`](#flag-agent) above and
67
+ [cross-cutting.md](cross-cutting.md#inline-default-execution-surface) for the full contract.
68
+
69
+ #### `--subprocess` (removed — collapsed into `--agent`)
70
+
71
+ **Anchor:** `#flag-subprocess` (stub retained to avoid dangling external links).
72
+
73
+ Removed in feature H82 (task 0413). `--subprocess` is now `--agent auto`. See
74
+ [`--agent`](#flag-agent) above and
75
+ [cross-cutting.md](cross-cutting.md#inline-default-execution-surface) for the full contract.
76
+
77
+ ### `--next` — chain-to-completion with propagation
78
+
79
+ **Anchor:** `#flag-next`.
80
+
81
+ On success, hand the task back to `sp:next-router`, which resolves the next dispatch and re-invokes
82
+ with `--next` still set, until the work is done or a gate stops it. The flag is a **chain
83
+ to completion**, not a single step, a mode selector, or a status transition. `/sp:dev-next` (the
84
+ command) runs the next step **once**; `--next` (the flag) makes any command it is passed to **keep
85
+ going**. Neither is renamed.
86
+
87
+ **Redefinition (breaking).** Before this entry (feature H8, task 0399, 2026-07-31) `--next` carried
88
+ four incompatible meanings across seven commands: chain-ish (`dev-verify`, `dev-verifyall`), a
89
+ mode selector (`dev-run` → implement-only), a deprecated no-op (`dev-review`), and undeclared
90
+ declarations never explained (`dev-refine`, `dev-refineall`, `dev-brainstorm`). Task 0401 reconciled
91
+ all seven against this single definition. Existing `dev-run --next` invocations selecting
92
+ implement-only mode are the only genuinely breaking case; the replacement is `--mode implement`.
93
+
94
+ ### `--json` — emit machine-readable output
95
+
96
+ **Anchor:** `#flag-json`.
97
+
98
+ Emit the command's result as structured JSON a script can consume, instead of the human-readable
99
+ default. Only declared where the command already produces a structured result; declaring it never
100
+ implies building a new output shape.
101
+
102
+ ### `--auto` — skip objective HITL confirmations
103
+
104
+ **Anchor:** `#flag-auto`.
105
+
106
+ Skip objective HITL confirmations inside this command (feature-check, batch-create, the approve
107
+ gate). Taste gates and irreversible HITL gates (e.g. `--merge`) still pause even under `--auto`.
108
+ Only declared where the command already has at least one HITL gate the flag can skip.
109
+
110
+ ### `--keep-going` — batch failure policy: skip dependents, continue independents
111
+
112
+ **Anchor:** `#flag-keep-going`.
113
+
114
+ Batch operation only (`dev-refineall`, `dev-runall`). When a task in the batch
115
+ fails, skip its in-batch dependents and continue the independent ones, instead of the default
116
+ halt-on-first-failure. Never silently retried; the failure is still reported.
117
+
118
+ ### `--continue` — resume an interrupted batch from checkpoint
119
+
120
+ **Anchor:** `#flag-continue`.
121
+
122
+ Resume a batch (`dev-runall`) or task (`dev-run`) that was interrupted mid-run, picking up from the
123
+ recorded checkpoint rather than restarting. Orthogonal to `--next` (lifecycle chaining) and
124
+ `--keep-going` (failure policy): the three axes address different problems and `routing-table.md`
125
+ offers `--continue` and `--next` as competing options only when the batch was interrupted mid-run.
126
+
127
+ ### `--wrap` — run the wrap hop after the main step
128
+
129
+ **Anchor:** `#flag-wrap`.
130
+
131
+ After the main step completes, run the wrap hop (learnings, metrics, doc-sync). On `dev-runall`
132
+ with `--next`, wrap runs **once for the batch** after every task reaches terminal status, mirroring
133
+ the batch-once shippable gate `dev-verifyall` uses. Without `--next`, `--wrap` is wrap-without-
134
+ chaining — the single task or batch wraps without advancing the lifecycle.
135
+
136
+ ### `--force` — bypass a named guard
137
+
138
+ **Anchor:** `#flag-force`.
139
+
140
+ Bypass a specific named guard that would otherwise stop the command (e.g. a shippable check on
141
+ `dev-verify`/`dev-verifyall`). Named, not global: the command documentation states which guard is
142
+ forced. Never bypasses lifecycle status transitions or irreversible HITL gates.
143
+
144
+ ### `--feature <id>` — scope the operation to a feature
145
+
146
+ **Anchor:** `#flag-feature`.
147
+
148
+ Scope the operation to all tasks under a feature id (`^[A-Z][1-9]*$`). On feature-advancing
149
+ commands (`dev-wrapall`) it also advances the feature through legal lifecycle edges with guards
150
+ honored.
151
+
152
+ ### `--focus <dims>` — constrain the operation to specific dimensions
153
+
154
+ **Anchor:** `#flag-focus`.
155
+
156
+ Constrain the operation to a named subset of dimensions — review dimensions on `dev-review`/
157
+ `dev-verify`/`dev-verifyall` (`all|stack|dependencies|data|flows|api|security|quality|performance`),
158
+ a refine focus mode on `dev-refine`/`dev-refineall`, or a reconstruction lens on `dev-reverse`.
159
+ Narrowing reduces token cost; omitting runs
160
+ all dimensions.
161
+
162
+ ### `--scope <path>` — limit the operation to a path
163
+
164
+ **Anchor:** `#flag-scope`.
165
+
166
+ Limit the operation to a file or directory path (`dev-arch`, `dev-debug`, `dev-fixall`,
167
+ `dev-gitmsg`, `dev-gtd`, `dev-simplify`) to bound the working set.
168
+
169
+ ### `--dry-run` — print the plan without executing
170
+
171
+ **Anchor:** `#flag-dry-run`.
172
+
173
+ Resolve and print what the command would do, without dispatching or mutating state. The plan output
174
+ is the contract; divergence between `--dry-run` and the real run is a bug.
175
+
176
+ ### `--tasks <selector>` — explicit task selector for a batch
177
+
178
+ **Anchor:** `#flag-tasks`.
179
+
180
+ Batch operation only (`dev-parallel`, `dev-refineall`, `dev-runall`, `dev-verifyall`). An explicit selector — WBS
181
+ list, status pseudo-list (`todo`, `wip`), `feature:<id>`, or `ready` — resolving to the set the
182
+ batch runs over. Required on `dev-parallel`, `dev-runall`, and `dev-verifyall`, where `--feature` is an optional
183
+ restrictor. On `dev-refineall` it is instead one of a required pair — supply exactly one of
184
+ `--feature` or `--tasks`.
185
+
186
+ ### `--mode <kind>` — select an execution mode
187
+
188
+ **Anchor:** `#flag-mode`.
189
+
190
+ Select an execution mode: `full|implement` on `dev-run` (full pipeline vs implement-only),
191
+ `sequential|parallel` on `dev-runall` (serial vs fanned-out-independent-subset),
192
+ `fan-out|review-panel|investigation` on `dev-parallel`, and the reconstruction depth
193
+ `briefing|structure|architecture|design|full` on `dev-reverse`. Mode selection is explicit and orthogonal
194
+ to `--next`.
195
+
196
+ ### `--task [<feature-id>]` — seed a task from the current result
197
+
198
+ **Anchor:** `#flag-task`.
199
+
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:
203
+
204
+ - `dev-brainstorm` `[<feature-id>]` — **creates** one task from the chosen approach, landing at
205
+ `todo` ready for refine. Optional feature id scopes it.
206
+ - `dev-find-next` `[<feature-id>]` — after an **explicit operator confirm**, dispatches the planning
207
+ half on the ranked winner (`/sp:dev-plan` to decompose, then `/sp:dev-refineall --depth ready` to
208
+ freeze implement-ready). Creates no task itself; the confirm pauses regardless of `--auto`.
209
+ Optional feature id names the target instead of offering rank 1.
210
+ - `dev-debug` `[<wbs>]` — **attaches** findings to an existing task. Optional WBS names it.
211
+ - `dev-dogfood` (no value) — **records** run outcomes against the task under test.
212
+
213
+ ### `--since <ref>` — lower bound on a range
214
+
215
+ **Anchor:** `#flag-since`.
216
+
217
+ Lower bound on a range: a git ref on `dev-changelog`, or an ISO date on `dev-find-issue` and
218
+ `dev-wrapall` (filters done
219
+ tasks by `updated_at >= date`).
220
+
221
+ ### `--fix <policy>` — remediation policy
222
+
223
+ **Anchor:** `#flag-fix`.
224
+
225
+ Remediation policy on verify-family commands (`dev-verify`, `dev-verifyall`):
226
+ `none|blockers-first|all`. `none` reports findings without fixing; `blockers-first` fixes only P1/P2;
227
+ `all` fixes everything found. Deprecated on `dev-review` (routes to `dev-verify --fix`).
228
+
229
+ ### `--until <ref>` — upper bound on a range
230
+
231
+ **Anchor:** `#flag-until`.
232
+
233
+ Upper bound on a range: a git ref on `dev-changelog` (defaults to `HEAD`), or an ISO date on
234
+ `dev-find-issue` (defaults to now).
235
+
236
+ ### `--status <s>` — filter by task status
237
+
238
+ **Anchor:** `#flag-status`.
239
+
240
+ Filter the operation by task status (`dev-wrapall` default `done`; `dev-refineall` to target a
241
+ specific status slice).
242
+
243
+ ### `--skip-shippable` — skip the shippable check
244
+
245
+ **Anchor:** `#flag-skip-shippable`.
246
+
247
+ Skip the shippable guard on verify-family commands (`dev-verify`, `dev-verifyall`). Used when
248
+ verifying a task whose artifact is intentionally not yet shippable (e.g. a doc-only task).
249
+
250
+ ### `--skip-design` — omit the design package
251
+
252
+ **Anchor:** `#flag-skip-design`.
253
+
254
+ Omit the design package (system-design satellite + task `### Design`) on planning commands
255
+ (`dev-plan`, `dev-idea`). The task is created without the design section; refine supplies it later.
256
+
257
+ ### `--output <path>` — write the result to a path
258
+
259
+ **Anchor:** `#flag-output`.
260
+
261
+ Write the command's result to a file path (`dev-daily`, `dev-reverse`) instead of stdout.
262
+
263
+ ### `--merge` — trigger branch cleanup
264
+
265
+ **Anchor:** `#flag-merge`.
266
+
267
+ Trigger branch cleanup after wrap (`dev-wrap`, `dev-wrapall`). Irreversible HITL gate — always
268
+ pauses, even under `--auto`.
269
+
270
+ ### `--max-retry <n>` — bound the retry loop
271
+
272
+ **Anchor:** `#flag-max-retry`.
273
+
274
+ Bound the retry loop on fix-family commands (`dev-dogfood`, `dev-fixall`, `dev-gtd`). After `n` consecutive
275
+ failed fix attempts, stop and ask the operator rather than looping indefinitely.
276
+
277
+ ### `--full` — rewrite a `--next` run as full pipeline
278
+
279
+ **Anchor:** `#flag-full`.
280
+
281
+ **Context-specific — two unrelated meanings; do not collapse them.**
282
+
283
+ - `dev-next`: rewrite a `dev-run … --next` primary dispatch into `dev-run <wbs> --mode full`
284
+ (without `--next`). No effect on non-run routes (warning W-FULL).
285
+ - `dev-dogfood`: full report verbosity — emit all report sections rather than the summary set.
286
+
287
+ The shared spelling is historical. A rename would be the cleaner fix; until then each command's
288
+ Argument Flags row states its own meaning and this entry records that they differ.
289
+
290
+ ### `--description <text>` — supply a description
291
+
292
+ **Anchor:** `#flag-description`.
293
+
294
+ Supply a description (`dev-refine` / `dev-refineall` focus description). Used when the operator
295
+ wants to inject a specific framing rather than derive it from context. `dev-idea` takes its idea as
296
+ a positional argument, not via this flag.
297
+
298
+ ### `--depth <…>` — depth control (context-specific values)
299
+
300
+ **Anchor:** `#flag-depth`.
301
+
302
+ **Context-specific — two unrelated value sets; do not collapse them.** Declared on
303
+ `dev-brainstorm`, `dev-refine`, and `dev-refineall`.
304
+
305
+ **`dev-brainstorm`:** `--depth <basic|detailed|comprehensive>` — breadth vs depth of the ideation
306
+ tree (default `detailed`). Unrelated to task-section readiness.
307
+
308
+ **`dev-refine` / `dev-refineall`:** `--depth <standard|ready>` — how deep refine must take target
309
+ sections (Background, Requirements, Acceptance Criteria, Design, Plan) before SKIP/success.
310
+ Orthogonal to `--focus` (which _narrows_ domains) and to `--mode` on other commands.
311
+
312
+ | Value (refine family) | Bar | `--auto` SKIP behavior |
313
+ | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
314
+ | `standard` (default when omitted) | L3 structural completeness (not empty/placeholder; check-clean for target sections) | **SKIP** when no L3 findings on target sections |
315
+ | `ready` | **Implement-ready** freeze: another agent can implement without inventing design (frozen names/APIs or explicit "no new API", anti-patterns, file targets, handoffs, out-of-scope) | **Do not SKIP** on L3-clean alone — run the ready checklist; rewrite sections until the bar is met |
316
+
317
+ Default for refine stays `standard` so ordinary `refineall --auto` remains cheap. Use `ready` for
318
+ multi-package / multi-agent handoffs and flaky-pipeline features where a wrong implement is costly.
319
+ Full checklist: [dev-operations.md](dev-operations.md) § refine (depth ready).
320
+
321
+ ### `--bdd` — use BDD scenarios as the verification lens
322
+
323
+ **Anchor:** `#flag-bdd`.
324
+
325
+ Use the task's Gherkin scenarios as the verification lens on verify-family commands (`dev-verify`,
326
+ `dev-verifyall`).
327
+
328
+ ### `--approve-taste` — pre-clear all taste gates this run
329
+
330
+ **Anchor:** `#flag-approve-taste`.
331
+
332
+ Planning commands (`dev-idea`, `dev-plan`): with `--auto`, skip all remaining taste pauses this
333
+ run (idea-eval + design-approval). Sets `idea_approved=true` and `design_approved=true`. One CLI
334
+ flag sets both.
335
+
336
+ ### `--worktree [<name>]` — run the batch in an isolated git worktree (create or reuse)
337
+
338
+ **Anchor:** `#flag-worktree`.
339
+
340
+ Batch commands only (`dev-refineall`, `dev-runall`, `dev-verifyall`): run the entire driver loop
341
+ inside an isolated git worktree instead of the operator's working directory. One flag, two modes:
342
+
343
+ - **Create mode** — bare `--worktree` (no value). Cut a fresh branch from the current HEAD's ref,
344
+ create a sibling worktree with a derived name, run the batch there. On a fully successful batch
345
+ the worktree branch is fast-forward-merged onto its base ref, then the worktree is removed and the
346
+ branch deleted; on any failure, halt, or non-fast-forward base, the worktree is **retained intact**
347
+ — never auto-deleted, never auto-merged.
348
+ - **Reuse mode** — `--worktree <name>` / `--worktree=<name>`. Attach the batch to a worktree that
349
+ already exists. `<name>` resolves against `git worktree list --porcelain` (exact path → basename →
350
+ checked-out branch); exactly one match must survive or the batch aborts **before any task work**
351
+ (see [execution-batch.md § Name resolution](execution-batch.md#name-resolution---worktree-name)).
352
+ Reuse mode **never creates a worktree** — an unresolvable name is an error, not a create. The batch
353
+ adopts the worktree's checked-out branch (a detached HEAD aborts), adopts or synthesizes the
354
+ `.spur/run/` state marker, and runs. On a fully successful batch the branch is fast-forward-merged
355
+ onto its base ref **but the worktree and branch are retained**; on failure/halt/non-FF the tree is
356
+ retained, same as create mode.
357
+
358
+ **Ownership rule (one statement, both modes): the flag removes only what it created.** In create
359
+ mode the flag owns the tree, so cleanup is its job; in reuse mode the operator owns it, so the flag
360
+ merges but never removes. This keeps the continue-the-work loop stable — after a green reuse batch
361
+ `baseRef == $BRANCH`, so the same worktree keeps fast-forwarding on the next invocation.
362
+
363
+ **Value binding.** The following token is consumed as `<name>` **only when it does not begin with
364
+ `-`**, so `--worktree --auto` is the bare create form and `--agent`/`--feature`/etc. are never
365
+ swallowed as the name. `--worktree=<name>` is the unambiguous spelling. `/sp:dev-next` does not get
366
+ the flag (single step; not worth the worktree cost), and `--worktree --mode parallel` is rejected
367
+ (per-task parallel isolation stays task 0142). The full lifecycle — name resolution, dirty-tree
368
+ precheck, creation or adoption, crash-safe marker, merge-or-retain, and `--continue` re-entry — is
369
+ specified in [execution-batch.md § Worktree isolation](execution-batch.md#worktree-isolation---worktree).
370
+ Portable `git worktree` commands only; the git mechanics are reused from
371
+ [worktree-patterns.md](../../branch-workflow/references/worktree-patterns.md).
372
+
373
+ ---
374
+
375
+ ## `--next` chain contract
376
+
377
+ The canonical definition lives in the glossary above; this section states the chain's stop
378
+ conditions, hop bound, and reporting contract that every declaring command and the router inherit.
379
+ These are derived from the per-row `Stop / notes` column in
380
+ [routing-table.md](../../next-router/references/routing-table.md), not invented here.
381
+
382
+ **Chain owner.** `sp:next-router` is the single owner of chain progression. Given a task and
383
+ `--next`, it resolves the next dispatch, invokes it with `--next` propagated, and repeats. The chain
384
+ does **not** live in the command files — per-command "what comes after me" logic would duplicate the
385
+ routing table seven or more times. Commands reference the glossary entry and the router; they do not
386
+ describe successors.
387
+
388
+ **Stop conditions.** A chain running under `--next` halts, cleanly, when any of these is true. Each
389
+ is named so the operator can tell **which step halted the chain and why**:
390
+
391
+ | Halt cause | Who reports it | Report shape |
392
+ | ------------------------------------------------------------------ | -------------------------------------------- | ---------------------------------------------------------------------------------------------- |
393
+ | A failing gate (lint/type/test/rule) | The step that hit it | "chain halted at `<step>` — `<gate>` failed: `<one-line cause>`" |
394
+ | A non-PASS verdict (PARTIAL/FAIL) | The verify step | "chain halted at `dev-verify <wbs>` — verdict `<VERDICT>`; see `.spur/run/<wbs>-verdict.json`" |
395
+ | A HITL pause (taste gate, irreversible gate, multi-candidate fork) | The step that paused | "chain halted at `<step>` — HITL pause (`<which>`); resume after operator input" |
396
+ | Unmet dependencies | `dev-refine`/`dev-run` precheck or router A2 | "chain halted at `<step>` — unmet deps: `<WBS list>`" |
397
+ | Terminal status (`done`, `cancelled`) | The router | "chain complete — task `<wbs>` is `<status>`" (distinct from a halt) |
398
+
399
+ A chain that stops at a gate is a **normal outcome, not an error**: it reports where and why and
400
+ exits cleanly. It is distinct from a chain that stops because the task is complete — the report
401
+ wording makes the two unambiguous (one says "halted at", the other says "complete").
402
+
403
+ **Hop bound.** A single `--next` chain performs at most **8 primary hops** (router invocations). A
404
+ routing cycle, or a task whose status never converges on terminal, would otherwise loop forever.
405
+ When the bound is hit the chain stops and reports: "chain halted — hop bound (8) reached at
406
+ `<step>` without reaching terminal status; this indicates a routing cycle, not completion." The
407
+ bound is sized for the longest legitimate chain (refine → run → verify → wrap is four hops; the
408
+ extra four absorb probe short-circuits like `dev-fixall`/`dev-unit`) and is a rule the router agent
409
+ follows and reports against, not a counter in code (the router is a prompt skill, not executable).
410
+
411
+ **Flag vs command disambiguation.** `/sp:dev-next` runs the next step **once** and stops;
412
+ `--next` makes any command it is passed to **keep going** until the work is done or a gate stops
413
+ it. The two compose: `/sp:dev-next <wbs> --next` is valid but redundant (the flag makes the single
414
+ dispatch keep going, which is what re-running `/sp:dev-next` without `--next` would do one hop at
415
+ a time). Neither is renamed.
416
+
417
+ ---
@@ -0,0 +1,171 @@
1
+ ---
2
+ name: gate-checklists
3
+ description: "Pre-gate verification checklists for the five corpus-mutating gates in the spur-dev lifecycle, plus the terminal `testing → done` gate. Each checklist is what the agent verifies BEFORE entering the gate — additive to the CLI's schema validation, catching intent errors the CLI cannot."
4
+ see_also:
5
+ - spur-dev
6
+ - cross-cutting
7
+ - execution-workflow
8
+ - planning-workflow
9
+ ---
10
+
11
+ # Gate Checklists
12
+
13
+ Each gate below mutates the corpus or commits the operator to a path. Verify every checkbox before
14
+ entering the gate. A failed checkbox means stop and fix — do not enter the gate hoping the CLI will
15
+ catch it (the CLI catches schema violations, not intent errors).
16
+
17
+ Run each checklist as an actual command sequence, not a mental confirmation:
18
+
19
+ 1. Read the checklist for the gate you are about to enter.
20
+ 2. Run each verification command (grep, `spur task check`, `bun run lint`, etc.).
21
+ 3. If any checkbox fails: stop, fix, re-run. Do not enter the gate.
22
+ 4. Only when every checkbox passes: enter the gate (run the CLI verb or trigger the workflow state).
23
+
24
+ ## Task lifecycle transitions
25
+
26
+ SSOT: `.spur/workflows/task-lifecycle.yaml`.
27
+
28
+ backlog → todo → wip → testing → done
29
+
30
+ - `wip → done` is **not** an edge. Go through `testing`.
31
+ - `done → wip` reopens (warning + mandatory History entry); `cancelled` is terminal.
32
+ - `blocked` is bidirectional with `todo`, `wip`, and `testing`.
33
+ - The two hard guards sit on `wip → testing` and `testing → done`; what the
34
+ `testing → done` guard requires is in the [done gate](#done-gate-testing--done)
35
+ section below.
36
+
37
+ ## feature-check gate
38
+
39
+ Entered before `spur feature check <id> --strict` (idea-pipeline `feature-check` state;
40
+ planning-pipeline AC validation).
41
+
42
+ - [ ] Feature file has a non-placeholder `## Goal` and `## Scope` section.
43
+ - [ ] Acceptance criteria are R-numbered scenarios in Gherkin `Feature/Scenario` form (see `ac-style-guide.md`).
44
+ - [ ] Each scenario has a stable title (renaming after task creation breaks traceability).
45
+ - [ ] No `TODO`, `TBD`, or `???` placeholders remain in the feature body.
46
+ - [ ] The `## Out of Scope` section is present and non-empty (PRD-shaped features only).
47
+ - [ ] If `--auto` is set: the AC schema is locally valid against the BDD validator before the gate runs.
48
+
49
+ ## batch-create gate
50
+
51
+ Entered before `spur task batch-create --file <json>` (idea-pipeline `batch-create` state;
52
+ planning-pipeline decomposition gate).
53
+
54
+ - [ ] The batch JSON is a bare array (not an object with a `tasks` key).
55
+ - [ ] Each entry validates locally against `apps/cli/schemas/task-batch.schema.json` (`additionalProperties: false` — no unknown keys).
56
+ - [ ] Each entry has a non-empty `name` (required).
57
+ - [ ] `feature_id` matches an existing feature (or is intentionally deferred with operator awareness).
58
+ - [ ] `parent_wbs` is set when the task is a child of a decomposition parent.
59
+ - [ ] `template` is one of `feature-impl`, `issue`, `review`, `meta` — chosen per task shape.
60
+ - [ ] Requirements, AC, Design, and Plan section bodies are filled (not template placeholder comments) — schema permits empty but execution cannot run against empty sections.
61
+ - [ ] Dependencies are encoded in Background/Plan prose (the CLI does not expose `dependencies` as a field).
62
+ - [ ] If `--auto` is set: a dry-run validation against `task-batch.schema.json` was run locally and passed.
63
+
64
+ ## precheck gate
65
+
66
+ Entered before `task-pipeline.yaml` `precheck` state runs `spur task check <wbs>`.
67
+
68
+ - [ ] `spur task check <wbs> --json` returns no `error`-level findings.
69
+ - [ ] The task's `feature_id` resolves to an existing feature (or is explicitly deferred with operator awareness).
70
+ - [ ] The `## Requirements` section is non-empty and R-numbered.
71
+ - [ ] The `## Acceptance Criteria` section has at least one scenario with a verify command.
72
+ - [ ] The `## Plan` section is an ordered checklist (not prose).
73
+ - [ ] The `## Design` section, if present, does not contradict the parent feature's design.
74
+ - [ ] No `TODO`, `TBD`, or `???` placeholders in Requirements, AC, Design, or Plan.
75
+
76
+ ## review gate
77
+
78
+ Entered before `task-pipeline.yaml` `review` state dispatches `sp:code-verification` (SECUA review).
79
+
80
+ - [ ] The implementation matches the task's `## Plan` checklist (every checked item maps to a code/test/doc change).
81
+ - [ ] `git status` shows only changes traceable to this task's Plan (no drive-by edits).
82
+ - [ ] Lint and typecheck pass (`bun run lint`).
83
+ - [ ] Tests pass (`bun run test`) — no `.skip`, `xfail`, or commented-out tests.
84
+ - [ ] New `biome-ignore` / `eslint-disable` suppressions: none, or each is justified inline.
85
+ - [ ] No new `console.*` in scripts (use a project logger if one exists).
86
+ - [ ] The `## Solution` section records the file:line change map and rationale.
87
+ - [ ] If the change is high-stakes (code/test/infra): raw gate tails are captured for the `## Testing` section.
88
+
89
+ ## verify gate
90
+
91
+ Entered before `task-pipeline.yaml` `verify` state produces a task verdict.
92
+
93
+ - [ ] `spur task check <wbs> --strict-core --json` returns PASS.
94
+ - [ ] Every AC scenario has a corresponding verify command that exited 0.
95
+ - [ ] The `## Solution` section is filled (not the placeholder comment).
96
+ - [ ] The `## Testing` section records the commands run and their outcomes.
97
+ - [ ] The `## Review` section records findings (or explicitly states "no findings").
98
+ - [ ] No gate was bypassed with `--no-verify`, `--force`, or a suppression comment.
99
+ - [ ] If `--auto` is set: the verdict is `PASS` (not `PARTIAL` or `FAIL`) — `--auto` does not auto-advance a failed verify.
100
+ - [ ] The task is ready for `spur task record <wbs>` and legal transition to `done`.
101
+
102
+ ## done gate (`testing → done`)
103
+
104
+ The terminal chain link: `/sp:dev-verify <wbs> --next` transitions `testing → done` on the
105
+ (post-`--fix`) PASS verdict. The transition runs **three** gate layers in the order below; a
106
+ failure at any layer stops the transition with that layer's remediation. **No `--no-lifecycle`:**
107
+ these guards are the final defense-in-depth check before `done`.
108
+
109
+ > **Precondition — `/sp:dev-review` must have run first** on a standalone
110
+ > `--next` invocation. Verify mode is forbidden from writing `## Review` (code-
111
+ > verification SKILL.md Step 10), yet the done-gate's Review L3 layer (see
112
+ > below) requires a populated P1–P4 `### Review` table. So a standalone
113
+ > `/sp:dev-verify --next` on a task that skipped `/sp:dev-review` cannot reach
114
+ > `done` unaided — the stop message will name the missing Review. The Step 10
115
+ > write prohibition stays intact; the contract tension is real and intentional.
116
+ > Pipeline-driven runs satisfy this automatically (the pipeline's `review`
117
+ > state runs `/sp:dev-review` before `verify`).
118
+
119
+ When `--fix` is set, `--next` acts on the **post-fix** verdict: the fix pass repairs findings, the
120
+ skill re-verifies (Step 10's bounded loop), and the **re-verified** verdict drives the transition.
121
+ A `--fix all` that turns a FAIL into a PASS therefore reaches `done`; a residual UNMET after the
122
+ bounded retry does not.
123
+
124
+ ### The three `testing → done` gate layers
125
+
126
+ The CLI verdict-artifact check runs first. The lifecycle adapter then checks provenance, Review L3,
127
+ and finally the workflow's strict-core shell guard. The table groups the two complementary
128
+ strict-core/verdict checks as one defense-in-depth layer even though they bracket the adapter checks.
129
+ The first denial wins; each denial names its own remediation. In verify-0293, the artifact check
130
+ passed, so provenance denied first and Review L3 denied on the retry.
131
+
132
+ | # | Gate layer | Triggers denial when | Remediation |
133
+ |---|------------|----------------------|-------------|
134
+ | 1 | **Strict-core + verdict artifact** (`spur task check <wbs> --strict-core` + `done-transition-guard.ts`) | The strict-core check fails, or `.spur/run/<wbs>-verdict.json` is **missing** or has a non-PASS aggregate. **Missing artifact is a deny** (not a silent allow — closes the 0349 "done without verdict" class). The aggregate is recomputed from requirement/AC rows; the harsher of stored and computed wins. | Re-run `/sp:dev-verify <wbs>` until PASS (writes the artifact), or explicitly override with `spur task update <wbs> done --force-done --reason "<why>"`. Docs-only pipelines write a docs PASS stub under `.spur/run/` before `done` (see `docs-pipeline.yaml`). |
135
+ | 2 | **Provenance guard** (`lifecycle-adapter.ts`) | No pipeline-kind run link exists for `<wbs>`. | Run `/sp:dev-run <wbs>` through the full pipeline, use `/sp:dev-run <wbs> --mode implement --auto --next` for the explicit step chain, or record the audited bypass with `SPUR_PROVENANCE_OVERRIDE=1`. |
136
+ | 3 | **Review L3** (`task-check.ts`) | `### Review` is empty, placeholder-only, or lacks a populated P1–P4 findings table. | Run `/sp:dev-review <wbs>`; verify cannot write Review because of the Step 10 prohibition above. |
137
+
138
+ When the verdict is **PARTIAL/FAIL**, or any gate layer fails: stop as review-pending — surface
139
+ the verdict (or the gate's blocking finding), leave the task at its current status, do NOT
140
+ transition to `done`.
141
+
142
+ > **Already-terminal task (`--force` re-audit):** when the task is already `done`/`cancelled`, a
143
+ > PASS verdict has no transition to make — `--next` is a no-op. The CLI prints the honest message
144
+ > `<wbs>: already <status> — no transition` (task 0292 R9) and exits 0. Do not expect a
145
+ > `testing → done` transition line.
146
+
147
+ > **Answer-file shape (R3).** The verify step's structured output (`.spur/run/<wbs>-verify-answer.txt`)
148
+ > is parsed by `spur task verdict` to derive the artifact. Free-form prose with no markdown
149
+ > requirement/AC tables parses to `verdict: "UNKNOWN"` and will deny the done-gate. The expected
150
+ > table format (`| Req | Status | Evidence |` and `| AC | Status | Evidence Type | Evidence |`)
151
+ > is documented in [sp:spur-cli `tasks/verbs.md` §Answer-file shape](../../spur-cli/references/tasks/verbs.md#answer-file-shape-what---from-answer-parses).
152
+ > The verify skill writes this shape automatically — operators only need it when hand-authoring
153
+ > an answer file or debugging an UNKNOWN verdict.
154
+
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
+ > **Sandbox test baseline (`bun run test` / `spur-check`).** In the restricted Bash sandbox
158
+ > `bun run spur-check` exits **1 regardless of code health**: ~24 tests bind real ports and the
159
+ > sandbox denies `listen`, so they fail environmentally. They cluster in seven suites — `spur
160
+ > projects CLI`, `startServer`, `createServerContext`, `healthModule`, `rpc client`,
161
+ > `project-start`, `ProjectRegistry` — and every one names a port/listen/`ps` error on the line
162
+ > above `(fail)`. Reproduce the class in one line:
163
+ > `bun -e 'Bun.serve({port:0, fetch:()=>new Response("x")})'`. `bun run test-cf` cannot run at all
164
+ > in-sandbox for the same reason.
165
+ >
166
+ > **Triage without a baseline run:** list the failing test *files*, then grep them for the surface
167
+ > you changed. If your change touches `task.ts` and no failing file references task/lifecycle, the
168
+ > failure is not yours. This costs seconds and mutates nothing — do **not** `git stash` to get a
169
+ > clean baseline on a shared working tree. Treat any failure that does *not* name a port/listen/`ps`
170
+ > cause as yours until proven otherwise; the count is a moving baseline, not a constant.
171
+