{"id":18290,"plugin_id":"plugins_6a80500711748191bee28e0649499efa","kind":"skill","collection_source":null,"comparison_source":null,"observed_at":"2026-09-30T23:14:46.141Z","digest":"4e8fffbb027425968601cf713b95665c38a605dc6cb1ae40533c4150c7defed5","against":null,"payload":{"name":"prompt-compiler","description":"Image-generation and image-edit instruction compiler. This skill should be used when translating an approved Art Direction Spec or a ready EditContract into precise provider/model-ready instructions, linting prompt slop, or preparing execution for the host image tool without changing upstream creative decisions.","included_files":[{"relative_path":"agents/openai.yaml","size_in_bytes":410},{"relative_path":"assets/large-logo.svg","size_in_bytes":676},{"relative_path":"assets/small-logo.svg","size_in_bytes":676},{"relative_path":"scripts/prompt_lint.py","size_in_bytes":2610},{"relative_path":"scripts/test_prompt_lint.py","size_in_bytes":1051}],"skill_md_contents":"---\nname: prompt-compiler\ndescription: Image-generation and image-edit instruction compiler. This skill should be used when translating an approved Art Direction Spec or a ready EditContract into precise provider/model-ready instructions, linting prompt slop, or preparing execution for the host image tool without changing upstream creative decisions.\n---\n\n# Prompt Compiler\n\nCompile approved design decisions into executable image instructions. Do not invent the concept, repair weak hierarchy, reinterpret annotations, or broaden edit scope.\n\n## Preconditions\n\n### Generation\n\nRequire approved strategy/composition/craft state appropriate to the task\n\n### Editing, inpainting, annotation-guided correction\n\nRequire a typed `EditContract` from `edit-sanitizer` with\n\n- `status: ready`\n- `execution_allowed: true`\n- approved `source_checkpoint`\n- normalized target geometry\n- atomic requested mutations\n- protected regions and semantic locks\n- acceptance checks\n\nIf these are missing, route to `edit-sanitizer`. Do not compile a best-effort local edit from raw feedback\n\n## Compilation rules\n\n1. State subject identity and required invariants first\n2. Express composition as relationships, not disconnected style words\n3. Use camera language only when it materially changes the visual result\n4. Preserve brand, product, copy, and campaign locks verbatim\n5. Include only likely failure exclusions for the current task\n6. Keep provider-specific syntax modular and subordinate to the Art Direction Spec\n7. When the host has a native image tool, use its supported interface instead of inventing API parameters\n8. Apply inclusive visual representation rules: eliminate clone faces, mandate authentic ethnic features and melanin-calibrated lighting\n\n## Bounded edit compilation\n\nCompile the sanitized contract in this order\n\n1. Approved source checkpoint\n2. Exact semantic target and normalized/native geometry if the host accepts region data\n3. One atomic allowed mutation\n4. Identity, geometry, text, and style locks\n5. Protected-region rule for all non-target content\n6. Boundary blending allowance limited to what is needed for believable integration\n7. Acceptance checks\n8. Retry rule: restart from the approved checkpoint if collateral drift is material\n\nUse language such as\n\n`Edit only the selected bottle-cap region. Change the cap finish from matte black to brushed silver. Keep the bottle silhouette, label, logo, crop, perspective, background, lighting direction, and color grade materially stable. Do not add, remove, move, restyle, or rewrite anything outside the target. Allow only the minimal edge blending needed to integrate the new cap finish. If the result changes protected content, reject it and retry from the approved source checkpoint.`\n\nDo not claim literal pixel identity unless the available editor guarantees it deterministically\n\n## Copy correction\n\n- exact copy is immutable\n- never ask the image model to invent replacement copy\n- Arabic copy requires `arabic-rtl-director` review before execution\n- if text correctness remains unreliable, generate/retain the visual foundation and use a deterministic text workflow where the host supports one\n\n## Prompt lint\n\nRun\n\n```bash\npython3 scripts/prompt_lint.py \"<compiled instruction>\"\npython3 scripts/test_prompt_lint.py\n```\n\nReject prompt text when vague quality adjectives or effect stacks replace visual decisions\n\n## Output\n\nReturn `generation_state` with\n\n- operation: `generate` or `edit`\n- provider/host assumptions actually verified\n- compiled instruction\n- source checkpoint when editing\n- edit contract ID when editing\n- acceptance checks\n- likely failure exclusions\n\n---\n\n## Cross-Skill Neural Connections & References\n\n### Peer & Downstream Skills\n- [Edit Sanitizer](../edit-sanitizer/SKILL.md) — Upstream sanitized EditContract provider\n- [Photography Director](../photography-director/SKILL.md) — Optical parameters and lighting models\n- [Manipulation Director](../manipulation-director/SKILL.md) — Compositing physics and boundary blending rules\n- [Visual QA](../visual-qa/SKILL.md) — Downstream independent visual verification gate\n- [Designly Director](../designly-director/SKILL.md) — Orchestrator and state owner\n\n### Schemas & References\n- [Prompt Compiler Guide](../../shared/references/prompt-compiler.md) — Model prompt translation rules\n- [Model Guides](../../shared/references/model-guides.md) — Provider-specific nuances\n- [Inclusive Representation](../../shared/references/inclusive-representation-and-ethics.md) — Anti-bias prompting rules\n- [Edit Contract](../../shared/contracts/edit-contract.schema.json) — Local edit schema\n- [Signal Packet](../../shared/contracts/signal-packet.schema.json) — Neural Mesh handoff\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}