# Resource Evaluation: MDMA (MobileReality) **URL (trigger)**: https://github.com/MobileReality/mdma **Primary Sources**: MDMA GitHub repository (README, docs, evals), local audit of the source tree at `/Users/florianbruniaux/Sites/divers-test/mdma` **Type**: Open-source library / DSL for agent-generated interactive UI **Evaluated**: 2026-07-07 **Score**: 3/5 (MODERATE, integrate when time available) --- ## Executive Summary MDMA is an open-source project that defines a Markdown-with-embedded-YAML dialect for interactive UI (forms, buttons, tables, approval gates), designed to be produced reliably by small or fine-tuned LLMs and validated deterministically before rendering. Three independent audit agents examined the source tree and reached a consistent picture: the core engineering (parser, validator, fixer pipeline, eval methodology) is genuinely solid, but several marketing claims don't survive contact with the code, and there's a real functional bug in the shipped form component. **Why 3/5**: The validator/fixer architecture and the honest eval framing are worth documenting as a reference pattern for anyone building a similar small-model-output-reliability pipeline. But the gap between claimed and actual behavior (a form component whose "required" fields aren't enforced, "runs anywhere" that doesn't apply to rendering, non-cryptographic hashes marketed alongside "audit-log"/"pii" keywords) means this isn't a "go build on this in production" recommendation without independently fixing the validation gap first. --- ## Content Analysis ### Key Facts (Verified) 1. **Deterministic validator/fixer pipeline**: single pass, no additional LLM call, regex-based extraction tolerant of malformed markdown, 22 rule files under `/Users/florianbruniaux/Sites/divers-test/mdma/packages/validator/src/rules` (19 documented in the README, 22 counted in the source at audit time), ordered fixers for field-type inference, YAML key typo correction, and binding repair. 2. **Standard parsing**: built on remark/unified as a proper plugin, with explicit handling of streaming state (distinguishes a block still generating from one that's genuinely malformed). 3. **Eval methodology**: uses promptfoo with custom assertions, documented with a "not 100%, observations not conclusions" framing in `/Users/florianbruniaux/Sites/divers-test/mdma/evals/own-model/README.md`. Measured result: 41% success with a bare prompt versus 90.5% with the DSL and validator combined, on their own fine-tuned model served via Modal/Hugging Face. 4. **"Runs anywhere" for core packages**: `spec`, `parser`, `validator`, and `runtime` packages contain zero Node-specific imports (`fs`, `path`, `crypto`), confirmed by grep across all four package source trees. 5. **CI hygiene**: GitHub Actions pinned by commit SHA in `.github/workflows/ci.yml` and `release.yml` (e.g. `actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6`), changesets-based per-package versioning, a `turbo run test` test suite spanning all packages. 6. **Package structure**: 10 packages (`spec`, `parser`, `validator`, `runtime`, `attachables-core`, `renderer-react`, `cli`, `mcp`, `agui`, `prompt-pack`), each independently versioned and published under the `@mobile-reality` npm org. ### Fact-Check: Claims vs. Code | Claim | Status | Evidence | |-------|--------|----------| | "Guarantees valid UI" | ❌ Overstated | 90.5% measured, not 100% (`evals/own-model/README.md`) | | Own eval results file shows 100% | ⚠️ Internal contradiction | `evals/own-model/results.json`: 95/95 pass (100%) dated 2026-06-30, unreconciled with the README's 90.5% figure for the same eval track | | "Runs anywhere" | ⚠️ Partially true | True for `spec`/`parser`/`validator`/`runtime` (zero Node imports, verified). False for rendering: exactly one renderer exists, `@mobile-reality/mdma-renderer-react`, 100% React | | Chart component renders charts | ❌ Misleading | `ChartRenderer.tsx` parses CSV and renders an HTML `