Skip to content

fix(install): manifest + resolved-path uninstall; pi project path .pi/skills - #224

Merged
danielvm-git merged 3 commits into
mainfrom
fix/install-uninstall-219-220
Nov 6, 2026
Merged

danielvm-git merged 3 commits into
mainfrom
fix/install-uninstall-219-220

Conversation

@danielvm-git

Copy link
Copy Markdown
Owner

What this fixes — #219 and #220

#219 — install.sh --uninstall was a no-op from a checkout. unlink_if_managed removed an entry only when its symlink target literally began with $REPO_ROOT/. An install from the npm package links into node_modules/bigpowers, so an uninstall run from a checkout matched nothing — 0 of N removed, exit 0, no report. Chained hops (.agents/skills/x → .claude/skills/x → node_modules/…) and copy-mode directories were never considered either.

  • New scripts/lib/install-manifest.sh: link() records every destination; uninstall replays the manifest after the per-channel sweep.
  • bp_target_managed resolves symlink chains (bp_realpath_follow) and accepts an entry under $REPO_ROOT or any node_modules/bigpowers root.
  • bp_manifest_replay_cleanup removes recorded copy-mode directories (a dir that contains SKILL.md) and always prints a count: bigpowers uninstalled (N entries removed).
  • New tests/test-install-manifest.sh (6 checks) wired into the golden suite.

#220 — project-local pi install wrote to a path pi never scans. bin/setup.js declared localPath: '.pi/agent/skills' and installLocal()/uninstallTool() wrote into <cwd>/.pi/agent/skills. pi resolves project resources from <cwd>/.pi/skills; ~/.pi/agent/skills is the user-global dir and no pi version scans it as a project path — so a local install silently did nothing.

  • Corrected the local target to <cwd>/.pi/skills in bin/setup.js, install-helpers.js installLocal() and uninstallTool().
  • Updated scripts/test-install-helpers.js, whose local-pi assertion had codified the wrong path.
  • Global target (~/.pi/agent/skills) unchanged.

Evidence

install-manifest: ok T1 link into REPO_ROOT resolves to its real path
                  ok T2 link into node_modules/bigpowers resolves as managed
                  ok T3 chained symlink resolves through the hop and is managed
                  ok T4 foreign link is not managed
                  ok T5 manifest records both destinations
                  ok T5 replay removes the skill copy, leaves the foreign dir
install-helpers:  test-install-helpers: ALL PASS

Gates

npm run compliance 0 · bash scripts/run-verification-gates.sh 59/59 · trace-stories --strict 0.

Note: local gate runs in the worktree needed a node_modules symlink (worktrees don't inherit the main checkout's install); CI does a clean npm ci.

Closes #219
Closes #220

unlink_if_managed removed an entry only when its symlink target began with
$REPO_ROOT/. That made --uninstall a no-op whenever the install came from the
npm package (links into node_modules/bigpowers) but the uninstall was run from
a checkout, and it could never see chained hops or copy-mode entries. It also
exited 0 with no report, so a user believed the machine was clean.

Add scripts/lib/install-manifest.sh:

- bp_manifest_add records every link() destination; uninstall replays it.
- bp_target_managed resolves symlink chains and accepts an entry under
  $REPO_ROOT or any node_modules/bigpowers root.
- bp_manifest_replay_cleanup removes recorded copy-mode entries (a directory
  that contains SKILL.md) after the per-channel sweep, and always prints a
  removed count.

install.sh now reports 'bigpowers uninstalled (N entries removed)'.

Refs #219
bin/setup.js declared localPath '.pi/agent/skills' and installLocal() wrote
pi skills into <cwd>/.pi/agent/skills. pi resolves project resources from
<cwd>/.pi/skills (package-manager.ts projectDirs.skills); ~/.pi/agent/skills
is the user-global directory and is scanned by no pi version as a project
path, so a project-local pi install silently did nothing.

Correct the local target to <cwd>/.pi/skills in bin/setup.js, installLocal()
and uninstallTool(), and update the install-helpers test that had codified
the wrong path. The global target (~/.pi/agent/skills) is unchanged.

Refs #220
tests/test-install-manifest.sh drives install-manifest.sh directly: a link
into $REPO_ROOT and one into node_modules/bigpowers both resolve as managed,
a chained hop resolves through the middle link, a foreign link is left alone,
and manifest replay removes a copy-mode skill dir but keeps a foreign dir.

Wired into the golden gate suite.

Refs #219
@danielvm-git
danielvm-git merged commit 6172b55 into main Nov 6, 2026
7 checks passed
github-actions Bot pushed a commit that referenced this pull request Nov 6, 2026
## [2.93.7](v2.93.6...v2.93.7) (2026-11-06)

### Bug Fixes

* **install:** manifest + resolved-path uninstall; pi project path .pi/skills ([#224](#224)) ([6172b55](6172b55)), closes [#219](#219) [#220](#220)
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.93.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

1 participant