docs← Back to article

Markdown for LLMs

LawQL: questions to the model itself

The source Markdown for this article. Copy it into your assistant or download it as a text file.

Download this articlePlain text ↗
# LawQL: questions to the model itself

Every working question of a session asks about a case: is something true, what is owed, by which date. LawQL asks about something else — how the model of the act is built. Who produces a predicate and with what strength, who reads it, which articles a rule rests on, which norms have no deadline window, which declarations match a known formalization trap. It reads the compiled representation as tables and adds no legal meaning: it shows what is already written in the packages.

The reader of this topic is an agent developer or a formalization author. A lawyer asking about their own case does not need LawQL: those questions go to the case tools.

The language line is lawql/1. A query row proves that a node exists in the model, not that the rule is executable or that the author read the article correctly.

## Two layers

Structural queries read the formalization as tables: relations such as rules, literals, norms, windows, anchors, labels and links, filtered by equality and membership, projected into rows with provenance. Every row names the model nodes it was assembled from, so a retelling can be checked against the answer itself.

Inference queries ask the core to compute what the tables do not hold, with the recursion, negation and ordering comparisons that the structural layer forbids. Such a query is compiled into a short-lived package and executed by the same core that answers case questions; the facts of a case travel in the case field.

## Where to go next

The [language](/lawql/language/) page shows every form of the structural layer with a query that runs. [Relations](/lawql/relations/nodes/) lists every table with its fields. [Functions](/lawql/functions/anchor/) lists every function with its arity. [Questions](/lawql/questions/producers/) holds the named questions with their parameters, [lints](/lawql/lints/strict-negative-head/) the recorded formalization traps. [Documents](/lawql/documents/) explains the four answer shapes, [refusals](/lawql/refusals/) every refusal code, [boundary](/lawql/boundary/) what the language refuses on purpose, and the three [paths](/lawql/paths/producers-and-readers/) walk through complete investigations.