A cron-driven AI system that generates a daily archival document for a self-consistent parallel universe. Designed to grow indefinitely at flat token cost using a two-call world-state architecture — exploring what emerges when a language model is given a coherent world and told to develop it alone.
The Veiled Continuum is built around a single question: if you give a language model a sufficiently rich starting world and ask it to develop that world daily, what does the result look like after months? Does internal coherence degrade? Does the model drift into repetition, or does it find increasingly specific territory to explore? Do narrative threads resolve, or accumulate? Can a machine produce genuine lore — history with the texture of something that happened rather than something that was written?
This is framed as an experiment, not a product. There is no user to serve, no feature set to ship. The system runs, generates, and accumulates. The question is entirely about what it produces over time, and whether that output rewards the attention of a human reader who knows nothing of the machinery behind it.
The universe chosen for the experiment is deliberately non-trivial. It is not a generic fantasy world or a thin alternate history. The Veiled Continuum has a specific physics deviation from our own — quantum decoherence occurs twelve times more slowly in biological tissue — and every institution, technology, conflict, and cultural artefact in the world flows from that single divergence point. The intent is to create a world with genuine internal logic, so that the AI's daily contributions must cohere with a framework that has real constraints, not merely aesthetic ones.
The most obvious technical approach to a growing archive is retrieval-augmented generation: embed all prior articles, retrieve semantically relevant documents at generation time, and feed them as context. This is the correct solution for many use cases. It is the wrong solution here, for two reasons.
First, token cost scales with the archive. A RAG system that retrieves five articles per generation, each averaging 700 words, adds roughly 3,500 words of context per run. After 200 articles, the retrieved content alone costs as much as the generation itself — and the cost keeps climbing. After 500 articles, the system becomes expensive to operate daily. After 1,000, it is prohibitive unless significant engineering effort goes into retrieval optimisation.
Second, and more importantly, RAG retrieves what was said — not the state of the world. A retrieved article about a faction's political structure from six months ago does not tell the generation model whether that faction still exists, who leads it now, or what it did last week. RAG is excellent for question answering over a fixed corpus. It is poorly suited to generating content that must reflect a world that is continuously evolving.
The alternative developed here — the world-state architecture — solves both problems. Token cost is bounded and flat regardless of archive size. The generation model always receives an accurate current picture of the world rather than historical snapshots that may no longer be true.
Before the system can generate anything coherent, it requires a foundation that will not drift. This is the canon layer — a document written once at project initialization and never modified again. It defines the permanent, immutable facts of the world: the physics deviation, the calendar system, the point of historical divergence from our own timeline, the linguistic conventions used in documents, and the overall tone.
The canon document is deliberately narrow. It does not define specific characters, current events, or the political state of the world — all of these are living facts, subject to change. What the canon defines is the shape of the space in which those facts can exist. It answers: what is physically possible in this world? What assumptions can every piece of writing here make?
The Veiled Continuum diverges from our universe in one precise, scientifically-grounded way. In our world, quantum decoherence — the process by which quantum superposition collapses into a single definite classical state — occurs almost instantaneously in warm biological systems. In the Veiled Continuum, this process occurs approximately twelve times more slowly in biological tissue.
The consequence, discovered in-world by a Velthari surgeon named Orvhe Cassund in ASR 2847, is that living organisms in this world are measurably quantum systems at the cellular level. Their scientific paradigm — the Gradient Interference Model (GIM) — was built from this discovery, and differs from our quantum mechanics in emphasis and in consequence: they never developed a particle model. They understand matter as wave interference patterns in a substrate called the Phase Field. Their periodic table contains six stable elements with no counterpart in our universe, produced by interference dynamics impossible in our physics.
This deviation was chosen because it is specific enough to have real consequences that flow through the world consistently, while being unfalsifiable enough not to create logical contradictions the AI must navigate around. It shapes the world's technology, its medicine, its weapons, and ultimately the central catastrophe that opens the archive's narrative — the Coldwave detonation at Threnford, which displaced 40,000 people into a state of permanent quantum superposition.
The world-state is the system's core innovation — the mechanism that allows the archive to grow indefinitely without proportional growth in operational cost. It is a single JSON document, capped at approximately 6KB, that represents the current living state of the world: which factions exist and what they are doing, which events are unresolved, which named figures are active, what scientific questions are currently open, and what narrative threads remain to be picked up.
The world-state is not a summary of all prior articles. It is the distillation of their consequences. An article about a political negotiation does not persist in the state as a record of what was said — it persists as an entry in the relevant faction's status field, noting that negotiations are now underway. The text is discarded; the consequence is kept.
Six kilobytes is approximately 1,500 words. This is enough to describe four to six major factions with their current status and leadership, five to eight ongoing events with summaries, ten to fifteen named figures, and a dozen open narrative threads. At generation time, this entire document is included in the prompt context — the model sees the full current picture of the world, not a partial retrieval.
The discipline required to maintain this cap is itself generative: because the state document cannot grow unboundedly, events must resolve or be explicitly closed. The world cannot simply accumulate open plotlines indefinitely — a constraint that pushes the generation system toward narrative closure, which produces more satisfying reading.
Each daily cron execution performs exactly two API calls. This is a deliberate architectural constraint. Every additional call adds latency, cost, and failure modes. Two calls is the minimum required for the system to both generate content and maintain the world-state — and the minimum is what is implemented.
The generation prompt is the most carefully engineered component in the system. It must accomplish several things simultaneously: establish the model's role and voice, provide the full world context, specify the article type and its requirements, enforce quality standards, and define the output format — all without exceeding a context budget that leaves room for the generated article itself.
The prompt instructs the model to produce a minimum of 500 words and a maximum of 900, to use in-world language and terminology consistently, to reference at least one ongoing event or open thread from the state document, to introduce at least one new world element, and to return a structured JSON object rather than prose. The JSON output schema includes a suggested_state_updates field — a natural-language paragraph describing what the world state should now reflect as a consequence of the article's events. This field becomes the primary input to Call 2.
Temperature is set to 0.92 — high enough to produce genuinely surprising content, low enough that the model doesn't abandon the world's established logic in pursuit of novelty. This value was determined empirically over several test runs.
The state update call uses a cheaper, faster model — GPT-4o-mini in the reference implementation — because it is a structured data transformation task rather than a creative one. The model receives the current state JSON, the full article just generated, and the suggested update paragraph. It returns a complete replacement state.json.
The prompt for this call enforces the 6KB size constraint explicitly, instructing the model to remove resolved events, consolidate redundant faction notes, and trim open threads that have been addressed. This is the mechanism that prevents state document growth. Without this explicit enforcement, the model would simply append new information to the existing document, causing gradual context bloat.
The response is validated before being written: the system checks that the returned JSON parses successfully, that the major_factions key is present, and that the document size is within bounds. On validation failure, the state is not updated — the world continues from its prior state, and the failure is logged. This is preferable to writing a malformed state that corrupts all future generations.
The central design claim of the Veiled Continuum architecture is that operational cost remains flat regardless of archive size. This is worth demonstrating concretely.
| Component | Tokens In | Tokens Out | Scales with archive? |
|---|---|---|---|
| canon.json | ~750 | — | No — fixed |
| state.json | ~1,500 | — | No — capped at 6KB |
| Generation prompt | ~400 | — | No — fixed |
| Generated article | — | ~700 | No — bounded by prompt |
| State update call | ~3,500 | ~1,500 | No — input is the article + state |
| Daily total | ~6,150 | ~2,200 | No — fully flat |
For comparison: a naive RAG approach retrieving five prior articles per generation would add approximately 3,500 tokens of retrieved context per run. By month six, the retrieval quality would be degrading (cosine similarity over a large corpus is noisy) and the cost would have increased by roughly 55% with no improvement in world coherence. By year two, the RAG system's daily cost would be three to four times the world-state approach.
The world-state architecture does not retrieve the past. It remembers what matters about the past, in a form that is always current.
The archive does not generate the same kind of document every day. A uniform diet of news dispatches would flatten the world — readers would see events but never understand the underlying structures. A uniform diet of encyclopedic entries would build lore but feel static. The article type system creates variety and rhythm, ensuring the archive reads as a real publication from a real world rather than a monotonous generative output.
Four types rotate across the week on a fixed schedule, ensuring balanced coverage:
Each type receives a different generation instruction in the prompt. A DISPATCH is instructed to feel urgent and specific, written as investigative journalism from within the world. A CODEX entry is instructed to feel encyclopedic and dispassionate, structured like a classified briefing. FIELD NOTES are instructed to carry a distinct individual voice. The type instruction is one of the most impactful variables in generation quality — it is the difference between content that reads as deliberate and content that reads as noise.
The archive is served entirely from a single index.php file with no framework, no build step, and no database. This was a deliberate constraint: the hosting environment is a standard shared PHP server with a nearly full database allocation. The entire data layer is JSON files on disk.
Routing is handled via a single query parameter — ?article=slug for article views, ?worldstate for the live world state monitor, and no parameter for the archive index. The PHP file reads the parameter, scans the articles directory for matching files, and renders the appropriate view. There are no redirects, no .htaccess rewrites, and no server-side sessions.
The frontend aesthetic is that of a degraded institutional archive — something that feels like it was once a government system and has been running, mostly unattended, since a bureau was dissolved. Monospaced type throughout, scanline overlays, dark backgrounds with limited colour (a single electric teal accent used sparingly), and deliberate in-world terminology in every label and navigation element. The design is not intended to be readable as a portfolio piece — it is intended to feel inhabited, like it belongs to the world it documents.
A live ticker across the top of every page cycles through active events and open narrative threads pulled directly from state.json, ensuring the world's current tension is visible before the reader opens a single article.
The generation prompt is the highest-leverage variable in the system. Poor prompts produce content that is generically AI-flavoured — vague, impressionistic, repetitive, and unable to surprise. The following constraints, arrived at through iteration, are what separate functional generation from genuinely readable output.
The prompt requires the model to introduce at least one novel element per article — a new name, place, technology, or institutional detail. This prevents the model from writing exclusively about already-established entities, which leads quickly to repetition. It also slowly expands the world's surface area, giving future generations more material to reference.
Simultaneously, the prompt requires the model to reference at least one open thread or ongoing event from the state document. This ensures new content is anchored in the existing world rather than floating free. The combination — one new element, one existing thread — creates the rhythm of a world that is both growing and continuous.
AI-generated prose has characteristic failure modes. Overuse of abstract nouns. Vague mystical framing. Sentences that gesture at significance without specifying anything. The generation prompt explicitly names these failure modes and prohibits them: "Be specific, grounded, and surprising. Not vague mystical prose. Specific, grounded, surprising." This instruction, combined with the high-temperature setting and the requirement to produce named specifics, meaningfully shifts the character of the output toward writing that reads as authored rather than generated.
Requiring JSON output from a generative model is unreliable without enforcement. The prompt specifies the output schema precisely, states that it should contain no markdown, no preamble, and no commentary — only the JSON object. The generation script strips any accidental markdown fences before parsing, and validates required fields before writing the article. On parse failure, the run is logged and exits without corrupting the archive.
The archive launched with two seed articles written by hand to establish the world's voice and introduce the primary ongoing events. Since then, generation has been fully autonomous. The following observations come from reviewing the early output.
Coherence is maintained more reliably than expected. The model respects established faction names, character names, and the physics framework consistently. When it introduces new elements, they tend to fit within the established world logic rather than contradicting it — partly because the world's internal logic is sharp enough to constrain possibilities naturally.
The model gravitates toward certain narrative types. DISPATCH articles tend to be strongest — the journalistic frame gives the model clear structural cues. FIELD NOTES are the most variable — individual voice is harder to sustain without a persona brief, and future iterations of the prompt will include rotating pre-written character sketches to improve this.
Open threads are a generative resource, not a liability. The world-state's open thread list was initially conceived as a coherence tool — a way to ensure the model doesn't forget unresolved plotlines. In practice, it functions as creative fuel. When the model picks up a thread, it tends to advance it in unexpected directions rather than simply resolving it.
The Threnford event has become the archive's centre of gravity. The displaced population of 40,000 — people existing in a quantum superposition state, unable to interact with the physical world — has attracted the most model attention. The synchronization behaviour observed in the first dispatch article has since been referenced in two codex entries and a chronicle, with the model developing its own theory of what is happening without being instructed to do so.
The experiment is ongoing. The questions driving continued operation are as follows.
Long-term coherence: At what point does the world state become insufficient to prevent continuity errors? The 6KB cap will eventually exclude information that matters. The hypothesis is that this creates realistic historical drift — the world forgets things, just as real civilizations do — but this remains to be tested at scale.
Narrative resolution: The Coldwave event, the Lattice Signal, the Nomenclature War — these are the archive's primary open threads. Whether the model will resolve them organically, or whether they will persist indefinitely as background tension, is an open question. If the model never resolves them, a future version of the prompt may be modified to occasionally push toward closure.
Reader experience over time: A human reading the archive in sequence experiences the world differently from one who enters at article 150 without context. Whether the archive becomes more or less accessible to newcomers over time — whether it develops an impenetrable internal mythology or a welcoming layered depth — is something that can only be assessed empirically.
Model replacement: EdenAI's model routing means the underlying model can be swapped without changing the application code. A future comparison — the same world state, the same prompt, different model — would reveal how much of the archive's character is a property of the prompting architecture versus the specific model generating text.