@gobing-ai/spur 0.3.6 → 0.3.8
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/README.md +3 -3
- package/package.json +10 -9
- package/spur-cli/config/config.example.yaml +7 -0
- package/spur-cli/config/rules/boundary/dao-boundary.yaml +6 -0
- package/spur-cli/config/rules/strict/http-boundaries.yaml +20 -1
- package/spur-cli/config/templates/AGENTS.md +132 -21
- package/spur.js +38543 -36890
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# @gobing-ai/spur
|
|
2
2
|
|
|
3
3
|
**The `spur` command** — a local-first harness for mainstream coding agents (Claude Code, Codex,
|
|
4
|
-
Gemini CLI,
|
|
5
|
-
you already have with constraint checking, workflow orchestration, agent health
|
|
6
|
-
conversation-history analytics.
|
|
4
|
+
Gemini CLI, pi, omp, OpenCode, Antigravity, OpenClaw, Hermes, Grok). Spur is **not** a coding agent;
|
|
5
|
+
it wraps the agents you already have with constraint checking, workflow orchestration, agent health
|
|
6
|
+
checks, and conversation-history analytics.
|
|
7
7
|
|
|
8
8
|
## Install
|
|
9
9
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gobing-ai/spur",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
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",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"dev": "bun run src/index.ts",
|
|
43
|
-
"build": "bun
|
|
43
|
+
"build": "bun run ../../scripts/spur-dev.ts build-cli",
|
|
44
44
|
"build:binaries": "bun run ../../scripts/spur-dev.ts build-binaries",
|
|
45
45
|
"build:bundle": "bun build src/index.ts --target=bun --outfile spur.js && bun run ../../scripts/spur-dev.ts bundle-config spur-cli/config",
|
|
46
46
|
"test": "bun test tests --coverage --coverage-dir=../../.coverage --pass-with-no-tests",
|
|
@@ -49,13 +49,14 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@commander-js/extra-typings": "^14.0.0",
|
|
52
|
-
"@gobing-ai/ts-
|
|
53
|
-
"@gobing-ai/ts-
|
|
54
|
-
"@gobing-ai/ts-
|
|
55
|
-
"@gobing-ai/ts-
|
|
56
|
-
"@gobing-ai/ts-
|
|
57
|
-
"@gobing-ai/ts-
|
|
58
|
-
"@gobing-ai/ts-
|
|
52
|
+
"@gobing-ai/ts-db": "^0.4.8",
|
|
53
|
+
"@gobing-ai/ts-ai-runner": "^0.4.8",
|
|
54
|
+
"@gobing-ai/ts-dual-workflow-engine": "^0.4.8",
|
|
55
|
+
"@gobing-ai/ts-infra": "^0.4.8",
|
|
56
|
+
"@gobing-ai/ts-llm-jsonl-importer": "^0.4.8",
|
|
57
|
+
"@gobing-ai/ts-rule-engine": "^0.4.8",
|
|
58
|
+
"@gobing-ai/ts-runtime": "^0.4.8",
|
|
59
|
+
"@gobing-ai/ts-utils": "^0.4.8",
|
|
59
60
|
"@types/bun": "1.3.14",
|
|
60
61
|
"@types/figlet": "^1.7.0",
|
|
61
62
|
"@types/node-notifier": "8.0.5",
|
|
@@ -39,6 +39,9 @@ agent:
|
|
|
39
39
|
# `default` is the executor selector for `--agent auto` (resolved as an executor
|
|
40
40
|
# name first, then a legacy agent name). Keep it simple, or define richer profiles:
|
|
41
41
|
default: omp
|
|
42
|
+
# Canonical coding-agent ids (ts-ai-runner DISPLAY_ORDER, 0.4.8+):
|
|
43
|
+
# claude, codex, gemini, pi, omp, opencode, antigravity-cli, openclaw, hermes, grok
|
|
44
|
+
# Grok auth: non-empty XAI_API_KEY and/or ~/.grok/auth.json (no CLI auth-status verb).
|
|
42
45
|
# Named executor profiles: pair a canonical agent with an optional opaque model
|
|
43
46
|
# override. Referenced by name from `default` and `default-by-phase`.
|
|
44
47
|
# executors:
|
|
@@ -49,12 +52,16 @@ agent:
|
|
|
49
52
|
# model: zai//glm-5.2
|
|
50
53
|
# - name: claude
|
|
51
54
|
# agent: claude
|
|
55
|
+
# - name: grok
|
|
56
|
+
# agent: grok
|
|
57
|
+
# # model: grok-… # optional; passed as grok -m <model>
|
|
52
58
|
# Per-phase auto routing — a MAP of dev phase → executor selector. A configured
|
|
53
59
|
# phase mapping is authoritative: a broken mapping fails fast (unknown executor →
|
|
54
60
|
# exit 2; unusable agent → exit 1) and does NOT fall back to `default`.
|
|
55
61
|
# default-by-phase:
|
|
56
62
|
# dev-run: omp-zai
|
|
57
63
|
# dev-review: claude
|
|
64
|
+
# # dev-run: grok
|
|
58
65
|
|
|
59
66
|
rules:
|
|
60
67
|
paths:
|
|
@@ -26,6 +26,12 @@ rules:
|
|
|
26
26
|
exclude:
|
|
27
27
|
- "**/node_modules/**"
|
|
28
28
|
- "**/tests/**"
|
|
29
|
+
# apps/cli/src/index.ts carries a side-effect import of ts-db as a
|
|
30
|
+
# bundler hint for Bun --compile. The import does not use ts-db APIs;
|
|
31
|
+
# it ensures the dynamic import('@gobing-ai/ts-db') calls from within
|
|
32
|
+
# ts-runtime resolve at runtime from the compiled binary's bunfs.
|
|
33
|
+
# Spur-domain still owns all functional ts-db usage.
|
|
34
|
+
- "apps/cli/src/index.ts"
|
|
29
35
|
|
|
30
36
|
- id: drizzle-only-in-domain-schema
|
|
31
37
|
description: >
|
|
@@ -28,12 +28,31 @@ rules:
|
|
|
28
28
|
|
|
29
29
|
- id: no-globalthis-fetch
|
|
30
30
|
description: "Avoid globalThis.fetch(...); route HTTP through a client seam when one exists."
|
|
31
|
-
severity:
|
|
31
|
+
severity: error
|
|
32
32
|
evaluator:
|
|
33
33
|
type: rg
|
|
34
34
|
config:
|
|
35
35
|
pattern: "globalThis\\.fetch\\("
|
|
36
|
+
include:
|
|
37
|
+
- "apps/**/src/**/*.ts"
|
|
38
|
+
- "packages/**/src/**/*.ts"
|
|
39
|
+
- "apps/**/tests/**/*.ts"
|
|
40
|
+
- "apps/**/tests/**/*.tsx"
|
|
41
|
+
- "packages/**/tests/**/*.ts"
|
|
42
|
+
- "packages/**/tests/**/*.tsx"
|
|
36
43
|
|
|
44
|
+
- id: no-globalthis-fetch-mutation
|
|
45
|
+
description: "Avoid mutating globalThis.fetch in tests; use the injectable fetch seam (rpc-client.ts setFetchForTesting / resetFetchForTesting)."
|
|
46
|
+
severity: error
|
|
47
|
+
evaluator:
|
|
48
|
+
type: rg
|
|
49
|
+
config:
|
|
50
|
+
pattern: "globalThis\\.fetch\\s*="
|
|
51
|
+
include:
|
|
52
|
+
- "apps/**/tests/**/*.ts"
|
|
53
|
+
- "apps/**/tests/**/*.tsx"
|
|
54
|
+
- "packages/**/tests/**/*.ts"
|
|
55
|
+
- "packages/**/tests/**/*.tsx"
|
|
37
56
|
- id: no-xml-http-request
|
|
38
57
|
description: "Do not use XMLHttpRequest in a Bun/Node codebase."
|
|
39
58
|
severity: error
|
|
@@ -1,40 +1,151 @@
|
|
|
1
1
|
# AGENTS.md
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Entry point for AI coding agents in this repository. Symlink `CLAUDE.md` / `GEMINI.md` (and
|
|
4
|
+
equivalents) here when the platform expects those names.
|
|
5
|
+
|
|
6
|
+
**Read this first every session.** Lean: harness routing + project facts + where depth lives.
|
|
7
|
+
Does **not** restate skill runbooks or the full `spur` verb catalog.
|
|
8
|
+
|
|
9
|
+
---
|
|
4
10
|
|
|
5
11
|
## Project
|
|
6
12
|
|
|
7
|
-
<!--
|
|
8
|
-
**{project-name}** —
|
|
13
|
+
<!-- PROJECT-SPECIFIC: filled by `spur init` (`{project-name}` / `{project-description}`). -->
|
|
14
|
+
**{project-name}** — {project-description}.
|
|
15
|
+
|
|
16
|
+
This project uses **Spur** as its harness: the `spur` CLI for deterministic corpus/ops, and Spur’s
|
|
17
|
+
agent surface (`/sp:dev-*` commands + `sp:*` subagents/skills) for planning, execution, review, and
|
|
18
|
+
docs hygiene. Prefer the harness over ad-hoc process unless the operator overrides for a one-off.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Harness-first contract
|
|
23
|
+
|
|
24
|
+
All product development work goes through the harness by default.
|
|
25
|
+
|
|
26
|
+
### Harness tool routing
|
|
27
|
+
|
|
28
|
+
| Need | Route to | Avoid |
|
|
29
|
+
|------|----------|--------|
|
|
30
|
+
| Plan a feature (intake → AC → tasks) | `/sp:dev-plan`, `/sp:dev-idea` | Freeform feature files without gates |
|
|
31
|
+
| Drive one task end-to-end | `/sp:dev-run <wbs>` or **`sp:super-coder`** | Implement with no task / no pipeline |
|
|
32
|
+
| Batch or parallel task runs | `/sp:dev-runall`, `/sp:dev-parallel` → **`sp:super-coder`** | Unordered multi-task thrash |
|
|
33
|
+
| Multi-step corpus CLI (tasks/features/rules/workflows) | **`sp:expert-spur`** | Raw Write/Edit on corpus files |
|
|
34
|
+
| Look up `spur` verbs / flags / `--json` | Skill **`sp:spur-cli`** | Inventing flags from memory |
|
|
35
|
+
| Create/edit/list tasks or features | **`spur task` / `spur feature`** (`--section --from-file`) | Direct-writing task/feature corpus files |
|
|
36
|
+
| Verify requirements / AC | `/sp:dev-verify` | Self-reported “done” |
|
|
37
|
+
| Review (SECUA + traceability + architecture) | `/sp:dev-review` or **`sp:super-reviewer`** | Unstructured “LGTM” |
|
|
38
|
+
| Tests / coverage | `/sp:dev-unit` | Untested production paths as done |
|
|
39
|
+
| Constraint gate / rule authoring | **`spur rule`**; `/sp:rule-scan`, `/sp:rule-add`, `/sp:rule-refine` | Skipping `spur rule run` |
|
|
40
|
+
| Workflow author / run | **`spur workflow`**; `/sp:workflow-add`, `/sp:workflow-refine` | Ad-hoc shell as the lifecycle |
|
|
41
|
+
| Docs drift / sync / lessons | Skill **`sp:doc-evolve`** + `docs/99_PROJECT_CONSTITUTION.md` | Patching derived docs over authority |
|
|
42
|
+
| Wrap completed work | `/sp:dev-wrap`, `/sp:dev-wrapall` | Skipping learnings / doc sync |
|
|
43
|
+
| Session index / memory | Skill **`sp:indexed-context`** + `.spur/context/` | Full-tree re-reads every turn |
|
|
44
|
+
|
|
45
|
+
**Non-negotiable (unless operator overrides):**
|
|
46
|
+
|
|
47
|
+
1. **CLI-gated corpus writes** — `spur task update` / `spur feature update` (etc.). Never direct-write
|
|
48
|
+
task/feature corpus files.
|
|
49
|
+
2. **Gates before done** — `spur task check` / `spur feature check` / `spur rule run`; pipeline done
|
|
50
|
+
needs a real verify **PASS**.
|
|
51
|
+
3. **`--json` for machines** — parse CLI with `--json`.
|
|
52
|
+
4. **Route, don’t invent** — verbs → `sp:spur-cli`; lifecycle → `/sp:dev-*` / `sp:super-coder`;
|
|
53
|
+
multi-noun corpus → `sp:expert-spur`; review → `sp:super-reviewer`; docs process → `sp:doc-evolve`.
|
|
54
|
+
|
|
55
|
+
**Platform fallback:** Platforms without slash commands and/or subagents still use the harness.
|
|
56
|
+
Equivalent path: skills `sp:spur-dev`, `sp:spur-cli`, `sp:code-verification` (and related) plus the
|
|
57
|
+
`spur` CLI. Do not invent a parallel process because `/sp:dev-*` is unavailable.
|
|
58
|
+
|
|
59
|
+
Invoke CLI: `spur <noun> <verb> … --json` (or the project’s documented dev entry).
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Documentation
|
|
64
|
+
|
|
65
|
+
**Process SSOT:** `docs/99_PROJECT_CONSTITUTION.md`. Operate with **`sp:doc-evolve`**
|
|
66
|
+
(`drift-audit`, `sync-check`, `contract-verify`, `lesson-append`).
|
|
67
|
+
|
|
68
|
+
**Conflict rule:** lower number wins on content (`00` decisions, `01` scope, `99` process). Fix
|
|
69
|
+
authority first, then derived docs, then this file.
|
|
70
|
+
|
|
71
|
+
### Doc map (constitution §4.1)
|
|
9
72
|
|
|
10
|
-
|
|
73
|
+
| Doc | Owns | Authority | When |
|
|
74
|
+
|------|------|-----------|------|
|
|
75
|
+
| `docs/00_ADR.md` | **WHY** | Authoritative (content) | Structural change; dated entry before diverging |
|
|
76
|
+
| `docs/01_PRD.md` | **WHAT** | Authoritative on scope | New feature/command |
|
|
77
|
+
| `docs/02_ROADMAP.md` | **WHEN** | Derived | Phase placement |
|
|
78
|
+
| `docs/03_ARCHITECTURE.md` | **HOW** | Derived (ADR wins) | Cross-module / seam / schema |
|
|
79
|
+
| `docs/04_DESIGN.md` | **SURFACE** (+ `docs/design/`) | Derived | Same commit as surface code (T3) |
|
|
80
|
+
| `docs/05_FEATURES.md` | **STATUS** (+ `docs/features/`) | Derived | Feature status (T4) |
|
|
81
|
+
| `docs/99_PROJECT_CONSTITUTION.md` | **PROCESS** | Authoritative on process | Before editing numbered docs |
|
|
82
|
+
| `AGENTS.md` (this file) | **ENTRY** | Derived | First every session |
|
|
83
|
+
|
|
84
|
+
**Routing:** decision → `00`; scope → `01`; mechanism → `03`; surface → `04`; phase → `02`;
|
|
85
|
+
feature status → `05`. Working layers §4.2; audits §7; satellites §4.5.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Stack & layout
|
|
90
|
+
|
|
91
|
+
<!-- PROJECT-SPECIFIC: monorepo layout, package manager, key frameworks. -->
|
|
92
|
+
_(Fill from package manifests / README — or during `sp:doc-evolve` customize.)_
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Build & verification
|
|
97
|
+
|
|
98
|
+
<!-- PROJECT-SPECIFIC: lint / test / build commands. -->
|
|
99
|
+
```bash
|
|
100
|
+
# Fill with this project's lint, test, and build commands.
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Done gate (minimum):** lint + tests clean; only intentional `git status` changes; no
|
|
104
|
+
`--no-verify` / silent suppressions. Harness task done ⇒ real verify **PASS** when the pipeline ran.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Spur CLI surface
|
|
109
|
+
|
|
110
|
+
**Not the verb catalog.** For `task` / `feature` / `rule` / `workflow` flags, exit codes, and
|
|
111
|
+
`--json` shapes → skill **`sp:spur-cli`**. Lifecycle → `/sp:dev-*` / **`sp:super-coder`**.
|
|
112
|
+
Multi-noun corpus campaigns → **`sp:expert-spur`**.
|
|
11
113
|
|
|
12
|
-
<!-- Fill in the build/test/lint commands for this project. Examples: -->
|
|
13
114
|
```bash
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
# lint
|
|
115
|
+
spur <noun> <verb> … --json
|
|
116
|
+
spur <noun> --help
|
|
17
117
|
```
|
|
18
118
|
|
|
119
|
+
**Long-tail:** Additional `/sp:dev-*` commands (handover, gitmsg, fixall, dogfood, reverse, arch,
|
|
120
|
+
…) are indexed in the project plugin README (`plugins/sp/README.md` when present).
|
|
121
|
+
|
|
122
|
+
**Outside spur-cli:** Nouns not fully documented in `sp:spur-cli` (`agent`, `history`, `message`,
|
|
123
|
+
`team`, `status`, `migrate`, `serve`, `init`, …) — use only `spur <noun> --help` and
|
|
124
|
+
`docs/04_DESIGN.md`. Never guess flags.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
19
128
|
## Conventions & boundaries
|
|
20
129
|
|
|
21
|
-
- Conventional Commits
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
|
|
130
|
+
- Conventional Commits (`feat:`, `fix:`, `docs:`, `chore:`, …); breaking changes in a
|
|
131
|
+
`BREAKING CHANGE:` footer.
|
|
132
|
+
- Never commit secrets or `.env*`.
|
|
133
|
+
- Surgical changes only — no drive-by refactors or speculative abstractions.
|
|
134
|
+
- Surface changes keep `docs/04_DESIGN.md` in the **same commit** (T3); run `sp:doc-evolve`
|
|
135
|
+
sync-check when unsure.
|
|
136
|
+
<!-- PROJECT-SPECIFIC: import aliases, forbidden paths, CI rules. -->
|
|
25
137
|
|
|
26
138
|
---
|
|
27
139
|
|
|
28
140
|
## Indexed context
|
|
29
141
|
|
|
30
|
-
Project context
|
|
31
|
-
Check it before re-reading files you may already have indexed:
|
|
142
|
+
Project context under `.spur/context/` (gitignored), via **`sp:indexed-context`**:
|
|
32
143
|
|
|
33
|
-
1.
|
|
34
|
-
2.
|
|
35
|
-
3.
|
|
36
|
-
4.
|
|
37
|
-
5.
|
|
38
|
-
6.
|
|
144
|
+
1. `anatomy.md` — file one-liners + token estimates
|
|
145
|
+
2. `learnings.md` — conventions / decisions
|
|
146
|
+
3. `pitfalls.md` — do-not-repeat
|
|
147
|
+
4. `buglog.md` — historical bugs
|
|
148
|
+
5. `memory.md` — session log
|
|
149
|
+
6. `token-ledger.jsonl` — auto; never hand-edit
|
|
39
150
|
|
|
40
|
-
If `.spur/context/` is absent,
|
|
151
|
+
If `.spur/context/` is absent, continue; do not block.
|