|
| 1 | +# OGIT + OWL + DOLCE + Ractor in lance-graph-callcenter |
| 2 | + |
| 3 | +**Status**: Design Phase |
| 4 | +**Date**: 2026-05-11 |
| 5 | +**Goal**: Turn `lance-graph-callcenter` into the Rosetta Stone + Ractor orchestrator between spear and the high-performance lance-graph substrate (DnPath + CAM-PQ). |
| 6 | + |
| 7 | +## 1. Architecture Vision |
| 8 | + |
| 9 | +``` |
| 10 | +spear (verticals) |
| 11 | + ↓ (light contracts + need-to-have facades) |
| 12 | +lance-graph-callcenter |
| 13 | + ├── Rosetta Stone Layer |
| 14 | + │ ├── DnPath (context-addressable) + enriched semantics |
| 15 | + │ ├── CAM-PQ + Schema Labels + Codebook mapping |
| 16 | + │ └── ogit + owl_dolce (semantic translation) |
| 17 | + ├── Ractor Orchestration Layer |
| 18 | + │ ├── Membrane supervisor |
| 19 | + │ ├── Intent dispatch actors |
| 20 | + │ └── ExternalMembrane impl (LanceDB + DataFusion) |
| 21 | + └── Contracts (lance_graph_contract) |
| 22 | +``` |
| 23 | + |
| 24 | +**Key Rule**: Heavy ontology and semantic work stays behind the membrane. Spear consumers only see clean facades. |
| 25 | + |
| 26 | +## 2. Phased Implementation Plan |
| 27 | + |
| 28 | +### Phase 0 – Foundation (Contracts + Ontology Layer) |
| 29 | +- Stabilize `lance_graph_contract` with core OGIT primitives (`Label`, `OntologyDto`, `Schema`). |
| 30 | +- Define minimal OWL + DOLCE concepts that are useful for this domain (e.g., `Endurant`, `Perdurant`, `Quality`, `Role`, `Dependency`). |
| 31 | +- Create `ogit` and `owl_dolce` modules (can start inside `lance-graph-callcenter`). |
| 32 | + |
| 33 | +### Phase 1 – Semantic Substrate (Current Focus) |
| 34 | +- Extend `DnPath` (or add `SemanticDnPath` / `DnPathWithOntology`) to carry: |
| 35 | + - OGIT schema label(s) |
| 36 | + - OWL class / DOLCE category |
| 37 | + - Optional CAM centroid reference |
| 38 | +- Map CAM Codebook `label` + archetypes to OGIT/OWL concepts. |
| 39 | +- Add helper functions for context-addressable semantic lookup. |
| 40 | + |
| 41 | +### Phase 2 – Ractor Orchestration |
| 42 | +- Introduce Ractor inside `lance-graph-callcenter`. |
| 43 | +- Create membrane supervisor + actor pool for `ExternalMembrane` operations. |
| 44 | +- Expose Ractor-friendly APIs so spear can supervise or dispatch. |
| 45 | + |
| 46 | +### Phase 3 – Consumer Integration (Spear side) |
| 47 | +- Spear verticals depend only on contracts + callcenter facade. |
| 48 | +- Heavy lifting (ontology, CAM-PQ, Lance) stays inside the membrane. |
| 49 | +- Consumers pull specific OGIT schemas or DOLCE categories on demand. |
| 50 | + |
| 51 | +### Phase 4 – Advanced Capabilities |
| 52 | +- Ontology-guided CAM training / semantic loss. |
| 53 | +- Hybrid vector + OWL reasoning paths. |
| 54 | +- Full Ractor supervision tree across the membrane. |
| 55 | + |
| 56 | +## 3. What Should "Click" into lance-graph-callcenter from Spear |
| 57 | + |
| 58 | +From spear’s perspective, `lance-graph-callcenter` should expose: |
| 59 | + |
| 60 | +- `ExternalMembrane` trait (already exists) |
| 61 | +- Enriched `DnPath` / semantic navigation |
| 62 | +- OGIT schema label lookup + OWL/DOLCE classification helpers |
| 63 | +- Ractor-friendly async dispatch (supervisable) |
| 64 | +- Clean `Intent` types that carry semantic context |
| 65 | + |
| 66 | +Spear should **not** need deep knowledge of CAM-PQ internals or Arrow layouts. |
| 67 | + |
| 68 | +## 4. Immediate Next Technical Steps (Starting Now) |
| 69 | + |
| 70 | +1. Extend `dn_path.rs` with optional semantic annotations (non-breaking). |
| 71 | +2. Create `ogit_owl_dolce.rs` module inside `lance-graph-callcenter`. |
| 72 | +3. Define mapping between CAM archetypes / codebook labels and OGIT/OWL/DOLCE. |
| 73 | +4. Update `lib.rs` re-exports and documentation. |
| 74 | + |
| 75 | +## 5. Design Principles |
| 76 | + |
| 77 | +- **Contracts first**: Ontology and `lance_graph_contract` must be stable before heavy consumer work. |
| 78 | +- **Membrane as Rosetta Stone**: `lance-graph-callcenter` translates between semantic world and high-performance substrate. |
| 79 | +- **Ractor as orchestrator**: Use Ractor for supervision and dispatch inside the membrane. |
| 80 | +- **Need-to-have in consumers**: Spear verticals only import what they actually use. |
| 81 | +- **Performance preserved**: All extensions must keep the zero-copy + O(1) characteristics of DnPath + CAM-PQ. |
| 82 | + |
0 commit comments