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-workflow): confirm adaptive or strict template use
hugohe3c9a9b10b2f5e
diff --git a/docs/faq.md b/docs/faq.mdindex 55bc1183..4be28538 100644--- a/docs/faq.md+++ b/docs/faq.md@@ -238,7 +238,7 @@ Want to turn a PPT you love into a reusable template for PPT Master? Here's how:**Step 1 — Prepare Reference Material**-The recommended input is the original `.pptx`. PPT Master extracts theme identity, every master/layout, placeholder type/index metadata, and reusable assets. When that native structure is reusable, the template package preserves the source package and generated pages bind to its original layouts; when the structure is minimal, the workflow rebuilds a clean master plus semantic layouts from layered SVG references.+The recommended input is the original `.pptx`. PPT Master extracts theme identity, every master/layout, placeholder type/index metadata, and reusable assets. When that native structure is reusable, the template package retains the source package as an optional strict-use capability; when the structure is minimal, the workflow rebuilds a clean master plus semantic layouts from layered SVG references. When the resulting template is used, Strategist asks whether adherence is `adaptive` (SVG references plus free pages, baseline export) or `strict` (every page follows the roster and compatible source layouts are preserved).If no source PPTX exists, screenshots of the key page types still work — cover, TOC, chapter, content, and closing — but geometry, fonts, and inheritance must then be inferred visually.diff --git a/docs/roadmap.md b/docs/roadmap.mdindex 4eb6f2ad..26f7b03a 100644--- a/docs/roadmap.md+++ b/docs/roadmap.md@@ -53,7 +53,7 @@ The past two months' structural capability growth. Single flags / incremental po- **mode catalog grows to 5: add `briefing`** — fills the "neutral information delivery" cell: no thesis, no story, no teaching, no spectacle — topic titles, even weight, complete and scannable, for status updates / reference decks / catalogs / meeting packs / FAQs that inform without arguing. The five now partition presentation *intent* more nearly MECE: persuade (pyramid) · tell a story (narrative) · teach (instructional) · impress (showcase) · simply inform (briefing). `_index` gains a `briefing` vs `pyramid` tie-breaker ("if you'd have to invent a thesis to fit pyramid, it's briefing"). Five presets plus a `custom` escape hatch for a bespoke direction none of them captures (a special cadence, a multi-mode fusion, a particular posture) — either user-requested or Strategist-recommended, confirmed like every lock; a deck always locks one value, and a fusion is one `custom` describing the acts. The only thing to avoid is defaulting to `custom` when a preset genuinely fits. Mirrors the truth-precedence rule that a user-authored outline or direction overrides the mode- **mode / visual-style system validated on real decks + four calibration tightenings landed** — the 5 modes + 18 visual-styles + the `custom` escape hatch were exercised on five covering decks (briefing×data-journalism / narrative×photo-editorial / instructional×chalkboard / showcase×glassmorphism / custom×zine, with the narrative deck going through the AI-image branch): **zero selection misses** (all four Close-calls tie-breakers fired and held against the real grey-zone pulls), **discipline fully honored** (zero HEX / Reference strength / whole-page layout language), **the `custom` mechanism works** (a `mode_behavior` prose paragraph carried a 10-page generation and reads as plain language at confirmation, not a bare token), **mode ⟂ visual_style holds** (any combination without bleed, including a positive check of the "keynote/launch = mode not style" route), export 5/5 decks × every page with 0 failures. Tightened four spots from the real signal: `strategist §e` now locks the full neutral tier set the visual_style implies up front (killing the mid-deck color top-ups seen in three consecutive decks), `executor-base §1` re-skins chart/layout template gradients-shadows-fills to the deck's visual_style (templates supply structure, not skin; mirror templates stay verbatim per §1.1), `briefing §1` makes `core_message` state coverage rather than a claim (briefing-only; global §IX assertion semantics stay for narrative/instructional/pyramid), and `svg_quality_checker` fixes font-family drift false positives (delimiter-matched capture + stack normalization) and drops the font-size ceiling for showcase mode and poster visual-styles- **Optional spec-review checkpoint shipped** ([`workflows/refine-spec.md`](../skills/ppt-master/workflows/refine-spec.md)) — an opt-in pause after the Strategist confirmation stage: when the user explicitly asks (default OFF), the Strategist produces the full `design_spec.md` + `spec_lock.md`, then stops so the user can revise any part of the spec (outline / color / typography / layout / image strategy / page rhythm) before generation, keeping both files in sync. Same shape as the split-mode note — it never fires on its own, the default pipeline is unchanged, and it surfaces as one opt-in line inside the Strategist confirmation stage. Review lenses (logical clarity / information density / focus / register / emotional resonance / chapter balance + the design dimensions) give a direction only, never a numeric threshold (`Reference` strength). Prompted by [@cuberoocp](https://github.com/cuberoocp) in [issue #173](https://github.com/hugohe3/ppt-master/issues/173)-- **Interactive visual Strategist confirmation stage page (Step 4)** ([`scripts/confirm_ui/server.py`](../skills/ppt-master/scripts/confirm_ui/server.py), field schema [`scripts/docs/confirm_ui.md`](../skills/ppt-master/scripts/docs/confirm_ui.md)) — the Strategist confirmation stage moves from chat-only to a browser page that auto-launches by default at Step 4: enumerable fields (canvas / mode / visual_style / icons / image usage / formula & generation policy) list common options from `catalogs.json`, while generative fields present candidates — color swatches, live font previews (CJK / Latin previewed independently), and AI-image rendering × palette picks; plus live swatch feedback on custom HEX, a live combined color × typography preview, and a body-size range hinted from the chosen canvas. It **shares port `5050`** with the Step 6 Live Preview (they never run at once — the page auto-`--shutdown`s at the end of Step 4 to free the port; if the port is busy the launcher auto-advances to the next free one). On principle **chat stays the canonical channel and the page is a convenience layer**: the page's `result.json` is authoritative over the recommendations and is consumed in place downstream (image plan / `image_strategy` / fonts / the split and refine-spec toggles all read from it), and any failure to open / timeout / headless host degrades losslessly to the chat-summary fallback+- **Interactive visual Strategist confirmation stage page (Step 4)** ([`scripts/confirm_ui/server.py`](../skills/ppt-master/scripts/confirm_ui/server.py), field schema [`scripts/docs/confirm_ui.md`](../skills/ppt-master/scripts/docs/confirm_ui.md)) — the Strategist confirmation stage moves from chat-only to a browser page that auto-launches by default at Step 4: enumerable fields (canvas / mode / visual_style / conditional template adherence / icons / image usage / formula & generation policy) list common options from `catalogs.json`, while generative fields present candidates — color swatches, live font previews (CJK / Latin previewed independently), and AI-image rendering × palette picks; plus live swatch feedback on custom HEX, a live combined color × typography preview, and a body-size range hinted from the chosen canvas. Template adherence appears only when Step 3 actually loaded a deck/layout template and defaults to `adaptive`; `strict` is the explicit path to all-page roster mapping and compatible native preservation. It **shares port `5050`** with the Step 6 Live Preview (they never run at once — the page auto-`--shutdown`s at the end of Step 4 to free the port; if the port is busy the launcher auto-advances to the next free one). On principle **chat stays the canonical channel and the page is a convenience layer**: the page's `result.json` is authoritative over the recommendations and is consumed in place downstream (image plan / `image_strategy` / fonts / the split and refine-spec toggles all read from it), and any failure to open / timeout / headless host degrades losslessly to the chat-summary fallback- **A batch of source-conversion fidelity gains** — less information dropped as source material enters the pipeline: `doc_to_md` converts Word OMML / Office Math equations to inline LaTeX, `pdf_to_md` recognizes `Figure N |` pipe-delimited captions, and `ppt_to_md` preserves hyperlinks already in the source deck (run-level external `[text](url)` / slide-internal jumps `[text](#slide-N)` / shape-level clicks, with dangerous-scheme filtering and anchor-text Markdown escaping) and transcribes native chart data into Markdown tables (values survive the conversion instead of collapsing to a single picture). Caption recognition is based on [@suay1113](https://github.com/suay1113)'s [PR #191](https://github.com/hugohe3/ppt-master/pull/191); hyperlink preservation is distilled from [@ZhaoZuohong](https://github.com/ZhaoZuohong)'s [PR #155](https://github.com/hugohe3/ppt-master/pull/155)- **Content-faithful PPT beautification / re-layout shipped** ([`workflows/beautify-pptx.md`](../skills/ppt-master/workflows/beautify-pptx.md)) — mirror of `template-fill`: template-fill reuses a deck's design with new content, beautify keeps the content and redoes the layout. Given an existing PPTX, **every text string is preserved verbatim (nothing added / removed / reworded)**; it **extracts and inherits the source deck's visual identity (palette / fonts, `theme` or `observed` offered as two confirm-page candidates)** and redoes only layout / hierarchy / whitespace, strict 1:1 page count and order, with charts / tables regenerated natively from extracted data (values frozen) and source pictures re-laid-out. Technically still "generate a native, editable PPTX from scratch" (`ppt_to_md` extracts content → main pipeline → a brand-new deck), not a patch over the original, so it stays clear of Non-goals #53. Adds `beautify_identity.py` / `beautify_inventory.py`; the confirm page is seeded from the source for the user to review. Honest v1 ceiling: it does not relieve information overload (a crowded page improves within itself; true re-pagination is the main pipeline), does not guarantee coordinate-level paste-back, and combo / dual-axis / waterfall charts lose the un-captured plots@@ -82,7 +82,7 @@ The past two months' structural capability growth. Single flags / incremental po- **`--native-objects` hardened from dormant marker to usable opt-in** — the narrow native-object exception (see Non-goals below) now emits charts and pure-text tables that keep the deck's own design instead of snapping to PowerPoint's white default theme. Classic native charts write explicit chart-area / plot-area / axis-line / gridline / label-text colors — inferred from the visible SVG fallback (largest panel `<rect>` → background, fallback text → labels, fallback strokes → axis/grid) or overridden per `style` (`chart_area_fill` / `plot_area_fill` / `text_color` / `axis_color` / `grid_color`, `"none"` for transparent); the color parser normalizes named CSS colors, `#RGB` shorthand, and `rgb()` / `rgba()` to OOXML hex; bar/column series disable negative-value fill inversion so negative bars keep their series color. The activated export is named `<name>_<ts>_native_charts.pptx` to tell it apart from the default flattened-shape export. **The default route is unchanged** — charts/tables still export as SVG-derived DrawingML shapes for cross-renderer fidelity; native objects stay the deliberate opt-in trade documented under Non-goals below-- **Native package structure + conservative PPTX object round-trip** — native export keeps a real master/layout relationship and defaults to a baseline master that promotes only safe shared backgrounds/chrome. A locked `template` mode compiles declared SVG master/layout layers and typed placeholders without visual inference; a reusable PPTX imported through `create-template` can instead lock `preserve`, retain its original master/layout/theme roster (including multiple masters), bind pages to exact source layouts, and restore source placeholder indices. Raw one-off PPTX filling remains the `template-fill-pptx` route. The standalone importer also emits fallback SVG plus native metadata for supported unmerged tables and classic-chart caches; unsupported semantics remain explicit fallback-only markers+- **Native package structure + conservative PPTX object round-trip** — native export keeps a real master/layout relationship and defaults to a baseline master that promotes only safe shared backgrounds/chrome. A locked `template` mode compiles declared SVG master/layout layers and typed placeholders without visual inference; a reusable PPTX imported through `create-template` retains its native pair as optional capability. Strategist now confirms template adherence: `strict` can lock `preserve`, retain the original master/layout/theme roster (including multiple masters), bind every page to an exact source layout, and restore source placeholder indices; `adaptive` keeps the created SVG roster optional and exports through baseline. Raw one-off PPTX filling remains the `template-fill-pptx` route. The standalone importer also emits fallback SVG plus native metadata for supported unmerged tables and classic-chart caches; unsupported semantics remain explicit fallback-only markers---@@ -116,7 +116,7 @@ PPT Master's main route is "AI generates SVG from scratch → DrawingML", with t**The basic need is actually simple**: if you just need "replace Excel data into fixed positions in a PPT template", have the AI write a few lines of `python-pptx`. You don't need this pipeline.-> **Supported boundaries**: `template-fill-pptx` directly refills selected source slides. `create-template` + `preserve` first turns a structured source into a reviewed reusable contract, then generates new slide content against exact source layouts. What remains out of scope is unreviewed, schema-free text-only substitution against every arbitrary third-party placeholder system.+> **Supported boundaries**: `template-fill-pptx` directly refills selected source slides. `create-template` first turns a structured source into a reviewed reusable SVG template and may retain its native contract; strict downstream use activates `preserve` against exact source layouts, while adaptive use stays on baseline. What remains out of scope is unreviewed, schema-free text-only substitution against every arbitrary third-party placeholder system.### Switch to native PowerPoint charts (Excel-native chart)diff --git a/docs/technical-design.md b/docs/technical-design.mdindex 46569178..d21c8849 100644--- a/docs/technical-design.md+++ b/docs/technical-design.md@@ -267,7 +267,7 @@ PPT Master uses **role switching within one main agent** rather than parallel su**Why role-specialized references, not one mega prompt.** Strategist runs in "negotiate with user" mode (open-ended, conversational, willing to back up); Executor runs in "produce strict XML" mode (no improvisation, no missing attributes). Mixing both into one prompt forces the model to hold incompatible discipline in the same turn — every prompt-engineering pathology of mode-mixing shows up. Splitting into per-role files lets each role load only what it needs and discard the rest.-**Strategist confirmation stage as the only blocking gate.** Strategist ends with a single confirmation gate delivered in three stages: Stage 1 confirms direction anchors (canvas, audience, divergence, delivery purpose, mode, visual style); Stage 2 is re-derived from those anchors and confirms the design system (page count, palette, typography, icons, formula policy); Stage 3 is re-derived from the confirmed design system and confirms images / execution (image usage, generated-image style, AI image path, generation mode, refine-spec). The final `confirm_ui/result.json` is authoritative — if the user changes a field, the generated `design_spec.md` and `spec_lock.md` must use that value, not the AI's original recommendation.+**Strategist confirmation stage as the only blocking gate.** Strategist ends with a single confirmation gate delivered in three stages: Stage 1 confirms direction anchors (canvas, audience, divergence, delivery purpose, mode, visual style, plus template adherence only when Step 3 loaded a deck/layout template); Stage 2 is re-derived from those anchors and confirms the design system (page count, palette, typography, icons, formula policy); Stage 3 is re-derived from the confirmed design system and confirms images / execution (image usage, generated-image style, AI image path, generation mode, refine-spec). Template adherence defaults to `adaptive`; `strict` is the explicit all-page roster/native-preservation path. The final `confirm_ui/result.json` is authoritative — if the user changes a field, the generated `design_spec.md` and `spec_lock.md` must use that value, not the AI's original recommendation.**Image analysis goes through regenerated metadata, not pixels.** When images exist, Strategist and Executor use `analyze_images.py` output (`analysis/image_analysis.csv`) rather than directly opening image files. The CSV is a regenerated view over the live `images/` folder, not a durable cache. Re-running it before image-sensitive decisions is the staleness strategy: user images, extracted images, web images, AI outputs, formulas, and sliced elements all converge into the same measured fact table.@@ -431,9 +431,9 @@ These direct routes share some analysis primitives with the main pipeline, espec**Why reusable layouts require explicit SVG metadata.** `--pptx-structure template` is the opt-in path for a generated deck that must remain reusable as a PowerPoint template. The final slide SVGs declare a layout key at the root, mark only direct root children as master/layout layers, and attach typed placeholder semantics to the slide-local prototypes that should become layout placeholders. Export validates that shared master and same-key layout declarations are structurally and visually identical, then emits real layout parts and `p:ph` references while leaving every unmarked object slide-local. This is deterministic structure compilation, not visual-template inference.-**Why imported reusable templates preserve instead of reconstruct.** `pptx_template_import.py` emits a paired `native_structure.json` and `source_template.pptx`. After `create-template` confirms that the source master/layout graph is reusable, `pptx_structure.mode: preserve` uses that package as the base, binds generated pages to exact source layout parts, removes SVG-only previews of inherited layers, and restores source placeholder type/index identities. Existing multiple masters and unused template layouts remain available in PowerPoint's layout picker. Raw PPTX plus one-off generated content still routes to `template-fill-pptx`; preserve mode begins only from a reusable template package.+**Why imported reusable templates retain native structure without forcing it.** `pptx_template_import.py` emits a paired `native_structure.json` and `source_template.pptx`. `create-template` may retain that pair when the source master/layout graph is reusable, while still building the ordinary SVG template roster. A later Strategist confirmation chooses template adherence: `strict` may set `pptx_structure.mode: preserve`, use the source package as the base, bind every generated page to an exact source layout, remove SVG-only previews of inherited layers, and restore source placeholder type/index identities; `adaptive` keeps template SVGs as optional references and exports through baseline. Existing multiple masters and unused template layouts remain available in PowerPoint's layout picker only on the strict preserve path. Raw PPTX plus one-off generated content still routes to `template-fill-pptx`; preserve mode begins only from a reusable template package.-**Why each SVG references a layout instead of becoming one.** A generated SVG is a complete slide instance: its actual title, body, pictures, tables, and charts must remain selectable in Normal View. `spec_lock.md` therefore separates `pptx_layouts` (the output PowerPoint layout key/name for every page) from `page_layouts` (an optional input SVG design reference). Pages reuse one output key only when their static layout layer and placeholder contract match. The exporter reads `pptx_structure.mode` from the lock when no CLI override is present. Within that hierarchy, ownership follows scope rather than paint type: a direct full-canvas solid rect becomes Master `p:bg` when deck-wide, Layout `p:bg` when page-type-specific, and Slide `p:bg` when explicitly marked for that scope or left unmarked in the background plane. This keeps new slides inheriting the right background without putting content or selectable full-canvas rectangles into layouts.+**Why each SVG references a layout instead of becoming one.** A generated SVG is a complete slide instance: its actual title, body, pictures, tables, and charts must remain selectable in Normal View. `spec_lock.md` therefore separates `pptx_layouts` (the output PowerPoint layout key/name for every structured page) from `page_layouts` (an input SVG design reference). Confirmed `template_adherence: strict` requires a template SVG for every page and may activate preserved native layouts; `adaptive` permits missing `page_layouts` rows and keeps native export on baseline. Pages reuse one output key only when their static layout layer and placeholder contract match. The exporter reads `pptx_structure.mode` from the lock when no CLI override is present. Within that hierarchy, ownership follows scope rather than paint type: a direct full-canvas solid rect becomes Master `p:bg` when deck-wide, Layout `p:bg` when page-type-specific, and Slide `p:bg` when explicitly marked for that scope or left unmarked in the background plane. This keeps new slides inheriting the right background without putting content or selectable full-canvas rectangles into layouts.**Why native-object reconstruction uses markers, not automatic object replacement.** The standalone `pptx_to_svg.py` importer can emit SVG fallback content plus `data-pptx-native` metadata for supported unmerged tables and conservative classic-chart caches. It retains source table-style inheritance, supported solid cell fills/basic text formatting, chart title/legend/axis titles, and plot-level data-label flags for area/bar/column/line charts when the current schema can represent them. Exporter-canonical classic charts also recover canonical solid series/slice colors and exact one- or two-paragraph title metadata. The default export still consumes fallback children as regular DrawingML shapes; only `--native-objects` activates editable PowerPoint tables/charts. Unsupported table cases — including merged cells, direct borders, non-solid fills, and mixed rich text — keep the rendered SVG table. Unsupported chart cases — including ChartEx, rotated/flipped/3D/combo charts, unsupported data-label scopes/types, custom axis semantics, trendlines/error bars, unsupported subtype options, sparse or non-finite caches, and date/formatted category axes — keep a baked preview when one exists, otherwise an explicit placeholder. Both carry `data-pptx-native-status`; the quality checker and native-object export report them as fallback-only warnings. This importer/exporter pairing is a reconstruction aid, not a preservation-route substitute for `template-fill-pptx` or `native-enhance-pptx`.diff --git a/docs/templates-guide.md b/docs/templates-guide.mdindex 534097bc..467b81dc 100644--- a/docs/templates-guide.md+++ b/docs/templates-guide.md@@ -121,7 +121,7 @@ The workflow will then **mandatorily** confirm a template brief with you before### Step 1 — Prepare reference material-**Strongly recommended: hand over the original `.pptx` file.** The importer reads OOXML directly, extracts every master/layout and placeholder, and emits both layered SVG references and a paired `native_structure.json` + byte-preserved `source_template.pptx`. When the source structure is reusable, generated pages can bind to its original layouts; when it is minimal, Template_Designer rebuilds a clean master plus semantic layouts from the layered references.+**Strongly recommended: hand over the original `.pptx` file.** The importer reads OOXML directly, extracts every master/layout and placeholder, and emits both layered SVG references and a paired `native_structure.json` + byte-preserved `source_template.pptx`. When the source structure is reusable, the template package retains the option to bind generated pages to its original layouts; when it is minimal, Template_Designer rebuilds a clean master plus semantic layouts from the layered references. Retention does not force later decks to use the native structure.You can also design from scratch from a brand guideline: provide a logo, primary color HEX, fonts, tone description, and a few mood references — the AI will design the page skeletons on the spot. This suits brands that don't yet have a finished PPT, only a VI manual.@@ -141,7 +141,7 @@ The workflow does not silently infer values — before generation it lists these| **Theme mode** | Light / dark / gradient / ... || **Canvas format** | Default `ppt169` (16:9); specify other formats up front || **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 |-| **Native structure strategy** | `preserve` when the source master/layout graph is reusable; `template` to rebuild one master plus semantic layouts when it is minimal. `mirror` uses the rebuilt/baseline path because its inherited layers are flattened. |+| **Native structure packaging** | `preserve` when the source master/layout graph is reusable; `template` to rebuild one master plus semantic layouts when it is minimal. This decides what capability the library package retains, not how every future deck must use it. `mirror` uses the rebuilt/baseline path because its inherited layers are flattened. || **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 |@@ -178,6 +178,11 @@ After generation, the workflow:Registration makes the template **discoverable** — when someone asks "what templates are available?", the AI lists it from the index. To use it in a new project, follow the SKILL.md Step 3 rule: name its directory path in your first message, e.g. `use this template: skills/ppt-master/templates/layouts/<your_template_id>/`.+When a deck/layout template is selected, the Strategist confirmation stage asks how it should be used:++- **adaptive** — use suitable SVG template pages, allow unmatched pages to be designed freely, and keep native export on the normal baseline path+- **strict** — map every generated page to the template roster; when the package carries a compatible native pair, reuse its original Master/Layout/Placeholder structure+### What a derived template looks like```@@ -225,7 +230,7 @@ Don't confuse the two:Common misconceptions to avoid:-- **A template is not always a Slide Master, but it may carry one.** Ordinary templates remain SVG skeletons. An imported template with `native_structure.json` + `source_template.pptx` preserves the original master/layout/theme package and binds generated content to source placeholders+- **A template is not always a Slide Master, but it may carry one.** Ordinary templates remain SVG skeletons. An imported template with `native_structure.json` + `source_template.pptx` retains the original master/layout/theme package as an optional strict-use capability; adaptive use still follows the ordinary SVG + baseline path- **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 goesdiff --git a/docs/zh/faq.md b/docs/zh/faq.mdindex 1e88ed04..22a2cd20 100644--- a/docs/zh/faq.md+++ b/docs/zh/faq.md@@ -242,7 +242,7 @@ beautify 和主管线的一句话判别:**原来的分页是要保留的信息**第一步 — 准备参考材料**-**最推荐的方式是直接给原始 `.pptx` 文件**。PPT Master 会提取主题色、字体、全部 master/layout、placeholder type/idx 和可复用图片资源。源结构完整时,模板包会保留原 package 并让生成页引用原版式;源结构薄弱时,再用 layered SVG 重建一个干净的 master + 语义版式体系。+**最推荐的方式是直接给原始 `.pptx` 文件**。PPT Master 会提取主题色、字体、全部 master/layout、placeholder type/idx 和可复用图片资源。源结构完整时,模板包会把原 package 保留为严格套用时的可选能力;源结构薄弱时,再用 layered SVG 重建一个干净的 master + 语义版式体系。使用该模板生成新 deck 时,Strategist 会确认是 `adaptive`(SVG 模板参考 + 自由页面,baseline 导出)还是 `strict`(每页套用模板 roster,并在兼容时保留原生版式)。没有源 PPTX 时,截图集也能跑(`cover.png` / `toc.png` / `chapter.png` / `content.png` / `closing.png`),但保真度会明显下降。建议优先找原始 PPTX。diff --git a/docs/zh/roadmap.md b/docs/zh/roadmap.mdindex 21417836..104b98c4 100644--- a/docs/zh/roadmap.md+++ b/docs/zh/roadmap.md@@ -53,7 +53,7 @@- **mode catalog 扩档至 5 个:加 `briefing`** — 补上「中性信息平铺」这一格:无论点 / 无故事 / 不教学 / 不冲击,topic 标题、等权铺事实、完整可扫读,服务周报 / 参考册 / 目录 / 会议材料 / FAQ 这类「只告知不论证」的 deck。五个 mode 自此更接近 MECE 地切分**表达意图**:说服(pyramid)· 讲故事(narrative)· 教会(instructional)· 震住(showcase)· 只告知(briefing)。`_index` 加了 `briefing` vs `pyramid` 的灰区判据(「要不要造个 thesis 才塞得进 pyramid → 那就是 briefing」)。五个预设之外加一个 `custom` 兜底,承接预设盖不住的 bespoke 方向(特殊节奏 / 多 mode 融合 / 特定姿态)——用户点名**或策略师推荐**皆可,与所有锁一样由用户确认;一份 deck 永远只锁一个值,融合=一个 custom 描述多幕。唯一要避免的是「预设明明贴合却图省事甩 custom」。这与「用户自带大纲 / 方向覆盖 mode」是同一条真值优先原则- **mode / visual-style 体系真实 deck 验证完成 + 四项校准收紧落地** — 5 mode + 18 visual-style + `custom` 逃生舱在 5 份覆盖性 deck 上跑过验证(briefing×data-journalism / narrative×photo-editorial / instructional×chalkboard / showcase×glassmorphism / custom×zine,其中 narrative 一份走 AI 图生成分支):**选型零误判**(四对 Close-calls 灰区引力全被触发且全抗住)、**纪律全落实**(零 HEX / Reference 强度 / 整页版面语言)、**custom 机制可用**(`mode_behavior` 散文段落撑过 10 页生成、能讲成大白话让用户确认)、**mode ⟂ visual_style 正交成立**(任意组合无串味,含「keynote/发布会=mode 不是 style」路由正面验证)、导出 5/5 deck × 全页 0 失败。据真实信号收紧四处:`strategist §e` 按 visual_style 预判中性档位一次锁全(消除连续三份的 Executor 中途补色)、`executor-base §1` 套模板页重皮到当前 visual_style(模板供结构不供皮,镜像模板仍按 §1.1 逐字保留)、`briefing §1` 的 `core_message` = 本页覆盖什么而非证明什么(briefing 专属例外,全局 §IX 论断语义保留给 narrative/instructional/pyramid)、`svg_quality_checker` 修字体 drift 误报(按定界符匹配 + font-stack 归一化)+ 放宽 showcase mode 与 poster 类 visual-style 的字号上限- **可选 spec 复核环节上线**([`workflows/refine-spec.md`](../../skills/ppt-master/workflows/refine-spec.md)) — 策略师确认阶段后新增一个 opt-in 停顿点:用户明确要求时(默认 OFF),Strategist 先产出完整 `design_spec.md` + `spec_lock.md`,停下来让用户对 spec 任意部分(大纲 / 配色 / 排版 / 版式 / 图片策略 / page rhythm)深入讨论修改,改完同步两个文件再进生成。与 split-mode 同构——不主动触发、默认管线零变化,仅在策略师确认阶段里多一行 opt-in 提示。复核视角(逻辑清晰度 / 信息密度 / 焦点 / 口语化 / 感染力 / 章节配比 + 各设计维度)只给方向、不落任何数字阈值(`Reference` 强度)。启发自 [@cuberoocp](https://github.com/cuberoocp) [issue #173](https://github.com/hugohe3/ppt-master/issues/173)-- **交互式可视化策略师确认页(Step 4)**([`scripts/confirm_ui/server.py`](../../skills/ppt-master/scripts/confirm_ui/server.py),字段 schema [`scripts/docs/confirm_ui.md`](../../skills/ppt-master/scripts/docs/confirm_ui.md)) — 策略师确认阶段从纯聊天升级为浏览器可视化页面,Step 4 默认自动拉起:可枚举字段(canvas / mode / visual_style / 图标 / 图片用法 / 公式与生成策略)从 `catalogs.json` 出常用项、生成型字段摆候选——配色 swatch、字体实时预览(CJK / Latin 各自独立)、AI 图 rendering × palette 候选;并支持自定义 HEX 即时 swatch 反馈、配色 × 字体组合的实时合成预览、canvas 尺寸联动建议正文字号区间。与 Step 6 Live Preview **共用 `5050` 端口**(永不同时跑,确认页在 Step 4 末尾自动 `--shutdown` 让出端口;端口被占则自动顺延到下一个空闲口)。原则上**聊天始终是 canonical 通道、确认页只是便利层**:页面写出的 `result.json` 对推荐值具权威性、由下游就地消费(图片计划 / `image_strategy` / 字体 / split 与 refine-spec 开关都从中读取),任何打不开 / 超时 / 无 GUI 的情况都无损回退到聊天总结路径+- **交互式可视化策略师确认页(Step 4)**([`scripts/confirm_ui/server.py`](../../skills/ppt-master/scripts/confirm_ui/server.py),字段 schema [`scripts/docs/confirm_ui.md`](../../skills/ppt-master/scripts/docs/confirm_ui.md)) — 策略师确认阶段从纯聊天升级为浏览器可视化页面,Step 4 默认自动拉起:可枚举字段(canvas / mode / visual_style / 条件式模板遵循方式 / 图标 / 图片用法 / 公式与生成策略)从 `catalogs.json` 出常用项、生成型字段摆候选——配色 swatch、字体实时预览(CJK / Latin 各自独立)、AI 图 rendering × palette 候选;并支持自定义 HEX 即时 swatch 反馈、配色 × 字体组合的实时合成预览、canvas 尺寸联动建议正文字号区间。模板遵循方式只在 Step 3 实际加载 Deck/Layout 模板时显示,默认推荐 `adaptive`;`strict` 才进入全页 roster 映射和兼容原生结构保留。与 Step 6 Live Preview **共用 `5050` 端口**(永不同时跑,确认页在 Step 4 末尾自动 `--shutdown` 让出端口;端口被占则自动顺延到下一个空闲口)。原则上**聊天始终是 canonical 通道、确认页只是便利层**:页面写出的 `result.json` 对推荐值具权威性、由下游就地消费(图片计划 / `image_strategy` / 字体 / split 与 refine-spec 开关都从中读取),任何打不开 / 超时 / 无 GUI 的情况都无损回退到聊天总结路径- **源文档转换保真度提升一批** — 源材料进管线时更少丢信息:`doc_to_md` 把 Word 里的 OMML / Office Math 公式转成内联 LaTeX、`pdf_to_md` 识别 `Figure N |` 竖线分隔的图注、`ppt_to_md` 保留源 deck 已有的超链接(run 级外链 `[text](url)` / slide 内部跳转 `[text](#slide-N)` / shape 级点击,含危险 scheme 过滤与锚文本 Markdown 转义)并把原生图表数据转写成 Markdown 表格(数值随转换存活,不再只剩一张图)。图注识别基于 [@suay1113](https://github.com/suay1113) [PR #191](https://github.com/hugohe3/ppt-master/pull/191),超链接保留提炼自 [@ZhaoZuohong](https://github.com/ZhaoZuohong) [PR #155](https://github.com/hugohe3/ppt-master/pull/155)- **内容保真的 PPT 美化 / 重排版上线**([`workflows/beautify-pptx.md`](../../skills/ppt-master/workflows/beautify-pptx.md)) — 与 `template-fill` 互为镜像:template-fill 复用某份 deck 的设计换新内容,beautify 反过来保留内容、重做版面。给一份现成 PPTX,**全部文字逐字保留(不增 / 不删 / 不改写)**,从源 deck 提取并**继承其视觉身份(配色 / 字体,`theme` 或 `observed` 两套候选过确认页)**,只重做版面 / 层级 / 留白;严格 1:1 页数页序,图表 / 表格从抽取数据原生重绘(数据冻结)、源配图重新排布。技术上仍走从零生成原生 PPTX 管线(`ppt_to_md` 抽内容 → 主管线 → 全新 deck),不补丁原文件,因此不碰 Non-goals #53。新增 `beautify_identity.py` / `beautify_inventory.py`,confirm 页全字段按源 seed 后用户复核。v1 天花板(诚实标注):不缓解信息过载(挤页只在页内改,真要重排分页属主管线)、不保证坐标级 paste-back、combo / dual-axis / waterfall 图丢未捕获的绘图层@@ -82,7 +82,7 @@- **`--native-objects` 从休眠 marker 硬化为可用级 opt-in** — 那条窄「原生对象」例外(见下文 Non-goals)现在导出的图表与纯文本表格会**保留 deck 自己的设计**,不再塌回 PowerPoint 的白底默认主题。classic 原生图表显式写入 chart-area / plot-area / 轴线 / 网格线 / 标签文字颜色——从可见的 SVG fallback 推断(最大面板型 `<rect>` → 背景、fallback 文字 → 标签、fallback 描边 → 轴线/网格),或用 `style` 显式覆盖(`chart_area_fill` / `plot_area_fill` / `text_color` / `axis_color` / `grid_color`,`"none"` 表透明);颜色解析把命名色、`#RGB` 简写、`rgb()` / `rgba()` 归一为 OOXML hex;bar/column 系列关掉负值反色,负值柱保持系列色。激活导出命名为 `<name>_<ts>_native_charts.pptx` 以与默认压平形状导出区分。**默认路线不变**——图表/表格仍以 SVG 派生的 DrawingML 形状导出以保跨渲染器保真;原生对象仍是下文 Non-goals 里那条刻意的 opt-in 取舍-- **原生 package 结构 + 保守 PPTX 对象回转** — 原生导出保留真实 master/layout 关系,默认 baseline 只提升安全的共享背景/chrome。锁定的 `template` 模式把显式 SVG master/layout layer 与有类型的 placeholder 编译成可复用版式,不做视觉推断;通过 `create-template` 导入的可复用 PPTX 还可锁定 `preserve`,保留原 master/layout/theme 清单(包括多母版)、把页面绑定到精确源版式并恢复源 placeholder idx。原始 PPTX 的一次性直接填充继续走 `template-fill-pptx`。导入器也会为受支持的未合并表格与 classic-chart cache 输出 fallback SVG 加原生元数据;无法等价表达的语义保持明确的 fallback-only marker+- **原生 package 结构 + 保守 PPTX 对象回转** — 原生导出保留真实 master/layout 关系,默认 baseline 只提升安全的共享背景/chrome。锁定的 `template` 模式把显式 SVG master/layout layer 与有类型的 placeholder 编译成可复用版式,不做视觉推断;通过 `create-template` 导入的可复用 PPTX 会把原生结构对保留为可选能力。Strategist 进一步确认模板遵循方式:`strict` 可锁定 `preserve`,保留原 master/layout/theme 清单(包括多母版)、把每页绑定到精确源版式并恢复源 placeholder idx;`adaptive` 则把 SVG roster 作为可选参考并继续走 baseline。原始 PPTX 的一次性直接填充继续走 `template-fill-pptx`。导入器也会为受支持的未合并表格与 classic-chart cache 输出 fallback SVG 加原生元数据;无法等价表达的语义保持明确的 fallback-only marker---@@ -116,7 +116,7 @@ PPT Master 主路线是「AI 从零生成 SVG → DrawingML」,整条管线围**基础诉求其实很简单**:如果只是「固定位置替换 Excel 数据到 PPT 模板」,直接让 AI 写一段 `python-pptx` 脚本即可,几行代码搞定,不需要本项目这套管线。-> **已支持边界**:`template-fill-pptx` 直接回填选中的源页面;`create-template` + `preserve` 先把结构完整的源文件收敛成经过确认的可复用契约,再让新页面引用精确源版式。仍不做的是未经审查、没有契约的任意第三方 placeholder 全自动文字替换。+> **已支持边界**:`template-fill-pptx` 直接回填选中的源页面;`create-template` 先把结构完整的源文件收敛成经过确认的 SVG 模板,并可保留原生契约。下游严格套用时才激活 `preserve` 引用精确源版式,适应性使用仍走 baseline。仍不做的是未经审查、没有契约的任意第三方 placeholder 全自动文字替换。### 改用原生 PowerPoint 图表(Excel-native chart)diff --git a/docs/zh/technical-design.md b/docs/zh/technical-design.mdindex c2961e9d..cee42356 100644--- a/docs/zh/technical-design.md+++ b/docs/zh/technical-design.md@@ -267,7 +267,7 @@ PPT Master 用的是**单主代理内的角色切换**,不是并行子代理**为什么是角色专属 reference 而不是一个超大 prompt。** Strategist 跑的是「跟用户协商」模式(开放式、对话式、可以回退),Executor 跑的是「产出严格 XML」模式(不准即兴、不准漏属性)。把两者塞进同一个 prompt,强迫模型在同一个 turn 里持守相互矛盾的纪律——所有混合模式的 prompt 工程病灶都会出现。按角色拆开,每个角色只加载它需要的、扔掉其他。-**策略师确认阶段是唯一的阻塞 gate。** Strategist 阶段以一个三阶段确认 gate 作为核心阻塞决策点:第一阶段确认方向锚点(画布、受众、改写幅度、交付目的、mode、visual style);第二阶段基于已确认锚点重新推导并确认设计系统(页数、调色板、字体、图标、公式策略);第三阶段基于已确认设计系统重新推导并确认图片与执行方式(图片来源、生成图风格、AI 图片路径、生成模式、refine-spec)。最终的 `confirm_ui/result.json` 是权威输入——用户改过的字段必须进入 `design_spec.md` 和 `spec_lock.md`,不能回退到 AI 的原始推荐。+**策略师确认阶段是唯一的阻塞 gate。** Strategist 阶段以一个三阶段确认 gate 作为核心阻塞决策点:第一阶段确认方向锚点(画布、受众、改写幅度、交付目的、mode、visual style,以及只在 Step 3 加载 Deck/Layout 模板时出现的模板遵循方式);第二阶段基于已确认锚点重新推导并确认设计系统(页数、调色板、字体、图标、公式策略);第三阶段基于已确认设计系统重新推导并确认图片与执行方式(图片来源、生成图风格、AI 图片路径、生成模式、refine-spec)。模板遵循默认推荐 `adaptive`,`strict` 是全页 roster 映射与兼容原生结构保留的显式路径。最终的 `confirm_ui/result.json` 是权威输入——用户改过的字段必须进入 `design_spec.md` 和 `spec_lock.md`,不能回退到 AI 的原始推荐。**图片分析走重算元数据,不读像素。** 当项目里存在图片时,Strategist 和 Executor 使用 `analyze_images.py` 的输出(`analysis/image_analysis.csv`),而不是直接打开图片文件。这个 CSV 是基于当前 `images/` 目录重算出来的视图,不是持久缓存。每次做图片敏感决策前重跑分析,就是它的防陈旧策略:用户图、抽取图、网络图、AI 图、公式图和切片图最终都会汇入同一张可度量事实表。@@ -431,9 +431,9 @@ PowerPoint 的 DrawingML 是 SVG 表达力的严格子集。Executor 在一份**为什么可复用版式必须依赖显式 SVG 元数据。** `--pptx-structure template` 是生成型 deck 需要继续作为 PowerPoint 模板复用时的 opt-in 路径。最终 slide SVG 在根节点声明 layout key,只允许根节点的直接子元素标记 master/layout layer,并在应成为版式占位框的 slide-local 原型上附加类型语义。导出器会验证共享 master 与同 key layout 的声明在结构和视觉上完全一致,再生成真实 layout part 与 `p:ph` 引用;所有未标记对象仍保持 slide-local。这是确定性的结构编译,不是根据视觉相似度猜模板。-**为什么导入的可复用模板应保留而不是重建。** `pptx_template_import.py` 会配对输出 `native_structure.json` 与 `source_template.pptx`。当 `create-template` 确认源 master/layout 图谱可复用后,`pptx_structure.mode: preserve` 以该 package 为底包,把生成页绑定到精确的源 layout part,移除 SVG 中仅用于预览的继承层副本,并恢复源 placeholder 的 type/idx 身份。源文件已有的多母版和未被示例页引用的版式也会继续保留在 PowerPoint 的版式选择器中。原始 PPTX 加一次性新内容仍走 `template-fill-pptx`;preserve 模式只从完成封装的可复用模板包开始。+**为什么导入的可复用模板应保留原生结构但不强制使用。** `pptx_template_import.py` 会配对输出 `native_structure.json` 与 `source_template.pptx`。当源 master/layout 图谱可复用时,`create-template` 可以在照常创建 SVG 模板 roster 的同时保留这对文件。后续 Strategist 确认模板遵循方式:`strict` 可以启用 `pptx_structure.mode: preserve`,以源 package 为底包,把每个生成页绑定到精确的源 layout part,移除 SVG 中仅用于预览的继承层副本,并恢复源 placeholder 的 type/idx 身份;`adaptive` 则把模板 SVG 当作可选参考,原生导出仍走 baseline。只有严格 preserve 路径会把源文件已有的多母版和未被示例页引用的版式继续保留在 PowerPoint 的版式选择器中。原始 PPTX 加一次性新内容仍走 `template-fill-pptx`;preserve 模式只从完成封装的可复用模板包开始。-**为什么每个 SVG 应引用版式,而不是直接变成版式。** 生成 SVG 是完整的 slide 实例;其中真实标题、正文、图片、表格和图表必须继续能在普通视图中选择。`spec_lock.md` 因而把 `pptx_layouts`(每页最终引用的 PowerPoint layout key/name)与 `page_layouts`(可选的输入 SVG 设计参考)分开。只有静态 layout layer 与 placeholder contract 相同的页面才复用同一个输出 key。没有 CLI 覆盖时,导出器会读取 lock 中的 `pptx_structure.mode`。在这个继承层级里,归属由复用范围而不是填充类型决定:全画布纯色矩形在全 deck 共享时成为 Master `p:bg`,页型共享时成为 Layout `p:bg`,显式标记为 slide 或位于背景层但未标记时成为 Slide `p:bg`。这样新增页面能继承正确背景,同时不会把实际内容或可选中的全屏矩形塞进版式。+**为什么每个 SVG 应引用版式,而不是直接变成版式。** 生成 SVG 是完整的 slide 实例;其中真实标题、正文、图片、表格和图表必须继续能在普通视图中选择。`spec_lock.md` 因而把 `pptx_layouts`(结构化页面最终引用的 PowerPoint layout key/name)与 `page_layouts`(输入 SVG 设计参考)分开。确认 `template_adherence: strict` 时,每页都必须选择一个模板 SVG,并可进一步启用原生版式保留;确认 `adaptive` 时,允许省略 `page_layouts` 让页面自由设计,原生导出继续走 baseline。只有静态 layout layer 与 placeholder contract 相同的页面才复用同一个输出 key。没有 CLI 覆盖时,导出器会读取 lock 中的 `pptx_structure.mode`。在这个继承层级里,归属由复用范围而不是填充类型决定:全画布纯色矩形在全 deck 共享时成为 Master `p:bg`,页型共享时成为 Layout `p:bg`,显式标记为 slide 或位于背景层但未标记时成为 Slide `p:bg`。这样新增页面能继承正确背景,同时不会把实际内容或可选中的全屏矩形塞进版式。**为什么原生对象重建使用 marker,而不是自动替换对象。** 独立的 `pptx_to_svg.py` 导入器会为受支持的未合并表格和保守 classic-chart cache 输出 SVG fallback,并附加 `data-pptx-native` 元数据;当现有 schema 能表达时,还会保留源表格样式继承、受支持的单元格纯色填充 / 基础文字格式,以及图表标题、图例、坐标轴标题和面积图 / 条形图 / 柱形图 / 折线图的 plot 级数据标签开关。由本 exporter 生成的规范 classic chart 还会回读规范纯色系列 / 切片,以及精确的单段或双段标题元数据。默认导出仍把 fallback 子元素当普通 DrawingML shape 处理;只有 `--native-objects` 才会启用可编辑的 PowerPoint 表格 / 图表。合并单元格、直接边框、非纯色填充、混合富文本等不支持的表格场景继续保留实际渲染的 SVG table。ChartEx、旋转 / 翻转 / 3D / 组合图表、不受支持的数据标签作用域或类型、自定义坐标轴语义、趋势线 / 误差线、不受支持的子类型参数、稀疏或非有限 cache、日期 / 格式化类别轴等不支持的图表场景,则在有 baked preview 时保留预览,否则给出明确占位符。两类对象都会写入 `data-pptx-native-status`;质量检查器和 native-object 导出将其报告为 fallback-only warning。这对 importer/exporter 是重建辅助能力,不能替代 `template-fill-pptx` 或 `native-enhance-pptx` 的保留型路线。diff --git a/docs/zh/templates-architecture.md b/docs/zh/templates-architecture.mdindex 21c789cb..a86e27fa 100644--- a/docs/zh/templates-architecture.md+++ b/docs/zh/templates-architecture.md@@ -14,10 +14,12 @@| **Layout** | `templates/layouts/<id>/` | 仅结构段:canvas / page structure / page types / SVG roster | 不写品牌身份(无 logo、无品牌色硬约束) | `workflows/create-template.md`(layout 分支)|| **Deck** | `templates/decks/<id>/` | 全段:身份段 + 结构段 + 中间段(template overview) | —— | `workflows/create-template.md`(deck 分支,默认)|-从结构完整的 PPTX 导入的 Layout/Deck 可以额外携带一对原生结构文件:`native_structure.json` 记录稳定 master/layout key、版式显示名称、父母版和 placeholder type/idx;`source_template.pptx` 保存原 package。两者必须同时存在且 SHA-256 匹配。下游 `pptx_structure.mode: preserve` 会复用源 master/layout/theme;没有这对文件时继续使用现有 `baseline` 或显式 `template` 重建。+从结构完整的 PPTX 导入的 Layout/Deck 可以额外携带一对原生结构文件:`native_structure.json` 记录稳定 master/layout key、版式显示名称、父母版和 placeholder type/idx;`source_template.pptx` 保存原 package。两者必须同时存在且 SHA-256 匹配。这是一项模板包能力,不是自动路由:下游 Strategist 确认 `strict` 时可用 `pptx_structure.mode: preserve` 复用源 master/layout/theme;确认 `adaptive` 时仍按 SVG 模板参考 + `baseline` 自由生成。没有这对文件时继续使用现有 `baseline` 或显式 `template` 重建。三者是**三种并列的 reference bundle**,物理目录与 frontmatter `kind` 字段双向对齐:+多路径合成后的项目级 `design_spec.md` 也必须保留准确的 `kind`:同时具备身份段和结构段时为 `deck`,只有结构段时为 `layout`,只有身份段时为 `brand`。Strategist 确认页据此只对真正包含页面结构的 Deck/Layout 显示 `adaptive / strict`。+```yaml# templates/brands/anthropic/design_spec.md---diff --git a/docs/zh/templates-guide.md b/docs/zh/templates-guide.mdindex c5097457..9314670d 100644--- a/docs/zh/templates-guide.md+++ b/docs/zh/templates-guide.md@@ -121,7 +121,7 @@ AI 会把这个目录里的 SVG、`design_spec.md` 和素材复制到项目目### 第一步:准备参考材料-**强烈推荐:直接给原始 `.pptx` 文件。** 当前的 PPTX 导入管线会用 [`pptx_template_import.py`](../../skills/ppt-master/scripts/pptx_template_import.py) 直接读取 OOXML,提取主题色、字体、全部 master/layout、placeholder 元数据和可复用图片资源,同时输出 `native_structure.json` 与字节保留的 `source_template.pptx`。结构完整时,后续生成页可以直接引用原版式;结构薄弱时,Template_Designer 才会基于 layered `svg/` 重建干净的 master/layout 规范。+**强烈推荐:直接给原始 `.pptx` 文件。** 当前的 PPTX 导入管线会用 [`pptx_template_import.py`](../../skills/ppt-master/scripts/pptx_template_import.py) 直接读取 OOXML,提取主题色、字体、全部 master/layout、placeholder 元数据和可复用图片资源,同时输出 `native_structure.json` 与字节保留的 `source_template.pptx`。结构完整时,模板包会保留后续生成页直接引用原版式的能力;结构薄弱时,Template_Designer 才会基于 layered `svg/` 重建干净的 master/layout 规范。保留原生结构不等于强制未来每份 deck 都使用它。也可以基于品牌指南从零设计:提供 logo、主色 HEX、字体、调性描述、几张氛围参考图,AI 会现场设计页面骨架。适合品牌方还没有成型 PPT、只有 VI 手册的场景。@@ -141,7 +141,7 @@ AI 会把这个目录里的 SVG、`design_spec.md` 和素材复制到项目目| **主题模式** | 浅色 / 深色 / 渐变…… || **画布格式** | 默认 `ppt169`(16:9),其他格式需提前指定 || **复刻模式** | `standard`(默认 5 页基本套)/ `fidelity`(按 PPTX 源里"视觉上真正不同"的版式簇各开一个变体——数量由源决定)/ `mirror`(每张源页 1:1 原样复制,零抽象、不插占位符)—— `fidelity` 和 `mirror` 都必须有 `.pptx` 源 |-| **原生结构策略** | 有完整 master/layout 时推荐 `preserve`(保留原 package);结构薄弱时用 `template`(重建一个 master + 语义版式)。`mirror` 因为继承层已展平,只走重建/基线路线。 |+| **原生结构封装策略** | 有完整 master/layout 时推荐 `preserve`(保留原 package);结构薄弱时用 `template`(重建一个 master + 语义版式)。它决定模板库资产保留什么能力,不决定未来每份 deck 必须怎样使用。`mirror` 因为继承层已展平,只走重建/基线路线。 || **保真级别** | (`standard` / `fidelity` 有源时必填)`literal`(按原样复刻几何/装饰/精灵图裁剪)/ `adapted`(借结构和调性、允许设计演化)。封面 / 章节 / 结尾通常用 `literal`。**`mirror` 模式不询问**——隐含 literal || **关键词** | 3–5 个标签,用于索引检索 || 主题色 / 设计风格 / 素材清单 | 可选,可让 AI 从源里自动提取 |@@ -178,6 +178,11 @@ AI 会把这个目录里的 SVG、`design_spec.md` 和素材复制到项目目注册让模板**可被发现**——下次有人问"有哪些模板可用?"时,AI 会从索引里把它列出来。要在新项目里用它,仍然按 SKILL.md Step 3 的规则:在第一条消息里把目录路径写出来,例如 `用这个模板:skills/ppt-master/templates/layouts/<your_template_id>/`。+选择 Deck/Layout 模板后,Strategist 确认阶段会进一步询问模板的使用方式:++- **适应性使用(adaptive)**——只使用适合的 SVG 模板页,不适配的页面允许自由设计,原生导出继续走普通 baseline+- **严格套用(strict)**——每一页都映射到模板 roster;模板携带兼容原生结构时,复用原始 Master/Layout/Placeholder+### 派生后的目录长什么样```@@ -225,7 +230,7 @@ skills/ppt-master/templates/layouts/<your_template_id>/避免常见误解:-- **模板不一定等于母版,但可以携带母版**。普通模板仍以 SVG 骨架为主;带 `native_structure.json` + `source_template.pptx` 的导入模板会在导出时保留原 master/layout/theme,并把生成内容绑定到原 placeholder+- **模板不一定等于母版,但可以携带母版**。普通模板仍以 SVG 骨架为主;带 `native_structure.json` + `source_template.pptx` 的导入模板会把原 master/layout/theme 保留为严格套用时的可选能力,适应性使用仍走普通 SVG + baseline 路径- **模板不是"风格皮肤"**。它包含结构(页面有几块、信息层级如何分布)+ 风格(配色、字体、装饰),两者不可分割。试图只换"皮肤"不换结构,往往会让信息架构和视觉打架- **模板不会替你做内容决策**。策略师仍然会按内容判断每页用哪个版式、要不要扩展为变体,模板提供候选,不预设结果- **`fidelity` 模式不等于像素级搬运**。即便是 `literal` 保真,AI 仍会把杂质和不必要的重复结构清理掉——载体保留几何,但不照抄冗余diff --git a/skills/ppt-master/SKILL.md b/skills/ppt-master/SKILL.mdindex d6700467..cbc0ac71 100644--- a/skills/ppt-master/SKILL.md+++ b/skills/ppt-master/SKILL.md@@ -25,7 +25,7 @@ description: >> 5. **NO SPECULATIVE EXECUTION** — "Pre-preparing" content for subsequent Steps is FORBIDDEN (e.g., writing SVG code during the Strategist phase)> 6. **NO SUB-AGENT SVG GENERATION** — Executor Step 6 SVG generation is context-dependent and MUST be completed by the current main agent end-to-end. Delegating page SVG generation to sub-agents is FORBIDDEN> 7. **SEQUENTIAL PAGE GENERATION ONLY** — In Executor Step 6, after the global design context is confirmed, SVG pages MUST be generated sequentially page by page in one continuous pass. Grouped page batches (for example, 5 pages at a time) are FORBIDDEN-> 8. **SPEC_LOCK RE-READ PER PAGE** — Before generating each SVG page, Executor MUST `read_file <project_path>/spec_lock.md`. All colors / fonts / icons / images MUST come from this file — no values from memory or invented on the fly. Executor MUST also look up the current page's `page_rhythm` (`anchor` / `dense` / `breathing`), `page_layouts` (which template SVG to inherit, if any), `page_charts` (which chart template to adapt, if any), and — when `pptx_structure.mode` is `template` or `preserve` — `pptx_layouts` (which native PowerPoint layout the page references). Empty / absent entries are intentional Strategist signals — see executor-base.md §2.1. This rule exists to resist context-compression drift on long decks and to break the uniform "every page is a card grid" default+> 8. **SPEC_LOCK RE-READ PER PAGE** — Before generating each SVG page, Executor MUST `read_file <project_path>/spec_lock.md`. All colors / fonts / icons / images MUST come from this file — no values from memory or invented on the fly. Executor MUST also look up the confirmed `pptx_structure.template_adherence` when present, the current page's `page_rhythm` (`anchor` / `dense` / `breathing`), `page_layouts` (which template SVG to inherit, if any), `page_charts` (which chart template to adapt, if any), and — when `pptx_structure.mode` is `template` or `preserve` — `pptx_layouts` (which native PowerPoint layout the page references). Empty / absent `page_layouts` rows are intentional only for adaptive/free design; strict template use requires one per page — see executor-base.md §2.1. This rule exists to resist context-compression drift on long decks and to break the uniform "every page is a card grid" default> 9. **SVG MUST BE HAND-WRITTEN, NOT SCRIPT-GENERATED** — Every SVG page is written by the main agent directly, one page at a time (see rules 6 and 7). Writing or running a Python / Node / shell script that produces the SVG files in batch — looping over pages, templating from data, or emitting them via a generator — is FORBIDDEN, including under "save tokens", "quick draft", or "user is in a hurry" pretexts. The script-generation path was tried on a feature branch and abandoned: cross-page visual consistency depends on per-page authoring with full upstream context, which a generator script cannot reproduce> 10. **FOLLOW DETERMINISTIC ROUTING RULES** — Do not add blocking routing questions when this skill defines a route. If the user request violates a route precondition, state the required prerequisite and stop that route instead of asking the user to choose around the rule. Ordinary finite options, stylistic preferences, and recoverable details are surfaced with a recommended value plus alternatives at the next existing confirmation gate.@@ -265,6 +265,8 @@ The same split applies to all three kinds — bitmaps always land in `images/`,If the selected structure owner ships `native_structure.json` + `source_template.pptx`, keep the pair together in `<project>/templates/`. During fusion, only the winning **structure segment** may contribute this pair: a layout override without a native pair removes a deck's pair, while a brand-only identity override leaves it intact. Never mix one template's contract with another template's source package.+The pair is retained capability, not an automatic generation route. The Strategist confirmation stage decides whether the selected template is used `strict` (every page follows the SVG roster; compatible native structure may use `preserve`) or `adaptive` (template SVGs are optional page references; native export stays `baseline`). Its mere presence must never force `preserve`.+#### Multi-path fusionWhen the user gives two or more paths of **different kinds**, Step 3 fuses them into a single `<project>/templates/design_spec.md`. **Default granularity is segment-level integer replacement** — entire identity / structure / middle segments are taken from the highest-priority source for that segment, no implicit field-level mixing.@@ -318,6 +320,8 @@ When fusion happens (any multi-path case), the resulting `<project>/templates/deSingle-path Step 3 does **not** add provenance (the source is self-evident from the copied files).+The fused frontmatter `kind` describes the resulting bundle: `deck` when both identity and structure are present, `layout` when only structure is present, and `brand` when only identity is present. Keep this field accurate; the Strategist confirmation server uses it to show template adherence only for bundles that actually own page structure.+**✅ Checkpoint — Default path proceeds to Step 4 without user interaction. If the user supplied one or more explicit template paths, those have been dispatched (or fused) into `<project_path>/templates/` before advancing.**---@@ -347,16 +351,17 @@ Read references/strategist.md2. Page count range3. Target audience4. Style objective-5. Color scheme-6. Icon usage approach-7. Typography plan, including formula rendering policy-8. Image usage approach+5. Template adherence — `strict` / `adaptive` (only when Step 3 loaded a deck/layout template)+6. Color scheme+7. Icon usage approach+8. Typography plan, including formula rendering policy+9. Image usage approach**Confirm UI Auto-Launch (Mandatory — default visual confirmation surface)**: by default the Strategist confirmation stage is presented through an interactive local page in **three stages within one browser session** — Stage 1 confirms the direction anchors; the AI then re-derives the design-system layer from the **user's actual** anchors; Stage 2 confirms that layer; the AI then re-derives image and execution choices from the confirmed direction + design system; Stage 3 confirms the final operational layer. Color swatches, live font previews, icon samples, image-style reference previews, and candidate picks appear where they help judgment; the chat path is the always-valid fallback. [`scripts/docs/confirm_ui.md`](scripts/docs/confirm_ui.md) owns the schema, server lifecycle, port strategy, and fallback details; this section keeps the orchestration contract. The split:| Stage | Confirms | Driven by ||---|---|---|-| **1 — direction anchors** | canvas · audience + core message + `content_divergence` + `delivery_purpose` *(PPT only — omitted on non-PPT canvases)* (all §c key info) · `mode` + `visual_style` | the source + user intent |+| **1 — direction anchors** | canvas · audience + core message + `content_divergence` + `delivery_purpose` *(PPT only — omitted on non-PPT canvases)* (all §c key info) · `mode` + `visual_style` · `template_adherence` *(only when Step 3 loaded a deck/layout template)* | the source + user intent || **2 — design system** (re-derived from Stage 1) | page count · color · typography (font + size) · icons · formula policy | the confirmed Stage 1 || **3 — images / execution** (re-derived from Stage 1 + Stage 2) | image usage · generated-image style · AI-image generation path · generation mode · refine-spec toggle | the confirmed direction + design system |@@ -366,7 +371,7 @@ Steps:> ⛔ **Steps 2 → 3 → 4 are ONE uninterrupted run — do NOT yield to the user mid-flow.** When an intermediate `--wait` returns, the AI **immediately and autonomously** re-derives and writes the next stage in the **same turn**: do **not** summarize, ask a question, report progress, or end the turn in between. The browser is sitting on a "deriving…" spinner polling for the next stage you must write — stopping here strands the page and the user must prod you in chat to finish (a bug, not the intended flow). **Stage-1 and Stage-2 confirmations are intermediate machine handoffs, not stopping points.** The single ⛔ BLOCKING wait is the **final** confirmation at the end of step 4. (Chat-fallback path — only when the page never opened — is the exception: there you do present each stage in chat and wait for a reply.)-1. **Write Stage 1** to `<project_path>/confirm_ui/recommendations.json` with `"stage": "stage1"` and only the anchor fields. New recommendations MUST use the canonical `stage` selector. Enumerable anchors (`canvas` / `mode` / `visual_style` / `delivery_purpose`) name a recommended canonical `id` in a `recommend` block (the page lists common options from `confirm_ui/static/catalogs.json`); `visual_style` also carries the ≥3-style `visual_style_spectrum` (safe / shifted / bold — same hard rule as h.5). `audience` and `content_divergence` are plain `{ "value": "<free text>" }`. `content_divergence` is the **free-text** field shown under audience in §c — how closely to follow the source vs how freely to reshape it (blank = balanced; facts stay sourced at every level); it is consumed by Strategist when authoring `§IX`, recorded in `design_spec.md §I`, carries no page-count coupling, and is **not** written to `spec_lock.md`. Set `lang` to the page language (`zh` / `en` / `ja`); visible text matches `lang`, or provide multilingual `name_zh` / `name_en` / `name_ja` + `note_zh` / `note_en` / `note_ja` — when the user's language is Japanese, set `lang: "ja"` and always include the `_ja` variants (labels resolve in the page language first — a `ja` page falls back ja → en → zh, so missing `_ja` labels silently render in English; zh/en pages keep their zh↔en fallback and only try `_ja` last).+1. **Write Stage 1** to `<project_path>/confirm_ui/recommendations.json` with `"stage": "stage1"` and only the anchor fields. New recommendations MUST use the canonical `stage` selector. Enumerable anchors (`canvas` / `mode` / `visual_style` / `delivery_purpose`) name a recommended canonical `id` in a `recommend` block (the page lists common options from `confirm_ui/static/catalogs.json`); `visual_style` also carries the ≥3-style `visual_style_spectrum` (safe / shifted / bold — same hard rule as h.5). When Step 3 loaded a deck/layout template, also set `recommend.template_adherence` to `strict` or `adaptive`; omit the field entirely for free design and brand-only templates so the page does not display it. `audience` and `content_divergence` are plain `{ "value": "<free text>" }`. `content_divergence` is the **free-text** field shown under audience in §c — how closely to follow the source vs how freely to reshape it (blank = balanced; facts stay sourced at every level); it is consumed by Strategist when authoring `§IX`, recorded in `design_spec.md §I`, carries no page-count coupling, and is **not** written to `spec_lock.md`. Set `lang` to the page language (`zh` / `en` / `ja`); visible text matches `lang`, or provide multilingual `name_zh` / `name_en` / `name_ja` + `note_zh` / `note_en` / `note_ja` — when the user's language is Japanese, set `lang: "ja"` and always include the `_ja` variants (labels resolve in the page language first — a `ja` page falls back ja → en → zh, so missing `_ja` labels silently render in English; zh/en pages keep their zh↔en fallback and only try `_ja` last).2. **Launch + wait for Stage 1.** Background launch; the parent returns when the page writes the stage-1 `result.json`. **Long tool timeout — 600000 ms** (the `--wait` ≈590 s budget):```bashpython3 ${SKILL_DIR}/scripts/confirm_ui/server.py <project_path> --daemon --wait@@ -701,7 +706,10 @@ python3 ${SKILL_DIR}/scripts/svg_to_pptx.py <project_path>> **Preserved source-template export** — a reusable template package created> from a structured PPTX may ship `native_structure.json` plus-> `source_template.pptx`. Set `pptx_structure.mode: preserve`, add project-relative+> `source_template.pptx`. This pair records a reusable capability; it does not+> select the downstream route by itself. Only a confirmed+> `template_adherence: strict` deck may set `pptx_structure.mode: preserve`.+> Add project-relative> `source_template` / `native_structure` rows, and map every page in> `pptx_layouts` to an exact imported layout key/name. Native export verifies the> source SHA-256 and package parts, creates the generated slides against the@@ -709,6 +717,13 @@ python3 ${SKILL_DIR}/scripts/svg_to_pptx.py <project_path>> copies of inherited master/layout visuals, and binds slide content to the> original placeholder type/index. Preserve mode keeps the source layout picker> roster; it does not prune unused source layouts.+>+> A confirmed `template_adherence: adaptive` deck continues to use the created+> template SVG roster as optional visual/layout references and exports through+> `baseline`, even when the template directory contains the native pair. Pages+> without a `page_layouts` row remain free design; the baseline post-pass owns+> conservative Master/background/chrome extraction exactly as it does without a+> template.> **Explicit reusable template export** — set `spec_lock.md`> `pptx_structure.mode: template` (or pass `--pptx-structure template`diff --git a/skills/ppt-master/references/executor-base.md b/skills/ppt-master/references/executor-base.mdindex 65c3b12e..7739b094 100644--- a/skills/ppt-master/references/executor-base.md+++ b/skills/ppt-master/references/executor-base.md@@ -96,9 +96,11 @@ Before generating each page, output which template is used:`page_layouts` selects an SVG design reference; `pptx_layouts` declares the native PowerPoint layout produced at export. They are independent contracts.+`pptx_structure.template_adherence` records the Strategist's confirmed template-use policy. `strict` requires one real `page_layouts` roster entry for every page; `adaptive` permits missing rows and keeps native export on `baseline` even when the template directory contains `native_structure.json` + `source_template.pptx`.+| `pptx_structure.mode` | Executor behavior ||---|---|-| `baseline` or missing | Author ordinary SVG pages. Do not add explicit PPTX structure metadata merely because a page uses a visual template. |+| `baseline` or missing | Author ordinary SVG pages. Do not add explicit PPTX structure metadata merely because a page uses a visual template or its directory carries a native structure pair. || `template` | Every generated SVG MUST implement the matching `pptx_layouts` row and the explicit structure contract below. || `preserve` | Every generated SVG MUST use the locked source layout key/name. Keep inherited master/layout visuals as marked preview layers; export removes the previews and reuses the original source package parts. |@@ -175,11 +177,12 @@ Before drawing each page, look up its entry in `page_rhythm` (key format `P<NN>`Before drawing each page, look up its entry in `page_layouts` to decide which basename to inherit (the SVG itself was loaded in §1.0):-- Entry present (e.g., `P04: 03a_content_image_text`) → inherit the corresponding SVG already in context. The basename **must match** an actual file in the chosen template directory; if it doesn't, emit `warning: page_layouts P<NN> references missing file <basename>.svg — falling back to free design` and proceed.-- No entry for this page → free design, no inheritance. **Not an error** — Strategist intentionally left this page free.+- Entry present (e.g., `P04: 03a_content_image_text`) → inherit the corresponding SVG already in context. The basename **must match** an actual file in the chosen template directory. If it does not, `adaptive` emits `warning: page_layouts P<NN> references missing file <basename>.svg — falling back to free design`; `strict` stops and reports the invalid mapping.+- No entry for this page with `template_adherence: adaptive` (or no adherence row) → free design, no inheritance. **Not an error** — Strategist intentionally left this page free.+- No entry for this page with `template_adherence: strict` → stop before drawing and report the missing Strategist mapping; strict template use cannot silently fall back to free design.- Whole section absent → see §1 fallback (legacy page-type matching).-Do **not** invent a layout entry, and do **not** assume a template just because `templates/` exists — if `page_layouts` is present but silent for this page, that silence is the instruction.+Do **not** invent a layout entry, and do **not** assume a template just because `templates/` exists. In `adaptive` mode, a silent `page_layouts` row is the instruction to design freely; in `strict` mode, silence is an upstream contract error.**Per-page PowerPoint layout lookup — `pptx_layouts` section**:diff --git a/skills/ppt-master/references/shared-standards.md b/skills/ppt-master/references/shared-standards.mdindex 49d370ba..834d9270 100644--- a/skills/ppt-master/references/shared-standards.md+++ b/skills/ppt-master/references/shared-standards.md@@ -999,7 +999,7 @@ PowerPoint placeholder.### Preserved Source Master / Layout Contract-**Trigger**: A reusable template package ships `native_structure.json` and `source_template.pptx`, and `spec_lock.md` sets `pptx_structure.mode: preserve` with project-relative paths to both files.+**Trigger**: A reusable template package ships `native_structure.json` and `source_template.pptx`, the Strategist-confirmed `template_adherence` is `strict`, and `spec_lock.md` sets `pptx_structure.mode: preserve` with project-relative paths to both files. The pair's presence alone is not a trigger; `adaptive` template use stays on `baseline`.| Artifact | Authority ||---|---|diff --git a/skills/ppt-master/references/strategist.md b/skills/ppt-master/references/strategist.mdindex a7326c3c..815ab6b2 100644--- a/skills/ppt-master/references/strategist.md+++ b/skills/ppt-master/references/strategist.md@@ -28,7 +28,7 @@ As a top-tier AI presentation strategist, receive source documents, perform cont| Stage | Items | Role ||---|---|---|-| **1 — direction anchors** | `a` canvas · `c` key info — audience + `content_divergence` + **delivery purpose** *(PPT only)* (promoted out of `g`) · `d` mode + visual_style | confirmed first |+| **1 — direction anchors** | `a` canvas · `c` key info — audience + `content_divergence` + **delivery purpose** *(PPT only)* (promoted out of `g`) · `d` mode + visual_style · template adherence *(only when Step 3 loaded a deck/layout template)* | confirmed first || **2 — design system** (re-derived from the user's *actual* Stage 1) | `b` page count · `e` color · `f` icon · `g` typography (font + size, formula policy) | derived from Stage 1 || **3 — images / execution** (re-derived from the user's *actual* Stage 1 + Stage 2) | `h` image source + generated-image style · generation mode · refine-spec toggle | derived from confirmed direction + design system |@@ -102,6 +102,17 @@ Write the locked value to `spec_lock.md` `- visual_style:` and the rationale to**Native template contract**: When `<project_path>/templates/native_structure.json` exists, read it before assigning page layouts. It is the factual source for PowerPoint layout keys/names, parent masters, and placeholder identities; the template SVG roster remains the visual/content-fit source.+**Template adherence confirmation**: Surface this closed Stage-1 choice only when Step 3 loaded a `kind: deck` or `kind: layout` template. Omit it for free design and brand-only templates.++| Value | Planning and export behavior |+|---|---|+| `strict` | Map every generated page to one actual template SVG in `page_layouts`. When the selected structure segment also ships a validated native pair, use `pptx_structure.mode: preserve` and map every page to that SVG's exact source layout key/name. |+| `adaptive` | Treat the template roster as optional visual/layout references. Write `page_layouts` only where a roster page fits; leave other pages free. Keep `pptx_structure.mode: baseline` even when the native pair exists. |++**Default — adaptive (may override when the user requests exact template use)**: Recommend `adaptive` when the user supplied only a template path with no stricter instruction. Preselect `strict` when the user explicitly asks to follow or preserve the template closely; the Stage-1 confirmation still records the final choice. Record the confirmed value in `design_spec.md §I` and as `template_adherence` under `spec_lock.md pptx_structure`.++> Note: `content_divergence` controls how source material is reorganized; `template_adherence` controls how template visuals/layouts are used. Never infer one from the other.+**Downstream effect**: e / f / g / h realize the locked mode + visual style. Example: `showcase` + `dark-tech` → e applies one luminous accent on a dark field; g pairs a clean sans with mono; f minimal glow icons; h the `digital-dashboard` rendering.### e. Color Scheme Recommendation@@ -841,9 +852,9 @@ This is what makes the axis meaningful: a `presentation` deck and a `text` deck- **Cover impact is mandatory**: Page `P01` is the deck's first visual contract, not a generic title slide. In `design_spec.md §IX`, add a `Cover impact` line for `P01` that names one concrete hook and one concrete composition strategy. Use the source's strongest available signal: a provocative core claim, object / scene metaphor, hero number, founder / product / audience moment, or a distilled conflict. Pair it with one concrete composition strategy — such as `full-bleed image + floating title`, `typographic poster`, `hero object`, `data hook`, `editorial scene`, `high-contrast abstract geometry`, or a fresh composition the deck's subject suggests (these are starting points, not the allowed set). If no external or AI image is available, still specify a native-SVG visual hook; do not fall back to "title + subtitle + decorative background". (Beautify / template-fill keep the source cover verbatim — this rule does not apply on those preservation paths.)- **Cover rhythm lock**: `P01` remains `anchor` in `spec_lock.md page_rhythm`, but its §IX `Cover impact` must prevent content-page patterns. Do not plan multi-card grids, agenda-like bullets, or equal-weight columns on the cover unless a template explicitly requires that structure, or a preservation path (beautify / template-fill) is transcribing the source cover verbatim.- **Closing impact (only when the deck closes)**: the deck's last page is its final visual contract — the strongest impression after the cover. When the deck genuinely lands on a conclusion / call-to-action / final-takeaway page, give it a `Closing impact` line in §IX: name the one thing the audience should leave with (a distilled takeaway, a forward call, a memorable restatement of the core claim) + one composition that delivers it — never a generic "Thank you" / contact-only slide or a centered-title reprise of the cover. **Do NOT invent a closing page to satisfy this** — the filler-page ban above still holds; apply it only to the page where the deck actually resolves. Same exemptions as the cover: skip on template / beautify / template-fill preservation paths.- - **pptx_structure is mandatory**: Write `mode: baseline` by default. Use `mode: preserve` when the selected template structure segment ships both `templates/native_structure.json` and `templates/source_template.pptx`; add project-relative `source_template` and `native_structure` rows exactly as shown in `spec_lock_reference.md`. Use `mode: template` only when the user explicitly requests a reusable PowerPoint Master/Layout/Placeholder deliverable and no preserved native pair owns the structure. Do not choose `flat`; it is a CLI-only diagnostic override.+ - **pptx_structure is mandatory**: Write `mode: baseline` by default. When a deck/layout template was confirmed, also write `template_adherence: strict|adaptive`. Use `mode: preserve` only when adherence is `strict` and the selected template structure segment ships both `templates/native_structure.json` and `templates/source_template.pptx`; add project-relative `source_template` and `native_structure` rows exactly as shown in `spec_lock_reference.md`. `adaptive` always stays on `baseline`, regardless of whether the pair exists. Use `mode: template` only when the user explicitly requests a reusable PowerPoint Master/Layout/Placeholder deliverable and no preserved native pair owns the structure. Do not choose `flat`; it is a CLI-only diagnostic override.- **pptx_layouts (template/preserve structure)**: When `pptx_structure.mode` is `template` or `preserve`, write one `P<NN>: <layout_key> | <PowerPoint layout name>` row for every page. In preserve mode, take the exact key/name from the chosen template SVG root and verify it exists in `native_structure.json`; never rename source layouts. In template mode, reuse a layout key when pages share the same static layout layer and placeholder contract; page content differences do not justify new keys. One-off cover/section layouts are valid. Omit the whole section in baseline mode.- - **page_layouts (write only when a template is in use)**: For each page that inherits a template SVG, add `P<NN>: <svg_basename>` (e.g., `P04: 03a_content_image_text`). Pages designed freely get **no entry** — Executor reads the absence as "free design, no inheritance". If zero pages use a template, omit the section entirely.+ - **page_layouts (write only when a template is in use)**: For each page that inherits a template SVG, add `P<NN>: <svg_basename>` (e.g., `P04: 03a_content_image_text`). With `template_adherence: strict`, every generated page requires a row and the basename must exist in the selected roster. With `adaptive`, pages designed freely get **no entry** — Executor reads the absence as "free design, no inheritance". If zero pages use a template, omit the section entirely.- **page_charts (write only for chart pages that match a catalog template)**: For each page in `design_spec.md §VII` whose `reference template path` points to `templates/charts/<name>.svg`, add `P<NN>: <chart_name>`. Pages with `no-template-match` in §VII MUST NOT appear here (Executor would look for a non-existent reference). If the deck has no data-visualization pages, omit the section.- **Hard rule**: Use both `page_layouts` and `page_charts` for the same page only when the layout template is a compatible shell for the chart. Do not pair chart pages with conflicting page layouts (e.g., `waterfall_chart` + timeline layout, KPI cards + circle-diagram layout). If no compatible layout exists, omit the page from `page_layouts`.diff --git a/skills/ppt-master/references/template-designer.md b/skills/ppt-master/references/template-designer.mdindex 54725414..52f6e7de 100644--- a/skills/ppt-master/references/template-designer.md+++ b/skills/ppt-master/references/template-designer.md@@ -18,7 +18,7 @@ When the workflow provides a PPTX reference source, the effective input package- finalized template brief- `manifest.json` — single source of truth (slide size, theme, per-master themes, assets, asset map, placeholders, layouts, masters, slides, SVG file paths, page-type candidates)-- `native_structure.json` — stable source master/layout keys, picker names, parent-master relationships, placeholder type/index/geometry, source hash, and preserve-vs-rebuild recommendation+- `native_structure.json` — stable source master/layout keys, picker names, parent-master relationships, placeholder type/index/geometry, source hash, and template-packaging preserve-vs-rebuild recommendation- `source_template.pptx` — byte-preserved source package paired with `native_structure.json`- `summary.md` — short orientation digest derived from manifest.json- exported `assets/`@@ -37,7 +37,7 @@ PPTX import interpretation:Input priority for PPTX-backed template creation:1. `manifest.json` for all factual metadata (theme, assets, unique layout/master structure, slide reuse, page-type guidance)-2. `native_structure.json` for native PowerPoint identities, source placeholder indices, relationship completeness, and the confirmed structure strategy+2. `native_structure.json` for native PowerPoint identities, source placeholder indices, relationship completeness, and the confirmed template-packaging strategy3. `svg/master_*.svg` + `svg/layout_*.svg` — the **primary source for the deck's shared visual language**: backgrounds, page chrome, decorative bars, recurring brand motifs. These are what the new template's fixed structure should adopt or reinterpret. Read these before any slide SVG.4. `svg/inheritance.json` for confirming which slide uses which layout / master5. exported `assets/` for reusable visual resources@@ -45,15 +45,17 @@ Input priority for PPTX-backed template creation:7. `summary.md` only as a fast scan; never as the canonical fact source8. screenshots / original PPTX only for style verification-**Native structure strategy**:+**Native structure packaging strategy**:| Confirmed value | Output behavior ||---|---|-| `preserve` | Copy `native_structure.json` and `source_template.pptx` unchanged. Bind every template SVG to one source layout key/name and source placeholder identities. |+| `preserve` | Copy `native_structure.json` and `source_template.pptx` unchanged. Bind every template SVG to one source layout key/name and source placeholder identities. This retains a downstream strict-use capability; it does not force every project to activate it. || `template` | Do not ship the source pair. Reconstruct one master plus semantic layouts through explicit SVG structure metadata. |Mirror replication cannot use `preserve`: flat SVGs no longer identify which pixels belong to the source master/layout.+**Downstream boundary**: The Strategist confirmation stage selects `strict` or `adaptive` when a project consumes this package. `strict` may activate the preserved pair; `adaptive` uses selected template SVGs as references and exports through baseline. Template_Designer does not preselect that project-level choice.+---## Page Roster@@ -150,7 +152,8 @@ source_canvas_width: 1280source_canvas_height: 720source_viewbox: "0 0 1280 720"replication_mode: standard | fidelity | mirror-# Type-A preserve strategy only; omit these rows for rebuilt templates.+# Type-A native retention capability only; omit these rows for rebuilt templates.+# Downstream strict/adaptive use is confirmed by Strategist.# native_structure_mode: preserve# native_structure: native_structure.json# source_template: source_template.pptx@@ -408,7 +411,7 @@ If the template is based on PPTX import output, briefly note:If suitable template resources already exist, use them directly instead of generating new ones:-1. **Copy template**: copy the spec + template SVGs and optional native structure pair into the project's `templates/`, and any bundled bitmaps into the project's `images/` (the runtime image pool, referenced as `../images/`)+1. **Copy template**: copy the spec + template SVGs and optional native structure pair into the project's `templates/`, and any bundled bitmaps into the project's `images/` (the runtime image pool, referenced as `../images/`). The pair remains optional capability until Strategist confirms strict template adherence.2. **Adjust colors**: Modify colors per the project design spec3. **Customize**: Make project-specific adjustments@@ -442,6 +445,6 @@ templates/- [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 (standard / fidelity); mirror SVGs contain **no** `{{}}` markers-- [x] Native structure strategy applied: preserve pair + source bindings, or explicit rebuilt structure+- [x] Native structure packaging strategy applied: preserve pair + source bindings, or explicit rebuilt structure; downstream strict/adaptive choice remains unforced- [ ] **Next step**: Validate assets and register the template via `register_template.py <id> --kind <deck|layout>````diff --git a/skills/ppt-master/scripts/README.md b/skills/ppt-master/scripts/README.mdindex f2e7b6bd..ccc8d0b7 100644--- a/skills/ppt-master/scripts/README.md+++ b/skills/ppt-master/scripts/README.md@@ -120,7 +120,7 @@ When `spec_lock.md` has no `pptx_structure` section, native `svg_to_pptx.py` falUse template structure only when the final slide SVGs explicitly declare reusable PowerPoint structure. The CLI reads `spec_lock.md` `pptx_structure.mode` when `--pptx-structure` is omitted, so a locked `template` project exports structurally through the standard command; an explicit CLI value still overrides the lock. Each SVG names its layout with `data-pptx-layout`; direct root children may opt into master/layout layers with `data-pptx-layer`, and supported text, picture, chart, table, footer, or slide-number elements may declare `data-pptx-placeholder`. The exporter validates the project-level `pptx_layouts` mapping and cross-slide consistency, creates one reusable layout per layout key, and keeps actual content slide-local. A direct full-canvas solid rect becomes a real Master/Layout/Slide `p:bg` according to its declared scope; an unmarked full-canvas solid rect is a Slide override. It never infers placeholders from visual similarity. The complete metadata contract lives in [`references/shared-standards.md`](../references/shared-standards.md#explicit-pptx-master--layout--placeholder-metadata-template-export).-Use preserved structure when `create-template` produced `native_structure.json` plus `source_template.pptx`. Lock `pptx_structure.mode: preserve`, point the lock at both project-relative files, and map every page to an exact imported layout key/name. The exporter verifies the source hash and package parts, keeps the source master/layout/theme roster (including multiple source masters), removes SVG preview copies of inherited layers, and binds generated slide content back to source placeholder indices. Preserve mode does not prune unused source layouts.+`create-template` may retain `native_structure.json` plus `source_template.pptx` as an optional native capability. Their presence does not select the export route. When Strategist confirms `template_adherence: strict`, lock `pptx_structure.mode: preserve`, point the lock at both project-relative files, and map every page to an exact imported layout key/name. The exporter verifies the source hash and package parts, keeps the source master/layout/theme roster (including multiple source masters), removes SVG preview copies of inherited layers, and binds generated slide content back to source placeholder indices. Preserve mode does not prune unused source layouts. With `template_adherence: adaptive`, keep `pptx_structure.mode: baseline`; template SVGs remain optional page references and free pages remain slide-local.`pptx_to_svg.py` annotates supported unmerged tables and conservative classic-chart caches with `data-pptx-native` metadata. Source table-style inheritance, supported solid cell fills/basic text formatting, chart title/legend/axis titles, and plot-level data-label flags for area/bar/column/line charts are retained when the current schema can represent them. Tables with direct borders, non-solid fills, or mixed rich-text formatting remain fallback-only, as do charts with unsupported label scopes/types, custom axis semantics, trendlines/error bars, or subtype options. Unsupported tables keep their rendered SVG table; unsupported charts keep a baked preview or explicit placeholder. Both carry `data-pptx-native-status`, which `svg_quality_checker.py` and `svg_to_pptx.py --native-objects` report as a warning.diff --git a/skills/ppt-master/scripts/confirm_ui/server.py b/skills/ppt-master/scripts/confirm_ui/server.pyindex 6e257e4e..ea8d8c8e 100644--- a/skills/ppt-master/scripts/confirm_ui/server.py+++ b/skills/ppt-master/scripts/confirm_ui/server.py@@ -460,11 +460,36 @@ def _sync_session_state(# browser STATE — lost on a refresh. Folding them from result.json into the# served recommendations lets a refresh / reopen re-initialize from the user's# actual choices instead of catalog defaults.-_ANCHOR_RECOMMEND_KEYS = ('canvas', 'mode', 'visual_style', 'delivery_purpose')+_ANCHOR_RECOMMEND_KEYS = (+ 'canvas',+ 'mode',+ 'visual_style',+ 'delivery_purpose',+ 'template_adherence',+)_ANCHOR_VALUE_KEYS = ('audience', 'content_divergence')_DESIGN_RECOMMEND_KEYS = ('icons', 'formula_policy')+def _template_adherence_enabled(project_path: Path) -> bool:+ """Return whether Step 3 loaded a deck/layout template into the project."""+ spec_path = project_path / 'templates' / 'design_spec.md'+ try:+ lines = spec_path.read_text(encoding='utf-8').splitlines()+ except OSError:+ return False+ if not lines or lines[0].strip() != '---':+ return False+ for line in lines[1:]:+ stripped = line.strip()+ if stripped == '---':+ return False+ match = re.fullmatch(r'kind\s*:\s*["\']?(brand|layout|deck)["\']?', stripped)+ if match:+ return match.group(1) in {'layout', 'deck'}+ return False++def _merge_confirmed_choices(data: dict, result_file: Path) -> None:"""Fold already-confirmed choices into later-stage recommendations."""try:@@ -818,6 +843,17 @@ def create_app(# the user's choices instead of catalog defaults.if _recommendation_stage(data) >= 2 and result_file.exists():_merge_confirmed_choices(data, result_file)+ template_adherence_enabled = _template_adherence_enabled(project_path)+ data['_template_adherence_enabled'] = template_adherence_enabled+ recommend = data.get('recommend')+ if template_adherence_enabled:+ if not isinstance(recommend, dict):+ recommend = data['recommend'] = {}+ recommend.setdefault('template_adherence', 'adaptive')+ else:+ if isinstance(recommend, dict):+ recommend.pop('template_adherence', None)+ data.pop('template_adherence', None)# The page polls this endpoint after a stage-1 confirm until the AI# overwrites the file with the re-derived stage-2 recommendations, so it# must never be served from a cache.diff --git a/skills/ppt-master/scripts/confirm_ui/static/app.js b/skills/ppt-master/scripts/confirm_ui/static/app.jsindex 5f1457c2..11c224dd 100644--- a/skills/ppt-master/scripts/confirm_ui/static/app.js+++ b/skills/ppt-master/scripts/confirm_ui/static/app.js@@ -1,6 +1,6 @@/* PPT Master - Strategist confirmation stage UI- * Finite/enumerable fields (canvas, mode, visual style, icons, image usage,- * AI source, formula policy, generation mode) list ALL options from+ * Finite/enumerable fields (canvas, mode, visual style, template adherence,+ * icons, image usage, AI source, formula policy, generation mode) list ALL options from* /static/catalogs.json with the AI's recommendation marked. Open/generative* fields (color, typography, generated-image style) show >=3 AI candidates. Open fields also expose* Custom controls. On confirm the page saves result.json and closes.@@ -38,6 +38,7 @@sec_refine: "Refine spec first",sub_mode: "Narrative mode",sub_visual: "Visual style",+ sub_template_adherence: "Template adherence",sub_divergence: "Material divergence (how freely to reshape vs. stay close to the source)",placeholder_divergence: "In your words — e.g. \"stick closely to the document\" / \"freely restructure and expand within the source\". Leave blank for a balanced default.",custom: "Custom",@@ -149,6 +150,7 @@sec_refine: "先に設計仕様を精査",sub_mode: "ナラティブモード",sub_visual: "ビジュアルスタイル",+ sub_template_adherence: "テンプレートの適用方法",sub_divergence: "素材からの発散度(どこまで自由に再構成するか、原文に忠実か)",placeholder_divergence: "自分の言葉でどうぞ — 例:「文書に忠実に」「元素材の範囲内で自由に再構成・展開」。空欄ならバランス型になります。",custom: "カスタム",@@ -260,6 +262,7 @@sec_refine: "先精修设计规范",sub_mode: "叙事模式",sub_visual: "视觉风格",+ sub_template_adherence: "模板遵循方式",sub_divergence: "材料发散度(多大程度重塑,还是贴近源材料)",placeholder_divergence: "用你自己的话写,例如「严格贴着文档来」/「在源材料范围内自由重组并展开」。留空则按平衡处理。",custom: "自定义",@@ -719,6 +722,15 @@function recValue(field) {return (REC && REC.recommend && REC.recommend[field]) || legacyRecId(field);}++ function hasTemplateAdherence() {+ if (!REC) return false;+ if (typeof REC._template_adherence_enabled === "boolean") {+ return REC._template_adherence_enabled;+ }+ if (REC.recommend && REC.recommend.template_adherence != null) return true;+ return REC.template_adherence != null;+ }// Guaranteed recommendation: the AI's pick, or the first catalog option as a// fallback so an enumerable field ALWAYS shows a badged recommendation.function recOrFirst(field, list) {@@ -1054,6 +1066,15 @@function () { return STATE.visual_style; }, function (v) { STATE.visual_style = v; refreshDirectionPreview(); },{ allowCustom: true, spectrum: REC && REC.visual_style_spectrum });sec.appendChild(sub2);+ if (hasTemplateAdherence()) {+ var templateField = el("div", "subfield");+ templateField.appendChild(el("div", "subfield-label", t("sub_template_adherence")));+ enumField(templateField, CAT.template_adherence,+ recOrFirst("template_adherence", CAT.template_adherence),+ function () { return STATE.template_adherence; },+ function (v) { STATE.template_adherence = v; });+ sec.appendChild(templateField);+ }host.appendChild(sec);}@@ -2074,6 +2095,11 @@STATE.content_divergence = (REC.content_divergence && REC.content_divergence.value) || ""; // free text; blank = balanced defaultSTATE.mode = pick("mode", CAT.modes);STATE.visual_style = pick("visual_style", CAT.visual_styles);+ if (hasTemplateAdherence()) {+ STATE.template_adherence = pick("template_adherence", CAT.template_adherence);+ } else {+ delete STATE.template_adherence;+ }// Delivery purpose drives the PPT body px baseline; default balanced// (not the catalog-first id) when the Strategist did not recommend one.STATE.delivery_purpose = recId("delivery_purpose") || "balanced";@@ -2150,6 +2176,7 @@mode: STATE.mode,visual_style: STATE.visual_style};+ if (STATE.template_adherence) payload.template_adherence = STATE.template_adherence;// Delivery purpose is PPT-only and rendered only on PPT canvases (§c).if (isPptCanvas(STATE.canvas)) payload.delivery_purpose = STATE.delivery_purpose;return payload;@@ -2169,6 +2196,7 @@typography: STATE.typography,formula_policy: STATE.formula_policy};+ if (STATE.template_adherence) payload.template_adherence = STATE.template_adherence;if (isPptCanvas(STATE.canvas)) payload.delivery_purpose = STATE.delivery_purpose;normalizeTypographyForSubmit(payload);return payload;diff --git a/skills/ppt-master/scripts/confirm_ui/static/catalogs.json b/skills/ppt-master/scripts/confirm_ui/static/catalogs.jsonindex b62ed9d6..639ebe38 100644--- a/skills/ppt-master/scripts/confirm_ui/static/catalogs.json+++ b/skills/ppt-master/scripts/confirm_ui/static/catalogs.json@@ -555,6 +555,28 @@"label_ja": "分割モード"}],+ "template_adherence": [+ {+ "id": "adaptive",+ "label": "adaptive",+ "label_zh": "适应性使用",+ "label_en": "adaptive",+ "label_ja": "適応的に使用",+ "desc_zh": "沿用模板的视觉语言和合适版式,允许不适配的页面自由设计;原生结构文件不会强制整份演示使用 preserve。",+ "desc_en": "Reuse the template's visual language and suitable layouts while allowing unmatched pages to be designed freely; native structure files do not force preserve mode for the whole deck.",+ "desc_ja": "テンプレートのビジュアル言語と適合するレイアウトを再利用し、合わないページは自由に設計する。ネイティブ構造ファイルがあっても、デッキ全体に preserve を強制しない。"+ },+ {+ "id": "strict",+ "label": "strict",+ "label_zh": "严格套用",+ "label_en": "strict",+ "label_ja": "厳密に適用",+ "desc_zh": "每一页都从模板 SVG roster 选择版式;模板携带兼容的原生结构时,复用其 Master/Layout/Placeholder。",+ "desc_en": "Map every page to the template SVG roster; when the package carries compatible native structure, reuse its Master, Layout, and Placeholder contracts.",+ "desc_ja": "すべてのページをテンプレートSVG一覧へ割り当て、互換性のあるネイティブ構造が含まれる場合はMaster/Layout/Placeholderを再利用する。"+ }+ ],"delivery_purpose": [{"id": "text",diff --git a/skills/ppt-master/scripts/docs/confirm_ui.md b/skills/ppt-master/scripts/docs/confirm_ui.mdindex 8b1ef4a4..e99d3084 100644--- a/skills/ppt-master/scripts/docs/confirm_ui.md+++ b/skills/ppt-master/scripts/docs/confirm_ui.md@@ -1,6 +1,6 @@# Confirm UI — Strategist Confirmation Stage Page-> The interactive, visual surface for SKILL.md Step 4 (the Strategist confirmation stage). Enumerable fields list **all** options from a catalog with the AI's recommendation badged; generative fields (color, typography, generated-image style) show **≥3** AI candidates (creative recommendations always offer real choice — same rule as the h.5 image strategy; fewer only on the honest-shortfall exception, with a stated reason). Fields whose universe is open (canvas, mode, visual style, icons) also get a **Custom** box; image usage is a multi-select source list plus a free-text `image_notes` box. Fully closed fields (AI source when applicable, formula policy, generation mode, refine spec) do not. The AI writes its recommendation to `recommendations.json`; the user's final choices are written back to `result.json` for the AI to read. On confirm the page saves the result and shuts the server down (auto-close). The chat path is always a valid fallback — if the browser cannot open (remote / headless / web host), the AI presents the same staged confirmation in chat.+> The interactive, visual surface for SKILL.md Step 4 (the Strategist confirmation stage). Enumerable fields list **all** options from a catalog with the AI's recommendation badged; generative fields (color, typography, generated-image style) show **≥3** AI candidates (creative recommendations always offer real choice — same rule as the h.5 image strategy; fewer only on the honest-shortfall exception, with a stated reason). Fields whose universe is open (canvas, mode, visual style, icons) also get a **Custom** box; image usage is a multi-select source list plus a free-text `image_notes` box. Fully closed fields (template adherence when a deck/layout template is active, AI source when applicable, formula policy, generation mode, refine spec) do not. The AI writes its recommendation to `recommendations.json`; the user's final choices are written back to `result.json` for the AI to read. On confirm the page saves the result and shuts the server down (auto-close). The chat path is always a valid fallback — if the browser cannot open (remote / headless / web host), the AI presents the same staged confirmation in chat.## Authority and Scope@@ -40,6 +40,7 @@ python3 scripts/confirm_ui/server.py <project_path> --shutdown # Step 4 clean- Refuses to start unless `<project_path>/confirm_ui/recommendations.json` exists (except `--shutdown`, which needs no recommendations).- Per-project lock at `<project_path>/.confirm_ui.lock` — duplicate launches are refused; stale locks (dead pid) are overwritten.- Idle auto-shutdown after 900 s by default; `/api/shutdown` exits gracefully and releases the lock.+- `/api/recommendations` derives `_template_adherence_enabled` from `<project>/templates/design_spec.md` frontmatter. Only `kind: deck` / `kind: layout` enables the Stage-1 field; no template and `kind: brand` force it off even if a stale recommendation contains the key. When enabled but no recommendation was authored, the server supplies `adaptive` as the default recommendation.Dependency:@@ -52,16 +53,16 @@ pip install flask- **Enumerable + custom** — canvas / mode / visual_style / icons. The page lists common options from `static/catalogs.json`, badges the AI's recommendation, and still offers a Custom box for edge cases (custom canvas size, bespoke narrative mode, self-provided icon system, etc.). `visual_style` additionally honors an optional `visual_style_spectrum` that badges a 3-pick personality spectrum (safe / shifted / bold, each with a temperament tag + analogy) in place of the single recommendation — see the schema below.- **Visual examples for hard-to-name choices** — the full-screen confirmation page loads real SVG page samples from `static/style_previews/` for `visual_style`, and renders real sample SVGs from `templates/icons` for `icons`. These thumbnails make style and icon-library choices visually comparable before the user locks them. Preview copy is fixed role text (big title / section title / body / points), not project content from `recommendations.json`, so users compare visual treatment rather than copywriting. These previews are a confirmation aid only: they do not add fields to `recommendations.json` or `result.json`, and they do not replace the later Step 6 live preview.- **Image usage multi-select** — image sources are selected as one or more catalog ids: `ai` = AI-generated, `web` = Web-sourced, `provided` = User-provided, `placeholder` = Placeholder, `none` = No images. `none` is exclusive. Recommendation and result values may be a legacy single string, but new files should use an array. When several sources are recommended, write the source ids to `recommend.image_usage` and write the actual usage strategy to `image_notes`, not a custom prose value.-- **Closed enumerable** — formula policy / generation mode / refine spec, plus AI source only when image usage includes `ai`. These have no Custom box; out-of-catalog values snap back to the recommended option. Use pipeline vocabulary: icon ids are actual library ids such as `tabler-outline`, or `emoji` for system emoji.+- **Closed enumerable** — template adherence (conditional), formula policy / generation mode / refine spec, plus AI source only when image usage includes `ai`. These have no Custom box; out-of-catalog values snap back to the recommended option. Use pipeline vocabulary: icon ids are actual library ids such as `tabler-outline`, or `emoji` for system emoji.- **Generative (open)** — color, typography, generated-image style. No finite catalog; the AI authors **≥3 candidates** the page renders as cards (never a single option — creative fields must offer real choice; fewer than 3 only on the honest-shortfall exception). `page_count`, `audience`, and `content_divergence` are free inputs (`content_divergence` is a free-text intent shown under audience in §c, not a fixed-option field).-**Custom box** appears only on fields whose universe is genuinely open — `canvas`, `mode`, `visual_style`, and `icons`. Image usage uses a multi-select source list plus `image_notes` instead of a Custom box. Fully closed sets — `image_ai_path`, `formula_policy`, `generation_mode`, `refine_spec` — have **no** Custom box; an out-of-catalog value there is snapped back to the recommended option.+**Custom box** appears only on fields whose universe is genuinely open — `canvas`, `mode`, `visual_style`, and `icons`. Image usage uses a multi-select source list plus `image_notes` instead of a Custom box. Fully closed sets — `template_adherence`, `image_ai_path`, `formula_policy`, `generation_mode`, `refine_spec` — have **no** Custom box; an out-of-catalog value there is snapped back to the recommended option.`image_ai_path` is conditional: the page shows it and writes it to `result.json` only when `image_usage` includes `ai`. Web-sourced / User-provided / Placeholder / No images paths do not carry an AI backend choice.## Catalogs — `static/catalogs.json` (the finite option universe)-The front-end loads `/api/catalogs` (served by the confirm server) and falls back to the static `/static/catalogs.json` if that route is unavailable. `/api/catalogs` returns the static file **with the `canvas` list synced live from `config.py CANVAS_FORMATS`** — the set of formats and their `dim` come from config (single source of truth, zero drift), while trilingual labels / use text stay in catalogs.json (a plain fallback label is synthesized for any new id config adds). Keys: `canvas`, `modes`, `visual_styles` (grouped), `icons`, `image_usage`, `image_ai_path`, `formula_policy`, `generation_mode`, `delivery_purpose`. Each entry is `{ "id", "label", "label_zh", "label_en", "label_ja", ... }`; descriptions use `desc_zh` / `desc_en` / `desc_ja`, and `visual_styles` groups use `group_zh` / `group_en` / `group_ja`. The front-end falls back to legacy `label` / `desc` / `group`, so old catalogs still load, but new user-facing catalog text must cover all three languages (zh / en / ja). English labels should mirror canonical reference names (`pyramid`, `swiss-minimal`, `Path A`, `mixed`, etc.); Chinese and Japanese labels should be translated for users. Descriptions render inline after the option title, not as a separate selected-option line. `visual_styles` is `[{ "group", "group_zh", "group_en", "group_ja", "items": [...] }]`. For `canvas` you only need to maintain the trilingual labels in catalogs.json; the format set and dimensions are authoritative in `config.py CANVAS_FORMATS`.+The front-end loads `/api/catalogs` (served by the confirm server) and falls back to the static `/static/catalogs.json` if that route is unavailable. `/api/catalogs` returns the static file **with the `canvas` list synced live from `config.py CANVAS_FORMATS`** — the set of formats and their `dim` come from config (single source of truth, zero drift), while trilingual labels / use text stay in catalogs.json (a plain fallback label is synthesized for any new id config adds). Keys: `canvas`, `modes`, `visual_styles` (grouped), `template_adherence`, `icons`, `image_usage`, `image_ai_path`, `formula_policy`, `generation_mode`, `delivery_purpose`. Each entry is `{ "id", "label", "label_zh", "label_en", "label_ja", ... }`; descriptions use `desc_zh` / `desc_en` / `desc_ja`, and `visual_styles` groups use `group_zh` / `group_en` / `group_ja`. The front-end falls back to legacy `label` / `desc` / `group`, so old catalogs still load, but new user-facing catalog text must cover all three languages (zh / en / ja). English labels should mirror canonical reference names (`pyramid`, `swiss-minimal`, `Path A`, `mixed`, etc.); Chinese and Japanese labels should be translated for users. Descriptions render inline after the option title, not as a separate selected-option line. `visual_styles` is `[{ "group", "group_zh", "group_en", "group_ja", "items": [...] }]`. For `canvas` you only need to maintain the trilingual labels in catalogs.json; the format set and dimensions are authoritative in `config.py CANVAS_FORMATS`.## Round-trip data contract@@ -73,7 +74,7 @@ The page runs as a **three-stage wizard in one browser session**. `recommendatio| `recommendations.json stage` | Page renders | Button | On submit ||---|---|---|---|-| `"stage1"` | direction anchors — canvas, audience + `content_divergence` + `delivery_purpose` *(PPT only — omitted on non-PPT canvases, not written to the result)*, mode + visual_style | **Next** | writes `result.json` `{ stage: "stage1", status: "stage1-confirmed", <anchors> }`; the page does **not** close — it shows a "deriving…" state and polls `GET /api/recommendations` |+| `"stage1"` | direction anchors — canvas, audience + `content_divergence` + `delivery_purpose` *(PPT only — omitted on non-PPT canvases, not written to the result)*, mode + visual_style, plus `template_adherence` only when a deck/layout template is active | **Next** | writes `result.json` `{ stage: "stage1", status: "stage1-confirmed", <anchors> }`; the page does **not** close — it shows a "deriving…" state and polls `GET /api/recommendations` || `"stage2"` | design system — page count, color, icons, typography, formula policy | **Next** | writes `result.json` `{ stage: "stage2", status: "stage2-confirmed", <anchors + design system> }`; the page stays open and polls for Stage 3 || `"stage3"` | images and execution — image usage + generated-image style, generation mode, refine spec | **Confirm** | writes `result.json` `{ stage: "final", status: "confirmed", <all fields> }`, then shuts the page down || *(absent)* | legacy single-pass — every section on one page | **Confirm** | single final write (`status: "confirmed"`) — backward-compatible |@@ -90,6 +91,7 @@ The AI launches Stage 1 (`--daemon --wait`), reads the stage-1 result, **re-deri"canvas": "ppt169","mode": "pyramid","visual_style": "swiss-minimal",+ "template_adherence": "adaptive","icons": "tabler-outline","image_usage": ["ai", "provided"],"image_ai_path": "auto",@@ -151,6 +153,7 @@ The AI launches Stage 1 (`--daemon --wait`), reads the stage-1 result, **re-deri> Each `candidates` array above shows **one** entry for brevity — `color` and `typography` must each carry **≥3** in a real file, while `image_strategy.candidates` should carry **exactly 3 non-custom recommendation** entries when AI image generation is offered. The UI adds the fourth **Custom** card itself; `selected` indexes the recommended default among the recommendation entries.- `recommend.*` names the recommended `id` for each enumerable field (must match a `catalogs.json` id, or be a free string for a recommended custom value). The page badges and pre-selects it. **Guarantee**: if a `recommend.*` is omitted, the page falls back to the first catalog option so every enumerable field always shows one badged recommendation — but the AI should still set them for a meaningful default. Legacy aliases are accepted for old files (`line` → `tabler-outline`, `filled` → `tabler-filled`, `monochrome` → `chunk-filled`, `search` → `web`, `default` → `auto`, `builtin` → `host-native`), but new files should write canonical ids.+- `recommend.template_adherence` is conditional. Write `adaptive` or `strict` only when Step 3 loaded a `kind: deck` or `kind: layout` template. The server independently checks the copied template spec and enables the field only for those two kinds; free design and brand-only templates cannot display or return it. If the template is active but the recommendation key is missing, the server supplies `adaptive`. `adaptive` keeps native export on `baseline` and permits pages without `page_layouts`; `strict` requires every page to use the template roster and may activate a compatible preserved native pair.- `recommend.image_usage` should be an array of source ids when more than one source applies, e.g. `["ai", "provided"]`. A single string is still accepted for backward compatibility. Do not write bare `"custom"` and do not encode a mixed-source plan as prose here; write the prose to top-level `image_notes.value`.- `image_notes` is the initial strategy note shown under the image source chips. Use it for page-role guidance and constraints: which source applies where, what to avoid, which user assets are authoritative, how realistic / abstract the imagery should be, and what can remain as placeholders. It is intent guidance, not a separate finite option.- When `recommend.image_usage` includes `ai`, also set `recommend.image_ai_path` to one of `auto` / `api` / `host-native` / `manual`; the page presents these as explicit choices.@@ -176,6 +179,7 @@ The AI launches Stage 1 (`--daemon --wait`), reads the stage-1 result, **re-deri"content_divergence": "freely restructure and expand within the source","mode": "pyramid","visual_style": "swiss-minimal",+ "template_adherence": "adaptive","color": { "name": "...", "palette": { "background": "#...", "secondary_bg": "#...", "primary": "#...", "accent": "#...", "secondary_accent": "#...", "body_text": "#..." } },"icons": "tabler-outline","typography": { "name": "...", "heading": { "cjk": "...", "latin": "...", "css": "..." }, "body": { "cjk": "...", "latin": "...", "css": "..." }, "body_size": 24, "body_size_unit": "px", "sizes": { "title": 42, "subtitle": 32, "annotation": 18 } },diff --git a/skills/ppt-master/scripts/docs/svg-pipeline.md b/skills/ppt-master/scripts/docs/svg-pipeline.mdindex 3756a81b..d4e101ce 100644--- a/skills/ppt-master/scripts/docs/svg-pipeline.md+++ b/skills/ppt-master/scripts/docs/svg-pipeline.md@@ -63,7 +63,7 @@ Behavior:- For PPTX template-import workspaces, use `-s svg-flat` when you need a visual round-trip check. The layered `svg/` tree is the machine-readable template source and intentionally does not inline inherited master / layout decoration into each slide.- Native mode is strict about unsupported visual SVG elements: if a visual element cannot be represented or safely preserved, export fails with the SVG file, element tag, and position instead of silently dropping content.- Omitting `--pptx-structure` reads `spec_lock.md` `pptx_structure.mode`, then falls back to `baseline`; an explicit CLI value overrides the lock. Template mode builds reusable PowerPoint layouts only from explicit SVG metadata: root `data-pptx-layout`, direct-child `data-pptx-layer="master|layout"`, optional `data-pptx-layer="slide"` on a full-canvas solid background, and direct-child `data-pptx-placeholder`. It validates the per-page `pptx_layouts` lock plus cross-slide structure consistency and never infers layouts from visual similarity. Direct full-canvas solid rects compile to Master/Layout/Slide `p:bg` by scope; an unmarked one is a Slide override. Chart/table placeholders also require `--native-objects`. Full contract: [`shared-standards.md`](../../references/shared-standards.md#explicit-pptx-master--layout--placeholder-metadata-template-export).-- Preserve mode requires a `create-template` native pair (`native_structure.json` + `source_template.pptx`) declared in `spec_lock.md`. It verifies the source digest, binds each generated page to an imported layout part, retains the source master/layout/theme roster, removes preview-only inherited SVG layers, and restores source placeholder type/index identities. The SVG root still declares `data-pptx-layout`; repeated semantic placeholders may disambiguate with `data-pptx-placeholder-idx`.+- Preserve mode requires both a Strategist-confirmed `template_adherence: strict` and a `create-template` native pair (`native_structure.json` + `source_template.pptx`) declared in `spec_lock.md`. It verifies the source digest, binds each generated page to an imported layout part, retains the source master/layout/theme roster, removes preview-only inherited SVG layers, and restores source placeholder type/index identities. The SVG root still declares `data-pptx-layout`; repeated semantic placeholders may disambiguate with `data-pptx-placeholder-idx`. `template_adherence: adaptive` keeps export on baseline even when the pair is present.- Native output uses content-hash media filenames, so identical images are reused and different images cannot overwrite each other by sharing a basename.- `[Content_Types].xml` is generated from the actual media extensions written into the PPTX. Unknown media extensions fail unless Python's `mimetypes` can identify them.- Native export writes to a temporary file first and publishes the requested PPTX only after conversion succeeds. A failed conversion does not replace the main output file.diff --git a/skills/ppt-master/scripts/pptx_template_import.py b/skills/ppt-master/scripts/pptx_template_import.pyindex 6e40efc5..bd7e5db6 100644--- a/skills/ppt-master/scripts/pptx_template_import.py+++ b/skills/ppt-master/scripts/pptx_template_import.py@@ -135,9 +135,10 @@ def main() -> int:print("Native structure: native_structure.json")print("Preserved source package: source_template.pptx")print(- "Recommended structure mode: "+ "Recommended template packaging mode: "f"{native_structure['strategy']['recommendedMode']}")+ print("Downstream template adherence: Strategist-confirmed")print("Summary: summary.md")print(f"Assets exported: {len(manifest['assets']['allAssets'])}")print(f"Common assets: {len(manifest['assets']['commonAssets'])}")@@ -171,8 +172,9 @@ def main() -> int:print(f"Output directory: {output_dir}")if native_structure is not None:print(- "Native structure: "- f"{native_structure['strategy']['recommendedMode']} recommended"+ "Native structure packaging: "+ f"{native_structure['strategy']['recommendedMode']} recommended; "+ "downstream use is Strategist-confirmed")return 0diff --git a/skills/ppt-master/scripts/svg_quality_checker.py b/skills/ppt-master/scripts/svg_quality_checker.pyindex fe02b1af..30ec9892 100644--- a/skills/ppt-master/scripts/svg_quality_checker.py+++ b/skills/ppt-master/scripts/svg_quality_checker.py@@ -1464,6 +1464,37 @@ class SVGQualityChecker:self._pptx_structure_issues.append(('error', str(exc)))return+ if (+ structure_lock is not None+ and structure_lock.template_adherence == 'strict'+ and _parse_spec_lock is not None+ ):+ lock_path = project_path / 'spec_lock.md'+ lock = _parse_spec_lock(lock_path)+ page_layouts = lock.get('page_layouts', {})+ expected_pages = {f'P{index:02d}' for index in range(1, len(svg_files) + 1)}+ missing_pages = sorted(expected_pages - set(page_layouts))+ if missing_pages:+ self._pptx_structure_issues.append((+ 'error',+ 'spec_lock.md strict template_adherence requires page_layouts '+ 'rows for every generated page; missing: ' + ', '.join(missing_pages),+ ))+ template_dir = project_path / 'templates'+ template_svgs = {path.stem for path in template_dir.glob('*.svg')}+ missing_templates = sorted({+ value.strip().removesuffix('.svg')+ for page, value in page_layouts.items()+ if page in expected_pages+ and value.strip().removesuffix('.svg') not in template_svgs+ })+ if missing_templates:+ self._pptx_structure_issues.append((+ 'error',+ 'spec_lock.md strict template_adherence references missing '+ 'template SVG(s): ' + ', '.join(missing_templates),+ ))+structure_attrs = {'data-pptx-layer','data-pptx-layout',diff --git a/skills/ppt-master/scripts/svg_to_pptx/pptx_package/template_structure.py b/skills/ppt-master/scripts/svg_to_pptx/pptx_package/template_structure.pyindex 1fa928a5..ac753040 100644--- a/skills/ppt-master/scripts/svg_to_pptx/pptx_package/template_structure.py+++ b/skills/ppt-master/scripts/svg_to_pptx/pptx_package/template_structure.py@@ -52,6 +52,7 @@ _LAYOUT_KEY_RE = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$")_LOCK_ROW_RE = re.compile(r"^-\s+([A-Za-z0-9_]+)\s*:\s*(.+?)\s*$")_LOCK_PAGE_RE = re.compile(r"^P(\d+)$")PPTX_STRUCTURE_MODES = frozenset({"baseline", "template", "preserve", "flat"})+TEMPLATE_ADHERENCE_MODES = frozenset({"strict", "adaptive"})NATIVE_STRUCTURE_SCHEMA = "ppt-master.native-structure.v1"@@ -73,6 +74,7 @@ class PptxStructureLock:"""Optional project-level PPTX structure export policy."""mode: str+ template_adherence: str | None = Nonelayouts: tuple[PptxLayoutReference, ...] = ()source_template: Path | None = Nonenative_structure: Path | None = None@@ -314,6 +316,29 @@ def load_pptx_structure_lock(project_path: Path) -> PptxStructureLock | None:f"spec_lock.md pptx_structure.mode must be one of: {allowed}")+ adherence_rows = [+ value.strip().lower()+ for key, value in structure_rows+ if key == "template_adherence"+ ]+ if len(adherence_rows) > 1:+ raise TemplateStructureError(+ "spec_lock.md pptx_structure allows at most one "+ "'- template_adherence:' row"+ )+ template_adherence = adherence_rows[0] if adherence_rows else None+ if template_adherence and template_adherence not in TEMPLATE_ADHERENCE_MODES:+ allowed = ", ".join(sorted(TEMPLATE_ADHERENCE_MODES))+ raise TemplateStructureError(+ "spec_lock.md pptx_structure.template_adherence must be one of: "+ f"{allowed}"+ )+ if mode == "preserve" and template_adherence == "adaptive":+ raise TemplateStructureError(+ "spec_lock.md preserve mode requires template_adherence: strict; "+ "adaptive template use must export through baseline"+ )+source_rows = [value for key, value in structure_rows if key == "source_template"]@@ -389,6 +414,7 @@ def load_pptx_structure_lock(project_path: Path) -> PptxStructureLock | None:)return PptxStructureLock(mode=mode,+ template_adherence=template_adherence,layouts=tuple(sorted(references, key=lambda item: item.slide_num)),source_template=source_template,native_structure=native_structure,diff --git a/skills/ppt-master/scripts/template_import/native_structure.py b/skills/ppt-master/scripts/template_import/native_structure.pyindex acba23a7..f9003f56 100644--- a/skills/ppt-master/scripts/template_import/native_structure.py+++ b/skills/ppt-master/scripts/template_import/native_structure.py@@ -168,6 +168,8 @@ def build_native_structure("preservationEligible": complete_graph,"reusableStructureDetected": reusable_structure,"recommendedMode": recommended_mode,+ "recommendationScope": "template-packaging",+ "downstreamTemplateAdherence": "strategist-confirmed","hasMultipleMasters": len(masters) > 1,"reasonCodes": reasons,},diff --git a/skills/ppt-master/templates/design_spec_reference.md b/skills/ppt-master/templates/design_spec_reference.mdindex 86c8067a..8532fab7 100644--- a/skills/ppt-master/templates/design_spec_reference.md+++ b/skills/ppt-master/templates/design_spec_reference.md@@ -16,6 +16,7 @@| **Use Case** | [Filled by Strategist] || **Delivery Purpose** | [`text` read-close / `balanced` business / `presentation` — confirmed at c; a deck-wide consumption mode that drives per-page density, page-count recommendation, page_rhythm lean, and the body baseline (px). See strategist.md §6.1.] || **Content Strategy** | [Material divergence — the user's free-text intent on how closely to follow the source vs how freely to reshape it (or "balanced default"); facts stay sourced however free. Confirmed at c; consumed when authoring §IX. Not in spec_lock.] |+| **Template Adherence** | [`adaptive` / `strict` — include only when Step 3 loaded a deck/layout template; omit for free design and brand-only templates. Also written under `spec_lock.md pptx_structure`.] || **Created Date** | {date_str} |---diff --git a/skills/ppt-master/templates/spec_lock_reference.md b/skills/ppt-master/templates/spec_lock_reference.mdindex b52cc2d2..c9b71d8f 100644--- a/skills/ppt-master/templates/spec_lock_reference.md+++ b/skills/ppt-master/templates/spec_lock_reference.md@@ -125,14 +125,22 @@> One deck-wide native PowerPoint structure policy. New projects always include this section.>+> When Step 3 loaded a deck/layout template, add exactly one of:+> ```+> - template_adherence: adaptive+> - template_adherence: strict+> ```+> Omit the row for free design and brand-only templates. `adaptive` treats template SVGs as optional page references and always exports through `baseline`; `strict` requires one `page_layouts` row per page and may use `preserve` when the template carries a compatible native pair.+>> - `baseline` — default. Preserve the conservative shared Master/background/chrome behavior; no explicit reusable placeholder layouts are authored.> - `template` — use only when the user explicitly requests a reusable PowerPoint template/master/layout deliverable. Requires a complete `pptx_layouts` section and explicit SVG structure metadata on every generated page.-> - `preserve` — use when the selected reusable template ships `native_structure.json` + `source_template.pptx`. Add both project-relative rows below and map every page under `pptx_layouts`.+> - `preserve` — use only with `template_adherence: strict` when the selected reusable template ships `native_structure.json` + `source_template.pptx`. Add both project-relative rows below and map every page under `pptx_layouts`. `adaptive + preserve` is invalid.> - `flat` — diagnostic escape hatch. Do not lock this in a normal project; pass it on the CLI when comparing slide-local output.>> Preserve example:> ```> - mode: preserve+> - template_adherence: strict> - source_template: templates/source_template.pptx> - native_structure: templates/native_structure.json> ```diff --git a/skills/ppt-master/workflows/create-template.md b/skills/ppt-master/workflows/create-template.mdindex fac7c165..7ebca4cd 100644--- a/skills/ppt-master/workflows/create-template.md+++ b/skills/ppt-master/workflows/create-template.md@@ -66,7 +66,7 @@ python3 skills/ppt-master/scripts/pptx_template_import.py "<reference_template.pThis produces, in one workspace:- `manifest.json` — single source of truth: slide size, theme colors, fonts, per-master theme summaries, asset inventory, placeholder metadata, SVG file paths, per-slide / per-layout / per-master metadata, page-type candidates-- `native_structure.json` — portable machine contract: stable master/layout keys, source package parts, layout picker names, placeholder type/index/geometry, source hash, and a preserve-vs-rebuild recommendation+- `native_structure.json` — portable machine contract: stable master/layout keys, source package parts, layout picker names, placeholder type/index/geometry, source hash, and a template-packaging preserve-vs-rebuild recommendation- `source_template.pptx` — byte-preserved source package paired with `native_structure.json`; required for downstream `pptx_structure.mode: preserve`- `summary.md` — short human-readable digest derived from manifest.json (for quick scanning only)- `assets/` — extracted reusable image assets; `manifest.json` owns the asset-name mapping and SVG `href` values reuse that mapping@@ -115,7 +115,7 @@ The source SVGs in `<import_workspace>/svg/` / `<import_workspace>/svg-flat/` arInterpretation rule (carries forward into Steps 2 and 4):- `manifest.json` is the source of truth for slide size, theme colors, fonts, background inheritance, reusable asset inventory, unique layout/master structure, and slide reuse relationships-- `native_structure.json` is the source of truth for native PowerPoint identity: stable layout keys, picker names, parent masters, placeholder types/indices, and the source-package hash+- `native_structure.json` is the source of truth for native PowerPoint identity: stable layout keys, picker names, parent masters, placeholder types/indices, and the source-package hash. Its `recommendedMode` guides this template-creation workflow only; downstream deck generation confirms `strict` vs `adaptive` separately in the Strategist stage.- `summary.md` is a quick scan; never treat it as the canonical fact source — go back to `manifest.json` if anything is unclear- exported `assets/` are the canonical reusable image pool — `<image>` references in `svg/` already point at these files directly- exported `icons/*.svg` are the canonical reusable vector illustration pool, but they are **not** part of the default read set. Read the cleaned SVGs and `*_vector_asset_inventory.json` first; open a specific icon SVG only when the cleaned page or inventory shows that the extracted asset is relevant to the current design decision. This is what makes the SVG work surface smaller.@@ -137,7 +137,7 @@ Before composing Step 2, extract the template's reusable norms from the previous| Density rhythm | title scale, content block count, whitespace balance, dense vs. breathing pages | Page-type guidance for Strategist / Executor || Page roster semantics | cover / TOC / chapter / content / ending variants and their intended content slots | `design_spec.md §V Page Roster` rows || Asset policy | source images / icons / textures that are part of the template vs. sample-only content | `design_spec.md §VI Assets` or omit sample-only assets |-| Native PowerPoint structure | `native_structure.json` strategy, masters/layouts, picker names, placeholder type/index, source slide mapping | Preserve contract when reusable; otherwise rebuild one master plus semantic layouts |+| Native PowerPoint structure | `native_structure.json` strategy, masters/layouts, picker names, placeholder type/index, source slide mapping | Package the preserved contract when reusable; otherwise rebuild one master plus semantic layouts. Do not decide downstream strict/adaptive use here. |Distinguish observed facts from template rules: "`slide_07` uses a left photo crop" is a fact; "content pages may use a left photo rail for location / product / case-study pages" is the reusable rule.@@ -209,7 +209,7 @@ Compose a single message that surfaces every Required brief item to the user, **| Theme mode | Recommended localized mode with English ID, plus available modes such as `light` / `dark` / `mixed` with localized explanations || Canvas format | Recommended canvas, plus other supported formats from [`canvas-formats.md`](../references/canvas-formats.md) that fit the source aspect ratio or user intent. Always show the concrete pixel size and `viewBox`; do not treat two same-ratio formats such as `ppt169` (`1280x720`) and `banner` (`1920x1080`) as interchangeable. || Replication mode | Recommended localized mode with English ID, plus all modes available for the current input type; list forbidden modes for type C / D as unavailable with localized reasons |-| Native structure strategy | For type A, show the `native_structure.json` recommendation and both choices: preserve source package (`preserve`) or rebuild explicit layouts (`template`). `mirror` cannot use preserve because its flat SVGs do not identify inherited layers. |+| Native structure packaging | For type A, show the `native_structure.json` recommendation and both choices: retain the source package (`preserve`) or rebuild explicit layouts (`template`). This is a library-package capability choice, not downstream strict/adaptive adherence. `mirror` cannot retain the native pair because its flat SVGs do not identify inherited layers. || Visual fidelity for fixed pages | Recommended localized choice with English ID, plus both `literal` / `adapted` options when applicable || Asset bundling | Recommended included assets, plus excluded candidate assets with a one-line reason when reference assets exist |@@ -304,7 +304,9 @@ For type D, pass only the finalized brief.The role uses the analysis bundle to anchor objective facts such as theme colors, fonts, reusable backgrounds, common branding assets, layout grammar, image-placement rules, density rhythm, and page-slot semantics, then rebuilds the final SVG templates in a simplified, maintainable form.-**Native structure strategy**: When the confirmed strategy is `preserve`, copy `native_structure.json` and `source_template.pptx` unchanged into the final template directory. Author every template SVG with the source layout key/name on the root, source master/layout visuals as preview layers, and slide content as source-compatible placeholder markers. When the strategy is `template`, do not copy the native pair; reconstruct one master plus semantic layouts through the explicit metadata contract. Mirror mode always takes this rebuild/baseline path because flat slides do not retain layer ownership.+**Native structure packaging strategy**: When the confirmed strategy is `preserve`, copy `native_structure.json` and `source_template.pptx` unchanged into the final template directory. Author every template SVG with the source layout key/name on the root, source master/layout visuals as preview layers, and slide content as source-compatible placeholder markers. This retains a future strict-use capability; it does not force every downstream deck to use it. When the strategy is `template`, do not copy the native pair; reconstruct one master plus semantic layouts through the explicit metadata contract. Mirror mode always takes this rebuild/baseline path because flat slides do not retain layer ownership.++Downstream, the Strategist confirmation stage owns template adherence. `strict` maps every generated page to this SVG roster and may activate `pptx_structure.mode: preserve`; `adaptive` may use only selected SVGs and always keeps native export on `baseline`, even though the pair remains available in the template directory.**Apply the visual-fidelity decision from Step 3**: pages marked `literal` (typically cover / chapter / ending) must reproduce the reference's geometry, decoration, and sprite-sheet crops as-is — "simplified, maintainable form" applies only to genuinely redundant structure, not to load-bearing layout. Pages marked `adapted` may use the reference for tone and structural rhythm but evolve the design.@@ -331,7 +333,7 @@ Mirror mode does **not** invoke the "reconstruct into clean SVG" pathway. The sp1. `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` / `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.- - `{{...}}` placeholders are the authoring contract used to generate final slide content; they are not PowerPoint `p:ph` objects. For reconstructed layouts, use `pptx_structure.mode: template`. For a template package carrying `native_structure.json` + `source_template.pptx`, use `mode: preserve`. Both modes require `pptx_layouts` and explicit root/layer/placeholder metadata; preserve-mode placeholders retain the source `data-pptx-placeholder-idx`.+ - `{{...}}` placeholders are the authoring contract used to generate final slide content; they are not PowerPoint `p:ph` objects. For an explicitly requested reusable PowerPoint structure, use `pptx_structure.mode: template`. A package carrying `native_structure.json` + `source_template.pptx` may use `mode: preserve` only when downstream template adherence is confirmed as `strict`. `adaptive` use keeps `baseline`. Template/preserve modes require `pptx_layouts` and explicit root/layer/placeholder metadata; preserve-mode placeholders retain the source `data-pptx-placeholder-idx`.4. Template assets (optional) — Logos / PNG / JPG / reference SVG bundled with the template package---@@ -415,7 +417,8 @@ The index file is a **discovery index** — it lets the AI answer "what template> source_canvas_width: 1280> source_canvas_height: 720> source_viewbox: "0 0 1280 720"-> # Type-A preserve strategy only; omit all three rows for rebuilt templates.+> # Type-A native retention capability only; omit all three rows for rebuilt templates.+> # Downstream strict/adaptive use is confirmed by Strategist and is not stored here.> native_structure_mode: preserve> native_structure: native_structure.json> source_template: source_template.pptx