Files
ucwm/schemas/world_state.json

99 lines
3.1 KiB
JSON
Raw Normal View History

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "ucwm/schemas/world_state.json",
"title": "WorldState",
"description": "The active UCWM state at a given processing stage. Passed between pipeline stages. The resolver stabilizes it; synthesis reads from it.",
"type": "object",
"required": ["state_id", "stage", "objects", "facets", "constraints"],
"additionalProperties": false,
"properties": {
"state_id": {
"type": "string",
"description": "Unique ID for this state snapshot."
},
"stage": {
"type": "string",
"enum": [
"post_gate",
"post_proposal",
"post_routing",
"post_specialist",
"post_resolver",
"resolved",
"synthesized"
],
"description": "Which pipeline stage produced this state snapshot."
},
"input_text": {
"type": "string",
"description": "Original user input text."
},
"objects": {
"type": "object",
"description": "Map of object_id to CanonicalObject.",
"additionalProperties": { "$ref": "objects.json" }
},
"facets": {
"type": "object",
"description": "Map of facet_id to Facet.",
"additionalProperties": { "$ref": "facets.json" }
},
"constraints": {
"type": "object",
"description": "Map of constraint_id to Constraint.",
"additionalProperties": { "$ref": "constraints.json" }
},
"provenance": {
"type": "object",
"description": "Map of provenance_id to Provenance record.",
"additionalProperties": { "$ref": "provenance.json" }
},
"routing_decision": {
"$ref": "routing.json#/$defs/RoutingDecision"
},
"gate_signals": {
"type": "array",
"items": { "$ref": "routing.json#/$defs/GateSignal" }
},
"resolution_log": {
"type": "array",
"items": {
"type": "object",
"properties": {
"operation": { "type": "string" },
"affected_refs": { "type": "array", "items": { "type": "string" } },
"result": { "type": "string" },
"note": { "type": "string" }
}
},
"description": "Ordered log of resolver operations applied to reach this state."
},
"open_contradictions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"constraint_refs": { "type": "array", "items": { "type": "string" } },
"description": { "type": "string" }
}
},
"description": "Contradictions that the resolver could not resolve. Synthesis must account for these."
},
"synthesis_answer": {
"type": "string",
"description": "Final synthesized answer. Populated only at stage=synthesized."
},
"synthesis_confidence": {
"type": "number",
"minimum": 0.0,
"maximum": 1.0,
"description": "Confidence in the synthesis answer."
},
"derivation_trace": {
"type": "array",
"items": { "type": "string" },
"description": "Ordered list of constraint_ids and resolver operations used to derive the synthesis answer."
}
}
}