Skip to content

MDD

The markdown document format: letterhead, header, footer and signature blocks on a markdown file, validated by notdocs and exported as Word or PDF.

Last revised

DocumentationMDD
On this page

What MDD is

MDD, the markdown document format, is markdown for documents that leave the workspace: letters, proposals, invoices, contracts, memos, reports and the legal set. A markdown page has headings, lists and tables; a professional document also has a letterhead, a header and footer that repeat on every page, a signature block and page breaks. MDD adds those as a handful of blocks, and nothing else. The file stays markdown: any editor opens it, git diffs it, and a coding agent writes it the way it writes any other page.

notdocs reads and writes MDD natively. The eleven business and legal document types are MDD documents, the workspace validates them, and the same file exports as a Word document or prints to PDF with the letterhead, the page furniture and the signature block where they belong.

A letter

docs/letters/offer.md
---
id: 01K57Q3M8ZJ0S4V9W2X7Y1AB3C
type: letter
document-type: business-letter
title: Offer
date: 2026-11-05
author: Ada Lovelace
recipient: Kai Tanaka
---

:::letterhead
Acme
1 Analytical Engine Way
London
:::

Dear Kai,

# Offer

We would like to work with you.

Sincerely,

:::signature-block
Ada Lovelace
Founder
:::

The frontmatter carries document-type, date and author, which every MDD tool reads, and notdocs's own type, which picks the schema the workspace checks. The body is markdown with two blocks.

The blocks

BlockWhat it isWhere it goes in Word and print
:::letterhead … :::Who the document is fromThe top of the first page
:::header … :::A line repeated on every page; {{page}} is the page numberThe page header
:::footer … :::The same at the bottomThe page footer
:::contact-info … :::How to reach the senderA block in the flow
:::signature-block … :::Who signs; the rule to sign on is drawn above itA block that stays on one page
::page-breakStart a new page hereA page break
::section-breakA visible break between partsA rule

Blocks do not nest. Inside them, everything is markdown: bold, links, lists and tables all work, and 2^10^ and H~2~O are super- and subscripts. The block spelling is the same directive grammar notdocs uses for callouts and query blocks, so a business document round-trips through the editor, the CLI and an agent byte for byte.

The eleven types

Business

letter, proposal, invoice, contract, memo and report. Each says which blocks it needs: an invoice needs a letterhead and a header, a contract a letterhead and a signature block, and the schema asks for the fields that go with it, from invoice-number to parties and effective-date.

Legal

terms, privacy, nda, dpa and sla. Terms and a privacy policy carry an effective-date; an NDA, a DPA and an SLA carry their parties and are signed. A template for each ships with notdocs, with the blocks the type needs and placeholder text to replace.

A missing required block is an error and a missing recommended one a note, in the workspace, over MCP and from notdocs validate --json. Which blocks and fields each type asks for is in the business documents page of the documentation.

Out as Word or PDF

Export on an open document downloads a Word file or opens the print preview, the document on A4 sheets with its letterhead, header and footer, where the browser's print dialog saves the PDF. On paper the header and footer move into the page margin and, in Chrome and Edge, repeat on every page. From the terminal, notdocs docs export <path> --format docx makes the Word file and --format html the page the preview shows; over MCP, docs.export returns the file, so an agent can draft a proposal, validate it and hand back the Word document in one turn.

Files and tools

A document is a .md file, and an .mdd file is read and saved exactly like one, so a folder of MDD documents written elsewhere is a notdocs workspace as it is. A file that carries MDD's document-type and no type gets the notdocs type that names on first sight, with the id and title it lacks, and nothing else in it changes.

The file is valid MDD outside notdocs too. The mdd command-line tools on npm (@markdownkit/mdd) preview, validate and convert it from a checkout, and the format's remark plugins render it in your own pipeline.

Start from a template: every business and legal type has one, and notdocs docs new docs/letters/offer.md --template letter writes it.