From 137158463474ebfa7dd99834a3885c76a4444cba Mon Sep 17 00:00:00 2001 From: Joakim Persson Date: Wed, 17 Jun 2026 16:58:18 +0200 Subject: [PATCH] sanity-check: verify global AGENTS.md symlink after recreate pi-toolkit now symlinks pi-global-AGENTS.md -> ~/.pi/agent/AGENTS.md (pi's global-instructions file, loaded at every start; directs the agent to read the pi-extensions skill at session start). Add a recreate-sanity-check assertion alongside the keybindings symlink check so a future image build that bakes the new pi-toolkit verifies the wiring landed. --- scripts/recreate-sanity-check.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/recreate-sanity-check.sh b/scripts/recreate-sanity-check.sh index 12fafd1..e7bfb6a 100755 --- a/scripts/recreate-sanity-check.sh +++ b/scripts/recreate-sanity-check.sh @@ -6,8 +6,8 @@ # version is supplied — see the version note below) # - Persisted named volumes survived (~/.pi config, shell history, zoxide, # nvim data, uv cache, ssh-local) -# - pi runtime wiring is intact: keybindings symlink, ≥4 extensions, the -# mempalace.ts bridge, settings.json, and the pi-fork / +# - pi runtime wiring is intact: keybindings symlink, AGENTS.md symlink, +# ≥4 extensions, the mempalace.ts bridge, settings.json, and the pi-fork / # pi-observational-memory / (studio variant) pi-studio package registrations # - Shell defaults re-seeded from /etc/skel-devbox # - /tmp/sshcm exists with mode 700 (ssh ControlMaster dir) @@ -157,6 +157,14 @@ else fail "~/.pi/agent/keybindings.json missing or not a symlink" fi +# global AGENTS.md symlink (pi-toolkit) — global instructions loaded by pi at +# every start (directs the agent to read the pi-extensions skill at session start) +if [ -L "$HOME/.pi/agent/AGENTS.md" ]; then + pass "~/.pi/agent/AGENTS.md symlink (pi-toolkit)" +else + fail "~/.pi/agent/AGENTS.md missing or not a symlink" +fi + # extensions deployed (pi-extensions) — expect ≥4 *.ts EXT_COUNT=$(ls -1 "$HOME"/.pi/agent/extensions/*.ts 2>/dev/null | wc -l | tr -d ' ') if [ "$EXT_COUNT" -ge 4 ]; then