feat: add the pi coding agent harness
CI / lint (push) Successful in 33s
CI / eval (push) Successful in 2m9s

Packages the prebuilt pi release binary and puts it on PATH alongside
Claude Code, Codex and opencode.

pi has no `@file` imports in context files, so the shared agent-skills
fragments are concatenated into ~/.pi/agent/AGENTS.md. Skills need no
wiring: pi already reads ~/.agents/skills.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Miguel Palhas
2026-08-19 11:57:24 +01:00
parent 0a4dd8a192
commit 013d41aa72
3 changed files with 105 additions and 0 deletions
+1
View File
@@ -5,6 +5,7 @@
{
imports = [
./codex.nix
./pi.nix
./ralph-claude-code.nix
./t3-code.nix
];
+32
View File
@@ -0,0 +1,32 @@
{
config,
lib,
pkgs,
inputs,
...
}:
let
pi = pkgs.callPackage ../../../pkgs/pi/package.nix { };
skills = inputs.agent-skills;
# pi has no `@file` imports in context files, so fragments get concatenated
# into one AGENTS.md. Skills need no wiring: pi reads ~/.agents/skills, which
# the agent-skills module already links.
agentsMd = pkgs.writeText "pi-AGENTS.md" (
lib.concatMapStringsSep "\n" builtins.readFile [
"${skills}/claude-md/machines/${config.programs.agentSkills.machine}.md"
"${skills}/claude-md/operating.md"
"${skills}/claude-md/writing.md"
"${skills}/claude-md/code-comments.md"
"${skills}/claude-md/RTK.md"
]
);
in
{
home.packages = [ pi ];
# Settings stay unmanaged: pi writes ~/.pi/agent/settings.json itself from
# /settings, /trust and `pi config`.
home.file.".pi/agent/AGENTS.md".source = agentsMd;
}