feat(skills): bake pi-extensions + mempalace fallback skills
The pi-toolkit global AGENTS.md tells every pi session to read
~/.agents/skills/pi-extensions/SKILL.md at start (the fork/recall
under-utilisation fix), but that skill lived only in the private skillset
repo — so the pointer dangled in any container started without skillset
mounted. Bake fallbacks so the pointer always resolves.
- pi-extensions (Option 1 + Option 2, layered):
* Canonical skill promoted to the public pi-extensions package repo under
skill/ (separate commit there); co-located with the code it documents.
* rootfs/ carries a committed snapshot (the floor).
* Dockerfile.variant copies /opt/pi-extensions/skill/ over the snapshot
after the pinned clone, so a normal build ships the fresh package copy
(recorded via PI_EXTENSIONS_REF) and an old-ref/mirror build still ships
the snapshot. Helper evaluate-extension-usage.py travels with it.
- mempalace (Option 2 only): snapshot in rootfs/. Its consumer skill has no
public package home (mempalace-toolkit ships a different skill,
opencode-mempalace-bridge), so no build-time refresh.
- entrypoint links both (only-when-absent; mounted skillset still wins).
- smoke-test: build-time presence + package-match check + runtime symlink
assertions; readiness gate now waits on the last-linked skill.
- docs: skills/VENDORED.md (provenance + refresh), README, AGENTS.md,
CHANGELOG [Unreleased].
Note: shipped in the NEXT release; v1.2.0 (run 409) predates this.
This commit is contained in:
@@ -94,6 +94,28 @@ RUN set -e && \
|
||||
echo "pi-fork at $(cd /opt/pi-fork && git rev-parse --short HEAD)" && \
|
||||
echo "pi-observational-memory at $(cd /opt/pi-observational-memory && git rev-parse --short HEAD)"
|
||||
|
||||
# ── Image-baked skill refresh: pi-extensions (Option 1 over Option 2) ──
|
||||
# rootfs ships a VENDORED snapshot of the pi-extensions skill at
|
||||
# /usr/local/share/pi-devbox/skills/pi-extensions/ (the "floor" — guarantees the
|
||||
# skill is always in the image). The pi-extensions PACKAGE repo now co-locates
|
||||
# the canonical skill under skill/, so here — after the pinned clone — we copy
|
||||
# that over the snapshot. Result: a normal build ships the fresh, package-owned
|
||||
# copy (pinned + recorded in the manifest via PI_EXTENSIONS_REF); a build whose
|
||||
# ref predates the skill, or a fork pointing at a mirror without it, still ships
|
||||
# the committed snapshot. The skill calls ./evaluate-extension-usage.py, so it
|
||||
# is copied alongside. Idempotent and cache-safe (depends only on the clone).
|
||||
RUN if [ -f /opt/pi-extensions/skill/SKILL.md ]; then \
|
||||
cp /opt/pi-extensions/skill/SKILL.md \
|
||||
/usr/local/share/pi-devbox/skills/pi-extensions/SKILL.md && \
|
||||
if [ -f /opt/pi-extensions/skill/evaluate-extension-usage.py ]; then \
|
||||
cp /opt/pi-extensions/skill/evaluate-extension-usage.py \
|
||||
/usr/local/share/pi-devbox/skills/pi-extensions/evaluate-extension-usage.py ; \
|
||||
fi && \
|
||||
echo "refreshed pi-extensions skill from package @ $(cd /opt/pi-extensions && git rev-parse --short HEAD)" ; \
|
||||
else \
|
||||
echo "pi-extensions package has no skill/ at this ref — keeping vendored snapshot" ; \
|
||||
fi
|
||||
|
||||
# ── pi-devbox awareness: append our pointer to the global AGENTS.md ──
|
||||
# pi loads a SINGLE global instruction file (~/.pi/agent/AGENTS.md), which
|
||||
# pi-toolkit's install.sh re-symlinks to /opt/pi-toolkit/pi-global-AGENTS.md on
|
||||
|
||||
Reference in New Issue
Block a user