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
refactor(template-workflow): add PPTX asset normalization rules
hugohe3f4c97c966aef
diff --git a/skills/ppt-master/references/template-designer.md b/skills/ppt-master/references/template-designer.mdindex e0c4b6a6..cf5d716b 100644--- a/skills/ppt-master/references/template-designer.md+++ b/skills/ppt-master/references/template-designer.md@@ -19,6 +19,7 @@ When the workflow provides a PPTX reference source, the effective input package- finalized template brief- `manifest.json`- `analysis.md`+- `normalized_assets.json`- exported `assets/`- cleaned slide SVG references from `svg/`- `reference_svg_selection.json`@@ -27,11 +28,12 @@ When the workflow provides a PPTX reference source, the effective input packageInput priority for PPTX-backed template creation:1. `manifest.json` for factual metadata-2. exported `assets/` for reusable visual resources-3. `analysis.md` for page-type guidance-4. `reference_svg_selection.json` for deciding which exported SVG pages to inspect first-5. cleaned slide SVG references for composition, spacing, and fixed decorative cues-6. screenshots / original PPTX only for style verification+2. `normalized_assets.json` for canonical asset decisions+3. exported `assets/` for reusable visual resources+4. `analysis.md` for page-type guidance+5. `reference_svg_selection.json` for deciding which exported SVG pages to inspect first+6. cleaned slide SVG references for composition, spacing, and fixed decorative cues+7. screenshots / original PPTX only for style verification---@@ -88,7 +90,7 @@ Templates must strictly follow the finalized template brief and the generated `dIf PPTX import output exists:- Prefer imported theme colors and fonts over visually guessed values-- Reuse extracted backgrounds and logos where they are globally meaningful to the template+- Reuse canonical backgrounds and logos from `normalized_assets.json` where they are globally meaningful to the template- Treat page-type candidates from `analysis.md` as hints, not guarantees### 2.1 PPTX Import Simplification Rule@@ -100,13 +102,25 @@ Do:- rebuild the layout into a clean SVG structure aligned with PPT Master constraints- simplify repeated decorative fragments into a smaller number of maintainable SVG elements- use a background image asset when the original decorative layer is too complex to recreate cleanly+- prefer original exported assets such as `image1.png` over matched `inline_*` assets whenever AI normalization determines they represent the same visible image+- treat `inline_*` assets primarily as export-reference layers rather than final template asset names- use cleaned slide SVG references to inspect composition, spacing, text hierarchy, and fixed decorative structure only after factual metadata has been anchored-- do not read every exported SVG by default; always inspect slides 1, 2, and the last slide, then inspect at least 7 additional representative pages from the selection file+- if there are `<= 10` cleaned SVG reference pages to inspect, read all of them; if there are more than `10`, read only `10` representative pagesDo not:- attempt 1:1 translation of every PowerPoint shape, group, shadow, or decorative fragment- mirror PPT-specific complexity when it makes the resulting SVG brittle or hard to edit- introduce dense low-value vector detail that does not materially improve template reuse+- promote mask-only / alpha-helper `inline_*` assets into the final template package unless they are the only viable reusable representation++### 2.2 Original-vs-Inline Asset Normalization++When `normalized_assets.json` exists, follow these rules:++1. If an original exported asset and an `inline_*` asset clearly correspond to the same visible image, use the **original exported asset** as the canonical template source.+2. If an `inline_*` asset has no reliable original exported counterpart, it may be kept as a derived template asset.+3. If an `inline_*` asset appears only as a mask, alpha helper, or other non-semantic support layer inside SVG export output, do not include it in the final template asset set by default.+4. Final template asset names should be semantic, such as `cover_bg.png` or `brand_emblem.png`, rather than `image3.png` or `inline_abcd1234.png`.### 3. Placeholder Markersdiff --git a/skills/ppt-master/workflows/create-template.md b/skills/ppt-master/workflows/create-template.mdindex b0b9f61e..09af8e0d 100644--- a/skills/ppt-master/workflows/create-template.md+++ b/skills/ppt-master/workflows/create-template.md@@ -13,7 +13,7 @@ Generate a complete set of reusable PPT layout templates for the **global templa## Process Overview```-Gather Brief -> Create Directory -> Invoke Template_Designer -> Validate Assets -> Register Index -> Output+Gather Brief -> Import PPTX References -> Normalize Assets -> Create Directory -> Invoke Template_Designer -> Validate Assets -> Register Index -> Output```---@@ -68,28 +68,60 @@ It is still a reconstruction aid, not a final direct template conversion.Use the generated `manifest.json`, `analysis.md`, exported `assets/`, and `svg/` slide references as internal reference material for template reconstruction.+Then perform an **AI-only asset normalization step** before template generation:++- compare exported original assets such as `image1.png` with `inline_*` assets used by the cleaned slide SVGs+- if an `inline_*` visible image corresponds to an original exported asset, treat the **original asset** as the canonical source+- if an `inline_*` asset has no matching original exported asset, keep it as a derived candidate asset+- if an `inline_*` asset is only used as a mask / alpha helper / auxiliary layer, do **not** promote it to the final template asset set by default+- write the normalization result to `<import_workspace>/normalized_assets.json`++Recommended fields in `normalized_assets.json`:++- canonical asset path+- matched `inline_*` references+- role guess such as `cover_background`, `content_background`, `brand_overlay`, `mask_only`+- whether the asset should enter the final template package+When the reference source is `.pptx`, use the following internal priority order during template creation:1. `manifest.json`2. `analysis.md`-3. exported `assets/`-4. cleaned slide SVG references from `svg/`-5. user-provided screenshots or the original PPTX only for visual cross-checking+3. `normalized_assets.json`+4. exported `assets/`+5. cleaned slide SVG references from `svg/`+6. user-provided screenshots or the original PPTX only for visual cross-checkingInterpretation rule:- `manifest.json` is the source of truth for slide size, theme colors, fonts, background inheritance, and reusable asset inventory- `analysis.md` is the compact human-readable summary used to guide page-type selection-- exported `assets/` are the preferred source for backgrounds, logos, and decorative images+- `normalized_assets.json` is the source of truth for which imported assets are canonical and which `inline_*` assets are only derived helpers+- exported `assets/` remain the raw import pool and should not be consumed blindly once normalization exists- cleaned `svg/` slides are mandatory reference material for layout rhythm, page composition, and fixed decorative structure-- do not consume every exported SVG by default: always reference slides `1`, `2`, and the last slide, then add at least `7` representative SVG pages from the remaining slides+- if the remaining cleaned SVG reference pages are `<= 10`, read all of them; if they are `> 10`, read only `10` representative pages- screenshots remain useful for judging composition and style, but should not override extracted factual metadata unless the import result is clearly incompleteDo **not** treat the imported PPTX or exported slide SVGs as direct final template assets. The goal is to reconstruct a clean, maintainable PPT Master template package, not to perform 1:1 shape translation.----## Step 2: Create Template Directory+## Step 2: Normalize Imported Assets++When the reference source is `.pptx`, create the normalization artifact before generating the template.++**Required outcome of Step 2**:++- original exported assets and `inline_*` assets have been compared+- canonical assets prefer original exported files when a reliable match exists+- mask-only / helper-only `inline_*` assets are excluded from the final template asset shortlist by default+- `normalized_assets.json` is available for downstream template generation++If no `.pptx` source is involved, this step can be skipped.++---++## Step 3: Create Template Directory```bashmkdir -p "skills/ppt-master/templates/layouts/<template_id>"@@ -101,7 +133,7 @@ mkdir -p "skills/ppt-master/templates/layouts/<template_id>"----## Step 3: Invoke Template_Designer Role+## Step 4: Invoke Template_Designer Role**Switch to the Template_Designer role** and generate per role definition. The role input is the finalized template brief from Step 1, not a project design spec.@@ -110,6 +142,7 @@ If the reference source is `.pptx`, pass the following internal package to the r- finalized template brief from Step 1- `manifest.json`- `analysis.md`+- `normalized_assets.json`- exported `assets/`- cleaned slide SVG references from `svg/`- `reference_svg_selection.json`@@ -136,7 +169,7 @@ The role should use the import output to anchor objective facts such as theme co----## Step 4: Validate Template Assets+## Step 5: Validate Template Assets```bashls -la "skills/ppt-master/templates/layouts/<template_id>"@@ -161,7 +194,7 @@ This step is a **hard gate**. Do not register the template into the library inde----## Step 5: Register Template in Library Index+## Step 6: Register Template in Library IndexUpdate `skills/ppt-master/templates/layouts/layouts_index.json`:@@ -177,7 +210,7 @@ If the human-facing `templates/layouts/README.md` summary table is maintained ma----## Step 6: Output Confirmation+## Step 7: Output Confirmation```markdown## Template Creation Complete