From a7edf670278884e7527a8690280eabdd183a6070 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 4 Sep 2026 07:22:09 +0000 Subject: [PATCH] docs(bootstrap): prefer the environment's cached Mendix version, else the newest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bootstrap-app skill pinned `11.13.0` as the Mendix version default, which is wrong in both directions: it ages, and it ignores what the session already has. A Claude Code session image can bake in an MxBuild — this one carries 11.13.0 — and asking for a different version turns a no-op into a multi-hundred-MB download of both the MxBuild and the runtime tarball. The rule is now: use whatever is already in ~/.mxcli/mxbuild/, and otherwise the newest version on the CDN. There is no environment variable to read (mxcli defines none, and `mxcli new --version` has no default of its own), so the cache directory is the signal: ls ~/.mxcli/mxbuild/ 2>/dev/null | sort -V | tail -1 A version the user names still wins over both. The CDN fallback names 11.14.0 — verified, along with the fact that it is current: mxbuild-11.14.0 and mendix-11.14.0 both answer 200, 11.15.0 answers 404. It is written as perishable and the check is parameterised on $V rather than repeating a literal that will rot the same way 11.13.0 did. Only the skill source changes; cmd/mxcli/skills/ is gitignored and regenerated by `make sync-skills`, which was run. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_017s476QkXr9CFMvKspVzcvu --- .claude/skills/mendix/bootstrap-app/SKILL.md | 35 +++++++++++++++----- docs-site/src/tools/bootstrap-prompt.md | 31 ++++++++++++----- 2 files changed, 49 insertions(+), 17 deletions(-) diff --git a/.claude/skills/mendix/bootstrap-app/SKILL.md b/.claude/skills/mendix/bootstrap-app/SKILL.md index b1b85e07b..97935b51e 100644 --- a/.claude/skills/mendix/bootstrap-app/SKILL.md +++ b/.claude/skills/mendix/bootstrap-app/SKILL.md @@ -55,7 +55,8 @@ it is building. 6. **Look and feel.** One of the bundled themes: `signal` (light, high contrast), `ledger` (light, dense, data-heavy), `console` (dark), or `none` for stock Atlas. Default `signal`. -7. **Mendix version.** Default `11.13.0`. +7. **Mendix version.** Default to whatever the session environment already provides — + see below — and otherwise the newest version on the CDN (today `11.14.0`). 8. **Do you have requirements to work from?** A specification document, a prototype, a wireframe, a long description — anything that is the source of truth but is not in this repo. **Default: yes, record them.** If they say yes, @@ -71,20 +72,38 @@ it is building. If the user says "defaults" or ignores a question, choose something sensible for it, say what you chose in one line, and keep going — **do not block on them twice**. -### Checking the Mendix version default +### Choosing the Mendix version -Everything mxcli does starts with downloading MxBuild, so "supported" means "on the -CDN". If asked for a version newer than the default, verify both tarballs answer -`200` before using it — `run --local` needs the runtime as well as MxBuild: +**Prefer a version the environment already has.** A Claude Code session image may bake +in an MxBuild, and using it turns a multi-hundred-MB download into no download at all. +There is no environment variable for this — the cache directory is the signal: ```bash -curl -sI -o /dev/null -w '%{http_code}\n' https://cdn.mendix.com/runtime/mxbuild-11.13.0.tar.gz -curl -sI -o /dev/null -w '%{http_code}\n' https://cdn.mendix.com/runtime/mendix-11.13.0.tar.gz +ls ~/.mxcli/mxbuild/ 2>/dev/null | sort -V | tail -1 # e.g. 11.13.0, or empty ``` +If that names a version, use it and say so in one line ("using 11.13.0, already cached +in this environment"). If the user asked for a specific version, they win — check it on +the CDN as below and accept the download. + +**Otherwise take the newest version on the CDN.** Everything mxcli does starts with +downloading MxBuild, so "supported" means "on the CDN", and `run --local` needs the +runtime tarball as well. At the time of writing the newest is **11.14.0** (11.15.0 is +not published). Do not trust that number — it ages. Confirm the one you land on, and +walk backwards a minor if it 404s: + +```bash +V=11.14.0 +curl -sI -o /dev/null -w '%{http_code}\n' https://cdn.mendix.com/runtime/mxbuild-$V.tar.gz +curl -sI -o /dev/null -w '%{http_code}\n' https://cdn.mendix.com/runtime/mendix-$V.tar.gz +``` + +Both have to answer `200`. Run the same check for any version the user names. + In a solution, give every app the **same** version: they share the `~/.mxcli/mxbuild` cache, and a mismatch means a second multi-hundred-MB download and two runtimes to -keep straight. +keep straight — which also means the cached-version rule applies to the solution as a +whole, not per app. --- diff --git a/docs-site/src/tools/bootstrap-prompt.md b/docs-site/src/tools/bootstrap-prompt.md index ff52d6c0c..d53788974 100644 --- a/docs-site/src/tools/bootstrap-prompt.md +++ b/docs-site/src/tools/bootstrap-prompt.md @@ -110,20 +110,33 @@ tag (latest is v0.16.0) **and** as a rolling `nightly` pre-release, with assets ## Which Mendix version to ask for -The skill defaults to the newest version that has a published MxBuild — everything -mxcli does starts with downloading it, so "supported" means "on the CDN". It runs this -check itself when asked for a newer version, and it is the check to run before bumping -the default: +The skill prefers **whatever the session environment already provides**, and otherwise +the newest version with a published MxBuild. + +The environment's contribution is a *cached* MxBuild, not a variable — a Claude Code +session image may bake one in, and reusing it turns a multi-hundred-MB download into +no download at all. The cache directory is the signal: + +```bash +ls ~/.mxcli/mxbuild/ 2>/dev/null | sort -V | tail -1 # e.g. 11.13.0, or empty +``` + +With no cached version, the skill takes the newest on the CDN — everything mxcli does +starts with downloading MxBuild, so "supported" means "on the CDN". At the time of +writing that is **11.14.0**; treat the number as perishable and run the check rather +than quoting it: ```bash -curl -sI -o /dev/null -w '%{http_code}\n' https://cdn.mendix.com/runtime/mxbuild-11.13.0.tar.gz # 200 -curl -sI -o /dev/null -w '%{http_code}\n' https://cdn.mendix.com/runtime/mendix-11.13.0.tar.gz # 200 (runtime) +V=11.14.0 +curl -sI -o /dev/null -w '%{http_code}\n' https://cdn.mendix.com/runtime/mxbuild-$V.tar.gz # 200 +curl -sI -o /dev/null -w '%{http_code}\n' https://cdn.mendix.com/runtime/mendix-$V.tar.gz # 200 (runtime) ``` Both have to answer `200` — `run --local` needs the runtime tarball as well as -MxBuild. In a solution, give every app the **same** version: they share the -`~/.mxcli/mxbuild` cache, and a mismatch means a second multi-hundred-MB download and -two runtimes to keep straight. +MxBuild. This is also the check to run before bumping the version named in the skill. +In a solution, give every app the **same** version: they share the `~/.mxcli/mxbuild` +cache, and a mismatch means a second multi-hundred-MB download and two runtimes to +keep straight. ## Two rules that make this robust