|
| 1 | +# Lance-Graph Backend Package (Ontology + Cognitive Fabric) |
| 2 | + |
| 3 | +**Generated**: 2026-05-11 |
| 4 | +**Context**: Analysis of AdaWorldAPI/lance-graph repo, focusing on `lance-graph-ontology` and `lance-graph-cognitive/src/fabric` |
| 5 | + |
| 6 | +## What is included in this package |
| 7 | + |
| 8 | +This zip contains: |
| 9 | + |
| 10 | +1. **firefly_frame.rs** - The actual 16384-bit Firefly Frame microinstruction format from the repo (the "cognitive CPU" frame spec that supports NARS, Cypher, Lance, Causal, Quantum, Memory, Control languages). |
| 11 | + |
| 12 | +2. **Current backend status** (from repo exploration): |
| 13 | + - `lance-graph-ontology` crate has **OGIT-canonical ontology spine** scaffolding started. |
| 14 | + - No DOLCE or OWL support yet. |
| 15 | + - Bridges for external namespaces (SharePoint, Email). |
| 16 | + - Bilingual DTO surface mentioned in commits. |
| 17 | + |
| 18 | +3. **Proposed extensions** (new files in `proposed/`): |
| 19 | + - `ogit_dolce_spine.rs` — Rust foundation for OGIT spine aligned with DOLCE categories (highly recommended for NARS/cognitive compatibility). |
| 20 | + - `owl_support.rs` — Basic OWL import/export sketch. |
| 21 | + - `fabric_ontology_bridge.rs` — Glue to connect the ontology spine to the cognitive fabric / Firefly Frame / shader driver. |
| 22 | + |
| 23 | +## Current State Summary (Double-check) |
| 24 | + |
| 25 | +| Component | Status in `lance-graph-ontology` | Recommendation | |
| 26 | +|------------------------|-------------------------------------------|----------------| |
| 27 | +| OGIT spine | Scaffolding exists (commit: "scaffold the OGIT-canonical ontology spine") | Keep as project canonical layer | |
| 28 | +| DOLCE | **Absent** | Add alignment (especially Endurant/Perdurant/Quality for cognitive grounding) | |
| 29 | +| OWL | **Absent** | Add serialization layer for interoperability | |
| 30 | +| Connection to cognitive fabric (`firefly_frame`, shader-driver) | Not connected yet | Use the proposed bridge | |
| 31 | + |
| 32 | +**OGIT** here appears to be used as the internal canonical ontology (possibly "Ontology for General Intelligence Tasks" or geospatial variant — the spine is the core). |
| 33 | + |
| 34 | +## Why DOLCE + OGIT + OWL matters for your architecture |
| 35 | + |
| 36 | +- **DOLCE** provides excellent foundational categories for cognitive/NARS-style reasoning (perdurants for events/processes that map to NARS temporal inference and Firefly "CONTEXT" qualia/truth values). |
| 37 | +- **OGIT spine** = your project-specific canonical model. |
| 38 | +- **OWL** = standard way to import/export ontologies and reason externally. |
| 39 | +- **Firefly Frame** already has language prefix for **NARS (0x3)** and **Causal (0x4)** — perfect place to ground in a DOLCE-aligned ontology. |
| 40 | + |
| 41 | +## Python Scripts Rule (Important) |
| 42 | + |
| 43 | +**All Python scripts in this project are to be treated as an internal convenience layer** around the already existing **MCP tool calls** (core Rust engine, ontology spine, cognitive fabric / Firefly Frame encoder, graph query engines, etc.). |
| 44 | + |
| 45 | +- Never duplicate core logic in Python. |
| 46 | +- Python only adds ergonomics, high-level orchestration, validation, and developer-friendly APIs. |
| 47 | +- The real work (OGIT+DOLCE spine, Firefly Frame encoding, NARS inference, Cypher/Lance execution) always happens in Rust via PyO3. |
| 48 | + |
| 49 | +The new `python/convenience/lance_graph_convenience.py` demonstrates this pattern. |
| 50 | + |
| 51 | +## How to use this package |
| 52 | + |
| 53 | +1. Copy `firefly_frame.rs` into your `crates/lance-graph-cognitive/src/fabric/` |
| 54 | +2. Create `crates/lance-graph-ontology/src/ontology/` and add the proposed `ogit_dolce_spine.rs` |
| 55 | +3. Implement the bridge so Firefly Frames can carry ontology-typed payloads. |
| 56 | +4. Use `python/convenience/lance_graph_convenience.py` as the recommended Python entry point (it already follows the "convenience layer around MCP" rule). |
| 57 | + |
| 58 | +## Next steps I can help with |
| 59 | + |
| 60 | +- Full implementation of the OGIT+DOLCE spine (Rust) |
| 61 | +- Mapping specific DOLCE classes to NARS terms |
| 62 | +- Integration code between ontology and the 16384-bit Firefly Frame |
| 63 | +- OWL <-> Rust struct bidirectional mapping |
| 64 | +- More convenience methods in the Python layer (following the internal convenience rule) |
| 65 | + |
| 66 | +Just say the word and I'll iterate on any of the proposed files. |
| 67 | + |
| 68 | +--- |
| 69 | +*This package was created because full `git clone` is not possible in the current execution environment. All original code is fetched from the public GitHub repo.* |
0 commit comments