# Architecture

Shion Runtime treats frontends as channels and keeps the core behavior in one
runtime path.

## Main Path

```text
Transport or PWA input
        |
        v
ShionEvent
        |
        v
Deterministic triage
        |
        v
Human behavior appraisal
        |
        v
Persona/context loading
        |
        v
LLM or scripted generation
        |
        v
Reflection and expression shaping
        |
        v
ShionResponse / Message DSL
        |
        v
Renderer
```

## Important Ideas

- The persona lives in explicit files, not hidden in a single prompt.
- The runtime emits structured response data instead of model HTML.
- The PWA renders Message DSL and character state.
- Trace logs are first-class debugging artifacts.
- Reality background state is input material, not a command to speak.
- Private deployment data should stay local and out of Git.

## Runtime Boundaries

The public release keeps one generic hosted route and one generic local
OpenAI-compatible route. Model-specific installers and private router
experiments are intentionally excluded from this package.
