The Email Specification is a platform-agnostic, sourced checklist of what reliable email does: message format, authentication, deliverability, accessible content, client-safe rendering, privacy, internationalisation, lifecycle handling, security, and machine-readable automation.
It follows the product architecture of The Website Specification, adapted to the entire email delivery and rendering chain.
Topic Markdown under src/content/spec/ generates:
- browsable HTML topic and category pages;
- an interactive checklist and Markdown download;
- per-topic Markdown alternates;
- category sitemaps, schema graph, schema map, RSS, and
llms.txt; llms-full.txtand an OKF bundle;- the Pagefind search index;
- a bundled manifest for the MCP and A2A Worker.
Requires Node.js 22.12 or newer.
npm install
npm run dev # site: http://localhost:31337
npm run mcp:dev # MCP Worker: http://localhost:31338
npm run build
npm run check
npm run mcp:typecheck
npm run mcp:dry-runPlausible runs only on specification.email, so local development and preview deployments do not generate pageviews. The shared layout loads /js/script.js and sends events to /api/event, following Plausible's proxy setup.
Both routes are Cloudflare Pages Functions. The script proxy uses the site's pa-I1I9vqcv36EL957gGy5_P.js tracker and caches successful responses for one hour. The event proxy forwards the visitor IP and user agent, strips cookies and credentials, and never caches events. No additional bindings, secrets, or CSP changes are needed. Deploy the functions directory together with the site using the existing Pages deployment workflow.
Browser errors and 10% of page loads are reported to GlitchTip with @sentry/browser (src/components/Diagnostics.astro). The SDK sends envelopes to the same-origin tunnel /api/diagnostics, a Pages Function (functions/api/diagnostics.ts) that forwards one error or transaction per request to a fixed GlitchTip project. It enforces the site Origin, a 64 KB limit, 20 requests per minute per IP and 2,000 per day, using HMAC-hashed IPs in D1 that expire within minutes, and it scrubs user data, cookies, headers, bodies, and query strings.
Configuration lives in the Cloudflare Pages project, not in this repository:
Run npm run functions:typecheck and npm run diagnostics:test (end-to-end against a mock upstream; takes about three minutes) after changing the tunnel.
The stateless, read-only Worker exposes search, list_topics, get_topic, get_checklist, get_categories, and get_changes, plus an audit_email prompt. Its production endpoint is configured as https://mcp.specification.email/mcp.
- Pick a category under
src/content/spec/. - Copy an existing Markdown file.
- Set title, summary, status, order, related slugs, and at least one authoritative source.
- Use the standard sections: What it is, Why it matters, How to implement, Common mistakes, Verification.
- Add a changelog entry for material additions or status changes.
Code is available under the MIT licence. Specification content is available under CC BY 4.0.
