/pure-dev:pure-lsp-checkfrom Pure Dev
Compiles/checks a single .pure file against a running Legend Pure LSP bridge and reports diagnostics in under a second. Fast alternative to full Maven build cycle when iterating on Pure source.
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.
Requires a running bridge (pure-lsp health) — and never curl it, pure-lsp is the only
reliable client. Both rules, and the port-discovery behaviour, are in references/lsp-devloop-usage-rules.md.
pure-lsp check <path/to/file.pure>
- instead of a path to check content from stdin.--port <N> (or set PURE_LSP_PORT) to target a specific bridge. Without it, pure-lsp
finds a running bridge automatically (via the /tmp/pure_lsp_server_<port>.json sidecar each
bridge writes), falling back to 8991.--uri <uri> to override the LSP document URI if you need a specific one (rarely needed —
the default file://<absolute path> is fine even for scratch files that don't map to a real
workspace repo).The command exits 1 if any diagnostic has severity: 1 (error), 0 if clean — usable directly in
a shell conditional. Output looks like:
{
"uri": "file:///tmp/Example.pure",
"diagnostics": [
{
"range": {"start": {"line": 2, "character": 5}, "end": {"line": 2, "character": 20}},
"severity": 1,
"message": "TotallyNotAType has not been defined!"
}
]
}
An empty diagnostics array means it compiled cleanly.
If you're validating a batch of changed files and any of them reference types/functions defined
in another file in the same batch, don't just call check on each one in a loop — plain check
goes through textDocument/didOpen/didChange, which the LSP compiles immediately and
independently as each one arrives, with no awareness of files pushed moments later. A file
checked before its dependency is pushed will falsely report "X has not been defined."
pure-lsp check-many FileA.pure FileB.pure FileC.pure
check-many instead calls the server's legend/checkBatch, which applies every file's content
to the runtime and compiles once, atomically — not per file, and not client-side pushed twice
to route around ordering. Argument order genuinely doesn't matter: the compiler sees the whole
batch at once. Response shape:
{"success": true, "modifiedFiles": ["file:///.../FileA.pure", "..."]}
or, on failure:
{"success": false, "error": "...", "errorUri": "file:///.../FileC.pure", "errorDiagnostics": [...]}
The trade-off for the efficiency of a single compile: on success, every file in the batch (and
anything else transitively affected) is guaranteed clean — modifiedFiles lists all of them. On
failure, the whole batch is rolled back (nothing was actually applied) and you get exactly
one error, attributed to its real file via errorUri (with full structured errorDiagnostics
— range/severity/code — for that one file), not a per-file breakdown across everything you
passed. If you need to know about every broken file in a batch rather than just the first one the
compiler hits, fix the reported one and re-run check-many to find the next. Exits 1 on failure.
check call on a given URI is a didOpen; every call after that on the same URI
is a didChange (the LSP protocol requires this distinction) — pure-lsp handles the
transition automatically, you don't need to track which call number you're on.check (plus whatever else is already loaded
in the session) — it does not run anything. To actually execute a function, follow up with the
pure-lsp-go skill.check/check-many target must be a real file under one of the bridge's configured repo
roots (or fed as literal content via check -). A .pure file that exists on disk somewhere
else — e.g. a scratch file under /tmp — is silently ignored by the LSP (it isn't part of any
registered module), so you get back {"diagnostics": []} (looks clean) with exit 0 even for
code that doesn't compile at all — nothing was actually checked. For ad hoc scratch content
that isn't part of a real module, pipe it through stdin (check -) instead of writing it to a
path outside the workspace — stdin has no on-disk identity, so the LSP compiles it for real as a
scratch source.checked..legend file to check/check-many. .legend files are plain-text fixture
resources loaded at runtime via the Pure readFile(...) function inside a test — they are not
Pure compilation units the LSP indexes. Passing one throws "Invalid source id" and knocks the
whole runtime into a recovering state (see pure-lsp-status's troubleshooting note). Only pass
.pure source files here; verify a .legend fixture indirectly by running the test/go()
function that reads it via pure-lsp-go.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
legend-pure, pure-language, lsp-bridge, compile-check, diagnostics
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-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)./pure-lsp-executeRuns exactly ONE existing Pure function by path (signature, mangled id or bare path) through the running Legend Pure LSP bridge, without a go() wrapper, and returns its typed value in returnValue. Also runs every test in a package or .pure file serially with --package/--source. For 2 or more functions or tests, use pure-lsp-execute-parallel instead, never a shell loop of this command. Use when the user wants to run a specific function, a single <<test.Test>> or <<PCT.test>>, or the result of a Pure function.Other plugins' skills for the same job