Learning paths
Lute’s docs are organized by subject, but you probably arrived with a role in mind. Pick the path that matches what you are trying to do; each is a short, ordered reading list through pages that already exist. You can always branch off into the sidebar once a page raises a question.
Scenario writer
Section titled “Scenario writer”You write the story — dialogue, choices, quests — and want the tool to catch your mistakes before a player does. Start here and stay in prose; the logic layer can wait.
- Installation — get the
lutecommand on yourPATH. - Write your first scene — build one real scene from an empty file, running
luteat every step, then pin it with a*.test.yamlthatlute testruns. - Connect scenes into a story — chain your scenes with one made-up occasion,
after:andpriority:, branch the endings withwhen:, and play the whole story withlute play; no engine needed. - Build an investigation — a full worked project: facts, a quest, an interrogation hub, two traced endings, and their tests.
- Dialogue & cast — the
@speakerline, delivery flags, and interpolation. - Branch, match & when — player menus and state-driven callbacks.
- Choices & hubs — choice guards, the
into=record sugar, and revisit hubs. - Quests & scenes — objectives,
after:sequencing, and lifecycle events. - Tracing guide and
lute test— preview a scene along a chosen path, and keep every path you care about as a test. - Beats and Playing a story — when the engine picks the next piece of story by moment instead of a fixed episode order;
lute init --template beatsscaffolds a passing example to start from.
Keep the cheatsheet open while you write. If your editor and the terminal ever disagree about a file, trust the terminal and run lute doctor --project .: it names a stale editor language server or a mismatched toolchain.
Narrative programmer
Section titled “Narrative programmer”You think about state, guards, and reachability. This path leads with the logic and analysis layers — the parts of Lute a compiler engineer will recognize.
- Frontmatter & profiles — the capability-selecting header every document opens with.
- The state model — the tiered scalar namespaces and definite-assignment rules.
- CEL expressions — the restricted expression profile behind every condition and assignment.
- Facts and Datalog — the relational fact layer and its total derivation rules.
- Timeline & property tracks — concurrent choreography with the one-writer-per-track rule.
- The scene graph and after: — the project-wide prerequisite graph.
- Reachability — the Reachable / Unreachable / Unknown verdicts and their honesty boundary.
- Guaranteed / Possible envelopes — per-node available-state analysis.
Engine integrator
Section titled “Engine integrator”You are wiring a game engine to play what Lute compiles. Lute never runs your game — it hands you a versioned JSON IR plus CEL, and you implement the runtime contract. This path is contract-first.
- Runtime contract — what Lute emits and what an adapter must implement: the command loop, CEL, facts, quests, and typed bridges.
- Capability permissions — where compile-time authoring ceilings stop and host/runtime authorization begins.
- Streaming continuation compiler — replace full program snapshots while retaining the numeric cursor, state, facts, and control-flow state.
docs/runtime/on GitHub — the normative runtime specification: streaming continuations, capability permissions/security, execution model, state lifecycle, CEL & facts, quest lifecycle, timeline semantics, and bridge protocol.conformance/on GitHub — the artifact-and-expectation fixtures your adapter should replay to prove it plays Lute correctly.- CLI reference →
run—lute runis the reference consumer: it executes a compiled artifact against a mock playthrough, so its transcript is the behavior your adapter must match. - CEL expressions — the exact expression semantics your evaluator has to reproduce.
Plugin author
Section titled “Plugin author”You extend Lute’s vocabulary — new directives, capability surfaces, typed bridges — without touching the fixed grammar or compiler. This path walks the capability model end to end.
- Plugin concepts — how plugins add vocabulary and capability without changing the grammar.
- Manifests & resolution — the package layout, export kinds, dependency graph, and capability snapshot.
- Profiles & activation — deterministic option layering and the distinction between activation and permission ceilings.
- Capability permissions — how trusted projects/hosts restrict already-resolved plugin directives, effects, and bridges.
- Typed bridge directives — declaring a typed runtime bridge and the state it writes.
- Providers and catalog — snapshot-first provider resolution and
capabilitySnapshot.
AI tooling developer
Section titled “AI tooling developer”You are building an authoring pipeline where a model writes Lute and the checker keeps it honest. This path centers the machine-readable surfaces.
- AI harness guide — wiring trusted
--permission-profile, filteredlute context,lute check --json,--deny, exit codes, and fixits into a loop. - Capability permissions — never let generated source choose its authority; use one host ceiling across context, check, compile, and streaming.
- Streaming continuation compiler — stream ordinary checked Lute body units through
compile --streamwithout inventing a model-specific grammar. - CLI reference — the full subcommand surface,
--jsonshapes, and the exit-code contract every step keys off. - Current specification — the consolidated index of what the language actually enforces today.
- State schemas — the shared, imported source of truth a generator must target.
- Build an investigation — see the check → trace → compile loop the harness automates, on a real project (including what whole-project
lute checkproves about relational fact guards).