Fix plugin script path resolution (#535)

Makes plugin instructions execute the installed plugin copy, safely quotes paths containing spaces, removes the broad Node pre-approval, and ships guarded generated plugin output.\n\nAI-assisted maintainer conflict resolution, review, and validation by Codex under maintainer direction.
This commit is contained in:
Abdul Wahab
2026-08-31 20:16:04 -04:00
committed by GitHub
parent 0bc8643b51
commit bfafc7dbcb
18 changed files with 551 additions and 50 deletions
+2 -2
View File
@@ -30,8 +30,8 @@ Every region with `medium: raster` in the spec ships as a plate at its `plate` p
Per region, in the spec's order:
1. `node .claude/skills/impeccable/scripts/comp-spec.mjs --crop <id>` writes the reference crop under `.impeccable/build/crops/`.
2. Produce the plate. With the API fallback: `node .claude/skills/impeccable/scripts/generate-image.mjs --plate <id> --quality high` does the whole step (crop as reference, the spec's plate prompt, output size chosen from the region's aspect, the file written to its plate path, prompt embedded, and the plate scored against the crop). With a harness-native image tool: use the crop as the input image and `node .claude/skills/impeccable/scripts/comp-spec.mjs --plate-prompt <id>` as the prompt, write the result to the plate path, then run `node .claude/skills/impeccable/scripts/embed-prompt.mjs <plate> --prompt "<the exact prompt>"`.
1. `node "${CLAUDE_PLUGIN_ROOT}/skills/impeccable/scripts/comp-spec.mjs" --crop <id>` writes the reference crop under `.impeccable/build/crops/`.
2. Produce the plate. With the API fallback: `node "${CLAUDE_PLUGIN_ROOT}/skills/impeccable/scripts/generate-image.mjs" --plate <id> --quality high` does the whole step (crop as reference, the spec's plate prompt, output size chosen from the region's aspect, the file written to its plate path, prompt embedded, and the plate scored against the crop). With a harness-native image tool: use the crop as the input image and `node "${CLAUDE_PLUGIN_ROOT}/skills/impeccable/scripts/comp-spec.mjs" --plate-prompt <id>` as the prompt, write the result to the plate path, then run `node "${CLAUDE_PLUGIN_ROOT}/skills/impeccable/scripts/embed-prompt.mjs" <plate> --prompt "<the exact prompt>"`. When that script path is unreachable in your environment, write the same prompt to `<asset>.prompt.txt` beside the asset and note it in your manifest so the parent can embed it.
3. Read the score line. `PLATE-SCORE` under 50%, or a `PLATE-WARN`, means the plate does not read as the region: open the plate beside the crop, name what drifted (subject, framing, palette, style), tighten the prompt with that, and regenerate once. Two misses on one region: keep the better plate, mark it `needs_parent_review`, and say why in one line.
4. Transparent cutouts (a figure or object on the page ground): generate on a flat chroma color absent from the subject and key it to alpha before writing the PNG; never ship the keyed background.