quern
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| QUERN_FLIGHT | No | Set to 0 to turn off flight recording (default is on). | |
| QUERN_REGISTRY | No | The registry path for quern (part of the nondeterminism boundary). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
A quern tree at /app/.quern: nodes with kinds, params, links and payloads, whose semantics (vocabulary, rules, solvers) are data in the same tree. Start with tree_brief for what currently binds, tree_vocabulary for what kinds mean, tree_check for what is red. Edit with tree_set / tree_delete / tree_commit; every write is saved to tree.json.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| tree_setA | Create or update the node at The write answers with any rule it broke — on the branch itself or on one that contains it. Treat that as the verdict: it is the same thing tree_check would tell you, said at the moment you caused it. |
| tree_getB | Read the Quern at |
| tree_findA | Search the Quern instead of walking it — when the user names an element,
locate it in one call. |
| tree_briefA | The working set — one line per current entry: kind, path, name, the links
it declares, the params still ungrounded, the rules red on it; under headings
where the tree has sections (a kind declared |
| tree_deleteB | Delete the node at |
| tree_commitA | Apply a change-set — [{op: 'set'|'delete', path, node?}] — atomically,
under authoring's one invariant: the committed tree's red set never changes
silently. Green stays green; a set that would CREATE reds is refused whole
(nothing written) and returns them by name; commit deliberately by naming
each in |
| tree_vocabularyA | The tree's semantics, as data. No arguments: list every kind defined
(stored + pinned packages + the domain's starter kinds). With kind +
description: define or refine what that kind means, and optionally what its
params/links stand for and what |
| tree_ruleA | The tree's checks, as data. No arguments: list the rules. With name +
expr: register one — a boolean expression whose builtins are STRUCTURAL only
(param, nodes, params_of, count, sum/len/abs/min/max, ctx, superseded,
unsupported(p, rel) — how many of what p leans on via |
| tree_checkA | Run every applicable rule at or under
|
| tree_verdictsB | Every rule's verdict at or under |
| tree_rollA | What the tree holds now, as {path, kind, digest} per node — and, given a roll you kept from last time, what changed since. Every rule runs against the tree as it is, so no rule can see what was
REMOVED: a deleted node is not red, it is absent. The roll is what makes
absence and silent rewriting mechanical. Keep the
|
| tree_solverA | The tree's artifacts, as data — capabilities you submit, stored by
content hash and served from artifact://{sha}. No arguments: list them.
With name + wasm_b64 (base64 of the content, whatever the medium): register
one. |
| tree_solveA | Run a registered solver on a branch it may read — sandboxed wasm, or a
native contract a package ships (native contracts see the effective tree;
wasm sees only the slice at |
| tree_packageA | The semantic package library — capitalized vocabulary, rules and solvers, shared across every account on this server. No arguments: list the library and this workspace's pins. install='name@version' pins a package — its whole dependency closure applies (its requires, transitively), your own entries always winning; a broken closure (missing dep, two versions of one name) is refused at pin time, and so is a name (kind, rule or solver) two pinned packages both define when neither requires the other. prefer={name: package} says which package's definition this workspace uses for such a name, alone or with install; an entry that settles no clash is refused. The pin records the package's content digest, so it keeps meaning these exact semantics even against another library. uninstall removes the pin. publish submits {name, version, description, requires: [{name, version}], vocabulary, rules, solvers: [{name, description, reads, wasm_b64, medium: wasm|web|prose}], examples}. Publishing is proof-gated: every rule must be exercised by the package's own examples and pass — examples run with the requires closure staged beneath, so extending packages prove themselves in the semantics they will live in; every wasm solver must meet the ABI (web/prose artifacts are stored content-addressed, served from artifact://{sha}, never executed). requires pin exact versions of already-published packages. Versions are immutable — ship a new one to evolve. |
| tree_appA | Open the Quern navigator — an interactive view of the tree and its semantics (kinds, params with provenance, links, rules) where the user can browse and coedit. Returns the root slice; the UI then navigates and edits through the same tree_* tools you use. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Quern navigator |
TDQS
Scored across 15 tools
Most tools occupy clearly distinct niches (tree_find searches, tree_brief summarizes, tree_get reads, tree_set writes, tree_commit is atomic). A few pairs are close — tree_solve vs tree_solver (run vs register), tree_check vs tree_verdicts (execute vs report-as-data), tree_set vs tree_commit (bare write vs invariant-guarded change-set) — but the detailed descriptions make the boundaries learnable.
Every tool uses the same snake_case `tree_` prefix with a clear verb/noun following (tree_get, tree_set, tree_rule, tree_package). The convention is uniform and predictable across all 15 tools.
15 tools sits at the top of the well-scoped range and each covers a genuinely distinct facet of a rich domain (editing, search, semantics, rules, solvers, packages, roll/diff, UI). Nothing feels redundant enough to merge away.
The surface covers the full lifecycle: read (get/brief/find), write (set/commit/delete), semantics (vocabulary/rule/package), computation (solver/solve), verification (check/verdicts), change tracking (roll), and a UI (app). No obvious dead ends for the stated purpose.