/pure-dev:pure-lsp-connectfrom Pure Dev
Connects the pure-lsp HTTP bridge to an already-running LSP daemon (e.g. from IntelliJ) without spawning a new JVM. Recovers stale bridge connections. Defaults to socket port 9100.
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.
Booting a fresh session and attaching to one already up are different intents, and conflating them is risky when the user only wants the latter: the wrong branch can end up launching a second multi-GB JVM alongside one already running. This skill is scoped to exactly one job: get the lightweight Python bridge talking to a daemon that already exists, and never touch the daemon/JVM itself unless explicitly told to.
All the decision logic (is a daemon listening, is a bridge already attached, is it actually healthy,
recover-vs-relaunch-vs-abort) is implemented deterministically in bin/pure-lsp-connect — run it
rather than re-deriving these steps by hand:
pure-lsp-connect [--socket-port N] [--project NAME] [--bridge-port N] [--java PATH]
--socket-port defaults to 9100 (this user's standing convention for LegendLspServer,
configured via legendLspServerConfig.json's "port" field).--project selects which project's repo-roots/classpath to launch with if no bridge is attached
yet (passed through to pure-lsp-roots/pure-lsp-classpath); omit it to let those infer from
$PURE_DEV_PROJECT or the current directory.--bridge-port picks the bridge's own HTTP port; omit it to auto-pick the first free port starting
at 8991.On success it prints one JSON line to stdout and exits 0:
{"bridgeHttpPort": 8991, "socketPort": 9100, "state": "ready", "repositoryCount": 143, "symbolCount": 40756}
Hand bridgeHttpPort off to pure-lsp-check/pure-lsp-go — both take the bridge's HTTP port, not
the daemon's socket port.
Exit codes:
2 — nothing listening on --socket-port. Stop and tell the user to start the daemon (e.g.
their IntelliJ "Legend LSP Server" run/debug config), or ask them to run pure-lsp-launch-engine
if they want a brand-new session instead. Do not scan a wide port range speculatively,
and do not fall back to a boot flow on your own initiative — that's the one judgment call this skill
still leaves to you, not the script.3 — a bridge is up but didn't reach a healthy/ready state; the script already tried the one known
automatic recovery (see below) and it didn't work. Read the diagnostic on stderr rather than
guessing further — it includes the raw /status error body, since pure-lsp status's own error
message hides the response body.4 — safety abort: a launch attempt didn't show a reconnect to the existing daemon in its log
within the timeout, which would otherwise risk a second multi-GB JVM coming up. The script already
killed the errant bridge process before returning this code. If you see this, stop and investigate
(wrong socket port is the most likely cause) rather than retrying blindly./dev/tcp probe) before doing
anything else — this is the hard boundary that keeps the skill from ever booting a daemon itself.pgrep candidate against /proc: it must be
a python process actually running -m pure_lsp_bridge.server_cli with the requested
--socket-port. A bare pgrep -f is not enough — it matches the invoking shell's own command
line too (observed doing exactly that), and pure-lsp-restart SIGKILLs what this returns. A
looser pattern like pure.lsp would also regex-match the - in legend-pure-lsp-server inside
the daemon JVM's classpath and dump 100+KB of noise. Shared helper: bin/pure-lsp-common.health + status). If status fails, fetches the raw
error body directly (bypassing the CLI's generic "HTTP Error 500") and checks for a broken-pipe
shape — the bridge's persistent socket to the daemon died underneath it, commonly because the
daemon JVM had a debugger attached and sat paused at a breakpoint long enough to time out. Recovery
is to kill only the bridge process (captured exact argv, never the daemon PID) and relaunch it
with that same command line.resolve_lsp_server_jar in
pure-lsp-common — extracted from the target project's own classpath, or borrowed from
legend-engine's if the project's own classpath doesn't carry it) and launches
one against the confirmed-listening socket port, then verifies the launch log actually shows a reconnect
(connected to EXISTING LSP daemon) before declaring success — aborting and killing the process
otherwise, rather than letting an unexpected fresh boot slide by.What SKILL.md sets; muted values are Claude Code's defaults
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-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