Skip to content

fix(design-detect): find impeccable installed as a Claude Code plugin - #2976

Closed
SomSamantray wants to merge 2 commits into
garrytan:mainfrom
SomSamantray:fix/design-detect-plugin-cache-impeccable
Closed

SomSamantray wants to merge 2 commits into
garrytan:mainfrom
SomSamantray:fix/design-detect-plugin-cache-impeccable

Conversation

@SomSamantray

@SomSamantray SomSamantray commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Why

gstack-design-detect probe only looks for impeccable under ~/.claude/skills/impeccable/. Today the normal way to get impeccable is as a Claude Code plugin, which installs at ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/skills/impeccable/ instead — a path the probe never checks. So every plugin-installed user gets IMPECCABLE_SKILL: absent, never sees the NOT_CACHED run hint even though their own launcher is sitting right there, and the /impeccable <cmd> handoff in /review//ship//design-review never fires for them. This adds a plugin-cache walk alongside the existing one, sharing the same presence/launcher/repo-local-exclusion/sibling-engine logic so both paths behave identically.

Live evidence

$ HOME=<fixture-home> IMPECCABLE_HOME=<fixture-home>/.impeccable-home \
  bun --no-env-file run bin/gstack-design-detect.ts probe

# before this fix (bin/gstack-design-detect.ts @ 06ed920a, same fixture):
IMPECCABLE_NOT_AVAILABLE
IMPECCABLE_SKILL: absent
IMPECCABLE_HOOK: absent
...

# after this fix:
IMPECCABLE_NOT_AVAILABLE
IMPECCABLE_SKILL: present
IMPECCABLE_HOOK: absent
...

Fixture: <fixture-home>/.claude/plugins/cache/impeccable/impeccable/4.3.1/skills/impeccable/SKILL.md — the exact layout from the issue's own repro.

$ bun test test/gstack-design-detect.test.ts -t "plugin-cache"
 4 pass
 0 fail
$ bun test test/gstack-design-detect.test.ts
 70 pass
 3 fail   # pre-existing on main, unrelated to this diff — confirmed via `git stash`
           # on 06ed920a before any changes: same 3 tests fail (macOS /var vs
           # /private/var realpath normalization + one timing-sensitive install test)

Scope

  • Changed: bin/gstack-design-detect.ts (plugin-cache walk + shared checkSkillDir extraction), test/gstack-design-detect.test.ts (4 new regression tests)
  • Verified live by: running the compiled probe binary directly against a constructed plugin-cache fixture (before/after above), plus the full gstack-design-detect.test.ts suite
  • Did NOT test: Windows (two of the four new tests are skipIf(!POSIX), matching the file's existing pattern for launcher-execution tests); did not test against a real Claude Code plugin marketplace install, only the fixture layout the issue's reproduction documents

Liveness proof (required for external contributors)

liveness proof: GSTACK PR typed live into a terminal prompt

Checklist

Fixes #2838

Unapplied review findings

  • P2 — bin/gstack-design-detect.ts:39 — Plugin-cache walk picks an arbitrary (possibly stale) version, not the newest
    Suggested fix: in pluginCacheImpeccableSkillDirs, sort version entries with the same semverKey comparator newestSemverDir uses (or call newestSemverDir(pluginDir) and push only that version), so plugin-cache resolution gets the same newest-wins guarantee the rest of the file relies on.

The design-detector probe only ever checked <root>/<SKILL_ROOTS>/skills/impeccable/,
never the Claude Code plugin-cache layout
(<root>/.claude/plugins/cache/<marketplace>/<plugin>/<version>/skills/impeccable/).
A plugin-installed impeccable was therefore invisible: IMPECCABLE_SKILL stayed
absent, the launcher was never found (so the NOT_CACHED run hint never fired),
and its sibling engine was never considered.

Add a plugin-cache walk alongside the existing SKILL_ROOTS walk, sharing the
same presence/launcher/repo-local-exclusion/sibling-engine logic via an
extracted checkSkillDir() helper so both paths stay behaviorally identical.

Fixes garrytan#2838
Both did the identical try/catch-around-readdirSync; newestSemverDir now
reuses the new safeReaddir helper instead of duplicating it.
@trunk-io

trunk-io Bot commented Sep 25, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@capy-ai

capy-ai Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Thanks @SomSamantray — your plugin-cache discovery contribution was incorporated, with credit, into the merged fix wave in #2978 (v1.91.1.0). That change also addresses the version-ordering finding here and adds custom-root, trust-boundary, and handoff regression coverage. Closing this PR as superseded by the merged implementation; #2838 is already closed.

@capy-ai capy-ai Bot closed this Sep 25, 2026
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.

design detector probes IMPECCABLE_SKILL: absent for every Claude Code plugin install of impeccable

1 participant