@smartmemory/compose 0.3.5-beta → 0.3.7
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/.claude/skills/compose/SKILL.md +42 -88
- package/bin/compose.js +288 -0
- package/bin/git-hooks/pre-push.template +29 -0
- package/bin/judgment-import.js +572 -0
- package/contracts/feature-json.schema.json +5 -0
- package/contracts/judgment-record.schema.json +821 -0
- package/dist/assets/App-PkZzHeMj.js +894 -0
- package/dist/assets/_baseUniq-Bo837sRJ.js +1 -0
- package/dist/assets/arc-BafGpyqE.js +1 -0
- package/dist/assets/architectureDiagram-Q4EWVU46-BOBfUsqL.js +36 -0
- package/dist/assets/blockDiagram-DXYQGD6D-Dwodev1a.js +132 -0
- package/dist/assets/{browser-BSM23If2.js → browser-1ntj1-x_.js} +6 -6
- package/dist/assets/{c4Diagram-LMCZKHZV-CUmTCrMW.js → c4Diagram-AHTNJAMY-CU_bhYag.js} +1 -1
- package/dist/assets/channel-qVK_qn4E.js +1 -0
- package/dist/assets/{chunk-JWPE2WC7-DQFs7gjy.js → chunk-4BX2VUAB-p8WsDwnO.js} +1 -1
- package/dist/assets/chunk-4TB4RGXK-B8h7-eR0.js +206 -0
- package/dist/assets/{chunk-XXDRQBXY-CSdt06Hp.js → chunk-55IACEB6-DxeEr98s.js} +1 -1
- package/dist/assets/{chunk-VR4S4FIN-Dvhgnm7E.js → chunk-EDXVE4YY-BYt8F151.js} +1 -1
- package/dist/assets/{chunk-5VM5RSS4-Qw-L7OoJ.js → chunk-FMBD7UC4-DGSOVeie.js} +1 -1
- package/dist/assets/chunk-OYMX7WX6-B-QdgYR2.js +231 -0
- package/dist/assets/{chunk-2Q5K7J3B-Cyvi1AFH.js → chunk-QZHKN3VN-Du5UAZLs.js} +1 -1
- package/dist/assets/{chunk-32BRIVSS-B1y5FpOd.js → chunk-YZCP3GAM-C8JbNBSk.js} +1 -1
- package/dist/assets/classDiagram-6PBFFD2Q-B8UcfC1q.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-B8UcfC1q.js +1 -0
- package/dist/assets/clone-Pu3RyLUh.js +1 -0
- package/dist/assets/{cose-bilkent-JH36ORCC-G8l05tXy.js → cose-bilkent-S5V4N54A-O1ESaqge.js} +1 -1
- package/dist/assets/dagre-KV5264BT-CPTmFPHw.js +4 -0
- package/dist/assets/diagram-5BDNPKRD-B3PNrWs5.js +10 -0
- package/dist/assets/diagram-G4DWMVQ6-Cscfr6vc.js +24 -0
- package/dist/assets/diagram-MMDJMWI5-CSfqZ-TM.js +43 -0
- package/dist/assets/diagram-TYMM5635-Cg4aYS7W.js +24 -0
- package/dist/assets/erDiagram-SMLLAGMA-_ZqwG5pl.js +85 -0
- package/dist/assets/flowDiagram-DWJPFMVM-C83boxFT.js +162 -0
- package/dist/assets/ganttDiagram-T4ZO3ILL-CWnIjuEi.js +292 -0
- package/dist/assets/gitGraphDiagram-UUTBAWPF-DrMdxZfH.js +106 -0
- package/dist/assets/graph-Bi99_6Yf.js +331 -0
- package/dist/assets/graph-RE4I7Ty7.js +1 -0
- package/dist/assets/index-Rm2RE-c0.js +123 -0
- package/dist/assets/infoDiagram-42DDH7IO-BLmP4Epr.js +2 -0
- package/dist/assets/{ishikawaDiagram-FXEZZL3T-Hm4zSDlM.js → ishikawaDiagram-UXIWVN3A-yuWWshKN.js} +5 -5
- package/dist/assets/{journeyDiagram-5HDEW3XC-CIqcTFuO.js → journeyDiagram-VCZTEJTY-BOfhaJov.js} +1 -1
- package/dist/assets/{kanban-definition-HUTT4EX6-CB9jCXj_.js → kanban-definition-6JOO6SKY-Bbolde15.js} +7 -7
- package/dist/assets/katex-DkKDou_j.js +257 -0
- package/dist/assets/layout-BSf33zm8.js +1 -0
- package/dist/assets/{linear-CsXqv70E.js → linear-AvSTWMqx.js} +1 -1
- package/dist/assets/min-QBM8H4xN.js +1 -0
- package/dist/assets/{mindmap-definition-LN4V7U3C-CpqH5F_P.js → mindmap-definition-QFDTVHPH-BuvgtqIc.js} +7 -7
- package/dist/assets/{mobile-CaoXUwAr.js → mobile-BnXEOE3U.js} +2 -2
- package/dist/assets/pieDiagram-DEJITSTG-DIzF16vh.js +30 -0
- package/dist/assets/quadrantDiagram-34T5L4WZ-D-mbUIjS.js +7 -0
- package/dist/assets/{requirementDiagram-TGXJPOKE-D1lG1P7h.js → requirementDiagram-MS252O5E-CEs4kCLd.js} +3 -3
- package/dist/assets/sankeyDiagram-XADWPNL6-DFsnCr9n.js +10 -0
- package/dist/assets/sequenceDiagram-FGHM5R23-BEJYdTjQ.js +157 -0
- package/dist/assets/stateDiagram-FHFEXIEX-BBXs57uY.js +1 -0
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-BqKuX4rj.js +1 -0
- package/dist/assets/{timeline-definition-FHXFAJF6-CzqqUDvt.js → timeline-definition-GMOUNBTQ-BGvLoVAY.js} +3 -3
- package/dist/assets/vennDiagram-DHZGUBPP-9LaBTMe0.js +34 -0
- package/dist/assets/wardley-RL74JXVD-P4MEqMTP.js +162 -0
- package/dist/assets/wardleyDiagram-NUSXRM2D-o-tmxnlC.js +20 -0
- package/dist/assets/xychartDiagram-5P7HB3ND-Dpn7V6qk.js +7 -0
- package/dist/index.html +2 -2
- package/lib/bug-escalation.js +30 -4
- package/lib/build.js +777 -52
- package/lib/canon-guard.js +223 -0
- package/lib/canon-registry.js +187 -0
- package/lib/codex-preflight.js +26 -4
- package/lib/dispatch-ledger.js +301 -0
- package/lib/dispatch-metrics.js +236 -0
- package/lib/experiment-judge.js +6 -1
- package/lib/feature-writer.js +9 -0
- package/lib/gsd.js +11 -2
- package/lib/hooks-status.js +32 -3
- package/lib/idempotency.js +33 -8
- package/lib/judgment/schema.js +23 -0
- package/lib/judgment/store/index.js +207 -0
- package/lib/judgment/store/records.js +405 -0
- package/lib/judgment-attest.js +259 -0
- package/lib/judgment-gen.js +691 -0
- package/lib/judgment-verify.js +153 -0
- package/lib/judgment-write-guard.js +230 -0
- package/lib/judgment-writer.js +3403 -0
- package/lib/lane-gate.js +2 -0
- package/lib/lifecycle-modes.js +42 -0
- package/lib/local-claude-connector.js +199 -54
- package/lib/mcp-enforcement.js +21 -35
- package/lib/result-normalizer.js +93 -15
- package/lib/review-normalize.js +4 -0
- package/lib/stratum-mcp-client.js +131 -6
- package/package.json +2 -2
- package/server/compose-mcp-tools.js +49 -1
- package/server/compose-mcp.js +220 -0
- package/server/mcp-tool-policy.js +1 -0
- package/dist/assets/App-BG92y_CY.js +0 -896
- package/dist/assets/abnfDiagram-VRR7QNED-Bip6cMjP.js +0 -1
- package/dist/assets/arc-CyMTM07c.js +0 -1
- package/dist/assets/architectureDiagram-ZJ3FMSHR-BukV0CJw.js +0 -36
- package/dist/assets/blockDiagram-677ZJIJ3-Bjb_MNB4.js +0 -132
- package/dist/assets/channel-BzkmtaLy.js +0 -1
- package/dist/assets/chunk-EX3LRPZG-G_MZEji_.js +0 -231
- package/dist/assets/chunk-MOJQB5TN-CQZQYMcz.js +0 -88
- package/dist/assets/chunk-RYQCIY6F-CmAda4sZ.js +0 -1
- package/dist/assets/chunk-V7JOEXUC-CbjBz-Ek.js +0 -206
- package/dist/assets/classDiagram-OUVF2IWQ-BIvLcbex.js +0 -1
- package/dist/assets/classDiagram-v2-EOCWNBFH-BIvLcbex.js +0 -1
- package/dist/assets/cynefin-VYW2F7L2-C3n1PNJC.js +0 -178
- package/dist/assets/cynefinDiagram-TSTJHNR4-C8N_CvKJ.js +0 -62
- package/dist/assets/dagre-VKFMJZFB-B2pkwDhN.js +0 -4
- package/dist/assets/diagram-FQU43EPY-DPHD_t-1.js +0 -3
- package/dist/assets/diagram-G47NLZAW-DGmHIZRr.js +0 -24
- package/dist/assets/diagram-NH7WQ7WH-BlLWwKVt.js +0 -24
- package/dist/assets/diagram-OA4YK3LP-DEv704Re.js +0 -30
- package/dist/assets/diagram-WEI45ONY-Bj6PGUCe.js +0 -41
- package/dist/assets/ebnfDiagram-CCIWWBDH-Ch-icksT.js +0 -1
- package/dist/assets/erDiagram-Q63AITRT-CI3lwEFA.js +0 -85
- package/dist/assets/flowDiagram-23GEKE2U-DcUANpAz.js +0 -156
- package/dist/assets/ganttDiagram-NO4QXBWP-Cy0Ie8KS.js +0 -292
- package/dist/assets/gitGraphDiagram-IHSO6WYX-BswI52az.js +0 -106
- package/dist/assets/graph-BXPQrYYB.js +0 -331
- package/dist/assets/graph-C9eacEi8.js +0 -1
- package/dist/assets/index-B1H7-G2y.js +0 -119
- package/dist/assets/infoDiagram-FWYZ7A6U-BBunqvr-.js +0 -2
- package/dist/assets/katex-C5jXJg4s.js +0 -257
- package/dist/assets/layout-DEXfKzaS.js +0 -1
- package/dist/assets/map-Czzmt4hB.js +0 -1
- package/dist/assets/pegDiagram-2B236MQR-HpQyrDcm.js +0 -1
- package/dist/assets/pieDiagram-ENE6RG2P-xkcpHwnY.js +0 -39
- package/dist/assets/quadrantDiagram-ABIIQ3AL-kebZIOmu.js +0 -7
- package/dist/assets/railroadDiagram-RFXS5EU6-DNvGwWm9.js +0 -1
- package/dist/assets/sankeyDiagram-HTMAVEWB-DOEEcn52.js +0 -40
- package/dist/assets/sequenceDiagram-DBY2YBRQ-DynIVCk_.js +0 -162
- package/dist/assets/sizeCapture-X5ZJPWSS-DJXFjUUL.js +0 -1
- package/dist/assets/stateDiagram-2N3HPSRC-OZ7trFh5.js +0 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-GcPRHAJT.js +0 -1
- package/dist/assets/swimlanes-5IMT3BWC-DULYAFmB.js +0 -2
- package/dist/assets/swimlanesDiagram-G3AALYLV-BB0gCy01.js +0 -8
- package/dist/assets/vennDiagram-L72KCM5P-CdKmtcFL.js +0 -34
- package/dist/assets/wardleyDiagram-EHGQE667-DknGwjCA.js +0 -78
- package/dist/assets/xychartDiagram-FW5EYKEG-DdYyKfQ3.js +0 -7
|
@@ -0,0 +1,821 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://compose.smartmemory.dev/contracts/judgment-record.schema.json",
|
|
4
|
+
"title": "judgment-record",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"description": "Record shapes for judgment canon under docs/judgment/records/ (COMP-JUDGMENT-WRITER, design.md rev 5). Records are canonical JSON; markdown is projection. Every record carries a writer-stamped provenance block the caller can never set. Definitions: position_revision (append-only chain member), joint (state lives here), prediction, ledger_event (kind-specific required fields), pending_intent (intent-first transitions).",
|
|
7
|
+
"_source": "docs/features/COMP-JUDGMENT-WRITER/design.md",
|
|
8
|
+
"_roadmap": "COMP-JUDGMENT-WRITER",
|
|
9
|
+
"type": "object",
|
|
10
|
+
|
|
11
|
+
"definitions": {
|
|
12
|
+
|
|
13
|
+
"slug": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"pattern": "^[a-z0-9][a-z0-9-]*$"
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
"revision_ref": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Address of a specific position revision: <slug>#r<N>.",
|
|
21
|
+
"pattern": "^[a-z0-9][a-z0-9-]*#r[1-9][0-9]*$"
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
"entry_id": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Writer-allocated stable sub-entry id.",
|
|
27
|
+
"pattern": "^(?:f|e|of|o|l|c|gj|gl)[1-9][0-9]*$"
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
"fact_id": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"pattern": "^f[1-9][0-9]*$"
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
"edge_id": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"pattern": "^e[1-9][0-9]*$"
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
"open_field_id": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"pattern": "^of[1-9][0-9]*$"
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
"owed_id": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"pattern": "^o[1-9][0-9]*$"
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
"load_link_id": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"pattern": "^l[1-9][0-9]*$"
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
"clause_id": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"pattern": "^c[1-9][0-9]*$"
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
"goal_joint_id": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"pattern": "^gj[1-9][0-9]*$"
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
"goal_load_link_id": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"pattern": "^gl[1-9][0-9]*$"
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
"goal_clause_ref": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"description": "Strict address of a clause in a goal version.",
|
|
73
|
+
"pattern": "^goal:v[1-9][0-9]*#c[1-9][0-9]*$"
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
"provenance": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"description": "Writer-stamped, never caller-set. actor is a v1 constant (oq1-agent-only-v1); session is best-effort diagnostic garnish and nothing may depend on it; via marks sanctioned historical transcription or migration.",
|
|
79
|
+
"required": ["actor", "written_at"],
|
|
80
|
+
"additionalProperties": false,
|
|
81
|
+
"properties": {
|
|
82
|
+
"actor": { "const": "agent" },
|
|
83
|
+
"session": { "type": ["string", "null"] },
|
|
84
|
+
"written_at": { "type": "string", "format": "date-time" },
|
|
85
|
+
"via": { "enum": ["import", "migration"] },
|
|
86
|
+
"intent_id": { "type": "string", "minLength": 1 }
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
"fact_text": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"minLength": 1
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
"fact_channel": {
|
|
96
|
+
"enum": ["said", "observed", "secondhand", "inferred"]
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
"fact_at": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"format": "date"
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
"fact_via": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"minLength": 1
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
"person_section": {
|
|
110
|
+
"enum": ["role", "life", "stated", "revealed"]
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
"correction_trace_list": {
|
|
114
|
+
"type": "array",
|
|
115
|
+
"items": { "$ref": "#/definitions/correction_trace" }
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
"correction_trace": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"description": "Writer-produced prior values for one correction, fill, give, or reopen transition.",
|
|
121
|
+
"required": ["prior", "corrected_at", "provenance"],
|
|
122
|
+
"additionalProperties": false,
|
|
123
|
+
"properties": {
|
|
124
|
+
"prior": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"minProperties": 1,
|
|
127
|
+
"additionalProperties": { "type": ["string", "number", "boolean", "null"] }
|
|
128
|
+
},
|
|
129
|
+
"corrected_at": { "type": "string", "format": "date-time" },
|
|
130
|
+
"provenance": { "$ref": "#/definitions/provenance" }
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
|
|
134
|
+
"removed_block": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"description": "Writer-stamped retirement marker; the containing stable entry remains in place.",
|
|
137
|
+
"required": ["at", "reason", "provenance"],
|
|
138
|
+
"additionalProperties": false,
|
|
139
|
+
"properties": {
|
|
140
|
+
"at": { "type": "string", "format": "date-time" },
|
|
141
|
+
"reason": { "type": "string", "minLength": 1 },
|
|
142
|
+
"provenance": { "$ref": "#/definitions/provenance" }
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
"ratification": {
|
|
147
|
+
"type": "object",
|
|
148
|
+
"description": "Owner attestation citation: the elicitation triplet plus the owner's quoted answer.",
|
|
149
|
+
"required": ["asked", "answered_at", "answer_ref", "quote"],
|
|
150
|
+
"additionalProperties": false,
|
|
151
|
+
"properties": {
|
|
152
|
+
"asked": { "type": "string", "minLength": 1 },
|
|
153
|
+
"answered_at": { "type": "string", "format": "date-time" },
|
|
154
|
+
"answer_ref": { "type": "string", "minLength": 1 },
|
|
155
|
+
"quote": { "type": "string", "minLength": 1 }
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
"provocation": {
|
|
160
|
+
"type": "object",
|
|
161
|
+
"description": "Owner words that provoked a goal cut and when they were recorded.",
|
|
162
|
+
"required": ["quote", "at"],
|
|
163
|
+
"additionalProperties": false,
|
|
164
|
+
"properties": {
|
|
165
|
+
"quote": { "type": "string", "minLength": 1 },
|
|
166
|
+
"at": { "type": "string", "format": "date-time" }
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
"elicitation": {
|
|
171
|
+
"type": "object",
|
|
172
|
+
"description": "Required companion of ASSERT grounding (assert-elicitation-amendment, ratified 2026-07-22): what question was put to the owner, when, and where the answer is recorded.",
|
|
173
|
+
"required": ["asked", "answered_at", "answer_ref"],
|
|
174
|
+
"additionalProperties": false,
|
|
175
|
+
"properties": {
|
|
176
|
+
"asked": { "type": "string", "minLength": 1 },
|
|
177
|
+
"answered_at": { "type": "string", "format": "date-time" },
|
|
178
|
+
"answer_ref": { "type": "string", "minLength": 1 }
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
"person_fact": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"required": ["id", "section", "text", "channel", "at", "provenance", "trace"],
|
|
185
|
+
"additionalProperties": false,
|
|
186
|
+
"properties": {
|
|
187
|
+
"id": { "$ref": "#/definitions/fact_id" },
|
|
188
|
+
"section": { "$ref": "#/definitions/person_section" },
|
|
189
|
+
"text": { "$ref": "#/definitions/fact_text" },
|
|
190
|
+
"channel": { "$ref": "#/definitions/fact_channel" },
|
|
191
|
+
"via": { "$ref": "#/definitions/fact_via" },
|
|
192
|
+
"at": { "$ref": "#/definitions/fact_at" },
|
|
193
|
+
"diverges_with": { "$ref": "#/definitions/fact_id" },
|
|
194
|
+
"provenance": { "$ref": "#/definitions/provenance" },
|
|
195
|
+
"trace": { "$ref": "#/definitions/correction_trace_list" }
|
|
196
|
+
},
|
|
197
|
+
"if": {
|
|
198
|
+
"properties": { "channel": { "const": "secondhand" } },
|
|
199
|
+
"required": ["channel"]
|
|
200
|
+
},
|
|
201
|
+
"then": { "required": ["via"] },
|
|
202
|
+
"else": { "not": { "required": ["via"] } }
|
|
203
|
+
},
|
|
204
|
+
|
|
205
|
+
"situation_fact": {
|
|
206
|
+
"type": "object",
|
|
207
|
+
"required": ["id", "text", "channel", "at", "provenance", "trace"],
|
|
208
|
+
"additionalProperties": false,
|
|
209
|
+
"properties": {
|
|
210
|
+
"id": { "$ref": "#/definitions/fact_id" },
|
|
211
|
+
"text": { "$ref": "#/definitions/fact_text" },
|
|
212
|
+
"channel": { "$ref": "#/definitions/fact_channel" },
|
|
213
|
+
"via": { "$ref": "#/definitions/fact_via" },
|
|
214
|
+
"at": { "$ref": "#/definitions/fact_at" },
|
|
215
|
+
"provenance": { "$ref": "#/definitions/provenance" },
|
|
216
|
+
"trace": { "$ref": "#/definitions/correction_trace_list" }
|
|
217
|
+
},
|
|
218
|
+
"if": {
|
|
219
|
+
"properties": { "channel": { "const": "secondhand" } },
|
|
220
|
+
"required": ["channel"]
|
|
221
|
+
},
|
|
222
|
+
"then": { "required": ["via"] },
|
|
223
|
+
"else": { "not": { "required": ["via"] } }
|
|
224
|
+
},
|
|
225
|
+
|
|
226
|
+
"person_edge": {
|
|
227
|
+
"type": "object",
|
|
228
|
+
"required": ["id", "to", "kind", "provenance", "removed"],
|
|
229
|
+
"additionalProperties": false,
|
|
230
|
+
"properties": {
|
|
231
|
+
"id": { "$ref": "#/definitions/edge_id" },
|
|
232
|
+
"to": { "$ref": "#/definitions/slug" },
|
|
233
|
+
"kind": { "type": "string", "minLength": 1 },
|
|
234
|
+
"provenance": { "$ref": "#/definitions/provenance" },
|
|
235
|
+
"removed": {
|
|
236
|
+
"anyOf": [
|
|
237
|
+
{ "type": "null" },
|
|
238
|
+
{ "$ref": "#/definitions/removed_block" }
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
|
|
244
|
+
"fact_load_link": {
|
|
245
|
+
"type": "object",
|
|
246
|
+
"required": ["id", "fact", "carries", "provenance", "removed"],
|
|
247
|
+
"additionalProperties": false,
|
|
248
|
+
"properties": {
|
|
249
|
+
"id": { "$ref": "#/definitions/load_link_id" },
|
|
250
|
+
"fact": { "$ref": "#/definitions/fact_id" },
|
|
251
|
+
"carries": { "type": "string", "minLength": 1 },
|
|
252
|
+
"provenance": { "$ref": "#/definitions/provenance" },
|
|
253
|
+
"removed": {
|
|
254
|
+
"anyOf": [
|
|
255
|
+
{ "type": "null" },
|
|
256
|
+
{ "$ref": "#/definitions/removed_block" }
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
|
|
262
|
+
"open_field": {
|
|
263
|
+
"type": "object",
|
|
264
|
+
"required": ["id", "name", "status", "provenance", "trace"],
|
|
265
|
+
"additionalProperties": false,
|
|
266
|
+
"properties": {
|
|
267
|
+
"id": { "$ref": "#/definitions/open_field_id" },
|
|
268
|
+
"name": { "type": "string", "minLength": 1 },
|
|
269
|
+
"status": { "enum": ["open", "filled"] },
|
|
270
|
+
"filled_by": { "$ref": "#/definitions/fact_id" },
|
|
271
|
+
"provenance": { "$ref": "#/definitions/provenance" },
|
|
272
|
+
"trace": { "$ref": "#/definitions/correction_trace_list" }
|
|
273
|
+
},
|
|
274
|
+
"if": {
|
|
275
|
+
"properties": { "status": { "const": "filled" } },
|
|
276
|
+
"required": ["status"]
|
|
277
|
+
},
|
|
278
|
+
"then": { "required": ["filled_by"] },
|
|
279
|
+
"else": { "not": { "required": ["filled_by"] } }
|
|
280
|
+
},
|
|
281
|
+
|
|
282
|
+
"owed": {
|
|
283
|
+
"type": "object",
|
|
284
|
+
"required": ["id", "name", "why_load_bearing", "status", "provenance", "trace"],
|
|
285
|
+
"additionalProperties": false,
|
|
286
|
+
"properties": {
|
|
287
|
+
"id": { "$ref": "#/definitions/owed_id" },
|
|
288
|
+
"name": { "type": "string", "minLength": 1 },
|
|
289
|
+
"why_load_bearing": { "type": "string", "minLength": 1 },
|
|
290
|
+
"status": { "enum": ["open", "given"] },
|
|
291
|
+
"filled_by": { "$ref": "#/definitions/fact_id" },
|
|
292
|
+
"provenance": { "$ref": "#/definitions/provenance" },
|
|
293
|
+
"trace": { "$ref": "#/definitions/correction_trace_list" }
|
|
294
|
+
},
|
|
295
|
+
"if": {
|
|
296
|
+
"properties": { "status": { "const": "given" } },
|
|
297
|
+
"required": ["status"]
|
|
298
|
+
},
|
|
299
|
+
"then": { "required": ["filled_by"] },
|
|
300
|
+
"else": { "not": { "required": ["filled_by"] } }
|
|
301
|
+
},
|
|
302
|
+
|
|
303
|
+
"goal_clause": {
|
|
304
|
+
"type": "object",
|
|
305
|
+
"required": ["id", "text", "channel", "elicitation", "provenance", "trace"],
|
|
306
|
+
"additionalProperties": false,
|
|
307
|
+
"properties": {
|
|
308
|
+
"id": { "$ref": "#/definitions/clause_id" },
|
|
309
|
+
"text": { "$ref": "#/definitions/fact_text" },
|
|
310
|
+
"channel": { "$ref": "#/definitions/fact_channel" },
|
|
311
|
+
"via": { "$ref": "#/definitions/fact_via" },
|
|
312
|
+
"elicitation": { "$ref": "#/definitions/elicitation" },
|
|
313
|
+
"provenance": { "$ref": "#/definitions/provenance" },
|
|
314
|
+
"trace": { "$ref": "#/definitions/correction_trace_list" }
|
|
315
|
+
},
|
|
316
|
+
"if": {
|
|
317
|
+
"properties": { "channel": { "const": "secondhand" } },
|
|
318
|
+
"required": ["channel"]
|
|
319
|
+
},
|
|
320
|
+
"then": { "required": ["via"] },
|
|
321
|
+
"else": { "not": { "required": ["via"] } }
|
|
322
|
+
},
|
|
323
|
+
|
|
324
|
+
"goal_joint_link": {
|
|
325
|
+
"type": "object",
|
|
326
|
+
"required": ["id", "joint", "provenance", "removed"],
|
|
327
|
+
"additionalProperties": false,
|
|
328
|
+
"properties": {
|
|
329
|
+
"id": { "$ref": "#/definitions/goal_joint_id" },
|
|
330
|
+
"joint": { "$ref": "#/definitions/slug" },
|
|
331
|
+
"provenance": { "$ref": "#/definitions/provenance" },
|
|
332
|
+
"removed": {
|
|
333
|
+
"anyOf": [
|
|
334
|
+
{ "type": "null" },
|
|
335
|
+
{ "$ref": "#/definitions/removed_block" }
|
|
336
|
+
]
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
|
|
341
|
+
"goal_load_link": {
|
|
342
|
+
"type": "object",
|
|
343
|
+
"required": ["id", "clause", "carries", "provenance", "removed"],
|
|
344
|
+
"additionalProperties": false,
|
|
345
|
+
"properties": {
|
|
346
|
+
"id": { "$ref": "#/definitions/goal_load_link_id" },
|
|
347
|
+
"clause": {
|
|
348
|
+
"type": "string",
|
|
349
|
+
"pattern": "^v[1-9][0-9]*#c[1-9][0-9]*$"
|
|
350
|
+
},
|
|
351
|
+
"carries": { "type": "string", "minLength": 1 },
|
|
352
|
+
"provenance": { "$ref": "#/definitions/provenance" },
|
|
353
|
+
"removed": {
|
|
354
|
+
"anyOf": [
|
|
355
|
+
{ "type": "null" },
|
|
356
|
+
{ "$ref": "#/definitions/removed_block" }
|
|
357
|
+
]
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
|
|
362
|
+
"person": {
|
|
363
|
+
"type": "object",
|
|
364
|
+
"description": "One aggregate record per person under records/people/<slug>.json.",
|
|
365
|
+
"required": ["slug", "display_name", "facts", "edges", "open_fields", "load_links", "provenance"],
|
|
366
|
+
"additionalProperties": false,
|
|
367
|
+
"properties": {
|
|
368
|
+
"slug": { "$ref": "#/definitions/slug" },
|
|
369
|
+
"display_name": { "type": "string", "minLength": 1 },
|
|
370
|
+
"facts": { "type": "array", "items": { "$ref": "#/definitions/person_fact" } },
|
|
371
|
+
"edges": { "type": "array", "items": { "$ref": "#/definitions/person_edge" } },
|
|
372
|
+
"open_fields": { "type": "array", "items": { "$ref": "#/definitions/open_field" } },
|
|
373
|
+
"load_links": { "type": "array", "items": { "$ref": "#/definitions/fact_load_link" } },
|
|
374
|
+
"provenance": { "$ref": "#/definitions/provenance" }
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
|
|
378
|
+
"situation_entity": {
|
|
379
|
+
"type": "object",
|
|
380
|
+
"description": "One aggregate situation record per entity under records/situation/<slug>.json.",
|
|
381
|
+
"required": ["slug", "display_name", "facts", "owed", "load_links", "provenance"],
|
|
382
|
+
"additionalProperties": false,
|
|
383
|
+
"properties": {
|
|
384
|
+
"slug": { "$ref": "#/definitions/slug" },
|
|
385
|
+
"display_name": { "type": "string", "minLength": 1 },
|
|
386
|
+
"facts": { "type": "array", "items": { "$ref": "#/definitions/situation_fact" } },
|
|
387
|
+
"owed": { "type": "array", "items": { "$ref": "#/definitions/owed" } },
|
|
388
|
+
"load_links": { "type": "array", "items": { "$ref": "#/definitions/fact_load_link" } },
|
|
389
|
+
"provenance": { "$ref": "#/definitions/provenance" }
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
|
|
393
|
+
"goal_version": {
|
|
394
|
+
"type": "object",
|
|
395
|
+
"description": "One immutable meaning version in records/goal/v<N>.json; wording-only corrections remain visibly traced.",
|
|
396
|
+
"required": ["version", "clauses", "provocation", "diff_note", "provenance"],
|
|
397
|
+
"additionalProperties": false,
|
|
398
|
+
"properties": {
|
|
399
|
+
"version": { "type": "integer", "minimum": 1 },
|
|
400
|
+
"clauses": {
|
|
401
|
+
"type": "array",
|
|
402
|
+
"minItems": 1,
|
|
403
|
+
"items": { "$ref": "#/definitions/goal_clause" }
|
|
404
|
+
},
|
|
405
|
+
"provocation": {
|
|
406
|
+
"anyOf": [
|
|
407
|
+
{ "type": "null" },
|
|
408
|
+
{ "$ref": "#/definitions/provocation" }
|
|
409
|
+
]
|
|
410
|
+
},
|
|
411
|
+
"ratification": {
|
|
412
|
+
"anyOf": [
|
|
413
|
+
{ "type": "null" },
|
|
414
|
+
{ "$ref": "#/definitions/ratification" }
|
|
415
|
+
]
|
|
416
|
+
},
|
|
417
|
+
"diff_note": { "type": "string", "minLength": 1 },
|
|
418
|
+
"provenance": { "$ref": "#/definitions/provenance" }
|
|
419
|
+
},
|
|
420
|
+
"if": {
|
|
421
|
+
"properties": {
|
|
422
|
+
"provenance": {
|
|
423
|
+
"properties": { "via": { "enum": ["import", "migration"] } },
|
|
424
|
+
"required": ["via"]
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
"required": ["provenance"]
|
|
428
|
+
},
|
|
429
|
+
"else": {
|
|
430
|
+
"required": ["ratification"],
|
|
431
|
+
"properties": {
|
|
432
|
+
"provocation": { "$ref": "#/definitions/provocation" },
|
|
433
|
+
"ratification": { "$ref": "#/definitions/ratification" }
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
|
|
438
|
+
"goal_state": {
|
|
439
|
+
"type": "object",
|
|
440
|
+
"description": "Mutable traced goal associations stored separately from the immutable meaning chain.",
|
|
441
|
+
"required": ["joints", "load_links", "provenance"],
|
|
442
|
+
"additionalProperties": false,
|
|
443
|
+
"properties": {
|
|
444
|
+
"joints": { "type": "array", "items": { "$ref": "#/definitions/goal_joint_link" } },
|
|
445
|
+
"load_links": { "type": "array", "items": { "$ref": "#/definitions/goal_load_link" } },
|
|
446
|
+
"provenance": { "$ref": "#/definitions/provenance" }
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
|
|
450
|
+
"conviction": {
|
|
451
|
+
"type": "object",
|
|
452
|
+
"required": ["level", "source"],
|
|
453
|
+
"additionalProperties": false,
|
|
454
|
+
"properties": {
|
|
455
|
+
"level": { "enum": ["high", "medium", "low"] },
|
|
456
|
+
"source": { "enum": ["stated", "inferred"] }
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
|
|
460
|
+
"rejected_alternative": {
|
|
461
|
+
"type": "object",
|
|
462
|
+
"required": ["what", "why"],
|
|
463
|
+
"additionalProperties": false,
|
|
464
|
+
"properties": {
|
|
465
|
+
"what": { "type": "string", "minLength": 1 },
|
|
466
|
+
"why": { "type": "string", "minLength": 1 }
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
|
|
470
|
+
"claim": {
|
|
471
|
+
"type": "object",
|
|
472
|
+
"description": "Individually addressable claim with per-claim grounding and upward links (P1a). owner_locked is structurally representable ONLY for import fidelity — the write guard refuses it through tools (lib/judgment-write-guard.js).",
|
|
473
|
+
"required": ["id", "text", "grounding"],
|
|
474
|
+
"additionalProperties": false,
|
|
475
|
+
"properties": {
|
|
476
|
+
"id": { "$ref": "#/definitions/slug" },
|
|
477
|
+
"text": { "type": "string", "minLength": 1 },
|
|
478
|
+
"grounding": { "enum": ["EXT", "INT", "ASSERT", "DERIVED", "AGENT"] },
|
|
479
|
+
"supports": { "type": "array", "items": { "type": "string" }, "default": [] },
|
|
480
|
+
"owner_locked": { "type": "boolean" },
|
|
481
|
+
"elicitation": { "$ref": "#/definitions/elicitation" }
|
|
482
|
+
},
|
|
483
|
+
"allOf": [
|
|
484
|
+
{
|
|
485
|
+
"if": { "properties": { "grounding": { "const": "ASSERT" } }, "required": ["grounding"] },
|
|
486
|
+
"then": { "required": ["elicitation"] }
|
|
487
|
+
}
|
|
488
|
+
]
|
|
489
|
+
},
|
|
490
|
+
|
|
491
|
+
"position_revision": {
|
|
492
|
+
"type": "object",
|
|
493
|
+
"description": "One immutable member of an append-only revision chain at records/positions/<slug>/r<N>.json. Status (live|superseded|retracted) is DERIVED by readers, never stored. A tombstone revision carries retracted: true and may have empty claims.",
|
|
494
|
+
"required": ["slug", "claims", "conviction", "provenance"],
|
|
495
|
+
"additionalProperties": false,
|
|
496
|
+
"properties": {
|
|
497
|
+
"slug": { "$ref": "#/definitions/slug" },
|
|
498
|
+
"rev": { "type": "integer", "minimum": 1 },
|
|
499
|
+
"claims": { "type": "array", "items": { "$ref": "#/definitions/claim" } },
|
|
500
|
+
"conviction": { "$ref": "#/definitions/conviction" },
|
|
501
|
+
"rejected_alternatives": {
|
|
502
|
+
"type": "array",
|
|
503
|
+
"items": { "$ref": "#/definitions/rejected_alternative" },
|
|
504
|
+
"default": []
|
|
505
|
+
},
|
|
506
|
+
"supersedes": { "$ref": "#/definitions/revision_ref" },
|
|
507
|
+
"retracted": { "const": true },
|
|
508
|
+
"provider_ids": {
|
|
509
|
+
"type": "object",
|
|
510
|
+
"additionalProperties": false,
|
|
511
|
+
"properties": { "smartmemory": { "type": "string" } }
|
|
512
|
+
},
|
|
513
|
+
"provenance": { "$ref": "#/definitions/provenance" }
|
|
514
|
+
},
|
|
515
|
+
"allOf": [
|
|
516
|
+
{
|
|
517
|
+
"if": { "not": { "required": ["retracted"] } },
|
|
518
|
+
"then": { "properties": { "claims": { "minItems": 1 } } }
|
|
519
|
+
}
|
|
520
|
+
]
|
|
521
|
+
},
|
|
522
|
+
|
|
523
|
+
"ext_package": {
|
|
524
|
+
"description": "EXT method gate: sharpened question package OR the BAR-OR-JUDGMENT judgment-dispatch exception. Exactly one form.",
|
|
525
|
+
"oneOf": [
|
|
526
|
+
{
|
|
527
|
+
"type": "object",
|
|
528
|
+
"required": ["sharpened_question", "bar", "falsifier"],
|
|
529
|
+
"additionalProperties": false,
|
|
530
|
+
"properties": {
|
|
531
|
+
"sharpened_question": { "type": "string", "minLength": 1 },
|
|
532
|
+
"bar": { "type": "string", "minLength": 1 },
|
|
533
|
+
"falsifier": { "type": "string", "minLength": 1 }
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"type": "object",
|
|
538
|
+
"required": ["judgment_dispatch", "reason"],
|
|
539
|
+
"additionalProperties": false,
|
|
540
|
+
"properties": {
|
|
541
|
+
"judgment_dispatch": { "const": true },
|
|
542
|
+
"reason": { "type": "string", "minLength": 1 }
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
]
|
|
546
|
+
},
|
|
547
|
+
|
|
548
|
+
"straddle_package": {
|
|
549
|
+
"type": "object",
|
|
550
|
+
"required": ["discriminating_signal", "kill_criteria"],
|
|
551
|
+
"additionalProperties": false,
|
|
552
|
+
"properties": {
|
|
553
|
+
"discriminating_signal": { "type": "string", "minLength": 1 },
|
|
554
|
+
"kill_criteria": { "type": "string", "minLength": 1 }
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
|
|
558
|
+
"ext_result": {
|
|
559
|
+
"type": "object",
|
|
560
|
+
"description": "Ruled external-signal result package. sources[] address immutable records/evidence/ packages (written by the Answerer slice — not this feature). judgment_dispatch: true propagates the BAR-OR-JUDGMENT stamp permanently.",
|
|
561
|
+
"required": ["outcome", "sources", "search_record", "found_or_provoked", "judgment_not_evidence"],
|
|
562
|
+
"additionalProperties": false,
|
|
563
|
+
"properties": {
|
|
564
|
+
"outcome": { "enum": ["FOUND", "CONTRARY", "SILENT", "UNREACHABLE"] },
|
|
565
|
+
"sources": { "type": "array", "items": { "type": "string" } },
|
|
566
|
+
"search_record": { "type": "string", "minLength": 1 },
|
|
567
|
+
"found_or_provoked": { "enum": ["found", "provoked"] },
|
|
568
|
+
"judgment_not_evidence": { "type": "boolean" },
|
|
569
|
+
"judgment_dispatch": { "const": true }
|
|
570
|
+
}
|
|
571
|
+
},
|
|
572
|
+
|
|
573
|
+
"resolution": {
|
|
574
|
+
"type": "object",
|
|
575
|
+
"description": "Exactly the ruled four outcomes — dissolution is its OWN artifact on the joint, not an outcome. Per-outcome required fields per the edge→artifact table (design Decision 2).",
|
|
576
|
+
"required": ["outcome"],
|
|
577
|
+
"additionalProperties": false,
|
|
578
|
+
"properties": {
|
|
579
|
+
"outcome": { "enum": ["resolved", "inconclusive", "failed_to_run", "superseded"] },
|
|
580
|
+
"evidence": { "type": ["string", "object"] },
|
|
581
|
+
"learned": { "type": "string" },
|
|
582
|
+
"would_have_settled": { "type": "string" },
|
|
583
|
+
"reason": { "type": "string" },
|
|
584
|
+
"why": { "type": "string" },
|
|
585
|
+
"elicitation": { "$ref": "#/definitions/elicitation" },
|
|
586
|
+
"ext_result": { "$ref": "#/definitions/ext_result" }
|
|
587
|
+
},
|
|
588
|
+
"allOf": [
|
|
589
|
+
{
|
|
590
|
+
"if": { "properties": { "outcome": { "const": "resolved" } } },
|
|
591
|
+
"then": { "required": ["evidence"] }
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"if": { "properties": { "outcome": { "const": "inconclusive" } } },
|
|
595
|
+
"then": { "required": ["learned", "would_have_settled"] }
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
"if": { "properties": { "outcome": { "const": "failed_to_run" } } },
|
|
599
|
+
"then": { "required": ["reason"] }
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
"if": { "properties": { "outcome": { "const": "superseded" } } },
|
|
603
|
+
"then": { "required": ["why"] }
|
|
604
|
+
}
|
|
605
|
+
]
|
|
606
|
+
},
|
|
607
|
+
|
|
608
|
+
"dissolution": {
|
|
609
|
+
"type": "object",
|
|
610
|
+
"description": "Terminal decomposition artifact — 'dissolved by decomposition' is a distinct fact from 'got an answer'.",
|
|
611
|
+
"required": ["decomposed_into"],
|
|
612
|
+
"additionalProperties": false,
|
|
613
|
+
"properties": {
|
|
614
|
+
"decomposed_into": {
|
|
615
|
+
"type": "array",
|
|
616
|
+
"items": { "type": "string", "minLength": 1 },
|
|
617
|
+
"minItems": 1
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
|
|
622
|
+
"joint": {
|
|
623
|
+
"type": "object",
|
|
624
|
+
"description": "One file per joint at records/joints/<slug>.json; state lives here and is written only as a transition's artifact. Both branches REQUIRED; cost is exactly the ruled COARSE-BUCKETS (no minutes — import maps minutes to hours with a note).",
|
|
625
|
+
"required": ["slug", "question", "branch_true", "branch_false", "resolve_by", "cost", "rank", "state", "provenance"],
|
|
626
|
+
"additionalProperties": false,
|
|
627
|
+
"properties": {
|
|
628
|
+
"slug": { "$ref": "#/definitions/slug" },
|
|
629
|
+
"question": { "type": "string", "minLength": 1 },
|
|
630
|
+
"branch_true": { "type": "string", "minLength": 1 },
|
|
631
|
+
"branch_false": { "type": "string", "minLength": 1 },
|
|
632
|
+
"resolve_by": { "enum": ["EXT", "INT", "CONSTRUCT", "ASSERT", "STRADDLE"] },
|
|
633
|
+
"cost": { "enum": ["hours", "days", "weeks", "months"] },
|
|
634
|
+
"rank": { "enum": ["high", "medium"] },
|
|
635
|
+
"state": { "enum": ["open", "under_test", "resolved", "inconclusive", "superseded", "dissolved"] },
|
|
636
|
+
"ext": { "$ref": "#/definitions/ext_package" },
|
|
637
|
+
"straddle": { "$ref": "#/definitions/straddle_package" },
|
|
638
|
+
"resolution": { "$ref": "#/definitions/resolution" },
|
|
639
|
+
"dissolution": { "$ref": "#/definitions/dissolution" },
|
|
640
|
+
"flags": { "type": "array", "items": { "type": "string" }, "default": [] },
|
|
641
|
+
"provider_ids": {
|
|
642
|
+
"type": "object",
|
|
643
|
+
"additionalProperties": false,
|
|
644
|
+
"properties": { "smartmemory": { "type": "string" } }
|
|
645
|
+
},
|
|
646
|
+
"provenance": { "$ref": "#/definitions/provenance" }
|
|
647
|
+
},
|
|
648
|
+
"allOf": [
|
|
649
|
+
{
|
|
650
|
+
"if": {
|
|
651
|
+
"properties": { "resolve_by": { "const": "ASSERT" } },
|
|
652
|
+
"required": ["resolve_by", "resolution"]
|
|
653
|
+
},
|
|
654
|
+
"then": {
|
|
655
|
+
"properties": { "resolution": { "required": ["elicitation"] } }
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
]
|
|
659
|
+
},
|
|
660
|
+
|
|
661
|
+
"prediction": {
|
|
662
|
+
"type": "object",
|
|
663
|
+
"description": "Spawned by CONSTRUCT/commit ledger events at records/predictions/<id>.json; the P6 sweep queries status: open. A postmortem grade flips it to graded.",
|
|
664
|
+
"required": ["id", "text", "outcome_criteria", "made_at", "context", "status", "provenance"],
|
|
665
|
+
"additionalProperties": false,
|
|
666
|
+
"properties": {
|
|
667
|
+
"id": { "type": "string", "minLength": 1 },
|
|
668
|
+
"text": { "type": "string", "minLength": 1 },
|
|
669
|
+
"outcome_criteria": { "type": "string", "minLength": 1 },
|
|
670
|
+
"made_at": { "type": "string", "format": "date-time" },
|
|
671
|
+
"context": { "enum": ["construct", "commit"] },
|
|
672
|
+
"refs": { "type": "array", "items": { "type": "string" }, "default": [] },
|
|
673
|
+
"status": { "enum": ["open", "graded"] },
|
|
674
|
+
"grade": { "enum": ["right", "right-wrong-reason", "wrong"] },
|
|
675
|
+
"provenance": { "$ref": "#/definitions/provenance" }
|
|
676
|
+
},
|
|
677
|
+
"allOf": [
|
|
678
|
+
{
|
|
679
|
+
"if": { "properties": { "status": { "const": "graded" } } },
|
|
680
|
+
"then": { "required": ["grade"] }
|
|
681
|
+
}
|
|
682
|
+
]
|
|
683
|
+
},
|
|
684
|
+
|
|
685
|
+
"embedded_prediction": {
|
|
686
|
+
"type": "object",
|
|
687
|
+
"description": "Prediction inputs carried by a commit-decide or CONSTRUCT-disposition event; the writer spawns the prediction record from these.",
|
|
688
|
+
"required": ["text", "outcome_criteria"],
|
|
689
|
+
"additionalProperties": false,
|
|
690
|
+
"properties": {
|
|
691
|
+
"text": { "type": "string", "minLength": 1 },
|
|
692
|
+
"outcome_criteria": { "type": "string", "minLength": 1 }
|
|
693
|
+
}
|
|
694
|
+
},
|
|
695
|
+
|
|
696
|
+
"ledger_event": {
|
|
697
|
+
"type": "object",
|
|
698
|
+
"description": "Append-only events in records/ledger.jsonl. The validating-writer premise is the kind-specific REQUIRED fields, not the common envelope. A decide carrying trigger is a commit-moment decide (P4). disposition: CONSTRUCT marks a CONSTRUCT-disposition event and requires its embedded prediction.",
|
|
699
|
+
"required": ["kind", "title", "provenance"],
|
|
700
|
+
"additionalProperties": false,
|
|
701
|
+
"properties": {
|
|
702
|
+
"kind": { "enum": ["decide", "kill", "override", "escalate", "calibrate", "postmortem", "rank", "note", "correct", "open", "attest"] },
|
|
703
|
+
"title": { "type": "string", "minLength": 1 },
|
|
704
|
+
"body": { "type": "string" },
|
|
705
|
+
"refs": { "type": "array", "items": { "type": "string" }, "default": [] },
|
|
706
|
+
"rejected": { "type": "array", "items": { "$ref": "#/definitions/rejected_alternative" } },
|
|
707
|
+
"conviction": { "$ref": "#/definitions/conviction" },
|
|
708
|
+
"trigger": { "type": "string", "minLength": 1 },
|
|
709
|
+
"open_joints": { "type": "array", "items": { "type": "string" } },
|
|
710
|
+
"rests_on": { "type": "array", "items": { "$ref": "#/definitions/goal_clause_ref" } },
|
|
711
|
+
"prediction": { "$ref": "#/definitions/embedded_prediction" },
|
|
712
|
+
"disposition": { "enum": ["EXT", "INT", "CONSTRUCT", "ASSERT", "STRADDLE"] },
|
|
713
|
+
"recall_verdict": { "enum": ["NAMED", "NAMED-BUT-MISRANKED", "MISSED", "UNKNOWABLE"] },
|
|
714
|
+
"attribution": { "type": "string", "minLength": 1 },
|
|
715
|
+
"prediction_ref": { "type": "string", "minLength": 1 },
|
|
716
|
+
"prediction_grade": { "enum": ["right", "right-wrong-reason", "wrong"] },
|
|
717
|
+
"reason": { "type": "string", "minLength": 1 },
|
|
718
|
+
"anchor": { "type": "string", "minLength": 1 },
|
|
719
|
+
"intent_id": { "type": "string", "minLength": 1 },
|
|
720
|
+
"tool": { "type": "string", "minLength": 1 },
|
|
721
|
+
"op": { "type": "string", "minLength": 1 },
|
|
722
|
+
"rank_change": {
|
|
723
|
+
"type": "object",
|
|
724
|
+
"required": ["joint", "from", "to"],
|
|
725
|
+
"additionalProperties": false,
|
|
726
|
+
"properties": {
|
|
727
|
+
"joint": { "$ref": "#/definitions/slug" },
|
|
728
|
+
"from": { "enum": ["high", "medium"] },
|
|
729
|
+
"to": { "enum": ["high", "medium"] }
|
|
730
|
+
}
|
|
731
|
+
},
|
|
732
|
+
"elicitation": { "$ref": "#/definitions/elicitation" },
|
|
733
|
+
"provenance": { "$ref": "#/definitions/provenance" }
|
|
734
|
+
},
|
|
735
|
+
"allOf": [
|
|
736
|
+
{
|
|
737
|
+
"if": { "properties": { "kind": { "const": "decide" } } },
|
|
738
|
+
"then": { "required": ["rejected", "conviction"] }
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
"if": {
|
|
742
|
+
"properties": { "kind": { "const": "decide" } },
|
|
743
|
+
"required": ["trigger"]
|
|
744
|
+
},
|
|
745
|
+
"then": {
|
|
746
|
+
"required": ["open_joints", "prediction"],
|
|
747
|
+
"properties": { "trigger": { "enum": ["earned", "forced", "exhausted"] } }
|
|
748
|
+
}
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"if": {
|
|
752
|
+
"properties": {
|
|
753
|
+
"kind": { "const": "decide" },
|
|
754
|
+
"trigger": { "enum": ["forced", "exhausted"] }
|
|
755
|
+
},
|
|
756
|
+
"required": ["trigger"]
|
|
757
|
+
},
|
|
758
|
+
"then": {
|
|
759
|
+
"properties": { "open_joints": { "minItems": 1 } }
|
|
760
|
+
}
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"if": { "properties": { "kind": { "const": "postmortem" } } },
|
|
764
|
+
"then": { "required": ["trigger", "recall_verdict", "attribution"] }
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
"if": {
|
|
768
|
+
"properties": { "kind": { "const": "postmortem" } },
|
|
769
|
+
"required": ["prediction_ref"]
|
|
770
|
+
},
|
|
771
|
+
"then": { "required": ["prediction_grade"] }
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
"if": { "properties": { "kind": { "const": "override" } } },
|
|
775
|
+
"then": { "required": ["reason"] }
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
"if": { "properties": { "kind": { "const": "note" } } },
|
|
779
|
+
"then": { "required": ["anchor"] }
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
"if": { "properties": { "kind": { "const": "rank" } } },
|
|
783
|
+
"then": { "required": ["rank_change"] }
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
"if": { "required": ["disposition"], "properties": { "disposition": { "const": "CONSTRUCT" } } },
|
|
787
|
+
"then": { "required": ["prediction"] }
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
"if": {
|
|
791
|
+
"properties": { "kind": { "const": "attest" } },
|
|
792
|
+
"required": ["kind"]
|
|
793
|
+
},
|
|
794
|
+
"then": { "required": ["intent_id", "tool", "op"] },
|
|
795
|
+
"else": {
|
|
796
|
+
"allOf": [
|
|
797
|
+
{ "not": { "required": ["intent_id"] } },
|
|
798
|
+
{ "not": { "required": ["tool"] } },
|
|
799
|
+
{ "not": { "required": ["op"] } }
|
|
800
|
+
]
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
]
|
|
804
|
+
},
|
|
805
|
+
|
|
806
|
+
"pending_intent": {
|
|
807
|
+
"type": "object",
|
|
808
|
+
"description": "Intent-first transition record: the COMPLETE mutation persisted atomically BEFORE the guard call, replayed idempotently by the reconciler — guard state authoritative for the edge, the intent authoritative for the payload.",
|
|
809
|
+
"required": ["id", "kind", "tool", "op", "payload", "created_at"],
|
|
810
|
+
"additionalProperties": false,
|
|
811
|
+
"properties": {
|
|
812
|
+
"id": { "type": "string", "minLength": 1 },
|
|
813
|
+
"kind": { "type": "string", "minLength": 1 },
|
|
814
|
+
"tool": { "type": "string", "minLength": 1 },
|
|
815
|
+
"op": { "type": "string", "minLength": 1 },
|
|
816
|
+
"payload": { "type": "object" },
|
|
817
|
+
"created_at": { "type": "string", "format": "date-time" }
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
}
|