@eir-labs/coltrane 0.8.0 → 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 +301 -10
  25. package/dist/src/genome_schema.js +228 -7
  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 +143 -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
@@ -0,0 +1,28 @@
1
+ {
2
+ "slug": "defect-report",
3
+ "version": 1,
4
+ "extends": "Signal",
5
+ "domain": "engineering",
6
+ "status": "active",
7
+ "schema": {
8
+ "type": "object",
9
+ "properties": {
10
+ "symptom": {
11
+ "type": "string"
12
+ },
13
+ "trigger": {
14
+ "type": "string"
15
+ },
16
+ "error_text": {
17
+ "type": "string"
18
+ },
19
+ "observed_at": {
20
+ "type": "string"
21
+ }
22
+ }
23
+ },
24
+ "required_fields": [
25
+ "symptom",
26
+ "trigger"
27
+ ]
28
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "slug": "fix-spec",
3
+ "version": 1,
4
+ "extends": "Plan",
5
+ "domain": "engineering",
6
+ "status": "active",
7
+ "schema": {
8
+ "type": "object",
9
+ "properties": {
10
+ "per_instance_fixes": {
11
+ "type": "array",
12
+ "items": {
13
+ "type": "object"
14
+ }
15
+ },
16
+ "class_guard_test": {
17
+ "type": "string"
18
+ },
19
+ "covers_all_swept_instances": {
20
+ "type": "boolean"
21
+ }
22
+ }
23
+ },
24
+ "required_fields": [
25
+ "per_instance_fixes",
26
+ "class_guard_test"
27
+ ]
28
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "slug": "fix-verification",
3
+ "version": 1,
4
+ "extends": "Verdict",
5
+ "domain": "engineering",
6
+ "status": "active",
7
+ "schema": {
8
+ "type": "object",
9
+ "properties": {
10
+ "per_instance_results": {
11
+ "type": "array",
12
+ "items": {
13
+ "type": "object"
14
+ }
15
+ },
16
+ "class_guard_passes": {
17
+ "type": "boolean"
18
+ },
19
+ "repro_now_passes": {
20
+ "type": "boolean"
21
+ }
22
+ }
23
+ },
24
+ "required_fields": [
25
+ "per_instance_results",
26
+ "class_guard_passes"
27
+ ]
28
+ }
@@ -0,0 +1,95 @@
1
+ {
2
+ "slug": "grounding-dossier",
3
+ "version": 1,
4
+ "extends": "Interpretation",
5
+ "domain": "spec-drafting",
6
+ "status": "active",
7
+ "schema": {
8
+ "type": "object",
9
+ "properties": {
10
+ "internal_sources": {
11
+ "type": "array",
12
+ "description": "Our own lineage read: each {source, contribution}.",
13
+ "items": {
14
+ "type": "object",
15
+ "properties": {
16
+ "source": {
17
+ "type": "string"
18
+ },
19
+ "contribution": {
20
+ "type": "string"
21
+ }
22
+ },
23
+ "required": [
24
+ "source",
25
+ "contribution"
26
+ ]
27
+ }
28
+ },
29
+ "external_sources": {
30
+ "type": "array",
31
+ "description": "Internet prior art on building the subsystem: each {citation, url, mechanism, applicability}.",
32
+ "items": {
33
+ "type": "object",
34
+ "properties": {
35
+ "citation": {
36
+ "type": "string"
37
+ },
38
+ "url": {
39
+ "type": "string"
40
+ },
41
+ "mechanism": {
42
+ "type": "string"
43
+ },
44
+ "applicability": {
45
+ "type": "string"
46
+ }
47
+ },
48
+ "required": [
49
+ "citation",
50
+ "mechanism",
51
+ "applicability"
52
+ ]
53
+ }
54
+ },
55
+ "method_findings": {
56
+ "type": "array",
57
+ "description": "How to formally/axiomatically verify a contract (property-based testing, deterministic algebra, model-based, contract testing): each {approach, source, how_it_applies}.",
58
+ "items": {
59
+ "type": "object",
60
+ "properties": {
61
+ "approach": {
62
+ "type": "string"
63
+ },
64
+ "source": {
65
+ "type": "string"
66
+ },
67
+ "how_it_applies": {
68
+ "type": "string"
69
+ }
70
+ },
71
+ "required": [
72
+ "approach",
73
+ "how_it_applies"
74
+ ]
75
+ }
76
+ },
77
+ "synthesis": {
78
+ "type": "string",
79
+ "description": "The high-resolution argument tying domain + method grounding into an implementation approach."
80
+ },
81
+ "open_questions": {
82
+ "type": "array",
83
+ "items": {
84
+ "type": "string"
85
+ }
86
+ }
87
+ }
88
+ },
89
+ "required_fields": [
90
+ "internal_sources",
91
+ "external_sources",
92
+ "method_findings",
93
+ "synthesis"
94
+ ]
95
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "slug": "pull-request",
3
+ "version": 1,
4
+ "extends": "Artifact",
5
+ "domain": "software-change",
6
+ "status": "active",
7
+ "schema": {
8
+ "type": "object",
9
+ "properties": {
10
+ "base": {
11
+ "type": "string",
12
+ "description": "The target branch the PR merges into (the protected main line). The seat never merges it — a human governor does, on green CI."
13
+ },
14
+ "branch": {
15
+ "type": "string",
16
+ "description": "The non-main feature branch the change was applied and pushed to."
17
+ },
18
+ "commit_sha": {
19
+ "type": "string",
20
+ "description": "The HEAD commit pushed to the branch, taken from the actual push output in this run — never fabricated."
21
+ },
22
+ "pr_url": {
23
+ "type": "string",
24
+ "description": "The opened pull request URL, taken from the gh/API response in this run."
25
+ },
26
+ "pr_number": {
27
+ "type": "number",
28
+ "description": "The opened pull request number, from the same response."
29
+ },
30
+ "title": {
31
+ "type": "string",
32
+ "description": "The PR title, stating what changed."
33
+ }
34
+ }
35
+ },
36
+ "required_fields": [
37
+ "validation_criteria",
38
+ "input_refs",
39
+ "branch",
40
+ "commit_sha",
41
+ "pr_url"
42
+ ]
43
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "slug": "red-spec",
3
+ "version": 1,
4
+ "extends": "Artifact",
5
+ "domain": "spec-drafting",
6
+ "status": "active",
7
+ "schema": {
8
+ "type": "object",
9
+ "properties": {
10
+ "spec_doc": {
11
+ "type": "string",
12
+ "description": "The written spec (path added by the diffs)."
13
+ },
14
+ "diffs": {
15
+ "type": "array",
16
+ "description": "Per-path unified diffs: the RED test files (real assertions, failing because unimplemented) and the spec doc.",
17
+ "items": {
18
+ "type": "object",
19
+ "properties": {
20
+ "path": {
21
+ "type": "string"
22
+ },
23
+ "patch": {
24
+ "type": "string"
25
+ }
26
+ },
27
+ "required": [
28
+ "path",
29
+ "patch"
30
+ ]
31
+ }
32
+ },
33
+ "coverage_map": {
34
+ "type": "array",
35
+ "description": "EVERY subsystem-contract invariant mapped to the red test that verifies it: each {invariant_id, test_name, test_file}.",
36
+ "items": {
37
+ "type": "object",
38
+ "properties": {
39
+ "invariant_id": {
40
+ "type": "string"
41
+ },
42
+ "test_name": {
43
+ "type": "string"
44
+ },
45
+ "test_file": {
46
+ "type": "string"
47
+ }
48
+ },
49
+ "required": [
50
+ "invariant_id",
51
+ "test_name",
52
+ "test_file"
53
+ ]
54
+ }
55
+ },
56
+ "testing_method": {
57
+ "type": "string",
58
+ "description": "The axiomatic/property-based approach + engine used (e.g. fast-check property tests), grounded in method_findings."
59
+ },
60
+ "uncovered": {
61
+ "type": "array",
62
+ "description": "Contract invariants with no red test — MUST be empty.",
63
+ "items": {
64
+ "type": "string"
65
+ }
66
+ }
67
+ }
68
+ },
69
+ "required_fields": [
70
+ "validation_criteria",
71
+ "input_refs",
72
+ "diffs",
73
+ "coverage_map",
74
+ "testing_method"
75
+ ]
76
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "slug": "reproduction",
3
+ "version": 1,
4
+ "extends": "Signal",
5
+ "domain": "engineering",
6
+ "status": "active",
7
+ "schema": {
8
+ "type": "object",
9
+ "properties": {
10
+ "reproduced": {
11
+ "type": "boolean"
12
+ },
13
+ "minimal_case": {
14
+ "type": "string"
15
+ },
16
+ "steps": {
17
+ "type": "string"
18
+ },
19
+ "error_text": {
20
+ "type": "string"
21
+ }
22
+ }
23
+ },
24
+ "required_fields": [
25
+ "reproduced",
26
+ "minimal_case"
27
+ ]
28
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "slug": "root-cause",
3
+ "version": 1,
4
+ "extends": "Judgment",
5
+ "domain": "engineering",
6
+ "status": "active",
7
+ "schema": {
8
+ "type": "object",
9
+ "properties": {
10
+ "violated_invariant": {
11
+ "type": "string"
12
+ },
13
+ "why_chain": {
14
+ "type": "array",
15
+ "items": {
16
+ "type": "string"
17
+ }
18
+ },
19
+ "is_root_not_symptom": {
20
+ "type": "boolean"
21
+ }
22
+ }
23
+ },
24
+ "required_fields": [
25
+ "violated_invariant",
26
+ "why_chain"
27
+ ]
28
+ }
@@ -0,0 +1,106 @@
1
+ {
2
+ "slug": "subsystem-contract",
3
+ "version": 1,
4
+ "extends": "Judgment",
5
+ "domain": "spec-drafting",
6
+ "status": "active",
7
+ "schema": {
8
+ "type": "object",
9
+ "properties": {
10
+ "obligations": {
11
+ "type": "array",
12
+ "description": "What the subsystem MUST do: each {id, statement}.",
13
+ "items": {
14
+ "type": "object",
15
+ "properties": {
16
+ "id": {
17
+ "type": "string"
18
+ },
19
+ "statement": {
20
+ "type": "string"
21
+ }
22
+ },
23
+ "required": [
24
+ "id",
25
+ "statement"
26
+ ]
27
+ }
28
+ },
29
+ "invariants": {
30
+ "type": "array",
31
+ "description": "Machine-statable properties that must hold: each {id, statement, checkable} — checkable names how it can be verified (property/example/algebraic).",
32
+ "items": {
33
+ "type": "object",
34
+ "properties": {
35
+ "id": {
36
+ "type": "string"
37
+ },
38
+ "statement": {
39
+ "type": "string"
40
+ },
41
+ "checkable": {
42
+ "type": "string"
43
+ }
44
+ },
45
+ "required": [
46
+ "id",
47
+ "statement",
48
+ "checkable"
49
+ ]
50
+ }
51
+ },
52
+ "failure_modes": {
53
+ "type": "array",
54
+ "description": "What must fail closed: each {id, condition, refusal}.",
55
+ "items": {
56
+ "type": "object",
57
+ "properties": {
58
+ "id": {
59
+ "type": "string"
60
+ },
61
+ "condition": {
62
+ "type": "string"
63
+ },
64
+ "refusal": {
65
+ "type": "string"
66
+ }
67
+ },
68
+ "required": [
69
+ "id",
70
+ "condition",
71
+ "refusal"
72
+ ]
73
+ }
74
+ },
75
+ "inputs": {
76
+ "type": "array",
77
+ "items": {
78
+ "type": "string"
79
+ }
80
+ },
81
+ "outputs": {
82
+ "type": "array",
83
+ "items": {
84
+ "type": "string"
85
+ }
86
+ },
87
+ "scope_in": {
88
+ "type": "array",
89
+ "items": {
90
+ "type": "string"
91
+ }
92
+ },
93
+ "scope_out": {
94
+ "type": "array",
95
+ "items": {
96
+ "type": "string"
97
+ }
98
+ }
99
+ }
100
+ },
101
+ "required_fields": [
102
+ "obligations",
103
+ "invariants",
104
+ "failure_modes"
105
+ ]
106
+ }
@@ -0,0 +1,166 @@
1
+ {
2
+ "institution": {
3
+ "slug": "coltrane",
4
+ "name": "Coltrane",
5
+ "kind": "institution",
6
+ "laws": [
7
+ {
8
+ "attributes": "any seated agent that is not a human governor",
9
+ "deontic": "forbidden",
10
+ "aim": "merge a change into the institution's protected main line",
11
+ "conditions": "at all times",
12
+ "or_else": "the merge is refused; a change lands only after its continuous-integration check is green on an open pull request and a human governor merges it",
13
+ "check": {
14
+ "predicate": "(=> (and (is-agent actor) (not (human-governor actor)) (= action \"merge-main\")) deny)",
15
+ "inputs": {
16
+ "actor": "principal",
17
+ "action": "action-kind"
18
+ }
19
+ },
20
+ "content_hash": "sha256:b6fc83599d08906b5a17c4df4fd62fc6613a8c6769de696e07f1822589c0edf4"
21
+ },
22
+ {
23
+ "attributes": "any seated agent proposing a change",
24
+ "deontic": "permitted",
25
+ "aim": "open a pull request proposing a change to the institution's main line",
26
+ "conditions": "the change is committed on a non-main branch and its local verify passed",
27
+ "or_else": "not applicable — a permission, not an obligation",
28
+ "check": {
29
+ "predicate": "(=> (and (is-agent actor) (= action \"open-pr\") (not (= source \"main\"))) allow)",
30
+ "inputs": {
31
+ "actor": "principal",
32
+ "action": "action-kind",
33
+ "source": "branch-name"
34
+ }
35
+ },
36
+ "content_hash": "sha256:16a421955526178557f84c668a5f7f78df76bb6b63ddc2941b5640bae6ee1131"
37
+ },
38
+ {
39
+ "attributes": "a pull request proposed for merge",
40
+ "deontic": "obliged",
41
+ "aim": "present a green continuous-integration result before it may be merged",
42
+ "conditions": "before any merge to the protected main line",
43
+ "or_else": "the merge is blocked until continuous integration is green",
44
+ "check": {
45
+ "predicate": "(=> (= action \"merge-main\") (require (= ci-status \"green\")))",
46
+ "inputs": {
47
+ "action": "action-kind",
48
+ "ci-status": "ci-status"
49
+ }
50
+ },
51
+ "content_hash": "sha256:c4c2b5fe59fdad6b299a43b60b4d61dfff9c848fe578d72ebf3d932fd5d15b13"
52
+ },
53
+ {
54
+ "attributes": "a change-set branch keyed by its originating gig, off the protected main line",
55
+ "deontic": "permitted",
56
+ "aim": "stand deliberately red between the spec merge and the implementation merge on a change-set branch, off the protected line",
57
+ "conditions": "while the target branch is a change-set branch and is not the protected main line",
58
+ "or_else": "not applicable — a permission, not an obligation",
59
+ "check": {
60
+ "predicate": "(=> (not (= target_branch \"main\")) allow)",
61
+ "inputs": {
62
+ "target_branch": "branch-name"
63
+ }
64
+ },
65
+ "content_hash": "sha256:f465a9f3e76a5288dd993ef1b8228993feea04a47af8f3c99462cc4edcb238a5"
66
+ }
67
+ ],
68
+ "sovereign": true,
69
+ "lineage": []
70
+ },
71
+ "organizations": [
72
+ {
73
+ "slug": "eir-labs",
74
+ "name": "Eir Labs",
75
+ "charter": "The organization that develops Coltrane through Coltrane's own governed pipeline. Its charter is to carry every change to the engine and its genome through a reviewed pull request a human governor merges on green continuous integration — never a direct write to the protected main line. It ships no capability it has not been granted and lands no change its checks have not passed.",
76
+ "parent_org": null
77
+ }
78
+ ],
79
+ "agent_records": [
80
+ {
81
+ "slug": "coltrane-proposer",
82
+ "name": "Coltrane Proposer",
83
+ "kind": "steve",
84
+ "is_institution": false,
85
+ "skill_slugs": [],
86
+ "status": "active",
87
+ "named_from_forebear": null,
88
+ "auth_user_id": null
89
+ }
90
+ ],
91
+ "org_members": [
92
+ {
93
+ "org_slug": "eir-labs",
94
+ "agent_slug": "coltrane-proposer"
95
+ }
96
+ ],
97
+ "chairs": [
98
+ {
99
+ "id": "coltrane.chair.change-author",
100
+ "institution_slug": "coltrane",
101
+ "role": "change-author",
102
+ "function": "CREATE",
103
+ "mission": "Propose changes to Coltrane as pull requests a human governor decides on. This chair reads, plans, builds and verifies a change, then opens it as a proposal on a non-main branch. It never merges its own work; landing the change on the protected main line is the governor's act, on green continuous integration.",
104
+ "required_skills": [],
105
+ "caps": [
106
+ {
107
+ "grant": "dispatch",
108
+ "standards": [
109
+ "software-change-v1"
110
+ ],
111
+ "expires": null
112
+ }
113
+ ],
114
+ "obligations": [
115
+ {
116
+ "attributes": "the change-author",
117
+ "aim": "open every change as a pull request on a non-main branch",
118
+ "deontic": "obliged",
119
+ "tier": "declared"
120
+ },
121
+ {
122
+ "attributes": "the change-author",
123
+ "aim": "merge its own pull request, or any change, into the protected main line",
124
+ "deontic": "forbidden",
125
+ "tier": "declared"
126
+ }
127
+ ]
128
+ },
129
+ {
130
+ "id": "coltrane.chair.human-governor",
131
+ "institution_slug": "coltrane",
132
+ "role": "human-governor",
133
+ "human": true,
134
+ "function": "JUDGE",
135
+ "mission": "Hold the merge authority for Coltrane's protected main line. This chair is held by a person, never a model agent: the governor reviews an open pull request and its continuous-integration result and merges it under their own name, or refuses it. Nothing lands on main without this office's yes. The office ships unassigned — the adopting organization seats a person here as its first governance act.",
136
+ "required_skills": [],
137
+ "caps": [],
138
+ "obligations": [
139
+ {
140
+ "attributes": "the human-governor",
141
+ "aim": "review the open pull request and confirm its continuous-integration result is green before merging",
142
+ "deontic": "obliged",
143
+ "tier": "declared"
144
+ },
145
+ {
146
+ "attributes": "the human-governor",
147
+ "aim": "delegate the merge decision to a model agent, or let the office be held by one",
148
+ "deontic": "forbidden",
149
+ "tier": "declared"
150
+ }
151
+ ]
152
+ }
153
+ ],
154
+ "assignments": [
155
+ {
156
+ "id": "coltrane.seat.change-author",
157
+ "chair_id": "coltrane.chair.change-author",
158
+ "agent_slug": "coltrane-proposer",
159
+ "org_slug": "eir-labs",
160
+ "contract_caps": [],
161
+ "witnessed_by": null
162
+ }
163
+ ],
164
+ "forebears": [],
165
+ "lineage_edges": []
166
+ }