/pure-dev:pure-lsp-set-optionfrom Pure Dev
Toggles Pure runtime options (ForceInterpreted, ExecPlan, PlanLocal, etc.) live in the running LSP via HTTP bridge, avoiding a slow restart. Use for switching between interpreted, local, or remote plan generation modes.
Ships in Pure Dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
isOptionSet('X') inside Pure resolves, in the LSP JVM, to Boolean.getBoolean("pure.options.X")
— read live on every call (default RuntimeOptions.systemPropertyOptions("pure.options.")). So a
Pure option can be flipped at runtime by setting/clearing that system property inside the LSP JVM.
The bridge exposes this over HTTP so you don't need to restart the (expensive, ~3-min-boot)
engine-scale LSP just to change a flag.
Never curl the bridge; bin/pure-lsp-option (below) uses Python's urllib. See references/lsp-devloop-usage-rules.md.
POST /set-option {"name": "X"} → System.setProperty("pure.options.X","true") → isOptionSet('X') becomes true.POST /unset-option {"name": "X"} → System.clearProperty("pure.options.X") → isOptionSet('X') becomes false.{"value": true|false}; the path just supplies the default.Both return {"success": true, "name": "X", "effective": <bool>} where effective is the live
isOptionSet value read back immediately after the change — use it to confirm the toggle landed.
All the HTTP mechanics (building the request body, POSTing to /set-option//unset-option, error
handling) are implemented deterministically in bin/pure-lsp-option — run it rather than re-deriving
an inline Python call by hand:
pure-lsp-option <set|unset> <NAME> [--value true|false] [--port N]
--port is optional: without it the script resolves $PURE_LSP_PORT, else a running bridge
discovered from its sidecar, else 8991. Pass --port <N> explicitly only when several bridges are
up and you mean a specific one.
Examples:
pure-lsp-option set ForceInterpreted # bypass mayExecuteLegendTest entirely, even if a backend is up
pure-lsp-option set PlanLocal # plan-gen runs LOCALLY (no longer affects FULL_INTERACTIVE)
pure-lsp-option set FullInteractiveExec # FULL_INTERACTIVE model, independent of PlanLocal
pure-lsp-option set ExecPlan # use the plan-gen+execute path at all
pure-lsp-option unset ExecDebug # quiet (noDebug) plan-gen
On success it prints the bridge's JSON response line to stdout and exits 0:
{"success": true, "name": "ForceInterpreted", "effective": true}
effective is the live isOptionSet value read back immediately after the change — use it to confirm
the toggle landed. Non-zero exit (1 = bad usage, 3 = HTTP/connection error) means the call did not
land; the real error is printed to stderr — don't assume the option changed.
These are the flags currently gated in core/pure/protocol/vX_X_X/invocations/execution.pure
(legendExecute) and core/pure/router/router_entry.pure (meta::pure::router::execute). Verify
against the current source before relying on exact behaviour — they are dev-loop overrides, not
long-term protocol:
| Option | When SET | Default (UNSET) |
|---|---|---|
ForceInterpreted | router::execute calls the plain interpreted execute() directly, BEFORE mayExecuteLegendTest runs — bypasses backend routing entirely even if a backend Server is configured | Normal mayExecuteLegendTest routing (backend wins if configured, regardless of ExecPlan) |
ExecPlan | Route through the plan-gen + executePlan path (only reached when ForceInterpreted is unset and a backend is configured) | Old alloyExecute path |
PlanLocal | Plan-gen runs LOCALLY (interpreted, live Pure) | Remote generatePlan on the backend Server (its jars decide the plan) |
FullInteractiveExec | FULL_INTERACTIVE execution mode (model inlined from the local graph) — independent of PlanLocal now | SEMI_INTERACTIVE (metadata-server pointer model) |
ExecDebug | debug() verbosity (routing trace + per-node SQL) in plan-gen and the interpreted fallback | noDebug() — quiet |
ShowLocalPlan | Print the full bound plan via planToString(true, ...) | Not printed |
Notes:
ForceInterpreted shadows ExecPlan/PlanLocal when set — the whole backend-routing branch is
skipped, so it doesn't matter what the other two are set to. Nothing stops you from leaving them set
alongside it, just know they have no effect while ForceInterpreted is on.PlanLocal is the key to fast Pure iteration: local plan-gen uses the live Pure graph in the LSP
session, so a Pure-only edit needs no jar rebuild — only Java execution goes to the backend
Server. With PlanLocal unset, the server's own jars decide the plan. It used to also gate
FULL_INTERACTIVE/SEMI_INTERACTIVE — that's now the independent FullInteractiveExec flag, which
the LSP dev-loop flow sets unconditionally regardless of PlanLocal.go()/execute() reads the
new value. (Contrast: editing the legend/setOption handler itself is a Java change to the LSP
server and needs a rebuild + restart.)Three execution paths, plus two independent verbosity toggles. Set the trues and explicitly unset
everything else — these are sticky system properties on a long-lived daemon, so a PlanLocal or
ExecDebug left over from an earlier query silently changes the next one.
| intent | ForceInterpreted | ExecPlan | PlanLocal |
|---|---|---|---|
| fully interpreted — no plan-gen, no backend call | set | unset | unset |
| plan-gen locally, against your live Pure edits (the dev-loop default) | unset | set | set |
| plan-gen on the backend, from its jars (what a released build would do) | unset | set | unset |
| toggle | set | unset (default) |
|---|---|---|
ExecDebug | routing trace + generated SQL | quiet |
ShowLocalPlan | prints the bound plan | not printed (and n/a unless plan-gen is local) |
FullInteractiveExec is not a per-run choice: set it once for any LSP-driven session and leave it.
You are iterating on a live local graph, and SEMI_INTERACTIVE's metadata-pointer model would not
reflect your uncommitted edits.
Preconditions. The interpreted row needs nothing — ForceInterpreted bypasses a configured
backend rather than letting it win the routing decision. Both plan-gen rows need the backend up on
9095 and the LSP started with the -Dlegend.test.server.* jvm-args (pure-backend-start, or
pure-lsp-launch-engine, which does both). Miss the jvm-args and execute()
silently runs interpreted regardless of ExecPlan — you get a clean passing result while believing
you exercised plan-gen. Check before trusting one:
ps -C java -o args= | grep -q 'legend\.test\.server\.host' \
&& echo "backend wired in" || echo "NOT wired in - execute() will run interpreted"
execution.pure and router_entry.pure come from the compiled-core JAR on the LSP classpath by
default, not from a workspace source you can push. Setting/unsetting an option they already read
works live (above). But adding a new isOptionSet(...) gate to those files means editing the
source first, then validating it one of two ways:
legend-engine added as a second
--repo-root alongside legend-pure (see references/lsp-devloop-internals.md) — this
makes core/pure/** (including execution.pure/router_entry.pure) source-backed, so
pure-lsp check <file> works directly and the new gate is live for go() in that same session.
This is the fast path and doesn't need a Maven rebuild at all..pure into the .m2 jar
(jar uf <jar> -C <stage> <entry>) and restart the LSP, or do a full mvn clean install of that
module.Either way, do NOT try to push those core files into a plain (legend-pure-only) session as overlays — the LSP cannot write them there and it will fall into a recovery loop.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
pure-lsp, runtime-options, live-toggle, plan-generation, lsp-bridge
npx claudepluginhub finos/legend-engine --plugin pure-dev15 skills in this plugin
/pure-backend-startStarts (or confirms) the standalone legend-engine backend - engine Server + H2 + local metadata server on fixed ports 9095/9092 - so a Pure LSP started with -Dlegend.test.* routes execute()/go() through real plan-generation instead of the interpreted engine. Starts only the backend, not the LSP. Use when the user wants to run Pure queries 'through the real engine', 'through plan-gen' or 'via the backend server', reproduce compiled-mode behaviour the interpreted engine cannot, or mentions legend.test.server, EngineServerForTest or LegendTest./pure-chain-updateProcedure for git-syncing and rebuilding a local legend-pure + legend-engine checkout, in dependency order, with pinned dependency versions resynced. Run by hand, one project at a time, fixing problems as they surface. Use for 'update my project chain', 'pull latest and rebuild <project>', 'sync legend-pure/legend-engine', 'refresh my local checkouts', or 'propagate my engine snapshot downstream'./pure-code-styleReformats a .pure file (or a block of Pure code) to a consistent house style: 2-space indentation with no column-aligned hanging indents, tight colons in type annotations, spaced pipes on if/match/lambda branches, one-parameter-per-line for long function signatures, and no stray blank lines or trailing whitespace. Whitespace-only - never changes tokens, logic, or semantics. Use when asked to 'format this Pure file', 'clean up the formatting', 'make this more readable', 'fix indentation', or 'make the style consistent' on .pure source./pure-lsp-checkCompiles/checks a single .pure file against the already-running Legend Pure LSP bridge and reports diagnostics (errors/warnings) in under a second, as a fast alternative to a full `mvn test`/`mvn compile` cycle while iterating on Pure source in legend-pure. Use whenever the user is editing .pure files and wants to know if they compile, asks 'does this Pure file compile', 'check this .pure file', 'validate this Pure code', or wants fast type/syntax feedback without running the full Maven build./pure-lsp-classpathComputes and caches the engine-scale Pure classpath (via Maven dependency:build-classpath) for any pure-bearing project registered in config/projects.json - legend-pure, legend-engine, or a project you've layered on top via PURE_DEV_EXTRA_PROJECTS_JSON - and resolves that project's dependency-ordered --repo-root set. Use before the first engine-scale LSP start in a repo, when the cached classpath is stale after pulling or rebuilding, when engine-scale boot fails on missing classpath entries, or when you need repo-roots for a project with dependencies. Provides pure-lsp-classpath and pure-lsp-roots./pure-lsp-connectAttaches the pure-lsp HTTP bridge to an LSP daemon that is ALREADY running (e.g. started from IntelliJ, or left over from a prior session) - never spawns a new daemon JVM. Defaults to socket port 9100. Use for 'connect to the existing/already-running LSP', 'attach the bridge to the LSP on port X', or 'reconnect to the LSP' - as opposed to pure-lsp-launch-engine, which boots a new session. Also recovers a bridge whose connection has gone stale (health OK, requests fail with a broken pipe).Other plugins' skills for the same job