---
id: DEC-000001
title: Canonical source format
summary: CommonMark with YAML front matter is the canonical format; structure is enforced by JSON Schema and a section registry, not by an XML vocabulary.
schema: 1
revision: 1
status: draft
visibility: public
created: 2026-12-03
taxonomy: [TAX-000043, TAX-000042]
relations:
  - {type: supports, target: STD-000001}
  - {type: references, target: REF-000012}
  - {type: references, target: REF-000009}
contributors:
  - {name: xmzr, role: author}
  - {name: Claude Opus 5.5, role: drafting, agent: true}
changes: Initial draft.
---

## Context

The canonical text format must be readable without special software for several decades. It must have low authoring friction for daily use, and it must allow mechanical validation of structure. The project brief named Markdown as a candidate and asked for DITA, DocBook, AsciiDoc, Typst and Quarto to be evaluated.

## Options

Table 1. Candidate formats. Ratings are qualitative judgements, not measurements.

| Format | Readable as plain text | Authoring friction | Structural enforcement | Tool longevity risk |
|---|---|---|---|---|
| CommonMark + YAML front matter | High | Low | Front matter by schema; body by heading rules | Low: many independent parsers |
| AsciiDoc | High | Low to medium | Medium: attributes, roles | Medium: one dominant toolchain |
| DITA / DocBook (XML) | Low | High | High: DTD or schema validation | Medium: shrinking tool base |
| Typst | Medium | Medium | Low: markup language with scripting | High: young, single implementation |
| Quarto (`.qmd`) | High | Low | Low | Medium: depends on Quarto and Pandoc releases |

XML vocabularies give the strongest structural guarantees. Those guarantees target large documentation sets with many writers. In this repository the main structural needs are typed metadata, typed relations and a fixed section order per type. A schema on front matter and a heading check on the body meet these needs.

## Decision

1. Objects are CommonMark [[REF-000012]] files with YAML front matter.
2. Front matter is validated against a JSON Schema 2020-12 document [[REF-000009]].
3. Body structure is validated against required level-2 headings per type (`schema/types.yaml`).
4. The only syntax extension is the inline reference `[[ID]]` or `[[ID@N]]`. Tables, footnotes and definition lists use widely supported Markdown extensions.
5. Quarto MAY be used to produce analysis documents. Its rendered output is registered as an artifact. A `.qmd` file is not an object.

## Consequences

- Every object is readable in any text editor and renders acceptably on common code-hosting sites.
- Inline semantics are weaker than in XML. Statement categories are carried by section and wording (STD-000002 R4), not by markup. If this proves insufficient, a later decision MAY add an inline marker syntax.
- Mathematical notation is written in LaTeX syntax inside `$...$`. Rendering is deferred until the first object that needs it.
