This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index at /llms.txt, or add .md to any page's URL.
Semantic restrictions
Syntax is only the first layer. In particular:
•
Types are closed; unknown/unresolved types, cycles, and invalid property values
are refused. none and [] need enough context to infer their contained type,
or a state's declared one (state ids: string[] = []).
•
Record construction requires all fields once; copying requires a matching base.
Shapes are finite and nonrecursive. Equality compares values structurally.
•
Function bodies are effect-free, nonrecursive expressions (they may read
performanceNow()); an app's function may shadow a roster name (and is then
called name(x), as it is declared) but not take a declared shape's constructor name.
•
Action reads see the starting snapshot. Writes land together. Locals are
immutable and cannot shadow visible names or escape their block.
•
A child may own ordinary state, derives and actions, and, at bounded uses,
resources, mutations and tasks (type-child-resource). Each instance owns its
work; its task runs in that instance's frame until destruction. Hidden instances
stay alive, so a task that should stop while hidden needs a when gate.
An action writes only its own admitted slots.
•
A then handler takes no parameters and must not send its own mutation.
•
A state's initializer reads only props, injects and the states above it; a
resource, derive, mutation, action or later state it names is
type-initializer-scope (LLP 1088 D4).
•
persist (LLP 1116 D5) keeps a root state across launches under its name: a
stored value of its type replaces the initializer's before the first frame,
and after each commit that stands the store holds the state's value. Only a
number, string or bool, or an option or list of one, at most 16 KB as JSON;
a record, a list of records or a state holding an action is
type-persist-type (keep app data in a source), a child's state
type-persist-child, a derive syntax-persist-derive.
persist window uses the same types and limit and restores the value in the
window that saved it. A fresh window uses the initializer.
•
An action sends one mutation at most once on any path: a second send forgets
the first's reply (LLP 1016 D5), so it is analyze-send-twice — unless the
mutation is queue, whose sends each wait their turn (LLP 1092 D6), or
parallel, whose sends each land (LLP 1161.000 D2). Exclusive
if/match arms, and sequential ifs testing one unchanged name against
different literals, are separate paths (LLP 1088 D8). A match binder and an
outer name it shadows are different values; their tests do not prove separate
paths. The walk reads the root's actions with every call expanded, where a caller
and its callees are one commit.
•
A read of a state or mutation slot that the action assigned earlier on the
same path sees the starting value, since writes land when the action ends: it
is the warning analyze-read-after-assign (LLP 1116.003 D6; LLP 1035.005.002
C2), in the action's own body or behind a call (the action's body, or another
call, assigned it; LLP 1089 D3), one rule at one severity. The message names
the repair: bind the value, let next = …, assign next, read or pass next;
a let bound before the write keeps the old value. Not named: a read on a
path exclusive with the assignment's, a condition the assignment's path
decides (if phase == 1 … phase = 2, then if phase == 2), and a field a
record copy left unchanged (s = S(s, f=…), then s.g). A derive, a resource
and pending(m) read settled values. In 1,029 bake-off builds the body's read
was met in 86 and the call's in 2, which is why the call's is no longer a
refusal. pending/failed operate on declarations, not arbitrary values.
•
An action that both sends a newest-wins mutation and assigns it on one path, in
either order and through calls, is warned of (analyze-send-assigned, LLP
1035.005.002 C1): a send is asked when the action runs; once the writes land,
a request still in flight for a mutation the action assigned is forgotten and
its reply dropped, and the slot keeps the assigned value (LLP 1016 D5). The
message names the three intents' spellings; a queue or parallel
mutation's assignment forgets no request (LLP 1092 D4, LLP 1161.000 D4) and
is not named. No bake-off build wrote
the combination; Weird Castle's logout means it.
•
View roots cannot be conditional/repeated regions. Tags, attributes, and
children must fit their lowering rules. Class application is not a CSS cascade.
•
Scrollers need bounds; virtualized lists have specific axis, template, and
nesting requirements. The bake additionally checks measured geometry.
•
One root route table supplies implicit router state and types. path needs a
literal known route name and the right number of parameter values.
•
Source imports stay inside the app directory. A .contract import does not
import arbitrary executable code.
•
Timer intervals, literal-only styles, keyframe constants, font files,
localization tables, native schemas, and optional capabilities have separate
checks. Runtime/host coverage is not implied by successful parsing.
The compiler corpus and
compiler integration tests contain executable accept
and refusal examples. Use their diagnostic ids to find the rule that rejected a
program rather than expanding this grammar speculatively.
Is this helpful
Last updated November 30, 2026