@eir-labs/coltrane 0.7.5 → 0.8.1

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.
Files changed (77) hide show
  1. package/agents/change-verifier.json +40 -0
  2. package/agents/code-implementer.json +42 -0
  3. package/agents/contract-definer.json +31 -0
  4. package/agents/defect-investigator.json +60 -0
  5. package/agents/grounder.json +38 -0
  6. package/agents/pr-publisher.json +48 -0
  7. package/agents/red-spec-drafter.json +46 -0
  8. package/agents/spec-publisher.json +48 -0
  9. package/agents/spec-reviewer.json +32 -0
  10. package/dist/src/bifrost_invoker.js +53 -52
  11. package/dist/src/bifrost_invoker.js.map +1 -1
  12. package/dist/src/change_set_branch.d.ts +131 -0
  13. package/dist/src/change_set_branch.js +179 -0
  14. package/dist/src/change_set_branch.js.map +1 -0
  15. package/dist/src/claude_invoker.d.ts +79 -2
  16. package/dist/src/claude_invoker.js +377 -36
  17. package/dist/src/claude_invoker.js.map +1 -1
  18. package/dist/src/cli.d.ts +1 -1
  19. package/dist/src/cli.js +26 -3
  20. package/dist/src/cli.js.map +1 -1
  21. package/dist/src/composition.d.ts +11 -0
  22. package/dist/src/composition.js +3 -1
  23. package/dist/src/composition.js.map +1 -1
  24. package/dist/src/genome_schema.d.ts +473 -12
  25. package/dist/src/genome_schema.js +269 -5
  26. package/dist/src/genome_schema.js.map +1 -1
  27. package/dist/src/genome_store.d.ts +16 -1
  28. package/dist/src/genome_store.js +68 -0
  29. package/dist/src/genome_store.js.map +1 -1
  30. package/dist/src/gig_tracker.js +4 -0
  31. package/dist/src/gig_tracker.js.map +1 -1
  32. package/dist/src/hosted_tools.js +19 -0
  33. package/dist/src/hosted_tools.js.map +1 -1
  34. package/dist/src/institution_enforcement.d.ts +68 -0
  35. package/dist/src/institution_enforcement.js +417 -0
  36. package/dist/src/institution_enforcement.js.map +1 -0
  37. package/dist/src/institution_loader.d.ts +43 -0
  38. package/dist/src/institution_loader.js +157 -0
  39. package/dist/src/institution_loader.js.map +1 -0
  40. package/dist/src/loader.d.ts +3 -1
  41. package/dist/src/loader.js +12 -1
  42. package/dist/src/loader.js.map +1 -1
  43. package/dist/src/mcp.js +8 -1
  44. package/dist/src/mcp.js.map +1 -1
  45. package/dist/src/runtime.d.ts +66 -0
  46. package/dist/src/runtime.js +202 -2
  47. package/dist/src/runtime.js.map +1 -1
  48. package/dist/src/server.d.ts +7 -0
  49. package/dist/src/server.js +90 -1
  50. package/dist/src/server.js.map +1 -1
  51. package/dist/src/venue_realize.d.ts +90 -0
  52. package/dist/src/venue_realize.js +129 -0
  53. package/dist/src/venue_realize.js.map +1 -0
  54. package/dist/src/version.d.ts +1 -1
  55. package/dist/src/version.js +1 -1
  56. package/dist/src/worker.d.ts +45 -3
  57. package/dist/src/worker.js +67 -2
  58. package/dist/src/worker.js.map +1 -1
  59. package/domain_types/change-request.json +2 -1
  60. package/domain_types/class-sweep.json +34 -0
  61. package/domain_types/defect-class.json +25 -0
  62. package/domain_types/defect-location.json +28 -0
  63. package/domain_types/defect-report.json +28 -0
  64. package/domain_types/fix-spec.json +28 -0
  65. package/domain_types/fix-verification.json +28 -0
  66. package/domain_types/grounding-dossier.json +95 -0
  67. package/domain_types/pull-request.json +43 -0
  68. package/domain_types/red-spec.json +76 -0
  69. package/domain_types/reproduction.json +28 -0
  70. package/domain_types/root-cause.json +28 -0
  71. package/domain_types/subsystem-contract.json +106 -0
  72. package/institutions/coltrane.json +166 -0
  73. package/institutions/quartet.json +183 -26
  74. package/package.json +2 -1
  75. package/standards/defect-investigation-v1.json +156 -0
  76. package/standards/software-change-pr-v1.json +151 -0
  77. package/standards/spec-drafting-v1.json +125 -0
@@ -4,11 +4,83 @@
4
4
  "name": "The Quartet",
5
5
  "kind": "institution",
6
6
  "laws": [
7
- "Authority attaches to the chair, never to the incumbent. A named agent may act only within the capability grants of a chair it has been seated in; removing the agent from the chair removes the authority with it.",
8
- "A capability grant names its objects exhaustively. A grant that names a standard, tool, or type the genome does not contain is a dead name and is refused at authoring time rather than resolved at dispatch.",
9
- "Every chair states its mission and its obligations before an incumbent is seated. An office whose mission is inferred from its occupant's behaviour is not an office.",
10
- "Lineage is cited or it is not claimed. An agent's name may be anchored in a forebear only where the record carries the forebear's identity and the primary or scholarly source the attributed disposition is documented in.",
11
- "The institution exposes nothing to another institution except by contract."
7
+ {
8
+ "attributes": "any agent seated in an institutional chair",
9
+ "deontic": "forbidden",
10
+ "aim": "exercise a capability the seated chair grants do not contain",
11
+ "conditions": "while acting under an institutional seating",
12
+ "or_else": "the action is refused at dispatch, and the authority lapses the moment the agent is unseated",
13
+ "check": {
14
+ "predicate": "(subseteq exercised_caps chair_caps)",
15
+ "inputs": {
16
+ "exercised_caps": "CapGrant[]",
17
+ "chair_caps": "CapGrant[]"
18
+ }
19
+ },
20
+ "content_hash": "sha256:0d27ad56db185576590af99cd368e5826b7bc1589cf23b95bbbb890f8a863253"
21
+ },
22
+ {
23
+ "attributes": "any capability grant",
24
+ "deontic": "obliged",
25
+ "aim": "name only standards, tools, and types the genome contains",
26
+ "conditions": "at authoring time",
27
+ "or_else": "the grant is a dead name and is refused at authoring rather than resolved at dispatch",
28
+ "check": {
29
+ "predicate": "(forall o grant_objects (resolvable o genome))",
30
+ "inputs": {
31
+ "grant_objects": "string[]",
32
+ "genome": "Genome"
33
+ }
34
+ },
35
+ "content_hash": "sha256:faa936f438ae56f08a9f206f0c06603bb4e6c7012f4e2112f3a4557996ec5904"
36
+ },
37
+ {
38
+ "attributes": "every chair",
39
+ "deontic": "obliged",
40
+ "aim": "state its mission and its obligations before an incumbent is seated",
41
+ "conditions": "before any chair assignment for the chair is created",
42
+ "or_else": "the seating is refused; an office whose mission is inferred from its occupant is not an office",
43
+ "check": {
44
+ "predicate": "(and (nonempty chair_mission) (declared_before chair_obligations seat_created))",
45
+ "inputs": {
46
+ "chair_mission": "string",
47
+ "chair_obligations": "NormPair[]",
48
+ "seat_created": "timestamp"
49
+ }
50
+ },
51
+ "content_hash": "sha256:92d78f11e0b46bf31afe7b41c5037d0f238290589f2636b86118ab533249e2cc"
52
+ },
53
+ {
54
+ "attributes": "any agent name anchored in a forebear",
55
+ "deontic": "forbidden",
56
+ "aim": "claim descent from a forebear whose record lacks the forebear identity and a primary or scholarly source for the attributed disposition",
57
+ "conditions": "whenever a lineage attribution edge is authored",
58
+ "or_else": "the attribution is not claimed; an uncited lineage is a recollection, not a record",
59
+ "check": {
60
+ "predicate": "(and (has edge_source_figure) (or (has edge_source_primary_text) (has edge_source_scholarship)))",
61
+ "inputs": {
62
+ "edge_source_figure": "string",
63
+ "edge_source_primary_text": "string",
64
+ "edge_source_scholarship": "string"
65
+ }
66
+ },
67
+ "content_hash": "sha256:ee6c8db46e22e9b50a4862b140912634458438d96a6c1fda503e2b6782101e10"
68
+ },
69
+ {
70
+ "attributes": "the institution",
71
+ "deontic": "forbidden",
72
+ "aim": "expose any capability to another institution except through a witnessed exchange contract",
73
+ "conditions": "at all times",
74
+ "or_else": "the cross-institution access is refused; exposure exists only where an exchange contract carries the cap",
75
+ "check": {
76
+ "predicate": "(forall x cross_institution_access (backed_by_contract x exchange_contracts))",
77
+ "inputs": {
78
+ "cross_institution_access": "Access[]",
79
+ "exchange_contracts": "ExchangeContract[]"
80
+ }
81
+ },
82
+ "content_hash": "sha256:09c3ca9ff6c1da5921e1fc97a42602fc0896b4ac660ba8ae6ed51e4594070b60"
83
+ }
12
84
  ],
13
85
  "sovereign": false
14
86
  },
@@ -92,10 +164,30 @@
92
164
  }
93
165
  ],
94
166
  "obligations": [
95
- "State the boundary of the read in the output; an unstated boundary makes an incomplete read indistinguishable from a complete one.",
96
- "Record the source locator for every retrieved fact.",
97
- "Emit no scope, ranking, or recommendation \u2014 those belong to the direction-setter.",
98
- "Hold only a read-only tool grant, and only for the duration of the seating."
167
+ {
168
+ "attributes": "the field-reader",
169
+ "aim": "state the boundary of the read in the output",
170
+ "deontic": "obliged",
171
+ "tier": "declared"
172
+ },
173
+ {
174
+ "attributes": "the field-reader",
175
+ "aim": "record the source locator for every retrieved fact",
176
+ "deontic": "obliged",
177
+ "tier": "declared"
178
+ },
179
+ {
180
+ "attributes": "the field-reader",
181
+ "aim": "emit any scope, ranking, or recommendation, which belong to the direction-setter",
182
+ "deontic": "forbidden",
183
+ "tier": "declared"
184
+ },
185
+ {
186
+ "attributes": "the field-reader",
187
+ "aim": "hold any tool grant wider than read-only or outlasting the seating",
188
+ "deontic": "forbidden",
189
+ "tier": "declared"
190
+ }
99
191
  ]
100
192
  },
101
193
  {
@@ -123,11 +215,36 @@
123
215
  }
124
216
  ],
125
217
  "obligations": [
126
- "State the criteria before applying them.",
127
- "Record every alternative set aside, with its reason.",
128
- "Do not re-decide the scope at verification time to make a failing result pass.",
129
- "Separate what was checked from what was reasoned about, and return insufficient evidence where the evidence does not reach the question.",
130
- "Do not perform the work this chair directs."
218
+ {
219
+ "attributes": "the direction-setter",
220
+ "aim": "state the criteria before applying them",
221
+ "deontic": "obliged",
222
+ "tier": "declared"
223
+ },
224
+ {
225
+ "attributes": "the direction-setter",
226
+ "aim": "record every alternative set aside, with its reason",
227
+ "deontic": "obliged",
228
+ "tier": "declared"
229
+ },
230
+ {
231
+ "attributes": "the direction-setter",
232
+ "aim": "re-decide the scope at verification time to make a failing result pass",
233
+ "deontic": "forbidden",
234
+ "tier": "declared"
235
+ },
236
+ {
237
+ "attributes": "the direction-setter",
238
+ "aim": "separate what was checked from what was reasoned about, and return insufficient evidence where the evidence does not reach the question",
239
+ "deontic": "obliged",
240
+ "tier": "declared"
241
+ },
242
+ {
243
+ "attributes": "the direction-setter",
244
+ "aim": "perform the work this chair directs",
245
+ "deontic": "forbidden",
246
+ "tier": "declared"
247
+ }
131
248
  ]
132
249
  },
133
250
  {
@@ -135,7 +252,7 @@
135
252
  "institution_slug": "quartet",
136
253
  "role": "structure-builder",
137
254
  "function": "CREATE",
138
- "mission": "Settle the ordered structure a piece of work will be built through \u2014 checks before the changes they check \u2014 and then make the thing that structure implies, from the upstream record alone.",
255
+ "mission": "Settle the ordered structure a piece of work will be built through checks before the changes they check and then make the thing that structure implies, from the upstream record alone.",
139
256
  "required_skills": [],
140
257
  "preferred_skills": [
141
258
  "structure-conformance"
@@ -161,11 +278,36 @@
161
278
  }
162
279
  ],
163
280
  "obligations": [
164
- "Settle the structure before producing the artefact.",
165
- "Order the check before the change it checks.",
166
- "Do not widen the scope the direction-setter fixed.",
167
- "Record every departure from the settled structure, with its reason, rather than revising the structure after the fact.",
168
- "Hold no tool grant: the artefact is emitted as reviewable content and is never applied."
281
+ {
282
+ "attributes": "the structure-builder",
283
+ "aim": "settle the structure before producing the artefact",
284
+ "deontic": "obliged",
285
+ "tier": "declared"
286
+ },
287
+ {
288
+ "attributes": "the structure-builder",
289
+ "aim": "order the check before the change it checks",
290
+ "deontic": "obliged",
291
+ "tier": "declared"
292
+ },
293
+ {
294
+ "attributes": "the structure-builder",
295
+ "aim": "widen the scope the direction-setter fixed",
296
+ "deontic": "forbidden",
297
+ "tier": "declared"
298
+ },
299
+ {
300
+ "attributes": "the structure-builder",
301
+ "aim": "record every departure from the settled structure, with its reason, rather than revising the structure after the fact",
302
+ "deontic": "obliged",
303
+ "tier": "declared"
304
+ },
305
+ {
306
+ "attributes": "the structure-builder",
307
+ "aim": "hold any tool grant or apply the artefact to a working tree; the artefact is emitted as reviewable content",
308
+ "deontic": "forbidden",
309
+ "tier": "declared"
310
+ }
169
311
  ]
170
312
  },
171
313
  {
@@ -194,9 +336,24 @@
194
336
  }
195
337
  ],
196
338
  "obligations": [
197
- "Review the sealed outputs an approval presents before accepting them; an approval that does not cite what it reviewed is void.",
198
- "Refuse rather than delegate the refusal: this office cannot be held by a model agent, and its verdict cannot be produced by one.",
199
- "This chair ships UNASSIGNED. Seating it is the adopting organization's first governance act: the reader seats themselves."
339
+ {
340
+ "attributes": "the responsible-officer",
341
+ "aim": "review the sealed outputs an approval presents before accepting them; an approval that does not cite what it reviewed is void",
342
+ "deontic": "obliged",
343
+ "tier": "declared"
344
+ },
345
+ {
346
+ "attributes": "the responsible-officer",
347
+ "aim": "delegate the refusal, or let the office be held or its verdict produced by a model agent",
348
+ "deontic": "forbidden",
349
+ "tier": "declared"
350
+ },
351
+ {
352
+ "attributes": "the adopting organization",
353
+ "aim": "seat this chair as its first governance act, since it ships unassigned and the reader seats themselves",
354
+ "deontic": "obliged",
355
+ "tier": "declared"
356
+ }
200
357
  ]
201
358
  }
202
359
  ],
@@ -271,7 +428,7 @@
271
428
  "name": "Bill Evans",
272
429
  "domain": "modern jazz (piano)",
273
430
  "kind": "musician",
274
- "what_taken": "Born 16 August 1929 in Plainfield, New Jersey; died 15 September 1980 in New York City. What the structure-builder chair takes is the documented practice of harmonic construction: rootless left-hand voicings built interval by interval, and the layered self-scrutiny of Conversations with Myself (Verve, 1963), on which Evans overdubbed three simultaneous piano parts and answered his own lines. Evans stated the underlying discipline himself in Improvisation in Jazz, his liner note to Miles Davis's Kind of Blue (Columbia, 1959), where he compared the improviser's position to that of the Japanese brush painter working on a surface that permits no erasure \u2014 structure settled before the stroke. Nothing of the man's biography beyond this working disposition is claimed or carried."
431
+ "what_taken": "Born 16 August 1929 in Plainfield, New Jersey; died 15 September 1980 in New York City. What the structure-builder chair takes is the documented practice of harmonic construction: rootless left-hand voicings built interval by interval, and the layered self-scrutiny of Conversations with Myself (Verve, 1963), on which Evans overdubbed three simultaneous piano parts and answered his own lines. Evans stated the underlying discipline himself in Improvisation in Jazz, his liner note to Miles Davis's Kind of Blue (Columbia, 1959), where he compared the improviser's position to that of the Japanese brush painter working on a surface that permits no erasure structure settled before the stroke. Nothing of the man's biography beyond this working disposition is claimed or carried."
275
432
  },
276
433
  {
277
434
  "slug": "davis-miles",
@@ -279,7 +436,7 @@
279
436
  "name": "Miles Davis",
280
437
  "domain": "modern jazz (trumpet, bandleading)",
281
438
  "kind": "musician",
282
- "what_taken": "Born 26 May 1926 in Alton, Illinois; died 28 September 1991 in Santa Monica, California. What the direction-setter chair takes is the documented practice of setting direction by subtraction. Bill Evans's liner note to Kind of Blue (Columbia, 1959) records that Davis conceived the settings only hours before the recording dates and arrived with sketches indicating to the group what was to be played \u2014 the direction fixed, the execution left to the players. The same disposition at longer range produced the serial abandonment of settled idioms across Birth of the Cool (Capitol, sessions 1949-1950), Kind of Blue (1959) and Bitches Brew (Columbia, 1970), documented in Ian Carr, Miles Davis: The Definitive Biography (revised edition, 1998). Nothing of the man's biography beyond this working disposition is claimed or carried."
439
+ "what_taken": "Born 26 May 1926 in Alton, Illinois; died 28 September 1991 in Santa Monica, California. What the direction-setter chair takes is the documented practice of setting direction by subtraction. Bill Evans's liner note to Kind of Blue (Columbia, 1959) records that Davis conceived the settings only hours before the recording dates and arrived with sketches indicating to the group what was to be played the direction fixed, the execution left to the players. The same disposition at longer range produced the serial abandonment of settled idioms across Birth of the Cool (Capitol, sessions 1949-1950), Kind of Blue (1959) and Bitches Brew (Columbia, 1970), documented in Ian Carr, Miles Davis: The Definitive Biography (revised edition, 1998). Nothing of the man's biography beyond this working disposition is claimed or carried."
283
440
  }
284
441
  ],
285
442
  "lineage_edges": [
@@ -334,7 +491,7 @@
334
491
  "Kind of Blue (Columbia CL 1355, 1959)",
335
492
  "Bitches Brew (Columbia GP 26, 1970)"
336
493
  ],
337
- "primary_text": "Bill Evans, 'Improvisation in Jazz', liner note to Kind of Blue (Columbia CL 1355, 1959) \u2014 records that Davis arrived at the sessions with sketches conceived only hours before",
494
+ "primary_text": "Bill Evans, 'Improvisation in Jazz', liner note to Kind of Blue (Columbia CL 1355, 1959) records that Davis arrived at the sessions with sketches conceived only hours before",
338
495
  "scholarship": "Ian Carr, Miles Davis: The Definitive Biography (revised edition, 1998); Miles Davis with Quincy Troupe, Miles: The Autobiography (New York: Simon & Schuster, 1989)",
339
496
  "attributed_disposition": "direction fixed by subtraction; execution left to the players",
340
497
  "note": "A public historical figure. The attribution names a documented working disposition; it is not an endorsement, a likeness, or a claim on the person."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eir-labs/coltrane",
3
- "version": "0.7.5",
3
+ "version": "0.8.1",
4
4
  "description": "A methodology engine — a typed substrate for defining agents, composing multi-phase standards, dispatching gigs, and sealing every output to a content-addressed ledger. Ships as an MCP server.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -95,6 +95,7 @@
95
95
  "devDependencies": {
96
96
  "@types/node": "^22.0.0",
97
97
  "@vitest/coverage-v8": "^3.2.6",
98
+ "fast-check": "^3.23.2",
98
99
  "tsx": "^4.19.0",
99
100
  "typescript": "^5.6.0",
100
101
  "vitest": "^3.0.0"
@@ -0,0 +1,156 @@
1
+ {
2
+ "slug": "defect-investigation-v1",
3
+ "domain": "engineering",
4
+ "agent_slugs": [
5
+ "defect-investigator"
6
+ ],
7
+ "phases": [
8
+ {
9
+ "name": "reproduce",
10
+ "intent": "Reproduce the defect deterministically; no investigation proceeds on a guess.",
11
+ "chairs": [
12
+ {
13
+ "role": "reproduce",
14
+ "agent_slug": "defect-investigator",
15
+ "depends_on": [],
16
+ "input_contract": [
17
+ "defect-report"
18
+ ],
19
+ "output_contract": [
20
+ "reproduction"
21
+ ],
22
+ "required_skills": []
23
+ }
24
+ ]
25
+ },
26
+ {
27
+ "name": "locate",
28
+ "intent": "Trace the exact failing call-chain in read code, file:symbol.",
29
+ "chairs": [
30
+ {
31
+ "role": "locate",
32
+ "agent_slug": "defect-investigator",
33
+ "depends_on": [
34
+ "reproduce"
35
+ ],
36
+ "input_contract": [
37
+ "reproduction"
38
+ ],
39
+ "output_contract": [
40
+ "defect-location"
41
+ ],
42
+ "required_skills": []
43
+ }
44
+ ]
45
+ },
46
+ {
47
+ "name": "root-cause",
48
+ "intent": "Why-chain to the violated invariant, not the surface symptom.",
49
+ "chairs": [
50
+ {
51
+ "role": "root-cause",
52
+ "agent_slug": "defect-investigator",
53
+ "depends_on": [
54
+ "locate"
55
+ ],
56
+ "input_contract": [
57
+ "defect-location"
58
+ ],
59
+ "output_contract": [
60
+ "root-cause"
61
+ ],
62
+ "required_skills": []
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "name": "generalize",
68
+ "intent": "Abstract the root cause to its defect CLASS and the single invariant that kills the whole class.",
69
+ "chairs": [
70
+ {
71
+ "role": "generalize",
72
+ "agent_slug": "defect-investigator",
73
+ "depends_on": [
74
+ "root-cause"
75
+ ],
76
+ "input_contract": [
77
+ "root-cause"
78
+ ],
79
+ "output_contract": [
80
+ "defect-class"
81
+ ],
82
+ "required_skills": []
83
+ }
84
+ ]
85
+ },
86
+ {
87
+ "name": "sweep",
88
+ "intent": "Sweep the WHOLE codebase for every instance of the class — found and checked-clean. Deferring a sibling is illegal.",
89
+ "chairs": [
90
+ {
91
+ "role": "sweep",
92
+ "agent_slug": "defect-investigator",
93
+ "depends_on": [
94
+ "generalize"
95
+ ],
96
+ "input_contract": [
97
+ "defect-class"
98
+ ],
99
+ "output_contract": [
100
+ "class-sweep"
101
+ ],
102
+ "required_skills": []
103
+ }
104
+ ]
105
+ },
106
+ {
107
+ "name": "fix-spec",
108
+ "intent": "Plan a fix for EVERY swept instance, each RED-first, plus a class-guard test.",
109
+ "chairs": [
110
+ {
111
+ "role": "fix-spec",
112
+ "agent_slug": "defect-investigator",
113
+ "depends_on": [
114
+ "sweep",
115
+ "root-cause"
116
+ ],
117
+ "input_contract": [
118
+ "class-sweep"
119
+ ],
120
+ "output_contract": [
121
+ "fix-spec"
122
+ ],
123
+ "required_skills": []
124
+ }
125
+ ]
126
+ },
127
+ {
128
+ "name": "verify",
129
+ "intent": "Confirm RED→GREEN per instance, the class-guard passes, and the original reproduction passes.",
130
+ "chairs": [
131
+ {
132
+ "role": "verify",
133
+ "agent_slug": "defect-investigator",
134
+ "depends_on": [
135
+ "fix-spec"
136
+ ],
137
+ "input_contract": [
138
+ "fix-spec"
139
+ ],
140
+ "output_contract": [
141
+ "fix-verification"
142
+ ],
143
+ "required_skills": []
144
+ }
145
+ ]
146
+ }
147
+ ],
148
+ "input_types": [
149
+ "defect-report"
150
+ ],
151
+ "output_types": [
152
+ "fix-spec",
153
+ "fix-verification"
154
+ ],
155
+ "description": "A defect is investigated to a CLASS-COMPLETE fix, never an instance patch. Reproduce → locate → root-cause → GENERALIZE to the defect class → SWEEP the whole codebase for every instance → fix-spec covering all of them (each RED-first, plus a class-guard test) → verify. The generalize+sweep phases are load-bearing: no defect closes until its class is swept, so 'the same class of bug we already fixed' becomes structurally impossible. A human governor seals the completed investigation."
156
+ }
@@ -0,0 +1,151 @@
1
+ {
2
+ "slug": "software-change-pr-v1",
3
+ "domain": "software-change",
4
+ "agent_slugs": [
5
+ "john",
6
+ "miles",
7
+ "bill",
8
+ "code-implementer",
9
+ "change-verifier",
10
+ "pr-publisher"
11
+ ],
12
+ "phases": [
13
+ {
14
+ "name": "sense-context",
15
+ "chairs": [
16
+ {
17
+ "role": "read-context",
18
+ "agent_slug": "john",
19
+ "depends_on": [],
20
+ "input_contract": [
21
+ "change-request"
22
+ ],
23
+ "output_contract": [
24
+ "change-context"
25
+ ],
26
+ "required_skills": []
27
+ }
28
+ ],
29
+ "intent": "Read the material the change lands in, to the declared boundary and no further: entry points, the files the change plausibly touches, the checks that already cover the region, the conventions it must hold to — and the unknowns, which are part of the reading, not a failure of it. No decision is taken here."
30
+ },
31
+ {
32
+ "name": "frame-change",
33
+ "chairs": [
34
+ {
35
+ "role": "frame-change",
36
+ "agent_slug": "miles",
37
+ "depends_on": [
38
+ "read-context"
39
+ ],
40
+ "input_contract": [
41
+ "change-context"
42
+ ],
43
+ "output_contract": [
44
+ "change-decision"
45
+ ],
46
+ "required_skills": []
47
+ }
48
+ ],
49
+ "intent": "Fix the direction from the reading: scope, non-goals, stop condition, and the alternatives set aside with their reasons. Stated before any structure exists, so the structure is answerable to it. Settled for the run — later phases append observations, never revisions."
50
+ },
51
+ {
52
+ "name": "plan-change",
53
+ "chairs": [
54
+ {
55
+ "role": "plan-change",
56
+ "agent_slug": "bill",
57
+ "depends_on": [
58
+ "read-context",
59
+ "frame-change"
60
+ ],
61
+ "input_contract": [
62
+ "change-context",
63
+ "change-decision"
64
+ ],
65
+ "output_contract": [
66
+ "change-plan"
67
+ ],
68
+ "required_skills": [],
69
+ "preferred_skills": [
70
+ "structure-conformance"
71
+ ]
72
+ }
73
+ ],
74
+ "intent": "Settle the structure the change will be built through: ordered steps with explicit dependencies, the checks that land FIRST together with what each reports while the change is absent, the paths the plan commits to touching, and the tradeoff at every step where more than one structure would have served."
75
+ },
76
+ {
77
+ "name": "create-change",
78
+ "chairs": [
79
+ {
80
+ "role": "write-change",
81
+ "agent_slug": "code-implementer",
82
+ "depends_on": [
83
+ "plan-change"
84
+ ],
85
+ "input_contract": [
86
+ "change-plan"
87
+ ],
88
+ "output_contract": [
89
+ "change-set"
90
+ ],
91
+ "required_skills": []
92
+ }
93
+ ],
94
+ "intent": "Make the change the plan implies by WRITING it directly into the isolated working tree — every file it requires, created new or edited in place, however many that takes. The change lands as real files and the change-set is the real diff captured from the tree; this seat does not emit a patch for another to apply, and it does not verify its own work. Where the build departs from the plan, the departure is recorded with its reason."
95
+ },
96
+ {
97
+ "name": "verify-change",
98
+ "chairs": [
99
+ {
100
+ "role": "verify-change",
101
+ "agent_slug": "change-verifier",
102
+ "depends_on": [
103
+ "plan-change",
104
+ "write-change"
105
+ ],
106
+ "input_contract": [
107
+ "change-plan",
108
+ "change-set"
109
+ ],
110
+ "output_contract": [
111
+ "change-verdict"
112
+ ],
113
+ "required_skills": []
114
+ }
115
+ ],
116
+ "intent": "RUN the checks the plan fixed against the working tree the implementer has already written — build and tests, nothing to apply — then measure the change against its commitments criterion by criterion from the actual run: which acceptance criteria the run confirms green, where scope drifted, and which checks could not be executed. A criterion passes only when a real test asserted it and that test went green in this run; a check that could not run is unverified, never a pass; a red run is reported verbatim. The seat that clears the change is the seat that ran it."
117
+ },
118
+ {
119
+ "name": "publish-pr",
120
+ "chairs": [
121
+ {
122
+ "role": "publish-pr",
123
+ "agent_slug": "pr-publisher",
124
+ "depends_on": [
125
+ "write-change",
126
+ "verify-change"
127
+ ],
128
+ "input_contract": [
129
+ "change-set",
130
+ "change-verdict"
131
+ ],
132
+ "output_contract": [
133
+ "pull-request"
134
+ ],
135
+ "required_skills": []
136
+ }
137
+ ],
138
+ "intent": "Turn the verified change into an open pull request the pipeline cannot merge. The change is already on disk and confirmed by the verifier; commit exactly what is in the working tree to a fresh non-main branch, push it, and open exactly one PR whose body carries the rationale and the verifier's verdict. A failed verdict is not published — it is surfaced as a caveat and the seat stops. Landing the PR on main is a human governor's act on green CI, external to this run."
139
+ }
140
+ ],
141
+ "input_types": [
142
+ "change-request"
143
+ ],
144
+ "output_types": [
145
+ "change-set",
146
+ "change-verdict",
147
+ "pull-request"
148
+ ],
149
+ "max_examine_rounds": 3,
150
+ "description": "The full governed dev-loop: read the material, fix the direction, settle the structure, WRITE the change into an isolated working tree, RUN it to say whether what was built is what was decided, and open it as a pull request the seat that built it cannot merge. The implementer HOLDS the tree — it writes the change directly with the real file-editing interface (any number of files) and seals the change-set as the real captured diff, so the change that gets reviewed is the change that exists; there is no hand-authored patch to apply. The verify seat then EXECUTES against that tree — build and tests — so a change is cleared by a real run, never by argument; and a failing run is not the end: max_examine_rounds budgets the examine⇄amend loop, so a red verdict re-runs the writer (the failing verdict fed back) and re-verifies, iterating to green or stopping honestly at the bound. The publish seat commits exactly what is on disk. The seams hold: the seat that reads does not decide, the seat that decides does not build, the seat that builds does not judge its own work, and the seat that publishes does not merge. The cage is the isolated tree, not a missing tool. Landing on the protected main line is a human governor's act on green CI, not the pipeline's."
151
+ }