Version: 1.0.0 Status: Stable Last Updated: 2026-01-15
This document specifies the Structured MADR format, an extension of MADR (Markdown Architectural Decision Records) that adds machine-readable YAML frontmatter, comprehensive option analysis with risk assessments, and required audit sections for compliance tracking.
This is the official specification for Structured MADR version 1.0.0. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
Structured MADR provides a standardized format for documenting architectural decisions that is:
- Human-readable - Clear prose documentation for developers
- Machine-parseable - Structured metadata for tooling
- Auditable - Built-in compliance tracking
- Comprehensive - Complete option analysis with risk assessment
Structured MADR is a superset of MADR 4.0.0. Any valid MADR document can be converted to Structured MADR by adding the required frontmatter and audit section. The body sections follow MADR conventions with extensions for hierarchical organization.
- Backward Compatibility - MADR-compatible section structure
- Forward Compatibility - Extensible frontmatter schema
- Tool Interoperability - Standard YAML and Markdown
- AI Optimization - Metadata designed for LLM context injection
A Structured MADR document MUST contain the following components in order:
- YAML Frontmatter (Section 3)
- Title (Section 4.1)
- Status Section (Section 4.2)
- Context Section (Section 4.3)
- Decision Drivers Section (Section 4.4)
- Considered Options Section (Section 4.5)
- Decision Section (Section 4.6)
- Consequences Section (Section 4.7)
- Decision Outcome Section (Section 4.8)
- Related Decisions Section (Section 4.9)
- Links Section (Section 4.10)
- More Information Section (Section 4.11)
- Audit Section (Section 4.12)
The frontmatter MUST be enclosed in YAML document markers (---) at the beginning of the file.
---
# Frontmatter content
---The following fields MUST be present in every Structured MADR document:
- Type: string
- Description: A short, descriptive title for the decision
- Constraints:
- MUST be non-empty
- SHOULD be 60 characters or fewer
- SHOULD use title case
title: "Use PostgreSQL for Primary Storage"- Type: string
- Description: A one-sentence summary of the decision
- Constraints:
- MUST be non-empty
- SHOULD be 160 characters or fewer
description: "Decision to adopt PostgreSQL as the primary database for the application"- Type: string
- Description: Document type identifier
- Constraints:
- MUST be exactly
"adr"
- MUST be exactly
type: adr- Type: string
- Description: The category of decision
- Constraints:
- MUST be non-empty
- RECOMMENDED values:
architecture,api,security,performance,infrastructure,migration,integration,data,testing
category: architecture- Type: array of strings
- Description: Keywords for categorization and search
- Constraints:
- MUST contain at least one tag
- Tags SHOULD be lowercase with hyphens for multi-word tags
tags:
- database
- postgresql
- storage- Type: string (enum)
- Description: Current status of the decision
- Allowed Values:
proposed- Decision is under considerationaccepted- Decision has been approved and is in effectdeprecated- Decision is no longer recommendedsuperseded- Decision has been replaced by another ADR
- Constraints:
- MUST be one of the allowed values
status: accepted- Type: date
- Description: Date the ADR was created
- Format: ISO 8601 date (YYYY-MM-DD)
created: 2025-01-15- Type: date
- Description: Date the ADR was last modified
- Format: ISO 8601 date (YYYY-MM-DD)
- Constraints:
- MUST be greater than or equal to
created
- MUST be greater than or equal to
updated: 2025-01-20- Type: string
- Description: The author or team responsible for the decision
- Constraints:
- MUST be non-empty
author: Architecture Team- Type: string
- Description: The project this decision applies to
- Constraints:
- MUST be non-empty
- SHOULD be a consistent identifier across all project ADRs
project: my-applicationThe following fields MAY be present:
- Type: array of strings
- Description: Technologies referenced or affected by this decision
technologies:
- postgresql
- rust
- tokio- Type: array of strings
- Description: Intended readers of this ADR
- RECOMMENDED values:
developers,architects,operators,stakeholders
audience:
- developers
- architects- Type: array of strings
- Description: Filenames of related ADRs
- Constraints:
- SHOULD be relative filenames within the same ADR directory
related:
- adr_0001.md
- adr_0005.mdThe document title MUST be an H1 heading in the format:
# ADR-{NUMBER}: {TITLE}Where:
{NUMBER}is a unique identifier (typically zero-padded, e.g.,0001){TITLE}matches the frontmattertitlefield
The status section MUST be an H2 heading containing the current status.
## Status
AcceptedIf the ADR supersedes another, this SHOULD be noted:
## Status
Accepted
Supersedes ADR-0003The context section MUST be an H2 heading with the following subsections:
An H3 subsection describing the situation requiring a decision.
## Context
### Background and Problem Statement
{Description of the context and the problem being solved}An H3 subsection listing limitations of the current approach.
### Current Limitations
{Numbered or bulleted list of limitations}The decision drivers section MUST be an H2 heading with hierarchical subsections:
An H3 subsection listing the most important factors.
## Decision Drivers
### Primary Decision Drivers
1. **{Driver Name}**: {Explanation}
2. **{Driver Name}**: {Explanation}An H3 subsection listing influential but non-decisive factors.
### Secondary Decision Drivers
1. **{Driver Name}**: {Explanation}The options section MUST be an H2 heading with an H3 subsection for each option.
Each option MUST include:
- Description - Brief overview
- Technical Characteristics - Key technical attributes
- Advantages - Benefits of this option
- Disadvantages - Drawbacks of this option
Each option SHOULD include:
- Risk Assessment - Technical, schedule, and ecosystem risk ratings
Each option MAY include:
- Disqualifying Factor - Reason for rejection (if applicable)
## Considered Options
### Option 1: {Title}
**Description**: {Brief description}
**Technical Characteristics**:
- {Characteristic 1}
- {Characteristic 2}
**Advantages**:
- {Advantage 1}
- {Advantage 2}
**Disadvantages**:
- {Disadvantage 1}
- {Disadvantage 2}
**Risk Assessment**:
- **Technical Risk**: {Low|Medium|High}. {Explanation}
- **Schedule Risk**: {Low|Medium|High}. {Explanation}
- **Ecosystem Risk**: {Low|Medium|High}. {Explanation}The decision section MUST be an H2 heading stating the chosen option and implementation details.
## Decision
{Clear statement of the decision}
The implementation will use:
- **{Component}** for {purpose}
- **{Component}** for {purpose}The consequences section MUST be an H2 heading with three subsections:
## Consequences
### Positive
1. **{Title}**: {Description}
### Negative
1. **{Title}**: {Description}
### Neutral
1. **{Title}**: {Description}The outcome section MUST be an H2 heading summarizing results and mitigations.
## Decision Outcome
{Summary of how objectives are achieved}
Mitigations:
- {Mitigation for negative consequence}The related decisions section MUST be an H2 heading linking to related ADRs.
## Related Decisions
- [ADR-{NUMBER}: {Title}]({filename}) - {Relationship description}The links section MUST be an H2 heading with external resources.
## Links
- [{Resource Name}]({URL}) - {Description}The more information section MUST be an H2 heading with metadata.
## More Information
- **Date:** {DATE}
- **Source:** {Reference}
- **Related ADRs:** {List}The audit section MUST be an H2 heading and MUST be present in all Structured MADR documents.
Each audit entry MUST be an H3 heading with the audit date and contain:
- Status - Audit result
- Findings - Table of specific findings
- Summary - Brief summary
- Action Required - Required remediation
## Audit
### {YYYY-MM-DD}
**Status:** {Pending|Compliant|Non-Compliant|Partial}
**Findings:**
| Finding | Files | Lines | Assessment |
|---------|-------|-------|------------|
| {Description} | `{file}` | L{n}-L{m} | {compliant|non-compliant|partial} |
**Summary:** {Brief summary}
**Action Required:** {None|Description of required actions}New ADRs SHOULD have an initial audit entry with status Pending:
## Audit
### {DATE}
**Status:** Pending
**Findings:**
| Finding | Files | Lines | Assessment |
|---------|-------|-------|------------|
| Awaiting implementation | - | - | pending |
**Summary:** ADR created, awaiting implementation.
**Action Required:** Implement decision and auditStructured MADR files SHOULD follow the naming convention:
{NUMBER}-{slug}.md
Or:
adr_{NUMBER}.md
Where:
{NUMBER}is a zero-padded identifier (e.g.,0001,0042){slug}is a URL-friendly version of the title
Examples:
0001-use-postgresql-for-primary-storage.mdadr_0001.md
A Structured MADR document is valid if:
- The YAML frontmatter is syntactically valid YAML
- All required frontmatter fields are present with valid values
- All required body sections are present
- The audit section contains at least one entry
- The document conforms to the JSON Schema in
schemas/structured-madr.schema.json
Implementations MAY add custom frontmatter fields prefixed with x-:
x-review-board: ["alice", "bob"]
x-implementation-phase: 2Custom fields MUST NOT conflict with reserved field names.
Implementations MAY add custom sections after the Audit section.
The RECOMMENDED MIME type for Structured MADR documents is:
text/markdown; variant=structured-madr
- Frontmatter SHOULD NOT contain sensitive information
- File paths in audit findings SHOULD be relative
- External links SHOULD use HTTPS
See examples/complete-example.md for a fully compliant example.
- Initial release
- YAML frontmatter specification
- Body section requirements
- Audit section specification
- JSON Schema definition