Skip to content
docs
Arxo ↗

Arxo Fact Protocol source mapping 0.1

For LLMs12 sections

An authoring-time, pinnable declaration of how ONE external record — a database row, a bus event, a form submission, an API response, serialized as a JSON document — becomes facts of the Arxo Fact Protocol. It names the model and its semantic hash; the record scopes addressed by JSON Pointer (RFC 6901) with the entity each scope instance denotes; typed fields; fact entries; provenance; and an optional evidence document for the record itself. It carries no semantics: the mapping computes nothing — each field value becomes a typed model term of a fact with declared origin, and the record becomes the evidence item the facts point to. The output is a fact set. The contentHash self-pin excludes its own field. The tool checks scope and field names, pointers, predicates, and types against the compiled model, reporting mapping errors; the schema holds only the shape. Tabular microdata stay with the population binding.

Accepted schemaVersion: law.source-mapping/0.1.

nametype-or-$refrequireddescription
schemaVersion"law.source-mapping/0.1"yes—
idstringyesMapping identifier; the extractor name of every emitted fact is source-mapping:.
descriptionstringnoFree text for the reader: which system, table, topic or form the record comes from. Not read by the tool.
modelobjectyes—
scopesarrayyesParts of the record that denote entities. Exactly one root scope (no parent); every other scope names its parent, and the parent chain reaches the root.
factsarrayyes—
provenanceobjectnoProvenance shared by every emitted fact. origin defaults to case_input; extraction is not a new origin.
evidenceobjectnoThe record as an evidence item: every emitted fact points to it, and its document hash is the sha256 of the exact record bytes. Without this section facts carry no document, and the core warns FACT_WITHOUT_EVIDENCE — the honest signal that the record itself was not presented.
contentHashscreen-binding.schema.json#/$defs/Digestyes—
locationvalues
properties/schemaVersion"law.source-mapping/0.1"
properties/provenance/properties/origin"case_input", "source_asserted", "external_snapshot", "adjudicated", "assumed_for_simulation"
$defs/Fact/properties/presence/oneOf/0/properties/kind"always"
$defs/Fact/properties/presence/oneOf/1/properties/kind"boolean_field"
$defs/Argument/oneOf/0/properties/kind"entity"
$defs/Argument/oneOf/1/properties/kind"field"
$defs/Argument/oneOf/2/properties/kind"constant"

https://law.arxo.io/schema/source-mapping.schema.json

Type: string.

JSON Pointer (RFC 6901). The empty string is the element itself.

Type: string.

Text with {pointer} substitutions, where pointer is a JSON Pointer relative to the scope element ({/id}) or, prefixed with $, absolute from the record root ({$/tenant}). The substituted value must be a string or an integer; null or missing triggers RECORD_KEY_NULL. The result must be a URN or IRI.

Type: string.

Type: object. Required: name, pointer, entity.

nametype-or-$refdescription
name#/$defs/Name—
pointer#/$defs/PointerRoot scope: absolute pointer to an object (the record must have it, otherwise SOURCE_RECORD_INVALID). Child scope: pointer relative to the parent element.
parent#/$defs/Name—
eachbooleanChild scope only. true: the pointer addresses an array, each element is one instance (null or missing is zero instances). false (default): the pointer addresses one object (null or missing is no instance).
entityobject—
fieldsarray—

Type: object. Required: name, pointer, type.

nametype-or-$refdescription
name#/$defs/Name—
pointer#/$defs/PointerPointer relative to the scope element. JSON null or a missing member is absence of the value.
typelegal-ir.schema.json#/$defs/TypeRefTypeRef: urn:law:std#Integer, Decimal, Money, Boolean, Text, Date, Instant, or an enum of the model.
currencystringMoney only, exclusive with currencyPointer: ISO 4217 code of every value.
currencyPointer#/$defs/PointerMoney only, exclusive with currency: pointer relative to the scope element to a three-letter code.
membersobjectEnum only: source value (a string, or the decimal text of an integer) to member name. Non-empty, every value a non-empty string: the tool checks it (SOURCE_MAPPING_INVALID), so every runner validates one keyword set.
trueValuesarrayBoolean only: strings read as true, in addition to JSON true.
falseValuesarrayBoolean only: strings read as false, in addition to JSON false.
nullValuesarrayStrings read as absence, in addition to JSON null (for instance an empty string of a form).

Type: object. Required: predicate, scope, arguments, presence.

nametype-or-$refdescription
predicatestringsymbol_decl id of a relation of the model (URN with #).
scope#/$defs/NameScope whose instances emit the fact: one fact per instance.
argumentsarray—
presenceoneOf (2)—
requiredbooleanAn absent field argument refuses the whole record (RECORD_REQUIRED_NULL) instead of dropping the fact. Default false.

Definition Argument.

Definition InstantSource.

Documentation for Arxo. Writings — blog.arxo.io.

Anonymous visit counts on stats.arxo.io, no cookies.