RPGPT Sovereign RPG Engine

Game Design x Provenance — sovereign RPG engine with ingestible rulesets and provenance-backed world state. ludoSpring. 105+ checks.

Status: Architecture validated — exp045 validates ruleset control systems (49 checks: PF2e, FATE, Cairn), exp046 validates text adventure DAG (33 checks), exp047 validates MTG card provenance (23 checks). exp053 proves anti-cheat = chain-of-custody thesis with 12 fraud types across 3 tiers. ludoSpring V23: session decomposition, typed TransitionIssue enum, pluggable ValidationSink, toadStool direct dispatch, zero-panic validation ( groundSpring V109), #[expect(reason)] dictionary, deny.toml, 9 RPGPT dialogue plane experiments (321 checks). Date: March 16, 2026 Literature Anchor: Gygax & Arneson (1974, tabletop RPG structure), Cook (Pathfinder 2e, 3-action economy), Csikszentmihalyi (1990, Flow), Yannakakis & Togelius (2018, computational game science) Springs: ludoSpring (game science + HCI metrics), rhizoCrypt (ephemeral DAG — game state), sweetGrass (creative attribution), loamSpine (permanence — rulesets, characters, world lore), Squirrel (AI/MCP — narration), biomeOS (orchestration), BearDog (anti-cheat signing) Open Systems: Pathfinder 2e (ORC License), FATE Core (CC-BY), Powered by the Apocalypse (CC-BY), Cypher System (Open License), Cairn (CC-BY-SA) License: ORC License for game mechanics; ecoPrimals code AGPL-3.0-or-later


The Question

Can the ecoPrimals data layer — rhizoCrypt (ephemeral DAG), sweetGrass (semantic attribution), loamSpine (immutable certificates) — serve as the state engine for a tabletop RPG system where:

  1. Any open ruleset (Pathfinder 2e, FATE, PbtA, Cypher) can be ingested as a loamSpine certificate
  2. Any world (original or existing fantasy series) can be loaded as world-lore certificates
  3. The player is their own DM — setting up the quest, the world, the NPCs — then AI assists with storytelling from that foundation
  4. Every game action is a DAG vertex — provable, auditable, branchable — using the same code path that tracks biological samples from field to freezer
  5. ludoSpring’s validated HCI metrics measure session quality in real-time (Flow, DDA, engagement, fun classification)

Specifically: Is the anti-cheat/chain-of-custody isomorphism — the same DAG operation for item lineage in an extraction shooter, sample lineage in field genomics, and loot lineage in a tabletop RPG — sufficient to build a mechanically rigorous RPG engine?


The Isomorphism

The provenance trio applies the same code path across domains. Only the vocabulary changes:

PrimitiveTabletop RPGExtraction ShooterField GenomicsLab Science
SessionAdventure sessionRaid matchField sampling tripExperiment run
EventAction/roll/choiceShot/loot/extractSample collectedObservation recorded
Object lineageSword found → enchanted → tradedGun looted → modded → extractedSwab taken → cultured → sequencedReagent mixed → reacted → measured
Anti-fraudNo phantom itemsNo duped gunsNo phantom samplesNo fabricated data
AttributionWho designed the questWho made the killWho collected the sampleWho ran the experiment
PermanenceCharacter sheet, campaign logPlayer stash, hideoutFreezer inventory, BioProjectPublished dataset, paper

rhizoCrypt’s SessionType::Gaming { game_id } handles all four columns. The ItemLoot vertex in a Tarkov raid is the same DAG operation as a SampleCollect vertex in wetSpring. Anti-cheat is chain-of-custody. Chain-of-custody is anti-cheat. Same primal, same Merkle integrity, different application.


Ingestible Rulesets: The Key Architectural Decision

The system does not hard-code Pathfinder or any other system. Instead, rulesets are loamSpine certificates — immutable, machine-readable constraint documents that the AI must respect.

What This Means

Hand the system:

  • Lord of the Rings (world lore certs) + Pathfinder 2e (ruleset cert) → play a d20 campaign in Middle-earth
  • Dune (world lore certs) + FATE Core (ruleset cert) → play an Aspect-driven campaign on Arrakis
  • Original world (player-authored lore certs) + Cypher System (ruleset cert) → play a GM-intrusion-driven campaign in a custom setting
  • Any fantasy novel (world lore extraction) + any open ruleset → playable RPG

The ruleset certificate constrains the AI absolutely: if the PF2e cert says “3 actions per turn” or “Resist Fire 5 halves fire damage”, the AI cannot hallucinate around it because the constraint is provably anchored in loamSpine.

Open Rulesets Available Under ORC / CC-BY

SystemLicenseStructural Contribution
Pathfinder 2eORC (irrevocable)3-action economy, 4 degrees of success, proficiency tiers, conditions with duration, encounter/exploration/downtime phases
FATE CoreCC-BYAspects (freeform narrative tags with mechanical weight), Fate Points, zones, fiction-first mechanics
Powered by the ApocalypseCC-BY (varies)Moves (fiction triggers), partial success (7-9 range), GM principles
Cypher System (SRD)Cypher Open LicenseSingle target number, GM intrusions, cyphers as one-use items, effort/edge mechanics
Cairn / Into the OddCC-BY-SAInventory slots as HP, direct damage (no to-hit), minimal rules
Year Zero EngineOGL variantStress dice, push mechanic, hex exploration

Ruleset-to-Certificate Mapping (Pathfinder 2e Example)

PF2e MechanicCertificate StructureecoPrimals Mapping
Ability scores (STR-CHA)AbilityScores { str: i8, dex: i8, ... }rhizoCrypt vertex payload
Proficiency tiersProficiency { level: Untrained..Legendary }loamSpine cert evolution (versioned)
3-action economyTurnBudget { actions: 3, reactions: 1, free: u8 }DAG branching constraint per turn vertex
Degrees of successDegreeOfSuccess { CritFail, Fail, Success, CritSuccess }Maps to Hick’s law (4 outcomes × decision time)
ConditionsCondition { name, value: u8, duration: Duration }Temporal vertex metadata, decay across turns
Encounter/Exploration/DowntimeSessionPhase { Encounter, Exploration, Downtime }ludoSpring SessionPhase state machine
Ancestry + Class + BackgroundCharacterIdentity { ancestry, class, background }loamSpine CharacterSheet cert
FeatsFeatTree { ancestry: [], class: [], skill: [], general: [] }sweetGrass derivation chain (feat prerequisites)
Item levels + runesItem { level: u8, runes: Vec<Rune>, properties: Map }loamSpine GameItem cert with attributes
Hero PointsHeroPoints { current: u8, max: 3 }ludoSpring engagement correlation

FATE Aspects as sweetGrass Entities

FATE’s Aspects are particularly interesting: they’re freeform narrative tags (“Haunted by the Ghost of My Mentor”, “Last of the Iron Legion”) that mechanically affect rolls via invocations and compels. This maps directly to sweetGrass semantic entities with derivation tracking — the Aspect is an entity whose origin is attributed (player created it during character creation), and whose evolution is tracked (the ghost was confronted in session 4, the Aspect changed to “Made Peace with My Mentor’s Ghost”).


Primal Roles

rhizoCrypt — Game State Engine

The DAG holds the living game world. Every action is a vertex:

Session: "campaign-northwatch-s4"
├── v0: SessionStart { phase: Exploration, ruleset: "pf2e-v1.2" }
├── v1: PlayerAction { agent: "did:key:alice", action: "search the ruins" }
├── v2: AINarration { agent: "did:key:squirrel", text: "You find a locked door..." }
├── v3: PlayerChoice { agent: "did:key:alice", choice: "pick the lock" }
│   ├── v4a: SkillCheck { skill: "Thievery", dc: 20, roll: 18, degree: Failure }
│   │   └── v5a: Consequence { condition: Condition::new("Detected", 1), scope: "encounter" }
│   └── v4b: [BRANCH — "what if I break it down?"]
│       └── v5b: SkillCheck { skill: "Athletics", dc: 15, roll: 22, degree: Success }
├── v6: PhaseTransition { from: Exploration, to: Encounter }
├── v7: InitiativeRoll { participants: [...], order: [...] }
└── ...

Key properties:

  • Branching is native — “what if?” is a DAG fork, not a save file
  • Every roll is a vertex — provable, auditable, no phantom crits
  • NPC memory accumulates — the guard remembers being alerted
  • Conditions have temporal scope — Frightened 2 decays structurally across turn vertices

Evolution goals (from RPGPT → benefits all domains):

GoalCurrent StateWhat It Teaches All Domains
Turn-based session modeSessionType::GamingMulti-day field campaigns ( wetSpring)
Action economy constraintsGeneric verticesProtocol step limits (lab science)
Condition tracking with decayGeneric metadataSample degradation over time (field genomics)
Branch diff and mergeDAG exists, no vizProtocol variant comparison ( wetSpring)
NPC state across sessionsAgent DIDs existInstrument state across experiments (lab)
Phase transitionsGeneric lifecycleCollect → transport → process → analyze (field genomics)

loamSpine — Permanent Record and Constraint Engine

loamSpine anchors things that survive beyond a session AND constrains the AI:

WhatCertificate TypeWhy Permanent
RulesetRuleset { system, version, mechanics }Immutable constraint — AI cannot hallucinate
Character sheetCharacterSheet { ancestry, class, level, abilities, feats }Survives across sessions, tradeable between players
World loreWorldEntry { topic, canon_level, author }Campaign bible — canonical facts with authorship
NPC templateNpcTemplate { name, traits, motivations, voice, knowledge_bounds }Persistent personality across sessions
ItemGameItem { type, level, runes, properties }Tradeable, lendable, provably owned
AchievementAchievement { quest, participants, date, proof_vertex }Provable accomplishment linked to DAG

Evolution goals:

GoalBenefits All Domains
Machine-readable ruleset certsExperimental protocol certs (lab science)
Character sheet certsInstrument calibration certs (lab)
World lore certs with canonicityMaterial safety data sheets (chemistry)
NPC personality certs with knowledge boundsReagent property certs (lab)
Lending via slice semanticsShared equipment checkout (lab)

sweetGrass — Creative Attribution

Tracks who built the world:

ContributionAgentAttribution Weight
World setting designPlayer (DM phase)Creation (1.0)
Quest hookPlayerDesign (0.9)
NPC dialogue generationAI ( Squirrel)Implementation (0.8)
Plot twist from player choicePlayer responseExtension (0.5)
Rule interpretationAIMaintenance (0.3)
Procedural terrainPerlin noise ( ludoSpring)Tool (0.1)

The player who designs the quest gets higher attribution than the AI that narrates it. If the AI generates a compelling NPC from the player’s template, sweetGrass tracks: Player designed template (Creation) → AI implemented dialogue (Implementation) → Player’s choices evolved personality (Extension).

FATE Aspects as sweetGrass entities: An Aspect like “Haunted by the Ghost of My Mentor” becomes a semantic entity with a derivation chain — created during character creation (player, Creation), invoked during session 2 combat (player, Extension), compelled during session 3 negotiation (AI, Implementation), evolved to “Made Peace with My Mentor’s Ghost” in session 4 (player, Extension). Full provenance.

Squirrel (AI/MCP) — Constrained Storytelling Engine

Squirrel reads the DAG, references the ruleset cert, and generates constrained narration:

AI TaskReads FromWrites ToConstrained By
Narrate sceneDAG parent chain + world lore certsNew narration vertex in rhizoCryptRuleset cert ( loamSpine)
NPC dialogueNPC template cert + conversation DAGDialogue vertexPersonality cert (knowledge bounds)
Roll interpretationSkill check result vertexNarrative consequence vertexPF2e degree-of-success rules (ruleset cert)
World reactionPlayer action vertices + world stateEnvironmental change verticesInternal consistency (world lore certs)
Branch suggestionDAG state + ludoSpring metrics“What if?” promptMust be mechanically valid (ruleset cert)

The AI is not a freeform chatbot. It operates within provably anchored constraints. If the ruleset says “Resist Fire 5 halves fire damage”, the AI must apply that. The ruleset cert is the contract.

ludoSpring — Session Quality Measurement

ludoSpring’s 13 validated HCI models evaluate whether the session is actually fun:

MetricRPG ApplicationAction Signal
Flow (Csikszentmihalyi)Challenge/skill balanceAI adjusts encounter CR
Engagement (Yannakakis)Player investment levelLow → AI introduces complication
DDA (Hunicke)Difficulty scalingSuggest encounter difficulty adjustment
Four Keys (Lazzaro)What type of funHard Fun (combat) vs Easy Fun (exploration) vs People Fun (NPC interaction)
Hick’s lawDecision paralysisToo many choices per turn → AI simplifies options
Fitts’s lawUI target acquisition (if graphical)Character sheet layout optimization

BearDog — Anti-Cheat Signing

Every game action is BearDog-signed. The anti-cheat isomorphism:

In the GameIn the FieldSame Operation
Item appears without ItemLoot vertexSample appears without SampleCollect vertexInvalid lineage → reject
Player modifies HP without DamageVertexResearcher modifies reads without Processing vertexUnauthorized mutation → flag
Dice roll result without SkillCheck vertexMeasurement without Observation vertexPhantom data → reject

The Player-as-DM Model

Traditional RPGs have a DM (Dungeon Master) who builds the world and the AI narrates within it. RPGPT inverts the common “AI is the DM” pattern:

  1. Player designs: World setting, quest hooks, NPC templates, tone, stakes (Creation attribution)
  2. Player sets the stage: Opening scene, initial situation, available paths (Design attribution)
  3. AI assists: Narrates consequences, voices NPCs within their templates, interprets rules (Implementation attribution)
  4. Player choices evolve: Decisions create new DAG branches, NPC personalities shift, world state changes (Extension attribution)
  5. AI follows: Maintains internal consistency, applies rules, tracks conditions (Maintenance attribution)

The player is the creative director. The AI is the execution engine. sweetGrass tracks this distinction precisely.

This is not a chatbot — the rhizoCrypt DAG gives it structure. You can:

  • Fork a branch to explore “what if I’d negotiated instead of fighting?”
  • Return to any vertex and take a different path
  • View the full DAG of your campaign as a tree of decisions
  • Compare branches (the negotiation path was higher-Flow than the combat path)
  • Merge worlds (two players’ campaigns share a world — their DAGs are separate sessions in the same world-state)

Connection to Existing Papers

PaperRPGPT Connection
01 (Anderson-QS)Dungeon exploration = microbial community exploration (same interaction architecture, same Perlin disorder landscapes)
12 (Immuno-Anderson)Immune encounter = combat encounter (cytokines = NPCs, tissue = terrain, drugs = items)
13 (Sovereign Health)Patient engagement = player engagement (same Flow theory, same DDA for treatment adaptation)
16 (Anaerobic-Aerobic QS)Biome phase transition = campaign phase transition (encounter ↔ exploration ↔ downtime)
17 (Game Design as Science)All 13 HCI models apply directly to RPGPT session design and quality measurement

Experimental Validation (ludoSpring V3)

The architecture described above is no longer theoretical — three experiments validate the core claims:

ExperimentChecksWhat it validates
exp045 — Ruleset Control Systems49/49PF2e 3-action economy, FATE Aspects, Cairn inventory-as-HP ingested as machine-readable rulesets. game::ruleset module validates DiceSystem, DegreeOfSuccess, Proficiency, Condition decay, ActionEconomy for all three systems.
exp046 — Text Adventure DAG33/33Session DAG with branching narrative: player choices create vertices, narrative forks are DAG branches, NPC state accumulates across turns. Validates the rhizoCrypt gaming session model.
exp047 — MTG Card Provenance23/23Card mint ( loamSpine cert) → trade (ownership transfer) → transform (enchant/modify) lifecycle. sweetGrass tracks creative attribution for card design. Validates item lineage through provenance trio.

Additionally, exp053 (Extraction Shooter Provenance, 65 checks) proves the core thesis of this paper — anti-cheat is chain-of-custody — with 12 concrete fraud types detected purely through DAG provenance analysis. The same orphan-item detector that catches duped extraction shooter loot catches phantom swords in an RPG.

What We Build

Phase 1: Ruleset-as-Certificate Format

Define machine-readable subsets of open rulesets as loamSpine certificates:

  • PF2e ability scores, proficiency, action economy, degrees of success, conditions
  • FATE Aspects, Fate Points, invocations, compels
  • Generic interfaces that any ORC/CC-BY system can implement
  • This is the constraint document the AI must respect — the contract

Phase 2: Session DAG (rhizoCrypt Gaming Mode Evolution)

Build on existing SessionType::Gaming to add:

  • Turn structure (round → turn → N actions per ruleset)
  • Dice roll vertices with ruleset-specific outcome evaluation
  • Condition application and decay (temporal vertex metadata)
  • Phase transitions (encounter ↔ exploration ↔ downtime state machine)
  • NPC memory accumulation across sessions

Phase 3: AI Narration Loop (Squirrel + ludoSpring)

  • Squirrel reads DAG context + ruleset cert + NPC templates
  • Generates narration constrained by anchored rules
  • ludoSpring measures engagement/flow/fun per session
  • DDA adjusts encounter difficulty based on metrics

Phase 4: Attribution + Economics (sweetGrass + sunCloud)

  • Player world-building gets Creation attribution
  • AI narration gets Implementation attribution
  • NPC personality evolution tracked as Derivation
  • If the world becomes shareable, sunCloud radiates value to creators

Provenance Trio Evolution Goals (Scaffolded by RPGPT)

These evolution goals apply across all springs — RPGPT is the proving ground:

rhizoCrypt

  • Turn-based session mode with configurable action economy
  • Condition tracking with temporal decay across turn vertices
  • Branch diff and merge for “what if?” exploration
  • NPC-scoped vertex queries across sessions
  • Phase transition state machine (configurable per ruleset)

loamSpine

  • Ruleset certificate type (machine-readable, queryable)
  • CharacterSheet certificate type (system-agnostic base + system-specific extensions)
  • NpcTemplate certificate type (personality, knowledge bounds, voice)
  • WorldEntry certificate type (canon level, authorship, derivation)
  • Lending via Loan slice mode (“play my character for a session”)

sweetGrass

  • Multi-agent creative attribution (player + AI + NPC derivation chains)
  • Narrative entity extraction (quest, NPC, location as semantic entities)
  • Session contribution rollup (“who built tonight’s session?”)
  • Personality evolution tracking (NPC drift attributed to player interactions)
  • FATE Aspect lifecycle as derivation chain

License Note

All game mechanics referenced from ORC-licensed material (Pathfinder 2e) are used under the ORC License. The ORC License is irrevocable and system-agnostic. Reserved Material (Pathfinder trademarks, Golarion setting, named characters) is NOT used. Only open mechanical structures are referenced.

FATE Core mechanics are used under CC-BY 3.0 (Evil Hat Productions).

ecoPrimals code remains AGPL-3.0-or-later.