@cluesmith/codev 1.6.2 → 2.0.0-rc.2
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/bin/porch.js +41 -0
- package/dist/agent-farm/cli.d.ts.map +1 -1
- package/dist/agent-farm/cli.js +23 -0
- package/dist/agent-farm/cli.js.map +1 -1
- package/dist/agent-farm/commands/index.d.ts +1 -0
- package/dist/agent-farm/commands/index.d.ts.map +1 -1
- package/dist/agent-farm/commands/index.js +1 -0
- package/dist/agent-farm/commands/index.js.map +1 -1
- package/dist/agent-farm/commands/kickoff.d.ts +19 -0
- package/dist/agent-farm/commands/kickoff.d.ts.map +1 -0
- package/dist/agent-farm/commands/kickoff.js +269 -0
- package/dist/agent-farm/commands/kickoff.js.map +1 -0
- package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn.js +1 -43
- package/dist/agent-farm/commands/spawn.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +29 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/pcheck/cache.d.ts +48 -0
- package/dist/commands/pcheck/cache.d.ts.map +1 -0
- package/dist/commands/pcheck/cache.js +170 -0
- package/dist/commands/pcheck/cache.js.map +1 -0
- package/dist/commands/pcheck/evaluator.d.ts +15 -0
- package/dist/commands/pcheck/evaluator.d.ts.map +1 -0
- package/dist/commands/pcheck/evaluator.js +246 -0
- package/dist/commands/pcheck/evaluator.js.map +1 -0
- package/dist/commands/pcheck/index.d.ts +12 -0
- package/dist/commands/pcheck/index.d.ts.map +1 -0
- package/dist/commands/pcheck/index.js +249 -0
- package/dist/commands/pcheck/index.js.map +1 -0
- package/dist/commands/pcheck/parser.d.ts +39 -0
- package/dist/commands/pcheck/parser.d.ts.map +1 -0
- package/dist/commands/pcheck/parser.js +155 -0
- package/dist/commands/pcheck/parser.js.map +1 -0
- package/dist/commands/pcheck/types.d.ts +82 -0
- package/dist/commands/pcheck/types.d.ts.map +1 -0
- package/dist/commands/pcheck/types.js +5 -0
- package/dist/commands/pcheck/types.js.map +1 -0
- package/dist/commands/porch/checks.d.ts +42 -0
- package/dist/commands/porch/checks.d.ts.map +1 -0
- package/dist/commands/porch/checks.js +195 -0
- package/dist/commands/porch/checks.js.map +1 -0
- package/dist/commands/porch/consultation.d.ts +56 -0
- package/dist/commands/porch/consultation.d.ts.map +1 -0
- package/dist/commands/porch/consultation.js +330 -0
- package/dist/commands/porch/consultation.js.map +1 -0
- package/dist/commands/porch/index.d.ts +60 -0
- package/dist/commands/porch/index.d.ts.map +1 -0
- package/dist/commands/porch/index.js +828 -0
- package/dist/commands/porch/index.js.map +1 -0
- package/dist/commands/porch/notifications.d.ts +99 -0
- package/dist/commands/porch/notifications.d.ts.map +1 -0
- package/dist/commands/porch/notifications.js +223 -0
- package/dist/commands/porch/notifications.js.map +1 -0
- package/dist/commands/porch/plan-parser.d.ts +38 -0
- package/dist/commands/porch/plan-parser.d.ts.map +1 -0
- package/dist/commands/porch/plan-parser.js +166 -0
- package/dist/commands/porch/plan-parser.js.map +1 -0
- package/dist/commands/porch/protocol-loader.d.ts +46 -0
- package/dist/commands/porch/protocol-loader.d.ts.map +1 -0
- package/dist/commands/porch/protocol-loader.js +249 -0
- package/dist/commands/porch/protocol-loader.js.map +1 -0
- package/dist/commands/porch/signal-parser.d.ts +88 -0
- package/dist/commands/porch/signal-parser.d.ts.map +1 -0
- package/dist/commands/porch/signal-parser.js +148 -0
- package/dist/commands/porch/signal-parser.js.map +1 -0
- package/dist/commands/porch/state.d.ts +133 -0
- package/dist/commands/porch/state.d.ts.map +1 -0
- package/dist/commands/porch/state.js +760 -0
- package/dist/commands/porch/state.js.map +1 -0
- package/dist/commands/porch/types.d.ts +232 -0
- package/dist/commands/porch/types.d.ts.map +1 -0
- package/dist/commands/porch/types.js +7 -0
- package/dist/commands/porch/types.js.map +1 -0
- package/package.json +2 -1
- package/skeleton/porch/prompts/defend.md +103 -0
- package/skeleton/porch/prompts/diagnose.md +70 -0
- package/skeleton/porch/prompts/evaluate.md +132 -0
- package/skeleton/porch/prompts/fix.md +59 -0
- package/skeleton/porch/prompts/implement.md +79 -0
- package/skeleton/porch/prompts/plan.md +74 -0
- package/skeleton/porch/prompts/pr.md +84 -0
- package/skeleton/porch/prompts/review.md +179 -0
- package/skeleton/porch/prompts/specify.md +53 -0
- package/skeleton/porch/prompts/test.md +63 -0
- package/skeleton/porch/prompts/understand.md +61 -0
- package/skeleton/porch/prompts/verify.md +58 -0
- package/skeleton/porch/protocols/bugfix.json +85 -0
- package/skeleton/porch/protocols/spider.json +135 -0
- package/skeleton/porch/protocols/tick.json +76 -0
- package/skeleton/protocols/bugfix/protocol.json +127 -0
- package/skeleton/protocols/protocol-schema.json +237 -0
- package/skeleton/protocols/spider/protocol.json +204 -0
- package/skeleton/protocols/tick/protocol.json +151 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./protocol-schema.json",
|
|
3
|
+
"name": "bugfix",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "BUGFIX: Fast bug fixing from GitHub issues",
|
|
6
|
+
|
|
7
|
+
"phases": [
|
|
8
|
+
{
|
|
9
|
+
"id": "diagnose",
|
|
10
|
+
"name": "Diagnose",
|
|
11
|
+
"prompt": "diagnose.md",
|
|
12
|
+
"substates": null,
|
|
13
|
+
"signals": {
|
|
14
|
+
"ROOT_CAUSE_FOUND": "fix",
|
|
15
|
+
"NEEDS_MORE_INFO": "diagnose"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "fix",
|
|
20
|
+
"name": "Fix",
|
|
21
|
+
"prompt": "fix.md",
|
|
22
|
+
"substates": null,
|
|
23
|
+
"signals": {
|
|
24
|
+
"FIX_APPLIED": "test",
|
|
25
|
+
"FIX_FAILED": "diagnose"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "test",
|
|
30
|
+
"name": "Test",
|
|
31
|
+
"prompt": "test.md",
|
|
32
|
+
"substates": null,
|
|
33
|
+
"signals": {
|
|
34
|
+
"TESTS_PASS": "pr",
|
|
35
|
+
"TESTS_FAIL": "fix"
|
|
36
|
+
},
|
|
37
|
+
"backpressure": {
|
|
38
|
+
"tests_pass": {
|
|
39
|
+
"command": "npm test",
|
|
40
|
+
"on_fail": "fix"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "pr",
|
|
46
|
+
"name": "Pull Request",
|
|
47
|
+
"prompt": "pr.md",
|
|
48
|
+
"substates": null,
|
|
49
|
+
"signals": {
|
|
50
|
+
"PR_CREATED": "complete"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "complete",
|
|
55
|
+
"name": "Complete",
|
|
56
|
+
"terminal": true
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
|
|
60
|
+
"gates": [],
|
|
61
|
+
|
|
62
|
+
"transitions": {
|
|
63
|
+
"diagnose": {
|
|
64
|
+
"default": "fix"
|
|
65
|
+
},
|
|
66
|
+
"fix": {
|
|
67
|
+
"default": "test"
|
|
68
|
+
},
|
|
69
|
+
"test": {
|
|
70
|
+
"on_backpressure_pass": "pr",
|
|
71
|
+
"on_backpressure_fail": "fix"
|
|
72
|
+
},
|
|
73
|
+
"pr": {
|
|
74
|
+
"default": "complete"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
"initial_state": "diagnose",
|
|
79
|
+
|
|
80
|
+
"config": {
|
|
81
|
+
"poll_interval": 5,
|
|
82
|
+
"max_iterations": 30,
|
|
83
|
+
"prompts_dir": "prompts"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./protocol-schema.json",
|
|
3
|
+
"name": "spider",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "SPIDER: Specify, Plan, Implement, Defend, Evaluate, Review",
|
|
6
|
+
|
|
7
|
+
"phases": [
|
|
8
|
+
{
|
|
9
|
+
"id": "specify",
|
|
10
|
+
"name": "Specify",
|
|
11
|
+
"prompt": "specify.md",
|
|
12
|
+
"substates": ["draft", "review"],
|
|
13
|
+
"initial_substate": "draft",
|
|
14
|
+
"signals": {
|
|
15
|
+
"SPEC_READY_FOR_REVIEW": "specify:review"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "plan",
|
|
20
|
+
"name": "Plan",
|
|
21
|
+
"prompt": "plan.md",
|
|
22
|
+
"substates": ["draft", "review"],
|
|
23
|
+
"initial_substate": "draft",
|
|
24
|
+
"signals": {
|
|
25
|
+
"PLAN_READY_FOR_REVIEW": "plan:review"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "implement",
|
|
30
|
+
"name": "Implement",
|
|
31
|
+
"prompt": "implement.md",
|
|
32
|
+
"substates": null,
|
|
33
|
+
"signals": {
|
|
34
|
+
"PHASE_IMPLEMENTED": "defend",
|
|
35
|
+
"BUILD_FAILED": "implement"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "defend",
|
|
40
|
+
"name": "Defend",
|
|
41
|
+
"prompt": "defend.md",
|
|
42
|
+
"substates": null,
|
|
43
|
+
"signals": {
|
|
44
|
+
"TESTS_PASSING": "evaluate",
|
|
45
|
+
"TESTS_FAILED": "defend"
|
|
46
|
+
},
|
|
47
|
+
"backpressure": {
|
|
48
|
+
"tests_pass": {
|
|
49
|
+
"command": "npm test",
|
|
50
|
+
"on_fail": "defend"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"id": "evaluate",
|
|
56
|
+
"name": "Evaluate",
|
|
57
|
+
"prompt": "evaluate.md",
|
|
58
|
+
"substates": null,
|
|
59
|
+
"signals": {
|
|
60
|
+
"EVALUATION_COMPLETE": "review",
|
|
61
|
+
"CRITERIA_NOT_MET": "implement",
|
|
62
|
+
"NEXT_PHASE": "implement"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"id": "review",
|
|
67
|
+
"name": "Review",
|
|
68
|
+
"prompt": "review.md",
|
|
69
|
+
"substates": null,
|
|
70
|
+
"signals": {
|
|
71
|
+
"REVIEW_COMPLETE": "complete"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "complete",
|
|
76
|
+
"name": "Complete",
|
|
77
|
+
"terminal": true
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
|
|
81
|
+
"gates": [
|
|
82
|
+
{
|
|
83
|
+
"id": "specify_approval",
|
|
84
|
+
"after_state": "specify:review",
|
|
85
|
+
"next_state": "plan:draft",
|
|
86
|
+
"type": "human",
|
|
87
|
+
"description": "Human approval of specification"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "plan_approval",
|
|
91
|
+
"after_state": "plan:review",
|
|
92
|
+
"next_state": "implement",
|
|
93
|
+
"type": "human",
|
|
94
|
+
"description": "Human approval of implementation plan"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
|
|
98
|
+
"transitions": {
|
|
99
|
+
"specify:draft": {
|
|
100
|
+
"default": "specify:review"
|
|
101
|
+
},
|
|
102
|
+
"specify:review": {
|
|
103
|
+
"on_gate_pass": "plan:draft",
|
|
104
|
+
"wait_for": "specify_approval"
|
|
105
|
+
},
|
|
106
|
+
"plan:draft": {
|
|
107
|
+
"default": "plan:review"
|
|
108
|
+
},
|
|
109
|
+
"plan:review": {
|
|
110
|
+
"on_gate_pass": "implement",
|
|
111
|
+
"wait_for": "plan_approval"
|
|
112
|
+
},
|
|
113
|
+
"implement": {
|
|
114
|
+
"default": "defend"
|
|
115
|
+
},
|
|
116
|
+
"defend": {
|
|
117
|
+
"on_backpressure_pass": "evaluate",
|
|
118
|
+
"on_backpressure_fail": "defend"
|
|
119
|
+
},
|
|
120
|
+
"evaluate": {
|
|
121
|
+
"default": "review"
|
|
122
|
+
},
|
|
123
|
+
"review": {
|
|
124
|
+
"default": "complete"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
"initial_state": "specify:draft",
|
|
129
|
+
|
|
130
|
+
"config": {
|
|
131
|
+
"poll_interval": 30,
|
|
132
|
+
"max_iterations": 100,
|
|
133
|
+
"prompts_dir": "prompts"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./protocol-schema.json",
|
|
3
|
+
"name": "tick",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "TICK: Fast autonomous implementation for amendments",
|
|
6
|
+
|
|
7
|
+
"phases": [
|
|
8
|
+
{
|
|
9
|
+
"id": "understand",
|
|
10
|
+
"name": "Understand",
|
|
11
|
+
"prompt": "understand.md",
|
|
12
|
+
"substates": null,
|
|
13
|
+
"signals": {
|
|
14
|
+
"UNDERSTOOD": "implement"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": "implement",
|
|
19
|
+
"name": "Implement",
|
|
20
|
+
"prompt": "implement.md",
|
|
21
|
+
"substates": null,
|
|
22
|
+
"signals": {
|
|
23
|
+
"IMPLEMENTED": "verify",
|
|
24
|
+
"BUILD_FAILED": "implement"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "verify",
|
|
29
|
+
"name": "Verify",
|
|
30
|
+
"prompt": "verify.md",
|
|
31
|
+
"substates": null,
|
|
32
|
+
"signals": {
|
|
33
|
+
"VERIFIED": "complete",
|
|
34
|
+
"VERIFICATION_FAILED": "implement"
|
|
35
|
+
},
|
|
36
|
+
"backpressure": {
|
|
37
|
+
"tests_pass": {
|
|
38
|
+
"command": "npm test",
|
|
39
|
+
"on_fail": "implement"
|
|
40
|
+
},
|
|
41
|
+
"build_pass": {
|
|
42
|
+
"command": "npm run build",
|
|
43
|
+
"on_fail": "implement"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "complete",
|
|
49
|
+
"name": "Complete",
|
|
50
|
+
"terminal": true
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
|
|
54
|
+
"gates": [],
|
|
55
|
+
|
|
56
|
+
"transitions": {
|
|
57
|
+
"understand": {
|
|
58
|
+
"default": "implement"
|
|
59
|
+
},
|
|
60
|
+
"implement": {
|
|
61
|
+
"default": "verify"
|
|
62
|
+
},
|
|
63
|
+
"verify": {
|
|
64
|
+
"on_backpressure_pass": "complete",
|
|
65
|
+
"on_backpressure_fail": "implement"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
"initial_state": "understand",
|
|
70
|
+
|
|
71
|
+
"config": {
|
|
72
|
+
"poll_interval": 5,
|
|
73
|
+
"max_iterations": 50,
|
|
74
|
+
"prompts_dir": "prompts"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../protocol-schema.json",
|
|
3
|
+
"name": "bugfix",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Lightweight protocol for minor bugfixes using GitHub Issues",
|
|
6
|
+
"phases": [
|
|
7
|
+
{
|
|
8
|
+
"id": "investigate",
|
|
9
|
+
"name": "Investigate",
|
|
10
|
+
"description": "Understand the bug and its root cause",
|
|
11
|
+
"type": "once",
|
|
12
|
+
"steps": [
|
|
13
|
+
"read_issue",
|
|
14
|
+
"reproduce_bug",
|
|
15
|
+
"identify_root_cause",
|
|
16
|
+
"assess_complexity"
|
|
17
|
+
],
|
|
18
|
+
"transition": {
|
|
19
|
+
"on_complete": "fix",
|
|
20
|
+
"on_too_complex": "escalate"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "fix",
|
|
25
|
+
"name": "Fix",
|
|
26
|
+
"description": "Implement the bug fix",
|
|
27
|
+
"type": "once",
|
|
28
|
+
"steps": [
|
|
29
|
+
"implement_fix",
|
|
30
|
+
"add_tests",
|
|
31
|
+
"verify_fix",
|
|
32
|
+
"commit"
|
|
33
|
+
],
|
|
34
|
+
"checks": {
|
|
35
|
+
"build": {
|
|
36
|
+
"command": "npm run build",
|
|
37
|
+
"on_fail": "retry",
|
|
38
|
+
"max_retries": 2
|
|
39
|
+
},
|
|
40
|
+
"tests": {
|
|
41
|
+
"command": "npm test",
|
|
42
|
+
"on_fail": "retry",
|
|
43
|
+
"max_retries": 2
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"transition": {
|
|
47
|
+
"on_complete": "pr"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "pr",
|
|
52
|
+
"name": "Create PR",
|
|
53
|
+
"description": "Create pull request for the fix",
|
|
54
|
+
"type": "once",
|
|
55
|
+
"steps": [
|
|
56
|
+
"create_pr",
|
|
57
|
+
"link_issue",
|
|
58
|
+
"request_review"
|
|
59
|
+
],
|
|
60
|
+
"consultation": {
|
|
61
|
+
"on": "review",
|
|
62
|
+
"models": ["gemini", "codex"],
|
|
63
|
+
"type": "impl-review",
|
|
64
|
+
"parallel": true,
|
|
65
|
+
"max_rounds": 1
|
|
66
|
+
},
|
|
67
|
+
"transition": {
|
|
68
|
+
"on_complete": "review"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "review",
|
|
73
|
+
"name": "Review",
|
|
74
|
+
"description": "Address review feedback",
|
|
75
|
+
"type": "once",
|
|
76
|
+
"steps": [
|
|
77
|
+
"address_feedback",
|
|
78
|
+
"update_pr"
|
|
79
|
+
],
|
|
80
|
+
"transition": {
|
|
81
|
+
"on_complete": "merge"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "merge",
|
|
86
|
+
"name": "Merge",
|
|
87
|
+
"description": "Merge the fix and close the issue",
|
|
88
|
+
"type": "once",
|
|
89
|
+
"steps": [
|
|
90
|
+
"merge_pr",
|
|
91
|
+
"verify_main",
|
|
92
|
+
"close_issue"
|
|
93
|
+
],
|
|
94
|
+
"gate": {
|
|
95
|
+
"name": "merge-approval",
|
|
96
|
+
"description": "Architect approves merge",
|
|
97
|
+
"requires": ["review_complete", "tests_pass"],
|
|
98
|
+
"next": null
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"signals": {
|
|
103
|
+
"PHASE_COMPLETE": {
|
|
104
|
+
"description": "Signal current phase is complete",
|
|
105
|
+
"transitions_to": "next_phase"
|
|
106
|
+
},
|
|
107
|
+
"TOO_COMPLEX": {
|
|
108
|
+
"description": "Bug is too complex for BUGFIX, escalate to SPIDER",
|
|
109
|
+
"transitions_to": "escalate"
|
|
110
|
+
},
|
|
111
|
+
"BLOCKED": {
|
|
112
|
+
"description": "Signal fix is blocked",
|
|
113
|
+
"requires": "reason"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"defaults": {
|
|
117
|
+
"consultation": {
|
|
118
|
+
"enabled": true,
|
|
119
|
+
"models": ["gemini", "codex"],
|
|
120
|
+
"parallel": true
|
|
121
|
+
},
|
|
122
|
+
"checks": {
|
|
123
|
+
"build": "npm run build",
|
|
124
|
+
"test": "npm test"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://codev.dev/protocol-schema.json",
|
|
4
|
+
"title": "Protocol Definition",
|
|
5
|
+
"description": "Schema for porch protocol definitions",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["name", "version", "description", "phases"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Protocol identifier (e.g., 'spider', 'tick', 'bugfix')"
|
|
12
|
+
},
|
|
13
|
+
"version": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
16
|
+
"description": "Semantic version of the protocol"
|
|
17
|
+
},
|
|
18
|
+
"description": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Human-readable description of the protocol"
|
|
21
|
+
},
|
|
22
|
+
"phases": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"description": "Ordered list of protocol phases",
|
|
25
|
+
"items": {
|
|
26
|
+
"$ref": "#/definitions/phase"
|
|
27
|
+
},
|
|
28
|
+
"minItems": 1
|
|
29
|
+
},
|
|
30
|
+
"signals": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"description": "Signal definitions for state transitions",
|
|
33
|
+
"additionalProperties": {
|
|
34
|
+
"$ref": "#/definitions/signal"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"defaults": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"description": "Default configuration for the protocol",
|
|
40
|
+
"properties": {
|
|
41
|
+
"consultation": {
|
|
42
|
+
"$ref": "#/definitions/consultationDefaults"
|
|
43
|
+
},
|
|
44
|
+
"checks": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"definitions": {
|
|
54
|
+
"phase": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"required": ["id", "name", "type"],
|
|
57
|
+
"properties": {
|
|
58
|
+
"id": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"description": "Unique phase identifier"
|
|
61
|
+
},
|
|
62
|
+
"name": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"description": "Human-readable phase name"
|
|
65
|
+
},
|
|
66
|
+
"description": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"description": "Phase description"
|
|
69
|
+
},
|
|
70
|
+
"type": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"enum": ["once", "per_plan_phase"],
|
|
73
|
+
"description": "Whether phase runs once or per plan phase"
|
|
74
|
+
},
|
|
75
|
+
"steps": {
|
|
76
|
+
"type": "array",
|
|
77
|
+
"items": {
|
|
78
|
+
"type": "string"
|
|
79
|
+
},
|
|
80
|
+
"description": "Ordered list of steps within the phase"
|
|
81
|
+
},
|
|
82
|
+
"checks": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"description": "Build/test checks for this phase",
|
|
85
|
+
"additionalProperties": {
|
|
86
|
+
"$ref": "#/definitions/check"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"consultation": {
|
|
90
|
+
"$ref": "#/definitions/consultation"
|
|
91
|
+
},
|
|
92
|
+
"gate": {
|
|
93
|
+
"$ref": "#/definitions/gate"
|
|
94
|
+
},
|
|
95
|
+
"transition": {
|
|
96
|
+
"$ref": "#/definitions/transition"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"check": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"required": ["command"],
|
|
103
|
+
"properties": {
|
|
104
|
+
"command": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"description": "Command to run"
|
|
107
|
+
},
|
|
108
|
+
"on_fail": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"description": "Action on failure: 'retry' or phase name to return to"
|
|
111
|
+
},
|
|
112
|
+
"max_retries": {
|
|
113
|
+
"type": "integer",
|
|
114
|
+
"minimum": 0,
|
|
115
|
+
"description": "Maximum retry attempts"
|
|
116
|
+
},
|
|
117
|
+
"retry_delay": {
|
|
118
|
+
"type": "integer",
|
|
119
|
+
"minimum": 0,
|
|
120
|
+
"description": "Delay between retries in seconds"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"consultation": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"properties": {
|
|
127
|
+
"on": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"enum": ["review", "complete"],
|
|
130
|
+
"description": "When to trigger consultation"
|
|
131
|
+
},
|
|
132
|
+
"models": {
|
|
133
|
+
"type": "array",
|
|
134
|
+
"items": {
|
|
135
|
+
"type": "string"
|
|
136
|
+
},
|
|
137
|
+
"description": "AI models to consult"
|
|
138
|
+
},
|
|
139
|
+
"type": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"description": "Review type (spec-review, plan-review, impl-review, pr-ready)"
|
|
142
|
+
},
|
|
143
|
+
"parallel": {
|
|
144
|
+
"type": "boolean",
|
|
145
|
+
"description": "Run consultations in parallel"
|
|
146
|
+
},
|
|
147
|
+
"max_rounds": {
|
|
148
|
+
"type": "integer",
|
|
149
|
+
"minimum": 1,
|
|
150
|
+
"description": "Maximum revision rounds"
|
|
151
|
+
},
|
|
152
|
+
"next": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"description": "Phase to proceed to after consultation"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"consultationDefaults": {
|
|
159
|
+
"type": "object",
|
|
160
|
+
"properties": {
|
|
161
|
+
"enabled": {
|
|
162
|
+
"type": "boolean",
|
|
163
|
+
"description": "Whether consultation is enabled by default"
|
|
164
|
+
},
|
|
165
|
+
"models": {
|
|
166
|
+
"type": "array",
|
|
167
|
+
"items": {
|
|
168
|
+
"type": "string"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"parallel": {
|
|
172
|
+
"type": "boolean"
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"gate": {
|
|
177
|
+
"type": "object",
|
|
178
|
+
"required": ["name"],
|
|
179
|
+
"properties": {
|
|
180
|
+
"name": {
|
|
181
|
+
"type": "string",
|
|
182
|
+
"description": "Gate identifier"
|
|
183
|
+
},
|
|
184
|
+
"description": {
|
|
185
|
+
"type": "string",
|
|
186
|
+
"description": "What this gate checks"
|
|
187
|
+
},
|
|
188
|
+
"requires": {
|
|
189
|
+
"type": "array",
|
|
190
|
+
"items": {
|
|
191
|
+
"type": "string"
|
|
192
|
+
},
|
|
193
|
+
"description": "Items that must be complete to pass"
|
|
194
|
+
},
|
|
195
|
+
"next": {
|
|
196
|
+
"type": ["string", "null"],
|
|
197
|
+
"description": "Next phase after gate (null for terminal)"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"transition": {
|
|
202
|
+
"type": "object",
|
|
203
|
+
"properties": {
|
|
204
|
+
"on_complete": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"description": "Phase to transition to on completion"
|
|
207
|
+
},
|
|
208
|
+
"on_fail": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"description": "Phase to return to on failure"
|
|
211
|
+
},
|
|
212
|
+
"on_too_complex": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"description": "Action when task is too complex"
|
|
215
|
+
},
|
|
216
|
+
"on_all_phases_complete": {
|
|
217
|
+
"type": "string",
|
|
218
|
+
"description": "Phase to transition to when all plan phases are done"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"signal": {
|
|
223
|
+
"type": "object",
|
|
224
|
+
"properties": {
|
|
225
|
+
"description": {
|
|
226
|
+
"type": "string"
|
|
227
|
+
},
|
|
228
|
+
"transitions_to": {
|
|
229
|
+
"type": "string"
|
|
230
|
+
},
|
|
231
|
+
"requires": {
|
|
232
|
+
"type": "string"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|