feat(pi): install the coding agent for a side-by-side trial (task 0020) #12
Reference in New Issue
Block a user
Delete Branch "task-0020-pi-coding-agent-module"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task:
.claude/tasks/0020-pi-coding-agent-module.mdSummary
Adds a directory-shaped
pimodule that enables the home-managerprograms.pi-coding-agentintegration for the primary user and freezes exactly one file,settings.json: the default provider set to Anthropic, the default model to Opus (claude-opus-4-8, read from Pi 0.80.7's ownmodel-resolvercatalogue), andenableAnalytics = false(the analytics key per Pi'sdocs/settings.md). No other upstream option is set, so home-manager renders onlysettings.jsonunder~/.pi/agent; the credential and all self-modification state are left unmanaged, so login survives rebuilds and removing Pi is a one-lineenableflip. Enabled onneogaiaalone.Verified through the primary seam:
config.modules.pi.enableandprograms.pi-coding-agent.enableboth evaluatetrue; the renderedsettings.jsonis exactly the three intended keys; onlysettings.jsonis rendered under~/.pi/agent; andchecks.x86_64-linux.neogaiabuilds green withpi-coding-agent-0.80.7.No deviations from the spec — every "Out of Scope" item (agent context/
AGENTS.md, skills, extensions, keybindings, custom providers, a Pi-specific sudo guard) is left out.Review
Overall: Low
mkIf, no control flow.Standards and Spec: no unaddressed findings. Spec fidelity was clean. Standards flagged four comment-convention issues on the new module (a semicolon in a comment, an overloaded file-top header duplicating the inline rationale, and a cross-file clause on the model-id comment); all were fixed in this diff.
— Claude
@@ -0,0 +17,4 @@Pins the provider to Anthropic and the model to Opus so Pi runs the samemodel as Claude Code, and disables analytics. Authentication reuses anexisting Claude subscription and is deliberately left unmanaged, so nocredential enters the repo and re-auth survives rebuilds'';I can read code, no need to be this explicit in the comment. The first line is enough.
@@ -0,0 +25,4 @@# settings.json is the only file here Pi writes at runtime, and only its# analytics keys. Disabling analytics removes that write, so freezing the# file never fights Pi's self-modification, which targets other paths.no need for this comment.
Addressed both comments in
638c26c— thanks for the trims. Neither the option description nor the dropped comment earned their length; the code reads fine without them.— Claude
@@ -0,0 +17,4 @@home-manager.users.${user}.programs.pi-coding-agent = {enable = true;settings = {Trimmed the option description to the first line:
mkEnableOption "Pi, a terminal coding agent, configured via home-manager". The provider/model/analytics rationale is already legible from thesettingsblock below.— Claude
@@ -0,0 +25,4 @@};};};}Dropped the comment entirely.
— Claude
@@ -0,0 +11,4 @@user = config.user.name;in{options.modules.pi.enable = lib.mkEnableOption "Pi, a terminal coding agent, configured via home-manager";this line is way too long?
638c26c09btofc3380f8ceLine-length fixed in
fc3380f.— Claude
@@ -0,0 +11,4 @@user = config.user.name;in{options.modules.pi.enable = lib.mkEnableOption ''Agreed. Wrapped it onto the
''multiline form the siblingclaude-codemodule uses, so the description sits on its own line under the margin. Fixed infc3380f.— Claude