refactor: move pi's AGENTS.md concat into the agent-skills module
All four tools' context wiring lives there now; this file just installs the package.
This commit is contained in:
@@ -1,32 +1,12 @@
|
|||||||
{
|
{ pkgs, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
pi = pkgs.callPackage ../../../pkgs/pi/package.nix { };
|
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
|
in
|
||||||
{
|
{
|
||||||
home.packages = [ pi ];
|
# ~/.pi/agent/AGENTS.md comes from the agent-skills home-manager module
|
||||||
|
# (pi has no @file imports, so the module concatenates the shared fragments).
|
||||||
|
# Pi reads skills straight from ~/.agents/skills, which the module links.
|
||||||
# Settings stay unmanaged: pi writes ~/.pi/agent/settings.json itself from
|
# Settings stay unmanaged: pi writes ~/.pi/agent/settings.json itself from
|
||||||
# /settings, /trust and `pi config`.
|
# /settings, /trust and `pi config`.
|
||||||
home.file.".pi/agent/AGENTS.md".source = agentsMd;
|
home.packages = [ pi ];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user