@gobing-ai/spur 0.3.41 → 0.3.43
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 +15 -0
- package/README.md +15 -1
- package/config/templates/AGENTS.md +5 -3
- package/config/workflows/task-pipeline.yaml +113 -12
- package/package.json +15 -12
- package/plugins/README.md +655 -0
- package/plugins/sp/README.md +621 -0
- package/plugins/sp/agents/expert-spur.md +109 -0
- package/plugins/sp/agents/super-coder.md +126 -0
- package/plugins/sp/agents/super-planner.md +283 -0
- package/plugins/sp/agents/super-reviewer.md +154 -0
- package/plugins/sp/commands/dev-arch.md +30 -0
- package/plugins/sp/commands/dev-brainstorm.md +40 -0
- package/plugins/sp/commands/dev-changelog.md +28 -0
- package/plugins/sp/commands/dev-daily.md +29 -0
- package/plugins/sp/commands/dev-debug.md +29 -0
- package/plugins/sp/commands/dev-dogfood.md +33 -0
- package/plugins/sp/commands/dev-featurechange.md +130 -0
- package/plugins/sp/commands/dev-find-conflict.md +51 -0
- package/plugins/sp/commands/dev-find-issue.md +76 -0
- package/plugins/sp/commands/dev-find-next.md +60 -0
- package/plugins/sp/commands/dev-fixall.md +33 -0
- package/plugins/sp/commands/dev-gitmsg.md +28 -0
- package/plugins/sp/commands/dev-gtd.md +97 -0
- package/plugins/sp/commands/dev-handover.md +26 -0
- package/plugins/sp/commands/dev-idea.md +50 -0
- package/plugins/sp/commands/dev-next.md +31 -0
- package/plugins/sp/commands/dev-parallel.md +30 -0
- package/plugins/sp/commands/dev-plan.md +46 -0
- package/plugins/sp/commands/dev-refine.md +48 -0
- package/plugins/sp/commands/dev-refineall.md +65 -0
- package/plugins/sp/commands/dev-refresh.md +32 -0
- package/plugins/sp/commands/dev-reverse.md +32 -0
- package/plugins/sp/commands/dev-review.md +31 -0
- package/plugins/sp/commands/dev-run.md +63 -0
- package/plugins/sp/commands/dev-runall.md +83 -0
- package/plugins/sp/commands/dev-simplify.md +39 -0
- package/plugins/sp/commands/dev-unit.md +29 -0
- package/plugins/sp/commands/dev-verify.md +48 -0
- package/plugins/sp/commands/dev-verifyall.md +72 -0
- package/plugins/sp/commands/dev-wrap.md +48 -0
- package/plugins/sp/commands/dev-wrapall.md +51 -0
- package/plugins/sp/commands/rule-add.md +18 -0
- package/plugins/sp/commands/rule-refine.md +18 -0
- package/plugins/sp/commands/rule-scan.md +18 -0
- package/plugins/sp/commands/spur-init.md +22 -0
- package/plugins/sp/commands/workflow-add.md +18 -0
- package/plugins/sp/commands/workflow-refine.md +18 -0
- package/plugins/sp/hooks/agent-hint.ts +60 -0
- package/plugins/sp/hooks/careful-guard.ts +147 -0
- package/plugins/sp/hooks/context-post-tool.ts +325 -0
- package/plugins/sp/hooks/context-session-start.ts +182 -0
- package/plugins/sp/hooks/context-session-stop.ts +95 -0
- package/plugins/sp/hooks/hooks.json +51 -0
- package/plugins/sp/hooks/pi/guard-extension.ts +341 -0
- package/plugins/sp/hooks/task-write-guard.ts +84 -0
- package/plugins/sp/plugin.json +8 -0
- package/plugins/sp/scripts/batch-preflight.ts +204 -0
- package/plugins/sp/scripts/daily-summary/daily-summary.ts +606 -0
- package/plugins/sp/scripts/daily-summary/logger.ts +28 -0
- package/plugins/sp/scripts/dogfood-testing/detect-pipeline-driving.ts +363 -0
- package/plugins/sp/scripts/dogfood-testing/validate-report.ts +168 -0
- package/plugins/sp/scripts/feature-sync-bounded.ts +451 -0
- package/plugins/sp/scripts/stage-registry-adapter.ts +1341 -0
- package/plugins/sp/scripts/task-size-precheck.ts +202 -0
- package/plugins/sp/scripts/validate-commands.ts +651 -0
- package/plugins/sp/scripts/validate-flag-contracts.ts +875 -0
- package/plugins/sp/skills/brainstorm/SKILL.md +361 -0
- package/plugins/sp/skills/brainstorm/agents/openai.yaml +14 -0
- package/plugins/sp/skills/brainstorm/examples/ideation-example.md +209 -0
- package/plugins/sp/skills/brainstorm/metadata.openclaw +7 -0
- package/plugins/sp/skills/brainstorm/references/grilling-interview.md +68 -0
- package/plugins/sp/skills/brainstorm/references/workflows.md +255 -0
- package/plugins/sp/skills/branch-workflow/SKILL.md +109 -0
- package/plugins/sp/skills/branch-workflow/references/branch-lifecycle.md +69 -0
- package/plugins/sp/skills/branch-workflow/references/worktree-patterns.md +100 -0
- package/plugins/sp/skills/code-implementation/SKILL.md +203 -0
- package/plugins/sp/skills/code-implementation/references/debugging.md +64 -0
- package/plugins/sp/skills/code-implementation/references/implementation-patterns.md +113 -0
- package/plugins/sp/skills/code-improvement/SKILL.md +231 -0
- package/plugins/sp/skills/code-improvement/references/deepening-signals.md +205 -0
- package/plugins/sp/skills/code-review/SKILL.md +112 -0
- package/plugins/sp/skills/code-review/references/receiving-code-review.md +70 -0
- package/plugins/sp/skills/code-review/references/review-lenses.md +117 -0
- package/plugins/sp/skills/code-review/references/self-review-checklist.md +53 -0
- package/plugins/sp/skills/code-review/references/verification-before-completion.md +68 -0
- package/plugins/sp/skills/code-simplification/SKILL.md +225 -0
- package/plugins/sp/skills/code-testing/SKILL.md +108 -0
- package/plugins/sp/skills/code-testing/references/stacks/bun-ts.md +165 -0
- package/plugins/sp/skills/code-testing/references/stacks/go.md +88 -0
- package/plugins/sp/skills/code-testing/references/stacks/python.md +117 -0
- package/plugins/sp/skills/code-testing/references/test-loop-breaker.md +37 -0
- package/plugins/sp/skills/code-testing/references/test-output-discipline.md +52 -0
- package/plugins/sp/skills/code-testing/references/unit-testing.md +212 -0
- package/plugins/sp/skills/code-verification/SKILL.md +535 -0
- package/plugins/sp/skills/code-verification/references/code-improvement.md +39 -0
- package/plugins/sp/skills/code-verification/references/secu-review.md +94 -0
- package/plugins/sp/skills/code-verification/references/verdict-schema.md +141 -0
- package/plugins/sp/skills/conflict-finding/SKILL.md +254 -0
- package/plugins/sp/skills/conflict-finding/references/authority-resolution.md +258 -0
- package/plugins/sp/skills/conflict-finding/references/comparison-protocol.md +277 -0
- package/plugins/sp/skills/conflict-finding/references/finding-contract.md +346 -0
- package/plugins/sp/skills/conflict-finding/references/remediation-routing.md +276 -0
- package/plugins/sp/skills/daily-summary/SKILL.md +171 -0
- package/plugins/sp/skills/daily-summary/agents/openai.yaml +13 -0
- package/plugins/sp/skills/doc-evolve/SKILL.md +175 -0
- package/plugins/sp/skills/doc-evolve/references/operations.md +93 -0
- package/plugins/sp/skills/dogfood-testing/SKILL.md +608 -0
- package/plugins/sp/skills/dogfood-testing/references/monitor-ledger.md +211 -0
- package/plugins/sp/skills/dogfood-testing/references/report-template.md +351 -0
- package/plugins/sp/skills/doubt-driven-development/SKILL.md +136 -0
- package/plugins/sp/skills/functional-review/SKILL.md +364 -0
- package/plugins/sp/skills/functional-review/references/verdict-schema.md +133 -0
- package/plugins/sp/skills/indexed-context/SKILL.md +164 -0
- package/plugins/sp/skills/issue-finding/SKILL.md +442 -0
- package/plugins/sp/skills/issue-finding/agents/openai.yaml +15 -0
- package/plugins/sp/skills/issue-finding/examples/expected-findings.json +27 -0
- package/plugins/sp/skills/issue-finding/examples/session-test-loop.jsonl +23 -0
- package/plugins/sp/skills/issue-finding/references/session-formats.md +151 -0
- package/plugins/sp/skills/next-feature/SKILL.md +125 -0
- package/plugins/sp/skills/next-feature/references/handoff-routing.md +92 -0
- package/plugins/sp/skills/next-feature/references/proposal-contract.md +49 -0
- package/plugins/sp/skills/next-feature/references/ranking-rubric.md +52 -0
- package/plugins/sp/skills/next-feature/references/signal-derivation.md +67 -0
- package/plugins/sp/skills/next-router/SKILL.md +181 -0
- package/plugins/sp/skills/next-router/references/messages.md +90 -0
- package/plugins/sp/skills/next-router/references/routing-table.md +216 -0
- package/plugins/sp/skills/parallel-execution/SKILL.md +148 -0
- package/plugins/sp/skills/parallel-execution/references/dispatch-surface.md +109 -0
- package/plugins/sp/skills/parallel-execution/references/fan-out-patterns.md +101 -0
- package/plugins/sp/skills/parallel-execution/references/result-synthesis.md +94 -0
- package/plugins/sp/skills/reverse-engineering/SKILL.md +375 -0
- package/plugins/sp/skills/reverse-engineering/agents/openai.yaml +18 -0
- package/plugins/sp/skills/source-driven-development/SKILL.md +124 -0
- package/plugins/sp/skills/spec-decomposition/SKILL.md +117 -0
- package/plugins/sp/skills/spec-decomposition/references/decomposition.md +539 -0
- package/plugins/sp/skills/spur-cli/SKILL.md +133 -0
- package/plugins/sp/skills/spur-cli/references/agent.md +179 -0
- package/plugins/sp/skills/spur-cli/references/features/acceptance-criteria.md +82 -0
- package/plugins/sp/skills/spur-cli/references/features/hierarchy-mece.md +177 -0
- package/plugins/sp/skills/spur-cli/references/features/roadmap-priority.md +84 -0
- package/plugins/sp/skills/spur-cli/references/features/verbs.md +122 -0
- package/plugins/sp/skills/spur-cli/references/features.md +234 -0
- package/plugins/sp/skills/spur-cli/references/init.md +119 -0
- package/plugins/sp/skills/spur-cli/references/message.md +98 -0
- package/plugins/sp/skills/spur-cli/references/rules/authoring-rules.md +212 -0
- package/plugins/sp/skills/spur-cli/references/rules/fine-tuning.md +148 -0
- package/plugins/sp/skills/spur-cli/references/rules/operations.md +228 -0
- package/plugins/sp/skills/spur-cli/references/rules/validation-and-extension.md +129 -0
- package/plugins/sp/skills/spur-cli/references/rules.md +209 -0
- package/plugins/sp/skills/spur-cli/references/serve.md +58 -0
- package/plugins/sp/skills/spur-cli/references/tasks/l3-guard-cheatsheet.md +98 -0
- package/plugins/sp/skills/spur-cli/references/tasks/section-editing.md +95 -0
- package/plugins/sp/skills/spur-cli/references/tasks/verbs.md +361 -0
- package/plugins/sp/skills/spur-cli/references/tasks.md +280 -0
- package/plugins/sp/skills/spur-cli/references/team.md +133 -0
- package/plugins/sp/skills/spur-cli/references/workflows/authoring-workflows.md +226 -0
- package/plugins/sp/skills/spur-cli/references/workflows/operations.md +211 -0
- package/plugins/sp/skills/spur-cli/references/workflows/validation-and-extension.md +129 -0
- package/plugins/sp/skills/spur-cli/references/workflows.md +355 -0
- package/plugins/sp/skills/spur-dev/SKILL.md +224 -0
- package/plugins/sp/skills/spur-dev/references/ac-style-guide.md +196 -0
- package/plugins/sp/skills/spur-dev/references/cross-cutting.md +680 -0
- package/plugins/sp/skills/spur-dev/references/decision-brief.md +80 -0
- package/plugins/sp/skills/spur-dev/references/dev-operations.md +546 -0
- package/plugins/sp/skills/spur-dev/references/done-housekeeping.md +164 -0
- package/plugins/sp/skills/spur-dev/references/execution-batch.md +790 -0
- package/plugins/sp/skills/spur-dev/references/execution-workflow.md +352 -0
- package/plugins/sp/skills/spur-dev/references/feature-link-helper.md +191 -0
- package/plugins/sp/skills/spur-dev/references/flag-glossary.md +417 -0
- package/plugins/sp/skills/spur-dev/references/gate-checklists.md +171 -0
- package/plugins/sp/skills/spur-dev/references/glossary.md +95 -0
- package/plugins/sp/skills/spur-dev/references/idea-evaluation.md +80 -0
- package/plugins/sp/skills/spur-dev/references/inline-pipeline-driver.md +120 -0
- package/plugins/sp/skills/spur-dev/references/planning-workflow.md +302 -0
- package/plugins/sp/skills/spur-dev/references/product-planning.md +206 -0
- package/plugins/sp/skills/spur-dev/references/section-batching.md +24 -0
- package/plugins/sp/skills/sys-architecture/SKILL.md +155 -0
- package/plugins/sp/skills/sys-architecture/references/decision-method.md +137 -0
- package/plugins/sp/skills/sys-architecture/references/upkeep-survey.md +75 -0
- package/plugins/sp/skills/sys-debugging/SKILL.md +228 -0
- package/plugins/sp/skills/sys-debugging/references/debugging-protocol.md +62 -0
- package/plugins/sp/skills/test-driven-development/SKILL.md +248 -0
- package/plugins/sp/skills/wayfinder/SKILL.md +292 -0
- package/spur.js +6035 -4963
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-verbs
|
|
3
|
+
description: Per-verb flag detail, template variants, verdict + check JSON shapes, and exit codes for spur task.
|
|
4
|
+
see_also:
|
|
5
|
+
- spur-cli
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# `spur task` — verb detail
|
|
9
|
+
|
|
10
|
+
Ground truth for every `spur task` verb. The CLI is the source of behavior; this reference mirrors
|
|
11
|
+
it so you don't have to read the command source. If a flag isn't listed here, it doesn't exist —
|
|
12
|
+
don't assume one. Authority for surface + semantics: `docs/04_DESIGN.md §7.1`.
|
|
13
|
+
|
|
14
|
+
**Exit codes (all verbs):** `0` success, `1` error, `2` invalid usage. `--json` follows the
|
|
15
|
+
`api-response` envelope (`{ ok, data? }`).
|
|
16
|
+
|
|
17
|
+
## `create <title>`
|
|
18
|
+
|
|
19
|
+
Allocate one task with a race-safe WBS (a create-lock serializes ID allocation; fail-loud, no
|
|
20
|
+
blocking retry).
|
|
21
|
+
|
|
22
|
+
| Flag | Effect |
|
|
23
|
+
| ---- | ------ |
|
|
24
|
+
| `--feature <id>` | Records `feature_id` in frontmatter; derives `Background` from the feature's `Goal` (L4 edge). |
|
|
25
|
+
| `--parent <wbs>` | Groups under a parent WBS for sub-task decomposition. |
|
|
26
|
+
| `--template <variant>` | Selects the section-matrix variant for the new file. |
|
|
27
|
+
| `--folder <path>` | Target a non-default tasks folder. |
|
|
28
|
+
| `--json` | Emit `{ ref: { id, filePath } }`. |
|
|
29
|
+
|
|
30
|
+
(See also the full verb map in [tasks.md](../tasks.md).)
|
|
31
|
+
|
|
32
|
+
**Template variants** (`TASK_VARIANTS`): `standard`, `feature-impl`, `issue`, `review`, `meta`,
|
|
33
|
+
`brainstorm`. The variant chooses which sections the new file carries (via the Section-Status-Matrix)
|
|
34
|
+
and its scaffold body. **Default:** `feature-impl` when `--feature` is given, else `standard`. An
|
|
35
|
+
unknown variant is exit `2`.
|
|
36
|
+
|
|
37
|
+
**Creation status** follows the matrix: a spec'd task (a `--feature` link, or a batch item with
|
|
38
|
+
`background`/`requirements`) is created at **`todo`** ("ready to execute"); a bare capture is created
|
|
39
|
+
at **`backlog`** ("still preparing"). `Solution` first appears at `wip`.
|
|
40
|
+
|
|
41
|
+
## `show <wbs>` / `list`
|
|
42
|
+
|
|
43
|
+
- `show <wbs>` prints one task's frontmatter + body. With `--json`, frontmatter is a top-level field.
|
|
44
|
+
- `list` filters: `--status <s>` (or legacy `--phase <p>`), `--parent <wbs>`, `--feature <id>`
|
|
45
|
+
(linked `feature_id` edge). `--json` emits an array.
|
|
46
|
+
|
|
47
|
+
## `update <wbs> [status] | --section <name> --from-file <path> | --feature/--priority`
|
|
48
|
+
|
|
49
|
+
Multi-mode. Status and `--section` are **mutually exclusive**; `--feature`/`--priority` set a
|
|
50
|
+
frontmatter scalar.
|
|
51
|
+
|
|
52
|
+
- **Status** (positional): legal transition over `backlog → todo → wip → testing → blocked → done →
|
|
53
|
+
cancelled`. Two transitions run a `check` guard (§7.5): `wip→testing` → `spur task check <wbs>`;
|
|
54
|
+
`testing→done` → `spur task check <wbs> --strict-core`. A failing gate blocks the transition.
|
|
55
|
+
- **`--no-lifecycle`**: suppress lifecycle workflow *run record* creation (use inside pipeline runs
|
|
56
|
+
to avoid orphaned nested lifecycle runs). **It is not a guard bypass** — the `wip→testing` and
|
|
57
|
+
`testing→done` `check` gates above still run; the CLI evaluates them inline when the FSM guard
|
|
58
|
+
does not. `--force-done` waives the verify **verdict** only, never the section matrix.
|
|
59
|
+
- **Section** (`--section` **requires** `--from-file`): replaces the entire named section body from
|
|
60
|
+
the file. No inline-body flag. Section names: `Background`, `Requirements`, `Acceptance Criteria`, `Q&A`, `Design`, `Plan`, `Solution`, `Testing`, `Review`, `References`, `History`, `Notes`.
|
|
61
|
+
- **Frontmatter** (`--feature <id>`, `--priority <p>`): sets the scalar frontmatter field on an
|
|
62
|
+
existing task — the only post-create path, allow-listed to `feature_id` / `parent_wbs` / `priority`.
|
|
63
|
+
|
|
64
|
+
Exit code `2` when neither mode's required args are supplied (e.g. `--section` without `--from-file`,
|
|
65
|
+
or no status and no `--section`/frontmatter flag).
|
|
66
|
+
|
|
67
|
+
## `deps <wbs> <op> [values...]`
|
|
68
|
+
|
|
69
|
+
Mutate the `dependencies[]` frontmatter array on an existing task. Operations run validation (WBS format, existence, self-edge, duplicates, cycle detection) before any write.
|
|
70
|
+
|
|
71
|
+
| Op | Usage | Description |
|
|
72
|
+
| --- | --- | --- |
|
|
73
|
+
| `set` | `spur task deps <wbs> set <dep-wbs...>` | Replace `dependencies[]` with given WBS values |
|
|
74
|
+
| `add` | `spur task deps <wbs> add <dep-wbs...>` | Append given WBS values (deduped) |
|
|
75
|
+
| `remove` | `spur task deps <wbs> remove <dep-wbs...>` | Drop given WBS values |
|
|
76
|
+
| `clear` | `spur task deps <wbs> clear` | Empty `dependencies[]` array |
|
|
77
|
+
|
|
78
|
+
Flags: `--folder <path>`, `--json`. Exit codes: `0` success, `1` error, `2` usage error, `3` validation error.
|
|
79
|
+
`--json` shape: `{ "ref": { "id": "0316", "filePath": "..." }, "dependencies": ["0315"] }`.
|
|
80
|
+
|
|
81
|
+
## `sections <wbs> <op> [name]`
|
|
82
|
+
|
|
83
|
+
CLI-safe, matrix-enforced task section mutation. Section names are validated against canonical sections (`Background`, `Requirements`, `Acceptance Criteria`, `Q&A`, `Design`, `Plan`, `Solution`, `Root Cause`, `Testing`, `Review`, `References`, `History`, `Notes`). Universal sections (`History`, `References`, `Notes`) are always allowed; `Root Cause` is carried by the `issue` template variant.
|
|
84
|
+
|
|
85
|
+
| Op | Usage | Description |
|
|
86
|
+
| --- | --- | --- |
|
|
87
|
+
| `init` | `spur task sections <wbs> init` | Add every required section for task's status not already present (idempotent) |
|
|
88
|
+
| `add` | `spur task sections <wbs> add <name>` | Add a single canonical section |
|
|
89
|
+
| `list` | `spur task sections <wbs> list` | Read-only: return matrix required/optional/forbidden, present, and missing sections |
|
|
90
|
+
|
|
91
|
+
Flags: `--folder <path>`, `--json`. Exit codes: `0` success, `1` error, `2` usage error, `3` validation error.
|
|
92
|
+
|
|
93
|
+
## `run-link <wbs>`
|
|
94
|
+
|
|
95
|
+
Record a pipeline run provenance link for a task WBS (used by `--next` auto chains).
|
|
96
|
+
|
|
97
|
+
Flags: `--source <source>` (default `chain`), `--run-id <id>`, `--json`.
|
|
98
|
+
`--json` shape: `{ "id": "trl_...", "wbs": "0316", "runId": "...", "kind": "pipeline", "existed"?: true }`.
|
|
99
|
+
Idempotent: skips if a pipeline link already exists for the task. Exit codes: `0` success, `1` error.
|
|
100
|
+
|
|
101
|
+
## `batch-create --file <path>`
|
|
102
|
+
|
|
103
|
+
Create many tasks from a JSON file passed via **`--file <path>`** (not a positional). The file is a
|
|
104
|
+
**bare top-level array** (not wrapped in an object). Each item is `.strict()` — unknown keys are
|
|
105
|
+
rejected, and creation is **all-or-nothing**:
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
[
|
|
109
|
+
{
|
|
110
|
+
"name": "Add email validation",
|
|
111
|
+
"feature_id": "H2",
|
|
112
|
+
"parent_wbs": "0040",
|
|
113
|
+
"priority": "P1",
|
|
114
|
+
"tags": ["validation"],
|
|
115
|
+
"template": "feature-impl",
|
|
116
|
+
"background": "…",
|
|
117
|
+
"requirements": "…"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Valid `template` values match `TASK_VARIANTS`: `standard`, `feature-impl`, `issue`, `review`, `meta`,
|
|
123
|
+
`brainstorm`. `priority`: `P0`–`P3`. Only `name` is required. An item with `background`/`requirements`
|
|
124
|
+
is created at `todo`; a bare item at `backlog`. The schema lives at
|
|
125
|
+
`apps/cli/schemas/task-batch.schema.json`; the decomposition heuristics that produce this array live
|
|
126
|
+
in `sp:spur-dev`.
|
|
127
|
+
|
|
128
|
+
## `record <wbs>`
|
|
129
|
+
|
|
130
|
+
Write `Testing` + `Review` from a verify verdict, with optional `Solution` backfill and a lifecycle
|
|
131
|
+
transition. Collapses the pipeline's record step to one call.
|
|
132
|
+
|
|
133
|
+
| Flag | Effect |
|
|
134
|
+
| ---- | ------ |
|
|
135
|
+
| `--verdict-file <path>` | Verdict JSON (default `.spur/run/<wbs>-verdict.json`). |
|
|
136
|
+
| `--solution-from-diff` | Backfill `Solution` from `git diff -U0` **only when Solution is bare**. |
|
|
137
|
+
| `--transition <status>` | Optional lifecycle transition after writing. **Never `done`.** |
|
|
138
|
+
|
|
139
|
+
**Verdict shape** (`.spur/run/<wbs>-verdict.json`):
|
|
140
|
+
|
|
141
|
+
```json
|
|
142
|
+
{
|
|
143
|
+
"wbs": "0040",
|
|
144
|
+
"verdict": "PASS",
|
|
145
|
+
"requirements": [{ "id": "AC-1", "status": "MET", "evidence": "…" }],
|
|
146
|
+
"checks": [{ "name": "SECU", "status": "P3", "evidence": "…" }]
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
- `verdict`: `PASS` | `PARTIAL` | `FAIL` | `UNKNOWN`. A missing/malformed/empty file degrades to
|
|
151
|
+
`UNKNOWN` (empty arrays) — `record` never throws.
|
|
152
|
+
- `requirements[]` → the `Testing` per-requirement table. `checks[]` → the `Review` P1–P4 findings
|
|
153
|
+
table. With no requirements/checks, each renders exactly one "none recorded" row (a clean verify is
|
|
154
|
+
a valid outcome; the matrix requires a table, not an empty section).
|
|
155
|
+
- `--solution-from-diff` parses `+++ b/<path>` + `@@ +new @@` hunk headers into sorted, unique
|
|
156
|
+
`` `file:line` `` rows; falls back to `--name-only` at `:1` when there are no hunk lines.
|
|
157
|
+
|
|
158
|
+
## `check [wbs]`
|
|
159
|
+
|
|
160
|
+
The four-layer validator (design §3): L1 frontmatter, L2 section-matrix, L3 structure/format, L4
|
|
161
|
+
traceability. Bare = whole corpus; with a WBS = one task. The matrix is loaded from
|
|
162
|
+
`.spur/tasks/section-matrix.yaml`.
|
|
163
|
+
|
|
164
|
+
- **`--strict`** elevates *all* warnings to failures.
|
|
165
|
+
- **`--strict-core`** is the `testing→done` gate variant: fails only on **hard-core errors** —
|
|
166
|
+
Solution `file:line`, Review P1–P4, and `gate:true` required-section misses — *without* the blanket
|
|
167
|
+
warning elevation.
|
|
168
|
+
|
|
169
|
+
**L4 traceability** resolves `feature_id` / `parent_wbs` / `dependencies` edges and checks **AC
|
|
170
|
+
coverage** (DD-09): a task's scenarios must be a subset of its linked feature's AC by normalized
|
|
171
|
+
title — orphans warn by default.
|
|
172
|
+
|
|
173
|
+
`--json` emits an array of per-task results:
|
|
174
|
+
|
|
175
|
+
```json
|
|
176
|
+
[
|
|
177
|
+
{
|
|
178
|
+
"wbs": "0040",
|
|
179
|
+
"status": "wip",
|
|
180
|
+
"pass": false,
|
|
181
|
+
"findings": [
|
|
182
|
+
{ "severity": "error", "layer": "L4", "section": "Acceptance Criteria", "message": "…" }
|
|
183
|
+
],
|
|
184
|
+
"missingSections": ["Testing"]
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
- `severity`: `error` | `warning` (under `--strict`, warnings count as failures).
|
|
190
|
+
- `layer`: which check layer raised it (`L1` frontmatter / `L2` sections / `L3` structure / `L4`
|
|
191
|
+
traceability).
|
|
192
|
+
- `pass`: per-task verdict. Process exit code is `1` if **any** task fails.
|
|
193
|
+
|
|
194
|
+
Parse this matrix to answer readiness questions — don't re-implement the checks in prose.
|
|
195
|
+
|
|
196
|
+
## `refresh`
|
|
197
|
+
|
|
198
|
+
Re-scan the task corpus and report counts (`{ folders, tasks }` with `--json`). Human output:
|
|
199
|
+
`Corpus scanned — N tasks across M folder(s)`. **`kanban.md` generation is retired** (A17 cutover) —
|
|
200
|
+
the web Task Kanban board is the daily driver. Does not write task files.
|
|
201
|
+
|
|
202
|
+
## `migrate`
|
|
203
|
+
|
|
204
|
+
One-time A17 task corpus normalization pass (`CorpusMigrator`). Normalizes live corpus files under
|
|
205
|
+
the active tasks folder (or `--folder`).
|
|
206
|
+
|
|
207
|
+
| Flag | Effect |
|
|
208
|
+
| ---- | ------ |
|
|
209
|
+
| `--dry-run` | Full report without writing files. |
|
|
210
|
+
| `--folder <path>` | Custom tasks folder. |
|
|
211
|
+
| `--json` | Machine-readable report envelope. |
|
|
212
|
+
|
|
213
|
+
## `resolve <file-path>`
|
|
214
|
+
|
|
215
|
+
Map a file path to its **owning task** — returns the WBS + task file. Strategies, in order: direct
|
|
216
|
+
task-file match, filename WBS parse, then walk-up the directory tree (A10). Use `--strict` to match
|
|
217
|
+
only the exact corpus path, with no basename-WBS fallback. Returns exit `1` if no task owns the path.
|
|
218
|
+
`--json` for structured output.
|
|
219
|
+
|
|
220
|
+
## `verdict <wbs>`
|
|
221
|
+
|
|
222
|
+
Derive a PASS / PARTIAL / FAIL / UNKNOWN verdict from a verify-step answer text file (the agent's
|
|
223
|
+
structured evidence write-up). Replaces the pipeline's verify→record transition's previous grep/shell
|
|
224
|
+
ladder (0108; ADR-022). On a readable answer, emits `.spur/run/<wbs>-verdict.json` (mkdir-p the
|
|
225
|
+
directory first).
|
|
226
|
+
|
|
227
|
+
| Flag | Effect |
|
|
228
|
+
| ---- | ------ |
|
|
229
|
+
| `--from-answer <path>` | Path to the verify answer text file (default `.spur/run/<wbs>-verify-answer.txt`). |
|
|
230
|
+
| `--folder <path>` | Custom tasks folder. |
|
|
231
|
+
| `--json` | Emit the verdict JSON envelope to stdout. |
|
|
232
|
+
|
|
233
|
+
Verdict shape (always written to `.spur/run/<wbs>-verdict.json` regardless of `--json`):
|
|
234
|
+
|
|
235
|
+
```json
|
|
236
|
+
{
|
|
237
|
+
"wbs": "0040",
|
|
238
|
+
"verdict": "PASS",
|
|
239
|
+
"requirements": [{ "id": "R1", "status": "MET", "evidence": "…" }],
|
|
240
|
+
"acceptanceCriteria": [{ "id": "AC-1", "status": "MET", "evidence": "…" }],
|
|
241
|
+
"checks": [{ "name": "design-conformance", "status": "PASS", "evidence": "…" }],
|
|
242
|
+
"source": "spur-task-verdict"
|
|
243
|
+
}
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
- `verdict`: `PASS` | `PARTIAL` | `FAIL` | `UNKNOWN`. A missing/unreadable answer file is a CLI
|
|
247
|
+
input error and exits non-zero before writing a verdict artifact.
|
|
248
|
+
- Behavior-bearing requirements and AC need `test` or `command` evidence; static-reference-only rows
|
|
249
|
+
cap the verdict at `PARTIAL`.
|
|
250
|
+
- Exit code: `0` on `PASS`, `1` on `PARTIAL` / `FAIL` / `UNKNOWN` (so the pipeline's verify→record
|
|
251
|
+
guard can gate on exit code AND read the JSON).
|
|
252
|
+
|
|
253
|
+
### Answer-file shape (what `--from-answer` parses)
|
|
254
|
+
|
|
255
|
+
The answer file is **markdown** — exactly what a chained `/sp:dev-verify` leg naturally writes.
|
|
256
|
+
The parser (`task-verdict.ts` `extractRequirements` / `extractAcceptanceCriteria`) reads rows from
|
|
257
|
+
two table shapes; free-form prose with no tables parses to **zero rows**, which yields
|
|
258
|
+
`verdict: "UNKNOWN"` (the honest answer for unparseable input — the fix is to write tables, not to
|
|
259
|
+
loosen the parser).
|
|
260
|
+
|
|
261
|
+
**Requirement rows** — markdown table with `Req` (or `Requirement`) and `Status` (or `Verdict`)
|
|
262
|
+
columns; optional `Evidence` third column. Header detection is case-insensitive on the first two
|
|
263
|
+
cells:
|
|
264
|
+
|
|
265
|
+
```markdown
|
|
266
|
+
| Req | Status | Evidence |
|
|
267
|
+
|-----|--------|----------|
|
|
268
|
+
| R1 | MET | `src/foo.ts:42` |
|
|
269
|
+
| R2 | PARTIAL| needs test |
|
|
270
|
+
| R3 | UNMET | not started |
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
`Status` values: `MET` | `PARTIAL` | `UNMET` (matched by word-boundary regex, case-insensitive).
|
|
274
|
+
|
|
275
|
+
**Acceptance Criteria rows** — markdown table with `AC` (or `Acceptance`) / `Status` / `Evidence
|
|
276
|
+
Type` / `Evidence` columns (four cells minimum). Header detection requires the `evidence type`
|
|
277
|
+
column to distinguish AC rows from requirement rows:
|
|
278
|
+
|
|
279
|
+
```markdown
|
|
280
|
+
| AC | Status | Evidence Type | Evidence |
|
|
281
|
+
|----|--------|---------------|----------|
|
|
282
|
+
| AC-1 | MET | test | `tests/foo.test.ts:12` |
|
|
283
|
+
| AC-2 | MET | command | `bun run lint` exit 0 |
|
|
284
|
+
| AC-3 | N/A | n/a | non-behavioral — doc-only |
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
`Status`: `MET` | `PARTIAL` | `UNMET` | `N/A`. `Evidence Type`: `test` | `command` | `static-ref`
|
|
288
|
+
(or `static`) | `manual-review` (or `manual`) | `llm-judge` (or `judge`) | `n/a` (or `na`).
|
|
289
|
+
|
|
290
|
+
**Evidence rule (behavior-bearing AC):** an AC row with `status: MET` on a behavior-bearing id
|
|
291
|
+
(no `[advisory]`/`[non-core]`/`[non-behavior]`/`[docs-only]` marker) MUST carry `test` or
|
|
292
|
+
`command` evidence; any other evidence type downgrades the row to `PARTIAL` and caps the verdict.
|
|
293
|
+
|
|
294
|
+
**Worked example** — a minimal PASS-producing answer file:
|
|
295
|
+
|
|
296
|
+
```markdown
|
|
297
|
+
## Verify Verdict — 0042
|
|
298
|
+
|
|
299
|
+
| Req | Status | Evidence |
|
|
300
|
+
|-----|--------|----------|
|
|
301
|
+
| R1 | MET | `src/foo.ts:42` implements the guard |
|
|
302
|
+
| R2 | MET | `tests/foo.test.ts` covers the branch |
|
|
303
|
+
|
|
304
|
+
| AC | Status | Evidence Type | Evidence |
|
|
305
|
+
|----|--------|---------------|----------|
|
|
306
|
+
| AC-1 | MET | test | `tests/foo.test.ts:12` exit 0 |
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
A free-form prose answer (no tables, or tables missing the required headers) yields
|
|
310
|
+
`verdict: "UNKNOWN"`. The resulting `.spur/run/<wbs>-verdict.json` (with `source:
|
|
311
|
+
"spur-task-verdict"`) will then deny the `testing → done` transition — the denial message names
|
|
312
|
+
the artifact source and directs the operator to `/sp:dev-verify <wbs>`. Re-run verify with the
|
|
313
|
+
table format above.
|
|
314
|
+
|
|
315
|
+
## `refresh-roster <wbs>`
|
|
316
|
+
|
|
317
|
+
Regenerate a parent task's sub-task roster block in `## Plan` — the marker-delimited table that the
|
|
318
|
+
L4 roll-up gate (`runL4Rollup`, task 0121) reads. Idempotent: same children → same block. Invoked
|
|
319
|
+
automatically by `spur task batch-create` for each distinct `parent_wbs` after the atomic create
|
|
320
|
+
lands (task 0178, F1); invoke manually after a child status change outside `batch-create`.
|
|
321
|
+
|
|
322
|
+
| Flag | Effect |
|
|
323
|
+
| ---- | ------ |
|
|
324
|
+
| `--folder <path>` | Custom tasks folder. |
|
|
325
|
+
| `--json` | Emit `{ written, childCount, wbs }` machine-readable. |
|
|
326
|
+
|
|
327
|
+
Human output: `Roster refreshed for <wbs> (N sub-task(s)).` on a successful write, or
|
|
328
|
+
`Task <wbs> has no sub-tasks — nothing to roster.` when the parent has no children.
|
|
329
|
+
|
|
330
|
+
## `path <wbs>`
|
|
331
|
+
|
|
332
|
+
Resolve a WBS to its absolute task file path. Inverse of `resolve <file-path>`.
|
|
333
|
+
|
|
334
|
+
| Flag | Effect |
|
|
335
|
+
| ---- | ------ |
|
|
336
|
+
| `--folder <path>` | Custom tasks folder. |
|
|
337
|
+
| `--json` | Emit `{ wbs, filePath }` machine-readable. |
|
|
338
|
+
|
|
339
|
+
Human output: the absolute path on stdout. Exit `1` with `Task <wbs> not found` when the WBS is
|
|
340
|
+
unallocated.
|
|
341
|
+
|
|
342
|
+
## Command surface (quick)
|
|
343
|
+
|
|
344
|
+
```
|
|
345
|
+
spur task create <title> [--feature <id>] [--parent <wbs>] [--template <v>] [--dedupe-within <seconds>] [--allow-duplicate-name] [--folder] [--json]
|
|
346
|
+
spur task show <wbs> [--folder] [--json]
|
|
347
|
+
spur task update <wbs> [status] [--section <n> --from-file <p>] [--feature <id>] [--priority <p>] [--no-lifecycle] [--folder] [--json]
|
|
348
|
+
spur task deps <wbs> <set|add|remove|clear> [values...] [--folder] [--json]
|
|
349
|
+
spur task sections <wbs> <init|add|list> [name] [--folder] [--json]
|
|
350
|
+
spur task list [--status <s>] [--phase <p>] [--parent <wbs>] [--feature <id>] [--folder] [--json]
|
|
351
|
+
spur task refresh [--folder] [--json]
|
|
352
|
+
spur task migrate [--dry-run] [--folder] [--json]
|
|
353
|
+
spur task refresh-roster <wbs> [--folder] [--json]
|
|
354
|
+
spur task batch-create --file <path> [--folder] [--json]
|
|
355
|
+
spur task record <wbs> [--verdict-file <p>] [--solution-from-diff] [--transition <s>] [--folder] [--json]
|
|
356
|
+
spur task verdict <wbs> [--from-answer <p>] [--folder] [--json]
|
|
357
|
+
spur task check [wbs] [--strict] [--strict-core] [--folder] [--json]
|
|
358
|
+
spur task resolve <file-path> [--strict] [--folder] [--json]
|
|
359
|
+
spur task path <wbs> [--folder] [--json]
|
|
360
|
+
spur task run-link <wbs> [--source <src>] [--run-id <id>] [--json]
|
|
361
|
+
```
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spur-cli-tasks
|
|
3
|
+
description: "spur-cli noun reference: operate `spur task` as the project's task-file CLI — create tasks (with template variants), edit sections, drive the status lifecycle, record pipeline verdicts, derive verdicts, query the four-layer readiness matrix via `check --json`, and re-scan the corpus. The committed-corpus side of the planning layer that the spine orchestrates against."
|
|
4
|
+
see_also:
|
|
5
|
+
- spur-cli
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# spur task — the task-file CLI
|
|
9
|
+
|
|
10
|
+
`spur task` is the CLI for the **task corpus** — the markdown task files under `docs/tasks/` (DD-08).
|
|
11
|
+
Each verb is deterministic and machine-gated: WBS allocation is race-safe, section edits are
|
|
12
|
+
file-wins, `record` writes pipeline verdicts mechanically, and `check` is the four-layer readiness
|
|
13
|
+
matrix the rest of the planning layer reads.
|
|
14
|
+
|
|
15
|
+
This is a **companion reference**, not an orchestrator. It documents *what each verb is and how to
|
|
16
|
+
use it well*. The end-to-end planning + execution loop (intake → feature → decomposition →
|
|
17
|
+
pipeline run) lives in **`sp:spur-dev`** — do not reimplement that loop here. When you need to
|
|
18
|
+
*drive* a task through its lifecycle, reach for `sp:spur-dev`; when you need to know *which verb
|
|
19
|
+
does what*, this skill.
|
|
20
|
+
|
|
21
|
+
## Verb map
|
|
22
|
+
|
|
23
|
+
| Verb | Purpose | Key flags |
|
|
24
|
+
| ---- | ------- | --------- |
|
|
25
|
+
| `create <title>` | Allocate a new task (race-safe WBS) | `--feature <id>` `--parent <wbs>` `--template <variant>` `--dedupe-within <s>` `--allow-duplicate-name` `--folder` `--json` |
|
|
26
|
+
| `show <wbs>` | Print one task's frontmatter + body | `--folder` `--json` |
|
|
27
|
+
| `update <wbs> [status]` | Lifecycle transition, section replace, **or** frontmatter set | `--section <name> --from-file <path>` `--feature <id>` `--priority <p>` `--no-lifecycle` `--force-done` `--reason <text>` `--verdict-dir <path>` `--folder` `--json` |
|
|
28
|
+
| `deps <wbs> <op> [values...]` | Mutate `dependencies[]` frontmatter array (ops: `set`, `add`, `remove`, `clear`) | `--folder` `--json` |
|
|
29
|
+
| `sections <wbs> <op> [name]` | Initialize, add, or list canonical task sections (ops: `init`, `add`, `list`) | `--folder` `--json` |
|
|
30
|
+
| `list` | List tasks, filtered | `--status <s>` `--phase <p>` `--parent <wbs>` `--feature <id>` `--folder` `--json` |
|
|
31
|
+
| `refresh` | Re-scan the corpus and report counts (**`kanban.md` retired** — web Task Kanban is SSOT) | `--folder` `--json` |
|
|
32
|
+
| `migrate` | One-time A17 corpus normalization pass | `--dry-run` `--folder` `--json` |
|
|
33
|
+
| `refresh-roster <wbs>` | Regenerate a parent task's sub-task roster block in `## Plan` | `--folder` `--json` |
|
|
34
|
+
| `batch-create` | Create many tasks from a validated JSON array | `--file <path>` `--folder` `--json` |
|
|
35
|
+
| `record <wbs>` | Write Testing/Review from a verify verdict; optional Solution + transition | `--verdict-file <path>` `--solution-from-diff` `--transition <status>` `--folder` `--json` |
|
|
36
|
+
| `verdict <wbs>` | Derive PASS/PARTIAL/FAIL/UNKNOWN from verify answer text → verdict JSON; see [answer-file shape](tasks/verbs.md#answer-file-shape-what---from-answer-parses) | `--from-answer <path>` `--folder` `--json` |
|
|
37
|
+
| `check [wbs]` | Four-layer validation; the readiness matrix | `--strict` `--strict-core` `--folder` `--json` |
|
|
38
|
+
| `resolve <file-path>` | Map a file path to its owning task WBS | `--strict` `--folder` `--json` |
|
|
39
|
+
| `path <wbs>` | Map a WBS to its absolute task file path (inverse of `resolve`) | `--folder` `--json` |
|
|
40
|
+
| `run-link <wbs>` | Record pipeline run provenance link for task | `--source <src>` `--run-id <id>` `--json` |
|
|
41
|
+
| `verifyall-aggregate` | Aggregate per-task verify outcomes into a batch verdict (NOT-STARTED excluded) | `--from-file <path>` `--json` |
|
|
42
|
+
| `scaffold-tests <wbs>` | Generate BDD test stubs from task Acceptance Criteria | `--file <path>` `--folder` `--json` |
|
|
43
|
+
|
|
44
|
+
All verbs accept `--json` for machine consumption and `--folder <path>` to target a non-default
|
|
45
|
+
tasks folder. **Exit codes:** `0` success, `1` error, `2` invalid usage.
|
|
46
|
+
|
|
47
|
+
## Creating tasks
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
spur task create "Add email validation" --feature H2 --parent 0040
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
- **`--feature <id>`** wires traceability: it derives the task's `Background` from the feature's
|
|
54
|
+
`Goal` and records `feature_id` in frontmatter (L4 traceability reads this edge).
|
|
55
|
+
- **`--parent <wbs>`** groups the new task under a parent WBS for sub-task decomposition.
|
|
56
|
+
- **`--template <variant>`** selects the section-matrix variant that shapes the new file's sections:
|
|
57
|
+
`standard·feature-impl·issue·review·meta·brainstorm`. The default is **`feature-impl` when
|
|
58
|
+
`--feature` is given, else `standard`**. An unknown variant is exit `2`.
|
|
59
|
+
|
|
60
|
+
The same `--template` axis drives both *which sections the new file carries* (per the
|
|
61
|
+
Section-Status-Matrix) and *its creation status*: a spec'd task (a `--feature` link, or a batch item
|
|
62
|
+
with `background`/`requirements`) is created at **`todo`**; a bare capture is created at **`backlog`**.
|
|
63
|
+
See [tasks/verbs.md](tasks/verbs.md) for the variant detail.
|
|
64
|
+
- **Dedup guard (default-on)** — when `--feature <id>` is set, the CLI refuses creation if an
|
|
65
|
+
existing task under the same feature has an identical (case-insensitive) title created within the
|
|
66
|
+
last **300 seconds** (5 min). This prevents the orphan-skeleton + re-create pattern: an agent
|
|
67
|
+
creates a task, loses context, then creates it again. The guard emits `duplicate-follow-up` with
|
|
68
|
+
exit code `3` and names the existing WBS — reuse it.
|
|
69
|
+
- **`--dedupe-within <seconds>`** overrides the default window (e.g. `--dedupe-within 60`).
|
|
70
|
+
- **`--allow-duplicate-name`** disables the guard entirely (explicit override).
|
|
71
|
+
- The guard applies to every create: feature-scoped tasks collide within the same
|
|
72
|
+
feature; unscoped tasks (no `--feature`) collide with other unscoped tasks of the
|
|
73
|
+
same title (their own collision scope).
|
|
74
|
+
- With `--json`, a duplicate emits `{ ok: false, error: { code, message, existingWbs,
|
|
75
|
+
existingName, attemptedName } }` for deterministic reuse.
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Default guard is on — second call within 5 min exits 3:
|
|
79
|
+
spur task create "Add email validation" --feature H2
|
|
80
|
+
spur task create "Add email validation" --feature H2 # → duplicate-follow-up, exit 3
|
|
81
|
+
# Narrow the window:
|
|
82
|
+
spur task create "Add email validation" --feature H2 --dedupe-within 60
|
|
83
|
+
# Override (creates anyway):
|
|
84
|
+
spur task create "Add email validation" --feature H2 --allow-duplicate-name
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Many tasks at once (the decomposition output) go through `batch-create` with a JSON **array** file.
|
|
88
|
+
After child creation succeeds, the CLI refreshes each referenced parent roster and advances a parent
|
|
89
|
+
still at `todo` to `wip`; the JSON result includes `parentsWired[]` for these best-effort side
|
|
90
|
+
effects. Shape and gating live in `sp:spur-dev`'s decomposition reference.
|
|
91
|
+
|
|
92
|
+
## Editing a task: status vs. section vs. frontmatter
|
|
93
|
+
|
|
94
|
+
`update` is multi-mode. **The first positional after the WBS is a status; `--section` switches to
|
|
95
|
+
section-edit mode; `--feature`/`--priority` set a frontmatter scalar.** Status and `--section` are
|
|
96
|
+
mutually exclusive.
|
|
97
|
+
|
|
98
|
+
**Lifecycle transition** (positional status):
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
spur task update 0040 wip
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Valid statuses: `backlog · todo · wip · testing · blocked · done · cancelled` (the lifecycle engine
|
|
105
|
+
enforces legal transitions). Two transitions are **guarded by `check`**: `wip→testing` runs
|
|
106
|
+
`spur task check <wbs>`, and `testing→done` runs `spur task check <wbs> --strict-core` — a failing
|
|
107
|
+
gate blocks the transition (§7.5).
|
|
108
|
+
|
|
109
|
+
**`--no-lifecycle`** suppresses lifecycle workflow *run record* creation (use during pipeline-driven
|
|
110
|
+
transitions so nested lifecycle runs are not orphaned). **It is not a guard bypass** — the
|
|
111
|
+
`wip→testing` / `testing→done` `check` gates still run, evaluated inline when the FSM guard does not.
|
|
112
|
+
**Forced-done override** (`--force-done`, paired with `--reason`):
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
spur task update 0040 done --force-done --reason "verify PASS deferred; manual review confirmed"
|
|
116
|
+
spur task update 0040 done --force-done --reason "verify PASS deferred" --verdict-dir .spur/run/ci
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
- **`--force-done`** allows a `testing->done` transition even when the verify verdict is not PASS
|
|
120
|
+
(0292); it records an override rather than silently bypassing the gate.
|
|
121
|
+
- **`--reason <text>`** is the rationale for the override, persisted as `done_reason` in frontmatter.
|
|
122
|
+
- **`--verdict-dir <path>`** sets the directory the lifecycle guard reads `<wbs>-verdict.json`
|
|
123
|
+
artifacts from (default `.spur/run`) - useful when a pipeline writes verdicts to a non-default
|
|
124
|
+
location.
|
|
125
|
+
|
|
126
|
+
**Section replace** (file-wins, crash-safe):
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
spur task update 0040 --section Review --from-file /tmp/review.md
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
- `--section` **requires** `--from-file` — there is no inline-body flag; the new body is always
|
|
133
|
+
read from a file (this is what makes edits crash-safe and reviewable). Exit `2` otherwise.
|
|
134
|
+
- Section names match the DD-08 task headings: `Background`, `Acceptance Criteria`, `Plan`,
|
|
135
|
+
`Solution`, `Testing`, `Review`, `References`, `History`.
|
|
136
|
+
- The write replaces the **whole** named section body; assemble the full section in the temp file
|
|
137
|
+
first, then point `--from-file` at it.
|
|
138
|
+
|
|
139
|
+
**Frontmatter set** (the only post-create path to scalar fields, allow-listed to
|
|
140
|
+
`feature_id`/`parent_wbs`/`priority`):
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
spur task update 0040 --feature H2
|
|
144
|
+
spur task update 0040 --priority P1
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
The section-write-then-replace pattern is the workflow agents use to fill in `Plan` / `Solution` /
|
|
148
|
+
`Testing` / `Review` during a run. See
|
|
149
|
+
[tasks/section-editing.md](tasks/section-editing.md) for the full recipe. For pipeline
|
|
150
|
+
output specifically, prefer **`record`** (below) over hand-assembling Testing/Review files.
|
|
151
|
+
|
|
152
|
+
## Recording pipeline results — `record`
|
|
153
|
+
|
|
154
|
+
`spur task record <wbs>` writes the `Testing` and `Review` sections **from a verify verdict**, so the
|
|
155
|
+
pipeline's record step is one CLI call instead of awk/sed/jq plumbing:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
spur task record 0040 --transition testing
|
|
159
|
+
spur task record 0040 --verdict-file .spur/run/0040-verdict.json --solution-from-diff --transition testing
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
- Reads the verdict JSON (default `.spur/run/<wbs>-verdict.json`); renders `Testing` as a
|
|
163
|
+
per-requirement table and `Review` as a P1–P4 findings table. A missing/malformed verdict degrades
|
|
164
|
+
to an `UNKNOWN` verdict — it never throws.
|
|
165
|
+
- **`--solution-from-diff`** backfills `Solution` from `git diff -U0` hunk headers **only when the
|
|
166
|
+
Solution section is still bare** — a safety net, not an overwrite.
|
|
167
|
+
- **`--transition <status>`** optionally advances the lifecycle after writing (e.g. `testing`).
|
|
168
|
+
`record` **never transitions to `done`** — the `testing→done` gate stays in the workflow (0108).
|
|
169
|
+
|
|
170
|
+
The verdict shape (`wbs`, `verdict`, `requirements[]`, `checks[]`) and the rendered tables are
|
|
171
|
+
documented in [tasks/verbs.md](tasks/verbs.md).
|
|
172
|
+
|
|
173
|
+
## Batch verdict aggregation - `verifyall-aggregate`
|
|
174
|
+
|
|
175
|
+
`spur task verifyall-aggregate` replaces agent-discretion rollup prose with deterministic code: it
|
|
176
|
+
reads a JSON array of per-task outcomes and emits a single batch verdict, excluding NOT-STARTED
|
|
177
|
+
tasks from the rollup.
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
spur task verifyall-aggregate --from-file .spur/run/verifyall-batch-input.json --json
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
- **`--from-file <path>`** points at a JSON array of `{ wbs, outcome, reason? }` rows (default
|
|
184
|
+
`.spur/run/verifyall-batch-input.json`). `outcome` is one of
|
|
185
|
+
`PASS · PARTIAL · FAIL · NOT-STARTED · UNKNOWN`.
|
|
186
|
+
- The aggregation rolls up every task **except** NOT-STARTED (those are reported separately in
|
|
187
|
+
`notStarted[]`). The batch verdict is `FAIL` if any rolled-up task is FAIL; `PARTIAL` if any is
|
|
188
|
+
PARTIAL; else `PASS`.
|
|
189
|
+
- **`--json`** emits `{ verdict, rolledUp[], notStarted[], summary }` where each entry is
|
|
190
|
+
`{ wbs, outcome, verdict?, reason? }`.
|
|
191
|
+
- **Exit codes:** `0` on PASS/PARTIAL, `1` on FAIL (and on missing/invalid input), `2` invalid usage.
|
|
192
|
+
|
|
193
|
+
## Test scaffolding - `scaffold-tests`
|
|
194
|
+
|
|
195
|
+
`spur task scaffold-tests <wbs>` generates BDD test stubs from a task's `## Acceptance Criteria` -
|
|
196
|
+
one stub per scenario - so a spec'd task lands with a runnable test file from the start.
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
spur task scaffold-tests 0040 --json
|
|
200
|
+
spur task scaffold-tests 0040 --file tests/0040.test.ts
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
- **`--file <path>`** overrides the default target test file path.
|
|
204
|
+
- **`--json`** emits `{ wbs, targetFile, created, skipped, drifted, driftedScenarios[], warnings[] }`.
|
|
205
|
+
`drifted`/`driftedScenarios[]` flag scenarios whose AC titles no longer match the existing test
|
|
206
|
+
names; `warnings[]` carries non-fatal notices.
|
|
207
|
+
- **Exit codes:** `0` success, `1` error (e.g. task WBS not found), `2` invalid usage.
|
|
208
|
+
|
|
209
|
+
## The readiness matrix — `check --json`
|
|
210
|
+
|
|
211
|
+
`spur task check` is the **deterministic four-layer gate** over the corpus (design §3): L1
|
|
212
|
+
frontmatter, L2 section-matrix, L3 structure/format, L4 traceability. Run it bare for the whole
|
|
213
|
+
corpus, or with a WBS for one task:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
spur task check --json # whole corpus
|
|
217
|
+
spur task check 0040 --json # one task
|
|
218
|
+
spur task check --strict --json # elevate ALL warnings to failures
|
|
219
|
+
spur task check 0040 --strict-core # the testing→done gate variant
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
`--json` emits the structured matrix — per-task findings (missing sections, broken feature edges,
|
|
223
|
+
AC-coverage orphans via L4 traceability) keyed by WBS, plus a per-task `pass` verdict. **Query this,
|
|
224
|
+
do not re-derive it**: parse the JSON to answer "which tasks are ready?", "what's blocking 0040?",
|
|
225
|
+
or "are there orphaned scenarios?" rather than reading task files and re-implementing the checks.
|
|
226
|
+
|
|
227
|
+
The two flags are distinct gate profiles:
|
|
228
|
+
|
|
229
|
+
- **`--strict`** elevates *all* warnings to failures (the strictest reading).
|
|
230
|
+
- **`--strict-core`** fails only on hard-core errors — Solution `file:line`, Review P1–P4, and
|
|
231
|
+
`gate:true` required-section misses — *without* the blanket elevation. This is the variant wired
|
|
232
|
+
as the `testing→done` lifecycle guard.
|
|
233
|
+
|
|
234
|
+
See [tasks/verbs.md](tasks/verbs.md) for the JSON shape per finding.
|
|
235
|
+
|
|
236
|
+
## Corpus scan — `refresh` (kanban.md retired)
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
spur task refresh
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Re-scans the task corpus and reports counts (`Corpus scanned — N tasks across M folder(s)`). With
|
|
243
|
+
`--json`, emits `{ folders, tasks }`. **`kanban.md` generation is retired** (A17 cutover) — the web
|
|
244
|
+
Task Kanban board is the daily driver. `refresh` does not write task files.
|
|
245
|
+
|
|
246
|
+
## Path resolution — `resolve` / `path`
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
spur task resolve docs/tasks/0040_add-email-validation.md
|
|
250
|
+
spur task resolve src/lib/validation.ts --json
|
|
251
|
+
spur task path 0040 --json
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
- `resolve <file-path>` maps a file path to its **owning task** (returns WBS + file). Strategies, in
|
|
255
|
+
order: direct task-file match, filename WBS parse, then walk-up the tree (A10). `--strict` disables
|
|
256
|
+
basename-WBS fallback. Exit `1` when no task owns the path.
|
|
257
|
+
- `path <wbs>` is the inverse — absolute task file path for a WBS.
|
|
258
|
+
|
|
259
|
+
## What this skill is NOT
|
|
260
|
+
|
|
261
|
+
- **Not the pipeline.** Driving a task through `task-pipeline.yaml`, HITL surfacing, and
|
|
262
|
+
`workflow continue` is `sp:spur-dev`'s execution half — not here (R3).
|
|
263
|
+
- **Not validation logic.** This skill tells you *to run* `check`; the rules it enforces live in
|
|
264
|
+
the CLI (`task check` / `feature check`), never restated as prose checks here.
|
|
265
|
+
- **Not features.** Feature authoring, hierarchical IDs, and AC conventions live in the companion
|
|
266
|
+
**`spur feature` (see [features.md](features.md))**.
|
|
267
|
+
|
|
268
|
+
## References
|
|
269
|
+
|
|
270
|
+
| Reference | Covers |
|
|
271
|
+
| --------- | ------ |
|
|
272
|
+
| [tasks/verbs.md](tasks/verbs.md) | Per-verb flag detail, template variants, verdict + check JSON shapes, exit codes |
|
|
273
|
+
| [tasks/section-editing.md](tasks/section-editing.md) | The temp-file → `--section`/`--from-file` recipe; which sections to fill when; `record` vs. hand-editing |
|
|
274
|
+
|
|
275
|
+
## See also
|
|
276
|
+
|
|
277
|
+
- **`sp:spur-dev`** — the umbrella skill that orchestrates these verbs into the planning +
|
|
278
|
+
execution loop. Use it to *drive* work; use this skill to *look up a verb*.
|
|
279
|
+
- **`spur feature` (see [features.md](features.md))** — the companion for `spur feature` (hierarchical IDs, AC conventions,
|
|
280
|
+
traceability).
|