Files
ucwm/schemas/provenance.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

81 lines
2.6 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "ucwm/schemas/provenance.json",
"title": "Provenance",
"description": "Tracks where every fact, object, facet, and constraint came from. Enables failure localization and explainability.",
"type": "object",
"required": ["provenance_id", "record_type", "source_module", "timestamp"],
"additionalProperties": false,
"properties": {
"provenance_id": {
"type": "string",
"description": "Unique identifier. Format: P{sequence}"
},
"record_type": {
"type": "string",
"enum": ["object_proposal", "facet_attachment", "constraint_emission", "resolver_operation", "object_merge", "object_split", "synthesis_step"],
"description": "What kind of operation created this provenance record."
},
"source_module": {
"type": "string",
"description": "Module ID that triggered this event."
},
"input_refs": {
"type": "array",
"items": { "type": "string" },
"description": "IDs of objects, facets, or constraints that were inputs to the operation.",
"default": []
},
"output_refs": {
"type": "array",
"items": { "type": "string" },
"description": "IDs of objects, facets, or constraints produced by the operation.",
"default": []
},
"evidence_span": {
"type": "object",
"description": "Text span that provided evidence for this operation.",
"properties": {
"text": { "type": "string" },
"start": { "type": "integer" },
"end": { "type": "integer" }
}
},
"confidence": {
"type": "number",
"minimum": 0.0,
"maximum": 1.0
},
"timestamp": {
"type": "string",
"description": "ISO 8601 timestamp of when this operation occurred."
},
"notes": {
"type": "string",
"description": "Optional free-text note. For debugging only — not part of the reasoning chain."
}
},
"examples": [
{
"provenance_id": "P1",
"record_type": "object_proposal",
"source_module": "entity_specialist",
"input_refs": [],
"output_refs": ["E1"],
"evidence_span": { "text": "Alice", "start": 0, "end": 5 },
"confidence": 0.97,
"timestamp": "2026-05-01T00:00:00Z"
},
{
"provenance_id": "P4",
"record_type": "resolver_operation",
"source_module": "resolver",
"input_refs": ["C1", "C2", "C3"],
"output_refs": ["Q_alice_final"],
"confidence": 0.99,
"timestamp": "2026-05-01T00:00:01Z",
"notes": "Arithmetic resolution: 5 - 2 = 3"
}
]
}