# Roadmap

<StatusBadge status="available" /> `format: roadmap` turns a story into a **roadmap**:
one **lane** per scene, one **item** per task-list line of the lane, and **milestones** for the
releases. The same file is shown in three views — now / next / later (the default, which needs no
date), a timeline and a board — filtered by tag, owner or status, and exported to a calendar, a feed
and a PDF ([Exports](/formats/roadmap/exports)).

The examples are `roadmap-product` (two languages, with a companion) and `roadmap-studio` (its own
statuses, a kanban); roadmap.recit.dev shows the first, and the roadmap of Récit, written in the
format.

## A minimal roadmap

```md title="product.md"
---
title: Lorem Product Roadmap
format: roadmap
lang: en
view: now-next-later # now-next-later | timeline | kanban
period: quarter # month | quarter | half: the ticks of the timeline
---

--- id=editor

## Editor

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

- [x] Lorem ipsum export {id=export end=2026-09-18 quarter=2026-Q3 link=https://example.com}
- [ ] Dolor sit amet sync {id=sync status=in-progress start=2026-10-01 end=2026-12-15 owner=team-lorem}
- [ ] Consectetur offline mode {id=offline horizon=later quarter=2027-Q1 tags=mobile,beta}

:::item{id=sync}
Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
:::

--- id=api

## API

- [ ] Adipiscing webhooks {id=webhooks quarter=2027-Q1 depends=sync}

--- id=v1 milestone=2027-03-31

## 1.0 release

Ut enim ad minim veniam.
```

```bash
npx recit dev product.md
```

| Written                         | What it is                                                                                                                                                  |
| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--- id=…`                      | a **lane**. Its first heading is its title, the prose before the list its description                                                                       |
| a list line ending in `{…}`     | an **item**: `id` (required), `status`, `horizon`, `start`, `end`, `quarter`, `owner`, `tags`, `link`, `feedback`, `depends`. A line without `{…}` is prose |
| `[x]`                           | the item is done (the `done` status, `shipped` by default); `[ ]` without `status=` takes the first status                                                  |
| `:::item{id=…}`                 | the long description of an item, full Markdown (images, links, code)                                                                                        |
| `--- id=… milestone=2027-03-31` | a **milestone**, on the timeline and in the calendar; its body is its description. `milestone=true` while it has no date                                    |

`feedback=` names the form that collects feedback on the item: its anchor on the page (`#form-idea`
for `:::form{#idea}`: a form's anchor is `form-` and its id), a path or an address. The item's
dialog then shows « Give feedback », whose link adds `?recit-about=<item id>`; the form sends that
id as `meta.about` ([Form submission API](/documentation/reference/form-submission-api)).

The attributes in braces follow the grammar of the scene separator: the same quotes, lists separated
by commas (`tags=mobile,beta`, `depends=sync,tokens`). Dates are civil dates, `2026-11-02`, and a
quarter is written `2026-Q3`: a roadmap never promises an hour, and a date without a time zone does
not change day from one country to another.

### The three views

- **Now / next / later** reads `horizon=` of each item, else the column of its status. It never
  depends on the date: a public roadmap that promises no date reads the same every day.
- **Timeline**: the items with dates or a quarter, the milestones on top, the line of today from the
  build clock (`SOURCE_DATE_EPOCH` when it is set, for reproducible builds).
- **Board**: one column per status.

The view and the filters live in the address (`?view=timeline&tag=mobile&owner=team-lorem`): a
filtered view is a link. Every control is a link or a form first, so the page reads without
JavaScript.

## Settings

In the front matter, or for every roadmap of a folder in the `roadmap:` section of `recit.config`
(the front matter wins):

| Setting        | Default                                                    | What it does                                                                      |
| -------------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `view`         | `now-next-later`                                           | the view shown first: `now-next-later`, `timeline` or `kanban`                    |
| `period`       | `quarter`                                                  | the ticks of the timeline: `month`, `quarter`, `half`                             |
| `statuses`     | `[planned, in-progress, shipped, paused]`                  | the statuses, in order; the first one is the status of a bare `[ ]`               |
| `done`         | `shipped`                                                  | the status of `[x]`, of the changelog and of the feed                             |
| `statusLabels` | the words of the page's language                           | the label of each status, one string or one per language                          |
| `horizons`     | `now: [in-progress]`, `next: [planned]`, `later: [paused]` | the statuses of each column of now / next / later, for an item without `horizon=` |
| `url`          | none                                                       | the address of the published page: the links of the feed, the ids of the calendar |
| `ics.items`    | `false`                                                    | also the dated items in the calendar, not only the milestones                     |
| `pdf`          | A4 landscape, the timeline                                 | the options of `recit export --to pdf`: `view`, the page box                      |

The `pdf` key takes the [PDF options](/documentation/configuration/recit-config#pdf-options) of
every paginated format (`page`, `toc`, `header`, `footer`, `colorMode`, `output`…), plus `view`.

```ts title="recit.config.ts"
import { defineConfig } from "recit/config";

export default defineConfig({
  i18n: { defaultLocale: "en", locales: ["en", "fr"] },
  roadmap: {
    statuses: ["planned", "in-progress", "shipped", "paused"],
    done: "shipped",
    statusLabels: { paused: { en: "On hold", fr: "En pause" } },
    horizons: { now: ["in-progress"], next: ["planned"], later: ["paused"] },
    url: "https://example.com/roadmap/product",
    ics: { items: true },
    pdf: { view: "timeline" },
  },
});
```

## The JSON twin

The **twin** (`kind: "story"`) is the same roadmap in JSON, checked by
`https://recit.dev/schema/v1/roadmap.json` and converted both ways by `recit convert`: each lane has
its `title`, its `body` and its `items`, each with its typed fields; a milestone has
`milestone: true` and its `date`. Beside a `product.md`, a `product.json` is either its twin or its
companion, told apart by `kind`.

```json title="product.json"
{
  "$schema": "https://recit.dev/schema/v1/roadmap.json",
  "kind": "story",
  "version": 1,
  "format": "roadmap",
  "meta": { "title": "Lorem Product Roadmap", "lang": "en" },
  "settings": { "view": "now-next-later", "period": "quarter" },
  "scenes": [
    {
      "id": "editor",
      "title": "Editor",
      "body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
      "items": [
        {
          "id": "export",
          "title": "Lorem ipsum export",
          "status": "shipped",
          "end": "2026-09-18",
          "quarter": "2026-Q3"
        },
        {
          "id": "sync",
          "title": "Dolor sit amet sync",
          "status": "in-progress",
          "start": "2026-10-01",
          "end": "2026-12-15",
          "owner": "team-lorem"
        }
      ]
    },
    {
      "id": "v1",
      "milestone": true,
      "date": "2027-03-31",
      "title": "1.0 release",
      "body": "Ut enim ad minim veniam."
    }
  ]
}
```

Alongside `scenes.id` and `scenes.body` (see
[Scenes › In the JSON twin](/documentation/writing/scenes#in-the-json-twin)) and the lane, milestone
and `scenes.items` (`items.id`, `items.title`, `items.status`, `items.start`, `items.end`,
`items.quarter`, `items.owner`) keys shown above, `scenes` and `scenes.items` accept:

| Key                 | Type / values                                 | Effect                                                                                                                                      |
| ------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `scenes.notes`      | `string` or `Record<string, string>`          | Optional author notes in Markdown (`:::notes`; [Scenes](/documentation/writing/scenes#in-the-json-twin)).                                   |
| `scenes.attrs`      | `Record<string, string \| number \| boolean>` | Optional separator attributes (`--- key=value`) other than `id` and `milestone` ([Scenes](/documentation/writing/scenes#in-the-json-twin)). |
| `items.horizon`     | `"now"` \| `"next"` \| `"later"`              | Column in the `now-next-later` view (`{horizon=…}` in Markdown); derived from `items.status` and `settings.horizons` when omitted.          |
| `items.tags`        | `string[]` (non-empty strings)                | Tags on the item (`{tags=a,b}` in Markdown), used to filter the views (`?tag=…`).                                                           |
| `items.link`        | `string` (URI)                                | External link of the item (`{link=…}` in Markdown).                                                                                         |
| `items.feedback`    | `string` (non-empty)                          | The feedback form of the item (`{feedback=#form-idea}` in Markdown): « Give feedback » opens it with `?recit-about=<item id>`.              |
| `items.depends`     | `string[]` (non-empty strings)                | Ids of prerequisite items in the same roadmap (`{depends=a,b}` in Markdown; unknown ids and cycles are errors).                             |
| `items.description` | `string` or `Record<string, string>`          | Long Markdown description of the item (`:::item{id=…}` block in Markdown).                                                                  |

### The companion

The **companion** (`kind: "sidecar"`, `product.json` beside `product.md`) completes the items **by
their id**, without ever adding or removing one. It is the place a tool writes: a script that reads
an issue tracker rewrites the companion, never the Markdown.

```json title="product.json"
{
  "$schema": "https://recit.dev/schema/v1/sidecar.json",
  "kind": "sidecar",
  "version": 1,
  "scenes": {
    "editor": {
      "items": {
        "sync": { "status": "shipped", "end": "2026-10-28" }
      }
    }
  }
}
```

### Languages

`product.fr.md` beside `product.md` is its French variant. Titles, descriptions and status labels
are translated; ids, statuses, dates, owners, tags, links and dependencies are the same in every
language, and `recit i18n check` refuses an item present in one language only.

## Commands

| Command                                                             | What it does                                                                      |
| ------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `recit dev product.md`                                              | the roadmap with live reload                                                      |
| `recit build product.md -o dist`                                    | the three views, prerendered (`-o, --output`, default `./dist`)                   |
| `recit validate product.md`                                         | the story against its schema and the rules below                                  |
| `recit convert product.md --to json`                                | the JSON twin on standard output; `--to md` goes back to Markdown (`--locale fr`) |
| `recit export product.md --to ics -o product.ics`                   | one all-day event per dated milestone (and dated item with `ics.items`)           |
| `recit export product.md --to rss -o product.rss`                   | the feed of what shipped; needs `url`                                             |
| `recit export product.md --to pdf -o product.pdf --color-mode dark` | the printable view, the timeline on one A4 landscape page (`light` or `dark`)     |

`-o, --output` names the file (a folder for `build`); without it the export is written beside the
story and listed in `exports.json` (`--no-manifest` leaves the manifest alone). What each file
holds, and how a site serves it, is on [Exports](/formats/roadmap/exports); every flag is in
[the CLI reference](/documentation/reference/cli).

### The rules

`recit validate` and the build check each roadmap; every message carries the file and the line (or
the JSON path in a twin).

| Code                       | Severity | When                                                                   |
| -------------------------- | -------- | ---------------------------------------------------------------------- |
| `roadmap-item-id`          | error    | an item without `id`, or an `id` used twice                            |
| `roadmap-unknown-status`   | error    | a `status` not in `statuses`                                           |
| `roadmap-unknown-depends`  | error    | `depends` on an unknown `id`                                           |
| `roadmap-depends-cycle`    | error    | a cycle of dependencies (its path is in the message)                   |
| `roadmap-date-order`       | error    | `end` before `start`, or outside the `quarter` given                   |
| `roadmap-invalid-date`     | error    | a date or a quarter badly written (`2026-13-01`, `2026-Q5`, `2027`)    |
| `roadmap-milestone-items`  | error    | a list of items in a milestone                                         |
| `roadmap-done-undated`     | warning  | a done item without `end`: it is in neither the changelog nor the feed |
| `roadmap-overdue`          | warning  | an item not done whose `end` is past, never an error                   |
| `roadmap-text-after-items` | warning  | prose after the list of a lane (moved before it)                       |
| `sidecar-unknown-item`     | error    | an item `id` of the companion that the lane does not have              |

## Bridges

| From → to          | How                                     |
| ------------------ | --------------------------------------- |
| roadmap → calendar | `include:` of the roadmap in a calendar |

A calendar lists the roadmap in its front matter, and the roadmap's **dated** milestones become
all-day events, tagged `milestone`, their ids prefixed with the roadmap's slug (`product.v1`); with
`ics: { items: true }`, its dated items too, over their days. An undated milestone or item does not
cross, without an error. The calendar owns this bridge, so that the roadmap does not depend on the
calendar it feeds ([Bridges](/formats/bridges)).

```md title="course.md"
---
title: Lorem Course
format: calendar
lang: en
timezone: Europe/Paris
view: agenda
include: [../roadmap-product/product.md]
---
```

## In a site

A Récit site publishes a roadmap like any story (`publish:`), at `/<routePrefix>/<slug>`, with its
`.ics` and `.rss` beside the page ([Exports](/formats/roadmap/exports#in-a-site)). In an MDX page:

```mdx
<StoryEmbed slug="product" view="timeline" />
<RoadmapChangelog slug="product" />
```

On a page whose own title already names the list (a « Changelog » page),
`<RoadmapChangelog slug="product" titleHidden />` keeps the list's title for screen readers only.

## Packages

```ts
import { compileStory } from "@recit/core";
import { storyToRoadmap } from "@recit/roadmap";

const story = await compileStory(markdown, { file: "product.md" });
const { roadmap, diagnostics } = await storyToRoadmap(story);
```

| Import                      | Contents                                                                            |
| --------------------------- | ----------------------------------------------------------------------------------- |
| `@recit/roadmap`            | `storyToRoadmap`, `roadmapIcs`, `roadmapRss` (the RSS feed), the filters, the model |
| `@recit/roadmap/components` | the views (`Roadmap`, `NowNextLater`, `Timeline`, `Kanban`, `Changelog`…)           |
| `@recit/roadmap/runtime`    | `mountRoadmap`, the page of `recit dev` and `recit build`                           |
| `@recit/roadmap/styles.css` | the stylesheet of the views                                                         |

## MCP

`describe_format` explains the format and `validate_story` checks a roadmap. The guide is
`recit://guide/roadmap`.
