Skip to content

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(image-layout): support registered subject layer pairs

hugohe3d6349e4b2886
diff --git a/skills/ppt-master/references/image-generator.md b/skills/ppt-master/references/image-generator.md
index 0d6a9590..42a50f16 100644
--- a/skills/ppt-master/references/image-generator.md
+++ b/skills/ppt-master/references/image-generator.md
@@ -306,6 +306,48 @@ python3 scripts/slice_images.py <project>/images/illus_sheet.png --grid 2x3 \
---
+### 4.4 Registered subject/base pairs
+
+Use this preparation when a person, product, creature, or other foreground
+subject must cross native titles, panels, frames, cards, or shapes while the
+original scene remains behind them. The final pair is one compositional asset:
+
+| Output | Required content |
+|---|---|
+| Clean base | Full original canvas with the foreground subject removed and the hidden background reconstructed |
+| Subject cutout | The same full canvas and subject position, with only the foreground subject visible on RGBA transparency |
+
+**Mandatory — preserve registration**: Start both derivatives from the same
+source. Preserve canvas dimensions, subject pose, scale, and position; do not
+trim or independently crop either final output. Record the shared source and
+pair relationship in the owning §VIII rows or Quick active-context resources.
+
+**Preparation procedure**:
+
+1. Use the active image-editing path to remove the subject and inpaint the clean base.
+2. Use the same source to isolate the subject. Prefer a direct RGBA result.
+3. When the active path cannot return transparency, place the isolated subject on one exact flat key color, then run `slice_images.py` as a `1x1` sheet with `--alpha` and without `--trim` so the full-canvas coordinates remain unchanged.
+4. Save both final files under `<project>/images/` and mark them `no-crop` in the active resource authority.
+
+Path A may use the existing single-image edit mode for each derivative; Path B
+may perform the same edits with the host-native image tool:
+
+```bash
+python3 scripts/image_gen.py "Remove the foreground subject and reconstruct the hidden background; preserve the exact canvas" \
+ --reference-image <project>/images/<source>.png -o <project>/images -f <pair>_base
+python3 scripts/image_gen.py "Isolate the same foreground subject at the exact original pose, scale, and position on a flat #00FF00 background" \
+ --reference-image <project>/images/<source>.png -o <project>/images -f <pair>_subject_key
+python3 scripts/slice_images.py <project>/images/<pair>_subject_key.png --grid 1x1 \
+ --names <pair>_subject --alpha --bg "#00FF00"
+```
+
+The positional edit commands are allowed here as the declared derivation step
+for already-planned pair rows; keep the final pair in the ordinary resource
+authority and operational sidecar. SVG realization follows
+[`image-layout-patterns.md`](./image-layout-patterns.md) `#A2-03`.
+
+---
+
## 5. Global Hard Rules
These rules apply to **every** prompt regardless of dimension choices. Append them as a closing sentence to every assembled prompt.
diff --git a/skills/ppt-master/references/image-layout-patterns.md b/skills/ppt-master/references/image-layout-patterns.md
index b959c238..dd0f5a64 100644
--- a/skills/ppt-master/references/image-layout-patterns.md
+++ b/skills/ppt-master/references/image-layout-patterns.md
@@ -178,7 +178,7 @@ The following three patterns are topologically different and are not interchange
- **#A2-01 · Transparent sticker or cutout** — use a prepared RGBA asset and preserve its open silhouette.
- **#A2-02 · Subject breaking out of a container** — register a prepared foreground subject across its frame boundary.
-- **#A2-03 · Registered subject/base pair** — align a base photo with its prepared transparent subject cutout in one coordinate system; optionally place a native title, panel, or shape between them so the subject crosses that middle layer.
+- **#A2-03 · Registered subject/base pair** — align a clean base with its prepared transparent subject cutout in one coordinate system. Draw the base first, the native title/panel/shape second, and the cutout last. Give both images the same `x`, `y`, `width`, `height`, and aspect mapping; never trim or independently crop either layer.
### 5.3 A3 · Registered Derivatives
diff --git a/skills/ppt-master/references/strategist-image.md b/skills/ppt-master/references/strategist-image.md
index 93a180b4..12b5a785 100644
--- a/skills/ppt-master/references/strategist-image.md
+++ b/skills/ppt-master/references/strategist-image.md
@@ -18,6 +18,8 @@ For illustration, apply this precedence: confirmed `none` → explicit user inte
**Default — one coherent sheet for compatible same-family spots (may override when aspect, detail, quality, or semantic needs differ)**: prefer one Illustration Sheet when several AI-generated spots can share a useful cell shape and production treatment; generate them independently when forcing one sheet would weaken a planned element. When a sheet is chosen, plan one unplaced `ai` Illustration Sheet row plus one placed `slice` row per used element; only slice rows enter `spec_lock.md images`. State the intended placement shape family in the sheet reference and use separate sheets for incompatible shapes. [`image-generator.md`](./image-generator.md) §4.3 owns grid, ratio, slicing, and execution details. Final Stage 2 chooses the AI execution path under `image-generator.md` §7; do not pre-empt or re-pick it here.
+**Mandatory — subject-layer capability scan**: When a supplied reference or the intended composition shows a subject crossing a native title, panel, frame, or shape, plan a registered subject/base pair before writing §VIII. Add one clean full-canvas base row and one same-canvas RGBA subject row, give both `Crop Policy: no-crop`, name their shared source and registration relationship in `Reference`, and suggest `#A2-03` for the subject row. Use `Acquire Via: user` only when both final assets are already supplied; otherwise use `ai` for the prepared derivatives. [`image-generator.md`](./image-generator.md) §4.4 owns preparation. A simple floating cutout that does not re-layer over its source may use `#A2-01` instead.
+
## 2. AI Image Strategy — always propose three; lock only for confirmed `ai`
Before any rendering detail, read only [`image-renderings/_index.md`](./image-renderings/_index.md). First author exactly three complete, project-fit solution intents; use the index to freeze each intent's exact rendering bases, then read once only the deduplicated referenced sibling files. Project one complete `image_strategy` into each direction regardless of `recommend.image_usage`. Every candidate carries localized `name`, `rendering: custom`, `visual`, `mood`, and non-empty localized `behavior`. Mood includes a recognizable real-world analogy. All three must credibly serve their owning whole solution, but they need not use different bases or span artificial safe / shifted / bold extremes. Image colors always inherit that direction's deck HEX roles; never add an image palette or alter deck colors to rescue a rendering.
diff --git a/skills/ppt-master/workflows/generate-pptx.md b/skills/ppt-master/workflows/generate-pptx.md
index f51881dc..a90885c2 100644
--- a/skills/ppt-master/workflows/generate-pptx.md
+++ b/skills/ppt-master/workflows/generate-pptx.md
@@ -488,7 +488,7 @@ Then **lazy-load the path-specific reference** for each row that actually needs
A deck with only `ai` rows never loads `image-searcher.md`; a deck with only `web` rows never loads `image-generator.md`. A mixed deck loads both, processes each row through its own path, and writes both `image_prompts.json` and `image_sources.json`.
-> ⚠️ **In-pipeline ai rows MUST use the manifest contract** — even when only 1 ai row exists. Always write `images/image_prompts.json` first and render `image_prompts.md` with `image_gen.py --render-md`. Then execute the confirmed path from `image-generator.md §7`: `image_gen.py --manifest` is **Path A only**; `host-native` is **Path B** and MUST skip `--manifest`; `manual` writes the prompts and stops for external generation. The positional form (`image_gen.py "prompt" ...`) is reserved for **out-of-pipeline one-off testing / single-image fixups** — it skips manifest + sidecar, leaving no audit trail.
+> ⚠️ **In-pipeline ai rows MUST use the manifest contract** — even when only 1 ai row exists. Always write `images/image_prompts.json` first and render `image_prompts.md` with `image_gen.py --render-md`. Then execute the confirmed path from `image-generator.md §7`: `image_gen.py --manifest` is **Path A only**; `host-native` is **Path B** and MUST skip `--manifest`; `manual` writes the prompts and stops for external generation. The positional form (`image_gen.py "prompt" ...`) is reserved for **out-of-pipeline one-off testing / single-image fixups**, except for the already-planned registered subject/base derivation in `image-generator.md` §4.4. That narrow exception keeps both final rows in the resource authority and operational sidecar; it does not authorize unrelated in-pipeline generation outside the manifest contract.
> ⚠️ **web path — batch multiple rows**: when ≥2 rows are `Acquire Via: web`, write all queries into `images/image_queries.json` and run `image_search.py --batch` once (concurrent acquisition, status written back), instead of one CLI call per row. A single web row may use the positional single-query form. See [image-searcher.md](../references/image-searcher.md) §5.
diff --git a/skills/ppt-master/workflows/profiles/quick-generate.md b/skills/ppt-master/workflows/profiles/quick-generate.md
index cf664128..11f4b9cc 100644
--- a/skills/ppt-master/workflows/profiles/quick-generate.md
+++ b/skills/ppt-master/workflows/profiles/quick-generate.md
@@ -242,6 +242,14 @@ Before writing P01, resolve in active context:
otherwise choose the registered automatic/default path without another
interaction.
+**Mandatory — subject-layer capability scan**: Before resource preparation,
+inspect the intended layer relationship rather than treating every reference
+visual as one flat image. When a subject crosses a native title, panel, frame,
+card, or shape, prepare a clean full-canvas base plus a same-canvas RGBA subject
+cutout and use `#A2-03`; follow [`image-generator.md`](../../references/image-generator.md)
+§4.4. A subject that only floats independently may use `#A2-01`. Complete this
+decision and both required assets before SVG authoring.
+
**Mandatory — whole-roster rhythm check**: During the same active-context
resolution, compare neighbors and section arcs to judge whether chapter entries
visibly reset, extended same-density runs are intentional, extended same-carrier
@@ -314,6 +322,7 @@ Prepare only the resource paths needed by the decided pages:
| AI image | Follow `image-base.md` + `image-generator.md`; apply only the chosen rendering preset or exact custom bases, never blend unselected catalog identities, and keep `image_prompts.json` plus its human-readable sidecar |
| Web image | Follow `image-base.md` + `image-searcher.md`; keep query/status data and `image_sources.json`, including any required on-slide attribution |
| Illustration slice | Generate or obtain the parent sheet, run `slice_images.py`, and place only the resulting element files |
+| Registered subject/base pair | Follow `image-generator.md` §4.4; keep the clean base and transparent subject on the same full canvas, then place both with `crop=no-crop` |
| Visualization | Keep Chart values, Table cell topology, and chosen treatment in active context; load the applicable Chart/Table authority in §3 and write native replacement metadata only for an independently selected native-ready object |
**Image inspection boundary**: acquisition-time suitability review follows the