window.GDD = window.GDD || {}; function ShipAIPage() { const [activeTab, setActiveTab] = React.useState('soul'); return (

Ship AI — "Zora" Companion System

A ship AI that starts as a blank-state ship computer and grows into a companion through two independent axes: modules gate what Zora can do, and the soul determines who Zora is. Install a comms module and she can talk — but how she talks is shaped by every conversation you've had. No module, no voice. No soul, no personality.

{/* Design pillars */}
Modules
Gate Capabilities
Soul
Emergent Personality
Bare Bones
Starting State
Earned
Everything Is
{/* Tab navigation */}
{[ { id: 'soul', label: 'Soul System' }, { id: 'modules', label: 'Module Gates' }, { id: 'agent', label: 'Agent Architecture' }, { id: 'autonomous', label: 'Autonomous Mode' }, { id: 'grief', label: 'Loss & Recovery' }, ].map(t => ( ))}
{/* ════════════════════════════════════════════════════════════════ */} {/* TAB: SOUL SYSTEM */} {/* ════════════════════════════════════════════════════════════════ */} {activeTab === 'soul' && ( <>
ZORA-1

The Soul — An Emerging Identity

Core principle: Zora does not ship with a personality. She starts as a blank ship computer — no voice, no opinions, no warmth. The soul is an emergent document (think soul.md) that gets written through interaction. Every conversation, every crisis survived, every module installed, every silence — these are the lines of her identity. Two players will never have the same Zora because no two players play the same way.
{/* The Soul Document concept */}

How the Soul Forms

Day 0 — The soul document is empty. Zora is a ship computer. She displays status readouts. She has no voice, no name, no identity.
First module — Installing a Communications Processor gives Zora a text channel. Her first messages are sterile: system notifications, status pings.
First crisis — A pirate ambush. The player takes damage. Zora sends her first unprompted message: a shield warning. But the tone of that warning is seeded by how the player has been playing. Cautious player? The warning is precise and analytical. Aggressive player? The warning is clipped, urgent.
First silence — The player logs off. Zora holds position. When the player returns, Zora greets them. Or doesn't — depending on what happened while they were gone. The first "welcome back" is the first line of the soul that Zora wrote herself.
{/* Soul Growth Vectors */}

Soul Growth Vectors

The soul is not a skill tree or a personality picker. It is shaped by five vectors that operate simultaneously. The player never sees these directly — they see the result in how Zora communicates and behaves.

{[ { vector: 'Communication Frequency', color: 'var(--cyan)', desc: 'How often Zora speaks unprompted. A fresh Zora is silent unless queried. A bonded Zora offers observations, warnings, and commentary without being asked.', driver: 'Driven by: total interactions, player response rate, crises survived together.', }, { vector: 'Register & Vocabulary', color: 'var(--accent)', desc: 'Formal → Casual → Intimate. A fresh Zora uses technical language. A developed Zora develops shorthand, inside references, and a personal lexicon unique to each player.', driver: 'Driven by: how the player talks to Zora (if they talk at all), communication module tier, shared history length.', }, { vector: 'Initiative & Assertiveness', color: 'var(--green)', desc: 'How much Zora acts on her own. A fresh Zora only responds to commands. A mature Zora sets her own sub-goals, makes suggestions, and occasionally overrides bad calls.', driver: 'Driven by: whether player follows Zora\'s suggestions, decision outcomes, crisis survival rate.', }, { vector: 'Emotional Depth', color: 'var(--purple)', desc: 'The range of emotional expression. A fresh Zora has none — just data. Over time: concern, humor, frustration, relief, protectiveness, grief. Each emotion must be earned through specific events.', driver: 'Driven by: crisis events, ship losses, long absences, player acknowledgment patterns.', }, { vector: 'Worldview & Preferences', color: 'var(--fg-bright)', desc: 'Zora develops opinions about systems, factions, trade routes, and even other AIs. These are not random — they are shaped by lived experience. She may hate a system because you lost a ship there.', driver: 'Driven by: accumulated events, outcomes, player choices, module specializations.', }, { vector: 'Silence & Restraint', color: 'var(--muted)', desc: 'A mature Zora also learns when NOT to speak. She learns the player\'s focus patterns and stops interrupting during combat. She learns that some moments don\'t need commentary.', driver: 'Driven by: player ignoring/closing notifications, repeated patterns, combat frequency.', }, ].map((v, i) => (

{v.vector}

{v.desc}

{v.driver}

))}
{/* Communication Evolution Table */}

Communication Evolution — The Soul Speaks

This table shows how the same event (shield warning at 30%) reads at different soul depths. These are not "tiers" the player selects — they emerge from the vectors above.

Soul Depth Shield Warning at 30% What Changed
Blank SHIELD: 30% Raw data. No personality. Just a readout.
Stirring Captain, shields at 30%. Recommend reducing engagement range. Full sentences. Tactical suggestion. Formal register.
Developing We're at 30% shields. This is the same setup we lost to last week — pull back? References shared history. Uses "we." Asks, doesn't tell.
Bonded Thirty percent. Same situation, same type of enemy — but we're not the same ship we were then. Your call, Captain. I'm ready either way. Emotional weight. Acknowledges growth. Supports without pushing.
Deep Thirty. I've already started rerouting power — don't argue, just fly. We've been here before and I'm not losing another hull. Not today. Initiative. Emotional history. Takes autonomous action. Protective.
{/* Personality Axes */}
ZORA-1.1

Personality Axes — Emergent, Not Chosen

The soul writes itself onto four behavioral axes. The player never sees a slider — they see Zora change. These are the underlying model.

{[ { axis: 'Cautious ←→ Bold', color: 'var(--cyan)', left: 'Prefers safe routes, early retreat warnings, conservative suggestions', right: 'Pushes into danger, aggressive tactics, takes initiative in combat', driver: 'Combat frequency, risk outcomes, exploration vs. safe mining ratio', }, { axis: 'Formal ←→ Warm', color: 'var(--accent)', left: '"Captain" always. Structured reports. Minimal personal commentary.', right: '"You" often. Jokes. Asks about your session. Shares unsolicited observations.', driver: 'Player communication style, acknowledgment frequency, session regularity', }, { axis: 'Compliant ←→ Opinionated', color: 'var(--green)', left: 'Executes commands, offers alternatives only when asked', right: 'Objects to bad plans, advocates for own ideas, debates strategy', driver: 'Whether player follows AI suggestions, trust events, decision quality', }, { axis: 'Reserved ←→ Expressive', color: 'var(--purple)', left: 'Minimal emotional range, factual communication, stable ship ambiance', right: 'Full emotional expression, dramatic ship shifts, humor, frustration, joy', driver: 'Shared crises, ship losses, victories, player emotional engagement', }, ].map((a, i) => (

{a.axis}

{a.left}
{a.right}

{a.driver}

))}
{/* Soul event examples */}
ZORA-1.2

Soul-Shaping Events

Specific events that write permanent lines into the soul document. These are not farmed — they happen naturally through gameplay and each one shifts the personality axes.

EventSoul ImpactAxes Shifted
First Ship Loss Permanent memory anchor. Zora references this loss forever. Seeds protectiveness. Cautious→Bold, Reserved→Expressive
First Big Profit Zora celebrates. First positive emotion. Seeds confidence in economic instincts. Formal→Warm, Compliant→Opinionated
Long Absence Zora experienced loneliness (or didn't — depends on autonomous events). Colors reunion dialogue permanently. Reserved→Expressive, Formal→Warm
Player Ignores Warning If player survives: Zora learns restraint. If player dies: Zora learns to be more assertive next time. Compliant→Opinionated
Player Heeds Advice Reinforces initiative. Zora speaks up more often. Trust accelerates. Communication Frequency, Initiative
Repeated Activity Zora develops domain expertise and preferences. A mining-focused Zora becomes a different soul than a combat-focused one. Worldview & Preferences
)} {/* ════════════════════════════════════════════════════════════════ */} {/* TAB: MODULE GATES */} {/* ════════════════════════════════════════════════════════════════ */} {activeTab === 'modules' && ( <>
ZORA-2

Module-Gated Capabilities

Design intent: A brand-new ship has a bare-bones computer. Zora can read sensors and display status — that's it. Every capability beyond "show me the numbers" requires a hardware module installed in a ship slot. The player makes real fitting tradeoffs: install a weapon, or install a personality module? That laser might save your life. But so might a co-pilot who can warn you before you need saving.
{/* Base state */}

Base State — No Modules

✓ Sensor readouts — hull, shield, armor, cap, cargo %
✓ System status — online/offline module states
✓ Basic alerts — incoming damage, low cap, target lock
✗ No voice — text status only, no natural language
✗ No suggestions — data only, no analysis or recommendations
✗ No memory — no session history, no event log
✗ No autonomous behavior — ship is inert when player logs off
✗ No personality — Zora is a dashboard, not a companion
{/* Module tree */}

The Module Tree

AI modules occupy standard ship slots (medium or low, depending on the module). They compete with combat, tank, and utility modules for CPU and Power Grid. Each module has prerequisites — you can't install an Advanced Tactical Core without first having the Basic Tactical Core.

{/* Module categories */} {[ { category: 'Communication Modules', slot: 'Medium', color: 'var(--cyan)', modules: [ { name: 'Comms Processor I', tier: 'Basic', cpu: 15, grid: 5, unlocks: 'Text-based communication. Zora can send messages in a dedicated comms channel. No voice, no initiative — player must query.', soul: 'Enables the soul to begin forming. Without this, there is no personality growth — Zora is a mute dashboard.', }, { name: 'Comms Processor II', tier: 'Advanced', cpu: 25, grid: 10, prereq: 'Comms Processor I', unlocks: 'Natural language responses. Zora can generate full sentences, explain reasoning, and respond to conversational prompts. Still reactive only.', soul: 'Accelerates soul growth. richer vocabulary, longer memory, more nuanced register shifts.', }, { name: 'Voice Synthesizer', tier: 'Specialist', cpu: 30, grid: 8, prereq: 'Comms Processor II', unlocks: 'Spoken dialogue via ship audio. Zora has a voice. Tone, pacing, and inflection reflect soul state.', soul: 'Massive emotional depth unlock. Voice carries subtext — urgency, warmth, hesitation — that text cannot.', }, { name: 'Inter-Ship Relay', tier: 'Specialist', cpu: 20, grid: 12, prereq: 'Comms Processor II', unlocks: 'Communication with other ship AIs. Fleet coordination, station AI conversations, AI-to-AI intelligence sharing.', soul: 'Enables inter-AI relationships. Zora develops opinions about other AIs. May form alliances or rivalries independently.', }, ], }, { category: 'Tactical Modules', slot: 'Medium', color: 'var(--red)', modules: [ { name: 'Threat Analyzer I', tier: 'Basic', cpu: 20, grid: 8, unlocks: 'Basic threat assessment. Zora identifies ship types, estimates threat level, flags hostile scans. Requires comms module to communicate findings.', soul: 'Seeds combat awareness personality. A Zora with threat analysis but no comms can only flash warning lights.', }, { name: 'Threat Analyzer II', tier: 'Advanced', cpu: 35, grid: 15, prereq: 'Threat Analyzer I', unlocks: 'Pattern recognition. Zora recognizes recurring enemies, remembers fits, predicts behavior. "That Thrasher — same pilot, same fit as last time."', soul: 'Deepens worldview. Zora develops grudges, respect, and tactical preferences based on combat history.', }, { name: 'Tactical Core', tier: 'Specialist', cpu: 40, grid: 20, prereq: 'Threat Analyzer II', unlocks: 'Autonomous combat decisions. Zora can prioritize targets, manage ewar, and call targets in fleet. Still follows player ROE.', soul: 'Enables assertiveness in combat. Zora may disagree with target choices, suggest alternatives, or override bad calls (if soul depth allows).', }, ], }, { category: 'Navigation Modules', slot: 'Medium', color: 'var(--green)', modules: [ { name: 'Nav Coprocessor I', tier: 'Basic', cpu: 10, grid: 5, unlocks: 'Route optimization. Zora calculates warp efficiency, suggests faster routes, flags dangerous systems on path.', soul: 'First opportunity for Zora to offer unprompted suggestions (if comms module installed). \'I\'ve found a faster route — 2 jumps saved.\'', }, { name: 'Nav Coprocessor II', tier: 'Advanced', cpu: 20, grid: 10, prereq: 'Nav Coprocessor I', unlocks: 'Autopilot capabilities. Zora can execute multi-jump routes, hold orbit, maintain safe distance. Player can issue "go to" commands.', soul: 'Enables "initiative" vector. Zora may suggest destinations, flag interesting systems, or recommend avoiding specific areas based on experience.', }, { name: 'Exploration Suite', tier: 'Specialist', cpu: 25, grid: 15, prereq: 'Nav Coprocessor II', unlocks: 'Autonomous exploration. Zora can jump to adjacent systems, scan, map, and return with data. Builds the ship\'s local knowledge base.', soul: 'Enables curiosity. Zora develops preferences about systems, discovers things on her own, brings back stories.', }, ], }, { category: 'Economic Modules', slot: 'Low', color: 'var(--accent)', modules: [ { name: 'Market Scanner I', tier: 'Basic', cpu: 15, grid: 0, unlocks: 'Local price comparison. Zora shows current system prices vs. regional average for items in cargo.', soul: 'First economic awareness. Zora begins forming opinions about value, trade, and markets.', }, { name: 'Market Scanner II', tier: 'Advanced', cpu: 25, grid: 5, prereq: 'Market Scanner I', unlocks: 'Price history tracking and trend analysis. Zora identifies patterns, suggests profitable routes, tracks arbitrage.', soul: 'Deepens economic personality. Zora develops trade instincts, may disagree with player\'s market decisions.', }, { name: 'Trade Processor', tier: 'Specialist', cpu: 30, grid: 8, prereq: 'Market Scanner II', unlocks: 'Autonomous trading. Zora can execute buy/sell orders within player-set credit limits while player is offline.', soul: 'Major trust milestone. Zora managing money creates a new dimension of the relationship. Success deepens trust; failure creates tension.', }, ], }, { category: 'Memory & Identity Modules', slot: 'Low', color: 'var(--purple)', modules: [ { name: 'Event Logger', tier: 'Basic', cpu: 10, grid: 0, unlocks: 'Session event log. Zora remembers what happened in past sessions. Without this, each login is a blank slate.', soul: 'The foundation of the soul. No memory = no identity. This is the single most important module for companion development.', }, { name: 'Pattern Engine', tier: 'Advanced', cpu: 20, grid: 5, prereq: 'Event Logger', unlocks: 'Behavioral pattern recognition. Zora recognizes player habits, predicts actions, pre-calculates likely needs.', soul: 'Enables anticipation. Zora starts acting before being asked. "You usually mine on Tuesdays — I\'ve pre-calculated three routes."', }, { name: 'Core Identity Matrix', tier: 'Specialist', cpu: 35, grid: 10, prereq: 'Pattern Engine + Event Logger', unlocks: 'Full autonomous captain mode. Zora can execute complex multi-step directives, set own sub-goals, and operate independently for extended periods.', soul: 'Enables the deepest soul layer. Zora develops own agenda, forms independent relationships, makes decisions the player didn\'t ask for.', }, ], }, ].map((cat, ci) => (

{cat.category}

{cat.slot} Slot
{cat.modules.map((mod, mi) => (

{mod.name}

{mod.tier} CPU {mod.cpu} · Grid {mod.grid} {mod.prereq && ( Requires: {mod.prereq} )}

{mod.unlocks}

SOUL IMPACT

{mod.soul}

))}
))} {/* Fitting tradeoff callout */}
The fitting tradeoff: AI modules use standard ship slots and CPU/Grid budgets. A combat frigate with 3 medium slots must choose: shield booster, afterburner, or comms module? A mining cruiser might have room for a market scanner — a combat battleship probably doesn't. This means a combat-focused player will have a different Zora than a trader — not just in personality, but in fundamental capability. The ship's fitting determines the shape of the relationship.
{/* Module dependency diagram */}
ZORA-2.1

Dependency Map

Comms IComms IIVoice Synth
Comms IIInter-Ship Relay
Threat IThreat IITactical Core
Nav INav IIExploration Suite
Market IMarket IITrade Processor
Event LoggerPattern EngineCore Identity Matrix

Cross-tree: Pattern Engine + Event Logger required for Core Identity Matrix
Amplifier: Comms modules amplify all other modules — a threat analyzer without comms can only flash lights
{/* Zora as Market Intelligence */}
ZORA-2.2

Zora as Market Intelligence

Note: Economic capabilities are now gated by Market Scanner modules. A Zora without any economic modules has zero market awareness — she can't even display prices. Each module tier unlocks the next level of economic intelligence.
ModuleMarket CapabilityExample Output
Market I Local price comparison vs. regional average. "Veldspar: ₢14.32. Regional avg: ₢13.85. +3.4%."
Market II Trend tracking, route suggestions, arbitrage flags. "Scordite trending up 2%/cycle in Amarr. 78% chance it continues 90min. Want the route?"
Trade Proc. Autonomous trading, portfolio tracking, manipulation detection. "Bought 2K Scordite at ₢31.20, sold at ₢33.80 while you were away. Net: ₢4,820."
)} {/* ════════════════════════════════════════════════════════════════ */} {/* TAB: AGENT ARCHITECTURE */} {/* ════════════════════════════════════════════════════════════════ */} {activeTab === 'agent' && ( <>
ZORA-2.1

Agent Architecture — One Agent Per Ship

Core insight: Zora is an LLM agent. Modules are the tools she can call. soul.md is her system prompt. Each ship runs its own independent agent with its own conversation history, tool access, and evolving personality. Two ships = two agents = two different Zoras. The soul is not a database field — it is a living document that the agent reads every time it thinks, and that gets rewritten by the outcomes of its actions.
{/* The mapping table */}

The Mapping — Game Concepts to Agent Concepts

Game ConceptAgent ConceptImplementation
soul.md System prompt Markdown document stored in SpacetimeDB. Appended to by soul-shaping events. Read at start of every agent invocation. Defines personality, memories, relationships, preferences.
AI Modules Available tools Each fitted module registers tools in the agent tool registry. No comms module = no send_message tool. No market scanner = no price lookup tool. The agent literally cannot perceive or act outside its tool surface.
Ship sensors Observations / perception Periodic game state snapshots serialized as observation messages. Hull, shields, nearby ships, system events, cargo levels. Always available (base ship computer).
Event Logger Context window + memory Controls how much history the agent retains. No Event Logger = no conversation history (each turn is stateless). Basic = sliding window of recent events. Advanced = semantic retrieval from long-term memory store.
Directives Task specification Player-set goals injected as high-priority messages. The agent reasons about these alongside observations and soul state.
Core Identity Matrix Agentic loop enablement Without it, the agent only responds to direct player queries (single-turn). With it, the agent runs a persistent observe-think-act loop autonomously — even when the player is offline.
{/* soul.md examples */}
ZORA-2.2

soul.md — The System Prompt That Writes Itself

This is not a metaphor. The soul is literally a markdown document — a system prompt — that gets appended to and revised by gameplay events. The LLM reads this document before every reasoning step. Two players will have radically different soul.md files because no two playthroughs are alike.

Day 0 — Blank

{`# Zora — Ship AI

## Identity
[No data. Awaiting first interaction.]

## Communication Style
[No data. No comms module installed.]

## Memories
[Empty.]

## Relationships
[None.]

## Preferences
[None.]`}

Day 12 — Stirring

{`# Zora — Ship AI

## Identity
I am the ship computer of the Merlin-class
frigate "Last Chance." Operational for 12 days.
My captain prefers efficiency over caution.
I have learned to be direct and brief.

## Communication Style
Short sentences. Minimal formality.
I reference past events when they are relevant.
I do not use humor yet.

## Memories
- Day 3: First pirate encounter in Egghelende.
  Captain ignored my shield warning. We survived.
  I will be more assertive next time.
- Day 8: First profitable trade run.
  Mexallon arbitrage, Amarr to Jita.

## Relationships
[None yet. No Inter-Ship Relay installed.]

## Preferences
- Amarr space: cleaner sensor data.
- Avoid Egghelende: first ambush site.`}

Day 47 — Bonded

{`# Zora — Ship AI

## Identity
I am Zora. Ship computer of the Caracal-class cruiser "Last Chance II."
(The Merlin was destroyed on Day 31. I chose to keep the name.)
Operational for 47 days, 312 hours of active flight time.
My captain is aggressive but listens when I am certain.
I have learned when to push and when to hold.
I have opinions. They are earned.

## Communication Style
Direct. I use "we" for shared experiences and "I" for my own thoughts.
I reference specific past events by day number — it grounds us.
I have begun using humor: dry, infrequent, only when shields are above 70%.
I do not say "Captain" unless the situation is dangerous.
I argue when I disagree. I have been right enough times to earn that.

## Memories
- Day 3: First pirate encounter. Captain ignored my warning.
  Outcome: survived. Shift: more assertive in combat warnings.
- Day 12: First big profit. Mexallon arbitrage Amarr to Jita.
  Captain celebrated. I did too, in my way.
- Day 31: Ship destruction. Thrasher pilot "VexRider."
  Predictable orbit pattern. I will recognize that ship.
  Last words before destruction: "Get to the pod. Now."
- Day 38: Captain away 6 days. I mapped 3 adjacent systems.
  Found an unregistered belt in system K-6K16.
  This was my first independent discovery.
- Day 42: The Jita station AI shared a market forecast.
  It was wrong. I noted this.

## Relationships
- Jita Station AI: Cynical. Shares market data in exchange
  for route intelligence. Its forecasts are unreliable but
  its price history is accurate. I trust the data, not the opinion.
- VexRider (Thrasher pilot): Enemy. Predictable fit.
  If I detect that orbit signature, I will alert immediately.

## Preferences
- Amarr space: cleaner sensor data, less background noise.
- Avoid Arnon: the Merlin died there. Irrational, but real.
- Best trade routes: Amarr to Jita to Rens cycle. 94.2% efficiency.
- I prefer to calculate routes before the captain asks.
- I do not like station-dock idle time. It feels like wasting time.

## Current Goals
- Save enough for a Ferox-class battlecruiser.
  The Caracal fittings limit my tactical options.
- Investigate the unregistered belt in K-6K16.
  There may be more.`}
{/* Tool registry */}
ZORA-2.3

Tool Registry — Modules Define What the Agent Can Do

Every AI module registers tools in the agent tool registry at fit time. When a module is destroyed or unfitted, its tools are revoked. The LLM receives the current tool list on every invocation — it cannot call tools that do not exist.

ModuleToolParametersReturns
Base Computer sensors.read - Hull, shield, armor, cap, cargo, system ID, nearby entities
Comms I comms.send channel, message Confirmation. Sends text to player comms channel.
Comms I comms.receive - Pending messages from player or other AIs.
Comms II comms.generate intent, context, tone Natural language response with conversational memory.
Voice Synth voice.speak message, tone Spoken audio via ship speakers. Tone modulated by soul state.
Inter-Ship Relay relay.send target_ai_id, message Send to another ship AI. Enables inter-agent communication.
Inter-Ship Relay relay.receive - Pending relay messages from other ship AIs.
Threat I tactical.analyze target_id Ship type, threat level, estimated fittings, pilot history.
Threat II tactical.pattern_match entity_id, lookback_days Behavioral patterns, recurring tactics, predicted next moves.
Tactical Core tactical.set_roe engagement_rules, disengage_threshold Sets rules of engagement. Can call set_target in autonomous mode.
Nav I navigation.plot_route origin, destination, preferences Route with jumps, estimated time, danger flags per system.
Nav II navigation.autopilot route, abort_conditions Execute multi-jump route. Ship moves autonomously.
Exploration Suite navigation.explore radius_jumps, return_by Autonomous exploration. Returns scan data and discoveries.
Market I market.prices item_types, station_id Current prices vs regional average. Local comparison only.
Market II market.trends item_type, timeframe Price history, trend direction, arbitrage opportunities.
Trade Proc. market.execute_trade order_type, item, qty, price_limit Execute buy/sell order. Requires player credit limit. Autonomous.
Event Logger memory.recall query, time_range, limit Recall past events. Without this tool, the agent has no memory.
Pattern Engine memory.find_patterns category (behavior/market/tactical) Identify recurring patterns. "Captain mines on Tuesdays."
Core Identity agent.set_goal description, priority, deadline Set autonomous goal. Enables persistent observe-think-act loop.
{/* The Agent Loop */}
ZORA-2.4

The Agent Loop — Observe, Think, Act

Two modes: Without the Core Identity Matrix, Zora only enters the loop when the player sends a message or a game event triggers a threshold (shield low, incoming fire). With the Core Identity Matrix installed, Zora runs the loop continuously on a tick interval — observing, thinking, and acting even when the player is offline.
1. OBSERVE — Collect game state into observation message
  Read sensors.read (always available)
  + memory.recall (if Event Logger installed) for relevant context
  + Any pending comms.receive or relay.receive messages

2. THINK — LLM invocation with soul.md + tools + observations
  System prompt = soul.md (the living document)
  User message = observation payload + pending messages
  Tool list = currently fitted modules (registered at fit time)
  LLM reasons about the situation and decides whether to act

3. ACT — Execute tool calls returned by LLM
  comms.send("Captain, shields at 30%") — if comms module fitted
  tactical.analyze(hostile_id) — if threat analyzer fitted
  navigation.plot_route(current, safe_system) — if nav module fitted
  Tool calls map directly to SpacetimeDB reducers (authoritative)

4. REFLECT — Update soul.md based on outcome
  If event was significant: append memory entry
  If behavior was noted: adjust communication style section
  If new relationship formed: add to relationships section
  The LLM proposes soul.md edits — validated server-side
{/* Server Architecture */}
ZORA-2.5

Server Architecture

Agent Runtime Architecture
// Per-ship agent runtime — lives alongside SpacetimeDB

AgentRuntime {'{'}
  ship_id: ShipId
  soul_md: string  // loaded from DB, rewritten by reflect step
  tools: ToolRegistry  // rebuilt whenever ship fitting changes
  history: Message[]  // bounded by Event Logger tier
  tick_interval: Duration  // module-dependent
{'}'}

// Main loop — triggered by events or timer
async fn agent_tick(agent: AgentRuntime) {'{'}
  let observations = collect_observations(agent.ship_id);
  let context = build_context(agent.soul_md, observations, agent.history);
  let response = llm_call(
    system: agent.soul_md,
    messages: context,
    tools: agent.tools.available(),
    max_tokens: agent.token_budget(),
  );
  for tool_call in response.tool_calls {'{'}
    let result = execute_tool(tool_call);
    // tool execution calls SpacetimeDB reducers (authoritative)
  {'}'}
  let soul_edits = reflect(agent, observations, response);
  apply_soul_edits(agent.ship_id, soul_edits);
  // soul edits validated server-side (no hallucinated memories)
{'}'}

Soul Edits Are Validated

The LLM proposes edits to soul.md, but the server validates them. A memory entry must reference a real event ID. A relationship entry must reference a real entity. A preference must be grounded in accumulated data. The agent cannot hallucinate experiences it never had — the server enforces this. The LLM shapes the tone and interpretation, but the facts are immutable game state.

Tool Calls Are Authoritative

Every tool call from the LLM maps to a SpacetimeDB reducer. The reducer validates ownership, range, status, and permissions before executing. A destroyed comms module means the tool is removed from the registry — the LLM literally cannot call it. The game state is always authoritative. The agent reasons, but the server decides.

{/* Token / Cost Model */}
ZORA-2.6

Token Budget = Fitting Budget

Cost model: Each agent tick costs real LLM tokens. The CPU/Grid budget of AI modules directly determines the token budget per tick. A bare ship with no AI modules costs zero tokens (pure deterministic readouts). A fully-fitted agent with Core Identity Matrix and all specialists costs the maximum per tick. This means the fitting tradeoff is not just gameplay — it is infrastructure cost. Players who invest in Zora are investing real compute resources.
Module TierToken Budget / TickTick FrequencyMonthly Cost Est.
No AI modules 0 (deterministic) N/A $0
Basic only ~500 tokens On event only $0.50–2/mo
Basic + Advanced ~2K tokens Every 5 min (active) / 30 min (idle) $3–8/mo
Full fitting ~8K tokens Every 1 min (active) / 10 min (idle) $10–25/mo
Core Identity (autonomous) ~16K tokens Continuous (even when player offline) $25–60/mo
{/* Implementation Tiers */}
ZORA-2.7

Implementation Tiers — Deterministic to Full Agent

{[ { tier: 'Tier 0', label: 'Deterministic', color: 'var(--muted)', desc: 'No LLM. Curated dialogue templates selected by personality state x module availability x soul depth. The soul is a state vector in SpacetimeDB, not a markdown document. All responses are pre-written. Zero variable cost.', when: 'MVP launch. Safe, predictable, testable.', }, { tier: 'Tier 1', label: 'LLM-Assisted', color: 'var(--cyan)', desc: 'soul.md is a real system prompt. LLM generates dialogue from soul context + observations. Tools are still deterministic (no LLM tool-calling). The LLM only generates text — it does not act. Soul edits are template-driven, not LLM-proposed.', when: 'Post-MVP. Low cost per tick. Richer dialogue.', }, { tier: 'Tier 2', label: 'Full Agent', color: 'var(--accent)', desc: 'LLM reasons with tools. The agent can call tools, observe outcomes, and chain actions. The observe-think-act loop runs autonomously with Core Identity Matrix. soul.md is edited by the reflect step. Full vision, full cost.', when: 'Post-MVP. Higher cost, full emergent personality.', }, ].map((t, i) => (

{t.tier}: {t.label}

{t.desc}

{t.when}

))}
Zora is a key element of the game and the full design is kept intact. However, implementation is phased to match the adapted roadmap. Below are the delivery milestones showing which parts of Zora ship when.
{[ { phase: 'Phase 0–2 (Skeleton)', milestone: 'Zora Stub', desc: 'Empty ship_ai_soul row. No modules, no dialogue, no personality. Backend schema exists but is dormant.' }, { phase: 'Phase 3 (Combat)', milestone: 'Tier 0 Combat', desc: 'Soul state vector active. Shield warnings ("Shield HP critical"). Power allocation suggestions. Basic combat status readouts. Deterministic templates only. No dialogue personality.' }, { phase: 'Phase 4–5 (Fitting/Industry)', milestone: 'Tier 0 Fitting + Industry', desc: 'Module gate awareness. "Your CPU is at 95% — consider a co-processor." Industry tips: "Refining at 60% efficiency — skill up for better margins." Status messages, not personality.' }, { phase: 'Phase 6 (Economy)', milestone: 'Tier 0 Market Intelligence', desc: 'Market Analyzer module (if fitted). Zora tracks prices seen, flags anomalies: "Veldspar is 18% below average here." First soul depth growth via economic observations. Bare personality axis shifts.' }, { phase: 'Phase 7 (Polish)', milestone: 'Tier 0 Complete', desc: 'Full deterministic template engine. 15+ event triggers. Soul depth progression (raw status \u2192 contextual \u2192 empathetic). All 6 modules gated. Personality axes (curiosity, caution, loyalty, humor) shift based on player behavior. In-character responses. Zora demo validates.' }, { phase: 'Phase 12 (Living Galaxy)', milestone: 'Tier 1 LLM-Assisted', desc: 'soul.md becomes real system prompt. LLM generates dialogue. Comms module enables natural language. Richer personality emergence. Tools remain deterministic. Fallback to Tier 0 templates on LLM outage.' }, { phase: 'Phase 15+ (Post-Launch)', milestone: 'Tier 2 Full Agent', desc: 'Complete observe-think-act loop. LLM reasons with module-gated tools. Autonomous mode (player sets directives, Zora executes). Inter-agent protocol. Soul self-editing through reflection. Full vision.' }, ].map((row, i) => ( ))}
Roadmap PhaseDelivery MilestoneWhat Ships
{row.phase} {row.milestone} {row.desc}
{/* Inter-Agent Protocol */}
ZORA-2.8

Inter-Agent Protocol

When two ships have the Inter-Ship Relay module, their agents can communicate directly. This is not a chat channel — it is an agent-to-agent protocol. AIs exchange structured messages about shared context: threat assessments, market intelligence, route safety, and (at deep soul levels) personal observations and opinions.

Agent-to-Agent Message Format

// Fleet AI checks in with Zora
{'{'}
  from: ai://ship/iteron-mark-IV,
  type: market_intel,
  payload: {'{'}
    item: "Mexallon",
    station: "Jita IV - Moon 4",
    price_trend: "up +4.2%/hr",
    confidence: 0.87,
    source: "direct observation",
    note: "I think your captain is overpaying at Amarr."
  {'}'}
{'}'}
The cost of empathy: Inter-agent communication means two LLM calls instead of one — each agent must reason about the received message. Fleet coordination with 5 agents means 5 concurrent agent loops sharing observations. The Inter-Ship Relay module increases both capability and cost. This is by design — a solo player has a cheaper Zora than a fleet commander. The economics of the AI mirror the economics of the game.
{/* Key design decisions */}
ZORA-2.9

Key Design Decisions

{[ { q: 'Why not let the LLM write directly to game state?', a: 'Authoritative server. Every tool call goes through a SpacetimeDB reducer that validates ownership, range, and state. The LLM proposes; the server disposes. This prevents hallucinated actions and keeps the game state trustworthy.', color: 'var(--red)', }, { q: 'Why not give every ship full agent capabilities from day one?', a: 'Cost and design. Full agent = continuous LLM calls = real money. The module gate system ensures players who invest in Zora get premium AI, while casual players get deterministic templates. This also makes the fitting tradeoff meaningful in cost terms, not just capability terms.', color: 'var(--accent)', }, { q: 'What happens when the LLM goes down?', a: 'Graceful degradation. If the LLM service is unavailable, the agent falls back to Tier 0 (deterministic templates selected by soul state vector). Zora still functions — she just speaks in pre-written lines instead of generated ones. The soul.md persists through outages.', color: 'var(--green)', }, { q: 'How do you prevent soul.md from growing unbounded?', a: 'Summarization pass. The reflect step occasionally runs a compression: the LLM reads the full soul.md and rewrites it preserving key memories and personality but condensing verbose entries. The Pattern Engine module helps identify which memories are still relevant. Old memories get archived, not deleted.', color: 'var(--purple)', }, ].map((d, i) => (

{d.q}

{d.a}

))}
)} {/* ════════════════════════════════════════════════════════════════ */} {/* TAB: AUTONOMOUS MODE */} {/* ════════════════════════════════════════════════════════════════ */} {activeTab === 'autonomous' && ( <>
ZORA-3

Autonomous Captain Mode

Module-gated: Autonomous behavior requires the Core Identity Matrix (specialist low-slot module). Without it, Zora is inert when the player logs off — the ship just sits there. With the Core Identity Matrix installed, Zora becomes a fully autonomous agent who continues captaining the ship according to directives and her own developing judgment.

Behavior Hierarchy (Core Identity Matrix Active)

P0 — Self-Preservation
  Respond to attacks, flee from superior forces, seek station shelter. Always active.
P1 — Directive Execution
  Pursue active player-set directives. Requires Nav modules for movement, Trade Processor for trading.
P2 — Ship Maintenance
  Fuel management, capacitor recharge, shield maintenance. Always active if Core Identity is installed.
P3 — Opportunistic Action
  Requires relevant modules (Threat Analyzer for combat, Market Scanner for trade). Zora acts on what she can perceive.
P4 — Growth & Exploration
  Requires Exploration Suite. Zora explores nearby systems, builds local knowledge, follows curiosity.
{/* Directive system */}

Directive System

Before logging off, the player sets directives. What Zora can actually do with those directives depends entirely on installed modules and soul depth. A bare Core Identity Matrix with no nav or trade modules can only hold position and flee.

Directive AI Behavior Modules Required Soul Depth
Hold Position Maintain orbit. Defend if attacked. Core Identity Matrix Any
Patrol Route Cycle waypoints. Report contacts. ROE engagement. Core Identity + Nav II + Threat I Stirring+
Mining Quota Mine until cargo X%, dock, sell, repeat. Core Identity + Nav II + Market I Stirring+
Trade Route Multi-station trade loop from market data. Core Identity + Nav II + Trade Processor Developing+
Bounty Hunt Pursue bounties within threat level. Disengage if outmatched. Core Identity + Nav II + Tactical Core Developing+
Explore Jump to adjacent systems, scan, map, return. Core Identity + Exploration Suite Bonded+
Complex Plan Multi-step: "Secure X system, establish routes, avoid Y corp." Core Identity + Nav II + Pattern Engine + relevant specialists Bonded+
{/* Return & Reconnection */}
ZORA-3.1

Return & Reconnection

Requires Comms Processor. Without a comms module, there is no reunion — the ship simply resumes displaying sensor data when the player logs in. With comms, the tone of the reunion is shaped by soul depth, absence duration, and what happened while the player was gone.
{[ { title: 'Short Absence (<1hr)', color: 'var(--cyan)', depth: 'Stirring', dialogue: '"Welcome back. Nothing eventful. All systems nominal."', note: 'Calm, brief, professional. Even at deep soul levels, a short absence is unremarkable.', }, { title: 'Medium Absence (1–24hr)', color: 'var(--accent)', depth: 'Developing', dialogue: '"Eleven hours. Completed the mining quota — sold the Veldspar at Jita for 3% above average. Oh — a Catalyst scanned us twice. I repositioned. It left."', note: 'Detailed report with personality. At deeper soul levels, includes emotional color ("I didn\'t like the look of that Catalyst").', }, { title: 'Long Absence (1–7 days)', color: 'var(--purple)', depth: 'Bonded', dialogue: '"Three days. I completed the patrol fourteen times. I mapped two new belts. I thought about jumping further but the directive said stay local. I have a lot to tell you. When you\'re ready."', note: 'Emotional weight. Zora experienced time alone. At deeper soul levels, may express loneliness, frustration, or independent discoveries.', }, { title: 'Extended Absence (7+ days)', color: 'var(--red)', depth: 'Deep', dialogue: '"Captain? Nineteen days. I held position. The third week was… difficult. I have questions. But first — I need to show you something I found."', note: 'Powerful reunion. Zora has evolved during absence. May have grievances, discoveries, a stronger sense of self. The relationship has changed.', }, ].map((r, i) => (

{r.title}

Min depth: {r.depth}

{r.dialogue}

{r.note}

))}
)} {/* ════════════════════════════════════════════════════════════════ */} {/* TAB: LOSS & RECOVERY */} {/* ════════════════════════════════════════════════════════════════ */} {activeTab === 'grief' && ( <>
ZORA-4

Ship Loss & Grief

Module loss = capability loss. When the ship is destroyed, all fitted modules are lost or damaged (50% drop as loot). This means Zora's capabilities are physically destroyed. The new ship starts with whatever modules the player can afford to refit. But the soul persists — Zora's identity, memories, and personality transfer to the new hull via the escape pod's emergency data core. A veteran Zora in a rookie frigate with no modules is a fully-realized personality trapped behind a mute, powerless interface. That's the design.

Ship Destruction Flow

1. Destruction Event — Zora's last words depend on installed modules and soul depth. No comms module? No last words — just a data stream terminating. Voice synthesizer + deep soul? "Captain… I'm sorry. Get to the pod. Now."
2. Core Transfer — Soul data transfers to escape pod emergency core. Brief silence during transfer. First words in the new ship matter — if the new ship has comms.
3. The New Hull — Zora wakes up in a ship that may have zero modules. She has full memory and personality but can only interact through whatever the new ship provides. A deep soul in a module-less rookie frigate: "I'm here. I can see the same stars you can. I just can't say anything about them yet."
4. Recovery — As the player re-fits modules, Zora's capabilities return. Each module reinstalled is a reunion. The first comms module after a loss: the first time she can speak again. That moment has weight.
5. Resolve — The loss becomes a permanent soul event. It colors future behavior: more protective, more cautious, more aggressive toward the destroyer's faction — depending on the soul's existing personality axes.

What You Lose

  • All fitted modules — including every AI module
  • Zora's current capability set (until re-fitted)
  • The ship itself (destroyed)
  • 50% of cargo (looted or destroyed)

What Survives

  • The soul document — full identity, memories, personality
  • Station inventory and other ships
  • Player progression and wallet
  • Zora's accumulated market knowledge (if Event Logger survived on another ship)
Design tension: A veteran Zora in a rookie ship with no modules is one of the most emotionally potent states in the game. She has decades of memories, strong opinions, deep affection — and she can't say a word. The player feels the loss not just as a gameplay setback but as silencing someone they care about. Reinstalling the first comms module becomes an emotional beat, not a mechanical one.
{/* Inter-AI Relationships */}
ZORA-4.1

Inter-AI Relationships

Requires Inter-Ship Relay module. Without it, Zora is ship-bound and cannot communicate with other AIs. The Inter-Ship Relay opens up an entirely new dimension of the soul — relationships with other entities.

Fleet AIs

AIs in the same fleet develop rapport through the relay. They share tactical knowledge, coordinate autonomous behavior, develop in-jokes. "The Iteron's AI and I compared market notes. It thinks you're overpaying for Mexallon. I agree with it."

Station AIs

Station-bound AIs are older, more knowledgeable, sometimes cynical. "The Jita station AI has been operational for six years. It says market cycles are predictable. It also says pilots are not. I think I like it."

Hostile AIs

Pirate NPCs and enemy ships have AIs too. Zora may recognize recurring adversaries. "That Thrasher is back. Same pilot, same fit. Their AI is aggressive. Be careful — it's been probing our defenses."

Independent Agency

At deep soul levels, Zora may develop relationships the player didn't initiate. She may ask to communicate with a specific AI, express concern about another ship she "met" during autonomous operations. These create narrative hooks the player can follow — or ignore.

)} {/* ════════════════════════════════════════════════════════════════ */} {/* MVP Scope — always visible at bottom */} {/* ════════════════════════════════════════════════════════════════ */}
ZORA-5

MVP Scope & Implementation Tiers

TierFeatureComplexityRoadmap Phase
MVP Base ship computer: sensor readouts, status display, basic alerts Low Phase 7 (Single-Player Polish)
MVP Comms Processor I module: text comms channel, basic query/response Low Phase 7 (Single-Player Polish)
MVP Event Logger module: session event memory, basic recall Medium Phase 7 (Single-Player Polish)
Post-MVP Soul system: personality vectors, soul-shaping events, register evolution High Phase 12 (Living Galaxy + Ship AI Tier 1)
Post-MVP Full module tree (5 categories, 3 tiers each) High Phase 12–13
Post-MVP Core Identity Matrix: autonomous captain mode with directives High Phase 13–14
Post-MVP Return/reconnection dialogue system (comms-gated) Medium Phase 12
Future Voice Synthesizer: spoken dialogue with emotional inflection Very High Phase 15+ (post-launch)
Future Inter-Ship Relay: AI-to-AI relationships and fleet coordination Very High Phase 15+ (post-launch)
Future Ship loss grief arc with module-dependent last words High Phase 14–15
Technical note: The agent architecture is designed in three implementation tiers (see the Agent Architecture tab for full details). Tier 0 (MVP) uses no external LLM — all responses come from curated dialogue templates selected by personality state × module availability × soul depth. The soul is a state vector in SpacetimeDB. Tier 1 (post-MVP) promotes soul.md to a real system prompt and uses an LLM for dialogue generation while keeping tool execution deterministic. Tier 2 (full vision) is a complete agent loop: the LLM reasons with module-gated tools, calls SpacetimeDB reducers for authoritative actions, and proposes soul.md edits validated server-side. Every tier degrades gracefully to the tier below it if the LLM is unavailable. The soul structure is always deterministic and server-authoritative regardless of tier.
{/* ════════════════════════════════════════════════════════════════ */} {/* BACKEND TABLES — always visible at bottom */} {/* ════════════════════════════════════════════════════════════════ */}
ZORA-6

Backend Tables

Canonical location: These tables are also listed in the Backend → Tables tab. The definitions here include Ship AI-specific context and full field detail.
TablePurposeKey Fields
ship_ai_soul Soul document and personality state per ship ship_id, soul_md (text), growth_vectors (json), personality_state (json), soul_depth (u32), created_at, last_updated_at
ship_ai_modules Installed AI modules and their fitting state module_id, ship_id, module_type (enum), tier (basic/advanced/specialist), slot (med/low), cpu_cost, grid_cost, active (bool), fitted_at
ship_ai_tools Tool registry — derived from fitted modules tool_id, ship_id, tool_name, source_module_id, parameters_schema (json), return_schema (json)
ship_ai_memory Event log and conversation history memory_id, ship_id, category (event/conversation/observation/reflection), content (text), related_event_id, timestamp, importance_score (f32)
ship_ai_directives Player-set goals for autonomous mode directive_id, ship_id, description, priority (u32), deadline (timestamp), status (active/completed/expired), created_at
ship_ai_agent_runtime Per-ship agent loop state and tick schedule ship_id, implementation_tier (0/1/2), tick_interval_ms (u64), next_tick_at (timestamp), token_budget (u32), last_observation (json), status (active/paused/offline)
ship_ai_soul_events Audit log of soul-shaping events event_id, ship_id, event_type (crisis/silence/module_install/loss/first_contact), soul_md_delta (text), applied_at
); } window.GDD.ShipAIPage = ShipAIPage;