# Airic for Pi

Airic is a document-defined, trainable agent built as a Pi Coding Agent
extension. It adds project-owned operating models, explicit modes and
procedures, and reviewable reflection through ordinary `.airic` files.

Pi is an external host dependency, not bundled into Airic. Install Pi and
Airic once, globally:

```sh
npm install -g --ignore-scripts @earendil-works/pi-coding-agent airic-agent
```

Both Pi TUI and ACP use this one Airic installation. Do not also run
`pi install` for Airic: it creates a second extension copy and can cause
duplicate tool-name conflicts when ACP starts. If you previously installed it
with `pi install`, run `pi list` and remove the listed Airic source with
`pi remove <source>`.

For Pi TUI, find npm's global package directory:

```sh
npm root -g
```

Then start Pi with Airic's extension file, replacing `<npm-global-root>` with
the printed path:

```sh
pi --extension <npm-global-root>/airic-agent/dist/extension.js
```

In the project you want to train, initialize Airic:

```text
/airic init
```

Initialization creates editable copies of the default `airic-core` and
`airic-packsmith` base packs plus a fixed `.airic/project/` scope for
project-owned procedures, standards, roles, policies, boundaries, precedents,
lenses, and modes. Other official packs remain optional.

Reflection and the other durable-instruction authoring flows apply Core's
placement contract before editing: an instruction must have an explicit owner,
authoritative destination, fitting representation, discovery route, and
loading route. Project methods remain Operating Model artifacts; concise
runtime constraints that must enter every affected session may use the
narrowest `AGENTS.md` or equivalent context file that the client actually
loads. Installed third-party packs are not treated as their authoritative
upstream source.

Use `/airic pack list` to inspect all official and project-local packs. Install
an optional official pack with `/airic pack install <pack-id>`; disable keeps
the local files and removes only its project-level enablement.

The same package also contains an ACP adapter for editors such as Zed. Run it
after the global installation above:

```sh
airic acp
```

Configure the ACP client with command `airic` and argument `acp`. Both modes
read Pi's normal configuration and installed capabilities; TUI-only extension
UI remains specific to the terminal mode.
