# Subsystem Glossary

```mermaid
classDiagram
  class Ori {
    +identity
    +eventHistory
    +goals
    +relationships
  }
  class Moirai {
    +routeModelTier()
    +auditInference()
  }
  class Clio {
    +storeMemory()
    +recallContext()
  }
  class Ninhursag {
    +planBehavior()
    +driveEmbodiment()
  }
  class EgbeProtocol {
    +replicateState()
    +routeSquadComms()
  }
  Ori --> Moirai : requests cognition
  Ori *-- Clio : durable memory
  Ori --> Ninhursag : expresses intent
  Ori --> EgbeProtocol : crosses runtimes
```

The diagram assigns each mythic name a technical responsibility. The Ori is the
durable aggregate; model routing, memory, behavior, and cross-runtime transport
are collaborators whose outputs can be audited or replaced without redefining
identity.

V6 ("Egbe") is the agentic-companion universe: one persistent open world
(**Orun**) of autonomous, LLM-driven beings, a stewardship loop in which a
player discovers, raises, bonds with, and guides a company of them, and a
meta-hub (**Aye**) that carries those beings out into V2–V5 and home again. That
ambition needs a fixed vocabulary before anyone can reason about it, because V6
spreads a single agent across three independent authorities and four language
runtimes. This page is that vocabulary, and — more importantly — it pins every
name to the code that backs it on disk. The naming follows the Oshun house
convention of drawing on world mythology: Yoruba cosmology (**Egbe**, **Orun**,
**Ori**, **Aye**) for the product layers, and goddesses and underworld figures
(**Moirai**, **Vac**, **Clio**, **Ninhursag**, **Ereshkigal**) for the
subsystems that run them.

The job here is reconciliation. The glossary in
[../V6_ARCHITECTURE.md](../V6_ARCHITECTURE.md) declares the canonical subsystem
names; this page checks each against the real tree — **eighteen TypeScript/Rust
packages under `libs/v6/`, nine service apps under `apps/v6/`, fourteen V6
contracts under `libs/contracts/src/v6/`, and one Unreal Engine 5.5 project at
`V6/ue/` carrying eighteen C++ modules** — and says plainly where a name outruns
its code. Read it as the index; the product rationale lives in
[./product-promise.md](./product-promise.md) and the runtime tiers, layout, and
build targets in
[./architecture-topology-and-layout.md](./architecture-topology-and-layout.md).

## What ships, honestly

The **new agent-simulation substrate is real and substantial.** The `libs/v6/`
new-substrate packages carry genuine domain logic, not renamed CRUD: the
**Moirai** kernel is a **5,732-line Rust crate** (`libs/v6/moirai-kernel/rust`)
with Clotho/Lachesis/Atropos tier budgets and a model-routing/audit ledger; the
**agent-behavior** crate (2,637 lines) ships a real HTN planner (`HtnPlanner`,
`decompose_common_goal`, `authored_common_goal_networks`) and a
personality-driven behavior tree (`evaluate_personality_behavior_tree`); the
**Ori** model (`ori-model`, 1,903 Rust + 3,134 TS lines) defines a nineteen-type
append-only event schema with projections and a cognition cache; and
**egbe-protocol** is a true three-binding wire protocol — a `prost` Rust crate
(1,675 lines), a **3,904-line generated protobuf** TS module, and 49 exported
helpers over squad-comms routing, ground-replication bandwidth caps, and Aje
commerce boundaries. Across the eighteen packages the TS index files alone total
**~26,800 lines**, and every package exports real functions (egbe-protocol 49,
egbe-studio 21, ori-model 20, lilith-agent-welfare 19, aye-bridge /
isis-agent-gen / memory-iris-agent / moirai-kernel / vac-intent 15 each).

The **Rust service workspace is real and deep where the work concentrates.**
`apps/v6/Cargo.toml` is a `resolver = "2"`, Rust-1.82 workspace with
`unsafe_code = "forbid"` set workspace-wide, composing seven services plus the
four `libs/v6` crates as members (~25,800 Rust lines total). Depth is honestly
uneven: `egbe-world-server` is **14,363 lines**, `egbe-ori-service` **4,949**,
`egbe-realtime-gateway` **3,945**, `egbe-pxstream-relay` **1,290** — while
`egbe-foundry-service` (703), `egbe-moirai-cluster` (523), and
`egbe-clio-service` (71) are thin orchestration shells whose heavy logic lives
in the libs they import. The two web entries (`egbe-web`, `egbe-web-fallback`)
are TypeScript browser apps (`@oshun/v6-egbe-web*`), with Playwright e2e.

The **UE5 project is exactly consistent.** Parsing `V6/ue/V6.uproject` yields 18
`Modules`; `ls V6/ue/Source/` yields 18 module directories — identical sets, no
spec-only modules and no orphans, each with a `*.Build.cs`. Three build targets
exist (`V6`, `V6Editor`, `V6PixelStreamingWorker`) and **55 engine plugins** are
enabled, including the full Mass Entity stack, StateTree, PCG, SmartObjects,
MetaHumanRuntime, VRM4U, Steam Audio, EOS, Pixel Streaming, and Gauntlet.

The honest gaps, named rather than implied:

- **Four UE modules are 11-line bootstrap skeletons** — `V6Net`, `V6Gameplay`,
  `V6Telemetry`, `V6OnlineServices` carry only `IMPLEMENT_MODULE`. So the
  glossary's `V6Net` "wire-format adapter to `@oshun/egbe-protocol`" is a _named
  seam_, not yet C++; the real protocol is the `egbe-protocol` crate and TS. A
  second tier (`V6Animation`, `V6Audio`, `V6Avatar`, `V6Cinematics`, `V6Input`,
  `V6Persistence`, `V6VFX`) is two-file. Depth concentrates in `V6Agent` (8
  `.cpp`), `V6World` (5), `V6Core`/`V6UI`/`V6Editor` (4 each), and `V6Tests`
  (21).
- **No authored binary content.** `V6/ue/Content/` holds **0 `.uasset` and 6
  `.umap`** — one entry map per district (`L_GroveOfBeginnings` … `L_Wilds`) —
  plus `.gitkeep` placeholders. The districts are **procedural C++ grounds**
  (`V6World/Private/V6OrunDistricts.cpp`, 763 lines of `AssembleDistrict()` /
  `AddStation()`), not hand-authored meshes, MetaHumans, VO, or cinematics. This
  updates the 2026-06-12 monolith disclosure, which described `Content/` as
  empty apart from `.gitkeep`; the six entry maps now exist, the binary art does
  not.
- **Game Feature plugins live one level deeper** than the monolith's tree shows
  — `V6/ue/Plugins/GameFeatures/` (10 plugins: 6 districts + 4 modes), not
  directly under `Plugins/`. Each is **content-only** (a `.uplugin`, one
  `GameFeatureData.uasset`, a JSON scene descriptor; **no `Source/`**), so the
  glossary's "Owns" column is _activation scope and data_, not C++. `VRM4U` is a
  vendored (untracked) avatar plugin sitting alongside `GameFeatures/`.
- **Provider- and ops-gated surfaces** — LLM cognition, voice ASR/TTS, EOS, and
  live cross-game incarnation against running V2–V5 realms — are honest
  fail-loud seams, not fabricated successes.

## The agent mind

V6's single most important structural decision is that **an agent is split
across three authorities, and none owns the others**: the Body (`Egbe-World`)
owns what physically happened, the Mind (`Moirai`) owns decisions, the Memory
(`Ori`) owns who the agent is. The mind is not a new model — it is assembled
from V1's cognition substrates and _scheduled_ across a whole population.

### Ori — the event-sourced memory (`libs/v6/ori-model`, `apps/v6/egbe-ori-service`)

`Ori` is authoritative for identity, biography, memory, relationships, values,
and capabilities, independent of any world shard or Aye realm. The model crate
defines an **append-only event log** (`ORI_EVENT_TYPES`, 19 entries: `Born`,
`Discovered`, `MemoryFormed`, `Reflected`, `RelationshipChanged`,
`ValueShifted`, `ObjectiveAccepted/Refused`, `ArcAdvanced`, `Crossroads`,
`Incarnated`, `Departed`, `Transcended`, `Died`, …) with typed payloads, vector
clocks, a `512`-event projection snapshot interval, and a cognition cache
(`CognitionCachedPayload`, material-change invalidation). The Rust crate
(`ori-model/rust/src/lib.rs`) mirrors the same types for the server, which is
the 4,949-line `egbe-ori-service` (Postgres event store + pgvector) that imports
`ori-model` directly as a workspace crate.

### Moirai — the tiered cognition kernel (`libs/v6/moirai-kernel`, `apps/v6/egbe-moirai-cluster`)

`Moirai` is authoritative for _decisions_: given perception and state it returns
intents and actions, owning no world state. The kernel crate names its three
fates as cognition tiers — **Clotho** (active-scene planning, `50,000`
token/active-minute budget, ≤24 scene agents), **Lachesis** (resident
reflection, `10 Hz` execution, ≤400 world agents), **Atropos** (game-day
summarization) — and ships model-right-sizing routing
(`haiku-class`/`sonnet-class`/`opus-class` candidates with quality bars) plus a
cognition-call audit ledger. The `egbe-moirai-cluster` service (523 lines) is a
deliberately thin scheduler shell over that crate and `egbe-protocol`; the
simulation logic is the crate. A **cognition outage costs richness, never the
world** — the cheap deterministic layer is co-located with the world server and
falls back to behavior-tree execution.

### The cognition stack and agent behavior (`libs/v6/cognition-stack`, `libs/v6/agent-behavior`)

`cognition-stack` is the integration seam to the V1 substrates: it assembles a
budgeted `AssembledCognitionRequest` from perception + Ori projection, runs
Sophia grounding (`SophiaGroundingBridge`), dispatches to Psyche
(`PsycheAgentBridge`), and gates the output through Isis policy
(`IsisBehaviorPolicyBridge`) — eleven exported functions plus a
context-assembly-limits constant over real context-assembly limits and locale
handling (`en-US`/`es-ES`/`yo-NG`). `agent-behavior` is the
fallback-and-planning brain: a Rust HTN planner and behavior tree, plus a TS
surface that turns a Vac transcript into an assigned objective
(`assignObjectiveFromVacTranscript`), learns from steward demonstration
(`learnFromStewardDemonstration`), advances agent-owned goal arcs, and enforces
minor-coded protection.

The **V1 cognition substrates** are reused wholesale through four thin adapters:
`memory-iris-agent` (episodic/semantic/reflective scopes + consent/deletion
limits, extending V1 Iris), `psyche-agent` (dialogue/voice/expression runtime +
turn-taking), `isis-agent-gen` (foundry generation workflow), and
`sophia-agent-grounding` (grounds backstory/knowledge/opinion in fact). On the
client, `V6Agent` is the embodiment: a real **Mass Entity** density-LOD system
(`V6AgentMassLODProcessor`, `V6AgentMassVisualizationTrait`,
`V6AgentDensityLODTypes`) plus a `V6AgentBehaviorStateTree` for server-driven
behavior playback — its `Build.cs` depends on `MassEntity`, `MassLOD`,
`MassRepresentation`, `MassSpawner`, and `StateTreeModule`.

## The world

The **Body** is `Egbe-World` (`apps/v6/egbe-world-server`, **14,363 lines** of
Rust — by far the deepest service): authoritative for transforms, physics,
navmesh, co-presence, and world time, ticking at 20 Hz, engine-agnostic on the
wire. It validates Moirai's intended actions against authoritative state (an
agent cannot walk through a wall because it "intended" to) and flushes durable
life-events to Ori. Its wire format is **`egbe-protocol`** — the `Egbe`
networking substrate expressed in three language bindings: the Rust `prost`
crate (`encode_wire_packet`, `decode_*`, `negotiate_protocol_handshake`), the
generated TS protobuf, and the _intended_ C++ `V6Net` adapter (today an 11-line
skeleton). Bandwidth is capped in code (`GROUND_REPLICATION_MAX_BPS = 256_000`,
`GROUND_REPLICATION_HZ = 20`, `GROUND_VISIBLE_AGENT_CAP = 32`).

Transport and reach are the V3 metaverse substrate, renamed and reused:
`Egbe-Gateway` (`apps/v6/egbe-realtime-gateway`, 3,945 lines —
WebTransport/WebRTC/WS + the voice SFU), `Egbe-PxStream`
(`apps/v6/egbe-pxstream-relay`, 1,290 lines + the `egbe-web-pxstream` TS player
wrapper), and `Egbe-WebFB` (the `egbe-web-fallback` app + the
`egbe-engine-web-fallback` three.js/WebGPU/Rapier-WASM wrapper). The canonical
client is the **UE5.5 project**, whose 18 modules split one concern apiece:
`V6Core` (subsystems, save, tags, V1-account bridge), `V6World` (replicated
shard model + the procedural Orun districts + PCG scatter), `V6Agent` (Mass
embodiment), `V6Avatar`/`V6Animation` (VRM + MetaHuman, motion-matching,
emotion-driven gait — the VRM4U-backed avatar runtime),
`V6UI`/`V6Audio`/`V6VFX`/`V6Cinematics` (presentation), and the thinner
`V6Input`/`V6Persistence` plus the skeleton
`V6Gameplay`/`V6Net`/`V6Telemetry`/`V6OnlineServices`.

The **six Districts of Orun** ship as content-only Game Feature plugins under
`V6/ue/Plugins/GameFeatures/` — `V6District_GroveOfBeginnings` (the Ninhursag
foundry/rearing grounds), `V6District_Ateliers` (work/craft/study),
`V6District_CommonsHeart` (social center), `V6District_Wilds` (frontier
discovery), `V6District_AncestorGrove` (the Ereshkigal lineage/memorial
district), and `V6District_Thresholds` (the Aye gates) — each backed by a
procedural `UV6*Ground` class and a thin `L_*.umap` entry map, with no `.uasset`
art yet. Four shard **modes** (`V6Mode_SoloHomestead`, `V6Mode_CoopVisit`,
`V6Mode_Commons`, `V6Mode_Incarnation`) gate which session topology is live.

## Communication

V6 has three channels by which meaning moves, and each is a named subsystem.

**Vac** (`libs/v6/vac-intent`) is the steward↔agent channel: voice ASR → an
**intent-grammar parser**
(`VAC_INTENT_GRAMMAR_FUNCTION_NAME = 'vac_parse_objective_intent'`) that emits a
structured `VacObjectiveIntent` (autonomy mode
`direct-tether`/`brief`/`standing-intent`/`free`, verb, target, constraints,
forbidden lines) under a `400 ms` acknowledgement budget, plus squad comms and a
negotiation model (`VacNegotiationDecision`:
`accept`/`clarify`/`counter-offer`/`defer`/`refuse`, with coercion-attempt
handling). On the client this is `V6Voice` (mic capture, push-to-talk/wake-word,
SFU routing, agent TTS) routing through the gateway's voice SFU. Non-voice
parity and squad routing also live in `egbe-protocol` (`SquadCommsRouteInput`,
`RoutedSquadCommsMessage`, banter-throttle windows).

**Clio** (`libs/v6/clio-story`, `apps/v6/egbe-clio-service`) is the
agent→narrative channel: it reads the Ori event log and produces the offline
**Chronicle**, surfaces emergent arcs, ranks significance
(`rankChronicleEventsBySignificance` against a `ClioSignificanceRubric`), and on
a terminal trigger (transcendence or death) mints the **Book of the Ori** with
Yemaya keepsakes. Honest split: the significance-ranking and
narrative-reconciliation engine is the 1,701-line TS lib; the
`egbe-clio-service` Rust app is a 71-line shell.

**Aye Bridge** (`libs/v6/aye-bridge`) is the agent→other-games channel:
cross-incarnation **passport minting** (`ORI_PASSPORT_SCHEMA_VERSION`, an
Isis-signed `AyeBridgeOriPassportEnvelope`), per-destination capability mapping
(`v2-maya`/`v3-lilith`/`v4-odysee`/`v5-oshun`, roles
fighter/citizen/operator/companion), passport minimisation per destination, and
the incarnation journal that flows deeds back into the Ori on return — 15
exported functions, mirrored by the `OriPassport` and `IncarnationJournal`
contracts. The in-world surfaces are the `Thresholds` district and
`V6Mode_Incarnation` (Tether-mode steward presence).

## Governance, foundry, and legacy

The lifecycle bookends and the policy spine are their own subsystems, because a
universe of autonomous beings needs both birth-governance and
death-with-dignity.

`isis-behavior-policy` is the **per-tick output gate** (seven exported
functions) every agent utterance and action passes through before it reaches the
world; `lilith-agent-welfare` enforces **steward-not-owner** semantics, welfare
signals, and crisis routing (19 exported functions) — the same Lilith safety
frame that governs a V1 chat, re-bound to embodied agents. `Ninhursag`
(`isis-agent-gen` + `apps/v6/egbe-foundry-service`, 703 lines) is the foundry:
discovery-seed generation and player-driven raising, both Isis-governed,
surfaced in the Grove of Beginnings. `Ereshkigal` (`libs/v6/ereshkigal-legacy`)
is endings and legacy: `evaluateDeparture`, `evaluateTranscendence`,
`evaluateDeath`, and `evaluateAncestorGrove` compute the elder-state
transitions, the four-facet bond health
(`reliability`/`respect`/`care`/`alignment`), the walkable lineage graph, and
the grief-Ori writes + Yemaya remembrances that the Ancestor Grove renders.

Underneath, the **fourteen V6 contracts** (`libs/contracts/src/v6/registry.ts`)
are the cross-language source of truth — `OriIdentityCore`, `OriEvent`,
`PersonalityModel`, `RelationshipEdge`, `CapabilityProfile`, `OriPassport`,
`Bond`, `StewardProfile`, `Objective`, `GoalArc`, `WorldShard`, `Crossroads`,
`IncarnationJournal`, `Chronicle` — each a Zod schema + fixture, split across
two domains (`ori-agent`, `world`) and two service surfaces (`ori`, `world`).
The remaining cross-domain extensions are conceptual reuse: **Themis**
adjudicates poaching/agent-harm/Commons disputes, **Aje** is the commerce
substrate (with hard forbidden-SKU boundaries baked into `egbe-protocol` — no
selling agents, bonds, or fate), and **Yemaya** renders Chronicle reels,
Book-of-the-Ori print editions, and memorials. `egbe-studio` is the TS
creator-tools glue behind the Egbe Studio surfaces.

## A worked trace: one agent tick

To show how the names connect, follow one decision through the layers. (1)
`egbe-world-server` computes an agent's perception and ships it over
`egbe-protocol` to (2) the `egbe-moirai-cluster`, which assigns the agent a
tier, pulls durable context from `egbe-ori-service` via the `ori-model`
projection, assembles a budgeted request in `cognition-stack`, grounds it
through `sophia-agent-grounding`, runs it on `psyche-agent`, and gates the
output through `isis-behavior-policy` and `lilith-agent-welfare`. (3) The
returned intent — say `ObjectiveAccepted`, perhaps born from a steward's spoken
brief parsed by `vac-intent` — is validated against authoritative state and
applied; if Moirai is unreachable, `agent-behavior`'s behavior tree keeps the
agent believable. (4) The durable life-event flushes to the Ori as an
`OriEvent`, where `clio-story` will later rank it for the Chronicle and, at the
end of the arc, `ereshkigal-legacy` will fold it into the lineage. Every noun in
that trace is a glossary name and a path in the tree — which is the whole point
of fixing the vocabulary first.

## Related

- [./product-promise.md](./product-promise.md) — what V6 commits to and why the
  Mind/Body/Memory split exists.
- [./architecture-topology-and-layout.md](./architecture-topology-and-layout.md)
  — the runtime tiers, the `apps/v6` Rust workspace, the UE module split, the
  three build targets, and the Game Feature plugin layout in full.
- [../V6_ARCHITECTURE.md](../V6_ARCHITECTURE.md) — the section hub; feature map
  `V6/V6_features.md`; backlog `V6/V6_TODOS.md`; dependencies
  `V6/V6_DEPENDENCIES.md`.
- [../../platform/overview.html](../../platform/overview.html) — the shared
  Oshun platform foundations (identity, contracts, event bus, residency, audit)
  the V6 services and the V1-account bridge build on.
