mxcli Developer Experience Report — Building a Full MVP via AI Agent
Context
Built a complete Mendix MVP (HomeBudget — 7 entities, 16 microflows, 9 pages, security, navigation) entirely through mxcli/MDL as an AI coding agent (Claude). Platform: macOS ARM64, mxcli via Docker, Mendix 11.8.0.
Goal: validate "app from scratch via CLI" workflow without Studio Pro.
Result: ~80% achievable via CLI. The remaining 20% requires Studio Pro or produces corrupted output.
Critical Issues
1. Fresh MPR missing .mxunit files — MPR corrupted, Studio Pro can't open
Severity: Critical (data loss / unusable output)
After building the app via mxcli on a template MPR, Studio Pro crashes:
DirectoryNotFoundException: mprcontents/7e/75/7e750ca7-3832-4feb-a388-3bc0d5ea84ab.mxunit
Root cause: mxcli registers units in the SQLite Unit table but does not write .mxunit content files for container-type units (root, modules, folders, ProjectDocuments). The DB has 407 entries; only 38 files exist on disk.
Resolution: Use mx create-project first (produces 369 base files), then replay MDL scripts. But this isn't documented as a requirement — the existing template MPR silently produces corrupted output.
Suggestions:
- Write a
.mxunit file for every unit inserted into the Unit table
- Or add
mxcli doctor/mxcli repair to detect and fix missing files
- Document: "Never use a manually-created MPR. Always start with
mxcli new or mx create-project"
2. Quoted identifiers stored literally in BSON → CE1613 errors
Severity: High (35 build errors from one cause)
The MDL docs and skill files advise "always quote all identifiers" for safety. mxcli stores the quotes literally in BSON. mx check then reports:
CE1613: The selected attribute 'HomeBudget.Transaction."Amount"' no longer exists.
Affects: VALIDATION FEEDBACK paths, XPath in access rules, page widget bindings.
Suggestion: Strip quotes before writing to BSON, or reject quoted identifiers in contexts where they cause corruption.
3. set $Object/Association = $Target fails for writes
Severity: High (every association assignment affected)
XPath-style association access works for reads ($Order/Module.Order_Customer/Name) but fails for writes. The error message ("variable not declared") gives no hint about read-vs-write semantics.
Workaround: change $Object (Module.Association = $Target);
Suggestion: Either support write syntax or emit a clear error: "Use CHANGE to set associations."
Blockers on Fresh Projects
4. Project security "not found" on fresh MPR (pre-mx create-project)
alter project security level production → "project security not found." Blocks user roles, demo users, security level. Resolved by using mx create-project which includes the security document.
5. Navigation document missing on fresh MPR (pre-mx create-project)
CREATE OR REPLACE NAVIGATION Responsive → "no navigation document found." The "CREATE" part doesn't create the document. Also resolved by mx create-project.
6. Atlas Core module not included
Pages reference Atlas_Core.Atlas_Default layout — doesn't exist in fresh project. Pages created layoutless.
Suggestion: An mxcli init command that bootstraps security + navigation + Atlas Core would make the "app from scratch" workflow viable.
Lint Rule Issues
| Issue |
Impact |
| MPR001 vs CONV004 contradict (ENUM_ prefix vs PascalCase) |
Impossible to satisfy both |
QUAL004 false positive — reports microflows as "not called" despite having callers (confirmed via SHOW CALLERS) |
Noise |
| CONV002 flags trivial numeric defaults (0) as needing BCR_ microflows |
Noise |
| CONV015 flags entity validation rules even with coexisting VAL_ microflows |
Noise |
CONV003 page naming suffix list too narrow (rejects Dashboard, _Edit) |
Noise |
| MPR008 merge node overlaps unfixable via MDL (auto-placed, not addressable) |
Can't achieve clean baseline |
No suppression mechanism (--disable RULE or inline -- nolint:RULE) |
Can't establish CI baseline |
Suggestion: Add --disable flag or .mxcli-lint.yaml config. Fix QUAL004 to check microflow→microflow call graph. Resolve MPR001/CONV004 contradiction.
Parser / Syntax Issues
| Expected |
Actual |
Severity |
RENAME PAGE Module.Old TO Module.New |
Not implemented |
Medium |
DataGrid2 filters (textfilter, dropdownfilter) |
Parse error — documented but not in parser |
Medium |
GRANT ... (write ("Attr")) with quoted identifier |
Parser rejects quotes inside write() |
Low |
RENAME ENUMERATION Mod.Old TO Mod.New |
Target cannot include module prefix |
Low |
| Page forward references in same script |
Fails — must create edit pages before overview pages |
Medium |
Minor / Documentation Issues
| Issue |
Notes |
| Linux ARM64 binary on macOS |
Requires Docker for every command |
LOOP requires explicit BEGIN keyword |
Skill docs unclear about this |
Demo user requires ENTITY clause with multiple System.User subtypes |
Clear error message, easy fix |
| Password policy enforces 12+ chars in Production |
Unexpected from examples showing shorter |
| MPR filename stored internally — renaming breaks Studio Pro |
StorageMprNameDiscrepancyException |
| Association reads with quoted names in XPath |
Reference checker initially confusing |
What Works Well
- Domain model creation — entity/association/enumeration syntax is clean and productive
- Microflow authoring — control flow, RETRIEVE, CRUD, error handling all work
- Page creation — core widget set (DATAGRID, DATAVIEW, TEXTBOX, ACTIONBUTTON) covers essentials
- SHOW/DESCRIBE/SHOW CALLERS — invaluable for autonomous exploration
- Script files +
mxcli check — repeatable, versionable, catchable before execution
- Catalog queries — powerful for programmatic analysis
mx create-project — once discovered, solves the fresh project problem cleanly
Top Suggestions (Priority Order)
- Fix .mxunit file generation — write content files for all registered units (Critical bug)
- Strip quoted identifiers before BSON serialization — or reject them in affected contexts
mxcli init command — bootstrap security + navigation + Atlas Core on fresh projects
- Lint rule suppression —
--disable flag or config file for CI integration
- Implement DataGrid2 filters in parser — documented features should work
- Fix QUAL004 false positives — check microflow call graph, not just page/navigation refs
- Clear error for association write syntax — point users to
change pattern
Environment
- mxcli version: v0.7.0-dirty (2026-04-21, main branch, Linux ARM64 ELF, run via Docker)
- Mendix version: 11.8.0
- Agent: OpenCode (Claude claude-opus-4.6)
- OS: macOS 15.x ARM64
- Workflow: MDL scripts in
mdlsource/, validated via mxcli check, executed via mxcli exec
mxcli Developer Experience Report — Building a Full MVP via AI Agent
Context
Built a complete Mendix MVP (HomeBudget — 7 entities, 16 microflows, 9 pages, security, navigation) entirely through mxcli/MDL as an AI coding agent (Claude). Platform: macOS ARM64, mxcli via Docker, Mendix 11.8.0.
Goal: validate "app from scratch via CLI" workflow without Studio Pro.
Result: ~80% achievable via CLI. The remaining 20% requires Studio Pro or produces corrupted output.
Critical Issues
1. Fresh MPR missing .mxunit files — MPR corrupted, Studio Pro can't open
Severity: Critical (data loss / unusable output)
After building the app via mxcli on a template MPR, Studio Pro crashes:
Root cause: mxcli registers units in the SQLite
Unittable but does not write.mxunitcontent files for container-type units (root, modules, folders, ProjectDocuments). The DB has 407 entries; only 38 files exist on disk.Resolution: Use
mx create-projectfirst (produces 369 base files), then replay MDL scripts. But this isn't documented as a requirement — the existing template MPR silently produces corrupted output.Suggestions:
.mxunitfile for every unit inserted into theUnittablemxcli doctor/mxcli repairto detect and fix missing filesmxcli newormx create-project"2. Quoted identifiers stored literally in BSON → CE1613 errors
Severity: High (35 build errors from one cause)
The MDL docs and skill files advise "always quote all identifiers" for safety. mxcli stores the quotes literally in BSON.
mx checkthen reports:Affects: VALIDATION FEEDBACK paths, XPath in access rules, page widget bindings.
Suggestion: Strip quotes before writing to BSON, or reject quoted identifiers in contexts where they cause corruption.
3.
set $Object/Association = $Targetfails for writesSeverity: High (every association assignment affected)
XPath-style association access works for reads (
$Order/Module.Order_Customer/Name) but fails for writes. The error message ("variable not declared") gives no hint about read-vs-write semantics.Workaround:
change $Object (Module.Association = $Target);Suggestion: Either support write syntax or emit a clear error: "Use CHANGE to set associations."
Blockers on Fresh Projects
4. Project security "not found" on fresh MPR (pre-
mx create-project)alter project security level production→ "project security not found." Blocks user roles, demo users, security level. Resolved by usingmx create-projectwhich includes the security document.5. Navigation document missing on fresh MPR (pre-
mx create-project)CREATE OR REPLACE NAVIGATION Responsive→ "no navigation document found." The "CREATE" part doesn't create the document. Also resolved bymx create-project.6. Atlas Core module not included
Pages reference
Atlas_Core.Atlas_Defaultlayout — doesn't exist in fresh project. Pages created layoutless.Suggestion: An
mxcli initcommand that bootstraps security + navigation + Atlas Core would make the "app from scratch" workflow viable.Lint Rule Issues
SHOW CALLERS)Dashboard,_Edit)--disable RULEor inline-- nolint:RULE)Suggestion: Add
--disableflag or.mxcli-lint.yamlconfig. Fix QUAL004 to check microflow→microflow call graph. Resolve MPR001/CONV004 contradiction.Parser / Syntax Issues
RENAME PAGE Module.Old TO Module.Newtextfilter,dropdownfilter)GRANT ... (write ("Attr"))with quoted identifierwrite()RENAME ENUMERATION Mod.Old TO Mod.NewMinor / Documentation Issues
LOOPrequires explicitBEGINkeywordENTITYclause with multiple System.User subtypesStorageMprNameDiscrepancyExceptionWhat Works Well
mxcli check— repeatable, versionable, catchable before executionmx create-project— once discovered, solves the fresh project problem cleanlyTop Suggestions (Priority Order)
mxcli initcommand — bootstrap security + navigation + Atlas Core on fresh projects--disableflag or config file for CI integrationchangepatternEnvironment
mdlsource/, validated viamxcli check, executed viamxcli exec