Story Model Rules
Every .thrl file carries these rules in guide.rules, word for word (format version 1.12). They cover what the data can’t say by itself, such as the reading order of Beats and what stacks and overrides mean. They’re written for software and AI models, which is why they read like a contract.
Story order
Section titled “Story order”STORY ORDER: never sort beats by sequence. The reading order is: top-level items (beats without stackedOn, and structures) sorted by sequence, where each top-level beat or structure is immediately followed by the beats stacked on it (beats whose stackedOn is its id) sorted by stackOrder. The top-level storyOrder array in this file is that order, precomputed — trust it.
Beat numbers
Section titled “Beat numbers”BEAT NUMBERS — use these whenever you address a human. sequence and stackOrder are internal 0-based ordering keys and are NEVER a beat number: structures share the sequence axis with top-level beats, and in a project built on a structure deck every beat carries sequence: -1 and is positioned by stackOrder, which restarts inside each stack. The number a writer knows a beat by is its 1-based position in story order, precomputed per beat in guide.beatNumbers. The Write outline prints it beside each beat that has no beat.sceneNumber, so refer to a beat by its title and that number. beat.sceneNumber is a different thing and not a substitute: it is the writer's own printed scene numbering (set by hand or generated from the app's Numbering dialog), it is often absent, and it need not be unique or sequential. Where a beat has one, the Write outline prints it in place of the beat number, so the two can differ after a reorder.
Stacked beats
Section titled “Stacked beats”STACKED BEATS carry sequence: -1; their position comes entirely from their stack target and stackOrder. Beats stacked under a structure card mean "these beats fulfill this template beat" — structures are per-beat guidance, not act containers.
Stacked settings
Section titled “Stacked settings”STACKED SETTINGS (since THRL 1.10): a world may carry stackedOn (the id of another world) — the writer piles related settings on one base to group them, e.g. the rooms of one house. Stacked worlds carry sequence: -1 and order within their pile by stackOrder; stacks are one level deep (a stack target is always a base). Purely organizational: a stacked world is still a normal setting and beats reference it by sleeveId as usual. Never sort worlds by sequence — that tears every pile off its base and lists it first; the worlds array is already written in row order (each base followed by the settings stacked on it), so read it as given.
Screenplay language
Section titled “Screenplay language”SCREENPLAY LANGUAGE: project.screenplayLanguage ("en" or "de", absent means "en") is the project language: the language whose screenplay conventions the script follows. It decides how the app RENDERS for a human: scene headings (INT. CASTLE - NIGHT in English, INNEN. SCHLOSS - NACHT in German), the script terms the PDF adds itself ((CONT'D)/(WEITER), (MORE)/(MEHR)), the headings of exported documents and the text new structure cards copy from a deck. The stored fields never change with it: beat.intExt is always one of INT / EXT / INT/EXT, and beat.timeOfDay is free text in the script's own language ("NACHT", "ANSCHLIESSEND"). Fountain exports stay INT./EXT. in every language, because that is the Fountain spec.
Relationship labels
Section titled “Relationship labels”RELATIONSHIP LABELS (aToB, bToA, and the same fields inside overrides) are EMOTIONS/attitudes — how one character FEELS about the other ("distrusts", "is indebted to", "mourns") — never actions or events ("betrays", "steals from"). A label persists until a later override changes it.
Relationship rows
Section titled “Relationship rows”RELATIONSHIP ROWS are one per character pair, stored with aId < bId (plain string compare of the ids). aToB = how the aId character feels about the bId character, bToA the reverse.
Overrides
Section titled “Overrides”OVERRIDES (on relationships and on character constellation positions) are sparse per-beat keyframes: resolve each field independently to the latest entry at-or-before the current beat in STORY ORDER, falling back to the baseline value. A relationship with startBeatId does not exist before that beat.
The overall view
Section titled “The overall view”THE "OVERALL" VIEW of the character constellation resolves at story index 0 — it is NOT "show everything": a relationship whose startBeatId sits at story index >= 1 is hidden there.
Constellation layout
Section titled “Constellation layout”CONSTELLATION LAYOUT (read this before writing any constellation x/y): a node is a 128x44 box addressed by its TOP-LEFT corner, so reason about centres (x+64, y+22), not corners. Aim for EQUIDISTANCE — every pair about the same distance apart — which means 2 characters sit side by side, 3 form a near-equilateral triangle, and n sit near the vertices of a regular n-gon. Give the whole arrangement a bias toward WIDTH, roughly 1.5:1 wider than tall, because the app canvas is a landscape window; get that width by choosing the ORIENTATION (rotate the arrangement so its long axis is horizontal), not by squashing it, since stretching trades away the equidistance for nothing. Rank by number of relationships: the most connected characters belong nearest the centre of the constellation, the least connected radiate outward — so a well-drawn constellation reads as a dense hub with sparse figures on the rim. Never let two nodes collide: any two node positions must differ by at least 148 horizontally OR at least 64 vertically. All of this applies PER BEAT as well as overall: a beat shows only its chipped cast, so it is that cast — resolved through the position overrides — that should be equidistant and centred, not the full roster.
Constellation label collisions
Section titled “Constellation label collisions”CONSTELLATION LABEL COLLISIONS (the trap that makes a "perfect" layout unreadable): every relationship draws its two labels as pills at the MIDPOINT of the edge between the two characters, so if two edges share a midpoint their labels stack and one pair becomes invisible. The trap is that the most regular arrangements are exactly the ones that fail: in ANY parallelogram — which includes every rectangle and every square — the two diagonals share the same midpoint precisely, and in a regular polygon with an even number of vertices every long diagonal runs through the centre. So four mutually-connected characters on a perfect square ALWAYS hide one label pair. Widening does not help, and neither does any other affine change (stretch, shear, rotate all preserve midpoints): the arrangement itself must stop being regular. Nudge one character further out along its spoke, or off its exact slot angle, until every pair of drawn-edge midpoints differs by at least 155 horizontally or 54 vertically (an edge draws BOTH direction labels as two stacked pills, so one relationship's label block is about 155 wide and 54 tall — budget for the pair, not for a single line of text). Prefer a wide, slightly irregular quadrilateral to a tidy square, and when evenness and legibility conflict, LEGIBILITY WINS — a small loss of symmetry costs nothing, an unreadable label costs the reader a relationship.
Arc charge
Section titled “Arc charge”ARC CHARGE: each arc's points store charge in [-1, 1] per member beat: +1 = the arc's posPole, -1 = its negPole, 0 = neutral. (Legacy files stored fortune in [0, 1] on beats; charge = fortune * 2 - 1.) An arc's beatIds is its explicit membership; the arc with isDefault: true always contains every beat and may omit beatIds. An arc's empty name/posPole/negPole means the localized default ("Fortune" / good fortune / bad fortune).
Arc placement
Section titled “Arc placement”ARC PLACEMENT (read this before writing any arc point x/width): arc points may also carry x (the card's left edge as a fraction 0..1 of the arc timeline) and width (a duration multiplier, 0.5..4). PREFER OMITTING x — members without one are spread evenly through the available space, which is almost always right. If you do author x values they must strictly increase in story order, and cards must NEVER overlap: a card is width*176 world px wide and the timeline is about 200 world px per beat in the story, so with default widths consecutive authored x values need to differ by at least ~0.9/beatCount. The app lets a human writer tuck cards partially over each other by hand (only the central half of a card is collision-solid there); generated or edited FILES must never rely on that — an authored layout with overlapping cards is a defect, not a style.
Story shapes
Section titled “Story shapes”STORY SHAPES: arc.shapeIds lists the Vonnegut story-shape overlays the writer compares that arc against (man-in-hole, boy-meets-girl, cinderella, tragedy, creation, oedipus). arc.shapeOverrides maps a shape id to that arc's edited copy of the shape's geometry: an ordered array of cubic-bezier keypoints { t, fortune, in?, out? } in normalized space — t = story progress 0..1, fortune 0..1 (0 = the arc's negPole side, 1 = posPole), in/out are handle DELTAS { dt, df } from their point (out.dt >= 0, in.dt <= 0; endpoints sit at t 0/1 and carry only their inward handle). An override replaces the app's canonical geometry for that arc only and must keep the canonical point count for its shape (points move, they are never added or removed); overrides are kept even for shapes not currently in shapeIds.
Sparks
Section titled “Sparks”SPARKS are PROTO-CARDS, not just notes. A spark is one loose scrap in the project's inbox, and the writer turns it into a real card by dragging it onto the Throughline (it becomes a beat), the Characters row (a character) or the Settings row (a setting). So author a spark as the card it is meant to become: its FIRST LINE is the name/title the new card takes (a leading "# " is stripped). For a character or setting that first line is ALL that survives the conversion and is truncated at 50 characters, so keep it to a short name; for a beat the remaining lines are kept as the beat's summary. A spark may also simply stay an idea that never becomes a card — but a spark written as a question ("should the ring speak?") converts into a card named with that question, so write one as a card whenever you intend it to become one. Sparks carry only content and created; they have no title, colour or ordering field, and the inbox shows them newest first.
Writer assignment
Section titled “Writer assignment”WRITER ASSIGNMENT (since THRL 1.12): project.people lists the people a beat can belong to, each { id, name, placeholder?, claimedBy? }. beat.assignedTo is the id of one of them; absent means nobody. A placeholder is a person added by name only; claimedBy is the person id of the install that took it as its own: a writer is the person with their name, and names are unique in a project. The top-level savedBy { id, name? } is the install that wrote this file. These are person ids, not card ids. When the writer works with assignments, a beat assigned to someone else is read-only for the other writer except for its order, stacking, arcs and assignment, so never change another person's beat text unless the writer asks. project.replacements (optional) logs each Replace All of the app's find bar, oldest first, at most 100 entries: { find, replace, options: { caseSensitive }, by, at } (by a person id, at an ISO time). It is history, not an instruction: never replay it, and add no entry for an edit you make.
Beat cast
Section titled “Beat cast”BEAT CAST: a beat's chips are its cast — one entry per character present, always { type: "character", id }. A beat has exactly one setting, its sleeveId (a world id); worlds are never chips. (Older files may carry type: "world" chips; ignore them, the app strips them on import.)
Beat text
Section titled “Beat text”BEAT TEXT: beat.contentJson is the script itself (a TipTap document) and the source of truth; beat.content is a LOSSY plain mirror of it (every block joined with a single newline: no blank lines, no element types), so never judge screenplay formatting from content. In screenplay projects the block node types are action, character (a dialogue cue), dialogue, parenthetical and transition; in rich-text projects the same roles appear as paragraph nodes carrying attrs.screenplayType. Cue and transition text is stored ALL CAPS (screenplay convention; the app normalizes it). A parenthetical is stored WITHOUT its surrounding parentheses; the app adds them at render and export. CONSECUTIVE dialogue nodes after one cue are ONE continuous speech with intentional paragraph breaks, never a formatting error and never a missing cue. A versionBlock node holds alternate drafts of a passage: its child nodes are the ACTIVE version and attrs.versions[] stores the alternates (the entry without content marks the active one), so only a versionBlock's children are part of the readable script. A character node may carry attrs.dual: true, meaning its speech is spoken SIMULTANEOUSLY with the speech directly before it (Fountain dual dialogue, the ^ cue suffix); a dual cue with no speech directly before it is just a normal cue.
Legacy fields
Section titled “Legacy fields”Older files can contain these fields. Ignore them. Every .thrl also lists them in guide.legacyFieldsIgnore.
project.valuesarc.valueIdarc.characterIdsbeat.fortunebeat.storylineIdbeat.arcPositionspacers[]beat.chips[].type === "world"beat.chips[].positionworld.worldType