Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Universal YAML Frontmatter Adoption for Machine-Readable Documentation

ADR-26018: Universal YAML Frontmatter Adoption for Machine-Readable Documentation

Title

Universal YAML Frontmatter Adoption for Machine-Readable Documentation

Date

2026-02-02

Status

proposed

Context

Our repository contains heterogeneous documentation formats, including MyST Markdown handbooks (.md) and Jupytext-paired notebooks (.ipynb). Currently, metadata such as ownership, versioning, and status are often embedded as unstructured markdown text in the document body.

This creates significant technical debt:

  1. AI Parseability: LLMs and AI agents (e.g., Aider, Gemini) lack a deterministic interface to query document state, forcing them to rely on expensive and error-prone prose parsing.

  2. Automation Barriers: CLI tools cannot efficiently audit the documentation library (e.g., “Find all stale docs older than 6 months”) without complex regex logic.

  3. Traceability Decay: Without a machine-readable schema, maintaining link integrity and lifecycle status (as defined in ADR-26016) across the entire stack is manually intensive and unverifiable [ISO 29148: Verifiability].

Decision

We will mandate the adoption of YAML frontmatter as the Universal Interface for all documentation artifacts (.md, .ipynb via Jupytext) in the repository.

  1. Mandatory Schema: Every file must contain a YAML block with at least owner, version, and last_modified fields.

  2. Jupytext Integration: For notebooks, the YAML metadata must reside in the paired MyST Markdown file to ensure it is easily diffable and searchable via standard CLI tools.

  3. AI Tooling Alignment: This structured block serves as the primary context injection point for AI assistants, ensuring they understand the “Freshness” and “Authority” of the document before processing the content.

  4. Human-Machine Sync: To ensure human readability in non-rendering environments (like CLI cat), a standardized “Reflection Block” will be injected into the body, automatically synced from the YAML source via pre-commit hooks.

Consequences

Positive

Negative / Risks

Alternatives

References

Participants

  1. Vadim Rudakov

  2. Gemini (Senior DevOps Systems Architect)