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:
166
examples/temporal_001.json
Normal file
166
examples/temporal_001.json
Normal file
@@ -0,0 +1,166 @@
|
||||
{
|
||||
"_comment": "Temporal chain example: multi-event sequence with explicit and implicit ordering.",
|
||||
"input_text": "The meeting started at 9am. Alice arrived after it began. She left before noon.",
|
||||
|
||||
"stage_post_gate": {
|
||||
"gate_signals": [
|
||||
{ "gate_id": "has_entity_reference", "activated": true, "confidence": 0.97 },
|
||||
{ "gate_id": "has_coreference", "activated": true, "confidence": 0.88 },
|
||||
{ "gate_id": "has_temporal_relation", "activated": true, "confidence": 0.99,
|
||||
"evidence_spans": [{"text": "at 9am"}, {"text": "after"}, {"text": "before noon"}] },
|
||||
{ "gate_id": "has_state_change", "activated": true, "confidence": 0.85 }
|
||||
]
|
||||
},
|
||||
|
||||
"stage_post_proposal": {
|
||||
"objects": {
|
||||
"E1": {
|
||||
"object_id": "E1",
|
||||
"object_kind": "entity",
|
||||
"status": "active",
|
||||
"confidence": 0.96,
|
||||
"canonical_label": "Alice",
|
||||
"aliases": ["She", "her"],
|
||||
"source_module": "entity_specialist"
|
||||
},
|
||||
"EV_meeting": {
|
||||
"object_id": "EV_meeting",
|
||||
"object_kind": "event",
|
||||
"status": "active",
|
||||
"confidence": 0.97,
|
||||
"surface_span": { "text": "meeting", "start": 4, "end": 11 },
|
||||
"canonical_label": "meeting",
|
||||
"source_module": "entity_specialist"
|
||||
},
|
||||
"EV_meeting_start": {
|
||||
"object_id": "EV_meeting_start",
|
||||
"object_kind": "event",
|
||||
"status": "active",
|
||||
"confidence": 0.97,
|
||||
"surface_span": { "text": "started", "start": 12, "end": 19 },
|
||||
"canonical_label": "meeting_start",
|
||||
"source_module": "entity_specialist"
|
||||
},
|
||||
"EV_arrival": {
|
||||
"object_id": "EV_arrival",
|
||||
"object_kind": "event",
|
||||
"status": "active",
|
||||
"confidence": 0.95,
|
||||
"surface_span": { "text": "arrived", "start": 33, "end": 40 },
|
||||
"canonical_label": "alice_arrival",
|
||||
"source_module": "entity_specialist"
|
||||
},
|
||||
"EV_departure": {
|
||||
"object_id": "EV_departure",
|
||||
"object_kind": "event",
|
||||
"status": "active",
|
||||
"confidence": 0.94,
|
||||
"surface_span": { "text": "left", "start": 57, "end": 61 },
|
||||
"canonical_label": "alice_departure",
|
||||
"source_module": "entity_specialist"
|
||||
},
|
||||
"T_9am": {
|
||||
"object_id": "T_9am",
|
||||
"object_kind": "quantity",
|
||||
"status": "active",
|
||||
"confidence": 0.99,
|
||||
"surface_span": { "text": "9am", "start": 23, "end": 26 },
|
||||
"canonical_label": "09:00",
|
||||
"source_module": "temporal_specialist"
|
||||
},
|
||||
"T_noon": {
|
||||
"object_id": "T_noon",
|
||||
"object_kind": "quantity",
|
||||
"status": "active",
|
||||
"confidence": 0.99,
|
||||
"surface_span": { "text": "noon", "start": 69, "end": 73 },
|
||||
"canonical_label": "12:00",
|
||||
"source_module": "temporal_specialist"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"stage_post_specialist": {
|
||||
"constraints": {
|
||||
"C_t1": {
|
||||
"constraint_id": "C_t1",
|
||||
"constraint_type": "starts_at",
|
||||
"argument_refs": ["EV_meeting_start", "T_9am"],
|
||||
"polarity": "positive",
|
||||
"strength": "hard",
|
||||
"status": "unresolved",
|
||||
"expression": "starts_at(meeting_start, 09:00)",
|
||||
"confidence": 0.97,
|
||||
"source_module": "temporal_specialist"
|
||||
},
|
||||
"C_t2": {
|
||||
"constraint_id": "C_t2",
|
||||
"constraint_type": "after",
|
||||
"argument_refs": ["EV_arrival", "EV_meeting_start"],
|
||||
"polarity": "positive",
|
||||
"strength": "hard",
|
||||
"status": "unresolved",
|
||||
"expression": "after(alice_arrival, meeting_start)",
|
||||
"confidence": 0.96,
|
||||
"source_module": "temporal_specialist"
|
||||
},
|
||||
"C_t3": {
|
||||
"constraint_id": "C_t3",
|
||||
"constraint_type": "before",
|
||||
"argument_refs": ["EV_departure", "T_noon"],
|
||||
"polarity": "positive",
|
||||
"strength": "hard",
|
||||
"status": "unresolved",
|
||||
"expression": "before(alice_departure, 12:00)",
|
||||
"confidence": 0.95,
|
||||
"source_module": "temporal_specialist"
|
||||
},
|
||||
"C_t4": {
|
||||
"constraint_id": "C_t4",
|
||||
"constraint_type": "before",
|
||||
"argument_refs": ["EV_arrival", "EV_departure"],
|
||||
"polarity": "positive",
|
||||
"strength": "soft",
|
||||
"status": "unresolved",
|
||||
"expression": "before(alice_arrival, alice_departure)",
|
||||
"confidence": 0.88,
|
||||
"source_module": "temporal_specialist"
|
||||
},
|
||||
"C_coref": {
|
||||
"constraint_id": "C_coref",
|
||||
"constraint_type": "same_entity",
|
||||
"argument_refs": ["E1", "E_she"],
|
||||
"polarity": "positive",
|
||||
"strength": "hard",
|
||||
"status": "unresolved",
|
||||
"expression": "same_entity(Alice, She)",
|
||||
"confidence": 0.90,
|
||||
"source_module": "entity_specialist"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"stage_resolved": {
|
||||
"_notes": "All temporal constraints resolved. Ordering chain: meeting_start (09:00) → alice_arrival → alice_departure (< 12:00).",
|
||||
"open_contradictions": [],
|
||||
"ordering_chain": [
|
||||
"EV_meeting_start at T_9am",
|
||||
"EV_arrival after EV_meeting_start",
|
||||
"EV_departure before T_noon",
|
||||
"EV_arrival before EV_departure (soft, consistent)"
|
||||
]
|
||||
},
|
||||
|
||||
"stage_synthesized": {
|
||||
"synthesis_mode": "explain",
|
||||
"answer": "The meeting started at 9am. Alice arrived after it began and left before noon.",
|
||||
"confidence": 0.93,
|
||||
"derivation_trace": [
|
||||
"C_t1: starts_at(meeting_start, 09:00) — resolved",
|
||||
"C_t2: after(alice_arrival, meeting_start) — resolved",
|
||||
"C_t3: before(alice_departure, 12:00) — resolved",
|
||||
"C_t4: before(alice_arrival, alice_departure) — resolved (consistent with C_t2, C_t3)",
|
||||
"C_coref: same_entity(Alice, She) — merged"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user