Add Pi coding agent to dev VM profile #5

Merged
vnprc merged 1 commit from agent/pi-adapter into master 2026-07-15 12:29:21 +01:00
Member

Install the packaged Pi coding agent on the dev-VM profile and generate its global memory pointer, so an operator can run pi or yolo pi from ~/work with provider API keys supplied at invocation time. No API key, provider default, model default, auth file, or settings file is committed or provisioned.

Changes:

  • modules/ai-agents.nix: generate ~/.pi/agent/AGENTS.md from memoryCheckouts (one Read shared instructions from …/adapters/pi/AGENTS.md line per checkout, in the same order as the Claude and Codex pointers), written atomically via a temp file and mv -f; add a pi shell alias that starts in ~/work; add a pi case to the yolo wrapper that passes only --approve (Pi 0.80.3's "Trust project-local files for this run" project-local resource trust override).
  • hosts/dev/allod-dev/home.nix: install pkgs-unstable.pi-coding-agent beside claude-code and codex.
  • flake.nix: add the pi-integration check asserting pi-coding-agent is in the allod-dev home package list and grepping the generated llmMemoryLinks activation for the ~/.pi/agent mkdir, the # Pi Adapter header, both checkout pointer paths, and the atomic mv -f.

Risk

R2 Medium. Modifies generated Home Manager activation, the dev profile package closure, and the shared yolo wrapper. Blast radius is limited to dev VMs; no privacy VM, host provisioning path, secret material, forge token, or provider credential changes. Rollback is a straight revert plus a human dev-VM rebuild; if a VM already activated the pointer and the operator wants Pi state fully absent, delete ~/.pi/agent/AGENTS.md.

Validation

nix build .#checks.x86_64-linux.pi-integration passes and fails closed on a non-atomic write. The generated allod-dev activation emits # Pi Adapter plus /home/allod/work/allod/memory/adapters/pi/AGENTS.md and /home/allod/work/agent-memory/adapters/pi/AGENTS.md in order; home.packages contains pi-coding-agent; system.build.toplevel.drvPath evaluates. pi --version is 0.80.3 and pi --help lists --approve.

Merge order — do not merge until both land first

This is the final integration PR. Merge it only after:

  1. allod/memory#20 (the public Pi adapter), and
  2. the private agent-memory Pi adapter (adapters/pi/AGENTS.md), which must be added from a private dev VM.

Until both are merged, a dev-VM rebuild would generate a ~/.pi/agent/AGENTS.md pointer to an adapter file that does not exist yet.

Closes allod/profiles#4

Install the packaged Pi coding agent on the dev-VM profile and generate its global memory pointer, so an operator can run `pi` or `yolo pi` from `~/work` with provider API keys supplied at invocation time. No API key, provider default, model default, auth file, or settings file is committed or provisioned. Changes: - `modules/ai-agents.nix`: generate `~/.pi/agent/AGENTS.md` from `memoryCheckouts` (one `Read shared instructions from …/adapters/pi/AGENTS.md` line per checkout, in the same order as the Claude and Codex pointers), written atomically via a temp file and `mv -f`; add a `pi` shell alias that starts in `~/work`; add a `pi` case to the `yolo` wrapper that passes only `--approve` (Pi 0.80.3's "Trust project-local files for this run" project-local resource trust override). - `hosts/dev/allod-dev/home.nix`: install `pkgs-unstable.pi-coding-agent` beside `claude-code` and `codex`. - `flake.nix`: add the `pi-integration` check asserting `pi-coding-agent` is in the allod-dev home package list and grepping the generated `llmMemoryLinks` activation for the `~/.pi/agent` mkdir, the `# Pi Adapter` header, both checkout pointer paths, and the atomic `mv -f`. ## Risk R2 Medium. Modifies generated Home Manager activation, the dev profile package closure, and the shared `yolo` wrapper. Blast radius is limited to dev VMs; no privacy VM, host provisioning path, secret material, forge token, or provider credential changes. Rollback is a straight revert plus a human dev-VM rebuild; if a VM already activated the pointer and the operator wants Pi state fully absent, delete `~/.pi/agent/AGENTS.md`. ## Validation `nix build .#checks.x86_64-linux.pi-integration` passes and fails closed on a non-atomic write. The generated allod-dev activation emits `# Pi Adapter` plus `/home/allod/work/allod/memory/adapters/pi/AGENTS.md` and `/home/allod/work/agent-memory/adapters/pi/AGENTS.md` in order; `home.packages` contains `pi-coding-agent`; `system.build.toplevel.drvPath` evaluates. `pi --version` is `0.80.3` and `pi --help` lists `--approve`. ## Merge order — do not merge until both land first This is the final integration PR. Merge it only after: 1. `allod/memory#20` (the public Pi adapter), and 2. the private `agent-memory` Pi adapter (`adapters/pi/AGENTS.md`), which must be added from a private dev VM. Until both are merged, a dev-VM rebuild would generate a `~/.pi/agent/AGENTS.md` pointer to an adapter file that does not exist yet. Closes allod/profiles#4
vnprc approved these changes 2026-07-15 12:29:14 +01:00
vnprc merged commit 9d4f95d0f7 into master 2026-07-15 12:29:21 +01:00
vnprc deleted branch agent/pi-adapter 2026-07-15 12:29:21 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
allod/profiles!5
No description provided.