Files
ucwm/schemas/objects.json
bill b758d7ea60 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>
2026-05-01 16:09:55 -07:00

129 lines
4.0 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "ucwm/schemas/objects.json",
"title": "CanonicalObject",
"description": "The primary reusable referent inside UCWM. A stable anchor that facets and constraints attach to.",
"type": "object",
"required": ["object_id", "object_kind", "status", "confidence"],
"additionalProperties": false,
"properties": {
"object_id": {
"type": "string",
"description": "Unique identifier. Format: {kind_prefix}_{sequence} e.g. E1, O4, Q7",
"pattern": "^[A-Z][A-Z0-9]*_[0-9]+$|^[A-Z][0-9]+$"
},
"object_kind": {
"type": "string",
"enum": [
"entity",
"event",
"concept",
"proposition",
"relation_instance",
"procedure_step",
"code_object",
"quantity",
"claim",
"state"
],
"description": "The ontological kind of this object."
},
"status": {
"type": "string",
"enum": ["proposed", "active", "merged", "split", "invalidated"],
"description": "Lifecycle status. Proposed objects are unconfirmed. Merged objects were unified with another. Split objects produced multiple descendants.",
"default": "proposed"
},
"confidence": {
"type": "number",
"minimum": 0.0,
"maximum": 1.0,
"description": "Aggregate confidence that this object is correctly proposed."
},
"surface_span": {
"type": "object",
"description": "The text span(s) that evidence this object.",
"properties": {
"text": { "type": "string" },
"start": { "type": "integer" },
"end": { "type": "integer" }
},
"additionalProperties": false
},
"canonical_label": {
"type": "string",
"description": "Human-readable canonical name for this object."
},
"aliases": {
"type": "array",
"items": { "type": "string" },
"description": "Alternative names, pronouns, or references that may corefer to this object."
},
"merged_into": {
"type": "string",
"description": "object_id of the object this was merged into. Populated only when status=merged."
},
"split_from": {
"type": "string",
"description": "object_id of the object this was split from. Populated only when status=split."
},
"facet_refs": {
"type": "array",
"items": { "type": "string" },
"description": "IDs of Facet objects attached to this canonical object.",
"default": []
},
"constraint_refs": {
"type": "array",
"items": { "type": "string" },
"description": "IDs of Constraints that reference this object.",
"default": []
},
"evidence_refs": {
"type": "array",
"items": { "type": "string" },
"description": "IDs of evidence or provenance records supporting this object.",
"default": []
},
"provenance_refs": {
"type": "array",
"items": { "type": "string" },
"description": "IDs of Provenance records tracking how this object was created.",
"default": []
},
"source_module": {
"type": "string",
"description": "Module ID that proposed this object."
}
},
"examples": [
{
"object_id": "E1",
"object_kind": "entity",
"status": "active",
"confidence": 0.97,
"surface_span": { "text": "Alice", "start": 0, "end": 5 },
"canonical_label": "Alice",
"aliases": ["she", "her"],
"facet_refs": ["F_E1_ownership", "F_E1_temporal"],
"constraint_refs": ["C1", "C3"],
"evidence_refs": [],
"provenance_refs": ["P1"],
"source_module": "entity_specialist"
},
{
"object_id": "Q1",
"object_kind": "quantity",
"status": "active",
"confidence": 0.99,
"surface_span": { "text": "5 apples", "start": 10, "end": 17 },
"canonical_label": "5",
"facet_refs": ["F_Q1_quantity"],
"constraint_refs": ["C1"],
"evidence_refs": [],
"provenance_refs": ["P2"],
"source_module": "quantity_specialist"
}
]
}