diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 967b71a..0935d39 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -21,5 +21,14 @@ "agents": [ "./agents/tend.md", "./agents/weed.md" - ] + ], + "lspServers": { + "allium": { + "command": "allium-lsp", + "args": ["--stdio"], + "extensionToLanguage": { + ".allium": "allium" + } + } + } } diff --git a/README.md b/README.md index 062b61b..a59a4e2 100644 --- a/README.md +++ b/README.md @@ -230,6 +230,8 @@ The developer never mentioned invoicing or payment method capture. The Allium di When the CLI is installed, `.allium` files are validated automatically after every write or edit. Diagnostics appear inline and the model fixes issues in the same turn. +**Live diagnostics in Claude Code.** The Claude Code plugin also wires the `allium-lsp` language server, so Claude receives checker errors, go-to-definition and hover for `.allium` files immediately after each edit, without a separate `allium check` invocation. The language server is **not bundled** with the plugin — install the `allium-lsp` server from the [allium-tools repo](https://github.com/juxt/allium-tools) and make sure the `allium-lsp` binary is on your `PATH`. If it isn't found, Claude Code reports `Executable not found in $PATH` in the `/plugin` Errors tab and falls back to CLI checking. + ## Language governance Every change to Allium is debated by a [nine-member review panel](https://github.com/juxt/allium/blob/proposals/TEAM.md) before adoption. Each panellist represents a distinct design priority: simplicity, machine reasoning, composability, readability, formal rigour, domain modelling, developer experience, creative ambition and backward compatibility. The panel exists to surface tensions that any single perspective would miss. diff --git a/skills/allium/references/language-reference.md b/skills/allium/references/language-reference.md index b3f39bf..78f9bde 100644 --- a/skills/allium/references/language-reference.md +++ b/skills/allium/references/language-reference.md @@ -150,6 +150,17 @@ contract Codec { Contract bodies contain typed signatures and annotations (`@invariant`, `@guidance`). Entity, value, enum and variant declarations are prohibited inside contracts. Types referenced in signatures must be declared at module level or imported via `use`. +A zero-argument operation uses an empty parameter list: + +``` +contract Registry { + list_things: () -> Set + health: () -> Status +} +``` + +`name: () -> ReturnType` is the only form for parameterless operations; a bare arrow (`name: -> ReturnType`) is not valid. + ### Referencing contracts in surfaces Surfaces reference contracts in a `contracts:` clause. Each entry uses `demands` or `fulfils` to indicate the direction of the obligation: