@inventarch/cli 1.2.0 → 3.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.
- package/README.md +20 -5
- package/SPEC.md +86 -11
- package/assets/base/08eaab3e1a6215d78283b82a94a0228367ac7bd78d0a746c56db79c8d7546c3a.ia.tgz +0 -0
- package/assets/base.json +3 -3
- package/assets/host/d7722e32fd0511df2a6dfdf2353e621fdff1cf559d5c8b7ac256c7eceac0452f.tgz +0 -0
- package/assets/host.json +4 -4
- package/assets/vocabulary.json +11 -3
- package/dist/adopt.d.ts +8 -0
- package/dist/adopt.d.ts.map +1 -0
- package/dist/adopt.js +60 -0
- package/dist/adopt.js.map +1 -0
- package/dist/author.d.ts +32 -0
- package/dist/author.d.ts.map +1 -0
- package/dist/author.js +226 -0
- package/dist/author.js.map +1 -0
- package/dist/briefing.d.ts +2 -0
- package/dist/briefing.d.ts.map +1 -1
- package/dist/briefing.js +15 -3
- package/dist/briefing.js.map +1 -1
- package/dist/bundled-base.d.ts +18 -0
- package/dist/bundled-base.d.ts.map +1 -0
- package/dist/bundled-base.js +44 -0
- package/dist/bundled-base.js.map +1 -0
- package/dist/capture.d.ts +41 -6
- package/dist/capture.d.ts.map +1 -1
- package/dist/capture.js +132 -43
- package/dist/capture.js.map +1 -1
- package/dist/commands.d.ts +30 -8
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +287 -35
- package/dist/commands.js.map +1 -1
- package/dist/compile.d.ts +3 -4
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +28 -72
- package/dist/compile.js.map +1 -1
- package/dist/consumer.d.ts +11 -2
- package/dist/consumer.d.ts.map +1 -1
- package/dist/consumer.js +103 -20
- package/dist/consumer.js.map +1 -1
- package/dist/distribute.d.ts +30 -8
- package/dist/distribute.d.ts.map +1 -1
- package/dist/distribute.js +112 -60
- package/dist/distribute.js.map +1 -1
- package/dist/doctor-authority.d.ts +3 -0
- package/dist/doctor-authority.d.ts.map +1 -0
- package/dist/doctor-authority.js +65 -0
- package/dist/doctor-authority.js.map +1 -0
- package/dist/doctor-mounts.d.ts +4 -0
- package/dist/doctor-mounts.d.ts.map +1 -0
- package/dist/doctor-mounts.js +32 -0
- package/dist/doctor-mounts.js.map +1 -0
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +327 -79
- package/dist/doctor.js.map +1 -1
- package/dist/format.d.ts.map +1 -1
- package/dist/format.js +2 -1
- package/dist/format.js.map +1 -1
- package/dist/host-projection.d.ts +131 -6
- package/dist/host-projection.d.ts.map +1 -1
- package/dist/host-projection.js +663 -42
- package/dist/host-projection.js.map +1 -1
- package/dist/host.d.ts +154 -32
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +393 -142
- package/dist/host.js.map +1 -1
- package/dist/init.d.ts +296 -38
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +1303 -203
- package/dist/init.js.map +1 -1
- package/dist/main.d.ts +1 -6
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +4 -7
- package/dist/main.js.map +1 -1
- package/dist/migration-journal.d.ts +35 -0
- package/dist/migration-journal.d.ts.map +1 -0
- package/dist/migration-journal.js +205 -0
- package/dist/migration-journal.js.map +1 -0
- package/dist/next.d.ts +21 -0
- package/dist/next.d.ts.map +1 -0
- package/dist/next.js +216 -0
- package/dist/next.js.map +1 -0
- package/dist/operation-help.d.ts.map +1 -1
- package/dist/operation-help.js +15 -4
- package/dist/operation-help.js.map +1 -1
- package/dist/pack.d.ts.map +1 -1
- package/dist/pack.js +24 -2
- package/dist/pack.js.map +1 -1
- package/dist/position.d.ts +22 -0
- package/dist/position.d.ts.map +1 -0
- package/dist/position.js +244 -0
- package/dist/position.js.map +1 -0
- package/dist/preview.d.ts +145 -0
- package/dist/preview.d.ts.map +1 -0
- package/dist/preview.js +962 -0
- package/dist/preview.js.map +1 -0
- package/dist/profile.d.ts +118 -0
- package/dist/profile.d.ts.map +1 -0
- package/dist/profile.js +362 -0
- package/dist/profile.js.map +1 -0
- package/dist/project.d.ts +45 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project.js +263 -0
- package/dist/project.js.map +1 -0
- package/dist/read.d.ts +12 -2
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +32 -18
- package/dist/read.js.map +1 -1
- package/dist/render.d.ts +24 -2
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +171 -4
- package/dist/render.js.map +1 -1
- package/dist/session.d.ts +39 -12
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +55 -11
- package/dist/session.js.map +1 -1
- package/dist/user-host.d.ts +3 -3
- package/dist/user-host.js +10 -10
- package/dist/user-host.js.map +1 -1
- package/dist/validate.d.ts +28 -16
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +245 -23
- package/dist/validate.js.map +1 -1
- package/package.json +6 -6
- package/assets/base/0305ca741b1dfec97ff35fbeb36d4a66a0c9c0614b730fe14fcdac0f1565e28a.ia.tgz +0 -0
- package/assets/host/c5fb2bfbba619cbd558ecc1e94dd2c16e37aa8599b4e423f1f59ed01f2074e03.tgz +0 -0
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @inventarch/cli
|
|
2
2
|
|
|
3
|
-
The IA
|
|
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@
|
|
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,30 @@ 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
|
|
21
|
+
`init` previews changes unless `--apply` is supplied. Its language base, `inventarch/language`, follows the coordinated release artifact version and is bundled with the CLI, so creating a workspace needs no registry connection. IA syntax remains 1.0. 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`
|
|
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 removed in 3.0. Replace it with `ia capture`, retaining `--preview`, `--json`, `--root` and `--actor` where needed, and omit `--force` because capture always writes. The old `--out` and `--stdout` options have no equivalent: capture writes the fixed snapshot files above, not the 1.x `ia.compiled.v1` artifact. Every `ia compile` invocation, including `--help`, exits 2 with migration guidance before opening a workspace. The published `@inventarch/cli/internal/compile` helpers remain available to programmatic callers.
|
|
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
|
-
|
|
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 `ia preview plan`, which shows what a `@plan` holds and where it goes. 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
|
+
`ia preview` shows what one edit of the workspace's own records would compile to, and writes nothing. `ia preview <word> <name> [<field>=<value>...] [--at <path>]` drafts a new record into `--at` or `<first authored root>/<word>.ia`; `ia preview --relate <owned> <spelling> <target>` adds one relationship row and `ia preview --set <owned> <section.key>=<value>` (or `+=` for one list item) sets one field of a record the workspace owns: authored (band 100) and in a file under an authored root its `@workspace` declares inside `.ia/src`, named by identity or `@word name`. It prints the record before and after, the findings the edit adds, the candidate revision and the target file's current SHA-256, and refuses an unknown field, a value of another type or one carrying syntax, a relationship no consent row admits, and a record it does not own. `ia preview <word>` prints the word's lowering, schema, default file and consent. The edit is spliced into the file as it is, so other lines keep their bytes and line endings; another spelling of an existing path (a case variant, an 8.3 short name) is refused, naming the volume's spelling.
|
|
34
|
+
|
|
35
|
+
`ia author` writes ordinary records using the same arguments as `ia preview` plus `--digest <sha256>`, the file digest the preview printed. It writes only when the file is still that one and the candidate is clean, puts one `# authored-by @agent <participant> under @mandate <name> at <authored revision>` comment above the record, and moves no other record's digest. Administrative words (`workspace`, `agent`, `mandate`, `system`, `schema`, `agent-profile` and `hook`) refuse for every actor; an owner makes those changes in source and validates them. This includes the system starter. Previews remain read-only; see the [administrative source boundary](SPEC.md#administrative-source-boundary).
|
|
36
|
+
|
|
37
|
+
`ia doctor` warns when restrictive authored mandates have no supported hook declaration selecting all `.ia/src` sources for every edit tool. It never widens a hook's paths. A declaration is separate from host registration and enforcement, and the file edit guard checks Synthesis rather than word exclusions or execution limits on file bytes.
|
|
38
|
+
|
|
39
|
+
`ia read`, `ia next`, `ia validate`, `ia preview`, `ia author`, `ia capture`, `ia project` and a workspace `ia host <host> --apply` are judged by the acting participant's mandates first (Observation, Verification, Synthesis or Execution); `ia position` never is, so the position a refusal names always runs. Each takes `--actor <agent>`, a local declaration that names one of the workspace's authored participants, or its authored steward, whether the workspace leaves the choice open or names a steward; the named participant's own mandates then apply. Mandates are cooperative restrictions and `--actor` is not authentication: a mandate that should hold against its own participant also excludes the `workspace`, `agent` and `mandate` words, which holds it against that participant acting as itself, and every participant the actor can name with `--actor` needs the same exclusions on its own mandates, since naming a looser one lifts them for that invocation.
|
|
40
|
+
|
|
41
|
+
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
42
|
|
|
28
43
|
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
|
@@ -1,27 +1,60 @@
|
|
|
1
1
|
# @inventarch/cli
|
|
2
2
|
|
|
3
|
+
`tests/validate-checks.test.ts` verifies that a refused validation profile cannot replace a writable current-revision evidence receipt or prune an older receipt. A participant authorized for Verification subsequently validates the identical source revision and performs both writes, establishing that refusal, rather than an inactive writer or broken fixture, preserved the earlier tree.
|
|
4
|
+
|
|
5
|
+
Suggested commands omit roots containing shell syntax and use `.` with an explicit workspace-directory instruction. Inert Windows roots use forward slashes so Git Bash, PowerShell and cmd address the same directory. Directory instructions accompany only an actual replacement with `.`; separator normalization alone keeps a relative command in its original directory, even when a resolved root alias contains shell syntax. Unknown-command advice parses a supported nearest command before preserving its arguments, otherwise it names that command's help without reading the filesystem. Generic interruption advice rebuilds parsed option values and the init positional target, covering equals options and options placed before a target. A value matching a declared option token retains equals spelling, including short aliases and help flags; normalization retains `./` for an init target beginning with a dash. `tests/refusal-next.test.ts` reparses and reruns printed advice to verify the value and target survive. For a fresh absent init target whose path is omitted, preview first instructs the operator to create and enter that target without pasting the active path into a shell, then run the printed apply command; preview itself creates nothing.
|
|
6
|
+
|
|
7
|
+
Shell-safe root remedies: refusal and profile next actions, interruption remedies, doctor command suggestions and session briefing, already-initialized init guidance and capture-preview commands never repeat a known root containing shell-active characters. They preserve the command and use `--root .` (or the positional `.` for init), with an explicit instruction to run it from the workspace root. The exact supplied, resolved and observed real root are matched as data before display; no shell parser or command execution is used. Ordinary roots, including spaces, retain their existing quoting. Capture previews construct portable commands from the exact supplied root, including relative Windows roots; their JSON snapshot paths retain native spelling. Root diagnostics and briefing argument vectors still identify the actual path; the briefing's plain host command uses the safe spelling and its accompanying context and notice explain the required directory. This supersedes the earlier exemption of the caller's root from the inert-next rule. The runtime's conservative mandate admission policy is unchanged.
|
|
8
|
+
|
|
3
9
|
The `ia` binary exposes consumer commands and the structured agent query protocol. The [language reference](https://github.com/inventarch/ia/blob/main/docs/reference/language/README.md) defines vocabulary and evaluation limits, and the packaged [language summary](LANGUAGE.md) lists the words this release ships. This package bundles the language archive, vocabulary catalogue and host payload needed by its commands.
|
|
4
10
|
|
|
5
11
|
## Workspace commands
|
|
6
12
|
|
|
13
|
+
An actor must be established before a mandate naming a participant supplies its grants. A path-only mandate can govern a command without making its participant an eligible workspace actor: when no steward or workspace participant resolves, the shared profile refuses every mode with `IA-RUNTIME-MANDATE-ACTOR`, even for one governing participant. The CLI's next command reads the workspace's governance position without writing. An owner may declare the workspace's steward or scope in authored source, then validate and rerun; `--actor` still accepts only the workspace's authored participants or steward. `tests/preview.test.ts` exercises both covers and participant fallback, the read-only refusal and next action, and success after an authored steward establishes the same actor.
|
|
14
|
+
|
|
15
|
+
### Administrative source boundary
|
|
16
|
+
|
|
17
|
+
`ia author` reserves `workspace`, `agent`, `mandate`, `system`, `schema`, `agent-profile` and `hook` records for administrative source edits. New records, `--set` (including list additions) and `--relate` all refuse with `IA-CLI-EDIT-AUTHORITY` (exit 1), after existing profile, ownership and candidate guards. The refusal names a read-only `ia position` command, says that an owner must make the change in source and validate it, and writes nothing. The existing `IA-CLI-EDIT-MANDATE` refusal still takes precedence for a mandate that binds the actor. `--actor` and an unrestricted or absent mandate do not bypass this boundary. `ia preview` remains read-only and retains its existing mandate guard; a successful administrative preview grants no write authority.
|
|
18
|
+
|
|
19
|
+
This conservative boundary prevents changing participant moves, exclusions, scope or covers, creating an alternate participant, replacing a default actor, changing the workspace's source closure, altering the admission vocabulary, remapping a host profile's actor, or weakening a hook through `ia author`. It intentionally refuses benign edits to the same words too, including `author system`, whose starter also creates an agent. It does not compute a rights-subset relation or introduce an opt-in field. Other words retain their normal authoring, admission and runtime checks; an operation or execution binding remains subject to its installed implementation and execution limits.
|
|
20
|
+
|
|
21
|
+
Owner migrations and grants are explicit source changes followed by `ia validate`; they can preserve existing identities, edges and locators without using `ia author`. These are cooperative tool restrictions, not authentication or filesystem isolation. Hand edits and host tools remain separate surfaces, and an owner should review the complete source change and its admission before resuming unattended work. Reverting this change restores the earlier CLI policy without migrating stored data.
|
|
22
|
+
|
|
23
|
+
`ia doctor` adds a read-only `source-protection` row. It warns when an authored mandate in the repository closure declares a restricted move, an excluded word or an execution limit and no supported authored hook explicitly covers the `.ia/src` tree for every `Write`, `Edit` and `MultiEdit` event. Full-tree declarations recognized conservatively are `.ia/src/**`, `.ia/src/`, `.ia/**`, `.ia/` and `**`; narrow or unsupported declarations do not silence the warning. Separate hooks may cover the tools together. The remedy names the governance position and describes an owner-authored `PreToolUse` hook; doctor neither writes a starter nor extends existing hook paths. No restriction or a complete declaration is `info`, never proof of enforcement. A complete declaration does not establish host registration or activation (Codex hooks remain unsupported); the current edit guard checks Synthesis on selected files, not word exclusions or operation limits on their bytes. Unreadable authority or refused mandate dependencies are `unknown`, as is a missing workspace or pending installation recovery.
|
|
24
|
+
|
|
7
25
|
| Command | Behavior |
|
|
8
26
|
| --- | --- |
|
|
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. |
|
|
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
|
-
| `
|
|
12
|
-
| `
|
|
27
|
+
| `init [directory]` | Preview a workspace, or create it with `--apply`; `--host none` omits host registration and `--id <provider/name>` sets the package id (default `local/<directory name>`). `--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. |
|
|
28
|
+
| `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). Execution bindings and checks are reported as below; a revoked binding or check exits 1 without being a finding. |
|
|
29
|
+
| `preview <word> [<name> [<field>=<value>...]]` | Show what one edit of the workspace's own records would compile to, and write nothing (2026-10-11, milestone generation-binding plan amendments C18, C19 and C3; mode validate, move Verification). `ia preview <word> <name> [<field>=<value>...] [--at <path>]` drafts a new record (language `draftSource`, every value first judged by the strict `encodeValue`) and appends it to `--at` or `<first authored root>/<word>.ia`, the first root the repository's `@workspace` declares at authored placement inside `.ia/src`; `ia preview system <name>` is init's starter system at `.ia/src/systems/<name>/system.ia` and takes no field or `--at`; `--relate <owned> <spelling> <target>` adds one row to the record's `relationships` section; `--set <owned> <section.key>=<value>` sets one field, and `+=` adds one item to a list field, creating it when absent. A field is `<section>.<key>`, or a key one field of the schema alone has, and one given twice in either spelling is refused; the shell's split of a value is joined again with single spaces. Owned is a record at authored placement (band 100) whose file lies under an authored root of the repository's `@workspace`, inside `.ia/src` and outside the floor, named by canonical identity or `@word name`; `--at` is relative to the root and must lie under such a root, and is judged as the volume spells it: an existing part of it spelled otherwise (a case variant, an 8.3 short name) refuses, naming the volume's spelling, before the mandate profile or the ownership check reads it. The edit is language's (`appendRecord`, `addRelationship`, `setField`), spliced into the file as it is: other lines keep their bytes and line endings, a byte-order mark stays, and only the edited record is formatted. It compiles through db's draft overlay against one editor snapshot of the workspace and prints the record before and after, the base and candidate revisions, every record of the file with its digest before and after, the file's current sha256 (an absent file reads as empty), and the findings that count against the candidate: the edited or new record's own, and any the base does not hold, matched in the target file by code and record and elsewhere by code, path, line and message, so an error already in another record does not. The editor snapshot admits checks structurally, as `validate` admits them, and lists no evidence (2026-10-11, plan amendment C21; `AUTHORING` in `src/session.ts`): a `@check` naming one evaluator that is not built in is an owned record the edit forms can name and a new one drafts clean, a check naming none still counts against the candidate, and the base revision printed is the evidence-free one every strict reader reports. A record other than the target whose digest would change refuses the preview. `ia preview <word>` prints the word's lowering (kind, category, facets, primitive, move, artifact set), schema, default file and digest (for `system`, the per-system file), the consent rows that name it or that its own system's ledger can apply to it, and an example command. Exit 0 for a clean candidate and for word guidance, 1 for a candidate with errors. Refusals: a malformed form or an unknown relationship verb is usage (IA-CLI-USAGE, exit 2); an unknown word or field, a value of another type or carrying syntax, a field given twice, a duplicate row, item or record, a nested record, a system already in force (IA-CLI-EDIT-INVALID), no admitted record answering a name (IA-CLI-EDIT-MISSING), a record or path the workspace does not own (IA-CLI-EDIT-UNOWNED), a `@mandate` that binds the acting participant, before or after the edit (its participant is the actor, or it names none and its scope names the workspace or it claims paths), or whose authority the runtime cannot read, naming the governance position and saying a human or another participant makes that change (IA-CLI-EDIT-MANDATE; review C2-R6, a lead decision flagged for the operator: moves pool across the mandates that bind an actor), a row the two-sided consent rule refuses, naming the system whose ledger refuses it (IA-LANG-EDGE-UNCONSENTED), and the mandate profile's refusals (IA-RUNTIME-MANDATE-MOVE, -WORD, -ACTOR, and IA-RUNTIME-REQUEST-INVALID for a mandate authority the runtime cannot read) exit 1; another spelling of a path, an unsafe path (db's rule, and DEL, a C1 control, a line or paragraph separator or a bidirectional control, which the CLI refuses besides; review C-RC4) or a link on the way (IA-DB-PATH-UNSAFE), an unreadable target (IA-DB-SOURCE-UNAVAILABLE), a target that changed while read (IA-DB-SOURCE-CHANGED), a path the draft overlay refuses (IA-DB-DRAFT-INVALID), and a workspace that does not open (as `ia validate` refuses it) exit 3. IA-CLI-EDIT-MANDATE retains its narrower preview rule. The writing command additionally reserves administrative words as described below; a preview is not authorization to write. A next command that would repeat a value holding shell syntax names the word's preview instead. |
|
|
30
|
+
| `author <word> <name> [<field>=<value>...] --digest <sha256>` | Write what the same `ia preview` form showed (2026-10-11, milestone generation-binding plan amendments C19, C20 and C3; mode author, move Synthesis). Every preview form for a non-administrative record has an author form with the same arguments and `--digest <sha256>`, the target file's sha256 the preview printed (an absent file and an empty one read alike); the candidate is compiled again against one editor snapshot, opened as `preview` opens it (checks admitted structurally, no evidence listed), judged for the author mode, and written only when the file is still the one the digest names and the candidate is clean. The record written carries one attribution comment above it, `# authored-by @agent <participant> under @mandate <name> at <authored revision>`: the acting participant, the first governing mandate that binds it and grants Synthesis, and the workspace's authored revision (db `authoredRevision`) the candidate was compiled against; a second author replaces the comment rather than stacking one, and no capture membership records it. An existing file is read again through db's opened-handle reader just before the write and written by the distribution's `replace` (a temporary file and a rename, every component checked for links), keeping its permission bits; a new file by `createFile`, which refuses an entry that appeared since. `ia author` refuses administrative words as described below, including the system starter and its implicit agent. Every successful author names its next command (`ia validate`) judged by the profile that allowed it, as a refusal's next is: the governance position where the profile refuses that command, and a named actor carried as the participant it resolved (review C2-N11, C2-N13). The output is the record written, the file's sha256 before and after, the authored revision and the revision of the workspace with what was written, the findings, and `ia validate` as the next command. Refusals are preview's for the same form, plus: a missing or malformed `--digest` (IA-CLI-USAGE, exit 2, naming the preview), judged after the profile and the candidate, so a mandate refusal comes first and the preview named is one the profile allows, else the governance position (review C2-R4); a file that is not the one the digest names, or that changed, appeared or disappeared while authored (IA-CLI-EDIT-STALE, exit 1); a candidate with an error that counts against it (IA-CLI-EDIT-UNCLEAN, exit 1); a write the volume refuses (the distribution's IA-DIST code, or IA-CLI-FAILED for a raw volume error such as EPERM, exit 3, naming the repair and the preview). Each names the preview of the same form, and every refusal writes nothing. |
|
|
31
|
+
| `capture` | Admit the workspace and write its snapshot to `.ia/work/snapshot/current.json` in the `ia-snapshot-1` format: one JSON document with sorted keys and one final newline holding `format` (`ia-snapshot-1`), `language`, `kernelDigest`, `revision` (the full workspace revision), `authoredRevision` (the revision excluding runtime sources), `records` (the admitted records sorted by identity, each with its per-record `digest`), `membership` (one `{identity, root, band, digest}` capture membership row per record, sorted by identity), `diagnostics` (the admission findings and the warnings for declarations that declare nothing, below, ordered by path, line, code and message) and `counts` (`records`, `errors`, `warnings`, `notEvaluated`). Identical sources on one language version capture to identical bytes. The database writes the pair (db SPEC D08a), and every database handle seeds its previous snapshot from it, whatever its cache setting. `.ia/work/snapshot/previous.json` holds the most recent capture whose revision differs from the current one: a capture at a new revision renames the prior `current.json` there, byte for byte, and a capture at an unchanged revision keeps `previous.json` as it is while it holds a capture at another revision. With no readable prior capture (the first one, or a `current.json` that is not an `ia-snapshot-1` capture, which the capture names and replaces), a `previous.json` at another revision is kept as the most recent capture there is; a `previous.json` at the new revision, or one that is no capture, is removed once `current.json` is written. The new bytes are staged in a temporary file in the same directory before either file is replaced, a failed step undoes the ones before it so the pair stays as it was, and a `current.json` that already holds the capture's bytes is not rewritten. The capture writes only under `.ia/work/snapshot/`, creating it when needed, and never touches `.ia/src`. The snapshot is local working state that each clone captures for itself: `ia init` takes the first capture once it has initialized a workspace, so a snapshot exists from then on, and its `.ia/.gitignore`, written only where none exists, lists `work/`, which keeps the snapshot out of version control. Concurrent captures of one root are last-writer-wins. The effect is reported apart from validation: `records`, and how each record's digest compares with the prior capture's `current.json`, as `changed`, `unchanged`, `new` (no row in the prior capture) and `removed` (a row in the prior capture and none now), so `records` is `changed + unchanged + new` and two captures with no edit between them report 0 changed. The first capture has nothing to compare with, so every record is `new`. Admission findings in a source the workspace authors are written into the snapshot and counted, and never stop the write: a capture whose admission has errors still writes, marks its effect line with a warning symbol and exits 1, as `validate` does (warnings alone exit 0). Unresolved references, colliding identities, unconsented rows and every other registration or resolution finding (such as a keyword two adopted or installed systems both register) are such findings wherever they are. Two cases refuse before anything is written, so both files stay as they were (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. |
|
|
32
|
+
| `compile` | Removed in 3.0. Every invocation, including `--help` and legacy options, refuses as `IA-CLI-USAGE` (exit 2) before workspace discovery or mandate evaluation and names the static `ia capture --help` command. It is absent from command help and the catalog, but its token remains core-reserved so an extension cannot revive it. Replace calls with `ia capture`; retain supported options and drop `--force`. The old `--out` and `--stdout` have no equivalent because capture writes a fixed snapshot. Published `@inventarch/cli/internal/compile` helper signatures remain available; the CLI no longer calls `runCompile`. |
|
|
13
33
|
| `format [path...]` | Check formatting by default; rewrite with `--write`. |
|
|
14
34
|
| `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;
|
|
35
|
+
| `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. |
|
|
36
|
+
| `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`. |
|
|
37
|
+
| `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, without a seat in a workspace that registers `@plan`, `ia preview plan` where the acting participant's profile allows Verification and `@plan` (milestone generation-binding plan amendment C3; else the governance position), else the records to author, then `ia next` again with the seat given; IA-RUNTIME-NEXT-AMBIGUOUS, the plans listed in the message, names `ia next --seat <the first>`; and IA-RUNTIME-NEXT-CYCLE, the require rows listed in the message and the refusal located at the first, names `ia position --seat <record> --shape sequence` at the record the runtime names, the cycle's first task by milestone then task, else the first milestone a row requires. `ia next --help`, which the runtime's IA-RUNTIME-NEXT-NO-PLAN names to Door and MCP callers, says under `--seat` which records make a plan. It is the Door's `next` operation as a consumer verb, never a machine route (plan amendment A2). |
|
|
38
|
+
| `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` plans again (`replanProjection`, shared with `host --apply`) with the rendering its gated plan session made (milestone 6 review C3-N2), writes it through `applyHostProjection`, and prints the receipt: its files with their SHA-256, the legacy files removed, the foreign files and the retirement. A file changed since the plan still refuses, but a source or mandate change made while the confirmation question waits is not picked up, and `ia doctor` then reports the projection outdated. It registers no MCP server and 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
39
|
| `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
40
|
|
|
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
|
|
41
|
+
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`, at the coordinated release artifact version, supplying the eleven public systems while retaining IA syntax 1.0, 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
42
|
|
|
20
43
|
## Distribution commands
|
|
21
44
|
|
|
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.
|
|
45
|
+
`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
46
|
|
|
24
|
-
`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.
|
|
47
|
+
`host <claude|codex|cursor>` previews a workspace registration and requires `--apply` to write it; `--remove` plans removal of the host set it owns. A workspace `--apply` writes the projection `ia project --apply` writes, so it is gated as the effect mode (Execution) by the acting participant's mandate profile before its confirmation, and takes `--actor <agent>`; its plan, `--remove` (which restores editing) and `--user` are not gated (milestone 6 review C2-R7). 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.
|
|
48
|
+
|
|
49
|
+
Installed implementations (milestone generation-binding, plan amendments C16 and C24): `host <claude|codex> --apply`, `init --host` included, reads the join receipts before it writes anything, refusing ones it cannot read with the repair of deleting them, and once every element is applied records the host's join from the committed registration and the catalog of the payload it names; a removal drops it. A failure while recording names the rerun that finishes the set, so an interrupted apply leaves no join or the previous one. `doctor` adds an `implementations` row for the catalog of the payload this installation pins (`ok` present, `warn` when it lists an unavailable or revoked operation, `info` when the payload carries none or is not materialized, `fail` when the payload fails verification), a `join-<host>` row per recorded join, compared through the trust `validate` binds with (review finding B2-RC1): `ok` when it names the catalog of the payload this installation pins in the IA home and the host's registration names exactly that payload, `warn` when drifted, when the registration names another release or another directory (or another spelling of it, which is never opened) or the host is not registered, `unknown` when that payload cannot be read or verified or the installation pins none, an `info` row for a registered host with no join and a `fail` row for receipts that cannot be read; one verification of each payload serves its host, catalog and join rows, and doctor writes nothing. Nothing executes or serves an operation; milestone 7 owns that.
|
|
50
|
+
|
|
51
|
+
Execution bindings (task execution-binding-host-entry, plan amendment C24): `validate` reports, from the same `WorkspaceSession.bindings(trust)` service `ia-distribution validate` reports, the catalog the workspace's host joined through this installation's own payload (`validationTrust`: the release its bundled host pin names, in the IA home `IA_HOME`/`IA_HOST_HOME` resolves; run from inside a payload, that payload; a registration of any other payload is unavailable with the repair `ia host <host> --apply`, review finding B2-R2) and one result per `@execution-binding`: `bound`, `unavailable` (never a pass, and said so in the summary) or `revoked` (an error that fails the run). `--json` adds `bindings`; with no binding the human report is unchanged. Computing them writes nothing and executes nothing. Each binding is one entry: its identity, then its result and its reason on lines of their own (review finding B2-N3). A run that fails only because a binding or check is revoked closes with the repair: deleting the payload that failed verification and re-applying the host that joined it, or replacing what the catalog revokes (B2-N8).
|
|
52
|
+
|
|
53
|
+
Checks and evidence (task check-runner-join-validate, plan amendments C14, C15, C21, C22 and C23): `validate` opens its session with structural check admission and reads no evidence (review finding B3-R4), so its findings, counts, checks, exit and `revision` are the authored view's alone and `revision` is the one every other reader reports, with `authoredRevision` beside it in `--json` (B3-N4); a check naming an evaluator that is not built in is admitted, reported and bound rather than refused (every strict reader, which is every other reader but `preview` and `author`, counts it as an IA-COMP-CHECK-UNKNOWN error, so `ia host` and `ia project` refuse the workspace with IA-CLI-CONFLICT (exit 3) and `ia capture` still writes its snapshot with the finding recorded and exits 1; the summary says so, naming each such check so that refusal or finding has a place to land, B3-R3), and reports from the same `WorkspaceSession.checks(trust)` service `ia-distribution validate` reports a Checks section: the catalog source when a check needs one, one entry per check with its evaluator, `bound`, `unavailable` or `revoked`, its outcome (`pass`, `fail` or `not-evaluated`) and its reason, then the evidence it recorded. A not-evaluated check is never a pass and is counted in the summary; a revoked check is an error that exits 1, and the closing names the repair: removing or replacing a check that `validate`, `preview` and `author` admit but every strict reader counts as an error, before re-applying the host, or a check whose evaluator the catalog revokes. With admission refused nothing is recorded or pruned (B3-N11), and an older file it may not remove never refuses the run (B3-R1). `validate` trusts the payload its bundled pin names in the IA home, `ia-distribution validate` only the payload it runs from (B3-N8). It then records the bound checks that passed or failed through `recordValidation`, the one evidence write any command makes: `.ia/work/evidence/<authored revision>.ia`, runtime placement band 0, which moves `revision` but never the authored revision, the position packet or the host projection. `--json` adds `checks` and `evidence`; with no check the human report is unchanged. A directory it cannot write refuses as IA-DIST-EVIDENCE-UNWRITABLE (exit 3) with the repair, and a link, junction or file on the way as IA-DB-PATH-UNSAFE; nothing is read through one, and with nothing to record neither refuses. `doctor`, `capture --preview` and refused effects never create or prune evidence.
|
|
54
|
+
|
|
55
|
+
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>/`; the guard it registers instead is one group per authored `@hook` (the generated set, below), which decides only the edits that hook selects. `applyHostProjection` in `src/host-projection.ts` is the only writer of projection files; `ia host --apply`, `ia host --remove --apply`, `ia project --apply`, the project effect of `ia init --host` and `ia init --migrate --apply`, and the install, update and remove refresh call it. It refuses while a host journal is pending, plans the guard retirement and the file plan before writing anything, then removes a steward-guard registration an earlier release made (its group in `.claude/settings.local.json` and `claude-guard-workspace.json`, through apps/distribution's guard registration) before any projection file changes, applies the files through apps/distribution, which deletes each 1.x steward file its state owns and marked (either 1.x marker is owned) and lists every other `.claude/agents/*.md` file `foreign`, left in place, and last writes the receipt `.ia/distributions/hosts/<host>-receipt.json` beside the projection state, having deleted the previous one under the host lock before any projection file changed, so an interrupted apply leaves no receipt: the adapter's receipt with `cli` (`@inventarch/cli@<version>`), `removed` (the legacy files deleted, each with its SHA-256), `foreign`, `guard` (`retired` or `none`) and `writtenAt`. A removal deletes the receipt. The plan's `projection` element lists the retirement as `guard: 'retire'` and each file action, `remove` and `foreign` included, and is an update when its files are unchanged but a retirement is planned or the receipt is missing; an applied `projection` element reports `guard: 'retired'` or `none`, and the human report says the guard was retired. An install, update or remove plan lists the registered hosts whose refresh retires a guard as `retire`, and its human plan, the summary an apply confirms, says so beside the refresh line with the note on what that leaves unblocked; after the apply it lists the hosts it retired a guard for as `retired`. A guard group changed by hand refuses, located at `.claude/settings.local.json`, naming its deletion, and an install refuses that before anything is acquired, as it refuses a hand-edited projection file. `doctor`'s projection rows read the receipt: a listed file missing (`warn`) or changed (`fail`), the receipt's packet digest against a fresh render (`outdated`, `warn`; a render that fails is `unknown`, naming `ia validate`), with none of these, one `ok` row saying the projection has no drift (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.
|
|
56
|
+
|
|
57
|
+
The generated set (2026-10-11, milestone generation-binding task host-consumes-generated-set; plan amendments C4, C5, C9 and C12): `renderProjectionFor` holds the packet and workspace-runtime's `generateHostSet`, computed once from the workspace's authored records: the generated agent files (Claude only) and skills after the packet's files, each with the packet marker; the `@hook` declarations (Claude only); and a receipt whose `files` list every file, `generated` each generated file with its record identity, word and SHA-256, `definitions` the `@operation` and `@harness` definitions (an operation's handler and validator ids copied as authored, never resolved or run), each harness's registrations, in the receipt an apply writes, being those that apply wrote and registered (a hook it registered no group for is left out; review finding H-R7), and `unsupported` each authored record the host does not take, with the reason (for Codex every agent profile and every hook). A generation refusal (workspace-runtime's `ProjectionError`) is a refusal with its own code, located at the workspace root, whose next action is to correct the record the message names and run `ia validate`. `applyHostProjection` applies exactly that set: it plans the guard retirement, the hook groups and the files before writing anything, then retires a 1.x steward guard, then registers or removes the hook groups through apps/distribution's hook registration (planned again after a retirement, which rewrote the settings the first plan read), then applies the files, then writes the receipt, whose `hooks` lists each owned group by identity with the tools its hook declares and the group's SHA-256, and `removedHooks` each group it removed, by identity and the digest the ownership state recorded for it; the pending receipt evidence written before the groups change carries the removals too (as `removedHooks`, only when there are any), so a rerun after an interrupted apply still lists them (review finding H-R5). The groups run the guard in the payload `ia host` (and `ia init --host`) materialized and verified; `ia project`, the install, update and remove refresh and a migration keep the groups an earlier `ia host` registration owns in step with the records against the payload that registration recorded, writing no group and never reading that payload while the owned hooks and selections are the declared ones (a change with that payload gone or changed refuses there, naming `ia host claude --apply`, which materializes one; review finding H-R4), and with no registration register none, listing each declared hook in `unsupported` as needing `ia host claude --apply`. Where `disableAllHooks: true` turns hooks off (`.claude/settings.local.json`, else `.claude/settings.json`), no group is written: a group already owned for a hook still declared stays registered and is listed only in `hooks`; an obsolete owned group is removed (planned against the payload an `ia host` apply materializes when that is the payload the kept groups were registered against, so its preview and apply agree), except that when that payload is gone and the apply does not materialize it, the group stays, listed in `unsupported` as kept (`HOOK_KEPT`) and never as registered, until hooks are back on or that payload is materialized again; a group changed or duplicated by hand refuses as it does with hooks on, and so does one deleted by hand whose hook is still declared, while a deleted group of a hook no longer declared loses its ownership in the next plan that runs, which, with the payload gone and not materialized, waits as the kept groups do, doctor reporting the group missing meanwhile (review finding F1); an identity both generation and the hook step report (an unsupported authored hook whose group is kept) is one `unsupported` row carrying both reasons (review findings N1, N3 and N4); and a declared hook with no group is listed in `unsupported` naming that file, while the MCP entry, the packet, the agents and the skills apply as before (review findings H-N12 and A-F1). A generated skill refused at a folder that already holds the user's files is located at that folder, and the refusal names its repair (`folderRepair`): move the files out, or rename the `@playbook`, then rerun (review finding A-F2). A record renamed or deleted takes its obsolete agent file, skill or group away on the next apply; unrelated settings keys, groups and unmarked files are kept. A removal removes every owned group; it renders nothing and reads no record, so `ia host <host> --remove --apply` needs neither an admitting workspace nor records that open, which is why the guard names it to restore editing (review findings H-R2 and H-R8). Ownership stays in the projection state and the hook ownership state, never the receipt. The `projection` element of `ia host` and `ia project` lists each hook group's action (`create`, `update`, `unchanged` or `remove`) and each record not taken. `doctor` adds one row per owned hook group that drifted: `missing` (deleted by hand) or `modified` (changed or duplicated) is a `fail` whose remedy is `ia host claude --remove --apply`, after which `ia host claude --apply` registers the workspace's hooks again, since apply never puts back on its own a group the user took away; an apply or plan of `ia host` or `ia project` that finds such a group refuses, located at `.claude/settings.local.json`, naming the same recovery (`hookRepair`: delete a changed or duplicated group first, then `ia host claude --remove --apply`, then register again with `ia host`; review finding H-R1), and an unreadable hook ownership state names itself and the groups it owns before the rerun (`stateRepair`, H-N3); an install, update or remove plans the refresh's files and hook step against the current render before its first install write (`preflightProjection`), and a migration checks the hook step before it plans (`preflightHooks`), so such a group, a recorded payload a change of hooks would need, or a generated skill refused at a populated folder of the user's refuses there with its repair rather than after the install commits (H-R3, F4; any other file refusal stays the refresh's, after the commit, naming the applied install), and the install preview lists the refresh's files from the current render, so a generated agent is never previewed as a 1.x removal (H-N7); `foreign` is a `warn`, left in place; an authored hook the last apply could not register (its receipt `unsupported` row) is a `warn` saying it guards nothing, whose remedy is `ia host claude --apply`, or none where disableAllHooks turned hooks off (review finding H-N4), and a kept group (`HOOK_KEPT`) is a `warn` saying it stays in the settings though no registrable hook claims it, and that the next `ia host claude --apply` removes it once hooks are back on, or while they are off once it materializes the payload the group was registered against, with generation's own reason beside it when there is one and no remedy (N2, F3, F4); and an `outdated` row when the generated rows differ from the receipt's, a receipt written before generation included. `tests/host-generated.test.ts` runs the journeys on the composition fixture over `ia init`: one apply writes the packet, one agent, one skill and one group, all in the receipt and owned, and a second changes no file, setting or state and writes the same receipt rows; the group run through the materialized launcher allows the steward's edit, refuses the reviewer subagent's and an unknown subagent's, leaves what the hook does not select undecided and refuses edits to IA's state for every tool; doctor's drift rows for a hand-edited skill and a group deleted by hand, and the remedy it names; renamed records removing the obsolete agent, skill and group, a gone hook's group refusing only its last registered selection until then, unrelated settings and unmarked files intact, and the receipt naming a narrowed hook's tools; a 1.x steward guard retired and the hook group registered in one apply, with a profile named after the 1.x steward file one update; Codex taking the packet and the skill and reporting the agent and the hook; and the mandate fallback rendered for the fixture profile once it names no mandate.
|
|
25
58
|
|
|
26
59
|
## Automation and limits
|
|
27
60
|
|
|
@@ -29,16 +62,58 @@ Workspace discovery uses the nearest ancestor containing `.ia/src`, with `--root
|
|
|
29
62
|
|
|
30
63
|
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
64
|
|
|
32
|
-
|
|
65
|
+
When a suggested root is omitted because it contains shell syntax, registry-consuming advice preserves the directory that a relative registry flag or inherited IA_REGISTRY selected from the original caller directory. The printed command uses a safe absolute spelling, or an equivalent safe relative spelling from the omitted root's destination. Explicit source-reselection remedies retain that intent; catalog and offline suggestions do not acquire an unused registry flag. Doctor has no registry flag, so a relocated doctor suggestion instead names its help and the exact original registry location to restore through the environment. If neither registry spelling is inert, the whole operation is likewise replaced by help and manual restoration guidance. Mere Windows separator normalization, an unchanged working directory, root-relative catalog/request/plan paths, actual parsed arguments, machine plan data and structured action argv keep their existing meaning.
|
|
66
|
+
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
67
|
|
|
34
68
|
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
69
|
|
|
36
70
|
## Mandate authority
|
|
37
71
|
|
|
38
|
-
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
|
|
72
|
+
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; a command's catalog row names its mode. `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. These commands are gated by the acting participant's mandate profile (milestone generation-binding, continuation lane C): `ia read` and `ia next` (read, Observation), `ia validate` and `ia preview` (validate, Verification), `ia author` (author, Synthesis), and `ia capture`, `ia project` and a workspace `ia host <host> --apply` (effect, Execution); a capture or project plan is judged as the effect it plans, and a host plan, `--remove` or `--user` is not judged. `ia position` is not gated, and neither is any other command or surface: the Door's read, next and position operations (the MCP tools), the install, update and remove projection refresh, `ia-distribution validate`, `ia inspect` and the records route, `ia init`, and `ia host`'s plan, `--remove` and `--user`; a mandate restricts only the gated CLI commands (review C2-N1). Each gated command takes `--actor <agent>`, a canonical identity, `@agent <name>` or a bare name, which must be an authored participant of the repository's `@workspace` (an authored `@agent` a mandate scoped to it names as its participant, or its `composition.steward` when that is an authored `@agent`: runtime `defaultActor`'s `actors`); without it the actor is the workspace's default (runtime `defaultActor`, the answer the edit guard reads too), where an installed steward counts for no one and the participants decide. Naming an actor is a local declaration, not authentication: it is accepted whether or not the workspace leaves the choice open (it resolves the choice a workspace with several participants and no steward leaves, and under a steward it acts as another of the workspace's actors), and then that participant's own mandates are judged, which may be looser or stricter than the default actor's; it never lifts a move or excluded word those mandates state. The governing mandates (runtime `governingMandates` for the workspace and, for preview and author, the target file's path) are judged by `profileRefusal` for the mode's move and, for preview and author only, the word; the refusal (`IA-RUNTIME-MANDATE-MOVE`, `-WORD` or `-ACTOR`, exit 1) names the governance position of the mandate concerned; an open actor choice, or a default actor no governing mandate binds, names the same command with `--actor` naming the first participant whose mandates allow it (an `ia author` form whose `--digest` is absent or malformed names its preview form instead, which prints the digest, and the participant must be allowed that preview too; review C3-R2), else the workspace's governance position; an `--actor` that names no participant names the same command without it where the default actor may run it (for an `ia author` form without a usable `--digest`, its preview form, which the default actor must be allowed too), else the governance position, and only under an open choice the first allowed participant. An admitted governing mandate whose authority the runtime cannot read, such as one with a child under `authority.moves`, which admission accepts, refuses with `IA-RUNTIME-REQUEST-INVALID` located at it (`where` `{path, line, identity}`) and naming that mandate's governance position. While an authored `@mandate` fails admission (lane D, operator ruling 2026-10-12; runtime R23), a stated `authority.moves []` among them since compliance C05 refuses it, every gated mode fails closed, workspace-wide, whatever the actor, the path or the word: it refuses with `IA-RUNTIME-REQUEST-INVALID`, exit 1, a `where` of `{path, line, identity?}` at the first such record (its identity when admission or spec 3.1 names one), and a message naming the record and its admission finding and saying a hand edit corrects it, since `ia preview` and `ia author` cannot target a record admission refused. The same holds, with the same shape, while a record an admitted mandate depends on fails admission (runtime R23's D9): a refused `@agent` a mandate's `authority.participant` or a workspace's `composition.steward` names, or a refused `@workspace` a mandate's `authority.scope` names; `where` then locates the refused record and the message names the mandate or workspace that depends on it, while a refused `@agent` or `@workspace` nothing names, or a reference no authored record answers, restricts as before. Its next command is the admission report, `ia report --root <root>`, the version 1 machine route, which no mandate gates and whose findings show the record's: it runs for the same actor in the same state (exit 1 for a failing report, the report on stdout, nothing on stderr), where `ia validate` is gated and `ia position --seat <mandate>` cannot seat at a record admission refused. That route opens its `--root` or the working directory, never an ancestor, so the command carries the invocation's `--root` as every next command repeats it (review C2-R8), or, without one, the root spelled relative to the working directory, `.` or `..` segments only, inert by construction, printed only when that spelling, resolved against the working directory as the route resolves `--root` (lexically, then to its real path), reaches this same real root: the spelling relative to the working directory as given, which on win32 keeps a junction's spelling, is tried first, then the one relative to the working directory's real path, so a junction or directory symlink in the working directory's path names a root that runs (review D2-R1); where neither does, the command is `ia report`, run from the workspace root, with no path printed (review D-R1, D-N2), so neither a root's shell-active characters nor the `ia preview <word>` substitution for a non-inert value reach it. The runtime locates the record as data (`RuntimeError.where`) and marks the refusal's cause (`isAdmissionRefusal`), which the CLI branches on, so a refused authored mandate that shares its identity with an admitted one of another band names the report and the hand edit too (review D-R2); the CLI parses no message for either. Preview and author read the same check through their editor snapshot, so a refused mandate refuses them before any candidate is built, and a candidate that would leave a refused mandate stays unclean, as it was. `ia position`, `ia host <host> --remove --apply`, which still restores editing, `--user`, the Door and MCP reads, the install refresh, `ia-distribution`, `ia inspect` and `ia init` are unchanged. Once a command's profile allows it, a refusal it raises later names only a command the same actor may run there: a next command of a gated mode the profile refuses (its move, or the word of a preview or author form) becomes the governance position, and one the profile allows carries `--actor` when the command named its actor so; so `ia next` names `ia preview plan` only where the profile allows Verification and `@plan`. `ia position` is never gated, so a position a refusal names always runs, and the admission report a refused mandate's refusal names is a machine route no mandate gates. The next-command rule holds for the gated commands only: an ungated command's refusal may name a gated command, which is judged when it runs and then refuses with its own mandate refusal and next (review C2-N2).
|
|
73
|
+
|
|
74
|
+
Attribution comment correction (2026-10-13): if a work file written by `ia author` later fails parsing, its genuine full-line `# authored-by` comment is not itself an authored mandate declaration (db D15). A valid participant remains readable and `ia validate` reports the actual parse error. This does not waive the workspace-wide admission gate for unidentified declarations or conflict markers, real refused mandates (including identity facets), or refused resolution dependencies. Three damaged files still fail the workspace closed though the comment is genuine, because db D15 still reads its `@mandate`: one that holds a bare CR anywhere, one where the comment stands inside `"""` prose (as after a `"""` no line closes), and one with no pragma where a byte-order mark precedes the comment on line 1. `tests/author.test.ts` creates an actual attributed edit, damages its work record, verifies reads write nothing and validation still reports the parse finding, then verifies a disguised mandate in that file still refuses.
|
|
75
|
+
|
|
76
|
+
The command table also holds the position packet's command catalog (runtime SPEC R19; plan amendment B5): `init`, `capture` and `project` (effect, Execution), `validate` and `preview` (validate, Verification), `author` (author, Synthesis), and `read`, `position` and `next` (read, Observation), nine 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.
|
|
39
77
|
|
|
40
78
|
## Path selections
|
|
41
79
|
|
|
42
|
-
A path selection is the text a record states to claim locations: `covers` on a `@mandate` (`authority.covers`), a `@law` or `@convention` (`subject.covers`)
|
|
80
|
+
A path selection is the text a record states to claim locations: `covers` on a `@mandate` (`authority.covers`), a `@law` or `@convention` (`subject.covers`), a `@spec` (`work.covers`) and a `@check` (`check.covers`, plan amendment C17), and `paths` on a `@hook`. A `@check`'s `check.scope` stays text that selects the verdicts the check binds to (the whole-workspace token `*`, a scope its evaluator reports, or prose) and is never a path selection, so it claims no location (plan amendment C22). 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
81
|
|
|
44
82
|
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.
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
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.
|
|
86
|
+
|
|
87
|
+
## PR30 migration recovery and portability corrections
|
|
88
|
+
|
|
89
|
+
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.
|
|
90
|
+
|
|
91
|
+
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.
|
|
92
|
+
|
|
93
|
+
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.
|
|
94
|
+
|
|
95
|
+
`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.
|
|
96
|
+
|
|
97
|
+
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.
|
|
98
|
+
|
|
99
|
+
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.
|
|
100
|
+
|
|
101
|
+
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.
|
|
102
|
+
|
|
103
|
+
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.
|
|
104
|
+
|
|
105
|
+
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.
|
|
106
|
+
|
|
107
|
+
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.
|
|
108
|
+
|
|
109
|
+
Registry collections add `ia adopt <id>[@range] [--registry <base>]`, `ia init --adopt <id>[@range]`, and kit expansion for `ia install`. All retain preview/apply confirmation semantics. Adoption mounts pinned, source-only native records at open band 50, updates the authored workspace source declaration, captures, and refreshes registered packet projections. `ia doctor` lists and verifies source mounts. The [distribution contract](../distribution/references/registry-collections.md) defines source limits, authority refusals and rollback.
|
|
110
|
+
|
|
111
|
+
Export migration from published 2.0.0: `@inventarch/cli/internal/host-projection` no longer exports `checkAdmitted(root)`. Host removal is intentionally independent of admission, so broken records do not prevent restoring editing. Callers use the host removal command for that managed operation; a separate admission consumer may open `openWorkspaceSession({root})` from `@inventarch/distribution/services`, inspect `validation()` and close the session, enforcing its own refusal policy. `renderProjectionFor` is a projection renderer, not a substitute admission-only helper.
|
|
112
|
+
|
|
113
|
+
Binding absence and unavailability are distinct: a workspace declaring no execution binding, including fresh init, reports `bindings: {catalog: null, results: []}`. A declared binding with no joined catalog or matching installed implementation reports `unavailable` with its reason. Neither state establishes execution.
|
|
114
|
+
|
|
115
|
+
A database refusal marked `engine-incompatible` keeps `IA-DB-SOURCE-UNAVAILABLE` and exit 3. Its next action requires an IA installation supporting the reported distribution engine and then validation. It explicitly says that restore does not upgrade the CLI and that lock/archive engine ranges must remain intact. Downgrading requires a complete pre-upgrade workspace backup with its matching CLI, not a hand-edited compatibility marker.
|
|
116
|
+
|
|
117
|
+
`ia host claude --remove` checks for unowned IA hook groups even when hook ownership state is missing. Preview reports a refused projection plan; apply refuses at the exact settings file before changing projection, MCP or receipt state. Recovery identifies only the unowned group for manual removal, preserves other settings, and warns that protection may remain active until the group is removed. The next removal finishes the remaining owned registration. Neither a receipt nor matching generated files replaces missing ownership authority.
|
|
118
|
+
|
|
119
|
+
When validation cannot record evidence because a directory ancestor is a link or junction, its refusal locates that unsafe ancestor rather than the evidence child beneath it. Recovery replaces only the unsafe workspace entry without following it or deleting its target. Doctor remains observational; it does not write validation evidence or recommend deleting evidence through a link. Regression fixtures preserve external evidence bytes and follow the safe recovery to successful validation.
|
|
Binary file
|
package/assets/base.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "inventarch/language",
|
|
3
|
-
"version": "
|
|
4
|
-
"archive": "
|
|
5
|
-
"manifest": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"archive": "08eaab3e1a6215d78283b82a94a0228367ac7bd78d0a746c56db79c8d7546c3a",
|
|
5
|
+
"manifest": "2acb3aa7ec7d2265e6471520e8cc4f891deb2e4d0f169803e171f4a260de413a"
|
|
6
6
|
}
|
|
Binary file
|
package/assets/host.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release": "
|
|
3
|
-
"archive": "
|
|
4
|
-
"files":
|
|
5
|
-
"bytes":
|
|
2
|
+
"release": "e19fdb0041460c75e2c05f6a844a1dffea6fa5de82111dbdf455b97833de598b",
|
|
3
|
+
"archive": "d7722e32fd0511df2a6dfdf2353e621fdff1cf559d5c8b7ac256c7eceac0452f",
|
|
4
|
+
"files": 1516,
|
|
5
|
+
"bytes": 8867812
|
|
6
6
|
}
|
package/assets/vocabulary.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": 1,
|
|
3
3
|
"language": "ia 1.0",
|
|
4
4
|
"status": "public IA 1.0 language contract",
|
|
5
|
-
"sourceDigest": "
|
|
5
|
+
"sourceDigest": "43a7078f421f094af2ac377e9dc76847211028cb33964e3459abc5aacc947d99",
|
|
6
6
|
"words": [
|
|
7
7
|
{
|
|
8
8
|
"word": "agent",
|
|
@@ -823,7 +823,14 @@
|
|
|
823
823
|
{
|
|
824
824
|
"path": "check.scope",
|
|
825
825
|
"type": "text",
|
|
826
|
-
"required": true
|
|
826
|
+
"required": true,
|
|
827
|
+
"description": "What the check selects: the whole-workspace token *, a scope its evaluator reports, or prose. It is text and claims no path; check.covers does."
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
"path": "check.covers",
|
|
831
|
+
"type": "list of text",
|
|
832
|
+
"required": false,
|
|
833
|
+
"description": "Path selections the check claims, matched by the location resolver. Claiming a path does not change which verdicts the check selects; check.scope does that."
|
|
827
834
|
}
|
|
828
835
|
],
|
|
829
836
|
"edges": []
|
|
@@ -3772,7 +3779,8 @@
|
|
|
3772
3779
|
{
|
|
3773
3780
|
"path": "composition.systems",
|
|
3774
3781
|
"type": "list of ref",
|
|
3775
|
-
"required": true
|
|
3782
|
+
"required": true,
|
|
3783
|
+
"target": "system"
|
|
3776
3784
|
},
|
|
3777
3785
|
{
|
|
3778
3786
|
"path": "composition.sources",
|
package/dist/adopt.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { WorkspaceRelease } from '@inventarch/distribution/registry';
|
|
2
|
+
import type { Context, Result } from './consumer.js';
|
|
3
|
+
export declare function registryWorkspace(context: Context, root: string, locator: string): Promise<{
|
|
4
|
+
id: string;
|
|
5
|
+
release: WorkspaceRelease;
|
|
6
|
+
}>;
|
|
7
|
+
export declare function runAdopt(context: Context): Promise<Result>;
|
|
8
|
+
//# sourceMappingURL=adopt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adopt.d.ts","sourceRoot":"","sources":["../src/adopt.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAOrD,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,gBAAgB,CAAA;CAAE,CAAC,CAOpD;AACD,wBAAsB,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAkDhE"}
|