From 5c2f9ddf2df6b3210d9641ba1ffa13b217112999 Mon Sep 17 00:00:00 2001 From: "Jhonatan S. Reyes C." Date: Sun, 1 Nov 2026 05:48:19 +0000 Subject: [PATCH] fix(statechart): stop when no TLC toolchain is set up The default path calls mise, so the skill fails with "spawn mise ENOENT" when mise is absent and TLA2TOOLS is unset. Agents then searched the disk and downloaded a Java runtime the user never asked for. The Run section now says the default path needs mise on PATH. It tells the agent to check for TLA2TOOLS or mise first. If neither is there, the agent stops and names the two setups. It does not search or download. --- skills/statechart/SKILL.md | 4 +++- upstream.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/skills/statechart/SKILL.md b/skills/statechart/SKILL.md index f21cb37..0484711 100644 --- a/skills/statechart/SKILL.md +++ b/skills/statechart/SKILL.md @@ -18,7 +18,9 @@ Work in a scratch folder outside the repo. Write a TLA+ spec and its config. The `scripts/statechart.ts` is TypeScript, so run it with a runtime that can execute TypeScript. -By default, the command uses mise to find pinned TLC and Java versions. If they are not installed, mise installs them and needs network access. For an offline or pre-provisioned run, set `TLA2TOOLS` to the local `tla2tools.jar` path to bypass mise. Set `JAVA` to a Java 11 or later binary, or leave it unset to use `java` from `PATH`. +By default, the command uses mise to find pinned TLC and Java versions, so `mise` must be on `PATH`. If they are not installed, mise installs them and needs network access. For an offline or pre-provisioned run, set `TLA2TOOLS` to the local `tla2tools.jar` path to bypass mise. With `TLA2TOOLS` set, set `JAVA` to a Java 11 or later binary, or leave it unset to use `java` from `PATH`. + +Before you write the spec, check that `TLA2TOOLS` is set or that `mise` is on `PATH`. If neither holds, stop and tell the user the two setups: install mise, or set `TLA2TOOLS` to a `tla2tools.jar` they already have, plus `JAVA` when `java` is not on `PATH`. Do not search the disk for Java or TLC, and do not download them yourself. ## Write the spec diff --git a/upstream.json b/upstream.json index 80ff39b..a19376e 100644 --- a/upstream.json +++ b/upstream.json @@ -10795,7 +10795,7 @@ "target": "skills/statechart/SKILL.md", "mode": "100644", "adaptation": { - "reason": "Correct the compiler-backed report contract to one shortest path per broken invariant or deadlock rule and TLC counterexamples for temporal properties. Remove universal shortest-path wording from constraint guidance. Document default pinned mise provisioning separately from the offline TLA2TOOLS/JAVA alternative, which bypasses mise and requires Java 11 or later.", + "reason": "Correct the compiler-backed report contract to one shortest path per broken invariant or deadlock rule and TLC counterexamples for temporal properties. Remove universal shortest-path wording from constraint guidance. Document default pinned mise provisioning separately from the offline TLA2TOOLS/JAVA alternative, which bypasses mise and requires Java 11 or later. State that the default path needs mise on PATH and that JAVA falls back to java on PATH only with TLA2TOOLS set. Stop before modelling when neither mise nor TLA2TOOLS is available, rather than searching the disk or downloading a Java runtime unasked.", "verification": { "kind": "pinned-byte/link inspection", "artifacts": [