FIDE Laws of Chess

io.arxoPublished by arxo.ioOfficial publisherv0.1.1Updated Oct 24, 2026

FIDE Laws of Chess (2023) as an executable model: arbiter cases, answers with rules and judgments

The publisher's own server: UN Charter 1945

VerifiedStreamable HTTPWeb executableKnowledge & MemoryDeveloper Tools

Overview

AI-generated overview

Executable model of the 2023 FIDE Laws of Chess: an assistant can ask arbiter-style questions and get rule-derived answers with proofs and source excerpts.

What you can do
  • Search and browse the formalised law: semantic search, predicate catalogue, rule explanations and source text excerpts
  • Ask questions of the model and get answers with status fields, plus explanations that unfold the proof chain
  • Run retained fictional arbiter cases and inspect saved evaluation documents
  • Capture, prepare, publish and revoke frozen answer documents with a separate revocation secret
  • Query the formalisation's own structure with a deterministic LawQL query and check release capabilities
When to use it
Useful for teaching, research or demonstration work on chess arbiter decisions, where you want to see how a pinned model derives a result from explicit facts and where it defers to human judgment. Not a substitute for the authentic FIDE Laws or a competent arbiter.
Requirements
Remote endpoint at mcp.arxo.io, or a local process via npx with Node.js 20+ on Linux x64 or macOS arm64. No authentication is declared. An optional FIDE_CHESS_MCP_CALL_TIMEOUT variable sets the per-call timeout for the local host.
Before you install
Publishing an answer creates a public document; keep the separate revocation secret, since the public id alone grants no control. The model is a partial formalisation of 12 articles, does not decide every case, and its checks do not establish subject accuracy. Source text is a pinned unofficial copy, not the official publication.

Installation

In SourceWeft

  1. Open FIDE Laws of Chess in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.arxo%2Ffide-chess/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "fide-laws-of-chess": {
      "type": "http",
      "url": "https://mcp.arxo.io/mcp/fide-chess"
    }
  }
}

README

[FIDE Laws of Chess on Arxo]

FIDE Laws of Chess on Arxo

[Smithery]

Explore a chess arbiter's decision through a pinned model, explicit facts and an inspectable answer. Ten retained fictional cases cover illegal moves, flag fall, rapid/blitz exceptions, recording and arbiter judgment.

Node.js 20+ · ESM · canon package 0.1.0 · model 0.1.1 · FIDE edition effective 1 January 2023

Start in Node.js · Cases · Evidence · Depth · Submit a case · Source repository

This is an independent open-source teaching and research demonstration. For an actual chess ruling, use the authentic FIDE Laws and the competent arbiter. Source text and model scope are pinned; the package does not claim general chess-engine capability or complete formalization.

Start in Node.js

Requirements: Node.js 20+. The example uses ES modules; keep the .mjs extension. This recipe was checked on macOS arm64 with Node.js 20.20.2 on 14 October 2026. No global CLI, Git clone or MCP client is needed for this route.

Create a fresh directory, open a terminal there, then run:

sh
npm init -ynpm install --ignore-scripts @arxo/[email protected] @arxo/[email protected]

Save this as example.mjs, then run node example.mjs:

js
import { open } from '@arxo/law';import { loadModel } from '@arxo/canon-fide-chess/chess';import { game, white, getCaseInput } from '@arxo/canon-fide-chess/examples/arbiter';
const model = await loadModel();const chess = await open(model.spec, {  offline: true,  local: { packages: { [model.spec]: model.package } },});
const input = getCaseInput('SecondIllegal');const loss = await chess.truth('game_lost_by', [game, white], input);const draw = await chess.truth('game_drawn', [game], input);console.log(loss.evaluationStatus, loss.truthStatus); // COMPUTED, TRUE_ONLYconsole.log(draw.evaluationStatus, draw.truthStatus); // COMPUTED, NEITHER

The two output lines are loss, then draw:

text
COMPUTED TRUE_ONLYCOMPUTED NEITHER

COMPUTED means the query was evaluated. TRUE_ONLY means it has positive support and no negative support. NEITHER means neither polarity is supported; it does not establish that the proposition is false.

Now replace only getCaseInput('SecondIllegal') with getCaseInput('SecondIllegalNoMate') and run node example.mjs again:

text
REQUIRES_JUDGMENT NEITHERCOMPUTED TRUE_ONLY

The second line now establishes a draw. This case supplies the fact that the opponent cannot checkmate by any legal series. The separate loss query still requests an arbiter's assessment because other reachable loss grounds remain unresolved. Read both status fields; REQUIRES_JUDGMENT identifies an assessment the model does not decide on its own.

To try another retained episode, choose a name from the case table. To propose your own episode, open an issue with the case facts, legal date, query, package/runtime versions, output and the FIDE clause or model rule you think should give a different answer. Use a fictional or anonymized case.

The SDK executes the rules through @arxo/[email protected]. Installation alone does not register this distribution in the SDK's automatic canon resolver: keep the explicit local.packages handoff above. The loader implements no chess decisions or formulas.

[Model and episode to answer and proof]

Use as an MCP server

The separate native MCP wrapper runs the same pinned model over stdio:

sh
npx -y @arxo/[email protected]

Node.js 20+, Linux x64 or macOS arm64. Client configuration, HTTP endpoint, inputs and limitations · OCI recipe · npm recipe · Accepted delivery. This MCP delivery is separate from the Node.js route above.

Choose a case

getCaseInput(name)EpisodeChecked question and result
TouchIntentUnknownA movable own piece; intentional touch not adjudicatedmust_move_first_touched_piece: REQUIRES_JUDGMENT / NEITHER
FirstIllegalOne completed illegal moveLoss: REQUIRES_JUDGMENT / NEITHER; draw: COMPUTED / NEITHER
SecondIllegalTwo illegal moves under the model's specified closureLoss: COMPUTED / TRUE_ONLY
SecondIllegalNoMateTwo illegal moves; inability to checkmate establishedDraw: COMPUTED / TRUE_ONLY
FlagFallFlag observed, time control not completed, mate possibleLoss: COMPUTED / TRUE_ONLY
FlagFallNoMateThe same flag; inability to checkmate establishedDraw: COMPUTED / TRUE_ONLY
RapidFirstIllegalRapid 15+10; first illegal moveOpponent receives 60 seconds; 120-second query is NEITHER
BlitzFirstIllegalCompetitiveBlitz 3+2 under competitive rules B.2Opponent receives 120 seconds; 60-second query is NEITHER
ShortOfTimeRecordingStandard chess, no increment, 240 seconds leftmust_record_moves: COMPUTED / FALSE_ONLY
DeviceWarningElectronic device evident; arbiter gave a warningLoss and differing-penalty queries: COMPUTED / TRUE_ONLY

All 18 original case/query expectations are retained and checked. The fixture export provides caseNames, game, white, black, king, CaseName and getCaseInput(name). Each call returns an independent copy; an unknown name throws RangeError.

[Loss and the explicit inability-to-mate exception]

Facts and arbiter judgments

getCaseInput preserves the CLI's canonical assertions, constants, context and options. The loader supplies neither absent facts nor adjudications. The model's explicitly declared closures are part of its rules; they are not a general assumption that a missing fact is false.

For touch-move, use the two declared arguments — player and piece:

js
import { open } from '@arxo/law';import { loadModel } from '@arxo/canon-fide-chess/chess';import { white, king, getCaseInput } from '@arxo/canon-fide-chess/examples/arbiter';
const model = await loadModel();const chess = await open(model.spec, {  offline: true, local: { packages: { [model.spec]: model.package } },});const answer = await chess.truth(  'must_move_first_touched_piece', [white, king], getCaseInput('TouchIntentUnknown'),);const document = JSON.parse(new TextDecoder().decode(answer.document));console.log(answer.evaluationStatus, answer.truthStatus); // REQUIRES_JUDGMENT, NEITHERconsole.log(document.results[0].judgmentRequests);

A positive, explicitly adjudicated intentional-touch assertion establishes this model's obligation; that path is checked separately. The original missing-judgment fixture stays unchanged.

Missing empirical facts, negative facts and contradictory support retain NEITHER, FALSE_ONLY and BOTH. For the checked empirical conflict, SDK 0.4.3 returns COMPUTED / BOTH: the query was computed and both polarities are supported. Read both fields; do not collapse them to a Boolean. Exact Decimal inputs, such as recorded points, are strings ('0.75').

Complete canonical input for SecondIllegal
json
{  "legalTime": "2023-06-01",  "assertions": [    {      "contentHash": "sha256:696ba690ec316ad1654c94c94886b3d6e9764573460a0ed89f76280496c904fa",      "evidence": [],      "id": "urn:law:examples:chess:arbiter#player",      "kind": "assertion",      "literal": {        "args": [          {            "id": "urn:example:chess:game",            "kind": "entity_ref"          },          {            "id": "urn:example:chess:white",            "kind": "entity_ref"          }        ],        "kind": "literal",        "polarity": "positive",        "predicate": "urn:fide:laws:clir:chess#player_of"      },      "origin": "case_input",      "package": "urn:law:examples:chess:arbiter"    },    {      "contentHash": "sha256:9f7706ed8482cd04f869afdd849b90eea3c2e42ca246bf932c8a20f77a1fcc15",      "evidence": [],      "id": "urn:law:examples:chess:arbiter#complete-mate-facts",      "kind": "assertion",      "literal": {        "args": [          {            "id": "urn:example:chess:white",            "kind": "entity_ref"          }        ],        "kind": "literal",        "polarity": "positive",        "predicate": "urn:fide:laws:clir:chess#checked_player"      },      "origin": "case_input",      "package": "urn:law:examples:chess:arbiter"    },    {      "contentHash": "sha256:cd688c83624c70688f10ead443e5c46c32ad7d3310696caf6dad9b80be7c1cb0",      "evidence": [],      "id": "urn:law:examples:chess:arbiter#illegal-count",      "kind": "assertion",      "literal": {        "args": [          {            "id": "urn:example:chess:white",            "kind": "entity_ref"          },          {            "kind": "value",            "type": {              "name": "urn:law:std#Integer"            },            "value": 2          }        ],        "kind": "literal",        "polarity": "positive",        "predicate": "urn:fide:laws:clir:chess#completed_illegal_move_count"      },      "origin": "case_input",      "package": "urn:law:examples:chess:arbiter"    }  ],  "context": {    "decisionTime": "2026-09-08T12:00:00Z",    "knowledgeTime": "2026-09-08T12:00:00Z",    "legalTime": "2023-06-01",    "timezone": "UTC"  },  "options": {}}

This input was captured by released CLI 0.2.3 from the retained .lawcase; the fixture generator does not reproduce chess semantics. Fixture bytes · Capture provenance.

Inspect the evidence

Preserve answer.document as the canonical bytes returned by Arxo. With the same runtime version, pinned model and dependencies, repeated executions of identical complete inputs (query, facts, judgments, temporal context and options) reproduce those bytes and their hashes. answer.proof.nodes identifies the applied rules and their premises.

The current SDK's answer.sources and proof-node source-anchor arrays are empty for these queries. Source links below are an explicit static join of executed producer IDs with anchors in the hash-checked model; they are not additional citations emitted by the evaluator. The pinned publication is the FIDE Handbook, Laws 2023.

This complete example saves the loss answer and prints its model anchor links:

js
import { writeFile } from 'node:fs/promises';import { open } from '@arxo/law';import { loadModel } from '@arxo/canon-fide-chess/chess';import { game, white, getCaseInput } from '@arxo/canon-fide-chess/examples/arbiter';
const model = await loadModel();const chess = await open(model.spec, {  offline: true, local: { packages: { [model.spec]: model.package } },});const answer = await chess.truth('game_lost_by', [game, white], getCaseInput('SecondIllegal'));await writeFile('answer.json', answer.document);const nodes = new Map(model.package.ir.nodes.map(node => [node.id, node]));const sourceLinks = answer.proof.nodes.filter(node => node.rule).map(node => ({  rule: node.rule,  anchors: (nodes.get(node.rule)?.anchors ?? []).map(id => ({    id, locator: nodes.get(id)?.locator,  })),}));console.log(answer.hashes, sourceLinks); // includes SecondIllegalMoveLoses → article/7
What the model knows: native touch-move producer tree

[Native touch-move producer tree]

Produced by chess.unfold('must_move_first_touched_piece', { depth: 2, lang: 'en', quote: 0 }), with no selected case. Complete native tree and text. Recursion depth is separate from formalization depth.

Model and loader API

ImportExact model specExports
@arxo/canon-fide-chess[email protected]models, loadModel(exactSpec), error classes
@arxo/canon-fide-chess/chess[email protected]spec, loadModel()
@arxo/canon-fide-chess/examples/arbiterRetained case inputsIdentifiers, case names and independent input copies

loadModel returns { spec, package, descriptor, pin, questionCatalog }. Root imports read only the catalog and metadata. A load verifies original bytes before parsing the selected world and its catalog, then returns an independent model object. The descriptor remains separate: package.meta.contentHash is the linked world hash; packageContentHash is the original package hash. There are no model imports in this release.

Unknown or versionless specs fail with ModelNotFoundError.code === 'MODEL_NOT_FOUND'. Missing, corrupt or inconsistent model assets fail with ModelIntegrityError.code === 'MODEL_INTEGRITY'. There is no network fallback. TypeScript declarations cover exact specs, relation names, qualified relation names and fixture names; argument arity and value kinds are validated by the SDK at runtime.

Formalization depth

ModelPinned editionMeasured unit / denominatorEXECUTABLEOther measured levelsStatus
[email protected]Effective 1 January 2023en_article / 12 articles12INTERPRETED: 0, ANCHORED: 0, SOURCE_ONLY: 0, NONE: 0partial

The existing boundaries.depth measure reads own package nodes, excluding imports, and the original article-division declaration. All 12 articles have deriving rules; this coarse measure does not establish complete formalization of every clause. 28 anchor references remain unresolved by this article measure and are recorded in the report.

The preface and Appendices A–D are outside this denominator. A and B have executable rules used by the rapid/blitz cases; C's notation and D's organizational material are not executed by this demonstration. Guidelines are outside the retained Laws publication. These areas remain unmeasured by the article report.

Per-unit report records the denominator, edition, source/package/world hashes, original measurement implementation hashes and adapter hash. EXECUTABLE, source presence, completeness, declared scenarios and successful runs are separate claims. The model exposes institutional predicates and a procedure; it declares no deontic norms or full obligation-lifecycle positions.

Scope and verification

The package evaluates presented episodes. Most board/history conditions remain explicit protocol facts. Its limited observed-position slice handles complete known four-piece K/Q/R frames and a specific inability-to-mate case; other positions remain outside that slice. It does not establish general position reachability, parse PGN or construct a tournament pairing. Rating, title, tie-break and Swiss-pairing models are separate packages and are not bundled.

Model 0.1.1 corrects four preparation defects while preserving the original expected outcomes: scoped procedure predicates in the fixtures, and an exact Decimal intermediate before half-point rounding. The selected package passes 103 source scenarios, including six new numeric boundaries, through build, replay and rebuild. The installed demonstration checks all 18 retained questions, loader failures/isolation, explicit and absent judgment, missing/negative/conflicting facts, score boundaries, canonical repeatability, README examples and strict TypeScript.

Checks are addressed to this distribution. Full corpus: not_checked; releaseVerified: false. Delivery checks do not establish subject accuracy or completeness.

Source pins and reproduction

Source pin fixes original model/descriptor/world/catalog bytes and case inputs to an immutable public source revision. Source origin separately records the corpus origins and addressed fixes. English source text is a pinned visible-text extraction (PINNED_UNOFFICIAL_COPY), not a claimed official PDF publication. FIDE attribution and publisher terms are retained in NOTICE; Apache-2.0 covers Arxo-authored code and does not replace those terms.

To rebuild the wrapper from the pinned inputs in the repository:

sh
git clone https://github.com/arxohq/arxo-fide-chess.gitcd arxo-fide-chess/npmnpm ci --ignore-scriptsnpm run build -- --canon ..npm testnpm run test:typesnpm run candidate -- --out /absolute/new-candidate-directory

The candidate script prepares one local tarball and the existing arxo.npm-candidate/1 manifest; it does not publish. Delivery uses the established CI in arxo-io/law. Publishing and verification recipe · Delivery record.

Source: README.md at commit d4b14bf

Tools

16

law_passport

Release passport

Passport of an exact release: purpose, interface, boundaries, checks and performance. The reports section holds the history of measurements, failures included. Entries are paged by JSON Pointer; next continues the answer.

ParametersnamerequiredlimitoffsetversionrequiredsectionscontentHashrequired

law_answer_capabilities

Lens capabilities

A machine-readable matrix of the Lens producers that are actually installed, of replay/projection checks, profiles, limits and the contract tests that confirm them. declared_only means a schema with no executable witness.

Takes no parameters.

law_capture_answer

Capture a result for a Lens

Run a registered producer and obtain producerControl/0.2 for a later verifiable preparation of a Lens. The producer is chosen only from the shipped registry.

Parametersrequestrequiredproducerrequired

law_prepare_answer

Prepare a public write-up

At the explicit request of the user, repeat between 1 and 12 earlier law_ask or law_process_run calls, compare their replayControl strictly, and prepare a non-public frozen document for 24 hours. The client never supplies the machine answer: the server obtains it only by executing afresh. A divergence in any input, in the law, in a resource, in the server code, in the engine library or in the result rejects the document as a whole.

ParameterslanguagequestionrequiredassistantcalculationsproducerRunsdocumentVersion

law_publish_answer

Publish a write-up

Publish a prepared document. Repeating it with the same preparationId idempotently returns the same URL and the same separate revocation secret.

ParameterspreparationIdrequired

law_revoke_answer

Revoke a write-up

Revoke a published document using its separate secret. The public id alone grants no control; revocation closes the HTML page, the API and the download.

ParameterspublicIdrequiredrevokeSecretrequired

law_packages

Catalogue of law

The catalogue of formalised law: instruments, predicates with signatures, the boundaries of coverage. This is where the NAMES of predicates come from — they must never be guessed. But do NOT start from the catalogue when looking for the right instrument: the overview is large, and the title of an instrument rarely matches the words of a question ("Newton's laws of motion" contains no word "physics"). A question in your own words goes to law_search first, which returns addresses; the catalogue is for the exact signature of what you found. With no arguments — the overview: one line per instrument (key, title, legal order, counters of rules, facts, signatures, norms, constants); a whole instrument — package="kz-gpk"; a search over the signatures, labels and constants of every instrument — query="substring". All three modes are PAGED: limit and offset, with the remainder named in the text (`showing a–b of N; k more`) and in structuredContent (total, truncated, next — a ready-made continuation call). The unit of a page is named by pageUnit: the overview and query page over INSTRUMENTS (20 and 20 by default), package=… pages over the SIGNATURES of one instrument (20 by default, 300 at most) — large codes carry thousands. package=… together with catalog=… pages a separate list of the instrument: "questions" — the CATALOGUE OF QUESTIONS: which enquiries are provided for (a question in words, a form, a predicate or norms) and what the instrument does NOT answer, with the type of reason; a card is a template of an enquiry, not an answer, and not every instrument has one; "norms" — the NORMS of the instrument, "constants" — the CONSTANTS (names of declarations). "task-guides" — TASK GUIDES: the order of applying a canon to a document — what to gather, which cards to ask and how to read the answers; a guide answers nothing. catalog="task-guides" is allowed without package too — every guide of the profile; guide=… — the detail of one guide; the walkthrough — MCP Prompts under th

Parametersguidelimitqueryoffsetcatalogpackage

law_ask

Ask the law

Put a question to formalised law. When the answer is "not established" it carries whyNot — the engine's why_not report: the candidate rules and the state of every conjunct (satisfied / not satisfied / undetermined); the missing facts are visible there and need not be guessed. BEFORE THE FIRST call obtain the predicate names through law_search (a question in your own words → addresses) or law_packages (the signatures of a known instrument) — an invented name will be rejected. If the tool returned an error or "not established", THAT IS THE ANSWER: pass it to the user and do not substitute general knowledge about the law of some other country. But "I found no suitable instrument" is NOT an answer until law_search has been asked: silence of the catalogue is a property of searching by title, not a conclusion about the corpus. kind='truth' — whether a fact is established; kind='collect' — enumerate the records; kind='deadline' — compute a time limit on the official calendar; kind='positions' — which DUTIES arose from the facts and what their statuses are; kind='why_not' — the why_not report on the same goal, whatever the status of the answer. The answer carries the rules applied, the warnings and the provenance with hashes; truth/collect also carry a signature block for presentation. The server does not guess: where a norm is not formalised, the answer is "not established" or an error.

Parametersargscalcdayskindunitafterfactsproofcutoffcontextfocusedpackage+10 more

law_screen

Population screening

Build a necessary condition — a superset — for the preliminary selection of rows from an external source. This is NOT a legal answer and NOT SQL: the result is a typed tree and a manifest of the extensions up to TRUE. Every row that passes must then be computed in full by the engine, with a proof graph, on the same snapshot of the data. The binding is passed as a pinnable object; sourceSchemaContentHash is the actual hash of the source schema and is compared loudly with the pin. Case facts that carry provenance (origin, document, quote, extractor) are supplied to law_ask, not here. The confidence figure is read by the package EvidencePolicy, not by this tool and not by the engine.

ParametersgoalrequiredbindingrequiredpackagerequiredlegalTimesourceSchemaContentHashrequired

law_rules

Rules of inference

The rules of formalised law put into words: exactly how a predicate is derived (premises, source articles). Call this BEFORE supplying facts to law_ask — the rules say which facts are needed instead of leaving them to be guessed. For large instruments package=… returns a table of contents; the full text comes from predicate=…. The listing by package is paged: limit (20 by default, 500 at most) and offset; the remainder is named in the text (`showing a–b of N; k more`) and in structuredContent (total, truncated, next — a ready-made continuation call).

ParameterslanglimitoffsetpackagecontractpredicateinputLimitinputOffset

law_explain

Unfold the proof

Unfold the proof of a law_ask answer into a chain "rule ← premises → conclusion". The compact input: question (the original law_ask arguments, truth/collect), resultHash and codeHash from the provenance of the answer. The server repeats the computation and compares the hashes; if anything changed it refuses explicitly. Alternatively pass the evaluation from law_ask(proof=true). answerResource=fullAnswer.uri explains a stored compact snapshot without recomputing and without the client loading pages; by default only the proofRef chain. nodeId selects one node and all of its premises (up to 24 KB, otherwise an explicit refusal). proofHash refers to the whole graph; scope marks the part selected.

ParametersnodeIdcodeHashquestionevaluationresultHashanswerResource

law_inspect

Evaluation inspector

Evaluation inspector over a SAVED evaluation document: summary — the origin card, resultHash and snapshot verification, listings of results, positions and issues; slice — the closure of proof nodes for a query, rule, position or node with addresses, both sides of BOTH, defeats, values, names resolved against the snapshot; diff — what changed between two documents on the context, result and justification levels; locate — the declaration by StableId. Nothing is evaluated or recomputed: the source is evaluation from law_ask(proof=true) or an answerResource. Missing data is a limit state (limits), never a negation.

ParameterspageindexbundleselectagainstcontextsourcessnapshotoperationrequiredevaluationanswerResource

law_case_ask

Case package: ask

The ask operation: run a registered case of a case package over its pinned dependencies and return the answer: by default a projection of the evaluation document without the proof graph, on responseMode full or proof: true the canonical document with a proof and a manifest. The question is JSON per query.schema.json (query), an evaluate string (evaluate + queryId), a saved queryId without query, or card + args. A refusal to prepare is an error with an LDC-* code, never an empty answer.

ParametersargscardcaseproofquerypackagerequiredqueryIdevaluateresponseMode

law_sources

Official text

Sources: by default short excerpts (view=summary), 5 texts per page, with the address of the full text in fragments[].full. Either package or fragment is required (a StableId from law_search/law_rules). view=full returns exact parts of the text: textRange sets a range of Unicode characters, fragments[].next is the continuation with a contentHash. The hash refers to the WHOLE source, not to the excerpt or the part. textOffset/textLimit require fragment; a continuation requires contentHash. Lists are paged with offset/limit; the answer budget may shrink a page.

ParametersviewlimitoffsetstatuspackagefragmentlanguagetextLimittextOffsetcontentHash

law_query

LawQL query

A deterministic LawQL query over the CLIR of a formalization: a question about the model of the act itself, not about a case. Relations (14): anchors, edges, fields, imports, interpretations, labels, links, literals, nodes, norms, positions, rules, variables, windows. Full field lists: `law query --schema`. Functions (9): anchor/1, labels/1..2, short/1, contains/2, overlaps/2, starts_with/2, ends_with/2, position/2, derivation/2. exists/not exists over a bound variable; equality and membership only, no arithmetic and no ordering comparisons. Scope: corpus by package.name (for example kz.corpus.labour_code, not a file name) or a glob; without corpus, the whole profile slice; a scope outside the profile is empty (CORPUS_EMPTY). Examples: `from r in rules where r.head_predicate == "urn:…#eligible" select r.id as producer, r.strength as strength, anchor(r.id) as anchors` — who produces; `from l in literals where l.predicate == "urn:…#eligible" select l.node as reader, l.context as context` — who reads; `query eligible over "pkg" { for x: Person; where applicant(x); select eligible(x); }` — inference by the core. This is orchestration over the CLIR and the core; no new legal semantics is implemented here. Instead of text, a question from the catalog with arguments: anchors-of, imports-of, links-of, producers, readers, type-step (see `law query --list` for the set) (predicate/node/type parameters are URNs, pkg is a package.name or a glob). A structural answer is a queryPage: resultHash of the full queryResult, snapshot (hash of the scope package list), rowCount, rows by rowLimit (20, at most 5000) and rowOffset, next with the snapshot for continuation; full: true returns the full queryResult when the scope is one package. Every row carries provenance (CLIR nodes); an empty answer carries the explain funnel (emptyAt names the clause); errors carry LDC-Qxxxx codes with hints; a source product too wide is refused before execution (QUERY_TOO_BROAD), a continuation on another

ParameterscasefulllimitquerycorpusenginequestionrowLimitsnapshotargumentsrowOffset

Version history

2
  1. v0.1.1LatestOct 15, 2026
  2. v0.1.0Oct 14, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Arxo integrations