/pure-dev:pure-lsp-sync-hookfrom Pure Dev
Auto-syncs .pure file edits, creates, and deletes to a running Pure LSP session's overlay after Write/Edit/MultiEdit/Bash tool calls, keeping disk and in-memory model consistent without manual /check or /delete commands.
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.
The hook script pure-lsp-sync-hook runs after every
Write, Edit, MultiEdit, and Bash tool call and keeps the running Pure LSP session's overlay
in sync with what the Agent changed on disk — the thing a real IDE gets for free via file-watcher
events, which the Agent's file tools do NOT emit:
.pure created/modified (Write/Edit/MultiEdit, or a bash content-write) → POST /check (pushes
current on-disk content = a didChange)..pure deleted (rm ... file.pure via Bash) → POST /delete (unloads it from open-docs +
runtime + overlay, so it stops participating in compilation — the fix for orphan
go__Any_MANY_ is defined more than once)./status; if the bridge is unreachable
OR its runtime is not ready/degraded (e.g. mid-boot/recovering), it does NOTHING and exits 0.
So you can work with no LSP running and nothing happens./status state, not /health alive — because during the
~3-min engine-scale boot the java process is alive but the runtime is initializing, and pushing
to a not-ready runtime would block and add latency to the tool call.The hook is declared by the pure-dev plugin (hooks/hooks.json), so it activates automatically
when the plugin is enabled — no manual settings.json wiring needed:
"PostToolUse": [
{
"matcher": "Write|Edit|MultiEdit|Bash",
"hooks": [
{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/pure-dev-sync-hook-launcher" }
]
}
]
The launcher resolves the bundled pure-lsp-sync-hook (via PATH after preflight, the recorded
plugin bin dir, or its sibling bin/) and passes the tool-call payload through on stdin.
$PURE_LSP_PORT, else a running bridge discovered from its
/tmp/pure_lsp_server_<port>.json sidecar, else 8991 — the same resolution pure-lsp uses, so
it follows whichever bridge the launchers actually started. (It used to hardcode 8992, which no
launcher binds, so it silently no-opped against every real session.)hooks/hooks.json.install-pure-dev does not also copy this hook into ~/.claude/settings.json — doing both
registered it twice and fired it twice per tool call. It only wires settings.json under
--link-skills, for agents with no native plugin system, and removes a duplicate an earlier
install added.ready, so it never
blocks a tool call even when you're not using the dev loop.welcome.pure (see references/lsp-devloop-usage-rules.md for why that one file, and
pure-lsp-go / pure-lsp-execute for driving it). The hook
just means you no longer have to remember to check/delete files you touch — editing
welcome.pure or any .pure auto-syncs it. You can still pass files explicitly to go for an
atomic multi-file compile+run; the hook is complementary, not a replacement..pure (echo/cat/sed/cp/mv) are best-effort: the hook resyncs a .pure
path it sees in a non-rm command if that path now exists. Prefer Write/Edit for reliable sync.ready (pure-lsp status); the hook is a
no-op unless ready. Confirm the file ends in .pure. Confirm the port matches PURE_LSP_PORT.payload.get('tool_name') to a log file at
the top of main(); remove it after.go() diagnostic attaches to whichever file is checked, so after a push the
collision may be reported on the newly-pushed file, not on welcome.pure — both being flagged
means the file is in the session.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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.Other plugins' skills for the same job