Conversation
blipiec
approved these changes
Mar 13, 2026
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Redundant assertion duplicated across defaultTest and every test
- Removed
yaml-not-json.mjsfromdefaultTest.assertso each test now runs that assertion only once via its ownassertlist.
- Removed
Or push these changes by commenting:
@cursor push afbfea611b
Preview (afbfea611b)
diff --git a/evals/promptfooconfig.prompt-builder.yaml b/evals/promptfooconfig.prompt-builder.yaml
--- a/evals/promptfooconfig.prompt-builder.yaml
+++ b/evals/promptfooconfig.prompt-builder.yaml
@@ -20,9 +20,6 @@
defaultTest:
assert:
- # Every generated customPrompt must use YAML, not JSON
- - type: javascript
- value: file://assertions/yaml-not-json.mjs
# Validate any embedded mdma blocks are structurally correct MDMA
- type: javascript
value: file://assertions/validate-mdma-examples.mjsThis Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
barlipdev
approved these changes
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What does this PR do?
Added CLI for creating custom prompt with MDMA components
Type of Change
Packages Affected
@mobile-reality/mdma-cliHow to Test
Unit Tests (no API key needed)
Run all CLI tests: pnpm --filter @mobile-reality/mdma-cli test
Covers 84 tests across 4 files:
Validate command — verifies document validation logic
Master Prompt — checks prompt structure, YAML enforcement, required sections, and component scope rules
Serialize config — ensures user configurations are correctly serialized for the LLM
Sample presets — validates that built-in presets (KYC, patient intake, incident triage, etc.) produce correct output within size limits
LLM Evals (requires OpenAI API key)
Setup: add OPENAI_API_KEY=sk-... to evals/.env
Run: pnpm eval:prompt-builder
Sends 25 real configurations to GPT-4.1 and validates the generated prompts against:
YAML format correctness (no JSON in mdma blocks)
MDMA schema validation (embedded examples must be valid)
Field and trigger rule coverage
Component scope compliance (no hallucinated components)
Prompt length and structure checks
From the monorepo root — build first, then launch
pnpm build
pnpm --filter @mobile-reality/mdma-cli dev
This starts the web app (defaults to http://localhost:4200) and opens it in your browser.
How to use it:
Pick your LLM provider — top of the chat panel, select OpenAI/Anthropic/Groq/Ollama/etc. and paste your API key
Set domain info — fill in the flow name, domain (e.g. "finance"), description, and business rules
Select components — check the MDMA types you need (form, table, approval-gate, etc.)
Configure each component — expand to set fields, labels, required/sensitive flags, roles, items, etc.
Set trigger rules — define when the AI should generate MDMA components (keywords, contextual conditions)
Click Generate — the LLM creates a tailored customPrompt via streaming
Refine — chat to iterate ("make email required", "add a webhook for Slack")
Copy/Save — grab the final prompt and use it in your app:
import { buildSystemPrompt } from '@mobile-reality/mdma-prompt-pack';
const systemPrompt = buildSystemPrompt({
customPrompt: '',
});
Note
Low Risk
Low risk: changes are limited to documentation and developer tooling/evals; no runtime parsing/rendering/business logic is modified.
Overview
Adds first-class documentation for the new
@mobile-reality/mdma-cli, including install/run instructions,validateusage, and updates to the package/architecture tables and roadmap.Extends
@mobile-reality/mdma-evalswith a new prompt builder verification suite (pnpm eval:prompt-builder): introduces promptfoo config + prompt function that feeds the CLIMASTER_PROMPT, plus new JavaScript assertions to check YAML (not JSON), validate embeddedmdmaexamples, enforce prompt structure/length, and ensure triggers/fields/spec repetition constraints. Root scripts are updated to expose the new eval target.Written by Cursor Bugbot for commit c87da0f. This will update automatically on new commits. Configure here.