Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Project Reports

mxcli report <kind> produces a report a team asks of any Mendix app. Bare mxcli report is still the scored best-practices report (mxcli report); the kinds below answer specific questions instead of scoring.

KindQuestion it answers
architectureHow do the app’s modules depend on each other; where are the layers, bounded contexts and real cycles; what is unused?
testsWhat do the microflow tests and browser journeys check, did they pass, and which microflows do they reach, per module?
securityWho can read what, which client-callable flows trust the caller, which defaults are unsafe?
performanceWhere does time go in the main journeys at production volume, and did a fix help?
traceabilityIs each requirement in the specification built, and what proves it?
mapWhat does the app contain, and how does it fit together? (an interactive guide)
releaseWhat does deploying this model do to the data already in production?
dependenciesWhat does the app stand on, and is it current and safe?
configurationWhat must each environment supply, and what does the model fix so no environment can change it?
readinessTaken together, is it ready for production — what blocks, what is a risk, what was not assessed?

All reports at once

mxcli report all -p app.mpr -o docs/reports
mxcli report all -p app.mpr -o docs/reports --against v1.4.0 \
  --journeys journeys.jsonl --spans spans.jsonl --junit results.xml \
  --perf-journeys perf-journeys.jsonl --perf-spans perf-spans.jsonl

Each input goes to the reports it is for:

FlagsFeedWhat
--journeys, --spanstests, traceabilitythe functional journeys and the spans they exported
--junit, --tests, --runtests, traceabilitymicroflow test results; --run runs the tests once and writes junit.xml into the folder (--local: on mxcli’s own runtime, no Docker)
--perf-journeys, --perf-spansperformancea measured performance run, one record per step
--againstreleasethe deployed revision or .mpr

The functional log and a performance run are different files: a functional log has one record per journey, which performance would read as one step per journey.

Writes every kind into one folder — <kind>.html and <kind>.json, the scored report as quality.html — and index.html, an overview with a card per report: its verdict and headline numbers, linked. Every page links the others. A <kind>-annotations.yaml in the folder — or in --annotations-dir, for a project that keeps them elsewhere — is applied to that kind, and the overview names the annotation files it read. Performance runs with --perf-journeys/--perf-spans and release with --against; a kind that cannot run is listed on the overview with the reason, and a <kind>.json left in the folder by an earlier run is linked instead. --offline asks no online source, --skip leaves kinds out. The folder also gets readiness.html, first on the overview: the go/no-go roll-up of all the others (--milestone names the milestone being released).

Shared shape

Every kind collects data first and renders a page from that data second:

# measure, keep the data
mxcli report architecture -p app.mpr --format json -o arch.json
# render, with a person's names and verdicts, without measuring again
mxcli report architecture --from arch.json --annotations notes.yaml -o architecture.html
FlagMeaning
--format html|markdown|jsonjson is the collected data; html is one standalone page (no scripts, no external requests). Without --format, the -o extension decides, else markdown.
-o <file>Output file (default stdout).
--annotations <file>YAML or JSON with names, statuses and notes, keyed by the keys the page prints (cluster:…, finding:…, gap:…).
--from <report.json>Re-render a saved report.

Every page ends with How this was measured and What this does not cover, stored with the data, so a page re-rendered later still says what the measurement could not see. Preconditions a run did not meet (an unrecorded database state, leftover test-runner files) are shown at the top. Annotation keys that no longer match anything are listed at the bottom.

title: Architecture — Shop
summary: One paragraph shown first.
items:
  "cluster:Orders.Order": {name: "Order intake", note: "..."}
  "finding:constant-secret:Crypto.Key": {status: fixed, note: "rotated, env only"}
recommendations:
  - Move Sales.SUB_Total into Billing.

Marketplace modules, System and the test runner’s MxTest are outside the app unless --include-marketplace; --modules and --exclude choose by hand.

Every HTML page — the scored mxcli report too — shares one look: a line naming the project, report and date above the title, the verdict as a lede, headline tiles whose edge shows their status, bars in tables, findings as cards, and numbers in a fixed-width face. It follows the system’s light or dark setting; add data-theme="light" or "dark" to the page’s <html> element to force one.

architecture

Layered module map (domain dependencies only — menus, layouts and page links are reported separately, because they put every screen module in one cycle), module health with the role of low-cohesion modules (shell, admin UI, adapter), the coupling matrix in layer order, bounded contexts (clusters × modules), god nodes, bridges, entity hotspots, cycles with the edges that close them, and unused documents — marked verify when the graph cannot see how they might be used (named in a constant, placed in a layout, named in text).

mxcli report architecture -p app.mpr -o architecture.html
# leave generated code, probes and fixtures out of every figure (name globs)
mxcli report architecture -p app.mpr --exclude-docs 'Shop.FaultProbe*,RestClient.*' -o architecture.html

tests

Results from mxcli test --junit (or --run to run them), static reach of each test through the call graph, and — with journeys — runtime reach from the spans the app exported while each journey ran. Coverage per module in five categories: both, tests only, journeys only, startup or scheduled (not a gap), neither.

mxcli report tests -p app.mpr --run -o tests.html
mxcli report tests -p app.mpr --junit results.xml --journeys journeys.jsonl --spans spans.jsonl -o tests.html

Journeys need the app running with mxcli run --local --trace-otlp http://127.0.0.1:4318 and a collector listening: --journeys-cmd "<command>" runs the journey script with one, or run mxcli report collect-spans -o spans.jsonl yourself. The journey script appends one JSON line per journey (or step) to $MXCLI_JOURNEY_LOG:

{"journey":"Place an order","start":"2026-11-12T10:00:01Z","end":"2026-11-12T10:00:07Z","status":"passed","checks":["order shows in list"]}
{"meta":true,"database":"fresh seed 2026-11-12"}

security

A model review: findings by severity with fixes and statuses, a user role × entity read grid with each access rule’s XPath classified (own rows, via user, filtered, all), client-callable flows triaged by whether they check the caller or rely on access rules, unsafe defaults (secret-looking constant defaults, test switches defaulting to true, demo users, guest access, strict mode, password policy), and the lint security rules grouped with a verdict slot.

mxcli report security -p app.mpr -o security.html

performance

Per journey step: browser, server and database time and query count (median of warm runs), a flame chart, the most frequent statements, Postgres auto_explain plans with JIT time, N+1 shapes from the model, and before/after with --baseline.

mxcli report performance -p app.mpr --journeys steps.jsonl --spans spans.jsonl \
  --plans postgresql.log --baseline before.json -o performance.html

The command does not change the database. Seeding, instrumenting Postgres and restoring are a protocol, described in the report-performance skill.

traceability

Every requirement in the project brain, per milestone, with a derived status (built, partial, changed, not built, not traceable), the microflows that implement it, the tests and journeys that reach them, and the decisions and open questions that bear on it — plus three gap lists.

mxcli report traceability -p app.mpr --junit results.xml --journeys journeys.jsonl --spans spans.jsonl -o traceability.html

partial and changed come from a decision or open question whose body says Partly meets requirement `<id>`: … or Changes requirement `<id>`: … (brain capture --partly-meets <id>:<reason> / --changes write it). The status is brain’s: brain plan --json reports the same status per requirement, and brain check fails on a verdict naming an unknown id, one on a requirement, and a requirement that is both changed and partly met. Milestones are part of the plan: mxcli brain milestone "M1" --slice 01-accounts writes milestone: "M1" in the slice’s frontmatter, and --requirement <id> places one requirement apart from its slice. The older docs/brain/plan/traceability.json is still read, with a warning, until mxcli brain milestone --import moves it into the plan. brain plan --json lists each requirement with each anchor’s resolution, and each slice’s milestone.

map

One interactive page for someone who did not build the app: user roles and where each starts, the systems around the app and what runs without a user; the module map (domain use apart from screen links, the hub and weak links behind toggles); inside each module its data model with other modules’ entities as ghosts and the flows that write each entity, entry points grouped by what starts them, and the call closure of one entry point; page flows per role, with the pages a role may open but no click path reaches; associations crossing module boundaries; naming prefixes, shared flows and an entry-point × module matrix; published operations with their call closure, consumed services, HTTP calls, queues, schedules, Java actions and constants; and a searchable index of every document with “uses” and “used by”.

mxcli report map -p app.mpr -o map.html
mxcli report map -p app.mpr --format json -o map.json   # the same data for another viewer

With a project brain that has a plan, the map adds a Features tab: one feature per slice, with its requirements, milestone and status, and what its anchors reach — flows (the anchored ones, their footprints and call closure), the pages and entities those lead to, entry points started from outside the feature, and the roles that may open its pages. Reached by no feature lists the pages, entry points and persistent entities no requirement leads to. Features are derived from the plan, so there is no feature map to maintain alongside it.

The page is self-contained and draws one diagram at a time. Module purposes come from domain-model documentation, or from module:<Name> notes in --annotations.

Entry points include two kinds of reference the catalog records for this: by_name (a constant whose value is a flow’s qualified name) and queue (a task queue runs the flow a call placed in it). Both also keep such flows off the architecture report’s unused list.

release

Compares the model with the one that is deployed and lists, for every persistent entity, attribute and association, what the deploy does to stored data: destroys (a table or column dropped), verify (handled in a way that has not been measured), migrates (renamed under the same GUID, rows kept) and adds.

mxcli report release -p app.mpr --against v1.4.0 -o release.html
mxcli report release -p app.mpr --against /backups/deployed/App.mpr --format json -o release.json

The runtime keys the database on each element’s GUID, not its name, so the models are paired by GUID. A model can be valid, pass mx check and build, and still drop a table on the next deploy: an entity removed, made non-persistent, or given a new GUID under its old name; an attribute removed, made calculated, or given a new GUID (its column is recreated and every row gets the model default). A rename under the same GUID keeps the data. Type changes, shorter strings, changed association types or ends and changed generalizations are listed as verify: what the runtime does with them has not been measured.

--against is a git revision of the project (a tag, a branch, a commit; the project may sit in a subdirectory of the repository) or the path of a .mpr. A drop that is intended is annotated release:<kind>:<name> with status accepted, and the verdict then counts it apart.

dependencies

What the app stands on, and whether it is current and safe: the Mendix version and its release line (LTS, MTS or a monthly release); the Marketplace modules with their newest compatible and newest published versions; the pluggable widgets in widgets/; and the jars in userlib/ and vendorlib/ with the known vulnerabilities of that version, worst first, and the version to upgrade to.

mxcli report dependencies -p app.mpr -o dependencies.html
mxcli report dependencies -p app.mpr --offline        # no online source asked

A Marketplace module is identified by the version UUID it records (AppStoreGuid), not by its name or version number, which collide across content; a version the Marketplace no longer publishes is said as such. Comparing with published versions needs a Marketplace token (mxcli auth login). A jar’s Maven coordinates come from its own pom.properties; vulnerabilities come from OSV. Whatever could not be checked — no token, --offline, a jar without coordinates — is said per item, never shown as up to date or clean. Annotate vuln:<id> with status accepted, and why, for an advisory that does not apply.

configuration

What each environment must supply, read from the model, as a checklist an administrator signs off: constants with no default or a placeholder, constants whose default points at localhost, a private address or a test host, scheduled events to switch on or off, and published services whose callers need accounts. Below it, what the model fixes so that no environment can change it — a REST client or REST call location written as a literal localhost, private or test-host URL, a credential written as a literal — and what runs by itself: scheduled events and the lifecycle microflows with what they write and call.

mxcli report configuration -p app.mpr -o configuration.html

The actual production values live in the deployment portal or the pipeline; the report does not read them. Sign items off with constant:<Name>, scheduled:<Name> or published:<Name>, status done, and a note naming the environment.

readiness

One go/no-go page rolled up from the other reports, with its verdict rule stated: blocking (consistency errors, a release that destroys data, a high or critical vulnerability, a location fixed to localhost or a test host, a literal credential, an open high security finding, a failing test or journey, an unbuilt requirement of the milestone being released), risks, accepted (with what accepts each), the administrator’s checklist, which reports were assessed, and what no model report covers. A report that was not given, or could not check, is “not assessed”, and keeps the verdict at “not assessed in full” — never “ready”.

mxcli report readiness --dir docs/reports --milestone M2 -o docs/reports/readiness.html

Sign a blocking item off with readiness:<key>, status signed off, and a note.

Skills

Each kind has a skill with the judgement the command cannot make and the traps found building the reports by hand: report-architecture, report-tests, report-security, report-performance, report-traceability, report-map, report-release, report-dependencies, report-configuration, report-readiness. The scored report has report-quality, and assess-quality combines all of them with the manual review no rule can do.