MDMA extends Markdown with interactive components defined in fenced `mdma` code blocks (YAML inside). When an LLM knows the spec, it can respond with rendered forms, approval gates, tables, and webhooks instead of prose instructions. Because it's built on top of Markdown + YAML, parsing is deterministic — there's no runtime JS in the document and malformed blocks degrade gracefully rather than crashing.
The library includes a remark-based parser, a headless runtime with reactive bindings and a policy engine, a React renderer, and a prompt-pack that teaches LLMs how to generate valid MDMA. There's also a promptfoo eval suite to verify generation quality before shipping.
Available on npm under @mobile-reality. MIT.
Happy to discuss the spec design or tradeoffs vs structured JSON output.
mattsadowsky•1h ago