Context
Implementation of the recommendation from issue #146's investigation. See:
Today engine/command-migration.ts symlinks ~/.claude/commands/<name>.md → ~/.pai/commands/<name>.md but nothing populates ~/.pai/commands/ from the pack source. Result: pack-shipped commands (e.g. cs.md from ContextSearch) never reach the runtime.
Recommended approach
Per-pack populator that walks Packs/*/src/commands/<name>.md on every install, with per-file copy-if-not-exists semantics (preserves user edits; lets new pack commands land on existing installs).
Acceptance
Out of scope
Refs
Closes #146 when merged. Refs #145 (skill-side analogue), #144 (two-root restructure dependency), PR #164 (investigation).
Context
Implementation of the recommendation from issue #146's investigation. See:
reports/146-pack-command-staging-investigation.md(onmain)Today
engine/command-migration.tssymlinks~/.claude/commands/<name>.md→~/.pai/commands/<name>.mdbut nothing populates~/.pai/commands/from the pack source. Result: pack-shipped commands (e.g.cs.mdfrom ContextSearch) never reach the runtime.Recommended approach
Per-pack populator that walks
Packs/*/src/commands/<name>.mdon every install, with per-file copy-if-not-exists semantics (preserves user edits; lets new pack commands land on existing installs).Acceptance
Releases/v4.0.3+/.claude/PAI-Install/engine/pack-source-staging.ts(or extension of an existing module in that same directory) walksPacks/*/src/commands/<name>.md, copies each into~/.pai/commands/<name>.mdonly if dest does not existReleases/v4.0.3+/.claude/PAI-Install/engine/actions.ts:runRepositoryinvokes the new step BEFOREmigratePerPackCommandsOut of scope
Refs
Closes #146 when merged. Refs #145 (skill-side analogue), #144 (two-root restructure dependency), PR #164 (investigation).