@inventarch/cli 1.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/README.md +12 -5
  2. package/SPEC.md +39 -7
  3. package/assets/host/3d2c8530db8d14755410b17be8228a230d88de96f9dc78f953979d3ca7c6ea62.tgz +0 -0
  4. package/assets/host.json +4 -4
  5. package/dist/bundled-base.d.ts +18 -0
  6. package/dist/bundled-base.d.ts.map +1 -0
  7. package/dist/bundled-base.js +44 -0
  8. package/dist/bundled-base.js.map +1 -0
  9. package/dist/capture.d.ts +30 -3
  10. package/dist/capture.d.ts.map +1 -1
  11. package/dist/capture.js +112 -37
  12. package/dist/capture.js.map +1 -1
  13. package/dist/commands.d.ts +23 -1
  14. package/dist/commands.d.ts.map +1 -1
  15. package/dist/commands.js +175 -13
  16. package/dist/commands.js.map +1 -1
  17. package/dist/compile.d.ts +3 -4
  18. package/dist/compile.d.ts.map +1 -1
  19. package/dist/compile.js +29 -70
  20. package/dist/compile.js.map +1 -1
  21. package/dist/consumer.d.ts.map +1 -1
  22. package/dist/consumer.js +9 -2
  23. package/dist/consumer.js.map +1 -1
  24. package/dist/distribute.d.ts +25 -5
  25. package/dist/distribute.d.ts.map +1 -1
  26. package/dist/distribute.js +75 -52
  27. package/dist/distribute.js.map +1 -1
  28. package/dist/doctor.d.ts.map +1 -1
  29. package/dist/doctor.js +113 -60
  30. package/dist/doctor.js.map +1 -1
  31. package/dist/format.d.ts.map +1 -1
  32. package/dist/format.js +2 -1
  33. package/dist/format.js.map +1 -1
  34. package/dist/host-projection.d.ts +73 -6
  35. package/dist/host-projection.d.ts.map +1 -1
  36. package/dist/host-projection.js +296 -38
  37. package/dist/host-projection.js.map +1 -1
  38. package/dist/host.d.ts +100 -30
  39. package/dist/host.d.ts.map +1 -1
  40. package/dist/host.js +235 -120
  41. package/dist/host.js.map +1 -1
  42. package/dist/init.d.ts +280 -35
  43. package/dist/init.d.ts.map +1 -1
  44. package/dist/init.js +1238 -194
  45. package/dist/init.js.map +1 -1
  46. package/dist/main.d.ts.map +1 -1
  47. package/dist/main.js +3 -1
  48. package/dist/main.js.map +1 -1
  49. package/dist/migration-journal.d.ts +35 -0
  50. package/dist/migration-journal.d.ts.map +1 -0
  51. package/dist/migration-journal.js +205 -0
  52. package/dist/migration-journal.js.map +1 -0
  53. package/dist/next.d.ts +21 -0
  54. package/dist/next.d.ts.map +1 -0
  55. package/dist/next.js +210 -0
  56. package/dist/next.js.map +1 -0
  57. package/dist/operation-help.d.ts.map +1 -1
  58. package/dist/operation-help.js +14 -3
  59. package/dist/operation-help.js.map +1 -1
  60. package/dist/pack.d.ts.map +1 -1
  61. package/dist/pack.js +24 -2
  62. package/dist/pack.js.map +1 -1
  63. package/dist/position.d.ts +22 -0
  64. package/dist/position.d.ts.map +1 -0
  65. package/dist/position.js +242 -0
  66. package/dist/position.js.map +1 -0
  67. package/dist/project.d.ts +42 -0
  68. package/dist/project.d.ts.map +1 -0
  69. package/dist/project.js +232 -0
  70. package/dist/project.js.map +1 -0
  71. package/dist/read.d.ts +12 -2
  72. package/dist/read.d.ts.map +1 -1
  73. package/dist/read.js +29 -18
  74. package/dist/read.js.map +1 -1
  75. package/dist/render.d.ts +8 -0
  76. package/dist/render.d.ts.map +1 -1
  77. package/dist/render.js +16 -0
  78. package/dist/render.js.map +1 -1
  79. package/dist/session.d.ts +9 -3
  80. package/dist/session.d.ts.map +1 -1
  81. package/dist/session.js +24 -8
  82. package/dist/session.js.map +1 -1
  83. package/package.json +6 -6
  84. package/assets/host/c5fb2bfbba619cbd558ecc1e94dd2c16e37aa8599b4e423f1f59ed01f2074e03.tgz +0 -0
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # @inventarch/cli
2
2
 
3
- The IA 1.2.0 command-line interface creates workspaces, validates, inspects, reads and captures native records, compiles artifacts, and manages native distributions and host registrations. It requires Node.js 22.22.0 or later within Node 22.
3
+ The IA 2.0.0 command-line interface creates workspaces, validates, inspects, reads and captures native records, shows the position body for a scope key and a plan's delivery view, projects the position packet for an IDE host, and manages native distributions and host registrations. It requires Node.js 22.22.0 or later within Node 22.
4
4
 
5
- Install the [published package](https://www.npmjs.com/package/@inventarch/cli) globally with `npm install --global @inventarch/cli@1.2.0` to use `ia` across projects. For a project-local installation, run `npm install --save-dev --save-exact @inventarch/cli@1.2.0` in your JavaScript or TypeScript repository and use `npx ia` in place of `ia`. Either way, each initialized project keeps its own records in `.ia/`.
5
+ Install the [published package](https://www.npmjs.com/package/@inventarch/cli) globally with `npm install --global @inventarch/cli@2.0.0` to use `ia` across projects. For a project-local installation, run `npm install --save-dev --save-exact @inventarch/cli@2.0.0` in your JavaScript or TypeScript repository and use `npx ia` in place of `ia`. Either way, each initialized project keeps its own records in `.ia/`.
6
6
 
7
7
  The [main quick start](https://github.com/inventarch/ia#-quick-start) walks through initialization, a first record, validation and VS Code setup. To run from a source checkout, run `pnpm install --frozen-lockfile` and `pnpm build`, then use `node /path/to/ia/apps/cli/dist/main.js` in place of `ia`.
8
8
 
@@ -14,15 +14,22 @@ ia validate --root demo
14
14
  ia capture --root demo
15
15
  ia inspect --root demo
16
16
  ia read agent-system/binding/agent/public-agent-system-steward --root demo
17
+ ia project claude --root demo
17
18
  ia vocabulary plan --schema
18
19
  ```
19
20
 
20
- `init` previews changes unless `--apply` is supplied. Its language base, `inventarch/language` 1.2.0, is bundled with the CLI, so creating a workspace needs no registry connection. Place authored `.ia` files in the generated `.ia/src/systems/demo/` directory. The starter system already requires the agent, work and workspace vocabularies, and its `@workspace` record composes the eleven public systems.
21
+ `init` previews changes unless `--apply` is supplied. Its language base, `inventarch/language` 1.2.0, is bundled with the CLI, so creating a workspace needs no registry connection. It authors three records in `.ia/src/workspace.ia`: the `@workspace demo` record, which composes the eleven public systems and declares `.ia/src` as its authored source, the participant `@agent demo`, the IDE agent working in it, and that agent's `@mandate demo-mandate`. Place authored `.ia` files beside it anywhere under `.ia/src/` except `.ia/src/floor/`, which would replace the embedded language floor, and `.ia/src/systems/`, where every folder must be a system folder with its own `system.ia`; a record's word decides which system owns it. `init` also writes `.ia/.gitignore` (ignoring `work/` and `distributions/`) unless one exists, then captures the workspace, and with `--host` writes that host's projection. `--system` adds a local `@system demo`, its steward and a `@distribution` in `.ia/src/systems/demo/` for a repository that will release vocabulary, and the `@workspace` composes that system too; without it the workspace releases nothing, and `ia pack` refuses. `ia init --migrate` previews, and with `--apply` makes, the move of a workspace an IA 1.0 or 1.1 `ia init` created to this shape: where the workspace has a 1.x language base, whose schemas lack fields the three records use, it first installs the bundled one in its place, then its own record files leave `.ia/src/systems/demo/records/` for `.ia/src/`, keeping their identities, the three records replace the 1.1.0 `@workspace` and `@distribution`, and the local system goes unless `--system` keeps it. It then captures the workspace and re-projects each registered host, which retires the 1.1.0 steward guard and deletes the steward agent files. A workspace of any other shape is refused before anything is written, and so is one with a file in the way or one that already holds an `@agent demo` or `@mandate demo-mandate` of its own, which would tie with the new records.
21
22
 
22
- `ia capture` writes the admitted snapshot, with each record's digest and capture membership, to `.ia/work/snapshot/current.json` and keeps the most recent capture at another revision as `previous.json`; it reports how many records changed since the prior capture. It refuses, writing nothing, a directory whose `.ia/src` declares no `@workspace` and a floor, installed or adopted source that fails to parse; any other finding is written into the snapshot. `ia compile` still writes the 1.x `ia.compiled.v1` artifact, unchanged, and is deprecated in favour of `ia capture`: it prints one deprecation line on stderr, and in 2.0 it becomes an alias of `ia capture`.
23
+ `ia capture` writes the admitted snapshot, with each record's digest and capture membership, to `.ia/work/snapshot/current.json` and keeps the most recent capture at another revision as `previous.json`; it reports how many records changed since the prior capture. `ia capture --preview` reports the same counts and names the changed, new and removed identities without writing anything, so the previous snapshot is not rotated away. It refuses, writing nothing, a directory whose `.ia/src` declares no `@workspace` and a floor, installed or adopted source that fails to parse; any other finding is written into the snapshot. `ia compile` is a deprecated alias of `ia capture`, removed in 3.0: it runs the capture, `--preview` and `--json` included, and prints one deprecation line on stderr. It no longer writes the 1.x `ia.compiled.v1` artifact. `--force` changes nothing, because the capture always writes, and `--out` and `--stdout` are refused (exit 2) with the `ia capture` command to run instead.
23
24
 
24
25
  `ia read <locator>` prints the body behind a locator with its SHA-256 and the line `body not certified by this read`: the text of one cell (`<identity>#<phase>/<Primitive>`) or one requirement (`<identity>#<REQ-ID>`); else the document a record's source locator names (`work.source` on a `@spec`, `@plan`, `@milestone`, `@task` or `@decision`, `reference.document`, `template.resource`), only the section under its heading when the locator carries a markdown anchor, and for an adopted record from the directory `.ia/workspace.json` binds its mount to; else the record's own `meaning.says`. `<path>:<line>` reads the record whose source spans that line. It writes nothing, and `ia inspect` keeps the record's structure.
25
26
 
26
- Use `ia --help` or `ia <command> --help` for the complete command syntax. `--json` returns structured output; applying a plan noninteractively requires `--yes`. Every consumer command refusal names the one command to run next, in `next` with `--json` and on the `→` line otherwise; the nine machine operations keep their one-line JSON. A recovery names `ia-distribution`, the binary of `@inventarch/distribution`, which a global install of `@inventarch/cli` does not put on `PATH`. `ia doctor` reports observed state and suggested repairs. Host registration is explicit through `ia host claude`, `ia host codex` or `ia host cursor` and their `--apply` option.
27
+ `ia position [--seat <id|path>] [--shape <H>] [--phase <P>] [--depth <d>] [--budget <n>] [--word <w>]` prints the position body for a scope key: with no flag K0, the repository's workspace with its pointers and tallies only; otherwise the seat and the records loaded within the budget, the pointers past it (48 listed, the rest tallied), the rules and playbooks that apply by word with their playbook cells, the blocking rules reserved outside the budget, the mandates, the frontier and the unknowns. It prints the key used and the capture's freshness first, and the two widening keys last as `ia position` commands. `--word` restricts what loads, the pointers, their tallies and the frontier to one word, and never the reserved rules, the rules and playbooks that apply by word with their tallies and cells, or the mandates, so a word hides no blocking rule. With `--json` it prints `{version: 1, ok: true, body, digest, hostNote}`, what the runtime Door's `position` operation returns. A shape, phase, depth or budget outside its closed set or cap names the same call with the set or the cap in its place. It needs no capture and writes nothing, and `ia scope` stays the machine route.
28
+
29
+ `ia next [--seat <plan|milestone|task>]` prints one plan's delivery view, computed per read and never stored: the plan `--seat` belongs to, or without it the only `@plan` the workspace authors; its milestones; its tasks in prerequisite order, each with its verdict (`exit evidence recorded (…)`, `no declared blocker` or `blocked (…)`), a basis line per requirement, its `work.status` marked self-declared, which is never the verdict's basis, and five state lines; the review items; and the command for the next task with no declared blocker. Exit evidence is a success `@observation` on the task at its current digest. With `--json` it prints `{version: 1, ok: true, view}`, the view the runtime Door's `next` operation returns. A workspace `ia init` creates authors no plan, so there `ia next` names the records to author. It writes nothing.
30
+
31
+ `ia project <claude|codex>` plans the workspace's position packet for one host and writes nothing: the packet's entry count and digest, each file it would create, update, leave unchanged or delete (a marked agent file a 1.x `ia host` wrote), every other `.claude/agents` file, which it leaves in place, and whether it first retires the steward guard an earlier release registered. `--apply` writes the files, `.claude/rules/ia-workspace.md` and the `ia-authoring` skill for Claude or `AGENTS.md` and its skill for Codex, and the receipt `.ia/distributions/hosts/<host>-receipt.json`, which `ia doctor` compares with the files and with a fresh render, so an edit to a record shows as an outdated projection. A file it did not write at one of those paths is named in the plan and refused by `--apply`. It registers no MCP server; `ia host` registers one and writes the same projection.
32
+
33
+ Use `ia --help` or `ia <command> --help` for the complete command syntax. `--json` returns structured output; applying a plan noninteractively requires `--yes`. Every consumer command refusal names the one command to run next, in `next` with `--json` and on the `→` line otherwise; the nine machine operations keep their one-line JSON. A recovery names `ia recover installation|host|guard|lifecycle --root <directory>`, which runs `@inventarch/distribution`'s recovery, so a global install of `@inventarch/cli` needs no `ia-distribution` binary on `PATH`. `ia doctor` reports observed state and suggested repairs. Host registration is explicit through `ia host claude`, `ia host codex` or `ia host cursor` and their `--apply` option. The projection it writes is the workspace's position packet (`.claude/rules/ia-workspace.md` or `AGENTS.md`, beside the `ia-authoring` skill), with a receipt in `.ia/distributions/hosts/<host>-receipt.json` that `ia doctor` checks; no per-system steward agent is written. `ia host` no longer registers the steward guard, and applying a projection, the refresh after `ia install`, `ia update` or `ia remove` included, retires one an earlier release registered and deletes the steward files it projected (each plan says so first), so edits under `.ia/src/systems/` are not blocked until a later release re-keys the guard to `@mandate` scope.
27
34
 
28
35
  See [the package contract](SPEC.md) for command behavior, [the packaged language summary](LANGUAGE.md) for the words this release ships, and the [language guide](https://github.com/inventarch/ia/blob/main/docs/reference/language/README.md) for native syntax and evaluation limits.
package/SPEC.md CHANGED
@@ -6,30 +6,35 @@ The `ia` binary exposes consumer commands and the structured agent query protoco
6
6
 
7
7
  | Command | Behavior |
8
8
  | --- | --- |
9
- | `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>`). `--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. |
9
+ | `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>`). `--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 starter (2026-10-09, milestone position-packet task init-three-records; position-and-projection §3; plan amendments B7 and B13; decisions local-system-at-init and identity-namespace) is exactly 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. `.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, milestone position-packet task init-migrate-flag; position-and-projection §2 case 2), 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 (plan amendment B8), 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, or six with `--system`), `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, milestone position-packet task init-migrate-flag; plan amendments B7, B9 and B11; decision local-system-at-init) 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 on the distribution binary, 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. 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; 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 says which writes and deletes it made, the base install included, since nothing is rolled back, and names `validate --root <root>`, or, when the base install is all it made and the records are still the 1.1.0 starter's, the rerun of the migration; a migrated workspace that fails admission names `validate --root <root>` too, saying neither effect ran; an effect that fails or is interrupted leaves every earlier result in place, says so, and names its own command, `capture --root <root>` or `host <host> --root <root> --apply`. 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. |
10
10
  | `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). |
11
- | `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 workspace revision), `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` writes no ignore rule for it, so a repository that keeps the snapshot out of version control lists `.ia/work/` in its own ignore file. 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 (position-and-projection §5 and §11): 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. Design §5's `--preview`, which would report the capture without writing it, is not implemented in this release. |
12
- | `compile` | Deprecated in favour of `capture`, and unchanged in 1.x: write a deterministic `ia.compiled.v1` artifact to `.ia/work/compiled.json`, to `--out <file>` under `.ia/work/` (a path outside it refuses with `IA-DIST-PATH-UNSAFE`, exit 3), or alone on stdout with `--stdout`; `--out` and `--stdout` together are a usage error (exit 2). An existing artifact refuses with `IA-DIST-LOCAL-MODIFICATION` (exit 3) unless `--force` overwrites it. With `--json` the result is `{version: 1, artifact, revision, digest, counts}`, `artifact` being the absolute path written; admission errors still write the artifact and exit 1. Whenever it runs to a result it also prints one line on stderr, in every output mode, `--json` and `--stdout` included, naming `ia capture`, so stdout is exactly what 1.x wrote there; a refusal prints only the refusal. It never writes the capture's snapshot, and `capture` never writes the artifact. In 2.0 `compile` becomes a deprecated alias of `capture`, removed in 3.0. |
11
+ | `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 workspace revision), `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 (position-and-projection §5 and §11): 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` (decision capture-preview-placement) 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. |
12
+ | `compile` | Deprecated alias of `capture` from 2.0, removed in 3.0 (decision compile-verb-fate). It runs `capture` with the same root and output mode, `--preview` included, so stdout, exit and refusals are `capture`'s; whenever it runs to a result it also prints one line on stderr naming `ia capture`, and a refusal prints only the refusal. Of the 1.x options, `--force` is accepted and changes nothing, because `capture` always writes; `--out <file>` and `--stdout` refuse with `IA-CLI-USAGE` (exit 2) before the workspace is read, naming the `ia capture` command to run instead, and together they remain the usage error naming `ia compile --help`. It no longer writes the 1.x `ia.compiled.v1` artifact; `@inventarch/cli/internal/compile` keeps that builder's exports for one major. |
13
13
  | `format [path...]` | Check formatting by default; rewrite with `--write`. |
14
14
  | `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. |
15
- | `read <locator>` | Print the body behind a locator (position-and-projection §5, design row 23): 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`, then prints the body as read; 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, and any other path names no admitted record. Design §11 names `ia scope --seat <qname> --shape context` after a read refusal; until the consumer position verb lands, these refusals name the `ia inspect` and `ia validate` commands above instead. |
15
+ | `read <locator>` | Print the body behind a locator (position-and-projection §5, design row 23): 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. Design §11 names `ia scope --seat <qname> --shape context` after a read refusal; these refusals name the `ia inspect` and `ia validate` commands above, which locate the record or the finding, instead. |
16
+ | `position` | Print the position body for a scope key (position-and-projection §1, §6 and §7, design item 10; decisions scope-key-caps and scope-verb-dispatch): 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 (plan amendment A2). The key is K = (seat, shape, phase, depth, budget, word), read from `--seat <id\|path>`, `--shape <H>`, `--phase <P>`, `--depth <d>`, `--budget <n>` and `--word <w>` 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 shape's 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, plan amendment A9; `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 or phase 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`. |
17
+ | `next` | Print one plan's delivery view (position-and-projection §9 step 2, design rows 21 and 22), 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 (decision conditional-relations-in-delivery, 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 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 (plan amendment A2). |
18
+ | `project <claude\|codex>` | Plan, or with `--apply` write, the workspace projection alone (2026-10-09, milestone position-packet task ia-project-verb; position-and-projection §5's project effect, design items 11 and 12; plan amendments B1, B5, B8, B11 and B12): 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 (B1's formula, 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` renders and plans again (`replanProjection`, shared with `host --apply`), writes through `applyHostProjection`, and prints the receipt: its files with their SHA-256, the legacy files removed, the foreign files and the retirement. It registers no MCP server and no hook, and needs no capture, because the packet reads the live revision (B8). With `--json` it prints `{version: 1, command: 'project', root, host, apply, plan: {entries, packetDigest, files, guard, 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/release.json` is `IA-CLI-CONFLICT` naming `ia init` of the root as given. 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 `ia-distribution` recovery with the resolved root, which `ia-distribution` requires to be absolute, as `host` does, and a workspace whose sources cannot be opened names the resolved root, as every workspace verb does. |
16
19
  | `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. |
17
20
 
18
- Workspace discovery uses the nearest ancestor containing `.ia/src`, with `--root` selecting an explicit root where supported. Native syntax is `#! ia 1.0`. Initialization writes a consumer-local system, starter records and release descriptor, and installs the pinned bundled language base, `inventarch/language` 1.2.0, which supplies the eleven public systems. A new consumer distribution starts at its own 0.1.0 version, independently of the CLI version.
21
+ Workspace discovery uses the nearest ancestor containing `.ia/src`, with `--root` selecting an explicit root where supported. Native syntax is `#! ia 1.0`. Initialization writes the three starter records, an ignore file and the release descriptor, installs the pinned bundled language base, `inventarch/language` 1.2.0, which supplies the eleven public systems, and captures the workspace; `--system` adds a consumer-local system and its distribution, and `--migrate` rewrites a 1.1.0 starter into this shape. A new consumer distribution starts at its own 0.1.0 version, independently of the CLI version.
19
22
 
20
23
  ## Distribution commands
21
24
 
22
- `pack --descriptor <file>` writes a digest-named archive, by default under `.ia/work/dist`. `install`, `update` and `remove` preview a plan and apply it only with `--apply`; `--plan-out <file>` keeps the plan under `.ia/work/`. `restore --apply` reinstalls the locked generation from pinned archives; it has no preview, and `--allow-withdrawn` accepts a withdrawn release. Catalog, offline-cache and configured registry sources are explicit options. The native package IDs and versions in these commands are separate from npm package names and the CLI version.
25
+ `pack --descriptor <file>` writes a digest-named archive, by default under `.ia/work/dist`. A release descriptor, as the database decodes it, that names no `distribution`, which a default `init` writes (plan amendment B7), is refused as `IA-CLI-CONFLICT` (exit 3), located at the descriptor, before the packer reads anything else, naming `ia vocabulary distribution`: a release needs a `@distribution` in a system folder whose identity the descriptor names, which `init --system` authors; a file that is no release descriptor is left to the packer's own refusal. `install`, `update` and `remove` preview a plan and apply it only with `--apply`; `--plan-out <file>` keeps the plan under `.ia/work/`. `restore --apply` reinstalls the locked generation from pinned archives; it has no preview, and `--allow-withdrawn` accepts a withdrawn release. Catalog, offline-cache and configured registry sources are explicit options. The native package IDs and versions in these commands are separate from npm package names and the CLI version.
23
26
 
24
27
  `host <claude|codex|cursor>` previews a workspace registration and requires `--apply` to write it; `--remove` plans removal of the host set it owns. For Claude, `--context <identity>` selects the lifecycle context element of a workspace registration, and `host claude --user` registers a user-level plugin that needs no workspace. `doctor` observes runtime, workspace, install and host state without repairing it or treating a written registration as an answering server; `--host` adds that host's session briefing and next actions. Unknown update or host observations stay unknown.
25
28
 
29
+ The workspace projection (2026-10-09, milestone position-packet task replace-renderers; position-and-projection §4; plan amendments B9, B11 and B12; decisions hook-generation and packet-tracking-policy) 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>/`, so system folders are unprotected until generation-hook-governance re-keys the guard to `@mandate` scope. `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 (task ia-project-verb), 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.
30
+
26
31
  ## Automation and limits
27
32
 
28
33
  `--help` and per-command help describe the accepted argument grammar. Consumer `--json` output is a single structured value without interactive prompts; applying without a terminal or with `--json` requires `--yes`. `--no-color` (or `NO_COLOR`), `--color`, `--ascii` and `--quiet` adjust human-readable output. Validation errors exit 1 (warnings alone exit 0), usage failures exit 2, unavailable inputs and local operational refusals exit 3, and interruption exits 130. Automation should inspect the structured diagnostic code and exit value together.
29
34
 
30
35
  Every consumer refusal names one next command. With `--json` a refusal is `{version: 1, ok: false, code, message, exit, where, next}` and `next` is always a non-empty string; human output prints the same text on the `→` line, where the command it quotes is never broken across lines and runs past the line width when it must. The text quotes exactly one command and spells no other command or option outside it. That command is `ia …`, except that a recovery or a directory registry repair names `ia-distribution …`, the binary of `@inventarch/distribution`; a global install of `@inventarch/cli` does not put that binary on `PATH`, so such a command runs only where `@inventarch/distribution` is installed as well. The command carries the values this invocation supplied that it needs, such as the root (`ia init`'s `<directory>` included), the host, the package ids, the registry or catalog source, the descriptor or `--force`, so it runs from the directory the refused command ran in. Except where an unknown or interrupted command keeps the invocation as typed (below), a command that reruns the refused one repeats no output flag such as `--json` or `--quiet`, and one that runs the refused `ia install` or `ia update` again names its plan, without `--apply`: the plan applies nothing, although acquiring may fill the archive cache and `--plan-out` writes the plan file. A rerun of `ia restore`, which has no preview, carries `--apply --yes`; the rerun after deleting a cached archive drops `--offline`, so the archive is fetched again. A placeholder such as `<directory>`, `<path>`, `<file>` or `<url|dir>` stands only for the value the user has to correct or supply. A manual step the CLI cannot take, such as deleting or moving a named file, replacing a link under `.ia/src`, mapping a provider in `.ia/registries.json` or setting `IA_HOME`, may come first, and an explanation may follow. An unknown command names the nearest one with the rest of the invocation as typed, keeping only `--root` and `--params` for a machine operation. A workspace whose sources cannot be read (a link or alias under `.ia/src`, a source that changed during the read) names that repair and then `ia validate` with that root, which confirms the workspace opens. A service refusal that carries no next action of its own names the refused command's `--help` for a usage error, `ia validate` for a record finding (`IA-COMP-*`, `IA-GRAPH-*`, `IA-LANG-*`) and `ia doctor` for any other code, each with the root the invocation gave: its `--root`, or `ia init`'s `<directory>`. An interrupted command (`IA-CLI-INTERRUPTED`, exit 130) carries `next` in its JSON object and on its one stderr line: the rerun that finishes work already written, or otherwise the same invocation as typed, with any `--apply`, `--yes` and `--json` it was given. A file the invocation named that is not there (a `--descriptor`, `--catalog` or `--requests` file) names the same command with that one value as `<file>`. The machine protocol below is unchanged; its failures are the door's own one-line JSON and carry no `next`, so "every refusal names one next command" holds for the consumer commands. `@inventarch/cli/internal/consumer` keeps its 1.x forms: the `Refusal` constructor's `where` and `next` default to null, `refusalOf(error)` without the refused invocation returns a null `next` as before, and `renderRefusal` gives a refusal without a next action the fallback above, so `--json` `next` is always a string; every construction site in this CLI names its next action, which its tests enforce. `PlanRequest.reruns` in `@inventarch/cli/internal/distribute` is optional, and without it a plan's remedies are spelled from the request.
31
36
 
32
- The machine protocol, version 1, serves `scope`, `context`, `select`, `get`, `records`, `resolve`, `search`, `traverse` and `report`. Each takes its JSON parameters through `--params <JSON>`, or `--params -` for stdin, and prints one JSON line without color. `ia <operation> --help` lists an operation's parameters, refusals with their exit values, and an example; `ia <operation> --schema` prints its parameter schema. Scope tokens last for one invocation. These read operations do not invoke a model or grant host permissions. Only the CLI serves `report`; the MCP door does not. Generic structural validation does not attest evidence or execute a declared check.
37
+ The machine protocol, version 1, serves `scope`, `context`, `select`, `get`, `records`, `resolve`, `search`, `traverse` and `report`. Protocol version 2 appends `read`, `next` and `position`, which the runtime Door and the MCP door (`ia_read`, `ia_next`, `ia_position`) serve; `read`, `next` and `position` are the consumer verbs `ia read`, which returns the Door's body and digest and refuses a document the Door refuses with the same code, `ia next`, which prints the Door's delivery view, and `ia position`, which prints the Door's position, never machine routes, so the nine routes, their usage, help and schema, which still describe them at version 1, are unchanged; handed a later row, the published `@inventarch/cli/internal/operation-help` renderers describe it at the version its `since` names. The machine routes open the Door at protocol version 1, so `read`, `next` and `position` through `runCli`, which `@inventarch/cli/internal/main` exports and the host launcher's `door` mode calls, are refused as the unknown operation 1.1.0 refused, byte for byte. Each takes its JSON parameters through `--params <JSON>`, or `--params -` for stdin, and prints one JSON line without color. `ia <operation> --help` lists an operation's parameters, refusals with their exit values, and an example; `ia <operation> --schema` prints its parameter schema. Scope tokens last for one invocation. These read operations do not invoke a model or grant host permissions. Only the CLI serves `report`; the MCP door does not. Generic structural validation does not attest evidence or execute a declared check.
33
38
 
34
39
  Commands that start another program (`git` for `init` and `doctor`, `claude` for `host claude --user`) look it up only on fully qualified `PATH` entries and run it by absolute path from the user's home directory. An empty or relative entry, which would name the working directory, is never searched.
35
40
 
@@ -37,8 +42,35 @@ Commands that start another program (`git` for `init` and `doctor`, `claude` for
37
42
 
38
43
  A `@mandate` may declare its authority as closed moves. Each mandate mode maps to one kernel move: read → Observation, validate → Verification, author → Synthesis, effect → Execution, re-seat → Delegation. The runtime publishes this table as `MODE_MOVES` beside `mandateRefusal`. The modes are not commands: this release assigns no command to a mode, and that assignment lands with the verbs that consult `mandateRefusal`. `mandateRefusal` refuses a mode whose move the mandate does not list (`IA-RUNTIME-MANDATE-MOVE`) or a word the mandate excludes (`IA-RUNTIME-MANDATE-WORD`) and names `ia inspect <mandate> --edges both` as the next command. A mandate without `authority.moves` restricts no move, a declared list names at least one move, excluded words are refused whatever the moves, and a mandate adds closed restrictions only; it never grants host permissions. Enforcement arrives with the authoring verbs; no command in this release consults a mandate.
39
44
 
45
+ The command table also holds the position packet's command catalog (runtime SPEC R19; plan amendment B5): `init`, `capture` and `project` (effect, Execution), `validate` (validate, Verification), and `read`, `position` and `next` (read, Observation), seven rows, each carry their mode, its move, a one-line summary of their main refusal and the one command that refusal names, which `packetCatalog` in `@inventarch/cli/internal/commands` lists in table order for the runtime's `renderPacket`. The machine routes are no catalog rows. `ia host`, `ia project`, `ia init --host`, `ia doctor` and the install, update and remove refresh render the packet through `renderProjectionFor` (the workspace projection above); a catalog tag changes no help text. The capture catalog row covers only an uninitialized root with no authored `@workspace` and no source errors, and names `ia init <directory>`; an initialized root missing its authored workspace instead restores that source before `ia position`, and source errors name `ia validate`. Each row still describes one refusal and one next command.
46
+
40
47
  ## Path selections
41
48
 
42
49
  A path selection is the text a record states to claim locations: `covers` on a `@mandate` (`authority.covers`), a `@law` or `@convention` (`subject.covers`) and a `@spec` (`work.covers`), and `paths` on a `@hook`. A `@check`'s `scope` is required prose in its schema, not a path selection, so a check claims no location. These are the glob semantics every consumer of a location seat reads (position-and-projection row 17). A selection is a workspace-relative path whose segments are separated by `/`, and a `\` reads as `/` in both the selection and the path matched. `**` as a whole segment matches any number of segments, none included; `*` matches any run of characters within one segment; `?` matches exactly one character; every other character matches itself, case-sensitively. A trailing `/` selects the directory and everything below it, so `docs/` and `docs/**` select `docs` and `docs/guide.md`; a selection without wildcards selects exactly that path. Braces, character classes, escapes and negation are not part of the dialect, and a leading dot is not special. An empty or absolute selection, or one with an empty, `.` or `..` segment, selects nothing, and nothing selects a path that is absolute or escapes the workspace. The graph package implements the dialect (`selects`, graph SPEC G06c), and the database resolves a path to the seat it is declared at and its claimants with it (`resolveSeat`, db SPEC D02b). No command in this release resolves a path to its seat; `read`'s `<path>:<line>` names the record that spans a line of an admitted source, not a seat.
43
50
 
44
51
  Package tests cover parsing, JSON output, initialization and recovery, workspace inspection and formatting, distribution planning/application, host registration, installation and recovery, and the program lookup above. Repository qualification separately exercises built and installed artifacts. External registry publication and each host's own runtime behavior require separate evidence.
52
+
53
+
54
+ Projection upgrade repair contract (PR #30): both Claude settings locations are checked for an unmatched IA guard before steward files change. An unowned guard refuses at its settings file and names removal of only that group. Receipt and pending-evidence path kinds, ancestors and writability are checked before retirement. A digest-validated `<host>-receipt-pending.json` preserves retirement intent and accepted removal hashes across interrupted applies; a successful receipt consumes that evidence, and a final receipt digest recognizes publication completed before pending cleanup. A subsequent ordinary successful apply retains last-apply semantics. Doctor reports observed changed files even without a receipt. Pending host journals name their recovery before any file remedy; raw filesystem permissions and locks name writability/lock repair, never deletion of settings. Install/update/remove previews include `projectionFiles` rows for removed and foreign legacy files in JSON and text.
55
+
56
+ ## PR30 migration recovery and portability corrections
57
+
58
+ These corrections supersede the earlier init migration failure and ignore descriptions above. `init --migrate` refuses edited legacy workspace or distribution text before writing: stock text with a changed `composition.systems` list is supported, but authored prose, answers, comments, relationships and distribution customization require an explicit authored migration. Plan lists the exact conflicting file; apply leaves its bytes intact. Kept records whose fields or relationships reference the local system, steward or distribution that plain migration would delete are conflicts naming both identities and the source file; `--system` retains those identities. Stock deletion without `--system` remains intentional.
59
+
60
+ Before any migration mutation, `migration-journal.ts` writes `.ia/migration.json`, an operation record bound to the absolute root, `--system` choice and exact bundled base. It holds the original plan, exact before/after file bytes and SHA-256 digests, directory removals and a durable cursor. Plan and resume verify the journal schema and digest, all completed states and pending preconditions before writes; only the cursor operation may already match its after state, covering termination between mutation and cursor publication. Edited destinations, corrupt journal data, changed flags, links and mismatched base refuse. Every file operation rechecks these states. The journal records initial host receipt digests and exact planned removal digests. A migrated receipt is recovered only when its render fields, current file digests, removed files and guard outcome match the plan; completed receipt digests prevent a later edit from being adopted, and successful receipts are preserved on resume. The journal survives descriptor, admission, capture and projection; file/effect interruption names the same migration apply command, with host transaction recovery first when required. A successful migration clears the journal only after all effects complete. Admission errors still require repairing the findings before the migration can finish. No rollback or adoption of matching files without the operation journal is implied.
61
+
62
+ When a migration creates `.ia/.gitignore`, tracked distribution payload stays visible to Git: it omits `distributions/` when `.ia/distributions` is already tracked. It never removes files from Git's index and preserves an existing ignore file. Before mutation a tracked installation whose existing ignore rules would hide new generations is refused with the rule to repair; inability to verify Git state in a checkout also refuses. A tracked installation whose effective Git attributes, filters, encoding or CRLF configuration could rewrite immutable bytes is refused with a scoped `.gitattributes` remedy for `.ia/distributions/**` and `.ia/distributions.lock.json`; existing attributes and Git configuration are never rewritten.
63
+
64
+ `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.
65
+
66
+ 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.
67
+
68
+ The missing-authored-workspace refusal of `capture` also distinguishes an initialized root by its release descriptor: restore its authored source from source control, then inspect it with `ia position`; it does not route that case through init.
69
+
70
+ The migration Git preflight enumerates every exact prospective store file from the verified bundled archive or locked manifests, and computes the exact generation directory and its lock, inputs and optional workspace files. Ignore and conversion checks receive this complete path inventory through bounded NUL-delimited Git stdin, so selective directory, filename and extension rules cannot bypass synthetic probes. Refusals preserve existing ignore files, attributes and Git index.
71
+
72
+ Migration projection receipts include verified pending apply evidence when an earlier projection already retired the guard or removed stewards. An owned path already absent at migration start contributes no invented deletion digest. Completed projections are verified against their receipt and ownership state before reuse; if a repaired capture changes only their rendered host notes, migration refreshes them with the original retirement and removal evidence. The journal reopens that host effect before refresh, and the normal pending receipt preserves evidence through another interruption. User-modified projected bytes still refuse. Ordinary later projection applies keep last-apply receipt semantics.
73
+
74
+ CLI-only installation recovery: `ia recover [installation|host|guard|lifecycle] --root <directory>` delegates directly to the corresponding existing distribution recovery mechanism. The default mode is installation. The root is required and may be an incompletely initialized directory; recovery does not require source admission or an apply confirmation. Existing journal validation, rollback/forward selection, dead-lock cleanup and live-owner refusal remain the mechanisms' decisions. CLI refusals and doctor remedies use this installed `ia` route, including quoted paths with spaces, rather than assuming a transitive dependency exposes `ia-distribution` on PATH. The bridge has no position-packet catalog tag and does not change the frozen machine routes.
75
+
76
+ Receipt preflight validates the nontruncating opened destination handle, its current pathname and directory ancestor identities before accepting it. A concurrent replacement, new hardlink or linked ancestor refuses before guard retirement; the probe closes its handle on success and failure and preserves Windows sharing-lock detection.
package/assets/host.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "release": "c2cd0d91def624f2f04c1335696138ec919c238a48c705c7320851c68ef702b3",
3
- "archive": "c5fb2bfbba619cbd558ecc1e94dd2c16e37aa8599b4e423f1f59ed01f2074e03",
4
- "files": 1212,
5
- "bytes": 6444032
2
+ "release": "cb1cf777e1b773d16250089e02469a5e88b8addcc4f74ce008055dad9f447bac",
3
+ "archive": "3d2c8530db8d14755410b17be8228a230d88de96f9dc78f953979d3ca7c6ea62",
4
+ "files": 1240,
5
+ "bytes": 7259919
6
6
  }
@@ -0,0 +1,18 @@
1
+ export declare const PIN_PATH = "assets/base.json";
2
+ export declare const baseArchivePath: (digest: string) => string;
3
+ export declare const PACKAGE_ID: RegExp;
4
+ export declare const DAMAGED = "The ia installation is damaged; run \"ia doctor\" for its install channel and reinstall @inventarch/cli through it.";
5
+ export interface BasePin {
6
+ readonly id: string;
7
+ readonly version: string;
8
+ readonly archive: string;
9
+ readonly manifest: string;
10
+ }
11
+ export interface Base {
12
+ readonly pin: BasePin;
13
+ readonly bytes: Buffer;
14
+ /** The systems the bundled manifest carries, sorted, which the starter composes and the descriptor externalizes. */
15
+ readonly systems: readonly string[];
16
+ }
17
+ export declare function readBase(packageRoot: string): Base;
18
+ //# sourceMappingURL=bundled-base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundled-base.d.ts","sourceRoot":"","sources":["../src/bundled-base.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,QAAQ,qBAAqB,CAAC;AAC3C,eAAO,MAAM,eAAe,GAAI,QAAQ,MAAM,KAAG,MAAwC,CAAC;AAC1F,eAAO,MAAM,UAAU,QAAwC,CAAC;AAChE,eAAO,MAAM,OAAO,wHACiG,CAAC;AACtH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AACD,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,oHAAoH;IACpH,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AACD,wBAAgB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAmDlD"}
@@ -0,0 +1,44 @@
1
+ /** Exact packaged base acquisition shared by init, migration and restore. */
2
+ import { existsSync, readFileSync } from 'node:fs';
3
+ import { resolve } from 'node:path';
4
+ import { verifyArchive } from '@inventarch/distribution/archive';
5
+ import { Refusal } from './consumer.js';
6
+ import { codeOf } from './session.js';
7
+ export const PIN_PATH = 'assets/base.json';
8
+ export const baseArchivePath = (digest) => `assets/base/${digest}.ia.tgz`;
9
+ export const PACKAGE_ID = /^[a-z][a-z0-9.-]*\/[a-z][a-z0-9-]*$/;
10
+ export const DAMAGED = 'The ia installation is damaged; run "ia doctor" for its install channel and reinstall @inventarch/cli through it.';
11
+ export function readBase(packageRoot) {
12
+ const pinPath = resolve(packageRoot, PIN_PATH);
13
+ let pin;
14
+ try {
15
+ const value = JSON.parse(readFileSync(pinPath, 'utf8'));
16
+ const keys = Object.keys(value).sort().join(',');
17
+ if (keys !== 'archive,id,manifest,version' ||
18
+ !Object.values(value).every((item) => typeof item === 'string') ||
19
+ !PACKAGE_ID.test(String(value['id'])))
20
+ throw new Error('unexpected fields');
21
+ if (!/^[a-f0-9]{64}$/.test(String(value['archive'])) || !/^[a-f0-9]{64}$/.test(String(value['manifest'])))
22
+ throw new Error('malformed digest');
23
+ pin = value;
24
+ }
25
+ catch (error) {
26
+ throw new Refusal('IA-CLI-FAILED', `The bundled base package pin cannot be read: ${error instanceof Error ? error.message : String(error)}`, 3, { path: pinPath }, DAMAGED);
27
+ }
28
+ const archivePath = resolve(packageRoot, baseArchivePath(pin.archive));
29
+ const bytes = existsSync(archivePath) ? readFileSync(archivePath) : Buffer.alloc(0);
30
+ try {
31
+ const verified = verifyArchive(bytes, pin.archive);
32
+ if (verified.manifestDigest !== pin.manifest ||
33
+ verified.manifest.id !== pin.id ||
34
+ verified.manifest.version !== pin.version)
35
+ throw new Refusal('IA-CLI-FAILED', 'The bundled base archive does not carry the pinned manifest', 3, { path: archivePath }, DAMAGED);
36
+ return { pin, bytes, systems: verified.manifest.systems.map((system) => system.name) };
37
+ }
38
+ catch (error) {
39
+ if (error instanceof Refusal)
40
+ throw error;
41
+ throw new Refusal(codeOf(error, 'IA-CLI-FAILED'), error instanceof Error ? error.message : String(error), 3, { path: archivePath }, DAMAGED);
42
+ }
43
+ }
44
+ //# sourceMappingURL=bundled-base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundled-base.js","sourceRoot":"","sources":["../src/bundled-base.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM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AC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACtD,CAAC,EACD,EAAE,IAAI,EAAE,WAAW,EAAE,EACrB,OAAO,CACR,CAAC;IACJ,CAAC;AACH,CAAC"}
package/dist/capture.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { CaptureWrite, MembershipRow, Snapshot } from '@inventarch/db';
1
+ import type { CapturePlan, CaptureWrite, MembershipRow, Snapshot } from '@inventarch/db';
2
2
  import type { Context, Result } from './consumer.js';
3
3
  import type { Capabilities } from './render.js';
4
4
  import type { Session } from './session.js';
@@ -34,6 +34,15 @@ export interface CaptureView extends CaptureWrite {
34
34
  readonly text: string;
35
35
  readonly digest: string;
36
36
  }
37
+ /**
38
+ * A capture previewed: the document a capture would write and db D08b's plan of it (`CapturePlan`), the identities its
39
+ * counts count included. `text` and `digest` are the bytes the capture would write; nothing is written.
40
+ */
41
+ export interface CapturePreview extends CaptureView, CapturePlan {
42
+ readonly preview: true;
43
+ /** The capture that writes what this preview reports, with `--root` as given. */
44
+ readonly capture: string;
45
+ }
37
46
  /** The ordering the compliance layer already applies, reused rather than reinvented. */
38
47
  export declare const orderFindings: (findings: readonly Finding[]) => readonly Finding[];
39
48
  export declare const findingCounts: (records: number, findings: readonly Finding[]) => SnapshotCounts;
@@ -54,10 +63,20 @@ export declare const unparsedSeed: (diagnostics: readonly Finding[]) => Finding
54
63
  * first. `given` is the `--root` the invocation typed, which the `ia validate` a refusal names carries.
55
64
  */
56
65
  export declare function collectCapture(root: string, given?: string): CaptureView;
66
+ /**
67
+ * `ia capture --preview`: admits and refuses exactly as `collectCapture` does, then plans the write through db D08b's
68
+ * `planCapture` instead of making it, so nothing is created or written and the pair stays as it was.
69
+ */
70
+ export declare function previewCapture(root: string, given?: string): CapturePreview;
57
71
  /** As `ia compile` does: the snapshot is written even when admission has errors; the exit class carries the verdict. */
58
72
  export declare const captureExit: (view: CaptureView) => 0 | 1;
59
- export declare function captureEnvelope(view: CaptureView): unknown;
60
- export declare function renderCapture(view: CaptureView, caps: Capabilities): string;
73
+ /** A preview adds `preview: true` and the identities its counts count; a capture's keys are the 1.x ones. */
74
+ export declare function captureEnvelope(view: CaptureView | CapturePreview): unknown;
75
+ /**
76
+ * A capture's report, or a preview's: the same counts and snapshot rows. A preview says it wrote nothing, states the
77
+ * rotation as the one the capture would make, and names every changed, new and removed identity, each list sorted.
78
+ */
79
+ export declare function renderCapture(view: CaptureView | CapturePreview, caps: Capabilities): string;
61
80
  /** What a failed snapshot write names to repair: a file the system would not let it replace, or a directory. */
62
81
  export interface WriteRepair {
63
82
  readonly path: string;
@@ -76,6 +95,14 @@ export declare const WRITE_REPAIRABLE: ReadonlySet<string>;
76
95
  * directory.
77
96
  */
78
97
  export declare function writeRepair(root: string, error: unknown, platform?: NodeJS.Platform): WriteRepair;
98
+ /**
99
+ * A capture's failure as this verb refuses it, each repair followed by `rerun`. A refusal from opening the workspace, or
100
+ * one of the capture's own, already names its own repair and is returned as it is. A snapshot path the db does not
101
+ * write through is located and named, and so is a file or directory the system would not let a capture write, which a
102
+ * preview (`writes` false) never writes. Any other failure is returned as it is. `ia init`'s capture effect refuses
103
+ * through this too, so it locates and repairs what `ia capture` would.
104
+ */
105
+ export declare function captureFailure(error: unknown, root: string, rerun: string, writes?: boolean): unknown;
79
106
  export declare function runCapture(context: Context): Result;
80
107
  export {};
81
108
  //# sourceMappingURL=capture.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../src/capture.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,KAAK,EAAE,YAAY,EAAS,MAAM,aAAa,CAAC;AAGvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;A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