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(template): add mirror replication mode for verbatim PPTX library import
hugohe3d45f28612b46
diff --git a/docs/templates-guide.md b/docs/templates-guide.mdindex 46d9db65..ac415b5c 100644--- a/docs/templates-guide.md+++ b/docs/templates-guide.md@@ -134,8 +134,8 @@ The workflow does not silently infer values — before generation it lists these| **Tone summary** | One line, e.g. "modern, restrained, data-driven" || **Theme mode** | Light / dark / gradient / ... || **Canvas format** | Default `ppt169` (16:9); specify other formats up front |-| **Replication mode** | `standard` (default 5-page roster) / `fidelity` (preserve every distinct layout from a `.pptx` source) — `fidelity` requires a `.pptx` reference |-| **Visual fidelity** | (required when a reference exists) `literal` (reproduce original geometry / decoration / sprite crops as-is) or `adapted` (use reference for tone and structure but allow design evolution). Cover / chapter / ending are usually `literal` |+| **Replication mode** | `standard` (default 5-page roster) / `fidelity` (one variant per visually distinct cluster from a `.pptx` source — count is driven by the source) / `mirror` (1:1 verbatim copy of every source slide, no abstraction, no placeholders) — `fidelity` and `mirror` both require a `.pptx` reference |+| **Visual fidelity** | (required for `standard` / `fidelity` when a reference exists) `literal` (reproduce original geometry / decoration / sprite crops as-is) or `adapted` (use reference for tone and structure but allow design evolution). Cover / chapter / ending are usually `literal`. **Not asked for `mirror`** — mirror is implicitly literal || **Keywords** | 3–5 tags for index lookup || Theme color / design notes / asset list | Optional — can be auto-extracted from the source |@@ -143,19 +143,23 @@ After confirmation the workflow echoes the finalized brief and emits the marker> Why so strict? Because a template is a library asset that future projects will reuse. Getting it right once is far cheaper than regenerating after the fact.-### Step 3 — `standard` or `fidelity`?+### Step 3 — `standard`, `fidelity`, or `mirror`?This is the most easily confused decision when deriving a template.-| | **standard** | **fidelity** |-|---|---|---|-| Output pages | 5 (cover / chapter / TOC / content / ending) | every distinct layout in the source PPTX is preserved |-| Best for | You want "tone + basic skeleton" to generate brand-new decks later | The source PPTX itself is a richly customized layout library and every variant matters |-| Typical use | Building a base brand template | Replicating a 20-variant government briefing layout set |-| Requires PPTX source? | No | **Yes** |-| Decoration complexity | Usually simpler | Must preserve sprite-sheet (cropped image) structure |+| | **standard** | **fidelity** | **mirror** |+|---|---|---|---|+| Output pages | 5 (cover / chapter / TOC / content / ending) | one variant per visually distinct cluster — count driven by the source | one page per source slide (1:1) |+| Abstraction | High — clean, reusable skeleton | Medium — clusters preserved with cleanup | **Zero** — verbatim copy |+| Placeholders inserted? | Yes (`{{TITLE}}`, `{{CONTENT_AREA}}`, …) | Yes | **No** — Executor edits text in place against the project content |+| Best for | You want "tone + basic skeleton" to generate brand-new decks later | The source PPTX itself is a customized layout library and every variant matters | Someone else's polished deck is great as-is, you want every page available as a reference |+| Typical use | Building a base brand template | Replicating a 20-variant government briefing layout set | Reusing a 50-page McKinsey-style deck verbatim |+| Requires PPTX source? | No | **Yes** | **Yes** |+| Decoration complexity | Usually simpler | Must preserve sprite-sheet (cropped image) structure | Inherits whatever the source had, byte-for-byte |++**About sprite sheets**: PPTX-exported assets are often a single large image referenced from multiple slides, each cropping a different region via nested `<svg viewBox=...>` wrappers. In `fidelity` and `mirror` modes this nesting must be preserved — you cannot flatten it to a bare `<image>`, or the crop is lost and the page misaligns. The workflow validates this automatically.-**About sprite sheets**: PPTX-exported assets are often a single large image referenced from multiple slides, each cropping a different region via nested `<svg viewBox=...>` wrappers. In `fidelity` mode this nesting must be preserved — you cannot flatten it to a bare `<image>`, or the crop is lost and the page misaligns. The workflow validates this automatically.+**How mirror is consumed**: a mirror template carries no `{{}}` placeholders, so the Strategist picks one mirror page per project page (using `design_spec.md §V Page Roster` descriptions to match content), and the Executor copies that mirror SVG and edits the text in place against the project content — preserving all decoration, sprite crops, and geometry. The library asset stays 100% verbatim; per-project edits live in `projects/<project>/svg_output/`.### Step 4 — Registration and discovery@@ -182,7 +186,22 @@ skills/ppt-master/templates/layouts/<your_template_id>/└── bg_pattern.jpg```-Page SVGs use a unified placeholder convention (`{{TITLE}}`, `{{CHAPTER_TITLE}}`, `{{PAGE_TITLE}}`, `{{CONTENT_AREA}}`, ...) that the Strategist phase fills with content.+`standard` and `fidelity` SVGs use a unified placeholder convention (`{{TITLE}}`, `{{CHAPTER_TITLE}}`, `{{PAGE_TITLE}}`, `{{CONTENT_AREA}}`, ...) that the Strategist phase fills with content.++A `mirror` template emits one SVG per source slide, named by source order, with **no** placeholders inside:++```+skills/ppt-master/templates/layouts/<your_template_id>/+├── design_spec.md # frontmatter sets replication_mode: mirror; §V Page Roster describes every page in detail+├── 001_cover.svg+├── 002_toc.svg+├── 003_content.svg+├── 004_content.svg+├── ...+├── 049_content.svg+├── 050_ending.svg+└── *.png / *.jpg+```### Project-level customization vs global template@@ -203,6 +222,7 @@ Common misconceptions to avoid:- **A template is not a "style skin".** It bundles structure (which blocks per page, how information is hierarchized) with style (colors, fonts, decoration). Trying to swap "skin" without structure tends to put the information architecture and the visuals at odds- **A template does not make content decisions for you.** The Strategist still decides per-page which layout to use and whether to extend a variant. Templates offer candidates, not predetermined results- **`fidelity` mode is not pixel-perfect copying.** Even with `literal` fidelity, the AI still strips noise and unnecessary repetition — geometry stays, redundancy goes+- **`mirror` mode IS pixel-perfect copying — but it inherits the source's import limitations.** Charts, SmartArt, OLE objects, and EMF / WMF media that don't round-trip through `pptx_template_import.py` will fail the same way in mirror. The flat SVG is the source of truth; if it looks broken in `<workspace>/svg-flat/`, the mirror template will too---diff --git a/docs/zh/templates-guide.md b/docs/zh/templates-guide.mdindex 3e50d5e0..f5899309 100644--- a/docs/zh/templates-guide.md+++ b/docs/zh/templates-guide.md@@ -134,8 +134,8 @@ AI 会把这个目录里的 SVG、`design_spec.md` 和素材复制到项目目| **调性概要** | 一句话,如"现代克制、数据驱动" || **主题模式** | 浅色 / 深色 / 渐变…… || **画布格式** | 默认 `ppt169`(16:9),其他格式需提前指定 |-| **复刻模式** | `standard`(默认 5 页基本套)/ `fidelity`(保留 PPTX 源里所有不同版式)—— `fidelity` 必须有 `.pptx` 源 |-| **保真级别** | (有源时必填)`literal`(按原样复刻几何/装饰/精灵图裁剪)/ `adapted`(借结构和调性、允许设计演化)。封面 / 章节 / 结尾通常用 `literal` |+| **复刻模式** | `standard`(默认 5 页基本套)/ `fidelity`(按 PPTX 源里"视觉上真正不同"的版式簇各开一个变体——数量由源决定)/ `mirror`(每张源页 1:1 原样复制,零抽象、不插占位符)—— `fidelity` 和 `mirror` 都必须有 `.pptx` 源 |+| **保真级别** | (`standard` / `fidelity` 有源时必填)`literal`(按原样复刻几何/装饰/精灵图裁剪)/ `adapted`(借结构和调性、允许设计演化)。封面 / 章节 / 结尾通常用 `literal`。**`mirror` 模式不询问**——隐含 literal || **关键词** | 3–5 个标签,用于索引检索 || 主题色 / 设计风格 / 素材清单 | 可选,可让 AI 从源里自动提取 |@@ -143,19 +143,23 @@ AI 会把这个目录里的 SVG、`design_spec.md` 和素材复制到项目目> 为什么这么严?因为模板是入库资产,未来会被复用。一次说清楚,比生成完再返工便宜得多。-### 第三步:选 standard 还是 fidelity?+### 第三步:选 standard、fidelity 还是 mirror?这是派生模板里最容易混淆的决策。-| | **standard** | **fidelity** |-|---|---|---|-| 输出页数 | 5 页(封面/章节/目录/内容/结尾) | 源 PPTX 里所有不同版式都保留 |-| 适合场景 | 你只需要"调性 + 基本骨架",未来用模板生成全新 deck | 源 PPTX 本身就是高度定制的版式库,每种版式都有用 |-| 典型例子 | 给品牌做基础模板 | 复刻一套政府汇报模板的 20 种章节版式 |-| 必须有 PPTX 源吗 | 否 | **是** |-| 装饰复杂度 | 通常较简洁 | 需要保留精灵图(sprite sheet)裁剪等结构 |+| | **standard** | **fidelity** | **mirror** |+|---|---|---|---|+| 输出页数 | 5 页(封面/章节/目录/内容/结尾) | 视觉上真正不同的版式簇各一个变体——数量由源决定 | 每张源页 1:1 一页 |+| 抽象程度 | 高 —— 干净可复用骨架 | 中 —— 聚类后清理 | **零** —— 原样复制 |+| 是否插占位符 | 是(`{{TITLE}}`、`{{CONTENT_AREA}}` 等) | 是 | **否** —— Executor 直接在 SVG 里就地编辑文字 |+| 适合场景 | 你只需要"调性 + 基本骨架",未来用模板生成全新 deck | 源 PPTX 本身就是高度定制的版式库 | 别人的精装 deck 直接好用、想把每页都当参考页 |+| 典型例子 | 给品牌做基础模板 | 复刻一套政府汇报的 20 种章节版式 | 把一份 50 页的麦肯锡风格 deck 整套用作模板 |+| 必须有 PPTX 源吗 | 否 | **是** | **是** |+| 装饰复杂度 | 通常较简洁 | 需要保留精灵图(sprite sheet)裁剪等结构 | 源页啥样就啥样,逐字节继承 |++**关于精灵图**:PPTX 导出的素材常常是**一张大图 + 多页通过 viewBox 裁剪不同区域**。`fidelity` 和 `mirror` 模式下必须保留这层嵌套 `<svg viewBox=...>` 包装,不能扁平化为单张 `<image>`——否则裁剪信息丢失,画面会错位。工作流会自动校验这一点。-**关于精灵图**:PPTX 导出的素材常常是**一张大图 + 多页通过 viewBox 裁剪不同区域**。`fidelity` 模式下必须保留这层嵌套 `<svg viewBox=...>` 包装,不能扁平化为单张 `<image>`——否则裁剪信息丢失,画面会错位。工作流会自动校验这一点。+**`mirror` 模板怎么消费**:mirror 模板里没有 `{{}}` 占位符——Strategist 根据 `design_spec.md §V Page Roster` 的逐页描述为每个项目页选一张参考页,Executor 把那张参考 SVG 拷过去,**仅在原位修改文字内容**,所有装饰、精灵图裁剪、几何坐标全部保留。库资产保持 100% 原样;针对项目的修改只存在于 `projects/<project>/svg_output/`。### 第四步:注册与发现@@ -182,7 +186,22 @@ skills/ppt-master/templates/layouts/<your_template_id>/└── bg_pattern.jpg```-页面 SVG 里使用统一的占位符约定(`{{TITLE}}`、`{{CHAPTER_TITLE}}`、`{{PAGE_TITLE}}`、`{{CONTENT_AREA}}` 等),策略师阶段会按内容填充。+`standard` 和 `fidelity` 模式下的页面 SVG 里使用统一的占位符约定(`{{TITLE}}`、`{{CHAPTER_TITLE}}`、`{{PAGE_TITLE}}`、`{{CONTENT_AREA}}` 等),策略师阶段会按内容填充。++`mirror` 模板按源页序号每页一张 SVG,**SVG 内部没有占位符**:++```+skills/ppt-master/templates/layouts/<your_template_id>/+├── design_spec.md # frontmatter 设 replication_mode: mirror;§V Page Roster 逐页描述+├── 001_cover.svg+├── 002_toc.svg+├── 003_content.svg+├── 004_content.svg+├── ...+├── 049_content.svg+├── 050_ending.svg+└── *.png / *.jpg+```### 项目级一次性定制 vs 全局模板@@ -203,6 +222,7 @@ skills/ppt-master/templates/layouts/<your_template_id>/- **模板不是"风格皮肤"**。它包含结构(页面有几块、信息层级如何分布)+ 风格(配色、字体、装饰),两者不可分割。试图只换"皮肤"不换结构,往往会让信息架构和视觉打架- **模板不会替你做内容决策**。策略师仍然会按内容判断每页用哪个版式、要不要扩展为变体,模板提供候选,不预设结果- **`fidelity` 模式不等于像素级搬运**。即便是 `literal` 保真,AI 仍会把杂质和不必要的重复结构清理掉——载体保留几何,但不照抄冗余+- **`mirror` 模式确实是像素级搬运——但它继承源 PPT 的导入限制**。图表、SmartArt、OLE 对象、EMF / WMF 媒体如果在 `pptx_template_import.py` 里 round-trip 失败,mirror 也会同样失败。flat SVG 是事实源——`<workspace>/svg-flat/` 里看着断了,mirror 模板也会断---diff --git a/skills/ppt-master/references/executor-base.md b/skills/ppt-master/references/executor-base.mdindex c1c0a394..5a3af6b6 100644--- a/skills/ppt-master/references/executor-base.md+++ b/skills/ppt-master/references/executor-base.md@@ -12,6 +12,7 @@| Source list | Read path ||---|---|+| Chosen template's `design_spec.md` (read frontmatter to detect `replication_mode`) | `templates/<chosen_template>/design_spec.md` || Every distinct `<basename>` in `spec_lock.md page_layouts` | `templates/<chosen_template>/<basename>.svg` || Every distinct chart name in `spec_lock.md page_charts` | `templates/charts/<chart_name>.svg` || Chart types in `design_spec.md §VII` not covered above | `templates/charts/<chart_name>.svg` |@@ -30,13 +31,30 @@ Resolve the per-page template SVG via `spec_lock.md page_layouts` (authoritative**Resolution order (per page):**-1. `spec_lock.md page_layouts` has `P<NN>: <basename>` for this page → inherit the structure of `templates/<chosen_template>/<basename>.svg` (already in context from §1.0).-2. `page_layouts` exists but **no entry** for this page → **free design**, no template inheritance.-3. `page_layouts` section absent (legacy deck) **and** `templates/` directory exists → fall back to the page-type table below, matching by SVG filename keyword (cover/chapter/content/ending/toc). Read the matched file at first use if §1.0 batch did not cover it.-4. No template at all → free design.+1. **Mirror-mode template** (template's `design_spec.md` frontmatter has `replication_mode: mirror`) → see §1.1 below. The page is consumed as a **visual reference**, not as a placeholder shell.+2. `spec_lock.md page_layouts` has `P<NN>: <basename>` for this page → inherit the structure of `templates/<chosen_template>/<basename>.svg` (already in context from §1.0).+3. `page_layouts` exists but **no entry** for this page → **free design**, no template inheritance.+4. `page_layouts` section absent (legacy deck) **and** `templates/` directory exists → fall back to the page-type table below, matching by SVG filename keyword (cover/chapter/content/ending/toc). Read the matched file at first use if §1.0 batch did not cover it.+5. No template at all → free design.> Note: `page_layouts` disambiguates the multiple content variants modern templates ship (e.g., `graduation_defense` has 8); the legacy table cannot.+### 1.1 Mirror-mode templates — reference-style consumption++When the project's chosen template is a `mirror` template (`design_spec.md` frontmatter declares `replication_mode: mirror`), Executor switches to a **reference-style** consumption path that bypasses placeholder substitution:++1. **Per-page reference selection** — Strategist selects one mirror page per project page via `spec_lock.md page_layouts` (e.g., `P04: 015_content`). The basename is the mirror filename without extension; Strategist made this choice by reading `design_spec.md §V Page Roster` descriptions, not by guessing.+2. **Copy, don't fill** — open the referenced mirror SVG (already in context from §1.0). **Copy it as the starting point for the project page**, then edit text elements in place to express the project's content for `P<NN>`. Preserve every non-text element verbatim: backgrounds, decorative shapes, sprite-cropped images, charts, icon usage, color values, font families, geometry, sprite `<svg viewBox>` wrappers, `<image>` references.+3. **What you may edit** — the visible text content of `<text>` / `<tspan>` elements that express slide-specific content (title, body, captions, KPI labels, dates, page numbers). Replace the source deck's example text with the project's text for this page from `design_spec.md §IX` and `notes/<NN>_*.md`.+4. **What you must not touch** — element positions, sizes, fonts, colors, fills, strokes, gradients, image hrefs, `<g>` grouping, sprite-sheet `<svg viewBox>` wrappers, decorative `<rect>` / `<path>` / `<circle>` / `<polygon>` shapes, `<use data-icon="...">` markers, embedded chart data structures. Mirror's value is preserving the source deck's visual identity — any geometric / decorative drift defeats the purpose.+5. **Content fit** — the mirror page was chosen by Strategist because its layout matches the content slot. If the project's content for `P<NN>` legitimately needs more / fewer items than the mirror page provides (e.g. mirror shows 3 KPI cards, project has 4 metrics), keep the mirror page's visual rhythm and either drop one metric to fit or split across two pages — do **not** restructure the mirror page's grid. If neither works, surface a `warning: P<NN> content does not fit mirror reference <basename>; suggest different reference page` and proceed with the closest-fit edit.+6. **No `{{}}` substitution** — mirror SVGs do not contain placeholder markers. Do not search for `{{TITLE}}` / `{{CONTENT_AREA}}` etc.; do not invent placeholders. The whole mirror contract is "verbatim source + in-place text edit".+7. **Output filename** — follow the standard project SVG naming convention (`<NN>_<page_name>.svg` where `<NN>` matches the project page index, not the mirror source index). The mirror filename is the *reference*, not the *output*.++**Detecting mirror mode**: read the chosen template's `design_spec.md` frontmatter once during §1.0 batch read. If `replication_mode: mirror`, every page that hits `page_layouts` follows §1.1 above; pages without a `page_layouts` entry still fall through to free design (resolution rule 3 above).++**Mirror + chart pages**: chart structures inside a mirror SVG are already drawn (axis, series, labels). Treat them as visual references — replace the data labels and series text content to match the project's chart spec, but do not redraw the chart from a `templates/charts/<name>.svg` baseline. A mirror template's `page_charts` entries are normally absent for this reason.+**Legacy fallback table** (used only when `page_layouts` is absent):| Page Type | Corresponding Template | Adherence Rules |diff --git a/skills/ppt-master/references/template-designer.md b/skills/ppt-master/references/template-designer.mdindex d2dc0f9e..b41e33a3 100644--- a/skills/ppt-master/references/template-designer.md+++ b/skills/ppt-master/references/template-designer.md@@ -51,7 +51,8 @@ The output page set is determined by **replication mode**, declared in the Step| Mode | When to use | Roster ||------|-------------|--------|| `standard` (default) | Most templates — clean, reusable, balanced coverage | `01_cover`, `02_chapter`, `03_content`, `04_ending`, optional `02_toc` |-| `fidelity` | User explicitly wants strict replication of a source PPTX | Standard roster + one variant per distinct layout cluster found in `manifest.json` |+| `fidelity` | User explicitly wants strict replication of a source PPTX, but still wants the AI to clean / cluster / cap variants | Standard roster + one variant per distinct layout cluster found in `manifest.json` |+| `mirror` | User wants every source slide preserved 1:1 as a reference page (someone else's polished deck used as a library template). Verbatim copy, no abstraction, no placeholders | One SVG per source slide, named `<NNN>_<page_type>.svg` by source order |### Standard mode@@ -90,6 +91,20 @@ Extension page types beyond the canonical four (transition / appendix / disclaim> Variants reuse the parent type's placeholder set — see §4 (Placeholder Reference) below.+### Mirror mode++When the brief sets `Replication mode: mirror`, the role does **not** abstract or reconstruct. Each source slide becomes one template page **byte-for-byte**:++- Source: `<import_workspace>/svg-flat/slide_NN.svg` (the self-contained "what PowerPoint shows" view). Do **not** read or use `svg/master_*.svg`, `svg/layout_*.svg`, or `svg/inheritance.json` — chrome / content separation is irrelevant because mirror does not insert placeholders.+- Output: `templates/layouts/<template_id>/<NNN>_<page_type>.svg`, where `<NNN>` is the zero-padded source slide index (3 digits) and `<page_type>` is derived from `manifest.json` `pageTypeCandidates` — `cover` / `toc` / `chapter` / `content` / `ending`. When the page-type heuristic is ambiguous, fall back to `content`. Preserve source slide order via the numeric prefix.+- Modifications allowed: **only** rewriting `<image href="...">` paths to point at the local `assets/` copy, and renaming asset files to semantic names. Everything else — geometry, decoration, sprite-sheet wrappers, original example text, chart placeholders, embedded fonts — is copied as-is.+- Modifications forbidden: inserting `{{TITLE}}` / `{{CONTENT_AREA}}` / any other placeholder; "cleaning up" decorative complexity; merging similar slides; dropping master/layout chrome (it's already baked into the flat SVG, leave it).+- `design_spec.md` §V Page Roster lists every emitted file with **a one-line description** of what the page contains and what content slot it suits — Strategist selects mirror pages purely from these descriptions, since the SVG itself carries no placeholder contract.++**Why mirror has no placeholders**: it is consumed as a **visual reference** rather than a templated form. Executor's mirror path (see [executor-base.md](executor-base.md) §1.1) copies the chosen mirror page into the project and edits text elements in place against the project content — no `{{}}` substitution happens. This keeps the library asset 100% verbatim and lets the user re-discover the source deck by browsing `templates/layouts/<template_id>/` directly.++**What mirror is not**: a pixel-perfect re-rendering pipeline test. Charts, SmartArt, OLE objects, and EMF / WMF media that fail to round-trip in `pptx_template_import.py` will fail the same way in mirror. If the import workspace has missing media or unsupported objects, mirror inherits those gaps — the user should be told before generation begins.+---## Template Design Specifications@@ -115,8 +130,9 @@ summary: <one-line tone & use case>keywords: [tag1, tag2, tag3]primary_color: "#......"canvas_format: ppt169-replication_mode: standard | fidelity-# Optional — only when this template overrides canonical placeholder vocabulary:+replication_mode: standard | fidelity | mirror+# Optional — only when this template overrides canonical placeholder vocabulary.+# Omit entirely for `mirror` mode (mirror has no placeholders).# placeholders:# 01_cover: ["{{TITLE}}", "{{SUBTITLE}}", "{{BRAND_LOGO}}"]# 03_content: ["{{KEY_MESSAGE}}", "{{CONTENT_AREA}}"]@@ -142,7 +158,7 @@ replication_mode: standard | fidelity- Optional XML snippet for any reusable component unique to this template## V. Page Roster-One row per emitted SVG describing what this template's version of cover / chapter / content / ending looks like (background treatment, decorative anchors, layout rhythm). For `fidelity` mode, also note the cluster source and visual differentiator. Roster entries must match the actual SVG files on disk.+One row per emitted SVG describing what this template's version of cover / chapter / content / ending looks like (background treatment, decorative anchors, layout rhythm). For `fidelity` mode, also note the cluster source and visual differentiator. For `mirror` mode the roster is the **load-bearing artifact** — Strategist picks mirror pages purely from these descriptions, so each row must include enough detail to distinguish it from siblings (column count, hero element, content density, what kind of content slot it fits — "three-column KPI grid with large numbers, suits quarterly summary"). Roster entries must match the actual SVG files on disk.## VI. Assets (omit when none)Logos, cover backgrounds, brand textures bundled with the template package — file name, dimensions, intended usage.@@ -205,6 +221,8 @@ Do not:### 3. Placeholder Markers+> **Mirror mode skips this section entirely.** Mirror SVGs are verbatim copies of the source flat slides — they carry no `{{}}` markers. Executor reads them as visual references and edits text in place (see [executor-base.md](executor-base.md) §1.1). The rest of this section applies to `standard` and `fidelity` only.+Use clear placeholder markers for replaceable content:```xml@@ -302,6 +320,25 @@ templates/layouts/<template_name>/└── *.png / *.jpg```+Mirror mode emits one SVG per source slide, named by source order:++```+templates/layouts/<template_name>/+├── design_spec.md+├── 001_cover.svg+├── 002_toc.svg+├── 003_content.svg+├── 004_content.svg+├── 005_chapter.svg+├── 006_content.svg+├── ...+├── 049_content.svg+├── 050_ending.svg+└── *.png / *.jpg+```++Filenames preserve the source slide order via the 3-digit prefix; `<page_type>` is derived from `manifest.json` `pageTypeCandidates`. No `{{}}` placeholders appear in any mirror SVG.+### Template PreviewAfter each template is generated, provide a brief summary table listing each template's status.@@ -340,10 +377,10 @@ templates/layouts/## Template_Designer Phase Complete- [x] Read `references/template-designer.md`-- [x] Replication mode confirmed: `standard` | `fidelity`+- [x] Replication mode confirmed: `standard` | `fidelity` | `mirror`- [x] Every page listed in `design_spec.md §V Page Roster` saved to `templates/layouts/<template_name>/`-- [x] Variant naming follows the letter-suffix convention; variants reuse parent placeholder contract+- [x] Naming convention applied (standard / fidelity: letter-suffix variants; mirror: `<NNN>_<page_type>.svg`)- [x] Templates follow design spec (colors, fonts, layout)-- [x] Placeholder markers are clear and standardized+- [x] Placeholder markers are clear and standardized (standard / fidelity); mirror SVGs contain **no** `{{}}` markers- [ ] **Next step**: Validate assets and register the template in `layouts_index.json` (include `pages` field)```diff --git a/skills/ppt-master/workflows/create-template.md b/skills/ppt-master/workflows/create-template.mdindex 80907def..e9ad8fb1 100644--- a/skills/ppt-master/workflows/create-template.md+++ b/skills/ppt-master/workflows/create-template.md@@ -44,8 +44,8 @@ Items to confirm with the user:| Tone summary | Yes | Short tone description for recommendation, such as `Modern, restrained, data-driven` || Theme mode | Yes | Theme description for recommendation, such as `Light theme (white background + blue accent)` || Canvas format | Yes | Default `ppt169`; if another format is needed, specify it explicitly before generation |-| Replication mode | Yes | `standard` (default, 5-page roster) or `fidelity` (preserve every distinct layout from a `.pptx` source); `fidelity` requires a `.pptx` reference source |-| Visual fidelity for fixed pages | Yes (when reference source exists) | `literal` (exact reproduction — preserve original geometry, decoration, sprite crops as-is; for cover / chapter / ending especially) or `adapted` (use the reference for tone/structure but allow design evolution). Ask the user explicitly; do not assume. Different page types may take different settings |+| Replication mode | Yes | `standard` (default, 5-page roster), `fidelity` (one variant per visually distinct cluster from a `.pptx` source — count driven by the source), or `mirror` (1:1 verbatim copy of every source slide, no abstraction, no placeholders). `fidelity` and `mirror` both require a `.pptx` reference source |+| Visual fidelity for fixed pages | Yes for `standard` / `fidelity` when reference source exists; **N/A for `mirror`** (mirror is implicitly literal) | `literal` (exact reproduction — preserve original geometry, decoration, sprite crops as-is; for cover / chapter / ending especially) or `adapted` (use the reference for tone/structure but allow design evolution). Ask the user explicitly; do not assume. Different page types may take different settings || Reference source | Optional | Existing project, screenshot folder, or `.pptx` template file path || Theme color | Optional | Primary color HEX value (can be auto-extracted from reference) || Design style | Optional | Additional style notes, decorative language, brand cues |@@ -117,13 +117,18 @@ Interpretation rule:- `svg-flat/slide_NN.svg` is for human preview and screenshot comparison; do not treat duplicated master/layout chrome inside flat slides as separate reusable template structure.- screenshots remain useful for judging composition and style, but should not override extracted factual metadata unless the import result is clearly incomplete-**Hard gate**:+**Hard gate** (`standard` / `fidelity` modes):- Before creating any template file, the agent MUST finish reading every `svg/master_*.svg`, `svg/layout_*.svg`, and `svg/slide_*.svg` file under `<import_workspace>/svg/`- The agent MUST explicitly report the read master / layout / slide filenames before starting template generationDo **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.+> **Mirror-mode exception** — `mirror` mode skips the layered reading and reconstruction:+> - Read **only** `svg-flat/slide_*.svg` (the self-contained, what-PowerPoint-shows view) and `manifest.json` (for theme colors, fonts, asset inventory).+> - Do **not** read `svg/master_*.svg` / `svg/layout_*.svg` / `svg/inheritance.json` — chrome / content separation is irrelevant in mirror mode (no placeholder insertion happens).+> - Mirror is explicitly a **verbatim copy** flow — every slide becomes a template page as-is. The "reconstruct, don't translate" rule applies to `standard` / `fidelity` only. Mirror's whole point is to preserve the source 1:1.+---## Step 2: Create Template Directory@@ -159,10 +164,19 @@ The role should use the import output to anchor objective facts such as theme co**Sprite-sheet preservation (do NOT simplify away)**: PPTX-exported assets are often sprite sheets — a single tall/large image referenced from multiple slides, each cropping a different region via nested `<svg ... viewBox="...">` wrappers around `<image width="1" height="1">`. This nesting is **load-bearing geometry**, not redundant structure. When rebuilding, preserve the exact `viewBox` crop and the outer `<svg>` placement for every image; do not flatten to a single `<image>` with direct `x/y/width/height`. Verify by sampling: if any asset's pixel dimensions don't match the on-page display aspect, it is a sprite and the wrapper must stay.+**Mirror-mode override**: when `Replication mode: mirror`, Step 3 is a **verbatim copy** rather than a reconstruction. The Template_Designer role:++1. Copies each `<import_workspace>/svg-flat/slide_NN.svg` into the template directory **without any modification** — no placeholder insertion, no decorative simplification, no chrome/content reorganization. The SVG that ships in the template is byte-for-byte the flat preview of the source slide (modulo file rename).+2. Renames each file using the source-order-first convention: `<NNN>_<page_type>.svg`, where `<NNN>` is the source slide index zero-padded to 3 digits and `<page_type>` is derived from `manifest.json` `pageTypeCandidates` (typically `cover` / `toc` / `chapter` / `content` / `ending`; fall back to `content` when the type cannot be confidently classified). Examples: `001_cover.svg`, `002_toc.svg`, `003_content.svg`, ..., `050_ending.svg`.+3. Copies bundled assets from `<import_workspace>/assets/` into the template directory and rewrites the `<image href="...">` paths inside each copied SVG to point at the local copies. Asset filenames may be renamed to semantic names (`brand_emblem.png` instead of `image3.png`) when it improves readability — but the rewrite must be consistent across every page.+4. Writes `design_spec.md` per [template-designer.md](../references/template-designer.md) §1 — the **§V Page Roster description per page is the load-bearing artifact** because mirror has no placeholders to advertise the per-page contract; downstream Strategist selects pages purely from these descriptions.++Mirror mode does **not** invoke the "reconstruct into clean SVG" pathway. The sprite-sheet preservation rule still applies (because the flat SVGs already contain the original sprite wrappers — do not flatten them when copying).+**Expected outputs from this step** (full spec → [template-designer.md](../references/template-designer.md)):1. `design_spec.md` — **personality only**. Required sections: Template Overview, Color Scheme, Signature Design Elements, Page Roster (matching the actual SVG files on disk). Skip Typography / Assets / Placeholder Overrides when they would just restate defaults. Declare brief frontmatter for `register_template.py`. **Do not** restate generic SVG constraints, layout pattern libraries, font-size ratio bands, the canonical placeholder table, or content methodology — those are sourced from `shared-standards.md` / `design_spec_reference.md` / `strategist.md` and are already in the downstream reader's context. Full scope rule and skeleton: [template-designer.md §1](../references/template-designer.md#1-must-generate-design_specmd).-2. Page roster — see [Page Roster](../references/template-designer.md#page-roster) for `standard` vs `fidelity` mode, variant naming, and TOC handling+2. Page roster — see [Page Roster](../references/template-designer.md#page-roster) for `standard` / `fidelity` / `mirror` mode rosters, variant naming, and TOC handling3. Placeholder vocabulary — pages should adopt the conventional names (`{{TITLE}}`, `{{CONTENT_AREA}}`, ...) when they fit. Full reference: [Placeholder Reference](../references/template-designer.md#4-placeholder-reference-canonical-convention-overridable-per-template). When a template style legitimately needs different vocabulary (consulting → `{{KEY_MESSAGE}}`, branded cover → `{{BRAND_LOGO}}`), declare a `placeholders:` block in `design_spec.md` frontmatter so the registrar and quality checker treat it as the template's authoritative contract. **Avoid** one-off indexed families such as `{{CHAPTER_01_TITLE}}` — use the indexed TOC pattern instead.4. Template assets (optional) — Logos / PNG / JPG / reference SVG bundled with the template package@@ -197,6 +211,7 @@ python3 skills/ppt-master/scripts/svg_quality_checker.py "skills/ppt-master/temp- [ ] Placeholder names follow the canonical convention where applicable; templates with intentionally different vocabularies (e.g. `{{KEY_MESSAGE}}` instead of `{{PAGE_TITLE}}`) should declare a `placeholders:` frontmatter block to silence advisory warnings- [ ] Asset files referenced by SVGs actually exist in the template package- [ ] For `fidelity` mode: every sprite-sheet asset retains its nested `<svg viewBox=...>` crop wrapper; no image whose file aspect differs from its on-page aspect was flattened to a bare `<image>`+- [ ] For `mirror` mode: file count equals source slide count (`ls templates/layouts/<id>/*_*.svg | wc -l` matches `<import_workspace>/svg-flat/slide_*.svg | wc -l`); filenames follow the `<NNN>_<page_type>.svg` convention; **no `{{...}}` placeholder strings appear in any copied SVG** (`grep -l "{{" templates/layouts/<id>/*.svg` should return nothing); §V Page Roster in `design_spec.md` lists every emitted file with a one-line description of what the page contains and what content slot it suitsThis step is a **hard gate**. Do not register the template into the library index until validation passes.@@ -230,12 +245,13 @@ The completion card's file roster is collected by globbing `*.svg` in the templa> keywords: [tag1, tag2, tag3]> primary_color: "#005587"> canvas_format: ppt169-> replication_mode: standard+> replication_mode: standard # standard | fidelity | mirror> # Optional: per-page placeholder overrides. Templates that legitimately> # use a different vocabulary (e.g. consulting decks with {{KEY_MESSAGE}}> # in place of {{PAGE_TITLE}}, or content variants with bespoke slots)> # should declare them here so svg_quality_checker --template-mode does> # not flag them as conventional-placeholder gaps.+> # Mirror-mode templates do not need this field — they have no placeholders.> placeholders:> 01_cover: ["{{TITLE}}", "{{SUBTITLE}}", "{{BRAND_LOGO}}"]> 03_content: ["{{KEY_MESSAGE}}", "{{CONTENT_AREA}}"]