@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.
- package/.claude-plugin/marketplace.json +1 -1
- package/config/config.example.yaml +94 -15
- package/config/transition-shims.json +33 -0
- package/config/workflows/basic.yaml +2 -0
- package/config/workflows/docs-pipeline.yaml +2 -0
- package/config/workflows/feature-dev.yaml +8 -0
- package/config/workflows/idea-pipeline.yaml +10 -0
- package/config/workflows/planning-pipeline.yaml +4 -0
- package/config/workflows/pr-review.yaml +338 -0
- package/config/workflows/task-pipeline.yaml +8 -0
- package/config/workflows/wayfinder-resolution.yaml +4 -0
- package/config/workflows/wrapup-pipeline.yaml +18 -1
- package/package.json +8 -8
- package/plugins/sp/README.md +9 -6
- package/plugins/sp/agents/expert-spur.md +1 -0
- package/plugins/sp/commands/dev-arch.md +2 -1
- package/plugins/sp/commands/dev-brainstorm.md +2 -1
- package/plugins/sp/commands/dev-changelog.md +1 -0
- package/plugins/sp/commands/dev-daily.md +1 -0
- package/plugins/sp/commands/dev-debug.md +2 -1
- package/plugins/sp/commands/dev-dogfood.md +2 -1
- package/plugins/sp/commands/{dev-featurechange.md → dev-feature-change.md} +8 -10
- package/plugins/sp/commands/dev-find-conflict.md +2 -1
- package/plugins/sp/commands/dev-find-issue.md +36 -43
- package/plugins/sp/commands/dev-find-next.md +5 -4
- package/plugins/sp/commands/dev-fixall.md +1 -0
- package/plugins/sp/commands/dev-gitmsg.md +1 -0
- package/plugins/sp/commands/dev-gtd.md +12 -12
- package/plugins/sp/commands/dev-handover.md +1 -0
- package/plugins/sp/commands/dev-history-load.md +63 -0
- package/plugins/sp/commands/dev-idea.md +1 -0
- package/plugins/sp/commands/dev-next.md +2 -1
- package/plugins/sp/commands/dev-parallel.md +2 -1
- package/plugins/sp/commands/dev-plan.md +2 -1
- package/plugins/sp/commands/dev-pr-review.md +39 -0
- package/plugins/sp/commands/dev-refine.md +5 -3
- package/plugins/sp/commands/dev-refineall.md +2 -1
- package/plugins/sp/commands/dev-refresh.md +2 -1
- package/plugins/sp/commands/dev-reverse.md +2 -1
- package/plugins/sp/commands/dev-review.md +2 -1
- package/plugins/sp/commands/dev-run.md +3 -2
- package/plugins/sp/commands/dev-runall.md +3 -2
- package/plugins/sp/commands/dev-simplify.md +2 -1
- package/plugins/sp/commands/dev-unit.md +2 -1
- package/plugins/sp/commands/dev-verify.md +2 -1
- package/plugins/sp/commands/dev-verifyall.md +2 -1
- package/plugins/sp/commands/dev-wrap.md +7 -5
- package/plugins/sp/commands/dev-wrapall.md +7 -5
- package/plugins/sp/commands/rule-add.md +1 -0
- package/plugins/sp/commands/rule-refine.md +1 -0
- package/plugins/sp/commands/rule-scan.md +1 -0
- package/plugins/sp/commands/spur-init.md +1 -0
- package/plugins/sp/commands/workflow-add.md +1 -0
- package/plugins/sp/commands/workflow-refine.md +1 -0
- package/plugins/sp/hooks/careful-guard.ts +5 -80
- package/plugins/sp/hooks/destructive-policy.ts +146 -0
- package/plugins/sp/hooks/pi/guard-extension.ts +33 -46
- package/plugins/sp/hooks/task-file-policy.ts +31 -0
- package/plugins/sp/hooks/task-write-guard.ts +4 -0
- package/plugins/sp/plugin.json +1 -1
- package/plugins/sp/references/roles.md +106 -0
- package/plugins/sp/scripts/feature-sync-bounded.ts +28 -2
- package/plugins/sp/scripts/history-load.ts +400 -0
- package/plugins/sp/scripts/pr-reviewing.ts +867 -0
- package/plugins/sp/scripts/stage-registry-adapter.ts +66 -31
- package/plugins/sp/scripts/surface-drift-inventory.ts +908 -0
- package/plugins/sp/scripts/task-size-precheck.ts +30 -4
- package/plugins/sp/scripts/transition-shim-check.ts +238 -0
- package/plugins/sp/scripts/validate-commands.ts +33 -2
- package/plugins/sp/scripts/validate-flag-contracts.ts +5 -2
- package/plugins/sp/skills/code-implementation/SKILL.md +9 -1
- package/plugins/sp/skills/code-verification/SKILL.md +29 -28
- package/plugins/sp/skills/issue-finding/SKILL.md +123 -141
- package/plugins/sp/skills/issue-finding/examples/expected-findings.json +1 -1
- package/plugins/sp/skills/issue-finding/references/session-formats.md +87 -90
- package/plugins/sp/skills/next-feature/SKILL.md +6 -6
- package/plugins/sp/skills/next-feature/references/handoff-routing.md +5 -5
- package/plugins/sp/skills/next-feature/references/signal-derivation.md +7 -2
- package/plugins/sp/skills/next-router/SKILL.md +1 -1
- package/plugins/sp/skills/parallel-execution/references/dispatch-surface.md +40 -2
- package/plugins/sp/skills/pr-reviewing/SKILL.md +285 -0
- package/plugins/sp/skills/spur-cli/SKILL.md +3 -0
- package/plugins/sp/skills/spur-cli/references/agent.md +12 -7
- package/plugins/sp/skills/spur-cli/references/features/hierarchy-mece.md +5 -5
- package/plugins/sp/skills/spur-cli/references/features.md +1 -1
- package/plugins/sp/skills/spur-cli/references/team.md +10 -3
- package/plugins/sp/skills/spur-dev/SKILL.md +2 -0
- package/plugins/sp/skills/spur-dev/references/ac-style-guide.md +17 -0
- package/plugins/sp/skills/spur-dev/references/cross-cutting.md +44 -23
- package/plugins/sp/skills/spur-dev/references/dev-operations.md +14 -11
- package/plugins/sp/skills/spur-dev/references/execution-workflow.md +14 -12
- package/plugins/sp/skills/spur-dev/references/flag-glossary.md +28 -7
- package/plugins/sp/skills/spur-dev/references/gate-checklists.md +2 -0
- package/plugins/sp/skills/spur-dev/references/inline-pipeline-driver.md +12 -2
- package/schemas/spur-config.schema.json +47 -3
- package/spur.js +12223 -7716
- package/web/_astro/BoardApp.8hiqShQn.js +1 -0
- package/web/_astro/{BoardApp.DKyrGxdo.js → BoardApp.BjQUNhuj.js} +74 -74
- package/web/_astro/{TaskDetail.6-27_LMa.js → TaskDetail.CVBuD6dF.js} +1 -1
- package/web/_astro/{arc.Df-9AQvS.js → arc.BMMjdODi.js} +1 -1
- package/web/_astro/{architectureDiagram-3BPJPVTR.VAI_-paS.js → architectureDiagram-3BPJPVTR.BU5ShzXf.js} +1 -1
- package/web/_astro/{blockDiagram-GPEHLZMM.DFpUY1ue.js → blockDiagram-GPEHLZMM.Bj1iEqPD.js} +1 -1
- package/web/_astro/{c4Diagram-AAUBKEIU.CF8doOpg.js → c4Diagram-AAUBKEIU.vX8wepCL.js} +1 -1
- package/web/_astro/channel.EwdSemIC.js +1 -0
- package/web/_astro/{chunk-2J33WTMH.BnjK3fjt.js → chunk-2J33WTMH.BKAipTym.js} +1 -1
- package/web/_astro/{chunk-4BX2VUAB.x6ZDnJKq.js → chunk-4BX2VUAB.B68XkPG7.js} +1 -1
- package/web/_astro/{chunk-55IACEB6.zY-0uu7w.js → chunk-55IACEB6.BmeDLcrc.js} +1 -1
- package/web/_astro/{chunk-727SXJPM.BZxKg_Vi.js → chunk-727SXJPM.PDuBA3Kw.js} +1 -1
- package/web/_astro/{chunk-AQP2D5EJ.Cpi9G9Td.js → chunk-AQP2D5EJ.C7A044za.js} +1 -1
- package/web/_astro/{chunk-FMBD7UC4.DWTB-Pif.js → chunk-FMBD7UC4.BtzKKFqR.js} +1 -1
- package/web/_astro/{chunk-ND2GUHAM.BPDQbiOG.js → chunk-ND2GUHAM.BJuDeeOy.js} +1 -1
- package/web/_astro/{chunk-QZHKN3VN.BRWIcuoM.js → chunk-QZHKN3VN.DSeMDgcQ.js} +1 -1
- package/web/_astro/{classDiagram-4FO5ZUOK.mGTCZsDO.js → classDiagram-4FO5ZUOK.D53Q4tCw.js} +1 -1
- package/web/_astro/{classDiagram-v2-Q7XG4LA2.mGTCZsDO.js → classDiagram-v2-Q7XG4LA2.D53Q4tCw.js} +1 -1
- package/web/_astro/{cose-bilkent-S5V4N54A.D1GEut-z.js → cose-bilkent-S5V4N54A.c712AFRH.js} +1 -1
- package/web/_astro/{dagre-BM42HDAG.BV0XG9Do.js → dagre-BM42HDAG.D-idisph.js} +1 -1
- package/web/_astro/{diagram-2AECGRRQ.DzpYxsjo.js → diagram-2AECGRRQ.DLgnsJCU.js} +1 -1
- package/web/_astro/{diagram-5GNKFQAL.Cm9YzJh4.js → diagram-5GNKFQAL.BiaxBVqx.js} +1 -1
- package/web/_astro/{diagram-KO2AKTUF.BjhottUj.js → diagram-KO2AKTUF.C8HX1vd8.js} +1 -1
- package/web/_astro/{diagram-LMA3HP47.BFsQW5kb.js → diagram-LMA3HP47.CfqDLLes.js} +1 -1
- package/web/_astro/{diagram-OG6HWLK6.8pdpzSWO.js → diagram-OG6HWLK6.15SDiEed.js} +1 -1
- package/web/_astro/{erDiagram-TEJ5UH35.Bd7KUJmJ.js → erDiagram-TEJ5UH35.DksYtOYM.js} +1 -1
- package/web/_astro/{flowDiagram-I6XJVG4X.7LWffkaE.js → flowDiagram-I6XJVG4X.DR_Au-HV.js} +1 -1
- package/web/_astro/{ganttDiagram-6RSMTGT7.BeDcO5tI.js → ganttDiagram-6RSMTGT7.CHhHrffI.js} +1 -1
- package/web/_astro/{gitGraphDiagram-PVQCEYII.Ca4n730A.js → gitGraphDiagram-PVQCEYII.B2Xehvam.js} +1 -1
- package/web/_astro/{index.Dbvuw6d4.css → index.DAxu50UF.css} +1 -1
- package/web/_astro/{infoDiagram-5YYISTIA.B0OakQYb.js → infoDiagram-5YYISTIA.C9c3CNNN.js} +1 -1
- package/web/_astro/{ishikawaDiagram-YF4QCWOH.DSmNQe-1.js → ishikawaDiagram-YF4QCWOH.BibUHkh8.js} +1 -1
- package/web/_astro/{journeyDiagram-JHISSGLW.Cy5ruEUu.js → journeyDiagram-JHISSGLW.BYoVHiyO.js} +1 -1
- package/web/_astro/{kanban-definition-UN3LZRKU.CUJXub0p.js → kanban-definition-UN3LZRKU.CM1K5wHE.js} +1 -1
- package/web/_astro/{linear.DC1jCCXn.js → linear.SPpjJUb-.js} +1 -1
- package/web/_astro/{mermaid.core.DxVP99Ab.js → mermaid.core.BAgx3nnb.js} +4 -4
- package/web/_astro/{mindmap-definition-RKZ34NQL.D0MaV6sJ.js → mindmap-definition-RKZ34NQL.D35oPG1R.js} +1 -1
- package/web/_astro/{pieDiagram-4H26LBE5.DCC6_q32.js → pieDiagram-4H26LBE5.DiWuRwk7.js} +1 -1
- package/web/_astro/{quadrantDiagram-W4KKPZXB.BeUOAM7C.js → quadrantDiagram-W4KKPZXB.B9PBzTWn.js} +1 -1
- package/web/_astro/{requirementDiagram-4Y6WPE33.Dbl4MASO.js → requirementDiagram-4Y6WPE33.CYuuamFN.js} +1 -1
- package/web/_astro/{sankeyDiagram-5OEKKPKP.HsLg0VS4.js → sankeyDiagram-5OEKKPKP.W24UhhtD.js} +1 -1
- package/web/_astro/{sequenceDiagram-3UESZ5HK.DT7DJTnZ.js → sequenceDiagram-3UESZ5HK.BpbNjA51.js} +1 -1
- package/web/_astro/{stateDiagram-AJRCARHV.d_ju1Vr1.js → stateDiagram-AJRCARHV.DqVsHudf.js} +1 -1
- package/web/_astro/{stateDiagram-v2-BHNVJYJU.DMCAjMJ4.js → stateDiagram-v2-BHNVJYJU.CzwHYX81.js} +1 -1
- package/web/_astro/{timeline-definition-PNZ67QCA.DNOHr62_.js → timeline-definition-PNZ67QCA.Bc3B6djw.js} +1 -1
- package/web/_astro/{vennDiagram-CIIHVFJN.B7dUy-1W.js → vennDiagram-CIIHVFJN.C-D5rh8O.js} +1 -1
- package/web/_astro/{wardley-L42UT6IY.DEqOXvBh.js → wardley-L42UT6IY.D7PdYCqn.js} +1 -1
- package/web/_astro/{wardleyDiagram-YWT4CUSO.BCRb2p6x.js → wardleyDiagram-YWT4CUSO.CwmJKXF3.js} +1 -1
- package/web/_astro/{xychartDiagram-2RQKCTM6.NxVQLdBh.js → xychartDiagram-2RQKCTM6.avDYnLsb.js} +1 -1
- package/web/index.html +2 -2
- package/web/_astro/BoardApp.Ce6zJYAH.js +0 -1
- package/web/_astro/channel.Uhm9O3UV.js +0 -1
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pr-reviewing
|
|
3
|
+
description: "GitHub Codex PR-review workflow — prepare/reuse a PR, request `@codex review`, collect findings, and optionally validate/fix/re-review them. Backs /sp:dev-pr-review. Triggers: PR review, codex review, @codex review, review my PR, codex findings, dev-pr-review."
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
metadata:
|
|
7
|
+
author: spur
|
|
8
|
+
platforms: "claude-code,codex,openclaw,opencode,antigravity,pi"
|
|
9
|
+
category: engineering-core
|
|
10
|
+
interactions:
|
|
11
|
+
- workflow
|
|
12
|
+
- review
|
|
13
|
+
pipeline_steps:
|
|
14
|
+
- preflight
|
|
15
|
+
- hygiene
|
|
16
|
+
- request
|
|
17
|
+
- wait
|
|
18
|
+
- collect
|
|
19
|
+
- triage
|
|
20
|
+
see_also:
|
|
21
|
+
- sp:code-verification
|
|
22
|
+
- sp:functional-review
|
|
23
|
+
- sp:spur-cli
|
|
24
|
+
- sp:spur-dev
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# sp:pr-reviewing — GitHub Codex PR Review
|
|
28
|
+
|
|
29
|
+
Backend for `/sp:dev-pr-review`. The invoking coding agent is the local orchestrator and
|
|
30
|
+
implementer; **GitHub Codex Code Review** is the independent reviewer. The point of the route is
|
|
31
|
+
that review effort happens on the PR, through Codex — not in the local session.
|
|
32
|
+
|
|
33
|
+
## Architecture
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
/sp:dev-pr-review (thin command)
|
|
37
|
+
│ Skill(skill="sp:pr-reviewing", args=...)
|
|
38
|
+
▼
|
|
39
|
+
sp:pr-reviewing (this skill — mode routing, triage, fix, rules)
|
|
40
|
+
│ deterministic spine, state order + guards:
|
|
41
|
+
▼
|
|
42
|
+
.spur/workflows/pr-review.yaml ← workflow SSOT (seeded by spur init; project-tunable)
|
|
43
|
+
│ every state resolves with `superskill script path` and shells out to:
|
|
44
|
+
▼
|
|
45
|
+
staged pr-reviewing.ts ← Bun entrypoint for the tested git/gh core
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
- **State order and guards** are defined once, in the workflow YAML. Do not re-derive them in
|
|
49
|
+
prose; when the YAML and this file disagree, the YAML wins and this file gets fixed.
|
|
50
|
+
- **Deterministic work** (every git/gh call) goes through the script subcommands — never
|
|
51
|
+
hand-rolled `gh` invocations that drift from the tested core.
|
|
52
|
+
- **Model-bearing work** (finding triage, `fix` edits, `rules` authoring) is this skill's job and
|
|
53
|
+
never enters the workflow machine.
|
|
54
|
+
- The workflow YAML exposes only its declared spine modes (`full`, `submit`, and `rerun`). The
|
|
55
|
+
direct-mode routes below own `collect`, `fix`, `status`, and `rules`; keep those modes outside
|
|
56
|
+
the workflow `mode` variable.
|
|
57
|
+
|
|
58
|
+
## Non-negotiable Codex routing
|
|
59
|
+
|
|
60
|
+
The external review MUST go through the GitHub pull request and an `@codex review` request.
|
|
61
|
+
Never substitute a local Codex review mechanism — no Codex CLI `/review`, no `codex review`, no
|
|
62
|
+
vendor-specific local review commands. If GitHub Codex Code Review is unavailable, stop and report
|
|
63
|
+
the setup/access problem; never silently fall back to a local review.
|
|
64
|
+
|
|
65
|
+
Never claim a request consumed a specific billing/quota bucket unless the platform exposes that
|
|
66
|
+
fact. The guarantee of this workflow is the route: GitHub Codex Code Review on the PR.
|
|
67
|
+
|
|
68
|
+
## Modes and routing
|
|
69
|
+
|
|
70
|
+
Parse the first positional argument as the mode; default `full`.
|
|
71
|
+
|
|
72
|
+
| Mode | Route | Behavior |
|
|
73
|
+
| --- | --- | --- |
|
|
74
|
+
| `full` | Workflow YAML | Preflight → hygiene → precheck → push → ensure-pr → request (reviewed/in-flight HEAD dedupe) → wait → collect → report. No source edits. |
|
|
75
|
+
| `submit` | Workflow YAML | Run the spine through `request`; return pending for a new request (`--no-wait` has the same effect). If the exact current HEAD was already reviewed, collect that result instead of requesting a duplicate. |
|
|
76
|
+
| `rerun` | Workflow YAML | Run the spine and request a fresh review of the current pushed HEAD with `--force`. No source edits. |
|
|
77
|
+
| `collect` | Direct script | Do not start the workflow or request a review. Collect the current PR's result and composite status; a missing current-HEAD result is **pending**, never clean. |
|
|
78
|
+
| `fix` | Direct script + model work | Collect first, independently validate current-HEAD findings, fix legitimate issues, verify, make one focused commit, push, then force-request/review/collect the new HEAD. Do not pass `mode=fix` to the workflow. |
|
|
79
|
+
| `status` | Direct script | Read-only composite: repository, branch, local HEAD, PR/base, local changes, CI, and Codex state for the current PR HEAD. Do not start the workflow. |
|
|
80
|
+
| `rules` | Model work only | Create or improve the repo-root `AGENTS.md` section `## Code Review Rules`; do not invoke the workflow, request a review, commit, or push. |
|
|
81
|
+
|
|
82
|
+
## Arguments
|
|
83
|
+
|
|
84
|
+
- `--base <branch>` — base for a newly created PR. Default: existing PR's base, else repo default.
|
|
85
|
+
- `--no-wait` — after a successful request, return pending instead of polling.
|
|
86
|
+
- `--agent <inline|auto|name>` — names **who performs model-bearing work**, per the
|
|
87
|
+
[inline-default execution-surface contract](../spur-dev/references/cross-cutting.md#inline-default-execution-surface).
|
|
88
|
+
Omit: the current agent is the default owner (eligible model stages may use one native subagent
|
|
89
|
+
under the shared contract). `inline` keeps all model work in the host session as the hard
|
|
90
|
+
zero-dispatch guarantee. `auto` resolves the command's declared role; a named executor pins that executor.
|
|
91
|
+
An alternate executor gets one `spur agent run --agent <value>` dispatch with the selector removed
|
|
92
|
+
from child args; that child owns model work. Current-agent selection stays inline.
|
|
93
|
+
Headless surfaces reject explicit `inline` with the shared stable error.
|
|
94
|
+
- `--agent` describes the model owner only; it is independent of the deterministic git/GitHub spine
|
|
95
|
+
and the workflow/direct route. Run the selected route in that resolved skill context. A separate
|
|
96
|
+
workflow subprocess belongs to the caller's execution surface or an objective trigger (for example,
|
|
97
|
+
a required durable run record), not to `--agent auto` or a name by itself.
|
|
98
|
+
- Remaining free text — extra review focus, appended to the Codex request without weakening
|
|
99
|
+
repository-defined rules (e.g. `security and authorization boundaries`, `migration safety`).
|
|
100
|
+
|
|
101
|
+
## Safety rules
|
|
102
|
+
|
|
103
|
+
**Git history — never:** force-push (`--force`/`--force-with-lease`), destructive `git reset`,
|
|
104
|
+
`git clean`, rewriting published history, merging the PR, deleting branches, discarding unrelated
|
|
105
|
+
user changes.
|
|
106
|
+
|
|
107
|
+
**Local changes.** A GitHub PR only reviews pushed commits. If relevant changes are uncommitted:
|
|
108
|
+
inspect the tree, separate relevant from unrelated, never `git add .` blindly, and ask the user
|
|
109
|
+
before creating any commit outside `fix` mode. If safe separation is ambiguous, stop and explain.
|
|
110
|
+
In `fix` mode the user pre-authorized one focused fix commit for verified findings — still stop if
|
|
111
|
+
unrelated uncommitted changes make safe editing or committing ambiguous.
|
|
112
|
+
|
|
113
|
+
**Current-HEAD invariant.** Treat the PR's pushed `headRefOid` as the review identity. After every
|
|
114
|
+
preflight, push, commit, and request, record the returned HEAD and require `wait`, `collect`, and
|
|
115
|
+
the report to match that exact HEAD. A result for an older commit is stale; a result absent for the
|
|
116
|
+
current HEAD is pending, not clean. Reject uncorrelated issue/conversation comments rather than
|
|
117
|
+
using them to manufacture a current-HEAD result. In `fix` mode, discard the old result after the
|
|
118
|
+
fix commit and judge only the forced re-review for the new pushed HEAD.
|
|
119
|
+
|
|
120
|
+
**Reviewer authority.** Codex is an independent reviewer, not an authority. For every finding that
|
|
121
|
+
may lead to a code change: inspect the referenced code, verify reachability and intended behavior,
|
|
122
|
+
inspect callers/callees where needed, check existing tests, classify, reject false positives, fix
|
|
123
|
+
root causes rather than wording, prefer the smallest coherent patch, avoid drive-by refactors.
|
|
124
|
+
|
|
125
|
+
## Workflow-backed spine (`full`, `submit`, `rerun`)
|
|
126
|
+
|
|
127
|
+
Run the workflow YAML's declared states in order. Every deterministic state invokes the
|
|
128
|
+
staged entrypoint below, supports `--json`, and must be parsed. Stop at the first red gate and
|
|
129
|
+
report its artifact. The canonical installed invocation is:
|
|
130
|
+
|
|
131
|
+
```sh
|
|
132
|
+
bun "$(superskill script path sp pr-reviewing.ts)" <subcommand> [flags]
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Installed targets resolve the staged TypeScript source and execute it with Bun, matching the rest
|
|
136
|
+
of `plugins/sp/scripts`.
|
|
137
|
+
|
|
138
|
+
1. **Preflight** — `<script> preflight --json`. Hard-fails on a
|
|
139
|
+
detached HEAD, missing `gh` auth, no GitHub remote, or a dirty tree. On a dirty tree, triage
|
|
140
|
+
with the user (commit/stash/exclude) before continuing — the workflow refuses to guess.
|
|
141
|
+
2. **Hygiene** — `<script> hygiene --base "$base" --json`. `BLOCK` (secrets, `.env`, conflict markers,
|
|
142
|
+
private keys) stops the run — never submit a tainted diff. `WARN` (debug residue) rides along
|
|
143
|
+
into the report. This is a submission sanity check, not a second local review.
|
|
144
|
+
3. **Precheck** — if the workflow YAML's `preReviewCmd` var is set, run it; a red check stops the
|
|
145
|
+
run (do not spend a review request on code that fails its own gate). When unset, report that
|
|
146
|
+
pre-review verification was not configured rather than inventing project commands.
|
|
147
|
+
4. **Push** — `<script> push --json`. Normal push only; sets upstream when missing.
|
|
148
|
+
5. **Ensure PR** — `<script> ensure-pr --base "$base" --json`. Reuses the branch's PR; creates with
|
|
149
|
+
`gh pr create --fill` only when absent. Never a duplicate PR.
|
|
150
|
+
6. **Request** — `<script> request --focus "<focus>" --json` (`--force` in `rerun` mode). Dedupes when
|
|
151
|
+
Codex already reviewed the exact pushed HEAD (`ALREADY_REVIEWED` → skip to collect) or a marked
|
|
152
|
+
request by the current GitHub user is still in flight (`ALREADY_REQUESTED` → pending). The
|
|
153
|
+
request body is concise when the repo has `## Code Review Rules`, else carries the default
|
|
154
|
+
actionable-issues focus. Records PR, URL, HEAD, and request time.
|
|
155
|
+
7. **Wait** (full/rerun unless `--no-wait`; submit stops before it) —
|
|
156
|
+
`<script> wait --since "$requestedAt" --head "$requestHead" --json`, using the request result so
|
|
157
|
+
a fast response is not missed, `rerun` cannot reuse the prior review, and a moved HEAD fails loud.
|
|
158
|
+
Polls every ~30s for up to
|
|
159
|
+
~10 minutes across the current HEAD's PR review and inline comments. Uncorrelated conversation
|
|
160
|
+
comments are ignored. A current-HEAD clean review is a completed `CLEAN` outcome; findings are
|
|
161
|
+
`FOUND`; timeout or no current-HEAD result is **pending, not failed** — collect later.
|
|
162
|
+
8. **Collect** — `<script> collect --since "$requestedAt" --head "$requestHead" --json`. Normalize
|
|
163
|
+
only the requested HEAD and request window; then invoke `status` with the same bounds for
|
|
164
|
+
PR/base/CI/local state. Never turn an absent, stale, or moved-HEAD result into `clean`.
|
|
165
|
+
|
|
166
|
+
## Fix mode
|
|
167
|
+
|
|
168
|
+
Only in `fix` mode:
|
|
169
|
+
|
|
170
|
+
1. **Collect before editing.** Invoke direct `collect --json` plus `status --json` and require a
|
|
171
|
+
completed result for the current pushed HEAD. If the result is pending, stale, or unavailable,
|
|
172
|
+
report it and stop without source edits. If it is explicitly clean, report no fixes and stop.
|
|
173
|
+
2. **Validate each finding.** Open the referenced code; trace callers/callees; verify the problem
|
|
174
|
+
is reachable; check intended behavior and existing tests. Classify: `Confirmed`,
|
|
175
|
+
`Likely valid`, `Needs investigation`, `Likely false positive`. Never edit for a likely false
|
|
176
|
+
positive; investigate further before editing a `Needs investigation`.
|
|
177
|
+
3. **Fix legitimate issues** with the smallest coherent change. Preserve existing interfaces
|
|
178
|
+
unless the defect requires otherwise; no unrelated refactoring; add or update tests when they
|
|
179
|
+
materially demonstrate the fix; follow repository conventions. Inspect `git diff` — the patch
|
|
180
|
+
must contain only intended review fixes.
|
|
181
|
+
4. **Verify** with repository-defined targeted tests/type checks/linters. Never claim a check
|
|
182
|
+
passed unless it actually ran successfully.
|
|
183
|
+
5. **Commit** one focused review-fix commit. The message describes the actual defect
|
|
184
|
+
(`fix: prevent duplicate transaction retry`), never `fix codex comments`. No unrelated files.
|
|
185
|
+
6. **Push** normally to the existing PR branch (never force), record the new HEAD, and discard the
|
|
186
|
+
previous review identity.
|
|
187
|
+
7. **Re-review:** invoke the staged `request --force`, then wait/collect as usual. The new review
|
|
188
|
+
must correspond to the new pushed HEAD — never present stale findings from the previous HEAD as
|
|
189
|
+
the new result. Include composite CI/status fields in the final report.
|
|
190
|
+
|
|
191
|
+
## Rules mode
|
|
192
|
+
|
|
193
|
+
Only in `rules` mode. Inspect the architecture, existing instructions, and current root
|
|
194
|
+
`AGENTS.md`, then create or improve a section named exactly `## Code Review Rules`, preserving
|
|
195
|
+
unrelated content. Prefer repository-specific invariants over generic advice, using only categories
|
|
196
|
+
that matter to the project: data safety (atomic multi-step writes, idempotency, transaction
|
|
197
|
+
boundaries), security (server-side authorization, untrusted client identifiers, secrets in logs),
|
|
198
|
+
API compatibility (public contracts, CLI, serialized formats, event payloads, schema), concurrency
|
|
199
|
+
(races, stale writes, retry semantics), migration safety (backward-compatible rollout,
|
|
200
|
+
mixed-version operation), tests (which high-risk changes require regression coverage), and project
|
|
201
|
+
invariants a reviewer unfamiliar with the codebase could miss. Avoid generic advice (`write clean
|
|
202
|
+
code`) and anything lint/format already enforces mechanically. Keep it concise and actionable.
|
|
203
|
+
Show the diff, summarize the meaningful rules added, and do not commit or push.
|
|
204
|
+
|
|
205
|
+
## Reporting
|
|
206
|
+
|
|
207
|
+
Findings report:
|
|
208
|
+
|
|
209
|
+
```text
|
|
210
|
+
PR
|
|
211
|
+
#<number> <url>
|
|
212
|
+
|
|
213
|
+
HEAD
|
|
214
|
+
<short SHA>
|
|
215
|
+
|
|
216
|
+
Codex review
|
|
217
|
+
Clean | Findings | Pending | Unavailable
|
|
218
|
+
|
|
219
|
+
Findings
|
|
220
|
+
|
|
221
|
+
1. [severity] path:line
|
|
222
|
+
Classification: Confirmed | Likely valid | Needs investigation | Likely false positive
|
|
223
|
+
Problem:
|
|
224
|
+
Why it matters:
|
|
225
|
+
Evidence:
|
|
226
|
+
Recommended next action:
|
|
227
|
+
|
|
228
|
+
CI
|
|
229
|
+
<status summary>
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Preserve filenames, line references, severity, and the important technical reasoning. Do not
|
|
233
|
+
inflate suggestions into confirmed bugs. If the review completed without actionable findings, say
|
|
234
|
+
so clearly.
|
|
235
|
+
|
|
236
|
+
`wait` and `collect` must distinguish an explicit current-HEAD clean result from pending, stale, or
|
|
237
|
+
unavailable data. `collect` and `fix` reports also include the composite PR/base/branch/HEAD/local/CI
|
|
238
|
+
status; an unavailable CI signal remains `unavailable`, never an inferred pass.
|
|
239
|
+
|
|
240
|
+
Always end with the compact summary:
|
|
241
|
+
|
|
242
|
+
```text
|
|
243
|
+
PR: <number + URL | none>
|
|
244
|
+
Branch: <branch>
|
|
245
|
+
HEAD: <short SHA>
|
|
246
|
+
Base: <base>
|
|
247
|
+
CI: <status>
|
|
248
|
+
Codex: clean | findings | pending | not requested | unavailable
|
|
249
|
+
Findings: <count>
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
`fix` mode appends: `Fixed: <n>`, `Rejected: <n>`, `New HEAD: <sha>`,
|
|
253
|
+
`Re-review: clean | findings | pending | unavailable`. If findings remain, state the recommended
|
|
254
|
+
next action.
|
|
255
|
+
|
|
256
|
+
`status` mode prints the same summary block and nothing else — no file edits, PR creation, pushes,
|
|
257
|
+
or review requests.
|
|
258
|
+
|
|
259
|
+
## Failure handling
|
|
260
|
+
|
|
261
|
+
- **`gh` missing or unauthenticated** — stop and report; do not switch to browser automation.
|
|
262
|
+
- **GitHub Codex unavailable** (not enabled/authorized for the repo) — preserve the error, explain
|
|
263
|
+
the required repository/account setup, do not fall back to local Codex.
|
|
264
|
+
- **PR creation failure** — report the actual git/GitHub state; never rewrite history as a
|
|
265
|
+
workaround.
|
|
266
|
+
- **Review timeout** — return `pending`, not `failed`, unless GitHub explicitly reports a failure.
|
|
267
|
+
- **CI failure** — Codex review and CI are independent signals; always surface failing checks even
|
|
268
|
+
when Codex reports clean.
|
|
269
|
+
|
|
270
|
+
## Platform notes
|
|
271
|
+
|
|
272
|
+
- The skill, command, workflow YAML, and script are platform-neutral; per-platform emission is
|
|
273
|
+
owned by superskill. On platforms without a Skill tool, read this file and follow the protocol
|
|
274
|
+
manually — the script subcommands are plain CLI invocations.
|
|
275
|
+
- Prerequisites on any platform: `git`, GitHub CLI (`gh`) authenticated, and GitHub Codex Code
|
|
276
|
+
Review enabled for the repository.
|
|
277
|
+
|
|
278
|
+
## Additional Resources
|
|
279
|
+
|
|
280
|
+
- **Workflow SSOT:** `.spur/workflows/pr-review.yaml` (seeded by `spur init`; tune per project —
|
|
281
|
+
wait budget, `preReviewCmd`, dedupe policy)
|
|
282
|
+
- **Script source:** [scripts/pr-reviewing.ts](../../scripts/pr-reviewing.ts) — subcommand CLI
|
|
283
|
+
- **Tests:** [tests/pr-reviewing.test.ts](../../tests/pr-reviewing.test.ts) — stubbed git/gh suites
|
|
284
|
+
- **Related skills:** `sp:code-verification` (local SECUA review), `sp:functional-review`
|
|
285
|
+
(requirements traceability) — complements, never substitutes, the independent Codex review
|
|
@@ -120,6 +120,9 @@ the whole point of this facade is that the CLI surface has a single, scalable ho
|
|
|
120
120
|
post-scaffold init validation (Phase 1.5/1.6 probes).
|
|
121
121
|
- **`sp:spur-dev`** - the spine that dispatches these verbs into the planning +
|
|
122
122
|
execution lifecycle. Use it to *drive* work; use this facade to *look up or operate a verb*.
|
|
123
|
+
- **`plugins/sp/references/roles.md`** — the Layer-1 role→tier table (`scribe` / `coder` /
|
|
124
|
+
`reviewer` / `planner`, one per tier). The facade's nouns/verbs serve those roles; the table is
|
|
125
|
+
the role vocabulary, the operator config maps tiers to executors.
|
|
123
126
|
- **`sp:expert-spur`** — the subagent that loads this facade for multi-step, multi-noun corpus work
|
|
124
127
|
in its own context window.
|
|
125
128
|
|
|
@@ -21,8 +21,8 @@ that before using `run` for fan-out dispatch.
|
|
|
21
21
|
|
|
22
22
|
| Verb | Purpose | Key flags |
|
|
23
23
|
| ---- | ------- | --------- |
|
|
24
|
-
| `run <prompt>` | Execute a prompt or slash command via a coding agent | `--agent <name>` `--model <name>` `--mode <mode>` `--continue` `--cwd <path>` `--drain` `--json` |
|
|
25
|
-
| `loop` | Persistent self-draining inbox loop for a team member (supervisor-managed) | `--agent <id>` `--poll <ms>` |
|
|
24
|
+
| `run <prompt>` | Execute a prompt or slash command via a coding agent | `--agent <name>` `--spec <id>` `--model <name>` `--mode <mode>` `--continue` `--cwd <path>` `--drain` `--json` |
|
|
25
|
+
| `loop` | Persistent self-draining inbox loop for a team member (supervisor-managed) | `--spec <id>` `--agent <id>` `--poll <ms>` |
|
|
26
26
|
| `wait <specId>` | Identity-pinned wait for an occupant run to reach a lifecycle state (G4 wave 2) | `--run <runId>` `--until <state>...` `--timeout <ms>` `--json` |
|
|
27
27
|
| `list` | List detected coding agents, or team agent specs with `--specs` | `--specs` `--json` |
|
|
28
28
|
| `doctor [agent]` | Check agent readiness | `--json` |
|
|
@@ -36,8 +36,8 @@ invalid usage.
|
|
|
36
36
|
## `run` - execute a prompt via a coding agent
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
spur agent run "Fix the login bug in src/auth/" --agent
|
|
40
|
-
spur agent run "verify on o3" --agent
|
|
39
|
+
spur agent run "Fix the login bug in src/auth/" --agent coder
|
|
40
|
+
spur agent run "verify on o3" --agent reviewer --model o3
|
|
41
41
|
spur agent run "/sp:dev-verify 0040" --agent omp --drain
|
|
42
42
|
```
|
|
43
43
|
|
|
@@ -48,14 +48,19 @@ through a coding agent as an external process, producing a persisted run record
|
|
|
48
48
|
|
|
49
49
|
| Flag | Purpose |
|
|
50
50
|
| ------ | --------- |
|
|
51
|
-
| `--agent <name>` |
|
|
51
|
+
| `--agent <name>` | Role, executor, agent binary, `auto`, or `inline`. A **role** (`scribe`/`coder`/`reviewer`/`planner`, from `plugins/sp/references/roles.md`) selects the starting tier; an **executor** (an `agent.executors` entry) is a permanent pin; a **bare binary name** works with a one-time warning (transition shim); `auto` uses the declared/default role. **`inline` is host-session-only** (G5 / ADR-047 amendment): `agent run` is a headless subprocess surface, so explicit `inline` is rejected with exit 2 and a stable error message — it never normalizes to `agent.default`. |
|
|
52
52
|
| `--model <name>` | Agent model argument (e.g. `o3`, `sonnet`). Passed through to the agent's model flag. |
|
|
53
53
|
| `--mode <mode>` | Agent output mode: `text` or `json`. |
|
|
54
54
|
| `--continue` | Resume the previous agent session instead of starting fresh. |
|
|
55
55
|
| `--cwd <path>` | Working directory for agent execution (default: current directory). |
|
|
56
|
-
| `--drain`
|
|
56
|
+
| `--spec <id>` | Team agent spec id (occupant addressing, 0542 R1). Pairs with `--drain`; with `--spec` alone the run is addressed to the occupant without touching the inbox. A legacy `--agent <spec-id>` still works during the transition with a one-time warning (shim `agent-flag-spec-id`). |
|
|
57
|
+
| `--drain` | Prepend pending inbox messages addressed to `--spec <id>` before the prompt. |
|
|
57
58
|
| `--json` | Output machine-readable JSON where supported. |
|
|
58
59
|
|
|
60
|
+
`--json` adds a `resolved` block (`{ role?, tier?, executor?, agent, source }`) reporting the
|
|
61
|
+
resolution decision — the role, its tier, and the executor that won for role routing; the pin for
|
|
62
|
+
an explicit executor; the canonical agent; and the resolution source.
|
|
63
|
+
|
|
59
64
|
### Dispatch-surface cross-reference
|
|
60
65
|
|
|
61
66
|
`--agent` and `--model` are the **concrete levers** behind dispatch-surface trigger 1 ("Different
|
|
@@ -91,7 +96,7 @@ under supervision.
|
|
|
91
96
|
|
|
92
97
|
| Flag | Purpose |
|
|
93
98
|
|------|---------|
|
|
94
|
-
| `--
|
|
99
|
+
| `--spec <id>` | **Required.** Team agent spec id / message recipient (0542 R1; legacy `--agent <spec-id>` still read with a one-time warning). |
|
|
95
100
|
| `--poll <ms>` | Idle poll interval in milliseconds (default: `2000`). |
|
|
96
101
|
|
|
97
102
|
The loop runs until `SIGINT` / `SIGTERM`. Each iteration: check inbox -> if messages, drain each
|
|
@@ -4,7 +4,7 @@ description: >-
|
|
|
4
4
|
Explicit rules for creating new feature nodes or extending existing ones —
|
|
5
5
|
MECE roots, cautious root creation, reparent vs merge, depth limits.
|
|
6
6
|
Consumed by spur feature authoring, /sp:dev-plan, /sp:dev-idea, and
|
|
7
|
-
/sp:dev-
|
|
7
|
+
/sp:dev-feature-change.
|
|
8
8
|
see_also:
|
|
9
9
|
- spur-cli
|
|
10
10
|
- feature-verbs
|
|
@@ -15,7 +15,7 @@ see_also:
|
|
|
15
15
|
# Feature hierarchy: MECE roots and extension rules
|
|
16
16
|
|
|
17
17
|
This is the **normative checklist** before `spur feature create` or any restructure
|
|
18
|
-
(`/sp:dev-
|
|
18
|
+
(`/sp:dev-feature-change`, `spur feature move`). CLI enforces ID shape (DD-14) and
|
|
19
19
|
≤9 children; **judgment** here keeps the tree neat for humans and agents.
|
|
20
20
|
|
|
21
21
|
## Goals of a good tree
|
|
@@ -86,7 +86,7 @@ If any check fails → **child of best parent** or **task under existing feature
|
|
|
86
86
|
| **Create child** | New deliverable under clear parent | `spur feature create "…" --parent <id>` |
|
|
87
87
|
| **Reparent / move** | Node lives under wrong parent; Goal still valid | `spur feature move <id> --parent <new>` (cascade rename) |
|
|
88
88
|
| **Rename-only** | Goal OK; title misleading | Prefer `update --field name` if supported, or document + move only if ID depth must change |
|
|
89
|
-
| **Merge (absorb)** | Two nodes share one Goal; bodies should be one | Prefer: move children under survivor → fold Scope/AC into survivor → cancel or archive source. **Not** a casual `move`. Use mapping + `/sp:dev-
|
|
89
|
+
| **Merge (absorb)** | Two nodes share one Goal; bodies should be one | Prefer: move children under survivor → fold Scope/AC into survivor → cancel or archive source. **Not** a casual `move`. Use mapping + `/sp:dev-feature-change` when batching. |
|
|
90
90
|
| **Archive** | Capability retired | `cancelled` or leave `done`; do not delete history |
|
|
91
91
|
|
|
92
92
|
---
|
|
@@ -160,7 +160,7 @@ work under H.
|
|
|
160
160
|
- [ ] Will attach tasks with `--feature <new-id>` (or parent if intentionally epic-only).
|
|
161
161
|
- [ ] After create: `spur feature refresh` if INDEX must update; `spur feature check <id>`.
|
|
162
162
|
|
|
163
|
-
## Checklist: before restructure / `/sp:dev-
|
|
163
|
+
## Checklist: before restructure / `/sp:dev-feature-change`
|
|
164
164
|
|
|
165
165
|
- [ ] Mapping file lists disposition per node (`keep` / `reparent-under` / `merge-into` / `rename-only` / `archive`).
|
|
166
166
|
- [ ] False merges rejected (name overlap ≠ one Goal).
|
|
@@ -177,6 +177,6 @@ work under H.
|
|
|
177
177
|
| **This reference** | Agent/human judgment — MECE, root gate, merge vs reparent |
|
|
178
178
|
| **`spur feature create/move/check`** | Deterministic DD-14, children limit, lifecycle |
|
|
179
179
|
| **`/sp:dev-plan` / `/sp:dev-idea`** | Must run the decision procedure before allocate |
|
|
180
|
-
| **`/sp:dev-
|
|
180
|
+
| **`/sp:dev-feature-change`** | Batch restructure against a mapping; must not invent roots |
|
|
181
181
|
|
|
182
182
|
Agents authoring features **must load this file** (via `sp:spur-cli` features references) before creating a root or proposing merges.
|
|
@@ -64,7 +64,7 @@ subtree and **cascade-renames** every descendant; omit `--parent` to lift it to
|
|
|
64
64
|
**Before create or restructure (judgment, not CLI):** load
|
|
65
65
|
[features/hierarchy-mece.md](features/hierarchy-mece.md) — MECE sibling sets, **sparse cautious
|
|
66
66
|
roots**, extend-vs-create decision procedure, merge vs reparent, depth/width limits. `/sp:dev-plan`,
|
|
67
|
-
`/sp:dev-idea`, and `/sp:dev-
|
|
67
|
+
`/sp:dev-idea`, and `/sp:dev-feature-change` must follow that checklist so new work prefers an
|
|
68
68
|
existing parent over a new letter.
|
|
69
69
|
|
|
70
70
|
## Editing a feature: status, fields, and sections
|
|
@@ -49,7 +49,8 @@ spur team status --json # machine-readable
|
|
|
49
49
|
|
|
50
50
|
Lists agent specs and their live run status. When `spur serve` is reachable, enriches each spec with
|
|
51
51
|
the supervisor's process status (`running` / `stopped` / etc.); otherwise falls back to local spec
|
|
52
|
-
metadata.
|
|
52
|
+
metadata. Each row carries the member's declared `role` (rendered `unset` when undeclared, 0544)
|
|
53
|
+
and the spec's `executor`. `--by-team` groups specs by their `agent.team.<id>` tag.
|
|
53
54
|
|
|
54
55
|
### Flags
|
|
55
56
|
|
|
@@ -67,8 +68,14 @@ spur team up alpha --check # dry-run: show add/prune diff, no writes
|
|
|
67
68
|
spur team up alpha --json
|
|
68
69
|
```
|
|
69
70
|
|
|
70
|
-
Materializes
|
|
71
|
-
specs - adding missing specs and pruning stale `spur:generated` ones.
|
|
71
|
+
Materializes the roster declared under `agent.team` in the project config for `<team>` into
|
|
72
|
+
`.spur/agents/` specs - adding missing specs and pruning stale `spur:generated` ones. **Role is
|
|
73
|
+
the primary axis (0543):** a member declares `role` (`scribe`/`coder`/`reviewer`/`planner`,
|
|
74
|
+
from `plugins/sp/references/roles.md`) and/or `executor`; a role-only member resolves an executor
|
|
75
|
+
through the shared tier ladder at materialization, and the written spec records both `role` and
|
|
76
|
+
the resolved `executor` so the decision is inspectable. A member declaring neither fails config
|
|
77
|
+
load naming the team and position. Local id stays `id ?? executor`; role-only members derive
|
|
78
|
+
`<role>-<n>` by declaration order. Generated specs carry the `agent.team.<team>` tag. When `spur serve` is
|
|
72
79
|
reachable, best-effort starts each member. `--check` is a dry-run that shows the add/prune diff
|
|
73
80
|
without writing.
|
|
74
81
|
|
|
@@ -211,6 +211,8 @@ for "what's actually in file Y" or for resources that sit outside the step seque
|
|
|
211
211
|
|
|
212
212
|
**Config & companions (no single pipeline step owns these):**
|
|
213
213
|
|
|
214
|
+
- `plugins/sp/references/roles.md` — the Layer-1 role→tier table (`scribe` / `coder` / `reviewer` /
|
|
215
|
+
`planner`, one per tier); the role vocabulary this spine's operations route under.
|
|
214
216
|
- `.spur/workflows/task-pipeline.yaml` — the execution pipeline definition.
|
|
215
217
|
- `.spur/workflows/planning-pipeline.yaml` — the front-half state machine.
|
|
216
218
|
- `.spur/templates/bdd/gherkin.md` — the BDD scenario template.
|
|
@@ -113,6 +113,23 @@ Any of the four may additionally carry a **bracket tag** in any position — `[d
|
|
|
113
113
|
`Scenario: [advisory] Foo`. Tags are stripped before matching (0398 R7), so tagging never breaks
|
|
114
114
|
the linkage.
|
|
115
115
|
|
|
116
|
+
### The id is exactly the scenario title — no Gherkin body appended
|
|
117
|
+
|
|
118
|
+
An AC row id must be **exactly** the scenario title (plus any of the four forms above), with the
|
|
119
|
+
Gherkin body left in the task's `### Acceptance Criteria` block. Never append the scenario's
|
|
120
|
+
`Given … / When … / Then …` steps to the row id:
|
|
121
|
+
|
|
122
|
+
```markdown
|
|
123
|
+
| R3 — Foo | MET | test | `tests/foo.test.ts:12` | ← correct
|
|
124
|
+
| Scenario: R3 — Foo (Given … / When … / Then …) | MET | test | … | ← never
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
The verifier preserves row ids verbatim in the verdict artifact (evidence is not rewritten), and
|
|
128
|
+
the feature scenario gate strips a trailing parenthetical only as a *backstop* for artifacts that
|
|
129
|
+
already carry one (0561). Appending the body is still a contract violation and makes the row
|
|
130
|
+
unmatchable in edge cases (a title that legitimately ends in `(...)` plus a body), so keep ids
|
|
131
|
+
clean at authoring time.
|
|
132
|
+
|
|
116
133
|
### Which tags exempt a row from executable evidence
|
|
117
134
|
|
|
118
135
|
A `MET` row is silently demoted to `PARTIAL` unless it carries `test` or `command` evidence — the
|
|
@@ -36,13 +36,23 @@ answer. Everything below is a consequence of that sentence, not an additional ru
|
|
|
36
36
|
|
|
37
37
|
**Default: execute the backing skill directly in the current coding-agent session.** Do not invoke
|
|
38
38
|
`spur agent run` when no escalation trigger applies and the operator did not select subprocess via
|
|
39
|
-
the `--agent` selector. Omitting `--agent`
|
|
40
|
-
|
|
39
|
+
the `--agent` selector. Omitting `--agent` keeps the default — the backing skill runs in the
|
|
40
|
+
current session, and eligible model stages may dispatch once to a native subagent (task 0508). The
|
|
41
|
+
explicit value is useful in scripts and audit output but is not the default: explicit `inline`
|
|
42
|
+
selects the zero-dispatch carve-out below.
|
|
43
|
+
|
|
44
|
+
> **Explicit `--agent inline` is a hard host-session guarantee: all model-bearing work executes in
|
|
45
|
+
> the invoking host session — never a native subagent, never a subprocess, never a workflow hop.
|
|
46
|
+
> The 0508 native-subagent eligibility applies to **omitted** `--agent` only. Headless surfaces
|
|
47
|
+
> (`spur agent run`, workflow `agent.run`, serve-side dispatch) reject `inline` with the stable
|
|
48
|
+
> special error (exit 2 at the CLI) and take no further action — no dispatch, no `agent.default`
|
|
49
|
+
> fallback.**
|
|
41
50
|
|
|
42
51
|
| Value | Who does the work | Derived surface |
|
|
43
52
|
|---|---|---|
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
53
|
+
| `(omitted)` | The agent running this session | Host session — host-controlled; eligible model stages may use a native subagent (0508) |
|
|
54
|
+
| `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) |
|
|
55
|
+
| `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 — a tier-resolved executor pins a specific agent/model, which the host session cannot supply |
|
|
46
56
|
| `<name>` (coding agent or configured executor) | That executor | Inline when it resolves to the current session's agent; subprocess otherwise |
|
|
47
57
|
|
|
48
58
|
The previous `--inline` and `--subprocess` flags (feature H82, task 0413) are collapsed into this
|
|
@@ -53,8 +63,11 @@ This is a prompt-runtime rule owned by the command wrapper and its backing skill
|
|
|
53
63
|
`AgentService`: the current coding agent is already executing the command, so inline means continuing
|
|
54
64
|
in that session. Threading an `inline` option through `AiRunner` would still start a subprocess and
|
|
55
65
|
would therefore be a false implementation. On a headless surface (`spur agent run` / workflow
|
|
56
|
-
`agent.run`) `inline` is **
|
|
57
|
-
|
|
66
|
+
`agent.run`) explicit `inline` is **rejected** (ADR-047 G5 amendment) with the stable special error —
|
|
67
|
+
headless surfaces cannot host a session: `--agent inline requires a host session: this surface is
|
|
68
|
+
headless and never dispatches inline runs (no fallback to agent.default). Use 'auto', a role, or an
|
|
69
|
+
executor name.` (exit 2 at the CLI; the exported `AGENT_INLINE_HEADLESS_MESSAGE` in
|
|
70
|
+
`agent-service`). No further action is taken — no dispatch, no `agent.default` fallback.
|
|
58
71
|
|
|
59
72
|
### Objective triggers override the answer
|
|
60
73
|
|
|
@@ -68,8 +81,10 @@ cannot satisfy, so it wins regardless:
|
|
|
68
81
|
| **Durable auditable run record required** | The caller requires a persisted cost/trace/exit-code record. | `trigger 3: durable auditable run record required` |
|
|
69
82
|
| **Workspace or credential isolation required** | The work must not share the host workspace or credentials. | `trigger 4: workspace or credential isolation required` |
|
|
70
83
|
|
|
71
|
-
A trigger selects subprocess
|
|
72
|
-
named in the dispatch or result.
|
|
84
|
+
A trigger selects subprocess when the selector is omitted, `auto`, or a name, and the applied trigger
|
|
85
|
+
must be named in the dispatch or result. Explicit `--agent inline` is the hard host-session carve-out:
|
|
86
|
+
a trigger requirement that cannot be satisfied in-session rejects with the stable special error rather
|
|
87
|
+
than dispatching a subprocess. When the operator selected a non-current executor and no objective trigger
|
|
73
88
|
applies, report `operator override` rather than inventing one of the four. The trigger vocabulary and
|
|
74
89
|
evidence standard are owned by
|
|
75
90
|
[dispatch-surface.md](../../parallel-execution/references/dispatch-surface.md). If none can be named
|
|
@@ -103,20 +118,23 @@ the thinking happens in the stages. Selecting an executor for a loop that runs n
|
|
|
103
118
|
meaningless.
|
|
104
119
|
|
|
105
120
|
**Interactive task pipelines invert control into the host session (ADR-047 amendment).**
|
|
106
|
-
`dev-run --mode full` and sequential `dev-runall` with
|
|
107
|
-
`task-pipeline.yaml` in the host session; they do not launch `spur
|
|
108
|
-
silently to `agent.default`. Interactive
|
|
109
|
-
longer guarantees host-context execution for every
|
|
110
|
-
stage — pure-slash input, non-interactive state,
|
|
111
|
-
read/write/shell capability — dispatches **once** to that
|
|
112
|
-
driver continues; any pre-dispatch eligibility failure falls
|
|
113
|
-
failure after dispatch follows the stage's error policy with no
|
|
121
|
+
`dev-run --mode full` and sequential `dev-runall` with omitted `--agent` or explicit `--agent
|
|
122
|
+
inline` interpret the existing `task-pipeline.yaml` in the host session; they do not launch `spur
|
|
123
|
+
workflow run` and never redirect silently to `agent.default`. Interactive **omit** is
|
|
124
|
+
**host-controlled and non-subprocess**, but no longer guarantees host-context execution for every
|
|
125
|
+
model stage (task 0508): an eligible `agent.run` stage — pure-slash input, non-interactive state,
|
|
126
|
+
native subagent with shared-worktree read/write/shell capability — dispatches **once** to that
|
|
127
|
+
native subagent and joins before the driver continues; any pre-dispatch eligibility failure falls
|
|
128
|
+
back to one host execution, and a failure after dispatch follows the stage's error policy with no
|
|
129
|
+
automatic host replay. Explicit `--agent inline` is the zero-dispatch carve-out: every model stage
|
|
130
|
+
executes in the invoking host session — no native-subagent leg. Operator
|
|
114
131
|
confirmation actions, `pause: true`, and approve/taste/ask decisions stay host-owned. Each inline
|
|
115
132
|
model stage appends `stage <id> executed inline in session <session-id>` to its run log; a
|
|
116
133
|
subagent-dispatched stage appends `stage <id> executed via subagent <agent-id> (host session
|
|
117
134
|
<session-id>)` instead. `dev-plan` remains a workflow subprocess, as do `dev-run`/`dev-runall` with
|
|
118
135
|
`--agent auto` or a name, parallel batches, and every headless `spur workflow run` / `spur agent
|
|
119
|
-
run`. `dev-run --mode implement` continues to run its single competency in-session under
|
|
136
|
+
run`. `dev-run --mode implement` continues to run its single competency in-session under omitted
|
|
137
|
+
`--agent` or explicit `--agent inline` (zero-dispatch).
|
|
120
138
|
|
|
121
139
|
### Executor precedence chain (R7)
|
|
122
140
|
|
|
@@ -133,10 +151,11 @@ resolved in this order; first match wins:
|
|
|
133
151
|
|
|
134
152
|
`--agent auto` tier-resolves an executor (stage `model_policy` → `agent.default` → tier priority)
|
|
135
153
|
**before** merging, so it enters the chain at step 1 already resolved to a concrete name.
|
|
136
|
-
On a headless workflow surface, `--agent inline`
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
154
|
+
On a headless workflow surface, explicit `--agent inline` is rejected with the stable special error
|
|
155
|
+
— the surface cannot host a session. Interactive task wrappers consume omitted `--agent` (0508
|
|
156
|
+
eligibility) and explicit `inline` (zero-dispatch carve-out) before this chain and use the host
|
|
157
|
+
driver. Omitting the flag on a headless surface forwards nothing, so the spawned step resolves to
|
|
158
|
+
`agent.default` (step 2) or the YAML literal (step 3).
|
|
140
159
|
|
|
141
160
|
### Implement-only executor override (R6)
|
|
142
161
|
|
|
@@ -181,8 +200,10 @@ explicit process boundary and retain their existing resolution, output, timeout,
|
|
|
181
200
|
contracts. The interactive task wrapper does not change the YAML or engine; it reads the YAML as
|
|
182
201
|
SSOT and interprets the actions in-session before any workflow subprocess exists. It records inline
|
|
183
202
|
provenance without fabricating an `AgentRunTracedResult`.
|
|
184
|
-
`spur agent run` itself resolves
|
|
185
|
-
|
|
203
|
+
`spur agent run` itself resolves omitted `--agent` to `agent.default`, rejects explicit `--agent
|
|
204
|
+
inline` with the stable special error (a headless surface cannot host a session), and `--agent
|
|
205
|
+
auto` tier-resolves — the unified `--agent` selector on the dev command surface does not change the
|
|
206
|
+
CLI's resolution.
|
|
186
207
|
|
|
187
208
|
### Inline trade-off
|
|
188
209
|
|