Context
During the 2026-04-20 skill-migration run (#110 artefact, engine/skill-migration.ts) on the maintainer's local laptop, drift backups on Research and Learning surfaced a three-stale-copies situation:
| Copy |
Path convention |
Voice pattern |
Canonical winner (~/.claude/skills/<Pack>, mtime 19-24 Mar) |
~/.claude/MEMORY/... literals |
"Workflow Announcement" (text-only) |
Displaced backup (~/.pai/skills/<Pack>, mtime 7-15 Apr) |
${PAI_DIR}/MEMORY/... tokens (post-#114) |
bun ~/.claude/PAI/Tools/Notify.ts ... invocations |
Repo source (Packs/<Pack>/src/, authoritative) |
${PAI_DIR}/MEMORY/... tokens |
bun ~/.pai/PAI/Tools/Notify.ts ... invocations (two-root-aware) |
Skill-migration's "CC side wins on drift" rule chose the most stale of the three — an under-specified input to the rule, not a bug in the rule itself.
Problem
There is no authoritative sync path from Packs/<Pack>/src/ into ~/.pai/skills/<Pack>/ for upgraders. Pack sources evolve in the repo (#114 path sweep, post-#112 voice-path updates, ongoing content edits), but the runtime ~/.pai/skills/ tree only receives updates when some ad-hoc process happens to run.
Symptoms on this laptop:
- Research:
SKILL.md + three workflow files lag repo source by ≥5 weeks.
- Learning:
SKILL.md + three workflow files + one tool file lag repo source. Notify.ts invocation paths point at ~/.claude/PAI/Tools/ instead of ~/.pai/PAI/Tools/.
- Every other pack that showed drift in the migration is likely similar, but Research and Learning are the confirmed cases.
Drift backups containing the less-stale intermediate copy have been discarded; canonical is now ~/.pai/skills/<Pack> but still lags repo source.
Scope
Mechanism to bring ~/.pai/skills/<Pack> into alignment with Packs/<Pack>/src/ for PAI-owned packs, on upgrade runs. Candidate approaches (investigation, non-exhaustive):
- Per-pack install/upgrade wizard that copies
Packs/<Pack>/src/ → ~/.pai/skills/<Pack>/, with conflict detection against runtime-local edits.
- Peer of
engine/skill-migration.ts that treats Packs/<Pack>/src/ as the authority when both runtime copies are older than source.
- Sync tool that operates outside the installer, invoked explicitly on demand.
- Something else the investigation surfaces.
Acceptance
Related
Out of scope
- Implementation. Investigation and design recommendation.
- Third-party pack sync (out of scope for PAI install infrastructure).
Context
During the 2026-04-20 skill-migration run (#110 artefact,
engine/skill-migration.ts) on the maintainer's local laptop, drift backups on Research and Learning surfaced a three-stale-copies situation:~/.claude/skills/<Pack>, mtime 19-24 Mar)~/.claude/MEMORY/...literals~/.pai/skills/<Pack>, mtime 7-15 Apr)${PAI_DIR}/MEMORY/...tokens (post-#114)bun ~/.claude/PAI/Tools/Notify.ts ...invocationsPacks/<Pack>/src/, authoritative)${PAI_DIR}/MEMORY/...tokensbun ~/.pai/PAI/Tools/Notify.ts ...invocations (two-root-aware)Skill-migration's "CC side wins on drift" rule chose the most stale of the three — an under-specified input to the rule, not a bug in the rule itself.
Problem
There is no authoritative sync path from
Packs/<Pack>/src/into~/.pai/skills/<Pack>/for upgraders. Pack sources evolve in the repo (#114 path sweep, post-#112 voice-path updates, ongoing content edits), but the runtime~/.pai/skills/tree only receives updates when some ad-hoc process happens to run.Symptoms on this laptop:
SKILL.md+ three workflow files lag repo source by ≥5 weeks.SKILL.md+ three workflow files + one tool file lag repo source. Notify.ts invocation paths point at~/.claude/PAI/Tools/instead of~/.pai/PAI/Tools/.Drift backups containing the less-stale intermediate copy have been discarded; canonical is now
~/.pai/skills/<Pack>but still lags repo source.Scope
Mechanism to bring
~/.pai/skills/<Pack>into alignment withPacks/<Pack>/src/for PAI-owned packs, on upgrade runs. Candidate approaches (investigation, non-exhaustive):Packs/<Pack>/src/→~/.pai/skills/<Pack>/, with conflict detection against runtime-local edits.engine/skill-migration.tsthat treatsPacks/<Pack>/src/as the authority when both runtime copies are older than source.Acceptance
~/.pai/skills/<Pack>/into alignment with currentPacks/<Pack>/src/for PAI-owned packs.Related
~/.pai/commands/never populated because no pack-level staging path.Out of scope