Skip to content

Fix skill-doc inaccuracies from the sudoku findings (#1,#3,#4,#6,#9,#18,#19,#20,#22) - #26

Merged
ako merged 3 commits into
mainfrom
fix/findings-docs
Jul 25, 2026
Merged

Fix skill-doc inaccuracies from the sudoku findings (#1,#3,#4,#6,#9,#18,#19,#20,#22)#26
ako merged 3 commits into
mainfrom
fix/findings-docs

Conversation

@ako

@ako ako commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Batch 1 of the sudoku-app findings triage: the doc/skill fixes. These skills ship to user projects via mxcli init, so wrong guidance directly misleads app authors.

Nine findings were wholly or partly wrong or stale docs (verified against main):

# Doc fix
1 write-microflows.md listed a non-existent randomInt() → removed; added round(random()*N) guidance + the Decimal→integer (div/random()/*Between need round) note
3 java-actions.md, patterns-data-processing.md showed bare not $x → Mendix needs not(expr)
4 mdl-entities.md showed index name on (cols) → real syntax has no on
6 mdl-entities.md showed autonumber with no seed → requires default N (else CE7247)
9 resolve-forward-references.md claimed call microflow forward refs "already work" → they don't at exec time
18 added the bucket-class idiom for computed dimensions (no inline computed Style:)
19 promoted the clickable-container-with-args idiom (actionbutton can't hold children / pass literals)
20 added a domain-model note: widgets bind members, not expressions
22 migrate-design-prototype.md claimed SCSS partials "cannot be created" → stale; they can

Also: hardened the CI gate that should have caught #4

check-skill-mdl.sh misclassified any DDL statement prefixed with a /** */ doc comment (the statement's Documentation) as non-DDL and silently skipped it — which is exactly why the index … on drift shipped. The classifier now skips leading doc/line comments when finding the first keyword. The skills corpus now checks 179 blocks (was 159) — 20 previously-invisible doc-comment-prefixed DDL blocks are now gated — and all pass.

Findings #3, #4, #8 turned out to be working-as-designed (docs were the fault); the code-side items (#5 grammar, #7 autocreateddate, #16 hub, etc.) are in follow-up PRs.

🤖 Generated with Claude Code


Generated by Claude Code

claude added 2 commits July 25, 2026 16:31
#3,#4,#6,#9,#18,#19,#20,#22)

Nine findings from an end-to-end app build were wholly or partly wrong/stale
docs in the synced skills (shipped to user projects via `mxcli init`):

- #1  write-microflows.md listed a non-existent `randomInt()` — removed; added a
      note to use `round(random()*N)` and that Decimal-returning funcs (random,
      div, *Between) need round/floor/ceil before an integer target.
- #3  java-actions.md / patterns-data-processing.md showed bare `not $x` — Mendix
      requires `not(expr)`; corrected both (cheatsheet-errors.md already documents
      the rule).
- #4  mdl-entities.md showed `index name on (cols)` — the real syntax has no `on`
      (`index name (cols)`); corrected.
- #6  mdl-entities.md showed `autonumber` with no seed — it requires `default N`
      (else CE7247 at build); corrected examples + the quick-ref row.
- #9  resolve-forward-references.md claimed `call microflow` forward refs "already
      work" — they don't at exec time (resolves against the project, not later
      same-script defs); corrected to say order the callee first.
- #18 added the bucket-class idiom for computed dimensions (no inline computed
      Style; quantise to a bucket + SCSS @for).
- #19 promoted the clickable-container-with-args idiom in create-page.md
      (actionbutton can't hold children or pass literals).
- #20 added a domain-model note: widgets bind members, not expressions (model the
      wide form when the UI addresses parts individually).
- #22 migrate-design-prototype.md claimed SCSS partials "cannot be created" —
      stale; they can, and are recommended for readability.

Also hardens the CI gate that should have caught #4: check-skill-mdl.sh
misclassified any DDL statement prefixed with a `/** */` doc comment as non-DDL
and silently skipped it. Skip leading doc/line comments when finding the first
keyword — the skills corpus now checks 179 blocks (was 159) and all pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
Straggler for finding #6 — the audit-attributes example also showed
`OrderNumber: autonumber` with no seed. Add `default 1` (an autonumber requires
a seed or the build fails CE7247), matching the mdl-entities.md fix and the
already-correct data-types row.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
…kill hardening

The hardened check-skill-mdl (which now classifies /** */-prefixed DDL blocks
instead of skipping them) runs over docs-site/src too, and caught two
`CREATE ASSOCIATION … DELETE_BEHAVIOR DELETE_CASCADE` blocks that fail
`mxcli check` — `DELETE_CASCADE` is not a valid keyword. The real cascade
behavior is `DELETE_AND_REFERENCES` (delete the referencing objects too).

Replace DELETE_CASCADE → DELETE_AND_REFERENCES across the docs-site association
pages (statement blocks, the behavior table, the CREATE ASSOCIATION synopsis,
and the lexical-structure keyword list). docs-site now checks 209 blocks, all
passing. This is exactly the drift the classifier fix is meant to catch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
@ako
ako merged commit ced3978 into main Jul 25, 2026
5 checks passed
ako pushed a commit that referenced this pull request Jul 28, 2026
…MDL-WIDGET14)

A template-parameter slot is a data binding (an attribute path), not a
client-side expression: mxcli stored any unquoted contentparams/captionparams
value as an attribute path, so a function call like
`formatDateTime($obj/LastImport, 'd MMM yyyy')` became a bogus attribute name and
Studio Pro rejected the page with CE1613 "attribute no longer exists".

Add MDL-WIDGET14 (validateTemplateParamExpressions, called from
validateStaticWidget): for each ContentParams/CaptionParams value, skip quoted
string literals, then flag a function call or arithmetic/comparison operator as
an expression — an attribute path never matches. The message tells the user to
precompute the value onto the bound entity (a calculated attribute) and bind
that attribute instead.

Test: TestValidateTemplateParamExpressions. Bug-test:
contentparam-expression-rejected.fail.mdl. Symptom-table updated. Ledger #26.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
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.

2 participants