@gobing-ai/spur 0.2.3 → 0.2.5
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 +15 -10
- package/schemas/preset.schema.json +54 -0
- package/schemas/rule-file.schema.json +49 -0
- package/schemas/state-machine-workflow.schema.json +79 -0
- package/schemas/transition-flow-workflow.schema.json +78 -0
- package/spur-cli/config/rules/boundary/dao-boundary.yaml +1 -0
- package/spur-cli/config/rules/migration/rg-dialect.yaml +1 -0
- package/spur-cli/config/rules/quality/coverage-gate.yaml +1 -0
- package/spur-cli/config/rules/quality/tsdoc-exports.yaml +1 -0
- package/spur-cli/config/rules/recommended-post-check.yaml +1 -0
- package/spur-cli/config/rules/recommended-pre-check.yaml +1 -0
- package/spur-cli/config/rules/rg-migration.yaml +1 -0
- package/spur-cli/config/rules/strict/http-boundaries.yaml +1 -0
- package/spur-cli/config/rules/strict/rule-files-structural.yaml +1 -0
- package/spur-cli/config/rules/strict/runtime-boundaries.yaml +1 -0
- package/spur-cli/config/rules/strict-check.yaml +1 -0
- package/spur-cli/config/rules/structure/protected-files.yaml +1 -0
- package/spur-cli/config/rules/structure/test-focus-skip.yaml +1 -0
- package/spur-cli/config/rules/structure/test-location.yaml +1 -0
- package/spur-cli/config/rules/surface/check-cli-surface.yaml +1 -0
- package/spur-cli/config/rules/typescript/bun-tooling.yaml +1 -0
- package/spur-cli/config/rules/typescript/no-biome-suppressions.yaml +1 -0
- package/spur-cli/config/rules/typescript/no-debugger.yaml +1 -0
- package/spur-cli/config/rules/typescript/output-boundaries.yaml +1 -0
- package/spur-cli/config/workflows/basic.yaml +1 -0
- package/spur-cli/config/workflows/feature-dev.yaml +117 -0
- package/spur.js +2281 -169
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gobing-ai/spur",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
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",
|
|
@@ -52,17 +52,22 @@
|
|
|
52
52
|
"@gobing-ai/spur-app": "^0.1.0",
|
|
53
53
|
"@gobing-ai/spur-config": "^0.1.0",
|
|
54
54
|
"@gobing-ai/spur-domain": "^0.1.0",
|
|
55
|
-
"@gobing-ai/ts-ai-runner": "^0.3.
|
|
56
|
-
"@gobing-ai/ts-dual-workflow-engine": "^0.3.
|
|
57
|
-
"@gobing-ai/ts-
|
|
58
|
-
"@gobing-ai/ts-
|
|
59
|
-
"@gobing-ai/ts-
|
|
60
|
-
"@gobing-ai/ts-
|
|
61
|
-
"@gobing-ai/ts-utils": "^0.3.
|
|
55
|
+
"@gobing-ai/ts-ai-runner": "^0.3.11",
|
|
56
|
+
"@gobing-ai/ts-dual-workflow-engine": "^0.3.11",
|
|
57
|
+
"@gobing-ai/ts-infra": "^0.3.11",
|
|
58
|
+
"@gobing-ai/ts-llm-jsonl-importer": "^0.3.11",
|
|
59
|
+
"@gobing-ai/ts-rule-engine": "^0.3.11",
|
|
60
|
+
"@gobing-ai/ts-runtime": "^0.3.11",
|
|
61
|
+
"@gobing-ai/ts-utils": "^0.3.11",
|
|
62
62
|
"@types/bun": "1.3.14",
|
|
63
63
|
"@types/figlet": "^1.7.0",
|
|
64
|
+
"@types/node-notifier": "8.0.5",
|
|
64
65
|
"commander": "^14.0.3",
|
|
65
|
-
"
|
|
66
|
-
"
|
|
66
|
+
"figlet": "^1.11.0",
|
|
67
|
+
"zod": "4.4.3"
|
|
68
|
+
},
|
|
69
|
+
"dependencies": {
|
|
70
|
+
"@clack/prompts": "1.5.1",
|
|
71
|
+
"node-notifier": "10.0.1"
|
|
67
72
|
}
|
|
68
73
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/gobing-ai/spur/schemas/preset.schema.json",
|
|
4
|
+
"title": "@gobing-ai/ts-rule-engine Preset",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["name"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "type": "string" },
|
|
10
|
+
"name": { "type": "string", "minLength": 1 },
|
|
11
|
+
"extends": { "type": "array", "items": { "type": "string" } },
|
|
12
|
+
"disable": { "type": "array", "items": { "type": "string" } },
|
|
13
|
+
"overrides": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"properties": {
|
|
19
|
+
"fix": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"properties": {
|
|
23
|
+
"mode": { "enum": ["none", "suggest", "auto"] }
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"extensions": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"properties": {
|
|
33
|
+
"resolvers": { "type": "array", "items": { "$ref": "#/$defs/relativeExtensionPath" } },
|
|
34
|
+
"evaluators": { "type": "array", "items": { "$ref": "#/$defs/relativeExtensionPath" } },
|
|
35
|
+
"fixers": { "type": "array", "items": { "$ref": "#/$defs/relativeExtensionPath" } },
|
|
36
|
+
"formatters": { "type": "array", "items": { "$ref": "#/$defs/relativeExtensionPath" } }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"$defs": {
|
|
41
|
+
"relativeExtensionPath": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"minLength": 1,
|
|
44
|
+
"description": "Relative module path; absolute paths and '..' traversal are forbidden.",
|
|
45
|
+
"not": {
|
|
46
|
+
"anyOf": [
|
|
47
|
+
{ "pattern": "^[/\\\\]" },
|
|
48
|
+
{ "pattern": "^[A-Za-z]:[/\\\\]" },
|
|
49
|
+
{ "pattern": "(^|[/\\\\])\\.\\.([/\\\\]|$)" }
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/gobing-ai/spur/schemas/rule-file.schema.json",
|
|
4
|
+
"title": "@gobing-ai/ts-rule-engine Rule File",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["rules"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "type": "string" },
|
|
10
|
+
"include": { "type": "array", "items": { "type": "string" } },
|
|
11
|
+
"exclude": { "type": "array", "items": { "type": "string" } },
|
|
12
|
+
"severity": { "enum": ["error", "warning", "info"] },
|
|
13
|
+
"rules": { "type": "array", "items": { "$ref": "#/$defs/rule" } }
|
|
14
|
+
},
|
|
15
|
+
"$defs": {
|
|
16
|
+
"rule": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"required": ["id", "evaluator"],
|
|
20
|
+
"properties": {
|
|
21
|
+
"id": { "type": "string" },
|
|
22
|
+
"description": { "type": "string" },
|
|
23
|
+
"enabled": { "type": "boolean" },
|
|
24
|
+
"severity": { "enum": ["error", "warning", "info"] },
|
|
25
|
+
"include": { "type": "array", "items": { "type": "string" } },
|
|
26
|
+
"exclude": { "type": "array", "items": { "type": "string" } },
|
|
27
|
+
"evaluator": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"additionalProperties": false,
|
|
30
|
+
"required": ["type"],
|
|
31
|
+
"properties": {
|
|
32
|
+
"type": { "type": "string" },
|
|
33
|
+
"config": { "type": "object", "additionalProperties": true }
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"fix": { "$ref": "#/$defs/fix" }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"fix": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"properties": {
|
|
43
|
+
"mode": { "enum": ["none", "suggest", "auto"] },
|
|
44
|
+
"replacement": { "type": "string" },
|
|
45
|
+
"params": { "type": "object", "additionalProperties": true }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/gobing-ai/spur/schemas/state-machine-workflow.schema.json",
|
|
4
|
+
"title": "@gobing-ai/ts-dual-workflow-engine State-machine Workflow",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["name", "initialState", "states", "transitions"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "type": "string" },
|
|
10
|
+
"kind": { "const": "state-machine" },
|
|
11
|
+
"name": { "type": "string", "minLength": 1 },
|
|
12
|
+
"version": { "type": "string" },
|
|
13
|
+
"description": { "type": "string" },
|
|
14
|
+
"initialState": { "type": "string", "minLength": 1 },
|
|
15
|
+
"terminalStates": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
16
|
+
"iterationBound": { "type": "integer", "exclusiveMinimum": 0 },
|
|
17
|
+
"vars": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"propertyNames": { "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" },
|
|
20
|
+
"additionalProperties": { "type": "string" }
|
|
21
|
+
},
|
|
22
|
+
"env": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"properties": {
|
|
26
|
+
"allow": { "type": "array", "items": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" } }
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"states": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"items": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"additionalProperties": false,
|
|
34
|
+
"required": ["id"],
|
|
35
|
+
"properties": {
|
|
36
|
+
"id": { "type": "string", "minLength": 1 },
|
|
37
|
+
"description": { "type": "string" },
|
|
38
|
+
"onEnter": { "type": "array", "items": { "$ref": "#/$defs/action" } },
|
|
39
|
+
"onExit": { "type": "array", "items": { "$ref": "#/$defs/action" } }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"transitions": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": ["from", "to"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"from": { "type": "string", "minLength": 1 },
|
|
51
|
+
"to": { "type": "string", "minLength": 1 },
|
|
52
|
+
"description": { "type": "string" },
|
|
53
|
+
"trigger": { "type": "string" },
|
|
54
|
+
"guard": { "$ref": "#/$defs/guard" }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"$defs": {
|
|
60
|
+
"action": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"required": ["kind"],
|
|
64
|
+
"properties": {
|
|
65
|
+
"kind": { "type": "string", "minLength": 1 },
|
|
66
|
+
"options": { "type": "object", "additionalProperties": true }
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"guard": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": ["kind"],
|
|
73
|
+
"properties": {
|
|
74
|
+
"kind": { "type": "string", "minLength": 1 },
|
|
75
|
+
"options": { "type": "object", "additionalProperties": true }
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/gobing-ai/spur/schemas/transition-flow-workflow.schema.json",
|
|
4
|
+
"title": "@gobing-ai/ts-dual-workflow-engine Transition-flow Workflow",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["kind", "name", "initialNode", "nodes", "edges"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "type": "string" },
|
|
10
|
+
"kind": { "const": "transition-flow" },
|
|
11
|
+
"name": { "type": "string", "minLength": 1 },
|
|
12
|
+
"version": { "type": "string" },
|
|
13
|
+
"description": { "type": "string" },
|
|
14
|
+
"initialNode": { "type": "string", "minLength": 1 },
|
|
15
|
+
"terminalNodes": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
16
|
+
"iterationBound": { "type": "integer", "exclusiveMinimum": 0 },
|
|
17
|
+
"vars": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"propertyNames": { "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" },
|
|
20
|
+
"additionalProperties": { "type": "string" }
|
|
21
|
+
},
|
|
22
|
+
"env": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"properties": {
|
|
26
|
+
"allow": { "type": "array", "items": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" } }
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"nodes": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"items": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"additionalProperties": false,
|
|
34
|
+
"required": ["id"],
|
|
35
|
+
"properties": {
|
|
36
|
+
"id": { "type": "string", "minLength": 1 },
|
|
37
|
+
"description": { "type": "string" },
|
|
38
|
+
"type": { "enum": ["action", "gate", "parallel", "decision"] },
|
|
39
|
+
"action": { "$ref": "#/$defs/action" }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"edges": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": ["from", "to"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"from": { "type": "string", "minLength": 1 },
|
|
51
|
+
"to": { "type": "string", "minLength": 1 },
|
|
52
|
+
"description": { "type": "string" },
|
|
53
|
+
"condition": { "$ref": "#/$defs/guard" }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"$defs": {
|
|
59
|
+
"action": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"required": ["kind"],
|
|
63
|
+
"properties": {
|
|
64
|
+
"kind": { "type": "string", "minLength": 1 },
|
|
65
|
+
"options": { "type": "object", "additionalProperties": true }
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"guard": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"additionalProperties": false,
|
|
71
|
+
"required": ["kind"],
|
|
72
|
+
"properties": {
|
|
73
|
+
"kind": { "type": "string", "minLength": 1 },
|
|
74
|
+
"options": { "type": "object", "additionalProperties": true }
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
$schema: "@gobing-ai/spur/schemas/rule-file.schema.json"
|
|
1
2
|
# DAO / database boundary rules — keep DB access centralized in packages/domain,
|
|
2
3
|
# drizzle confined to schema authoring, and table DDL derived (not hand-written).
|
|
3
4
|
# Enforces ADR-011 (ts-db consumed as a facade; tables are a single source of truth).
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
$schema: "@gobing-ai/spur/schemas/rule-file.schema.json"
|
|
1
2
|
# [STRICT — opt-in] Meta-validation for local .spur/rules YAML. Absorbed from
|
|
2
3
|
# ts-libs/.spur/rules/meta/rule-files-structural.yaml. The engine already
|
|
3
4
|
# validates rule files on load, so this is a redundant pre-commit self-check;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
$schema: "@gobing-ai/spur/schemas/preset.schema.json"
|
|
1
2
|
# Strict-check preset — opt-in hygiene rules absorbed from ts-libs but kept OUT
|
|
2
3
|
# of the default recommended-pre-check gate (they need project-specific tuning
|
|
3
4
|
# or are redundant with engine-level validation). Run explicitly:
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
$schema: "@gobing-ai/spur/schemas/rule-file.schema.json"
|
|
1
2
|
# Protected-file rules — secret detection and git/repo safety. Absorbed from
|
|
2
3
|
# ts-libs/.spur/rules/structure/protected-files.yaml, re-scoped for apps/** +
|
|
3
4
|
# packages/** + scripts/** (release/dev tooling is a prime secret-leak site).
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
$schema: "@gobing-ai/spur/schemas/rule-file.schema.json"
|
|
1
2
|
# Local override of the global structure/test-location.yaml — same relative path,
|
|
2
3
|
# so it shadows the global copy (local wins in the layered merge) and the
|
|
3
4
|
# `require-corresponding-test` rule is defined exactly once. Keeps `no-tests-dir`
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
$schema: "@gobing-ai/spur/schemas/rule-file.schema.json"
|
|
1
2
|
# Bun/tooling rules — Spur standardizes on Bun + bun:test (AGENTS.md "Stack").
|
|
2
3
|
# Absorbed from ts-libs/.spur/rules/typescript/bun-only.yaml, re-scoped for the
|
|
3
4
|
# apps/** + packages/** + scripts/** app-monorepo layout and the server's
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
$schema: "@gobing-ai/spur/schemas/rule-file.schema.json"
|
|
1
2
|
# Output boundary rules — terminal writes go through the output seam
|
|
2
3
|
# (apps/cli/src/output.ts → ts-utils echo/echoError), never raw console/stdout.
|
|
3
4
|
# Absorbed from ts-libs/.spur/rules/typescript/no-raw-output.yaml, re-scoped to
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
$schema: "@gobing-ai/spur/schemas/state-machine-workflow.schema.json"
|
|
1
2
|
# Canonical basic workflow: implement -> check -> fix until the check passes or the
|
|
2
3
|
# iteration bound is exhausted. Authored for the @gobing-ai/ts-dual-workflow-engine
|
|
3
4
|
# state-machine schema (initialState / states[].id / onEnter / top-level transitions).
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
$schema: "@gobing-ai/spur/schemas/state-machine-workflow.schema.json"
|
|
2
|
+
"$schema": "@gobing-ai/ts-dual-workflow-engine/schemas/state-machine-workflow.schema.json"
|
|
3
|
+
kind: state-machine
|
|
4
|
+
name: feature-dev
|
|
5
|
+
description: >
|
|
6
|
+
End-to-end feature-development loop: brainstorm → new-task → refine → implement →
|
|
7
|
+
check (autofix+spur-check) → fix (until clean) → verify. Agent-driven steps use
|
|
8
|
+
agent.run; the check gate uses rule.check for deterministic constraint gating.
|
|
9
|
+
The session latch (Q8) auto-continues agent sessions across steps — no per-step
|
|
10
|
+
`continue` wiring needed.
|
|
11
|
+
iterationBound: 20
|
|
12
|
+
initialState: brainstorm
|
|
13
|
+
terminalStates:
|
|
14
|
+
- done
|
|
15
|
+
- failed
|
|
16
|
+
vars:
|
|
17
|
+
taskId: TASK-ID
|
|
18
|
+
|
|
19
|
+
states:
|
|
20
|
+
- id: brainstorm
|
|
21
|
+
description: Turn vague intent into a structured feature list via /rd3:dev-brainstorm
|
|
22
|
+
onEnter:
|
|
23
|
+
- kind: agent.run
|
|
24
|
+
options:
|
|
25
|
+
input: /rd3:dev-brainstorm
|
|
26
|
+
|
|
27
|
+
- id: new-task
|
|
28
|
+
description: Convert the feature list into a task file via /rd3:dev-new-task
|
|
29
|
+
onEnter:
|
|
30
|
+
- kind: agent.run
|
|
31
|
+
options:
|
|
32
|
+
input: /rd3:dev-new-task
|
|
33
|
+
|
|
34
|
+
- id: refine
|
|
35
|
+
description: Auto-refine the task definition via /rd3:dev-refine
|
|
36
|
+
onEnter:
|
|
37
|
+
- kind: agent.run
|
|
38
|
+
options:
|
|
39
|
+
input: /rd3:dev-refine ${vars.taskId} --focus all --auto
|
|
40
|
+
|
|
41
|
+
- id: implement
|
|
42
|
+
description: Implement + verify the task via /rd3:dev-run
|
|
43
|
+
onEnter:
|
|
44
|
+
- kind: agent.run
|
|
45
|
+
options:
|
|
46
|
+
input: /rd3:dev-run ${vars.taskId} --auto --verify
|
|
47
|
+
|
|
48
|
+
- id: check
|
|
49
|
+
description: >
|
|
50
|
+
Deterministic constraint gate via rule.check (recommended-pre-check preset).
|
|
51
|
+
Catches formatting, type, and structural issues before verification.
|
|
52
|
+
onEnter:
|
|
53
|
+
- kind: rule.check
|
|
54
|
+
options:
|
|
55
|
+
preset: recommended-pre-check
|
|
56
|
+
failOn: warning
|
|
57
|
+
|
|
58
|
+
- id: fix
|
|
59
|
+
description: >
|
|
60
|
+
Fix failures from the check gate. The latched agent session carries context
|
|
61
|
+
from the previous steps so the fixer knows what went wrong.
|
|
62
|
+
onEnter:
|
|
63
|
+
- kind: agent.run
|
|
64
|
+
options:
|
|
65
|
+
input: "Fix the failures from the previous check pass for task ${vars.taskId}; run /rd3:dev-fixall or /rd3:dev-unit as appropriate."
|
|
66
|
+
|
|
67
|
+
- id: verify
|
|
68
|
+
description: Cross-agent verification via /rd3:dev-verify
|
|
69
|
+
onEnter:
|
|
70
|
+
- kind: agent.run
|
|
71
|
+
options:
|
|
72
|
+
input: /rd3:dev-verify ${vars.taskId} --auto --fix all --force --channel codex/auto
|
|
73
|
+
|
|
74
|
+
- id: done
|
|
75
|
+
description: Terminal — feature implemented, checked, and verified successfully.
|
|
76
|
+
|
|
77
|
+
- id: failed
|
|
78
|
+
description: Terminal — check loop exhausted iterationBound without passing.
|
|
79
|
+
|
|
80
|
+
transitions:
|
|
81
|
+
# Linear prefix: brainstorm → new-task → refine → implement → check
|
|
82
|
+
- from: brainstorm
|
|
83
|
+
to: new-task
|
|
84
|
+
description: Feature list captured; create the task file
|
|
85
|
+
|
|
86
|
+
- from: new-task
|
|
87
|
+
to: refine
|
|
88
|
+
description: Task file created; refine it
|
|
89
|
+
|
|
90
|
+
- from: refine
|
|
91
|
+
to: implement
|
|
92
|
+
description: Task refined; implement it
|
|
93
|
+
|
|
94
|
+
- from: implement
|
|
95
|
+
to: check
|
|
96
|
+
description: Implementation done; run the gate
|
|
97
|
+
|
|
98
|
+
# Check gate: action-ok guard FIRST so a passing check short-circuits to verify.
|
|
99
|
+
- from: check
|
|
100
|
+
to: verify
|
|
101
|
+
description: Check passed — advance to cross-agent verification
|
|
102
|
+
guard:
|
|
103
|
+
kind: action-ok
|
|
104
|
+
|
|
105
|
+
- from: check
|
|
106
|
+
to: fix
|
|
107
|
+
description: Check failed — route to a fix attempt
|
|
108
|
+
|
|
109
|
+
# Fix loop: always return to check after a fix attempt
|
|
110
|
+
- from: fix
|
|
111
|
+
to: check
|
|
112
|
+
description: Fix applied; re-run the gate
|
|
113
|
+
|
|
114
|
+
# Verify → done
|
|
115
|
+
- from: verify
|
|
116
|
+
to: done
|
|
117
|
+
description: Verification passed — workflow complete
|