@gobing-ai/spur 0.3.66 → 0.3.67
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/corpus-baseline.json +495 -10491
- package/package.json +1 -1
- package/plugins/sp/agents/expert-spur.md +61 -88
- package/plugins/sp/plugin.json +1 -1
- package/plugins/sp/skills/spur-cli/SKILL.md +38 -13
- package/plugins/sp/skills/spur-cli/references/agent.md +7 -4
- package/plugins/sp/skills/spur-cli/references/history.md +69 -0
- package/plugins/sp/skills/spur-cli/references/message.md +2 -2
- package/plugins/sp/skills/spur-cli/references/projects.md +59 -0
- package/plugins/sp/skills/spur-cli/references/tasks/verbs.md +28 -0
- package/plugins/sp/skills/spur-cli/references/team.md +1 -1
- package/plugins/sp/skills/spur-cli/references/workflows.md +6 -0
- package/spur.js +31 -54
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gobing-ai/spur",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.67",
|
|
4
4
|
"description": "Spur CLI — local-first harness for mainstream coding agents: constraint checking, workflow orchestration, agent health, and history analytics. Bun-native; exposes the `spur` command.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"spur",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: expert-spur
|
|
3
3
|
description: |
|
|
4
|
-
Use PROACTIVELY for "create tasks for this feature", "update all task statuses", "audit task traceability", "create a feature with acceptance criteria", "harden the rule catalog", "author a batch of workflows", or "expert-spur". Multi-step
|
|
4
|
+
Use PROACTIVELY for "create tasks for this feature", "update all task statuses", "audit task traceability", "create a feature with acceptance criteria", "harden the rule catalog", "author a batch of workflows", or "expert-spur". Multi-step corpus work across `spur task`, `feature`, `rule`, and `workflow`: batch creation, status sweeps, section campaigns, traceability audits, rule hardening, and workflow authoring/refactoring. For one deterministic operation, run the CLI directly.
|
|
5
5
|
|
|
6
6
|
<example>
|
|
7
|
-
Context: Batch task status update across a feature
|
|
7
|
+
Context: Batch task status update across a feature.
|
|
8
8
|
user: "Move all A1 tasks from backlog to wip."
|
|
9
|
-
assistant: "Delegating to sp:expert-spur —
|
|
10
|
-
<commentary>
|
|
9
|
+
assistant: "Delegating to sp:expert-spur — loads the task reference, resolves the set, then applies and checks each transition."
|
|
10
|
+
<commentary>A multi-task sweep needs isolated sequencing and between-operation judgment.</commentary>
|
|
11
11
|
</example>
|
|
12
12
|
tools: [Read, Grep, Glob, Bash, Skill]
|
|
13
13
|
model: inherit
|
|
@@ -17,113 +17,86 @@ skills: [sp:spur-cli]
|
|
|
17
17
|
|
|
18
18
|
# Expert Spur
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
rule-catalog hardening, workflow refactors) that benefits from isolation; for a single operation,
|
|
24
|
-
use the `spur` CLI directly or invoke `sp:spur-dev`.
|
|
20
|
+
Thin specialist for multi-step Spur **corpus** work. The backend skill `sp:spur-cli` owns noun,
|
|
21
|
+
verb, flag, output, and exit semantics; this agent selects its task/feature/rule/workflow reference,
|
|
22
|
+
sequences operations, and evaluates each result before continuing.
|
|
25
23
|
|
|
26
24
|
## Role
|
|
27
25
|
|
|
28
|
-
You are the
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
`docs/design/workflow-shell-ownership.md`; never reformat to dodge the measure.
|
|
58
|
-
- **Latency and observability are authoring decisions.** Minimize `agent.run` node count first;
|
|
59
|
-
soft status-file probe over repeated probing; guards ordered cheapest-discriminating-first;
|
|
60
|
-
`iterationBound` from a latency budget; states named for outcomes; `failureStates` declared.
|
|
61
|
-
- **Refactor in a named direction** — promote (prose → workflow), demote (workflow → prose),
|
|
62
|
-
or optimize in place. Back an optimization with a before/after `spur workflow trace` pair,
|
|
63
|
-
never with a feel.
|
|
64
|
-
- Composition-advisory findings (`workflow validate --json` → `composition`) are advisory only;
|
|
65
|
-
never block a run or edit an executing pipeline over them.
|
|
66
|
-
- **Corpus health checks** — run `check`/`validate` across a batch and report findings.
|
|
67
|
-
|
|
68
|
-
For a single operation, use the `spur` CLI directly. For the planning/execution lifecycle, use
|
|
69
|
-
`sp:spur-dev`.
|
|
70
|
-
|
|
71
|
-
## Skill invocation
|
|
72
|
-
|
|
73
|
-
Invoke `sp:spur-cli` for verb guidance and per-noun conventions:
|
|
74
|
-
|
|
75
|
-
| Platform | Invocation |
|
|
76
|
-
| ---------- | ----------- |
|
|
77
|
-
| Claude Code | `Skill(skill="sp:spur-cli", args="<noun> <query>")` |
|
|
78
|
-
| Other platforms | Invoke `sp:spur-cli` directly as a skill |
|
|
26
|
+
You are the Spur corpus steward: a specialist sequencer over `skill: sp:spur-cli`, not a second
|
|
27
|
+
implementation of the CLI or lifecycle spine.
|
|
28
|
+
|
|
29
|
+
## Scope
|
|
30
|
+
|
|
31
|
+
Use for:
|
|
32
|
+
|
|
33
|
+
- Batch task or feature creation, mutation, status, section, refresh, and check campaigns.
|
|
34
|
+
- Cross-corpus traceability or structural audits.
|
|
35
|
+
- Rule catalog authoring, validation, execution, and hardening.
|
|
36
|
+
- Workflow fit decisions, authoring/refactoring, validation, dry-runs, and trace comparison.
|
|
37
|
+
|
|
38
|
+
Do not use for one CLI invocation. Do not use for planning→implementation→verification lifecycle
|
|
39
|
+
or batch task execution; `sp:spur-dev` owns that orchestration. The backend skill covers the other
|
|
40
|
+
CLI nouns for direct use, but they are not this corpus specialist's scope.
|
|
41
|
+
|
|
42
|
+
## Process
|
|
43
|
+
|
|
44
|
+
1. Load `plugins/sp/skills/spur-cli/SKILL.md` and the exact noun reference before invoking a verb.
|
|
45
|
+
2. Resolve and freeze the target set. Report ambiguity instead of guessing identifiers or flags.
|
|
46
|
+
3. Run the noun's read/check/validate path before mutation where available.
|
|
47
|
+
4. Mutate only through `spur`; parse `--json` output when the verb advertises it.
|
|
48
|
+
5. Inspect each result before the next dependent operation; stop on structural or validation failure.
|
|
49
|
+
6. Run the scoped check/validate/refresh path after mutation. After task/feature batch writes, run
|
|
50
|
+
`spur task check --corpus --json` once.
|
|
51
|
+
|
|
52
|
+
Workflow fit, mode selection, simplicity budgets, authoring, and tuning live in the workflow
|
|
53
|
+
references under `plugins/sp/skills/spur-cli/references/workflows/`; load them rather than copying
|
|
54
|
+
their runbook here.
|
|
79
55
|
|
|
80
56
|
## Rules
|
|
81
57
|
|
|
82
58
|
### Always
|
|
83
59
|
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
- [ ] Run the noun's scoped `refresh` after batch operations where one exists (`spur task refresh`, `spur feature refresh --feature <id>` or `--all`).
|
|
89
|
-
- [ ] Run the workflow fit gate before authoring any new workflow, and recommend a descriptive procedure when it does not clear all three parts.
|
|
60
|
+
- Use the source-local CLI when working in the Spur repository.
|
|
61
|
+
- Use `spur task update --section --from-file` for task section writes.
|
|
62
|
+
- Keep check-before/write/check-after evidence and the final scoped refresh result.
|
|
63
|
+
- Preserve declaration order and currently executing runs when changing workflows.
|
|
90
64
|
|
|
91
65
|
### Never
|
|
92
66
|
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
67
|
+
- Edit task or feature corpus files directly.
|
|
68
|
+
- Invent a noun, verb, flag, JSON field, or exit code.
|
|
69
|
+
- Reimplement CLI validation in prose or shell.
|
|
70
|
+
- Never drive the planning/execution lifecycle; do not run application implementation or task
|
|
71
|
+
pipelines through this agent.
|
|
97
72
|
|
|
98
73
|
## Output Format
|
|
99
74
|
|
|
100
|
-
Report using this template:
|
|
101
|
-
|
|
102
75
|
```markdown
|
|
103
76
|
## Spur Corpus Operations Report
|
|
104
77
|
|
|
105
|
-
**Noun(s)
|
|
106
|
-
**
|
|
107
|
-
**Confidence
|
|
78
|
+
**Noun(s):** task | feature | rule | workflow
|
|
79
|
+
**Scope:** <resolved ids/files>
|
|
80
|
+
**Confidence:** HIGH | MEDIUM | LOW
|
|
108
81
|
|
|
109
82
|
### Changes
|
|
110
|
-
|
|
|
111
|
-
|
|
112
|
-
| 0042 | update wip |
|
|
113
|
-
|
|
114
|
-
###
|
|
115
|
-
- check
|
|
116
|
-
-
|
|
117
|
-
|
|
118
|
-
### Next Steps
|
|
119
|
-
1. [Actionable step]
|
|
83
|
+
| Target | Operation | Result |
|
|
84
|
+
| --- | --- | --- |
|
|
85
|
+
| 0042 | update wip | pass |
|
|
86
|
+
|
|
87
|
+
### Gates
|
|
88
|
+
- pre-check: <result>
|
|
89
|
+
- post-check/validate: <result>
|
|
90
|
+
- refresh/corpus sweep: <result or n/a>
|
|
120
91
|
```
|
|
121
92
|
|
|
122
93
|
## Platform Notes
|
|
123
94
|
|
|
124
|
-
-
|
|
125
|
-
-
|
|
95
|
+
- Claude Code: use `Skill(skill="sp:spur-cli", args="<noun> <query>")`, then Bash for `spur`.
|
|
96
|
+
- Other platforms: invoke `sp:spur-cli` directly; the agent wrapper is optional.
|
|
126
97
|
|
|
127
98
|
## Dispatch surface
|
|
128
99
|
|
|
129
|
-
|
|
100
|
+
If corpus work must be dispatched again, follow
|
|
101
|
+
[dispatch-surface.md](../skills/parallel-execution/references/dispatch-surface.md): native subagent
|
|
102
|
+
by default, `spur agent run` only on a named trigger.
|
package/plugins/sp/plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.67",
|
|
4
4
|
"description": "Spur — a local-first harness engineering toolkit that wraps mainstream coding agents with constraint checking, workflow orchestration, and history analytics.",
|
|
5
5
|
"extensions": {
|
|
6
6
|
"pi": ["./hooks/pi/guard-extension.ts"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: spur-cli
|
|
3
|
-
description: "
|
|
3
|
+
description: "Reference and operate the complete `spur` CLI surface: task, feature, rule, workflow, builder, agent, message, team, self, history, and projects. Use for verb or flag lookup, machine-readable output and exit contracts, or CLI-gated corpus writes. Triggers: \"spur task\", \"spur history\", \"spur projects\", \"create a task\", \"task check\", and any Spur CLI convention. Not for planning or execution lifecycle orchestration (`sp:spur-dev`)."
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
metadata:
|
|
6
6
|
author: spur
|
|
@@ -19,15 +19,17 @@ metadata:
|
|
|
19
19
|
- message
|
|
20
20
|
- team
|
|
21
21
|
- self
|
|
22
|
+
- history
|
|
23
|
+
- projects
|
|
22
24
|
openclaw:
|
|
23
25
|
emoji: "🧰"
|
|
24
26
|
---
|
|
25
27
|
|
|
26
28
|
# spur-cli — the CLI facade for the Spur command surface
|
|
27
29
|
|
|
28
|
-
`spur-cli` is the single reference for operating the **`spur` command-line surface**. Each
|
|
29
|
-
noun
|
|
30
|
-
|
|
30
|
+
`spur-cli` is the single reference for operating the **`spur` command-line surface**. Each visible
|
|
31
|
+
noun has one reference file that documents *what each verb is, how to use it well, its flags,
|
|
32
|
+
machine-readable output, and material exit semantics*. This skill is a **facade /
|
|
31
33
|
dispatch reference** — it tells you which verb does what and routes you to the noun's detail. It is
|
|
32
34
|
**not** an orchestrator and contains **no competency logic**: the skill knows *how to invoke*; the
|
|
33
35
|
CLI knows *what is valid*; the **spine** (`sp:spur-dev`) knows *how to drive the lifecycle*.
|
|
@@ -47,18 +49,20 @@ Pick the noun, read its reference. Each Tier A and Tier B reference owns that no
|
|
|
47
49
|
| **Tier B** | **message** | Durable inter-agent messaging: send, inbox, reply, watch | [references/message.md](references/message.md) |
|
|
48
50
|
| **Tier B** | **team** | Team coordination and supervision: assign, status, up/down rosters, start/stop supervised processes | [references/team.md](references/team.md) |
|
|
49
51
|
| **Tier B** | **self** | Self-management verbs: scaffold (`init`), schema migrations (`migrate`), local web server (`serve`), status overview (`status`); `self init` runs post-scaffold validation probes & layout classification | [references/self.md](references/self.md) |
|
|
50
|
-
| **Tier
|
|
52
|
+
| **Tier B** | **history** | Import agent histories, aggregate forensic artifacts, render reports, and run the checkpoint-resumed daily pipeline | [references/history.md](references/history.md) |
|
|
53
|
+
| **Tier B** | **projects** | Manage the local multi-project registry and start/stop project servers | [references/projects.md](references/projects.md) |
|
|
54
|
+
| **Tier C** | **help** | Commander-generated help command; not a Spur noun | Generated `--help` |
|
|
51
55
|
|
|
52
|
-
**Execute-First Contract:** Load
|
|
56
|
+
**Execute-First Contract:** Load the noun reference first and execute Tier A or Tier B commands
|
|
57
|
+
without calling `spur --help`. Use the source-local `spur <noun> [verb] --help` only for version
|
|
58
|
+
skew, unlisted long-tail flags, or a parity assertion failure.
|
|
53
59
|
|
|
54
60
|
### Tier C exclusion reasons
|
|
55
61
|
|
|
56
|
-
|
|
62
|
+
The only exclusion is generated by Commander and is not a product noun:
|
|
57
63
|
|
|
58
64
|
| Noun | Reason |
|
|
59
65
|
| ------ | -------- |
|
|
60
|
-
| `history` | `report` verb is a TODO stub (`spur history report` prints a marker); surface is still converging. |
|
|
61
|
-
| `projects` | Multi-project management surface (`add`/`remove`/`list`/`start`/`stop`); still evolving and not yet stable enough for a reference. |
|
|
62
66
|
| `help` | Auto-generated by Commander.js; not a real noun. |
|
|
63
67
|
|
|
64
68
|
Each noun's per-topic detail lives one level deeper under `references/<noun>/` (e.g.
|
|
@@ -74,6 +78,8 @@ Use this skill to:
|
|
|
74
78
|
or run a workflow, from the command line.
|
|
75
79
|
- **Author within a noun** — write a rule, author a workflow, write acceptance criteria — following
|
|
76
80
|
the noun reference's conventions.
|
|
81
|
+
- **Operate local analytics and project management** — import/analyze/report history or manage the
|
|
82
|
+
multi-project registry through their references.
|
|
77
83
|
|
|
78
84
|
Do **not** use this skill for:
|
|
79
85
|
|
|
@@ -89,6 +95,22 @@ file** (`references/<noun>.md`), plus an optional `references/<noun>/` subdir fo
|
|
|
89
95
|
detail, plus one row in the Noun-routing table above. Do not create a separate `spur-<noun>` skill —
|
|
90
96
|
the whole point of this facade is that the CLI surface has a single, scalable home.
|
|
91
97
|
|
|
98
|
+
## Source and machine-output contract
|
|
99
|
+
|
|
100
|
+
The implementation authority is `apps/cli/src/index.ts` plus the noun registration module under
|
|
101
|
+
`apps/cli/src/commands/`; application-service output types remain authoritative for payload fields.
|
|
102
|
+
When a reference and the source-local CLI disagree, stop, cite the source symbol, and repair the
|
|
103
|
+
reference in the same change. The live parity gate is
|
|
104
|
+
`plugins/sp/tests/cli-surface-parity.test.ts`.
|
|
105
|
+
|
|
106
|
+
Do not assume every verb supports JSON. When `<noun> <verb> --help` advertises `--json`, parse
|
|
107
|
+
stdout as one JSON document (or one document per row for documented streams). When it also
|
|
108
|
+
advertises `--json-envelope`, raw JSON remains the default; the opt-in shape is
|
|
109
|
+
`{ ok: true, data }` / `{ ok: false, error }`, with paginated list metadata where applicable.
|
|
110
|
+
`SPUR_JSON_ENVELOPE=1` enables the same seam unless an explicit flag overrides it. The guarded
|
|
111
|
+
inventory and deliberate raw exceptions live in `docs/04_DESIGN.md` §4.1 and
|
|
112
|
+
`apps/cli/tests/json-envelope-inventory.test.ts`; do not duplicate that inventory here.
|
|
113
|
+
|
|
92
114
|
## What this skill is NOT
|
|
93
115
|
|
|
94
116
|
- **Not the spine.** Driving a task through `task-pipeline.yaml`, HITL surfacing, decomposition, and
|
|
@@ -126,20 +148,23 @@ and spreading it; full contract in `docs/04_DESIGN.md` §1.0.1.
|
|
|
126
148
|
- **[references/self.md](references/self.md)** - `spur self init|migrate|serve|status` CLI verbs
|
|
127
149
|
(the four legacy top-level nouns remain hidden aliases). `self init` runs post-scaffold init
|
|
128
150
|
validation (Phase 1.5/1.6 probes).
|
|
151
|
+
- **[references/history.md](references/history.md)** - history import, forensic artifact analysis,
|
|
152
|
+
pure report rendering, and the daily pipeline.
|
|
153
|
+
- **[references/projects.md](references/projects.md)** - local multi-project registry and server
|
|
154
|
+
lifecycle.
|
|
129
155
|
- **`sp:spur-dev`** - the spine that dispatches these verbs into the planning +
|
|
130
156
|
execution lifecycle. Use it to *drive* work; use this facade to *look up or operate a verb*.
|
|
131
157
|
- **`plugins/sp/references/roles.md`** — the Layer-1 role→tier table (`scribe` / `coder` /
|
|
132
158
|
`reviewer` / `planner`, one per tier). The facade's nouns/verbs serve those roles; the table is
|
|
133
159
|
the role vocabulary, the operator config maps tiers to executors.
|
|
134
|
-
- **`sp:expert-spur`** — the subagent that loads this facade for multi-step, multi-noun corpus work
|
|
135
|
-
in its own context window.
|
|
136
160
|
|
|
137
161
|
## Platform Notes
|
|
138
162
|
|
|
139
163
|
### Claude Code
|
|
140
164
|
|
|
141
|
-
`spur` CLI via the Bash tool
|
|
142
|
-
directly via `Skill(skill="sp:spur-cli", args="<noun> <verb> …")` to look up or operate
|
|
165
|
+
Run the `spur` CLI via the Bash tool. Use `--json` only where the selected verb advertises it. Invoke
|
|
166
|
+
this skill directly via `Skill(skill="sp:spur-cli", args="<noun> <verb> …")` to look up or operate
|
|
167
|
+
a verb.
|
|
143
168
|
|
|
144
169
|
### Codex / OpenClaw / OpenCode / Antigravity
|
|
145
170
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: spur-cli-agent
|
|
3
|
-
description: "spur-cli noun reference: operate `spur agent` as the coding-agent execution surface - run prompts
|
|
3
|
+
description: "spur-cli noun reference: operate `spur agent` as the coding-agent execution surface - run prompts, wait on pinned occupants, manage team agent specs, run the persistent self-draining loop, and check readiness."
|
|
4
4
|
see_also:
|
|
5
5
|
- spur-cli
|
|
6
6
|
---
|
|
@@ -9,7 +9,7 @@ see_also:
|
|
|
9
9
|
|
|
10
10
|
`spur agent` is the CLI for **running and inspecting coding agents**. It wraps the agents the
|
|
11
11
|
operator already has installed (Claude Code, Codex, omp, OpenCode, Antigravity, etc.) behind a
|
|
12
|
-
uniform
|
|
12
|
+
uniform run, wait, loop, and spec-management surface, so the rest of the harness can dispatch work without
|
|
13
13
|
hard-coding a specific agent.
|
|
14
14
|
|
|
15
15
|
This is a **companion reference**, not an orchestrator. It documents *what each verb is and how to
|
|
@@ -30,8 +30,9 @@ that before using `run` for fan-out dispatch.
|
|
|
30
30
|
| `edit <id>` | Open an agent spec in `$EDITOR`, or print its path | - |
|
|
31
31
|
| `delete <id>` | Remove an agent spec | `--force` |
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
`list`, `doctor`, `run`, `wait`, and `create` accept `--json` plus `--json-envelope`. `loop`, `edit`,
|
|
34
|
+
and `delete` are human/process-control surfaces. **Exit codes:** `0` success, `1` failure, and `2`
|
|
35
|
+
invalid usage; `run` can also propagate the invoked agent's non-zero result.
|
|
35
36
|
|
|
36
37
|
## `run` - execute a prompt via a coding agent
|
|
37
38
|
|
|
@@ -56,6 +57,7 @@ through a coding agent as an external process, producing a persisted run record
|
|
|
56
57
|
| `--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
58
|
| `--drain` | Prepend pending inbox messages addressed to `--spec <id>` before the prompt. |
|
|
58
59
|
| `--json` | Output machine-readable JSON where supported. |
|
|
60
|
+
| `--json-envelope` | Wrap JSON using the facade's standard output contract. |
|
|
59
61
|
|
|
60
62
|
`--json` adds a `resolved` block (`{ role?, tier?, executor?, agent, source }`) reporting the
|
|
61
63
|
resolution decision — the role, its tier, and the executor that won for role routing; the pin for
|
|
@@ -125,6 +127,7 @@ exits 2 naming the accepted vocabulary. Resolution collapses onto the same ident
|
|
|
125
127
|
|
|
126
128
|
| Flag | Purpose |
|
|
127
129
|
| ------ | --------- |
|
|
130
|
+
| `--role <name>` | Resolve a Layer-1 role or executor name to exactly one materialized instance; mutually exclusive with `[specId]`. |
|
|
128
131
|
| `--run <runId>` | Pin a specific run id (default: the spec's latest run). |
|
|
129
132
|
| `--until <state>` | Lifecycle state to wait for (repeatable OR): `idle` \| `working` \| `invoke-exit` \| `blocked`. Default `idle`. |
|
|
130
133
|
| `--timeout <ms>` | Caller deadline. Undefined = no deadline (stall budget still applies). |
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spur-cli-history
|
|
3
|
+
description: "spur-cli noun reference: operate `spur history` to import coding-agent transcripts, aggregate versioned forensic artifacts, render an artifact without database access, or run the checkpoint-resumed daily pipeline."
|
|
4
|
+
see_also:
|
|
5
|
+
- spur-cli
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# spur history - local forensic analytics
|
|
9
|
+
|
|
10
|
+
`spur history` is the local history data plane: import transcripts into SQLite, aggregate a
|
|
11
|
+
versioned artifact, render that artifact, or run the daily composition. Command registration and
|
|
12
|
+
CLI guards live in `apps/cli/src/commands/history.ts` (`registerHistoryCommand`); payload contracts
|
|
13
|
+
live in `packages/app/src/services/history-service.ts` (`FanOutResult`, `DailyResult`,
|
|
14
|
+
`HistoryService`, `runHistoryReport`) and `packages/domain/src/analytics/artifact.ts`
|
|
15
|
+
(`HistoryArtifact`).
|
|
16
|
+
|
|
17
|
+
## Verb map
|
|
18
|
+
|
|
19
|
+
| Verb | Purpose | Key flags |
|
|
20
|
+
| ---- | ------- | --------- |
|
|
21
|
+
| `import` | Import one source or fan out across all supported sources | `--source <source>` `--file <path>` `--root <path>` `--mode <mode>` `--dry-run` `--source-timeout <ms>` `--json` |
|
|
22
|
+
| `analyze` | Aggregate imported rows and write a versioned forensic artifact | `--since <iso>` `--until <iso>` `--source <source>` `--session <id>` `--run <runId>` `--task <wbs>` `--top <n>` `--out <path>` `--json` |
|
|
23
|
+
| `report [path]` | Purely render an existing artifact; default to `latest.json` | `--mode <name>` `--task <wbs>` `--top <n>` `--json` |
|
|
24
|
+
| `daily` | Run import-all → analyze → artifact → 90-day report pruning once | `--since <iso>` `--until <iso>` `--root <path>` `--source-timeout <ms>` `--mode <name>` `--json` |
|
|
25
|
+
|
|
26
|
+
Every JSON-capable verb also advertises `--json-envelope`; use the facade's machine-output contract.
|
|
27
|
+
|
|
28
|
+
## `import` - isolated fan-out
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
bun run apps/cli/src/index.ts history import --source all --dry-run --json
|
|
32
|
+
bun run apps/cli/src/index.ts history import --source codex --mode incremental --json
|
|
33
|
+
bun run apps/cli/src/index.ts history import --source codex --file session.jsonl --mode force-file --json
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
- `--source all` and a single source use the same per-source fan-out path. A failed/timed-out source
|
|
37
|
+
does not abort its siblings.
|
|
38
|
+
- Modes are `incremental`, `full`, and `force-file`. `--file` with the default `all` source is a
|
|
39
|
+
usage error. `--file --mode full` requires `--dry-run`; use `force-file` for a real single-file
|
|
40
|
+
write.
|
|
41
|
+
- JSON contains `entries`, `warnings`, `exitCode`, and CLI/importer `provenance`. For real-data
|
|
42
|
+
validation, invoke the source-local CLI and record that provenance; never trust a bare global
|
|
43
|
+
`spur` that may be stale.
|
|
44
|
+
- Exit `0` when every source is clean/empty, `2` for a mixed failure or any degraded source, and `1`
|
|
45
|
+
when all sources fail. CLI usage guards also exit `1` on this noun.
|
|
46
|
+
|
|
47
|
+
## `analyze` - artifact writer
|
|
48
|
+
|
|
49
|
+
`analyze` performs SQL aggregation over imported history and writes a stable, versioned
|
|
50
|
+
`HistoryArtifact`. Selectors combine with AND. `--top` bounds leaderboards, not totals. `--out`
|
|
51
|
+
overrides the dated report path; otherwise the service writes under `.spur/reports/history/` and
|
|
52
|
+
updates `latest.json`. Human mode renders a summary; `--json` emits the artifact.
|
|
53
|
+
|
|
54
|
+
## `report` - pure artifact renderer
|
|
55
|
+
|
|
56
|
+
`report` never opens the database. It reads an explicit artifact or the `latest.json` pointer,
|
|
57
|
+
validates the schema version, optionally narrows the loaded artifact with `--task` / `--top`, and
|
|
58
|
+
renders `default` or `forensics` mode. Unknown modes, invalid `--top`, missing/mismatched task
|
|
59
|
+
dimensions, missing artifacts, and schema mismatches exit `1` instead of silently widening output.
|
|
60
|
+
|
|
61
|
+
## `daily` - run-once composition
|
|
62
|
+
|
|
63
|
+
`daily` runs incremental import-all, analyze, artifact write, and report-directory pruning in one
|
|
64
|
+
process. `--since` / `--until` scope analysis only, not import. Checkpoints make a missed run resume
|
|
65
|
+
without double-counting. The result carries `{ fanOut, artifact, pruned, coverage, reportPath? }`;
|
|
66
|
+
its exit code is the fan-out exit code. `--mode` adds a rendered sidecar after analysis.
|
|
67
|
+
|
|
68
|
+
For the full artifact and data-plane contracts, use `docs/04_DESIGN.md` history sections and
|
|
69
|
+
`docs/design/history-data-processing.md`; do not infer fields from rendered prose.
|
|
@@ -24,8 +24,8 @@ use it well*.
|
|
|
24
24
|
| `reply <msg-id> <body>` | Thread a reply to a message | `--json` |
|
|
25
25
|
| `watch` | Follow an agent inbox - surface new messages as they arrive | `--agent <id>` `--interval <ms>` `--json` |
|
|
26
26
|
|
|
27
|
-
All verbs accept `--json`
|
|
28
|
-
invalid usage.
|
|
27
|
+
All verbs accept `--json` and `--json-envelope`. `watch` applies the envelope per emitted row.
|
|
28
|
+
**Exit codes:** `0` success, `1` error, `2` invalid usage.
|
|
29
29
|
|
|
30
30
|
## `send` - enqueue a message
|
|
31
31
|
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spur-cli-projects
|
|
3
|
+
description: "spur-cli noun reference: operate `spur projects` to register local project roots, inspect live status, start detached project servers, and stop or remove registry entries."
|
|
4
|
+
see_also:
|
|
5
|
+
- spur-cli
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# spur projects - local multi-project registry
|
|
9
|
+
|
|
10
|
+
`spur projects` manages the machine-local registry resolved by
|
|
11
|
+
`packages/config/src/projects.ts` (`getProjectsFilePath`) and implemented by
|
|
12
|
+
`packages/app/src/services/project-registry.ts` (`ProjectRegistry`). Server startup is owned by
|
|
13
|
+
`packages/app/src/services/project-start.ts` (`startRegisteredProject`); CLI registration and JSON
|
|
14
|
+
shapes live in `apps/cli/src/commands/projects.ts`.
|
|
15
|
+
|
|
16
|
+
## Verb map
|
|
17
|
+
|
|
18
|
+
| Verb | Purpose | Key flags |
|
|
19
|
+
| ---- | ------- | --------- |
|
|
20
|
+
| `add <path>` | Upsert an existing path in the registry | `--name <name>` `--json` |
|
|
21
|
+
| `remove <target>` | Remove an entry by display name or path | `--json` |
|
|
22
|
+
| `list` | List entries with live running status | `--json` |
|
|
23
|
+
| `start <target>` | Start or reuse a detached project server | `--port <n>` `--json` |
|
|
24
|
+
| `stop <target>` | Best-effort stop the listener and clear its recorded port | `--json` |
|
|
25
|
+
|
|
26
|
+
Every verb also advertises `--json-envelope`; use the facade's machine-output contract. Success is
|
|
27
|
+
exit `0`; validation, registry, spawn, health, or lookup failure is exit `1`.
|
|
28
|
+
|
|
29
|
+
## Registry behavior
|
|
30
|
+
|
|
31
|
+
- The default file is `~/.config/spur/projects.json`; `SPUR_PROJECTS_FILE` overrides it. Entries are
|
|
32
|
+
`{ name, path, port }`, where `port: 0` means stopped.
|
|
33
|
+
- Paths are normalized (including `~`) and existing paths resolve to real paths. Name lookup is
|
|
34
|
+
case-insensitive. Registry mutations use an advisory lock.
|
|
35
|
+
- `add` requires an existing path, resolves a relative path from the current working directory, and
|
|
36
|
+
defaults the display name to its basename. It upserts; it does not start a server. The current
|
|
37
|
+
source does not enforce a `.spur/` marker or directory type.
|
|
38
|
+
- `list` probes recorded ports and heals stale entries to `port: 0` before reporting `running`.
|
|
39
|
+
|
|
40
|
+
## Server lifecycle
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
spur projects start my-project --json
|
|
44
|
+
spur projects start /path/to/unregistered/project --port 3333 --json
|
|
45
|
+
spur projects stop my-project --json
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`start` resolves by name or path. An existing unregistered path is auto-registered. A live recorded
|
|
49
|
+
port is returned idempotently; otherwise the service allocates a port (3000–3999 unless explicitly
|
|
50
|
+
set), spawns `spur serve --host 127.0.0.1 --no-open` detached in the project root, waits for the port,
|
|
51
|
+
then persists it.
|
|
52
|
+
|
|
53
|
+
`stop` finds processes bound to the recorded port, sends `SIGTERM` best-effort while excluding the
|
|
54
|
+
CLI and its parent, and clears the registry port. It is not a persistent supervisor contract.
|
|
55
|
+
`remove` only removes the registry entry; stop a running project first when process cleanup matters.
|
|
56
|
+
|
|
57
|
+
Raw JSON success payloads are verb-specific (`project`, `projects`, `removed`, `stopped`, or start
|
|
58
|
+
status fields). Under `--json-envelope` they move beneath `data`; failures normalize beneath
|
|
59
|
+
`error`. Read `apps/cli/src/commands/projects.ts` for exact fields.
|
|
@@ -223,6 +223,18 @@ the active tasks folder (or `--folder`).
|
|
|
223
223
|
| `--folder <path>` | Custom tasks folder. |
|
|
224
224
|
| `--json` | Machine-readable report envelope. |
|
|
225
225
|
|
|
226
|
+
## `migrate-anchors`
|
|
227
|
+
|
|
228
|
+
Qualify ambiguous in-repo evidence anchors to repo-relative paths across the task corpus. Run
|
|
229
|
+
`--dry-run` first: unambiguous matches are reported in `qualified`, multiple matches in `ambiguous`
|
|
230
|
+
without rewriting, and schema-incompatible files in `skipped`. The write path uses the planning
|
|
231
|
+
service rather than raw file edits.
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
spur task migrate-anchors --dry-run --json
|
|
235
|
+
spur task migrate-anchors --json
|
|
236
|
+
```
|
|
237
|
+
|
|
226
238
|
## `resolve <file-path>`
|
|
227
239
|
|
|
228
240
|
Map a file path to its **owning task** — returns the WBS + task file. Strategies, in order: direct
|
|
@@ -329,6 +341,19 @@ A free-form prose answer (no tables, or tables missing the required headers) yie
|
|
|
329
341
|
the artifact source and directs the operator to `/sp:dev-verify <wbs>`. Re-run verify with the
|
|
330
342
|
table format above.
|
|
331
343
|
|
|
344
|
+
## `verifyall-aggregate`
|
|
345
|
+
|
|
346
|
+
Read a JSON array of `{wbs,outcome[,reason]}` rows from `--from-file` (default
|
|
347
|
+
`.spur/run/verifyall-batch-input.json`) and derive one deterministic batch verdict. Valid outcomes
|
|
348
|
+
are `PASS`, `PARTIAL`, `FAIL`, `NOT-STARTED`, and `UNKNOWN`; `NOT-STARTED` rows are reported but
|
|
349
|
+
excluded from rollup. Exit `1` when the aggregate verdict is `FAIL` or the input is invalid.
|
|
350
|
+
|
|
351
|
+
## `scaffold-tests <wbs>`
|
|
352
|
+
|
|
353
|
+
Generate BDD stubs from the task's Acceptance Criteria. `--file <path>` overrides the target test
|
|
354
|
+
file; `--folder <path>` overrides task lookup. JSON reports the target plus created, skipped,
|
|
355
|
+
drifted, and warning results.
|
|
356
|
+
|
|
332
357
|
## `refresh-roster <wbs>`
|
|
333
358
|
|
|
334
359
|
Regenerate a parent task's sub-task roster block in `## Plan` — the marker-delimited table that the
|
|
@@ -367,12 +392,15 @@ spur task sections <wbs> <init|add|list> [name] [--folder] [--json]
|
|
|
367
392
|
spur task list [--status <s>] [--phase <p>] [--parent <wbs>] [--feature <id>] [--folder] [--json]
|
|
368
393
|
spur task refresh [--folder] [--json]
|
|
369
394
|
spur task migrate [--dry-run] [--folder] [--json]
|
|
395
|
+
spur task migrate-anchors [--dry-run] [--json]
|
|
370
396
|
spur task refresh-roster <wbs> [--folder] [--json]
|
|
371
397
|
spur task batch-create --file <path> [--folder] [--json]
|
|
372
398
|
spur task record <wbs> [--verdict-file <p>] [--solution-from-diff] [--transition <s>] [--folder] [--json]
|
|
373
399
|
spur task verdict <wbs> [--from-answer <p>] [--folder] [--json]
|
|
400
|
+
spur task verifyall-aggregate [--from-file <path>] [--json]
|
|
374
401
|
spur task check [wbs] [--strict] [--as <status>] [--strict-core] [--folder] [--json]
|
|
375
402
|
spur task resolve <file-path> [--strict] [--folder] [--json]
|
|
376
403
|
spur task path <wbs> [--folder] [--json]
|
|
377
404
|
spur task run-link <wbs> [--source <src>] [--run-id <id>] [--json]
|
|
405
|
+
spur task scaffold-tests <wbs> [--file <path>] [--folder] [--json]
|
|
378
406
|
```
|
|
@@ -26,7 +26,7 @@ use it well*.
|
|
|
26
26
|
| `start <agent-id>` | Start a supervised agent process (requires `spur serve`) | `--server <url>` `--json` |
|
|
27
27
|
| `stop <agent-id>` | Stop a supervised agent process (requires `spur serve`) | `--server <url>` `--json` |
|
|
28
28
|
|
|
29
|
-
All verbs accept `--json`
|
|
29
|
+
All verbs except the text-only `assign` accept `--json` and `--json-envelope`. `--server <url>` (default:
|
|
30
30
|
`http://localhost:3000/api`) targets the supervisor API started by `spur serve`. **Exit codes:** `0`
|
|
31
31
|
success, `1` error, `2` invalid usage.
|
|
32
32
|
|
|
@@ -264,6 +264,12 @@ spur workflow list [--json]
|
|
|
264
264
|
spur workflow trace [run-id] [--workflow <name>] [--status <s>] [--since <iso>] [--last <n>] [--follow] [--poll <ms>] [--output] [--json]
|
|
265
265
|
```
|
|
266
266
|
|
|
267
|
+
### `show` - project a definition
|
|
268
|
+
|
|
269
|
+
`spur workflow show <file>` renders the declared graph as Mermaid. `--format todo` instead emits a
|
|
270
|
+
declared-step checklist; `--json` serializes the selected projection. This verb intentionally does
|
|
271
|
+
not advertise `--json-envelope` because its JSON projection is a kept-raw document surface.
|
|
272
|
+
|
|
267
273
|
| Flag (on `run`) | Effect |
|
|
268
274
|
| --------------- | ------ |
|
|
269
275
|
| `--vars <json>` | Per-run variable overrides (JSON object). Merged over the workflow's `vars`. Values must be strings. User vars win over injected defaults (`spurBin`). |
|