-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevolution.schema.json
More file actions
214 lines (214 loc) · 7.44 KB
/
evolution.schema.json
File metadata and controls
214 lines (214 loc) · 7.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/fmind/agent-evolutions/evolution.schema.json",
"title": "Evolution state file",
"description": "Per-evolution machine state, written by the new-agent-evolution / run-agent-evolution / apply-agent-evolution skills. One file per evolution directory: .agents/evolutions/<id>-<slug>/evolution.yaml. State is derived from field presence: variants empty = ready; has variants but no winner = running; has winner but no applied = evaluated; has applied = done.",
"type": "object",
"additionalProperties": false,
"required": [
"evolution_id",
"slug",
"created_at",
"updated_at",
"objective",
"budget",
"gates",
"rubric",
"variants"
],
"properties": {
"evolution_id": { "type": "integer", "minimum": 1 },
"slug": {
"type": "string",
"pattern": "^[a-z0-9_]+$",
"maxLength": 40
},
"created_at": { "type": "string", "format": "date-time" },
"updated_at": { "type": "string", "format": "date-time" },
"objective": {
"type": "string",
"minLength": 1,
"description": "One sentence — the single thing the rubric ranks against."
},
"scope": { "$ref": "#/$defs/scope" },
"budget": { "$ref": "#/$defs/budget" },
"gates": {
"type": "array",
"items": { "$ref": "#/$defs/gate" },
"description": "Hard pass/fail. A variant failing any gate is excluded from ranking."
},
"rubric": {
"type": "array",
"items": { "$ref": "#/$defs/rubric_axis" },
"minItems": 1,
"description": "Numeric ranking dimensions. Composite score is the rank-normalized weighted mean across axes, recomputed on read by the run skill — never persisted in the yaml."
},
"variants": {
"type": "array",
"items": { "$ref": "#/$defs/variant" }
},
"winner": { "$ref": "#/$defs/winner" },
"applied": { "$ref": "#/$defs/applied" }
},
"$defs": {
"scope": {
"type": "object",
"additionalProperties": false,
"required": ["kind"],
"properties": {
"kind": {
"enum": ["worktree", "files"],
"description": "How each variant's workspace is materialized. `worktree` adds a git worktree at HEAD; `files` copies the listed include paths into a fresh directory."
},
"include": {
"type": "array",
"items": { "type": "string", "minLength": 1 }
},
"exclude": {
"type": "array",
"items": { "type": "string", "minLength": 1 }
}
}
},
"budget": {
"type": "object",
"additionalProperties": false,
"required": ["max_variants", "parallel"],
"properties": {
"max_variants": { "type": "integer", "minimum": 1 },
"parallel": {
"type": "integer",
"minimum": 1,
"description": "Concurrent variants per generation. The loop runs `parallel` variants, waits, learns, generates the next batch."
},
"max_minutes": { "type": "integer", "minimum": 1 },
"plateau_generations": {
"type": "integer",
"minimum": 1,
"description": "Stop early when the top score has not improved for this many consecutive generations."
}
}
},
"gate": {
"type": "object",
"additionalProperties": false,
"required": ["id", "description", "cmd"],
"properties": {
"id": { "type": "string", "pattern": "^G[1-9][0-9]*$" },
"description": { "type": "string", "minLength": 1 },
"cmd": {
"type": "string",
"minLength": 1,
"description": "Shell command run from the variant workspace root. Exit 0 = pass."
}
}
},
"rubric_axis": {
"type": "object",
"additionalProperties": false,
"required": ["id", "description", "direction", "cmd"],
"properties": {
"id": { "type": "string", "pattern": "^R[1-9][0-9]*$" },
"description": { "type": "string", "minLength": 1 },
"direction": { "enum": ["minimize", "maximize"] },
"weight": {
"type": "number",
"exclusiveMinimum": 0,
"default": 1.0
},
"cmd": {
"type": "string",
"minLength": 1,
"description": "Shell command. Must print one numeric value, or use `extract`."
},
"extract": {
"type": "string",
"description": "Optional. Either a regex with one capture group, or `wall_clock_seconds` (use cmd runtime, ignore stdout)."
}
}
},
"variant": {
"type": "object",
"additionalProperties": false,
"required": ["id", "generation", "hypothesis", "status"],
"properties": {
"id": { "type": "string", "pattern": "^v[1-9][0-9]*$" },
"generation": { "type": "integer", "minimum": 1 },
"parents": {
"type": "array",
"items": { "type": "string", "pattern": "^v[1-9][0-9]*$" },
"description": "Empty for generation 1. For later generations, the variant ids this one mutated or crossed over from."
},
"hypothesis": { "type": "string", "minLength": 1 },
"approach": {
"type": "string",
"description": "Multi-line — concrete enough that a sub-agent can implement it without re-deriving the design."
},
"workspace": {
"type": "string",
"description": "Repo-relative path to the materialized workspace. Set when execution starts."
},
"status": {
"enum": ["pending", "running", "evaluated", "errored", "killed"],
"description": "`evaluated` means gates ran (one or more may have failed — read `gates[].passes`). `errored` is a harness failure. `killed` is a per-variant timeout."
},
"gates": {
"type": "array",
"items": { "$ref": "#/$defs/gate_result" }
},
"rubric": {
"type": "array",
"items": { "$ref": "#/$defs/rubric_score" },
"description": "Empty when any gate failed — failed variants are not measured."
}
}
},
"gate_result": {
"type": "object",
"additionalProperties": false,
"required": ["id", "passes"],
"properties": {
"id": { "type": "string", "pattern": "^G[1-9][0-9]*$" },
"passes": { "type": "boolean" },
"output": {
"type": "string",
"description": "Trimmed verifier output, one line — for audit."
}
}
},
"rubric_score": {
"type": "object",
"additionalProperties": false,
"required": ["id", "value"],
"properties": {
"id": { "type": "string", "pattern": "^R[1-9][0-9]*$" },
"value": { "type": "number" }
}
},
"winner": {
"type": "object",
"additionalProperties": false,
"required": ["variant_id", "rationale"],
"properties": {
"variant_id": { "type": "string", "pattern": "^v[1-9][0-9]*$" },
"rationale": {
"type": "string",
"minLength": 1,
"description": "One paragraph — score, axis-by-axis comparison vs runner-up, caveats."
}
}
},
"applied": {
"type": "object",
"additionalProperties": false,
"required": ["at", "files_changed"],
"properties": {
"at": { "type": "string", "format": "date-time" },
"files_changed": {
"type": "array",
"items": { "type": "string", "minLength": 1 }
}
}
}
}
}