Skip to content

fix(skills): harden plugin root resolution across install modes#95

Merged
Lum1104 merged 3 commits into
Egonex-AI:mainfrom
0xnayuta:fix/pi-plugin-root-resolution
Apr 24, 2026
Merged

fix(skills): harden plugin root resolution across install modes#95
Lum1104 merged 3 commits into
Egonex-AI:mainfrom
0xnayuta:fix/pi-plugin-root-resolution

Conversation

@0xnayuta

@0xnayuta 0xnayuta commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR improves plugin root resolution robustness for /understand and /understand-dashboard across different installation modes and hosts.

What changed

  • Prioritize CLAUDE_PLUGIN_ROOT as the first plugin-root candidate (runtime-provided root should win)
  • Keep existing universal symlink fallback: ~/.understand-anything-plugin
  • Keep self-relative fallback from ~/.agents/skills/... real path
  • Add Copilot personal-skills fallback from ~/.copilot/skills/... real path
  • Add common clone-path fallbacks:
    • ~/.codex/understand-anything/understand-anything-plugin
    • ~/.opencode/understand-anything/understand-anything-plugin
    • ~/.pi/understand-anything/understand-anything-plugin
    • ~/understand-anything/understand-anything-plugin
  • Align root-resolution behavior between understand and understand-dashboard
  • Improve error diagnostics by listing all checked candidates in failure output

Why

/understand could fail with “Cannot find the understand-anything plugin root” in valid installs where:

  • ~/.understand-anything-plugin is absent, and
  • ~/.agents/skills/... is unavailable/unresolvable, while
  • a valid runtime root is available (e.g. CLAUDE_PLUGIN_ROOT).

This could also cause inconsistent behavior between skills (/understand vs /understand-dashboard) and potential version mismatch when multiple roots exist.

Impact

  • Fixes root resolution regressions in Claude native setups
  • Improves compatibility for Copilot personal-skills and common clone-based installs
  • Reduces ambiguity by using consistent priority and clearer error messages

Commits in this PR branch

  • a2071fb fix(pi): resolve understand plugin root via symlink-safe logic
  • 6a071b5 chore(pi): improve plugin root error message
  • d9250d7 fix(skills): harden plugin root resolution across install modes

Copilot AI review requested due to automatic review settings April 20, 2026 12:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the /understand skill’s pre-flight instructions to resolve the Understand Anything plugin root in a symlink-safe way (targeting Pi installs where skills are exposed via symlinks), ensuring pnpm commands run in the correct workspace directory.

Changes:

  • Adds symlink-safe resolution for the skill path via realpath/readlink -f to derive a self-relative plugin root.
  • Prefers the universal plugin-root symlink ~/.understand-anything-plugin when present, with fallback to the resolved real checkout path.
  • Validates candidates by checking for package.json and pnpm-workspace.yaml before running build steps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread understand-anything-plugin/skills/understand/SKILL.md Outdated
@Lum1104

Lum1104 commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the contribution!

@Lum1104

Lum1104 commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

@codex review this

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6a071b5abd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread understand-anything-plugin/skills/understand/SKILL.md
@0xnayuta 0xnayuta changed the title fix(pi): resolve understand plugin root via symlink-safe logic fix(skills): harden plugin root resolution across install modes Apr 22, 2026
@Lum1104

Lum1104 commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

@codex review this

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Lum1104
Lum1104 merged commit 81238fb into Egonex-AI:main Apr 24, 2026
1 check passed
@0xnayuta
0xnayuta deleted the fix/pi-plugin-root-resolution branch May 10, 2026 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants