# Stability

Récit 1.0 does not add a feature: it turns what exists into a **contract**. A project written for
Récit 1.x keeps compiling, validating and building with every 1.y, and a break is called 2.0. This
page lists that contract, what stays outside it, and the rules that keep it.

The contract holds from `1.0.0-rc.0` on: a release candidate may still fix the contract itself, and
`1.0.0` freezes it.

## The scope of 1.0

Récit 1.0 covers the **deck** and **motion** formats and what they stand on, and the formats that
reached their template before it: **calendar**, **roadmap**, **book**, **report**, **glossary**,
**directory**, **webtoon**, **webstory** and the `:::form` and `:::scroll` blocks, with
`@recit/time`, the time model calendar, roadmap and webstory share, `@recit/terminal`, the
content-driven terminal in the browser and in a shell, and `@recit/scroll`, the scroll progression
engine and film stage. The other formats (`docs`, atlas, geo, scenario…) keep moving in previews and
join the contract later, each in a minor release: a new format or a new `kind` is a compatible
addition to the `v1` schema. The `docs` format is a preview because it needs the site framework
(`@recit/site`), which is not published; the [formats overview](/formats/overview) says the same.
The MP4 rendering of motion (`@recit/motion-render`, drawn in Chromium through Playwright and
encoded by the system ffmpeg) is in the contract with the format and its player, since its Remotion
engine was removed.

| Package                                                           | In the 1.0 contract |
| ----------------------------------------------------------------- | ------------------- |
| `@recit/core`, `@recit/theme`, `@recit/components`                | yes                 |
| `@recit/deck`                                                     | yes                 |
| `@recit/motion`, `@recit/motion-blocks`                           | yes                 |
| `@recit/motion-render` (MP4, Chromium and ffmpeg)                 | yes                 |
| `@recit/cli`, `recit`, `create-recit`                             | yes                 |
| `@recit/calendar`, `@recit/roadmap`, `@recit/time`                | yes                 |
| `@recit/book`, `@recit/report`                                    | yes                 |
| `@recit/directory` (glossary and directory), `@recit/form`        | yes                 |
| `@recit/webtoon`, `@recit/webstory`                               | yes                 |
| `@recit/terminal`, `@recit/scroll`                                | yes                 |
| `@recit/mcp` (the MCP server, C6)                                 | not yet (preview)   |
| the other format packages, `@recit/site-stories`, the foundations | not yet (preview)   |

## The contracts

A contract is what an author writes or imports. Everything that is not in this list may change in a
minor release.

| No. | Contract                    | Where it is defined                                                                  | Measured by                |
| --- | --------------------------- | ------------------------------------------------------------------------------------ | -------------------------- |
| C1  | The Markdown syntax         | the parser of `@recit/core`: scenes, front matter, brace attributes                  | the example corpus         |
| C2  | The JSON schema `v1`        | `https://recit.dev/schema/v1/*.json`, also shipped as `@recit/core/schema/v1/*.json` | the schemas and the corpus |
| C3  | `recit.config.ts`           | `RecitConfigSchema` of `@recit/core`, published as `schema/v1/config.json`           | `config.json`              |
| C4  | The CLI                     | the `recit` command of the `recit` package                                           | the public API snapshot    |
| C5  | The JS exports              | the `exports` map of each published `package.json`                                   | the public API snapshot    |
| C6  | The MCP tools and resources | the tools and resources of `@recit/mcp`                                              | the public API snapshot    |
| C7  | The CSS tokens and classes  | the tokens of `@recit/theme`, the `slide-*` classes of its deck stylesheet           | the public API snapshot    |

### C1 — The Markdown syntax

For a deck:

- the scene separator `---` and its attributes on the same line (`--- layout=grid cols=2`), or as an
  HTML comment (`<!-- layout: grid -->`);
- the scene settings: `id`, `layout`, `cols`, `image`, `steps`, `transition` (`SceneConfig`,
  `scenes[]` of `deck.json`), and the table of contents' `section=`, `sidebar=false` and
  `sidebar_label=` (`section` and `sidebar` in the twin);
- speaker notes, `:::notes … :::` or `<!-- note … -->`, and the progressive reveal `:::step … :::`;
- the front matter keys: `title`, `description`, `author`, `date`, `lang`, and the flat settings
  `aspectRatio`, `colorMode`, `theme`, `footer`, `rules`, `transition`, `controls`, `pdf`, `toc`
  (`meta` and `settings` of `deck.json`; `controls` is `DeckControlsSchema` of `@recit/core`, and
  `toc` is `DeckTocSchema`: `false` or `{ depth, numbered }`);
- the links of a deck: `#<id>` and `#slide-N` to one of its slides, and `./other.md#id` to a scene
  of another story, a `broken-link` error when it leads nowhere.

For a film: the scene settings `id`, `type`, `dur`, `hold`, `accent` (also on a web story card),
`props`, `voiceover`, and the settings `aspectRatio`, `theme`, `wordsPerSecond`, `motion`
(`motion.json`).

The directives of the registry `DirectiveNameSchema` of `@recit/core` that deck and motion render:
`textcard`, `sprite`, `term`, `glossary`, `directory`; and those rendered in HTML scenes rather than
motion: `source` (the « Source: … » line under a figure, a table or a diagram, in the story's
language), `details`, `summary`, `howto` and `limits` (the four reading boxes, unfolded in print)
and `toc` (`depth`, `numbered`, the deck's table of contents). The formats of 1.0 bring their own:
`figure`, `ref`, `index`, `epigraph` (book and report) and `form`. For a scroll-driven page
(rendered with `@recit/scroll`), the `:::scroll` container directive (`id`, `film`, `height`), its
`::::step` steps (`at`, `id`, Markdown body) and its JSON twin block (`type: "scroll"`,
`ScrollBlockSchema` of `@recit/core/schema`) are in the contract too. The others (`value`, `chart`,
`table`, `kpi`, `map`, `character`, `qr`) belong to features outside 1.0 (`@recit/data`,
`@recit/geo`, `@recit/character`, media QR codes).

### C2 — The JSON schema v1

`story.json`, one file per format (`deck.json`, `motion.json`…), `sidecar.json` and `config.json`,
each with its `$id` under `https://recit.dev/schema/v1/`. The **twin** (`kind: "story"`) is the same
story in JSON; the **sidecar** (`kind: "sidecar"`) completes scenes by `id` and never redefines the
scene list. From `1.0.0-rc.0` the files are frozen: only compatible additions pass (an optional
property, an enumeration value, a new format or `kind`).

Every file says whether it is part of this contract, in the `x-recit-stability` keyword at its root:
`stable` for `story.json`, `sidecar.json`, `config.json`, `deck.json`, `motion.json`,
`calendar.json`, `roadmap.json`, `book.json`, `report.json`, `glossary.json`, `directory.json`,
`webtoon.json`, `webstory.json`, `series.json` and `form-block.json`, `preview` for every other file
(the formats outside 1.0, `exports.json`, `map-block.json`, `bible.json`, `asset.json`,
`chart.json`, `ai-request.json`, `ai-job.json`). Inside a stable file, the preview parts carry the
same keyword: the branches of `story.json` for the formats outside 1.0, and the sections of
`config.json` that belong to them. Only the stable parts are frozen. Every file keeps its URL under
`/schema/v1/`, so a twin's `$schema` does not move when its format joins the contract.

The display mode and the theme are two keys: `colorMode` (`light`, `dark` or `system`) and `theme`
(a named theme or its settings). A twin refuses a mode as its `theme`; the former
`theme.defaultMode` of `recit.config` and `pdf.theme` were removed before `1.0.0-rc.0`: they are
refused with their new name, and `recit migrate` rewrites them in a story.

### C3 — recit.config.ts

Every key of `RecitConfigSchema` of `@recit/core`, its default and the **code** of its diagnostics.
The top-level sections of 1.0: `metadata`, `site`, `theme`, `colorMode`, `footer`, `components`,
`syntaxHighlighting`, `mermaid`, `security`, `rules`, `deck`, `motion`, `publish`, `i18n`, `report`,
`book`, `roadmap`, `calendar`, `glossary`, `directory`, `terms`, `webtoon`, `webstory`, `terminal`.
The sections of the formats outside 1.0 (`atlas`, `scenario`…) are in the schema and stay previews:
`config.json` marks each of them `preview`, as it marks `typography`, `docs`, `app` and `plugins`.
The old `toon:` section is still read as `webtoon:`, with a warning, until 1.0; it is not a key of
`config.json`.

Under `deck`, the keys that drive a deck are in the contract with their defaults: `deck.controls`
(`navigation: "auto"`, `clickToAdvance: true`, `swipe: true`, `overview: true`, `series: true`),
`deck.presenter` (`true`) and `deck.toc` (`false` or `{ depth, numbered }`). The same `controls:`
and `toc:` are front matter keys of a deck (C1) and `settings.controls` and `settings.toc` of its
twin (C2).

The `plugins` key is **reserved** in `v1`: one array for the Récit plugins (objects that carry the
marker below) and the site plugins that the integrations add. The key, and how it is split, are in
the contract: a Récit plugin is told by its marker, `Symbol.for("recit.plugin")`, goes with the
Récit sections, and never reaches the site framework; any other entry is a site plugin, and makes
the config a site config. A deck with only Récit plugins stays a deck. `config.json` describes
`plugins` as an opaque array (`items: {}`), marked `preview`, since a plugin is a JavaScript object
and not JSON. What a plugin can do is the [experimental plugin API](#experimental), outside the
contract, except for [data sources](#data-sources): `recit validate` accepts a project with plugins
and says so once, as a `plugin-experimental` warning when a plugin declares capabilities outside the
data source contract.

### C4 — The CLI

The commands of 1.0, with their arguments, their options, their exit codes and the files they write.
The full list is the `cli` section of the public API snapshot; the
[CLI](/documentation/reference/cli) page, generated from the help, documents them. Every other
command works, but its help ends with `[preview, outside the 1.0 contract]`: it may change in a
minor.

| Command             | In the 1.0 contract    |
| ------------------- | ---------------------- |
| `recit init`        | yes                    |
| `recit dev`         | yes                    |
| `recit build`       | yes                    |
| `recit export`      | yes                    |
| `recit convert`     | yes                    |
| `recit validate`    | yes                    |
| `recit migrate`     | yes                    |
| `recit dur`         | yes                    |
| `recit render`      | yes                    |
| `recit schema`      | yes                    |
| `recit i18n`        | yes                    |
| `recit form`        | yes                    |
| `recit terminal`    | yes                    |
| `recit geocode`     | preview                |
| `recit catalog`     | preview                |
| `recit mail`        | preview                |
| `recit extract`     | preview                |
| `recit mcp`         | preview                |
| `recit prompts`     | preview                |
| `recit assets`      | preview                |
| `recit skills`      | preview                |
| `recit pixel`       | preview                |
| `recit character`   | preview                |
| `recit plugins`     | preview (experimental) |
| `recit ai`          | preview (experimental) |
| `recit login`       | preview                |
| `recit logout`      | preview                |
| `recit whoami`      | preview                |
| `recit collections` | preview                |
| `recit app`         | preview, hidden        |

Inside a command of the contract, an option marked as a preview in its help stays outside it
(`recit build --plugin-budget`), and so does what serves a format outside 1.0: a `--to` target of a
preview format, a `recit schema` of a preview file, a story of a preview format given to
`recit validate` or `recit convert`. These follow their format.

### C5 — The JS exports

For each package of the contract, every entry of its `exports` map, each name it exports, and
whether that name is a value, a type or both. The `exports` section of the snapshot holds them all,
read by the TypeScript compiler from each entry's source. The entries listed under
[Experimental](#experimental) are the exception.

The table of contents of a deck is among them: `deckOutline` and its helpers, `resolveDeckToc`,
`resolveLink` of `compileStory` and `SceneLinkResolver`, and the `series` prop of `Presentation`
(`DeckSeries`). The props `controls` and `presenter` of `<StoryEmbed>` and the `…/<slug>/presenter`
route of a site belong to `@recit/site-stories`, a preview, and follow it.

### C6 — The MCP server

The tool names of `@recit/mcp`, their input properties and which are required, the resources
`recit://guide/…` and `recit://schema/…`. The `mcp` section of the snapshot holds them, as the built
server answers `tools/list` and `resources/list`. The command that starts the server,
`recit mcp serve`, is a preview of the CLI (C4). `@recit/mcp` itself is a preview, outside the 1.0
contract (decision of 12/11/2026): the snapshot measures its tools and resources, and a change there
is a minor after 1.0. The lists below say what is meant to join the contract with the server.

- In the contract, the tools of stories, decks and films: `validate_story`, `describe_format`,
  `list_themes`, `list_templates`, `list_icons`, `theme_import`, `validate_film`, `list_blocks`,
  `describe_block`, `describe_ui_nodes`, `propose_scenes`, `build_film`, `apply_ops`, `render`; the
  resources `recit://guide/deck`, `recit://guide/motion` and `recit://schema/motion-film`.
- In the contract with their format: `lookup_term` (glossary), `search_directory` (directory),
  `book_outline` (book), `expand_events` (calendar), and the resources `recit://guide/webtoon` and
  `recit://guide/webstory` (the old `recit://guide/toon` is still read until 1.0).
- Following their format or feature, previews: `describe_data` (the data of a report), the scenario
  tools `describe_bible_schema`, `validate_bible`, `build_bible`, `build_prompt`, `list_prompts`,
  `register_asset` `story_from_beats` and `check_continuity` (the writing workshop), the character
  tools `render_character`, `expand_animation` and `build_frame_prompts` (`@recit/character`,
  preview), `extract` (as `recit extract`), and the other `recit://guide/…` resources.

### C7 — The CSS tokens

The custom properties of `@recit/theme` (`tokens.css`, `reset.css`, `traits.css`) and the `slide-*`
classes of `deck.css` that authors use in `theme.customCss`, together with the built-in named themes
of `@recit/theme` (`warm-editorial`, `saas-product`, `report`, `traits` in `RECIT_THEMES` and
`MOTION_THEMES`, and the film-only `marques` in `MOTION_THEMES`) and the visible-grid stylesheet
`@recit/theme/traits.css`. The `css` and `exports` sections of the snapshot hold them.

### The interface labels

The labels of the interface (the site, the deck controls, the presenter console, the remote, the PDF
of the docs, the format components) follow one fallback rule, which is part of the contract:

- Récit ships two packs, `en` and `fr`. A story or a site whose language has `fr` as its primary
  subtag (`fr`, `fr-CA`, `FR`) gets the French labels; **every other language, or none, gets the
  English ones**, whole, never a mix and never an error (`resolveUiLocale` and `pickStrings` of
  `@recit/core/i18n`).
- An author adds a language with an `i18n.ui` pack (`i18n.ui: { ja: "./i18n/ja.json" }`). The pack
  of the full tag (`pt-BR`) wins over the one of its language (`pt`). An entry the pack leaves out
  falls back to the shipped pack of that language: English, or French for a `fr` tag. Templates
  (`{count}`) and plural forms (`one`, `other`…) are filled the same way as in the shipped packs.

The words of a label may change in a minor release; the rule may not.

### Data sources

The **data source contract** of plugins
([Writing a data source](/documentation/plugins/data-sources)) is stable in `v1`:

- in `@recit/core/plugin` and `recit/plugin`: `definePlugin` (the fields `name`, `api` (`1`),
  `version`, `options` and `sources`, with `RecitPluginDefinition`, `PluginOptionsInput`,
  `RecitPluginFactory` and `RecitPlugin`), `defineClientPlugin` (`name`, for a site's `browser`
  entry — served alone by the `browser` condition, without zod — with `ClientPluginDefinition` and
  `ClientPluginFactory`), the secret helpers `SecretRefSchema`, `SecretRef` and `readSecret`, and
  the types its signatures reference (`LazyModule`, `RecitClientPlugin`, `StandardSchema`,
  `ZodSchema`);
- the source schema and types: `PluginSource` (`schema?`, `ttl?`, `read(context)`),
  `PluginSourceContext` (`name`, `entry`, `options`, `env`, `baseDir`, `signal?`),
  `PluginSourceResult` (`rows`, `columns?`, `meta?`), `DataSourceMeta` and `DataSourceMetaSchema`
  (DCAT field names: `title`, `url`, `publisher`, `license`, `modified`), `DataCell` and
  `DataColumnType`;
- the `data:` entry `{ source: "<source>", … }` (`DataPluginSourceSchema`, marked
  `x-recit-stability: "stable"` in the `v1` schemas);
- the execution rules, CLI flag and diagnostics: 30 s (`context.signal` aborted when the timeout
  expires) and 100,000 rows per `read` call, `.recit/cache/`, `ttl` (default `3600` s, `0` = every
  build; a future `readAt` is never fresh), `recit build --refresh`, and the codes `plugin-failed`,
  `plugin-stale`, `plugin-missing`, `plugin-options-invalid` and `plugin-no-browser-entry`.

The rest of the plugin API (directives, components, blocks, themes, exporters, commands, AI jobs,
and internal loaders such as `findPluginSource`) remains [experimental](#experimental).

## Outside the contract

These may change in any minor release:

- the class names of the CSS modules (they are generated);
- the rendered HTML structure;
- the `film.json` files: a build artefact, never the twin;
- the text of diagnostic messages (their code is in C3);
- the plugin API of the site framework (`@recit/site` is private);
- how the deck controls feel: the 2 s before the buttons hide, the click zones of a slide;
- the drawing of the deck's "Contents" drawer and of the card of the next deck, and the tree of the
  PDF bookmarks;
- every package, command or key marked as a preview, and the formats outside 1.0;
- the experimental entries below.

## Experimental

The **plugin API** is outside the promise of 1.0, except for the
[data source contract](#data-sources): its other names may change in a minor release, with a note in
the changelog. Only the `plugins` key of the config and its marker (C3) and the
[data source contract](#data-sources) are in the contract. Every entry below is marked
`@experimental` in its documentation, and stays outside the contract until a minor makes it stable:

| Entry                                                                                                        | What it holds                                                                                                                                                                                                                                          |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `@recit/core/plugin`                                                                                         | the capabilities outside the [data source contract](#data-sources) (directives, components, blocks, themes, exporters, commands, AI jobs, hooks), the reserved names, the internal resolvers, and the other types of a plugin                          |
| `recit/plugin`                                                                                               | the same, for a project that installs `recit` alone                                                                                                                                                                                                    |
| `recit/plugin/testing`                                                                                       | `expectRoundTrip`, the round trip of a plugin's directives through the JSON twin; `fakeAiProvider` and `runPluginJob`, to test AI jobs without a network                                                                                               |
| `@recit/cli/plugin`                                                                                          | loading a project's plugins (what `recit build`, `recit validate` and `recit plugins` do), and `expectRoundTrip`                                                                                                                                       |
| `@recit/motion/plugin`                                                                                       | the film blocks of plugins on the schema side: `filmSchemaFor`, `buildSceneOps`, `registryWithBlocks`; `FilmSchema` itself stays strict                                                                                                                |
| `@recit/motion-blocks/plugin`                                                                                | the film blocks of plugins on the render side: `defineBlock` for any scene type, `withBlocks`, `BlocksProvider`, `Frame` (the root of a view)                                                                                                          |
| `@recit/ai`, `@recit/ai/image`, `@recit/ai/speech`, `@recit/ai/video`, `@recit/ai/local`, `@recit/ai/server` | the AI providers a plugin calls (`directProvider` for Anthropic, OpenAI and Google Gemini, `geminiImage`, `openaiImage`, `geminiSpeech`, `elevenlabsSpeech`, `geminiVideo`, `comfyImage`, `serverProvider`), and `createAiServer`; an optional package |

The AI half of `@recit/core/plugin` is experimental too: `StoryOp` and `applyStoryOps`, the job and
provider types (`AiJob`, `AiProvider`), `checkAiJobResult`. So are the command `recit plugins`, the
command `recit ai`, the option `recit build --plugin-budget`, marked as a preview, the `--to`
targets of `recit export` and the commands (`recit <plugin> <command>`) that plugins bring, a
plugin's themes in `theme.name`, the codes `plugin-not-found`, `plugin-api-mismatch`,
`plugin-name-conflict` and `plugin-directive-attributes`, and the codes a plugin reports, prefixed
with its name (`lorem/quote-empty`).

Of the three additions to `v1` that serve plugins, a `data:` entry `{ source: "<name>", … }` read by
a plugin's source (`DataPluginSourceSchema`; only `source` is checked there, the plugin checks the
other keys) is no longer `preview` but `stable` ([Data sources](#data-sources)); the other two stay
marked `preview` in the published schemas: the `kind: "plugin"` files of `exports.json`
(`PluginExportFileSchema`), and the key `publish.pluginBudget` of `recit.config`, the budget of each
plugin in a site. A file valid before stays valid.

The public API test keeps them apart already: its list of experimental subpaths names the entries of
a contract package that stay outside it, where a removal never asks for a major, while
`STABLE_EXPERIMENTAL_EXPORTS` carves the symbols of the [data source contract](#data-sources) out of
`@recit/core/plugin` and `recit/plugin` so removing or renaming one of them asks for a major.
`@recit/ai` is not a contract package. An entry leaves that list in the minor that makes the whole
subpath stable.

## Deprecations

A name is deprecated in a minor release, with a `deprecated` diagnostic that names its replacement,
and removed at the next major, never before. No alias goes past 1.0: those that remain in `0.x` are
removed in `1.0.0-rc.0`. Three remain today, each with a warning: `theme: dark` in front matter (for
`colorMode: dark`), the key `deck.files` of the config, and `--out` of `prompts build`,
`skills export` and `form schema` (for `-o, --output`). The guide
[Migrate from a prerelease to 1.0](/documentation/guides/migrate-to-1-0) lists them, with what
`recit migrate` rewrites and what to change by hand.

## Versions

- `0.x`: one `0.N.0-alpha.M` prerelease line per phase; every version plan is `preminor` or
  `prerelease`.
- The road to 1.0: `premajor` with the preid `rc` gives `1.0.0-rc.0`, `prerelease` the next rc, and
  `major` with no preid gives `1.0.0`, under the dist-tag `latest`.
- After 1.0: `patch`, `minor` and `major` are allowed again. A plan that removes or renames an
  element of C1 to C7 is a `major`; an addition is a `minor`. The public API test lists the removals
  and additions and says which bump they need. The prereleases of the next line go under `next`.

A check of the repository enforces these rules on every change.

## Support

One maintained line: only the latest major receives fixes, security fixes included, and there is no
maintenance branch. Node: the `engines` range (`>=22.22.0`) is tested in CI on its lowest version
and on the latest even release. To report a vulnerability, see `.github/SECURITY.md`.
