# Diagnostic codes

`recit validate`, `recit build`, the site build and the MCP tools report each problem as a
diagnostic: a severity, a message, the file and the line, and a stable **code** that names the kind
of problem. The message says what to change; the code is what a script, a test or a continuous
integration filter can rely on.

```text
✖ chapters/01-lorem.md:12 — ::figure "fig-lorem": image "./figures/lorem.png" not found
```

The line printed in a terminal holds the message; `recit validate --json` prints the same
diagnostics as objects, each with its `code` (here `book-missing-image`), its `severity`, its
`message` and, when known, its `line`.

## Severities

- **error**: the story cannot be built as written; the command exits with a non-zero code.
- **warning**: the story builds, but something is probably not what the author meant (a deprecated
  name, a text too long for its slide). `recit validate --strict` turns some of them into errors
  before a publication.
- **info**: a remark that needs no change.

A code listed with two severities is reported as one or the other depending on the command and its
options (`--strict`). « set by the caller » means the severity depends on where the check runs.

## Codes

| Code                           | Package                                          | Severity          |
| ------------------------------ | ------------------------------------------------ | ----------------- |
| `app-deck-dev`                 | `@recit/cli`                                     | error             |
| `app-remote`                   | `@recit/cli`                                     | error             |
| `app-version-required`         | `@recit/cli`                                     | error             |
| `atelier-stage-no-bible`       | `@recit/cli`                                     | warning           |
| `atlas-insets`                 | `@recit/atlas`                                   | warning           |
| `atlas-invalid-layer`          | `@recit/atlas`                                   | error             |
| `atlas-layer-position`         | `@recit/core`                                    | error             |
| `atlas-no-camera`              | `@recit/core`                                    | error             |
| `atlas-read`                   | `@recit/cli`                                     | error             |
| `atlas-to-deck-camera`         | `@recit/atlas`                                   | warning           |
| `atlas-to-deck-density`        | `@recit/atlas`                                   | error             |
| `atlas-to-deck-setting`        | `@recit/atlas`                                   | warning           |
| `atlas-to-webstory-camera`     | `@recit/atlas`                                   | warning           |
| `atlas-to-webstory-count`      | `@recit/atlas`                                   | warning           |
| `atlas-to-webstory-density`    | `@recit/atlas`                                   | error             |
| `atlas-to-webstory-setting`    | `@recit/atlas`                                   | warning           |
| `book-chapter-format`          | `@recit/book`                                    | error             |
| `book-duplicate-part`          | `@recit/book`                                    | error             |
| `book-entry-format`            | `@recit/book`                                    | error             |
| `book-entry-scene`             | `@recit/book`                                    | error             |
| `book-invalid-chapter`         | `@recit/book`                                    | error             |
| `book-invalid-entry`           | `@recit/book`                                    | error             |
| `book-invalid-part-id`         | `@recit/book`                                    | error             |
| `book-missing-chapter`         | `@recit/book`                                    | error             |
| `book-missing-image`           | `@recit/book`                                    | error             |
| `book-to-webstory-count`       | `@recit/webstory`                                | warning           |
| `book-to-webstory-empty`       | `@recit/webstory`                                | error             |
| `book-to-webstory-opening`     | `@recit/webstory`                                | warning           |
| `book-unknown-break`           | `@recit/core`                                    | error             |
| `book-unknown-part`            | `@recit/book`                                    | error             |
| `book-variant-entry`           | `@recit/cli`                                     | warning           |
| `book-without-chapters`        | `@recit/book`                                    | error             |
| `broken-link`                  | `@recit/core`                                    | error             |
| `calendar-expand`              | `@recit/calendar`                                | error             |
| `calendar-ics-invalid`         | `@recit/calendar`                                | error             |
| `calendar-ics-read`            | `@recit/calendar`                                | error             |
| `calendar-ics-timezone`        | `@recit/calendar`                                | warning           |
| `calendar-ics-unknown`         | `@recit/calendar`                                | warning           |
| `calendar-include`             | `@recit/calendar`                                | error             |
| `calendar-places`              | `@recit/calendar`                                | error             |
| `calendar-read`                | `@recit/cli`                                     | error             |
| `calendar-to-atlas-count`      | `@recit/atlas`                                   | warning           |
| `calendar-to-atlas-empty`      | `@recit/atlas`                                   | error             |
| `calendar-to-atlas-no-geo`     | `@recit/atlas`                                   | warning           |
| `calendar-to-webstory-count`   | `@recit/webstory`                                | warning           |
| `calendar-to-webstory-empty`   | `@recit/webstory`                                | error             |
| `catalog-duplicate-id`         | `@recit/data`                                    | error             |
| `catalog-invalid-chart`        | `@recit/cli`                                     | error             |
| `catalog-invalid-data-ref`     | `@recit/cli`                                     | warning           |
| `catalog-missing-source`       | `@recit/data`                                    | warning           |
| `catalog-missing-title`        | `@recit/data`                                    | warning           |
| `catalog-outside-root`         | `@recit/cli`                                     | error             |
| `catalog-site-routes`          | `@recit/site-stories`                            | warning           |
| `character`                    | `@recit/character`                               | error             |
| `data-directive`               | `@recit/data`                                    | error, warning    |
| `data-source`                  | `@recit/cli`, `@recit/data`                      | error             |
| `data-unchecked`               | `@recit/cli`                                     | warning           |
| `deprecated-theme-token`       | `@recit/core`                                    | warning           |
| `dialogue-directive`           | `@recit/book`, `@recit/core`                     | error             |
| `directive-without-handler`    | `@recit/core`                                    | error             |
| `directory-column`             | `@recit/cli`                                     | warning           |
| `directory-directive`          | `@recit/directory`                               | set by the caller |
| `directory-empty-facet`        | `@recit/directory`                               | warning           |
| `directory-entry-category`     | `@recit/core`                                    | warning           |
| `directory-link-url`           | `@recit/core`                                    | warning           |
| `directory-read`               | `@recit/cli`                                     | error             |
| `directory-text-after-entries` | `@recit/core`                                    | warning           |
| `directory-unknown-country`    | `@recit/directory`                               | warning           |
| `duplicate-default-locale`     | `@recit/core`                                    | error             |
| `duplicate-scene-id`           | `@recit/core`                                    | error             |
| `duplicate-slide-id`           | `@recit/core`                                    | warning           |
| `entries-to-webstory-count`    | `@recit/directory`                               | error             |
| `entries-to-webstory-empty`    | `@recit/directory`                               | error             |
| `form-dense-step`              | `@recit/core`                                    | warning           |
| `form-directive`               | `@recit/form`                                    | set by the caller |
| `form-empty-step`              | `@recit/core`                                    | error             |
| `form-end-value`               | `@recit/core`                                    | error             |
| `form-multiple-end`            | `@recit/core`                                    | error             |
| `form-separator-unmatched`     | `@recit/core`                                    | error             |
| `form-story`                   | `@recit/form`                                    | set by the caller |
| `form-story-read`              | `@recit/cli`                                     | error             |
| `form-unknown-flag`            | `@recit/core`                                    | error             |
| `form-when-later`              | `@recit/core`                                    | error             |
| `form-when-unknown`            | `@recit/core`                                    | error             |
| `format-missing`               | `@recit/cli`, `@recit/site-stories`              | error             |
| `frontmatter-invalid`          | `@recit/cli`, `@recit/components`, `@recit/core` | error, warning    |
| `frontmatter-suspect`          | `@recit/core`                                    | warning           |
| `geocode-not-directory`        | `@recit/cli`                                     | warning           |
| `geocode-not-found`            | `@recit/cli`                                     | error, warning    |
| `glossary-directive`           | `@recit/components`                              | error             |
| `glossary-entry-attributes`    | `@recit/core`                                    | error             |
| `invalid-aspect-ratio`         | `@recit/core`                                    | error, warning    |
| `invalid-format`               | `@recit/core`                                    | error             |
| `invalid-json`                 | `@recit/cli`, `@recit/core`                      | error             |
| `invalid-json-config`          | `@recit/core`                                    | warning           |
| `invalid-json-source`          | `@recit/core`                                    | error             |
| `invalid-scene-background`     | `@recit/core`                                    | warning           |
| `invalid-slide-config`         | `@recit/core`                                    | warning           |
| `invalid-source`               | `@recit/cli`, `@recit/core`                      | error             |
| `invalid-theme-color`          | `@recit/core`                                    | warning           |
| `lang-mismatch`                | `@recit/core`                                    | error             |
| `links-not-directory`          | `@recit/cli`                                     | warning           |
| `low-chart-contrast`           | `@recit/core`                                    | warning           |
| `low-scene-contrast`           | `@recit/core`                                    | warning           |
| `mail-directive`               | `@recit/core`                                    | error             |
| `mail-preview-long`            | `@recit/core`                                    | error             |
| `mail-primary-buttons`         | `@recit/core`                                    | error             |
| `mail-subject`                 | `@recit/core`                                    | error             |
| `map-directive`                | `@recit/cli`, `@recit/geo`                       | error, warning    |
| `mermaid-small-text`           | `@recit/core`                                    | warning           |
| `missing-layout-image`         | `@recit/core`                                    | warning           |
| `motion-missing-audio`         | `@recit/cli`                                     | error             |
| `overload-bullets`             | `@recit/core`                                    | set by the caller |
| `overload-grid`                | `@recit/core`                                    | set by the caller |
| `overload-grid-cols`           | `@recit/core`                                    | set by the caller |
| `overload-words`               | `@recit/core`                                    | set by the caller |
| `parity-form`                  | `@recit/form`                                    | error             |
| `pixel`                        | `@recit/components`                              | error             |
| `plugin-directive-attributes`  | `@recit/core`                                    | error             |
| `plugin-failed`                | `@recit/core`, `@recit/site-stories`             | error             |
| `plugin-name-conflict`         | `@recit/core`                                    | error             |
| `plugin-no-browser-entry`      | `@recit/cli`                                     | error             |
| `render-error`                 | `@recit/core`, `@recit/report`                   | error             |
| `report-banner-fit`            | `@recit/report`                                  | warning           |
| `report-empty`                 | `@recit/report`                                  | warning           |
| `report-hand-number`           | `@recit/report`                                  | warning           |
| `report-invalid-setting`       | `@recit/report`                                  | warning           |
| `report-mdx-import`            | `@recit/report`                                  | error             |
| `report-missing-brand-logo`    | `@recit/cli`                                     | warning           |
| `report-read`                  | `@recit/cli`                                     | error             |
| `report-to-deck-density`       | `@recit/report`                                  | error             |
| `report-to-deck-setting`       | `@recit/report`                                  | warning           |
| `report-to-deck-table`         | `@recit/report`                                  | warning           |
| `report-to-webstory-count`     | `@recit/webstory`                                | warning           |
| `report-to-webstory-empty`     | `@recit/webstory`                                | error             |
| `report-to-webstory-kpi`       | `@recit/webstory`                                | error             |
| `report-to-webstory-languages` | `@recit/webstory`                                | error             |
| `report-to-webstory-left-out`  | `@recit/webstory`                                | warning           |
| `roadmap-done-undated`         | `@recit/core`                                    | warning           |
| `roadmap-invalid-date`         | `@recit/core`                                    | error             |
| `roadmap-item-attributes`      | `@recit/core`                                    | error             |
| `roadmap-item-id`              | `@recit/core`                                    | error             |
| `roadmap-overdue`              | `@recit/roadmap`                                 | warning           |
| `roadmap-read`                 | `@recit/cli`                                     | error             |
| `roadmap-text-after-items`     | `@recit/core`                                    | warning           |
| `roadmap-unknown-attribute`    | `@recit/core`                                    | error             |
| `safe-area`                    | `@recit/cli`                                     | set by the caller |
| `scene-body-split`             | `@recit/core`                                    | error             |
| `scene-directive-conflict`     | `@recit/core`                                    | info              |
| `setext-ambiguity`             | `@recit/core`                                    | info              |
| `sidecar-invalid`              | `@recit/core`                                    | error             |
| `sidecar-kind`                 | `@recit/core`                                    | error             |
| `sidecar-unknown-item`         | `@recit/core`                                    | error             |
| `sidecar-unknown-scene`        | `@recit/core`                                    | error             |
| `source-directive`             | `@recit/core`                                    | error             |
| `story-error`                  | `@recit/cli`                                     | error             |
| `term-alias-collision`         | `@recit/components`                              | error             |
| `terms-source`                 | `@recit/cli`                                     | error             |
| `textcard`                     | `@recit/components`                              | error             |
| `theme-is-a-color-mode`        | `@recit/core`                                    | warning           |
| `toc-depth`                    | `@recit/core`                                    | warning           |
| `toc-empty`                    | `@recit/core`                                    | warning           |
| `twin-mismatch`                | `@recit/core`                                    | error             |
| `unknown-string`               | `@recit/core`                                    | warning           |
| `unknown-term`                 | `@recit/components`                              | error             |
| `unknown-theme`                | `@recit/core`                                    | warning           |
| `untranslated`                 | `@recit/core`                                    | error, warning    |
| `untranslated-story`           | `@recit/cli`, `@recit/core`                      | error, warning    |
| `variant-missing-brand-logo`   | `@recit/cli`                                     | error             |
| `variants-source`              | `@recit/cli`                                     | error             |
| `webstory-amp-no-poster`       | `@recit/cli`                                     | warning           |
| `webstory-amp-skipped`         | `@recit/cli`                                     | warning           |
| `webstory-aspect`              | `@recit/webstory`                                | error             |
| `webstory-budget`              | `@recit/webstory`                                | warning           |
| `webstory-cta-position`        | `@recit/core`                                    | error             |
| `webstory-density`             | `@recit/webstory`                                | error             |
| `webstory-missing-alt`         | `@recit/core`                                    | warning           |
| `webstory-missing-background`  | `@recit/webstory`                                | error             |
| `webstory-missing-brand-logo`  | `@recit/webstory`                                | error             |
| `webstory-preset-aspect`       | `@recit/webstory`                                | error             |
| `webstory-read`                | `@recit/cli`                                     | error             |
| `webstory-safe-area`           | `@recit/webstory`                                | warning           |
| `webstory-textcard-contrast`   | `@recit/webstory`                                | warning           |
| `webtoon-body-content`         | `@recit/core`                                    | error             |
| `webtoon-character`            | `@recit/webtoon`                                 | error             |
| `webtoon-character-undrawn`    | `@recit/webtoon`                                 | warning           |
| `webtoon-episode-budget`       | `@recit/webtoon`                                 | warning           |
| `webtoon-film-invalid`         | `@recit/webtoon`                                 | error             |
| `webtoon-missing-alt`          | `@recit/core`                                    | warning           |
| `webtoon-missing-image`        | `@recit/webtoon`                                 | error             |
| `webtoon-panel-budget`         | `@recit/webtoon`                                 | warning           |
| `webtoon-placeholder`          | `@recit/core`                                    | warning           |
| `webtoon-read`                 | `@recit/cli`                                     | error             |
| `webtoon-unclosed-lettering`   | `@recit/core`                                    | error             |
| `webtoon-unknown-attribute`    | `@recit/core`                                    | error             |
| `webtoon-unknown-cast`         | `@recit/webtoon`                                 | warning           |

