docs: sweep remaining 'Neo4j or Kuzu' references after ADR 0008
The earlier commit missed 8 spots that still presented the graph backend as undecided (00-overview x2, 12-storage x2, 13-microservice x2, 06-ingestion, plan/05). All now pinned to Neo4j per ADR 0008. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
A Lore Engine is a **reasoning substrate** for a high-fantasy world. It is not a CRM, not a wiki, and not a search engine. Its single product is this: *when an LLM asks a question about the world, it gets a precise, time-bound, contradiction-checked answer from the canonical source — and the answer can be traced back to the document it came from.*
|
||||
|
||||
The Lore Engine is built on top of [Cognee](https://github.com/topoteretes/cognee) — a self-hosted, MIT-licensed knowledge-graph framework with ~17.8k stars and an Apache 2.0 paper. Cognee provides the storage abstraction (Neo4j or Kuzu), the extraction pipeline (LLM-based entity/relation extraction), the embedding pipeline, and the agent-native `remember/recall/forget` API. The Lore Engine adds a typed high-fantasy ontology, a temporal model, a consistency engine, NPC knowledge scoping, and a TypeTemplate polymorphic extension system on top. Cognee is the substrate; the Lore Engine is the domain layer.
|
||||
The Lore Engine is built on top of [Cognee](https://github.com/topoteretes/cognee) — a self-hosted, MIT-licensed knowledge-graph framework with ~17.8k stars and an Apache 2.0 paper. Cognee provides the storage abstraction (**Neo4j** — pinned by ADR 0008, overriding Cognee's Kuzu default), the extraction pipeline (LLM-based entity/relation extraction), the embedding pipeline, and the agent-native `remember/recall/forget` API. The Lore Engine adds a typed high-fantasy ontology, a temporal model, a consistency engine, NPC knowledge scoping, and a TypeTemplate polymorphic extension system on top. Cognee is the substrate; the Lore Engine is the domain layer.
|
||||
|
||||
## Design goals, ranked
|
||||
|
||||
@@ -19,7 +19,7 @@ The Lore Engine is built on top of [Cognee](https://github.com/topoteretes/cogne
|
||||
|
||||
| Component | Status | What we keep |
|
||||
|---|---|---|
|
||||
| Storage abstraction (Neo4j 5.x or Kuzu + vector index) | Production | Substrate. We extend the schema, not replace it. Cognee stores the data; we add the typed labels and constraints. |
|
||||
| Storage abstraction (Neo4j 5.x + vector index — ADR 0008) | Production | Substrate. We extend the schema, not replace it. Cognee stores the data; we add the typed labels and constraints. |
|
||||
| Extraction pipeline (LLM-based entity/relation extraction) | Production | Prose path. Cognee handles the "give me a chunk of markdown, get me triples" step; we customize the prompt to emit Lore Engine typed entities. |
|
||||
| Embedding pipeline (vector embeddings of chunks + entities) | Production | Semantic search back-end. Cognee manages the embedding store; we query it through the `lore_about` and `cite` tools. |
|
||||
| Agent-native `remember/recall/forget` API | Production | Storage-agnostic interface. The Lore Engine wraps `recall` with typed ontology + time model. |
|
||||
|
||||
@@ -32,7 +32,7 @@ The structured path is the one that makes the engine *historically accurate*. Pr
|
||||
│
|
||||
▼
|
||||
Cognee-managed graph
|
||||
(Neo4j or Kuzu)
|
||||
(Neo4j — ADR 0008)
|
||||
│
|
||||
▼
|
||||
Consistency pipeline runs
|
||||
|
||||
@@ -25,7 +25,7 @@ The distinction matters: we don't manage Neo4j or the vector store; we manage th
|
||||
|
||||
## What the Lore Engine adds on top of the Cognee graph
|
||||
|
||||
The macro world graph lives in the Cognee-managed graph store (Neo4j or Kuzu). The Lore Engine's data-model extension adds the typed labels and constraints on top. Anything where the LLM will say *"traverse from A"* or *"find all X related to Y"* or *"is X connected to Y?"* is a typed node or edge in the graph.
|
||||
The macro world graph lives in the Cognee-managed graph store (**Neo4j** — ADR 0008). The Lore Engine's data-model extension adds the typed labels and constraints on top. Anything where the LLM will say *"traverse from A"* or *"find all X related to Y"* or *"is X connected to Y?"* is a typed node or edge in the graph.
|
||||
|
||||
- **Core entities (v1):** Person, Faction, Location, Item, Era, Date, Lineage, Culture, Deity, Language, MagicSystem, Title, Region, Material.
|
||||
- **Planes (v1.2):** `Setting` and `Plane` are first-class graph nodes. Plane relations (`REFLECTS`, `LAYER_OF`, `ADJACENT_TO`, `ACCESSIBLE_VIA`) are first-class edges. The `EXISTS_IN` and `LOCATED_IN` relations between entities and planes are stored here too. See `17-planes.md`.
|
||||
@@ -253,7 +253,7 @@ These rules are written in Cypher with Postgres lookups via Cognee's query API.
|
||||
|
||||
| Concern | Old v1.1 plan (5 stores) | Cognee-based v1.1 |
|
||||
|---|---|---|
|
||||
| Graph (people, factions, edges) | Hand-managed Neo4j | Cognee-managed (Neo4j or Kuzu) |
|
||||
| Graph (people, factions, edges) | Hand-managed Neo4j | Cognee-managed Neo4j (ADR 0008) |
|
||||
| Operational event log | Hand-managed Postgres | Cognee-managed Postgres + Lore Engine tables |
|
||||
| Vector search | Hand-managed Qdrant OR pgvector | Cognee-managed (pgvector or Qdrant) |
|
||||
| Session state | Hand-managed Redis | Cognee-managed (Redis or in-memory) |
|
||||
|
||||
@@ -54,7 +54,7 @@ On Cognee, the iteration loop is **minutes**, not hours. The Cognee MCP server i
|
||||
▼
|
||||
┌─────────────────────────────────────────────────────────────────────┐
|
||||
│ COGNEE STORAGE (managed by Cognee) │
|
||||
│ Graph (Neo4j or Kuzu) · Vector store · Postgres metadata │
|
||||
│ Graph (Neo4j) · Vector store · Postgres metadata │
|
||||
│ + Lore Engine operational tables (setting, lore_event, retcon, ...)│
|
||||
└─────────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
@@ -245,7 +245,7 @@ The Cognee-based architecture has **fewer** services to operate than the v1.1 pl
|
||||
- **Cognee MCP server** (1 process, the gateway)
|
||||
- **Lore Engine extension** (in-process with Cognee)
|
||||
- **Cognee data-pipelines** (template-watcher, consistency-pipeline — also in-process)
|
||||
- **Storage backend** (Neo4j or Kuzu, managed by Cognee)
|
||||
- **Storage backend** (Neo4j — ADR 0008, managed by Cognee)
|
||||
- **Postgres** (Cognee metadata + Lore Engine operational tables)
|
||||
- **Vector store** (Cognee-managed, pgvector or Qdrant)
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ User input never reaches the Cypher string directly. Every
|
||||
parameter declared in `parameters:` becomes a `$name` reference
|
||||
inside the Cypher body. The tool generator passes the user's
|
||||
tool-call arguments as Cypher parameters (`$bearer = "Elysia"`),
|
||||
which Cognee (via the Neo4j or Kuzu driver) treats as a bound
|
||||
which Cognee (via the Neo4j driver — ADR 0008) treats as a bound
|
||||
parameter — not as a string-concatenated query fragment. This
|
||||
is the only safe path; raw string interpolation would be a
|
||||
SQL-injection-class vulnerability.
|
||||
|
||||
Reference in New Issue
Block a user