# The bible

A bible uses the grammar of every Récit story: front matter, scenes `--- id=… entry=…`, `:::`
directives. **One scene is one entry.** `entry=` is one of `character`, `set`, `style`, `prompt`,
`beats`, `brief`, `rule`, `series`, `promise` and `clue`.

```md
---
title: Lorem Cast
kind: bible
lang: en
bible:
  promptLang: en # language of the prompts, independent of the story language
  style: ink-flat # default style of the prompts
  beats: hook-tension-payoff # default beat template
---

--- id=lorem entry=character

## Lorem

Lorem is a small cheerful sprout who loves dolor sit amet after dark.

:::identity
Small round sprout, thick irregular black ink outline, two-tone green crown,
light green stem, no face, no text, flat colors, transparent background.
:::

:::traits
- species: sprout
- palette: crown=#2F5D1E, stem=#7FD14A, ink=#111111
- voice: short sentences, warm, playful {inferred}
:::

::pose[Waving with one leaf]{id=waving}
::expression[Delighted]{id=happy}

:::avoid
- text, letters or logos in the image
:::

::reference{src=./cast/lorem-canonical.svg role=canonical}
```

| Element                            | Role                                                                                |
| ---------------------------------- | ----------------------------------------------------------------------------------- |
| `kind: bible`                      | the file is a bible, not a story                                                    |
| `##` heading, then a paragraph     | name and summary of the entry (translated)                                          |
| `:::identity`                      | the frozen identity block, copied word for word into every prompt; never translated |
| `:::traits`                        | `key: value` lines; a colour is a hex (a theme token in a described character)      |
| `{inferred}` at the end of a line  | proposed, not yet validated by a human                                              |
| `::pose`, `::expression`, `::shot` | short ids the stories refer to                                                      |
| `:::avoid`                         | what no image may show                                                              |
| `::reference{src role}`            | a reference image: `canonical`, `turnaround`, `style` or `set`                      |

## A described character (preview)

A character can also be **described** in text, so that `@recit/character` draws it, in vector and in
pixel art, in every pose and every image of an animation (`CharacterImage` from
`@recit/character/components`, `characterToSvg` and `characterToPixelSvg`, schemas in
`@recit/core/schema`). The description is optional: a bible without it stays valid. Its palette is
the `palette` trait, and a value may be a theme token (`skin=bg`), so the character follows the site
and dark mode.

```md
::part{id=body shape=capsule w=7 h=8 at=0,-7 z=1 fill=skin}
::part{id=head shape=pear w=9 h=8 parent=body at=0,-7.5 pivot=0,3.5 z=3 fill=skin}
::part{id=mouth slot=mouth w=2.2 h=1 parent=head at=0,1.8 z=4 fill=ink}
::render{id=flat kind=vector stroke=outline shade=cel}
::render{id=pix kind=pixel size=32 outline=outline}
::variant[At night]{id=night palette=crown=muted}
::forbid{brows=down}
::expression[joyful]{id=joy eyes=happy brows=up mouth=smile}

:::pose{id=waving expression=joy}
waving

- arm-r: rotate -140
- head: rotate 4
:::

:::animation{id=hello fps=12}
- 0ms: idle
- 400ms: waving ease=out
:::
```

| Element                              | Role                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `::part{…}`                          | a part of the tree: `shape` (`ellipse`, `rect`, `capsule`, `pear`, `cloud`, `limb`, `mitten`, `foot`, `path`) or `slot` (`eyes`, `brows`, `mouth`), `w`, `h`, `parent`, `at`, `pivot`, `z`, `fill`, `stroke`, `d`, `lobes`, and the profile overrides `side-shape`, `side-w`, `side-h`, `side-at`, `side-pivot`, `side-z`, `side-d`, `side-hidden` |
| `:::pose{id expression mirror view}` | a pose that moves parts: one line per part, `rotate`, `dx`, `dy`, `scale`, `bend`, `hidden`; `mirror` flips the figure horizontally; `view` (`front` or `side`) switches to the side profile; the paragraph is its label                                                                                                                           |
| `::expression{…}`                    | the shapes of the face: `eyes`, `brows`, `mouth`, from closed lists                                                                                                                                                                                                                                                                                |
| `:::expression{id eyes brows mouth}` | an expression that also transforms parts: one line per part (`rotate`, `dx`, `dy`, `scale`, `bend`, `hidden`), like `:::pose`, merged after the pose; the paragraph is its label                                                                                                                                                                   |
| `::render{…}`                        | how to draw it: `vector` (`stroke`, `width`, `shade=cel`) or `pixel` (`size`, `outline`); the first is the default                                                                                                                                                                                                                                 |
| `::variant[label]{…}`                | `palette=key=value,…`, `hide=a,b`, `scale`: never a new part                                                                                                                                                                                                                                                                                       |
| `::forbid{…}`                        | face shapes no expression may use, an error and not a warning                                                                                                                                                                                                                                                                                      |
| `:::animation{id fps loop parts}`    | a cycle of the model: `- <at>ms: <pose> [expression=…] [ease=…]`; `parts` makes it a layer                                                                                                                                                                                                                                                         |
| ` ```pixel render=pix pose=waving `  | a grid written by hand for a pose of a pixel render: a legend of palette keys, a blank line, the rows                                                                                                                                                                                                                                              |

On a `shape=limb` part, `bend` (`parts.bend` in JSON) bends the part at its middle, in degrees
(clockwise), and anything attached to its lower half follows:

```md
:::pose{id=sit}
sitting

- leg-l: rotate -80 bend 85
- leg-r: rotate -80 bend 85
- body: dy 2
:::
```

A pose can hide a part (and its children) for that pose alone with `hidden` on its move line
(`"hidden": true` in JSON), and the `mirror` flag (`"mirror": true` in JSON, on
`:::pose{id=… mirror}` or `::pose[…]{id=… mirror}`) flips the whole figure horizontally across the
centre of its frame without rewriting its parts or moving its `viewBox`, in both vector and pixel
renders:

```md
:::pose{id=sit-left mirror}
sitting, facing left

- leg-l: rotate -80 bend 85
- leg-r: rotate -80 bend 85
- body: dy 2
- cape: hidden
:::
```

### The side view

A pose switches to profile with `view=side` on `:::pose{id=… view=side}` or
`::pose[…]{id=… view=side}` (`"view": "side"` on `poses.view` in JSON; `front` when omitted). On
`::part{…}`, the attributes `side-shape`, `side-w`, `side-h`, `side-at`, `side-pivot`, `side-z`,
`side-d` and the `side-hidden` flag (`"side": { … }` on `parts.side` in JSON: `side.shape`,
`side.w`, `side.h`, `side.at`, `side.pivot`, `side.z`, `side.d`, `side.hidden`) replace the front
fields of that part in the side view, or hide the part and its children when `side-hidden` is set.
The profile faces right, and adding `mirror` (`:::pose{id=… view=side mirror}`) turns it to face
left; an animation between a `front` pose and a `side` pose flips view halfway through, while the
character's `viewBox` stays fixed across both views so turning never shifts the frame:

```md
::part{id=body shape=capsule w=7 h=8 at=0,-7 z=1 fill=skin side-w=5}
::part{id=head shape=pear w=9 h=8 parent=body at=0,-7.5 pivot=0,3.5 z=3 fill=skin side-w=7.5}
::part{id=eye-l shape=ellipse w=1.2 h=1.4 parent=head at=-1.5,-0.3 z=4 fill=ink side-hidden}
::part{id=eye-r shape=ellipse w=1.2 h=1.4 parent=head at=1.5,-0.3 z=4 fill=ink side-at=2.2,-0.3}
::part{id=leg-r shape=limb w=1.8 h=6 parent=body at=1.6,0 pivot=0,-3 z=2 fill=skin side-at=0,0}

:::pose{id=run-side view=side}
running right

- leg-r: rotate -35 bend 45
:::
```

Validation emits a warning when a pose sets `view=side` on a model where no part has an active
`side` override (`hasPartSide`: `the side view changes nothing`), when a `bend` is outside `±170`
degrees (clamped to `±170` at render), or when a `shape=limb` part has `w > h` (its caps have radius
`w/2`, so keep `h >= w`).

When a character's face is built from parts instead of `slot` features (or alongside them), the
block form `:::expression{id eyes brows mouth}` (`expressions.parts` in JSON) transforms parts by
`id` with the same move lines as `:::pose`, merged channel by channel after the active pose.
Validation emits a warning when an expression defines no `parts` and sets facial slots (`eyes`,
`brows`, `mouth`) that the model does not have:

```md
::part{id=eye-l shape=ellipse w=1.2 h=1.4 parent=head at=-1.5,-0.3 z=4 fill=ink}
::part{id=eye-r shape=ellipse w=1.2 h=1.4 parent=head at=1.5,-0.3 z=4 fill=ink}

:::expression{id=wink mouth=smile}
- eye-l: scale 0.2
- eye-r: dy -0.5
:::
```

Every problem has its line: an unknown parent, two roots, a missing palette key, an unknown part or
pose, a forbidden shape, a grid larger than its render. `recit character sheet cast.md` writes the
`codex-pet-v1` sheet of the character, `--render pix` in pixel art; the example is
`examples/character-lorem`.

From TypeScript, `@recit/character` exports the DOM-free posture and render helpers
(`characterFrameAt`, `expandAnimation`, `codexPetAnimations`, `characterDrawing`, `characterToSvg`,
`characterPixelGrid`, `characterToPixelSvg`, `characterPortraitSvg`, `characterSheetSvg`,
`characterSheetProvenance`), `@recit/character/components` exports `CharacterImage` and
`CharacterPortrait` (styled by `@recit/character/styles.css`), and `@recit/core/schema` holds
`CharacterSchema`, `AnimationSchema`, `hasPartSide` and `characterOfEntry`. Stories whose front
matter names `cast:` draw the character with `::character{…}` in
[decks](/formats/deck/overview#a-described-character-preview),
[films](/formats/motion/overview#a-described-character-preview),
[web stories](/formats/webstory/overview#cards), [webtoons](/formats/webtoon/overview) and
[books](/formats/book/overview#a-described-character-preview). In a
[site](/documentation/integrations/site-stories), `::character` is drawn in a deck, a web story, a
webtoon, a film and a book when `@recit/character` and `@recit/scenario` are installed alongside
`@recit/site-stories`.

### Portrait

A portrait is the character's bust — head, crown or hair, face and shoulders — framed in a square
and quantized into pixel art from the same model, with no external dependency. A model with no
facial `slot` part falls back to its upper body at rest, and theme tokens in the palette stay CSS
variables.

`characterPortraitSvg(character, options)` returns a standalone pixel SVG, named `<name>, portrait`
by default (`characterPortraitLabel`). Its options are `pose` (`"rest"` by default), `expression`,
`variant`, `render` (a `pixel` render id; the model's first `pixel` render by default, else a
`32×32` grid), `size` (grid width and height in cells, an integer from `8` to `128`, `32` by default
or the render's `size`; any other value throws), `scale` (pixels per cell, `8` by default), `locale`
(`"en"` by default), `alt` (`""` makes the SVG decorative) and `fill` (paint function for a legend
colour). `characterPortraitGrid` returns the `{ grid, legend }` data and `characterPortraitFrame`
the square frame in character units (spanning both front and side rest views when any part has an
active `side`).

In React, `CharacterPortrait` from `@recit/character/components` (styled by
`@recit/character/styles.css`) renders the bust as `role="img"` with the accessible name
`<name>, portrait` by default (`alt=""` makes it decorative). Its props are `character`, `pose`,
`expression`, `render`, `variant`, `cells` (grid resolution in cells, from `8` to `128`, the
render's `size` or `32`), `size` (`"fit"` to fill its box, or pixels per cell, `8` by default),
`locale`, `alt` and `className`.

```tsx
import "@recit/character/styles.css";
import { CharacterPortrait } from "@recit/character/components";
import { CharacterSchema } from "@recit/core/schema";
import raw from "./lorem.character.json";

const lorem = CharacterSchema.parse(raw);

<CharacterPortrait character={lorem} pose="waving" cells={32} size={6} />
```

## Sets and styles

```md
--- id=rooftop-night entry=set

## Rooftop at night

A flat rooftop above dolor city, string lights, a small stage in the corner.

:::traits
- time: night
- light: warm string lights, cool blue sky
- palette: sky=#1B2440, lights=#F4C46B
:::

::shot[Wide, city skyline behind]{id=wide}

--- id=ink-flat entry=style

## Ink flat

:::identity
Flat vector illustration, thick hand-drawn black ink outlines, limited palette.
:::
```

## Beat templates

A beat template is data, not code: an ordered list `id — description`. Write your own in the bible.

```md
--- id=hook-tension-payoff entry=beats

1. hook — a question or an image that stops the scroll
2. tension — dolor sit amet goes wrong
3. payoff — the resolution, then a call to action
```

Pick the template by the length of the story: one scene per beat is the skeleton that
`story_from_beats` writes. Copy one of these three into your bible and reword it.

| Template              | Beats | For                                                          |
| --------------------- | ----- | ------------------------------------------------------------ |
| `hook-tension-payoff` | 3     | a micro-film, a web story, a short webtoon episode (3 to 5)  |
| `three-act`           | 3     | a longer story whose acts each hold several scenes           |
| `save-the-cat`        | 15    | a book, a long webtoon, a series arc: one chapter or episode |

```md
--- id=three-act entry=beats

1. setup — who, where, what they want
2. confrontation — what stands in the way
3. resolution — how it ends, and what changed
```

`save-the-cat` follows the fifteen beats of Blake Snyder's _Save the Cat!_. The share of the story
in each description is a reading aid, not a rule: sources disagree on the figures, and the template
stays a checklist, not a mould.

```md
--- id=save-the-cat entry=beats

1. opening-image — about 1%: one image of the world and the hero before anything changes
2. theme — about 5%: someone states, in passing, what the story is about
3. setup — up to 10%: the hero's life, wants and flaws, and what is missing
4. catalyst — about 10%: the event that ends the old life
5. debate — 10 to 20%: the hero hesitates, and the stakes become clear
6. break-into-two — about 20%: the hero chooses to enter the new world
7. b-story — about 22%: a second thread, often a relationship, that carries the theme
8. fun-and-games — 20 to 50%: the promise of the premise, the scenes the story is for
9. midpoint — about 50%: a false victory or a false defeat, and the stakes rise
10. bad-guys-close-in — 50 to 75%: pressure from outside, doubt from inside
11. all-is-lost — about 75%: the lowest point, something or someone is lost
12. dark-night — 75 to 80%: the hero takes stock of the loss
13. break-into-three — about 80%: the answer, found by joining both threads
14. finale — 80 to 99%: the hero acts on what they learned, and the world changes
15. final-image — about 100%: the mirror of the opening image, showing the change
```

## Brief, rules, series and debts

`brief`, `rule`, `series`, `promise` and `clue` entries (along with the character interview traits)
serve the guided writing workshop (`recit://guide/atelier`).

`entry=brief` (one per bible) records a short summary in prose and the fourteen closed brief traits
in `:::traits`:

```md
--- id=brief entry=brief

## Lorem Ipsum

Lorem ipsum dolor sit amet, a shy sprout crossing the roof before dawn.

:::traits
- spark: A shy sprout carrying a lantern across wet tiles before dawn.
- what-if: What if crossing the roof meant giving up the only dry corner?
- logline: Lorem, a shy sprout, must cross the roof before dawn.
- question: What do we owe a stranger?
- premise: Hoarding isolates the keeper.
- counter-premise: Sharing costs more than good intentions.
- stakes-personal: Lorem loses its quiet corner on the roof.
- stakes-relational: Ipsum stops trusting the keepers.
- stakes-world: The rooftop garden dries out {inferred}
- audience: teens and adults (14+)
- character-word: hesitant
- event-word: crossing
- references: none given
- limits: cynical cruelty, real brands
:::
```

The brief can also come from a form in steps: `examples/scenario-atelier/questionnaire.story.md`
asks the first four steps of the workshop in `format: form`, one field per brief trait
(`name=logline`, `name=stakes-world`…) plus `name=title`. `briefFromAnswers(answers)` of
`@recit/scenario` turns its answers into the `entry=brief`, every trait validated by the author; a
blank answer stays out of the entry, and the fields of steps 3 and 4 (art direction, characters) are
not part of the brief.

The workshop keeps its state next to the bible in `atelier.md` (the entry mode, the current step,
the skipped steps, the next action, the table `Locked decisions` and the list `Open questions`).
`parseAtelierState(markdown)` of `@recit/scenario` reads it, with an `atelier-state` diagnostic and
its line for a step out of 1 to 9, a date that is not `YYYY-MM-DD` or a decision locked after the
current step; `lockDecision(state, { step, decision, date })` closes a gate by appending one dated
decision, never rewriting a locked one, and `formatAtelierState(state)` writes the file back.

`entry=rule` states one rule of the world, with `cost` and `taboo` in `:::traits`:

```md
--- id=rain-rule entry=rule

## Rain falls only on the high roofs

Lorem ipsum dolor sit amet: water collects only on the upper tiles.

:::traits
- cost: climbing exposes the sprouts to the wind
- taboo: cracking another keeper's tile
:::
```

`entry=series` (one per bible) sets the serial's engine, goal, contract, rhythm and episode leads:

```md
--- id=rooftop-series entry=series

## Dolor Rooftops

A serial across the high tiles of dolor city.

:::traits
- engine: Each night brings a new visitor across the wet tiles.
- season-goal: Light all four corner lanterns before winter.
- contract: Warmth wins in the end, never without a cost.
- rhythm: weekly, ten episodes
- leads: 1. The Cracked Tile; 2. Wind on the Ridge; 3. Ipsum at the Gate
:::
```

`entry=promise` and `entry=clue` track narrative debts with separator attributes: `status`
(`planned`, `planted`, `paid-off` or `dropped`, required), `planted-in` (episode id) and `paid-in`
(episode id). `planted-in` is required when `status` is `planted` or `paid-off`, and `paid-in` when
it is `paid-off` (the JSON Schema cannot say it; `recit validate` does, with the line):

```md
--- id=lantern-promise entry=promise status=planted planted-in=episode-1 paid-in=episode-4

## The four lanterns will be lit again

Lorem promises Ipsum that the corner lanterns will burn before the first frost.

--- id=cracked-tile-clue entry=clue status=paid-off planted-in=episode-1 paid-in=episode-4

## A hairline crack under the eastern lantern

A chipped clay tile hides the old wick key.
```

## Languages

`cast.fr.md` is a complete bible, with the same entries and the same ids. Names, summaries, beat
descriptions, `voice`, `forbidden`, `values`, the seven dramatic traits of a character (`want`,
`need`, `wound`, `lie`, `arc`, `contradiction`, `fear`) and every trait of `brief`, `rule` and
`series` (`spark`, `what-if`, `logline`, …) translate; `died-in` is an episode id and never
translated, and `:::identity`, `visual-token`, prompts, palettes, poses and ids stay in
`bible.promptLang`, so every language shares the same images.

## Showing the bible on a page

`@recit/scenario/components` draws the bible: `CharacterSheet`, `SetCard`, `PromptCard`, `BeatSheet`
and `ProvenanceBadge`. They take the typed entries of the JSON twin
(`recit convert cast.md --to json`), so a page shows exactly what the prompts are built from. An
inferred trait keeps its badge, and a stale or missing image is said in words. When a character has
a model, `CharacterSheet` (and `BibleGallery`) draws its decorative pixel portrait in the header;
pass `portrait={false}` to hide it.

```tsx
import "@recit/scenario/styles.css";
import { buildPrompt } from "@recit/scenario";
import { BeatSheet, CharacterSheet, PromptCard } from "@recit/scenario/components";
import cast from "./cast.json";

<CharacterSheet character={cast.entries[0]} lang="fr" />
<PromptCard prompt={buildPrompt(cast, "p-rooftop-wave")} status="missing" />
<BeatSheet beats={cast.entries[5]} scenes={[{ id: "night-1", beat: "hook" }]} />
```

`BibleGallery` shows a whole bible straight from its Markdown — characters, sets, prompts and beats,
or only the sections listed in `show` — and lists the errors with their line when the bible does not
validate. Register it in `mdx.components`, then import the file as text:

```mdx
import cast from "./cast.md?raw";

<BibleGallery source={cast} lang="fr" show={["characters", "sets"]} />
```

## A bible as a deck

`recit convert cast.md --to deck -o pitch.md` turns the bible into a deck to present the world: one
slide per character (a pitch) and per set (a moodboard), with the name and the summary on the slide
and the traits and the long text in the speaker notes; one slide per style, its identity; one per
beat template, its numbered beats. Prompts, the brief, rules, series, promises and clues are the
writer's tools, not slides: they are left out, and a warning lists them. A summary too long for a
slide is an error with the line of its entry, nothing is written; shorten it, the long text goes to
the entry's body. The translated bible (`cast.fr.md`) gives the deck in its language.

## A bible as a book's dramatis personae

`recit convert cast.md --to book -o book/cast.md` writes the characters of the bible as one chapter
of a book, its "Dramatis personae": a `# Dramatis personae` heading, then each character in the
bible's order, its name in bold and its summary. The traits and the long text of an entry stay in
the bible: a reader sees who is who, not their secrets. The other entries are left out, and a
warning lists them; a bible without a character is an error, nothing is written. List the file at
the end of the entry's `chapters`, unnumbered:

```yaml title="book.md"
chapters:
  - 01-lorem.md
  - 02-ipsum.md
  - file: cast.md
    numbered: false
```

The heading reads "Dramatis personae" in every language; rename it in the chapter, which is yours
once written. The translated bible (`cast.fr.md`) gives the chapter in its language, and
`-o cast.json` writes the chapter's typed JSON twin.

## A screenplay in Fountain

[Fountain](https://fountain.io/syntax) is the plain-text screenplay syntax. Récit reads and writes
the useful part of it, without dependency, to bring a script in and send it back out; it never
becomes a source syntax. `recit convert script.fountain -o episode.md` turns a screenplay into a
webtoon episode, the script to draw:

| Fountain                               | Webtoon episode                                                       |
| -------------------------------------- | --------------------------------------------------------------------- |
| title page (`Title`, `Author`, `Date`) | `title`, `author`, `date`; the other keys are left out with a warning |
| scene heading (`INT. ROOFTOP - NIGHT`) | a new panel, `set=rooftop-night`, the heading kept in its notes       |
| action, centered text                  | a caption; an action after a dialogue opens the next panel            |
| character and dialogue                 | a stacked bubble, `cast=` the character's name as an id               |
| parenthetical `(whispering)`           | `*(whispering)*` at its place in the bubble                           |
| extension `(V.O.)`, `(O.S.)`           | a bubble without tail (`tail=none`)                                   |
| transition (`CUT TO:`), note `[[…]]`   | the panel's notes                                                     |
| section, synopsis, boneyard `/* … */`  | left out, with a warning and its line                                 |

The panels have no image yet: add `src=` and `alt=` once they are drawn, and declare the bible
(`cast:`) so that `recit validate` checks the `set=` and `cast=` ids. `-o episode.json` (or
`--to json`) writes the typed twin, `--locale fr` sets the episode's language.

`recit convert episode.md --to fountain -o script.fountain` writes an episode back as a screenplay:
a change of `set=` opens a scene, a caption or a sound effect is an action, a bubble with `cast=` a
dialogue, a transition or a note of the panel a transition or a `[[note]]`. A character's name is
written back from its id, in capitals and without accents (`cast=elea` gives `ELEA`). The images,
the character layers and a bubble without `cast=` have no place in a screenplay: a warning lists
them.

## The JSON twin

`recit convert cast.md --to json` writes the bible's typed JSON twin (`kind: "bible"`,
`version: 1`), and `--to md` converts it back to Markdown. Fields marked "JSON only"
(`entries.aliases`, `entries.tags`, `entries.see`, `entries.source`, `entries.output` and
`entries.traits.*.source`) are not written to Markdown by `bibleToMarkdown`, so converting from JSON
to Markdown drops them. The twin is validated by
[`bible.json`](https://recit.dev/schema/v1/bible.json) (`BibleSourceSchema` of `@recit/core/schema`,
`recit schema bible`, preview).

### Top level

| Path                  | Description                                                                                   |
| --------------------- | --------------------------------------------------------------------------------------------- |
| `$schema`             | Optional JSON Schema URI (`"https://recit.dev/schema/v1/bible.json"`).                        |
| `kind`                | `"bible"` (required).                                                                         |
| `version`             | `1` (required).                                                                               |
| `meta`                | Document metadata object (required).                                                          |
| `meta.title`          | Bible title, as a `string` or per-locale `Record<string, string>` (`title:` in front matter). |
| `meta.lang`           | Optional language tag of at least 2 characters (`lang:` in front matter).                     |
| `settings`            | Optional bible settings (`bible:` in front matter), unchanged across translated bibles.       |
| `settings.promptLang` | Optional prompt language tag of at least 2 characters, independent of `meta.lang`.            |
| `settings.style`      | Optional default `style` entry id (`^[a-z0-9][\w-]*$`) for prompts that omit `entries.style`. |
| `settings.beats`      | Optional default `beats` entry id (`^[a-z0-9][\w-]*$`).                                       |
| `entries`             | Array of bible entries in document order (required; one per `--- id=… entry=…` in Markdown).  |

### Entries

`entries` is a discriminated union on `entries.entry` (`"character"`, `"set"`, `"style"`,
`"prompt"`, `"beats"`, `"brief"`, `"rule"`, `"series"`, `"promise"` and `"clue"`), extending the
shared entry fields (`id`, `name`, `aliases`, `summary`, `body`, `tags`, `see`, `source`).

| Path                        | Entry kind                  | Description                                                                                                                                                                                                                            |
| --------------------------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `entries.id`                | all                         | Stable entry id (`^[a-z0-9][\w-]*$`, required; `--- id=…` in Markdown).                                                                                                                                                                |
| `entries.entry`             | all                         | `"character"`, `"set"`, `"style"`, `"prompt"`, `"beats"`, `"brief"`, `"rule"`, `"series"`, `"promise"` or `"clue"` (`--- entry=…`).                                                                                                    |
| `entries.name`              | all                         | Localized `string` or `Record<string, string>` (`##` heading; required on every entry type but `"prompt"` and `"beats"`).                                                                                                              |
| `entries.aliases`           | all                         | Optional `string[]` or per-locale `Record<string, string[]>` of alternate names (JSON only).                                                                                                                                           |
| `entries.summary`           | all                         | Optional localized `string` or `Record<string, string>` (first prose paragraph outside `"prompt"` and `"beats"`).                                                                                                                      |
| `entries.body`              | all                         | Optional localized `string` or `Record<string, string>` (later prose paragraphs outside `"prompt"` and `"beats"`).                                                                                                                     |
| `entries.tags`              | all                         | Optional array of non-empty tag strings (JSON only).                                                                                                                                                                                   |
| `entries.see`               | all                         | Optional array of non-empty related entry ids (JSON only).                                                                                                                                                                             |
| `entries.source`            | all                         | Optional external source object (JSON only).                                                                                                                                                                                           |
| `entries.source.url`        | all                         | `http:` or `https:` URI of `entries.source` (required when `entries.source` is set).                                                                                                                                                   |
| `entries.source.license`    | all                         | Optional non-empty licence string for `entries.source`.                                                                                                                                                                                |
| `entries.identity`          | `character`, `set`, `style` | Frozen visual description (`:::identity`), never translated; required on `"style"`, optional on `"character"` and `"set"`.                                                                                                             |
| `entries.references`        | `character`, `set`, `style` | Optional array of reference images (`::reference{src=… role=…}`).                                                                                                                                                                      |
| `entries.references.src`    | `character`, `set`, `style` | Non-empty image path relative to the bible (required on each item).                                                                                                                                                                    |
| `entries.references.role`   | `character`, `set`, `style` | `"canonical"`, `"turnaround"`, `"style"` or `"set"` (required on each item).                                                                                                                                                           |
| `entries.avoid`             | `character`                 | Optional array of non-empty negative-prompt strings (`:::avoid`).                                                                                                                                                                      |
| `entries.forbid`            | `character`                 | Optional forbidden facial slot shapes (`::forbid{…}`, preview).                                                                                                                                                                        |
| `entries.forbid.eyes`       | `character`                 | Optional array of forbidden eye shapes from the closed `eyes` list.                                                                                                                                                                    |
| `entries.forbid.brows`      | `character`                 | Optional array of forbidden brow shapes from the closed `brows` list.                                                                                                                                                                  |
| `entries.forbid.mouth`      | `character`                 | Optional array of forbidden mouth shapes from the closed `mouth` list.                                                                                                                                                                 |
| `entries.sheet`             | `character`                 | Optional sprite sheet descriptor (`::sheet{src=… layout=…}`).                                                                                                                                                                          |
| `entries.sheet.src`         | `character`                 | Non-empty sprite-sheet path relative to the bible (required when `entries.sheet` is set).                                                                                                                                              |
| `entries.sheet.layout`      | `character`                 | `"codex-pet-v1"` (required when `entries.sheet` is set).                                                                                                                                                                               |
| `entries.subject`           | `prompt`                    | Id of a `"character"` entry (`subject=…`, required; see [Prompts and provenance](/documentation/scenario/provenance)).                                                                                                                 |
| `entries.set`               | `prompt`                    | Optional id of a `"set"` entry (`set=…`).                                                                                                                                                                                              |
| `entries.style`             | `prompt`                    | Optional id of a `"style"` entry (`style=…`; defaults to `settings.style`).                                                                                                                                                            |
| `entries.shot`              | `prompt`                    | Id of a shot (`shot=…`, required; checked against `entries.shots` of `entries.set` when `entries.set` is set).                                                                                                                         |
| `entries.pose`              | `prompt`                    | Optional id of a pose in `entries.poses` or a row of `entries.sheet` on `entries.subject` (`pose=…`).                                                                                                                                  |
| `entries.expression`        | `prompt`                    | Optional id of an expression in `entries.expressions` on `entries.subject` (`expression=…`).                                                                                                                                           |
| `entries.animation`         | `prompt`                    | Optional id of a cycle in `entries.model.cycles` on `entries.subject` (`animation=…`, preview).                                                                                                                                        |
| `entries.aspect`            | `prompt`                    | Aspect ratio matching `^\d+:\d+$` such as `"9:16"` (`aspect=…`, required).                                                                                                                                                             |
| `entries.action`            | `prompt`                    | Non-empty action description in `settings.promptLang` (prose body of a `"prompt"` entry, required).                                                                                                                                    |
| `entries.seed`              | `prompt`                    | Optional integer seed (`seed=…`).                                                                                                                                                                                                      |
| `entries.output`            | `prompt`                    | Optional output descriptor object (JSON only).                                                                                                                                                                                         |
| `entries.output.path`       | `prompt`                    | Non-empty output path string (required when `entries.output` is set).                                                                                                                                                                  |
| `entries.output.background` | `prompt`                    | `"transparent"`, `"chroma"` or `"scene"` (required when `entries.output` is set).                                                                                                                                                      |
| `entries.beats`             | `beats`                     | Non-empty ordered array of beat items (`1. id — description` in Markdown, required).                                                                                                                                                   |
| `entries.beats.id`          | `beats`                     | Beat id (`^[a-z0-9][\w-]*$`, required on each item), unchanged across languages.                                                                                                                                                       |
| `entries.beats.description` | `beats`                     | Localized `string` or `Record<string, string>` beat description (required on each item).                                                                                                                                               |
| `entries.status`            | `promise`, `clue`           | `"planned"`, `"planted"`, `"paid-off"` or `"dropped"` debt status (required; `status=…` in Markdown).                                                                                                                                  |
| `entries.plantedIn`         | `promise`, `clue`           | Optional episode id (`^[a-z0-9][\w-]*$`) where the debt is planted (`planted-in=…` in Markdown; required when `status` is `"planted"` or `"paid-off"`, checked by `recit validate` with the line since the JSON Schema cannot say it). |
| `entries.paidIn`            | `promise`, `clue`           | Optional episode id (`^[a-z0-9][\w-]*$`) where the debt is paid off (`paid-in=…` in Markdown; required when `status` is `"paid-off"`, checked by `recit validate` with the line since the JSON Schema cannot say it).                  |

### Traits

On `"character"`, `"set"`, `"brief"`, `"rule"` and `"series"` entries, `entries.traits`
(`:::traits`) maps each allowed trait name to a `{ value, inferred?, source? }` record: `value`
(required) is a localized `string` or `Record<string, string>` — except `palette`, whose `value`
maps lowercase palette keys (`^[a-z][\w-]*$`) to hex colours, theme tokens or `"transparent"`,
`visual-token`, whose `value` is a plain `string` (never translated), and `died-in`, whose `value`
is an episode id (`^[a-z0-9][\w-]*$`, checked as an id) — `inferred` is optional literal `true`
(`{inferred}`, a warning in `recit validate` and an error with `--strict`), and `source` is an
optional non-empty string recording where the trait was read (JSON only). On `"character"`, `voice`,
`forbidden`, `values` and `want` through `fear` (`want`, `need`, `wound`, `lie`, `arc`,
`contradiction`, `fear`) translate across languages, while `visual-token` is a plain `string` in
`settings.promptLang` (it feeds prompts and is never translated) and `died-in` is an episode id
(`episode-3`), checked as an id and never translated; every trait of `"brief"`, `"rule"` and
`"series"` translates across languages, and the remaining traits stay in `settings.promptLang`.

| Path                                | Entry kind                                    | Description                                                                                                                                          |
| ----------------------------------- | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `entries.traits`                    | `character`, `set`, `brief`, `rule`, `series` | Optional object of structured traits (`:::traits`).                                                                                                  |
| `entries.traits.species`            | `character`                                   | Optional species trait record.                                                                                                                       |
| `entries.traits.species.value`      | `character`                                   | `string` or `Record<string, string>` (required when `species` is set).                                                                               |
| `entries.traits.species.inferred`   | `character`                                   | Optional `true` when `species` is unvalidated.                                                                                                       |
| `entries.traits.species.source`     | `character`                                   | Optional non-empty source string for `species` (JSON only).                                                                                          |
| `entries.traits.palette`            | `character`, `set`                            | Optional colour palette trait record.                                                                                                                |
| `entries.traits.palette.value`      | `character`, `set`                            | `Record<string, string>` of palette keys to hex colours, tokens or `"transparent"`.                                                                  |
| `entries.traits.palette.inferred`   | `character`, `set`                            | Optional `true` when `palette` is unvalidated.                                                                                                       |
| `entries.traits.palette.source`     | `character`, `set`                            | Optional non-empty source string for `palette` (JSON only).                                                                                          |
| `entries.traits.voice`              | `character`                                   | Optional localizable voice and tone trait record.                                                                                                    |
| `entries.traits.voice.value`        | `character`                                   | `string` or `Record<string, string>` (required when `voice` is set).                                                                                 |
| `entries.traits.voice.inferred`     | `character`                                   | Optional `true` when `voice` is unvalidated.                                                                                                         |
| `entries.traits.voice.source`       | `character`                                   | Optional non-empty source string for `voice` (JSON only).                                                                                            |
| `entries.traits.forbidden`          | `character`                                   | Optional localizable forbidden-traits record.                                                                                                        |
| `entries.traits.forbidden.value`    | `character`                                   | `string` or `Record<string, string>` (required when `forbidden` is set).                                                                             |
| `entries.traits.forbidden.inferred` | `character`                                   | Optional `true` when `forbidden` is unvalidated.                                                                                                     |
| `entries.traits.forbidden.source`   | `character`                                   | Optional non-empty source string for `forbidden` (JSON only).                                                                                        |
| `entries.traits.values`             | `character`                                   | Optional localizable character-values trait record.                                                                                                  |
| `entries.traits.values.value`       | `character`                                   | `string` or `Record<string, string>` (required when `values` is set).                                                                                |
| `entries.traits.values.inferred`    | `character`                                   | Optional `true` when `values` is unvalidated.                                                                                                        |
| `entries.traits.values.source`      | `character`                                   | Optional non-empty source string for `values` (JSON only).                                                                                           |
| `entries.traits.want`               | `character`                                   | Optional localizable conscious-goal trait record.                                                                                                    |
| `entries.traits.need`               | `character`                                   | Optional localizable inner-need trait record.                                                                                                        |
| `entries.traits.wound`              | `character`                                   | Optional localizable formative-wound trait record.                                                                                                   |
| `entries.traits.lie`                | `character`                                   | Optional localizable false-belief trait record.                                                                                                      |
| `entries.traits.arc`                | `character`                                   | Optional localizable character-arc trait record.                                                                                                     |
| `entries.traits.contradiction`      | `character`                                   | Optional localizable character-contradiction trait record.                                                                                           |
| `entries.traits.fear`               | `character`                                   | Optional localizable fear trait record.                                                                                                              |
| `entries.traits.visual-token`       | `character`                                   | Optional visual-token trait record whose `value` is a plain `string` in `settings.promptLang` (feeds prompts, never translated).                     |
| `entries.traits.died-in`            | `character`                                   | Optional trait record whose `value` is the episode id where the character dies (`episode-3`, checked as an id `^[a-z0-9][\w-]*$`, never translated). |
| `entries.traits.time`               | `set`                                         | Optional time-of-day trait record (feeds `{set}` in prompts).                                                                                        |
| `entries.traits.time.value`         | `set`                                         | `string` or `Record<string, string>` (required when `time` is set).                                                                                  |
| `entries.traits.time.inferred`      | `set`                                         | Optional `true` when `time` is unvalidated.                                                                                                          |
| `entries.traits.time.source`        | `set`                                         | Optional non-empty source string for `time` (JSON only).                                                                                             |
| `entries.traits.light`              | `set`                                         | Optional lighting trait record (feeds `{set}` in prompts).                                                                                           |
| `entries.traits.light.value`        | `set`                                         | `string` or `Record<string, string>` (required when `light` is set).                                                                                 |
| `entries.traits.light.inferred`     | `set`                                         | Optional `true` when `light` is unvalidated.                                                                                                         |
| `entries.traits.light.source`       | `set`                                         | Optional non-empty source string for `light` (JSON only).                                                                                            |
| `entries.traits.ambience`           | `set`                                         | Optional ambience trait record (feeds `{set}` in prompts).                                                                                           |
| `entries.traits.ambience.value`     | `set`                                         | `string` or `Record<string, string>` (required when `ambience` is set).                                                                              |
| `entries.traits.ambience.inferred`  | `set`                                         | Optional `true` when `ambience` is unvalidated.                                                                                                      |
| `entries.traits.ambience.source`    | `set`                                         | Optional non-empty source string for `ambience` (JSON only).                                                                                         |
| `entries.traits.props`              | `set`                                         | Optional props trait record (feeds `{set}` in prompts).                                                                                              |
| `entries.traits.props.value`        | `set`                                         | `string` or `Record<string, string>` (required when `props` is set).                                                                                 |
| `entries.traits.props.inferred`     | `set`                                         | Optional `true` when `props` is unvalidated.                                                                                                         |
| `entries.traits.props.source`       | `set`                                         | Optional non-empty source string for `props` (JSON only).                                                                                            |
| `entries.traits.spark`              | `brief`                                       | Optional localizable origin-spark trait record.                                                                                                      |
| `entries.traits.what-if`            | `brief`                                       | Optional localizable what-if trait record.                                                                                                           |
| `entries.traits.logline`            | `brief`                                       | Optional localizable logline trait record.                                                                                                           |
| `entries.traits.question`           | `brief`                                       | Optional localizable thematic-question trait record.                                                                                                 |
| `entries.traits.premise`            | `brief`                                       | Optional localizable premise trait record.                                                                                                           |
| `entries.traits.counter-premise`    | `brief`                                       | Optional localizable counter-premise trait record.                                                                                                   |
| `entries.traits.stakes-personal`    | `brief`                                       | Optional localizable personal-stakes trait record.                                                                                                   |
| `entries.traits.stakes-relational`  | `brief`                                       | Optional localizable relational-stakes trait record.                                                                                                 |
| `entries.traits.stakes-world`       | `brief`                                       | Optional localizable world-stakes trait record.                                                                                                      |
| `entries.traits.audience`           | `brief`                                       | Optional localizable target-audience trait record.                                                                                                   |
| `entries.traits.character-word`     | `brief`                                       | Optional localizable character-tone word record.                                                                                                     |
| `entries.traits.event-word`         | `brief`                                       | Optional localizable event-tone word record.                                                                                                         |
| `entries.traits.references`         | `brief`                                       | Optional localizable reference-works trait record.                                                                                                   |
| `entries.traits.limits`             | `brief`                                       | Optional localizable content-limits trait record.                                                                                                    |
| `entries.traits.cost`               | `rule`                                        | Optional localizable rule-cost trait record.                                                                                                         |
| `entries.traits.taboo`              | `rule`                                        | Optional localizable world-taboo trait record.                                                                                                       |
| `entries.traits.engine`             | `series`                                      | Optional localizable series-engine trait record.                                                                                                     |
| `entries.traits.season-goal`        | `series`                                      | Optional localizable season-goal trait record.                                                                                                       |
| `entries.traits.contract`           | `series`                                      | Optional localizable audience-contract trait record.                                                                                                 |
| `entries.traits.rhythm`             | `series`                                      | Optional localizable release-rhythm trait record.                                                                                                    |
| `entries.traits.leads`              | `series`                                      | Optional localizable episode-leads text record.                                                                                                      |

### Poses, expressions and shots

| Path                        | Entry kind  | Description                                                                                                             |
| --------------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------- |
| `entries.poses`             | `character` | Optional array of character poses (`::pose` or `:::pose`; `"rest"` is reserved as the implicit reference pose).         |
| `entries.poses.id`          | `character` | Pose id (`^[a-z0-9][\w-]*$`, required on each item).                                                                    |
| `entries.poses.label`       | `character` | Optional non-empty pose description in `settings.promptLang` (`[label]` or `:::pose` paragraph; feeds `{pose}`).        |
| `entries.poses.expression`  | `character` | Optional id from `entries.expressions` shown in this pose.                                                              |
| `entries.poses.view`        | `character` | Optional `"front"` or `"side"` view of the figure (default `"front"`; `"side"` faces right, `view=…`).                  |
| `entries.poses.mirror`      | `character` | Optional `boolean` flipping the figure horizontally across its frame (`mirror`).                                        |
| `entries.poses.parts`       | `character` | Optional map of part ids to `{ rotate?, dx?, dy?, scale?, bend?, hidden? }` transforms (`:::pose` move lines).          |
| `entries.expressions`       | `character` | Optional array of facial expressions (`::expression` or `:::expression`).                                               |
| `entries.expressions.id`    | `character` | Expression id (`^[a-z0-9][\w-]*$`, required on each item).                                                              |
| `entries.expressions.label` | `character` | Optional non-empty description in `settings.promptLang` (`[label]` or `:::expression` paragraph; feeds `{expression}`). |
| `entries.expressions.eyes`  | `character` | Optional `"open"`, `"wide"`, `"closed"`, `"happy"`, `"look-l"` or `"look-r"`.                                           |
| `entries.expressions.brows` | `character` | Optional `"flat"`, `"up"`, `"down"` or `"none"`.                                                                        |
| `entries.expressions.mouth` | `character` | Optional `"smile"`, `"smile-wide"`, `"o"`, `"flat"`, `"oops"` or `"none"`.                                              |
| `entries.expressions.parts` | `character` | Optional map of part ids to `{ rotate?, dx?, dy?, scale?, bend?, hidden? }` transforms, merged after the pose.          |
| `entries.shots`             | `set`       | Optional array of camera shots (`::shot[label]{id=…}`).                                                                 |
| `entries.shots.id`          | `set`       | Shot id (`^[a-z0-9][\w-]*$`, required on each item).                                                                    |
| `entries.shots.label`       | `set`       | Optional non-empty shot description in `settings.promptLang` (`[label]`; feeds `{shot}`).                               |

### Character model

Every `entries.model` path belongs to `entry: "character"` (preview; see
[A described character](#a-described-character-preview) and
[Images of an animation](/documentation/scenario/animation-frames)).

| Path                                   | Description                                                                                                                                     |
| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `entries.model`                        | Optional described-character model object (`{ parts, renders?, variants?, cycles? }`, preview).                                                 |
| `entries.model.parts`                  | Non-empty array of part objects (`::part{…}`, required when `entries.model` is set; see [above](#a-described-character-preview)).               |
| `entries.model.parts.side`             | Optional side-view overrides object applied when `poses.view` is `"side"` (`side-…` attributes on `::part{…}`).                                 |
| `entries.model.parts.side.shape`       | Optional `"ellipse"`, `"rect"`, `"capsule"`, `"pear"`, `"cloud"`, `"limb"`, `"mitten"`, `"foot"` or `"path"` on a shaped part (`side-shape=…`). |
| `entries.model.parts.side.w`           | Optional positive width in character units overriding `w` (`side-w=…`; effective `w` and `h` required for non-`"path"` shapes).                 |
| `entries.model.parts.side.h`           | Optional positive height in character units overriding `h` (`side-h=…`; effective `w` and `h` required for non-`"path"` shapes).                |
| `entries.model.parts.side.at`          | Optional `[x, y]` number tuple in character units overriding `at` (`side-at=x,y`).                                                              |
| `entries.model.parts.side.pivot`       | Optional `[x, y]` number tuple in character units overriding `pivot` (`side-pivot=x,y`).                                                        |
| `entries.model.parts.side.z`           | Optional integer drawing order overriding `z` (`side-z=…`).                                                                                     |
| `entries.model.parts.side.d`           | Optional absolute SVG path (`M L H V C S Q T Z`, no arc) when the effective shape is `"path"` (`side-d=…`).                                     |
| `entries.model.parts.side.hidden`      | Optional `boolean` hiding the part and its children in the side view when `true` (`side-hidden`).                                               |
| `entries.model.renders`                | Optional array of render definitions (`::render{…}`; the first item is the default render).                                                     |
| `entries.model.renders.id`             | Render id (`^[a-z0-9][\w-]*$`, required on each item).                                                                                          |
| `entries.model.renders.kind`           | `"vector"`, `"pixel"`, `"sheet"` or `"frames"` (required on each item).                                                                         |
| `entries.model.renders.stroke`         | Optional palette key (`^[a-z][\w-]*$`) of the default outline on a `"vector"` render.                                                           |
| `entries.model.renders.width`          | Optional outline width in character units (`> 0`, `<= 4`, default `0.3`) on a `"vector"` render.                                                |
| `entries.model.renders.shade`          | Optional `"none"` or `"cel"` shading (default `"none"`) on a `"vector"` render.                                                                 |
| `entries.model.renders.size`           | Optional integer grid side in cells (`8` to `128`, default `32`) on a `"pixel"` render.                                                         |
| `entries.model.renders.outline`        | Optional palette key (`^[a-z][\w-]*$`) of the outline cells on a `"pixel"` render.                                                              |
| `entries.model.renders.grids`          | Optional hand-written pixel grids (` ```pixel render=… pose=… `) overriding the quantized model per pose.                                       |
| `entries.model.renders.grids.pose`     | Pose id or `"rest"` replaced by the grid (required on each grid).                                                                               |
| `entries.model.renders.grids.legend`   | `Record<string, string>` mapping single-character symbols to palette keys or `"transparent"` (required).                                        |
| `entries.model.renders.grids.rows`     | Non-empty `string[]` of equal-width cell rows within `size × size` (required).                                                                  |
| `entries.model.variants`               | Optional array of visual variants (`::variant[label]{…}`).                                                                                      |
| `entries.model.variants.id`            | Variant id (`^[a-z0-9][\w-]*$`, required on each item).                                                                                         |
| `entries.model.variants.label`         | Optional `string` or `Record<string, string>` label (`[label]`).                                                                                |
| `entries.model.variants.palette`       | Optional `Record<string, string>` overriding keys of `entries.traits.palette` with hex colours, tokens or `"transparent"`.                      |
| `entries.model.variants.hide`          | Optional `string[]` of part ids from `entries.model.parts` to hide.                                                                             |
| `entries.model.variants.scale`         | Optional positive `number` scaling the figure.                                                                                                  |
| `entries.model.cycles`                 | Optional array of reusable animation cycles (`:::animation{…}`).                                                                                |
| `entries.model.cycles.id`              | Animation cycle id (`^[a-z0-9][\w-]*$`, required on each item).                                                                                 |
| `entries.model.cycles.label`           | Optional `string` or `Record<string, string>` (`[label]` or `:::animation` inner paragraph, written back as that paragraph).                    |
| `entries.model.cycles.fps`             | Optional integer frames per second (`1` to `60`; a film's fps wins in `motion`).                                                                |
| `entries.model.cycles.loop`            | Optional `boolean`; when `true`, the last key leads back to the first.                                                                          |
| `entries.model.cycles.parts`           | Optional non-empty `string[]` of part ids driven as a layer while other parts stay unaffected.                                                  |
| `entries.model.cycles.keys`            | Array of keyframes starting at `0` ms with strictly increasing instants (required on each cycle).                                               |
| `entries.model.cycles.keys.at`         | Non-negative integer instant in milliseconds (`0` on the first key, required).                                                                  |
| `entries.model.cycles.keys.pose`       | Pose id of the character or `"rest"` (required on each key).                                                                                    |
| `entries.model.cycles.keys.expression` | Optional expression id of this key, shown until the next key (defaults to the pose's expression).                                               |
| `entries.model.cycles.keys.ease`       | Optional `"linear"`, `"in"`, `"out"`, `"in-out"` or `"step"` curve from the previous key (default `"linear"`).                                  |

## Validating a bible

```bash
npx recit validate cast.md            # the bible against its schema and its rules
npx recit validate cast.md --strict   # publication: nothing inferred, nothing missing
```

`recit validate` checks the entries, the references between them (a prompt's `set`, `subject` and
`pose`), the beat templates and the languages, and reports each problem as
`✖ cast.md:12 — … (code)`. `--strict` turns what a draft may keep into errors: a trait still marked
`{inferred}`, a placeholder image and an image with no
[provenance](/documentation/scenario/provenance).

### Gates and continuity

```bash
npx recit validate cast.md --stage 4         # bible gate 4 (characters)
npx recit validate episode-3.md --stage 7    # story with cast:, bible gates 1–6 + continuity
npx recit validate episode-3.md --stage 7 --max-panel-bubbles 3 --max-bubble-words 30
```

`recit validate --stage <n>` (`n` an integer from `1` to `9`; `checkStage` in `@recit/scenario`)
checks the workshop gates on a bible and on any story whose front matter sets `cast:` (on a story
without `cast:`, it prints a warning that stage gates require a bible). Each missing entry, missing
required trait, empty trait, or trait still marked `{inferred}` is reported as an `error`
(`atelier-stage`) at the trait's or entry's line, or at the bible's front matter when an entry is
missing. Gate `n` requires every gate up to `n` (stages `7` to `9` add no further bible
requirement):

1. **Gate 1 (spark and theme)** — an `entry=brief` with non-empty `logline`, `question`, `premise`,
   `counter-premise`, `stakes-personal`, `stakes-relational` and `stakes-world`, and no empty or
   `{inferred}` trait on those keys or on `spark` and `what-if`.
2. **Gate 2 (tone and limits)** — the `brief` also sets non-empty `audience`, `character-word`,
   `event-word` and `limits`, with no empty or `{inferred}` trait left on `entry=brief`.
3. **Gate 3 (art direction)** — `bible.style` (`settings.style`) names an existing `entry=style`.
4. **Gate 4 (characters)** — at least one `entry=character`, with no empty or `{inferred}` character
   trait (a character's `visual-token` trait is a plain string, never translated, and enters the
   prompt text built by `buildPrompt` / `promptValues` alongside `:::identity`, keeping that visual
   anchor consistent across prompts).
5. **Gate 5 (world and sets)** — at least one `entry=rule` and one `entry=set`, with no empty or
   `{inferred}` trait.
6. **Gate 6 (series)** — an `entry=series` with non-empty `engine` and `season-goal`, and no empty
   or `{inferred}` trait on `entry=series`.

When an `atelier.md` sits next to the bible, `recit validate cast.md` (and the MCP tool
`check_continuity`) also reads it with `parseAtelierState`: a step out of `1` to `9`, a date that is
not `YYYY-MM-DD`, or a decision locked for a step after `Current step` is an `error`
(`atelier-state`) at its line of `atelier.md` (`checkAtelierBeside` in `@recit/scenario/node`).

`recit validate` also runs the continuity rules on every bible and on every story with `cast:`
(reporting scene diagnostics at the scene's separator line `--- id=…` in Markdown; in the bible, a
character's `visual-token` is a plain string, never translated, and `died-in` is an episode id).
Episode ids come from the file name without its `.story` suffix, extension or locale
(`episode-3.fr.md` and `episode-3.story.fr.md` → `episode-3`; `s1.ep-10.md` → `s1.ep-10`). A
character with `died-in` may appear in that episode itself (`died-in: prologue` in `prologue.md`),
and a `died-in` naming no episode file (`.md`, `.mdx` or `.json`) of the story's folder warns
(`continuity-unknown-episode`, at the bible entry's line). Two episode ids are compared by their
trailing integer (`episode-3` < `episode-10`) only when their prefix before that final number is
identical, so multi-season ids with different prefixes (`s1-ep3` and `s2-ep1`) are not compared
across seasons. On any `format: webtoon` story — with or without a bible (`cast:`) —
`recit validate` also checks panel bubble density (`checkWebtoonContinuity`): the webtoon density
warnings and their two flags `--max-panel-bubbles <n>` and `--max-bubble-words <n>` (positive
integers; `maxPanelBubbles` and `maxBubbleWords` in `@recit/scenario`, defaulting to
`MAX_PANEL_BUBBLES` = `2` and `MAX_BUBBLE_WORDS` = `25`) apply whether or not the story sets
`cast:`:

| Code                             | Severity  | Where                       | Rule                                                                                                                                                                                                 |
| -------------------------------- | --------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `continuity-paid-before-planted` | `error`   | bible (`promise`, `clue`)   | `paid-in` (`paidIn`) comes before `planted-in` (`plantedIn`) within the same episode prefix, at the entry's line.                                                                                    |
| `continuity-dead-character`      | `error`   | story with `cast:`          | A scene references a character whose `died-in` episode comes before this episode — via `cast=`, `:::bubble{cast=…}`, `::character{character=…}`, `:::animation{cast=…}` or the subject of `prompt=`. |
| `continuity-unknown-episode`     | `warning` | story with `cast:`          | A character's `died-in` names no episode file of the story's folder (at the bible entry's line), or has no trailing number to compare against another episode when folder episodes are unknown.      |
| `continuity-open-debt`           | `warning` | story with `cast:`          | A `promise` or `clue` with `status=planted` was planted `5` or more episodes (`DEBT_WINDOW`) before this episode, at the bible entry's line.                                                         |
| `webtoon-dense-panel`            | `warning` | any `format: webtoon` story | A panel has more than `MAX_PANEL_BUBBLES` (`2` by default, or `--max-panel-bubbles <n>`) `:::bubble` blocks, with or without a bible (`cast:`), at the panel's separator line.                       |
| `webtoon-long-bubble`            | `warning` | any `format: webtoon` story | A `:::bubble` exceeds `MAX_BUBBLE_WORDS` (`25` words by default, or `--max-bubble-words <n>`), with or without a bible (`cast:`), at the panel's separator line.                                     |
