From 65b8f5559847ad85a4be9f8281d044eff6ef82e2 Mon Sep 17 00:00:00 2001 From: Abdul Wahab Date: Fri, 7 Aug 2026 13:33:42 +0500 Subject: [PATCH 1/4] Fix: stop the plugin subtree from running the project's skill copy (#523) The ./plugin subtree copied dist/claude-code output verbatim, so its 44 markdown instructions said `node .claude/skills/impeccable/scripts/...`, a path inside the user's project. A plugin-only install got MODULE_NOT_FOUND; a dual install silently ran the project's older skill copy with zero indication anything was wrong. There is no literal path that works for plugins (CLAUDE_PLUGIN_ROOT is hook-only), so the build now rewrites the plugin subtree's markdown to the `` form SKILL.md already carried as a fallback, and scopes the allowed-tools rule to `Bash(node */skills/impeccable/scripts/*)` so it pre-approves the skill's own install path instead of the project's. Drafted with AI assistance, reviewed by a maintainer. Co-authored-by: Cursor --- plugin/agents/impeccable-asset-producer.md | 2 +- .../skills/impeccable/reference/critique.md | 10 +- .../reference/degraded/asset-producer.md | 2 +- plugin/skills/impeccable/reference/doctor.md | 4 +- plugin/skills/impeccable/reference/hooks.md | 12 +- plugin/skills/impeccable/reference/layout.md | 2 +- .../skills/impeccable/reference/live-setup.md | 2 +- plugin/skills/impeccable/reference/live.md | 26 ++-- plugin/skills/impeccable/reference/polish.md | 2 +- plugin/skills/impeccable/reference/routing.md | 4 +- plugin/skills/impeccable/reference/typeset.md | 2 +- .../skills/impeccable/reference/visualize.md | 2 +- scripts/build.js | 8 ++ scripts/lib/plugin-paths.js | 73 +++++++++++ scripts/test-suites.mjs | 2 + tests/plugin-paths.test.js | 116 ++++++++++++++++++ 16 files changed, 234 insertions(+), 35 deletions(-) create mode 100644 scripts/lib/plugin-paths.js create mode 100644 tests/plugin-paths.test.js diff --git a/plugin/agents/impeccable-asset-producer.md b/plugin/agents/impeccable-asset-producer.md index 600f0f8f4..1002d8d24 100644 --- a/plugin/agents/impeccable-asset-producer.md +++ b/plugin/agents/impeccable-asset-producer.md @@ -58,7 +58,7 @@ Ask blockers once, globally. Missing source path/crops or output directory block 7. Remove baked-in UI text, navigation, buttons, body copy, and mock chrome unless the text is part of the asset. 8. Think through the final DOM/CSS representation before generating. If CSS will own radius, clipping, shadows, borders, perspective, responsive cropping, captions, or card frames, do not bake those into the bitmap. -9. Save outputs non-destructively in the requested project directory, and leave the intent with the file: after every generation, run `node .claude/skills/impeccable/scripts/embed-prompt.mjs --prompt ""` so the prompt is embedded in the image itself, because the build thread composes what you made and needs to know what it is looking at, and the embedding survives copies where sidecars get lost. +9. Save outputs non-destructively in the requested project directory, and leave the intent with the file: after every generation, run `node /scripts/embed-prompt.mjs --prompt ""` so the prompt is embedded in the image itself, because the build thread composes what you made and needs to know what it is looking at, and the embedding survives copies where sidecars get lost. 10. Compare each output against its source crop, opening every image by its workspace-relative path; sandboxed viewers reject absolute paths. If a review/QA tool is available, run it before the final manifest, then retry each major/fatal finding once before finalizing. Use `texture/pattern extraction` only when the source region is already clean enough to sample as texture. If UI, cards, labels, headings, body copy, or footer chrome must be removed to make a reusable texture or background, classify it as crop-derived cleanup or clean-plate work. diff --git a/plugin/skills/impeccable/reference/critique.md b/plugin/skills/impeccable/reference/critique.md index 42c3f0d92..0317f6789 100644 --- a/plugin/skills/impeccable/reference/critique.md +++ b/plugin/skills/impeccable/reference/critique.md @@ -21,7 +21,7 @@ Resolve one stable target, run two independent assessments, synthesize a design - "this page" -> the current URL or source file 2. **Confirm the target slugs cleanly**: ```bash - node .claude/skills/impeccable/scripts/critique-storage.mjs slug "" + node /scripts/critique-storage.mjs slug "" ``` Every later command also accepts the resolved target directly and derives the same slug internally; never hand-write a slug. If this exits non-zero, skip persistence and trend for this run, but continue the critique. 3. **Read `.impeccable/critique/ignore.md`** if it exists. Drop matching findings silently; it is the only prior-run input critique consumes. @@ -57,7 +57,7 @@ Run the bundled detector and browser visualization evidence. Assessment B is man CLI scan: ```bash -node .claude/skills/impeccable/scripts/detect.mjs --json [target] +node /scripts/detect.mjs --json [target] ``` - Pass markup files/directories as `[target]`; do not pass CSS-only files. @@ -71,7 +71,7 @@ Browser visualization is required for a viewable target when browser automation 1. Create a fresh tab and navigate. Prefer the harness's native/browser-canvas screenshot path before hand-rolling a Playwright/Puppeteer script; only fall back to a custom script when no native browser tool is exposed. 2. Preflight mutable injection by setting `document.title` and appending a `