Architecture

PompoEngine is a PC-only visual novel engine with a clear separation between

shared data contracts, authoring tools, build tooling, runtime playback, and

advanced user scripting.

Project Boundaries

on Avalonia, FNA, build tooling, editor UI, or CLI behavior.

authoring helpers, and `PompoGraphIR` compilation.

custom node discovery, runtime module discovery, and script security checks.

editor code, build tooling, tests, or release packaging code.

scripting, and build services, but editor code must not be packaged into

runtime output.

compilation, runtime publishing, build verification, release packaging,

release verification, release audit, and docs-site generation.

runtime execution, scripting security, build boundaries, release packaging,

repository doctor, and documentation generation.

Authoring Data Flow


Editor or CLI
  -> project.pompo.json
  -> Assets / Scenes / Characters / Graphs / Scripts / BuildProfiles / Settings
  -> validation diagnostics
  -> graph compiler
  -> PompoGraphIR

All authored project data is text JSON. Binary-only authored formats are out of

scope for v1. Assets are tracked through the asset database with IDs, source

paths, hashes, import options, and references.

Preview Flow

The editor preview path compiles the current graph plus sibling project graphs

and runs the FNA runtime CLI as an isolated process.


Avalonia editor
  -> graph library compile
  -> runtime preview process
  -> trace events
  -> editor Preview panel/window

Preview uses the same IR execution model as packaged runtime smoke tests. This

keeps editor preview close to build output behavior.

Build Flow


Build profile
  -> project validation
  -> user script compilation
  -> graph IR compilation
  -> asset copy
  -> runtime publish
  -> build manifest
  -> optional packaged-runtime smoke tests

Build output must contain only runtime binaries, compiled data, copied assets,

optional `Pompo.UserScripts.dll`, and settings required by the runtime.

Release Flow


Verified build output
  -> release package
  -> zip archive
  -> checksum
  -> release manifest
  -> optional signature
  -> release verify
  -> release audit

Release verification rejects unexpected archive entries, editor/build/test

artifacts, source script files, debug symbols, checksum mismatches, missing

compiled IR, and missing required runtime data. Strict verification can require

self-contained runtime output and smoke-tested locales.

Runtime Flow


Packaged Data/project.pompo.json
  -> asset catalog
  -> PompoGraphIR
  -> runtime interpreter
  -> FNA presentation
  -> save store

The runtime does not interpret source graph JSON directly. It executes compiled

IR and tracks variables, call stacks, visible scene state, BGM/SFX/voice audio

state, unlocked CG IDs, choices, and save slots.

Scripting Flow


Scripts/**/*.cs
  -> compile-time security checks
  -> Pompo.UserScripts.dll
  -> custom node discovery
  -> editor palette and graph properties
  -> runtime custom node handler

The scripting surface is advanced-user functionality. Default script permissions

block file system, network, and process APIs unless explicitly enabled by the

project. Reflection and runtime assembly loading escape hatches remain blocked.

Runtime UI Customization

Runtime UI customization is project-owned data:

The editor Theme tab exposes these settings with validation and a visual layout

preview. Build validation rejects invalid values before packaging.

Repository Gates

Before a release candidate:


dotnet build PompoEngine.slnx --no-restore
dotnet test PompoEngine.slnx --no-build
dotnet run --project src/Pompo.Cli/Pompo.Cli.csproj -- doctor --repository --root .
dotnet run --project src/Pompo.Cli/Pompo.Cli.csproj -- docs site --root . --output artifacts/docs-site --json

Release changes must also pass build verification, release verification, and

release audit with strict locale and self-contained runtime requirements.

Architectural Rules

release behavior.