@inventarch/runtime 1.1.1 → 2.0.0

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.
Files changed (66) hide show
  1. package/LANGUAGE.md +2 -2
  2. package/README.md +17 -1
  3. package/SPEC.md +28 -4
  4. package/dist/context.d.ts +10 -1
  5. package/dist/context.d.ts.map +1 -1
  6. package/dist/context.js +14 -5
  7. package/dist/context.js.map +1 -1
  8. package/dist/coordinate.d.ts +9 -2
  9. package/dist/coordinate.d.ts.map +1 -1
  10. package/dist/coordinate.js +14 -0
  11. package/dist/coordinate.js.map +1 -1
  12. package/dist/door.d.ts +17 -0
  13. package/dist/door.d.ts.map +1 -1
  14. package/dist/door.js +111 -6
  15. package/dist/door.js.map +1 -1
  16. package/dist/editor/workspace.d.ts.map +1 -1
  17. package/dist/editor/workspace.js +6 -5
  18. package/dist/editor/workspace.js.map +1 -1
  19. package/dist/errors.d.ts +4 -2
  20. package/dist/errors.d.ts.map +1 -1
  21. package/dist/errors.js +13 -1
  22. package/dist/errors.js.map +1 -1
  23. package/dist/index.d.ts +14 -0
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +8 -0
  26. package/dist/index.js.map +1 -1
  27. package/dist/locator.d.ts +149 -0
  28. package/dist/locator.d.ts.map +1 -0
  29. package/dist/locator.js +572 -0
  30. package/dist/locator.js.map +1 -0
  31. package/dist/machine-protocol.d.ts +5 -0
  32. package/dist/machine-protocol.d.ts.map +1 -1
  33. package/dist/machine-protocol.js +141 -5
  34. package/dist/machine-protocol.js.map +1 -1
  35. package/dist/mandate-modes.d.ts +60 -0
  36. package/dist/mandate-modes.d.ts.map +1 -0
  37. package/dist/mandate-modes.js +112 -0
  38. package/dist/mandate-modes.js.map +1 -0
  39. package/dist/mentions.d.ts.map +1 -1
  40. package/dist/mentions.js +2 -3
  41. package/dist/mentions.js.map +1 -1
  42. package/dist/next.d.ts +151 -0
  43. package/dist/next.d.ts.map +1 -0
  44. package/dist/next.js +724 -0
  45. package/dist/next.js.map +1 -0
  46. package/dist/packet-host.d.ts +88 -0
  47. package/dist/packet-host.d.ts.map +1 -0
  48. package/dist/packet-host.js +239 -0
  49. package/dist/packet-host.js.map +1 -0
  50. package/dist/packet.d.ts +157 -0
  51. package/dist/packet.d.ts.map +1 -0
  52. package/dist/packet.js +207 -0
  53. package/dist/packet.js.map +1 -0
  54. package/dist/position.d.ts +275 -0
  55. package/dist/position.d.ts.map +1 -0
  56. package/dist/position.js +530 -0
  57. package/dist/position.js.map +1 -0
  58. package/dist/render.d.ts +12 -1
  59. package/dist/render.d.ts.map +1 -1
  60. package/dist/render.js +25 -0
  61. package/dist/render.js.map +1 -1
  62. package/dist/scope-key.d.ts +101 -0
  63. package/dist/scope-key.d.ts.map +1 -0
  64. package/dist/scope-key.js +175 -0
  65. package/dist/scope-key.js.map +1 -0
  66. package/package.json +32 -4
package/LANGUAGE.md CHANGED
@@ -31,7 +31,7 @@ Spec source locators do not load documents. Resource capture and disclosure requ
31
31
  | @kind | taxonomy | Defines a closed semantic role for records; lowering determines the role of each registered word. |
32
32
  | @lane | taxonomy | Defines a retrieval lane associated with record kinds. |
33
33
  | @law | governance-system | Declares a rule with severity. Structural admission cannot establish the truth or suitability of its prose. |
34
- | @mandate | agent-system | States bounded authority and conditions for a participant. Host authorization remains independent. |
34
+ | @mandate | agent-system | States bounded authority and conditions for a participant. Host authorization remains independent. An authority section names the participant it binds, the closed moves it allows, the workspaces it scopes, the words it excludes and the paths it covers. |
35
35
  | @milestone | work-system | Represents an outcome with an exit criterion inside exactly one plan; it names a condition, not the work toward it. |
36
36
  | @move | taxonomy | Defines the closed classification of an agent action or activity. |
37
37
  | @observation | learning-system | Represents an attributed evidence account with interpretation and retention metadata. Evidence claims are not verified by field typing. |
@@ -51,6 +51,6 @@ Spec source locators do not load documents. Resource capture and disclosure requ
51
51
  | @template | template-system | Represents bounded rendering inputs and output structure. Rendering does not publish or install output. |
52
52
  | @value-type | taxonomy | Defines the field types that schemas may require. |
53
53
  | @voice | agent-composition-system | Declares communication attributes separate from authority and procedure. |
54
- | @workspace | workspace-system | Groups systems into an explicit work boundary; relationships can describe dependencies between boundaries. |
54
+ | @workspace | workspace-system | Groups systems into an explicit work boundary; relationships can describe dependencies between boundaries. Its sources name the roots and placement bands its records are captured from, and its steward the agent that directs it by default. |
55
55
 
56
56
  This guide describes the selected structural vocabulary. Private expert procedures, live provider behavior and unobserved platform qualification are separate from the installed public contract.
package/README.md CHANGED
@@ -2,7 +2,23 @@
2
2
 
3
3
  Coordinate-based procedure and governance delivery over scoped database reads. [SPEC.md](SPEC.md) owns the behavior and runtime/hosts plan owns delivery.
4
4
 
5
- The initial classifier and coordinate preparation API validate the native axes, retain declared/profile/derived/absent provenance, and keep shape focus lists separate from scalar selector constraints. Hosts must explicitly declare phase and primitive. Use `context(handle, {within, text, coordinate}, {tokens, records})` for scoped cell/governance/selector/subject/text delivery. It returns a packet or an explicit refusal, reserves blocking governance before optional entries, and reports text-estimator usage and separate envelope overhead. `select` applies the same ranking to explicit candidates and refuses ties or missing selector axes. `Door` exposes validated JSON read operations over a private scope issuer; privileged reports require host opt-in. CLI/MCP transports now expose that door. evaluateSteward resolves a system's typed native owner and evaluates an explicitly trusted actor; the steward-hook app owns host identity/path interpretation. Model execution and capability dispatch have separate owners. `@inventarch/runtime/entry` exports `isEntry`, which the `ia`, `ia-mcp-door` and `ia-mcp-service` binaries use to run when a link such as npm's `.bin` entry reaches them.
5
+ The initial classifier and coordinate preparation API validate the native axes, retain declared/profile/derived/absent provenance, and keep shape focus lists separate from scalar selector constraints. Hosts must explicitly declare phase and primitive. A scope key is the other way in: `normalizeScopeKey(partial)` completes K = (seat, shape, phase, depth 0..2, budget 0..64, word) with the design's defaults (a partial naming nothing is `K0`; otherwise context, the anchor phase of the shape's primitive, depth 1 and budget 16), and `resolveScopeKey(handle, within, key)` validates it against the scoped read, resolves its seat to `{kind, identity?, path?, unknown?}` (`workspace` when none is named, the `@workspace` the database seats the repository root at; `record` for an identity; `location` for a path, workspace-relative or absolute inside the root, read by `rootRelative(root, path)`, the absolute-path rule `ia read` shares, whose database resolution, with the record it is declared at and its claimants, is returned beside the seat) and derives its primitive from the shape row, so shape and phase complete it; `K0` and `SCOPE_KEY_CAPS` are exported beside them (SPEC R14). `positionBody` (below) assembles the body a resolved key gives, and the version 1 `context`/`select` requests still need a declared primitive. Use `context(handle, {within, text, coordinate}, {tokens, records})` for scoped cell/governance/selector/subject/text delivery. It returns a packet or an explicit refusal, reserves blocking governance before optional entries, and reports text-estimator usage and separate envelope overhead. `select` applies the same ranking to explicit candidates and refuses ties or missing selector axes. `Door` exposes validated JSON read operations over a private scope issuer; privileged reports require host opt-in. CLI/MCP transports now expose that door. evaluateSteward resolves a system's typed native owner and evaluates an explicitly trusted actor; the steward-hook app owns host identity/path interpretation. Model execution and capability dispatch have separate owners. `@inventarch/runtime/entry` exports `isEntry`, which the `ia`, `ia-mcp-door` and `ia-mcp-service` binaries use to run when a link such as npm's `.bin` entry reaches them. `readBody(handle, locator, {read, mounts})` returns the body behind a locator (an identity, a cell or requirement fragment, or a source path and line) with its SHA-256 and never a certification: a fragment's own text, that of the record's cells at the address or of its requirement; else the document a record's source locator names, or the section under its markdown anchor, read through the host's `read` (an adopted mount's document from the directory `mounts` binds its tree label to); else the record's own `meaning.says`. `ia read` is its consumer.
6
+
7
+ `positionBody(handle, within, resolved)` (also on `@inventarch/runtime/internal/position`) returns body(K), `ia.position-body.v1`, for a key `resolveScopeKey` resolved through the same scope token, and writes nothing: the seat; the composition one level from it at cost 0 (its field references both ways, a workspace seat's capture members, a `@system` seat's word members, a location's declared-at record and claimants); the seeds the shape's kind or lane focus picks from it; the records reached by up to `depth` hops along the shape's predicate focus in either direction, never inside another workspace's declared root, a row that carries a condition followed only where it holds at the key's coordinate, as graph traversal follows it; the blocking governance among those candidates, reserved in `rules` outside the budget; `loaded`, the seat and the first `budget` of the rest in the design's total order; the pointers (the 9-tuple id, word, kind, lane, owner system, steward, band, hop and reaching row or field), 48 listed and the rest tallied per word and owner system; the frontier one hop past `loaded`, tallied per owner system and kind; the unknowns, such as a workspace that declares no sources; the counts; and the two widening keys. The `@law`, `@convention`, `@principle` and `@playbook` records whose `subject.subject-word` or `subject.subject-kind` names the word or kind of a loaded record, or of a blocking candidate reserved in `rules`, are listed in `appliesByWord` as a field match, not a row, each once with its re-seat key (48 listed, the rest tallied); the first four such playbooks give `cells`, each its cell at the key's phase and the shape's primitive as `ia read` reads that address, or the nearest phase with one; a blocking rule that applies by word to any candidate, whatever the budget truncates, is reserved in `rules`; and `mandates` lists the `@mandate` records that claim a location seat or whose `authority.scope` names the seat's workspace (SPEC R17). With a `word`, only records of that word load (the seat loads whatever its word), are pointers or are tallied, and a record of another word a hop reaches is only a waypoint; the word never filters `rules`, `appliesByWord`, `cells` or `mandates`, so it hides no blocking rule that governs what loads. It is a pure function of the key and the admitted records the token reads, and only a whole-workspace token also reads the admission findings it alone may disclose (a narrowed one names that it reads none), with no root path, token, time, capture state or record body in it, only the playbook cells it delivers (SPEC R15). A record at runtime placement (band 0) is no part of it: never composition, a seed, a hop, loaded, a rule, a pointer, a tally or frontier, nor a location's declarer or claimant, and a seat at runtime placement is refused.
8
+
9
+ `position(handle, within, partial?)` (on the package root and the same subpath) is the call a host makes: it completes the partial key with `normalizeScopeKey`, resolves it, assembles the body and returns `{body, digest, hostNote}`, `digest` being graph's codec digest of the body and `hostNote` the undigested host state `{revision, capturedRevision?, previousRevision?, freshness, key}`, where freshness is `current`, `stale` or `no-capture` against the capture `ia capture` last wrote and `key` is the key used. Request text and tokens are refused as key parts, so nothing text-driven runs; two roots give one body and digest, and writing a capture moves only the note. The body's revision still hashes runtime-band sources, so one appearing moves that revision and the digest. Admission's findings and the database's seat and root decisions still read every placement too, so a runtime-band record that an authored loaded record's reference names also takes that reference's missing-target or missing-field-reference finding out of the body's unknowns (SPEC R15, R16). Installed state is not reported yet. The `Door`'s `position` operation serves a position (below), and `ia position` prints one.
10
+
11
+ `deliveryView(handle, within, seat?)` (also on `@inventarch/runtime/internal/next`) reads one plan's delivery view through a scope token and writes nothing: its tasks in one prerequisites-first order (ties by milestone, then task), each with the basis lines of its own and its milestone's requirements, a verdict (`exit evidence recorded (…)`, `no declared blocker` or `blocked (…)`) and the five state lines, plus review items and `next`, the `ia position` command for the first task with no declared blocker. What the scope does not read never counts as met: a requirement whose answer lies outside it blocks as unknown, and no milestone is satisfied through its tasks while one may go unread (a narrowed scope, or a refused `@task` or file, which a whole-workspace scope lists as review items). A relation row that carries a condition counts only where it holds at the coordinate the scope binds, as graph traversal decides it: the record that states it decides a provenance or artifact-set term, and a severity term where its own severity decides it at every coordinate; a term on an axis the scope binds no value for (the phase on the whole-workspace scope `ia next` reads, the severity on every scope) leaves it conditional with an unknown basis, never met, and an intent such a row could change is unknown, while one it cannot change at any coordinate reads as it does everywhere. A seat that is no plan, milestone or task, a missing or ambiguous plan and a require cycle are refusals (`NEXT_CODES`), each naming one next command. The `Door`'s `next` operation serves it.
12
+
13
+ The `Door`'s `read` operation, which `MACHINE_PROTOCOL` version 2 appends with `since: 2` and the MCP tool `ia_read`, serves `readBody` through the door's scope token: `ReadBodyOptions.within` binds every lookup to that scope, and in a scope narrower than the whole workspace a locator no admitted record in it answers is one plain `IA-RUNTIME-READ-UNADMITTED` that names nothing beyond it. A whole-workspace token, one whose scope is at the workspace root with no `phase` or `identities` and was issued under no narrower one (db `isCompleteScope`), such as the initial one of a door opened without a `boundary` or one `scope` issues from it without narrowing it, reads what the root view reads, so its refusal says what the workspace's sources hold, a record admission refused named with its path, line and `reason`, as `next` names one. The door's reader names a document by its workspace-relative path, never by where the server keeps the workspace. The door reads documents through `DoorOptions.read`, by default db `readWorkspaceBytes`, which admits the paths the CLI's workspace file reader admits, within the same 4 MiB, and binds adopted mounts once, when it opens, from the `.ia/workspace.json` bindings, as `ia read` does; so `ia read` returns the Door's body and digest, and refuses a document the Door refuses with the same code. The nine version 1 rows are byte-identical to 1.1.0's. `DoorOptions.protocol` is the protocol version a door serves, by default the table's: a door at version 1 refuses `read` as the unknown operation 1.1.0 refused, and the CLI's machine routes open theirs at version 1, so they stay those nine; on the CLI `ia read` reads a body.
14
+
15
+ The `Door`'s `next` operation, which `MACHINE_PROTOCOL` version 2 appends with `since: 2` and the MCP tool `ia_next`, takes `{within?, seat?}` and answers with the view `deliveryView` returns through the door's scope token, or with its refusal as that function returns it: a version 2 operation's refusal may carry more than 1.1.0's `{ok, code, message}`, here `next`, the one command to run, and the `plans` or `cycle` it names, while a version 1 operation's refusal, and every refusal the Door raises itself, keep that shape. A door serving version 1 refuses `next` as an unknown operation, so the CLI's machine routes do not serve it; on the CLI `ia next` prints the view.
16
+
17
+ The `Door`'s `position` operation, which `MACHINE_PROTOCOL` version 2 appends with `since: 2` and the MCP tool `ia_position`, takes `{within?, seat?, shape?, phase?, depth?, budget?, word?}` and answers with `{body, digest, hostNote}`, exactly what `position` returns for that partial key through the door's scope token: no params is K0, and the parts take `normalizeScopeKey`'s defaults, so one key gives one body and digest wherever the workspace is. The params are closed, so request text is refused and nothing text-driven runs. A refusal of the key carries `next`, the one command to run, which the `RuntimeError` that `position` throws also carries: the closed set of a shape or phase, the cap of a depth or budget, `ia vocabulary` for a word, or the position without a seat the scope does not hold or one at runtime placement (the overview, when that seat is the repository's own `@workspace`). The Door's own refusals keep 1.1.0's shape, and a door serving version 1 refuses `position` as an unknown operation; on the CLI `ia position` prints a position.
18
+
19
+ `renderPacket(handle, within, catalog)` (also on `@inventarch/runtime/internal/packet`) returns `{packet, digest, hostNote}`: the host-neutral position packet a host adapter renders, `ia.position-packet.v1`, its graph codec digest, and position's host note with `installed: 'unknown (no join checked here)'`, never digested. It calls `position` once at K0 and reads the rest through the same scope token: `body` is body(K0)'s digest; `seat` is the repository's `@workspace` with its sources, its system count and its steward; `mandates` are the authored `@mandate` records body(K0) lists whose `authority.participant` is an authored `@agent`, their authority fields as authored, and `participants` those `@agent` records, each once; none is no refusal (the seat line then says so), and no admitted mandate is refused; `systems` holds one pointer line per `composition.systems` reference, each with the words its registration lowers, band, steward and `ia position --seat <identity>`, or `unresolved`; `tallies` counts the authored records per word under the seat's own declared roots, none while it declares none; `intents` and `phases` are the five-shape and four-phase tables, each shape with the registered words it seeds; `commands` is the `catalog` passed in, in its order (apps/cli's `packetCatalog` builds one from its tagged COMMANDS rows); `lines` are the three SPEC lines; and `provenance` is the revision and the workspace's name. Its refusals are `position`'s. It names no absolute path, token, time, capture state or CLI version, so two roots give one packet and digest and a capture moves only the note. `entryCount(packet)` counts its entries by design §4's formula (SPEC R19). `renderHost` renders it for a host (below); nothing writes a file.
20
+
21
+ `renderHost(host, packet, digest, hostNote, target)` (also on `@inventarch/runtime/internal/packet-host`) renders that packet, with the digest and host note `renderPacket` returned, for the `claude` or `codex` host and returns the frozen `HostOutput` `{files, receipt}`; it writes nothing. No host gets an agent file: claude's `consumer` files are `.claude/rules/ia-workspace.md` and `.claude/skills/ia-authoring/SKILL.md`, its `repository` files `CLAUDE.md` and both `ia-authoring` skills, `.claude/skills/` and `.agents/skills/`; codex's are `AGENTS.md` and `.agents/skills/ia-authoring/SKILL.md`. Every file carries `PACKET_MARKER`, first in the entry file and after a skill's YAML frontmatter and a blank line, and each skill keeps the text compliance's retired 1.x renderers wrote for its target. The entry file holds the packet's sections in its field order (seat, participants, mandates, system pointer lines, captured-record tallies, intent table, phase table, command catalog, SPEC lines), under a title naming the provenance slug, one entry per list item or table row, so it renders `entryCount(packet)` entries, byte-identical for both hosts; each bare IA word token in free text, such as `@workspace`, is a code span, and an authored code span is kept as written with any token in it, so no rendered file shows a GitHub mention unless its author wrote the token touching a backtick; then the line `ia-generated <revision> <packet digest> <adapter>`, the adapter naming its version (`ia-claude@<version>`) only in the `consumer` target, so a committed repository file does not move with a release; then, in the `consumer` target only, the host note. The receipt, `ia.packet-receipt.v1`, names the host, the adapter with its version, the revision, the packet's provenance slug, the packet and body digests, the entry count, each file's path and SHA-256, the host note, and the participant and mandate identities; its `cli`, `removed`, `foreign`, `guard` and `writtenAt` are left for the caller that writes the files to set (`@inventarch/cli`'s `applyHostProjection`). An unknown host or target, or a digest that is not the packet's, is refused (SPEC R20).
6
22
  # Editor and authoring consumers
7
23
 
8
24
  `@inventarch/runtime/editor` exposes `EditorWorkspace`: cache-free local source capture, versioned overlays, diagnostics, completion, source actions, inspector/graph projection, schema-backed drafting and create-only candidate validation. `ViewStamp` binds opaque source actions to one root owner and generation; refresh/update invalidates prior actions. This is a privileged local facade, not a replacement for scoped remote Door APIs. It performs no file creation or network requests.
package/SPEC.md CHANGED
@@ -24,7 +24,7 @@ Platform M1 transport refinement: failed JSON responses preserve a string servic
24
24
 
25
25
  Implementation contract for runtime/hosts plan, shared graph sections6-12/15 and systems section12. Depends only on language, graph and db. Implemented through runtime plan Task5, including coordinates, context/select, the scoped door and pure steward evaluation. Task paragraphs below are historical delivery evidence; their next-task statements do not describe the current implementation.
26
26
 
27
- R01. Request coordinates use graph's closed axes and canonical values. Runtime accepts text, explicit axes, optional subject/follow and a database within token. Validate declared/profile/classifier values; never silently ignore an unknown axis. prepareCoordinate returns values plus declared/profile/derived/absent for every ConditionAxis and native shape focus lists. Declared values win over a supplied profile, which wins over derivation; phase and primitive must be declared by the request and cannot come from profile or classifier. Derive only shape and category; shape-row kind/lane/predicate arrays remain explicit focus hints, not scalar selector constraints. Profile cannot impersonate declared phase/primitive. Category gloss fields on records are never read for matching.
27
+ R01. Request coordinates use graph's closed axes and canonical values. Runtime accepts text, explicit axes, optional subject/follow and a database within token. Validate declared/profile/classifier values; never silently ignore an unknown axis. prepareCoordinate returns values plus declared/profile/derived/absent for every ConditionAxis and native shape focus lists. Declared values win over a supplied profile, which wins over derivation; phase and primitive must be declared by the request and cannot come from profile or classifier. Derive only shape and category; shape-row kind/lane/predicate arrays remain explicit focus hints, not scalar selector constraints. Profile cannot impersonate declared phase/primitive. Category gloss fields on records are never read for matching. A scope key (R14) is the one exception, on its own path only: scopeCoordinate declares the key's shape and phase and derives category and the primitive, SHAPE_ROWS[shape].primitive, marked derived, so a key with a shape and a phase is never coordinate-incomplete. prepareCoordinate is unchanged and leaves an undeclared primitive absent, and every version 1 context and select request without one is still refused as coordinate-incomplete.
28
28
 
29
29
  R02. classify(text) is a deterministic replaceable keyword seam over request prose only. Port the donor matrix/classify signals, select greatest signal count then native SHAPE_ROWS tiePrecedence, use context for no signal. Unknown custom output is COORDINATE-VALUE-UNKNOWN, not a fallback. A custom classifier is called only when shape is absent from request/profile. Mark supplied shape declared/profile and inferred shape derived. Explicit primitive and move participate unchanged in graph selector matching.
30
30
 
@@ -36,7 +36,7 @@ R05. Steps1/2 order by descending band then identity; steps4-6 by selector speci
36
36
 
37
37
  R06. A subject is a canonical identity, sigil ref or unambiguous exact name in the allowed pool. Request prose mentions may be typed sigils, canonical four-slot identities or kind/name forms; resolve against allowed records with exact cardinality, never first-match. Unresolved/ambiguous subjects/mentions produce attributable omission observations, not hidden-corpus queries. Request mention recognition is not IA source parsing. An explicit subject cell/requirement fragment is validated against the admitted node; missing fragments refuse the requested address.
38
38
 
39
- R07. Budget tokens measure the sum of delivered text using an injectable named count(text); a cell entry's purpose (its record's says and answers) is delivered text only when the caller asks for it, and is then counted with the cell; default byte-estimate is ceil(UTF8 bytes/4), minimum1 for nonempty text, zero for empty. Budget records count distinct identities, not entries. Limits expose budgets, used text tokens, identity count, estimator name and serialized-envelope byte estimate separately. These are text estimates; host/model wrappers own their extra overhead. Negative/noninteger budgets or invalid estimator counts are IA-RUNTIME-BUDGET-INVALID. Reserve every applicable governance entry whose effective severity is blocking before optional admission. If blockers alone overflow, return IA-GRAPH-BUDGET-BLOCKING-OVERFLOW with minimum required budgets and the smallest number of blocking identities whose removal would fit; calculate that suggestion by descending per-identity token total, identity tie-break. This suggestion grants no permission to drop obligations. Fill remaining budget greedily in semantic order; omitted entries name budget as the cause. Display included entries in semantic order after reservation.
39
+ R07. Budget tokens measure the sum of delivered text using an injectable named count(text); a cell entry's purpose (its record's says and answers) is delivered text only when the caller asks for it, and is then counted with the cell; default byte-estimate is ceil(UTF8 bytes/4), minimum1 for nonempty text, zero for empty. Budget records count distinct identities, not entries. Limits expose budgets, used text tokens, identity count, estimator name and serialized-envelope byte estimate separately. These are text estimates; host/model wrappers own their extra overhead. Negative/noninteger budgets or invalid estimator counts are IA-RUNTIME-BUDGET-INVALID. Reserve every applicable governance entry whose effective severity is blocking before optional admission. If blockers alone overflow, return IA-GRAPH-BUDGET-BLOCKING-OVERFLOW with minimum required budgets and the smallest number of blocking identities whose removal would fit; calculate that suggestion by descending per-identity token total, identity tie-break. This suggestion grants no permission to drop obligations. Fill remaining budget greedily in semantic order; omitted entries name budget as the cause. Display included entries in semantic order after reservation. This is the budget of `context` and the version 1 Door alone. A scope key's `budget` (R14) is a different bound, set with its `depth` by decision scope-key-caps: n counts entries a body may load beyond the seat, 0..64 and 16 unless the key names it, blocking entries are reserved outside it and never counted against it, and n = 0 loads none, so K0 (budget 0) is pointers only; depth caps hops at 0..2, 1 unless named and 0 in K0. This release validates both caps and applies the defaults (normalizeScopeKey) and assembles no body for a key.
40
40
 
41
41
  R08. Follow from included identities at depth1, scoped by the same token and request coordinate. Explicit follow overrides native shape predicate focus, including an empty list. Convert each native predicate focus to its language-table active verb phrase; do not invent suffixes. Return graph's followed/gated/dangling products with deduplication and total order. Traversed neighbours are evidence, not automatically delivered text or execution grants.
42
42
 
@@ -52,7 +52,7 @@ Task1 delivered: replaceable donor keyword classifier with native tie precedence
52
52
 
53
53
  Task2 delivered: scoped phase-child packet collection, native exact/primary/governance/selector/subject/text ordering, decoded body rendering without losing clauses, source citations, condition-aware one-hop traversal and text-budget blocker reservation. Eleven native-corpus tests cover advisory severity raising, no gloss matching, partial selectors, scoped mentions, phase-before-band authority, immutable deterministic payloads and minimum-count blocker reductions.1545workspace tests/58files,typecheck/build/kernel/dependencies pass. Selection, door and complete loop fixtures remain Task3.
54
54
 
55
- R12. Door(root, options) owns a database handle and an initial host-configured read boundary (default corpus root). request({operation, params}) accepts scope/context/select/get/records/resolve/search/traverse; within defaults to the initial token and supplied tokens must belong to this door. Scope issuance always descends from an existing token. Context uses params.text/coordinate/subject/follow/revision/budget, with default budget4000text tokens/50identities, and asks for each cell entry's purpose (R07), which counts against that budget; select does not ask. Select additionally requires candidates and optionally requiredAxes. Params reject unknown keys and malformed values before dispatch. Responses are {ok:true,result} or the existing named Refusal; result/refusal products are immutable. report is available only when the host explicitly enables allowReport, since it is privileged unscoped admission evidence. No remote refresh/write operation exists; close ends the handle. Unexpected errors become IA-RUNTIME-REQUEST-INVALID rather than escaping a transport. Hosts may use exported openDatabase/Handle types for trusted composition; that is not an exposed remote operation.
55
+ R12. Door(root, options) owns a database handle and an initial host-configured read boundary (default corpus root). request({operation, params}) accepts scope/context/select/get/records/resolve/search/traverse; within defaults to the initial token and supplied tokens must belong to this door. Scope issuance always descends from an existing token. Context uses params.text/coordinate/subject/follow/revision/budget, with default budget4000text tokens/50identities, and asks for each cell entry's purpose (R07), which counts against that budget; select does not ask. Select additionally requires candidates and optionally requiredAxes. Params reject unknown keys and malformed values before dispatch. Responses are {ok:true,result} or the existing named Refusal; result/refusal products are immutable. report is available only when the host explicitly enables allowReport, since it is privileged unscoped admission evidence. get and records keep their MACHINE_PROTOCOL version 1 bytes: a record without graph G13's per-record `digest`, and a snapshot of revision, root, optional phase, records and systems without database D02a `membership`; trusted hosts read both through the Handle. The version 1 operations preserve the published 1.2.0 wire output whatever protocol version a door serves: get and records keep each compiled edge's authored `spelling`, and traverse (`edges`, `gated`, `dangling`) and context (`followed`, `gated`, `dangling`) keep each edge assertion's `spelling`. These fields shipped in 1.2.0 and must not be removed when adding version 2 operations. `tests/select-door.test.ts` pins both protocol versions against `tests/golden/machine-protocol-v1-wire.json`, captured from the npm-published @inventarch/cli@1.2.0 runtime and checked against that CLI's machine routes over this corpus, with tokens and revisions normalized: example key paths; full answers for gated, followed and dangling edges, records, resolution and eight refusal kinds; and context key paths, whose scores depend on bundled base records. Version 1 records omit `digest`, snapshots omit `membership`, and each context answer's `limits.envelopeBytes` equals `envelopeBytes` of the packet returned. The nine version 1 request rows remain byte-identical to 1.1.0; response compatibility is measured against the latest published 1.2.0 release. No remote refresh/write operation exists; close ends the handle. Unexpected errors become IA-RUNTIME-REQUEST-INVALID rather than escaping a transport. Hosts may use exported openDatabase/Handle types for trusted composition; that is not an exposed remote operation.
56
56
 
57
57
  Task3 pre-implementation review: refuse exclusive choice on missing axes in a partial candidate selector, not just missing phase/primitive; context may still retrieve that neutral candidate topically. A door owns its issuer and an explicit token set so scope boundaries cannot be bypassed with another locally issued token. The loop fixture is a copied native input tree with documented additions/mutations, not a substitute vocabulary provider. Admission failures remain report evidence while runtime reads only admitted records.
58
58
 
@@ -62,16 +62,40 @@ R12 host metadata refinement: COORDINATE_DOMAINS exports immutable copied native
62
62
 
63
63
  R13. Steward-write evaluation is a bounded pure consumer over admitted compiled records. Given a canonical system name and a trusted actor (operator or agent identity), resolve the direct @system declaration's typed steward reference to one admitted @agent inside that system folder. Missing/ambiguous owners refuse; only that identity or an explicitly trusted operator passes. Return expected steward identity/name and owner source attribution. No source parsing, filesystem write or tool execution occurs. The Claude host adapter owns input trust and never treats a default/missing agent as operator. Hook refusal codes are exported for fixture coverage and preserve the IA-HOOK namespace.
64
64
 
65
+ R14. Scope key (position-and-projection §1 and item 10; decisions scope-key-caps and scope-verb-dispatch). `src/scope-key.ts` holds it: the package root exports `K0`, `SCOPE_KEY_CAPS`, `normalizeScopeKey`, `resolveScopeKey` and `rootRelative` with the `ScopeKey`, `ResolvedSeat` and `ResolvedScopeKey` types, and the `./internal/scope-key` subpath carries the module; `scopeCoordinate` (R01) is in `src/coordinate.ts`, on the `./internal/coordinate` subpath only. `ScopeKey` is K = (seat, shape, phase, depth, budget, word): `shape` one of the five SHAPE_ROWS shapes, `phase` one of the four phases, `depth` an integer in 0..2, `budget` an integer in 0..64 and `word` optional; `SCOPE_KEY_CAPS` exports the two caps, and `K0` is the frozen key (no seat, context, orient, 0, 0, no word). Three seat notions are kept apart, each named once here. The key's `seat` is what a caller names: absent for the repository's own `@workspace`, a record identity, or `{path}` for a location. The resolved seat (`ResolvedSeat`) is what that names once read through the scope: `{kind, identity?, path?, unknown?}`, kind `workspace` for no seat (identity the repository's `@workspace`), `record` for an identity (identity that record) and `location` for a path (path its canonical workspace-relative path; a location is not a record and has no identity). The database's `SeatResolution.seat` (db D02b) is the record a path is declared at, a `@system` or `@workspace`; it stays in the result's `resolution` with the rule `by` and the path's claimants, and is never a location's resolved seat. `normalizeScopeKey(partial?)` completes a partial key with design §1's defaults, the one place every host applies them: a partial that names no part (a part whose value is undefined is not named) is K0; otherwise `shape` defaults to context, `phase` to the anchor phase of the shape's primitive, PRIMITIVE_ANCHORS[SHAPE_ROWS[shape].primitive] (context orient, governance plan, execution act, sequence plan, learning learn), `depth` to 1 and `budget` to 16, and a seat or word stays absent unless named. It reads nothing, so it checks the key's form and leaves the word and the seat to resolution. `resolveScopeKey(handle, within, key)` requires a scope token like every runtime read, checks a complete key and returns a frozen `{key, seat, resolution?, coordinate}`: `key` copies the validated parts in K order, a location as the canonical path it resolved to, so a key never carries the root; `seat` is the resolved seat; `resolution` is the database's resolution of the repository root `''` or of the path, for a workspace or location seat; and `coordinate` is scopeCoordinate's (R01), shape and phase declared, category and primitive derived. Every key refusal is IA-RUNTIME-REQUEST-INVALID naming the closed set or bound: an unknown part (a key never declares a primitive), a shape or phase outside its closed set, a depth or budget outside its cap or not an integer, a seat that is neither an identity nor `{path}`, a word the read's view does not register for its admitted systems (db D09a `words`), the refusal listing those it does, an identity that is not an admitted record in the scope, and a path outside the workspace root or escaping it. The key's parts, closed sets, caps and seat form are checked before any read, so a key malformed in them is refused whatever the token. An absolute path reads by `rootRelative(root, path)`, the one absolute-path rule, which `ia read` also reads the path of a `<path>:<line>` locator with (2026-10-08, ia-position-verb, which gave the two one rule): the path from the handle's root that Node's `path.relative` gives (on Windows without case, with either separator), `/`-separated, and the root itself, however it is spelled, as `''`, the location that `.` also names (`ia read`, whose line locator needs a path, spells it `.`). It names no path inside the root, so it is undefined and the path goes on as given, refused below, when that path's first segment is `..`, a check made segment by segment, so an in-root name that only begins with `..`, such as `..cache`, is inside the root whichever way it is spelled, or when the path is on another drive, which has no path from the root. A relative path goes as given to the database's `resolveSeat` (db D02b), as does the path `rootRelative` reads, and the database canonicalises it segment by segment and names one that escapes the workspace `outside`, refused here: a `..` segment escapes. No seat takes the seat the database resolves for `''`: the `@workspace` declaring a `sources` root of the whole repository, else the repository's own `@workspace` as D02b decides it. When no admitted record in the scope is declared at a workspace or location seat, the resolved seat names `unknown: 'undeclared'`, and a workspace seat then has no identity: K0 is the empty composition with the unknown named, never a refusal (position-and-projection row 17). Database token failures (SCOPE-UNAVAILABLE, STALE, CLOSED) keep their IA-DB codes on every read the resolution makes: the word's, the identity's and the path's. This row types, completes, validates and resolves the key; R15 assembles the body a resolved key gives (seeding, pointers to 48 then tallies, the word's restriction of seeds and tallies, blockers reserved outside the budget), and `position` (R16) completes, resolves and assembles a key with its digest and host note. The Door's `position` operation reads a key (R12 refinement, position); the nine version 1 Door routes, `context` and `select` included, and `ia scope` neither read nor accept one, and the consumer verb will be `ia position`. Each key refusal's `RuntimeError` carries `next`, the one command to run (design row 27; door-position-operation part 2): the closed set of a shape or phase, the cap of a depth or budget, `ia vocabulary` for a word, and `ia position`, K0, for a key that is no object or names an unknown part and for a seat of another form, outside the scope or outside the workspace. `RuntimeError` gains the optional `next` for it, absent from every other refusal. `tests/scope-key.test.ts` pins the caps and K0; the defaults, an empty partial being K0 and every shape's anchor phase; a key naming only a shape resolved, and depth 3 and budget 65 refused; a key completed from shape and phase alone for every shape and phase; the unchanged version 1 refusal bytes of a context or select request that declares only shape and phase; the closed sets, caps and seat form refused by both functions, an unknown part and a key that is no object naming `ia position` as `next`, and the key's form refused before a forged token is read; the token on every seat form and the word, a forged, stale or closed one keeping its database code; the registered word checked in the scope's own view; each seat form and a location pruned by a narrower scope; absolute paths inside the root, in native, forward and mixed separators (and on Windows with the drive letter in either case), read as the relative path, the root in every spelling as the location `''`, an in-root name beginning with `..` read alike in both spellings, and absolute paths outside the root (a sibling whose name extends the root's among them), escaping paths and another drive refused; `rootRelative` itself on each of those spellings, a relative path returned as given; K0 seated by a workspace that declares the whole repository as a root; and K0 with the repository workspace undecided.
66
+
67
+ R15. Position body (2026-10-08, position-and-projection §1, §6 and §7 and design item 10; decision scope-key-caps): `src/position.ts`, exported from the package root and the `./internal/position` subpath, publishes `positionBody(handle, within, resolved)` with the `PositionBody`, `LoadedEntry`, `LoadedPlace`, `LoadedRecord`, `PositionRecord`, `PositionPointer`, `PositionVia`, `PointerTally`, `FrontierTally`, `PositionUnknown`, `PositionCounts` and `PositionWidening` types. `resolved` is what resolveScopeKey (R14) returned for the same scope token `within`. Every read carries that token: the snapshot and its D02a membership rows, directed views (db D09), the declared roots (db D02c `roots`) and the seat of `''` (D02b); a missing token is IA-RUNTIME-REQUEST-INVALID, and an unknown, stale or closed one keeps its database code, and a resolved seat identity the token does not admit (a key resolved through another token) is IA-RUNTIME-REQUEST-INVALID, `The seat '<identity>' is not an admitted record in this scope`, naming as its `next` `ia position`, the position without that seat, as R14 names it for a seat outside the scope. body(K) is a pure function of the key and the admitted records the token reads, and only a whole-workspace token (db `isCompleteScope`, PT5) also reads the admission findings it alone may disclose: it carries no root path, token, time, request text, capture state or record body (a body is read on demand by `ia read`; R17's cells carry a playbook cell's text, not its record's body), and nothing is written. A record at runtime placement (band 0) is no part of a body (2026-10-08, body-purity-and-host-note: design §4 excludes it, and decision evidence-placement admits runtime-band evidence below authored, where it must not move what agents are given): the body reads the scope's records without those records and without every directed-view row and claimant that names one, so none is composition, a seed, a hop or waypoint, loaded, in `rules`, a pointer, tallied or frontier, none primes, reaches or names the steward of another record, and none claims a location or is the record one is declared at, so a location whose declarer and claimants are all at runtime placement names the `seat` unknown it would name without them; a seat at runtime placement, whether the key names it or it is the repository's own `@workspace` (K0 included), is IA-RUNTIME-REQUEST-INVALID, `The seat '<identity>' is at runtime placement (band 0), which no position body enters`, whose `next` (design row 27; 2026-10-08, ia-position-verb, moved here from the Door) is `ia inspect`, the overview, when the seat is the one K0 takes, the repository's own `@workspace` (`resolveSeat('')`), whether the key names it or not, since K0 is refused alike, and `ia position`, the position without it, for any other seat. Three inputs still read every placement, so a runtime-band record appearing can still move the body. The database's own decisions: a runtime-band `@workspace` or `@system` can move the D02a membership roots, the D02c declared roots, the D02b seat of a path and the repository's own `@workspace` that the closure is built from, and a location's resolved `seat` (R14) then names no `unknown` while `unknowns` names the seat. Admission's findings, which resolve every reference against every placement: a runtime-band record that an edge or field reference of an authored loaded record names resolves it, so that record's IA-GRAPH-TARGET-MISSING or IA-COMP-FIELD-REF-MISSING `finding` leaves `unknowns`, and the row to it, naming a band-0 record, is dropped, so the body names that relation neither as a pointer nor as an unknown. And the body's `revision`, which hashes every source, a runtime-band one included (R16). It is `{format: 'ia.position-body.v1', revision, key, seat, loaded, rules, pointers, pointerTallies, appliesByWord, appliesByWordTallies, cells, mandates, frontier, unknowns, counts, widening}`, `key` and `seat` being the resolved key and seat and the four sections after `pointerTallies` R17's. The seat's workspace is the seat when it is a `@workspace`; else, of the repository's own `@workspace`, the one D02b seats `''` at, and the workspace of the first declared root, in D02c order, that contains the D02a membership root of the seat record (for a location, of the record it is declared at), the first whose closure holds that record; else no workspace holds the seat. A floor or adopted record, an installed one included, is in every closure, so it is seated in the repository's own workspace with the records the repository authors, even when the installed or adopted `@workspace` that ships it declares the root it sits in, as the bundled base's language-workspace declares `.ia/src @authored` in the store (2026-10-08, milestone critique: plan T2's fallback, the floor, the adopted records and the repository's own roots); the workspace whose root holds the record is taken for an authored record of another workspace's root. A workspace's closure is every floor (band 10) and adopted (band 90) record, plus the members of its own declared roots or, while it declares none, every record whose membership root no workspace declares; when no workspace holds the seat, the closure is that fallback. Plan T2 reads the closure as the declared members alone, which would leave a repository without a declared root (the conformance corpus, and every repository `ia init` makes before milestone position-packet) unable to reach any record of its own; and it falls back to the repository's workspace whatever its roots, which, when none of them holds the seat record, would leave the seat outside its own closure (design §1 resolves S inside it) and its own system's blocking governance out of `rules`. Both fallbacks are named under `unknowns`. A record outside the closure is never entered: it is a pointer that names, as `workspace`, the `@workspace` whose declared root holds it, when one does. The composition C0, at cost 0 and one level from the seat, is the seat's field references both ways (directed-view `field-ref` rows); a `@workspace` seat's capture members, the membership rows under its own declared roots; a `@system` seat's word members, the admitted records whose owner system it is; and a location's declared-at record and claimants from `resolution`. A location is no record and has no fields, and a workspace seat no record declares has an empty composition. The first class that reaches a C0 record is its `via`, unless a hop reaches it (below): `field` (`from`, `field`, `direction`, read from `from`'s side), `membership` (`root`), `word` (`system`), `declared-at` (`rule`) or `claim` (`matches`); C0 counts only what the closure admits, a composition record a hop reaches included. The seeds Σ are the seat and the C0 records whose kind is in SHAPE_ROWS[shape].kinds or whose lane, graph `laneOf` (G05), is in its lanes. Hops 1..depth start from Σ and follow directed-view edge rows only, declared or derived inverse, in either direction, whose predicate is in SHAPE_ROWS[shape].predicates, never leaving the closure; each record other than the seat and the seeds that a hop reaches, a C0 record among them, keeps the first row that reaches it, from the seat, then the seeds and each later hop in identity order, as `via: {by: 'row', from, predicate, spelling, declaredBy}`, and is in C. A row that carries a condition is a row of the body only where its condition holds at the key's coordinate (decision conditional-relations-in-delivery, 2026-10-08): graph `conditionHolds` over the coordinate R14's scopeCoordinate builds, the key's shape and phase with the derived category and primitive, the condition's subject being the record that states the row (its `declaredOn`, the author graph G06 keeps as an edge's condition subject), so the body agrees with graph traversal for the same coordinate. A row that does not hold is not followed and its counterpart is not reached through it: it is no hop, primes no record, names no out-of-focus pointer and counts in no frontier, while a field reference carries no condition. The phase can so change the loaded set, which design §6 (routing) says it never does; the decision supersedes that sentence, and a body whose rows carry no condition is unchanged by it. The conformance corpus's fixture law `enforced-by @check instance-schema-check when phase is act and severity is blocking` reaches the check at act only. With `word` set (decision scope-key-caps: the word restricts seeds and tallies inside the body, and blockers are reserved outside n), C0, the seeds, the hop-reached records that load, the pointers, their tallies and the frontier are records of that word only; a record of another word that a hop reaches is a waypoint, followed but never loaded or listed; the seat loads whatever its word. The word never filters `rules` (2026-10-08, ia-position-verb: a word must not hide a blocking rule that governs what it loads, as one claiming a location seat or applying by its subject-word to a record of the word would be hidden if R were read under the word): R is taken from the candidates of the walk without the word, each with the row or class that reaches it there, so `rules` under a word is the body's without it, and R17's applies-by-word section with its tallies, its cells and the mandates are not filtered either. The order keys are total (design §6): governance (prime ↑, band ↓, hop ↑, sev ↑, identity ↑) and every other shape (band ↓, hop ↑, lane ↑, identity ↑). prime is the least index in SHAPE_ROWS.governance.priming (govern, constrain, forbid, enforce, implement) of an edge row incident to the record, else 5; sev is the rank of graph `effectiveSeverity` in [blocking, advisory, informational], a record with none last; lane is its index in the shape's lanes, else their count; hop is 0 for Σ and for a C0 record no hop reaches, else the first hop that reached it (design §6). The candidates K = {S} ∪ C0 ∪ Σ ∪ C, C the hop-reached records, are taken before any truncation and before the word filter, and `rules` is R, the governance-kind candidates other than the seat whose effective severity is blocking, with the blocking rules that apply by word to a candidate (R17), in the governance order and never counted against the budget, so a blocking law that claims a location only through `subject.covers` is in `rules` at budget 0. `loaded` is the seat, then the first `budget` records of ((Σ \ {S}) ∪ C) \ R in the shape's order. A record seat loads as a `LoadedRecord`; a location, or a workspace seat no record declares, as the `LoadedPlace` `{path}` of its canonical path (`''` for the latter). A `LoadedRecord`, and each entry of `rules`, is the pointer tuple plus the record's G13 `digest`. `pointers` are the C0 and hop-reached records outside `loaded` and `rules`, those the budget truncated among them; the records outside the closure that composition or a hop reached; and the counterparts of each loaded record's out-of-focus edge rows and field references, at that record's hop. Each is listed once, by the first that reaches it, in the shape's order, as the 9-tuple of design §7, `{identity, word, kind, lane, system, steward?, band, hop, via}`, `system` being the owner system and `steward` the `head.steward` field reference of its `@system` record (`floor/definition/system/<name>`) when the scope admits it, read without the registry. The first 48 are listed, and the rest are tallied per (word, owner system) as `{system, word, steward?, count}`, sorted by system then word. `frontier` tallies per (owner system, kind), as `{system, kind, steward?, count}`, the counterparts of the in-focus rows of the loaded records at hop `depth` that the body neither lists nor reached, never entered. `unknowns` are `{kind, subject?, code?, path?, line?, message}`: `seat` for a location no admitted record is declared at, a location that nothing claims and none is declared at (`no record claims '<path>' and none is declared at it; widening key: the workspace`, or on a narrowed scope, which prunes the claimants it does not admit, `no record in this scope claims '<path>' and none in it is declared at it; widening key: the workspace`), or the repository root no `@workspace` is declared at; `sources` when the seat's workspace declares no sources (`workspace declares no sources: …`) or no workspace holds the seat; `finding`, read only on a whole-workspace scope (db PT5, as R18 reads admission findings), each IA-GRAPH-TARGET-MISSING, IA-GRAPH-TARGET-AMBIGUOUS, IA-GRAPH-EDGE-UNCONSENTED and IA-COMP-FIELD-REF-MISSING report finding on the source span of a loaded record, the innermost one, with its code, path, line and message; and `unread` on a narrowed scope, which reads none. `counts` are `{composition: |C0|, seeds: |Σ| with the seat, loaded: |L| with the seat, rules, pointers (listed and tallied), appliesByWord (R17), frontier, truncatedLoaded, truncatedPointers, truncatedAppliesByWord}`. `widening` is `{deeper: the key at depth + 1, absent at depth 2; reseat: {shape, phase, depth: 1, budget: 16}}`, to be seated at any pointer, no seat being the repository's workspace. `position` (R16) returns the body with its digest and host note; R17 adds the applies-by-word section, the playbook cells and the mandates; and the Door's version-2 `position` operation and the MCP tool `ia_position` serve it (R12), as does the `ia position` CLI verb (apps/cli/SPEC.md). `tests/position.test.ts` pins, over the conformance corpus, golden bodies of K0, governance at the fixture law (at plan, where its conditional `enforced-by` row does not hold, and at act, where it does), sequence at depth 2 from the workspace and the word law at the governance-system seat, in `tests/golden/` with the revision masked and asserted apart (only `node packages/runtime/tests/golden/write.mjs` regenerates them); K0's single loaded seat, five system pointer lines from `composition.systems`, frontier and named missing sources; byte-equal bodies for equal keys through every whole-workspace token and handle of one revision, and a token selecting every admitted identity differing only by the `unread` note; hops in either direction, out-of-focus pointers and a seed a later hop reaches keeping hop 0; each order key deciding in turn (band, then hop, then lane in the other shapes; prime, then band, an adopted record against a local one, then hop, then sev in governance) and two blocking laws in `rules` in the governance order under governance and context; seeds picked by kind and by lane (an authority-facet contract); the counts of a budget below |Σ ∪ C| and one tally past 48 per word and owner system; the word law loading the seat and only laws, waypoints and only-law pointers, tallies and frontier; a location seat claimed only through `subject.covers` by a blocking law at budget 0, the law in `rules`, not a pointer, the seat alone loaded; a location nothing claims, and one claimed but declared at no record; a record of another workspace's root never entered and named as a pointer, whether a hop or the seat's `composition.systems` reaches it, and not listed under a word it is not of; a location in that root's system folder, closed in that workspace; an adopted `@system` seated in the repository's workspace though its adopted `@workspace` declares the root it sits in, the repository's own blocking law of its word reserved; a conditional row followed at each phase exactly where graph traversal follows it for the key's coordinate, from either side and with its severity term read from the record that states it, and a task reached through a conditional requirement only at the phase it names; the narrowed location unknown; K0 with the repository workspace undecided; a seat no declared root holds, under the fallback closure and named, its blocking law still in `rules`; on a whole-workspace scope, missing targets, unconsented rows and missing field references named on the loaded record whose span holds them, never on an earlier record of the file or on a pointer, and the `unread` note on a narrowed one; and the token. `tests/purity.test.ts` pins the runtime-placement rule (R16). The conformance corpus places no source at runtime, so the rule leaves the golden bodies unchanged.
68
+
69
+ R16. Position and host note (2026-10-08, position-and-projection §1, §4 and item 11; plan amendment A9; decision evidence-placement): `src/position.ts`, on the package root and the `./internal/position` subpath, also publishes `position(handle, within, partial?)` with the `PositionOutput`, `HostNote` and `Freshness` types. It completes `partial` with normalizeScopeKey (R14), resolves the key with resolveScopeKey through the scope token `within`, assembles the body with positionBody (R15) and returns the frozen `{body, digest, hostNote}`, the two outputs of design §1, printed together and never merged. `digest` is graph's codec `digest` of the body, the SHA-256 of its canonical JSON text, and the note carries none. Purity: the body is a function of the key and the admitted revision alone. A key's parts are closed (R14), so a partial naming `text`, `token`, `within` or any other part is an unknown part, IA-RUNTIME-REQUEST-INVALID, and nothing text-driven runs, no classifier, search or text ranking; the version 1 `context` and `select` operations stay text-driven and unchanged. The body names no root path (a location seat spelled as an absolute path enters it as its root-relative path), no scope token, no time, no request text and no capture: one key over two copies of a corpus at different roots gives byte-equal bodies and equal digests, a `context` call with any text on the same handle and token leaves both unchanged, and so does writing a capture. The host note is host state, never claimed identical across hosts or working trees: `{revision, capturedRevision?, previousRevision?, freshness, key}`. `revision` is the handle's root revision (`handle.revision`); `capturedRevision` the revision of the capture at `.ia/work/snapshot/current.json` (db D08a) and `previousRevision` that of the previous root snapshot the handle retains (db D08), each absent when there is none; `freshness` is `current` when the capture is at `revision`, `stale` when it is at another and `no-capture` when there is none; and `key` is the key used, the partial normalizeScopeKey completed, a location as the caller spelled it, while the body's `key` is the resolved one. The handle reads the capture pair once per state, on first use, so a capture written while it is open shows after its `refresh`, the scope token still valid. A position does not require a capture (A9): the body is computed over the live admitted revision, and freshness is a note, never a refusal, where design §5 refuses `ia scope` without a snapshot. Installed state per command, the CLI's and adapter's id@version and the classification rule number of design §1 are not reported: no receipt exists before milestone position-packet. Records at runtime placement are no part of the body (R15), so a runtime-band record appearing that no authored record names and that decides no database seat or root leaves it byte-equal but for its `revision`, the graph revision of the view the scope reads. That revision hashes every source at its placement, a runtime-band one included (graph revisionOf), so it and the digest still move when only a runtime-band source changes, and so does `handle.revision`, which turns the note `stale` against a capture taken before. A runtime-band record that an authored loaded record's edge or field reference names moves `unknowns` too (R15): admission resolves the reference against every placement, so the record's missing-target or missing-field-reference finding leaves the body. That is the evidence flow itself, an observation an `ia validate` writes at runtime placement that a task's `work.exit-evidence` names. Decision evidence-placement's evidence source is to be "excluded from the authored revision": until an admission view leaves runtime-band sources out, both for the revision and for the findings the body reads (milestone generation-binding, task check-runner-join-validate, whose exit evidence is two validates leaving the authored revision unchanged), evidence an `ia validate` writes cannot leave body(K) and its digest byte-equal, nor a capture current. Refusals are those of the three steps: the key's (R14), the token's (a missing one IA-RUNTIME-REQUEST-INVALID, an unknown, stale or closed one its database code) and a seat at runtime placement (R15), each refusal of the key or its seat carrying `next`. The Door serves it as the `position` operation (R12 refinement, position), the MCP door as `ia_position` and the CLI as the consumer verb `ia position` (apps/cli/SPEC.md). `tests/purity.test.ts` pins, for K0 and seven other keys (two locations among them), byte-equal bodies and digests at two roots, and the digest the codec digest of the body; an absolute location seat root-free in the body and as spelled in the note, with no token in the body; a capture that moves only the note: `no-capture`, then `current` after a refresh with the same token and on a new handle, then `stale` after an edit, the earlier revision captured and previous, which the body names neither; `text`, `token` and `within` refused as key parts, and the token refusals; bodies and digests unchanged by two `context` calls with text, in both rankings; runtime-band records (a blocking law that the check enforces and that claims two paths, and observations of the workspace and of the law) changing each body only in its revision, and so its digest, while the same records authored change every one, and a seat at runtime placement refused, a named one and K0's with the repository's own `@workspace` placed so; a location whose only declarer is a runtime-band `@system` naming the seat unknown, its body differing from the body without that `@system` in the resolved seat's `unknown` alone; the limit pinned: a runtime-band check and observation that an authored law's `enforced-by` and a task's `work.exit-evidence` name removing exactly those two findings from the bodies seated at the law and the task; and a key resolved through a whole-workspace token refused through a narrower one that does not admit its seat.
70
+
71
+ R17. Applies by word, playbook cells and mandates (2026-10-08, position-and-projection §6 and §7 and rows 18 and 19; plan amendments A4 and A8; decision scope-key-caps): `src/position.ts`, on the package root and the `./internal/position` subpath, also publishes the `AppliesByWord`, `PositionCell` and `SubjectMatch` types, and `PositionVia` gains `subject`. positionBody (R15) adds four sections to `ia.position-body.v1`, whose format name is unchanged: `appliesByWord`, `appliesByWordTallies`, `cells` and `mandates`, after `pointerTallies`; it reserves blocking rules by word in `rules` too, and `counts` gains `appliesByWord` and `truncatedAppliesByWord`. The subjects are the `@law`, `@convention`, `@principle` and `@playbook` records of the seat's closure (R15), of every word whatever `word` is (R15: the word never filters these sections), that state `subject.subject-word` or `subject.subject-kind` unconditionally. Those fields exist on all four schemas, and nothing read them before. A4 follows design row 18: an `@agent`'s `governance.applies` is not read, since it is no field match against the loaded set (it feeds COMP-STEWARD), and design §6's formula, which names `@mandate` and not `@principle`, is read as row 18's rules and playbooks, a `@mandate` declaring no subject field. A subject applies by word to a record when its `subject-word` is the record's word or its `subject-kind` the record's kind. That is a field match, not a row: it costs no hop, follows nothing and claims no relation or consent. It enters the body at hop 0 as `via: {by: 'subject', label: 'field match, not a row', matches}`, each match `{field, value, record}` naming the field, the word or kind it states and the first record that answers it. `appliesByWord` lists the subjects outside `rules` that apply by word to a record of `loaded`, the seat included, or to a blocking candidate R reserves in `rules` (R15). The body delivers R in full, as it does `loaded`, so making a rule blocking keeps what applies to it, and an entry's match names the first answering record in `loaded` order, then `rules` order. A rule that `rules` holds by word alone is itself a field match, not a record of L or R, and nothing applies by word to it, so matches never chain. Each entry is listed once, whichever of its fields match and however many records answer them, ranked by band ↓ then identity ↑, as rows 17 and 19 rank claimants and cells, since a field match has no row or hop to rank by. The first 48 are listed as `AppliesByWord`: the pointer tuple with that `via`, and `reseat`, the re-seat key (x, H, P, 1, 16, no word) of design §7 as a full key `{seat, shape, phase, depth, budget}`. The rest are tallied per (word, owner system) in `appliesByWordTallies`, as `pointerTallies` are. A subject may also be loaded or a pointer: non-blocking governance stays where R15 places it. `rules` is R (R15) plus every blocking subject other than the seat, of governance kind (`@law`, `@convention` or `@principle`), that applies by word to a candidate of K = {S} ∪ C0 ∪ Σ ∪ C, the candidates before the budget truncates any or the word leaves any out (decision scope-key-caps: blockers reserved outside n). Its matches name the first answering candidate, the seat first and then by identity. A blocking subject that is itself a candidate is already in R, by its claim, its composition class or its row, and keeps that `via`. `rules` stays in the governance order and outside the budget, and none of its entries is in `appliesByWord`, `pointers` or the frontier. So a blocking rule survives budget 0 whether it applies by claim, by row or by word: one whose subject-kind is the kind of a candidate the budget truncated to a pointer is in `rules`. An advisory or informational subject applies by word to `loaded` and R only, never to a candidate the budget truncated. `cells` holds, for each `@playbook` of `appliesByWord` in its order, up to c = 4 (design §1, a rendering constant), its cell at (P, primitive(H)): P the key's phase, and primitive(H) SHAPE_ROWS[shape].primitive. A playbook with a cell there gives `{playbook, address, text}`: `address` is `<identity>#<phase>/<Primitive>` and `text` what `ia read` reads at that address (`fragmentText`, every cell of the record at it in source order, a cell's condition unevaluated), so the cell is delivered while the record's body is not. A playbook with none there gives `{playbook, missing, nearest?, message}`: `nearest` is the phase other than P with a cell of that primitive at the least distance in the cycle orient, plan, act, learn, a tie going to the phase that order lists first (from learn, orient before act), and `message` reads `no cell; nearest phase with a cell: <phase>`, or `no cell; no phase has a cell at <Primitive>` when no phase has one. Besides deciding a conditional relation row, which R15 follows only where it holds at the key's coordinate (decision conditional-relations-in-delivery), the key's phase changes only `cells` and the keys spelled with it (design §6, routing). `mandates` (A8) lists the `@mandate` records of the closure, whatever `word` is, that claim a location seat, from its `resolution` claimants (`via: {by: 'claim', matches}`), or whose `authority.scope` names the seat's workspace (R15), read as a field reference from the workspace's side (`via: {by: 'field', from: <workspace>, field: 'authority.scope', direction: 'in'}`), each once, a mandate that does both keeping its claim `via`, all ranked by band ↓ then identity ↑ whichever way they govern, as pointer tuples at hop 0. A body matches no participant: the position packet selects its participants over body(K0)'s mandates (R19; plan amendment B3), and body(K) is unchanged. No record at runtime placement is a subject, a match, a cell or a mandate (R15). `tests/applies.test.ts` pins: the fixture playbook's plan cell at phase plan under governance, equal to what `readBody` reads at its address, and Attention's under context, the phase moving only the cells where no conditional row bears on the body; the nearest phase by distance, the cycle wrapping, a tie going to the phase the order lists first, no phase with the primitive, and c = 4; a local playbook before an adopted one; the blocking fixture law in `rules` at budget 0 through a claim and through a subject-kind match on a contract the budget truncated, and taken out of the pointers at the check by its subject-word and out of the frontier under governance, never in `appliesByWord` or `pointers`, while an advisory rule that matches only a truncated candidate is in neither section; a convention and a playbook naming the word law applying to the blocking fixture law in `rules` as they do while it is advisory and loaded, the playbook's cell delivered, and to no rule `rules` holds by word alone; `rules` in the governance order across a claimed rule and a word-reserved one, a blocking candidate that also matches by word listed once with its own `via`, a blocking seat whose subject matches itself not reserved, and a word-reserved rule's matches on both fields, each naming the first answering candidate, the seat first and then by identity; no subject or mandate of another workspace's root applying, reserved or governing; the sample convention (subject-word and subject-kind contract) applying once with both matches while a `@contract` is loaded and not while it is only a pointer, its re-seat key seating a body at it, a loaded principle also applying, and each of 51 entries listed once with 48 listed and 3 tallied; the mandates of a workspace, a record and a location seat, none scoped to another workspace, one that both claims and scopes listed once by its claim, and a local mandate before an adopted one; under four words, `rules`, `cells` and `mandates` equal to the body's without the word and `appliesByWord` listing the same entries, a match naming the first answering record of what loads under the word, the blocking convention a `@system` seat's word member reserved under every word, one reserved by its subject-kind alone kept under its own word and another, and the playbook's cell delivered under `word: playbook`, where no playbook loads; a blocking law reserved under the word contract by its claim on a location, nothing loaded or listed, and by its subject-word on the contract that loads at hop 1 under that word, as without the word and at budget 0; and runtime-band subjects and mandates left out of K0. The golden bodies of R15 carry the sections.
72
+
65
73
  The public `/authoring` boundary also owns chat-turn, chat-reply and conversation-summary contracts. A turn discloses one user message/current source snapshot and names its conversation/previous run; the service owns accumulated history and agent-selected targets. Nested proposals remain bound to that turn's exact message/context/base, fixed agent attestation and the existing proposal decoder. No API database, provider SDK or chat session lifecycle is imported into runtime.
66
74
 
67
75
  The public `/editor` `EditorWorkspace.composition(stamp)` projection describes available captured adoptions by qualified source prefix, exact revision, source/record counts and systems. It reports direct adopted schema, registration and typed-reference uses for admitted local records using the shared registry/resolver; refused occurrences remain in the ordinary view. Source links and the projection use the existing owner/generation stamp. `localRevision` hashes ordered local non-floor `{path,text}` bytes using the adoption digest contract, including unsaved overlays, solely for host navigation matching. This neither merges identities nor mounts/replaces source, grants writes, performs remote discovery or describes transitive governance. Hosted publication requires the separate publication/access contract.
68
76
 
69
77
  Entry contract (2026-09-24): `/entry` exports `isEntry(argv1, moduleUrl)`, which a package binary calls with `process.argv[1]` and `import.meta.url` to decide whether it is the process entry. The invoked path is compared first and real paths only when it misses, because npm's `.bin` entries, global installs and pnpm's store links reach an entry through a link while Node loads it from its real path. A path that names no file (missing, through a file, or with a name too long) is not the entry; any other failure to resolve one throws rather than answering "not the entry". An argument Node resolves further, such as an extensionless path or a package directory, names no file itself, so a binary started that way does not recognise itself as the entry and exits 0 having done nothing. It imports only Node built-ins, and the root index re-exports it. `@inventarch/folio`, which may import only `@inventarch/language`, repeats it.
70
78
 
71
- Machine protocol description (2026-09-29, spec-0012): `MACHINE_PROTOCOL` (`src/machine-protocol.ts`, exported from the package root) describes the nine Door operations. For each it records a summary, a description, the parameter JSON Schema, the result, the refusals with their next action, an example that returns `ok: true` on `packages/compliance/fixtures/loop`, and the MCP tool that serves it. CLI help and the MCP door's `tools/list` project it, and in this source tree so does the generated `docs/reference/cli/machine-protocol.md`, which the public candidate does not carry. It is data and never validates; the Door keeps its own checks. `tests/select-door.test.ts` fails when the table's operation names or parameter keys, nested ones included, differ from the ones the Door names when it refuses an unknown key.
79
+ Machine protocol description (2026-09-29, spec-0012): `MACHINE_PROTOCOL` (`src/machine-protocol.ts`, exported from the package root) describes the Door operations: the nine of version 1, and since version 2 `read`, `next` and `position` (R12 version 2 refinements below). For each it records a summary, a description, the parameter JSON Schema, the result, the refusals with their next action, an example that returns `ok: true` on `packages/compliance/fixtures/loop` (for `next`, which that fixture's records give no plan to read, on `tests/fixtures/delivery/base` laid over the conformance corpus), and the MCP tool that serves it. CLI help and the MCP door's `tools/list` project it, and in this source tree so does the generated `docs/reference/cli/machine-protocol.md`, which the public candidate does not carry. It is data and never validates; the Door keeps its own checks. `tests/select-door.test.ts` fails when the table's operation names or parameter keys, nested ones included, differ from the ones the Door names when it refuses an unknown key.
80
+
81
+ R12 protocol version 2 refinement (2026-10-08, door-position-operation part 1; plan amendments A2 and A3): the Door also accepts `read`, its params `{within?, locator, includeRuntime?}` closed as every operation's are, and answers `{ok: true, result}` with the `ReadBody` `readBody` returns, or that function's refusal. It always reads through a token, the initial one when `within` is omitted, and passes it to `readBody` as `ReadBodyOptions.within`, so every lookup (`get` and `records`) is in that scope and the boundary is by identity: an identity, a fragment or a `path:line` that no admitted record in the scope answers, whether its record is outside the scope, refused by admission or absent, is, through a token narrower than the whole workspace, one plain IA-RUNTIME-READ-UNADMITTED, `{ok: false, code, message: 'The locator is not in this scope'}`, which names no path, line, identity or refused record. Through a whole-workspace token (db `isCompleteScope`, PT5: one whose scope, and every scope it was issued under, is at the workspace root with no `phase` or `identities`, such as the initial token of a door opened without a `boundary`, or with one that sets none of them, and a token `scope` issues from such a token without setting them; a root below the workspace root, a phase or identities make a token narrower), which reads what the root view reads, a miss is the root view's refusal: an identity a source holds whose record admission refused reads `in this workspace's sources, but admission refused it` with that record's path, line, `file` `refused` and the `reason` admission gives, any other identity `not in this workspace's sources`, and a line what the workspace's sources hold in its file (2026-10-08, door-position-operation part 2: one disclosure rule for the version 2 operations, the one `next` follows, R18). Without `within`, `readBody` reads in the root view as before, its refused-identity refusal now also carrying that `reason`, and `ia read`, which prints no `reason`, is unchanged. A record in the scope reads as `readBody` reads it, its fragment, placement and unreachable refusals included. The Door reads a document through `DoorOptions.read`, by default db `readWorkspaceBytes` (D01a) over its root bounded at the CLI workspace file reader's 4 MiB, which admits the paths that reader's portable rule admits. The default reader's refusals name a document by its workspace-relative path and never the server's root (part 2): those of `readWorkspaceBytes` already do (a link or junction, a nonportable path, an irregular, missing or oversized file), `readBody` refuses a document path outside the workspace before any read, and a root that can no longer be opened, as when the workspace moves while the door serves, which db names by the root, is refused IA-RUNTIME-READ-UNREACHABLE, as every failure of the reader is, its message carrying the reader's IA-DB-ROOT-INVALID, `The workspace can no longer be opened to read <path>`, which names the document alone; the CLI's own reader names a link by its absolute local path. It binds adopted mounts once, when it opens, from db `adoptedBindings` over the manifest `open` has just read, as `ia read` binds them when its session opens, so they match the handle's snapshot and a manifest rewritten while the door serves changes no read; a door opened with explicit `adopted` captures, which name no directory, binds none. `includeRuntime` must be a boolean, and a locator that spells no form is IA-RUNTIME-REQUEST-INVALID. `DoorOptions.protocol` is the `MACHINE_PROTOCOL` version the door serves, by default the table's, and one that is not an integer from 1 to it is a TypeError: a door at version 1 refuses `read` before reading its params, as the unknown operation 1.1.0's door refused it, byte for byte, and binds no mounts. An unknown operation's refusal lists the operations the door serves in table order, `read` after the version 1 operations from version 2. `MACHINE_PROTOCOL` is version 2: `ProtocolOperation` gains an optional `since`, absent on the nine version 1 rows, whose JSON stays byte-identical to what tag v1.1.0 exported (`tests/golden/machine-protocol-v1.json`; `src/machine-protocol.ts` was unchanged since the tag when it was taken), and the `read` row is appended with `since: 2` and `mcp: 'ia_read'`, with one flow line saying so. The version 1 parameter digest is still over the nine rows, and version 2's is over every row. The CLI's machine routes stay the version 1 operations (A2): `runCli`, which the `ia` binary's nine routes, `@inventarch/cli/internal/main` and the host launcher's `door` mode run, opens its door at protocol version 1, and `LEGACY_OPERATIONS`, the usage line and `ia <operation> --help` and `--schema`, which describe the routes at version 1 as 1.1.0 did, are unchanged; `ia read` remains the consumer verb, which returns the Door's body and digest and refuses a document the Door refuses with the same code. The MCP door serves `ia_read` from the row (A3). `tests/door-read.test.ts` pins in-scope reads, the plain refusal for each locator form outside a narrowed boundary with no path named, the whole workspace's token answering a refused record with its path, line and reason, an identity no source holds and a line as `readBody` answers them in the root view, as do tokens `scope` issues with `{}`, `{root: ''}` and `{phase: null}` and the initial token of a door opened with `boundary: {}`, while tokens `scope` issues with `identities` admitting every admitted record, a phase or a root below the workspace root, and a door opened with that `identities` boundary, answer each with the plain refusal, a link, an escape and a moved root refused with no spelling of the server's root or the link's target, one source holding an in-scope, an out-of-scope and a refused record, a token narrowing reads in one door, the db reader's link and hard-link refusals, an injected reader, a mount bound from the manifest when the door opens, which a manifest rewritten later does not change, and none for explicit captures, and the `read` row's example on the loop fixture, its required parameter and its refusals proven both ways; `tests/select-door.test.ts` the golden, both digests and a version 1 door's operations and refusal; `apps/cli/tests/cli.test.ts` that `runCli` refuses `read` and an unknown operation with 1.1.0's bytes; `apps/cli/tests/read.test.ts` that the Door and `ia read --json` agree on body and digest for corpus locators, an adopted document and a document of exactly the 4 MiB bound, and refuse a link, a decomposed (NFD) name, a colon and a document one byte over the bound with the same code, for the same record and document path and with the same reason up to each reader's own words, while a runtime-placement refusal is compared with `readBody` under the CLI's own `readOptions` on a handle opened with the placement, since the session `ia read` opens places no source at runtime; and tools/compliance runs a boundary fixture per read code through the Door.
82
+
83
+ R12 protocol version 2 refinement, next (2026-10-08, ia-next-verb; plan amendments A2, A3 and A7): the Door also accepts `next`, its params `{within?, seat?}` closed as every operation's are, `seat` a string, and answers `{ok: true, result}` with the `DeliveryView` `deliveryView` (R18) returns, or that function's refusal. It always reads through a token, the initial one when `within` is omitted, so a narrowed scope lists only what it admits and reads what it leaves out as unknown, and only a whole-workspace token (db `isCompleteScope`, the rule `read` follows), such as the initial one of a door opened without a `boundary`, also names the work records and files admission refused, as db PT5 permits a complete scope to. Refusal envelopes: a version 1 operation's refusal keeps 1.1.0's shape, `{ok: false, code, message}` with the escalation fields of `context` and `select`, and so does every refusal the Door itself raises for any operation (a parameter that is unknown or of the wrong type, a token it did not issue, an unknown operation). A version 2 operation answers with the refusal its runtime function returns as a value, which may carry more: `read` the `ReadRefusal` fields, and `next` the `NextRefusal`'s `next`, the one command to run (design row 27), with `plans` (IA-RUNTIME-NEXT-AMBIGUOUS) or `cycle` (IA-RUNTIME-NEXT-CYCLE). `DoorResponse` is unchanged, as each such refusal is a `Refusal`. A door serving version 1 refuses `next` before reading its params, as the unknown operation 1.1.0's door refused it, byte for byte, and an unknown operation's refusal on a door serving version 2 lists `read`, then `next`, after the version 1 operations it serves. The `next` row is appended to `MACHINE_PROTOCOL` with `since: 2` and `mcp: 'ia_next'`, after `read`, with one flow line; its refusals are IA-RUNTIME-REQUEST-INVALID, IA-DB-SCOPE-UNAVAILABLE and the four NEXT_CODES, each saying what the refusal carries; and its example, `{}`, reads `tests/fixtures/delivery/base` and is refused IA-RUNTIME-NEXT-NO-PLAN on the loop fixture, which authors no plan. The version 1 rows, their golden and the version 1 parameter digest are unchanged, and version 2's parameter digest, over all eleven rows, is pinned again. The CLI's machine routes stay the version 1 operations (A2): `runCli` refuses `next` with 1.1.0's bytes, and `ia next` is the consumer verb, which prints the Door's view and names its own next command for each refusal (apps/cli/SPEC.md). The MCP door serves `ia_next` from the row, eleven tools in all (A3). `tests/next.test.ts` pins the Door's view equal to `deliveryView`'s through the same scope, from every seat of the plan (the plan, each milestone and each task of `tests/fixtures/delivery/base`) and through a token `scope` issued; a refused `@task` named as a review item on the initial token of a door opened without a `boundary`, and on neither a token `scope` issued with `identities` nor the initial token of a door opened with such a `boundary`, though each admits every record the workspace admits; the refusal of each fixture equal to `deliveryView`'s value, `next`, `plans` and `cycle` included; the three-key shape of a version 1 refusal and of the Door's own refusals of `next` (a forged token, a non-string seat, an unknown parameter); that the door writes nothing; a version 1 door's refusal; and the row's example, its required parameters and its refusals proven both ways; `tests/select-door.test.ts` both digests and the golden; `apps/mcp-door/tests` `ia_next` in-process and over stdio, and that it names a refused `@task` on the initial scope and not through a token `ia_scope` issued with `identities`; and tools/compliance runs a boundary fixture per NEXT code through the Door.
84
+
85
+ R12 protocol version 2 refinement, position (2026-10-08, door-position-operation part 2; plan amendments A2 and A3): the Door also accepts `position`, its params `{within?, seat?, shape?, phase?, depth?, budget?, word?}` closed as every operation's are, and answers `{ok: true, result}` with the `PositionOutput` `position` (R16) returns for the partial key the six other params name, `{body, digest, hostNote}`, byte for byte as `position` returns it through the same token, the initial one when `within` is omitted. The parts reach `normalizeScopeKey` as given, so the Door applies no default of its own and no params is K0. Request text, a token or any other part is an unknown parameter, which the Door refuses before any read, so nothing text-driven runs, and a version 1 `context` call with any text on the same Door moves neither the body, its digest nor the host note. Refusal envelopes follow the version 2 rule (R12 refinement, next): a refusal the Door raises itself (an unknown parameter, a `within` that is no string or that the door did not issue, an unknown operation) keeps 1.1.0's three keys, and a refusal of the key carries `next`, the one command to run (design row 27), as `{ok: false, code, message, next}`, its code and message those of the `RuntimeError` `position` throws, which carries the same `next` (R14): a shape or phase outside its closed set names `ia position --shape <context|governance|execution|sequence|learning>` or `ia position --phase <orient|plan|act|learn>`, a depth or budget outside its cap that cap, `ia position --depth 2` or `ia position --budget 64`, a word that is no string or that the closure does not register `ia vocabulary`, and a seat of another form, one the scope does not admit or a path outside the workspace `ia position`, the position without that seat; a seat at runtime placement (R15) names `ia inspect` when it is the seat K0 takes, the repository's own `@workspace`, whether the key names it or not, since K0 is refused alike, and `ia position`, the position without it, for any other seat, which the error positionBody throws now carries (2026-10-08, ia-position-verb: the Door named it before, and its answer is unchanged). The consumer verb `ia position` prints the operation's output (apps/cli/SPEC.md). A door serving version 1 refuses `position` before reading its params, as the unknown operation 1.1.0's door refused it, byte for byte, and an unknown operation's refusal on a door serving version 2 lists `read`, `next`, then `position` after the version 1 operations it serves. The `position` row is appended to `MACHINE_PROTOCOL` with `since: 2` and `mcp: 'ia_position'`, after `next`, with one flow line; its params give `shape` and `phase` their closed sets, `depth` and `budget` the caps of SCOPE_KEY_CAPS and `seat` an identity or `{path}`; its refusals are IA-RUNTIME-REQUEST-INVALID, which says what a key's `next` names, and IA-DB-SCOPE-UNAVAILABLE; and its example, a governance key seated at the loop fixture's sample procedure, reads that fixture. The version 1 rows, their golden and the version 1 parameter digest are unchanged, and version 2's parameter digest, over all twelve rows, is pinned again. The CLI's machine routes stay the version 1 operations (A2): `runCli` refuses `position` with 1.1.0's bytes. The MCP door serves `ia_position` from the row, twelve tools in all (A3). `tests/door-position.test.ts` pins the Door's output equal to `position`'s byte for byte for K0, a governance key and four other keys through the whole workspace's token, and for one through a token `scope` issued, and that the door writes nothing; one body and digest at two absolute roots, a location spelled as an absolute path under each included, with no spelling of either root in it; a door opened with a `boundary` answering as `position` through that scope's token, its body naming no record outside the boundary and fewer than the whole workspace's body, with the `unread` note; a position byte-equal before and after two version 1 `context` calls with request text on the same Door; each key refusal with its `next`, equal to the error `position` throws, and so a seat at runtime placement named and, whether the key names it or not, the repository's own `@workspace` placed so, the three-key shape of the Door's own refusals and of a version 1 refusal, and a version 1 door's refusal; and the row's example, its closed sets and caps, and its refusals proven both ways; `tests/select-door.test.ts` both digests and the golden; `apps/mcp-door/tests` `ia_position` in-process, equal to `position` through the server's scope and a token `ia_scope` issued, and over stdio; and tools/compliance runs a boundary fixture for a key past its depth cap through the Door, requiring the cap as its `next`, which a door refusing `position` as an unknown operation never names.
72
86
 
73
87
  ## Neutral authoring execution boundary
74
88
 
75
89
  `@inventarch/runtime/authoring-execution` owns shared authoring operation context/errors, input and artifact helpers, and guarded dispatch. A trusted host supplies its fixed catalog; no decoded request may supply handlers or widen effects. Dispatch preserves exact admitted operation/source identity, declared handler/input/output/effects, steward authorization, safe unique artifact paths, read-only output refusal and final source freshness. This factors the existing tools/systems mechanics without a private catalog, architecture packet, quality codec or queue dependency. Existing tools imports remain compatibility wrappers. This API does not authenticate arbitrary catalogs or authorize filesystem publication; each host owns its selected catalog and grants.
76
90
 
77
91
  This boundary also owns the neutral repository inventory helpers used by existing documentation and private review consumers. `gitFiles` executes only the fixed local `git ls-files --cached --others --exclude-standard -z` query, deduplicates/sorts the result and refuses subprocess/output limits (10 seconds,16MiB). `ownerOf` preserves the existing root/package/app/tool/example/distribution/native owner path mapping exactly; it selects no catalogue, executable, quality policy or queue. Tool imports remain compatibility exports. Consumer source capture must still validate file bytes, aliases and scope; a path listing is not source admission or authority. Status (LKI-01, implemented at 22cc1d8d, not qualified): `ownerOf` names its root-owned top-level directories by stem, so no runtime source or test carries the CI-configuration directory as a path segment and the cache-safety invariant in `tools/testing/inventory.test.ts` (only tools tasks read CI configuration) holds again; the mapping and both exports are unchanged. Evidence: `tools/testing/inventory.test.ts` failed at 3f0e9853 (`runtime:test` classified as a CI-configuration reader) and passes at 22cc1d8d.
92
+
93
+ Mandate authority (2026-10-06, position-and-projection items 2c and 13): `src/mandate-modes.ts`, exported from the package root, publishes `MOVES` (the five kernel moves in kernel order), the frozen `MODE_MOVES` table (read→Observation, validate→Verification, author→Synthesis, effect→Execution, re-seat→Delegation), `mandateAuthorityOf(record)`, which reads a compiled `@mandate`'s `authority` section (participant, moves, scope, excluded-words, covers) and refuses a non-mandate or a malformed field with IA-RUNTIME-REQUEST-INVALID, and `mandateRefusal(mandate, mode, words)`, which returns undefined when the mandate permits the mode for the words and otherwise `{code, message, next}`: IA-RUNTIME-MANDATE-MOVE when the mode's move is not among the declared moves, IA-RUNTIME-MANDATE-WORD when a word is excluded, and `next` exactly one catalog command, `ia inspect <mandate identity> --edges both`. A mandate without `authority.moves` restricts no move; a declared list admits only the moves it lists and must name at least one (an authored `moves []` admits structurally but is IA-RUNTIME-REQUEST-INVALID here, never a lockout); excluded words are refused whatever the moves; the move is judged before the words. Both codes are registered in RUNTIME_CODES and covered by the compliance runtime fixtures over the conformance sample-mandate. No CLI command consults a mandate yet: the authoring verbs land in a later milestone, and a mandate adds closed restrictions only; it never grants host permissions.
94
+
95
+ Body reader (2026-10-07, position-and-projection §5, item 23 and constraint IM-43): `src/locator.ts` reads the body behind a locator for `ia read`; the package root exports `parseLocator`, `readBody`, `SOURCE_LOCATORS` and `READ_CODES` with the `Locator`, `ReadBody`, `ReadBodyOptions`, `ReadCode`, `ReadRefusal` and `ReadResult` types, and the `./internal/locator` subpath also carries `fragmentText`, `markdownSection` and `headingAnchor`. `parseLocator(text)` returns the locator a text spells, or undefined: `<identity>` (a canonical `system/kind/facet/name` identity), `<identity>#<phase>/<Primitive>` (a cell address of the closed phases and primitives), `<identity>#<REQ-ID>` (a requirement id), or `<path>:<line>` (the last colon splitting the path from a positive safe-integer line). `readBody(handle, locator, {read, mounts?, includeRuntime?, within?})` reads in the handle's root view, or in the scope `within` names (R12 version 2 refinement), and returns `{ok: true, body: {locator, identity, kind, path?, digest, body, certified: false}}` or one `{ok: false, code, message, identity?, path?, line?, file?, reason?}` refusal; a locator that spells no form throws IA-RUNTIME-REQUEST-INVALID. A line locator reads the innermost admitted record whose source span holds the line. A cell or requirement locator reads the record, never its document: `fragmentText`, the text of the record's cells at that address in source order, or of its requirement with that id; `resolveMention` checks a request mention's fragment with the same function, so its refusal is unchanged. Otherwise a record whose word carries a source locator (`SOURCE_LOCATORS`: `work.source` for `@plan`, `@spec`, `@milestone`, `@task` and `@decision`, `reference.document` for `@authoring-guide`, `template.resource` for `@template`, each a text field its schema declares) and states it unconditionally reads the document it names, kind `document`, and any other record reads its own body (`bodyOf` in `src/render.ts`), kind `record`: the part of what recordText renders that the record states rather than structures, its `meaning.says`, a `@system`'s head `describes`, and nothing for a `@schema`. All five work schemas declare `work.source`, and each word reads it as a locator (decision work-source-locator, 2026-10-08, widening row 2d from `@plan` and `@spec`), since a plan's records name their sections of its document with it. A document path is canonicalized and must stay inside the record's tree, db `sourceTree` (D02a): the workspace root for the workspace's own `.ia/src`, and a package's or an installed store's directory as it is. An adopted mount's sources carry the `.ia/adopted/<id>/<revision>` label of a directory that does not exist, so its documents are read from the directory `mounts` binds that label to, which a host builds from db `adoptedBindings`; a record of an adopted mount `mounts` does not bind has an unreachable document. A document is outside an adopted mount's revision pin, which covers only the mount's `.ia/src` sources. The host supplies `read(path)`, which returns one workspace file's bytes at its canonical workspace-relative path and throws for a path it does not admit, as R10's hosts hold the root boundary; runtime itself reads no file. The bytes must be UTF-8. A `#<anchor>` on the locator of a `.md` or `.markdown` file, in any case, selects `markdownSection`: from the ATX heading whose `headingAnchor` equals it, to the next heading of the same or a higher level, a repeated anchor numbered `-1`, `-2` in document order. `headingAnchor` slugs a plain-text heading as GitHub's slugger does: an inline link keeps its text, letters are lowercased, characters other than letters, marks, decimal and letter numbers, connector punctuation, `-` and space are dropped, and spaces become `-`. The heading is not rendered first, so underscore emphasis, entity and character references, inline HTML and reference links keep their markup, and such a heading may have another anchor on GitHub. A leading byte order mark is not part of the first heading and stays in the section. Headings in fenced code are ignored, and setext headings and headings in list items or block quotes are not read. A document is read in time linear in its length, up to a logarithmic factor in how deeply its containers nest (2026-10-08, milestone critique): a 4 MiB document read on the long-lived MCP door must not stall it, as the regular expressions these scanners replaced did on a long run of spaces or unclosed brackets in a heading and the per-marker reread did on one line of nested list markers or on blank lines inside deeply nested items. Each line is scanned once from its end (its last character that is not a space, its last terminator, where a thematic break may start); a line is read as an ATX heading, and a heading's inline links as their text, in time linear in its length; each list or quote marker a line opens or continues is read in time linear in its own width; and a line left blank after its container prefixes continues every open list item up to the first block quote or empty item, the only containers a blank line ends (an empty item is always the innermost), found by a binary search over the open quotes. `tests/locator.test.ts` checks the growth ratio rather than a time, at sizes a quadratic reader still finishes in seconds, so a regression fails instead of stalling the suite. `digest` is the SHA-256 of the body's UTF-8 bytes, so a whole document's digest is its file's. A read never certifies its body. The refusal codes, registered in RUNTIME_CODES as `READ_CODES` and covered by compliance boundary fixtures: IA-RUNTIME-READ-UNADMITTED when no admitted record answers the locator, which for an identity a source holds whose record admission refused reads `in this workspace's sources, but admission refused it` with that record's path and line, `file` `refused` and the `reason` admission gives (db `refused`), for any other identity is `not in this workspace's sources`, and for a line names what the workspace's sources hold in its file (`file` `refused` when admission refused records there, else `admitted` when admitted records there span other lines, absent when no record of the sources is in it, a path that is absolute or escapes the workspace reads as one that is not relative to the workspace root, and the workspace root itself, `.` or another spelling of it, reads as a directory and no source); IA-RUNTIME-READ-PLACEMENT for a record at runtime placement (band 0) unless `includeRuntime` is set, judged before any fragment; IA-RUNTIME-READ-FRAGMENT when the record has no cell or requirement at the fragment; and IA-RUNTIME-READ-UNREACHABLE when the document path names no file, is a URL (a read fetches nothing, and a URL is never canonicalized into a path) or is outside the workspace or the record's tree, the record is in an adopted mount `mounts` does not bind, the host's reader throws, the bytes are not UTF-8, an anchor names a file that is not markdown, or no heading has the anchor. The Door's `read` operation (R12 version 2 refinement) reads a body through a scope.
96
+
97
+ R18. Delivery view (2026-10-08, position-and-projection §9 step 2, §10 and rows 20 to 22; plan amendments A5 to A7): `src/next.ts`, exported from the package root and the `./internal/next` subpath, publishes `deliveryView(handle, within, seat?)` and `NEXT_CODES` with the `CycleRow`, `DeliveryMilestone`, `DeliveryResult`, `DeliveryTask`, `DeliveryView`, `ExitEvidence`, `NextCode`, `NextRefusal`, `Prerequisite`, `ReviewItem`, `StateDimension` and `StateLine` types. It is a pure function of the admitted records the scope token `within` reads: every read (the snapshot, directed views, one traversal, readiness) carries that token, so a narrowed scope lists only what it admits and prunes rows to it (db D09), and only a whole-workspace token (db `isCompleteScope`, PT5) also reads the admission findings it alone may disclose, `refused` and the report's COMP-PARSE findings; the view is computed per call, never stored, and nothing is written, the capture pair that `readiness` reads included; an unknown, stale or closed token keeps its database error. It returns `{ok: true, view}` or one refusal `{ok: false, code, message, next, plans?, cycle?}` whose `next` is exactly one command (design row 27), as `readBody` returns its refusals as values. The plan is the seat's when a seat is given: a `@plan`, the plan a `@milestone`'s `work.plan` names, or that of a `@task`'s `work.milestone`; without one, the only admitted `@plan` at band 100. IA-RUNTIME-NEXT-SEAT refuses a seat the scope does not admit (next the view without a seat that runs: `ia next` while the scope admits one `@plan` at band 100, `ia next --seat <the first of them>` while it admits several, which `ia next` alone refuses, and `ia next --help` while it admits none) or that is not a `@plan`, `@milestone` or `@task` (next `ia position --seat <seat>`); IA-RUNTIME-NEXT-NO-PLAN a seat that belongs to no admitted plan, or no seat and no plan at band 100 (next `ia next --help`); IA-RUNTIME-NEXT-AMBIGUOUS no seat and several plans at band 100, listed in the message and in `plans` (next `ia next --seat <the first of them>`); IA-RUNTIME-NEXT-CYCLE `require` rows that form a cycle among the plan's tasks, milestones or both, listed in `cycle` as declared rows `{from, to, declaredOn, path, line}`, each `from` requiring its `to` (next `ia position --seat <the cycle's first task, else its first milestone> --shape sequence`). Design §11 names `ia preview plan` and `ia preview --set` for the second and fourth; those verbs arrive later, so each refusal names a command of this milestone. The plan's milestones are the `@milestone` records whose `work.plan` names it, and its tasks the `@task` records whose `work.milestone` names one of them (the reverse field index). Order: one topological sort, Kahn's algorithm, over the tasks and two vertices per milestone, its start (its prerequisites met) and its end (satisfied). A milestone's tasks follow its start and precede its end, its start precedes its end, and each declared `require` row between two records of the plan, in either spelling, makes the requiring record (a task, or a milestone's start) follow the required one (a task, or a milestone's end). Ready milestone vertices are emitted first and ready tasks by (milestone identity, task identity), so tasks come prerequisites first with ties by milestone then task: the order Kahn's algorithm gives over the task-level expansion (a task follows each task it requires, each task of a milestone it requires, and each prerequisite task of its milestone, required directly or through a required milestone's tasks), and a required milestone with no task still passes on its own prerequisites, so a cycle through it is refused too. Requirements outside the plan order nothing and remain basis lines. A relation row that carries a condition (decision conditional-relations-in-delivery, 2026-10-08), such as `requires @task guide when phase is act` or `grounds @task guide when phase is act`, counts only where its condition holds at the coordinate the scope binds, decided as graph traversal decides it: the coordinate is the phase db `resolveScope` binds the token to, or none (a scope binds no other condition axis), and graph `conditionHolds` decides each term, the condition's subject being the record that states the row (its `declaredOn`, the author graph G06 keeps as the edge's condition subject). A condition is decided where every coordinate the bound one may still be completed to (each axis it binds no value for absent, or set to each of its values) reads it alike, and undecided where two of them differ: `conditionHolds` reads provenance and artifact set from the subject alone, so the subject decides those terms; it reads severity as graph `effectiveSeverity`, the stronger of the subject's and the coordinate's (G08), so a severity term is decided only where the subject's own severity decides it at every coordinate (`when severity is blocking` on a blocking record holds everywhere, `when severity is advisory` on one fails everywhere) and is undecided otherwise, as on a record that states no severity, such as a `@task`; and a term on any other axis the scope binds no value for, such as the phase on a whole-workspace scope, is undecided. A row whose condition fails is no row: it orders nothing, is no requirement, grounding or supersession, and its declared line is not read as unanswered either. A row the scope does not decide, as one conditional on a phase on the whole-workspace scope `ia next` reads, or on a severity on any scope, is conditional with an unknown basis and is never satisfied: a conditional requirement orders nothing and is an unsatisfied prerequisite whatever its target's state, its basis `<word> <target>: conditional on <terms>, which the scope binds no <axes> to decide (unknown)`, the axes being those the bound coordinate leaves open, and one no admitted record answers reads `no admitted record answers it, conditional on …`. Intent is read at the bound coordinate with each undecided row read as no row; when that reading reads an undecided row that could change it (a grounding of the task, or of a supersedor, a supersession between two decisions grounding either, or a supersession of the task by a record that is or may be accepted), it is read again at each completion of the bound coordinate on the axes those rows leave open, where every row is decided, a record that a row holding at the bound coordinate names read before one only a conditional row names. The line that reads the same, value and basis, at every completion is the intent, since no binding the scope could take changes it and the conditional row is never read as satisfied: a decision with no choice that grounds the task only at act, beside one that grounds it with no condition and is accepted, leaves it `accepted`, and a supersession that holds, by a record one decision accepts at every completion, leaves it `superseded`. Else intent is `unknown`, its basis the first such row, `<record> grounds it conditional on …` or `<record> supersedes it conditional on …`, as it stays when the axes those rows leave open have more than 256 completions. Review items read rows that hold only. Of two rows to one counterpart the one that holds is read before a conditional one, and of two lines for one target a decided one before a conditional one. Field references carry no condition, so exit evidence, milestones, plans and owner-agents are read as before. Admission refuses a record that states a conditional `supersede` of a work record (each work-system word's supersede rule has cardinality one, which a condition would leave undecided: IA-COMP-EDGE-UNRESOLVED), so such a row is rare; one that reaches the view is read as above. A task's effective prerequisites are its own `require` targets, then its milestone's, each target once, an inherited one marked `via` that milestone. work-system consents `require` to a `@task`, `@milestone` or `@decision` target only (a `@task` that requires a `@spec` is refused at admission, IA-GRAPH-EDGE-UNCONSENTED), so no required-spec line arises; a requirement no admitted record answers, an admission warning with no row, is read from the traversal's dangling rows and is never satisfied; and a `require` the task or its milestone itself declares that gives neither a row nor a dangling edge in the scope, as when its answer is outside it (D09 prunes the row, and the traversal never crosses the scope), is never satisfied either, its state unknown. A requirement declared only on a record outside the scope is not read. A record's exit evidence is the first `@observation`, by identity, that its `work.exit-evidence` names or whose `evidence.subject` names it, whose `evidence.verdict` is success and whose `evidence.subject-revision` reads `current` under `readiness` (db D08) for that record; its evaluator is `evidence.evaluator`, and its `attribution` is `self` when that equals the identity the task's `work.owner-agent` names (decision task-owner-and-agent-description), `unknown` when the task states an owner-agent that no admitted `@agent` in the scope answers or the observation records no evaluator for a task that names one, else `other`. Basis lines: `decision <d>: choice made` or `no choice` (`decision.choice` stated or not); `task <t>: exit evidence <o>` or `no exit evidence`; `milestone <m>: exit evidence <o>` (its own), `every task has exit evidence`, `exit evidence missing for <n> of <k> tasks`, `no task and no exit evidence`, or `every task the view reads has exit evidence; records outside this scope are unknown` (a narrowed scope) or `…; records admission refused are unknown` (a whole-workspace scope while admission refuses a `@task`, whose `work.milestone` the view cannot read, or a file a language error refuses whole, db D03), neither of which satisfies it; `<reference>: no admitted record answers it`; `<reference>: no record in this scope answers it (unknown)`; each with ` (via <milestone>)` when inherited. The verdict `line` is `exit evidence recorded (<o>, evaluator <e>[, self-attributed | , self-attribution unknown])`, else `no declared blocker` when every effective prerequisite is satisfied, else `blocked (<each unsatisfied basis>; …)`; a record's `work.status` is printed as `status <value> (self-declared)` and is never a basis. The five state lines of each task (design §10): intent `superseded` when a record that supersedes the task is grounded by a live `@decision` stating `decision.choice` and `decision.effective-revision`, `accepted` when the task itself is, else `unknown`, naming the first live grounding decision's missing choice or effective revision, or that none grounds it (in this scope, on a narrowed one), the live decisions grounding a record being those no other of them supersedes, unless the two supersede each other through a cycle, which removes neither (revisions are compared by equality only, never ordered); definition `admitted` at the record's per-record digest, as every listed task is an admitted winner, so the plan's `rejected` cannot arise on a listed task: a `@task` admission refused has no record to list, and a whole-workspace view names it as an `admission` review item instead; realizable and realized `not applicable` (a task binds nothing and no effect owner realizes one); worked `observed success` or `observed refusal` for an observation at the current digest, `stale` for one whose subject-revision is the previous snapshot's digest, `unknown` for one at neither (or with no subject-revision, or another verdict), and `unobserved` when no observation names the task, `unknown` on a narrowed scope. Review items, each naming as owner the `head.steward` of the `@system` of the record it is about when the scope admits that system: `grounding`, two or more live `@decision` records grounding the plan or one of its milestones or tasks, the message naming those that supersede one another in a cycle; `currency`, two `@spec` records whose `work.status` is accepted, one superseding the other with no `work.replaced-scope` (a partial supersession keeps both live, and a draft or superseded spec is not current); and, on a whole-workspace scope only, `admission`, each `@plan`, `@milestone` or `@task` record admission refused that no admitted occurrence answers, with its path, line and reason, and each file a COMP-PARSE error refuses whole, without an owner, both naming `ia validate`. `next` is `ia position --seat <task> --shape sequence` for the first task in order whose verdict is `no declared blocker`, so tasks with exit evidence are skipped; it is null when every task has exit evidence or every other task is blocked, and `summary` says which, its every-task line reading `every task the view reads has exit evidence (<n> of <n>); <why>` while a task may go unread as above or admission refuses a `@milestone`, whose tasks the view then cannot list. The view is `{format: 'ia.delivery-view.v1', revision, plan, milestones, tasks, review, next, summary}`, milestones in the order their starts are emitted. `tests/next.test.ts` pins every refusal (from a `@task` seat with no admitted milestone too), the order (a cross-milestone requirement no milestone states, and a task a satisfied milestone releases ranked against tasks already ready), each verdict, refusal and inconclusive observations that are never exit evidence, stale evidence and each attribution, the later milestone's task blocked through its milestone and never recommended, an inherited requirement no admitted record answers and a target the task and its milestone both require listed once, a milestone-level cycle, skipped evidenced tasks, the all-evidenced, all-blocked and empty-plan summaries, review items (a supersede cycle, a superseded decision as no basis of intent, draft and superseded specs), a refused `@task` and a file a language error refuses, the band-100 rule, narrowed scopes (an out-of-scope requirement, task, observation, decision and owner-agent read as unknown, never met; plans and seats outside the scope neither counted nor read) that a view writes nothing, exit evidence at runtime placement (band 0) counted as authored evidence is (decision evidence-placement), a conditional grounding and requirement read at orient, at act and with no phase bound, against graph traversal for the same scope and coordinate; a severity term on a record that states no severity read as traversal reads it, conditional and blocking at every phase, and provenance terms the stating record decides; a row that holds read before a conditional one, and a conditional supersession refused at admission; an intent a conditional grounding cannot change read as it reads at every phase (accepted beside the conditional grounding of a decision with no choice, or of an accepted decision earlier by identity, and superseded through a supersedor whose acceptance a conditional grounding cannot change), and one it changes read as unknown; a conditional requirement no admitted record answers, and one whose answer a narrowed scope leaves out, read only where it holds; a milestone's unconditional requirement of a target read before the task's conditional one, and satisfied once the target is evidenced; and the Door through a token `scope` binds to a phase, over `tests/fixtures/delivery/` laid over the conformance corpus, which carries no work records (A6); tools/compliance runs one boundary fixture per code, once through `deliveryView` and once through the Door. The Door's `next` operation serves the view and its refusals unchanged (R12 version 2 refinement, next), the MCP door as `ia_next`, and the CLI as the consumer verb `ia next` (apps/cli/SPEC.md); `ia position`, which `next` and two refusals name, is a CLI verb too.
98
+
99
+ R19. Position packet (2026-10-08, position-and-projection §4 and items 11 and 12; plan amendments B1 to B5 and B8; decisions cli-commands-as-operations and identity-namespace): `src/packet.ts`, exported from the package root and the `./internal/packet` subpath, publishes `renderPacket(handle, within, catalog)` and `entryCount(packet)` with the `PositionPacket`, `PacketCatalogRow`, `PacketSeat`, `PacketParticipant`, `PacketMandate`, `PacketSystem`, `PacketTally`, `PacketIntent`, `PacketPhase`, `PacketProvenance`, `PacketHostNote` and `PacketOutput` types; the root's `Packet` stays R03's context packet, so the position packet's type is `PositionPacket`. The packet is the one host-neutral thing a host adapter renders (design §4: an adapter may change file names, file count and markup, never content, ordering or numbers). `renderPacket` calls `position(handle, within)` (R16) once, at K0, and reads everything else through the same scope token: the snapshot and its D02a membership rows, directed views (db D09), the declared roots (db D02c) and the registered words (db D09a). A missing token is IA-RUNTIME-REQUEST-INVALID, an unknown, stale or closed one keeps its database code, and every other refusal is position's: the packet renders the records admission admitted and gates none of them (design §4, LS-30), so an admitted mandate that `mandateAuthorityOf` would refuse, one declaring `moves []` or naming its participant or a scope with a fragment reference, renders as authored. It returns the frozen `{packet, digest, hostNote}`, never merged: `digest` is graph's codec `digest` of the packet, and the host note is position's note `{revision, capturedRevision?, previousRevision?, freshness, key}` with `installed: 'unknown (no join checked here)'` (design row 9; no installed-implementation catalog exists before milestone generation-binding), which carries no digest. The packet is `{format: 'ia.position-packet.v1', revision, body, seat, participants, mandates, systems, tallies, intents, phases, commands, lines, provenance}`. `revision` is the K0 body's and `body` position(K0)'s digest. `seat` is K0's seat, the repository's own `@workspace`: `{identity?, sources, systems, steward?, participants?}`, `identity` absent when no admitted `@workspace` is declared at the repository root (R14), `sources` its `composition.sources` entries as authored, `systems` N, `steward` its `composition.steward` reference, and `participants` the text `none (no authored @mandate names an @agent)` exactly when no participant is rendered. A reference the packet prints is the identity of the admitted record its typed field reference resolves to, or, when none does, the reference as authored (`@<word> <name>`). `mandates` (B3) are the entries of body(K0)'s `mandates` (R17) at band 100 whose `authority.participant` resolves to an admitted `@agent` at band 100, by identity, each `{identity, participant, moves?, scope, excludedWords?, covers?}`: `moves`, `excludedWords` and `covers` are its unconditional `authority.moves`, `authority.excluded-words` and `authority.covers` as authored, each present exactly when the record states the key (a declared `moves []` is `moves: []`; `moves` absent restricts no move), and `scope` its `authority.scope` references. `participants` are those agents, each once, by identity, as `{identity, says?}` with its `meaning.says`; `composition.steward` names no participant, and P = 0 is a packet, not a refusal (the `ia author agent` the kb task names arrives in milestone generation-binding). `systems` (B4) holds one pointer line per `composition.systems` reference of the seat, by identity: for an admitted record `{identity, words, band, steward?, reach}`, `words` the words its `discriminators` rows (`<word> lowers to <kind>`) register, sorted, `steward` its `head.steward` when that resolves, and `reach` `ia position --seat <identity>` (decision scope-verb-dispatch; a `@system` carries no source locator, so `ia read` gives only its head `describes`, not its words or steward); for a reference no admitted record answers `{identity: <the reference as authored>, words: 'unresolved', steward: 'unresolved'}`. `tallies` are `{word, count}` by word: the band-100 records whose capture membership root is one of the seat's own declared roots, R15's capture members of a workspace seat. A seat that declares no root has no tally, as body(K0)'s `sources` unknown says: its fallback closure is what a position may enter, not what the workspace captures. A fresh init's tallies so count what it authors under `.ia/src @authored` (workspace, agent and mandate, the installed base being band 90), and the conformance corpus, which declares no root, has none. `intents` are the five SHAPE_ROWS shapes in table order, `{shape, category, primitive, phase, kinds, lanes, predicates, priming, words}`: `phase` is the primitive's PRIMITIVE_ANCHORS phase, and `words` the registered words whose lowering has its kind in the shape's kinds or, over the kind and each of its facets, a graph `laneOf` lane in its lanes, as R15 seeds a record. The lowerings are read from the floor's two registrations and the admitted `@system` records' `discriminators` rows, the first by identity should two lower one word. `phases` are the four phases in cycle order, `{phase, primitives, changes}`: `primitives` are those PRIMITIVE_ANCHORS anchors at the phase, and `changes` the fixed line `--phase selects the playbook cell delivered and decides conditional relation rows (decision conditional-relations-in-delivery)`. `commands` are the `catalog` rows the caller passes, in its order, each copied as its five fields `{command, mode, move, refuses, next}` (B5). The CLI's catalog is the COMMANDS rows it tags, which `packetCatalog` in apps/cli builds for its caller to pass, since this package may not import that app (B2): apps/cli's `renderProjectionFor` passes it for `ia host`, `ia project`, `ia doctor` and the install, update and remove refresh, and `tools/projections/generate.ts` for this repository (task replace-renderers). LEGACY_OPERATIONS are no catalog rows. `lines` are design §4's three SPEC-owned lines with `ia scope` read as `ia position`, without markup and without their `source: <CLI SPEC>@<version>` suffix, which would put a CLI version in the packet. `provenance` is `{revision, slug?}`, `slug` the seat's name: decision identity-namespace keeps identities as they are and carries the repository slug only here. The packet names no absolute path, scope token, time, capture state or CLI version, and no record at runtime placement is part of it (R15). Two roots so give byte-equal packets and digests, and a capture moves only the host note. `entryCount(packet)` is B1's formula, which replaces the kb task's constant 28 + N: P participants + M mandates + 1 seat + N system lines + T tallies + 5 intent rows + 4 phase rows + C catalog rows + 1 provenance + 3 SPEC lines, the host note no entry. A fresh init (P = M = 1, T = 3) has 19 + C + N entries: B1's 26 + N with the CLI's seven catalog rows, `ia project` the seventh (task ia-project-verb), and 28 + N once milestone generation-binding adds `ia preview` and `ia author`. `tests/packet.test.ts` pins a golden packet in `tests/golden/` (revision and body digest masked and asserted apart; only `node packages/runtime/tests/golden/write.mjs` regenerates it) for the three records of plan T6 step 1 (`tests/fixtures/packet/workspace.ia`) over the conformance corpus adopted at band 90, with 37 entries under a seven-row catalog fixture. It also pins the formula on that fixture, on the conformance corpus and on this repository's own records, its terms counted from the admitted records (N from the seat's `composition.systems`, T from the words of the band-100 membership rows under the seat's own declared roots, P and M from the band-100 mandates scoped to the seat whose participant is a band-100 agent) rather than from the packet, and pins B1's counts under the seven-row fixture: 26 on the conformance corpus and 56 on this repository, which its committed `CLAUDE.md` renders too; no participant and no refusal on the conformance corpus and for a mandate whose participant is adopted; two participants named by three mandates, each agent once and both by identity, with a mandate's excluded words and covers; an admitted mandate declaring `moves []`, and one with fragment references, rendered with no refusal; an adopted mandate scoped to the seat left out; the tallies of a declared root narrower than the corpus, and none for a seat that declares no root; a narrowed scope token, which leaves out an @agent and a @system it does not admit (the system line `unresolved`, no participant or mandate, the steward as authored, no tally of the left-out word); a `@system` at runtime placement read as unresolved; a repository root no admitted `@workspace` is declared at, with no seat identity, system line, tally or slug; the frozen output, its intent rows copies of the kernel's; byte-equal packets and digests at two roots, naming neither root nor token; `body` equal to position(K0)'s digest; a capture moving the host note and neither the packet nor its digest; an unresolved `composition.systems` reference and system lines authored out of identity order; and the intent and phase tables, a word with an authority facet seeded under governance by its lane. apps/cli pins its catalog rows, each command's mode and move, a one-line refusal and one next command of COMMANDS.
100
+
101
+ R20. Host adapters (2026-10-09, position-and-projection §4, the host adapter contract, and items 11, 12 and 14; plan amendments B9, B10 and B12; decision packet-tracking-policy): `src/packet-host.ts`, exported from the package root and the `./internal/packet-host` subpath, publishes `renderHost(host, packet, digest, hostNote, target)` and `PACKET_MARKER` with the `PacketHost` (`claude` or `codex`), `PacketTarget` (`repository` or `consumer`), `HostFile`, `PacketReceipt` and `HostOutput` types. It renders one R19 packet, with the digest and host note `renderPacket` returned beside it, as the host's files and returns the frozen `HostOutput` `{files, receipt}`, each file `{path, text}` with a workspace-relative path. It is a pure function of its arguments and the package's own version, which it reads from its manifest: it reads no workspace and writes, deletes and plans no file, which the caller that applies does: apps/cli's `applyHostProjection` for a consumer workspace and `tools/projections/generate.ts` for this repository (milestone position-packet task replace-renderers). An unknown host or target, or a `digest` that is not graph's codec digest of `packet`, is IA-RUNTIME-REQUEST-INVALID. No host is rendered an agent file (design §4: the system stewards are pointer lines, never agent definitions). The files by host and target: claude `consumer` `.claude/rules/ia-workspace.md` and `.claude/skills/ia-authoring/SKILL.md`; claude `repository` `CLAUDE.md`, `.claude/skills/ia-authoring/SKILL.md` and `.agents/skills/ia-authoring/SKILL.md`, the files this repository commits, which since task replace-renderers hold no steward agent; codex `AGENTS.md` and `.agents/skills/ia-authoring/SKILL.md` in either target, the `repository` entry file without the host note. Every file carries `PACKET_MARKER`, `<!-- Generated by ia project; edit the cited native records. -->` (B9): first in the entry file, and in each `SKILL.md` after its YAML frontmatter and a blank line. The one generic `ia-authoring` skill per host stays (B10; design §4 renders no skill per system or playbook), its text chosen by target, not host, byte for byte as compliance's 1.x renderers wrote it but for the marker line: the `repository` skill is renderHostArtifacts' and the `consumer` skill renderWorkspaceProjection's, its `Source revision` the packet's revision (both renderers were retired by task replace-renderers, compliance SPEC C22–C24). The entry file is the marker; then the packet's sections under the title `# IA position packet: <provenance slug>` (`# IA position packet` when the packet has no slug), in the packet's field order: the seat line, the participants, the mandates, the system pointer lines, the captured-record tallies, the intent table, the phase table, the command catalog and the SPEC lines, each an `## ` heading over its entries, one entry per list item or table body row, a section with no entry left out with its heading; then one provenance line `ia-generated <revision> <packet digest> <adapter>`, `<adapter>` being `ia-claude` or `ia-codex`, followed by `@<the package version>` in the `consumer` target only, so this repository's committed `CLAUDE.md` does not move when a release bumps the version; then, in the `consumer` target only, the section `## Host note (not part of the packet)` with the note's freshness, installed state and key, the key as `ia position` prints it (a location seat `''` as `.`). The entry file so renders exactly `entryCount(packet)` entries, the provenance line among them and the host note none. The rendering is markup only (design §4: an adapter changes file names, file count and markup, never content, ordering or numbers): every section value is printed in the packet's field order, except that the title prints the provenance slug, and `format`, `revision` and `body` are not printed apart, since the provenance line's revision and packet digest cover them and the receipt carries `body` as `bodyDigest`; identities, references, sources, covers paths and commands are code spans, each fenced past the backticks it holds; each bare IA word token in free text (an `@` and a word as the language spells one, `[a-z][a-z0-9-]*`, with no letter, digit, `_`, `.`, `-`, `/`, `@` or backtick before it and no word character, `-`, `/`, `@` or backtick after it, so neither an address, a scoped package such as `@inventarch/db` nor a token touching a backtick, which no fence could wrap without joining that run, and outside every authored code span, found as CommonMark finds one: a whole backtick run, its text and the next run of the same length) is a code span too, its fence one backtick or, when the value holds a backtick run no span closes, longer than every such run, and the authored span is kept as written whatever tokens it holds, so neither the committed `CLAUDE.md` nor a consumer file renders `@workspace` or `@plan` as a GitHub mention unless the author wrote it touching a backtick, the packet's values and entries unchanged; a line break in a value is printed as one space, so an entry stays one line; line folding scans in linear time even when long space/tab runs have no following line break, retaining all other bytes and the existing whitespace boundaries; a pipe in a table cell is escaped; an empty list prints `none`; and a seat without an identity prints `workspace undeclared`. The sections are byte-identical for both hosts and both targets: in one target the claude and codex entry files differ only in the adapter the provenance line names. The receipt (B12) is `{format: 'ia.packet-receipt.v1', host, cli, adapter, revision, slug, packetDigest, bodyDigest, entries, files, removed, foreign, guard, hostNote, participants, mandates, writtenAt}`: `adapter` the adapter id with the package version in either target, `revision` the packet's, `slug` the packet's provenance slug or null when it has none (decision identity-namespace keeps the repository slug in provenance and receipts), `packetDigest` the digest passed, `bodyDigest` the packet's `body`, `entries` entryCount(packet), `files` each rendered file as `{path, sha256}` in render order with the SHA-256 of its UTF-8 text, `hostNote` a copy of the note, and `participants` and `mandates` the packet's identities (design item 14). renderHost leaves `removed` and `foreign` empty, `guard` `none`, and `cli` and `writtenAt` null: the caller that applies the files sets them to the owned legacy files it deleted (each `{path, sha256}`), the files it left in place as foreign, `retired` when it retired a steward-guard registration first, its own id@version (design item 12: only the applying CLI knows it) and the time it wrote, and writes the receipt beside the projection state (apps/cli `applyHostProjection`, task replace-renderers). The receipt carries no source digests and no consumer id@version per command invoked, which design item 12 also names. `tests/packet-host.test.ts` pins both hosts and both targets on R19's fresh-init fixture packet and on this repository's own records: the file paths, none under `.claude/agents`; the title naming the slug; the marker first in each entry file and after each skill's frontmatter and a blank line; `entryCount(packet)` rendered entries with the sections in the packet's field order; byte-equal sections across hosts and targets; and each receipt's file digests. It also pins the repository skills equal to this repository's committed files, which `pnpm projections:generate` renders with this adapter and runtime:test hashes as inputs (tools/testing's `host-adapters` input profile); this repository's one participant and one mandate entry; on a fresh init, the consumer skill's text, the adapter version and the host note in the consumer target alone, and the receipt's adapter version in both; a hand-built packet rendered to exact text, with an unresolved system line, a multi-line non-ASCII `says`, a backtick in a path and a pipe in a catalog row, and one with no participant, seat identity, system line, tally or command; the host note's key with an identity seat and a word and with two location seats, the root printed `.`, and a code span a backtick starts or ends padded inside its fence; frozen output, byte-equal at two fresh-init roots and naming neither, the caller's note left unfrozen; each bare IA word token in a participant's `says`, a catalog row's refusal and a SPEC line rendered as a code span in every host and target, an address, a scoped package and a token already in an authored code span, opening it, after a space or a `[` inside it or beside another token in a double-backtick span, left as they are with the span, a token after a backtick no run closes fenced past it, and one touching such a backtick left as authored, no bare token left in the seat line of a packet without a participant or in this repository's packet, the entry count and the packet unchanged, and the receipt's slug null for a packet without one; and the three refusals.
package/dist/context.d.ts CHANGED
@@ -1,5 +1,14 @@
1
1
  import type { ReadHandle } from '@inventarch/db';
2
- import type { Budget, ContextOptions, ContextRequest, ContextResult, Tokenizer } from './types.js';
2
+ import type { Budget, ContextOptions, ContextRequest, ContextResult, Entry, Packet, Tokenizer } from './types.js';
3
3
  export declare const DEFAULT_TOKENIZER: Tokenizer;
4
4
  export declare function context(handle: ReadHandle, request: ContextRequest, budget: Budget, options?: ContextOptions): ContextResult;
5
+ /**
6
+ * The envelope estimate of a packet as it is answered: its JSON bytes with `limits.envelopeBytes` 0 and without
7
+ * delivered text and purpose bytes, which are already accounted for in tokensUsed. It includes citations, scope and
8
+ * omissions. The Door's version 1 `context` answers the packet in 1.1.0's shape and estimates that shape (R12).
9
+ */
10
+ export declare function envelopeBytes<P extends {
11
+ readonly included: readonly Entry[];
12
+ readonly limits: Packet['limits'];
13
+ }>(packet: P): number;
5
14
  //# sourceMappingURL=context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAIjD,OAAO,KAAK,EACV,MAAM,EACN,cAAc,EACd,cAAc,EACd,aAAa,EAIb,SAAS,EACV,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,iBAAiB,EAAE,SAG9B,CAAC;AACH,wBAAgB,OAAO,CACrB,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,cAAc,EACvB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,cAAmB,GAC3B,aAAa,CAwIf"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAIjD,OAAO,KAAK,EACV,MAAM,EACN,cAAc,EACd,cAAc,EACd,aAAa,EACb,KAAK,EAEL,MAAM,EACN,SAAS,EACV,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,iBAAiB,EAAE,SAG9B,CAAC;AACH,wBAAgB,OAAO,CACrB,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,cAAc,EACvB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,cAAmB,GAC3B,aAAa,CA8Hf;AACD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS;IAAE,QAAQ,CAAC,QAAQ,EAAE,SAAS,KAAK,EAAE,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAA;CAAE,EAChH,MAAM,EAAE,CAAC,GACR,MAAM,CAaR"}
package/dist/context.js CHANGED
@@ -109,16 +109,25 @@ export function context(handle, request, budget, options = {}) {
109
109
  dangling: walk.dangling,
110
110
  limits: { ...budget, tokensUsed, recordsUsed: identities.size, estimator: tokenizer.name, envelopeBytes: 0 },
111
111
  };
112
- // The envelope estimate excludes delivered text and purpose bytes, which are
113
- // already accounted for in tokensUsed. It includes citations, scope and omissions.
114
- const envelopeBytes = Buffer.byteLength(JSON.stringify({
112
+ return freeze({
113
+ ok: true,
114
+ packet: { ...packet, limits: { ...packet.limits, envelopeBytes: envelopeBytes(packet) } },
115
+ });
116
+ }
117
+ /**
118
+ * The envelope estimate of a packet as it is answered: its JSON bytes with `limits.envelopeBytes` 0 and without
119
+ * delivered text and purpose bytes, which are already accounted for in tokensUsed. It includes citations, scope and
120
+ * omissions. The Door's version 1 `context` answers the packet in 1.1.0's shape and estimates that shape (R12).
121
+ */
122
+ export function envelopeBytes(packet) {
123
+ return Buffer.byteLength(JSON.stringify({
115
124
  ...packet,
116
- included: included.map((entry) => ({
125
+ included: packet.included.map((entry) => ({
117
126
  ...entry,
118
127
  text: '',
119
128
  ...(entry.purpose === undefined ? {} : { purpose: '' }),
120
129
  })),
130
+ limits: { ...packet.limits, envelopeBytes: 0 },
121
131
  }), 'utf8');
122
- return freeze({ ok: true, packet: { ...packet, limits: { ...packet.limits, envelopeBytes } } });
123
132
  }
124
133
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAYpC,MAAM,CAAC,MAAM,iBAAiB,GAAc,MAAM,CAAC,MAAM,CAAC;IACxD,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;CACxE,CAAC,CAAC;AACH,MAAM,UAAU,OAAO,CACrB,MAAkB,EAClB,OAAuB,EACvB,MAAc,EACd,UAA0B,EAAE;IAE5B,IACE,MAAM,KAAK,IAAI;QACf,OAAO,MAAM,KAAK,QAAQ;QAC1B,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC;QACpC,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC;QACrC,MAAM,CAAC,MAAM,GAAG,CAAC;QACjB,MAAM,CAAC,OAAO,GAAG,CAAC;QAElB,MAAM,IAAI,YAAY,CAAC,2BAA2B,EAAE,6DAA6D,CAAC,CAAC;IACrH,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACjD,IAAI,IAAI,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;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CAAC;QACZ,EAAE,EAAE,IAAI;QACR,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,EAAE;KAC1F,CAAC,CAAC;AACL,CAAC;AACD;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,MAAS;IAET,OAAO,MAAM,CAAC,UAAU,CACtB,IAAI,CAAC,SAAS,CAAC;QACb,GAAG,MAAM;QACT,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACxC,GAAG,KAAK;YACR,IAAI,EAAE,EAAE;YACR,GAAG,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;SACxD,CAAC,CAAC;QACH,MAAM,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,EAAE;KAC/C,CAAC,EACF,MAAM,CACP,CAAC;AACJ,CAAC"}
@@ -1,6 +1,6 @@
1
- import type { ConditionAxis, Kind, Lane, Predicate } from '@inventarch/language';
1
+ import type { ConditionAxis, Kind, Lane, Phase, Predicate } from '@inventarch/language';
2
2
  import type { Coordinate } from '@inventarch/graph';
3
- import type { Classifier } from './classify.js';
3
+ import type { Classifier, Shape } from './classify.js';
4
4
  export type AxisSource = 'declared' | 'profile' | 'derived' | 'absent';
5
5
  /** Host-schema metadata from the native domains, not another vocabulary table. */
6
6
  export declare const COORDINATE_DOMAINS: Readonly<Record<ConditionAxis, readonly string[]>>;
@@ -18,4 +18,11 @@ export interface PreparedCoordinate {
18
18
  };
19
19
  }
20
20
  export declare function prepareCoordinate(text: string, input: Readonly<Record<string, unknown>>, options?: CoordinateOptions): PreparedCoordinate;
21
+ /**
22
+ * R14: the coordinate of a scope key. The key declares shape and phase; category and primitive are derived from the
23
+ * shape's native row, the primitive as SHAPE_ROWS[shape].primitive, so a key is never coordinate-incomplete. Only this
24
+ * path derives a primitive: prepareCoordinate, which the version 1 `context` and `select` requests use, still refuses
25
+ * to supply one (R01).
26
+ */
27
+ export declare function scopeCoordinate(shape: Shape, phase: Phase): PreparedCoordinate;
21
28
  //# sourceMappingURL=coordinate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"coordinate.d.ts","sourceRoot":"","sources":["../src/coordinate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAS,MAAM,eAAe,CAAC;AAGvD,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AACvE,kFAAkF;AAClF,eAAO,MAAM,kBAAkB,oDAK9B,CAAC;AACF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;CAClC;AACD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC;IAC9D,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;QAChC,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;QAChC,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;KAC3C,CAAC;CACH;AACD,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ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CpB;AACD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,GAAG,kBAAkB,CAO9E"}
@@ -37,4 +37,18 @@ export function prepareCoordinate(text, input, options = {}) {
37
37
  }),
38
38
  });
39
39
  }
40
+ /**
41
+ * R14: the coordinate of a scope key. The key declares shape and phase; category and primitive are derived from the
42
+ * shape's native row, the primitive as SHAPE_ROWS[shape].primitive, so a key is never coordinate-incomplete. Only this
43
+ * path derives a primitive: prepareCoordinate, which the version 1 `context` and `select` requests use, still refuses
44
+ * to supply one (R01).
45
+ */
46
+ export function scopeCoordinate(shape, phase) {
47
+ const prepared = prepareCoordinate('', { shape, phase });
48
+ return Object.freeze({
49
+ values: Object.freeze({ ...prepared.values, primitive: SHAPE_ROWS[shape].primitive }),
50
+ sources: Object.freeze({ ...prepared.sources, primitive: 'derived' }),
51
+ focus: prepared.focus,
52
+ });
53
+ }
40
54
  //# sourceMappingURL=coordinate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"coordinate.js","sourceRoot":"","sources":["../src/coordinate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE7E,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,kFAAkF;AAClF,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAC7C,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,SAAS,CAAC,IAAI,CAAE,CAAC,CAAC,CAAC,CAAC,CAG5F,CACF,CAAC;AAcF,MAAM,UA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,KAAK,CAAC,CAAC,SAAS,EAAE,CAAC;QACrF,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,QAAQ,CAAC,OAAO,EAAE,SAAS,EAAE,SAAkB,EAAE,CAAC;QAC9E,KAAK,EAAE,QAAQ,CAAC,KAAK;KACtB,CAAC,CAAC;AACL,CAAC"}
package/dist/door.d.ts CHANGED
@@ -3,7 +3,24 @@ import type { Refusal } from './types.js';
3
3
  export interface DoorOptions extends OpenOptions {
4
4
  readonly boundary?: Omit<ScopeRequest, 'within'>;
5
5
  readonly allowReport?: boolean;
6
+ /**
7
+ * The reader `read` hands the canonical workspace-relative path of a document to (`ReadBodyOptions.read`); by
8
+ * default db `readWorkspaceBytes` over the door's root, bounded as the CLI's workspace file reader is.
9
+ */
10
+ readonly read?: (path: string) => Uint8Array;
11
+ /**
12
+ * The MACHINE_PROTOCOL version the door serves, by default the table's: an operation a later version adds (its row's
13
+ * `since`) is refused as an unknown operation, and that refusal names only the operations served, so a door serving
14
+ * version 1, as the CLI's machine routes do (plan amendment A2), refuses `read`, `next` and `position` with the bytes
15
+ * 1.1.0's door did.
16
+ */
17
+ readonly protocol?: number;
6
18
  }
19
+ /**
20
+ * A version 1 operation's refusal keeps its 1.1.0 shape. A later version's operation answers with the refusal its
21
+ * runtime function returns, which may carry more: `read` the `ReadRefusal` fields, `next` the `NextRefusal`'s `next`
22
+ * command, `plans` and `cycle`, and `position` a key's `next` command (R12).
23
+ */
7
24
  export type DoorResponse = {
8
25
  readonly ok: true;
9
26
  readonly result: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"door.d.ts","sourceRoot":"","sources":["../src/door.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAU,WAAW,EAAsB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAK5F,OAAO,KAAK,EAA0B,OAAO,EAAE,MAAM,YAAY,CAAC;AAElE,MAAM,WAAW,WAAY,SAAQ,WAAW;IAC9C,QAAQ,CAAC,QAAQ,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