3.3 KiB
3.3 KiB
name, description
| name | description |
|---|---|
| manage-pi-links | Reconcile harness-tools' repository-managed Pi resources. Use in this repository when asked to check, sync, repair, install, or prune skill links, extension links, or local-path Pi package entries. |
Manage Pi Links
Treat config/pi-links.json as the source of truth and scripts/pi-links.mjs as the only mutation interface. Keep this skill repository-local; its own exposure is the relative .pi/skills/manage-pi-links link.
Classify the request
- For inspection, status, or troubleshooting, run
./scripts/pi-links.mjs checkand report every drift or conflict. - For sync, repair, or installation, run
./scripts/pi-links.mjs sync --dry-runfirst. Apply with./scripts/pi-links.mjs synconly when the request authorizes global changes. - For pruning, run
./scripts/pi-links.mjs prune --dry-run, show every removal, and obtain explicit confirmation before running./scripts/pi-links.mjs prune. - For a new resource, update the manifest classification before synchronization. Skills are discovered automatically; list repository-only skills under
skills.projectOnlyand intentionally unavailable skills underskills.excluded. List global instruction files underinstructions.globalSymlinks. List global extension directories underextensions.globalSymlinksor extension files underextensions.globalLocalPackages.
Reconcile
- Run commands from the repository root.
- Read the manifest entry and the resource's
SKILL.mdorindex.tswhen diagnosing a mismatch. - Resolve manifest validation errors before applying changes. Require unique skill names and existing entry points.
- Preserve collisions. The manager refuses regular files, directories, and links whose targets are outside this repository; report these for a human decision instead of replacing them manually. For an explicitly approved repository relocation, use
sync --dry-run --migrate-from /absolute/old/root, inspect the repairs, thensync --migrate-from /absolute/old/root. This only repairs manifest-declared destinations whose old target exactly matches the same repository-relative source under that old root. It does not migrate stale/unlisted links or local packages, and cannot be used withprune. Finish with a normalcheckwithout the migration option. - Apply the authorized operation through
scripts/pi-links.mjs. - Run
./scripts/pi-links.mjs checkagain. Completion requires exit code zero. - Tell the user to run
/reloadwhen skill or extension exposure changed in the active Pi session.
Exposure conventions
- Link shared global instructions into Pi's
AGENTS.md, Codex'sAGENTS.md, and Claude'sCLAUDE.md; use a Claude import file when Claude should reference the shared instructions rather than link to them directly. - Link globally shared skills into
~/.agents/skills/for cross-harness discovery. - Link repository-only skills into
.pi/skills/with relative targets. - Link live-development Pi extensions into
~/.pi/agent/extensions/with absolute targets. - Register manifest-declared local package files through
pi install; let the manager invoke Pi rather than editing~/.pi/agent/settings.jsondirectly. - Prune only repository-owned exposure discovered by the manager. Leave unrelated global resources untouched.