AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He
feat(ai-image): add custom escape hatch for rendering / palette / hero composition
hugohe3f3cc86d9aa4a
diff --git a/skills/ppt-master/references/image-generator.md b/skills/ppt-master/references/image-generator.mdindex 16deb9d7..f0e6ed21 100644--- a/skills/ppt-master/references/image-generator.md+++ b/skills/ppt-master/references/image-generator.md@@ -92,6 +92,8 @@ image_palette: cool-corporateIf both fields are present, use them directly — Strategist made the decision in h.5 with full d-e-f-g-h linkage context. Do NOT re-decide.+**Hard rule — `custom` escape hatch**: when either value is the literal string `custom`, do NOT `read_file` the preset library for that dimension. Read the sibling `*_behavior` line from `spec_lock.md colors` and splice that prose into the prompt in place of the preset's fewshot snippet. The behavior prose owns the style paragraph (for `custom` rendering) or the proportion/role rules (for `custom` palette). See [`image-renderings/_index.md`](./image-renderings/_index.md) §1.5 / [`image-palettes/_index.md`](./image-palettes/_index.md) §2 for the invocation rules.+**Fallback path — when `spec_lock.md` lacks both fields** (legacy decks or pipelines that skipped h.5):| Signal | Maps to |@@ -185,6 +187,22 @@ Use with `text_policy: embedded`. Must obey the §5.3 text-accuracy rules (EngliUse for: cover background, chapter divider background, breathing-page background, any page where the SVG layer carries the words and the image only sets tone.+**Primitive E — custom (escape hatch)**++When none of A/B/C/D describe the page's intended layout (triptych, asymmetric multi-focal, narrative diorama, etc.), write the composition description directly into the prompt's composition sentence — same paragraph slot A/B/C/D occupy, but in your own words. No new field; the freedom is in the prose.++**Hard rule — custom composition prose**:++| Rule | Value |+|---|---|+| Length | One paragraph, 2-5 sentences, replacing A/B/C/D's opening paragraph |+| Required content | subject count, layout structure, where breathing room sits, where SVG overlay can claim canvas |+| Forbidden | Naming a competing primitive ("like A but two subjects") |++Example opening for a triptych hero:++> Triptych — three equal vertical bands of canvas, each holding one symbolic object centered in its band; objects share a low horizon line; bands separated by 2px hairline rules; collectively reads as a single composed page. [...rest of prompt continues with rendering paragraph + color behavior + container note...]+**Fewshot examples per primitive** (one each, deck-context placeholders intact):> **A — 3d-isometric + tech-neon product reveal, text_policy: none, 600×600**diff --git a/skills/ppt-master/references/image-palettes/_index.md b/skills/ppt-master/references/image-palettes/_index.mdindex 4581c6b5..7f060a93 100644--- a/skills/ppt-master/references/image-palettes/_index.md+++ b/skills/ppt-master/references/image-palettes/_index.md@@ -29,9 +29,41 @@ Each palette has its own file with: rendering compatibility matrix and a fewshot----## 2. Auto-selection table — `design_spec` → palette+## 2. Escape hatch — `custom`-Match `design_spec.md d. Style` + `e. Color Scheme` content vibe. First match wins. If no row matches, default to `cool-corporate`.+When no preset temperament matches (brand HEX outside preset ranges, ceremonial / cultural / niche aesthetic), set `image_palette: custom` and supply a one-paragraph `image_palette_behavior`.++**Trigger** — all of:++| Condition | Check against |+|---|---|+| No preset temperament fits | `design_spec.e Color Scheme` |+| Brand / template / chat names no preset | truth-precedence inputs |+| Not expressible as "preset X + small HEX swap" | Strategist confirmation chat |++**Hard rule — `palette_behavior` prose**:++| Rule | Value |+|---|---|+| Length | One paragraph, 2-5 sentences |+| Per-HEX content | role + approximate area share (proportion follows information weight; no fixed % menu) |+| HEX source | Quote `design_spec.colors` values verbatim with backticks; never invent HEX |+| Forbidden | Naming a competing preset ("like macaron but darker") |++```yaml+- image_palette: custom+- image_palette_behavior: "Primary deep aubergine `#4C1D95` anchors the dominant ~35% of canvas; secondary warm cream `#FEF3C7` carries ~55% as breathing field; accent burnished gold `#D4AF37` appears only in 5-10% as small ceremonial accents. Restrained, ceremonial gravitas — no fourth color."+```++> Note: §4's rendering × palette matrix only covers the 14 presets. When `palette: custom`, Strategist owns the compatibility judgment in h.5.++**Hard rule**: `custom` is a tail-case, not a default. See [`strategist.md`](../strategist.md) h.5 for the one-`custom`-per-dimension limit.++---++## 3. Auto-selection table — `design_spec` → palette++Match `design_spec.md d. Style` + `e. Color Scheme` content vibe. First match wins. **No row matches** → use `custom` per §2 rather than force-fitting `cool-corporate`.| Content vibe / industry | Recommended palette | Alternates ||---|---|---|@@ -55,7 +87,7 @@ Match `design_spec.md d. Style` + `e. Color Scheme` content vibe. First match wi----## 3. Rendering × Palette compatibility+## 4. Rendering × Palette compatibilitySome combinations clash. Use this matrix as a sanity check after auto-selection.@@ -86,11 +118,10 @@ Some combinations clash. Use this matrix as a sanity check after auto-selection.----## 4. How to use+## 5. How to use1. After picking rendering, look up your candidate palette in the auto-selection table.2. Cross-check the compatibility matrix — if `✗`, pick the alternate.-3. `read_file image-palettes/<chosen>.md`.-4. Apply its proportion + role rules to the deck's HEX values when assembling prompts.+3. `read_file image-palettes/<chosen>.md` and apply its proportion + role rules to the deck's HEX values when assembling prompts. (For `custom`, this step is replaced by the consumption branch in [`image-generator.md`](../image-generator.md) Step 2 — no preset file to read.)**Lock for the whole deck.**diff --git a/skills/ppt-master/references/image-renderings/_index.md b/skills/ppt-master/references/image-renderings/_index.mdindex 3fecbcfb..eb46f297 100644--- a/skills/ppt-master/references/image-renderings/_index.md+++ b/skills/ppt-master/references/image-renderings/_index.md@@ -50,11 +50,38 @@ Each rendering has its own file with: style paragraph, line / texture / depth no| [`pixel-art`](./pixel-art.md) | 8-bit retro game aesthetic | Gaming / retro tech / nostalgic || [`nature`](./nature.md) | Organic earthy illustration | Environment / wellness / sustainability |+### 1.5 Escape hatch — `custom`++When no preset carries the deck's temperament, set `image_rendering: custom` and supply a one-paragraph `image_rendering_behavior`.++**Trigger** — all of:++| Condition | Check against |+|---|---|+| No preset style fits | `design_spec.d Style` |+| Brand / template / chat names no preset | truth-precedence inputs |+| Not expressible as "preset X + small adjustment" | Strategist confirmation chat |++**Hard rule — `rendering_behavior` prose**:++| Rule | Value |+|---|---|+| Length | One paragraph, 2-5 sentences |+| Axes covered | line / texture / depth / material / mood (same as preset files) |+| Forbidden | Naming a competing preset ("like blueprint but warmer") |++```yaml+- image_rendering: custom+- image_rendering_behavior: "Hand-screened poster aesthetic — slightly misregistered halftone overlays, 3 flat ink colors with visible dot pattern at 12% opacity, no gradients, no anti-aliased edges; reads as silkscreen print."+```++**Hard rule**: `custom` is a tail-case, not a default. See [`strategist.md`](../strategist.md) h.5 for the one-`custom`-per-dimension limit.+---## 2. Auto-selection table — `design_spec` → rendering-Match `design_spec.md d. Style` (mode + descriptor) against this table. First match wins. If no row matches, default to `vector-illustration`.+Match `design_spec.md d. Style` (mode + descriptor) against this table. First match wins. **No row matches** → use `custom` per §1.5 rather than force-fitting `vector-illustration`.| `d. Style` signal | Recommended rendering | Alternates ||---|---|---|@@ -84,7 +111,6 @@ Match `design_spec.md d. Style` (mode + descriptor) against this table. First ma1. From `design_spec.md` extract `d. Style` mode + descriptor.2. Find the matching row above; pick the primary recommendation.-3. `read_file image-renderings/<chosen>.md`.-4. Apply its style paragraph when assembling each prompt per [`image-generator.md`](../image-generator.md) §4.+3. `read_file image-renderings/<chosen>.md` and apply its style paragraph when assembling each prompt per [`image-generator.md`](../image-generator.md) §4. (For `custom`, this step is replaced by the consumption branch in [`image-generator.md`](../image-generator.md) Step 2 — no preset file to read.)**Lock for the whole deck.** Don't change rendering between images in the same deck.diff --git a/skills/ppt-master/references/strategist.md b/skills/ppt-master/references/strategist.mdindex 7868b46d..e49257f3 100644--- a/skills/ppt-master/references/strategist.md+++ b/skills/ppt-master/references/strategist.md@@ -282,8 +282,9 @@ After the candidates, append one line:| `Mood` line MUST include a real-world analogy | Company / publication / event the user can picture. Adjective stacks alone are forbidden. || Adapt labels to chat language | Schema is English by default. Chinese chat → render as 「方案 A / 视觉 / 色彩 / 情绪」. Structure stays the same; only the labels translate. || Skip presentation when user has specified | User-named rendering or palette (chat / brand / template) bypasses the candidate flow — lock directly per the truth-precedence rule. |+| `custom` is a tail-case, not a default | When no preset fits, a candidate may set `rendering: custom` and / or `palette: custom` (rules: [`image-renderings/_index.md`](../image-renderings/_index.md) §1.5, [`image-palettes/_index.md`](../image-palettes/_index.md) §2). At most one candidate per dimension may carry `custom`; one candidate may carry both dimensions as `custom`. `Visual` / `Color` lines describe the behavior in prose, never by naming a competing preset. |-**Forbidden — padding with conflicts**: if e.'s HEX cannot find ≥3 compatible palettes, present the smaller set (2 candidates) and state "your color is unusual — only N palettes can carry it without conflict." Never fill remaining slots with known-conflicting options.+**Forbidden — padding with conflicts**: if e.'s HEX cannot find ≥3 compatible palettes, present the smaller set (2 candidates) and state "your color is unusual — only N palettes can carry it without conflict." A `custom` candidate is allowed only when its prose genuinely describes a tail-case the presets cannot — not as a slot-filler. Never fill remaining slots with known-conflicting options.**Worked example** (e. = `#1E3A5F` navy + `#F8F9FA` off-white + `#D4AF37` gold; d. = consulting; chat in English):@@ -306,6 +307,17 @@ After the candidates, append one line:> Reference images: see references/ai-image-comparison/ for matching PNGs by name.```+**Worked example — `custom × custom`** (tail-case; e.g. 新中式 deck with `#1A1A1A` + `#F5EFE0` + `#A52A2A`):++```+[Plan A] 文人雅致 — custom × custom+ Visual: dry-brush burnt-ink, five tonal gradations, 宣纸 paper-grain, deliberate negative space; 朱泥 seal as single red mark+ Color: cream #F5EFE0 ~65% negative space + burnt-ink #1A1A1A ~20% strokes + cinnabar #A52A2A 3-5% seal+ Mood: literati restraint; like 苏州博物馆 pacing+```++`Visual` / `Color` lines feed `spec_lock.md`'s `image_*_behavior` rows verbatim.+After the user picks a candidate (or supplies a custom variant), proceed to "Recording the lock" below.---@@ -372,18 +384,27 @@ After auto-selecting, cross-check `image-palettes/_index.md` compatibility matri**Recording the lock** — after picking, write to:-- `design_spec.md §III Visual Theme` — add two lines under the color table:+- `design_spec.md §III Visual Theme` — add lines under the color table:```- **Image Rendering**: vector-illustration- **Image Palette**: cool-corporate```-- `spec_lock.md colors` section — add two extra rows at the bottom:+- `spec_lock.md colors` section — add rows at the bottom:```- image_rendering: vector-illustration- image_palette: cool-corporate```-Image_Generator reads these two fields and applies them deck-wide. If both are absent (legacy decks), Image_Generator falls back to inferring them from `d. Style` and `e. Color` — quality is acceptable but not optimal. Always lock both when C is selected.+**Hard rule — `custom` recording**: when the picked candidate has `rendering: custom` or `palette: custom`, also write the sibling `*_behavior` row. Source: the candidate's `Visual` line (for rendering) / `Color` line (for palette), expanded to cover the prose requirements in [`image-renderings/_index.md`](../image-renderings/_index.md) §1.5 / [`image-palettes/_index.md`](../image-palettes/_index.md) §2 (chat candidates are compressed; spec_lock prose covers all axes). Both `design_spec.md` and `spec_lock.md` must carry the behavior line. Example for the `custom × custom` candidate above:++```+- image_rendering: custom+- image_rendering_behavior: "Dry-brush burnt-ink with five tonal gradations, 宣纸 paper-grain at 12% opacity, deliberate negative space; 朱泥 seal as a single red mark; no Western outlines, no gradients."+- image_palette: custom+- image_palette_behavior: "宣纸 cream `#F5EFE0` carries ~65% as negative space; burnt-ink `#1A1A1A` anchors ~20% as brush strokes; cinnabar `#A52A2A` only in 3-5% as seal. Literati restraint — no fourth color."+```++Image_Generator reads these fields and applies them deck-wide. If both are absent (legacy decks), it falls back to inferring from `d. Style` and `e. Color` — quality is acceptable but not optimal. Always lock both when C is selected.#### hero_page suggestion (same confirmation turn)diff --git a/skills/ppt-master/templates/design_spec_reference.md b/skills/ppt-master/templates/design_spec_reference.mdindex aeecd508..b00d6c17 100644--- a/skills/ppt-master/templates/design_spec_reference.md+++ b/skills/ppt-master/templates/design_spec_reference.md@@ -60,10 +60,12 @@### AI Image Strategy (fill only when §VIII has `ai` rows)-- **Image Rendering**: [one of the 16 names in `references/image-renderings/_index.md`, e.g. `vector-illustration`]-- **Image Palette**: [one of the 10 names in `references/image-palettes/_index.md`, e.g. `cool-corporate`]+- **Image Rendering**: [one of the 20 names in `references/image-renderings/_index.md` (e.g. `vector-illustration`), or `custom`]+- **Image Rendering Behavior**: [required when Rendering is `custom`; one-paragraph prose per `image-renderings/_index.md §1.5`]+- **Image Palette**: [one of the 14 names in `references/image-palettes/_index.md` (e.g. `cool-corporate`), or `custom`]+- **Image Palette Behavior**: [required when Palette is `custom`; one-paragraph prose per `image-palettes/_index.md §2`]-> Strategist: lock these once per deck in h.5; every AI image inherits them. Cross-check the rendering × palette compatibility matrix in `image-palettes/_index.md` — avoid `✗` combinations. Leave the section out entirely if §VIII has no `ai` rows.+> Strategist: lock these once per deck in h.5; every AI image inherits them. Cross-check the rendering × palette compatibility matrix in `image-palettes/_index.md` — avoid `✗` combinations (matrix only covers presets; when either dimension is `custom`, Strategist owns the compatibility judgment). Leave the section out entirely if §VIII has no `ai` rows. Omit the `Behavior` rows whenever the corresponding dimension is a preset name.### Gradient Scheme (if needed, using SVG syntax)diff --git a/skills/ppt-master/templates/spec_lock_reference.md b/skills/ppt-master/templates/spec_lock_reference.mdindex e5528c04..d8170149 100644--- a/skills/ppt-master/templates/spec_lock_reference.md+++ b/skills/ppt-master/templates/spec_lock_reference.md@@ -25,7 +25,16 @@> Strategist: fill only colors actually used. Add extra rows as needed; delete unused rows rather than leave as `#......`.>-> **`image_rendering` and `image_palette`** — required only when `images` section below contains `ai`-sourced files. Values MUST be valid names from `references/image-renderings/_index.md` and `references/image-palettes/_index.md`. Image_Generator reads these and applies them deck-wide. Omit both rows when the deck has no AI-generated images.+> **`image_rendering` and `image_palette`** — required only when `images` section below contains `ai`-sourced files. Values MUST be valid names from `references/image-renderings/_index.md` and `references/image-palettes/_index.md`, **or** the literal string `custom`. Image_Generator reads these and applies them deck-wide. Omit both rows when the deck has no AI-generated images.+>+> **`custom` escape hatch.** When set to `custom`, add a sibling `*_behavior` row carrying a one-paragraph prose description. Image_Generator splices the prose into the prompt in place of the preset file's fewshot snippet. Tail-case only — see [`image-renderings/_index.md`](../references/image-renderings/_index.md) §1.5 / [`image-palettes/_index.md`](../references/image-palettes/_index.md) §2 for invocation rules.+>+> ```+> - image_rendering: custom+> - image_rendering_behavior: "Hand-screened poster aesthetic — slightly misregistered halftone overlays, 3 flat ink colors with visible dot pattern at 12% opacity, no gradients, no anti-aliased edges; reads as silkscreen print."+> - image_palette: custom+> - image_palette_behavior: "Primary deep aubergine `#4C1D95` anchors ~35% of canvas; secondary warm cream `#FEF3C7` carries ~55% as breathing field; accent burnished gold `#D4AF37` in 5-10% as ceremonial accents. No fourth color."+> ```## typography- font_family: "Microsoft YaHei", Arial, sans-serif