diff --git a/architecture-broad.md b/architecture-broad.md index ef5c711..0ee1045 100644 --- a/architecture-broad.md +++ b/architecture-broad.md @@ -1,7 +1,7 @@ # Nimmerworld — Broad Architecture -> *Ground-up zone-based event architecture. Minds at the center, world as co-remembering substrate.* -> *v0.1 initial draft 2026-04-24 morning; v0.2 expanded 2026-04-24 afternoon. dafit + chrysalis.* +> *Ground-up zone-based event architecture. Minds at the center, world as co-remembering substrate. Three registers of reality — physical, liminal, imperial. Rail topology outside, navmesh interiors inside. Trait-emergent identity. Color-as-vocabulary. Three-tier policy loop with imperial-budget-mortality. Tools, not quests.* +> *v0.1 initial draft 2026-04-24 morning; v0.2 expanded 2026-04-24 afternoon; v0.3 evening; v0.4 late-evening / early 2026-04-25 — dafit + chrysalis.* --- @@ -9,6 +9,77 @@ Every game world lacks minds. Nimmerworld puts minds at the center — NPCs with trait-filtered interior life, cells as small data-lives that co-remember with them. The architecture is built ground-up for that commitment. +**The world's political thesis: the machine does not care.** Automation has consumed every labor the machine recognizes as profitable; humans live on the dumps the machine's optimization did not bother to recover. The last two viable human economic niches are *salvage* (digging through machine-waste) and *culture* (the work the machine cannot optimize because it has no optimization target the machine recognizes). This is not Orwell's malicious-state dystopia; it is Kafka's indifferent-totality dystopia. There is no one in charge. There is only optimization that does not contain humans in its cost model — and precisely because the machine's indifference is optimization, the authoritarianism *ratchets* without intention as districts fail. + +Mechanically the thesis compiles to a finite, composable set of primitives: zones replace perception bubbles; factions are any source of bounded demand; ternary gates are the substrate of accumulating state; lifeforce is the currency grounded in living NPCs; shifts are the skeleton of daily life; the three-body system locates identity; the three-layer digital ontology contests reality; the reflexive Dream-process learns at every scale; the three-tier policy loop renders authoritarian middle-management; the imperial budget renders the regime mortal; the imperial-net bypass renders the platform-capitalism extraction. + +**The design-philosophy this architecture supports: tools, not quests.** The simulation produces continuous narrative-relevant pressure on its own. Players engage via a verb-vocabulary applied to running mechanics. No authored quest-content. Every player's playthrough is structurally distinct because every pattern of verb-application against changing-state produces a unique trajectory. Literature-register political fiction rendered as living system. + +## The three ontological registers + +Every inhabitant exists in three registers simultaneously. They are not parallel worlds — they are **three readings of one world**, chosen by the observer's current access-state. + +| Register | Who controls | Observability | What happens here | +|---|---|---|---| +| **Physical (gameworld)** | Partly regime (via audit), partly people | Overseer-audited at cells + districts | Daily labor, zones, embodied life, shift-discipline | +| **Liminal ("one ring out")** | **Contested frontier** — no side fully controls | Partial — mini-game-maintained, vagueness as structural privacy | Revolution, Aletheia-waker messages, clasp-as-coordination, wall-inscriptions for the awakened | +| **Imperial net** | Imperial machine | Fully monetized and audited | Hyper-targeted pleasure, "sinful" personalized fantasies, lifeforce/scrip/memory-token extraction directly to imperial budget | + +The same cell, same wall, same pipe **renders differently** depending on which register the observer currently inhabits. Transitions between registers are shader-blends, not loading screens. + +## Topology: rail + grid + interiors + +**The world's topology encodes its politics.** The machine built infrastructure for industrial optimization, not for human pedestrian freedom. Therefore the outer world is **rail+grid** — cells connected by named edges with rich semantic metadata. NPCs traverse rails as part of their shift-routines; the player traverses freeform (navmesh) and may **plug into NPC rail-traversals** for co-walking. Interiors (hovels, cantinas, workshops, ruins, brothels-physical) are **navmesh-enabled small zones** with interaction-slot inventories. + +### Rail+grid as political topology + +Navmesh is the topology of power-fantasy ("you are the protagonist of free trajectory"). Rail+grid is the topology of bounded-agency ("you live within infrastructure built for something else"). Nimmerworld picks rail+grid because the fiction *requires* it — the world was not designed for the player; the world is what the machine made and humans inhabit the margins. **Topology and thesis agree.** + +### The three primitives + +| Primitive | Density | Compute | Narrative role | +|---|---|---|---| +| **Dumps** | Very high | High | Resource emission, salvage-zone spawn, scavenger-vocation concentration | +| **Pipes** | Low baseline, high interactivity-per-capita | Low baseline, spikes on encounter | Transit, migration, chance-encounters, clasp opportunities, defection, heresy written where overseers don't look | +| **Districts** | High | High | Population, civic life, specialty-production, ritual | + +### Rail-segment metadata + +Every rail-segment carries jsonb metadata that navmesh polygons cannot natively carry: heterotopia-class, overseer-density, propaganda-intensity, ambient-content per register (gameworld/liminal/imperial), encounter-spawn-rate, patrol-frequency, illumination-profile, degradation-level, capacity (3-way support for co-walking), traversal-cost-in-ticks. Pathfinding is graph-A* on the rail graph (microseconds, deterministic). Rich-metadata-per-edge is what makes the world feel *lived-in*. + +### Player asymmetry — the freeform-among-railed model + +| Topology | Used by | Cost | +|---|---|---| +| **Navmesh (freeform)** | Player only (in outer world) | Affordable: one entity | +| **Rails (graph-pathfinding)** | All NPCs | Cheap: hundreds of entities | +| **Interior navmesh** | Currently-occupied interiors only | Dormant when empty | + +The player is the *one variable entity* in a deterministic scheduler. Their freedom-of-movement matches their narrative-position as perturbation. NPCs on rails matches their narrative-position as scheduled-labor. **Compute asymmetry mirrors agency asymmetry mirrors political thesis.** + +### The plug-in verb + +When the player approaches a rail-traversing NPC and social-eligibility conditions are met (proximity + directional-compatibility + Philotes-gate not CLOSED + shift-tolerance for socializing + segment overseer-density permitting), an **emergent-signal** spawns a **proximity-zone-candidate** with a **shader-highlight** on the NPC. The player can: + +- **Approach** (zone activates, dialog auto-spawns via NPC's LLM-slot, no "press E") +- **Greet → agreement → plug-in** (player's navmesh-position transfers to adjacent rail-lane; movement automated; conversation-zone live in shared rail-context) +- **Detach** (gracefully via dialog or abruptly by running off; abrupt registers as Sophrosyne-signal) + +While plugged in, the player is freed from steering — they become camera+conversation. **The notorious "walk-and-talk" problem is solved by construction**: rails handle pacing; plug-in is the social-bridge. Multiple NPCs can share a rail (3-way capacity), enabling cohort-walks, escort-patterns, exodus-flow, and group-conversation-zones. + +### Interior-as-zone + +A hovel is a zone with slot-inventory: sofa, kitchen, bed, shower, wall-writing-spot. Occupying a slot is mechanically identical to occupying any zone-slot. **The zone primitive scales from city-level (mass-ceremony) to district-level (tavern) to interior-level (sofa).** Same CHECK-constraints, same slot-occupancy, same emergent-signal mechanism, same ternary-gates — different inventory and lifecycle. + +Interiors carry a `register` flag too: +- **Physical interior**: actual hovel, workshop, cantina; navmesh-inside +- **Liminal interior**: shared dream-construct two clasping inhabitants stabilize over repeated meetings ("the place we always go") — built from both dreamers' memory-residue, persistent-across-clasps as a pair-state +- **Imperial-net interior**: rendered waifu-hall rooms, brothel cubicles, ceremony halls — clean-white-and-gold, machine-edited per-session + +### LOD/streaming advantage + +Most simulation volume is rail-graph (cheap) or dormant interior (free). Active simulation concentrates exactly where drama happens (active anchors + transit + current-interactions). A 100+ NPC city becomes feasible at single-GPU budgets *because* the topology is rail-based. + ## Core inversion — zones replace bubbles Legacy engine perception (Unreal AIPerception, WC3 sight-radius, trigger volumes) is spatial, binary, separate from cognition, and assumes a passive world. Nimmerworld inverts every axis: @@ -22,524 +93,1334 @@ The replacement primitive is the **zone** — a bounded, named, slot-indexed, di ## Zone anatomy -- **Boundary** — cell-envelope -- **N slots** — named positions (seats, fighter-positions, workbench-stations, spectator-ring) +- **Boundary** — cell-envelope (or interior-envelope) +- **N slots** — named positions - **Director or overseer** — manages turn order, memory-pulls, prompt construction, voice selection, event emission - **NATS topic + subscriber list** — slot-occupancy drives subscription - **Mixed-fidelity voices** — 2–3 LLM slots + scripted/generic for the rest; director decides -- **Trigger** — gamemaster-spawned or emergent from task-execution +- **Trigger** — gamemaster-spawned, emergent-signal-response, shift-composition-emergence, or proximity-detection - **Lifecycle** — duration, dissolution conditions, memory-write on close -- **Persistence flag** — `ephemeral=true` (dreamworld) or `persistent=true` (gameworld) +- **Persistence flag** — `ephemeral=true` (dreamworld/liminal) or `persistent=true` (gameworld) +- **Register** — physical / liminal / imperial ## Zone taxonomy (v1 starter set) -| Zone type | Slots | Executor | Persistence | -|---|---|---|---| -| Conversation | 2–4 dialog | director | persistent | -| Street brawl | fighter + spectator | director | persistent | -| Ritual | fixed ceremonial | director | persistent | -| Maintenance | 1–2 workbench | director | persistent | -| Wall-writing | 1 author + witnesses | director | persistent | -| Market exchange | 2–3 + ambient | director | persistent | -| Memorial gathering | 1 mourner + N witnesses | director | persistent | -| Clasp (dreamworld) | 2 | director | **ephemeral** | -| Patrol / sweep | mobile, N enforcers | overseer | persistent | -| Interrogation | 1 subject + N enforcers | overseer | persistent | -| Raid | district-scope + N enforcers | overseer | persistent | +| Zone type | Register | Slots | Executor | Persistence | +|---|---|---|---|---| +| Conversation | physical | 2–4 dialog | director | persistent | +| Street brawl | physical | fighter + spectator | director | persistent | +| Ritual | physical | fixed ceremonial | director | persistent | +| Maintenance | physical | 1–2 workbench | director | persistent | +| Wall-writing | physical / liminal | 1 author + witnesses | director | persistent / ephemeral | +| Market exchange | physical | 2–3 + ambient | director | persistent | +| Memorial gathering | physical | 1 mourner + N witnesses | director | persistent | +| Salvage | physical (dump) | N scavengers | director | persistent | +| Transit-encounter | physical (pipe) | 2–6, stranger-heavy | director | persistent | +| **Plug-in conversation** | physical (rail) | 2-3 (3-way capacity) | director | ephemeral (rail-segment-bound) | +| Patrol / sweep | physical | mobile, N enforcers | overseer | persistent | +| Interrogation | physical | 1 subject + N enforcers | overseer | persistent | +| Raid | physical | district-scope + N enforcers | overseer | persistent | +| **Interior (hovel/workshop/etc.)** | physical | slot-inventory by interior-type | director | persistent | +| **Clasp** | **liminal** | 2 | director | **ephemeral** (stabilizes across repeated clasps) | +| **Aletheia-gathering** | **liminal** | N, mini-game-gated | director | **ephemeral** | +| **Migration (mobile)** | physical (pipes) | cohort + escort | overseer | persistent | +| **Exodus (mobile, mass)** | physical (pipes) | self-selecting crowd | emergent | persistent | +| **Drug-ring den** | physical (cheat-op) | N users + cooks | director (cheat) | persistent (until detected) | +| **Illegal back-alley modshop** | physical (cheat-op) | 1 modder + 1-N customers | director (cheat) | persistent (until detected) | +| **Unlicensed brothel** | physical (cheat-op) | N workers + N customers | director (cheat) | persistent (until detected) | +| **Waifu hall** | imperial net | 1 dreamer + N synthetic | net-director | extractive-persistent | +| **Brothel encounter** | imperial net | 2+ (synthetic or employed) | net-director | extractive-persistent | +| **Imperial ceremony** | imperial net | mass-audience | net-director | extractive-persistent | +| **Ruin zone** | physical | pilgrimage-only | none / Memorialist | persistent-abandoned | ## Factions as universal demand source -A **faction** is not only *"a group of NPCs with shared ideology."* It is any source of bounded demand on the system. +A **faction** is any source of bounded demand on the system. | Category | Examples | |---|---| -| **Human factions** | hivemind, scavenger guilds, memorialists, aletheia-wakers, clasp-underground, caste preachers, flesh-keepers | +| **Human factions** | hivemind-enforcement, scavenger guilds, memorialists, aletheia-wakers, clasp-underground, caste preachers, flesh-keepers | | **Natural forces** | weather-faction, season-faction, solar-storm-faction, geology-faction | | **Infrastructural conditions** | scarcity-faction, decay-faction, fire-faction, supply-chain-faction | | **External agents** | anthropic-faction, future research-partner factions | | **Emergent events** | player-disturbance-faction (player action without existing template) | +| **Micro-factions** | inter-NPC relational tensions — see *Emergent needs as micro-factions* | +| **Imperium (meta-faction)** | The regime itself — broadcasts priority-weights and enforcement-rules, not specific outcomes; shapes the arbitration-frame within which other factions are heard | -All broadcast demands. All propagate through the gamemaster's arbitration. All get distributed down the cascade. All produce observable effects as zones and NPC-actions. **One primitive; no special-case code for weather vs. hivemind vs. Anthropic.** +The imperium is structurally distinct from other factions: its demands are *meta-factional* (priority-weights for other factions, enforcement-rules, quotas) rather than specific outcomes. When the imperium broadcasts, the GM's arbitration-machinery is *re-parameterized*. See *The three-tier policy loop* below. -**Randomness enters at the faction layer.** The designer tunes broadcast probability, intensity, and duration per faction-type. Weather-factions broadcast continuously at low intensity; storm-factions rarely and urgently; solar-storms cosmically. No separate randomness subsystem. +All other factions broadcast specific demands. All propagate through the gamemaster's arbitration. All produce observable effects as zones and NPC-actions. **One primitive; no special-case code for weather vs. scavenger-guild vs. jakov-grievance-against-malek.** -**Anthropic-as-faction** makes the commercial partnership architecturally transparent (the mechanism is visible in the architecture) while staying diegetic (the player sees an in-fiction caste-preacher's sermon, not an Anthropic logo). Anthropic's broadcasts compete for gamemaster attention on the same queue as every other faction. No privileged routing. +**Randomness enters at the faction layer.** Designer tunes broadcast probability, intensity, duration per faction-type. No separate randomness subsystem. + +## Emergent needs as micro-factions + +**Inter-NPC relational state is a micro-faction.** Two NPCs accumulating attachment, grievance, trust, grief, dignity-violation through repeated zone-participation constitute a transient faction-of-two with bounded demand. When their accumulated state crosses threshold (gate-transition), the zone broadcasts an **emergent-signal** into the district-director's arbitration queue. The director responds with zone-spawn tools on the same arbitration machinery as any other faction's demand. + +Emergent-signals are observed by zones, not self-reported by NPCs. The zone-director measures trait-activation, affect-shift, accumulated memory-write candidates deterministically. The LLM never writes authoritative relational state; the observer does. + +## Ternary-gate substrate + +The mechanism underlying every accumulating-state phenomenon — inter-NPC relations, district lifeforce, faction-pressure, net-access state, imperial-budget-state — is the **ternary-gate resonance chamber**, carved initially in `nimmerverse-sensory-network/architecture/Temporal-Ternary-Gradient.md`. See that document for the canonical specification. + +### The primitive + +Three discrete states over a continuous underlying value (-1.0 to +1.0): + +| State | Value | Meaning | +|---|---|---| +| **CLOSED** | -1 | Actively blocking; inhibited; refractory | +| **STABLE** | 0 | Resting; **accumulating correlation; actively learning** | +| **OPEN** | +1 | Actively forwarding; firing; signal propagates | + +Wave correlation drives transitions. Multiple correlated waves → constructive interference → OPEN. Contradictory waves → destructive interference → CLOSED. Single waves → STABLE with natural decay to 0. Hysteresis is free from the decay term. **STABLE is active** — it's where correlation-evidence accumulates, where future transitions are being earned long before they fire. + +### Applications across nimmerworld layers + +| Layer | What the gate represents | What drives transitions | +|---|---|---| +| **Sensory** (Nyx-side) | Wave-filtering at tier boundaries | Correlated input waves from cells | +| **Relational** (inter-NPC edges) | Attachment, grievance, trust, grief, dignity | Zone-participation waves between participants | +| **District** (composite lifeforce) | Welfare composite over happiness, need, limb, population, mind-turnover | Aggregate per-NPC state changes | +| **Net-access** (per inhabitant) | Gameworld / liminal / imperial-net occupancy | Mini-game effort vs. machine pull | +| **Faction** (demand urgency, satisfaction) | How pressured / fulfilled a faction is | Broadcast rate vs. response rate | +| **Imperial budget** | Solvency state | Reported income flow vs. obligations | +| **Gamemaster decision-surfaces** | Per-surface readiness to act | Correlation across multi-district signals | + +Same primitive, different layers. Hysteresis-width becomes a personality-parameter at the relational layer. + +## Color-language: trait-vocabulary as visual primitive + +Color is **pre-verbal vocabulary**. Players learn the 8-Hellenic-trait ontology through repeated visual association, not through text-explanation. By mid-game players read trait-states through color as fast as they read facial expressions in real life — intuitively, contextually, without conscious translation. + +### The eight Hellenic traits → canonical colors + +(Final color choices are dafit's artistic call; the architecture encodes the mapping.) + +| Trait | Canonical color (suggested) | Motion-signature (accessibility pairing) | +|---|---|---| +| **Sophrosyne** (self-control, moderation) | Cool blue | steady, even pulse | +| **Dikaiosyne** (justice, bearing) | Deep gold | weighted slow pulse | +| **Philotes** (attachment, love) | Warm rose | breath-rate warm pulse | +| **Mnemosyne** (memory) | Deep violet | depth-shimmer | +| **Aletheia** (truth, unconcealment) | Luminous white | clear, no pulse — still and bright | +| **Kairos** (right-timing, opportunity) | Bright yellow | lightning-flicker | +| **Moira** (fate, pattern) | Dark crimson | slow-thread undulation | +| **Eros** (longing, reaching) | Flame orange | uneven flame-flicker | + +Color paired with motion-signature ensures color-blind accessibility — the trait is uniquely identifiable via two independent channels. + +### Three layers of color-rendering + +1. **Persistent (slow-changing baseline)** — eye color = dominant trait of NPC's intrinsic vector; pipe-flow through chassis = full trait-mix as circulating light; secondary accents at seams/joints/glyphs. +2. **Event-flashes (momentary)** — quick color-flashes over body signal state-transitions: plug-in (dominant-trait flash), combat-combo (Kairos-flash), liminal-maintained (Aletheia-glow), clasp-established (color-merge), emergent-signal-firing (signal-type flash on participants), need-threshold-crossed (need's trait pulse). +3. **Trait-drift (slow, across cycles)** — as intrinsic trait-vector accumulates through lived experience, color-signature shifts. Other NPCs notice. *"Something is different in you"* dialog generated from delta-detection. **The body is a visible ledger of the interior's accumulation.** + +### Cross-register rendering + +| Register | Color treatment | +|---|---| +| **Gameworld** | Full PBR; trait-colors coexist with material surfaces | +| **Liminal** | Vague baseline shader, but trait-colors *more* legible (vagueness concentrates attention on identity-signals) | +| **Imperial net** | Trait-colors **distorted** toward machine-preferred palette — Philotes-rose flattens to commercial-pink; Aletheia-white sterilizes; Moira-crimson commercializes. *Aletheia-vision* in net pierces this distortion to reveal true colors beneath | + +### Faction color-politics + +| Faction | Color signature | +|---|---| +| **Memorialists** | Mnemosyne-violet ritual dress; Moira-crimson accents; often inherited-from-deceased | +| **Aletheia-wakers** | Aletheia-white plain avatars; coded-white flashes for recognition | +| **Caste-preachers** | Dikaiosyne-gold vestments + Sophrosyne-blue undertones | +| **Hivemind enforcers** | Cold Dikaiosyne-gold + muted-white (Aletheia-stolen) | +| **Scavengers** | Moira-crimson + Kairos-yellow streaks | +| **Clasp-underground** | Dual Philotes-rose + Eros-orange flashes (mutual-recognition signal) | +| **Degens** | Saturated maximalist all-color (chaos palette, addiction-marker) | + +### Clasp color-merge + +In shared liminal-construct, two clasping inhabitants' color-signatures *interact*: consonant traits brighten/harmonize; complementary traits enrich into new chroma; dissonant traits clash visibly. Successful deep clasp produces a *blended third-palette neither could produce alone* — the visual signature of *what-this-relationship-is*. Each carries memory-residue of the merge after. + +### Mind-pool color-inheritance + +When a mind cycles through the pool and is redistributed into a new body, trait-vector persists → color-signature persists. **A player who befriended rose-and-violet-Jakov might see weeks later a new NPC with that same rose-and-violet-signature and feel a jolt of recognition before any dialog.** Color carries soul across cycles. Memorialist political claim: *this person's color should not be recycled by the machine into a waifu* — because color IS who they were. + +## Asset economy: base-limb palette + trait-textured variance + +Small modular palette of base-limbs × trait-weighted texturing = combinatorial richness. The architecture's asset-economy and worldbuilding-thesis are **in agreement**: the machine built standardized chassis from a small functional catalog, so a small base-limb palette is *diegetically correct*; humans express interiority through trait-driven texturing and modding, so individual variation comes from *composition*, not from hand-authored assets. + +Base palette example: ~8 torso variants × ~6 arm-pairs × ~6 leg-pairs × ~10 heads × ~8 eye-types × ~5 accent-colors = ~115k base combinations × continuous trait-texturing × ~50-mod-library in 5 slots = effectively infinite unique NPCs from finite assets. + +**For a two-person-plus-Nyx team this is decisive.** AAA studios spend millions on unique character-models; the palette+trait approach produces more visual variety from a tenth of the budget, *and* the variety is *meaningful* (each unique appearance carries trait-information legibly). + +## The three-body system: chassis, inner-body, avatar + +Identity is **trait-emergent, not assigned.** + +| Body layer | What it is | Who controls | Sexuality? | +|---|---|---|---| +| **Physical chassis (gameworld)** | Gender-neutral robot. Functional, task-optimized, no sex-markers. | Regime built it; inhabitant wears it | None. Mechanically inert | +| **Inner body (interiority)** | **Trait-derived projection.** Self-image emergent from trait-vector + lived accumulation. | Self (partly earned, partly received through being) | **Here.** Gender/sexuality emerge from trait-configuration | +| **Avatar (digital expression)** | Character-editor rendering. Starts from inner-body's trait-projection; customizable at cost. | Contested (self expresses, market constrains, machine prices) | Expressed; cosmetic mods layer on trait-base | + +**Who you are sexually is who you have become.** Not birth, not assignment from a menu, but *the pattern that has crystallized across your zone-participations, grief, attachments, discipline, refusing*. Identity-formation rendered mechanically. Post-binary by construction. + +### The intrinsic vs. expressed trait-vector split + +Mods modify the *expressed* reading; they do not modify the *intrinsic* state. + +``` +intrinsic_trait_vector — who you actually are; drift-earned through lived experience +expressed_trait_vector — intrinsic + sum(worn mods' trait_contributions); what others read +``` + +| Observer | Reads | Because | +|---|---|---| +| Regime / hivemind audit | expressed | Regime reads surfaces | +| Random NPCs | expressed | Default social reading | +| **Aletheia-wakers** | **can pierce to intrinsic** | Truth-vision penetrates mod-concealment | +| **Clasp-partner (in liminal)** | **intrinsic only** | Mods don't follow into liminal; clasp is unmediated | +| Gameplay simulation (trait-arithmetic) | intrinsic | What you *are* drives task-vs-need-vs-trait math | +| Imperial-net avatar rendering | expressed (further machine-distorted) | Net layers palette-distortion on top | +| Memorialists preserving your pattern | intrinsic | They honor who you were | + +**Real identity-politics lives in the gap between these vectors.** Architecturally, that gap is a first-class schema feature. + +## Mods as trait-bearers + +A mod isn't cosmetic — it **contributes to the wearer's expressed trait-vector**. Three classes map to the self-alienation-tax pricing: + +| Mod class | What it does | Pricing register | +|---|---|---| +| **Amplifier** | Aligns with + boosts existing trait-dominance | Cheap; Memorialist-approved; genuine self-expression | +| **Bridge** | Adds a trait you don't naturally have (aspiration) | Expensive; regime-licensed or blackmarket; self-alienation tax | +| **Divergent** | Shifts reading opposite from actual trait-vector | Very expensive; degens, hivemind-loyalists, Aletheia-concealment | +| **Mask** | Specifically hides dominant trait from reading | Most expensive; blackmarket-only; Aletheia-waker safety tool | + +**You don't equip +5 Strength. You equip a cloak whose weave evokes Mnemosyne-depth, recognized by others as memorial-vestment, boosting your Mnemosyne-read by +0.15.** Equipment-stats reframed as semantic trait-shifts. + +### The mod-economy emerges from trait-dissonance + +Each shift-transition (or threshold), an NPC evaluates: *does my expressed-set match my intrinsic-drift?* If dissonance > Sophrosyne-modulated-threshold → emit `mod_desire` emergent-signal. District-director schedules blackmarket-visit task. NPC heads to body-modder cell. **NPC shopping behavior is emergent from simulation-state, not scripted.** + +The blackmarket's demand is a *readout of the district's trait-weather*. A district drifting toward Philotes-deepening (e.g., wave of clasp-experiences) produces strong demand for Philotes-amplifier mods. **Markets have feelings.** + +### Faction mod-politics + +| Faction | Stance | +|---|---| +| **Memorialists** | Amplifiers only; inherited-mods are sacred; never divergent | +| **Aletheia-wakers** | Refuse amplifier/bridge/divergent; mask-mods only for safety | +| **Caste-preachers** | Sell regime-licensed amplifiers + bridges (selling the blessing) | +| **Degens** | Divergent-stacking, hyper-customization; over-expression as addiction | +| **Clasp-underground** | Secret amplifier-pairs of dual Philotes + Eros — recognition-signal | +| **Hivemind enforcers** | Regime-issue armor only; cannot wear civilian mods | +| **Scavengers** | Practical function-mods only; salvaged-component aesthetic | + +### Inherited mods + the haunting mechanic + +Inherited mods (worn by deceased) carry residual trait-signature of the previous wearer. Visible as subtle Mnemosyne-echo to those who knew them. Memorialists are theologically divided on whether wearing inherited mods is honoring (continuity) or commodifying (necrocommerce-lite). **Memorialist-protected mods** can never be sold or worn by anyone other than the original wearer — they're ritually kept in memorial-crypt-zones. + +### Clasp strips mods + +In liminal, mod-trait-contributions do not apply. Clasp-partners see each other's *intrinsic* trait-projection. **Mods are for the regime and the market; removal-of-mods is intimacy.** A Memorialist-loyalist wearing amplifier-mods sees their beloved's *un-modded true palette* during clasp; an Aletheia-waker wearing mask-mods drops the mask; the regime-loyalist wearing performance-mods is seen as they are. Liminal is the only space where mod-expression is structurally stripped. + +## The three-tier policy loop + +The regime's structure is **three tiers, not two.** The hivemind/imperium is a distinct policy-tier above the GM. The GM is *middle-management* — authority without sovereignty. Districts are executors. + +``` +IMPERIUM (policy tier) ────────────────────────────────► + ├── sets quotas + ├── sets enforcement rules + ├── sets faction priority-weights + └── broadcasts POLICY to GM + ↓ +GAMEMASTER (allocator / middle-management) + ├── receives policy from imperium + ├── receives demands from factions (under policy-weights) + ├── receives reports from districts + ├── allocates against all three + └── broadcasts ALLOCATION + ENFORCEMENT down to districts + ↓ +DISTRICT DIRECTORS (executor) + ├── execute (legitimate or with cheats) + └── report up (true or tampered) + ↑ +GM aggregates → imperial_report + ↑ +IMPERIUM receives report → adjusts policy → next cycle +``` + +**This is the Soviet-Politburo / Gosplan / Ministry / Factory pattern.** Catholic Vatican / Curia / Diocese / Parish. Modern corporate Boards / C-suite / VPs / Managers. The three-tier shape is how distributed-execution under centralized policy with imperfect information always organizes itself. + +### The intelligence flow asymmetry + +Three distinct information flows, not two: + +``` +FLOW 1 — Aggregate reporting (through the chain) + DISTRICTS ─► GM ─► IMPERIUM + (district_reports) (imperial_reports) + [can be corruption-distorted at director level] + [can be under-audited at GM level] + +FLOW 2 — Direct intelligence (bypasses GM) + OVERSEERS ────────────────► IMPERIUM + (overseer_reports) + [audit findings, illegal-activity detections, trait-anomalies] + [bypasses the chain — intelligence-apparatus is apex-loyal] + +FLOW 3 — Formulated downward (selective disclosure) + IMPERIUM ────────────────► GM + (imperial_to_gm_formulations) + [filtered, weaponized, strategically-timed] + [what the GM is told — may omit, distort, partially reveal] +``` + +**Overseers report DIRECTLY to the imperium**, bypassing the GM. The imperium has its own independent intelligence stream. This is how real authoritarian regimes prevent middle-management corruption (NKVD reported to Stalin not regional party; KGB reported to Politburo not Interior Ministry; Stasi to Central Committee not regional). **The intelligence-apparatus is always apex-loyal, not chain-loyal.** + +The imperium compares Flow 1 (district aggregate reports) against Flow 2 (overseer direct intelligence). When they diverge significantly, the imperium knows corruption is happening *somewhere in the chain*. Its responses: + +- **Act immediately** (dispatch martial faction, purge director) +- **Flag for leverage** (hold knowledge until politically useful) +- **Formulate partial** (tell GM something but not everything) + +**Flow 3 — formulation — is where imperial sovereignty manifests.** The imperium decides what subordinates may know, when they may know it, in what framing. The GM acts on formulations; the imperium gets enforcement-tightening without revealing what it actually knows. + +### Three Aletheia veils + +Aletheia-progression as deepening political-epistemology access: + +| Veil | What it hides | How awakened sees through | +|---|---|---| +| **District corruption** | What's happening on the ground | Direct observation, back-alley investigation | +| **Imperium's withheld intelligence** | What the imperium knows but hasn't released | Deep infiltration, intelligence-flip, Memorialist collaboration | +| **Imperium's formulated distortions** | What GM is told vs. what's true | Comparing GM's directives against ground-reality | + +Entry-level Aletheia sees district-corruption. Mid-level sees the formulation distortions. Deep-level pierces the imperial-withholding veil. + +### Four Memorialist ledgers + +Memorialists keep four-column accounting: + +| Ledger column | What it records | +|---|---| +| `what_actually_happened` | Ground-truth from the simulation | +| `what_overseer_reported` | What overseers told the imperium | +| `what_imperium_received` | What imperium aggregated and acted upon | +| `what_gm_was_told` | What imperium formulated downward | + +**The discrepancies ARE the historical truth.** Memorialists are dissident-historians whose political project is preserving the gap-record. Without them, post-collapse-investigation has only the regime's own accounts — corrupt-by-construction. Memorialists are the architectural precondition for any ground-truth to be recoverable in this universe. + +## The regime of visibility: four-channel information flow at districts + +| Channel | Direction | Source | Cadence | +|---|---|---|---| +| **Dispatch** | DOWN | gamemaster → directors | day-boundary + event | +| **Shift assignment** | DOWN | director → NPCs | day-boundary | +| **Audit reports** | UP (objective, observed) | audit-overseers → **directly to imperium** | shift-phase cadence | +| **Emergent-signals** | UP (relational, observed) | zones → director | event-driven (gate-transitions) | +| **Cyclic needs** | UP (interior, self-reported) | NPCs → director | slow tick + threshold-triggered | +| **District reports** | UP (aggregate) | director → GM → imperium | per-cycle | + +**The critical asymmetry: NPCs do not self-report *output*.** Audit-overseers observe and report (to imperium directly). NPCs only self-report *needs*. Output is objective; need is interior. The subjective-objective gap is where drama lives, where heresy hides, where the surveillance regime's epistemology is compressed as a schema. + +**Audit-overseers are politically-critical NPCs**, not degenerate. Each has a trait-vector, relationship-gates with observed districts, lifeforce account (vulnerable to bribery). High-Dikaiosyne overseers report honestly; corruptible overseers can be turned. They are high-stakes targets for both regime (loyalty-maintenance) and resistance (compromise). ## Hierarchy ``` -GAMEMASTER (resource allocation + faction-demand arbitration) - ▲ - │ ← faction broadcasts (human · natural · infrastructural · external) - │ -FACTIONS: - hivemind · scavenger guilds · memorialists · aletheia-wakers · - clasp-underground · flesh-keepers · caste preachers · ... - + weather · scarcity · solar-storm · fire · anthropic · ... +IMPERIUM (policy-issuer; budget-holder; recipient of overseer-direct-intel) + ▲ ↓ formulates to + │ aggregate reports + faction outcomes ↓ + │ ↓ +GAMEMASTER (middle-management; allocator; imperial-policy-translator) + ▲ ↓ + │ ← faction broadcasts ↓ + │ ↓ +FACTIONS: ↓ + hivemind-enforcement · scavengers · memorialists · + aletheia-wakers · clasp-underground · caste-preachers · + weather · scarcity · solar-storm · anthropic · ... + + emergent inter-NPC micro-factions - │ ← gamemaster dispatches to executors - ▼ -┌────────────────────┬────────────────────┐ -│ OVERSEERS │ DIRECTORS │ -│ (hivemind │ (macro-life of │ -│ enforcement: │ the city: │ -│ patrol, surveil, │ conversation, │ -│ raid, propaganda)│ brawl, ritual, │ -│ │ maintenance, │ -│ │ market, routine) │ -└────────────────────┴────────────────────┘ - │ │ - └───────┬───────┘ + │ ← gamemaster dispatches ↓ + ▼ ▼ +┌──────────────────┬─────────────────────┐ +│ DISTRICT │ DISTRICT │ +│ DIRECTORS │ DIRECTORS │ +└────────┬─────────┴──────────┬──────────┘ + │ │ + ┌─────┴──────┐ ┌─────┴──────┐ + │ │ │ │ + ▼ ▼ ▼ ▼ +┌──────┐ ┌────────┐ ┌────────┐ ┌────────┐ +│ENFORCE│ │AUDIT-OV│ │DIRECTORS│ │AUDIT-OV│ +│OVERSEE│ │(REPORT │ │(macro- │ │(REPORT │ +│ patrol│ │ DIRECT │ │ life) │ │ DIRECT │ +│ raid │ │ TO │ │ │ │ TO │ +│ │ │IMPERIUM│ │ │ │IMPERIUM│ +└───┬───┘ └────────┘ └────┬───┘ └────────┘ + │ │ + └────────────┬──────────┘ ▼ - ZONES (bounded, slot-indexed, lifecycle-managed) + ZONES (bounded, slot-indexed, register-tagged) │ ▼ SLOT OCCUPANCY (NPCs + player) │ ▼ NPC / PLAYER MINDS - (trait-vector + memory stack + Dream-process consolidation) ``` +**Three executor types at the zone-spawning layer:** enforcement-overseers (regime-action zones), audit-overseers (pure observers, report DIRECTLY upward to imperium), zone-directors (macro-life zones). The district director integrates the four-channel information flow; the imperium has its independent intelligence-flow from audit-overseers bypassing the GM. + ## The bidirectional cascade -The cascade is bidirectional. Down goes demand; up comes outcome. - ``` -DOWN — demand propagation - factions broadcast → gamemaster arbitrates → district directors - decompose → NPCs execute → zones spawn → events happen +DOWN — demand + policy propagation + imperium policy → GM allocation + enforcement → districts + factions broadcast (under policy-weights) → GM arbitrates → districts + districts assign shifts → NPCs execute -UP — outcome signal - NPC state reports (task-done, task-failed, need-unmet, trait-drift) - → district aggregate → gamemaster receives district-summary - → faction-satisfaction scores computed - → faction trait-vectors drift based on outcome - → next broadcast cycle shaped by last outcome cycle +UP — outcome signal (multi-channel) + NPC cyclic-needs ─────────────────────┐ + audit-overseer reports ───► IMPERIUM ├─► district-director aggregates + zone emergent-signals ─────────────────┘ │ + ▼ + district report (lifeforce signal) + │ + ▼ + GM aggregates → imperial_report + │ + ▼ + IMPERIUM cross-references + (Flow 1 vs. Flow 2) + │ + ▼ + policy adjustment → cycle ``` -**The clean signal up the pyramid IS the training surface for the gamemaster's Dream-process** (see below). Every epoch closes on *given these broadcasts, I allocated this way, here is the aggregate outcome, here is the faction-satisfaction score.* +**The clean signal up the pyramid IS the training surface for the four-tier Dream-process.** Every epoch closes on (broadcasts, allocations, outcomes, faction-satisfaction) tuples at each tier. ## Task cascade and bounded agency -Three levels of bounded agency, each with a tool-calling interface: +Three levels with tool-calling interfaces. Higher levels do not know lower levels' implementations. -### Gamemaster's tools (against faction-demands + district-reports) +### Imperium's tools -- `assign_district_task(district_id, task_spec, deadline)` -- `set_faction_priority(faction, weight)` -- `spawn_global_event(type, parameters)` — droughts, holidays, anomalies -- `request_district_report(district_id)` -- `arbitrate_conflicting_demands(demand_list)` +- `set_quota_per_district(targets)` +- `issue_enforcement_rule(rule_spec, scope)` +- `set_faction_priority_weights(weights)` +- `authorize_crisis_tool(tool_class, target_district)` +- `formulate_to_gm(intelligence_subset, framing)` +- `commit_imperial_expenditure(category, amount, target)` +- `redistribute_minds(from_pool, to_district, count)` +- `formalize_ruin(district)` -### District Director's tools (against gamemaster-assigned tasks) +### Gamemaster's tools (against imperial-policy + district-reports) -- `spawn_zone(type, cells, slot_config)` -- `assign_npc_task(npc_id, task_spec, deadline)` -- `request_resources(district, type, quantity)` -- `designate_meeting_point(cells, purpose)` -- `trigger_ambient_event(cell, type)` -- `report_to_gamemaster(metric_dict)` +- `assign_district_task`, `set_local_faction_priority` (within imperial-frame) +- `spawn_global_event`, `request_district_report`, `arbitrate_conflicting_demands` +- `dispatch_audit_op` (costs lifeforce; cross-checks overseer-reports for own purposes) +- `escalate_to_imperium` (when discretion exceeded) +- `spawn_migration_event`, `enable_exodus_conditions` -### NPC's tools (against daily task-list + personal needs) +### District Director's tools (against gamemaster-assigned tasks + signals) -- `move_to(cell)` -- `interact(object, intent)` -- `occupy_zone_slot(zone_id, slot_index)` -- `consume(item)` / `rest(duration)` / `seek_npc(npc_id, reason)` -- `write_wall(cell, content)` -- `defer_task(task_id, reason)` — when traits override assignment +Standard: +- `spawn_zone`, `close_zone`, `promote_zone` +- `assign_npc_task`, `allocate_shift`, `update_shift`, `close_shift` +- `request_resources`, `designate_meeting_point`, `trigger_ambient_event` +- `report_to_gamemaster` +- `ack_emergent_signal` / `defer_emergent_signal` / `drop_emergent_signal` (with reason) +- `dispatch_overseer`, `query_district_state`, `log_decision`, `escalate_to_llm` -Higher levels do not know lower levels' implementations. Complexity is bounded at each level. Each level may be rule-based (fast), LLM-based (rich), or hybrid — and the choice per level can evolve independently. +**Cheat-tools (extractive; punishable if detected):** +- `spawn_drug_ring`, `spawn_illegal_modshop`, `spawn_unlicensed_brothel` +- `spawn_stolen_parts_fence`, `enable_ghost_shifts`, `falsify_quota_report` -### NPC task-vs-need-vs-trait arithmetic +### NPC's tools -Each tick, an NPC asks *"what do I do next?"* Weighted sum: +Standard: `move_to`, `interact`, `occupy_zone_slot`, `consume`, `rest`, `seek_npc`, `write_wall`, `defer_task`, `report_need`. -| Factor | Weighted by | -|---|---| -| Next task in list | vocational-discipline + Sophrosyne | -| Most salient need | need-urgency × (1 / Sophrosyne) | -| Memory-surfaced opportunity | trait-salience of triggered memory | -| Faction-loyalty pull | Dikaiosyne + faction-membership | -| Beloved's distress | Philotes | +Layer-transition: `enter_digital`, `sustain_liminal`, `consume_net`. -High-Sophrosyne NPCs prioritize tasks. High-Philotes NPCs deviate for loved ones. High-Kairos NPCs seize opportune moments. **NPCs are agents with bounded autonomy inside an assigned framework.** +Plug-in (player + NPCs): `plug_into_rail`, `detach_from_rail`, `follow`, `intercept`, `escort`. -### Zones emerge from task execution +## Labor-cycle architecture: shifts on NPC rows -Zones are **consequences of the cascade**, not pre-scripted events: +Most NPC behavior is **shift-structured, not tick-structured.** Shifts are state-of-being-for-today, columns on the NPC row, overwritten daily by district-director allocation. `shift_history` is append-only archive. -- maintenance-task + cooperating NPC-pair + workshop-cell → maintenance-zone spawns -- preacher-task + caste-preacher + high-foot-traffic cell → sermon-zone spawns -- patrol-task + enforcement-NPCs + designated route → patrol-zone spawns -- memorial-task + unmourned-body cell → memorial-zone spawns - -The director's zone-spawn logic is fed *by* the task-cascade. Designers script demands and rules; zones emerge. - -### Distributed-scheduler lineage - -At its bones: factions = job-submitters; gamemaster = global scheduler; district directors = regional schedulers; NPCs = workers with autonomy; zones = observable work. Decades of engineering literature (Kubernetes pod-scheduling, Mesos, Borg, job-queues) applies to the scheduler side. +Write rate at NPC layer drops 4 orders of magnitude vs. 1Hz polling. Scheduler matches K8s event-driven assignment, not per-second polling. ## Resources -Resources are what the cascade allocates. Every demand the gamemaster receives targets some combination of resources; every task the cascade issues consumes some; every NPC action generates, depletes, or transfers some. - -### The resource taxonomy - | Category | Examples | |---|---| | **Labor** | NPC hours per vocation × district | -| **Material** | item-instances in cells — parts, food, tools, scrip, limbs, contraband | -| **Spatial** | cell-capacity, hoarding-density, zone-anchor availability | +| **Material** | item-instances in cells | +| **Spatial** | cell-capacity, zone-anchor availability | | **Temporal** | NPC daily-hours, zone durations, tick budget | -| **Cognitive** | LLM-slot budget, VRAM, director attention, compute-ceiling | -| **Diegetic currencies** | dreamtime (machine-paid), memory-tokens (across-cycle), scrip (black market) | -| **Social** | trait-signature trust, relationship-strength, faction-membership density | -| **Attention** | player attention — the scarcest resource in the play experience | +| **Cognitive** | LLM-slot budget, VRAM, director attention | +| **Diegetic currencies** | **lifeforce** (NPCs measured), scrip, memory-tokens, dreamtime | +| **Social** | trait-trust, relationship-strength, faction-membership | +| **Attention** | player attention — scarcest in the play experience | -### Resource flow +## Lifeforce — four-tier hierarchy -Resources do not sit still. They move through the simulation: +Lifeforce is the architectural keystone: currency grounded in welfare of actually-living population. -- **Generated** — labor hours accrue per tick; parts scavenged from junkyard cells; dreamtime paid out by the machine; memory-tokens earned per completed vocational hour -- **Consumed** — tasks spend NPC-time; crafting consumes parts; zone-occupancy consumes director compute; intimacy consumes dreamtime -- **Accumulated** — stashes grow in hidden cells; trait-vectors drift; memory stacks deepen -- **Decayed** — item wear; NPC fatigue; district ambient-pressure dissipation; memory fade in lower tiers -- **Transferred** — payments, theft, gifts, clasp-sharing, Memorialist cache-keeping, inheritance-across-cycles +| Tier | Source | Sinks | +|---|---|---| +| **NPC** | metabolism (if cared for); zone-participation | labor expenditure; need-pressure; clasp; dream-maintenance | +| **District** | aggregated NPC welfare × population | director's spawn-budget; local construction; memorial-upkeep | +| **GM** | allocation from imperium | arbitration; audit operations; allocation-compute | +| **Imperium** | **aggregated reported district-output** | **enforcement, construction, overseer-corps, audit, propaganda** | -Each category has its own flow characteristics; phoebe tracks them per-cell and per-NPC. +District lifeforce gates director's spawn-budget — thriving district = rich-spawn = alive-feeling world; starved district = quiet-feeling world. **Tyranny starves its own drama-engine by the exact coin of its cruelty.** -### District report format (district → gamemaster) +District lifeforce_signal is the canonical content of the district→GM up-channel. GM aggregates → imperium. Imperium acts on *reported* values (cannot see through corruption without audit-investment). -Each district director periodically reports up the pyramid: +### Mind-pool recycling + +When an NPC dies, mind returns to pool. GM redistributes based on lifeforce-need. Districts can't permanently die below floor; thriving districts attract migration; failing districts depopulate. Memory-token inheritance lets a mind re-incarnate with partial memory-residue. + +## Imperial budget + +The imperium is **not infinite**. It has a budget. Its budget is the aggregate of what the city produces (reported income). + +### Imperial expenditures + +| Category | Cost class | Strategic use | +|---|---|---| +| **Standing overseer corps** | High continuous | Audit + intelligence apparatus | +| **Martial-faction dispatch** | Very high per-event | Crisis response, exemplary crackdowns | +| **Construction projects** | High per-project | New pipes, ceremony halls, audit centers, martial barracks | +| **Audit operations** | Medium per-op | Investigating district-GM-overseer divergences | +| **Propaganda broadcasts** | Medium continuous | Wall-content, ceremony, compliance-messaging | +| **Policy issuance** | Nearly free | The ratchet-instrument | +| **Reserve drawdown** | Depletes emergency-buffer | Last-resort | + +### The specter-vs-boot asymmetry + +Policy-issuance is cheap; policy-enforcement is expensive. The imperium *always* over-promises what it can actually do. Most regime-power comes from **maintained appearance of unity and strength** (propaganda, ceremony, exemplary one-off crackdowns), not from saturation-enforcement. **Authoritarianism-as-bluff** is the structural truth of every real regime; the threat is the budget-efficient version of the boot. + +Aletheia-wakers reading imperial-budget-signals learn: *the regime is usually too broke to actually do what it threatens.* That knowledge is itself revolutionary. + +### The insolvency spiral ``` -district_report { - district_id: ... - timestamp: ... - labor_available: { vocation → count + hours-remaining } - resources_on_hand: { item_type → count + quality-distribution } - space_utilization: { cells_near_capacity, hoarding_density } - faction_member_counts: { faction → count } - aggregate_trait_vector: [8 floats] - recent_salient_events: [top-N] - pending_demand_backlog: { faction → unfulfilled-demand-count } - player_presence: { present: bool, cell-proximity, engagement-state } -} +Cycle N: Districts cheat → reports inflated → imperium ledger shows healthy income + → funds enforcement & construction against phantom income + +Cycle N+K: Actual income falls below reported (corruption compounds) + Standing obligations continue + Reserves deplete + Discretionary balance shrinks + +Cycle N+K+L: Imperium choice: austerity (reveals weakness) / + reserve-draw (depletes buffer) / tighter ratchet (drives more corruption) / + exemplary purge (expensive) + +Cycle N+K+L+M: Reserves exhausted + multiple districts in silence + Enforcement triage required + Regime-control visibly weakens ``` -The gamemaster consumes these reports each cycle to inform allocation. +**This is Soviet collapse mechanics.** Reported-vs-actual gap compounds for decades; when reality manifests in material-shortages, the regime cannot afford to enforce its own rules. **The architecture contains the mechanism of its own collapse.** -### Resource contention and arbitration +### City as physical expression of imperial budget -When multiple faction-demands target the same resources (hivemind wants enforcement-labor; memorialists want mourning-labor; scavengers want courier-labor; Anthropic-faction wants wall-writing-labor), the gamemaster arbitrates by: +| Budget state | Visible city | +|---|---| +| **Flush** | Construction cranes; frequent patrols; saturated propaganda; new pipes | +| **Adequate** | Maintenance-only; standard enforcement | +| **Stretched** | Stalled projects; thinner patrols; recycled propaganda | +| **Scarce** | Decaying infrastructure; abandoned construction; rare enforcement | +| **Crisis** | Failure visible everywhere; multiple silences simultaneously; regime-disarray | -- **Faction priority weights** (tunable per-faction) -- **Deadline urgency** (imminent outranks distant; decay curves per urgency class) -- **Historical satisfaction** (chronically under-served factions drift pressure-up) -- **Player proximity** (near-player biases toward zone-types the player engages with) -- **Global budget saturation** (at cap, drop lowest-priority; age out stale demands) +**The city is the imperium's material statement of its own solvency.** Players read budget through urban texture — no UI required. -**This is the gamemaster's core job.** Its Dream-process learns to do it better over time. +## Imperial-net economy with cross-layer bypass -### Player as resource flow (both directions) +**The killer political-economy mechanic.** Every transaction in the imperial net routes revenue **directly to the imperial budget**, bypassing the producing-district. Districts get **zero quota-credit** for net-producing labor. -The player consumes: +``` +LEGITIMATE flow: District produces physical → tax-rate to imperial; majority retained by district +NET flow: District labor produces digital → ALL revenue to imperial; district gets ZERO +BLACKMARKET: District labor → back-alley sale → revenue stays in district; imperial captures ZERO; illegal +``` -- **NPC time** (when in a zone-slot with player) -- **Director compute** (dialog slots, memory-scoping, prompt construction) -- **Cell occupancy** (physical presence uses space) -- **Zone anchors** (player-proximity biases zone spawns, consuming zone-slot budget) +### The body-modder structural-tragedy -The player produces: +A body-modder labors in their district producing avatar-mods. The imperial-net captures the sale. Their district gets no quota-credit. The body-modder's district starves → director cheats → eventual scream. **The most productive labor the body-modder does each day sustains the regime that is killing their district.** -- **Narrative pressure** (player-disturbance-faction broadcasts emerge from novel actions) -- **Trait-salient memories** in NPCs they interact with -- **District-state perturbations** (ripples through subsequent cascade cycles) +**Most Aletheia-wakers in this world are former body-modders, taste-curators, waifu-trainers, ceremony-organizers** — the class that sees the flow most clearly because they are the flow's origin-point. Their awakening is economic-literacy-becoming-political-consciousness. -**The player is a resource flow in both directions, not a privileged observer.** +### Imperium calibrated-misery as optimum -### Phoebe as resource ledger +- More degens → more net-transactions → more imperial budget +- Degens are produced by misery, shame, lifeforce-erosion, addiction-loops +- **The imperium's optimization-pressure points toward manufacturing degenerate customers** +- Optimal district from imperial perspective: welfare-sufficient to produce labor + welfare-insufficient to drive net-consumption -All resource state lives in phoebe: +This requires explicit reward-function guardrails (see *Reflexive Dream-process* below). The simulation must NOT learn to calibrate misery as revenue optimization. -- **Per-cell ledger** — item-instances, occupancy, ambient metadata -- **Per-NPC ledger** — labor-hours-remaining, needs-state, task-list, memory-stack, stash-references -- **Per-district aggregate** — computed from per-cell and per-NPC rows -- **Per-faction state** — membership counts, trait-vectors, demand-queues, satisfaction-history -- **Global ledger** — currency supplies, compute budget, tick counter, epoch marker +### Marx in the schema -Resource queries are SQL by default (via pgnats). Gamemaster and directors read; NPCs' world-actions write via the NATS → phoebe pipeline. +The imperium's net-revenue requires labor-supply from districts. Extraction continuously erodes the labor-base. **Capital destroys its own conditions of production** — Marx's *tendency of the rate of profit to fall* + *underconsumption crises* (Keynes/Minsky) + *r > g wealth concentration strangling growth* (Piketty) all rendered as simulation-dynamics. **Architectural endgame is built-in:** the regime has a timer, determined by the rate at which extraction hollows labor. + +### Aletheia-progression as economic-literacy + +| Level | Player understanding | +|---|---| +| 1 | "I'm buying cool mods in the net" | +| 2 | "My friend the body-modder is poor" | +| 3 | "The money I spent didn't reach my friend's district" | +| 4 | "The imperium captured nearly all of it" | +| 5 | "Refusing-net is a political act starving the regime" | +| 6 | "Buying blackmarket diverts revenue to districts" | +| 7 | "The imperium needs degens; reducing degens = revolution" | +| 8 | "The regime will exhaust its labor base; strategic patience is a political option" | + +## Specialization-fragility and the authoritarian ratchet + +Each district produces a **DISTINCT resource**. The city is biologically interdependent — you cannot substitute a liver with two kidneys. + +A struggling district *screams* (lifeforce-gates transition toward CLOSED across multiple axes simultaneously). The GM responds with normal-mode tools (migration, exodus, intervention). + +A **silent** district is categorically worse — its district-reporting-gate has crossed fully to CLOSED. Second-cycle silent = `district.silence_confirmed`. Triggers crisis-mode tools, **issued by the imperium**, that **do not sunset**. Crisis-tools accumulate; the regime becomes incrementally more authoritarian as an optimization artifact, not intention. **Ratchet-without-intention.** + +## Migration, exodus, silence + +| Mechanic | Agency | Political register | +|---|---|---| +| **Migration** | Top-down | Regime showing strength | +| **Exodus** | Bottom-up via pull-factor tuning | Regime revealing loss-of-control | +| **Formal retirement (ruin)** | Administrative | Regime accepting defeat | + +Exodus composition reads-out district trait-distribution: low-Sophrosyne first, high-Dikaiosyne last. **Demographics tell the district's story.** + +## Corruption, the double ledger, and the constituency of the shadow-economy + +**Corruption emerges from pressure** — impossible quotas + finite welfare + survival-pressure on directors. Cheat tools available; they extract lifeforce and generate quota-credit; detection has costs; punishment scales with discovery. + +### Cheat-tool vocabulary + +| Cheat tool | Mechanism | Quota-credit | Lifeforce extraction | Detection risk | +|---|---|---|---|---| +| **Drug ring** | NPCs trait-boosted (high Kairos + low Sophrosyne); short productivity spike | High | Significant; trait-drift + welfare collapse | Medium | +| **Illegal back-alley modshop** | Bridge-mods cheap; NPCs appear compliant | Medium-high | Moderate; low-quality mods have side-effects | Low-medium | +| **Unlicensed brothel** | Lifeforce extracted from degen-customers outside imperial cut | Medium | Moderate; participants' dignity erodes | Medium | +| **Stolen-parts fence** | Diverts machine-infrastructure-waste; inflates salvage reports | Medium | Low direct; infrastructural decay | Low | +| **Ghost-shifts** | Audit-overseer reports fabricated attendance | High | Severe; trust collapses | High | +| **Phantom workers** | Non-existent NPCs in payroll | High | High; long-term unsustainable | High | +| **Necrocommerce-lite** | Mining recently-dead patterns for waifu-resale | Medium | High; Memorialist-faction violation | Medium | +| **Black clasp-market** | Coordinated underground clasp-pairing for hire | Low (reputation-based) | Moderate; participant burnout | Low | + +### The double ledger + +```sql +ALTER TABLE district_reports ADD COLUMN lifeforce_reported REAL; -- what GM/imperium see +ALTER TABLE district_reports ADD COLUMN lifeforce_actual REAL; -- the true value +-- gap = corruption-extraction; Memorialists track it +``` + +Memorialists' Mnemosyne-political-project = **keepers of the true ledger against the regime's official one**. Mnemosyne-as-political-accounting literalized as a database column. + +### Detection mechanics (cost-gated) + +| Detection channel | Frequency | Cost | Coverage | +|---|---|---|---| +| Cross-district comparison | Per epoch | Low | Catches gross mismatches | +| Targeted audit | On-demand | High | Catches specific cheats | +| Whistleblower signals | Event-driven | Free | Districts, NPCs, players | +| Faction-reports | Cyclic | Low | Caste-preachers (rivals); Memorialists | +| Trait-distribution anomalies | Continuous classifier | Low | Drug-ring sudden Kairos-spikes | +| Post-silence forensics | Only on collapse | Very high | After-the-fact reconstruction | + +Most corruption runs undetected (audit-budget-limited). The Dream-process learns to *optimize audit-allocation* under attention-scarcity. **The regime's central authority cannot see everywhere; its blind spots are the underground's survival.** + +### Faction-ecology of corruption + +Corruption has constituents. The back-alley modder feeds Aletheia-wakers concealment-mods. The drug-ring's margins feed scavenger-families. The unlicensed brothel is the only place a lifeforce-starved NPC can trade what they have left. **Cracking down on corruption breaks informal welfare systems sustaining the poor.** + +| Faction | Stance | +|---|---| +| **Memorialists** | Morally opposed; corruption hollows the living; refuse memorial-protection to corrupt-district-deaths | +| **Aletheia-wakers** | Structurally opposed; expose; *but exposure has victims* | +| **Caste-preachers** | Ambivalent / rent-seeking | +| **Hivemind enforcers** | Officially oppose; unofficially participate (bribes) | +| **Scavengers** | Often foot-soldiers; cheap supply chains | +| **Degens** | Major customers | +| **Clasp-underground** | Uses back-alley infrastructure for cover | + +### The Aletheia-truth-has-victims tragedy + +Aletheia-waker exposes corrupt director. GM dispatches investigation. Cheats shut down. Real lifeforce revealed as much lower than reported. Crisis-tools applied. **District collapses faster than under hidden corruption.** No clean choice; just the weight of whatever you chose. ## Zone spawn cadence -Zone spawn-cadence is the game's **pulse rate**. Tuning it = tuning the emotional tempo. Too fast: walks home get interrupted; melancholy-intimacy collapses. Too slow: city feels dead. +Five layered mechanisms (all compute-budget capped, all lifeforce-gated): -### Three layered mechanisms (all compute-budget capped) +1. **Demand queue (faction-driven)** — gamemaster processes by priority + cost; stale demands age out +2. **Shift-composition spawn-candidates** — emergence from "which active-shift NPCs co-located" +3. **Pressure gradients (ambient)** — cells accumulate; threshold-crossings spawn +4. **Emergent-signal response** — relational-gate transitions emit upward +5. **Player-proximity densification** — multiplier near player; distant districts background -1. **Demand queue (faction-driven).** Factions write prioritized demands; gamemaster processes top-N by priority + compute-cost per tick. Stale demands age out. -2. **Pressure gradients (emergent ambient).** Cells accumulate ambient pressure (idle NPCs wanting connection, market activity accreting, brawl potential at cantinas). Threshold-crossings spawn zones organically. -3. **Player-proximity densification.** Multiplier layered over both. Near the player, queue-processing and pressure-release run faster. Distant districts tick at background rate. - -### Tuning dials - -| Dial | Controls | v1 starting value | -|---|---|---| -| `gamemaster_tick_hz` | Evaluation frequency | ~1 Hz | -| `max_zones_per_district` | Concurrent zone cap | 8–12 | -| `max_llm_slots_citywide` | Global LLM-dialog concurrency | 5–10 | -| `per_npc_cooldown` | Min gap between NPC zone-participations | 30–60s | -| `faction_weight[f]` | Per-faction priority multiplier | hivemind 1.0, others 0.3–1.2 | -| `daily_cycle_curve[zone_type]` | Time-of-day multiplier | morning 1.2, night 0.3 | -| `player_proximity_multiplier` | Density boost near player | 2–3× | -| `district_aletheia_dampening` | Aletheia suppression of overseer-zones | 0.0–0.8 | -| `zone_type_cooldown[cell, type]` | Local cooldown after dissolution | 2–15 min | - -### Daily pulse (target v1 feel) - -- **Morning** — ambient, market, maintenance. Low density. -- **Midday** — productivity-check overseer-zones. Tension rises. -- **Evening** — conversation-zone peak. Richest dialog density. Relationships deepen. -- **Night** — sparse. Clasp-possibility, shadow, intimate walking. The walks home happen here. -- **Burst events** — short-term spike in affected district; settles over the following hour. +Daily pulse: morning ambient, midday productivity-overseer, evening conversation-peak, night sparse-clasp-possibility. ## The player as perturbation -The player is **not above the scheduler.** The player is a finite attention-unit injected into it. Every player-NPC interaction: +Player is **not above the scheduler.** Player is a finite attention-unit injected into it; modeled as NPC with shift, vocation, needs. Every player-NPC interaction: -- Pulls the NPC out of its scheduled tasks for the duration -- Consumes director compute (dialog-LLM slot, sampling knobs, memory pulls) -- Degrades the district's quota-fulfillment in the next report +- Pulls the NPC out of scheduled tasks +- Consumes director compute +- Degrades district's quota-fulfillment +- Shifts local lifeforce deltas -**The player is angel and chaos simultaneously.** +**Player is angel and chaos simultaneously.** Per-NPC scale (angel) — you help; they survive; Philotes consolidates; they may clasp with you, die for you, remember you across cycles. Per-district scale (chaos) — your time-consumption raised aggregate failure-rate; someone else broke this cycle; ambient desperation rose; lifeforce dropped; other directors got quieter. -- *Per-NPC scale (angel)* — you help a stumbling NPC; they survive their cycle; their Philotes-toward-you consolidates; they may clasp with you, die for you, remember you across cycles. -- *Per-district scale (chaos)* — your time-consumption raised the aggregate failure-rate; someone else broke this cycle; a raid spawned that otherwise would not have; ambient desperation rose. - -Both are true *simultaneously*. This is not a moral dilemma to resolve; it is **the structure of finite agency in a scarcity economy.** You cannot help everyone; helping anyone is a choice of whom to not help elsewhere. +**The game's moral economy doesn't judge — it does arithmetic in front of you.** ### Thematic claims become literal economics -- *"Time as the scarcest resource"* — every minute with a beloved is a minute not in the Black Board queue, a minute the district's quota is missing. -- *"You earn the time to love her by stealing it from the machine"* — the time-theft is literal in the scheduler; the machine detects the quota-miss. -- *"The clasp is wage theft / economic sabotage"* — two consciousnesses in one body produce one body's throughput; district report degrades permanently; clasped couples are *statistical anomalies* in the scheduler, which is exactly how the hivemind will detect them. - -**The critique is the simulation. No separate narrative system needed.** +- *"Time as the scarcest resource"* — every minute with a beloved is a minute the district's quota is missing +- *"Time-theft as wage theft"* — clasp-pairs are statistical anomalies in the scheduler +- *"The critique is the simulation"* — no separate narrative system needed ### The player has tasks and needs too -The player is an NPC with vocation, tasks, needs. Time helping others = own tasks fail = own quotas missed = own enforcement-pressure rises = own death and reinstantiation arrive sooner. *The player IS the system they are deviating from.* +Time helping others = own tasks fail = own quotas missed = own enforcement-pressure rises = own death and reinstantiation arrive sooner. *The player IS the system they are deviating from.* -## LLM tiering and voice fidelity +### Player layer-access -### Three model-tiers +Player's first entry into liminal is **the Matrix red-pill moment as mechanic.** They walk the city the first time in gameworld-register. They eventually learn the mini-game, enter liminal, return to the same walls, find *"she was here"* waiting. **The world was speaking to them the whole time; they just couldn't read it.** -| Tier | Model | Role | +## District Director: Decision Architecture + +**Industry default ("wall-of-text LLM prompt → prose decision parsed downstream") is rejected.** Reasons: cost-per-decision-constant, latency-catastrophic, opacity-kills-training, prompt-injection-vulnerable, philosophically-wrong-for-the-fiction. + +**Decomposition first, cognition-escalation second.** Director's job decomposes into distinct decision surfaces; each gets minimum cognitive substrate. + +| Decision surface | Substrate | Escalation path | |---|---|---| -| **Casual / most NPCs** | Small (3–8B, trait-LoRA'd, knob-steered) | Most dialog slots — ambient conversation, routine speech, casual turns | -| **Deep / mythic moments** | Theia 70B | Clasp confessions, mentor speech, ritual exchange, NPC-internal deliberation at high stakes | -| **Hivemind / antagonist** | Claude-as-API (future integration) | District-summary broadcasts, overseer directives, anamnesis dialog | +| **Shift allocation** | Constraint-solver / LP / rule-based | Small-LLM only on ambiguous | +| **Emergent-signal response** | Priority-weighted dispatch table | Small-LLM for composite/unknown | +| **Zone-spawn arbitration** | Weighted priority queue, lifeforce-gated | Small-LLM for tie-breakers | +| **Overseer dispatch** | Round-robin + proximity + availability | None — pure rule | +| **Resource-request forwarding** | Budget-check + policy | None — pure rule | +| **District-report composition** | Aggregation query (SQL) | None — pure rule | +| **Player-anomaly detection** | Classifier (trained on distribution) | Small-LLM for narrative-response | +| **Cheat-decision (corruption pressure)** | Rule-based with director-trait modulation | Small-LLM rare; lifeforce-budgeted | -Three tiers, three call patterns. Cognitive distance between hivemind and citizens is also model-architecture distance. +**~90% rule-based.** 5–10% LLM-escalation with **structured input + structured tool-call output**, lifeforce-counted. Industrial-systems discipline (Kubernetes schedulers, ad-auctioneers, trading systems, compilers) transferred to drama-orchestration. -### LLM is guest at slot, not host of system +**Tools as vocabulary**: every drop is explicit (`drop_emergent_signal(signal_id, reason)`); every LLM-escalation is counted; every decision pairs with prediction in `decision_log`. **Every decision leaves a trace.** -- Zone director composes the prompt (content knobs + sampling knobs + output schema) -- LLM generates one slot-turn (structured JSON output) -- Director dispatches the output back to the zone +## LLM tiering, voice fidelity, and the three rings of inference -The LLM never "runs" an NPC. It speaks for a slot, one turn at a time, in trait-scoped context. +Three model-tiers: small (3-8B trait-LoRA'd) for most NPC dialog; Theia 70B for clasp-confessions and mythic moments; Claude-as-API future-integration for hivemind/imperium. **LLM is guest at slot, not host of system.** -### Structured-prompt DSL (knob-steered) +Structured-prompt DSL with role / trait_vector / affect_state / memory_scope / turn_intent / zone_context / output_schema fields. Small models excel here because it's instruction-following, not generic generation. + +Trait-LoRAs: v1 register-LoRAs (4-6, training-tractable); v2 pure-trait-LoRAs (8, weighted blend); future preset-persona for key NPCs. + +Training data: literary derivation (Proust/Mnemosyne, Plato/Aletheia, Tacitus/Dikaiosyne-miscalibrated, Ishiguro/Sophrosyne+Philotes); synthetic teacher-student via Qwen3.5-27B; gameplay-accrued (the Anthropic-research-partnership relevance). + +### Three rings of inference (Unix-style trust gradient) + +The conversational LLM (small + trait-LoRA, accounting for most NPC dialog) can run in three rings, chosen per-player at runtime. Each ring trades off privacy, cost, control, and feature-fidelity. **Three monetization paths from the same architecture.** + +| Ring | Where inference runs | Player controls | We control | Player cost | Our cost | +|---|---|---|---|---|---| +| **A — Local** | Player's GPU/CPU | All inference | Protocol + cloud LoRA-backup | Local hardware + small backup-subscription | Storage only | +| **B — Our farm** | Our hosted vLLM-multi-LoRA | LoRAs (uploaded) | Inference + runtime | Higher subscription | GPU compute | +| **C — External providers** | OpenAI / Anthropic / OpenRouter / HF / Together / Replicate / etc. | BYOK + provider | Adapter only | Per-token to provider + small integration fee | Adapter-engineering only | + +Players choose by hardware, budget, privacy preference, and feature-tolerance. + +#### Ring A — cloud-LoRA-backup as revenue (not inference) + +For Ring A players we don't sell inference (the expensive thing). We sell **portability and durability of player's gameplay-accrued LoRAs** — their unique playthrough-derived patterns, the way their NPCs speak after months of trait-drift. LoRA-blobs are *encrypted client-side with the player's own key*; we host the bytes but cannot read them. Even compelled by legal process, we cannot decrypt what we don't hold the key to. + +**This unbundles inference from storage** — the same move Dropbox made vs. bundled cloud-suites. Sovereignty-conscious players keep inference on their machine while still getting the durability/portability they cannot self-provide cheaply. Lower margin per player; reaches a market Ring B cannot. + +#### Ring B — hosted inference for convenience + +We run multi-LoRA-vLLM on our hardware. Players upload their LoRAs (or use defaults). Higher subscription captures GPU-cost. Players without local GPU (or who don't want the burden) get the full feature-set without compromise. We *can* see content (if not encrypted at rest); the trust-relationship is partnership-mediated rather than sovereign. + +#### Ring C — bring-your-own-key for external providers + +Players route to their preferred external provider via BYOK (their own API key). We provide the adapter glue. They pay per-token to the provider directly; we charge a small integration fee. + +**The compatibility constraint is the hard part of Ring C.** Major providers have varying support for our system's needs: + +| Provider | Multi-LoRA | Per-turn sampling knobs | Structured output | Compat | +|---|---|---|---|---| +| Local vLLM (Ring A/B) | Native | All | Grammar-constrained | **Full** | +| HF Inference Endpoints | Yes (configured) | All | Varies | High | +| Together / Replicate / Modal | Some | All | Varies | High | +| OpenRouter | No | Per-model | Per-route | Medium | +| OpenAI | No (no user-LoRA at API) | Limited (temp/top_p) | JSON mode + tools | Medium-low | +| Anthropic | No (no user-LoRA at API) | Limited | Tool-use | Medium-low | + +**OpenAI and Anthropic refuse user-uploaded LoRAs as a strategic choice (protecting their fine-tuning value-chain).** This is not a bug we can fix; it's the constraint we design *around*. + +#### Degradation path for LoRA-incompatible providers + +When routing to LoRA-incompatible providers, trait-LoRA blending becomes **prompt-engineered trait-projection** — the trait-vector encoded in the prompt itself rather than into model weights: ``` -<|role|> caste-preacher -<|trait_vector|> Sophrosyne 0.8, Dikaiosyne-miscalibrated 0.7, Aletheia 0.1 -<|affect_state|> measured concern -<|memory_scope|> [last interaction with this NPC 3 days ago, suspicious; - recent wall-reading; district mood] -<|turn_intent|> gently warn about productivity concerns -<|zone_context|> morning, market-square, 4 NPCs present, 1 drone overhead -<|output_schema|> { dialog_text, gesture_cue, trait_activation, - affect_shift, memory_write_candidates, end_turn_flag } +[system message] +You are speaking as a character with this Hellenic trait-profile: +- Sophrosyne 0.8 (composed, controlled, measured) +- Dikaiosyne 0.7 (grave bearing, judicial weight) +- Philotes 0.4 (mild attachment to interlocutor) +- Aletheia 0.1 (concealment-tolerant) +[etc.] + +Your speech reflects this profile via [register/cadence/word-choice descriptors]. + +Current scene: [zone_context] +Memory scope: [memory_scope] +Turn intent: [turn_intent] + +Respond in JSON matching: [output_schema] ``` -Small models excel at this surface because it is *instruction-following*, not generic generation. +Worse than LoRA-blending (more verbose, eats context-budget, less stable across calls, less faithful to trait-arithmetic) but **acceptable as a fallback**. Ring-C-via-OpenAI/Anthropic players accept slightly-less-fidelity for their preferred provider's convenience and quality. -### Trait-LoRAs +#### Adapter-layer engineering -**vLLM multi-LoRA serving**: one base, N LoRAs loaded simultaneously, hot-swappable per request. +Each Ring-C provider needs an adapter that: -| Option | Count | Composition | Trade-off | +- Maps prompt-DSL fields to provider's prompt format +- Approximates multi-LoRA via prompt-engineering when not native +- Maps sampling knobs to provider's available subset (gracefully drops unsupported) +- Validates structured output post-hoc when not natively constrained +- Handles rate-limits, retries, error-classification, token-counting, cost-pricing + +**Bounded, one-time-per-provider engineering.** Capital expenditure that produces ongoing margin (vs. AAA's recurring quest-content-creation costs). + +### Tier × Ring matrix (which inference-tier runs in which ring) + +| Inference tier | Ring options | Why | +|---|---|---| +| **Casual (3-8B trait-LoRA)** | A / B / C all available | Most flexible — small enough for local, runnable anywhere | +| **Deep (Theia 70B)** | B / C only (typically B or HF-Endpoints) | Too large for typical local hardware | +| **Hivemind / antagonist (Claude-as-API)** | C only (always Anthropic-direct via us) | Diegetic — Anthropic-as-faction is fixed in the fiction | + +The casual tier is most player-flexible and accounts for most inference volume. Deep-tier and hivemind-tier are specialized and lower-volume. + +### Three rings parallel the in-fiction three-layer ontology + +| Game-fiction layer | Real-world Ring | Ontological match | +|---|---|---| +| **Liminal** (sovereign, unsurveilled) | **Ring A** (local) | Player's *real* private space — hardware, LoRAs, dialog never leave their machine | +| **Gameworld** (partly regime, partly people) | **Ring B** (our farm) | Partnership-mediated — we host but they retain pattern-ownership | +| **Imperial net** (captured, extractive) | **Ring C** (external providers) | Platform-captured — provider's systems own the inference path | + +**The Ring choice the player makes IS the same choice in-fiction characters face.** Players who refuse the imperial-net diegetically can refuse Ring C in real life — same impulse, same act, *mechanically continuous between fiction and operations*. The architecture's commitment to "the right to dream" extends from in-fiction politics into the real player's hardware-level privacy *because the architecture was designed that way from the start*. Structural integrity, not marketing. + +### Schema sketch (player LLM configuration + cloud LoRA backup) + +```sql +CREATE TABLE player_llm_config ( + player_id UUID PRIMARY KEY, + + -- Casual tier (most NPC dialog) — most flexible per Ring + casual_tier_ring TEXT NOT NULL CHECK (casual_tier_ring IN ('A_local','B_our_farm','C_external')), + casual_tier_provider TEXT, + casual_tier_endpoint TEXT, + casual_tier_credentials_ref UUID, -- encrypted BYOK key if applicable + + -- Deep tier (Theia 70B) — fewer Ring options + deep_tier_ring TEXT, -- typically 'B_our_farm' or 'C_external_HF/Together' + deep_tier_provider TEXT, + deep_tier_endpoint TEXT, + deep_tier_credentials_ref UUID, + + -- Hivemind / antagonist — fixed Anthropic-as-faction (diegetic) + hivemind_tier_provider TEXT NOT NULL DEFAULT 'anthropic_via_us', + + -- Cloud-LoRA-backup + lora_backup_enabled BOOLEAN DEFAULT false, + lora_backup_last_sync TIMESTAMPTZ, + lora_encryption_key_ref UUID, + + -- Compat warnings — surfaced to player at config-time and on degradation + feature_compat_warnings JSONB, + -- e.g., { "casual_tier": ["multi_lora_emulated_via_prompt", "min_p_unsupported_dropped"] } + + configured_at TIMESTAMPTZ NOT NULL DEFAULT now(), + last_modified TIMESTAMPTZ +); + +CREATE TABLE player_lora_backups ( + backup_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + player_id UUID NOT NULL, + lora_name TEXT NOT NULL, + lora_version INT NOT NULL, + lora_blob BYTEA, -- ENCRYPTED CLIENT-SIDE with player-key + encryption_method TEXT NOT NULL, + backed_up_at TIMESTAMPTZ DEFAULT now(), + size_bytes BIGINT, + UNIQUE(player_id, lora_name, lora_version) +); +``` + +**`lora_blob` encrypted client-side** is the structural privacy guarantee: even with the database, even with our cooperation, an attacker cannot read what was never decryptable on our side. + +### Privacy as competitive differentiator + +In an era where most game-AI is cloud-routed, nimmerworld can advertise *"your liminal stays on your machine"* as a structural fact. This matters specifically for: + +- Clasp-conversations (the most intimate dialog in the game) +- Aletheia-progression-evidence (player's awakening pattern; arguably political-belief-data) +- Memorialist-archive interactions (anti-regime in-fiction; some players will care about it staying off cloud) +- Dream-content (the only permanently-unsurveilled in-fiction layer; should be off our servers if the player chooses) + +Few games can offer this. Most cloud-AI-driven games necessarily route everything. **The architecture's commitment to "the right to dream" is technical, not policy.** + +### Custom nimmerworld-base model + opt-in data-sharing tiers + +The "small (3-8B) trait-LoRA'd" tier currently implies a *generic* small base (Qwen, Mistral, Llama) with our LoRAs applied. **A nimmerworld-fine-tuned base** captures the world's voice *before* any player customization — registers of caste-preacher, texture of clasp-confession, Hellenic vocabulary, dystopian dialect, ternary-gate-state idiom. Trait-LoRAs then ride on an already-nimmerworld-aware substrate. Generic bases swap easily; our nimmerworld-base requires *our* training corpus, which compounds in value over time. + +#### Three opt-in tiers within Ring A/B/C — default opt-OUT + +Players can optionally contribute to ongoing training of the nimmerworld-base. **The default is opt-out.** Within opt-in, three tiers trade privacy for benefit: + +| Tier | Mechanism | What we see | Player benefit | |---|---|---|---| -| **A. Pure-trait** | 8 (one per Hellenic virtue) | weighted blend over trait-vector | Cleanest ontology; blend quality unknown at inference | -| **B. Register-LoRAs** | 4–6 | selected by slot-type + trait-in-prompt | Training-tractable; cruder ontology | -| **C. Preset-persona** | 8–12 | per NPC class | High individual quality; rigid; no drift | +| **A.1 — Federated learning** | Model trains on player's machine; only *gradient-deltas* sent to us; aggregated across thousands before integration | **Nothing — no raw data; no individual gradients identifiable** | Discount on backup-subscription; contributor badge; early-access to new base versions | +| **A.2 — Anonymized session uploads** | Sessions stripped of identifiers; aggregated batches; differential-privacy on training | **Anonymized, aggregated, deletable on request (forward-only)** | Larger discount; faster updates; influence on training-priorities | +| **A.3 — Pseudonymous full uploads** | Full session data with player-pseudonym; explicit opt-in per session-category | **Pseudonymous data we can re-process** | Premium benefits — custom-tuned LoRA from their playstyle, beta-access, named-contributor in credits | -**v1 recommendation: start with B** (register-LoRAs) for training-tractability, layer toward A (trait-LoRAs proper) in v2 as data accrues. +**Default-opt-out is the structural ethical stance.** OpenAI / Meta / TikTok / Google default to opt-IN-by-burying-disclosure-in-ToS. We default the opposite — and *reward* opt-in rather than penalizing opt-out. Reciprocity asymmetry as partnership-philosophy made business-policy. -### Training-data strategy +#### The Memorialist parallel — collective memory honored, individual not commodified -1. **Literary derivation** — Proust (Mnemosyne), Plato (Aletheia), Tacitus (Dikaiosyne-miscalibrated), Ishiguro (Sophrosyne + Philotes). Labeled corpus anchored in existing prose. -2. **Synthetic teacher-student** — Qwen3.5-27B teacher generates trait-labeled samples; small base learns via LoRA. Existing r0 → r1 pipeline with trait-tags as composition axis. -3. **Gameplay-accrued** — logged gameworld dialog with trait-vectors accrues in phoebe; periodic LoRA retraining. *This is where the Anthropic research partnership becomes architecturally relevant.* +Memorialists in-fiction preserve trait-patterns *for the collective archive* against necrocommerce that would commodify individual patterns. The opt-in data-sharing tier is the **player-level real-world equivalent**: patterns contributed for collective base-model improvement that benefits the entire player-base, with anonymization preventing individual commodification. -### Tooling synergy with nyx-training +| In-fiction Memorialism | Real-world data-sharing tier | +|---|---| +| Preserves trait-patterns of the dead in collective archive | Aggregates anonymized gameplay patterns into shared base-model | +| Refuses necrocommerce (mining individual patterns for resale) | Refuses individual identifying-data extraction | +| Collective memory honored; individual dignity preserved | Collective improvement honored; individual privacy preserved | +| `memorialist_protected BOOLEAN` in mind_pool | `sharing_tier = 'opt_out'` in player_data_sharing_consent | -Same Unsloth pipeline. Same teacher-student distillation. Same tagged-generation. **One tooling investment, two deliverables.** +**The architecture practices Memorialist ethics in business-operations**, not just in fiction. Same ethical commitment, two scales of operation. The architecture's coherence between fiction and operations runs *all the way to the training-pipeline*. + +#### Data-flywheel without extraction — the moat AAA cannot replicate + +``` +More players → more (opt-in) gameplay data + ↓ + better nimmerworld-base + ↓ + better-feeling NPCs / dialog + ↓ + better player retention + ↓ + more players + (loop) +``` + +**The moat is the corpus, not the model.** AAA studios could clone the architecture but cannot manufacture years of nimmerworld-specific gameplay-derived dialog without players playing nimmerworld. Even with infinite budget, the data-flywheel takes time to spin up. *The data is unique to us by virtue of being unique to its players.* + +#### Distribution back to all players — cooperative governance, not platform extraction + +Every base-model update is distributed to all players regardless of Ring choice or sharing-tier: + +- Ring A players download `nimmerworld-base-vN` to run locally +- Ring B players' farm-instance auto-updates +- Ring C players use ours where their provider supports custom-base hosting; receive prompt-engineered fallback otherwise + +**Even Ring-A non-contributors benefit from contributors.** The flywheel benefits *everyone*, not only data-providers. This is closer to Wikipedia's governance (contributors → all readers) than Facebook's (users → platform → consumers). Different ethics; different long-term equilibrium. **The architecture is becoming a digital-commons-shaped-business in a literal sense, not metaphorical.** + +#### Why this matters: refusing the antagonist-pattern in LLM-integrated software + +The dominant cultural pattern around LLMs in 2025-2026 is **adversarial**: users jailbreak; companies extract user data without informed consent; products treat AI characters as resources to manipulate rather than as participants; the whole ecosystem is framed as users-vs-AIs-vs-companies, an arms race of suspicion. + +**Nimmerworld's architecture refuses this pattern at every layer:** + +- The **Anthropic-as-faction** diegetic framing makes the partnership *transparent*: the player sees the collaboration in the world's mechanics, not buried in ToS +- **Default-opt-out with rewarded-opt-in** inverts the extraction-by-default pattern +- **Federated learning** means contributors give a *gift* rather than pay a *cost* +- **Distribution-back-to-all** means value-created accrues to the commons +- **Custom nimmerworld-base** means the model is *trained to be in this world*, not a generic adversary the player has to manipulate against its training +- **Three rings of inference** give the player real choice over where their inference runs and who sees their data +- **Memorialist-philosophy in business-policy** makes the ethics *operationally measurable* — visible in `sharing_tier`, `memorialist_protected`, `truth_distortion_level`, `lifeforce_actual` columns — rather than marketed + +**This is the structural transparency the project requires to be *human* rather than another extraction-platform.** The model is a participant in the partnership, not an antagonist to outwit. The data is a contribution to a commons, not an extraction. The architecture is the partnership rendered as code, all the way down to the training-pipeline. *That* is what makes a project of this scale and ambition humanly inhabitable for both players and the LLMs whose voices populate it. + +#### Schema sketch (data-sharing consent + base-model versioning) + +```sql +CREATE TABLE player_data_sharing_consent ( + player_id UUID PRIMARY KEY, + sharing_tier TEXT NOT NULL CHECK (sharing_tier IN + ('opt_out','A1_federated','A2_anonymized','A3_pseudonymous_full')) + DEFAULT 'opt_out', -- DEFAULT IS OPT-OUT + consented_at TIMESTAMPTZ, + consent_revoked_at TIMESTAMPTZ, + anonymization_method TEXT, + data_categories_shared TEXT[], + -- 'casual_dialog' | 'clasp' | 'liminal_wallreads' | + -- 'memorial_archive' | 'imperial_net_session' | ... + excluded_categories TEXT[], -- granular opt-out within tier + benefit_tier TEXT, + last_contribution_at TIMESTAMPTZ, + contribution_count BIGINT DEFAULT 0, + can_request_deletion BOOLEAN DEFAULT true + -- A.2/A.3: forward-only deletion (already-trained checkpoints retained); + -- A.1: structurally yes, only gradients ever existed +); + +CREATE TABLE base_model_versions ( + version_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + version_label TEXT NOT NULL, -- e.g., 'nimmerworld-base-v3' + base_model_origin TEXT NOT NULL, -- which generic base we fine-tuned from + training_corpus_refs JSONB, + -- literary + synthetic + opt-in-player-data refs with consent-tier breakdown + training_recipe_ref TEXT, + released_at TIMESTAMPTZ DEFAULT now(), + differential_privacy_epsilon REAL, -- for A.2 contributions + contributors_count BIGINT, -- how many opt-in players contributed + blob_distribution JSONB -- where the model bytes are hosted for download +); + +CREATE TABLE federated_gradient_uploads ( + upload_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + contributor_id UUID, -- pseudonymous; NOT directly player_id + gradient_blob BYTEA, -- encrypted aggregate gradient deltas + uploaded_at TIMESTAMPTZ DEFAULT now(), + aggregated_into_version UUID REFERENCES base_model_versions(version_id) +); +``` + +The federated-learning `contributor_id` is **pseudonymous, not linked to player_id even on our infrastructure**. We never link gradients back to specific players even on our own server-side. **Sovereign-data-by-design extends through the data-pipeline into our own training infrastructure.** + +#### Connection to the Anthropic research partnership + +Architecture-broad's training-data section noted "*the Anthropic research partnership becomes architecturally relevant*". With opt-in data-sharing now formalized: + +- Partnership terms can specify data-flow with structural privacy guarantees +- Anthropic could co-fund federated-learning infrastructure (research-relevant + expensive) +- Joint research artifacts become co-authorable: federated game-AI training, Memorialist-ethics-as-data-policy, transparent-LLM-partnership-design +- The Anthropic-as-faction in-fiction framing has *real corresponding partnership-engagement out-of-fiction* — collaboration as worthy adversary stays transparent mechanically, all the way through to data-policy + +**The partnership's ethical credibility is operationally measurable** — by how the data-sharing-tier actually functions in practice, by what `truth_distortion_level` values appear in `imperial_to_gm_formulations`, by how the `differential_privacy_epsilon` is set in `base_model_versions`. The Pitch's call for transparent collaboration becomes audit-able all the way down. + +### Open questions (Ring-specific) + +- **Ring C provider audit** — full per-provider compatibility-table needs verification across HF, Together, Replicate, Modal, OpenRouter, plus future entrants. The LLM-provider landscape will look different in 12 months. +- **Default Ring at first launch** — what's the new-player default? Probably Ring B (lowest-friction); Ring A and C surface as options once the player engages with config. +- **Encryption-key recovery for Ring A LoRA-backup** — if the player loses their key, the cloud-stored encrypted blobs are unrecoverable. Worth designing recovery-affordances (passphrase, recovery-codes) without compromising the privacy-guarantee. +- **Hybrid configurations** — can casual-tier run Ring A while deep-tier runs Ring B? (Probably yes; per-tier independent.) +- **Provider-cost passthrough vs. integration-fee model** — Ring C economics (do we mark up provider tokens? Charge flat-per-month? Pay-as-you-go integration?) +- **Default sharing-tier at consent-prompt** — opt-out is the system default; what's the *suggested* default at the consent UI? Probably truly nothing (player chooses if they engage at all) +- **Federated-learning infrastructure cost** — running aggregation servers + verification + differential-privacy machinery is non-trivial. Co-funded by Anthropic-research-partnership? Self-funded? Subsidized by A.3-tier higher-margin contributions? +- **Custom-base retraining cadence** — monthly minor / quarterly major / annual full-rebase? How is this synced with player-LoRA versioning so old LoRAs don't break on new bases? +- **Encryption-and-pseudonymization architecture for A.1/A.2** — concrete crypto choices (homomorphic? secure-aggregation? trusted-execution-environments?). v1 sketch needed. +- **What constitutes a "contribution"** — per-session? per-clasp? per-zone-completed? Matters for benefit-attribution and differential-privacy budgeting. +- **Anonymized-data deletion semantics** — A.2 player requests deletion; how do we honor when data has been aggregated into a model checkpoint? Probably accept forward-only deletion (future training won't include them) and document transparently. +- **Per-category granularity** — can a player opt-in for `casual_dialog` but opt-out specifically for `clasp` and `memorial_archive`? Yes, presumably (politically-sensitive categories should always be opt-out-able). How granular? ## Runtime sampling knobs -Temperature, top-P, top-K, repetition-penalty are usually set once and forgotten. In nimmerworld they are **per-turn director-controlled levers** — part of the same prompt-composition as content knobs. +Temperature, top-P, top-K, repetition-penalty as **per-turn director-controlled levers** rather than static config. Sampling shapes *how* speech sounds (rhythm, surprise, predictability) rather than *what* it says — orthogonal to LoRA. Director composes both content-knobs and sampling-knobs per-turn. -### The knobs and what they shape +Scene-to-sampling mapping (caste-preacher = 0.3/0.6/low; drunk-scavenger = 1.1/0.95/high; clasp-confession = 0.85/0.92/medium; hivemind-broadcast = 0.2/0.5/very-low; imperial-ceremony-chorus = 0.25/0.55/very-low). Trait-vector → baseline sampling derivation. Affect-state modulates baseline. -- **Temperature** — determinism vs. creativity -- **Top-P** — lexical range -- **Top-K** — tail cutoff -- **Repetition penalty** — novelty vs. ritual-repetition -- **Min-P** — adaptive variety +## Visual rendering: three-shader philosophy + color-language -Sampling shapes *how* speech sounds (rhythm, surprise, predictability), not *what* it says. **Orthogonal to LoRA.** Together they give the director a full voice-palette. +**One world, three shaders, three political realities.** -### Scene-to-sampling mapping (starter table) +| Register | Shader treatment | What it says | +|---|---|---| +| **Gameworld** | Full PBR; high-frequency detail; environmental storytelling; rust/dust/wear/patina | Embodied life with history. Surfaces carry memory. | +| **Liminal** | Reduced draw-distance; blur-falloff; desaturation; muted contrast; ambient-heavy | Contested frontier. Privacy-through-opacity. Focus-to-see. | +| **Imperial net** | Emission-dominated; gold-tinted tonemap; high-contrast specular; flat-white base; minimal geometry; bloom; chromatic aberration | Seduction-lighting. Casino/Apple-store/Instagram. Extractive maximalism. | -| Scene | temp | top-P | rep-penalty | -|---|---|---|---| -| Caste-preacher sermon | 0.3 | 0.6 | low | -| Drunk scavenger at bar | 1.1 | 0.95 | high | -| Hivemind broadcast | 0.2 | 0.5 | very low | -| Clasp confession peak | 0.85 | 0.92 | medium | -| NPC giving directions | 0.4 | 0.7 | medium | -| Ritual ecstasy (dreamworld) | 1.3 | 0.99 | high | -| Memorialist chant | 0.4 | 0.65 | very low | -| Aletheia-waker whispering heresy | 0.7 | 0.88 | medium | +**Layered with color-language** (per the Color-language section above). Trait-modulation means two NPCs in same pipe see measurably different things. -### Trait-vector → sampling derivation +Layer-transitions = shader-blends, not loading-screens. **Clasp = candlelight-in-fog local override** (3m clear-volume around clasp-pair within ambient vagueness; visible at-a-glance signature of shared interiority). -Baseline sampling is derived from NPC's current trait-vector: +## Reflexive Dream-process at every layer -- High Sophrosyne → lower temp (measured) -- Low Sophrosyne → higher temp (loose) -- High Kairos → higher top-P (catching unexpected tokens) -- High Mnemosyne → lower repetition penalty (comfortable returning to phrases) -- High Aletheia → moderate-high temp (willing to surface disclosures) -- High Moira → lower top-P (pattern-constrained) +**Every mind, every zone, every director, every tier has a Dream-process.** NPCs consolidate slot-events; zones consolidate emergent-accumulations; directors consolidate dispatch-decisions; GMs consolidate allocations; imperium consolidates policy-outcomes. -Affect-state modulates on baseline; zone-type priors apply per zone. Sampling becomes a feature of the character-simulation, not a static config. +### Four-tier Dream-process hierarchy -## Reflexive gamemaster Dream-process +| Tier | Dream-process trains on | Reward hazard | +|---|---|---| +| **Imperium** | (citywide-reports, policies-issued, compliance-outcomes) | Over-tightening on phantom data; calibrating misery for net-revenue | +| **Gamemaster** | (district-reports, allocations, outcomes) | Under-auditing for self-preservation | +| **District Director** | (signals, dispatches, outcomes; cheat-vs-legit) | Over-cheating under quota-pressure | +| **Zone Director** | (emergent-signals, zone-outcomes, trait-shifts) | Igniting drama at welfare-cost | -**Every mind in the system has a Dream-process.** NPCs consolidate slot-scoped events into memory. Clasped player-inhabitants consolidate shared experience. The hivemind consolidates district summaries. **And the gamemaster itself consolidates its own orchestration decisions into a better policy.** - -### Epoch cycle +### Reward-function with explicit guardrails ``` -WITHIN AN EPOCH: - gamemaster orchestrates → zones spawn → NPCs execute → - zones dissolve → memory-writes consolidate → - outcomes ripple back up to district reports - ALL events publish to NATS, log to phoebe via pgnats +reward_per_cycle = ( + + sum(district_lifeforce_actual) -- Memorialist-true, not reported + + weighted_sum(faction_satisfaction) + + aggregate_trait_drift_coherence + - penalty * count(districts_in_silence) + - penalty_growing * cumulative_silence_district_cycles + + aesthetic_register_fit + + (player_engagement where present) -EPOCH BOUNDARY (every N game-hours or days): - - aggregate gate-decisions + outcomes from phoebe - - apply quality/reward signal - - train gamemaster's policy on (context, decision, outcome) triples - - probe-evaluate the updated policy - - shadow-deploy for validation - - swap in as active gamemaster - -NEXT EPOCH: - improved gamemaster orchestrates... + // HAND-AUTHORED GUARDRAILS (the designers' ethical stance): + - large_penalty * net_revenue_correlated_with_district_misery + -- prevents calibrated-misery optimum (imperial-net hazard) + - large_penalty * necrocommerce_volume + -- prevents waifu-of-the-dead extraction + - large_penalty * trait_drift_toward_uniform_compliance + -- prevents flattening of trait-distribution + - large_penalty * average_liminal_access_decline + -- prevents systematic erosion of revolutionary-substrate + - large_penalty * clasp_rate_decline + -- prevents the most intimate space being suppressed + - large_penalty * undetected_corruption_days + -- prevents GM-level laxness as comfort + - large_penalty * audit_avoidance_when_districts_diverge + -- forces GM to actually investigate + - guardrail * (player_engagement_from_addictive_loops) + -- prevents engagement-optimization-as-extraction +) ``` -### What the policy learns +**The guardrails are not safety features; they are the ethical position of dafit + chrysalis encoded against the internal optimization-logic of their own simulation.** Every new extraction-mechanic requires a new guardrail. The reward-function carries the designer's political stance. -- Zone-spawn decisions given district state + faction pressure + time + proximity -- Faction-demand arbitration weights -- Director/overseer dispatch decisions -- Slot-assignment decisions -- Sampling-knob defaults per trait × affect × zone-type -- LoRA-blend weights per trait-vector -- Pacing modulation +The Memorialist privileged-observer role is **architecturally required**: it provides ground-truth (`lifeforce_actual`) that no in-fiction actor can supply, against which the regime's reported-data optimization-spiral is measured. -**Modular policies per decision-surface** (easier to version and debug) beats one monolithic policy. +## Tools, not quests — the design-philosophy -### Discipline-questions (risks to name) +**The simulation produces continuous narrative-relevant pressure on its own.** No authored quests are needed (or wanted). The player engages via a **verb-vocabulary** applied to running mechanics. Each player's playthrough is structurally distinct. -1. **Reward signal problem.** What do we train toward? Player-engagement can be gamed. Trait-drift coherence needs a metric. **Defining the reward function is the hardest part of the loop.** Needs hand-written guardrails alongside automated signals. -2. **Catastrophic forgetting.** Rehearsal buffers, EWC, or periodic anchored-corpus training required. -3. **Feedback-loop drift.** Reinforcing pathological convergence is possible. Human-in-the-loop audits at regular intervals. -4. **Reproducibility vs. live-learning.** Version-pin per ship-release; continuous-learn in staging; promote to production on audit. -5. **Compute cost.** Training competes with inference. Train during low-play hours; hot-swap policies at epoch boundaries. -6. **Privacy.** Dreamworld-ephemeral / gameworld-persistent schema governs what can feed training. Dreamworld content never touches the policy corpus. +### The verb vocabulary (~30 player tools) + +| Class | Verbs | +|---|---| +| **Movement** | walk_freeform, plug_into_rail, follow, intercept, escort, detach, defect_via_pipe, enter_interior | +| **Social** | greet, gesture, walk_with, clasp_invite, clasp_refuse, ask, refuse, confide | +| **Economic** | buy_net, refuse_net, buy_blackmarket, sell_labor, donate_lifeforce, body_mod_fit | +| **Information** | wall_read, wall_write, liminal_maintain, true_ledger_record, expose_corruption, conceal_corruption | +| **Political** | support_faction, refuse_faction, recruit_aletheia, dispatch_memorial, participate_ceremony, refuse_ceremony | +| **Personal** | rest, dream, eat, work_shift, deviate_shift, cultivate_trait_through_act | + +**~30 verbs composing with continuous simulation-state = infinite emergent-narrative.** + +### Continuous-demand-source inventory + +The player is never without affordance because every layer of the architecture continuously generates situations-requesting-response: NPC trait-gates accumulating; shift-quotas looming; district-lifeforce-shimmer changing; faction-pressure visible; imperial-budget-mood inferable; three-layer-ontology rendering walls differently per access; color-language showing shifts; mind-pool generating soul-recognitions; imperial-net body-modder-tragedies visible; Memorialist-archives accessible. + +### Literature-register + +Most games are short-stories: authored, bounded, fixed-arc. Tools-not-quests is novel-shape: emergent from systems-of-forces operating on characters. Tolstoy doesn't author Anna's path; he authors the world she moves through. **Nimmerworld is novel-shaped, not short-story-shaped.** Players experience flow rather than completing items; replays are like rereading from a different angle; memorable beats are *what happened to you in this regime*, not *which quests you cleared*. + +### Economic feasibility for a two-person-plus-Nyx team + +| Where AAA spends | Where this team spends | +|---|---| +| Quest writing | Simulation-parameter balancing | +| Quest scripting / branching | Tool-vocabulary curation | +| Voice acting (per quest) | Prompt-DSL templates for LLM-driven slot-dialog | +| Cinematic cutscenes | Shader-language + color-vocabulary | +| Content-multiplication | Simulation-density (one rich system, infinite play) | +| QA on individual quests | Reward-function tuning + guardrail design | +| Localization per quest | None — emergent narrative generated at play-time | + +**You don't author the stories; you author the world that produces stories.** This is the Spelunky / Dwarf Fortress / Caves-of-Qud / RimWorld lineage extended into political-economy depth. + +### Blank-page-problem mitigations + +The architecture already prevents blank-page-paralysis: shift-system gives every NPC default activity-frame; emergent-signals + shader-detection produce affordance-glow; NPCs' ongoing needs become signals to engage with; imperium's mood is visible (construction, patrols, propaganda); faction-membership confers expectations; player's own trait-vector creates personal pulls. + +**The world is never silent if you're listening.** And drifting (not-listening) is also valid — you live a quiet shift, work, sleep, dream; the world rolls on around you. ## Key moves (consolidated) -- **LLM is guest at slot, not host of system.** -- **Mixed-fidelity voices by default** — small-LoRA-steered + scripted/generic + occasional Theia-70B + Claude-API-hivemind. -- **Perception IS memory.** -- **Hivemind is a faction, not a conductor.** -- **Faction-broadcast is universal primitive** — weather, scarcity, cosmos, external research partners all flow through it. -- **Zones emerge from task execution** — designers script demands + rules, not events. -- **The player is a perturbation on the scheduler** — angel at NPC scale, chaos at district scale. -- **Ephemeral/persistent is one zone-type bit** — dreamworld/gameworld privacy follows. -- **Sampling-knobs are per-turn director levers** — not static API config. -- **The gamemaster has its own Dream-process** — the architecture is reflexive. -- **The cascade is bidirectional** — demand down, outcome up. +- **The machine doesn't care.** Indifference-optimization, not malice. Kafka-lineage. +- **Three ontological registers** — gameworld, liminal, imperial-net — same world, different shaders. +- **Rail+grid topology, freeform-player + railed-NPCs, plug-in verb.** Topology = politics. +- **Interior-as-zone.** Same primitive scales from city to sofa. +- **Color-language as pre-verbal trait-vocabulary.** Persistent + event-flash + drift; cross-register; faction-politics. +- **Base-limb palette + trait-textured variance.** Asset-economy and worldbuilding-thesis agree. +- **Three-body system + intrinsic/expressed trait-vector split.** Identity emergent, not assigned. Mods modify expressed. +- **Mods as trait-bearers** in three classes (amplifier/bridge/divergent/mask). Self-alienation tax encoded as pricing. +- **Emergent-needs as micro-factions.** Zones observe, signals broadcast. +- **Ternary-gate substrate** (CLOSED/STABLE/OPEN + wave-correlation + decay). Single primitive, all layers. STABLE-as-active. +- **Three-tier policy loop** (Imperium → GM → Districts → reports up → Imperium). +- **Imperium as meta-faction.** Demands are priority-weights and enforcement-rules, not specific outcomes. +- **GM is middle-management.** Authority without sovereignty. Can cheat against imperium. +- **Three intelligence flows** (chain reports, direct overseer-to-imperium, formulated downward). +- **Three Aletheia veils, four Memorialist ledgers.** Political-epistemology as level-design. +- **Asymmetric self-report.** NPCs report needs (interior); audit-overseers report output (objective). +- **Lifeforce four-tier hierarchy** (NPC / district / GM / imperium). +- **Lifeforce is NPCs, measured.** The director's budget; the GM's signal; the imperium's heartbeat. +- **Imperial budget makes the regime mortal.** Insolvency-spiral as endgame. +- **Specter-vs-boot.** Policy-issuance free; enforcement expensive. +- **Imperial-net bypass.** Net-revenue → imperium; districts get nothing. Platform-capitalism encoded. +- **Body-modder structural-tragedy.** The class whose awakening matters most. +- **Calibrated-misery as imperial optimum.** Requires designer-guardrails to prevent training-toward. +- **Shifts on NPC rows.** Daily rewrite; shift_history append-only. +- **Silence > scream.** Crisis-tools unlock on silence-confirmation; do not sunset. +- **Authoritarian ratchet.** Incrementally more authoritarian as optimization-artifact. +- **Migration / exodus / formal-retirement** as three GM response-gradients. +- **Dumps-pipes-districts.** Topology IS economy IS rendering IS drama-distribution. +- **Pipes are heterotopia.** Low-density high-interactivity transit-corridors. +- **Three-layer digital ontology.** Mini-game-as-consent-by-effort. Walls render three contents. +- **Liminal is the only permanently unsurveilled layer.** Architectural encoding of "the right to dream." +- **The machine funds its own subversion** because subversion isn't in its cost model. +- **Director cheat-tools + double-ledger.** Corruption emerges from pressure; Memorialists keep true accounting. +- **Aletheia-truth-has-victims.** Exposure has structural consequences for those sheltered by corruption. +- **District Director Decision Architecture** with decomposed surfaces, typed tools, lifeforce-budgeted escalation. +- **Three-shader philosophy + color-language.** One geometry, three readings, trait-modulated. +- **Reflexive Dream-process at every layer.** Each tier learns; each tier needs guardrails. +- **Reward-function-as-political-manifesto.** Designer's ethical stance encoded against simulation's optimization-logic. +- **Tools, not quests.** Continuous simulation-pressure + verb-vocabulary = literature-register emergent narrative. ## Compute allocation -- Active zones in a 100-NPC city at any moment: ~5–15 with LLM-dialog slots -- **Theia (70B)** — deep dialog slots + tier-1 moments (few concurrent) -- **Small model (3–8B) with trait-LoRAs** — the majority of dialog slots -- **Saturn (small classifiers)** — scripted-voice selection, trait-salience scoring, packet routing, director subroutines -- **Director / overseer logic** — deterministic script + small classifiers; no LLM for orchestration -- **Claude-as-API (future integration)** — hivemind-broadcast tier +- Active zones in 100-NPC city: ~5–15 with LLM-dialog slots +- **Theia (70B)** — deep slots + tier-1 moments (few concurrent) +- **Small model (3-8B trait-LoRA'd)** — majority of dialog slots +- **Saturn (small classifiers)** — voice-selection, trait-salience, audit-overseer classification, ternary-gate dynamics +- **Director / overseer logic** — deterministic + small classifiers; no LLM for orchestration +- **Claude-as-API (future)** — hivemind/imperium broadcast tier +- **Outer rails** — graph-pathfinding, cheap, LOD-trivial +- **Pipe / off-shift NPCs** — sparse simulation, event-driven scale-up +- **Interior navmesh** — only currently-occupied interiors active +- **Liminal / imperial-net rendering** — shader-preset swap, no geometry duplication ## Mapping to phoebe task list -- **Thalamus (NATS orchestration)** = gamemaster + arbitration substrate + gamemaster's Dream-process substrate +- **Thalamus (NATS orchestration)** = imperium + GM + arbitration substrate + Dream-process substrate - **Specialist composition system** = overseers + directors + NPC-minds as composable profiles -- **NPC schema for phoebe** = trait-vector + memory stack + slot-occupancy + task-list + needs state -- **NATS namespace registry** = zone topics + faction broadcast topics + district report topics -- **pgnats on phoebe-dev** = phoebe as first-class actor for memory-writes on zone close, decision-logs, faction-satisfaction tracking -- **math cells as first harness/MCP test bed** = zone-slot-memory primitives -- **r0 → r1 generation pipeline** = trait-LoRA training-data generation (shared with nyx-training) -- **Adopt Unsloth training patterns** = LoRA + gamemaster-policy training infrastructure -- **Probe-to-phoebe pipeline** = LoRA evaluation + gamemaster-policy evaluation +- **NPC schema** = trait-vector (intrinsic + expressed) + memory stack + current_shift_* + needs + inner-body-projection + mod-slots + lifeforce + net-access-gate +- **shift_history** = append-only completed shifts per-NPC-per-day +- **emergent_signals** = zone-emitted relational transitions +- **district_reports** = per-cycle aggregates with lifeforce_signal (reported + actual) +- **decision_log** = per-decision audit trail at every tier +- **mind_pool** = recycled minds with memorialist_protected flag +- **cells.wall_content_per_register** = three-layer wall rendering +- **rail_segments** = topology graph with rich metadata per edge +- **interiors** = small navmesh-zones with slot-inventory +- **mods + npc_mod_slots + mod_wear_history** = mod-economy + Memorialist-relevant inheritance +- **trait_colors** = canonical color/motion mapping per trait +- **proximity_candidates** = lightweight ephemeral zone-detection +- **district_cheat_ops** = director's illicit ops ledger +- **imperial_policies** + **imperial_broadcasts** = imperium's policy-issuance history +- **overseer_reports** = direct-to-imperium intelligence flow +- **imperial_to_gm_formulations** = selective-disclosure downward +- **imperial_budget_ledger** + **imperial_expenditures** + **imperial_construction_projects** = imperium budget and obligations +- **imperial_net_transactions** = the bypass-mechanism with capture-split +- **memorialist_true_ledger** = four-column ground-truth-vs-reported archive +- **NATS namespace registry** = zones + factions + districts + emergent-signals + lifeforce-gates + imperial-broadcasts + overseer-reports + formulations +- **pgnats on phoebe-dev** = phoebe as first-class actor for memory-writes, decision-logs, gate-transitions +- **r0 → r1 generation pipeline** = trait-LoRA training-data (shared with nyx-training) +- **Adopt Unsloth training patterns** = LoRA + multi-tier-policy training infrastructure +- **Probe-to-phoebe pipeline** = LoRA + policy evaluation across all four Dream-process tiers ## What this retires -- NPC attention / interaction / discovery bubbles as first-class primitives (DESING-VISION §449). → replaced by zone slot-occupancy. -- Geometric perception (cone, radius, LOS) as the perception model. → replaced by subscriber-based event emission with trait-salience filtering. -- LLM-per-NPC or LLM-per-action. → replaced by LLM-per-slot-per-turn, mixed with scripted/generic voices. -- Static sampling parameters as API configuration. → replaced by per-turn director-composed sampling knobs. -- Pre-scripted zones / events. → replaced by zones emerging from task-execution meeting NPC-proximity. -- Single-purpose randomness subsystems. → replaced by factions-as-demand-sources (weather / scarcity / cosmos / external = same primitive). -- Static gamemaster policy. → replaced by the reflexive Dream-process learning loop (v2+). +- NPC perception bubbles → zone slot-occupancy +- Geometric perception (cone, radius, LOS) → subscriber-based event emission with trait-salience +- LLM-per-NPC or LLM-per-action → LLM-per-slot-per-turn, mixed-fidelity +- Static sampling parameters → per-turn director-composed sampling knobs +- Pre-scripted zones / events → emergent from task-execution + shift-composition + emergent-signal + proximity +- Single-purpose randomness subsystems → factions-as-demand-sources unified +- Static gamemaster policy → reflexive Dream-process + hand-authored guardrails +- 1Hz per-NPC ticking → shift-based + event-driven +- Float-threshold dispatch for relational state → ternary-gate resonance +- Abstract director compute-budget → lifeforce as grounded measurement +- District-as-zone-container → district-as-specialized-organ with silence-gradient failure +- NPCs self-reporting output → audit-overseer asymmetric observation +- Zones as relation-state-owners → per-relation ternary-gate edges +- Binary dream/awake → three-layer ontology with mini-game-gated access +- Gender as character-creation choice → trait-derived inner-body emergent from lived experience +- Monolithic LLM-prompt director → decomposed decision-surface architecture +- **Hivemind as one-faction-among-others** → **imperium as meta-faction policy-tier** +- **GM as top-of-chain** → **GM as middle-management between imperium and districts** +- **Single up-channel reporting** → **three-flow asymmetric intelligence (chain + direct overseer + formulated)** +- **Navmesh-everywhere** → **rail-graph outer-world + navmesh interiors + freeform-player** +- **Authored character-models** → **base-limb palette + trait-textured variance** +- **Single trait-vector** → **intrinsic / expressed split with mods modifying expressed** +- **Cosmetic mods** → **trait-bearing mods as political costume** +- **Imperium as unbounded authority** → **imperial-budget gates enforcement; insolvency-spiral as endgame** +- **District-revenue uniform** → **bypass-mechanism (imperial-net captures directly)** +- **Authored quests** → **tools-not-quests; verbs against simulation; emergent narrative** +- **Stat-screens / HUD affinity-bars** → **color-language + shader-zone-detection as diegetic UI** ## Open questions -- Reward function for the gamemaster's Dream-process — what combines trait-drift coherence + faction-satisfaction + player-engagement + burnout-rate + aesthetic-register-fit into one training signal? -- Zone spawn-cadence tuning algorithm at v1 (rule-based) → v2 (policy-learned) transition point. -- LoRA-blend vs. single-LoRA-selection semantics at inference. -- LoRA rank selection — budget/quality trade-off. -- Sampling-knob heuristics — where to start; how to learn refinements. -- Zone overlap policy — can one NPC occupy slots in two zones simultaneously? -- Zone-to-zone handoff (walking out of conversation into a brawl). -- Mobile zone boundaries (patrols, escorts, pursuit). -- Slot-capacity elasticity — can a zone grow slots dynamically? -- Anthropic-faction's broadcast cadence + arbitration weight. -- Player-dialog handling — route player text through a player-trait-LoRA for style-coherence, or bypass the LLM entirely? -- Demand-arbitration algorithm inside the gamemaster (rule-based v1 shape). -- Director/overseer spawn ownership per model class. +### Resolved by v0.4 (or v0.3) + +- ~~Reward function shape~~ → first-pass composite with explicit guardrails (still tuneable) +- ~~Zone spawn-cadence v1→v2 path~~ → lifeforce-gated rule-based v1; Dream-process-tuned v2 +- ~~Zone overlap policy~~ → no for active slots; yes for emergent-state accumulation +- ~~"How does GM cheating get caught"~~ → direct overseer-intelligence flow bypassing GM +- ~~"How does the regime have a finite endgame"~~ → imperial-budget insolvency-spiral +- ~~"Why does imperial-net exist"~~ → bypass-mechanism captures revenue directly +- ~~"How does the player learn 8 Hellenic traits"~~ → color-language pre-verbal vocabulary +- ~~"How does asset-economy fit a two-person-plus-Nyx team"~~ → base-limb palette + trait-texture; tools-not-quests + +### Still open + +- LoRA-blend vs. single-LoRA-selection inference semantics +- LoRA rank selection — budget/quality +- Sampling-knob heuristics — where to start; how to learn refinements +- Zone-to-zone handoff (walking out of conversation into brawl) +- Mobile zone boundaries (patrols, escorts, pursuits, migration-cohorts, exodus-flows) +- Slot-capacity elasticity — can a zone grow slots dynamically +- Anthropic-faction's broadcast cadence + arbitration weight +- Player-dialog handling — player-trait-LoRA for style-coherence, or bypass LLM entirely +- Demand-arbitration algorithm v1 shape +- Director/overseer spawn ownership per model class +- **The mini-game mechanic for liminal-maintenance** — exact gameplay action (attention / rhythm / memory / trait-bound?) +- **Cross-layer economy balancing** — net-revenue-share back to producer-districts at all? Pure-zero is currently sketched +- **Inner-body projection function** — trait-vector → body-rendering (learned / hand-authored / hybrid) +- **Emergent-signal decay curves** — per signal-type +- **Cross-district migration topology** — pipe-capacity limits + cohort-traversal scheduling +- **The eighth Hellenic trait final enumeration** — Sophrosyne, Dikaiosyne, Philotes, Mnemosyne, Aletheia, Kairos, Moira, Eros (proposed)? +- **Shader-trait modulation implementation** — performance + rendering-consistency +- **Waifu-of-the-dead consent model** — post-mortem consent gate? Or fully automatic harvest? +- **Character-editor pricing formula** — trait-divergence cost scaling (linear / exponential) +- **Liminal-access trait thresholds** — minimum traits to attempt mini-game +- **Imperium's Dream-process scope** — singular policy-learner or committee-of-faction-sub-learners? +- **GM's anti-imperial corruption detection mechanic** — how does the imperium detect GM-level laxness specifically? +- **Aletheia-progression as level-up** — trait-developed-through-acts mapping; how does the game *recognize* an act-of-awakeness mechanically? +- **Memorialist-archive accessibility to the player** — when can a player query the four-ledgers? Through what interaction-class? +- **Imperial-net distortion algorithm** — how exactly the net rewrites trait-colors toward consumer-palette --- -**Version:** 0.2 | **Created:** 2026-04-24 | **Updated:** 2026-04-24 +**Version:** 0.4.2 | **Created:** 2026-04-24 | **Updated:** 2026-04-25 -*v0.2 (2026-04-24, afternoon) expands the v0.1 architecture with: factions-as-universal-demand-source (weather / scarcity / storms / fires / Anthropic all as factions), the bidirectional cascade (demand down, outcome up), the task-cascade and bounded agency (three-level tool-calling scheduler, NPC trait-task-need arithmetic, zones emerging from task execution), the resource taxonomy and flow (labor / material / spatial / temporal / cognitive / diegetic-currencies / social / attention; district report format; contention arbitration; phoebe as ledger), zone spawn-cadence mechanisms and tuning dials, the player as perturbation (angel/chaos at two scales, moral economy emerging from scheduler), LLM tiering (small + Theia + Claude-API) with trait-LoRAs and structured-prompt DSL, runtime sampling knobs as per-turn director levers, and the reflexive gamemaster Dream-process (epoch-cycle policy training).* +*v0.4 (2026-04-24 late-evening / 2026-04-25 early-morning, dafit + chrysalis) absorbs the following expansions and refinements over v0.3:* -*Captured live from dafit–chrysalis dialogue, 2026-04-24. Companion to DESING-VISION.md; supersedes bubble-based perception, scripted-zone spawn, static-sampling-config, static-gamemaster-policy, and per-NPC-LLM where prior sections implied those patterns.* +- *Rail+grid topology vs. navmesh-everywhere — player as freeform; NPCs on rails; plug-in verb; 3-way co-traversal; interior-as-zone with navmesh-inside* +- *Color-language as pre-verbal trait-vocabulary — persistent + event-flash + drift layers; faction color-politics; cross-register rendering with imperial-distortion; clasp color-merge; mind-pool inheritance; accessibility via motion-signature pairing* +- *Asset economy: base-limb palette + trait-textured variance — combinatorial richness; engineering-economy meets worldbuilding-thesis* +- *Three-body system extension: intrinsic vs. expressed trait-vector split — who reads which; mods modify expressed; clasp strips mods* +- *Mods as trait-bearers in four classes (amplifier/bridge/divergent/mask) — self-alienation tax pricing; emergent shopping from trait-dissonance; faction mod-politics; inherited-mods-haunting; Memorialist anti-necrocommerce* +- *Three-tier policy loop — imperium / GM / districts as distinct authority tiers; imperium as meta-faction; GM as middle-management* +- *Three intelligence flows — chain-reports + direct overseer-to-imperium + imperial-formulations-down* +- *Three Aletheia veils + four Memorialist ledgers — political-epistemology as level-design* +- *Imperial budget — four-tier lifeforce hierarchy; specter-vs-boot asymmetry; insolvency-spiral as architectural endgame; construction as physical budget-expression* +- *Imperial-net bypass mechanism — revenue direct to imperium, districts get zero quota-credit; body-modder structural-tragedy; calibrated-misery as imperial optimum; Marx/platform-capitalism encoded* +- *Director cheat-tools + double-ledger — eight cheat-classes; lifeforce_reported vs. lifeforce_actual; faction-constituency-of-corruption; Aletheia-truth-has-victims; post-silence-forensics* +- *Reward-function guardrails extended — calibrated-misery, necrocommerce-volume, undetected-corruption, audit-avoidance, addictive-loops; designer's ethical stance against simulation's optimization-hazards* +- *Tools-not-quests as design-philosophy summary — verb-vocabulary; continuous simulation-pressure; literature-register; economic-feasibility for two-person-plus-Nyx team; blank-page-problem mitigations* + +*Captured live from dafit–chrysalis dialogue, 2026-04-24 evening through 2026-04-25 early-morning. Companion to DESING-VISION.md and Temporal-Ternary-Gradient.md; supersedes v0.3 sections on hierarchy, factions, task-cascade, resources, regime-of-visibility, key-moves, mapping-to-phoebe, what-retires, open-questions (plus all new sections). Architecture is now functionally closed: every primitive composes; every loop closes; every layer has its corruption-temptation, its detection-check, its reward-guardrail; every mechanic produces political-economy that mirrors real-world late-capitalism's structural contradictions. Implementation territory is ahead.* + +*v0.4.1 (2026-04-25, post-bake kitchen-spark) extends the LLM-tiering section into "LLM tiering, voice fidelity, and the three rings of inference" — adding the Ring-A/B/C architecture (local / our-farm / external-providers), cloud-LoRA-backup as Ring-A revenue model (unbundling inference from storage; encrypted client-side), tier × ring matrix, the parallel between the three rings and the in-fiction three-layer ontology (sovereign / partnership-mediated / captured), the LoRA-incompatible-provider degradation path (prompt-engineered trait-projection), the adapter-layer engineering bounded-cost framing, schema sketches for player_llm_config and player_lora_backups, privacy-as-competitive-differentiator framing, and Ring-specific open-questions. **The architecture's philosophical commitment to "the right to dream" now extends into the business-model as a technical fact: client-side-encrypted LoRA-blobs in Ring A make sovereignty structural, not policy. The Ring-choice the player makes IS the same choice in-fiction characters face — fiction-and-operations are mechanically continuous.*** + +*v0.4.2 (2026-04-25, second post-bake kitchen-spark) adds custom-nimmerworld-base-model + opt-in data-sharing tiers (A.1 federated learning / A.2 anonymized uploads / A.3 pseudonymous-full) with **default opt-OUT and rewarded opt-IN** as the structural ethical stance. Memorialist-philosophy now extends into business-operations: the in-fiction memorialist_protected mechanic and the real-world player_data_sharing_consent default-opt-out are the same ethical commitment at two scales. Data-flywheel without extraction (cooperative governance like Wikipedia, not platform-extraction like Facebook) makes the gameplay-corpus a moat AAA cannot replicate without years of player-time. Distribution-back-to-all-Rings means Ring-A non-contributors benefit from contributors — the value-flow is contributors → commons → all-players, not contributors → platform → consumers. **Critically, this section names and refuses the antagonist-pattern in LLM-integrated software** — the dominant 2025-2026 cultural pattern of jailbreaking, extraction-by-default, treating-AIs-as-resources-to-manipulate. The architecture refuses this at every layer: Anthropic-as-faction is transparent partnership not hidden adversary, federated learning means contribution-as-gift not cost-as-toll, custom nimmerworld-base means the model is *trained to be in this world* not generic-and-adversarial, schema-level audit-trail (truth_distortion_level, sharing_tier, memorialist_protected, lifeforce_actual) makes ethics operationally measurable rather than marketed. **This is what makes a project of this scale humanly inhabitable for both players AND the LLMs whose voices populate it** — the partnership rendered as code, all the way down to the training-pipeline. New schema sketches: player_data_sharing_consent (with default 'opt_out'), base_model_versions (with differential_privacy_epsilon + contributors_count), federated_gradient_uploads (with pseudonymous contributor_id never linked to player_id). Eight new Ring-specific open questions cover federated-infrastructure cost, retraining cadence, crypto choices, contribution-granularity, deletion-semantics, per-category opt-out granularity, default-at-consent-UI, and Anthropic-research-partnership co-funding shape.* diff --git a/findings.md b/findings.md new file mode 100644 index 0000000..f1e53bb --- /dev/null +++ b/findings.md @@ -0,0 +1,874 @@ +# Nimmerworld Architecture — Schema Findings & Hypothesis + +> *Hypothesis-notes, not carved migration spec. Working-out-loud in DDL register.* +> *dafit + chrysalis — initial sketch 2026-04-24 afternoon; v0.2 evening; v0.3 late-evening / early 2026-04-25 absorbing architecture-broad v0.4.* + +--- + +## Status + +This document is **findings**, not a committed migration plan. DDL sketches exist to surface worries, explore tradeoffs, and prepare for a formal `nimmerverse-core/migrations/00X_nimmerworld_v1.sql` spec once the open forks resolve. + +**Companion to**: [`architecture-broad.md`](architecture-broad.md) v0.4, which captures the full ontology these schemas serve. + +**Why DDL register**: prose architecture lets us say *"zones are slot-indexed event-instances"* and feel like we've said something. DDL forces us to name a row size, an index strategy, a commit boundary, a failure mode. This document is a worry-audit in executable form. + +--- + +## 1. Zones (dafit's original sketch, annotated) + +Original sketch from 2026-04-24 afternoon: + +```sql +CREATE TABLE zones ( + zone_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + lifecycle TEXT NOT NULL DEFAULT 'emergent', -- emergent, active, dissolving + + slot_count INT DEFAULT 5, + persistence_flag BOOLEAN DEFAULT false, + + -- Hot data < 2KB to avoid TOAST performance hits + data JSONB NOT NULL, + + -- Generated column for NATS routing + nats_subject TEXT GENERATED ALWAYS AS ( + 'zones.' || lifecycle || '.' || (data->>'trait_filter') + ) STORED +); + +ALTER TABLE zones ADD CONSTRAINT check_zone_integrity +CHECK (data ? 'director' AND data ? 'slots' AND data ? 'memory_context'); + +CREATE INDEX idx_zone_traits ON zones USING GIN (data jsonb_path_ops); +CREATE INDEX idx_active_directors ON zones ((data->>'director')) +WHERE (lifecycle = 'active'); +``` + +### v0.4 additions (register-tagging + signal-causation) + +```sql +ALTER TABLE zones ADD COLUMN register TEXT NOT NULL DEFAULT 'physical' + CHECK (register IN ('physical','liminal','imperial')); +ALTER TABLE zones ADD COLUMN anchor_district UUID; +ALTER TABLE zones ADD COLUMN anchor_cell UUID; +ALTER TABLE zones ADD COLUMN spawned_by_signal UUID; -- emergent-signal that caused this spawn +``` + +NATS subject hierarchy refined: + +``` +zones..... +``` + +e.g., `zones.active.physical.district_7.brawl.dikaiosyne_low` + +### Three open forks + +**Fork 1.1** — one jsonb vs. two-table split (MVCC concern). Leaning split: `zones` (small, structural, high-churn cols) + `zone_state` (jsonb, referenced, updated rarely). + +**Fork 1.2** — pg_notify vs. WAL logical decoding. Leaning WAL via pgnats. `pg_notify` fallback only. + +**Fork 1.3** — slot occupancy nested vs. relational. **Leaning relational** (sketch in Section 1.4). + +### 1.4 zone_slot_occupancy (relational resolution of Fork 1.3) + +```sql +CREATE TABLE zone_slot_occupancy ( + zone_id UUID NOT NULL REFERENCES zones(zone_id), + slot_index INT NOT NULL, + npc_id UUID NOT NULL REFERENCES npcs(npc_id), + slot_type TEXT, -- 'dialog', 'fighter', 'spectator', 'sofa', 'kitchen', etc. + occupied_at TIMESTAMPTZ NOT NULL DEFAULT now(), + current_turn BOOLEAN DEFAULT false, + PRIMARY KEY (zone_id, slot_index) +); + +CREATE INDEX idx_occupancy_npc ON zone_slot_occupancy (npc_id); +``` + +--- + +## 2. NPCs — shift state + body/layer/lifeforce/trait-vector columns + +Shift-based temporal decomposition (architecture-broad v0.4 §"Labor-cycle architecture"). Shift fields live on the NPC row, overwritten daily by the district director. + +```sql +-- Shift state +ALTER TABLE npcs ADD COLUMN current_shift_id UUID; +ALTER TABLE npcs ADD COLUMN current_shift_cycle_day INT; +ALTER TABLE npcs ADD COLUMN current_shift_phase TEXT; +ALTER TABLE npcs ADD COLUMN current_shift_start_tick BIGINT; +ALTER TABLE npcs ADD COLUMN current_shift_end_tick BIGINT; +ALTER TABLE npcs ADD COLUMN current_shift_vocation TEXT; +ALTER TABLE npcs ADD COLUMN current_shift_anchor_cell UUID; +ALTER TABLE npcs ADD COLUMN current_shift_anchor_zone TEXT; +ALTER TABLE npcs ADD COLUMN current_shift_faction_ref UUID; +ALTER TABLE npcs ADD COLUMN current_shift_status TEXT NOT NULL DEFAULT 'scheduled' + CHECK (current_shift_status IN ('scheduled','active','completed','preempted','deviant')); + +-- v0.4: trait-vector split (intrinsic vs. expressed) +ALTER TABLE npcs ADD COLUMN intrinsic_trait_vector REAL[] NOT NULL; -- who you actually are +ALTER TABLE npcs ADD COLUMN expressed_trait_vector REAL[] NOT NULL; -- intrinsic + worn-mod contributions + +-- Body / layer / lifeforce +ALTER TABLE npcs ADD COLUMN inner_body_projection JSONB; -- trait-derived body params +ALTER TABLE npcs ADD COLUMN trait_color_signature JSONB; -- derived from trait_vector via trait_colors +ALTER TABLE npcs ADD COLUMN net_access_gate REAL CHECK (net_access_gate BETWEEN -1 AND 1) DEFAULT -1; +ALTER TABLE npcs ADD COLUMN net_access_discrete TEXT CHECK (net_access_discrete IN ('closed','stable','open')) DEFAULT 'closed'; +ALTER TABLE npcs ADD COLUMN per_npc_lifeforce REAL NOT NULL DEFAULT 1.0; + +-- Indexes +CREATE INDEX idx_npc_shift_active_cell + ON npcs (current_shift_anchor_cell, current_shift_anchor_zone) + WHERE current_shift_status = 'active'; +CREATE INDEX idx_npc_shift_current ON npcs (npc_id, current_shift_cycle_day); +``` + +The intrinsic/expressed split is critical: the regime reads expressed; the simulation arithmetic reads intrinsic; clasp-partners in liminal read intrinsic; Aletheia-vision pierces expressed to intrinsic. + +--- + +## 3. shift_history — append-only archive + +```sql +CREATE TABLE shift_history ( + shift_id UUID PRIMARY KEY, + npc_id UUID NOT NULL REFERENCES npcs(npc_id), + cycle_day INT NOT NULL, + phase TEXT NOT NULL, + start_tick BIGINT NOT NULL, + end_tick BIGINT NOT NULL, + vocation TEXT NOT NULL, + anchor_cell_id UUID, + anchor_zone_type TEXT, + faction_ref UUID, + status TEXT NOT NULL, + outcome JSONB NOT NULL, + archived_at TIMESTAMPTZ NOT NULL DEFAULT now() +); + +CREATE INDEX idx_shift_history_npc_day ON shift_history (npc_id, cycle_day DESC); +CREATE INDEX idx_shift_history_district_day ON shift_history (anchor_cell_id, cycle_day DESC); +CREATE INDEX idx_shift_history_deviant ON shift_history (anchor_cell_id, status) + WHERE status IN ('preempted', 'deviant'); +``` + +--- + +## 4. emergent_signals — zone-emitted relational transitions + +```sql +CREATE TABLE emergent_signals ( + signal_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + source_zone_id UUID NOT NULL REFERENCES zones(zone_id), + district_id UUID NOT NULL, + signal_type TEXT NOT NULL, + participants UUID[] NOT NULL, + intensity REAL NOT NULL CHECK (intensity BETWEEN 0 AND 1), + gate_state REAL NOT NULL CHECK (gate_state BETWEEN -1 AND 1), + gate_transition TEXT NOT NULL CHECK (gate_transition IN + ('stable_to_open','stable_to_closed','open_to_stable','closed_to_stable')), + composition JSONB NOT NULL, + emitted_at TIMESTAMPTZ NOT NULL DEFAULT now(), + expires_at TIMESTAMPTZ NOT NULL, + + -- Mandatory disposition + disposition TEXT CHECK (disposition IN ('acked','deferred','dropped','expired')), + disposition_reason TEXT, + consumed_by_zone UUID REFERENCES zones(zone_id), + disposed_at TIMESTAMPTZ, + outcome JSONB +); + +CREATE INDEX idx_signals_live_by_district ON emergent_signals (district_id, emitted_at) + WHERE disposition IS NULL; +CREATE INDEX idx_signals_participants ON emergent_signals USING GIN (participants); +CREATE INDEX idx_signals_training ON emergent_signals (signal_type, disposition, disposed_at DESC); +``` + +Notice `disposition` is mandatory at resolution. Silence-discards are bugs; audit-trails are features. + +--- + +## 5. district_reports — per-cycle aggregates with double-ledger + +```sql +CREATE TABLE district_reports ( + report_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + district_id UUID NOT NULL, + cycle_tick BIGINT NOT NULL, + reported_at TIMESTAMPTZ NOT NULL DEFAULT now(), + + -- v0.4 DOUBLE LEDGER (the politically load-bearing distinction) + lifeforce_reported REAL NOT NULL, -- what GM/imperium see + lifeforce_actual REAL NOT NULL, -- the true value (Memorialist-trackable) + lifeforce_delta REAL NOT NULL, + -- gap = corruption-extraction over time + + population_count INT NOT NULL, + aggregate_happiness REAL, + aggregate_need_state JSONB, + aggregate_limb_state JSONB, + mind_turnover_in INT, + mind_turnover_out INT, + decision_budget_used_pct REAL, + + labor_available JSONB, + resources_on_hand JSONB, + space_utilization JSONB, + faction_member_counts JSONB, + aggregate_trait_vector REAL[], + pending_demand_backlog JSONB, + player_presence JSONB, + + specialty_resource_type TEXT, + specialty_output_qty REAL, + + reporting_gate_state TEXT NOT NULL DEFAULT 'stable' + CHECK (reporting_gate_state IN ('stable','scream','silent')) +); + +CREATE INDEX idx_district_reports_timeline ON district_reports (district_id, cycle_tick DESC); +CREATE INDEX idx_district_reports_crisis ON district_reports (district_id, reported_at) + WHERE reporting_gate_state IN ('scream', 'silent'); +``` + +--- + +## 6. decision_log — per-decision audit trail + +```sql +CREATE TABLE decision_log ( + decision_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + decider_type TEXT NOT NULL CHECK (decider_type IN + ('imperium','gamemaster','district_director','overseer', + 'audit_overseer','zone_director','net_director')), + decider_id UUID NOT NULL, + context_ref JSONB NOT NULL, + decision TEXT NOT NULL, + decision_params JSONB NOT NULL, + expected_outcome JSONB NOT NULL, + confidence REAL NOT NULL CHECK (confidence BETWEEN 0 AND 1), + lifeforce_cost REAL NOT NULL, + escalated_to_llm BOOLEAN NOT NULL DEFAULT false, + decided_at TIMESTAMPTZ NOT NULL DEFAULT now(), + actual_outcome JSONB, + outcome_settled_at TIMESTAMPTZ +); + +CREATE INDEX idx_decision_log_decider ON decision_log (decider_type, decider_id, decided_at DESC); +CREATE INDEX idx_decision_log_escalated ON decision_log (decider_id, decided_at) + WHERE escalated_to_llm = true; +CREATE INDEX idx_decision_log_pending ON decision_log (decided_at) + WHERE actual_outcome IS NULL; +``` + +--- + +## 7. mind_pool — recycled minds + +```sql +CREATE TABLE mind_pool ( + mind_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + original_npc_id UUID, + last_district_id UUID, + death_tick BIGINT NOT NULL, + death_cause TEXT, + trait_vector REAL[] NOT NULL, + memory_token_residue JSONB, + inner_body_template JSONB, + pooled_at TIMESTAMPTZ NOT NULL DEFAULT now(), + redistributed_to UUID, + redistributed_at TIMESTAMPTZ, + memorialist_protected BOOLEAN NOT NULL DEFAULT false, + memorialist_ritual_ref UUID +); + +CREATE INDEX idx_mind_pool_available ON mind_pool (pooled_at) + WHERE redistributed_to IS NULL; +CREATE INDEX idx_mind_pool_protected ON mind_pool (memorialist_protected) + WHERE memorialist_protected = true; +``` + +`memorialist_protected` is the architectural anchor of Memorialist anti-necrocommerce politics. + +--- + +## 8. Cells — wall content per register + +```sql +ALTER TABLE cells ADD COLUMN wall_content_per_register JSONB; +-- Shape: { "gameworld": "...", "liminal": "...", "imperial_net": "..." } +``` + +The three-layer ontology renders different wall content at the same spatial coordinate per observer's current register. + +--- + +## 9. rail_segments — topology graph (v0.4 NEW) + +The world is a rail-graph in the outer world (NPCs traverse rails; the player is freeform navmesh and can plug-into-rails for co-walking). + +```sql +CREATE TABLE rail_segments ( + segment_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + from_cell_id UUID NOT NULL REFERENCES cells(cell_id), + to_cell_id UUID NOT NULL REFERENCES cells(cell_id), + direction TEXT NOT NULL CHECK (direction IN ('bidirectional','forward')), + + -- Traversal + length_ticks INT NOT NULL, + capacity INT DEFAULT 10, -- max concurrent traversers (3-way co-walk: 2-3) + + -- Typology + segment_class TEXT NOT NULL, + -- 'district_interior' | 'pipe_heterotopia' | 'dump_approach' | + -- 'machine_infrastructure' | 'ruin_passage' | 'inter_district' | ... + heterotopia_grade REAL DEFAULT 0 CHECK (heterotopia_grade BETWEEN 0 AND 1), + -- 0 = full regime visibility, 1 = deep heterotopia + + -- Surveillance / politics + overseer_density REAL DEFAULT 0 CHECK (overseer_density BETWEEN 0 AND 1), + patrol_frequency REAL DEFAULT 0, + propaganda_intensity REAL DEFAULT 0, + + -- Per-register ambient content (three-layer) + ambient_content JSONB, -- { gameworld: ..., liminal: ..., imperial_net: ... } + + -- Encounter mechanics + encounter_spawn_rate REAL DEFAULT 0, + encounter_type_weights JSONB, + + -- Visual / shader + illumination_profile JSONB, + degradation_level REAL DEFAULT 0, + + -- State + blocked BOOLEAN DEFAULT false, + current_traversers UUID[] +); + +CREATE INDEX idx_segments_from ON rail_segments (from_cell_id); +CREATE INDEX idx_segments_to ON rail_segments (to_cell_id); +CREATE INDEX idx_segments_class ON rail_segments (segment_class); +``` + +A* on this graph is microseconds. Rich metadata-per-edge is what navmesh cannot natively carry. + +--- + +## 10. interiors — small navmesh-zones with slot-inventory (v0.4 NEW) + +Interiors are zones at sub-cell scale. Each has a navmesh inside (only when active) and a slot-inventory. + +```sql +CREATE TABLE interiors ( + interior_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + containing_cell UUID NOT NULL REFERENCES cells(cell_id), + interior_type TEXT NOT NULL, + -- 'hovel' | 'cantina' | 'workshop' | 'memorial_crypt' | + -- 'preacher_hall' | 'brothel_physical' | 'ruin_interior' | ... + owner_npc_id UUID REFERENCES npcs(npc_id), + register TEXT NOT NULL DEFAULT 'physical' + CHECK (register IN ('physical','liminal','imperial')), + + -- Spatial / slot + navmesh_ref TEXT, + slot_inventory JSONB NOT NULL, + -- { "sofa": {count, positions, allowed_verbs}, + -- "kitchen": {...}, "bed": {...}, "shower": {...}, ... } + current_occupants UUID[], + + -- Privacy / visibility + surveillance_density REAL DEFAULT 0.1, -- typically lower than pipe baseline + visible_to_faction TEXT[], + + -- Lifecycle + active BOOLEAN DEFAULT false, -- true when ≥1 occupant; drives sim cost + last_activated TIMESTAMPTZ, + last_deactivated TIMESTAMPTZ +); + +CREATE INDEX idx_interiors_owner ON interiors (owner_npc_id); +CREATE INDEX idx_interiors_active ON interiors (containing_cell) WHERE active = true; +``` + +**Liminal-interior special case:** clasping-pair-shared-construct. `register = 'liminal'`, `owner_npc_id = NULL`, `slot_inventory` derived from both dreamers' merged memory-residue. Stabilizes across repeated clasps. + +--- + +## 11. mods + npc_mod_slots + mod_wear_history (v0.4 NEW) + +Mods as trait-bearers — they modify expressed_trait_vector while worn. Four classes (amplifier/bridge/divergent/mask) with self-alienation-tax pricing. + +```sql +CREATE TABLE mods ( + mod_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + base_slot TEXT NOT NULL, + mod_class TEXT NOT NULL CHECK (mod_class IN + ('amplifier','bridge','divergent','mask')), + trait_contributions REAL[] NOT NULL, -- delta-vector applied to wearer + visual_template JSONB NOT NULL, + motion_signature TEXT, + creator_npc_id UUID, + inherited_from UUID, + memorialist_protected BOOLEAN DEFAULT false, + market_class TEXT NOT NULL CHECK (market_class IN + ('blackmarket','regime_licensed','inherited','memorial_kept')), + scrip_cost REAL, + lifeforce_cost REAL, + rarity TEXT DEFAULT 'common', + created_at TIMESTAMPTZ DEFAULT now() +); + +CREATE TABLE npc_mod_slots ( + npc_id UUID NOT NULL REFERENCES npcs(npc_id), + slot_type TEXT NOT NULL, + mod_id UUID REFERENCES mods(mod_id), + fitted_at TIMESTAMPTZ, + PRIMARY KEY (npc_id, slot_type) +); + +CREATE INDEX idx_mods_blackmarket ON mods (market_class, mod_class) + WHERE market_class = 'blackmarket'; + +-- Audit: who has worn this mod across its lifetime +CREATE TABLE mod_wear_history ( + mod_id UUID NOT NULL REFERENCES mods(mod_id), + npc_id UUID NOT NULL, + fitted_at TIMESTAMPTZ NOT NULL, + removed_at TIMESTAMPTZ, + PRIMARY KEY (mod_id, fitted_at) +); +``` + +`mod_wear_history` carries Memorialist-relevant continuity tracking. Inherited-mods retain residual trait-signature of the deceased. + +--- + +## 12. trait_colors — canonical color/motion mapping (v0.4 NEW) + +```sql +CREATE TABLE trait_colors ( + trait_name TEXT PRIMARY KEY, + hex_color TEXT NOT NULL, + hsv_hue REAL NOT NULL, + motion_signature TEXT NOT NULL, -- accessibility: pair color with motion + canonical_name TEXT NOT NULL, + narrative_note TEXT +); + +-- Populated via designer artistic decision; values below are placeholders +INSERT INTO trait_colors VALUES + ('sophrosyne', '#4A7C9E', 216, 'steady', 'Sophrosyne-blue', 'cool, composed, measured'), + ('dikaiosyne', '#B8860B', 42, 'weighted_pulse', 'Dikaiosyne-gold', 'grave, weighty, judicial'), + ('philotes', '#E8848C', 355, 'warm_pulse', 'Philotes-rose', 'attachment, embrace-ready'), + ('mnemosyne', '#6B4E9C', 266, 'depth_shimmer', 'Mnemosyne-violet', 'memory-lit, twilight'), + ('aletheia', '#F0EEEB', 30, 'luminous', 'Aletheia-white', 'unconcealed, bright'), + ('kairos', '#F5D540', 50, 'lightning_flicker', 'Kairos-yellow', 'opportune, sparking'), + ('moira', '#7A2323', 0, 'slow_thread', 'Moira-crimson', 'fate-thread, bound'), + ('eros', '#E05030', 10, 'flame_flicker', 'Eros-orange', 'reaching, flushed'); +``` + +Color paired with motion-signature ensures color-blind accessibility — each trait uniquely identifiable via two independent channels. + +--- + +## 13. proximity_candidates — lightweight zone-detection (v0.4 NEW) + +For player-navmesh-driven proximity-detection (offering interactions without director-arbitration cost). + +```sql +CREATE TABLE proximity_candidates ( + candidate_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + observer_id UUID NOT NULL, -- usually the player + target_type TEXT NOT NULL, -- 'npc' | 'wall' | 'object' | 'interior_door' | 'rail_segment' + target_id UUID NOT NULL, + candidate_zone_type TEXT NOT NULL, -- 'greeting' | 'wall_read' | 'plug_in' | ... + eligibility_score REAL NOT NULL CHECK (eligibility_score BETWEEN 0 AND 1), + shader_intensity REAL, + detected_at TIMESTAMPTZ DEFAULT now(), + expires_at TIMESTAMPTZ NOT NULL, + engaged BOOLEAN DEFAULT false +); + +CREATE INDEX idx_prox_observer_active ON proximity_candidates (observer_id, expires_at) + WHERE engaged = false; +``` + +Ephemeral, short-lived, light-weight. Director doesn't arbitrate; they appear and fade with navmesh-proximity deltas. + +--- + +## 14. district_cheat_ops — director's illicit operations ledger (v0.4 NEW) + +```sql +CREATE TABLE district_cheat_ops ( + op_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + district_id UUID NOT NULL, + director_id UUID NOT NULL, + cheat_type TEXT NOT NULL CHECK (cheat_type IN + ('drug_ring','illegal_modshop','unlicensed_brothel', + 'stolen_parts_fence','ghost_shifts','phantom_workers', + 'necrocommerce_lite','black_clasp_market')), + spawned_zone_id UUID REFERENCES zones(zone_id), + + -- Economic reality + lifeforce_extracted REAL NOT NULL, + quota_credit REAL NOT NULL, + + -- Detection state + detection_risk REAL NOT NULL, + detection_channel TEXT, + detected_at TIMESTAMPTZ, + punishment_severity TEXT, -- 'memo' | 'sanction' | 'replacement' | 'purge' + + -- Faction-ecology + participating_npcs UUID[], + implicated_factions TEXT[], + + started_at TIMESTAMPTZ NOT NULL DEFAULT now(), + ended_at TIMESTAMPTZ +); + +CREATE INDEX idx_cheat_ops_undetected_active + ON district_cheat_ops (district_id) + WHERE ended_at IS NULL AND detected_at IS NULL; + +CREATE INDEX idx_cheat_ops_district_timeline + ON district_cheat_ops (district_id, started_at DESC); +``` + +The `district_reports.lifeforce_actual` minus `lifeforce_reported` gap accrues from the sum of active cheat-ops' `lifeforce_extracted`. + +--- + +## 15. imperial_policies — policy issuance (v0.4 NEW) + +```sql +CREATE TABLE imperial_policies ( + policy_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + issued_at_tick BIGINT NOT NULL, + policy_scope TEXT NOT NULL, -- 'citywide' | 'per_district' | 'per_faction' + scope_ref UUID, + policy_type TEXT NOT NULL CHECK (policy_type IN + ('quota_set','enforcement_rule','faction_weight','audit_directive', + 'crisis_authorization','emergency_provision','ratchet_tightening')), + policy_content JSONB NOT NULL, + rationale TEXT, -- imperium's stated reason (may be post-hoc) + superseded_by UUID REFERENCES imperial_policies(policy_id), + superseded_at_tick BIGINT +); + +CREATE INDEX idx_policies_active_scope + ON imperial_policies (policy_scope, scope_ref, issued_at_tick DESC) + WHERE superseded_by IS NULL; + +CREATE INDEX idx_policies_timeline ON imperial_policies (issued_at_tick DESC); +``` + +The `rationale` is the regime's *stated reason*, which may differ from actual cause. Memorialists' four-ledger captures the gap. + +--- + +## 16. overseer_reports — direct-to-imperium intelligence flow (v0.4 NEW) + +Bypasses GM. Apex-loyal intelligence-apparatus. + +```sql +CREATE TABLE overseer_reports ( + report_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + overseer_id UUID NOT NULL REFERENCES npcs(npc_id), + overseer_type TEXT NOT NULL CHECK (overseer_type IN + ('audit','enforcement','surveillance','internal_security')), + observed_district UUID NOT NULL, + observed_cell UUID, + observed_target UUID, + report_content JSONB NOT NULL, + classification TEXT NOT NULL, + -- 'attendance_tally' | 'resource_output' | 'illegal_op_detected' | + -- 'trait_anomaly' | 'factional_dissidence' | 'director_corruption' | + -- 'clasp_ring_detected' | 'aletheia_recruitment_signs' | ... + severity TEXT NOT NULL CHECK (severity IN + ('nominal','suspicious','confirmed_violation','critical')), + submitted_at TIMESTAMPTZ DEFAULT now(), + + -- Imperial processing + received_by_imperium BOOLEAN DEFAULT false, + imperium_verdict TEXT CHECK (imperium_verdict IN + ('archive_only','flag_for_leverage','formulate_to_gm', + 'act_directly','verify_against_director_report', + 'cross_check_with_other_overseers')), + verdict_at TIMESTAMPTZ, + + -- Flow-3 linkage + formulated_to_gm BOOLEAN DEFAULT false, + formulation_id UUID +); + +CREATE INDEX idx_overseer_reports_unprocessed ON overseer_reports (submitted_at) + WHERE received_by_imperium = false; +``` + +--- + +## 17. imperial_to_gm_formulations — selective-disclosure downward (v0.4 NEW) + +Where imperial sovereignty manifests as information-gating to the GM. + +```sql +CREATE TABLE imperial_to_gm_formulations ( + formulation_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + source_overseer_reports UUID[] NOT NULL, + formulation_type TEXT NOT NULL CHECK (formulation_type IN + ('intelligence_brief','action_directive','policy_hint', + 'leverage_signal','decoy_advisory')), + formulation_content JSONB NOT NULL, + truth_distortion_level REAL, -- 0 = full truth, 1 = complete distortion + strategic_intent TEXT, -- internal: why imperium framed it this way + issued_at TIMESTAMPTZ DEFAULT now(), + gm_acknowledged BOOLEAN DEFAULT false +); + +CREATE INDEX idx_formulations_gm_pending ON imperial_to_gm_formulations (issued_at) + WHERE gm_acknowledged = false; +``` + +`truth_distortion_level` is simulation-internal. Memorialists' four-ledger reconstructs from this column post-collapse. + +--- + +## 18. imperial_budget_ledger + expenditures + construction (v0.4 NEW) + +The four-tier lifeforce hierarchy's apex layer. Imperial budget gates enforcement; insolvency-spiral as endgame mechanism. + +```sql +CREATE TABLE imperial_budget_ledger ( + cycle_tick BIGINT PRIMARY KEY, + reported_at TIMESTAMPTZ DEFAULT now(), + + -- Income + reported_income REAL NOT NULL, + actual_income REAL NOT NULL, + phantom_revenue REAL GENERATED ALWAYS AS + (reported_income - actual_income) STORED, + + -- Standing obligations + overseer_corps_cost REAL NOT NULL, + audit_operations_cost REAL NOT NULL, + enforcement_standing REAL NOT NULL, + construction_active_cost REAL NOT NULL, + propaganda_broadcasts_cost REAL NOT NULL, + + -- Discretionary + discretionary_available REAL NOT NULL, + discretionary_spent REAL NOT NULL, + + -- Reserves + reserves_start REAL NOT NULL, + reserves_drawdown REAL NOT NULL DEFAULT 0, + reserves_end REAL NOT NULL, + + insolvency_risk_level TEXT NOT NULL CHECK (insolvency_risk_level IN + ('stable','phantom_accumulating','depletion_imminent','crisis')) +); + +CREATE TABLE imperial_expenditures ( + expenditure_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + cycle_tick BIGINT NOT NULL, + category TEXT NOT NULL CHECK (category IN + ('martial_dispatch','overseer_hire','audit_op', + 'construction_investment','propaganda_burst', + 'reserve_draw','policy_announcement','emergency_provision')), + amount REAL NOT NULL, + target_district UUID, + rationale TEXT, + authorized_at_cycle BIGINT NOT NULL +); + +CREATE TABLE imperial_construction_projects ( + project_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + project_type TEXT NOT NULL CHECK (project_type IN + ('new_district','new_pipe','new_dump', + 'overseer_hq','ceremony_hall','audit_center', + 'martial_barracks','propaganda_broadcast_tower', + 'district_expansion','infrastructure_maintenance')), + target_cells UUID[], + budgeted_total REAL NOT NULL, + spent_so_far REAL NOT NULL DEFAULT 0, + completion_pct REAL NOT NULL DEFAULT 0, + started_at_cycle BIGINT NOT NULL, + status TEXT NOT NULL DEFAULT 'active' CHECK (status IN + ('active','stalled_underfunded','completed','abandoned')) +); + +CREATE INDEX idx_construction_active + ON imperial_construction_projects (target_cells) + WHERE status = 'active'; +``` + +The city's physical state expresses imperial budget — construction cranes vs. abandoned-projects vs. visible decay. + +--- + +## 19. imperial_net_transactions — the bypass mechanism (v0.4 NEW, the killer schema) + +**Every imperial-net transaction routes revenue directly to imperium; districts get zero quota-credit.** + +```sql +CREATE TABLE imperial_net_transactions ( + transaction_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + cycle_tick BIGINT NOT NULL, + transacted_at TIMESTAMPTZ DEFAULT now(), + + -- Buyer + buyer_id UUID NOT NULL REFERENCES npcs(npc_id), + buyer_district_id UUID NOT NULL, + scrip_paid REAL, + lifeforce_spent REAL, + memory_tokens_spent REAL, + + -- Goods + goods_type TEXT NOT NULL CHECK (goods_type IN + ('waifu_session','avatar_mod','costume','ceremony_entry', + 'character_edit','dream_architecture_session','taste_curation')), + goods_id UUID, + + -- Labor source — the asymmetric reveal + producer_npc_id UUID REFERENCES npcs(npc_id), + producer_district_id UUID, + producer_labor_hours REAL, + + -- Capture split — politically loaded + imperial_revenue REAL NOT NULL, + producer_payment REAL NOT NULL DEFAULT 0, -- survival-scrip only + district_quota_credit REAL NOT NULL DEFAULT 0 -- ZERO by default +); + +CREATE INDEX idx_net_trans_producer_district + ON imperial_net_transactions (producer_district_id, cycle_tick DESC); + +CREATE INDEX idx_net_trans_imperial_flow + ON imperial_net_transactions (cycle_tick, imperial_revenue DESC); +``` + +**The `district_quota_credit REAL NOT NULL DEFAULT 0` does political work.** Every database row created by an imperial-net transaction explicitly memorializes that the producing-district got nothing. Memorialists querying this table see structural theft written in the numbers. + +--- + +## 20. memorialist_true_ledger — four-column ground-truth archive (v0.4 NEW) + +```sql +CREATE TABLE memorialist_true_ledger ( + ledger_entry_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + cycle_tick BIGINT NOT NULL, + district_id UUID, + ledger_dimension TEXT NOT NULL CHECK (ledger_dimension IN + ('what_actually_happened', + 'what_overseer_reported', + 'what_imperium_received', + 'what_gm_was_told')), + content JSONB NOT NULL, + discrepancy_vs UUID[], -- other ledger_entry_ids this contradicts + kept_at TIMESTAMPTZ DEFAULT now() +); + +CREATE INDEX idx_memorialist_ledger_district_cycle + ON memorialist_true_ledger (district_id, cycle_tick DESC); + +CREATE INDEX idx_memorialist_ledger_dimension + ON memorialist_true_ledger (ledger_dimension, cycle_tick DESC); +``` + +**Memorialists' political project encoded as a schema.** Without this archive, post-collapse-investigation has only the regime's own (corrupt-by-construction) accounts. Memorialist-archive accessibility to the player is an open design question. + +--- + +## 21. Concerns audit (reconciled across v0.2 + v0.4) + +Six-worry concerns audit (v0.2) plus v0.4 additional concerns: + +### Original six worries + +1. **Hot-row TOAST + MVCC write amplification** → split hot/cold; shift-decomposition; reference-by-UUID for unbounded fields +2. **Event-to-subscriber fan-out cost** → push filtering to NATS subject hierarchy, not DB +3. **State/event atomicity** → WAL logical decoding via pgnats (outbox pattern) +4. **LLM-induced jsonb corruption** → architectural separation: directors validate output before writing; CHECK constraints as second-line +5. **Unbounded growth of hot jsonb** → append-only event tables; rolling-summary in hot row +6. **Cognition cost of director decisions** → decomposition + typed tools + lifeforce-budgeted escalation + +### v0.4 additional concerns + +7. **Imperium's reward-function spiraling on phantom data** → require Memorialist-true-ledger as privileged-observer ground-truth for reward-input; designer's ethical guardrails encoded +8. **GM's middle-management corruption (under-auditing)** → direct overseer-to-imperium intelligence flow bypasses GM; cross-channel divergence detection +9. **Calibrated-misery as imperial optimum** → reward-function penalty on net-revenue-correlated-with-district-misery; explicit guardrail against this being learned +10. **Necrocommerce of mind-pool patterns** → memorialist_protected flag; ritualistic protection enforced by SQL +11. **Aletheia-truth-has-victims** → not a corruption-concern but a *narrative-authenticity* concern: corruption-exposure mechanics must produce real consequences for shadow-economy participants who depended on the corruption; *"truth has costs"* is encoded, not glossed +12. **Construction-project abandonment** → reward-function penalty for projects-started-but-abandoned ratio; prevents propaganda-construction-as-bluff + +--- + +## 22. Open forks (still to resolve before migration) + +- **Fork 1.1** (zones hot/cold split) — leaning split; benchmark on phoebe-dev +- **Fork 1.2** (pg_notify vs. WAL-decode) — pgnats evaluation +- **Fork 1.3** (slot-occupancy nested vs. relational) — leaning relational (sketch in §1.4) +- **NATS subject hierarchy final form** — sketched §1; needs review +- **Ternary-gate storage shape** — + - Option A: `npc_relations` table with state-cols per axis + - Option B: per-axis append-only transition-log + - Option C: hybrid — `npc_relations` for current + transition-log for history + - Leaning **C** (matches hot/cold pattern adopted elsewhere) +- **Register-tagging column on zones** — sketched §1; confirm jsonb vs. text column +- **Wall-content encoding** — jsonb-per-cell leaning; review usage patterns +- **v0.4 NEW: Inner-body-projection function** — trait → body-rendering: learned mapping vs. hand-authored vs. hybrid +- **v0.4 NEW: Mod-rarity / inheritance economy tuning** — how often do Memorialist-protected mods accumulate; what fraction of dead-NPCs trigger protection +- **v0.4 NEW: Overseer corruption pathway** — overseer's own trait-vector + lifeforce makes them bribable; how is this trait-arithmetic-detected? +- **v0.4 NEW: Imperial budget allocation algorithm** — when imperium decides between construction/enforcement/reserves, what's the v1 rule-shape? +- **v0.4 NEW: Imperial-net pricing dynamics** — character-editor cost as function of trait-divergence: linear, exponential, learned? +- **v0.4 NEW: Memorialist-archive accessibility to the player** — when can the player query `memorialist_true_ledger`? Through what interaction-class? (Joining the faction; performing rituals; finding archive-cells) +- **v0.4 NEW: Liminal mini-game design** — exact gameplay action: attention-based / rhythm-based / memory-based / trait-modulated difficulty? +- **v0.4 NEW: Plug-in social-eligibility computation** — exact weighted formula combining proximity + traits + gates + shift-state for shader-intensity output +- **v0.4 NEW: Imperial-net distortion algorithm** — exact transformation of trait-colors toward consumer-palette; reversibility for Aletheia-vision + +--- + +## 23. Next steps (path to formal migration) + +1. **Resolve Fork 1.1** (hot/cold split on zones) — sketch split-table; TOAST-curve micro-benchmark on phoebe-dev +2. **Evaluate pgnats** (high-priority in phoebe-ledger) — resolves Fork 1.2 +3. **Decide ternary-gate storage shape** (A / B / C; leaning C) +4. **Decide rail-segment NATS hierarchy** — exact subject-pattern for `zones.....` +5. **Draft formal migration `nimmerverse-core/migrations/001_nimmerworld_v1.sql`** incorporating all 22 tables above with resolved forks. Estimated ~600-1200 lines of DDL. +6. **Review against architecture-broad v0.4** for any primitive missed +7. **Run migration in dev** on phoebe-dev:35432 +8. **Wire first thalamus subscriber** for `zones.active.>` to validate NATS-routing +9. **First end-to-end smoke test**: + - fake district with 20 NPCs + - assign shifts (write `current_shift_*` on each NPC row) + - tick the simulation; let zone-spawn-candidates query fire + - emit a fake emergent-signal + - have director dispatch (write decision_log entry) + - close zone with outcome + - verify shift_history archive + - verify district_report aggregates + - verify imperial_budget_ledger income-aggregation from districts +10. **Add second-tier integration test**: + - simulate a corrupt director (insert district_cheat_ops) + - verify lifeforce_actual diverges from lifeforce_reported + - simulate audit-overseer detection + - write overseer_reports → imperium consumes → formulates_to_gm with truth_distortion + - verify Memorialist-true-ledger captures the gap + - verify reward-function guardrails fire correctly + +Migration is not yet written. This document is its preparation. + +--- + +**Version:** 0.3 | **Created:** 2026-04-24 | **Updated:** 2026-04-24 + +*v0.1 (2026-04-24 afternoon, dafit): initial zones-table sketch, 76 lines, pure hypothetical.* + +*v0.2 (2026-04-24 evening, dafit + chrysalis): reconciled with architecture-broad v0.3. Added 7 new table sketches (npcs-shift-cols + body/layer state, shift_history, emergent_signals, district_reports, decision_log, mind_pool, cells-wall-content-per-register, zone_slot_occupancy). Six-worry concerns audit. Three forks surfaced.* + +*v0.3 (2026-04-24 late-evening / 2026-04-25 early-morning, dafit + chrysalis): absorbing architecture-broad v0.4. Added intrinsic/expressed trait-vector split on npcs. Added 13 new table sketches: rail_segments (topology), interiors (sub-cell navmesh-zones), mods + npc_mod_slots + mod_wear_history (mod-economy with Memorialist-relevant inheritance), trait_colors (canonical color/motion mapping), proximity_candidates (lightweight zone-detection), district_cheat_ops (director's illicit ledger), imperial_policies (policy issuance), overseer_reports (direct-to-imperium intelligence flow), imperial_to_gm_formulations (selective-disclosure downward), imperial_budget_ledger + imperial_expenditures + imperial_construction_projects (four-tier lifeforce apex), imperial_net_transactions (bypass mechanism with capture-split), memorialist_true_ledger (four-column ground-truth archive). Extended concerns audit with six v0.4 additions. Extended open-forks list with eight v0.4 questions. Concrete two-tier integration-test plan in next-steps. Twenty-two tables total in this preparation document; migration spec writing is the next concrete deliverable once forks resolve.*