@inventarch/cli 3.6.0 → 3.8.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 (85) hide show
  1. package/README.md +5 -2
  2. package/SPEC.md +10 -6
  3. package/assets/base/08eaab3e1a6215d78283b82a94a0228367ac7bd78d0a746c56db79c8d7546c3a.ia.tgz +0 -0
  4. package/assets/base/3ada760ec07848770957538a8562ec94c6f3a9ceb6f1e29d2739b217f9234728.ia.tgz +0 -0
  5. package/assets/base/62ecd5092f364b40e335e9e509ef512ac8030eb5689e72a5d0ff1e073cb13cfb.ia.tgz +0 -0
  6. package/assets/base/7db20e0dbbc2b88701ea24991886b4a8e08d419dda469cce5caff66911f81e4c.ia.tgz +0 -0
  7. package/assets/base/df626d1dc4949649ba7203842b29b4f064e0552e8db8c2c41ff74b6462b81b75.ia.tgz +0 -0
  8. package/assets/base/ee6e65018df2ebef705913d9da1947f040edf44c2e7ade6c9750c6fa0185985e.ia.tgz +0 -0
  9. package/assets/base.json +3 -3
  10. package/assets/bases.json +44 -0
  11. package/assets/host/a6774998d18a78fc4d0d2d261db93aa76b25cc97e324823a7883597a94ccb91c.tgz +0 -0
  12. package/assets/host.json +4 -4
  13. package/assets/language-compat.json +1 -0
  14. package/assets/vocabulary.json +3 -3
  15. package/dist/bundled-base.d.ts +13 -0
  16. package/dist/bundled-base.d.ts.map +1 -1
  17. package/dist/bundled-base.js +68 -19
  18. package/dist/bundled-base.js.map +1 -1
  19. package/dist/commands.d.ts.map +1 -1
  20. package/dist/commands.js +14 -1
  21. package/dist/commands.js.map +1 -1
  22. package/dist/console/batch-next.d.ts +2 -0
  23. package/dist/console/batch-next.d.ts.map +1 -1
  24. package/dist/console/batch-next.js +1 -1
  25. package/dist/console/batch-next.js.map +1 -1
  26. package/dist/console/batch-run.d.ts.map +1 -1
  27. package/dist/console/batch-run.js +3 -4
  28. package/dist/console/batch-run.js.map +1 -1
  29. package/dist/console/batch-screen.d.ts +1 -1
  30. package/dist/console/batch-screen.d.ts.map +1 -1
  31. package/dist/console/batch-screen.js +7 -4
  32. package/dist/console/batch-screen.js.map +1 -1
  33. package/dist/consumer.d.ts.map +1 -1
  34. package/dist/consumer.js +2 -0
  35. package/dist/consumer.js.map +1 -1
  36. package/dist/distribute.d.ts +5 -0
  37. package/dist/distribute.d.ts.map +1 -1
  38. package/dist/distribute.js +267 -56
  39. package/dist/distribute.js.map +1 -1
  40. package/dist/floor.d.ts +49 -0
  41. package/dist/floor.d.ts.map +1 -0
  42. package/dist/floor.js +315 -0
  43. package/dist/floor.js.map +1 -0
  44. package/dist/format.d.ts.map +1 -1
  45. package/dist/format.js +10 -3
  46. package/dist/format.js.map +1 -1
  47. package/dist/init.d.ts +1 -1
  48. package/dist/init.d.ts.map +1 -1
  49. package/dist/init.js +8 -6
  50. package/dist/init.js.map +1 -1
  51. package/dist/main.d.ts +3 -2
  52. package/dist/main.d.ts.map +1 -1
  53. package/dist/main.js +9 -3
  54. package/dist/main.js.map +1 -1
  55. package/dist/pack.d.ts +8 -0
  56. package/dist/pack.d.ts.map +1 -1
  57. package/dist/pack.js +20 -5
  58. package/dist/pack.js.map +1 -1
  59. package/dist/package-manager.d.ts +3 -1
  60. package/dist/package-manager.d.ts.map +1 -1
  61. package/dist/package-manager.js +8 -2
  62. package/dist/package-manager.js.map +1 -1
  63. package/dist/position.d.ts.map +1 -1
  64. package/dist/position.js +11 -1
  65. package/dist/position.js.map +1 -1
  66. package/dist/preview.d.ts.map +1 -1
  67. package/dist/preview.js +9 -8
  68. package/dist/preview.js.map +1 -1
  69. package/dist/record-sources.d.ts +13 -0
  70. package/dist/record-sources.d.ts.map +1 -0
  71. package/dist/record-sources.js +44 -0
  72. package/dist/record-sources.js.map +1 -0
  73. package/dist/tracked.d.ts.map +1 -1
  74. package/dist/tracked.js +3 -8
  75. package/dist/tracked.js.map +1 -1
  76. package/dist/validate.d.ts +3 -1
  77. package/dist/validate.d.ts.map +1 -1
  78. package/dist/validate.js +44 -1
  79. package/dist/validate.js.map +1 -1
  80. package/dist/workspace-state.d.ts +4 -2
  81. package/dist/workspace-state.d.ts.map +1 -1
  82. package/dist/workspace-state.js +6 -3
  83. package/dist/workspace-state.js.map +1 -1
  84. package/package.json +7 -7
  85. package/assets/host/44dc1fa77e0235df35e1dd05d5a5ce8c2b19d4545caf0b8579f2f4e1b9efbbc6.tgz +0 -0
package/README.md CHANGED
@@ -104,7 +104,7 @@ ia inspect work-system/definition/task/review-schema
104
104
  ia vocabulary decision --schema
105
105
  ```
106
106
 
107
- `ia position` prints the key it used, whether the capture is current, the body's digest, the loaded records, pointers, rules and playbooks that apply, mandates, frontier and unknowns, and ends with two `ia position` commands that widen the view. `--word` narrows the loaded records and pointers to one word but never hides a blocking rule or a mandate. A shape, phase, depth or budget outside its set or cap exits 2 and names the same call with the set or cap. With `--json` it prints `{version, ok, body, digest, hostNote}`.
107
+ `ia position` prints the key it used, whether the capture is current, the body's digest, the loaded records, pointers, blocking rules (a rule whose activation waits on an unbound axis says `applies only when`, and rules the coordinate contradicts are listed under `Rules left out by activation`), rules and playbooks that apply, mandates, frontier and unknowns, and ends with two `ia position` commands that widen the view. `--word` narrows the loaded records and pointers to one word but never hides a blocking rule or a mandate. A shape, phase, depth or budget outside its set or cap exits 2 and names the same call with the set or cap. With `--json` it prints `{version, ok, body, digest, hostNote}`.
108
108
 
109
109
  `ia next` computes each verdict from declared prerequisites and exit evidence: a success `@observation` on the task at its current digest. It prints `work.status` as self-declared and never uses it as the basis. In a workspace with no `@plan`, it names `ia preview plan`. The view ends with the `ia position` command for the next unblocked task.
110
110
 
@@ -171,12 +171,15 @@ The example with `--compare` prints `Round trip: content-exact and a fixed point
171
171
  | `ia adopt <id>[@version]` | Plans a source-only workspace adoption: pinned source mounted at band 50, then a capture and a refresh of registered projections. `ia init --adopt` adopts at initialization. |
172
172
  | `ia update <id>` | Plans a version change for one direct request, `--to <range>`. |
173
173
  | `ia remove <id>` | Plans the removal of one direct request. |
174
- | `ia restore --apply` | Reinstalls the locked generation from its pinned archives. |
174
+ | `ia restore --apply` | Reinstalls the locked generation from its pinned archives. Any published language base the CLI carries restores exactly, and restore never rewrites the lock; a base it cannot reach refuses and names `ia update inventarch/language`. |
175
+ | `ia floor [--verify] [--json]` | Reports the minimum `inventarch/language` base the workspace's records need, the feature that sets it, and whether the declared range is `ok`, `range-too-high`, `range-too-low` or `no-floor`. `--verify` proves it by validating on each carried base. Exit 1 for `range-too-low`, `no-floor` or a verified error. |
175
176
  | `ia recover [installation\|host\|guard\|lifecycle] --root <directory>` | Finishes or rolls back an interrupted installation or host transaction. |
176
177
 
177
178
  ```sh
178
179
  ia restore --apply --yes
179
180
  ia update inventarch/language --offline
181
+ ia update inventarch/language --apply --yes # works on a fresh clone; moves to a carried base only when the records allow
182
+ ia floor --verify
180
183
  ia init my-lib --system --host none --apply --yes
181
184
  ia pack --root my-lib --descriptor .ia/release.json
182
185
  ia recover --root .
package/SPEC.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @inventarch/cli
2
2
 
3
+ Shared authored-root ownership (issue #194): preview and author accept a target only when the repository workspace declares the most-specific containing root at authored placement. When several workspaces declare that identical root, identity ordering does not change ownership. A containing ancestor cannot override a more-specific foreign or adopted root. Default targets and edits to existing records obey the same rule. This ownership check does not change seat resolution or mandate selection, which follow db D02b and runtime R21: at a shared root a mandate governs only when its scope names every declarer, so a restriction scoped to the repository's workspace alone does not reach a shared target. Actor eligibility, digest checks and administrative guards still apply. `tests/preview.test.ts` exercises the shared-root boundary and that mandate rule.
4
+
5
+ Root containment and co-declaration use the exact canonical spelling admitted by native membership, including letter case on every platform. A case-insensitive filesystem does not turn a differently spelled root declaration into shared ownership. Filesystem alias guards and the floor exclusion remain separate protections.
6
+
3
7
  `tests/validate-checks.test.ts` verifies that a refused validation profile cannot replace a writable current-revision evidence receipt or prune an older receipt. A participant authorized for Verification subsequently validates the identical source revision and performs both writes, establishing that refusal, rather than an inactive writer or broken fixture, preserved the earlier tree.
4
8
 
5
9
  Suggested commands omit roots containing shell syntax and use `.` with an explicit workspace-directory instruction. Inert Windows roots use forward slashes so Git Bash, PowerShell and cmd address the same directory. Directory instructions accompany only an actual replacement with `.`; separator normalization alone keeps a relative command in its original directory, even when a resolved root alias contains shell syntax. Unknown-command advice parses a supported nearest command before preserving its arguments, otherwise it names that command's help without reading the filesystem. Generic interruption advice rebuilds parsed option values and the init positional target, covering equals options and options placed before a target. A value matching a declared option token retains equals spelling, including short aliases and help flags; normalization retains `./` for an init target beginning with a dash. `tests/refusal-next.test.ts` reparses and reruns printed advice to verify the value and target survive. For a fresh absent init target whose path is omitted, preview first instructs the operator to create and enter that target without pasting the active path into a shell, then run the printed apply command; preview itself creates nothing.
@@ -24,16 +28,16 @@ Owner migrations and grants are explicit source changes followed by `ia validate
24
28
 
25
29
  | Command | Behavior |
26
30
  | --- | --- |
27
- | `init [directory]` | Preview a workspace, or create it with `--apply`; `--host none` omits host registration and `--id <provider/name>` sets the package id (default `local/<directory name>`). `--from <plugin-directory>` lowers a Claude, Codex or Grok plugin into the new workspace as a kit, in place of `--system` (see [Host plugins](#host-plugins)). `--decline today` or `--decline forever` records that a repository should not be initialized, and `--forget-decline` removes that record. The target is positional, so `--root` is refused. The default starter (2026-10-09) is three records at placement authored (band 100) in `.ia/src/workspace.ia`, each with only the fields its schema declares: `@workspace <name>` (`composition.systems` naming every system the bundled base installs, `composition.sources [".ia/src @authored"]`, `composition.steward @agent <name>`), its participant `@agent <name>` ("The IDE agent operating in the <name> workspace, any vendor.", `governance.applies []`) and `@mandate <name>-mandate` (`governance.requires "Claim no host permission or execution from this mandate."`, `authority.participant @agent <name>`, `authority.moves [Observation, Verification, Synthesis, Delegation, Execution]`, `authority.scope [@workspace <name>]`). The record names are the workspace's; the package id's provider never prefixes them. With `--from` the starter is these three records plus the lowered kit: its `@system` and steward, its records, its resources and its assets, so it is no longer three records alone (see [Host plugins](#host-plugins)). `.ia/.gitignore` holding `work/` and `distributions/` is written only where none exists; an existing one is left as it is and reported, never a conflict. No local `@system` and no `@distribution` are written, so the release descriptor names no `distribution`. `--system`, for a repository that will own vocabulary, also writes `.ia/src/systems/<name>/system.ia` (the 1.x `@system <name>`, requiring `agent-system`, `work-system` and `workspace-system`, and its `@agent <name>-steward`) and `.ia/src/systems/<name>/records/distribution.ia` (`@distribution <name>-distribution` with `distribution.records [@system <name>]`), and the descriptor names that distribution, read from the compiled graph, so `pack` releases the system folder; its `@workspace` composes the local system after the base's (2026-10-09), so `composition.systems` ends with `@system <name>` and the position packet renders a pointer line for it. The apply runs install, author (create-only: a starter file already present with the same bytes is skipped), admission (zero error findings, and each starter record compiled at its path), descriptor (the completion point), then two effects reported apart: capture, the `capture` verb's own write of `.ia/work/snapshot/current.json` through the database, and, only with `--host`, project, the `host <host> --apply` path, whose projection `applyHostProjection` writes. An interruption before the descriptor names the rerun of `init`, which skips completed steps. Past the descriptor an effect that fails or is interrupted leaves every earlier result in place and says so, opening its next action with the sentence saying the workspace is initialized: a capture that fails is refused as `capture` refuses it, with its code, location and repair, then `capture --root <root>`, and without `--host` an interruption there names `capture --root <root>`. With `--host` the project effect runs after a capture that failed too, because the packet reads the live revision rather than the capture, and that capture refusal then says the projection is written; an interruption before the capture, or a host step that refuses, names `host <host> --root <root> --apply` (or `ia host`'s own remedy, rooted), saying whether the capture was taken. With `--json` the plan lists the steps `install`, `author`, `admission`, `descriptor`, `capture` and, with `--host`, `project`, and the starter's `system`, `paths`, `records` (each as `@<word> <name>`) and `ignore` (`{path, status}`, `create` or `present`); `applied` adds `distribution` (null without `--system`), `authored` (the starter records' identities in file order: three, six with `--system`, or three plus the lowered kit's with `--from`), `ignore` (`written` or `present`) and `effects`, `{capture: {revision, records}, project: {host, files, receipt} | 'skipped'}`, where `files` are the receipt's files with their SHA-256 and `receipt` is its path. The human report says the same: the records authored, the ignore file, the capture's records and revision, and the projected files and receipt or that project was skipped. `--migrate` (2026-10-09) rewrites a workspace a 1.1.0 `init` wrote (1.0 and 1.1 write the same starter) into this starter, keeping its descriptor's id. It takes `--system`, `--apply`, `--json` and `--yes`; `--id`, `--host` and the decline options with it are usage (exit 2). A 1.1.0 starter is one folder in `.ia/src/systems/`, its local system `<name>`, holding only `system.ia`, with exactly `@system <name>`, which registers no word, and `@agent <name>-steward`, and `records/*.ia`, of which `records/workspace.ia` holds exactly `@workspace <name>` and `@distribution <name>-distribution`, the distribution `.ia/release.json` names. The three records use fields only the base this CLI bundles declares (`composition.sources`, `composition.steward` and the `@mandate`'s `authority`), so a workspace whose installed `inventarch/language` is another archive has it replaced, which needs a lock holding that one base alone. Plan and apply run one preflight before anything is written: any other shape, a nested folder or another file or record included, and a base to replace in a lock that holds anything else, is refused as `IA-CLI-CONFLICT` (exit 3) naming `init --help`; a workspace that does not admit is refused as `IA-CLI-CONFLICT` naming `validate --root <root>`; with a host's projection state present, a pending host journal is refused with the journal's code, located at it, naming its recovery, `ia recover host`, `guard` or `lifecycle` with `--root <root>`, then the rerun; and each destination that already exists (`.ia/src/workspace.ia`, or `.ia/src/<file>.ia` for a moved file), each record the workspace keeps that holds the word and name of a starter record the migration authors anew (`@agent <name>` or `@mandate <name>-mandate`, which would tie with it), located at that record's file, and each host whose projection state exists and whose guard retirement or file plan the planners refuse, such as a file without a marker at a target path, is a conflict, as are edited starter or distribution text and a kept record that refers to a local identity the migration deletes (see [Migration recovery and portability](#migration-recovery-and-portability)). The plan lists the conflicts, the base install, every move, write and delete, the empty folders included, and each registered host's guard retirement and file actions, planned for the migrated records: every rendered file carries the workspace revision, which the migration changes, so none is `unchanged`. It is exit 0. `--apply` refuses a plan with conflicts and writes nothing: a destination or record collision as `IA-CLI-CONFLICT` naming `init <directory> --migrate`, whose plan lists each one; a projection conflict alone keeps the planner's code, located at its file, and names `host <host> --root <root>`, whose plan names each file it refuses. The apply first installs the bundled base where the plan says so, offline and as `init` installs it, while the records are still the 1.1.0 starter's, which the installer admits against it before activating it; an interruption there names the rerun of the migration, which installs the base again only if the bundled one is still not installed. It then moves every other `records/<file>.ia` byte for byte to `.ia/src/<file>.ia`, where its records keep their identities, since a record's word and not its folder decides its system; writes `.ia/src/workspace.ia` with the three starter records, keeping the 1.x `@workspace`'s name and `composition.systems` without the local system and adding `composition.sources` and `composition.steward`, and `.ia/.gitignore` where none exists, as [Migration recovery and portability](#migration-recovery-and-portability) qualifies; deletes `records/workspace.ia`, `system.ia` and the three folders they leave empty; and rewrites the descriptor without `distribution` and with the bundled base's dependency row, as `init` writes it, in place of the installed base's, keeping every other row. With `--system` it keeps `system.ia` as it is, writes `records/distribution.ia` as `init --system` does, rooted at `[@system <name>]`, composes the local system and keeps the descriptor's distribution, so `pack` still releases the folder; the descriptor is left byte for byte, whatever its formatting, when its base row is already the bundled base's. Admission then reads the starter identities and each moved file's, and the two effects follow: the capture, and for each host whose projection state exists its projection through `applyHostProjection`, which retires the 1.x steward guard and deletes the owned steward agent files. A file step that fails or is interrupted says that the migration is recorded in `.ia/migration.json` and that nothing was rolled back, and names the rerun of the migration, which resumes from the journal; a migrated workspace that fails admission names `validate --root <root>`, saying neither effect ran; an effect that fails or is interrupted leaves every earlier result in place, says so, and names the rerun of the migration, with host transaction recovery first when one is pending. With `--json` the plan holds `migrate` (`1.1.0`), `id`, `name`, `system`, `base` (`{id, installed, bundled}`, each `{version, archive}`), `conflicts` (`{path, reason}`, with `host` and `code` for a projection), `steps` (`install` first only when the base is replaced), `moves` (`{from, to, identities}`), `writes`, `records`, `systems`, `removes` (`{path, identities}` in delete order, a folder as `<path>/` with no identities), `ignore`, `descriptor` (`{path, before, after, dependencies: {before, after}}`) and `hosts` (`{host, guard, files}`), and `applied` is `{status: 'migrated', id, base: 'installed' | 'present', distribution, authored, moved, removed, ignore, effects: {capture, project: [{host, files, receipt, guard, removed}]}}`, `removed` being the plan's `removes` paths. |
31
+ | `init [directory]` | Preview a workspace, or create it with `--apply`; `--host none` omits host registration and `--id <provider/name>` sets the package id (default `local/<directory name>`). `--from <plugin-directory>` lowers a Claude, Codex or Grok plugin into the new workspace as a kit, in place of `--system` (see [Host plugins](#host-plugins)). `--decline today` or `--decline forever` records that a repository should not be initialized, and `--forget-decline` removes that record. The target is positional, so `--root` is refused. The default starter (2026-10-09) is three records at placement authored (band 100) in `.ia/src/workspace.ia`, each with only the fields its schema declares: `@workspace <name>` (`composition.systems` naming every system the bundled base installs, `composition.sources [".ia/src @authored"]`, `composition.steward @agent <name>`), its participant `@agent <name>` ("The IDE agent operating in the <name> workspace, any vendor.", `governance.applies []`) and `@mandate <name>-mandate` (`governance.requires "Claim no host permission or execution from this mandate."`, `authority.participant @agent <name>`, `authority.moves [Observation, Verification, Synthesis, Delegation, Execution]`, `authority.scope [@workspace <name>]`). The record names are the workspace's; the package id's provider never prefixes them. With `--from` the starter is these three records plus the lowered kit: its `@system` and steward, its records, its resources and its assets, so it is no longer three records alone (see [Host plugins](#host-plugins)). `.ia/.gitignore` holding `work/` and `distributions/` is written only where none exists; an existing one is left as it is and reported, never a conflict. No local `@system` and no `@distribution` are written, so the release descriptor names no `distribution`. `--system`, for a repository that will own vocabulary, also writes `.ia/src/systems/<name>/system.ia` (the 1.x `@system <name>`, requiring `agent-system`, `work-system` and `workspace-system`, and its `@agent <name>-steward`) and `.ia/src/systems/<name>/records/distribution.ia` (`@distribution <name>-distribution` with `distribution.records [@system <name>]`), and the descriptor names that distribution, read from the compiled graph, so `pack` releases the system folder; its `@workspace` composes the local system after the base's (2026-10-09), so `composition.systems` ends with `@system <name>` and the position packet renders a pointer line for it. The apply runs install, author (create-only: a starter file already present with the same bytes is skipped), admission (zero error findings other than canon findings, `IA-COMP-CANON-*`, which `ia validate` alone gates, and each starter record compiled at its path), descriptor (the completion point), then two effects reported apart: capture, the `capture` verb's own write of `.ia/work/snapshot/current.json` through the database, and, only with `--host`, project, the `host <host> --apply` path, whose projection `applyHostProjection` writes. An interruption before the descriptor names the rerun of `init`, which skips completed steps. Past the descriptor an effect that fails or is interrupted leaves every earlier result in place and says so, opening its next action with the sentence saying the workspace is initialized: a capture that fails is refused as `capture` refuses it, with its code, location and repair, then `capture --root <root>`, and without `--host` an interruption there names `capture --root <root>`. With `--host` the project effect runs after a capture that failed too, because the packet reads the live revision rather than the capture, and that capture refusal then says the projection is written; an interruption before the capture, or a host step that refuses, names `host <host> --root <root> --apply` (or `ia host`'s own remedy, rooted), saying whether the capture was taken. With `--json` the plan lists the steps `install`, `author`, `admission`, `descriptor`, `capture` and, with `--host`, `project`, and the starter's `system`, `paths`, `records` (each as `@<word> <name>`) and `ignore` (`{path, status}`, `create` or `present`); `applied` adds `distribution` (null without `--system`), `authored` (the starter records' identities in file order: three, six with `--system`, or three plus the lowered kit's with `--from`), `ignore` (`written` or `present`) and `effects`, `{capture: {revision, records}, project: {host, files, receipt} | 'skipped'}`, where `files` are the receipt's files with their SHA-256 and `receipt` is its path. The human report says the same: the records authored, the ignore file, the capture's records and revision, and the projected files and receipt or that project was skipped. `--migrate` (2026-10-09) rewrites a workspace a 1.1.0 `init` wrote (1.0 and 1.1 write the same starter) into this starter, keeping its descriptor's id. It takes `--system`, `--apply`, `--json` and `--yes`; `--id`, `--host` and the decline options with it are usage (exit 2). A 1.1.0 starter is one folder in `.ia/src/systems/`, its local system `<name>`, holding only `system.ia`, with exactly `@system <name>`, which registers no word, and `@agent <name>-steward`, and `records/*.ia`, of which `records/workspace.ia` holds exactly `@workspace <name>` and `@distribution <name>-distribution`, the distribution `.ia/release.json` names. The three records use fields only the base this CLI bundles declares (`composition.sources`, `composition.steward` and the `@mandate`'s `authority`), so a workspace whose installed `inventarch/language` is another archive has it replaced, which needs a lock holding that one base alone. Plan and apply run one preflight before anything is written: any other shape, a nested folder or another file or record included, and a base to replace in a lock that holds anything else, is refused as `IA-CLI-CONFLICT` (exit 3) naming `init --help`; a workspace that does not admit, canon findings aside, is refused as `IA-CLI-CONFLICT` naming `validate --root <root>`; with a host's projection state present, a pending host journal is refused with the journal's code, located at it, naming its recovery, `ia recover host`, `guard` or `lifecycle` with `--root <root>`, then the rerun; and each destination that already exists (`.ia/src/workspace.ia`, or `.ia/src/<file>.ia` for a moved file), each record the workspace keeps that holds the word and name of a starter record the migration authors anew (`@agent <name>` or `@mandate <name>-mandate`, which would tie with it), located at that record's file, and each host whose projection state exists and whose guard retirement or file plan the planners refuse, such as a file without a marker at a target path, is a conflict, as are edited starter or distribution text and a kept record that refers to a local identity the migration deletes (see [Migration recovery and portability](#migration-recovery-and-portability)). The plan lists the conflicts, the base install, every move, write and delete, the empty folders included, and each registered host's guard retirement and file actions, planned for the migrated records: every rendered file carries the workspace revision, which the migration changes, so none is `unchanged`. It is exit 0. `--apply` refuses a plan with conflicts and writes nothing: a destination or record collision as `IA-CLI-CONFLICT` naming `init <directory> --migrate`, whose plan lists each one; a projection conflict alone keeps the planner's code, located at its file, and names `host <host> --root <root>`, whose plan names each file it refuses. The apply first installs the bundled base where the plan says so, offline and as `init` installs it, while the records are still the 1.1.0 starter's, which the installer admits against it before activating it; an interruption there names the rerun of the migration, which installs the base again only if the bundled one is still not installed. It then moves every other `records/<file>.ia` byte for byte to `.ia/src/<file>.ia`, where its records keep their identities, since a record's word and not its folder decides its system; writes `.ia/src/workspace.ia` with the three starter records, keeping the 1.x `@workspace`'s name and `composition.systems` without the local system and adding `composition.sources` and `composition.steward`, and `.ia/.gitignore` where none exists, as [Migration recovery and portability](#migration-recovery-and-portability) qualifies; deletes `records/workspace.ia`, `system.ia` and the three folders they leave empty; and rewrites the descriptor without `distribution` and with the bundled base's dependency row, as `init` writes it, in place of the installed base's, keeping every other row. With `--system` it keeps `system.ia` as it is, writes `records/distribution.ia` as `init --system` does, rooted at `[@system <name>]`, composes the local system and keeps the descriptor's distribution, so `pack` still releases the folder; the descriptor is left byte for byte, whatever its formatting, when its base row is already the bundled base's. Admission then reads the starter identities and each moved file's, and the two effects follow: the capture, and for each host whose projection state exists its projection through `applyHostProjection`, which retires the 1.x steward guard and deletes the owned steward agent files. A file step that fails or is interrupted says that the migration is recorded in `.ia/migration.json` and that nothing was rolled back, and names the rerun of the migration, which resumes from the journal; a migrated workspace that fails admission names `validate --root <root>`, saying neither effect ran; an effect that fails or is interrupted leaves every earlier result in place, says so, and names the rerun of the migration, with host transaction recovery first when one is pending. With `--json` the plan holds `migrate` (`1.1.0`), `id`, `name`, `system`, `base` (`{id, installed, bundled}`, each `{version, archive}`), `conflicts` (`{path, reason}`, with `host` and `code` for a projection), `steps` (`install` first only when the base is replaced), `moves` (`{from, to, identities}`), `writes`, `records`, `systems`, `removes` (`{path, identities}` in delete order, a folder as `<path>/` with no identities), `ignore`, `descriptor` (`{path, before, after, dependencies: {before, after}}`) and `hosts` (`{host, guard, files}`), and `applied` is `{status: 'migrated', id, base: 'installed' | 'present', distribution, authored, moved, removed, ignore, effects: {capture, project: [{host, files, receipt, guard, removed}]}}`, `removed` being the plan's `removes` paths. |
28
32
  | `validate [path...]` | Check the selected workspace records against language and declared contracts; report attributable diagnostics. A `composition.sources` entry that names no root, and a path selection that selects nothing, are each reported as an `IA-COMP-FIELD-VALUE` warning at the line that states it; admission does not change. These are the findings `ia-distribution validate` reports, from the same validation service. `--severity` sets the lowest severity reported and `--max-findings` the number rendered (default 50). `--verify-conformance` verifies COMP-KERNEL and COMP-FIXTURES in-process, as below. Execution bindings and checks are reported as below; a revoked binding or check exits 1 without being a finding. |
29
33
  | `preview <word> [<name> [<field>=<value>...]]` | Show what one edit of the workspace's own records would compile to, and write nothing (2026-10-11; mode validate, move Verification). `ia preview <word> <name> [<field>=<value>...] [--at <path>]` drafts a new record (language `draftSource`, every value first judged by the strict `encodeValue`) and appends it to `--at` or `<first authored root>/<word>.ia`, the first root the repository's `@workspace` declares at authored placement inside `.ia/src`; `ia preview system <name>` is init's starter system at `.ia/src/systems/<name>/system.ia` and takes no field or `--at`; `--relate <owned> <spelling> <target>` adds one row to the record's `relationships` section; `--set <owned> <section.key>=<value>` sets one field, and `+=` adds one item to a list field, creating it when absent. A field is `<section>.<key>`, or a key one field of the schema alone has, and one given twice in either spelling is refused; the shell's split of a value is joined again with single spaces. Owned is a record at authored placement (band 100) whose file lies under an authored root of the repository's `@workspace`, inside `.ia/src` and outside the floor (the longest declared root holding the file, which the repository's `@workspace` declares at authored placement; under a root several workspaces declare, db D02b `shared`, it owns the file as any one of the declarers, not only when its identity sorts first: 2026-11-04, inventarch/ia#194), named by canonical identity or `@word name`; `--at` is relative to the root and must lie under such a root, and is judged as the volume spells it: an existing part of it spelled otherwise (a case variant, an 8.3 short name) refuses, naming the volume's spelling, before the mandate profile or the ownership check reads it. The edit is language's (`appendRecord`, `addRelationship`, `setField`), spliced into the file as it is: other lines keep their bytes and line endings, a byte-order mark stays, and only the edited record is formatted. It compiles through db's draft overlay against one editor snapshot of the workspace and prints the record before and after, the base and candidate revisions, every record of the file with its digest before and after, the file's current sha256 (an absent file reads as empty), and the findings that count against the candidate: the edited or new record's own, and any the base does not hold, matched in the target file by code and record and elsewhere by code, path, line and message, so an error already in another record does not. The editor snapshot admits checks structurally, as `validate` admits them, and lists no evidence (2026-10-11; `AUTHORING` in `src/session.ts`): a `@check` naming one evaluator that is not built in is an owned record the edit forms can name and a new one drafts clean, a check naming none still counts against the candidate, and the base revision printed is the evidence-free one every strict reader reports. A record other than the target whose digest would change refuses the preview. `ia preview <word>` prints the word's lowering (kind, category, facets, primitive, move, artifact set), schema, default file and digest (for `system`, the per-system file), the consent rows that name it or that its own system's ledger can apply to it, and an example command. Exit 0 for a clean candidate and for word guidance, 1 for a candidate with errors. Refusals: a malformed form or an unknown relationship verb is usage (IA-CLI-USAGE, exit 2); an unknown word or field, a value of another type or carrying syntax, a field given twice, a duplicate row, item or record, a nested record, a system already in force (IA-CLI-EDIT-INVALID), no admitted record answering a name (IA-CLI-EDIT-MISSING), a record or path the workspace does not own (IA-CLI-EDIT-UNOWNED), a `@mandate` that binds the acting participant, before or after the edit (its participant is the actor, or it names none and its scope names the workspace or it claims paths), or whose authority the runtime cannot read, naming the governance position and saying a human or another participant makes that change (IA-CLI-EDIT-MANDATE; moves pool across the mandates that bind an actor), a row the two-sided consent rule refuses, naming the system whose ledger refuses it (IA-LANG-EDGE-UNCONSENTED), and the mandate profile's refusals (IA-RUNTIME-MANDATE-MOVE, -WORD, -ACTOR, and IA-RUNTIME-REQUEST-INVALID for a mandate authority the runtime cannot read) exit 1; another spelling of a path, an unsafe path (db's rule, and DEL, a C1 control, a line or paragraph separator or a bidirectional control, which the CLI refuses besides) or a link on the way (IA-DB-PATH-UNSAFE), an unreadable target (IA-DB-SOURCE-UNAVAILABLE), a target that changed while read (IA-DB-SOURCE-CHANGED), a path the draft overlay refuses (IA-DB-DRAFT-INVALID), and a workspace that does not open (as `ia validate` refuses it) exit 3. IA-CLI-EDIT-MANDATE retains its narrower preview rule. The writing command additionally reserves administrative words as described below; a preview is not authorization to write. A next command that would repeat a value holding shell syntax names the word's preview instead. |
30
34
  | `author <word> <name> [<field>=<value>...] --digest <sha256>` | Write what the same `ia preview` form showed (2026-10-11; mode author, move Synthesis). Every preview form for a non-administrative record has an author form with the same arguments and `--digest <sha256>`, the target file's sha256 the preview printed (an absent file and an empty one read alike); the candidate is compiled again against one editor snapshot, opened as `preview` opens it (checks admitted structurally, no evidence listed), judged for the author mode, and written only when the file is still the one the digest names and the candidate is clean. The record written carries one attribution comment above it, `# authored-by @agent <participant> under @mandate <name> at <authored revision>`: the acting participant, the first governing mandate that binds it and grants Synthesis, and the workspace's authored revision (db `authoredRevision`) the candidate was compiled against; a second author replaces the comment rather than stacking one, and no capture membership records it. An existing file is read again through db's opened-handle reader just before the write and written by the distribution's `replace` (a temporary file and a rename, every component checked for links), keeping its permission bits; a new file by `createFile`, which refuses an entry that appeared since. `ia author` refuses administrative words as described below, including the system starter and its implicit agent. Every successful author names its next command (`ia validate`) judged by the profile that allowed it, as a refusal's next is: the governance position where the profile refuses that command, and a named actor carried as the participant it resolved. The output is the record written, the file's sha256 before and after, the authored revision and the revision of the workspace with what was written, the findings, and `ia validate` as the next command. Refusals are preview's for the same form, plus: a missing or malformed `--digest` (IA-CLI-USAGE, exit 2, naming the preview), judged after the profile and the candidate, so a mandate refusal comes first and the preview named is one the profile allows, else the governance position; a file that is not the one the digest names, or that changed, appeared or disappeared while authored (IA-CLI-EDIT-STALE, exit 1); a candidate with an error that counts against it (IA-CLI-EDIT-UNCLEAN, exit 1); a write the volume refuses (the distribution's IA-DIST code, or IA-CLI-FAILED for a raw volume error such as EPERM, exit 3, naming the repair and the preview). Each names the preview of the same form, and every refusal writes nothing. |
31
35
  | `capture` | Admit the workspace and write its snapshot to `.ia/work/snapshot/current.json` in the `ia-snapshot-1` format: one JSON document with sorted keys and one final newline holding `format` (`ia-snapshot-1`), `language`, `kernelDigest`, `revision` (the full workspace revision), `authoredRevision` (the revision excluding runtime sources), `records` (the admitted records sorted by identity, each with its per-record `digest`), `membership` (one `{identity, root, band, digest}` capture membership row per record, sorted by identity), `diagnostics` (the admission findings and the warnings for declarations that declare nothing, below, ordered by path, line, code and message) and `counts` (`records`, `errors`, `warnings`, `notEvaluated`). Identical sources on one language version capture to identical bytes. The database writes the pair (db SPEC D08a), and every database handle seeds its previous snapshot from it, whatever its cache setting. `.ia/work/snapshot/previous.json` holds the most recent capture whose revision differs from the current one: a capture at a new revision renames the prior `current.json` there, byte for byte, and a capture at an unchanged revision keeps `previous.json` as it is while it holds a capture at another revision. With no readable prior capture (the first one, or a `current.json` that is not an `ia-snapshot-1` capture, which the capture names and replaces), a `previous.json` at another revision is kept as the most recent capture there is; a `previous.json` at the new revision, or one that is no capture, is removed once `current.json` is written. The new bytes are staged in a temporary file in the same directory before either file is replaced, a failed step undoes the ones before it so the pair stays as it was, and a `current.json` that already holds the capture's bytes is not rewritten. The capture writes only under `.ia/work/snapshot/`, creating it when needed, and never touches `.ia/src`. The snapshot is local working state that each clone captures for itself: `ia init` takes the first capture once it has initialized a workspace, so a snapshot exists from then on, and its `.ia/.gitignore`, written only where none exists, lists `work/`, which keeps the snapshot out of version control. Concurrent captures of one root are last-writer-wins. The effect is reported apart from validation: `records`, and how each record's digest compares with the prior capture's `current.json`, as `changed`, `unchanged`, `new` (no row in the prior capture) and `removed` (a row in the prior capture and none now), so `records` is `changed + unchanged + new` and two captures with no edit between them report 0 changed. The first capture has nothing to compare with, so every record is `new`. Admission findings in a source the workspace authors are written into the snapshot and counted, and never stop the write: a capture whose admission has errors still writes, marks its effect line with a warning symbol and exits 1, as `validate` does (warnings alone exit 0). Unresolved references, colliding identities, unconsented rows and every other registration or resolution finding (such as a keyword two adopted or installed systems both register) are such findings wherever they are. Two cases refuse before anything is written, so both files stay as they were: a floor or seed input (a source under `.ia/src/floor/`, an installed package's or an adopted mount's) that fails to parse, which is a syntax error the language's scanner or parser reports (such as `IA-LANG-HEADER-MALFORMED`), refuses with that finding's own code, located at it, exit 3, and names `ia validate`; a root whose own `.ia/src` declares no `@workspace`, admitted or refused, is no workspace to capture and refuses as `IA-DB-ROOT-INVALID` (exit 3), naming `ia init <root>`, or `ia validate` when its own sources have errors. A `composition.sources` entry that names no root, and a path selection that selects nothing (an absolute, `./` or `..` selection, below), are each written as an `IA-COMP-FIELD-VALUE` warning at the line that states it, as `validate` reports them; admission does not change. With `--json` the result is `{version: 1, snapshot, format, revision, digest, records, changed, unchanged, new, removed, prior, ignored, previous, rotated, admission}`: `snapshot` is the absolute path of `current.json` and `digest` the SHA-256 of its bytes; `prior` is the revision of the prior capture the counts compare with, or null; `ignored` says why an existing `current.json` was not taken as one, or is null; `previous` is `{path, revision}` of the retained `previous.json`, or null; `rotated` says whether this capture moved the prior `current.json` there; and `admission` is `{status, errors, warnings, notEvaluated}`. A link or junction on the snapshot path, an entry at `.ia/work` or `.ia/work/snapshot` that is not a directory, or an entry at either snapshot path that is not a regular file, refuses as `IA-DB-PATH-UNSAFE` (exit 3) before anything is written, located at the entry that is not a directory or not a regular file (a link or junction is named in the message, the refusal located at the snapshot directory), and names the repair and then `ia capture` for that root. A write the system refuses for a permission, a busy or read-only entry, or an entry of the wrong kind is `IA-CLI-FAILED` (exit 3), located at what to make writable and naming that and then `ia capture`; any other system error, such as a full disk or an I/O error, is not the path's to repair and takes the generic next below. On Windows a rename of, or onto, a read-only or open snapshot file names that file; otherwise, and on every platform for creating the staged file or the snapshot directory, it names the directory whose entries the write creates, renames or removes. `--preview` admits the workspace and refuses exactly as a capture does, both refusals above and the snapshot path checks included, then reports what the capture would write (db SPEC D08b) and writes nothing: it creates no directory, and `current.json` and `previous.json` keep their bytes and modification times, so the retained previous snapshot that readiness compares against is not rotated away. Its human output says it is a preview and that nothing has been written, prints the capture's counts, the snapshot's digest and size and the rotation the capture would make, names every changed, new and removed identity in full under a `Changed`, `New` or `Removed` heading (a heading with none is left out), each list sorted and each identity printed with each terminal control character (C0, DEL or C1) as visible escape text, never as the control (a removed identity is read from the `current.json` on disk; `--json` carries each as it is), and ends by naming `ia capture` with `--root` as given, or `ia validate` when admission has errors. Its exit class is the capture's: 1 when admission has errors, else 0. With `--json` it is the capture's result with `preview: true` after `version` and `identities` after `rotated`, `{version: 1, preview: true, snapshot, format, revision, digest, records, changed, unchanged, new, removed, prior, ignored, previous, rotated, identities, admission}`: the snapshot fields describe what the capture would write (`snapshot` and `digest` the file and the SHA-256 of the bytes it would hold, `previous` the `previous.json` it would retain, `rotated` whether it would move `current.json` there), and `identities` is `{changed, new, removed}`, the identities the three counts count, each sorted. A snapshot path refusal names the repair and then the same `ia capture --preview`; a preview writes nothing, so a system error it meets reading the pair is never named as a path to make writable and takes the generic next below. A capture without `--preview` writes and reports exactly as above, with no new key. |
32
36
  | `compile` | Removed in 3.0. Every invocation, including `--help` and legacy options, refuses as `IA-CLI-USAGE` (exit 2) before workspace discovery or mandate evaluation and names the static `ia capture --help` command. It is absent from command help and the catalog, but its token remains core-reserved so an extension cannot revive it. Replace calls with `ia capture`; retain supported options and drop `--force`. The old `--out` and `--stdout` have no equivalent because capture writes a fixed snapshot. Published `@inventarch/cli/internal/compile` helper signatures remain available; the CLI no longer calls `runCompile`. |
33
- | `format [path...]` | Check formatting by default; rewrite with `--write`. |
37
+ | `format [path...]` | Check formatting by default; rewrite with `--write`. Each file is drafted against one session with its own preview, so its findings and refusals are its own. The staleness check (the workspace still at the drafts' revision, every drafted file still as read) runs once, after the last file and before any write, and only when something was drafted: IA-DIST-PLAN-STALE then refuses the whole run and nothing is written (`tests/format-refresh.test.ts`). |
34
38
  | `inspect [identity]` | Show a workspace overview, or a record named by its full `system/kind/facet/name` identity or by `--path <file>`, and its relationships from the graph directed view: Edges, the rows a record declares in the spelling its author wrote; Derived inverses, its counterparts' declarations read from its side in the kernel's spelling and labeled `derived`; and Field references, the typed field references it holds or is named by, labeled `derived`. Each edge row shows its direction, depth and `declared by source` or `declared by target`, its fragment on the record it addresses (beside a declared row's counterpart, as `at #<fragment>` on a derived one) and its condition as `when` terms, and a row past depth 1 names the nearer record whose view holds it. `--edges` (`in`, `out` or `both`; default `out`) selects the direction of edges and field references, and `--depth` (0 to 3; default 1) bounds the traversal; field references are listed at depth 1 only, and at depth 0, where nothing is read, each section says none is listed at that depth. With `--json`, each record carries its per-record `digest`, `edges` lists the walk's relationships, `referencedBy` (with `--edges in` or `both`) the inbound field references, and `directed` the listed rows with their `identity`, `depth`, `kind`, `derived`, `declaredOn` and spelling or field; depth 1 of `directed` is the record's own view, so it also lists a self-relation, which the walk and therefore `edges` omit. An identity or `--path` no admitted record answers refuses as `IA-DB-SOURCE-UNAVAILABLE` (exit 1) and names `ia validate` when admission refused that identity or a record of that source, else, for an identity, the inspection of the nearest admitted identity when one is near, else the overview. |
35
39
  | `read <locator>` | Print the body behind a locator (runtime SPEC, body reader): text and its digest, never a certification. A locator is a record's full `system/kind/facet/name` identity; that identity with `#<phase>/<Primitive>` for the text of the record's cells at that address (a playbook's step) or `#<REQ-ID>` for one requirement's text; or `<path>:<line>`, the last colon splitting the path from a positive line, for the innermost admitted record whose source span holds that line of a workspace source. A cell or requirement locator reads that text, never a document. Otherwise a record whose word carries a source locator, and which states it, reads the document it names: `work.source` on `@spec`, `@plan`, `@milestone`, `@task` and `@decision`, `reference.document` on `@authoring-guide` and `template.resource` on `@template`. The path is read relative to the tree holding the record's source: the workspace root for the workspace's own `.ia/src`, a package's or an installed store's directory, and for an adopted mount the directory `.ia/workspace.json` binds it to, whose documents its revision pin does not cover. It is read through the workspace file reader `capture` uses, which refuses a path through a link or junction, a missing, non-regular or hard-linked file, a name that is not portable and a file over 4 MiB. A source locator `<path>#<anchor>` on a markdown file (`.md` or `.markdown`, in any case) reads only the section from the ATX heading whose anchor is `<anchor>` to the next heading of the same or a higher level, headings in fenced code ignored. The anchor is GitHub's for a plain-text heading (a repeated heading takes `-1`, `-2` and so on in document order, and a leading byte order mark is not part of the first heading); underscore emphasis, entity and character references, inline HTML and reference links are not rendered first, so such a heading may have another anchor on GitHub, and setext headings and headings in list items or block quotes are not read. Any other record reads its own body: its `meaning.says` (a `@system`'s head `describes`; a `@schema`, which states neither, has an empty body). Sections, fields and relationships stay in `inspect`. The output names `record` or `document` with the document's path, the SHA-256 of the body's UTF-8 bytes and the line `body not certified by this read`, the identity, locator and path printed with each terminal control character as visible escape text, then prints the body as read, byte for byte, terminal control characters included: the body is the source's own text, which `--json` carries as JSON escapes it; with `--json` it is `{version: 1, locator, identity, kind, path, digest, body, certified: false}`, where `locator` is the locator as given, `kind` is `record` or `document`, `path` is present for a document only and `digest` is the full SHA-256. A read opens the workspace without the db cache and writes nothing. A malformed locator refuses with `IA-CLI-USAGE` (exit 2) before anything is read and names `ia read --help`. The other refusals carry the runtime's codes: a locator no admitted record answers is `IA-RUNTIME-READ-UNADMITTED` (exit 1). For an identity a source holds whose record admission refused it reads `in this workspace's sources, but admission refused it` and names `ia validate`; for one no source holds it reads `not in this workspace's sources` and names the read of the nearest admitted identity when one is near, as `ia inspect` names the inspection, else `ia inspect` for the overview; for a line it names what the file holds: a source whose records admission refused names `ia validate`, a source whose admitted records span other lines names `ia inspect --path <file>`, and a file with no record of the workspace's sources names the overview. A cell or requirement the record lacks is `IA-RUNTIME-READ-FRAGMENT` (exit 1), naming `ia inspect <identity>`; a document path that names no file or is outside the workspace or the record's tree, a URL, which a read never fetches, a file the reader refuses or cannot find, bytes that are not UTF-8, an anchor on a file that is not markdown and an anchor no heading has are `IA-RUNTIME-READ-UNREACHABLE` (exit 3), naming `ia inspect <identity>`, which locates the record whose locator needs the repair (and the file to restore, when there is one); and a record at runtime placement (band 0) is `IA-RUNTIME-READ-PLACEMENT` (exit 3) unless `--include-runtime` is given, naming the same read with that flag. The workspace session this release opens admits no source at runtime placement, so through `ia read` the flag changes nothing yet. The `<path>` of `<path>:<line>` is relative to the workspace root, as every source path the toolchain names is; an absolute path inside the root is read as the root-relative path it names, by the rule `position --seat` reads a location with (runtime `rootRelative`): an in-root name that only begins with `..`, such as `..cache`, is inside the root, and the root itself reads as `.`, the workspace root, which is a directory and no source; any other path names no admitted record. These refusals name the `ia inspect` and `ia validate` commands above, which locate the record or the finding, rather than `ia scope --seat <qname> --shape context`. |
36
- | `position` | Print the position body for a scope key: the runtime's `position` through the whole-workspace scope (runtime SPEC R14 to R17), as the consumer verb beside the frozen `ia scope` route, never a machine route. The key is K = (seat, shape, phase, depth, budget, word), with an optional primitive override, read from `--seat <id\|path>`, `--shape <H>`, `--phase <P>`, `--depth <d>`, `--budget <n>`, `--word <w>` and optional `--primitive <primitive>` only, so no request text reaches it: no flag is K0, the repository's `@workspace` at shape context, phase orient, depth 0 and budget 0, its pointers and tallies only; a key naming any part takes the runtime's defaults for the rest (context, the anchor phase of the explicit primitive or shape-derived primitive, depth 1, budget 16). A `--seat` that spells a canonical `system/kind/facet/name` identity is that record; any other is a location, a workspace-relative path or an absolute one inside the root, read by the rule `read` reads a line locator's path with (the root itself is the workspace root), and `./` makes a path spelled as an identity a location. A depth or budget of digits is that number; the closed sets and caps are the runtime's. The output is the seat with the body's revision; the key used, the capture's freshness (`current`, `stale` or `no-capture`: a position needs no capture; `stale` names `ia capture`, with `--root` as given, as the command that captures this revision), the body's digest and its counts; the loaded records, the pointers and their tallies past 48, the rules and playbooks that apply by word (a field match, not a row) with their tallies, the playbook cells, the blocking rules reserved outside the budget, the mandates, the frontier tallies and the unknowns, each record with its word, owner system, band, hop, how it was first reached and its owner system's steward; and the two widening keys as commands with `--root` as given: `ia position` one hop deeper, every part spelled (absent at depth 2), and the re-seat template `ia position --seat <identity> …` at depth 1 and budget 16, for any pointer or applies-by-word entry. `--word` restricts what loads, the pointers, their tallies and the frontier to records of that word, and never the reserved rules, the applies-by-word section, its cells or the mandates (runtime SPEC R15 and R17), so a word hides no blocking rule. Every string of the human output, what a source authored included (a cell's text, a finding's message, identities and paths), is printed with each terminal control character (C0, DEL or C1) as visible escape text, never as the control, as `ia next` prints its report; colour adds only the renderer's own styling. With `--json` it is `{version: 1, ok: true, body, digest, hostNote}`, the Door's `position` result byte for byte. A position exits 0, opens the workspace without the db cache and writes nothing. The refusals carry the runtime's code, `IA-RUNTIME-REQUEST-INVALID`, and its message, and each names one command, with `--root` as given where that command takes one: a shape, phase or primitive outside its closed set, or a depth or budget outside its cap, is refused before the workspace is read, at exit 2, naming this call again with the closed set (`<context\|governance\|execution\|sequence\|learning>` or `<orient\|plan\|act\|learn>`) or the cap (2 or 64) in that part's place; a word the closure does not register (exit 1, the message listing those it does) names `ia vocabulary`, which opens no workspace and so takes no `--root`; and a seat the workspace does not admit, a path outside it and a seat at runtime placement (exit 1, located at the workspace with a seat identity as identity) name `ia position`, K0, except a runtime-placed seat that is the repository's own `@workspace`, which names `ia inspect`. |
40
+ | `position` | Print the position body for a scope key: the runtime's `position` through the whole-workspace scope (runtime SPEC R14 to R17), as the consumer verb beside the frozen `ia scope` route, never a machine route. The key is K = (seat, shape, phase, depth, budget, word), with an optional primitive override, read from `--seat <id\|path>`, `--shape <H>`, `--phase <P>`, `--depth <d>`, `--budget <n>`, `--word <w>` and optional `--primitive <primitive>` only, so no request text reaches it: no flag is K0, the repository's `@workspace` at shape context, phase orient, depth 0 and budget 0, its pointers and tallies only; a key naming any part takes the runtime's defaults for the rest (context, the anchor phase of the explicit primitive or shape-derived primitive, depth 1, budget 16). A `--seat` that spells a canonical `system/kind/facet/name` identity is that record; any other is a location, a workspace-relative path or an absolute one inside the root, read by the rule `read` reads a line locator's path with (the root itself is the workspace root), and `./` makes a path spelled as an identity a location. A depth or budget of digits is that number; the closed sets and caps are the runtime's. The output is the seat with the body's revision; the key used, the capture's freshness (`current`, `stale` or `no-capture`: a position needs no capture; `stale` names `ia capture`, with `--root` as given, as the command that captures this revision), the body's digest and its counts; the loaded records, the pointers and their tallies past 48, the rules and playbooks that apply by word (a field match, not a row) with their tallies, the playbook cells, the blocking rules reserved outside the budget, each conditional one with an `applies only when` line naming the groups it waits on, the blocking rules left out by activation (`Rules left out by activation`, each with the terms the coordinate contradicts), the mandates, the frontier tallies and the unknowns, each record with its word, owner system, band, hop, how it was first reached and its owner system's steward; and the two widening keys as commands with `--root` as given: `ia position` one hop deeper, every part spelled (absent at depth 2), and the re-seat template `ia position --seat <identity> …` at depth 1 and budget 16, for any pointer or applies-by-word entry. `--word` restricts what loads, the pointers, their tallies and the frontier to records of that word, and never the reserved rules, the applies-by-word section, its cells or the mandates (runtime SPEC R15 and R17), so a word hides no blocking rule. Every string of the human output, what a source authored included (a cell's text, a finding's message, identities and paths), is printed with each terminal control character (C0, DEL or C1) as visible escape text, never as the control, as `ia next` prints its report; colour adds only the renderer's own styling. With `--json` it is `{version: 1, ok: true, body, digest, hostNote}`, the Door's `position` result byte for byte. A position exits 0, opens the workspace without the db cache and writes nothing. The refusals carry the runtime's code, `IA-RUNTIME-REQUEST-INVALID`, and its message, and each names one command, with `--root` as given where that command takes one: a shape, phase or primitive outside its closed set, or a depth or budget outside its cap, is refused before the workspace is read, at exit 2, naming this call again with the closed set (`<context\|governance\|execution\|sequence\|learning>` or `<orient\|plan\|act\|learn>`) or the cap (2 or 64) in that part's place; a word the closure does not register (exit 1, the message listing those it does) names `ia vocabulary`, which opens no workspace and so takes no `--root`; and a seat the workspace does not admit, a path outside it and a seat at runtime placement (exit 1, located at the workspace with a seat identity as identity) name `ia position`, K0, except a runtime-placed seat that is the repository's own `@workspace`, which names `ia inspect`. |
37
41
  | `next` | Print one plan's delivery view (runtime SPEC R18), computed per read and never stored. The plan is the one `--seat` names: a `@plan`, or the plan a `@milestone`'s `work.plan` names, or that of a `@task`'s `work.milestone`; without `--seat`, the only `@plan` the workspace authors (band 100). The view is the runtime's `deliveryView` through the whole-workspace scope (runtime SPEC R18): the plan, its revision and a summary of how many tasks have exit evidence and which is next; its milestones, each satisfied or not with the reason (its own exit evidence, or every task's) and its status as self-declared; its tasks in one prerequisites-first order (a task follows the tasks and milestones it and its milestone require, ties by milestone, then task), each with its verdict line, `exit evidence recorded (<observation>, evaluator <evaluator>[, self-attributed | , self-attribution unknown])`, `no declared blocker` or `blocked (<basis>; …)`, its `work.status` printed as self-declared and never a basis, one `requires` line per effective prerequisite with its basis, and its five state lines (intent, definition, realizable, realized, worked); the review items with their owner; and, when a task has no declared blocker, the command the view names for it, `ia position --seat <task> --shape sequence`, with `--root` as given. Exit evidence is a success `@observation` on the task whose `subject-revision` is its current digest; a task's own status is never evidence, so a plan whose tasks are `closed` with no observation prints each `status closed (self-declared)` and a task that requires one `blocked (task <t>: no exit evidence)`, which is the honest answer. A relation row that carries a condition, such as `requires @task guide when phase is act`, counts only where it holds at the coordinate the scope binds, decided as graph traversal decides it (runtime SPEC R18): the record that states the row decides its provenance and artifact-set terms, and a severity term only where its own severity decides it at every coordinate, while a term on an axis the scope binds no value for, the phase on the whole-workspace scope `ia next` reads and the severity on every scope, leaves the row conditional with an unknown basis, never met; a row whose condition fails is no row. The Door's `next` decides a phase term through a token bound to a phase. With `--json` it is `{version: 1, ok: true, view}`, `view` being the Door's `next` result byte for byte. A view exits 0, whatever its verdicts and review items. The workspace opens without the db cache and nothing is written. The refusals carry the runtime's codes and messages at exit 1, located at the workspace with the seat as identity, and each names one command with `--root` as given: IA-RUNTIME-NEXT-SEAT for a seat the workspace does not admit names `ia validate` for a record admission refused, else, as `ia inspect` names the nearest admitted identity, `ia next --seat <nearest>` for the nearest admitted `@plan`, `@milestone` or `@task` when one is near, else the view without a seat, and for a record that is no `@plan`, `@milestone` or `@task` names `ia position --seat <seat>`, as the runtime does; the view without a seat is `ia next` when the workspace authors one `@plan` at band 100, `ia next --seat <the first>` when it authors several, and with none what IA-RUNTIME-NEXT-NO-PLAN names without a seat; IA-RUNTIME-NEXT-NO-PLAN names `ia validate` when admission refused a `@plan` a source holds (without a seat, any `@plan`; with one, the `@milestone` a `@task` seat's `work.milestone` names, or the `@plan` that `work.plan` names on its milestone or on a `@milestone` seat), else, without a seat in a workspace that registers `@plan`, `ia preview plan` where the acting participant's profile allows Verification and `@plan` (else the governance position), else the records to author, then `ia next` again with the seat given; IA-RUNTIME-NEXT-AMBIGUOUS, the plans listed in the message, names `ia next --seat <the first>`; and IA-RUNTIME-NEXT-CYCLE, the require rows listed in the message and the refusal located at the first, names `ia position --seat <record> --shape sequence` at the record the runtime names, the cycle's first task by milestone then task, else the first milestone a row requires. `ia next --help`, which the runtime's IA-RUNTIME-NEXT-NO-PLAN names to Door and MCP callers, says under `--seat` which records make a plan. It is the Door's `next` operation as a consumer verb, never a machine route. |
38
42
  | `project <claude\|codex>` | With `--product plugin`, render the host plugin a lowered workspace describes instead (see [Host plugins](#host-plugins)); without it, `--out`, `--check` and `--compare` are usage (`IA-CLI-USAGE`, exit 2), refused before anything is read and naming the `--product plugin --check` form. Otherwise, plan, or with `--apply` write, the workspace projection alone (2026-10-09; runtime SPEC R19 and R20): the position packet of the admitted records rendered by the host's adapter for the consumer target, the files the workspace projection below describes. It plans by default, as `host` does, and the plan writes nothing, the IA home included: the packet's entry count (runtime R19's `entryCount`, 37 on a fresh init) and digest, the file plan (`create`, `update`, `unchanged`, `remove` for an owned and marked 1.x steward file, `foreign` for any other `.claude/agents/*.md` file, left in place) and the steward-guard retirement (`guard: 'retire'`), planned by the same `projectionElement` as `host`'s projection element. `--apply` plans again (`replanProjection`, shared with `host --apply`) with the rendering its gated plan session made, writes it through `applyHostProjection`, and prints the receipt: its files with their SHA-256, the legacy files removed, the foreign files and the retirement. A file changed since the plan still refuses, but a source or mandate change made while the confirmation question waits is not picked up, and `ia doctor` then reports the projection outdated. It registers no MCP server and creates no hook registration; once `host --apply` has registered the workspace's hooks, it keeps those groups in step with the authored `@hook` records, and without a registration it lists every `@hook` as not taken. It needs no capture, because the packet reads the live revision. With `--json` it prints `{version: 1, command: 'project', root, host, apply, plan: {entries, packetDigest, files, guard, hooks, unsupported, conflict}, applied?}`, `applied` being the receipt written; with a conflict `files` is empty and `guard` null, because the apply refuses it and so writes and retires nothing. A file without the generated marker at a path the adapter writes, an owned file or guard group changed by hand, or an ownership state that cannot be read makes a successful plan that names the file and its repair (`conflict: {code, path, reason}`), and `--apply` refuses it with that code, located at the file, before it asks anything or writes, naming the repair, then `ia project <host>`. A host other than `claude` or `codex` is `IA-CLI-USAGE` (exit 2) before anything is read, naming `ia project claude`, and a root without `.ia/src` is `IA-CLI-CONFLICT` naming `ia init` of the root as given; a release descriptor is not required, and a workspace that does not admit is refused naming `ia validate`. The same two guards, source presence then admission, apply to `ia host`, committed bootstrap included (`src/workspace-state.ts`). The `ia project`, `ia validate` and `ia init` commands a next action names carry the root as given; a pending host journal (`IA-DIST-RECOVERY-REQUIRED`, plan and apply) or a host lock held at apply (`IA-DIST-INSTALL-BUSY`) names its recovery, `ia recover host`, `guard` or `lifecycle` with `--root <root>`, using the resolved root, which recovery requires to be absolute, as `host` does, and a workspace whose sources cannot be opened names the resolved root, as every workspace verb does. |
39
43
  | `vocabulary [word]` | Read the catalogue shipped with the package, including schemas (`--schema`) and worked examples (`--example`); `--domain`, `--kind` and `--search` filter it. No workspace is opened, so `--root` is refused. |
@@ -74,7 +78,7 @@ Execution bindings: `validate` reports, from the same `WorkspaceSession.bindings
74
78
 
75
79
  Checks and evidence: `validate` opens its session with structural check admission and reads no evidence, so its findings, counts, checks, exit and `revision` are the authored view's alone and `revision` is the one every other reader reports, with `authoredRevision` beside it in `--json`; a check naming an evaluator that is not built in is admitted, reported and bound rather than refused (every strict reader, which is every other reader but `preview` and `author`, counts it as an IA-COMP-CHECK-UNKNOWN error, so `ia host` and `ia project` refuse the workspace with IA-CLI-CONFLICT (exit 3) and `ia capture` still writes its snapshot with the finding recorded and exits 1; the summary says so, naming each such check so that refusal or finding has a place to land), and reports from the same `WorkspaceSession.checks(trust)` service `ia-distribution validate` reports a Checks section: the catalog source when a check needs one, one entry per check with its evaluator, `bound`, `unavailable` or `revoked`, its outcome (`pass`, `fail` or `not-evaluated`) and its reason, then the evidence it recorded. A not-evaluated check is never a pass and is counted in the summary; a revoked check is an error that exits 1, and the closing names the repair: removing or replacing a check that `validate`, `preview` and `author` admit but every strict reader counts as an error, before re-applying the host, or a check whose evaluator the catalog revokes. With admission refused nothing is recorded or pruned, and an older file it may not remove never refuses the run. `validate` trusts the payload its bundled pin names in the IA home, `ia-distribution validate` only the payload it runs from. It then records the bound checks that passed or failed through `recordValidation`, the one evidence write any command makes: `.ia/work/evidence/<authored revision>.ia`, runtime placement band 0, which moves `revision` but never the authored revision, the position packet or the host projection. `--json` adds `checks` and `evidence`; with no check the human report is unchanged. A directory it cannot write refuses as IA-DIST-EVIDENCE-UNWRITABLE (exit 3) with the repair, and a link, junction or file on the way as IA-DB-PATH-UNSAFE; nothing is read through one, and with nothing to record neither refuses. `doctor`, `capture --preview` and refused effects never create or prune evidence.
76
80
 
77
- Conformance verification (2026-10-21): `validate --verify-conformance` also opens a second session with distribution `SessionOptions.conformance` `verify` (db D10a), which runs compliance's `package-v1` profile in-process (C31): `verifyKernel` against the floor the workspace selected, and `verifyFixtures`. The report is that session's: its findings, counts, status, `reportOutcome` and exit, so both checks verified to pass remove their two not-evaluated warnings, and a floor whose content differs from the embedded one fails COMP-KERNEL, an error that exits 1. Checks, bindings and evidence stay the first session's, bound from the report without verification, so the evidence file is the one `validate` without the flag records, and every reader admits it. A verified failure refuses the report, never the evidence, and the Checks section says why nothing was recorded from that first session's admission. When the two sessions read different revisions, nothing is recorded and the run refuses as IA-DB-SOURCE-CHANGED (exit 3), naming the same command to run once nothing is writing the sources. `--json` adds `conformance`: `verdicts`, COMP-FIXTURES then COMP-KERNEL with their outcome and `basis` (`verified`, or null for a result that could not be evaluated), and the report's own `conformance` object (`profile`, `toolchain`, the kernel's `floorDigest` and the fixtures' `inventoryDigest`, `observedCodes` and `outOfProfile`), present when at least one check was verified. The human report adds a Conformance section: one entry per check with its outcome, its basis and what it was verified against or why it is not a pass, then the profile and the suites it does not run (HOOK, RUNTIME, escalation, EXEC and PUBLICATION), about which a pass says nothing. Every next action that reruns `ia validate` keeps the flag, since a rerun without it would not verify. A not-evaluated COMP-KERNEL or COMP-FIXTURES has no evaluator to supply, so its next action, and the summary, point to the Conformance section instead. In the Checks section a check that runs either one says it is bound from the report without verification. Without the flag nothing new runs, and the output and exit are byte for byte those of a validation before the flag existed. `tests/validate-checks.test.ts` pins both checks verified on a starter and on an exact local floor of the same floor digest; COMP-KERNEL failing for a floor one byte away, with exit 1 and the evidence unchanged; the checks and evidence equal to a validation without the flag; the refusal on a changed revision with nothing recorded; refusals equal with and without the flag; and the output without the flag.
81
+ Conformance verification (2026-10-21): `validate --verify-conformance` also opens a second session with distribution `SessionOptions.conformance` `verify` (db D10a), which runs compliance's `package` profile in-process (C31): `verifyKernel` against the floor the workspace selected, and `verifyFixtures`. The report is that session's: its findings, counts, status, `reportOutcome` and exit, so both checks verified to pass remove their two not-evaluated warnings, and a floor whose content differs from the embedded one fails COMP-KERNEL, an error that exits 1. Checks, bindings and evidence stay the first session's, bound from the report without verification, so the evidence file is the one `validate` without the flag records, and every reader admits it. A verified failure refuses the report, never the evidence, and the Checks section says why nothing was recorded from that first session's admission. When the two sessions read different revisions, nothing is recorded and the run refuses as IA-DB-SOURCE-CHANGED (exit 3), naming the same command to run once nothing is writing the sources. `--json` adds `conformance`: `verdicts`, COMP-FIXTURES then COMP-KERNEL with their outcome and `basis` (`verified`, or null for a result that could not be evaluated), and the report's own `conformance` object (`profile`, `toolchain`, the kernel's `floorDigest` and the fixtures' `inventoryDigest`, `observedCodes` and `outOfProfile`), present when at least one check was verified. The human report adds a Conformance section: one entry per check with its outcome, its basis and what it was verified against or why it is not a pass, then the profile and the suites it does not run (HOOK, RUNTIME, escalation, EXEC and PUBLICATION), about which a pass says nothing. Every next action that reruns `ia validate` keeps the flag, since a rerun without it would not verify. A not-evaluated COMP-KERNEL or COMP-FIXTURES has no evaluator to supply, so its next action, and the summary, point to the Conformance section instead. In the Checks section a check that runs either one says it is bound from the report without verification. Without the flag nothing new runs, and the output and exit are byte for byte those of a validation before the flag existed. `tests/validate-checks.test.ts` pins both checks verified on a starter and on an exact local floor of the same floor digest; COMP-KERNEL failing for a floor one byte away, with exit 1 and the evidence unchanged; the checks and evidence equal to a validation without the flag; the refusal on a changed revision with nothing recorded; refusals equal with and without the flag; and the output without the flag.
78
82
 
79
83
  The workspace projection (2026-10-09) is the position packet of the workspace's admitted records (runtime SPEC R19), with the command catalog `packetCatalog` builds, rendered by the runtime's adapter for the consumer target (R20): `.claude/rules/ia-workspace.md` and `.claude/skills/ia-authoring/SKILL.md` for Claude, `AGENTS.md` and `.agents/skills/ia-authoring/SKILL.md` for Codex, each carrying `<!-- Generated by ia project; edit the cited native records. -->`. No per-system steward agent is rendered, and `ia host` plans the elements `mcp`, `context` and `projection`: it registers no steward guard, which with no steward subagent left would deny every edit under `.ia/src/systems/<name>/`; the guard it registers instead is one group per authored `@hook` (the generated set, below), which decides only the edits that hook selects. `applyHostProjection` in `src/host-projection.ts` is the only writer of projection files; `ia host --apply`, `ia host --remove --apply`, `ia project --apply`, the project effect of `ia init --host` and `ia init --migrate --apply`, and the install, update and remove refresh call it. It refuses while a host journal is pending, plans the guard retirement and the file plan before writing anything, then removes a steward-guard registration an earlier release made (its group in `.claude/settings.local.json` and `claude-guard-workspace.json`, through apps/distribution's guard registration) before any projection file changes, applies the files through apps/distribution, which deletes each 1.x steward file its state owns and marked (either 1.x marker is owned) and lists every other `.claude/agents/*.md` file `foreign`, left in place, and last writes the receipt `.ia/distributions/hosts/<host>-receipt.json` beside the projection state, having deleted the previous one under the host lock before any projection file changed, so an interrupted apply leaves no receipt: the adapter's receipt with `cli` (`@inventarch/cli@<version>`), `removed` (the legacy files deleted, each with its SHA-256), `foreign`, `guard` (`retired` or `none`) and `writtenAt`. A removal deletes the receipt. The plan's `projection` element lists the retirement as `guard: 'retire'` and each file action, `remove` and `foreign` included, and is an update when its files are unchanged but a retirement is planned or the receipt is missing; an applied `projection` element reports `guard: 'retired'` or `none`, and the human report says the guard was retired. An install, update or remove plan lists the registered hosts whose refresh retires a guard as `retire`, and its human plan, the summary an apply confirms, says so beside the refresh line with the note on what that leaves unblocked; after the apply it lists the hosts it retired a guard for as `retired`. A guard group changed by hand refuses, located at `.claude/settings.local.json`, naming its deletion, and an install refuses that before anything is acquired, as it refuses a hand-edited projection file. `doctor`'s projection rows read the receipt: a listed file missing (`warn`) or changed (`fail`), the receipt's packet digest against a fresh render (`outdated`, `warn`; a render that fails is `unknown`, naming `ia validate`), with none of these, one `ok` row saying the projection has no drift, and one `info` row listing the files the last apply removed and the foreign ones it left, which are not checked; a projection with no receipt, a 1.x registration or an interrupted apply included, is `unknown`, and `ia host <host> --apply` writes one; a receipt that cannot be read, is not exact UTF-8 or lacks a field doctor checks is a `fail` row at its path naming its deletion. A 1.x guard group changed by hand is reported with `ia host`'s repair: delete the group, then run `ia host claude --apply`. A projection `ia project` wrote without a host registration has the same rows, after the registered hosts' rows or, when none is registered, after the `Host` row, and each remedy, like an install, update or remove refusal for that projection, names `ia project <host> --apply` (`projectionRerun`), because `ia host` would also register an MCP server; the `--host` briefing reports such a host as not registered, never stale. The 1.x `ia host` marker and projection state stay readable, so an upgraded workspace's next apply replaces its files in place.
80
84
 
@@ -123,9 +127,9 @@ When a migration creates `.ia/.gitignore`, tracked distribution payload stays vi
123
127
 
124
128
  `fix.ts` owns a doctor check's structured `fix` (consumer CLI contract §2.12): the flow derived from the parsed form under the grammar of the action it names (`CommandSpec.actions` and `flow`, which `workspaces.ts` also reads for the options each action owns), `iaFix` and `externalFix`, which build a remedy and its fix from one argv, `displayFix`, and the two forms a console runs, `previewArgv` and `confirmedArgv`. `package-manager.ts` builds the package-manager argv with an explicit directory flag when the manifest is not where the command runs. `doctor-extensions.ts` reads the checks an extension contributes through `Extension.console`: data only (areas, offers whose steps are the extension's own commands, and a state file under the IA home), confined to ids under its token, never replacing a core row; the public build declares no console. `workspaces.ts` is the `ia workspaces` handler over it, and `init.ts` calls it once `--apply` has initialized a target, to offer tracking (§2.16).
125
129
 
126
- `console/` is bare `ia`'s console (consumer CLI contract §1.2 and §6), built on Node built-ins only. [`width.ts`](src/console/width.ts) is the one display-width function: grapheme clusters from `Intl.Segmenter`, widths from [`width-table.ts`](src/console/width-table.ts), which [`tools/unicode/generate-width-table.mjs`](../../tools/unicode/generate-width-table.mjs) generates from vendored Unicode 16.0.0 data (its notice ships as `THIRD_PARTY_NOTICES.txt`); `render.ts` wraps by it too, and `workspaces.ts` sizes its tables by it. [`grid.ts`](src/console/grid.ts) is the cell frame, the one place untrusted text meets the terminal, and [`terminal.ts`](src/console/terminal.ts) the alternate-screen session that writes changed rows, takes each piece of terminal state (alternate screen, hidden cursor, bracketed paste, raw mode) transactionally and gives back exactly what it holds. `app.ts` owns the one teardown: quit, a throw, an output failure, crash handlers, `SIGINT`/`SIGTERM`/`SIGHUP`/`SIGBREAK` (128 plus the signal number) and a synchronous `exit` handler, all removed when the console ends; it runs one offer at a time, drops keys decoded after a run starts or a quit, and lets go of stdin before a child starts. `keys.ts` treats a bracketed paste as text, never as keys, and discards one over `PASTE_LIMIT` (65,536 UTF-16 code units) or still open when the escape timer fires, up to its end marker, reading only Ctrl-C after such a timeout. `run.ts` shows each argument as written, or as a JSON string literal when it holds a control character or a lone surrogate, starts with a quote or is empty (`shownArgument`), and quotes `.cmd` arguments by the Windows argv rules, refusing `%`, any double quote and C0 control characters (`cmdArgument`); `main.ts`'s `consoleTerminal` falls back to a terminal stderr for the synchronous restoration once stdout has failed. [`keys.ts`](src/console/keys.ts) is a buffered key decoder with a text-entry mode. [`state.ts`](src/console/state.ts) splits doctor's rows by copy (`RUNNING_ROWS` and extension rows from the running copy, every other row from the workspace's copy), reads a repo copy's `doctor --json` run, and groups rows into areas through `AREA_TABLE`, which is data: an id it does not name lands in Other. [`load.ts`](src/console/load.ts) is the effectful loader with doctor collection injected; a doctor child past its bound, or aborted, gets SIGTERM and, still running `DOCTOR_KILL_GRACE_MS` (2 s) later, SIGKILL; it and `app.ts`'s `resolveRepo` take the workspace's copy from `handoff.ts`'s `runnableCopy`, the rule hand-off applies, so a committed copy or one under the user's `IA_NO_HANDOFF=1` is never run (`committed` fails closed: when git exits non-zero, times out or cannot be started and a `.git` exists at or above the copy, the copy counts as committed; its git runs without the caller's `GIT_*` routing variables, `program.ts`'s `withoutGitRouting`, which `batchEnv` shares; without a `.git` above, nothing is tracked), and every step and batch run in the all-workspaces view resolves its copy the same way. [`offers.ts`](src/console/offers.ts) derives every offer from state: one per row with a fix, register a host, add a kit, track this workspace, the upgrade recipe, Diagnostics, Check for updates now and an extension's declared offers. [`layout-repo.ts`](src/console/layout-repo.ts) draws the single-repo view; [`run.ts`](src/console/run.ts) runs an offer's steps by their flows, resolving each step's copy from the disk at that step; [`app.ts`](src/console/app.ts) is the event loop; outside a workspace it lands on the all-workspaces view, and tab switches views. [`workspaces-state.ts`](src/console/workspaces-state.ts) loads every tracked workspace through `load.ts` in a `doctorPool` of four slots, which a refresh of an opened workspace shares, each run bounded at 30 s and aborted on quit, and classifies each row from its own checks' statuses, never its offers; [`layout-all.ts`](src/console/layout-all.ts) draws that view. A batch is planned by [`batch-plan.ts`](src/console/batch-plan.ts), which is pure: the batchable offers on a selection, the branch (`chore/<offer>`) and worktree of each repository, the user and machine steps left for afterwards, and every path-bearing argument rebuilt for the worktree, read from the grammar's `path` marks on options (`always`, or `maybe` for a value that is a URL or an id unless spelled as a path) and positionals, with any other absolute or `..` token examined too; one that leads outside the worktree refuses the repository. [`batch-run.ts`](src/console/batch-run.ts) runs it through an injected runner: the git metadata operations it lists (`METADATA_OPS`) are the only commands that name the user's checkout; the worktree is added with `--no-track`; the install is built for the worktree, frozen to a tracked lockfile and without lifecycle scripts, unless the offer's first step is itself the package manager's install or the CLI pin (`installsDependencies`), which then installs, with the manager the base locks or else the repository is refused; the worktree path's real destination, fixed before anything is awaited, must lie outside the repository, every other repository of the batch and the IA home and is judged again immediately before `git worktree add`; a failed add is undone by `undoAdd`, which removes the worktree and deletes the branch only when `git worktree list --porcelain` shows that path on that branch at the base's commit, and names whatever it leaves; the created worktree is pinned (`pinWorktree`: real path, device and inode) and `checkPinned` verifies it before every later command, here and in `batch-next.ts`; `containedStep` checks the real filesystem before the install and before every step; the real path of an `ia` step's entry must lie inside the worktree (or be the running copy's own); `programIn` is the one rule for every program started (git and `gh` found once per batch, the package manager, a step's program), refusing one whose real path is inside the repository and keeping its canonical real path; every child, in this module and in `batch-next.ts`, starts through `spawnGuarded` (or `spawnGuardedSync` for the probes, which routes a `.cmd` through cmd.exe with `cmdArgument`), which immediately before each spawn checks the program's real path against its canonical path and the checkouts (and refuses a `.cmd` or `.bat` whose real path holds `%`), checks the pinned worktree when the cwd or an argument lies in it, and gives the child `programEnv(batchEnv(env))` with only the PATH entries that lead into no repository of the batch (`childEnv`, falling back to `/usr/bin:/bin` outside Windows when none is left); `batchEnv` drops git's repository-local variables (`GIT_LOCAL_ENV`), `GIT_ASKPASS` and `SSH_ASKPASS` from every child and sets `GIT_TERMINAL_PROMPT=0`, `GCM_INTERACTIVE=never`, `SSH_ASKPASS_REQUIRE=never` and an empty `core.askPass` through `GIT_CONFIG_COUNT` (`NO_PROMPT`); `withoutSshPrompt` adds `GIT_SSH_COMMAND='ssh -o BatchMode=yes'` unless the user names an ssh of their own, and fails closed when its `core.sshCommand` probe cannot run; outside Windows every runner child starts in a session and process group of its own (`detached`), with no controlling terminal, is started with the link it was found through as `argv0` (`Program`), is killed with its group (on Windows `taskkill /T`) at `BATCH_COMMAND_TIMEOUT_MS`, gets SIGINT when the run's abort signal fires, and is killed by a process `exit` listener, which a SIGKILL or a hard crash never runs; `planBatch` takes `gitTop` and `enclosingTop`, which names the work tree around the folder above a repository, null only on git's plain "not a git repository", and a refusal whenever git cannot say; while git still runs with the user's own configuration and hooks (global, system and `includeIf`), which the batch does not constrain: the checkout guarantee covers what the batch runs, not those hooks; and an `ia` step runs on the copy the worktree has at that step. [`batch-next.ts`](src/console/batch-next.ts) holds the choices after a run (commit as `chore: <title>`, push create-only (an empty-lease `--force-with-lease` with `--porcelain`, accepting only a new ref, so a branch already on origin at any commit is a collision) and open PRs through `gh` only after `gh auth status` exits 0, remove the worktrees and keep the branches), and [`batch-screen.ts`](src/console/batch-screen.ts) shows the preview, the progress, the results and those choices in the normal screen. `main.ts`'s `opensConsole` and `enter` decide console or help before dispatch.
130
+ `console/` is bare `ia`'s console (consumer CLI contract §1.2 and §6; `opensConsole` in `main.ts` declines it when `CI` or `IA_NO_CONSOLE` is non-empty or `TERM` is exactly `dumb`, never for an unset `TERM`), built on Node built-ins only. [`width.ts`](src/console/width.ts) is the one display-width function: grapheme clusters from `Intl.Segmenter`, widths from [`width-table.ts`](src/console/width-table.ts), which [`tools/unicode/generate-width-table.mjs`](../../tools/unicode/generate-width-table.mjs) generates from vendored Unicode 16.0.0 data (its notice ships as `THIRD_PARTY_NOTICES.txt`); `render.ts` wraps by it too, and `workspaces.ts` sizes its tables by it. [`grid.ts`](src/console/grid.ts) is the cell frame, the one place untrusted text meets the terminal, and [`terminal.ts`](src/console/terminal.ts) the alternate-screen session that writes changed rows, takes each piece of terminal state (alternate screen, hidden cursor, bracketed paste, raw mode) transactionally and gives back exactly what it holds. `app.ts` owns the one teardown: quit, a throw, an output failure, crash handlers, `SIGINT`/`SIGTERM`/`SIGHUP`/`SIGBREAK` (128 plus the signal number) and a synchronous `exit` handler, all removed when the console ends; it runs one offer at a time, drops keys decoded after a run starts or a quit, and lets go of stdin before a child starts. `keys.ts` treats a bracketed paste as text, never as keys, and discards one over `PASTE_LIMIT` (65,536 UTF-16 code units) or still open when the escape timer fires, up to its end marker, reading only Ctrl-C after such a timeout. `run.ts` shows each argument as written, or as a JSON string literal when it holds a control character or a lone surrogate, starts with a quote or is empty (`shownArgument`), and quotes `.cmd` arguments by the Windows argv rules, refusing `%`, any double quote and C0 control characters (`cmdArgument`); `main.ts`'s `consoleTerminal` falls back to a terminal stderr for the synchronous restoration once stdout has failed. [`keys.ts`](src/console/keys.ts) is a buffered key decoder with a text-entry mode. [`state.ts`](src/console/state.ts) splits doctor's rows by copy (`RUNNING_ROWS` and extension rows from the running copy, every other row from the workspace's copy), reads a repo copy's `doctor --json` run, and groups rows into areas through `AREA_TABLE`, which is data: an id it does not name lands in Other. [`load.ts`](src/console/load.ts) is the effectful loader with doctor collection injected; a doctor child past its bound, or aborted, gets SIGTERM and, still running `DOCTOR_KILL_GRACE_MS` (2 s) later, SIGKILL; it and `app.ts`'s `resolveRepo` take the workspace's copy from `handoff.ts`'s `runnableCopy`, the rule hand-off applies, so a committed copy or one under the user's `IA_NO_HANDOFF=1` is never run (`committed` fails closed: when git exits non-zero, times out or cannot be started and a `.git` exists at or above the copy, the copy counts as committed; its git runs without the caller's `GIT_*` routing variables, `program.ts`'s `withoutGitRouting`, which `batchEnv` shares; without a `.git` above, nothing is tracked), and every step and batch run in the all-workspaces view resolves its copy the same way. [`offers.ts`](src/console/offers.ts) derives every offer from state: one per row with a fix, register a host, add a kit, track this workspace, the upgrade recipe, Diagnostics, Check for updates now and an extension's declared offers. [`layout-repo.ts`](src/console/layout-repo.ts) draws the single-repo view; [`run.ts`](src/console/run.ts) runs an offer's steps by their flows, resolving each step's copy from the disk at that step; [`app.ts`](src/console/app.ts) is the event loop; outside a workspace it lands on the all-workspaces view, and tab switches views. [`workspaces-state.ts`](src/console/workspaces-state.ts) loads every tracked workspace through `load.ts` in a `doctorPool` of four slots, which a refresh of an opened workspace shares, each run bounded at 30 s and aborted on quit, and classifies each row from its own checks' statuses, never its offers; [`layout-all.ts`](src/console/layout-all.ts) draws that view. A batch is planned by [`batch-plan.ts`](src/console/batch-plan.ts), which is pure: the batchable offers on a selection, the branch (`chore/<offer>`) and worktree of each repository, the user and machine steps left for afterwards, and every path-bearing argument rebuilt for the worktree, read from the grammar's `path` marks on options (`always`, or `maybe` for a value that is a URL or an id unless spelled as a path) and positionals, with any other absolute or `..` token examined too; one that leads outside the worktree refuses the repository. [`batch-run.ts`](src/console/batch-run.ts) runs it through an injected runner: the git metadata operations it lists (`METADATA_OPS`) are the only commands that name the user's checkout; the worktree is added with `--no-track`; the install is built for the worktree, frozen to a tracked lockfile and without lifecycle scripts, unless the offer's first step is itself the package manager's install or the CLI pin (`installsDependencies`), which then installs, with the manager the base locks or else the repository is refused; the worktree path's real destination, fixed before anything is awaited, must lie outside the repository, every other repository of the batch and the IA home and is judged again immediately before `git worktree add`; a failed add is undone by `undoAdd`, which removes the worktree and deletes the branch only when `git worktree list --porcelain` shows that path on that branch at the base's commit, and names whatever it leaves; the created worktree is pinned (`pinWorktree`: real path, device and inode) and `checkPinned` verifies it before every later command, here and in `batch-next.ts`; `containedStep` checks the real filesystem before the install and before every step; the real path of an `ia` step's entry must lie inside the worktree (or be the running copy's own); `programIn` is the one rule for every program started (git and `gh` found once per batch, the package manager, a step's program), refusing one whose real path is inside the repository and keeping its canonical real path; every child, in this module and in `batch-next.ts`, starts through `spawnGuarded` (or `spawnGuardedSync` for the probes, which routes a `.cmd` through cmd.exe with `cmdArgument`), which immediately before each spawn checks the program's real path against its canonical path and the checkouts (and refuses a `.cmd` or `.bat` whose real path holds `%`), checks the pinned worktree when the cwd or an argument lies in it, and gives the child `programEnv(batchEnv(env))` with only the PATH entries that lead into no repository of the batch (`childEnv`, falling back to `/usr/bin:/bin` outside Windows when none is left); `batchEnv` drops git's repository-local variables (`GIT_LOCAL_ENV`), `GIT_ASKPASS` and `SSH_ASKPASS` from every child and sets `GIT_TERMINAL_PROMPT=0`, `GCM_INTERACTIVE=never`, `SSH_ASKPASS_REQUIRE=never` and an empty `core.askPass` through `GIT_CONFIG_COUNT` (`NO_PROMPT`); `withoutSshPrompt` adds `GIT_SSH_COMMAND='ssh -o BatchMode=yes'` unless the user names an ssh of their own, and fails closed when its `core.sshCommand` probe cannot run; outside Windows every runner child starts in a session and process group of its own (`detached`), with no controlling terminal, is started with the link it was found through as `argv0` (`Program`), is killed with its group (on Windows `taskkill /T`) at `BATCH_COMMAND_TIMEOUT_MS`, gets SIGINT when the run's abort signal fires, and is killed by a process `exit` listener, which a SIGKILL or a hard crash never runs; `planBatch` takes `gitTop` and `enclosingTop`, which names the work tree around the folder above a repository, null only on git's plain "not a git repository", and a refusal whenever git cannot say; while git still runs with the user's own configuration and hooks (global, system and `includeIf`), which the batch does not constrain: the checkout guarantee covers what the batch runs, not those hooks; and an `ia` step runs on the copy the worktree has at that step. [`batch-next.ts`](src/console/batch-next.ts) holds the choices after a run (commit as `chore: <title>`, push create-only (an empty-lease `--force-with-lease` with `--porcelain`, accepting only a new ref, so a branch already on origin at any commit is a collision) and open PRs through `gh` only after `gh auth status` exits 0, remove the worktrees and keep the branches), and [`batch-screen.ts`](src/console/batch-screen.ts) shows the preview, the progress, the results and those choices in the normal screen. `main.ts`'s `opensConsole` and `enter` decide console or help before dispatch.
127
131
 
128
- `bundled-base.ts` is the shared exact archive reader for init and restore. Restore can acquire the CLI's bundled base without network or a prepopulated cache when the lock matches its package identity, version, archive digest and manifest digest. The reader verifies archive bytes and embedded manifest before caching. Existing corrupt immutable cache content and locked manifest/version mismatches refuse. Other archives keep the existing acquisition rules. An exact unpublished bundled pin is exempt from registry lookup through the existing cached-unpublished rule, online and offline alike.
132
+ `bundled-base.ts` is the shared exact archive reader for init and restore. It reads every published language base the CLI carries (`assets/bases.json`, oldest first, the newest being the bundled base `assets/base.json` names) and the compatibility index (`assets/language-compat.json`, refused unless it is an `inventarch/language` index whose bases are all of its major). Restore can acquire any carried base without network or a prepopulated cache when the lock matches its package identity, version, archive digest and manifest digest; it never rewrites the lock, and a locked base the CLI does not carry and no source supplies refuses naming `ia update inventarch/language`. `update` of the base (also on a fresh clone or a drifted installation, planned as a restore of the new lock) and `install` offer the carried bases beside their source's releases: the same major, never below the locked version, within the workspace's language request, and at or above the minimum the workspace's `.ia/src` records need (`languageFloor`); `update` refuses when no carried candidate reaches that minimum. The reader verifies archive bytes and embedded manifest before caching. Existing corrupt immutable cache content and locked manifest/version mismatches refuse. Other archives keep the existing acquisition rules. An exact unpublished bundled pin is exempt from registry lookup through the existing cached-unpublished rule, online and offline alike.
129
133
 
130
134
  An already-initialized init target names `ia position --root <directory>` in the plan's text and JSON `next` and the apply refusal; a missing authored workspace asks for restoring that file from source control first. The catalog describes the already-initialized refusal and names `ia position --root <directory>`; conflicting files still use init's plan and repair.
131
135
 
package/assets/base.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "inventarch/language",
3
- "version": "3.2.0",
4
- "archive": "7b36e4b4959a7bead1c57906cd346b419f32570dac0ac764af805ad20cd63b16",
5
- "manifest": "03a226569c510efaea971dbc41c353998319c33b77ab636d192b549e50f4e732"
3
+ "version": "3.3.0",
4
+ "archive": "3ada760ec07848770957538a8562ec94c6f3a9ceb6f1e29d2739b217f9234728",
5
+ "manifest": "133e0ec85c27c457ba088623c2f753cb7618d531d1412fa957ad6c6ee7b700ee"
6
6
  }
@@ -0,0 +1,44 @@
1
+ [
2
+ {
3
+ "id": "inventarch/language",
4
+ "version": "3.0.0",
5
+ "archive": "08eaab3e1a6215d78283b82a94a0228367ac7bd78d0a746c56db79c8d7546c3a",
6
+ "manifest": "2acb3aa7ec7d2265e6471520e8cc4f891deb2e4d0f169803e171f4a260de413a"
7
+ },
8
+ {
9
+ "id": "inventarch/language",
10
+ "version": "3.1.0",
11
+ "archive": "7db20e0dbbc2b88701ea24991886b4a8e08d419dda469cce5caff66911f81e4c",
12
+ "manifest": "43373c8bedbf9e817807f246d0886914e4cce02882d811742a2508a1f875293e"
13
+ },
14
+ {
15
+ "id": "inventarch/language",
16
+ "version": "3.1.1",
17
+ "archive": "df626d1dc4949649ba7203842b29b4f064e0552e8db8c2c41ff74b6462b81b75",
18
+ "manifest": "7b83fb727ab8706f7e4e9be2d61deceaa4161753b3634c38aa31ab13e4aff1f6"
19
+ },
20
+ {
21
+ "id": "inventarch/language",
22
+ "version": "3.1.2",
23
+ "archive": "62ecd5092f364b40e335e9e509ef512ac8030eb5689e72a5d0ff1e073cb13cfb",
24
+ "manifest": "3692c75c7b51852351560fa09dc831eb5854e33e2fb6e37cdf0b6bfc8bdb02f2"
25
+ },
26
+ {
27
+ "id": "inventarch/language",
28
+ "version": "3.2.0",
29
+ "archive": "7b36e4b4959a7bead1c57906cd346b419f32570dac0ac764af805ad20cd63b16",
30
+ "manifest": "03a226569c510efaea971dbc41c353998319c33b77ab636d192b549e50f4e732"
31
+ },
32
+ {
33
+ "id": "inventarch/language",
34
+ "version": "3.2.1",
35
+ "archive": "ee6e65018df2ebef705913d9da1947f040edf44c2e7ade6c9750c6fa0185985e",
36
+ "manifest": "b6c5e0cc9149b874c11898e63c19082c9742acaf71bde192a2ec9fa6dd3f9fab"
37
+ },
38
+ {
39
+ "id": "inventarch/language",
40
+ "version": "3.3.0",
41
+ "archive": "3ada760ec07848770957538a8562ec94c6f3a9ceb6f1e29d2739b217f9234728",
42
+ "manifest": "133e0ec85c27c457ba088623c2f753cb7618d531d1412fa957ad6c6ee7b700ee"
43
+ }
44
+ ]
package/assets/host.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "release": "cc93f2d62086930b60a5f2b9db14eff00292ff08ddc0f57032a7df5b0f6e2aa4",
3
- "archive": "44dc1fa77e0235df35e1dd05d5a5ce8c2b19d4545caf0b8579f2f4e1b9efbbc6",
4
- "files": 1900,
5
- "bytes": 11531000
2
+ "release": "f3c91470733b7d5dd9632858b325f48ad96cd8a16ce42e7c4e1ea9c12e60291e",
3
+ "archive": "a6774998d18a78fc4d0d2d261db93aa76b25cc97e324823a7883597a94ccb91c",
4
+ "files": 1839,
5
+ "bytes": 12265391
6
6
  }