@gobing-ai/spur 0.3.50 → 0.3.52

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 (30) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/config/corpus-baseline.json +1995 -1939
  3. package/config/rules/quality/coverage-gate.yaml +3 -2
  4. package/config/tasks/section-matrix.yaml +7 -2
  5. package/config/workflows/pr-review.yaml +13 -11
  6. package/config/workflows/task-lifecycle.yaml +7 -6
  7. package/config/workflows/task-pipeline.yaml +37 -16
  8. package/package.json +1 -1
  9. package/plugins/sp/agents/super-planner.md +3 -2
  10. package/plugins/sp/agents/super-reviewer.md +5 -0
  11. package/plugins/sp/commands/dev-review.md +1 -1
  12. package/plugins/sp/plugin.json +1 -1
  13. package/plugins/sp/scripts/pr-reviewing.ts +57 -5
  14. package/plugins/sp/scripts/stage-registry-adapter.ts +40 -25
  15. package/plugins/sp/skills/code-improvement/SKILL.md +5 -3
  16. package/plugins/sp/skills/code-verification/SKILL.md +28 -31
  17. package/plugins/sp/skills/code-verification/references/verdict-schema.md +47 -0
  18. package/plugins/sp/skills/functional-review/SKILL.md +16 -15
  19. package/plugins/sp/skills/pr-reviewing/SKILL.md +6 -3
  20. package/plugins/sp/skills/spec-decomposition/references/decomposition.md +13 -14
  21. package/plugins/sp/skills/spur-cli/references/tasks/l3-guard-cheatsheet.md +7 -3
  22. package/plugins/sp/skills/spur-cli/references/tasks/section-editing.md +22 -13
  23. package/plugins/sp/skills/spur-cli/references/tasks/verbs.md +22 -11
  24. package/plugins/sp/skills/spur-cli/references/tasks.md +16 -10
  25. package/plugins/sp/skills/spur-dev/SKILL.md +10 -5
  26. package/plugins/sp/skills/spur-dev/references/dev-operations.md +5 -5
  27. package/plugins/sp/skills/spur-dev/references/execution-workflow.md +11 -4
  28. package/plugins/sp/skills/spur-dev/references/gate-checklists.md +5 -3
  29. package/plugins/sp/skills/spur-dev/references/section-batching.md +29 -13
  30. package/spur.js +382 -231
@@ -60,7 +60,13 @@ default. See the [inline-default execution-surface contract](cross-cutting.md#in
60
60
 
61
61
  > **Single-run & parse discipline (suite run cost control).** Run full quality/test suites (`bun run check` / `spur-check`) at most ONCE per task iteration (task 0436 R2). Parse failure details from the single retained command output rather than re-running full suites repeatedly to inspect errors. Re-run targeted/narrow test files (e.g. `bun test <file> --test-name-pattern <pattern>`) while iterating on fixes, and re-run the full suite only when all targeted fixes pass.
62
62
 
63
- ## Section ownership — `## Solution`
63
+ ## Section ownership — one writer per evidence section (F92 0593 R1)
64
+
65
+ | Section | Writer |
66
+ | --- | --- |
67
+ | `## Solution` | **implement** step (`sp:code-implementation`) |
68
+ | `## Review` | **review coordinator** (`/sp:dev-review` → `sp:super-reviewer`, merged fragments) |
69
+ | `## Testing` | **`spur task record`** (deterministic, from the verdict artifact) |
64
70
 
65
71
  The implement step **owns** `## Solution` (the change-map). After writing code, before
66
72
  yielding, the implement agent authors the `## Solution` section — a markdown table listing
@@ -163,9 +169,10 @@ The `test` hop is primarily
163
169
  resume the host driver with the operator's answer.
164
170
  - **On guard failure** (`precheck`): the task's check findings block progress — fix the
165
171
  task first.
166
- - **On completion** (`done`): the pipeline's `record` step has already written results into
167
- the task's `## Testing` and `## Review` sections via `spur task record <wbs>` (verdict
168
- matrix-compliant tables; never transitions to `done` the gate stays in the workflow).
172
+ - **On completion** (`done`): the pipeline's `record` step has already written the verdict
173
+ transcript into the task's `## Testing` via `spur task record <wbs>` (matrix-compliant tables;
174
+ `## Review` was authored by the review step and is only backfilled bare, never overwritten —
175
+ F92 0593 R1; never transitions to `done` — the gate stays in the workflow).
169
176
 
170
177
  ## `--next` chain — advance to the next step
171
178
 
@@ -93,8 +93,10 @@ Entered before `task-pipeline.yaml` `verify` state produces a task verdict.
93
93
  - [ ] `spur task check <wbs> --strict-core --json` returns PASS.
94
94
  - [ ] Every AC scenario has a corresponding verify command that exited 0.
95
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").
96
+ - [ ] The `## Testing` evidence (commands run + outcomes) is present in the verdict artifact —
97
+ `spur task record` transcribes it deterministically (F92 0593 R1).
98
+ - [ ] The `## Review` section carries the review coordinator's findings table (or is bare for the
99
+ record fallback) — verify never writes `## Review`.
98
100
  - [ ] No gate was bypassed with `--no-verify`, `--force`, or a suppression comment.
99
101
  - [ ] If `--auto` is set: the verdict is `PASS` (not `PARTIAL` or `FAIL`) — `--auto` does not auto-advance a failed verify.
100
102
  - [ ] The task is ready for `spur task record <wbs>` and legal transition to `done`.
@@ -154,7 +156,7 @@ transition to `done`.
154
156
 
155
157
  > **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
158
  >
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.
159
+ > **Transition-shim discipline (`transition-shim-check`, task 0541 / ADR-058).** Wired as an early step of `spur-check` / `spur-check-new` (second, after `link-check` and before `lint`) so a shim violation fails in ~0.3 s rather than after the test run. 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.
158
160
 
159
161
  > **Sandbox test baseline (`bun run test` / `spur-check`).** In the restricted Bash sandbox
160
162
  > `bun run spur-check` exits **1 regardless of code health**: ~24 tests bind real ports and the
@@ -1,24 +1,40 @@
1
1
  ---
2
- name: section-batching
3
- description: Stage pipeline task sections together, apply them through Spur, and validate once per coherent batch.
2
+ name: section-ownership
3
+ description: One writer per evidence section which stage authors Solution, Testing, and Review, and how a session sequences section writes against the runtime contract.
4
4
  see_also:
5
5
  - spur-dev
6
6
  - spur-cli
7
+ - super-reviewer
7
8
  ---
8
9
 
9
- # Section batching protocol
10
+ # Evidence-section writer protocol
10
11
 
11
- Use this protocol when an in-session operation must author multiple pipeline sections. A workflow
12
- `record` step should still prefer `spur task record` for verdict-derived `Testing` and `Review`.
12
+ There is exactly **one writer per evidence section** (feature F92, task 0593 R1). The section
13
+ matrix is the runtime authority for *which sections are permitted at a status*; this protocol is
14
+ the *who writes* map. The canonical stage registry projects the exact artifact identities
15
+ (`packages/domain/src/stage-registry/schema.ts` → `RECORDED` stage `identity` fields); skills never
16
+ restate that ownership as competing policy.
13
17
 
14
- 1. Read `spur-cli/references/tasks/l3-guard-cheatsheet.md`.
15
- 2. Run `spur task sections <wbs> list --json` to learn which sections the current matrix permits.
16
- 3. Stage complete, body-only `Solution`, `Testing`, and `Review` files before the first task check.
17
- 4. Run `spur task check <wbs> --json` once, then apply every permitted staged section with
18
- `spur task update <wbs> --section <name> --from-file <path>`.
19
- 5. Run `spur task check <wbs> --json` once after the coherent write batch.
20
- 6. If the post-write check fails, group all findings by section, repair all affected staged bodies, re-apply them, and
21
- check once more.
18
+ | Section | Writer | When |
19
+ | --- | --- | --- |
20
+ | `## Solution` | **implement** (`sp:code-implementation`) | during the implement step; bare-only safety-net backfill by `record` from `git diff` |
21
+ | `## Review` | **review coordinator** (`sp:super-reviewer` under `/sp:dev-review`) | during the review step, after merging component fragments |
22
+ | `## Testing` | **`spur task record`** (deterministic, from the verdict artifact) | during the record step; never authored by hand |
23
+
24
+ Component review skills (`sp:functional-review`, `sp:code-verification` review mode,
25
+ `sp:code-improvement`) **return review fragments only** in coordinated mode — they do not write
26
+ `## Review`. Verification emits the canonical verdict artifact; it does not write sections.
27
+ `record`'s bare-`## Review` backfill is a **standalone compatibility fallback only** — it fires
28
+ when the section is bare (absent/placeholder) and never overwrites authored Review.
29
+
30
+ ## Sequencing a write
31
+
32
+ 1. Query the runtime contract before writing — never a static table:
33
+ `spur task sections <wbs> list --json` (permitted sections at the current status) and
34
+ `spur task check <wbs> --json` (what the gate requires at the current status).
35
+ 2. Write only your stage's section, via
36
+ `spur task update <wbs> --section <name> --from-file <tmp>` (CLI-gated, body-only).
37
+ 3. Re-check once after the write batch: `spur task check <wbs> --json`.
22
38
 
23
39
  Budget: no more than two section writes per section and two task checks per task unless a new
24
40
  external failure changes the evidence. Do not use a write→check loop for each section.