@gobing-ai/spur 0.3.1 → 0.3.3
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/package.json +8 -8
- package/schemas/section-matrix.schema.json +1 -1
- package/spur-cli/config/config.example.yaml +1 -1
- package/spur-cli/config/rules/boundary/sp-runtime-path.yaml +32 -0
- package/spur-cli/config/rules/typescript/no-leaky-module-mocks.yaml +2 -0
- package/spur-cli/config/workflows/docs-pipeline.yaml +130 -0
- package/spur.js +1584 -294
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gobing-ai/spur",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
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",
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@commander-js/extra-typings": "^14.0.0",
|
|
52
|
-
"@gobing-ai/ts-ai-runner": "^0.4.
|
|
53
|
-
"@gobing-ai/ts-dual-workflow-engine": "^0.4.
|
|
54
|
-
"@gobing-ai/ts-infra": "^0.4.
|
|
55
|
-
"@gobing-ai/ts-llm-jsonl-importer": "^0.4.
|
|
56
|
-
"@gobing-ai/ts-rule-engine": "^0.4.
|
|
57
|
-
"@gobing-ai/ts-runtime": "^0.4.
|
|
58
|
-
"@gobing-ai/ts-utils": "^0.4.
|
|
52
|
+
"@gobing-ai/ts-ai-runner": "^0.4.3",
|
|
53
|
+
"@gobing-ai/ts-dual-workflow-engine": "^0.4.3",
|
|
54
|
+
"@gobing-ai/ts-infra": "^0.4.3",
|
|
55
|
+
"@gobing-ai/ts-llm-jsonl-importer": "^0.4.3",
|
|
56
|
+
"@gobing-ai/ts-rule-engine": "^0.4.3",
|
|
57
|
+
"@gobing-ai/ts-runtime": "^0.4.3",
|
|
58
|
+
"@gobing-ai/ts-utils": "^0.4.3",
|
|
59
59
|
"@types/bun": "1.3.14",
|
|
60
60
|
"@types/figlet": "^1.7.0",
|
|
61
61
|
"@types/node-notifier": "8.0.5",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://gobing.ai/spur/schemas/section-matrix.schema.json",
|
|
4
4
|
"title": "Section-Status-Matrix Schema",
|
|
5
|
-
"description": "Validates
|
|
5
|
+
"description": "Validates the shipped section-matrix.yaml — which sections are required/optional/forbidden per task status. Design §3.2. Authored for ts-runtime's loadStructuredConfig validator (supports properties/required/additionalProperties + $defs/$ref/enum; NOT patternProperties/uniqueItems).",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"required": ["variants"],
|
|
8
8
|
"additionalProperties": false,
|
|
@@ -15,7 +15,7 @@ bootstrap:
|
|
|
15
15
|
console: false
|
|
16
16
|
json: false
|
|
17
17
|
file: true
|
|
18
|
-
filePath: .spur/spur.log # relative to project root
|
|
18
|
+
filePath: .spur/logs/spur.log # relative to project root
|
|
19
19
|
telemetry:
|
|
20
20
|
enabled: false # OFF by default for CLI (per-invocation latency)
|
|
21
21
|
serviceName: spur
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
$schema: "@gobing-ai/spur/schemas/rule-file.schema.json"
|
|
2
|
+
# Runtime-path boundary rule (task 0217, R6) — zero `config/(plugins|rules|tasks|templates|workflows)`
|
|
3
|
+
# references in agent-facing instructions and runtime source code. `config/` is the build-time
|
|
4
|
+
# bundled-asset source-of-truth (ADR-015); `.spur/` is the runtime configuration directory that
|
|
5
|
+
# agents and runtime code MUST reference. A `config/...` literal in scope teaches the wrong
|
|
6
|
+
# convention and propagates confusion into every project created via `/sp:spur-init`.
|
|
7
|
+
#
|
|
8
|
+
# Blanket scope (all file types across apps/packages/plugins/sp) chosen deliberately:
|
|
9
|
+
# even build-time JSDoc and test-fixture `config/` literals are caught, forcing rephrase rather
|
|
10
|
+
# than false-positive triage. See task 0217 Design "Standing enforcement (R6)" for rationale.
|
|
11
|
+
#
|
|
12
|
+
# This is a STANDING gate (not transitional like rg-migration.yaml) — it runs on every pre-check.
|
|
13
|
+
include:
|
|
14
|
+
- "apps/**"
|
|
15
|
+
- "packages/**"
|
|
16
|
+
- "plugins/sp/**"
|
|
17
|
+
exclude:
|
|
18
|
+
- "**/node_modules/**"
|
|
19
|
+
- "**/dist/**"
|
|
20
|
+
rules:
|
|
21
|
+
- id: sp-runtime-path
|
|
22
|
+
description: >
|
|
23
|
+
Use `.spur/` paths for runtime configuration references, not `config/`. `config/` is the
|
|
24
|
+
build-time bundled-asset source-of-truth (ADR-015); `.spur/` is the runtime directory.
|
|
25
|
+
Agent-facing instructions (`plugins/sp/`) and runtime code (`apps/`, `packages/`) MUST NOT
|
|
26
|
+
contain literal `config/plugins`, `config/rules`, `config/tasks`, `config/templates`, or
|
|
27
|
+
`config/workflows` path references.
|
|
28
|
+
severity: error
|
|
29
|
+
evaluator:
|
|
30
|
+
type: rg
|
|
31
|
+
config:
|
|
32
|
+
pattern: "config/(plugins|rules|tasks|templates|workflows)"
|
|
@@ -46,7 +46,9 @@ exclude:
|
|
|
46
46
|
- "apps/web/tests/modules/task-kanban/board.test.tsx"
|
|
47
47
|
- "apps/web/tests/modules/task-kanban/components.test.tsx"
|
|
48
48
|
- "apps/web/tests/modules/task-kanban/new-task-panel.test.tsx"
|
|
49
|
+
- "apps/web/tests/modules/features/components.test.tsx"
|
|
49
50
|
- "apps/web/tests/modules/task-kanban/task-detail.test.tsx"
|
|
51
|
+
- "apps/web/tests/modules/task-kanban/index.test.tsx"
|
|
50
52
|
|
|
51
53
|
rules:
|
|
52
54
|
- id: no-leaky-mock-module
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Docs-only task pipeline — one run per documentation/design-doc deliverable.
|
|
2
|
+
#
|
|
3
|
+
# This sibling of task-pipeline.yaml handles tasks whose output is a document, not a
|
|
4
|
+
# code change. It keeps docs deliverables out of the implement/test/verify code gate
|
|
5
|
+
# and routes them through an explicit docs-review HITL gate.
|
|
6
|
+
|
|
7
|
+
"$schema": "@gobing-ai/spur/schemas/state-machine-workflow.schema.json"
|
|
8
|
+
kind: state-machine
|
|
9
|
+
name: docs-pipeline
|
|
10
|
+
description: "Docs-only execution pipeline (draft -> docs-review -> record -> done)"
|
|
11
|
+
iterationBound: 12
|
|
12
|
+
initialState: draft
|
|
13
|
+
terminalStates:
|
|
14
|
+
- done
|
|
15
|
+
- failed
|
|
16
|
+
- cancelled
|
|
17
|
+
vars:
|
|
18
|
+
wbs: "0000"
|
|
19
|
+
profile: "standard"
|
|
20
|
+
spurBin: "spur"
|
|
21
|
+
agent: "omp"
|
|
22
|
+
stepTimeoutMs: "600000"
|
|
23
|
+
__hitlAnswer: ""
|
|
24
|
+
|
|
25
|
+
states:
|
|
26
|
+
- id: draft
|
|
27
|
+
description: >
|
|
28
|
+
Author or update the documentation deliverable for task ${vars.wbs}. This is a
|
|
29
|
+
docs-only path: do not run implementation, unit-test generation, or code review
|
|
30
|
+
steps from task-pipeline.yaml.
|
|
31
|
+
onEnter:
|
|
32
|
+
- kind: agent.run
|
|
33
|
+
options:
|
|
34
|
+
agent: ${vars.agent}
|
|
35
|
+
input: >-
|
|
36
|
+
/sp:dev-run --mode implement ${vars.wbs} --auto.
|
|
37
|
+
Treat this as a docs-only/design-doc deliverable: update the requested
|
|
38
|
+
documentation and do not add product code or tests unless the task
|
|
39
|
+
explicitly requires them.
|
|
40
|
+
timeoutMs: ${vars.stepTimeoutMs}
|
|
41
|
+
- kind: shell
|
|
42
|
+
options:
|
|
43
|
+
command: "${vars.spurBin} task update ${vars.wbs} wip --no-lifecycle"
|
|
44
|
+
|
|
45
|
+
- id: docs-review
|
|
46
|
+
description: >
|
|
47
|
+
Human documentation review gate. Under profile=auto this state is skipped; in
|
|
48
|
+
interactive mode it pauses for explicit approval before recording completion.
|
|
49
|
+
pause: true
|
|
50
|
+
onEnter:
|
|
51
|
+
- kind: hitl.confirm
|
|
52
|
+
options:
|
|
53
|
+
prompt: "Approve docs-only deliverable for task ${vars.wbs}?"
|
|
54
|
+
|
|
55
|
+
- id: record
|
|
56
|
+
description: >
|
|
57
|
+
Record the docs-only outcome into the task file. The task record verb backfills
|
|
58
|
+
Solution from the diff and moves the task to testing; the done gate still runs
|
|
59
|
+
the normal task matrix check before completion.
|
|
60
|
+
onEnter:
|
|
61
|
+
- kind: shell
|
|
62
|
+
options:
|
|
63
|
+
command: "${vars.spurBin} task record ${vars.wbs} --solution-from-diff --transition testing"
|
|
64
|
+
|
|
65
|
+
- id: done
|
|
66
|
+
description: Terminal — docs deliverable reviewed and recorded.
|
|
67
|
+
onEnter:
|
|
68
|
+
- kind: shell
|
|
69
|
+
options:
|
|
70
|
+
command: "${vars.spurBin} task update ${vars.wbs} done --no-lifecycle"
|
|
71
|
+
- kind: note
|
|
72
|
+
options:
|
|
73
|
+
message: "Docs pipeline complete for task ${vars.wbs}."
|
|
74
|
+
|
|
75
|
+
- id: failed
|
|
76
|
+
description: Terminal — docs pipeline failed or was rejected.
|
|
77
|
+
|
|
78
|
+
- id: cancelled
|
|
79
|
+
description: Terminal — docs pipeline cancelled by operator.
|
|
80
|
+
|
|
81
|
+
transitions:
|
|
82
|
+
- from: draft
|
|
83
|
+
to: record
|
|
84
|
+
description: profile=auto — skip the docs-review HITL gate.
|
|
85
|
+
guard:
|
|
86
|
+
kind: shell
|
|
87
|
+
options:
|
|
88
|
+
command: 'test "${vars.profile}" = auto'
|
|
89
|
+
- from: draft
|
|
90
|
+
to: docs-review
|
|
91
|
+
description: Interactive — enter docs-review.
|
|
92
|
+
guard:
|
|
93
|
+
kind: always
|
|
94
|
+
|
|
95
|
+
- from: docs-review
|
|
96
|
+
to: record
|
|
97
|
+
description: Docs approved — record results.
|
|
98
|
+
guard:
|
|
99
|
+
kind: shell
|
|
100
|
+
options:
|
|
101
|
+
command: 'test "${vars.__hitlAnswer}" = yes'
|
|
102
|
+
- from: docs-review
|
|
103
|
+
to: failed
|
|
104
|
+
description: Docs rejected — stop for revision.
|
|
105
|
+
guard:
|
|
106
|
+
kind: shell
|
|
107
|
+
options:
|
|
108
|
+
command: 'test "${vars.__hitlAnswer}" = no'
|
|
109
|
+
- from: docs-review
|
|
110
|
+
to: cancelled
|
|
111
|
+
description: Operator cancelled docs review.
|
|
112
|
+
guard:
|
|
113
|
+
kind: shell
|
|
114
|
+
options:
|
|
115
|
+
command: 'test "${vars.__hitlAnswer}" = cancel'
|
|
116
|
+
|
|
117
|
+
- from: record
|
|
118
|
+
to: done
|
|
119
|
+
description: Task check passed — certify done.
|
|
120
|
+
guard:
|
|
121
|
+
kind: shell
|
|
122
|
+
options:
|
|
123
|
+
command: "${vars.spurBin} task check ${vars.wbs}"
|
|
124
|
+
- from: record
|
|
125
|
+
to: failed
|
|
126
|
+
description: Task check failed — block before done.
|
|
127
|
+
guard:
|
|
128
|
+
kind: shell
|
|
129
|
+
options:
|
|
130
|
+
command: '! ${vars.spurBin} task check ${vars.wbs}'
|