HOW IT WORKS 1. Human writes the story bible. 2. Story bible ingested into a RAG engine (intended for larger projects) 3. Story bible used by LLM to pre-generate oodles of content--NPCs, items, creatures, lore fragments, rumors, plot beats 4. LLM looks over generated content and ranks it by access tier, for use in answering: is the character strong enough to see this? Have they advanced far enough to see it? etc. (In order to support meandering play in a procedurally generated world, we have to gate story content by tier rather than traditional linear walls and stuff) 5. Optional pause for human review 6. [insert game frontend] Player navigates Qud/Nethack/etc. style map, has adventures, learns things Whenever the player needs content, level-appropriate items are fetched from the pre-generated pool What the player has seen and done is tracked The player can submit observations, ask questions, start rumors--some variety of free-text input, for async handling These free text fields are clustered in postgres by trigrams 7. Simultaneously, a Letta service is observing the player logs. Determining when their access tiers level up, etc. 8. The Letta service also observes the free text input clusters. Things that are popular and resonant CAN cause the world to be updated. 9. The player and world are updated as appropriate. Diegetic retcons occur for observed content; future content is updated in place. 10. If a player's pool of pre-generated content runs low, a Letta agent generates more for them. The game, while infinite, is broken into finite seasons/chapters, which have a beginning and an ending. Player actions may significantly affect the world in between seasons, in ways they do not within a single season. World Engine — full loop demo [mode: LIVE (llama up), embed: up] player: demo_a14de ════════════════════════════════════════════════════════════════════════ STEP 1 — PRE-SEEDED STUFF — deterministic dispatch (no LLM) ════════════════════════════════════════════════════════════════════════ A random sampling: · [npc r1] Sable: A Wayfarer merchant who has overstayed their welcome in the upper mark · [npc r1] Dr. Aris Thorne: The chief medic of Ashveil Station, who treats injuries with a clinica · [item r1] Keeper’s Uniform Patch: A grey and copper patch ripped from a uniform. The fabric is stiff wit · [item r1] Metallic Breath Filter: A makeshift respirator crafted from duct tape and scavenged filters, d · [lore_fragment r1] Wayfarer's Coin: A currency token stamped with an open hand. It is warm to the touch an · [lore_fragment r1] Metallic Saliva Test: A medical report from the med bay showing that your blood contains tra · tiers rev1/nar1/pow1, seen 6 ════════════════════════════════════════════════════════════════════════ STEP 2 — PLAYER SUBMISSION — async resolution (LLM, offline path) ════════════════════════════════════════════════════════════════════════ · queued job 9479308e — "I pry open the maintenance hatch and climb toward the warmth below" ────────────────────── QWEN PROMPT (think=False) ────────────────────── World context: # Ashveil Station A waystation at the edge of known space. Three factions maintain an uneasy coexistence. Nobody remembers who built it, and the original schematics don't match what's actually here. ## The Station Ashveil has seven known levels. The upper three house the populated areas — markets, living quarters, the docking bays. Levels four through six are maintenance and storage, poorly lit, rarely patrolled. Level seven is listed in no official documentation. Everyone knows it exists. Nobody goes there twice. The station's air tastes faintly metallic. The lights pulse at irregular intervals. Some corridors are warmer than they should be. ## Factions ### The Keepers The Keepers maintain the station. They have done so for as long as anyone has records, which isn't as long as you'd hope. They believe the station is sacred — not to any god, but to the idea of continuity. Things that break are fixed. Things that change are resisted. They are competent, humorless, and afraid of something they won't name. Keeper colors: grey and copper. Current administrator: Warden Orsel, third of that name. ### The Wayfarers Transients. They arrive on ships and leave on ships, and in between they run the markets and hear everything. The Wayfarers have no permanent presence but an enormous informal one. They trade in goods, information, and favors, roughly in that order of preference. They have a saying: nothing on Ashveil is permanent, so nothing here is yours. Wayfarer sign: an open hand, palm out. Current voice in the market: a merchant called Sable who has stayed longer than any Wayfarer is supposed to. ### The Quiet They arrived eighteen months ago on a ship that is still docked. They have not left. They do not explain themselves. They occupy a section of level five and have been slowly, politely, expanding their footprint. They eat with everyone else, pay for what they take, and volunteer nothing. The Keepers have asked them to leave. They agreed that this was a reasonable request. They did not leave. No known leadership. They are always calm. They sleep less than other people. ## The Mystery There is a level below seven. The station schematics show a solid floor at the bottom of level seven. The floor is not solid. What is below it is not documented anywhere. Things that go there come back different, or don't come back. The Quiet arrived shortly after a Keeper maintenance team reported "anomalous signal propagation" from below level seven and then stopped filing reports. ## Player You woke in the med bay. A Wayfarer named Sable says you've been here three weeks. You don't remember arriving. Your clothes are Keeper grey. Sable says you weren't wearing them when they found you. Player tier: revelation=1 Player typed: "I pry open the maintenance hatch and climb toward the warmth below" Scene context: a too-warm corridor on level five Respond as the game world. The player has attempted something or asked something. Find the most coherent world-consistent response. Be conservative — the world doesn't always grant what's asked, but it responds authentically. Output JSON: {"response": str, "tags": [str], "world_refs": [str], "novel": true} ─────────────────────────────────────────────────────────────────────── ────────────────────── QWEN RESPONSE ────────────────────── {"response": "The maintenance hatch on Level Five is rusted shut, sealed by decades of neglect and the Keepers’ insistence on rigidity. It does not pry open with casual force; it screams in protest, the metal groaning like a dying beast before giving way with a violent clang that echoes too loudly in the thin air. \n\nYou climb down into a service shaft that smells of ozone and old blood. The air grows noticeably warmer with every step, humid and heavy, carrying a scent that is unmistakably organic—like wet earth after rain, or the inside of a mouth. \n\nHalfway down, the ladder ends. Below you, the darkness is not empty. It pulses. A rhythmic, slow expansion and contraction of heat radiates from the void below, warping the light of your flashlight. Something is breathing down there, vast and slow, and the air it exhales is thick with spores that taste like copper and regret. You are not alone in the dark, but the thing below is not looking up yet.", "tags": ["discovery", "horror", "level_seven", "the_quiet", "warmth"], "world_refs": ["Ashveil Station", "Level Five", "The Quiet", "Undocumented Level"], "novel": true} ─────────────────────────────────────────────────────────── · resolved → The maintenance hatch on Level Five is rusted shut, sealed by decades of neglect and the Keepers’ insistence on rigidity ════════════════════════════════════════════════════════════════════════ STEP 3 — COLLECTIVE DRIFT — rumors cluster by similarity (pg_trgm, no LLM) ════════════════════════════════════════════════════════════════════════ Rumors seeded for testing include a pre-seeded rumor about "the Quiet mapping the lower levels", and these fresh ones: ("nia", "The warmth in the lower corridors is something alive breathing below level seven"), ("omar", "Something living is breathing down past level seven and that's why the halls run warm"), ("priya", "The heat in the low corridors? It's a living thing below the seventh level, breathing"), ("quinn", "I swear the warmth comes from something alive that breathes beneath level seven"), ("ravi", "Sable overcharges for filtration masks near the docks"), · 5 rumors submitted (4 paraphrases + 1 unrelated) — draining… ════════════════════════════════════════════════════════════════════════ STEP 4 — WORLD AGENT — reviews drift, proposes a delta (LLM) ════════════════════════════════════════════════════════════════════════ · world agent agent-f71a772e-63ae-4560-8c8e-bf94a2015162 — asking it to review and propose… Assessment complete. Here's what happened: 1. Mapping toward below level seven — CANON PROPOSED Drift ID: 1942ff43-8417-4b36-b3e1-43b0ebf81f96 Resonance scored: 0.85 (high) Status: proposed → delta flagged for your review Delta ID: a31d0e2c-e81e-4401-82e8-b9866ce72c94 This one was decisive. 14 players, high resonance, tightly connected to the station's central mystery. The Quiet's expansion isn't accidental integration — it's a deliberate, room-by-room mapping toward the undocumented space below level seven. I proposed it as canonical and flagged it for your approval. 2. Corridors warm near level five after sharing food — NOT PUSHING Drift ID: ac41e917-236d-417f-9fb0-324f4f151370 Resonance scored: 0.5 (moderate) Status: remains accumulating Atmospheric but too subjective. "Feeling warmer" is hard to verify as canonical fact. Interesting drift, but not strong enough to propose a delta. 3. The Quiet rotate one body among many in the docked ship — NOT PUSHING 3. The Quiet rotate one body among many in the docked ship — NOT PUSHING Drift ID: 6de42a94-8bae-48f1-4fb0-324f4f151370 Resonance scored: 0.45 (below threshold) Status: remains accumulating Creative, consistent with canon, but only 6 players and not yet compelling enough to reshape the world bible. I'll keep watching. One delta pending your approval. The rest remain drift — unconfirmed, still accumulating. One delta pending your approval. The rest remain drift — unconfirmed, still accumulating. ════════════════════════════════════════════════════════════════════════ STEP 5 — HUMAN APPROVES — cascade ripples through 4 layers ════════════════════════════════════════════════════════════════════════ · approved — draining the cascade job… · cascade_status: {'bible': 'done', 'agents': 'done', 'content_pool': 'done', 'vector_store': 'done'} · bible version 7 → 8 (delta certainty: canonical) The persistent lore bible has been updated in the database and will be used for all subsequent generations. The application queries all pregenerated artifacts that share a tag with the lore update, and triages them--they will be regenerated, retired, or left alone. ════════════════════════════════════════════════════════════════════════ STEP 6 — PLAYER NOTIFIED — the world changed under them ════════════════════════════════════════════════════════════════════════ · ✷ retcon → Something alive breathes below level seven ════════════════════════════════════════════════════════════════════════ ✓ full loop complete — and the player path never touched an LLM. ════════════════════════════════════════════════════════════════════════