Status: Stable Depends on: §00 (terminology, priority order, authoring modes), §02 (frontmatter)
MDA defines two file roles distinguished by extension. .mda is the source form (rich, MDA-superset, author-facing). .md is the compiled output form (drop-in compatible with whichever third-party standard the filename names). The MDA compiler is a one-way transform from source to one or more outputs.
Per §0.6, both forms MAY also be authored directly (Agent mode and Human mode). The compile direction is one of three equivalent paths to a conforming .md.
A .mda file MAY use the full MDA superset:
- All open-standard frontmatter fields (§02-2) at the top level.
- All MDA-extended frontmatter fields (§02-3) at the top level.
- Footnote relationship JSON (§03).
- Any vendor namespace under
metadata.<vendor>(§04). - Optional
integrityandsignatures[](§08, §09); typically compiler-emitted on the output, but MAY be present in source for a sign-the-source workflow. A source-mode anchor covers source bytes only and is NOT comparable to any output-mode anchor (§08-5).
.mda files are not expected to be loaded directly by any third-party agent runtime. Their canonical consumer is the MDA compiler.
A .md file emitted by the compiler (or written directly in Human/Agent mode) MUST conform to the target schema selected by its filename. The target is identified by the filename literal, not by inspection of the content.
| Filename | Tier | Target standard / consumer | Spec section |
|---|---|---|---|
SKILL.md |
1 | agentskills.io v1 — Claude Code, OpenCode, OpenAI Codex, Hermes Agent, OpenClaw, skills.sh, Cursor, Windsurf | §06-targets/skill-md.md |
AGENTS.md |
1 | agents.md repo-instruction convention (AAIF-stewarded) — Codex CLI, GitHub Copilot, Cursor, Windsurf, Amp, Devin, Gemini CLI, VS Code, Jules, Factory | §06-targets/agents-md.md |
MCP-SERVER.md |
2 | MDA-defined Markdown description of an MCP server, with sidecar mcp-server.json (AAIF-stewarded MCP) |
§06-targets/mcp-server-md.md |
CLAUDE.md |
2 | Claude Code persistent project memory | §06-targets/claude-md.md (stub) |
A file with an extension other than .md is not a compiled output for the purposes of this specification, even if its content happens to satisfy a target schema.
A .mda source MAY happen to satisfy a target schema verbatim — for example, when the author wrote it without any MDA-extended top-level fields. In that case the compile step is the identity transform and the byte-identical file MAY be saved with extension .md to make it discoverable by third-party tools.
The reverse direction (.md → .mda) is not part of this specification.
┌─────────────────────────┐
│ <name>.mda (source) │ ← MDA superset
└────────────┬────────────┘
│ mda compile
▼
┌─────────────────────────────────────────────────────────┐
│ <name>/SKILL.md (+ scripts/, references/, assets/) │
│ AGENTS.md │
│ <name>/MCP-SERVER.md (+ mcp-server.json sidecar) │
│ CLAUDE.md │
└─────────────────────────────────────────────────────────┘
drop-in compatible
A single .mda source MAY emit multiple outputs in one compile (for example, both a SKILL.md and an AGENTS.md for the same capability). Each output is independently validated against its target schema.
When emitting any compiled output, a conforming compiler MUST:
- Lift open-standard fields (
name,description, and any oflicense,compatibility,metadata,allowed-toolsthat the source declares and the target permits) to top-level frontmatter and validate them against §02-2. - Relocate MDA-extended fields under
metadata.mda.*. No MDA-extended field may remain at the top level of the output. - Mirror footnote relationship payloads per §03 to
metadata.mda.relationships. The mirror is the authoritative machine-readable copy in the output. - Compute
integrityper §08 if and only if the source requested it (presence of anintegrity:placeholder, or--integrityCLI flag) or anysignatures[]entry is being emitted. Otherwise omit the field. - Validate the output against its target schema before declaring the compile successful. A compile that produces invalid output MUST exit non-zero.
Compilers MUST NOT:
- Rewrite or restructure body prose for size budgets (§05 progressive disclosure is informative guidance for authors; the compiler is not responsible for editorial relocation).
- Emit unknown vendor namespaces from the source into target-specific sibling files (sibling-file projection was considered and cut from v1.0).
Authors are not required to produce conforming outputs by hand — that is the compiler's job for compiled mode. For Human and Agent modes, the same .md MUST be produced directly. Either way:
- Source-mode authors write a
.mdasource that validates againstschemas/frontmatter-source.schema.json. - Direct-mode authors write a
.mdthat validates against the relevant target schema. - All authors choose meaningful kebab-case
namevalues. - All authors keep body content within reasonable size for the intended target (§05 informative guidance).
- Source-mode authors select targets via the compiler CLI (e.g.
mda compile foo.mda --target skill-md,agents-md); the source itself does not declare its outputs.
See examples/source-only/ for a .mda source that exercises common MDA-extended features, and examples/skill-md/ for the same content compiled to a SKILL.md package.
Human and agent-author recipes are in docs/create-sign-verify-mda.md.
Conformance fixtures that exercise the compile direction live under conformance/compile/, indexed by conformance/manifest.yaml.