Skip to content

microflow-preflight: best-practice + layout check before the first MDL line - #135

Merged
MendixMau merged 1 commit into
masterfrom
skills/microflow-preflight
Sep 25, 2026
Merged

MendixMau merged 1 commit into
masterfrom
skills/microflow-preflight

Conversation

@MendixMau

Copy link
Copy Markdown
Owner

Direct lane (changes to skills/, bug-logs/, bin/, project-bin/, project-tests/, pipelines)

What changed and why (one paragraph):

Lint (#134) runs only after exec, and its size rules count top-level activities only, so a loop body is invisible to CONV009/QUAL003 and retrieve/REST/Java calls inside a loop have no lint rule at all. New skills/microflow-preflight.md fires before the first MDL line for any microflow with a loop, a list built from a list, or more than 20 planned activities (loop bodies counted by hand): it posts a checklist with denominators, maps each Mendix microflow best practice to the lint rule that catches it afterwards (or marks it "preflight is the only check"), and states the layout rule as "omit @position" with the measured v0.24.0 auto-layout geometry. Wiring: STOP row 25 in learned-mdl-preflight.md, a baseline routing row in bin/lib/skill-routing.tsv (README, ROUTING, conversion-runbook and gate-check regenerated by render-routing.sh), an mdl-agent.md bullet. Corrections riding along: the stale reset layout advice in learned-microflow-patterns.md (it is a parse error, BUG-28), the commit-in-loop recipe in mdl-cookbook-microflows.md (now collect, then one commit after the loop), the 30–50-activity guideline (docs limit 25; QUAL003 25, CONV009 15), and the microflow-loop-antipatterns.md note that CONV011 already covers commit-in-loop.

Field evidence — which real project this ran against / was observed in, and what it measured
or fixed there:

Probed on mxcli v0.24.0 (built from the v0.24.0 tag) against a scratch copy of a real Mendix 11.12 model, never the live .mpr. Measured: CONV011 on a commit inside a loop; MPR008 on partial hand placement and on 100 px hand placement; MPR011 on negative loop-body coordinates; reset layout still mismatched input 'RESET'; auto-layout coordinates for one loop, two consecutive loops, nested loops, while, plain if/else and loop-inside-if (the geometry table in the skill); and one v0.24.0 auto-layout defect: a loop followed by an activity inside an if branch places the merge on that activity, so lint reports MPR008 on a correct script (remedy in the skill: move the loop to a SUB_ or place the activity after end if). The collect-then-commit recipe was re-checked with mxcli check on v0.24.0 (0 errors). The trigger for the skill was a field build where a migration microflow shipped three commits inside loops under a green BUILD-LOG row (the #134 incident).

  • No client data anywhere in the diff (leak guard clean; manual grep of the diff hits only the CHANGELOG credit)
  • Size cap: 12 files changed, +164/−15 lines. 4 of the 12 are render-routing.sh regenerations of one tsv row (README, ROUTING, conversion-runbook, gate-check) and 1 is CHANGELOG; 7 hand-edited files. Over the file cap only by the generated surfaces; splitting them off would break render-routing --check.
  • Test tier reached: T0 (diffs read, guards replicated) + bin/render-routing.sh --check in sync + T2 probes above. check-scripts, check-portability, check-no-client-data, check-pr-discipline all clean locally.
  • For a new/changed instrument: n/a — prose skill, routing row and agent bullet only, no instrument
  • For a new skill: routing row added (bin/lib/skill-routing.tsv + bin/render-routing.sh)
  • CHANGELOG.md line appended in this PR, crediting the source project or person (CI-checked)
  • New bug entries: none

Side note for the maintainer, not in the diff: the consuming project CLAUDE.md template still lists WHILE as unsupported; it executes on v0.24.0 (declare $Count Integer = 0; while $Count < 3 begin ... end while;).

🤖 Generated with Claude Code

https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw


Generated by Claude Code

…L line

New skills/microflow-preflight.md: trigger conditions (loops, work inside
loops, nested/multiple loops, >20 activities counting loop bodies, list
from list), a checklist with denominators, Mendix practice -> lint rule ->
write-it-right table, and the omit-@position layout rule with v0.24.0
geometry and the if-branch merge-overlap defect. Routed baseline for the
mdl agent (STOP row 25, skill-routing.tsv, mdl-agent bullet). Corrects the
reset-layout advice (BUG-28), the commit-in-loop cookbook recipe, the
30-50 activity guideline and the stale Starlark note.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant