A governance-grade AI narrative RPG platform.
Built for campaign-scale causality, inspectability, and genre discipline.
Main gameplay view (auto adapts to light/dark)
Start Screen (light/dark) |
Theme Selection |
More gameplay samples
Plan Interface |
Skill Interface |
Soul Interface |
- Status: Active
- Edition: 2026 Q1
- Audience: Product, Narrative Design, Engineering
- Scope: Platform-level overview, methodological model, and trust posture
- Out of Scope: Full implementation specification for every runtime module
- Primary Promise: Coherent, traceable, long-form interactive storytelling
- Visual Preview
- Executive Summary
- Reader Paths
- Why It Feels Different
- Scope and Non-Goals
- Design Objectives
- Architecture Principles at a Glance
- Methodological Framework
- Distinctive Capabilities
- Governance and Trust Framework
- Reliability and Trust Model
- Operational Evaluation Criteria
- Core Narrative Domains
- One-Session Experience Loop
- Evidence Map
- For Creators and Extenders
- Glossary
- Quick Start
- Deployment and Documentation
- License
Chronicles of Infinity is a narrative-first AI adventure platform designed for campaign-length interactive fiction.
Its core thesis is straightforward: long-form narrative quality is a systems discipline. If state is not durable, perspective is not controlled, and continuity is not managed under context pressure, story quality eventually collapses.
This repository addresses that challenge through canonical state management (VFS), actor-first reasoning, dual-layer truth modeling (Visible/Hidden), and explicit theme governance.
- If you need architecture intent and trust posture: read
Design Objectives,Architecture Principles at a Glance, andGovernance and Trust Framework. - If you need product differentiation: read
Why It Feels Different,Distinctive Capabilities, andCore Narrative Domains. - If you need implementation evidence: read
Evidence Map. - If you need immediate setup: read
Quick StartandDeployment and Documentation.
| Product Pillar | System Commitment | Player-Facing Effect |
|---|---|---|
| World keeps a ledger | Canonical VFS state is the source of truth | Choices leave durable traces and can be revisited later |
| Surface story + hidden progression | Visible and Hidden layers evolve in parallel | The world can surprise the player without breaking logic |
| Long-horizon continuity controls | Compact + Query Summary fallback + Cleanup workflows | Multi-session campaigns stay coherent instead of drifting |
| Genre as behavioral contract | Theme governance constrains tone, pacing, risk, and consequence grammar | Different themes behave differently, not just sound different |
- Campaign-length interactive storytelling with persistent causality.
- Role-based narrative perspective and controlled information disclosure.
- Theme-governed generation behavior across long sessions.
- Inspectable runtime surfaces for creators and maintainers.
- One-turn spectacle generation optimized only for novelty.
- Purely cosmetic genre switching without behavioral impact.
- Hidden, non-auditable state mutation pipelines.
- Replacing human-authored novels with fully deterministic scripted output.
- Continuity over isolated brilliance: prioritize stable multi-turn coherence over one-turn stylistic spikes.
- Causal traceability: ensure major narrative outcomes are grounded in stored state transitions.
- Perspective fidelity: separate what the player can know from what the world currently contains.
- Genre integrity: preserve theme-specific pacing and consequence logic throughout long sessions.
- Operational transparency: expose runtime structures so creators can inspect, debug, and extend behavior.
| Principle | Primary Mechanism | Operational Result |
|---|---|---|
| Canonical state first | VFS-backed world and campaign files | Story facts remain inspectable and durable |
| Perspective before prose | Actor-first reasoning model | Responses follow role position and information limits |
| Dual-layer truth | Visible/Hidden narrative layers | Discovery and revelation remain structurally valid |
| Continuity under pressure | Compact + Query Summary fallback + Cleanup | Long sessions degrade gracefully instead of collapsing |
| Genre as contract | Theme governance constraints | Tone and consequence grammar remain consistent |
| Branch-aware memory | Fork-sensitive historical records | Divergent lines preserve local causality |
| Trust through observability | Schema contracts + file-based state surfaces | Runtime behavior can be audited and evolved |
-
Canonical State Substrate (VFS) World and campaign data are managed as canonical files. State is never treated as disposable prompt residue.
-
Actor-First Reasoning The runtime evaluates events from actor position, social context, and information access, which reduces omniscient flattening.
-
Visible/Hidden Dual-Layer Truth Player-facing reality and world-internal reality are modeled separately. Revelation is produced by progression, not retroactive rewriting.
-
Continuity Preservation Stack Compact, Query Summary fallback, and Cleanup workflows are coordinated to preserve coherence under long-context pressure.
-
Genre Governance Contracts Themes define narrative constraints across tone, tempo, conflict grammar, and consequence shape.
-
Branch-Aware Historical Memory Divergent lines evolve independently while preserving local causality and recoverable history.
-
Structured world entities Actors, factions, locations, quests, knowledge, timelines, and causal chains are managed as connected state objects.
-
Systemic consequence propagation Outcomes are computed from persisted world conditions rather than surface-level callbacks.
-
Perspective-controlled disclosure Information appearance depends on role visibility and unlock status, preserving discovery dynamics.
-
Campaign-level drift control Continuity stabilization is a runtime operation, not an ad-hoc editorial patch.
-
Theme persistence at scale Genre identity remains stable over long sessions instead of converging into generic prose.
-
Creator-operable runtime surface Through VFS tooling and schema contracts, advanced users can inspect and evolve narrative behavior.
| Layer | Core Question | Control Mechanisms | Platform Outcome |
|---|---|---|---|
| Design governance | How are narrative rules defined and constrained? | Theme authoring protocol, schema contracts, documented extension workflow | Themes operate as contracts, not decoration |
| Runtime governance | How is coherence preserved while the campaign runs? | Actor-first reasoning, dual-layer truth, continuity stack | Story evolution remains causally and perspectivally stable |
| Audit governance | How can teams verify behavior after the fact? | VFS state surfaces, branch-aware history, tooling docs | Decisions and outcomes remain inspectable and explainable |
| Trust Claim | Operational Anchor | Verification Surface |
|---|---|---|
| State traceability | Persistent VFS world and campaign files | State artifacts, history snapshots, and world records |
| Causal consistency | Actor memory + stored world facts | Outcome justification against recorded transitions |
| Layer integrity | Visible/Hidden separation and reveal logic | Consistency between hidden progression and later revelation |
| Controlled degradation | Summary fallback and Cleanup workflows | Coherence recovery behavior under context pressure |
| Governed extensibility | Theme protocols + schema + docs | Safe extension without breaking platform contracts |
Use this gate before major release or narrative policy changes:
| Evaluation Gate | Key Question | Passing Signal |
|---|---|---|
| Continuity gate | Can current state be explained by prior turns without contradiction? | No unresolved continuity breaks in sampled campaigns |
| Causality gate | Are major outcomes justified by persisted world facts? | Outcome paths match recorded state transitions |
| Perspective gate | Does player-facing knowledge stay inside role visibility boundaries? | No unauthorized information leakage in validation runs |
| Theme gate | Does pacing and consequence grammar remain genre-consistent over long sessions? | Theme-specific behavior remains stable across branches |
| Recovery gate | Under context stress, can fallback workflows restore coherence without flattening identity? | Post-recovery narrative keeps both logic and genre character |
| Domain | Narrative Pressure Model | Representative Lanes |
|---|---|---|
| Power-Reversal Fantasy | Status asymmetry, public conflict, reversal economics | Long Aotian power fantasies, War God Returns, urban hierarchy reversal |
| Tragedy and Regret | Delayed truth, emotional debt, irreversible outcomes | Wife-chasing crematorium arcs, substitute first-love tragedy, regret routes |
| Healing and Growth | Relational repair through constrained repeated choices | Sweet-healing romance, mutual redemption, everyday growth campaigns |
| Mystery and Horror | Information asymmetry, rule pressure, epistemic risk | Classical deduction, rule-horror loops, cosmic dread |
| Epic Worldbuilding | Individual agency under factional and civilizational systems | Western fantasy epics, cultivation sagas, cyber-scale civilization conflict |
- Choose a narrative domain Select a theme class and its pressure model.
- Instantiate protagonist position Set leverage, constraints, and social exposure.
- Make scene decisions Act through contextual options or custom intent.
- Receive system response World entities and hidden processes update from canonical state.
- Absorb consequences Immediate and delayed effects are both persisted.
- Carry continuity forward Branch history, theme discipline, and causal legibility remain intact for the next session.
- Architecture and policy:
docs/vfs-v2-architecture.md,docs/VFS_TOOLING.md - Schema contracts:
docs/SCHEMA_DOCS.md - Prompt and skills runtime:
src/services/prompts/README.md - Theme extension protocol:
docs/how_to_add_story_theme.md - Theme mapping and rewrite methodology:
docs/plans/THEME_MAPPING_TABLE.md,docs/plans/THEME_REWRITE_TASK.md - Worldbuilding and protagonist methodology:
docs/plans/WORLDBUILDING_METHODOLOGY.md,docs/plans/PROTAGONIST_ECOLOGY.md - Narrative UI standards:
docs/ui_vn_style.md
Recommended order for extension and governance work:
- Define the domain contract with theme and world assumptions.
- Encode constraints through prompt modules and skills.
- Validate behavior with continuity, causality, and perspective gates.
- Publish extension decisions with schema and documentation alignment.
Primary references:
docs/how_to_add_story_theme.mdsrc/services/prompts/README.mddocs/VFS_TOOLING.mddocs/vfs-v2-architecture.mddocs/SCHEMA_DOCS.md
- Canonical State: persistent source of truth used for narrative computation.
- Actor-First: decision logic grounded in role position and information access.
- Visible Layer: player-facing narrative facts currently disclosed in play.
- Hidden Layer: world-internal truths not yet disclosed to the player.
- Continuity Stack: Compact, Query Summary fallback, and Cleanup workflows.
- Theme Governance: constraints that enforce genre-specific narrative behavior.
- Branch History: fork-aware historical records for divergent narrative lines.
- Causal Legibility: ability to explain outcomes through inspectable prior state.
- Install dependencies.
pnpm install
- Create
.env.localin the project root and configure one provider key.VITE_GEMINI_API_KEY=your_gemini_api_key_here # or VITE_OPENAI_API_KEY=your_openai_api_key_here
- Start the app.
pnpm dev
- Open
http://localhost:5173.
If you prefer npm, use npm install and npm run dev.
- Build command:
pnpm build - Supported deployment targets: GitHub Pages, Cloudflare Pages
- Documentation hub:
docs/how_to_add_story_theme.md,docs/VFS_TOOLING.md,docs/vfs-v2-architecture.md,docs/SCHEMA_DOCS.md,docs/ui_vn_style.md
Source code in this repository is licensed under PolyForm Noncommercial License 1.0.0.
Commercial use in any form is prohibited.
See LICENSE for full terms.



