Why Ascribe

Docs kept as code, in a repository beside what they document, run into the same few problems. Here’s what Ascribe does about each, and what it doesn’t do.

The problems, and what Ascribe does

Claims about what teams report link to their sources. Anything in main that isn’t in a release yet is marked.

The structure lives in the site generator

Markdown has no standard way to reuse content or to vary it, so each site generator has its own include syntax. The editor treats it as text, and a mistyped include is found when the build fails.

Ascribe puts includes, variants, and page types in the Markdown, defined by a specification. One compiler checks them in the editor, on the command line, and in CI. The note, tabs, steps, and phrases on this page are all Ascribe’s:

install.md
---
type: page
title: Install Quill
---

@note {type=tip}: {product} {version} needs Node.js 22 or later.

## Install the package

@variant {pm=npm}:
```sh
npm install quill
```
@variant {pm=pnpm}:
```sh
pnpm add quill
```
@variant {pm=yarn}:
```sh
yarn add quill
```
@end

## Set it up

@steps
1. Create `quill.yaml` in your project's root.
2. Run `quill init`, which checks it.

Examples stop matching the code

Keeping docs in sync with the product is the challenge documentation teams name most often (State of Docs 2026). Keeping the docs beside the code doesn’t fix it: 28.9% of the 1,000 most popular projects on GitHub had an outdated code reference in their README or wiki (Tan, Wagner, and Treude, 2023).

With @snippet, a code example is read from the code’s own file each time a page is checked or built, so there’s no copy to fall behind. ascribe check reports an example whose file or region is gone, and ascribe drift lists the pages whose examples a pull request changed:

ascribe 0.4.5
compared with main (94c2212), from its merge base with HEAD (8a43d4b)

Examples that no longer resolve. `ascribe check` reports them too:
  guides/install.md
    code:service/client.py#connect: the file has no region `connect`

Examples that changed. The page shows the new code; check the words around it:
  reference/content-model.md
    code:examples/quill/ascribe.toml#dimensions (+3 −1)

Examples that changed along with the page:
  guides/review.md
    code:examples/quill/ascribe.toml#builds (+1 −0)

A review shows lines, not the page

On GitHub, a reviewer can read a Markdown file rendered or comment on its source, but not both (GitHub Community). Read as lines, moved text looks deleted, and a small edit to a wrapped paragraph looks like a rewrite (Sarah Moir, 2024). AI drafting adds to the reading: in State of Docs 2026, 43% of respondents said they spend more time fact-checking.

Review shows a pull request’s changes on the rendered page, in VS Code’s preview or the site’s, with each change marked and each comment beside the block it’s about. Reformatting doesn’t count as a change, a move shows as a move, and a page that changed through a fragment it includes says so.

A page of these docs in the site’s preview during review: a changed paragraph is marked, the pull request’s two comments on it are beside it, and the review panel below names the pull request and its one change. A page of these docs in the site’s preview during review: a changed paragraph is marked, the pull request’s two comments on it are beside it, and the review panel below names the pull request and its one change.

ascribe diff writes the same comparison as text, or as an HTML file that CI can attach to the pull request:

ascribe 0.4.5
compared with main (375192d), from its merge base with HEAD (e49444a)
getting-started.md: 1 changed, 1 added (through _fragments/prereqs.md), in every build
site: 3 more pages changed
  guides/rollouts.md: 4 changed, 5 added, 2 removed, 1 moved
  guides/schedules.md: added
  reference/limits.md: title changed

An AI coding agent can run the same checks. ascribe agents sync gives it the project’s rules and a check to run after each edit, so its links, names, and examples are checked before review.

One page, copied for each version

A copy of the docs for each version of the product means edits land in the wrong copy, and each fix has to be carried to every other copy. Markdown can’t say that a section applies from version 3.4 on, which is what would let one copy serve every version.

Ascribe keeps one copy. A section says where it’s available, as @available: cloud, self-managed preview 3.4 does, and content that differs by platform, product, or deployment is marked with @variant. Each build selects from the same pages: the site can show everything, with badges and tabs, while another build keeps only one deployment or version. These are the builds of an example project:

ascribe.toml
ascribe 0.4.5
[builds.site]
variants = "switch"
availability = "badge"

[builds.cloud]
variants = { deployment = "cloud" }
availability = { filter = "cloud" }

[builds."self-managed-3.5"]
variants = { deployment = "self-managed", pm = ["npm", "pnpm"] }
availability = { filter = "self-managed 3.5" }

ascribe check reports a version or value the content model doesn’t declare, and a section marked available somewhere its page isn’t.

When docs are reorganized, a page’s old address goes away, but links from other pages, search results, and the product still point to it.

In Ascribe, a link names the page’s file. A link to a missing file or heading is an error in the editor and in CI, and moving or renaming a file in VS Code updates the links to it. A link written as an address is reported, with the file to link to instead:

ascribe 0.4.5
[ASC041] Warning: this looks like the published route of `install-agent.md`; link to the file instead: `/install-agent.md`
    ╭─[ docs/keys.md:10:15 ]
    │
 10 │ See [Install](/install-agent/).
    │               ───────┬───────
    │                      ╰───────── link-route
    │
    │ Help: Link to the page's file instead of its route
────╯
checked 8 files for every build, 1 with problems: 0 errors, 1 warning, 0 advice

In VS Code, the warning shows on the link as you type, with a quick fix:

VS Code with a page whose link is written as an address: the link is underlined, the Problems view says to link to the file instead, and the quick fix menu offers “Link to the page’s file instead of its route”. VS Code with a page whose link is written as an address: the link is underlined, the Problems view says to link to the file instead, and the quick fix menu offers “Link to the page’s file instead of its route”.

For links from outside the docs, a page or heading can have a permalink: a name whose address follows it wherever it moves. With the list of permalinks committed, ascribe check warns when one goes away. Ascribe’s command and editor link to these docs by permalink, which is how the docs moved to /docs/ without breaking those links.

Pages that are code, and a site to keep

Free site generators are cheap to adopt and costly to maintain (Write the Docs, May 2024). Generators stop releasing or change their plugin systems, and where a page is compiled as code, as an MDX page is, a brace or angle bracket in a sentence can break the build.

A directive is a line that starts with @, and there’s no JSX, so a brace or angle bracket in a sentence can’t break the build. At most, a {name} the project doesn’t declare gets a warning. The plain output is CommonMark, so you can take your content with you, though the reuse is flattened into each page. Ascribe is still a young dependency.

What it doesn’t do

By design

For now

The same page in other formats

examples/comparison has one page written four ways: in Ascribe, and as three open-source documentation sites write theirs, with a table of how each says the same thing. A test runs ascribe check on the Ascribe version on every change.

Try it

Getting started sets up a project, writes a first page, checks it, and publishes it. The landing page shows a page’s source beside what a reader sees.