# Arxo Law editor index 0.1 A separate editor-oriented compiler output. It is not the compiled model and never feeds the semantic hash. Version 0.1 allows an honestly partial index: the partial field marks the boundary of the compiler-confirmed links. ## Versions No accepted version marker is declared. ## Top-level fields | name | type-or-$ref | required | description | |---|---|---|---| | `schema` | `"law.editor-index/0.1"` | yes | — | | `files` | `array` | yes | — | | `headers` | `array` | yes | — | | `annotations` | `array` | no | Parser-authored annotation name spans (without @) for semantic tokens. | | `propertySpans` | `array` | no | Parser-authored source-model field name and enclosing field spans for semantic tokens. | | `declarations` | `array` | yes | — | | `importedDeclarations` | `array` | yes | — | | `usages` | `array` | yes | — | | `signatures` | `array` | yes | — | | `dependencies` | `array` | yes | — | | `typeReferences` | `array` | yes | — | | `statusSpans` | `array` | no | Exact author-written names of status formulas seen by the compiler; presentation only. | | `callArguments` | `array` | yes | — | | `labelHints` | `array` | yes | — | | `expansionInlays` | `array` | yes | — | | `expectations` | `array` | yes | — | | `scopes` | `array` | yes | — | | `expansions` | `array` | yes | — | | `diagnostics` | `array` | yes | — | | `stdCalls` | `array` | no | Standard-library calls in argument position: the name, the argument and whole-call spans, the parameter index, and the argument count, for signature help. | | `incompleteCalls` | `array` | no | Incomplete calls for signature help; each item has the shape of a call argument or a standard-library call. | | `stdAliasHints` | `array` | no | Standard-library alias hints. | | `keywordRoles` | `array` | no | The role of a keyword in position — a help card for the author. | | `partial` | [`#/$defs/Partial`](#partial) | yes | — | ## Enumerations | location | values | |---|---| | `properties/schema` | `"law.editor-index/0.1"` | | `$defs/Declaration/properties/visibility` | `"public"`, `"internal"` | | `$defs/Declaration/properties/presentationOrigin` | `"expansionBind"` | | `$defs/RenameCertificate/properties/complete` | `true` | | `$defs/RenameCertificate/properties/preservesStableId` | `true` | | `$defs/ImportedSourceReference/properties/effectiveWindow/properties/axis` | `"legal_time"` | | `$defs/LocalSourceReference/properties/effectiveWindow/properties/axis` | `"legal_time"` | | `$defs/Dependency/properties/state` | `"resolved"`, `"unresolved"` | | `$defs/Dependency/allOf/0/if/properties/state` | `"resolved"` | | `$defs/CompletionItem/properties/kind` | `"field"` | | `$defs/Expectation/properties/completionKind` | `"actor"`, `"unit"`, `"namedArgument"`, `"expansionReference"`, `"expansionBody"` | | `$defs/Header/properties/kind` | `"package"`, `"namespace"` | ## Raw schema [`https://law.arxo.io/schema/editor-index.schema.json`](https://law.arxo.io/schema/editor-index.schema.json) ## `PresentationSpan` Type: `object`. Required: `span`. | name | type-or-$ref | description | |---|---|---| | `span` | [`#/$defs/Span`](#span) | — | ## `PropertySpan` Type: `object`. Required: `span`, `fieldSpan`. | name | type-or-$ref | description | |---|---|---| | `span` | [`#/$defs/Span`](#span) | — | | `fieldSpan` | [`#/$defs/Span`](#span) | — | ## `Position` Type: `object`. Required: `line`, `character`. | name | type-or-$ref | description | |---|---|---| | `line` | `integer` | — | | `character` | `integer` | — | | `offset` | `integer` | — | ## `Span` Type: `object`. Required: `uri`, `start`, `end`. | name | type-or-$ref | description | |---|---|---| | `uri` | `string` | — | | `start` | [`#/$defs/Position`](#position) | — | | `end` | [`#/$defs/Position`](#position) | — | ## `Declaration` Type: `object`. Required: `declId`, `name`, `kind`, `visibility`, `declarationSpan`, `span`, `scope`, `stableId`. | name | type-or-$ref | description | |---|---|---| | `declId` | `string` | — | | `name` | `string` | — | | `kind` | `string` | — | | `visibility` | enum (2) | — | | `declarationSpan` | [`#/$defs/Span`](#span) | — | | `span` | [`#/$defs/Span`](#span) | — | | `scope` | `string` | — | | `ownerDeclId` | `string` | The structural owner of a rule parameter, from the syntax-tree span and the compiler id; the lexical scope used for rename stays separate. | | `stableId` | `string` or `null` | — | | `rename` | [`#/$defs/RenameCertificate`](#renamecertificate) | — | | `outline` | `object` | — | | `binderOrigin` | `string` | Where the name was bound (for example a header). | | `outlineHidden` | `boolean` | — | | `presentationOrigin` | enum (1) | — | | `sourceReferences` | `array` | — | ## `ImportedDeclaration` Authored declaration location from an editor source-map sidecar whose bytes and package identity were verified by the dependency resolver. kind comes from the pinned CLIR, not the raw sidecar. It is deliberately separate from local declarations: it carries no local rename or symbol data. Type: `object`. Required: `declId`, `declarationSpan`. | name | type-or-$ref | description | |---|---|---| | `declId` | `string` | — | | `kind` | `string` | — | | `declarationSpan` | [`#/$defs/Span`](#span) | — | ## `RenameCertificate` The compiler proved one local declaration safe to rename: every affected occurrence is listed by span, and the stable id survives an explicit @id. Type: `object`. Required: `complete`, `preservesStableId`. | name | type-or-$ref | description | |---|---|---| | `complete` | `true` | — | | `preservesStableId` | `true` | — | ## `SourceReference` A positional @source argument. resolvedFragment is added only for a proven structural link: the positional arguments of every @source and the declaration anchors share one length and one ordering. local comes from the current model; imported comes only from pinned dependency data, with separate edition, document, and content hashes. Type: `object`. Required: `raw`, `annotationSpan`. | name | type-or-$ref | description | |---|---|---| | `raw` | `string` | — | | `annotationSpan` | [`#/$defs/Span`](#span) | — | | `argumentSpan` | [`#/$defs/Span`](#span) | — | | `resolvedFragment` | `string` | — | | `edition` | `string` | — | | `local` | [`#/$defs/LocalSourceReference`](#localsourcereference) | — | | `imported` | [`#/$defs/ImportedSourceReference`](#importedsourcereference) | — | ## `ImportedSourceReference` A proven edition of a public fragment from the pinned dependency model. A package content hash is never accepted in place of the document or text content hash; readings and rules travel only over model links. Type: `object`. Required: `edition`, `documentHash`. | name | type-or-$ref | description | |---|---|---| | `edition` | `string` | — | | `texts` | `array` | — | | `language` | `string` | — | | `officiality` | `string` | — | | `lifecycle` | `array` | — | | `applicability` | `string` | — | | `effectiveWindow` | `object` | The single exact window from the same lifecycle resolver; absent when the edition history is ambiguous. | | `documentHash` | `string` | — | | `materializationStatus` | `string` | — | | `interpretations` | `array` | — | ## `ImportedSourceText` Fragment text from the pinned dependency model; contentHash is required so it can never stand in for a package hash. Type: `object`. Required: `language`, `status`, `text`, `contentHash`. | name | type-or-$ref | description | |---|---|---| | `language` | `string` | — | | `status` | `string` | — | | `text` | `string` | — | | `exactBytes` | `string` | Exact bytes of the official text in base64, kept only when they differ from the NFC form of text. | | `contentHash` | `string` | — | ## `LocalSourceReference` A snapshot of the local fragments and the source edition from the lowered model. The lifecycle is carried as declared events, with no effective window computed. Readings, rules, and competing groups travel only over interpretation links. Type: `object`. Required: `edition`. | name | type-or-$ref | description | |---|---|---| | `edition` | `string` | — | | `texts` | `array` | — | | `language` | `string` | — | | `officiality` | `string` | — | | `lifecycle` | `array` | — | | `effectiveWindow` | `object` | The single exact proven window of applicability from the shared lifecycle resolver. Absent when the lifecycle needs several segments or cannot be proven. | | `documentHash` | `string` | — | | `materializationStatus` | `string` | — | | `interpretations` | `array` | — | ## `SourceInterpretation` Type: `object`. Required: `id`. | name | type-or-$ref | description | |---|---|---| | `id` | `string` | — | | `status` | `string` | — | | `linkedRules` | `array` | — | | `competingGroups` | `array` | — | ## `SourceLinkedRule` Type: `object`. Required: `id`. | name | type-or-$ref | description | |---|---|---| | `id` | `string` | — | ## `SourceInterpretationGroup` Type: `object`. Required: `id`, `alternatives`. | name | type-or-$ref | description | |---|---|---| | `id` | `string` | — | | `selection` | `string` | — | | `alternatives` | `array` | — | ## `SourceText` Type: `object`. Required: `language`, `status`, `text`. | name | type-or-$ref | description | |---|---|---| | `language` | `string` | — | | `status` | `string` | — | | `text` | `string` | — | | `exactBytes` | `string` | Exact bytes of the official text in base64, kept only when they differ from the NFC form of text. | | `contentHash` | `string` | — | ## `LifecycleEvent` Type: `object`. Required: `status`, `extent`. | name | type-or-$ref | description | |---|---|---| | `status` | `string` | — | | `extent` | `string` or `object` | — | ## `Usage` One addressing attempt, recorded directly by the compiler. Either declId is proven, or the failure reason is stated explicitly. Type: `object`. Required: `span`, `role`. | name | type-or-$ref | description | |---|---|---| | `span` | [`#/$defs/Span`](#span) | — | | `role` | `string` | — | | `declId` | `string` | — | | `unresolvedReason` | `string` | — | ## `Signature` Type: `object`. Required: `declId`, `name`, `parameters`. | name | type-or-$ref | description | |---|---|---| | `declId` | `string` | — | | `name` | `string` | — | | `parameters` | `array` | — | ## `Dependency` Type: `object`. Required: `name`, `version`, `span`, `state`. | name | type-or-$ref | description | |---|---|---| | `name` | `string` | — | | `version` | `string` | — | | `span` | [`#/$defs/Span`](#span) | — | | `state` | enum (2) | — | | `namespace` | `string` | — | | `semanticHash` | `string` | — | | `contentHash` | `string` | — | | `typeExports` | `array` | Types proven by the pinned dependency’s exports; used without an author-written source map. | ## `TypeReference` A parametric type reference resolved by the compiler. defaultLibrary means the compiler chose the standard-library type rather than a same-named local type. Type: `object`. Required: `span`, `target`, `defaultLibrary`. | name | type-or-$ref | description | |---|---|---| | `span` | [`#/$defs/Span`](#span) | — | | `target` | `string` | — | | `defaultLibrary` | `boolean` | — | | `nameParts` | `array` | Ordered author-written spans of the parts of a qualified name: the namespace and the final type; the full span is kept for navigation. | ## `CallArgument` A relation argument matched to parameterName by the type checker. The remaining fields are parser and checker facts for inlay presentation; clients never parse source text. Type: `object`. Required: `span`, `parameterName`, `parameterType`, `parameterIndex`, `parameterCount`, `relationName`, `argumentMatchesParameter`, `authoredParameterName`. | name | type-or-$ref | description | |---|---|---| | `span` | [`#/$defs/Span`](#span) | — | | `parameterName` | `string` | — | | `parameterType` | `string` | — | | `parameterIndex` | `integer` | — | | `parameterCount` | `integer` | — | | `callSpan` | [`#/$defs/Span`](#span) | — | | `declId` | `string` or `null` | — | | `relationName` | `string` | — | | `parameterDeclarationSpan` | [`#/$defs/Span`](#span) | The position of the parameter name from the confirmed local signature; absent for imports known only from the compiled model. | | `parameterOrigin` | `string` | The editor-visible source of the pinned signature, as presented by the compiler. | | `argumentMatchesParameter` | `boolean` | — | | `authoredParameterName` | `boolean` | — | ## `LabelHint` A canonical label of a compiler-lowered node. span is the declaration name or a compiler-proven call-site use, never text found by the client. Type: `object`. Required: `span`, `language`, `status`, `text`. | name | type-or-$ref | description | |---|---|---| | `span` | [`#/$defs/Span`](#span) | — | | `language` | `string` | — | | `status` | `string` | — | | `text` | `string` | — | | `declId` | `string` | — | | `origin` | `string` | The editor-visible source of the pinned label, as presented by the compiler. | ## `ExpansionInlay` The signature line of one instance, taken from a checked definition and a pinned alias; the server displays it without parsing text. Type: `object`. Required: `span`, `label`, `tooltip`. | name | type-or-$ref | description | |---|---|---| | `span` | [`#/$defs/Span`](#span) | — | | `label` | `string` | — | | `tooltip` | `string` | — | ## `CompletionItem` A ready-to-insert form derived by the compiler from a checked expansion definition. Type: `object`. Required: `label`, `insertText`, `kind`, `snippet`, `sortText`. | name | type-or-$ref | description | |---|---|---| | `label` | `string` | — | | `insertText` | `string` | — | | `kind` | enum (1) | — | | `snippet` | `boolean` | — | | `sortText` | `string` | — | ## `Expectation` The expected type at an expression position, from type checking. A dimension is carried in the canonical JSON form of the unit registry. Type: `object`. Required: `span`, `expectedType`. | name | type-or-$ref | description | |---|---|---| | `span` | [`#/$defs/Span`](#span) | — | | `expectedType` | `string` | — | | `dimension` | `array` | — | | `completionKind` | enum (5) | — | | `completionItems` | `array` | — | | `replacementSpan` | [`#/$defs/Span`](#span) | — | | `candidates` | `array` | A fixed ordered list of compiler-proven substitutions for this position. Clients never extend it with their own resolution. | ## `Scope` Type: `object`. Required: `id`, `kind`, `span`. | name | type-or-$ref | description | |---|---|---| | `id` | `string` | — | | `kind` | `string` | — | | `span` | [`#/$defs/Span`](#span) | — | ## `Expansion` Type: `object`. Required: `node`, `origins`. | name | type-or-$ref | description | |---|---|---| | `node` | `string` | — | | `origins` | `array` | — | ## `Partial` Type: `object`. Required: `value`, `reason`. | name | type-or-$ref | description | |---|---|---| | `value` | `boolean` | — | | `reason` | `string` | — | ## `File` Type: `object`. Required: `uri`, `sha256`. | name | type-or-$ref | description | |---|---|---| | `uri` | `string` | — | | `sha256` | `string` | — | ## `Header` Exact parser boundaries of a package or namespace header. Clients never reconstruct value spans from source text. Type: `object`. Required: `kind`, `value`, `span`, `valueSpans`. | name | type-or-$ref | description | |---|---|---| | `kind` | enum (2) | — | | `value` | `string` | — | | `span` | [`#/$defs/Span`](#span) | — | | `valueSpans` | `array` | — |