@inventarch/graph 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,71 @@
1
1
  # @inventarch/graph
2
2
 
3
- The pure graph layer consumes compiled IA records and an explicit registry. [SPEC.md](SPEC.md) owns behavior and implementation status. The package provides immutable graph construction, reach/phase authority resolution, occurrence and relationship indexes, a derived typed field-reference index kept apart from the edges, `directedView(graph, identity)` (each assertion read from both endpoints, as a declared row on its author and a labeled derived inverse on the other side in the kernel spelling for that side, such as `governed-by` at the target, plus field references both ways, read from the load-time `referencesFrom` and `referencedBy` indexes; SPEC G06b), a load-time claimant index `claims` of the path selections records state in `authority.covers`, `subject.covers`, `work.covers`, `hook.paths` and `check.covers` (a `@check`'s textual `check.scope` is never one), with `selects(selection, path)`, the one path-selection dialect, and `claimants(graph, path, scope)`, the records whose selections select a path, band descending then identity (SPEC G06c), revision hashing (`revisionOf`, and `authoredRevisionOf`, the same hash without the sources at runtime placement, a named derived revision-only input kept, so runtime-band evidence does not move it; SPEC G01a), coordinate/dimension validation, and `laneOf(record)`, the lane a record's kind gives it (an authority-facet contract reads `authority`), which the lane index posts under (SPEC G05). Conditions, selectors, variant and cell selection, and scoped breadth-first traversal consume those products. search(graph, text, scope) ranks decoded content using BM25 with scope-local statistics. The canonical JSON codec (`canonical`, `digest`, `copy` and `CodecError`) gives release assessment and session journals one byte-stable SHA-256 digest; SPEC G12 states its rules and refusal codes. Each loaded Node carries `digest`, the per-record digest `recordDigest` computes over what the record says without where it was read: its source path, lines, spans, placement and provenance (SPEC G13); it is not a revision input.
3
+ [![npm](https://img.shields.io/npm/v/@inventarch/graph?label=npm)](https://www.npmjs.com/package/@inventarch/graph) [![Public quality](https://github.com/inventarch/ia/actions/workflows/platform-quality.yml/badge.svg?branch=main)](https://github.com/inventarch/ia/actions/workflows/platform-quality.yml) [![License](https://img.shields.io/badge/license-Apache--2.0-green)](LICENSE) [![Node](https://img.shields.io/badge/node-22.x-brightgreen)](package.json)
4
4
 
5
- The package depends on @inventarch/language and uses node:crypto only for deterministic SHA-256. It performs no filesystem I/O, clock reads, source parsing, cache publication or model/tool execution. Decoded prose search is implemented here; IA lexical analysis stays in language.
5
+ > The typed graph over compiled IA records. It chooses the winning occurrence of each identity, resolves references, rechecks relationship consent, and lets you traverse relationships, inspect claims, conditions and record digests, and search record text.
6
+ >
7
+ > It sits between [`@inventarch/language`](../language/README.md), which compiles the records, and [`@inventarch/compliance`](../compliance/README.md), which checks the graph.
8
+
9
+ ## ⚡ Quick start
10
+
11
+ ```sh
12
+ npm install @inventarch/language @inventarch/graph
13
+ ```
14
+
15
+ ```js
16
+ import { buildRegistry, compile, KERNEL_DIGEST, KERNEL_SOURCES, LANGUAGE_VERSION, parse } from '@inventarch/language';
17
+ import { directedView, load } from '@inventarch/graph';
18
+
19
+ // The caller supplies every input; this example loads the language floor that the language package embeds.
20
+ const location = { placement: { kind: 'floor', band: 10, reach: '' }, provenance: 'bootstrap' };
21
+ const sources = KERNEL_SOURCES.map((source) => ({ ...source, location }));
22
+ const parsed = sources.map((source) => ({ ...parse(source.text, source.path), location }));
23
+ const { registry } = buildRegistry(parsed);
24
+ const records = parsed.flatMap((source) => compile(source.ast, registry, location, []).records);
25
+
26
+ const graph = load(records, registry, {
27
+ sources,
28
+ languageVersion: LANGUAGE_VERSION,
29
+ kernelDigest: KERNEL_DIGEST,
30
+ location: '',
31
+ });
32
+ console.log(graph.diagnostics.length); // 0
33
+
34
+ for (const row of directedView(graph, 'floor/contract/head/kernel-phase'))
35
+ console.log(row.kind, row.spelling, row.counterpart);
36
+ // inverse grounded-by floor/definition/system/taxonomy
37
+ ```
38
+
39
+ `load` reads nothing itself: it takes compiled records, the registry that compiled them and the revision inputs. To read a workspace on disk, use [`@inventarch/db`](../db/README.md), which discovers the sources and builds the graph.
40
+
41
+ ## 🧭 What it does
42
+
43
+ | Area | Exports |
44
+ | --- | --- |
45
+ | Load | `load(records, registry, options)` returns an immutable `Graph`: one winner per identity (the highest band; a tie at that band refuses every tied occurrence), shadows, resolved and dangling edges, indexes and diagnostics. `serialize(graph)` writes it in a stable order that input order does not affect. |
46
+ | Resolve | `resolve(reference, pool, registry)` returns one identity, `IA-GRAPH-TARGET-MISSING` or `IA-GRAPH-TARGET-AMBIGUOUS`; candidate order never breaks a tie. |
47
+ | Relationships | `directedView(graph, identity)` lists every relationship from that record's side, declared or derived inverse, plus typed field references. `traverse(graph, options)` walks breadth-first from start identities to a depth of 0 to 8, with optional scope, filter and coordinate, and `maxNodes`/`maxEdges` bounds that mark a result `truncated`. |
48
+ | Claims | `claimants(graph, path, scope?)` names the records whose path selections in `CLAIM_FIELDS` (`authority.covers`, `subject.covers`, `work.covers`, `hook.paths`, `check.covers`) select a path. `selects(selection, path)` and `isSelection(selection)` implement the one path-selection dialect. |
49
+ | Conditions | `validateCoordinate`, `conditionHolds`, `selectors`, `variants`, `cell`, `effectiveSeverity` and `laneOf` evaluate conditions, selector groups and variant and cell selection for a coordinate. |
50
+ | Search | `search(graph, text, scope?)` ranks decoded record text with BM25, computing its statistics over the allowed scope only. |
51
+ | Revisions and digests | `revisionOf` hashes the sources, registry, language version and kernel digest. `authoredRevisionOf` leaves out sources at runtime placement, so runtime-band evidence does not move it. Each node carries `digest` from `recordDigest(record)`, which covers what a record says, not where it was read. |
52
+ | Canonical JSON | `canonical`, `digest` and `copy` give byte-stable canonical JSON and its SHA-256. Each refusal is a `CodecError` with a stable `code`. |
53
+
54
+ Load diagnostics use the `GRAPH_CODES` (`IA-GRAPH-*`). Invalid query input, such as an unknown coordinate value or a traversal depth outside 0 to 8, throws `GraphUsageError`. The `./internal/*` subpaths are published for IA's own toolchain; use the root entry point.
55
+
56
+ ## ⚖️ What it does not do
57
+
58
+ - **No I/O or execution.** It reads no files, clock or default registry, parses no source text, keeps no cache and calls no model or tool. It depends only on `@inventarch/language` and uses `node:crypto` for SHA-256.
59
+ - **A dangling reference is not a pass.** It stays a warning edge (`IA-GRAPH-TARGET-MISSING`). A fragment is kept but not checked; [`@inventarch/compliance`](../compliance/README.md) decides whether the cell or requirement it names exists.
60
+ - **Derived rows are views.** An inverse row from `directedView` is never written back to source or merged into `edges`.
61
+ - **A claim is not an edge.** It carries no predicate and grants nothing. A `@check`'s `check.scope` never claims a path.
62
+ - **A truncated traversal is not the whole graph.** Report a `truncated` result as partial.
63
+ - **No scopes or packets.** Scope tokens and caches belong to [`@inventarch/db`](../db/README.md), and position views and host packets to [`@inventarch/runtime`](../runtime/README.md).
64
+
65
+ ## 📚 Learn more
66
+
67
+ - [SPEC.md](SPEC.md): the package contract (G01 to G13), including the directed view, claimant index and canonical codec
68
+ - [LANGUAGE.md](LANGUAGE.md): the packaged summary of the words this release ships
69
+ - [Architecture reference](../../docs/reference/architecture/README.md#which-package-to-use)
70
+ - Neighbours in the dependency direction: [`@inventarch/language`](../language/README.md) before it; [`@inventarch/compliance`](../compliance/README.md) and [`@inventarch/db`](../db/README.md) after it
71
+ - [Root README](../../README.md)
package/SPEC.md CHANGED
@@ -2,13 +2,13 @@
2
2
 
3
3
  Bounded traversal extension (Workbench): optional `maxNodes`/`maxEdges` retain normal authority, scope, direction and condition behavior while bounding emitted records and edge examination. A bounded result reports `truncated`; callers must not describe it as a complete graph. Calls without limits preserve the original contract.
4
4
 
5
- Status: G01–G11 implemented under the graph plan; G12 states the canonical codec re-homed here from session-system; G13 adds the per-record digest; G01a adds the authored revision; G06b adds the directed view; G06c adds the claimant index and the path-selection dialect. Shared concepts: graph/matrix design. Pure Node-compatible package depending only on @inventarch/language; no filesystem, clock, default registry or source-text lexer. Task-delivery paragraphs below retain historical counts and next steps; current readiness covers the completed downstream consumers.
5
+ Status: G01–G11 implemented; G12 states the canonical codec re-homed here from session-system; G13 adds the per-record digest; G01a adds the authored revision; G06b adds the directed view; G06c adds the claimant index and the path-selection dialect. Pure Node-compatible package depending only on @inventarch/language; no filesystem, clock, default registry or source-text lexer. Delivery paragraphs below retain historical counts and next steps.
6
6
 
7
7
  ## Construction and revision
8
8
 
9
9
  G01. `load(records, registry, options)` returns an immutable Graph containing source diagnostics. Options explicitly supply revision sources, language version, kernel digest, view location and optional phase. A revision source has path, text and Location. `revisionOf` SHA-256 hashes sorted canonical source paths/raw text/placement/provenance, stable registry serialization, language version and kernel digest. Any byte or semantic input change affects the revision. Location/phase identify a view and do not change corpus revision. Duplicate source paths and inconsistent caller-supplied registration/identity/placement are TypeErrors, not authored syntax diagnostics.
10
10
 
11
- G01a. The authored revision (2026-10-09, decision evidence-placement; milestone generation-binding plan amendment C13, task authored-revision). `authoredRevisionOf(registry, inputs, derived?)`, exported beside `revisionOf`, is `revisionOf`'s SHA-256 over the same canonical form without each source at runtime placement (`placement.kind` `runtime`, band 0), so runtime-band evidence, admitted below authored and never part of what agents are given, leaves it unchanged. A runtime-placed input whose canonical path `derived` names stays: a derived revision-only input that no record compiles from, such as db's `.ia/.db-inputs.json` (db D03: the folder inventory, floor origin, admission version, authored roots and activation), so a folder or activation change still moves it; named or not, every source is canonicalized and checked as `revisionOf` checks it (a malformed location or a duplicate canonical path is a TypeError, a runtime-placed one included). The registry, language version and kernel digest are hashed as `revisionOf` hashes them, so a change to any of them, or to the bytes, path, placement or provenance of a source not at runtime placement, moves it, and a source moved to runtime placement drops out of it, as its records leave what agents are given. With no source at runtime placement but the named derived inputs it equals `revisionOf(registry, inputs)`, so a workspace with none keeps every revision it had. It is no `load` input: a graph's `revision` stays `revisionOf`'s, and `load` still requires every record's source among the full inputs. `tests/primitives.test.ts` pins the equality, order independence, a runtime-placed source added or edited moving only `revisionOf`, a source moved to runtime placement hashed as if absent, the derived input, registry, kernel, version and bytes moving it, an unnamed metadata input counted as runtime-placed, and the checks.
11
+ G01a. The authored revision (2026-10-09). `authoredRevisionOf(registry, inputs, derived?)`, exported beside `revisionOf`, is `revisionOf`'s SHA-256 over the same canonical form without each source at runtime placement (`placement.kind` `runtime`, band 0), so runtime-band evidence, admitted below authored and never part of what agents are given, leaves it unchanged. A runtime-placed input whose canonical path `derived` names stays: a derived revision-only input that no record compiles from, such as db's `.ia/.db-inputs.json` (db D03: the folder inventory, floor origin, admission version, authored roots and activation), so a folder or activation change still moves it; named or not, every source is canonicalized and checked as `revisionOf` checks it (a malformed location or a duplicate canonical path is a TypeError, a runtime-placed one included). The registry, language version and kernel digest are hashed as `revisionOf` hashes them, so a change to any of them, or to the bytes, path, placement or provenance of a source not at runtime placement, moves it, and a source moved to runtime placement drops out of it, as its records leave what agents are given. With no source at runtime placement but the named derived inputs it equals `revisionOf(registry, inputs)`, so a workspace with none keeps every revision it had. It is no `load` input: a graph's `revision` stays `revisionOf`'s, and `load` still requires every record's source among the full inputs. `tests/primitives.test.ts` pins the equality, order independence, a runtime-placed source added or edited moving only `revisionOf`, a source moved to runtime placement hashed as if absent, the derived input, registry, kernel, version and bytes moving it, an unnamed metadata input counted as runtime-placed, and the checks.
12
12
 
13
13
  G02. Graph snapshots all inputs and exposes read-only collection views backed by inaccessible copies; casting a ReadonlyMap to Map must not make mutation possible. Nested record/schema/registry arrays and objects are frozen copies. `serialize(graph)` has total stable ordering independent of source, record and map insertion order. Object keys sort by code point, maps by serialized key, sets by serialized value. Source text is revision input, never re-lexed here. SHA-256 uses the pure deterministic node:crypto hash API.
14
14
 
@@ -24,9 +24,9 @@ G06. Resolve every authored edge through language.resolveTarget against winners,
24
24
 
25
25
  G06a. Derive `references`, a typed field-reference index beside the edges, from every typed ref value a winner holds in its head or sections, list items and nested fields included. Each `FieldReference` carries `from` (the holder), `to` (the resolved winner), `field` (the compiler's field path: `head.steward`, `composition.mandate`, `binding.target`, or the bare section name for a section-level item), the authored `reference` and the holder's source span. Targets resolve through the same resolve API as edges; an unresolved or ambiguous ref is omitted without a graph diagnostic, because compliance reports it (IA-COMP-FIELD-REF-MISSING). The `relationships` section is skipped by name, so a consent-refused assertion never reappears as a reference, and a ref inside the span of an edge the compiler already lowered (a floor `@system` `discriminators` entry's `ground`) is skipped, so no authored ref is both an edge and a reference. A field reference carries no predicate and is never consent-, cardinality- or COMP-checked; `edges`, `in`, `out`, `dangling`, diagnostics and revision are unchanged by it. `referencedBy` keys `references` by target and `referencesFrom` keys them by holder, each list in `references` order, both built once at load. Ordering is total over from, field, to, source path/line and the serialized reference, independent of input order; equal entries are stored once. The directed view (G06b) lists each reference from both ends as a derived `field-ref` row, so the index is navigable from its holder as well as its target.
26
26
 
27
- G06b. `directedView(graph, identity)` returns the identity's directed view (position-and-projection row 4 and section 8): a frozen list of every row the graph holds at that identity, read from its side. Each resolved edge the identity is an endpoint of gives one row per assertion per side it occupies, carrying the edge's `predicate`, the `direction` the identity reads it in (`out` at the active source, `in` at the active target), the `counterpart` (the other endpoint), `declaredOn` (the assertion's author), `declaredBy` (`source` for an outbound assertion, `target` for an inverse one, the same from either side: the `declared by source` or `declared by target` label), the assertion's `source` lines, and the edge's `fragment` and `condition` when it has them; the fragment addresses the record the declaration references. On the side its author stands the row is `kind: 'edge'`, `derived: false`, with `spelling` the verb the author wrote. On the other side it is `kind: 'inverse'`, `derived: true`, with `spelling` the kernel's for that side: the active predicate at the source, and at the target its language `INVERSE_OF` spelling, one of the eighteen (governed-by, enforced-by, grounded-by, constrained-by, implemented-by, produced-by, consumed-by, lineage-recorded-by, access-granted-by, run-after, triggered-by, cited-by, superseded-by, required-by, used-by, forbidden-by, routed-by, landed-by). An edge asserted from both ends keeps both assertions (G07), so each side holds its own declared row and the derived inverse of the other's; a self-relation is read from both of its sides. Each G06a field reference the identity holds or is named by gives one `kind: 'field-ref'`, `derived: true` row with its `field` path, `declaredOn` the holder and no predicate or spelling. A derived row is a view and is never authoritative over the declared row it reads: nothing is written back to source, merged into `edges` or re-spelled there. Dangling (G06), ambiguous and consent-refused (G07) assertions are findings, not rows: a dangling one stays in diagnostics, `dangling` and `byDanglingReference`, an ambiguous or refused one in diagnostics only, and neither endpoint has a row for it. An identity that is not an admitted winner has no rows. Rows order by kind (edge, inverse, field-ref), direction (out, in), predicate or field, counterpart, declaring record, source path and line, then the serialized row: a total order independent of input order. The view is computed on read from the load-time `out`, `in`, `referencesFrom` and `referencedBy` indexes, so a call reads only the identity's own entries and never scans `references`; reading it adds no index, diagnostic or revision input and leaves `serialize(graph)` unchanged. `tests/directed.test.ts` pins both spellings from both sides, both-sided assertions, self-relations, fragments, conditions, findings, field references and the order within one kind and direction, and that over the native corpus each resolved assertion and each field reference is read exactly once from each end, a record's held references exactly as a scan of `references` finds them.
27
+ G06b. `directedView(graph, identity)` returns the identity's directed view: a frozen list of every row the graph holds at that identity, read from its side. Each resolved edge the identity is an endpoint of gives one row per assertion per side it occupies, carrying the edge's `predicate`, the `direction` the identity reads it in (`out` at the active source, `in` at the active target), the `counterpart` (the other endpoint), `declaredOn` (the assertion's author), `declaredBy` (`source` for an outbound assertion, `target` for an inverse one, the same from either side: the `declared by source` or `declared by target` label), the assertion's `source` lines, and the edge's `fragment` and `condition` when it has them; the fragment addresses the record the declaration references. On the side its author stands the row is `kind: 'edge'`, `derived: false`, with `spelling` the verb the author wrote. On the other side it is `kind: 'inverse'`, `derived: true`, with `spelling` the kernel's for that side: the active predicate at the source, and at the target its language `INVERSE_OF` spelling, one of the eighteen (governed-by, enforced-by, grounded-by, constrained-by, implemented-by, produced-by, consumed-by, lineage-recorded-by, access-granted-by, run-after, triggered-by, cited-by, superseded-by, required-by, used-by, forbidden-by, routed-by, landed-by). An edge asserted from both ends keeps both assertions (G07), so each side holds its own declared row and the derived inverse of the other's; a self-relation is read from both of its sides. Each G06a field reference the identity holds or is named by gives one `kind: 'field-ref'`, `derived: true` row with its `field` path, `declaredOn` the holder and no predicate or spelling. A derived row is a view and is never authoritative over the declared row it reads: nothing is written back to source, merged into `edges` or re-spelled there. Dangling (G06), ambiguous and consent-refused (G07) assertions are findings, not rows: a dangling one stays in diagnostics, `dangling` and `byDanglingReference`, an ambiguous or refused one in diagnostics only, and neither endpoint has a row for it. An identity that is not an admitted winner has no rows. Rows order by kind (edge, inverse, field-ref), direction (out, in), predicate or field, counterpart, declaring record, source path and line, then the serialized row: a total order independent of input order. The view is computed on read from the load-time `out`, `in`, `referencesFrom` and `referencedBy` indexes, so a call reads only the identity's own entries and never scans `references`; reading it adds no index, diagnostic or revision input and leaves `serialize(graph)` unchanged. `tests/directed.test.ts` pins both spellings from both sides, both-sided assertions, self-relations, fragments, conditions, findings, field references and the order within one kind and direction, and that over the native corpus each resolved assertion and each field reference is read exactly once from each end, a record's held references exactly as a scan of `references` finds them.
28
28
 
29
- G06c. Claimant index and path selections (position-and-projection row 17; the covers-field-vs-predicate decision keeps `covers` a field of text path selections, neither a predicate nor a ref). `claims` is a derived index built once at load: one frozen `Claim` `{from, field, selection, source}` for each text value a winner holds in a claimant field, a list's items in authored order. The claimant fields, exported as `CLAIM_FIELDS`, are `authority.covers` (`@mandate`), `subject.covers` (`@law`, `@convention`), `work.covers` (`@spec`), `hook.paths` (`@hook`) and `check.covers` (`@check`, milestone generation-binding plan amendment C17), each a top-level field of its section, read by path on any winner that holds it; schema admission keeps an undeclared one out of an admitted view. A nested field, a ref value and a `covers` in any other section are not claims. Equal (holder, field, selection) claims are stored once, and claims order by holder identity, then as the record states them. A claim is not an edge: it carries no predicate, is never consent-checked and is not a revision input. `selects(selection, path)` is the one path-selection dialect. Both read `\` as `/`. The path is canonicalized as a scope root (G03: `.` and empty segments dropped, `..` resolved), and an absolute path or one escaping the workspace is selected by nothing. A selection is `/`-separated workspace-relative segments: a whole-segment `**` matches zero or more segments, `*` any run of characters within one segment, `?` exactly one character (one code point), and every other character itself, case-sensitively. A trailing `/` stands for `/**`, so `docs/` selects `docs` and everything below it, while `docs` selects only that path. There are no braces, classes, escapes or negation, a leading dot is not special, and an empty or absolute selection, or one with an empty, `.` or `..` segment, selects nothing; `isSelection(selection)` says whether the dialect reads a selection at all, so a host can name one that selects nothing where it is authored (db D02b `inertDeclarations`). A `@check`'s `check.scope` is never a claimant field (decision check-scope-claims, 2026-10-08; plan amendment C22): it stays text, such as "every admitted native record" or the whole-workspace token `*`, that selects the verdicts the check binds to (db D13), and claims no path. A check claims paths only through its optional `check.covers` list, and claiming a path changes nothing about which verdicts it selects. Matching keeps one backtrack point per level, so it takes at most pattern × path steps. `claimants(graph, path, scope?)` reads the index, never the records: each winner with a claim that selects the path, holders outside `scope` pruned, as a frozen `Claimant` `{identity, band, matches}` listing every matching `{field, selection}` in index order, ordered band descending then identity ascending. `tests/claims.test.ts` pins the dialect, the index over probe and native records, permutation stability, pruning and the order.
29
+ G06c. Claimant index and path selections (`covers` stays a field of text path selections, neither a predicate nor a ref). `claims` is a derived index built once at load: one frozen `Claim` `{from, field, selection, source}` for each text value a winner holds in a claimant field, a list's items in authored order. The claimant fields, exported as `CLAIM_FIELDS`, are `authority.covers` (`@mandate`), `subject.covers` (`@law`, `@convention`), `work.covers` (`@spec`), `hook.paths` (`@hook`) and `check.covers` (`@check`), each a top-level field of its section, read by path on any winner that holds it; schema admission keeps an undeclared one out of an admitted view. A nested field, a ref value and a `covers` in any other section are not claims. Equal (holder, field, selection) claims are stored once, and claims order by holder identity, then as the record states them. A claim is not an edge: it carries no predicate, is never consent-checked and is not a revision input. `selects(selection, path)` is the one path-selection dialect. Both read `\` as `/`. The path is canonicalized as a scope root (G03: `.` and empty segments dropped, `..` resolved), and an absolute path or one escaping the workspace is selected by nothing. A selection is `/`-separated workspace-relative segments: a whole-segment `**` matches zero or more segments, `*` any run of characters within one segment, `?` exactly one character (one code point), and every other character itself, case-sensitively. A trailing `/` stands for `/**`, so `docs/` selects `docs` and everything below it, while `docs` selects only that path. There are no braces, classes, escapes or negation, a leading dot is not special, and an empty or absolute selection, or one with an empty, `.` or `..` segment, selects nothing; `isSelection(selection)` says whether the dialect reads a selection at all, so a host can name one that selects nothing where it is authored (db D02b `inertDeclarations`). A `@check`'s `check.scope` is never a claimant field: it stays text, such as "every admitted native record" or the whole-workspace token `*`, that selects the verdicts the check binds to (db D13), and claims no path. A check claims paths only through its optional `check.covers` list, and claiming a path changes nothing about which verdicts it selects. Matching keeps one backtrack point per level, so it takes at most pattern × path steps. `claimants(graph, path, scope?)` reads the index, never the records: each winner with a claim that selects the path, holders outside `scope` pruned, as a frozen `Claimant` `{identity, band, matches}` listing every matching `{field, selection}` in index order, ordered band descending then identity ascending. `tests/claims.test.ts` pins the dialect, the index over probe and native records, permutation stability, pruning and the order.
30
30
 
31
31
  G07. Check both word owners' consent on each resolved edge in active direction, reporting only the first refusing side as EDGE-UNCONSENTED. The exact unconditioned, fragmentless system-to-registered-schema ground assertion generated by registration bypasses ledgers as specified by language S07; no other ground edge is exempt. Store equivalent unconditioned edges once, retaining every source assertion. Conditioned edges also key by condition subject, because equal terms authored on different records may see different dimensions. Sort edges by endpoints/predicate/fragment/condition/author/source for a total order.
32
32
 
@@ -54,12 +54,12 @@ G13. Every Node carries `digest`, its per-record digest, computed once per occur
54
54
 
55
55
  Graph source codes use IA-GRAPH-IDENTITY-TIE, TARGET-MISSING, TARGET-AMBIGUOUS, EDGE-UNCONSENTED and DIMENSION-UNKNOWN. Query errors use IA-GRAPH-COORDINATE-VALUE-UNKNOWN, VERB-UNKNOWN, TRAVERSAL-INVALID and VARIANT-AMBIGUOUS; root normalization uses SCOPE-INVALID. Codec refusals use IA-SESSION-INPUT-INVALID and IA-SESSION-LIMIT-EXCEEDED (G12). Source diagnostic shape matches language with the graph namespace; errors refuse their stated subject, warnings retain evidence. Fragments are retained but compliance owns existence. Graph performs no scenario execution, caching, scope-token issuance, ranking into runtime packets or model/tool dispatch. Public evidence must distinguish these boundaries.
56
56
 
57
- Each task records native success/refusal, permutation/immutability and public-consumer evidence here. Native taxonomy/system records, the authoring playbook, law and check provide the normal path; overlays and malformed coordinates provide adversarial cases. Central exact-cell/primary examples use separate records to avoid double-delivery. Raising severity uses an advisory fixture, because a blocking subject is already blocking without a request override.
57
+ Each delivery records native success/refusal, permutation/immutability and public-consumer evidence here. Native taxonomy/system records, the authoring playbook, law and check provide the normal path; overlays and malformed coordinates provide adversarial cases. Central exact-cell/primary examples use separate records to avoid double-delivery. Raising severity uses an advisory fixture, because a blocking subject is already blocking without a request override.
58
58
 
59
- Task 1 delivered: public revision, root/reach and coordinate/dimension APIs; internal immutable snapshots and stable typed collection serialization. 39 graph tests cover native inputs, source/registry/placement/provenance/kernel/version revision changes, mutation resistance, invalid coordinates and scope escape variants. Workspace tests/typecheck/build passed; graph load/index/query tasks remain pending.
59
+ Revision and coordinate APIs delivered: public revision, root/reach and coordinate/dimension APIs; internal immutable snapshots and stable typed collection serialization. 39 graph tests cover native inputs, source/registry/placement/provenance/kernel/version revision changes, mutation resistance, invalid coordinates and scope escape variants. Workspace tests/typecheck/build passed; graph load, indexes and queries remain pending.
60
60
 
61
- Task 2 delivered: immutable graph load, winner-only indexes with retained occurrences/shadows/ties, active-direction relationships, dangling references and consent rechecks. 57 graph tests and the complete 1401-test workspace suite pass, with typecheck/build/kernel check. Native graph: 153 records, 26 structural grounds, zero diagnostics. Contextual queries and text search remain pending.
61
+ Graph load and indexes delivered: immutable graph load, winner-only indexes with retained occurrences/shadows/ties, active-direction relationships, dangling references and consent rechecks. 57 graph tests and the complete 1401-test workspace suite pass, with typecheck/build/kernel check. Native graph: 153 records, 26 structural grounds, zero diagnostics. Contextual queries and text search remain pending.
62
62
 
63
- Task 3 delivered: conditions, selectors, variants, cell selection and breadth-first traversal. Traversal defaults to depth 1 and both directions when follow is absent; an explicit empty follow list crosses no edges. Via entries describe shortest-path hops, while followed edges retain cycles without revisiting nodes. Scope and typed filters prune before any edge emission, including gated edges. Query results are immutable. 86 graph tests and 1430 workspace tests/45 files pass with typecheck/build/kernel check.
63
+ Queries and traversal delivered: conditions, selectors, variants, cell selection and breadth-first traversal. Traversal defaults to depth 1 and both directions when follow is absent; an explicit empty follow list crosses no edges. Via entries describe shortest-path hops, while followed edges retain cycles without revisiting nodes. Scope and typed filters prune before any edge emission, including gated edges. Query results are immutable. 86 graph tests and 1430 workspace tests/45 files pass with typecheck/build/kernel check.
64
64
 
65
- Task 4 delivered: immutable decoded-text postings and scoped BM25. The name is indexed once using displayName, along with the discriminator, nested compiled field/item/list/reference values and semantic text not already represented at its source line. Field keys and source syntax are not lexed. Search results preserve query-term order, deduplicate terms and exclude nonexistent scope identities from statistics. 92 graph tests; 1440 workspace tests/47 files, typecheck/build, native/kernel and dependency checks pass. The emitted-declaration/built-runtime consumer admits all 153 native nodes and exercises exact cells, variants, inverse gating, scoped search and immutable views. Graph G01–G11 are delivered; scenario execution, scoped capability tokens, caches and runtime packet assembly retain their downstream owners.
65
+ Text search delivered: immutable decoded-text postings and scoped BM25. The name is indexed once using displayName, along with the discriminator, nested compiled field/item/list/reference values and semantic text not already represented at its source line. Field keys and source syntax are not lexed. Search results preserve query-term order, deduplicate terms and exclude nonexistent scope identities from statistics. 92 graph tests; 1440 workspace tests/47 files, typecheck/build, native/kernel and dependency checks pass. The emitted-declaration/built-runtime consumer admits all 153 native nodes and exercises exact cells, variants, inverse gating, scoped search and immutable views. Graph G01–G11 are delivered; scenario execution, scoped capability tokens, caches and runtime packet assembly retain their downstream owners.
package/dist/claims.d.ts CHANGED
@@ -1,14 +1,12 @@
1
1
  import type { Band } from '@inventarch/language';
2
2
  import type { Claim, Graph, Node } from './types.js';
3
3
  /**
4
- * G06c: the claimant fields, each a section field whose text values are path selections (position-and-projection row
5
- * 17; the covers-field-vs-predicate decision keeps `covers` a field, not a predicate): `covers` in a @mandate's
6
- * `authority`, a @law's or @convention's `subject`, a @spec's `work` and a @check's `check` (milestone
7
- * generation-binding plan amendment C17), and a @hook's `hook.paths`. A field is read by its path on any winner that
8
- * holds it; schema admission keeps undeclared ones out. A @check's `check.scope` is never one (decision
9
- * check-scope-claims, plan amendment C22): it stays text, such as "every admitted native record" or `*`, that selects the
10
- * verdicts the check binds to, and claims no path; `check.covers` is the check's claimant field, and claiming a path
11
- * changes nothing about which verdicts the check selects.
4
+ * G06c: the claimant fields, each a section field whose text values are path selections (db D02b; `covers` stays a
5
+ * field, not a predicate): `covers` in a @mandate's `authority`, a @law's or @convention's `subject`, a @spec's `work`
6
+ * and a @check's `check`, and a @hook's `hook.paths`. A field is read by its path on any winner that holds it; schema
7
+ * admission keeps undeclared ones out. A @check's `check.scope` is never one: it stays text, such as "every admitted
8
+ * native record" or `*`, that selects the verdicts the check binds to, and claims no path; `check.covers` is the
9
+ * check's claimant field, and claiming a path changes nothing about which verdicts the check selects.
12
10
  */
13
11
  export declare const CLAIM_FIELDS: readonly string[];
14
12
  /**
@@ -43,7 +41,7 @@ export interface Claimant {
43
41
  }
44
42
  /**
45
43
  * G06c: the winners whose claims select `path`, holders outside `scope` pruned, ordered band descending then identity
46
- * ascending (position-and-projection row 17). Reads the load-time claimant index; nothing is rescanned per query.
44
+ * ascending (db D02b). Reads the load-time claimant index; nothing is rescanned per query.
47
45
  */
48
46
  export declare function claimants(graph: Graph, path: string, scope?: ReadonlySet<string>): readonly Claimant[];
49
47
  //# sourceMappingURL=claims.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"claims.d.ts","sourceRoot":"","sources":["../src/claims.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAIjD,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAErD;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAMxC,CAAC;AAEH;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,KAAK,EAAE,CAsBvD;AASD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAEtD;AAkDD;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAIhE;AAED,uGAAuG;AACvG,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,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,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;CACzC;AACD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,QAAQ,EAAE,CAiBtG"}
package/dist/claims.js CHANGED
@@ -2,14 +2,12 @@ import { snapshot } from './immutable.js';
2
2
  import { canonicalRoot } from './paths.js';
3
3
  import { compare, stableSerialize } from './revision.js';
4
4
  /**
5
- * G06c: the claimant fields, each a section field whose text values are path selections (position-and-projection row
6
- * 17; the covers-field-vs-predicate decision keeps `covers` a field, not a predicate): `covers` in a @mandate's
7
- * `authority`, a @law's or @convention's `subject`, a @spec's `work` and a @check's `check` (milestone
8
- * generation-binding plan amendment C17), and a @hook's `hook.paths`. A field is read by its path on any winner that
9
- * holds it; schema admission keeps undeclared ones out. A @check's `check.scope` is never one (decision
10
- * check-scope-claims, plan amendment C22): it stays text, such as "every admitted native record" or `*`, that selects the
11
- * verdicts the check binds to, and claims no path; `check.covers` is the check's claimant field, and claiming a path
12
- * changes nothing about which verdicts the check selects.
5
+ * G06c: the claimant fields, each a section field whose text values are path selections (db D02b; `covers` stays a
6
+ * field, not a predicate): `covers` in a @mandate's `authority`, a @law's or @convention's `subject`, a @spec's `work`
7
+ * and a @check's `check`, and a @hook's `hook.paths`. A field is read by its path on any winner that holds it; schema
8
+ * admission keeps undeclared ones out. A @check's `check.scope` is never one: it stays text, such as "every admitted
9
+ * native record" or `*`, that selects the verdicts the check binds to, and claims no path; `check.covers` is the
10
+ * check's claimant field, and claiming a path changes nothing about which verdicts the check selects.
13
11
  */
14
12
  export const CLAIM_FIELDS = Object.freeze([
15
13
  'authority.covers',
@@ -116,7 +114,7 @@ export function selects(selection, path) {
116
114
  }
117
115
  /**
118
116
  * G06c: the winners whose claims select `path`, holders outside `scope` pruned, ordered band descending then identity
119
- * ascending (position-and-projection row 17). Reads the load-time claimant index; nothing is rescanned per query.
117
+ * ascending (db D02b). Reads the load-time claimant index; nothing is rescanned per query.
120
118
  */
121
119
  export function claimants(graph, path, scope) {
122
120
  const target = pathSegments(path);
@@ -1 +1 @@
1
- {"version":3,"file":"claims.js","sourceRoot":"","sources":["../src/claims.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGzD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,YAAY,GAAsB,MAAM,CAAC,MAAM,CAAC;IAC3D,kBAAkB;IAClB,gBAAgB;IAChB,aAAa;IACb,YAAY;IACZ,cAAc;CACf,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAqB;IAC5C,MAAM,KAAK,GAAG,IAAI,GAAG,EAAiB,CAAC;IACvC,KAAK,MAAM,IAAI,IAAI,KAAK;QACtB,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ;YACjC,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;gBACnC,IAAI,MAAM,IAAI,KAAK;oBAAE,SAAS;gBAC9B,MAAM,KAAK,GAAG,GAAG,OAAO,CAAC,IAAI,IAAI,KAAK,CAAC,GAAG,EAAE,CAAC;gBAC7C,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC;oBAAE,SAAS;gBAC5C,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;oBACpF,IAAI,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC;wBAAE,SAAS;oBACjC,MAAM,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AM,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QACjC,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;YAAE,SAAS;QAC5D,MAAM,OAAO,GAAG,iBAAiB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACnD,IAAI,OAAO,KAAK,SAAS,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC;YAAE,SAAS;QACjE,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QACzC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;QAC9D,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACD,OAAO,QAAQ,CACb,CAAC,GAAG,KAAK,CAAC;SACP,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAE,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;SAC/F,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CACtE,CAAC;AACJ,CAAC"}
@@ -14,14 +14,14 @@ export declare const compare: (a: string, b: string) => number;
14
14
  export declare function stableSerialize(value: unknown): string;
15
15
  export declare function revisionOf(registry: FrozenRegistry, inputs: RevisionInputs): string;
16
16
  /**
17
- * The authored revision (decision evidence-placement; plan amendment C13): `revisionOf` over the same inputs without
18
- * the sources at runtime placement (band 0), so runtime-band evidence, admitted below authored, moves it no more than it
19
- * moves what agents are given. A runtime-placed input whose path `derived` names stays: a derived revision-only input
20
- * that no record compiles from, such as db's `.ia/.db-inputs.json` (its folder inventory, floor origin, authored roots
21
- * and activation), so those still move it. The registry, language version and kernel digest stay as `revisionOf` hashes
22
- * them, and every source is checked as `revisionOf` checks it. With no other source at runtime placement it is
23
- * `revisionOf(registry, inputs)` itself. It is no `load` input: a graph's `revision` stays `revisionOf`'s, and `load`
24
- * still needs every record's source among the full inputs.
17
+ * The authored revision (G01a): `revisionOf` over the same inputs without the sources at runtime placement (band 0),
18
+ * so runtime-band evidence, admitted below authored, moves it no more than it moves what agents are given. A
19
+ * runtime-placed input whose path `derived` names stays: a derived revision-only input that no record compiles from,
20
+ * such as db's `.ia/.db-inputs.json` (its folder inventory, floor origin, authored roots and activation), so those
21
+ * still move it. The registry, language version and kernel digest stay as `revisionOf` hashes them, and every source
22
+ * is checked as `revisionOf` checks it. With no other source at runtime placement it is `revisionOf(registry, inputs)`
23
+ * itself. It is no `load` input: a graph's `revision` stays `revisionOf`'s, and `load` still needs every record's
24
+ * source among the full inputs.
25
25
  */
26
26
  export declare function authoredRevisionOf(registry: FrozenRegistry, inputs: RevisionInputs, derived?: readonly string[]): string;
27
27
  /**
package/dist/revision.js CHANGED
@@ -62,14 +62,14 @@ export function revisionOf(registry, inputs) {
62
62
  return hashOf(registry, inputs, canonicalSources(inputs));
63
63
  }
64
64
  /**
65
- * The authored revision (decision evidence-placement; plan amendment C13): `revisionOf` over the same inputs without
66
- * the sources at runtime placement (band 0), so runtime-band evidence, admitted below authored, moves it no more than it
67
- * moves what agents are given. A runtime-placed input whose path `derived` names stays: a derived revision-only input
68
- * that no record compiles from, such as db's `.ia/.db-inputs.json` (its folder inventory, floor origin, authored roots
69
- * and activation), so those still move it. The registry, language version and kernel digest stay as `revisionOf` hashes
70
- * them, and every source is checked as `revisionOf` checks it. With no other source at runtime placement it is
71
- * `revisionOf(registry, inputs)` itself. It is no `load` input: a graph's `revision` stays `revisionOf`'s, and `load`
72
- * still needs every record's source among the full inputs.
65
+ * The authored revision (G01a): `revisionOf` over the same inputs without the sources at runtime placement (band 0),
66
+ * so runtime-band evidence, admitted below authored, moves it no more than it moves what agents are given. A
67
+ * runtime-placed input whose path `derived` names stays: a derived revision-only input that no record compiles from,
68
+ * such as db's `.ia/.db-inputs.json` (its folder inventory, floor origin, authored roots and activation), so those
69
+ * still move it. The registry, language version and kernel digest stay as `revisionOf` hashes them, and every source
70
+ * is checked as `revisionOf` checks it. With no other source at runtime placement it is `revisionOf(registry, inputs)`
71
+ * itself. It is no `load` input: a graph's `revision` stays `revisionOf`'s, and `load` still needs every record's
72
+ * source among the full inputs.
73
73
  */
74
74
  export function authoredRevisionOf(registry, inputs, derived = []) {
75
75
  const kept = new Set(derived.map(canonicalPath));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inventarch/graph",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -71,7 +71,7 @@
71
71
  "LANGUAGE.md"
72
72
  ],
73
73
  "dependencies": {
74
- "@inventarch/language": "3.1.0"
74
+ "@inventarch/language": "3.1.1"
75
75
  },
76
76
  "devDependencies": {
77
77
  "@types/node": "^22.19.0",