Sprint 1: project skeleton, type system, and all architecture specs
- src/types.hpp: complete UCWM type system in C++20 — 19 enums, 11 facet data types, all core structs (CanonicalObject, Constraint, Facet, GateSignal, WorldState, etc.) with full JSON round-trip serialization - src/main.cpp: smoke test — constructs apple-problem WorldState by hand, serializes to JSON - tests/test_types.cpp: 19 tests, 123 assertions, all passing - CMakeLists.txt: CMake + CPM build with nlohmann/json, spdlog, Catch2 - schemas/: JSON Schema contracts for all UCWM data types - gates/, specialists/, resolver/, synthesis/: language-agnostic interface contracts and domain specs for all pipeline layers - docs/: architecture, vocabulary, decision matrices, roadmap (6 phases, 28 sprints), sprint_001, implementation_constraints Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
98
schemas/world_state.json
Normal file
98
schemas/world_state.json
Normal file
@@ -0,0 +1,98 @@
|
||||
{
|
||||
"$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."
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user