madr/metadata-format
Reports an ADR whose metadata is written in a format that the configured madrVersion does not read.
madrVersion decides where metadata comes from. v2 reads the list under the title (* Status: accepted), and v3/v4 read YAML frontmatter. Metadata in the other format is not read at all, so its fields (status, date, …) would go unchecked with no message. This rule reports that case.
Under madrVersion: 'auto' (the default), the version is detected from each file’s format, so this rule never reports.
What it checks
Section titled “What it checks”expectedFrontmatter—madrVersionisv3orv4, and the file has a metadata list under the title but no MADR frontmatter.expectedList—madrVersionisv2, and the file has MADR frontmatter.
Both are file-level diagnostics with data.version set to the configured version. A file with no metadata is valid: every metadata field is optional in the MADR templates.
Frontmatter counts as MADR frontmatter when it holds at least one MADR field: status, date, deciders, decision-makers, consulted, or informed. Frontmatter with only site-generator keys, such as Jekyll’s title and nav_order, is not MADR metadata, so a v2 ADR can keep it beside its metadata list.
Examples
Section titled “Examples”With madrVersion: 'v4':
---status: accepteddate: 2026-11-11---
# Use PostgreSQLWith madrVersion: 'v2':
# Use PostgreSQL
* Status: accepted* Date: 2026-11-11Invalid
Section titled “Invalid”With madrVersion: 'v4':
# Use PostgreSQL
* Status: accepted* Date: 2026-11-11Emits 1 diagnostic: Metadata is written as a body list, but madrVersion "v4" reads YAML frontmatter.
Options
Section titled “Options”None.
MADR version compatibility
Section titled “MADR version compatibility”| Version | Applies |
|---|---|
| v2 | yes |
| v3 | yes |
| v4 | yes |
The v2 template (2.1.2) puts metadata in a list under the title. The v3 (3.0.0) and v4 (4.0.0) templates use YAML frontmatter.
When to disable
Section titled “When to disable”Fix the mismatch instead: move the metadata to the format your madrVersion reads, or set madrVersion to 'auto' for a repository that mixes formats. Disabling the rule leaves the mismatched files’ metadata unchecked.
Like all rules, this rule can be suppressed inline — see Suppressing rules.