docs← Back to article

Markdown for LLMs

Arxo query 0.1

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

Download this articlePlain text ↗
# Arxo query 0.1

A question to the evaluator — the evaluate input; the answer is an evaluation document. A literal without kind is never evaluated: a query outside this schema is rejected before evaluation with code QUERY_INVALID instead of being answered. The literals, terms, and formulas of a query are the same shapes as in the compiled model.

## Versions

No accepted version marker is declared.

## Top-level fields

| name | type-or-$ref | required | description |
|---|---|---|---|
| `queryId` | [`#/$defs/QueryId`](#queryid) | yes | — |
| `kind` | enum (12) | yes | — |

## Enumerations

| location | values |
|---|---|
| `properties/kind` | `"truth"`, `"focused_truth"`, `"why_not"`, `"argumentation"`, `"precedent"`, `"formula"`, `"collect"`, `"term"`, `"positions"`, `"weak_permission"`, `"interpretation_analysis"`, `"calendar_op"` |
| `$defs/LiteralQuery/properties/kind` | `"truth"`, `"focused_truth"`, `"why_not"`, `"argumentation"`, `"precedent"` |
| `$defs/FormulaQuery/properties/kind` | `"formula"` |
| `$defs/CollectQuery/properties/kind` | `"collect"` |
| `$defs/TermQuery/properties/kind` | `"term"` |
| `$defs/PositionsQuery/properties/kind` | `"positions"` |
| `$defs/WeakPermissionQuery/properties/kind` | `"weak_permission"` |
| `$defs/InterpretationAnalysisQuery/properties/kind` | `"interpretation_analysis"` |
| `$defs/InterpretationAnalysisQuery/properties/query/properties/kind` | `"truth"`, `"why_not"`, `"argumentation"`, `"precedent"`, `"formula"`, `"collect"`, `"term"`, `"positions"`, `"weak_permission"`, `"calendar_op"` |
| `$defs/CalendarOpQuery/properties/kind` | `"calendar_op"` |
| `$defs/CalendarOpQuery/properties/op` | `"is_working_day"`, `"previous_working_day"`, `"add_business_days"`, `"deadline"` |
| `$defs/CalendarOpQuery/properties/unit` | `"business_day"`, `"calendar_day"` |
| `$defs/QueryComprehension/properties/kind` | `"comprehension"` |

## Raw schema

[`https://law.arxo.io/schema/query.schema.json`](https://law.arxo.io/schema/query.schema.json)

## `QueryId`

Query identifier; the tail after the last colon gives the result id and the query’s proof node.

Type: `string`.

## `LiteralQuery`

Questions over a ground literal: truth, focused truth, why-not, argumentation, and precedent. The literal is a model Literal with kind literal: for a ground goal without kind, matching against a rule head is undefined, which is exactly how the judgment channel used to be lost.

Type: `object`.
Required: `queryId`, `kind`, `literal`.

| name | type-or-$ref | description |
|---|---|---|
| `queryId` | [`#/$defs/QueryId`](#queryid) | — |
| `kind` | enum (5) | — |
| `literal` | [`legal-ir.schema.json#/$defs/Literal`](/protocols/schemas/legal-ir/#literal) | — |

## `FormulaQuery`

A status formula as a query.

Type: `object`.
Required: `queryId`, `kind`, `formula`.

| name | type-or-$ref | description |
|---|---|---|
| `queryId` | [`#/$defs/QueryId`](#queryid) | — |
| `kind` | `"formula"` | — |
| `formula` | [`legal-ir.schema.json#/$defs/Formula`](/protocols/schemas/legal-ir/#formula) | — |

## `CollectQuery`

A collection through a comprehension.

Type: `object`.
Required: `queryId`, `kind`, `comprehension`.

| name | type-or-$ref | description |
|---|---|---|
| `queryId` | [`#/$defs/QueryId`](#queryid) | — |
| `kind` | `"collect"` | — |
| `comprehension` | [`#/$defs/QueryComprehension`](#querycomprehension) | — |

## `TermQuery`

The value of a term over a ready store. The term is a model Term or a comparison (for a term query a comparison counts as a boolean-valued term, which is how pinned reference outputs supply it); a comprehension inside follows QueryComprehension, where a variable may lack a type. The term query schema looks no deeper than kind — term grammar is fixed by the model schema.

Type: `object`.
Required: `queryId`, `kind`, `term`.

| name | type-or-$ref | description |
|---|---|---|
| `queryId` | [`#/$defs/QueryId`](#queryid) | — |
| `kind` | `"term"` | — |
| `term` | `object` | — |

## `PositionsQuery`

The normative positions of the whole case; no arguments.

Type: `object`.
Required: `queryId`, `kind`.

| name | type-or-$ref | description |
|---|---|---|
| `queryId` | [`#/$defs/QueryId`](#queryid) | — |
| `kind` | `"positions"` | — |

## `WeakPermissionQuery`

Weak permission: the action is not forbidden under the closure policy. policy is the closure policy as an object, not a surface call argument.

Type: `object`.
Required: `queryId`, `kind`, `actor`, `action`.

| name | type-or-$ref | description |
|---|---|---|
| `queryId` | [`#/$defs/QueryId`](#queryid) | — |
| `kind` | `"weak_permission"` | — |
| `actor` | [`legal-ir.schema.json#/$defs/Term`](/protocols/schemas/legal-ir/#term) | — |
| `action` | [`legal-ir.schema.json#/$defs/Term`](/protocols/schemas/legal-ir/#term) | — |
| `policy` | `object` | — |

## `InterpretationAnalysisQuery`

One query per reading of the group. The only place where a query takes a query — one level deep.

Type: `object`.
Required: `queryId`, `kind`, `group`, `query`.

| name | type-or-$ref | description |
|---|---|---|
| `queryId` | [`#/$defs/QueryId`](#queryid) | — |
| `kind` | `"interpretation_analysis"` | — |
| `group` | [`legal-ir.schema.json#/$defs/StableId`](/protocols/schemas/legal-ir/#stableid) | — |
| `query` | `object` | Nested query without its own `queryId` (the id is inherited from the outer one) and not of kind interpretation_analysis. |

## `CalendarOpQuery`

A calendar operation over a pinned snapshot. days is required for add_business_days and deadline; policy for deadline is the deadline policy, taken from the case context when absent; suspensions come from the case data.

Type: `object`.
Required: `queryId`, `kind`, `op`, `date`.

| name | type-or-$ref | description |
|---|---|---|
| `queryId` | [`#/$defs/QueryId`](#queryid) | — |
| `kind` | `"calendar_op"` | — |
| `op` | enum (4) | — |
| `date` | [`legal-ir.schema.json#/$defs/DateString`](/protocols/schemas/legal-ir/#datestring) | — |
| `days` | `integer` | — |
| `afterTime` | `string` | — |
| `unit` | enum (2) | — |
| `policy` | `object` | — |
| `suspensions` | `array` | — |

## `QueryComprehension`

A comprehension in a query. Same shape as a comprehension term in the model, except that a query variable may lack type — the type is known from the generator predicate’s declaration, which is how pinned reference outputs supply it. The query schema looks no deeper than generator and element: formula and term grammar belongs to the model schema, and a query outside it fails at evaluation with an ordinary diagnostic.

Type: `object`.
Required: `kind`, `variable`, `element`, `generator`, `distinct`.

| name | type-or-$ref | description |
|---|---|---|
| `kind` | `"comprehension"` | — |
| `variable` | `object` | — |
| `binders` | `array` | — |
| `element` | `object` | — |
| `generator` | `object` | — |
| `distinct` | `boolean` | — |