feat(launch): force-load fleet-critical Pi skills + reconcile skill docs #555
Reference in New Issue
Block a user
Delete Branch "feat/pi-mosaic-tools-skill"
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?
Problem
mosaic [yolo] pilaunched Pi with['--no-skills']wheneverMOSAIC_PI_SKILL_MODEwas unset — which is the default on every shell, systemd unit, and launcher. Result:
Pi loaded zero Mosaic skills, so fleet workers never saw the
~/.config/mosaic/tools/wrappers and routinely improvised raw
tmux send-keys/tea/gh. (Pi's ownRUNTIME.md claimed skills "load natively" — direct contradiction of the launcher default.)
Root-cause investigation (Step-1 verdict): TOOLS.md is injected into Pi's prompt
(PR #554 already raised its salience); the remaining gap is that skills never load.
Fix
buildPiSkillArgs()now force-loads a small fleet-critical skill set on every Pilaunch, regardless of mode. An explicit
--skill <dir>overrides--no-skillsfor thatpath, so we surface the must-use toolkit without the ~100-skill context bloat of
MOSAIC_PI_SKILL_MODE=all.DEFAULT_PI_FORCE_SKILLS = ['mosaic-tools'];forcedPiSkillArgs()maps each to--skill <MOSAIC_HOME>/skills/<name>, existsSync-guarded → a complete no-op until theskill is synced (safe to merge before the skill lands).
none/all/discover);alldedups viamergeSkillArgs()so a discovered skill isn't double-loaded.MOSAIC_PI_FORCE_SKILLS(colon-separated; empty string disables).claude/codex/opencodepaths untouched.Also in this PR
runtime/pi/RUNTIME.md— reconcile the "skills load natively" drift with the realdefault-off + force-load +
MOSAIC_PI_SKILL_MODEbehavior.templates/agent/**— fix stale~/.config/mosaic/rails/→tools/(60 occurrencesacross 12 scaffold templates;
rails/no longer exists). Mechanical, toolkit-path-only;quality-railsrepo refs untouched.Companion PR (required for runtime effect)
The
mosaic-toolsskill ships in mosaicstack/agent-skills#1. This launcher PR is inert(existsSync no-op) until that skill is synced.
Verification
pnpm typecheck(turbo, 41/41) ✅ ·pnpm lint✅ ·pnpm test302 passed (33 files) ✅prettier --checkon CI-matched files ✅ (.md.templatefiles aren't in CI's glob)buildPiSkillArgs(none/all/discover/no-disk/dedup)and
piForceSkillNames(unset vs empty-string-disable vs colon-list parsing).(guarantee forced skills under
all+ dedup; empty-string-disable test).Follow-up (NOT auto-applied)
Live fleet sessions need
mosaic-sync-skills(to pullmosaic-tools) and a launcherupgrade to pick this up. Do not auto-reseed running sessions — coordinate via Mos.
🤖 Generated with Claude Code