Hacker News new | ask | show | jobs
Show HN: MDMA – Markdown extension that makes LLM responses interactive (github.com)
2 points by gitsad 109 days ago
AI responses are plain text. The user reads, then acts manually somewhere else. That gap kept bothering me — and JSON-based approaches made it worse, since a single malformed field breaks the whole payload.

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.

1 comments

Awesome!