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
docs(svg-pipeline): align mirror and native-data authority contracts
hugohe30768c8b72421
diff --git a/docs/faq.md b/docs/faq.mdindex 0c4b1e9d..47045a0e 100644--- a/docs/faq.md+++ b/docs/faq.md@@ -467,7 +467,7 @@ Want to turn a PPT you love into a reusable template for PPT Master? Here's how:The recommended input is the original `.pptx`. PPT Master extracts theme identity, declared Master/Layout topology, placeholder metadata, native-shape evidence, and reusable assets that are actually present and supported. `standard` and `fidelity` inspect the complete source inventory as evidence and author a new SVG roster plus a new Master/Layout/slot system; they neither preserve nor distill source topology. `mirror` instead materializes one prototype per source Slide together with only that Slide roster's reachable Layout/Master facts, without semantic synthesis or gap filling. Unreferenced source Layouts/Masters remain analysis evidence rather than mirror output. Fixed Master/Layout group wrappers are mechanically expanded into direct atoms because structural layers cannot be `<g>`.-Large imported SVGs may contain native-shape metadata, hidden carriers, and preview fingerprints. That lossless representation stays immutable in the temporary analysis workspace as payload backing. Template creation uses a lightweight editable IR with document-local source refs and a compact path/hash manifest. `standard` / `fidelity` author project-canonical SVG and use compact authored-preset groups only for exact registered preset matches. Mirror materializes final templates from the IR, reuses converter-supported payload only for unchanged Slide-local/slot refs, and keeps an SVG fallback for unsupported or edited objects.+Large imported SVGs may contain native-shape metadata, hidden carriers, and preview fingerprints. That lossless representation stays immutable as source/package evidence. Template creation uses a lightweight editable IR with document-local source refs and a compact path/hash manifest. `standard` / `fidelity` author project-canonical SVG and use compact authored-preset groups only for exact registered preset matches. Mirror publishes the reviewed current IR as the visible tree; it uses source refs only to validate identity and recover supported non-visible semantics, never to restore ordinary visible lossless subtrees. Unsupported or edited objects keep an SVG fallback.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. This path extracts a reusable template system; when the desired output is one layered editable slide per represented page frame, use Image to PPTX (`image-to-pptx`) instead.diff --git a/docs/technical-design.md b/docs/technical-design.mdindex 10ad10f1..ce6c8a7d 100644--- a/docs/technical-design.md+++ b/docs/technical-design.md@@ -806,7 +806,7 @@ These direct routes share some analysis primitives with the main pipeline, but a**Why per-element dispatch, not whole-file translation.** SVG's hierarchical model maps cleanly onto DrawingML's group / shape / picture types — there's no need for a holistic optimizer that re-plans the slide. Each shape kind gets its own narrow translator, which keeps each translator simple enough to debug and unit-test in isolation. The output quality of a slide is the sum of independent local conversions; that property is fragile under whole-file translation but robust under element dispatch.-**Why imported and authored shape metadata are separate.** A lossless imported SVG may need native-shape metadata, hidden carriers, and preview fingerprints to recover an advanced PowerPoint shape. That representation stays immutable in the temporary analysis workspace as native-payload backing. `svg_authoring_view.py` creates the editable template-creation IR: lightweight SVGs with document-local source refs plus an `authoring_manifest.json` containing paths and initial hashes, not duplicated payload. `standard` / `fidelity` author project-canonical SVG and use the compact authored-preset group only for exact registered preset matches. Mirror materializes validated templates from the IR and rehydrates converter-supported metadata only for unchanged Slide-local/slot refs; fixed structural layers remain direct atoms, unsupported or edited objects keep their current SVG fallback, and IR-only refs do not enter final template SVGs.+**Why imported and authored shape metadata are separate.** A lossless imported SVG may need native-shape metadata, hidden carriers, and preview fingerprints to describe an advanced PowerPoint shape. That representation stays immutable as source/package evidence and supported non-visible payload backing. `svg_authoring_view.py` creates new compact editable SVG with document-local source refs plus an `authoring_manifest.json` containing paths and initial hashes. `standard` / `fidelity` author project-canonical SVG. Mirror also reviews/authors the compact parsed SVG, preserving structure, meaning, and similar presentation without code isomorphism. Its materializer validates/composes the current visible tree and never restores ordinary lossless subtrees; IR-only refs do not enter final templates.**Why PPTX round-trip uses a semantic workspace rather than a ZIP-shaped tree.** The editable page source is `authoring-svg-flat/`; PowerPoint image media, imported reusable vectors, cues, audio, video, notes, and opaque payloads live under `images/`, `icons/imported/`, `sounds/`, `audio/`, `video/`, `notes/`, and `native-payloads/`. The exact backing package stays at `sources/source.pptx`, structural and ownership contracts stay under `analysis/`, diagnostics stay under `validation/`, and published decks stay under `exports/`. This keeps authoring paths aligned with normal projects while `analysis/roundtrip_manifest.json` maps semantic files back to package ownership. Import and export use this one contract: root `source_template.pptx`, `native_structure.json`, `conversion-report.json`, and `assets/` are invalid rather than compatibility inputs.@@ -823,8 +823,9 @@ confined to the ZIP-compressed compiled artifact.Supported imported native tables remain one semantic marker rather thanthousands of model-facing SVG nodes. Their `ppt-master.semantic-table.v2`payload factors repeated cell, paragraph, and run formatting into defaults and-named cell styles; native export expands those values in memory. Exact browser-previews are hashed under `images/source-object-previews/`. Meaning-bearing+named cell styles; native export expands those values in memory. Imported+objects declare `data-pptx-native-authority="json"`: inline JSON is+authoritative and the compact browser preview may be approximate. Meaning-bearinggroups and tables outside the closed semantic schema remain inline as readableSVG and report an explicit conversion gap; they never hide behind an importedasset. Only an unsupported, text-free, schema-free source ornament may stay@@ -845,23 +846,23 @@ it as a picture or SVG-derived shapes would violate round-trip intent.**Why reusable bounds are design zones, not measured text boxes.** Slot bounds come from the intended safe area, column, panel inset, or picture frame—not glyph width, line count, or the current content's tight box. The current Slide retains its own authored carrier geometry, so 4:6, 3:7, and 5:5 instances may share one Layout when they express the same semantic composition. Text length therefore cannot accidentally split or mutate the reusable Layout contract.-**Why the internal application plan retains two fields.** Strategist derives `template_reuse_scope` to record literal mirror reuse, structural layout reuse, or flat style reference. Structured plans then derive `template_adherence: strict|adaptive`: `page_layouts` records the complete authoring prototype, `pptx_masters` / `pptx_layouts` record unique reusable definitions, and `page_pptx_layouts` records page assignment. Strict preserves the declared prototype contract. Adaptive retains its Master, and Strategist may declare a new Layout only when fixed Layout atoms or slot topology/bounds change. If construction reveals that need, execution returns upstream and resumes only after Strategist updates, reads back, and validates the definition and assignment; the exporter never infers it later. These are exporter values, not user confirmation options. A template-backed definition may remain unused and still register in the final package. Layout skin remains project-controlled, while mirror additionally preserves literal visuals and text-node topology. `style` has no adherence value or structure mappings.+**Why the internal application plan retains two fields.** Strategist derives `template_reuse_scope` to record literal mirror reuse, structural layout reuse, or flat style reference. Structured plans then derive `template_adherence: strict|adaptive`: `page_layouts` records the complete authoring prototype, `pptx_masters` / `pptx_layouts` record unique reusable definitions, and `page_pptx_layouts` records page assignment. Strict preserves the declared prototype contract. Adaptive retains its Master, and Strategist may declare a new Layout only when fixed Layout atoms or slot topology/bounds change. If construction reveals that need, execution returns upstream and resumes only after Strategist updates, reads back, and validates the definition and assignment; the exporter never infers it later. These are exporter values, not user confirmation options. A template-backed definition may remain unused and still register in the final package. Layout skin remains project-controlled, while mirror preserves its authored prototype structure and comparable presentation; JSON-first Chart/Table preview children may be regenerated without literal tree identity. `style` has no adherence value or structure mappings.**Why explicit-Layout text defaults are split between Master and Layout.** Both flat and structured export write the declared title anchor and a deterministic nine-level body hierarchy into Master defaults while preserving indentation and bullet settings. On structured routes, each generated Layout text slot additionally copies its carrier's first run size into the level-one default while retaining the prompt's direct size. This preserves Layout-specific scale when placeholder text is inserted or reset; direct runs on generated Slides remain unchanged.**Why structured output is read back before publication.** Metadata preflight cannot prove package serialization preserved every relationship and registration. Export therefore reopens the temporary PPTX and validates published Slides separately from the complete Master/Layout roster, including definitions unused by all Slides. It checks Presentation → Master → Layout → Slide registration, physical part/content-type rosters, picker identities, exact static-object order, placeholder type/effective index/bounds, carrier bindings, hidden proxies, and zero-slot Layouts before publishing the file.-**Why Create Layout / Create Deck have authored and preservation modes.** `pptx_template_import.py` emits layered Master/Layout/Slide references plus native structure facts. `standard` / `fidelity` inspect the complete source Master/Layout and visual evidence, then author compact or broader useful Slide prototypes and topology from the confirmed reusable behavior. Mirror instead materializes each source Slide and only its reachable Layout/Master chain one-to-one, allowing mechanical context completion required by the explicit structured contract. Unreferenced source structures are not mirror output; authored modes may realize useful ones through new complete Slide prototypes. The original PPTX remains immutable analysis evidence, not a packaged export dependency. Create Brand has no structural replication strategy.+**Why Create Layout / Create Deck have authored and preservation modes.** `pptx_template_import.py` emits new compact editable Master/Layout/Slide SVG plus native structure facts. `standard` / `fidelity` inspect the complete source evidence, then author compact or broader useful prototypes and topology. Mirror reviews/authors each compact parsed source Slide and only its reachable Layout/Master chain one-to-one. It preserves structure, meaning, and similar presentation without requiring SVG-code identity; the materializer validates/composes the current authored tree and never restores ordinary visible lossless subtrees. Unreferenced source structures are not mirror output. The original PPTX remains immutable validation evidence, not a packaged dependency. Create Brand has no structural replication strategy.**Why create-template uses one workspace route in both scopes.** `create-template` keeps `library` as its default indexed output and may instead write under an initialized project. Both roots require `templates/`; `images/`, `icons/`, and on-demand `exports/` appear only when they contain real files, and existing SVG asset references follow the same rules. Library uses one bare spec inside a single-kind directory; project uses qualified specs in one shared root. The schema and asset routes remain portable, while spec placement and global index registration are scope-specific. Only Layout / Deck own a structured SVG contract; Brand and Style remain roster-free.**Why each template SVG stays complete while still compiling to native structure.** A template SVG repeats the inherited Master/Layout visuals together with sample Slide content so it opens as a complete standalone page. During generation, `page_layouts` selects that prototype and the output SVG remains complete. Export removes repeated inherited atoms, emits real Master/Layout parts, and leaves actual slot carriers and Slide-local content on the Slide.-**Why PowerPoint-native Chart/Table reconstruction uses explicit replacement markers, not automatic object replacement.** The standalone `pptx_to_svg.py` importer emits a visible SVG fallback plus `data-pptx-replace-with` and `<metadata type="application/json">` only for validated table/chart subsets. Generated decks prepare that pair only for semantic object keys recorded as `<object-key>=yes` in the §IX `Native-ready` map; §VII remains a positive catalog-reference inventory, and a catalog marker is a capability example rather than an execution decision. The parent marker determines the payload schema; ordinary shapes and connectors never use this contract. Table markers require `ppt-master.semantic-table.v2`: import factors exact repeated cell/paragraph/run values into defaults and named cell styles, while export expands them before native validation. Table import covers exact physical row/grid topology, canonical rectangular merges with empty slaves, safe solid/no-fill per-side borders, plain multi-paragraph cells, and a closed run-rich paragraph form. A rich paragraph contains non-empty `runs`; every run requires `text` and may use only `bold`, `italic`, `underline`, `strike`, `color`, `font_size`, one `font_family`, `lang`, and `alt_lang`. Unknown source presentation-only run XML without a non-empty `effectLst` / `effectDag` normalizes into that schema; a table-cell run effect instead disables native replacement and adds a blocking effect diagnostic. Relationship-bearing text, extensions, line breaks, fields, tabs, bullets, malformed text topology, noncanonical merges, unsafe borders, and non-solid fills remain fallback-only. The normalized fallback for table style `{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}` resolves `wholeTbl`, `firstRow`, horizontal banding, theme colors/fonts, and direct overrides; this is not a full built-in/custom style registry.+**Why PowerPoint-native Chart/Table reconstruction uses explicit replacement markers, not automatic object replacement.** The standalone `pptx_to_svg.py` importer emits a visible SVG preview plus `data-pptx-replace-with`, `data-pptx-native-authority="json"`, and inline `<metadata type="application/json">` only for validated table/chart subsets. Imported/template-owned objects are JSON-first; their preview is derived and may be approximate. Free-designed objects omit the authority marker, remain SVG-first, and stamp a fallback baseline only after visible SVG and JSON are synchronized. Generated decks prepare the pair only for semantic object keys recorded as `<object-key>=yes` in the §IX `Native-ready` map. The parent marker determines the payload schema; ordinary shapes and connectors never use this contract. Table markers require `ppt-master.semantic-table.v2`: import factors exact repeated cell/paragraph/run values into defaults and named cell styles, while export expands them before native validation. Table import covers exact physical row/grid topology, canonical rectangular merges with empty slaves, safe solid/no-fill per-side borders, plain multi-paragraph cells, and a closed run-rich paragraph form. A rich paragraph contains non-empty `runs`; every run requires `text` and may use only `bold`, `italic`, `underline`, `strike`, `color`, `font_size`, one `font_family`, `lang`, and `alt_lang`. Unknown source presentation-only run XML without a non-empty `effectLst` / `effectDag` normalizes into that schema; a table-cell run effect instead disables native replacement and adds a blocking effect diagnostic. Relationship-bearing text, extensions, line breaks, fields, tabs, bullets, malformed text topology, noncanonical merges, unsafe borders, and non-solid fills remain fallback-only.For supported parsed column/bar/line/area, pie/doughnut, scatter, and bubble charts, a missing baked preview is replaced by a deterministic readable SVG fallback marked `data-pptx-fallback-kind="normalized"`. The importer also covers the verified column/line/area combo subset, canonical four-series OHLC stock, area charts with numeric date axes, verified scatter/bubble charts with the closed `axes.x` / `axes.y` contract, radar, safe `of_pie` `serLines`, axis/title/legend normalization, and bounded bar/column gap/overlap cases. `gapWidth` is accepted only as one integer in `0..500`, and `overlap` only as one integer in `-100..100`; these presentation values intentionally normalize in native output, while malformed, duplicate, or out-of-range input fails closed. Combo plots may retain independent primary/secondary category caches and workbook ranges. XY import derives `scatter_style` from uniform effective series line/marker/smooth state. The closed category/value and XY axis contracts retain kind, position, visibility, label position, number format, min/max/major unit, reversal, and major gridlines for native read-back; the normalized XY fallback consumes only the two `major_gridlines` flags.-ChartEx import is deliberately closed to seven validated data models: `treemap`, `sunburst`, `histogram`, `pareto`, `box_whisker`, `waterfall`, and `funnel`. Their supported hierarchy/category/value/series/subtotal data topology round-trips through native output and reimport. Numeric caches must be non-empty and finite, with canonical non-negative counts/indexes and exact contiguous point topology. Source ChartEx style, axes, labels, and binning may normalize; this is not arbitrary ChartEx import or presentation fidelity. C4/C5 do not expand the normalized renderer, so valid active types outside it still use `data-pptx-fallback-kind="placeholder"` without a source preview. Full `AxisSpec`, arbitrary ChartEx families, arbitrary rich OOXML, rotated/flipped/3D charts, unverified combo/stock/date-axis variants, and other unmodeled semantics remain outside the active import subset. Native replacement may normalize payload-external presentation details and retains the data-model-first warning. Default export keeps fallback children as editable DrawingML shapes; only `--native-charts-and-tables` activates PowerPoint-native Chart/Table objects with a data source and object-specific editing model. Every active imported marker carries `data-pptx-import-source="pptx"` and `data-pptx-fallback-sha256`: stale visible edits, reachable SVG definition/reference changes, or marker transforms make native replacement fail rather than discard the SVG edit, while a hashless legacy imported marker that retains import provenance remains compatible with a warning. Generated authoring omits both importer provenance and a static baseline without warning. This importer/exporter pairing is a reconstruction aid, not a preservation-route substitute for `template-fill-pptx` or `native-enhance-pptx`.+ChartEx import is deliberately closed to seven validated data models: `treemap`, `sunburst`, `histogram`, `pareto`, `box_whisker`, `waterfall`, and `funnel`. Their supported hierarchy/category/value/series/subtotal data topology round-trips through native output and reimport. Numeric caches must be non-empty and finite, with canonical non-negative counts/indexes and exact contiguous point topology. Source ChartEx style, axes, labels, and binning may normalize; this is not arbitrary ChartEx import or presentation fidelity. C4/C5 do not expand the normalized renderer, so valid active types outside it still use `data-pptx-fallback-kind="placeholder"` without a source preview. Full `AxisSpec`, arbitrary ChartEx families, arbitrary rich OOXML, rotated/flipped/3D charts, unverified combo/stock/date-axis variants, and other unmodeled semantics remain outside the active import subset. Native replacement may normalize payload-external presentation details and retains the data-model-first warning. Default export keeps preview children as editable DrawingML shapes; only explicit `--native-charts-and-tables` activates PowerPoint-native Chart/Table objects. JSON-first ignores preview freshness; SVG-first requires a present, valid, fresh `data-pptx-fallback-sha256` or native replacement fails closed. Marker presence, semantic tables, and imported chart packages never activate replacement implicitly. 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-architecture.md b/docs/templates-architecture.mdindex 26afc931..793c6c01 100644--- a/docs/templates-architecture.md+++ b/docs/templates-architecture.md@@ -110,7 +110,7 @@ Imported vectors use `data-icon="imported/<name>"` and have one canonical fileat `icons/imported/<name>.svg`. Workspace-aware validation and export resolvethat root path directly; `templates/icons/` is not part of the package shape.-PPTX import uses a two-level metadata model. The temporary lossless SVG keeps native-shape metadata, hidden carriers, and preview evidence as immutable payload backing; `svg_authoring_view.py` creates the editable authoring IR bundle, whose lightweight SVGs carry document-local source refs and whose manifest stores only paths and initial hashes. Authored modes use project-canonical SVG and compact authored-preset groups only for exact registered preset matches. Mirror materializes templates from the IR and reuses converter-supported payload only for unchanged Slide-local/slot refs; fixed structural layers remain direct atoms, unsupported or edited objects keep their SVG fallback, and final templates contain no IR-only refs. Export compiles only the declared SVG structure and never infers ownership.+PPTX import uses a two-level metadata model. The temporary lossless SVG keeps native-shape metadata, hidden carriers, and preview evidence as immutable source/package evidence; `svg_authoring_view.py` creates the editable authoring IR bundle, whose lightweight SVGs carry document-local source refs and whose manifest stores only paths and initial hashes. Authored modes use project-canonical SVG and compact authored-preset groups only for exact registered preset matches. Mirror publishes the reviewed current IR as its visible tree; source refs validate identity and recover only supported non-visible semantics, fixed structural layers remain direct atoms, unsupported or edited objects keep their SVG fallback, and final templates contain no IR-only refs. Export compiles only the declared SVG structure and never infers ownership.Both scopes retain their selected `kind` in portable frontmatter. `output_scope` and `target_project` stay in the workflow brief and are not persisted into `design_spec.md`.diff --git a/docs/templates-guide.md b/docs/templates-guide.mdindex 26dd4788..47e7bece 100644--- a/docs/templates-guide.md+++ b/docs/templates-guide.md@@ -244,24 +244,24 @@ strategy so deterministic tools can run:- a compact reusable system when the request calls for distillation;- broader source-aligned coverage when the source itself contains useful variants;-- literal materialization when the request calls for preservation and the source has a complete supported structure contract.+- compact mirror authoring when the request calls for preservation and the source has a complete supported structure contract.Layout/Deck frontmatter still records `replication_mode: standard|fidelity|mirror` for tool compatibility and audit. It is an implementation record, not a user-facing choice. Style frontmatter intentionally has no replication/native-structure fields. A brand-neutral Layout cannot literally preserve brand/application facts; the AI either re-authors it as a Layout or keeps those facts in a Deck according to the requested result.**About sprite sheets**: PPTX-exported assets are often a single large image referenced from multiple slides, each cropping a different region via nested `<svg viewBox=...>` wrappers. In `fidelity` and `mirror` modes this nesting must be preserved — you cannot flatten it to a bare `<image>`, or the crop is lost and the page misaligns. The workflow validates this automatically.-**About native PowerPoint shapes**: the lossless import SVG stays immutable in the temporary analysis workspace as native-payload backing. Template creation uses the lightweight editable `authoring-svg/` IR and its source-ref/hash manifest. Authored modes use project-canonical SVG and compact authored-preset groups only for exact registered preset matches. Mirror materializes final template SVGs from the IR, reusing converter-supported payload only for unchanged Slide-local/slot refs; fixed Master/Layout layers remain direct atoms, unsupported or edited objects keep the current SVG fallback, and final templates contain no IR-only refs.+**About native PowerPoint shapes**: the lossless import SVG stays immutable as source/package evidence and supported non-visible payload backing. Template creation uses the new compact editable `authoring-svg/` tree and its source-ref/hash manifest. Template_Designer reviews/authors that tree for mirror, preserving structure, meaning, and similar presentation without requiring identical SVG code. The publisher validates/composes the current visible tree and never restores ordinary lossless subtrees; final templates contain no IR-only refs. Imported/template-owned Chart/Table JSON remains inline and authoritative, while its compact preview may be approximate.-For a PPTX-backed Type A mirror, that final step is one deterministic command:+For a PPTX-backed Type A mirror, final validation/publication uses one deterministic command after the authoring review:```bashpython3 skills/ppt-master/scripts/mirror_template_materialize.py \"<import_workspace>" "<template_workspace>"```-It validates the IR manifest, immutable hashes for source Slides, their reachable-native graph and visibility facts, and the corresponding imported-vector closure before atomically publishing the-source-ordered SVG roster and its `icons/imported/` / `images/` assets. It never+It validates source SHA/known refs, the authoring manifest, reachable native+graph, visibility/assignment facts, and imported-vector closure before atomically publishing the+current source-ordered SVG roster and assets. It neverrequires or uses the opt-in `svg-flat/` verification tree as the template sourceand never generates a Design Spec; the designer writes the resolved specagainst the published roster.@@ -272,7 +272,7 @@ The Design Spec gives every emitted Slide prototype its normal roster row. WhenTemplate use is Slide-first: each generated-page SVG already resolves its Master and Layout visuals, so normal authoring selects that complete Slide prototype. The workspace contains no standalone Master/Layout definition SVGs.-“Slide-only” describes the editable SVG roster. A PPTX-backed mirror may also carry tool-only structural sidecars such as `source_themes.json` and `native_payloads.json.gz`; they preserve exact reachable Theme/native data during export and are not page prototypes or AI authoring inputs.+“Slide-only” describes the editable SVG roster. A PPTX-backed mirror may also carry tool-only structural sidecars such as `source_themes.json` and `native_payloads.json.gz`; they preserve exact reachable Theme plus supported opaque restoration payloads/attribute records and are not page prototypes or AI authoring inputs. Semantic Chart/Table JSON always stays inline in its SVG marker.**How a mirror-authored workspace is consumed**: source-to-workspace `replication_mode: mirror` is a capability, not a project choice. Strategist inspects the actual prototypes, current content, and any explicit instruction, then decides which pages to select, repeat, skip, or reorder and whether literal, structural, or visual-only reuse is appropriate. Literal reuse copies a complete prototype and edits only allowed visible text values while preserving decoration, sprite crops, geometry, and normalized structured declarations. This never requires the source page count or order.diff --git a/docs/zh/technical-design.md b/docs/zh/technical-design.mdindex ed5e0160..410595c4 100644--- a/docs/zh/technical-design.md+++ b/docs/zh/technical-design.md@@ -689,13 +689,13 @@ SVG 与 DrawingML 的表达模型并不等价,因此主编译路径不把“**为什么是逐元素派发而不是整体翻译。** SVG 的层级模型干净地映射到 DrawingML 的 group / shape / picture 类型——不需要一个全局优化器去重新规划幻灯片。每种形状都有自己窄的翻译器,简单到能单独调试和单元测试。一张幻灯片的最终质量等于这些独立局部转换之和;这个性质在整体翻译下脆弱,在元素派发下稳健。-**为什么导入型与生成型 metadata 分层。** 导入 PPTX 时,完整 SVG 可以携带高级形状所需的 metadata、隐藏 carrier 和预览指纹,因此作为原生载荷后备留在临时分析工作区且保持不可变。`svg_authoring_view.py` 生成模板创建所用的可编辑 IR:轻量 SVG 通过文档内 source ref 标识对象,`authoring_manifest.json` 只记录路径与初始 hash,不重复保存原始载荷。`standard` / `fidelity` 创作项目规范化 SVG,只有精确匹配已登记 preset 时才使用 compact authored-preset 组。Mirror 从 IR 物化通过校验的模板,只为未改且 hash 匹配的 Slide-local/slot ref 重新接入转换器已支持的 metadata;固定结构层保持直接原子,不支持或已修改的对象保留当前 SVG fallback,IR 专用 ref 不进入最终模板 SVG。+**为什么导入型与生成型 metadata 分层。** 导入 PPTX 时,完整 SVG 可以携带高级形状所需的 metadata、隐藏 carrier 和预览指纹,因此作为不可变来源/包证据与非可见载荷后备留在临时分析工作区。`svg_authoring_view.py` 生成模板创建所用的新紧凑可编辑 SVG:文档内 source ref 标识对象,`authoring_manifest.json` 只记录路径与初始 hash。`standard` / `fidelity` 创作项目规范化 SVG;Mirror 也实际审阅/创作这份紧凑 SVG,并保留结构事实、语义和相似展示。materializer 只校验、合成并发布当前作者树,绝不因 hash 未变而回填 lossless 可见子树;IR 专用 ref 不进入最终模板。**为什么 PPTX 往返使用语义工作区,而不是照搬 ZIP 目录。** 可编辑页面源是 `authoring-svg-flat/`;PowerPoint 图片媒体、导入的可复用矢量、提示音、音频、视频、备注和不透明载荷分别位于 `images/`、`icons/imported/`、`sounds/`、`audio/`、`video/`、`notes/` 和 `native-payloads/`。精确来源包保存在 `sources/source.pptx`,结构与归属契约保存在 `analysis/`,诊断保存在 `validation/`,发布文件保存在 `exports/`。这样既让作者路径与普通项目一致,又由 `analysis/roundtrip_manifest.json` 把语义文件映射回 package 归属。导入与导出只接受这一份契约;根目录下的 `source_template.pptx`、`native_structure.json`、`conversion-report.json` 与 `assets/` 都不是兼容输入。**为什么紧凑 SVG 可以展开为丰富 PPTX。** 无论直接生成还是从 PPTX 导入,第一次发布的作者源就必须是规范化紧凑 SVG:使用标准 SVG 元素、可读分组和语义 metadata,根节点只保存字体类默认值,颜色与线型放在语义组中。源码不使用 CSS class、私有缩写、编码载荷或有损精度裁剪,质量检查只读验证而不回写。导出时,编译器在内存中解析继承,并把语义表格、原生形状及其他受支持对象展开为 PowerPoint 需要的重复 DrawingML;冗余只存在于最终经 ZIP 压缩的编译产物中。-受支持的导入原生表格保持为一个语义 marker,而不是在模型可见 SVG 中展开成数千个节点。其 `ppt-master.semantic-table.v2` payload 会把重复的单元格、段落和 run 格式归纳成默认值及命名单元格样式,原生导出时再在内存中展开。精确浏览器预览以 hash 命名存放在 `images/source-object-previews/`。封闭语义 schema 以外但承载含义的组合、表格和图表继续以内联可读 SVG 表达,并显式记录转换缺口,不能藏进 imported。只有不含文字、没有语义 marker、schema 也无法识别的来源装饰,才允许在 `authoring-svg-flat/` 中成为一个紧凑的 `native-restore` 图片代理和外层 source ref。未修改的代理会恢复完整来源 OOXML 对象;删除 Slide-local 代理会删除该对象。继承自 Master/Layout 的代理必须保留,因为单个 flat 页面不能删除共享结构。修改代理或预览会直接阻止导出,因为静默编译为图片或 SVG 派生形状会违背往返意图。+受支持的导入原生表格保持为一个语义 marker,而不是在模型可见 SVG 中展开成数千个节点。其 `ppt-master.semantic-table.v2` payload 会把重复格式归纳成默认值及命名样式,原生导出时再展开。导入对象带 `data-pptx-native-authority="json"`:内嵌 JSON 是权威,紧凑浏览器 preview 可以近似。封闭 schema 以外但承载含义的组合继续以内联可读 SVG 表达并报告转换缺口。只有不含文字、没有语义 marker、schema 也无法识别的来源装饰,才允许在 `authoring-svg-flat/` 中成为紧凑 `native-restore` 代理;该往返代理仍遵守自己的不可编辑保留合同。**为什么只有一条 PPTX 编译路线。** Native 导出把作者 SVG 中受支持的元素逐个翻译成 DrawingML 形状。常规 deck 路线读取 `svg_output/`;用户需要时,create-template 对通过校验的模板原型调用同一 structured 编译器,生成 `exports/<id>_template_preview.pptx` 作为审阅证据。项目不会把整页 SVG 媒体或另一套位图渲染打包成第二类 PPTX。`svg_final/` 仍由常规 deck 的强制后处理生成,但只承担派生视觉预览和 SVG 图片插入,不为 PowerPoint 手工“转换为形状”提供兼容兜底。@@ -707,23 +707,23 @@ SVG 与 DrawingML 的表达模型并不等价,因此主编译路径不把“**为什么可复用 bounds 是设计区域,不是量出来的文本框。** bounds 来自安全区、分栏、面板内框或图片框,而不是字形宽度、行数或当前内容紧包围盒。当前 Slide 保留自己的 carrier 几何,因此只要语义构图相同,4:6、3:7、5:5 的实例都可复用同一 Layout。文本长度不会意外拆分或改变可复用合同。-**为什么内部应用计划保留两个字段。** Strategist 推导 `template_reuse_scope`,记录字面镜像复用、结构化版式复用或 flat 风格参考;structured 计划再推导 `template_adherence: strict|adaptive`。`page_layouts` 记录完整创作原型,`pptx_masters` / `pptx_layouts` 记录唯一可复用定义,`page_pptx_layouts` 记录页面分配。strict 保持声明的原型合同;adaptive 保持原型 Master,只有固定 Layout 原子或槽位 topology/bounds 改变时,Strategist 才可声明新 Layout。若制作过程暴露出这一需求,执行必须退回上游,待 Strategist 更新、回读并校验定义与分配后才能继续;导出器不会事后推断。这些是导出器内部值,不是用户确认选项。模板定义即使暂时没有页面使用,也能注册进最终文件。layout 的皮肤由项目控制;mirror 还要保持字面视觉与文字节点拓扑。`style` 不带 adherence 或结构 mapping。+**为什么内部应用计划保留两个字段。** Strategist 推导 `template_reuse_scope`,记录字面镜像复用、结构化版式复用或 flat 风格参考;structured 计划再推导 `template_adherence: strict|adaptive`。`page_layouts` 记录完整创作原型,`pptx_masters` / `pptx_layouts` 记录唯一可复用定义,`page_pptx_layouts` 记录页面分配。strict 保持声明的原型合同;adaptive 保持原型 Master,只有固定 Layout 原子或槽位 topology/bounds 改变时,Strategist 才可声明新 Layout。若制作过程暴露出这一需求,执行必须退回上游修复。layout 的皮肤由项目控制;mirror 保持已创作原型的结构和相似展示,JSON-first Chart/Table 的派生 preview 子树无需字面同构。`style` 不带 adherence 或结构 mapping。**为什么显式版式把文字默认值分在 Master 与 Layout 两层。** Flat 与 structured 导出都会把声明的 `title` 锚点和确定性的九级 body 层级写入 Master 文本默认值,同时保留原有缩进与项目符号设置;在 structured 路线上,每个 Layout 文字槽位还会把 carrier 首个 run 的字号写入一级默认值,同时保留提示文字的直接字号。这样,插入或重置 placeholder 时仍能继承 Layout 特定尺度,而生成 Slide 上的直接 run 不变。**为什么 structured 输出要在发布前回读。** 元数据预检不能证明 package 序列化保留了所有 relationship 与注册信息。导出器会重新打开临时 PPTX,把已发布 Slide 与完整 Master/Layout roster 分开校验,包括没有任何 Slide 使用的定义;同时核对 Presentation → Master → Layout → Slide 注册链、物理 part/content-type roster、选择器身份、固定对象顺序、placeholder 类型/有效索引/bounds、carrier 绑定、隐藏 proxy 与零槽 Layout,只有通过后才发布。-**为什么 Create Layout / Create Deck 分为创作模式和保留模式。** `pptx_template_import.py` 输出分层 Master/Layout/Slide 参考和 native 结构事实。`standard` / `fidelity` 会检查完整来源 Master/Layout 与视觉证据,再按照确认后的可复用行为创作紧凑或覆盖更广的完整 Slide 原型和新拓扑。Mirror 则一对一物化每张来源 Slide 及其可达的 Layout/Master 链,只做显式 structured 合同要求的上下文补全和机械归一化。未被来源 Slide 引用的结构不进入 mirror 输出;创作模式可按需要把其中有用的结构重新表达为完整 Slide 原型。原始 PPTX 保持为不可变分析证据,不成为最终模板依赖。Create Brand 没有结构复制策略。+**为什么 Create Layout / Create Deck 分为创作模式和保留模式。** `pptx_template_import.py` 输出新的紧凑可编辑 Master/Layout/Slide SVG 和 native 结构事实。`standard` / `fidelity` 据完整证据创作紧凑或更广的原型与新拓扑。Mirror 则审阅/创作每张解析后的紧凑 Slide 及其可达 Layout/Master 链,保持结构、语义和相似展示,但不要求 SVG 代码同构;materializer 只校验/合成当前作者树,不恢复普通 lossless 可见子树。未被来源 Slide 引用的结构不进入 mirror 输出。原始 PPTX 是不可变校验证据,不是最终模板依赖。**为什么 create-template 在两种范围都使用同一工作区路由。** `create-template` 仍以写入索引的 `library` 为默认,也可写入已初始化项目。两种根目录都要求 `templates/`;`images/`、`icons/` 和按需生成的 `exports/` 只有存在真实内容时才出现,已有 SVG 素材的引用规则也一致。Library 在单 kind 目录使用一份裸 spec,project 在共享 root 使用限定名 spec;schema 与素材路由保持一致,spec 落点及全局索引注册随范围变化。只有 Layout / Deck 拥有 structured SVG 合同,Brand 与 Style 保持 roster-free。**为什么模板 SVG 保持完整却仍能编译成原生结构。** 模板 SVG 会重复携带继承的 Master/Layout 视觉和示例 Slide 内容,因此可独立打开。生成时由 `page_layouts` 选择该原型,输出 SVG 仍保持视觉闭包。导出器移除重复继承原子、生成真实 Master/Layout part,并把槽位 carrier 与 Slide-local 内容留在 Slide。-**为什么 PowerPoint 原生 Chart/Table 重建使用显式替换 marker,而不是自动替换对象。** 独立的 `pptx_to_svg.py` 导入器只为已验证的表格 / 图表子集输出可见 SVG fallback、`data-pptx-replace-with` 与 `<metadata type="application/json">`。生成型 deck 只为 §IX `Native-ready` 映射中以 `<object-key>=yes` 点名的语义对象准备这组内容;§VII 只保存正向 catalog reference,catalog marker 只是能力示例,不替项目做决策。父组 marker 决定 payload schema;普通 shape 与 connector 不使用该合同。表格 marker 必须使用 `ppt-master.semantic-table.v2`:导入时把完全相同的单元格、段落及 run 值归纳为默认值和命名样式,导出时在原生校验前展开。表格导入覆盖精确的物理行列 topology、slave 为空的规范矩形 merge、安全的 solid/no-fill 逐边 border、纯文本多段落,以及封闭的 run 级富文本段落。富文本段落包含非空 `runs`;每个 run 必须有 `text`,并且只能使用 `bold`、`italic`、`underline`、`strike`、`color`、`font_size`、单一 `font_family`、`lang` 和 `alt_lang`。不含非空 `effectLst` / `effectDag` 的来源展示型 run XML 会归一化到该 schema;表格单元格 run 效果则会禁用原生替换,并添加阻塞效果诊断。带 relationship 的文本、扩展节点、换行、字段、tab、项目符号、破损文本 topology、非规范 merge、不安全 border 与非纯色填充仍保持 fallback-only。表格样式 `{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}` 的规范化 fallback 会解析 `wholeTbl`、`firstRow`、横向带状行、主题颜色 / 字体和直接格式覆盖;这不代表完整 built-in/custom style registry。+**为什么 PowerPoint 原生 Chart/Table 重建使用显式替换 marker,而不是自动替换对象。** `pptx_to_svg.py` 只为已验证子集输出 SVG preview、`data-pptx-replace-with`、`data-pptx-native-authority="json"` 与内嵌 `<metadata type="application/json">`。导入/模板对象是 JSON-first,preview 可近似;自由设计省略 authority marker,保持 SVG-first,并在 SVG 与 JSON 同步后显式写入 fallback baseline。生成型 deck 只为 §IX `Native-ready` 中以 `<object-key>=yes` 点名的对象准备 marker。父组决定 payload schema;普通 shape/connector 不使用该合同。表格使用 `ppt-master.semantic-table.v2`,把重复格式归纳为默认值和命名样式,导出时在内存展开。表格导入仍要求精确物理行列 topology、规范矩形 merge、安全逐边 border 和封闭富文本字段;合同外语义保持 fallback-only。受支持的柱 / 条 / 折线 / 面积、饼 / 圆环、散点 / 气泡图在没有 baked preview 时会生成确定性、可读的 SVG fallback,并标记 `data-pptx-fallback-kind="normalized"`。导入器还覆盖已验证的柱 / 折线 / 面积组合图、规范四系列 OHLC stock、数值日期轴面积图、采用封闭 `axes.x` / `axes.y` 合同的散点 / 气泡图、radar、安全的 `of_pie` `serLines`、坐标轴 / 标题 / 图例归一化,以及有界的柱 / 条图 gap/overlap 场景。`gapWidth` 只接受 `0..500` 内的单个整数,`overlap` 只接受 `-100..100` 内的单个整数;这两个表现字段在 native 输出中有意归一化,非法、重复或越界输入 fail closed。组合图可保留主 / 次 plot 各自的 category cache 与 workbook range。XY 导入根据各系列一致的有效 line/marker/smooth 状态推导 `scatter_style`。封闭的 category/value 与 XY 轴合同为 native read-back 保留 kind、position、visibility、label position、number format、min/max/major unit、reverse 和 major gridlines;规范化 XY fallback 只消费两个 `major_gridlines` 开关。-ChartEx 导入被有意限制为 7 个已验证数据模型:`treemap`、`sunburst`、`histogram`、`pareto`、`box_whisker`、`waterfall` 与 `funnel`。其受支持的层级 / 分类 / 数值 / 系列 / 小计数据 topology 可经 native 输出再导入回读。数值 cache 必须非空且有限,count/index 必须是规范非负整数,并满足精确连续的 point topology。来源 ChartEx 的样式、坐标轴、标签与 binning 可能归一化;这不代表任意 ChartEx 导入或表现层保真。C4/C5 不扩展 normalized renderer,因此 renderer 外的有效 active 类型在没有源 preview 时仍使用 `data-pptx-fallback-kind="placeholder"`。完整 `AxisSpec`、任意 ChartEx 家族、任意富文本 OOXML、旋转 / 翻转 / 3D 图表、未验证的 combo/stock/date-axis 变体及其他未建模语义仍不在 active 导入子集内。native replacement 仍可能归一化 payload 外的表现细节,并保留数据模型优先 warning。默认导出把 fallback 子元素作为可编辑 DrawingML shape;只有 `--native-charts-and-tables` 才启用带数据源和对象专属编辑模型的 PowerPoint 原生 Chart/Table。每个 active 导入 marker 都带有 `data-pptx-import-source="pptx"` 与 `data-pptx-fallback-sha256`:可见 fallback、可达 SVG definition/reference 或 marker transform 变更后,native replacement 会 fail,而不是丢弃 SVG 编辑;仍保留导入来源标记但没有 hash 的旧导入 marker 兼容并给出 warning。生成型创作会同时省略导入来源和静态 baseline,且不产生 warning。该 importer/exporter 组合只用于重建,不替代 `template-fill-pptx` 或 `native-enhance-pptx` 的保留型路线。+ChartEx 导入被有意限制为 7 个已验证数据模型:`treemap`、`sunburst`、`histogram`、`pareto`、`box_whisker`、`waterfall` 与 `funnel`。其受支持数据 topology 可经 native 输出再导入回读,合同外表现仍可能归一化。默认导出把 preview 子元素作为可编辑 DrawingML shape;只有显式 `--native-charts-and-tables` 才启用原生 Chart/Table。JSON-first 不受 preview freshness 否决;SVG-first 必须有合法且最新的 `data-pptx-fallback-sha256`,否则 native replacement fail closed。marker、semantic table 或 imported chart package 的存在都不会隐式激活原生替换。该 importer/exporter 组合只用于重建,不替代保留型路线。---diff --git a/docs/zh/templates-guide.md b/docs/zh/templates-guide.mdindex 346d9b51..a8893a2a 100644--- a/docs/zh/templates-guide.md+++ b/docs/zh/templates-guide.md@@ -222,23 +222,23 @@ Create Style 会直接写入已确认的方向/方法 spec,不进入 SVG 创- 需要精炼时,创建紧凑的可复用系统;- 来源本身包含有价值的多种版式时,创建更广的来源对齐原型;-- 明确要求原样保留、且来源结构完整受支持时,进行字面物化。+- 明确保留且来源结构完整受支持时,基于解析证据创作紧凑 mirror。Layout/Deck frontmatter 仍会记录 `replication_mode: standard|fidelity|mirror` 以兼容工具并保留审计信息;它是实现记录,不是用户选项。Style frontmatter 有意不写 replication/native-structure 字段。品牌中立的 Layout 不能同时字面保留品牌/应用事实,AI 会按目标重新创作 Layout,或把这些事实留在 Deck 中。**关于精灵图**:PPTX 导出的素材常常是**一张大图 + 多页通过 viewBox 裁剪不同区域**。`fidelity` 和 `mirror` 模式下必须保留这层嵌套 `<svg viewBox=...>` 包装,不能扁平化为单张 `<image>`——否则裁剪信息丢失,画面会错位。工作流会自动校验这一点。-**关于 PowerPoint 原生形状**:完整导入 SVG 作为原生载荷后备留在临时分析工作区且保持不可变;模板创建使用轻量、可编辑的 `authoring-svg/` IR 及其 source-ref/hash manifest。创作模式使用项目规范化 SVG,只有精确匹配已登记 preset 时才使用 compact authored-preset 组。Mirror 从 IR 物化最终模板 SVG,只为未改且 hash 匹配的 Slide-local/slot ref 重新接入转换器已支持的载荷;固定 Master/Layout 层保持直接原子,不支持或已修改的对象保留当前 SVG fallback,最终模板不包含 IR 专用 ref。+**关于 PowerPoint 原生形状**:完整导入 SVG 作为不可变来源/包证据与受支持非可见载荷后备;模板创建使用新生成的紧凑可编辑 `authoring-svg/` 及其 source-ref/hash manifest。Template_Designer 会实际审阅/创作该 SVG,保持结构、语义和相似展示,但不要求代码同构。publisher 只校验、合成并发布当前可见作者树,绝不回填普通 lossless 可见子树。导入/模板拥有的 Chart/Table JSON 始终内嵌且为权威,其 preview 可以近似。-对于 PPTX 来源的 Type A mirror,最终物化统一使用一个确定性命令:+对于 PPTX 来源的 Type A mirror,完成作者审阅后,最终校验/发布统一使用一个确定性命令:```bashpython3 skills/ppt-master/scripts/mirror_template_materialize.py \"<import_workspace>" "<template_workspace>"```-它会先校验来源 Slide 的 IR manifest 与不可变 hash、可达原生图谱、-可见性事实和对应的导入向量闭包,再原子发布按源顺序排列的 SVG roster 及+它会先校验来源 SHA/已知 ref、作者 manifest、可达原生图谱、+可见性/分配事实和导入向量闭包,再原子发布当前按源顺序排列的 SVG roster 及`icons/imported/`、`images/` 素材。它不要求、也不会把按需生成的`svg-flat/` 校验视图当成模板来源,并且不会生成 Design Spec;设计角色必须针对物化后的 roster 写入已解析的 spec 路径。@@ -248,7 +248,7 @@ Design Spec 对每个输出 Slide 原型按正常 roster 说明。若来源还模板使用以 Slide 为主:生成页面 SVG 已经补齐 Master 与 Layout 视觉,正常创作直接选择完整 Slide 原型;工作区不再存放独立 Master/Layout 定义 SVG。-“只生成 Slide”描述的是可编辑 SVG roster。PPTX 来源的 mirror 仍可携带 `source_themes.json`、`native_payloads.json.gz` 等仅供工具使用的结构 sidecar,用于导出时恢复可达结构的精确 Theme/原生数据;它们不是页面原型,也不进入 AI 创作上下文。+“只生成 Slide”描述的是可编辑 SVG roster。PPTX 来源的 mirror 仍可携带 `source_themes.json`、`native_payloads.json.gz` 等仅供工具使用的结构 sidecar,用于保存可达结构的精确 Theme 及受支持的不透明恢复 payload/属性记录;它们不是页面原型,也不进入 AI 创作上下文。语义 Chart/Table JSON 始终内联在对应 SVG marker 中。**按 mirror 创建的工作区怎么消费**:从来源到工作区的 `replication_mode: mirror` 是一种能力,不是项目选择。Strategist 会读取真实原型、当前内容和用户明确要求,自动决定选哪些页、哪些重复/跳过/重排,以及采用字面、结构还是仅视觉参考。字面复用时,Executor 复制完整 SVG,只修改允许变更的可见文字,同时保留装饰、精灵图裁剪、几何坐标和规范化结构声明;仍不要求沿用来源页数或页序。diff --git a/skills/ppt-master/references/artifact-ownership.md b/skills/ppt-master/references/artifact-ownership.mdindex 2c07f398..b5900d79 100644--- a/skills/ppt-master/references/artifact-ownership.md+++ b/skills/ppt-master/references/artifact-ownership.md@@ -77,7 +77,7 @@ history, or resumable planning state. Context loss restarts the Quick run.| PPTX structure | `analysis/<stem>.slide_library.json` owns native geometry, slot facts, and SmartArt layout/relationships for direct PPTX workflows. The Beautify inventory only deterministically inlines the subset required by its validation contract; neither the full ledger nor its stdout projections replace `slide_library.json` as the native-structure fact source. || Design contract | Final confirmation once → audited `design_spec.md` → optional same-file refinement/approval → context-authored lock. Never maintain a parallel draft/lock. Executor may apply `Template Application` prose but never replace identity. Repair divergence from the approved Design Spec/context unless it fails active-decision fidelity. || Flat packaging authority | Free-design, brand-only, Style-only, and every plan with `template_reuse_scope: style` declare `pptx_structure.mode: flat` and omit `pptx_masters`, `pptx_layouts`, `page_pptx_layouts`, and `page_layouts`. A Style installed alongside Layout/Deck changes only Direction / method and does not force the non-Style structure plan to flat. `svg_output/` owns the complete Slide-local visual design without root Master/Layout identity, fixed-layer ownership, or placeholder metadata. Export materializes one clean project-owned Master plus one Blank Layout, applies the locked theme defaults, removes stock content placeholders/Layout inventory, and retains only the standard date/footer/slide-number capability hooks. |-| Template structure authority | `template_reuse_scope: mirror|layout` uses `page_layouts` for each page's authoring-input prototype. `pptx_masters` / `pptx_layouts` own the unique reusable output definitions, while `page_pptx_layouts` owns page assignment. Strict keeps the prototype contract; adaptive may use a current or new Layout already declared by Strategist. A construction-discovered structural change returns upstream for definition and assignment repair before authoring resumes. Mirror additionally preserves literal visuals/text topology; layout allows project-controlled reflow/re-skinning. Unused definitions may register without a published Slide. Templates validate provenance but never add missing visible page objects during export. |+| Template structure authority | `template_reuse_scope: mirror|layout` uses `page_layouts` for each page's authoring-input prototype. `pptx_masters` / `pptx_layouts` own the unique reusable output definitions, while `page_pptx_layouts` owns page assignment. Strict keeps the prototype contract; adaptive may use a current or new Layout already declared by Strategist. A construction-discovered structural change returns upstream for definition and assignment repair before authoring resumes. Mirror additionally preserves ordinary authored visuals/text topology; only a JSON-first Chart/Table's derived preview children may regenerate while its metadata/structure remain fixed. Layout allows project-controlled reflow/re-skinning. Unused definitions may register without a published Slide. Templates validate provenance but never add missing visible page objects during export. || Fact classes | External facts resolve through `sources/*.facts.json`; invented demo KPIs/targets/internal ratios are labeled `scenario` in `design_spec.md §IX` and visibly in the page. Never promote scenario data into the external fact registry. || Imported-template authoring | Editable SVGs under `authoring-svg/` own create-template edits, `authoring_summary.json` owns model-facing orientation, and `authoring_manifest.json` owns tool-only source-object identity. Lossless `svg/` owns immutable native payload and fallback evidence; optional `svg-flat/` owns only complete-page verification. Materialized `templates/*.svg` own the validated deliverable contract and contain no IR-only source refs. || Legacy template input | Old unmapped/distilled/preserve structured projects and incomplete template packages are not migrated in place. [`create-template`](../workflows/create-template.md) authors a new current workspace: original PPTX Type A may preserve existing native topology in mirror; legacy SVG-only Type B is visual reference for `standard` / `fidelity`. Intentional free-design, Brand-only, and Style-only `flat` projects are already current. The exporter does not migrate or visually cluster legacy structure. |diff --git a/skills/ppt-master/references/executor-structured.md b/skills/ppt-master/references/executor-structured.mdindex b5ebb858..0b028ac4 100644--- a/skills/ppt-master/references/executor-structured.md+++ b/skills/ppt-master/references/executor-structured.md@@ -53,16 +53,16 @@ Resolve the per-page template SVG directly from the owning `spec_lock.md page_laWhen `spec_lock.md` records the AI-derived `template_reuse_scope: mirror`, Executor switches to a literal replacement path. The workspace capability `replication_mode: mirror` is a prerequisite, not the trigger by itself:1. **Per-page reference selection** — Strategist selects one mirror page per project page via `spec_lock.md page_layouts` (e.g., `P04: 015_content`). The basename is the mirror filename without extension; Strategist made this choice by reading `design_spec.md §V Page Roster` descriptions, not by guessing.-2. **Copy, don't fill** — use the retained full mirror SVG as the starting point, then edit slide-specific text in place. Preserve every non-text element and every `data-pptx-*` structure attribute verbatim. Do not reopen the same path + SHA merely because another page selects it.+2. **Copy, don't fill** — use the retained full mirror SVG as the starting point, then edit slide-specific text in place. Preserve every ordinary non-text element and every `data-pptx-*` structure attribute verbatim. The sole exception is a direct JSON-first Chart/Table: keep its marker id/kind/authority and metadata unchanged, while derived preview children may be regenerated from that JSON. Do not reopen the same path + SHA merely because another page selects it.3. **What you may edit** — decide the semantic slot mapping and replacement text only. Change only visible string values already carried by `<text>` and `<tspan>` nodes that express slide-specific content (title, body, captions, KPI labels, dates, page numbers). Keep the number, order, nesting relationship, and **all attributes** of every `<text>` / `<tspan>` node unchanged. Never merge or split nodes, move a string between nodes, add a new tspan, or delete an empty carrier. `svg_quality_checker.py` and export validate attributes, topology, and prototype hashes against the complete prototype internally.-4. **What you must not touch** — element positions, sizes, fonts, colors, fills, strokes, gradients, **which image each `<image>` points at**, `<g>` grouping, sprite-sheet `<svg viewBox>` wrappers, decorative `<rect>` / `<path>` / `<circle>` / `<polygon>` shapes, `<use data-icon="...">` markers, embedded chart data structures. Mirror's value is preserving the source deck's visual identity — any geometric / decorative drift defeats the purpose. **The `href` path is not the image**: normalize a bare `href="cover_bg.png"` to the exact `href="../images/<name>"` when Step 3 relocates those same bytes to `images/`; this required transport rewrite changes nothing visual. Do not leave the bare href or point back into the source template. Preview, validation, and export resolve the written SVG-relative path exactly and never search another directory by basename.+4. **What you must not touch** — element positions, sizes, fonts, colors, fills, strokes, gradients, **which image each ordinary `<image>` points at**, `<g>` grouping, sprite-sheet `<svg viewBox>` wrappers, decoration, `<use data-icon="...">` markers, or authoritative embedded Chart/Table JSON. JSON-first preview images/shapes are derived and excluded from this literal identity rule. **The `href` path is not the image**: normalize a bare `href="cover_bg.png"` to the exact `href="../images/<name>"` when Step 3 relocates those same bytes to `images/`; this required transport rewrite changes nothing visual. Do not leave the bare href or point back into the source template.5. **Content fit** — if the replacement needs a different number of text segments/items, do not merge/split nodes, drop sourced content, or restructure the grid. Report `warning: P<NN> content does not fit mirror reference <basename>; choose another prototype or change template_reuse_scope to layout/style`, then return to Strategist to select the prototype or scope and update the planning mappings.6. **Visible text editing** — mirror SVGs may keep literal source text rather than `{{...}}` authoring markers. Edit values in place while retaining imported semantic `data-pptx-placeholder` identity and exact text topology.7. **Output filename** — follow the standard project SVG naming convention (`<index>_<page_name>.svg` where `<index>` matches the project page index, not the mirror source index). The mirror filename is the *reference*, not the *output*.**Detecting mirror mode**: read `template_reuse_scope` from the retained lock. `replication_mode: mirror` in the installed template only determines whether that scope is legal; it must never force mirror behavior when the lock records `layout` or `style`.-**Mirror + visualization pages**: Chart, Table, and qualitative topology inside a mirror SVG are already drawn. Replace only permitted text while preserving prototype geometry; do not redraw from a catalog SVG or runtime grammar. A mirror template normally omits `page_visualizations`, and legacy `page_charts` never overrides fidelity.+**Mirror + visualization pages**: Chart, Table, and qualitative topology inside a mirror SVG are already authored. Replace only permitted text and do not redraw from a catalog/runtime grammar. A JSON-first Chart/Table may refresh its approximate preview from unchanged authoritative JSON; this never permits metadata, bounds, marker, slot, or ordinary-visual drift. A mirror template normally omits `page_visualizations`, and legacy `page_charts` never overrides fidelity.**Legacy template boundary**: A template with missing root Master identity, direct atomic placeholders, `data-pptx-layout-kind`, unmapped `baseline`, `preserve`, or `layout_strategy: distill` is not a fallback input. Stop and create a new current workspace through [`create-template`](../workflows/create-template.md) before generation.diff --git a/skills/ppt-master/references/native-data-interface.md b/skills/ppt-master/references/native-data-interface.mdindex aeeafb4a..1ea7bf3d 100644--- a/skills/ppt-master/references/native-data-interface.md+++ b/skills/ppt-master/references/native-data-interface.md@@ -1,4 +1,4 @@-> See [`executor-base.md`](./executor-base.md) for the Shape-first page authority and [`shared-standards-core.md`](./shared-standards-core.md) for the mandatory SVG foundation.+> See [`executor-base.md`](./executor-base.md) for page authoring and [`shared-standards-core.md`](./shared-standards-core.md) for the mandatory SVG foundation and object-local authority boundary.# Native Data Interface@@ -40,7 +40,29 @@ this enum.## 2. PowerPoint-Native Chart / Table Replacement Markers (Opt-in)-[`executor-base.md`](./executor-base.md) remains the single Shape-first authoring authority: the complete visible SVG fallback is required regardless of native eligibility. This section only adds dormant replacement metadata to independently selected objects and defines how export may activate it.+The complete visible SVG fallback remains required for browser preview and+default export. Chart/Table authority is nevertheless object-local rather than+globally Shape-first:++- **SVG-first (default)** — free-design, Brand-only, and Style-only authoring+ omits `data-pptx-native-authority`. The visible marker subtree is the design+ authority; JSON is its derived native projection. Canonical authoring records+ `data-pptx-fallback-sha256` only after the fallback and JSON are synchronized.+ A later visible edit requires regenerating the JSON and deliberately stamping+ a new baseline together. Missing or stale baselines leave default fallback+ export available but make `--native-charts-and-tables` fail closed.+- **JSON-first (template/native source)** — a validated PPTX import or a+ template-owned Chart/Table writes+ `data-pptx-native-authority="json"`. Its inline JSON is the semantic and native+ authority; the visible SVG subtree is a derived, compact, and potentially+ approximate preview. JSON edits regenerate that preview before template+ publication, but preview differences never override the JSON. This marker is+ legal only on active `chart` / `table` replacement groups, never formulas or+ fallback-only status markers.++Both forms keep the JSON inside the SVG. `native_payloads.json.gz` is reserved+for supported opaque shape restoration payloads and never replaces semantic+Chart/Table JSON.**Hard rule — selected-object authoring**: write the marker and JSON metadata inthe same edit for every supported chart and pure text-grid table; both are@@ -65,7 +87,23 @@ upstream repair.`data-pptx-replace-with` marker, and single JSON `<metadata>` child as oneauthoring unit. Write all three while that object's data is in context. Do notdefer the marker or metadata to `verify-charts`, the final quality gate, or-export.+export. SVG-first authoring then stamps the completed visible subtree; JSON-first+template authoring instead writes the authority marker and derives its preview+from the inline payload.++After one SVG-first object's fallback and JSON have been reviewed as the same+authoring transaction, stamp the completed marker explicitly:++```bash+python3 skills/ppt-master/scripts/stamp_native_fallbacks.py \+ "<svg-file-or-directory>" --write+```++Without `--write` the command is read-only. It validates every Chart/Table+payload before changing anything, skips JSON-first markers, and writes only the+current visible-subtree fingerprint. The hash is a synchronization receipt; it+detects later SVG edits but does not itself prove semantic equivalence, so never+stamp independently authored stale JSON merely to satisfy validation.**Hard rule — activation is the opt-in, dormant unless exported with `--native-charts-and-tables`**: A marker only declares that a group is eligible for PowerPoint-native Chart/Table replacement. Normal `svg_to_pptx.py` runs keep the fallback SVG children and convert them into independently editable DrawingML shapes. Pass `--native-charts-and-tables` only when the data source and chart/table-specific object model matter more than cross-renderer layout fidelity: it emits the PowerPoint Chart/Table object and skips the fallback children to avoid duplicates. Native styling preserves the core palette, text, axis, grid, and background colors where possible, but it is still a PowerPoint Chart/Table object rather than a pixel-identical SVG drawing.@@ -92,7 +130,9 @@ marker/ancestor `translate` and `scale` transforms apply only when at least onebound is inferred. `x`, `y`, `width`, and `height` must be finite and resolveinside PowerPoint's 32-bit DrawingML coordinate range; `width` and `height`must resolve to at least one EMU. Native table frames must additionally resolve-to at least one EMU per resolved row and column.+to at least one EMU per resolved row and column. JSON-first markers require all+four bounds directly in metadata; an approximate preview never supplies their+native frame.**Classic plot-area layout**: supported classic charts accept root `plot_area`;ChartEx rejects it. It contains only finite `x`, `y`, `width`, `height` in@@ -101,11 +141,11 @@ writes `c:manualLayout`; omission keeps automatic layout.**Validation**: `svg_quality_checker.py` validates replacement marker kind, JSONmetadata, bounds/fallback availability, table rows/columns, supported chart-type, chart data shape, and any imported fallback baseline before export.--Imported marker freshness, fallback classification, provenance, and legacy-read compatibility are operational import concerns. Keep generated authoring-free of those attributes; use the exact behavior and field index in+type, chart data shape, and the selected authority contract. Canonical+SVG-first authoring requires a fresh fallback baseline; JSON-first markers skip+fallback freshness because their preview is not authoritative. Import+provenance, fallback classification, and legacy spellings remain operational+compatibility fields; use the exact field index in[`conversion.md`](../scripts/docs/conversion.md#native-table-and-chart-import-claims).```xml@@ -127,9 +167,12 @@ free of those attributes; use the exact behavior and field index in</g>```-**Hard rule — transcribe the authored object**: metadata is the native object's-source of truth and must describe the same data and visible chart/table chrome-as the fallback drawn in that marker group.+**Hard rule — project by the selected authority**: for SVG-first authoring,+metadata is derived from and must describe the same data and visible+chart/table chrome as the fallback drawn in that marker group. For JSON-first+template/native-source objects, the inline metadata is authoritative and the+fallback is only a readable derived preview; approximate preview chrome is not+a contract mismatch.| Object | Required projection from the visible fallback ||---|---|@@ -206,13 +249,14 @@ per-cell `font_size` only when the fallback visibly differs. If the fallbackhas no explicit table font, Default uses the deck body family and declared bodyanchor from `spec_lock.md`; Quick uses its active-context body family and size.-**Hard rule — table metadata is the native source of truth**: Every row,-summary line, value, and cell-level style that must survive-`--native-charts-and-tables` must be present in `columns` / `rows`. SVG fallback text is-discarded during native export. `svg_quality_checker.py` warns when visible-fallback `<text>` inside a native table marker does not appear in metadata.-For numeric or currency columns, use cell objects with `align: "r"`; SVG-`text-anchor="end"` does not carry into the native table.+**Hard rule — table native payload is complete**: Every row, summary line,+value, and cell-level style that must survive `--native-charts-and-tables` must+be present in `columns` / `rows`; SVG fallback text is discarded on that route.+For SVG-first objects this payload is a synchronized projection of the visible+table. For JSON-first template/native-source objects it is the table authority+and the preview may be approximate. For numeric or currency columns, use cell+objects with `align: "r"`; SVG `text-anchor="end"` does not carry into the+native table.**Merged table cells — canonical rectangular contract only**: Put positive JSONinteger `row_span` / `col_span` values on the merge anchor and keep every@@ -306,22 +350,25 @@ imply full visual-axis parity.`title_font_size`, `subtitle_font_size`, `axis_font_size`,`axis_title_font_size`, `legend_font_size`, and `note_font_size` fields arerequired only when the native object must preserve typography that cannot be-inferred unambiguously from the visible fallback.+inferred unambiguously from an SVG-first fallback. JSON-first objects do not+infer typography from their approximate preview; put required values in JSON.-**Chart chrome metadata**: Metadata MUST match fallback chrome. For classic+**Chart chrome metadata**: SVG-first metadata MUST match fallback chrome.+JSON-first metadata owns native chrome and may use a simpler preview. For classiccharts, a string or unbounded-object `title` becomes native `c:title`;`subtitle` is line two. A title object with complete `x`, `y`,`width`, and `height` becomes a companion editable text box at those absoluteslide-px bounds; partial bounds or `subtitle` fail. Use `name`, not`title`, for object naming. `title`, `subtitle`, and axis-title objects may set-`text`, `font_size`, `font_family`, and `color`. The checker rejects title/axis-text absent from the fallback; export omits it with a warning. ChartEx keeps an empty `<cx:title>` and+`text`, `font_size`, `font_family`, and `color`. On SVG-first markers the+checker rejects title/axis text absent from the fallback and export omits it+with a warning; JSON-first keeps it. ChartEx keeps an empty `<cx:title>` andemits title/subtitle as companion editable text boxes. Axistitles are optional and explicit: use `axis_titles` with`category`, `value`, `x`, `y`, or `secondary_value` keys, or the root aliases`category_axis_title`, `value_axis_title`, `x_axis_title`, `y_axis_title`, and-`secondary_value_axis_title`; do not add semantic axis titles that are not-visible in the fallback. Set `show_value_axis_labels: false` when the fallback+`secondary_value_axis_title`; SVG-first must not add semantic axis titles that+are absent from the fallback. Set `show_value_axis_labels: false` when the fallbackkeeps category labels but omits numeric value-axis tick labels, such as a radarchart without radial coordinates. Native legends are metadata-controlled: use`show_legend: true` and `legend_position` only when the fallback's legend is@@ -339,10 +386,11 @@ belong to chart points.**Chart color styling**: For classic native charts, `style.colors` sets seriescolors. The exporter also writes explicit chart-area fill, plot-area fill,axis line, gridline, and label text colors so PowerPoint does not substitute a-white/default-theme chart. If omitted, the exporter infers these colors from-the visible SVG fallback: the largest panel-like `<rect>` becomes the chart+white/default-theme chart. For SVG-first, omitted values are inferred from+the visible fallback: the largest panel-like `<rect>` becomes the chartbackground, fallback text supplies label color, and fallback strokes supply-axis/grid colors. Override any of them explicitly under `style` with+axis/grid colors. JSON-first uses JSON values or stable exporter defaults, not+its preview. Override any of them explicitly under `style` with`chart_area_fill`, `plot_area_fill`, `text_color`, `axis_color`, and`grid_color`; use `"none"` for transparent chart or plot area fill. Generatedpayloads default to uppercase `#RRGGBB`. The exporter retains compatibility fordiff --git a/skills/ppt-master/references/pptx-structure-interface.md b/skills/ppt-master/references/pptx-structure-interface.mdindex ff39d06f..e584f1f2 100644--- a/skills/ppt-master/references/pptx-structure-interface.md+++ b/skills/ppt-master/references/pptx-structure-interface.md@@ -8,7 +8,7 @@ Conditional interface for PowerPoint Master, Layout, fixed-layer, and placeholde## 1. PPTX Structure Routing-Every new SVG project declares one deterministic route. Free-design, brand-only, and `template_reuse_scope: style` projects use `pptx_structure.mode: flat`, omit `pptx_masters` / `pptx_layouts` / `page_pptx_layouts` / `page_layouts`, and author no Master/Layout/layer/placeholder metadata. Export keeps all represented content Slide-local while materializing one clean project-owned Master plus one Blank Layout from the current color/typography lock; stock content placeholders and unused built-in Layouts are removed, while the standard date/footer/slide-number capability hooks remain. Deck/layout template projects whose AI-derived lock records `template_reuse_scope: mirror|layout` use `mode: structured`; `standard` / `fidelity` templates use their authored contract, while mirror templates use the validated source identities and parentage declared by the newly materialized workspace.+Every new SVG project declares one deterministic route. Free-design, brand-only, and `template_reuse_scope: style` projects use `pptx_structure.mode: flat`, omit `pptx_masters` / `pptx_layouts` / `page_pptx_layouts` / `page_layouts`, and author no Master/Layout/layer/placeholder metadata. Export keeps all represented content Slide-local while materializing one clean project-owned Master plus one Blank Layout from the current color/typography lock; stock content placeholders and unused built-in Layouts are removed, while the standard date/footer/slide-number capability hooks remain. Deck/layout template projects whose AI-derived lock records `template_reuse_scope: mirror|layout` use `mode: structured`; `standard` / `fidelity` templates use their authored contract, while mirror templates use the validated source identities and parentage declared by the newly authored compact workspace.**Hard rule — no structure inference**: Flat export performs no promotion or deduplication; every object stays Slide-local. Structured template export compiles only declared root identities, atomic fixed layers, and slot groups—it does not assign Layout families, cluster pages, infer placeholders, repair missing metadata, or migrate legacy contracts. Create a new current workspace through [`create-template`](../workflows/create-template.md) before generating structured pages.@@ -24,7 +24,7 @@ Every new SVG project declares one deterministic route. Free-design, brand-only,**Project lock**: A Master row is `<master_key>: <PowerPoint picker name>`. A unique Layout row is `<layout_key>: <master_key> | <PowerPoint picker name> | <prototype source>`, where the source is a generated `P<NN>` or installed `template:<basename>`. A page assignment is `P<NN>: <layout_key>` under `page_pptx_layouts`. The SVG root values MUST match the assigned definition. A Layout key belongs to exactly one Master and must be globally unique. Reuse one key only when prototypes share identical ordered Layout atoms and slot ids/types/effective indices/default bounds/binding modes. An unused Layout uses a template SVG source and remains registered without a published carrier slide. Every structured route requires numeric `spec_lock.md` typography `title` / `body` rows.-**Template behavior**: Strict preserves the selected prototype's declared Master/Layout/slot contract. Adaptive retains its Master and realizes the current or new Layout key/name declared by Strategist. A construction-discovered change to fixed Layout atoms or slot topology/bounds returns upstream for plan/lock repair, readback, and validation before authoring resumes. Mirror-created prototypes preserve validated source identity, literal paint, typography, effects, atomic geometry, and referenced assets in a new workspace. `standard` / `fidelity` never make source topology authoritative; mirror does not synthesize a replacement topology or fill missing facts.+**Template behavior**: Strict preserves the selected prototype's declared Master/Layout/slot contract. Adaptive retains its Master and realizes the current or new Layout key/name declared by Strategist. A construction-discovered change to fixed Layout atoms or slot topology/bounds returns upstream for plan/lock repair, readback, and validation before authoring resumes. Mirror-created prototypes preserve validated source identity, parentage, slots, meaning, and similar presentation in compact new SVG; paint/geometry nodes need not be isomorphic. `standard` / `fidelity` never make source topology authoritative; mirror does not synthesize a replacement topology or fill missing facts.Imported inherited-shape visibility remains an immutable analysis fact until astructured mirror is materialized. The final mirror root carries that fact with@@ -119,6 +119,11 @@ and visible-stroke rects also remain ordinary objects.| `object` | one text, image, basic SVG shape, or validated compact authored-preset `<g>` marked as carrier; alternatively the slot group declares `binding="proxy"` | `obj` || `media` | one `<image>` or supported imported crop `<svg>`, marked as carrier | `media` |+A template-owned chart/table carrier may declare+`data-pptx-native-authority="json"`. Its inline metadata, marker identity,+bounds, and slot binding remain structural facts; its non-metadata SVG preview+children are derived and may be regenerated without changing that contract.+**Text slot carrier**: A multiline text placeholder must remain one native textframe. Default export and `--reflow-text` do; `--no-merge` cannot supply severalline shapes as one PowerPoint placeholder prototype/binding. Leave strict-line@@ -194,9 +199,9 @@ Existing structured/template projects or source-analysis packages that carry `an| Available source | Allowed create-template behavior ||---|---|-| Original PPTX Type A | `standard` / `fidelity` author new topology; `mirror` preserves supported Master/Layout/placeholder facts that still exist in the package |+| Original PPTX Type A | `standard` / `fidelity` author new topology; `mirror` authors compact SVG from parsed evidence while preserving supported Master/Layout/placeholder facts that still exist in the package || Legacy or unstructured SVG Type B | `standard` / `fidelity` use pages as visual/contextual reference and author a complete new contract; old metadata is not output topology |-| Complete current SVG Type B | `mirror` may preserve the explicit current contract in a new workspace; authored modes may replace it |+| Complete current SVG Type B | `mirror` may author a compact equivalent while preserving the explicit current contract in a new workspace; authored modes may replace it |Without an original PPTX or complete current Type B contract, do not claim mirror or source-topology recovery. After template creation, Generate PPTX Step 3 authors new structured `svg_output/` pages; the exporter only compiles those declarations and never derives, repairs, or migrates structure.diff --git a/skills/ppt-master/references/shared-standards-core.md b/skills/ppt-master/references/shared-standards-core.mdindex c5fcd267..49030c7b 100644--- a/skills/ppt-master/references/shared-standards-core.md+++ b/skills/ppt-master/references/shared-standards-core.md@@ -312,7 +312,8 @@ preview/text hashes, connector endpoints, payload references, and adjustmentformulas—into short `data-pptx-native-ref` records in the same store. Checker,template-structure validation, and export validate and hydrate both layers inmemory. Keep Master/Layout, placeholder, layer, editable-object, diagnostic,-and editable chart/table metadata inline. Legacy inline Base64 and v1+and editable chart/table metadata inline; authoritative Chart/Table JSON stays+inside its SVG marker, never in the payload store. Legacy inline Base64 and v1payload-only stores remain readable.One effect reason remains its existing plain token. If one imported object has@@ -328,13 +329,13 @@ one. This array is still diagnostic metadata, not an authoring surface.| Lossless import SVG | Immutable native payload and preview evidence in the temporary analysis workspace; never editable template source. || Authoring IR bundle | Editable SVG plus model-readable `authoring_summary.json` and tool-only `authoring_manifest.json`. Keep visible intent and document-local `data-pptx-source-ref`, but omit opaque/duplicate carriers. Before hashing, compact safe imported frame/transform coordinates to two decimals. Summary indexes current files; manifest owns source paths/hashes and stays outside model context. || `standard` / `fidelity` output | Use §1.5 compact presets; never transplant opaque payload or source topology. |-| `mirror` output | Materialize edited IR. Rehydrate supported metadata only for a matching Slide-local/slot ref and initial hash; otherwise keep SVG fallback. Expand fixed Master/Layout wrappers to direct semantic atoms without changing ownership, paint order, or appearance. |+| `mirror` output | Template_Designer reviews/authors the compact parsed IR; materialization validates refs/graph and publishes that tree without restoring visible lossless subtrees. Recover only supported non-visible semantics; expand fixed Master/Layout wrappers without changing ownership or intended presentation. |**Hard rule — model-facing page-coordinate precision**:| Surface | Precision contract ||---|---|-| Imported `data-pptx-frame` in authoring IR | At most two decimals; an unchanged mirror ref recovers the exact lossless frame before native-record externalization. |+| Imported `data-pptx-frame` in authoring IR | At most two decimals; the compact frame owns visible geometry. || `data-pptx-bounds` in generated and final template SVG | At most two decimals. || `translate(...)`, `rotate(... cx cy)`, and `matrix(... e f)` | Translation/center values use at most two decimals; keep angle and matrix `a b c d` unchanged. || Protected values | Never compact path/points geometry, crop/nested-`viewBox` ratios, gradient offsets, opacity, scale, canonical preset frames, or lossless/tool-side frames. |@@ -368,12 +369,12 @@ otherwise retaining the visible SVG fallback. A newly authored compact presetto exactly one native shape/connector. Do not use this normalization to changeownership or appearance.-**Hard rule — selective payload**: Do not copy every imported metadata block into-an authored template. Keep the full lossless import SVG separately as immutable-audit/fallback backing. Mirror may reuse only metadata already supported by the-converter on source-ref/hash-matching Slide-local/slot objects; unsupported or-edited objects use the current SVG fallback. `data-pptx-replace-with` remains reserved for the-optional PowerPoint-native Chart/Table replacement contract.+**Hard rule — selective payload**: Keep the lossless import SVG as immutable+evidence; do not copy every metadata block into a template. Mirror publishes the+compact authored subtree and recovers only converter-supported non-visible+metadata, never ordinary visible source XML. Unsupported/edited objects use the+SVG fallback. `data-pptx-replace-with` remains reserved for optional native+Chart/Table replacement.**Registry and rendering rules**:@@ -603,7 +604,11 @@ Use the already locked canvas id and exact viewBox. [`canvas-formats.md`](canvas| PPTX translation | The exporter may map represented SVG content to DrawingML/native objects and deduplicate represented elements into Master/Layout/Slide parts. It MUST NOT invent visible slide content absent from the SVG. || Excluded package behavior | Speaker notes, animations, transitions, narration audio, PPTX relationships, and direct native-PPTX workflows remain separately owned. They are not part of the SVG page-design contract. |-**Hard rule — page-design closure**: A final page SVG is the sole visual/design authority for that page on every SVG-authoring route. SVG is not the authority for the entire PPTX package.+**Hard rule — page-design closure**: A final page SVG is complete but does not+own the whole PPTX package. Its ordinary content and SVG-first Chart/Table+markers are authoritative. For `data-pptx-native-authority="json"`, inline JSON+is authoritative and the visible subtree is a derived, possibly approximate+preview; authority never moves to a sidecar.### 4.1 Semantic SVG Marker Contractdiff --git a/skills/ppt-master/references/strategist-template.md b/skills/ppt-master/references/strategist-template.mdindex d1c8fff5..fac93965 100644--- a/skills/ppt-master/references/strategist-template.md+++ b/skills/ppt-master/references/strategist-template.md@@ -89,7 +89,7 @@ For `mirror` / `layout`, write `pptx_structure.mode: structured` plus `template_- **Page assignment**: Write exactly one `page_pptx_layouts` row per page. Each key must exist in `pptx_layouts`. Check that distinct compositions do not collapse into role-only keys and that one skeleton does not split into topic-specific keys.- **Slot planning**: Each reusable slot is a direct root `<g id>` with `data-pptx-placeholder`, positive design-zone bounds, and exactly one compatible direct carrier. Bounds come from the intended safe area, column, panel inset, or media frame—not sample text ink. A genuinely composite region may use only the explicit `object` + `proxy` downgrade.- **Adaptive refinement**: Initial definitions are complete. If construction shows that reusable framing or slot topology/bounds must change, return to Strategist to add a definition sourced from that page and update its assignment before execution resumes. Executor never mutates or extends the contract; export only compiles declared structure and never discovers or clusters Layouts.-- **Input prototypes**: Add one `page_layouts` row per page using a complete Slide prototype. Strict preserves that SVG's contract; adaptive keeps its Master and may declare a new output Layout; mirror also preserves literal visuals and text-node topology.+- **Input prototypes**: Add one `page_layouts` row per page using a complete Slide prototype. Strict preserves that SVG's contract; adaptive keeps its Master and may declare a new output Layout. Mirror preserves ordinary authored visuals and text-node topology; a direct JSON-first Chart/Table may regenerate only its derived preview children while retaining marker, metadata, bounds, and structure.**Visualization compatibility**: Use `page_layouts` with optional Chart/Table`page_visualizations` only when the prototype shell can carry the actual §IXdiff --git a/skills/ppt-master/references/template-designer.md b/skills/ppt-master/references/template-designer.mdindex 0a53ab8a..211bc1a1 100644--- a/skills/ppt-master/references/template-designer.md+++ b/skills/ppt-master/references/template-designer.md@@ -32,7 +32,7 @@ When the workflow provides a PPTX reference source, the effective input package- `svg/slide_NN.svg` — immutable slide-local native-payload backing; do not bulk-read because opaque native payload is retained- `svg/inheritance.json` — which layout / master each slide consumes- optional `svg-flat/slide_NN.svg` — immutable complete-page verification backing generated only when explicitly requested; do not use it as the editable source-- `authoring-svg/` and optional `authoring-svg-flat/` — lightweight non-destructive IR bundles published by `pptx_template_import.py` for Type A input or created by the standalone `svg_authoring_view.py` migration path; each contains editable SVGs, model-readable `authoring_summary.json`, and tool-only `authoring_manifest.json`+- `authoring-svg/` and optional `authoring-svg-flat/` — new compact SVG bundles generated from parsed PPTX evidence by `pptx_template_import.py` for Type A input or by the standalone `svg_authoring_view.py` migration path; the layered bundle is Template_Designer's editable authoring surface and also contains model-readable `authoring_summary.json` plus tool-only `authoring_manifest.json`- optional screenshots for visual cross-checkingPPTX import interpretation:@@ -46,7 +46,7 @@ Input priority for PPTX-backed template creation depends on the AI-derived inter| Mode | Authoritative inputs | Model-facing inputs ||---|---|---|| `standard` / `fidelity` | Finalized brief for the newly designed output; `analysis/manifest.json` for factual canvas/theme/resources | `authoring-svg/authoring_summary.json`, every layered source Master/Layout as structural and visual evidence, layered source Slides, optional flat spot checks, and exported resources. Do not read `authoring_manifest.json`. `standard` authors a compact result; `fidelity` authors broader useful source-aligned coverage. Neither copies source identities merely because they exist. |-| `mirror` | `analysis/manifest.json`, `analysis/native_structure.json`, and `svg/inheritance.json`; the compiler validates the tool-only authoring manifest | `authoring-svg/authoring_summary.json` plus layered authoring SVGs as the editable preservation IR; optional `authoring-svg-flat/` for complete-page verification; matching lossless `svg/` and optional `svg-flat/` only as immutable backing. |+| `mirror` | Inline native Chart/Table JSON plus `analysis/manifest.json`, `analysis/native_structure.json`, and `svg/inheritance.json`; the publisher validates the tool-only authoring manifest | `authoring-svg/authoring_summary.json` plus every reachable layered compact SVG as the editable authoring source; optional `authoring-svg-flat/` for complete-page verification; matching lossless `svg/` only for source/package validation and supported non-visible payload recovery, never visible-subtree copying. |**Mandatory — authored construction bundle**: As soon as `replication_mode`resolves to `standard` or `fidelity`, and before selecting any page or template@@ -67,14 +67,15 @@ behavior. Deck identity owns paint, typeface identity, and fixed identityassets; its application context describes the recurring presentation family. Underdownstream `layout` scope, resolve final placeholder formatting from the Layoutroles plus the confirmed identity, reading mode, and type scale; downstream-`mirror` scope preserves literal source formatting and text topology. Compile+`mirror` scope preserves source structure and comparable presentation while+allowing compact SVG spelling. Compilethe applicable rules into the same native graph without merging their sourceownership.| Mode | Output structure contract ||---|---|| `standard` / `fidelity` | Review the complete source Master/Layout inventory, then author complete project-canonical Slide SVG prototypes and an intentional new Master/Layout/slot system. Every retained Layout has at least one Slide prototype. `standard` stays compact; `fidelity` retains broader useful source-aligned families. Source identities do not define the output topology. Choose page-fit contours from the full native vocabulary before their authoring forms; keep exact native atoms independent, materialize a Boolean result only where one contour requires it, and use freeform last. |-| `mirror` | Materialize one complete SVG per validated source Slide, retaining only its referenced Layout and parent Master. Keep reachable identities, parentage, assignment, placeholder facts, and supported visual/native facts. Mechanical normalization completes inherited context and maps fixed-layer source groups into direct atoms while preserving ownership, paint order, and appearance; it must not invent missing facts or semantically redesign the reachable graph. |+| `mirror` | Review and author one complete compact SVG per validated source Slide, retaining only its referenced Layout and parent Master. Keep reachable identities, parentage, assignment, placeholder facts, inline JSON native authority, and source meaning. Presentation should remain recognizably similar, but SVG nodes and code need not be isomorphic. Publication completes inherited context and maps fixed-layer groups into direct atoms without inventing facts or semantically redesigning the reachable graph. |Every output is a complete standalone Slide SVG preview that resolves Master +Layout + Slide context. Explicit layer markers retain ownership; standalone@@ -90,8 +91,9 @@ Master/Layout fixed-layer ownership. This is the only `<g>` exception to thefixed-layer atomicity rule; ordinary groups remain forbidden there. Presetpaint comes from the confirmed brief and `<design_spec_path>`color scheme. Do not copy an expanded import carrier/preview/fingerprint-bundle into an authored template. `mirror` instead preserves the supported-expanded lossless source representation. The exact syntax and validation+bundle into an authored template. `mirror` instead uses the new compact parsed+SVG as its visible authoring source and never transplants the expanded lossless+visible subtree. The exact syntax and validationcontract remain owned by[`shared-standards-core.md`](./shared-standards-core.md) and the native-shape reference.When one preset is insufficient, apply the same reference's compound-page gate:@@ -120,9 +122,9 @@ The output page set is determined by the confirmed natural-language creation int|------|-------------|--------|| `standard` (default internal strategy) | The requested result is a clean, reusable, compact system | Cover, chapter, ending, optional TOC, and one or a small explicitly required set of distinct content Layouts; typically 4–6 prototypes || `fidelity` | The natural-language intent calls for broader, source-aligned but newly designed coverage | Canonical roles plus intentionally designed variants that cover the useful source composition range |-| `mirror` | The natural-language intent calls for preserving validated native source facts | One SVG prototype materialized from the authoring IR per source slide, named `<NNN>_<page_type>.svg` by source order |+| `mirror` | The natural-language intent calls for preserving validated native source facts and a similar presentation | One compact SVG prototype reviewed/authored from parsed evidence per source slide, named `<NNN>_<page_type>.svg` by source order |-**Hard rule — mode controls authorship**: `standard` and `fidelity` inspect the complete source structure but create new SVG documents and their own Master/Layout system. `mirror` maps validated source Slides and their reachable structure into a new workspace and must not reauthor, distill, reinterpret, or supplement that closure.+**Hard rule — mode controls authorship**: `standard` and `fidelity` inspect the complete source structure but create new SVG documents and their own Master/Layout system. `mirror` also authors compact new SVG from parsed evidence, but it must retain the validated reachable identities, assignments, slots, meaning, and similar presentation rather than distilling, supplementing, or redesigning that closure. Code and node identity are not preservation requirements.### Standard mode@@ -165,21 +167,21 @@ Extension page types beyond the canonical four (transition / appendix / disclaim### Mirror mode-When the derived implementation writes `replication_mode: mirror`, materialize a new template workspace from validated imported facts rather than designing a new system:+When the derived implementation writes `replication_mode: mirror`, author a new compact template workspace from validated parsed evidence rather than designing a different system:- Kind eligibility: Create Layout mirror is legal only when the validated source contract is already brand-neutral and application-neutral. If supported source facts retain organization-specific identity or reusable application policy, stop and return to Create Template dispatch: use `standard` / `fidelity` to author a new Layout, or Create Deck to retain those facts. Removing, repainting, retyping, or discarding application rules is never mirror.-- Model-facing authoring source: `authoring-svg/authoring_summary.json`, layered `authoring-svg/*.svg`, `svg/inheritance.json`, and `analysis/native_structure.json`. Do not read `authoring-svg/authoring_manifest.json`; materialization validates it internally. When present, use `authoring-svg-flat/` only for full-page verification. Matching lossless `svg/` and optional `svg-flat/` files are immutable backing; materialization resolves only the layered backing.+- Model-facing authoring source: `authoring-svg/authoring_summary.json`, every reachable layered `authoring-svg/*.svg`, `svg/inheritance.json`, and `analysis/native_structure.json`. Template_Designer must actually inspect and, where needed, redraw/normalize these new compact SVGs before publication. Do not read `authoring-svg/authoring_manifest.json`; the publisher validates it internally. When present, use `authoring-svg-flat/` only for full-page verification. Matching lossless `svg/` files are immutable source/package evidence and non-visible payload backing, never visible authoring input.- Precondition: the import evidence identifies every source Slide and its referenced Layout/Master, picker names, placeholder contract, and fixed visual layers. Stop when required reachable facts or supported mirrored geometry are missing; unused source identities are out of scope.- Output: `<template_workspace>/templates/<NNN>_<page_type>.svg` for every source Slide and no standalone Master/Layout SVG. `<NNN>` is the zero-padded source slide index (3 digits) and `<page_type>` comes from `analysis/manifest.json` `pageTypeCandidates` — `cover` / `toc` / `chapter` / `content` / `ending`, falling back to `content`. Preserve source Slide order.- Context completion: each source-page SVG resolves Master + Layout + Slide context while retaining explicit layer markers, so completion does not flatten ownership.-- Required preservation: within the reachable closure, preserve source Master/Layout keys and picker names, Layout-to-Master parentage, slide assignments, placeholder type/index/bounds, supported native-object metadata, geometry, decoration, sprite-sheet wrappers, original example text, chart previews, fonts, effects, and paint order whenever the importer represents them.-- Allowed normalization: add or normalize explicit root declarations and asset paths, complete inherited context, and recursively expand fixed Master/Layout group wrappers into direct atoms. The mapping must remain one-to-one at the ownership level and must not change paint order or appearance.-- Forbidden: commonality extraction, semantic synthesis, merging, splitting, promotion, demotion, renaming, re-parenting, decorative simplification, placeholder invention, or replacement of supported source-native metadata / SVG fallback with a model-authored approximation.+- Required preservation: within the reachable closure, preserve source Master/Layout keys and picker names, Layout-to-Master parentage, slide assignments, placeholder type/index/bounds, original example meaning, sprite-sheet crop behavior, and supported native facts. Imported/template-owned Chart/Table inline JSON is authoritative; its compact SVG preview may be approximate.+- Allowed authoring: redraw or normalize visible SVG geometry, paint spelling, grouping, root declarations, asset paths, and fixed-layer wrappers when the resulting presentation remains similar and ownership/paint intent stays intact. Complete inherited context and emit direct structural atoms; code, node count, and exact path identity need not match the import.+- Forbidden: commonality extraction, semantic synthesis, promotion/demotion, renaming, re-parenting, placeholder invention, changes to authoritative Chart/Table JSON without matching intent, or any visible redesign that changes the source communication result.- `<design_spec_path>` §V gives each emitted source-Slide prototype a roster row. If relevant, one sentence notes source Master/Layout identities outside the mirror closure; `Source Preservation Map` records each retained source-Slide assignment.**Mirror consumption boundary**: `replication_mode: mirror` describes source-to-workspace fidelity and only makes literal downstream reuse technically possible. Strategist independently derives the application plan from the current communication contract, content, actual prototype roster, and any explicit natural-language instruction. It may select, repeat, skip, reorder, or reorganize prototypes; no internal scope forces source page count, source order, or one output slide per source slide.-**What mirror is not**: a redesign, topology-cleanup, or recovery mode. It may mechanically complete inheritance and transcode the imported representation into the current explicit SVG/package contract, so byte identity is not promised. Charts, SmartArt, OLE objects, and EMF / WMF media that fail to round-trip in `pptx_template_import.py` will fail the same way in mirror. If the import workspace has missing media or unsupported objects, mirror inherits those gaps — report them before materialization begins.+**What mirror is not**: a redesign, topology-cleanup, or recovery mode. It is a new compact SVG authoring pass over parsed evidence, followed by deterministic validation/publication; neither byte identity nor SVG-code identity is promised. Charts, SmartArt, OLE objects, and EMF / WMF media that fail to enter the parsed evidence cannot be recovered by mirror. If the import workspace has missing media or unsupported objects, mirror inherits those gaps — report them before authoring begins.---@@ -360,7 +362,7 @@ If PPTX import output exists:- For `standard`, inspect the complete lightweight source Master/Layout inventory plus enough complete-page IR documents to understand the requested visual direction, structural vocabulary, and reusable assets. Author a compact new structure; source identities are evidence, not output requirements.- For `fidelity`, inspect every lightweight source Master/Layout and complete-page IR document so the newly designed roster covers the useful source structure and composition range. Author broader source-aligned families without automatically copying every source identity.-- For `mirror`, verify every source Slide and its referenced Layout/Master against `authoring_summary.json`, `analysis/native_structure.json`, and `svg/inheritance.json`, then materialize only that reachable graph from the IR with matching lossless payload backing. Before materialization begins, report source Slide indexes plus retained and omitted Master/Layout identities.+- For `mirror`, verify every source Slide and its referenced Layout/Master against `authoring_summary.json`, `analysis/native_structure.json`, and `svg/inheritance.json`; then review/author every reachable compact SVG and publish only that graph. Lossless backing may validate provenance and recover supported non-visible payload, but never replaces the visible authored tree. Before authoring begins, report source Slide indexes plus retained and omitted Master/Layout identities.### 2.1 PPTX Import Mode Rule@@ -370,28 +372,31 @@ The imported PPTX has a different authority level in each replication mode.|---|---|| `standard` | Review the complete source Master/Layout and visual evidence, then author a compact project-canonical roster and its Master/Layout/slot structure from the confirmed brief. Do not preserve source identities merely because they exist. || `fidelity` | Review the complete source Master/Layout and visual roster, then author a broader canonical roster and its own useful source-aligned Master/Layout/slot families. Match the source visual language closely without implying one-to-one identity retention. |-| `mirror` | Preserve validated source Slides and their reachable inheritance, placeholders, native objects, and visuals while creating a new workspace. Complete each standalone SVG's inherited context, but do not simplify, redesign, rename retained structure, infer new common structure, or fill semantic gaps. |+| `mirror` | Preserve validated source Slides and their reachable inheritance, placeholders, native facts, meaning, and similar presentation while authoring a compact new workspace. Complete each standalone SVG's inherited context; visible SVG may be redrawn/normalized without code isomorphism, but retained structure cannot be renamed and semantic gaps cannot be invented. |-**Hard rule — mirror materialization is mechanical**: Mirror may normalize namespaces,-portable asset paths, explicit root declarations, and fixed-layer group wrappers-required by the current compiler. Expanding a source Master/Layout group must-produce direct atoms with the same ownership, transforms, paint order, and-appearance. A maintainability preference is not authority to alter the source-template.+**Hard rule — mirror publication is mechanical, visual authoring is not**:+Template_Designer owns the compact visible SVG created from parsed evidence.+The materializer validates source identity/SHA, refs, graph, assignments, and+closure; composes inherited context; strips IR-only refs; and publishes that+current tree. It must never replace an unchanged visible subtree with lossless+source XML. Redrawing for compactness is allowed only while structure, meaning,+ownership, and a similar presentation remain intact.### 2.2 Native Shape Payload and Authoring IR| Representation | Purpose | Payload rule ||---|---|---|-| Lossless import SVG | Native-payload backing | Retain complete imported metadata, native object boundaries, hidden carriers, and source-scope identity. Keep it immutable and resolve it only through validated source refs. |-| Authoring IR bundle | Editable template-creation source | Omit opaque native payload and duplicate hidden carriers from model context; retain visible shape intent and stable document-local source refs. Models read `authoring_summary.json`; tools read `authoring_manifest.json` for source paths and initial hashes. |+| Lossless import SVG | Immutable source/package evidence | Retain complete imported metadata, native object boundaries, hidden carriers, and source-scope identity for validation and supported non-visible payload recovery. Never copy its ordinary visible subtree into final templates. |+| Authoring IR bundle | Editable template-creation source | New compact SVG generated from parsed PPTX evidence. Omit opaque native payload and duplicate hidden carriers from model context; retain visible shape intent and stable document-local source refs. Models read `authoring_summary.json`; tools read `authoring_manifest.json` for source paths and initial hashes. || `standard` / `fidelity` output | Newly authored contract | Use editable basic primitives directly and `preset_shape_svg.py` compact canonical `<g>` output for exact preset matches. Keep faithful atoms independently composed when one contour is unnecessary; use `shape_boolean_svg.py` only where one compound closed contour must become an object, then allow a necessary freeform only if neither construction is faithful. Paint comes from the confirmed brief / `<design_spec_path>`. Reuse exported image/vector assets, not opaque source shape payload or source topology. |-| `mirror` output | Materialized preserved contract | Preserve currently supported imported metadata on unchanged Slide-local/slot refs, use the edited SVG fallback otherwise, and normalize fixed structural layers into semantic atoms. Strip IR-only source refs from final templates. |+| `mirror` output | Authored compact preservation contract | Publish the reviewed current authoring SVG, preserve validated structure/native facts, recover only supported non-visible semantics, and normalize fixed structural layers into semantic atoms. Strip IR-only source refs; never rehydrate ordinary visible source subtrees. |**Validation**: Mirror does not silently use stale metadata. Materialization-validates source-document hashes and each referenced object's initial authoring-hash before reusing native payload. If an imported object cannot use the-converter's supported native metadata after normalization, keep its current SVG fallback and report the+validates source-document hashes, known refs, graph/assignment closure, and+classifies authoring subtree hashes; a changed subtree is a legitimate authored+edit, not permission to copy the old visible tree back. If an imported object+cannot use the converter's supported non-visible metadata after normalization,+keep its current SVG fallback and report thelimitation. For exact registered preset matches, `standard` / `fidelity`regenerate the compact helper group instead of transplanting opaque sourcepayload; otherwise they keep faithful atoms independently composed unless one@@ -405,7 +410,7 @@ Chart/Table replacement markers.|---|---|| Master/Layout identity | Root `data-pptx-master` / `data-pptx-master-name` plus `data-pptx-layout` / `data-pptx-layout-name`; authored keys for `standard` / `fidelity`, source keys for `mirror` || Authored Master/Layout visual | In `standard` / `fidelity`, use a direct atomic child with `data-pptx-layer="master|layout"` and `data-pptx-editable="false"`. An ordinary `<g>` is forbidden; one validated compact canonical authored-preset `<g>` is a semantic atom and is the sole group exception. |-| Preserved source Master/Layout visual | In `mirror`, recursively expand each fixed-layer source group into direct atoms with the same Master/Layout ownership, transforms, styles, paint order, and appearance; semantic regrouping is forbidden |+| Preserved source Master/Layout visual | In `mirror`, author direct atoms with the same Master/Layout ownership and comparable paint order/presentation. Compact grouping, geometry, and style spelling may differ; semantic regrouping or ownership changes are forbidden. || Content slot | Direct `<g id>` with `data-pptx-placeholder` and explicit `data-pptx-bounds`; `standard` / `fidelity` author the slot, while `mirror` preserves source type/index/bounds and carrier identity || Page-only background | Direct full-canvas solid rect with `data-pptx-layer="slide"` || Structural page-frame hint | Optional `data-pptx-role` only when background/decoration/header/footer/logo/watermark/chrome/page-number behavior is not already expressed by layer/placeholder metadata; stable unique `id` required |@@ -573,13 +578,13 @@ Mirror mode emits one SVG per source slide, named by source order:└── 050_ending.svg```-Filenames preserve the source slide order via the 3-digit prefix; `<page_type>` is derived from `analysis/manifest.json` `pageTypeCandidates`. Literal source text and validated native structure facts are preserved when the authoring IR is materialized into the new workspace; IR-only refs and its manifest are not copied into the template output.+Filenames preserve the source slide order via the 3-digit prefix; `<page_type>` is derived from `analysis/manifest.json` `pageTypeCandidates`. Source meaning and validated native structure facts are preserved while Template_Designer authors the compact new SVG; code/node identity is not required, and IR-only refs plus its manifest are not copied into template output.**Hard rule — common routing**: Keep `<design_spec_path>`, template SVGs, and non-bitmap template-source assets in `templates/`; place every bitmap in `images/`; place each imported vector exactly once in `icons/imported/` and reference it as `data-icon="imported/<name>"`. Never create `templates/icons/`. Write a review deck to `exports/` when explicitly requested and always for a multi-Master package gate. Create Template must not create optional directories or placeholder files solely to retain empty paths. An initialized project may already contain empty scaffolding; leave it untouched and omit it from completion unless real template files were written or adopted there. Do not branch asset placement by output scope.### Template Preview-When the user requests a PowerPoint review file or the validated roster declares multiple Masters, run `template_preview_pptx.py <template_workspace>` after SVG validation. The command creates `exports/` on demand and verifies one slide per SVG prototype plus the expected Master/Layout counts. In authored modes, it shortens canonical marker text only in ephemeral review copies so prompts remain readable without changing the source SVG, carrier typography, or placeholder frames. The first export refuses a collision; an intentional post-fix replacement uses `--force`. The review PPTX is derived evidence and never a template-application input.+When the user requests a PowerPoint review file or the validated roster declares multiple Masters, run `template_preview_pptx.py <template_workspace>` after SVG validation. The default review keeps visible SVG Chart/Table fallbacks. To verify JSON-first native capability, write a separately named review with `--native-charts-and-tables -o <distinct_path>`; marker presence alone never activates replacement. The command creates `exports/` on demand and verifies one slide per SVG prototype plus the expected Master/Layout counts. In authored modes, it shortens canonical marker text only in ephemeral review copies so prompts remain readable without changing the source SVG, carrier typography, or placeholder frames. The first export refuses a collision; an intentional post-fix replacement uses `--force`. The review PPTX is derived evidence and never a template-application input.When a review deck was generated, include its path in the completion summary. Omit `exports/` only for an unrequested one-Master package.diff --git a/skills/ppt-master/scripts/README.md b/skills/ppt-master/scripts/README.mdindex 4d3b65ca..85527dee 100644--- a/skills/ppt-master/scripts/README.md+++ b/skills/ppt-master/scripts/README.md@@ -52,7 +52,7 @@ python3 scripts/update_repo.py|------|-----------------|---------------|| Conversion | `source_to_md.py`, `source_to_md/pdf_to_md.py`, `source_to_md/doc_to_md.py`, `source_to_md/excel_to_md.py`, `source_to_md/ppt_to_md.py`, `source_to_md/web_to_md.py`, `pptx_intake.py`, `pptx_to_svg.py` | [docs/conversion.md](./docs/conversion.md) || Project management | `project_manager.py`, `workflow_log.py`, `workflow_transcript.py`, `batch_validate.py`, `generate_examples_index.py`, `error_helper.py`, `pptx_template_import.py`, `template_fill_pptx.py`, `native_enhance_pptx.py`, `pptx_delivery_check.py` | [docs/project.md](./docs/project.md) |-| SVG pipeline | `preset_shape_svg.py`, `shape_boolean_svg.py`, `svg_authoring_view.py`, `authoring_roundtrip.py`, `compact_svg_coordinates.py`, `compact_svg_styles.py`, `mirror_template_materialize.py`, `finalize_svg.py`, `svg_to_pptx.py`, `template_preview_pptx.py`, `total_md_split.py`, `svg_quality_checker.py`, `extract_svg_assets.py`, `extract_svg_pictures.py`, `animation_config.py`, `notes_to_audio.py`, `narration_sync.py` | [docs/svg-pipeline.md](./docs/svg-pipeline.md); [native shape authoring](../references/native-shape-authoring.md) |+| SVG pipeline | `preset_shape_svg.py`, `shape_boolean_svg.py`, `svg_authoring_view.py`, `authoring_roundtrip.py`, `compact_svg_coordinates.py`, `compact_svg_styles.py`, `stamp_native_fallbacks.py`, `mirror_template_materialize.py`, `finalize_svg.py`, `svg_to_pptx.py`, `template_preview_pptx.py`, `total_md_split.py`, `svg_quality_checker.py`, `extract_svg_assets.py`, `extract_svg_pictures.py`, `animation_config.py`, `notes_to_audio.py`, `narration_sync.py` | [docs/svg-pipeline.md](./docs/svg-pipeline.md); [native shape authoring](../references/native-shape-authoring.md) || PPTX transitions | `pptx_transitions.py` | [docs/pptx-transitions.md](./docs/pptx-transitions.md) || PPTX animations | `pptx_animations.py`, `animation_config.py` | [docs/pptx-animations.md](./docs/pptx-animations.md) || Animation resources | `sound_sync.py` | [sound vocabulary and sync](../templates/sounds/README.md); [docs/pptx-animations.md](./docs/pptx-animations.md) |@@ -118,6 +118,7 @@ python3 scripts/pptx_template_import.py <template.pptx> --manifest-onlypython3 scripts/pptx_template_import.py <template.pptx> --inheritance-mode bothpython3 scripts/svg_authoring_view.py <imported-svg-or-dir> -o <output-dir> --projection-kind layeredpython3 scripts/svg_authoring_view.py <authoring-dir> --refresh-summary+python3 scripts/stamp_native_fallbacks.py <svg-file-or-directory> --writepython3 scripts/svg_quality_checker.py <template_workspace>/templates --template-mode --canonical-authoringpython3 scripts/mirror_template_materialize.py <import_workspace> <template_workspace>python3 scripts/svg_to_pptx.py <import_workspace> --roundtrip@@ -166,12 +167,15 @@ deterministic extraction baseline, restores unchanged refs from the immutablelayered backing, and sends the temporary result through preserve export whileleaving edited/deleted/new authoring content in place.-`mirror_template_materialize.py` is the deterministic Type A mirror compiler.-It consumes only the layered `authoring-svg/` IR as editable input, loads its-tool-only manifest internally, and validates it against immutable `svg/`,+`mirror_template_materialize.py` is the deterministic Type A mirror+validator/publisher. Template_Designer first reviews and authors the compact+layered `authoring-svg/` tree. The command loads its tool-only manifest and+validates it against immutable `svg/`,`analysis/native_structure.json`,`svg/inheritance.json`, `sources/source.pptx`, and any extracted-vector-inventory, then publishes a structured Slide roster atomically. Mirror retains+inventory, then publishes the current visible authoring tree atomically. It+never replaces an unchanged visible subtree with lossless source XML; that+backing supplies provenance and supported non-visible semantics only. Mirror retainsonly the Layout/Master chain reachable from each source Slide. Every output SVGresolves Master + Layout + Slide context while keeping layer ownership explicit;source identities unused by every Slide produce no SVG.@@ -375,7 +379,16 @@ Supported parsed column/bar/line/area, pie/doughnut, scatter, and bubble chartsThe ChartEx importer accepts exactly the validated treemap, sunburst, histogram, pareto, box-whisker, waterfall, and funnel data models. Supported hierarchy/category/value/series/subtotal data round-trips to native output; source style, axes, labels, and binning may normalize. Numeric caches must be non-empty and finite with exact contiguous point topology. This is not arbitrary ChartEx import or presentation fidelity, and the ChartEx native writer still only promises valid payload palette entries rather than full source styling.-Active imported table/chart markers carry `data-pptx-fallback-sha256`. Visible fallback edits, reachable SVG fragment-definition changes, marker-local reference-target changes, and marker transforms make the baseline stale: the mandatory quality checker warns, default export remains available, and `--native-charts-and-tables` fails instead of discarding the SVG edit. Generated authoring and reusable templates omit import provenance and a static baseline without warning. Hashless legacy imported markers that still carry PPTX import provenance remain convertible with a checker/replacement-route warning. Legacy `data-pptx-native*`, `data-pptx-visual-status`, and `data-pptx-route-status` spellings and the `--native-objects` option remain read-compatible; generated output and canonical commands use the replacement/fallback names and `--native-charts-and-tables`.+Imported/template-owned table/chart markers carry+`data-pptx-native-authority="json"`; their inline JSON is authoritative and the+visible fallback is a derived preview, so fallback freshness does not veto+native export. Free-designed markers omit the authority attribute and are+SVG-first. After their visible fallback and JSON are synchronized, run+`stamp_native_fallbacks.py ... --write`; missing, invalid, or stale baselines+leave default fallback export available but make `--native-charts-and-tables`+fail closed. Only that explicit flag activates Chart/Table replacement; marker+presence, semantic tables, and imported chart packages do not. Legacy marker+spellings and `--native-objects` remain read-compatible.Exporter-canonical classic charts also recover canonical solid series/slicecolors and exact one- or two-paragraph title styling; two paragraphs retaindiff --git a/skills/ppt-master/scripts/docs/conversion.md b/skills/ppt-master/scripts/docs/conversion.mdindex 8997a2e4..e4cef2c5 100644--- a/skills/ppt-master/scripts/docs/conversion.md+++ b/skills/ppt-master/scripts/docs/conversion.md@@ -368,8 +368,10 @@ claiming native reconstruction. It records `formula-not-reconstructed`;### Native table and chart import claimsSupported text-grid tables and conservative classic-chart caches carry a-`data-pptx-replace-with` claim beside their SVG fallback, with the replacement-payload in a child `<metadata type="application/json">`. The parent claim+`data-pptx-replace-with` claim plus+`data-pptx-native-authority="json"` beside their SVG preview, with the+authoritative replacement payload in a child+`<metadata type="application/json">`. The parent claimselects the table or chart schema. Table import requiresexact physical row/grid topology and accepts canonical rectangular merges,safe solid/no-fill per-side borders, plain multi-paragraph cells, and a closed@@ -413,21 +415,16 @@ warning when the SVG fallback itself is complete. Imported table/chart groupsunder this contract carry `data-pptx-import-source="pptx"`, whether active orfallback-only; generated authoring omits this provenance attribute.-Active imported markers also carry `data-pptx-fallback-sha256`, computed over-their canonical fallback plus reachable document-level SVG fragment definitions.-A later visible edit, reachable definition change, local reference-target-change, or marker transform makes the replacement metadata stale. The mandatory-quality checker reports the mismatch; default export keeps the edited fallback,-while `--native-charts-and-tables` fails before replacement so it cannot discard that edit.-`visibility:hidden` content, marker-local unused definitions, and explicitly-referenced document-level target roots (even when hidden) are included-conservatively; marker-local `display:none` subtrees are excluded, and external-file bytes are not read.-Generated authoring and reusable templates omit import provenance and do not-preseed a static fallback hash; that state is normal and does not warn. A legacy-imported marker that still carries PPTX import provenance but lacks the hash-remains native-compatible and warns in the checker/native route that stale-detection is unavailable.+JSON-first imported markers do not use preview freshness to veto native export;+their preview may be normalized or approximate. Free-designed Chart/Table+markers omit the authority attribute and are SVG-first. After their visible+fallback and JSON are synchronized, `stamp_native_fallbacks.py --write` records+`data-pptx-fallback-sha256` over the canonical fallback plus reachable+document-level SVG definitions. A later visible/reference/transform edit makes+that baseline stale. Default export keeps the edited fallback; canonical check+and `--native-charts-and-tables` fail before replacement. A missing/invalid+SVG-first baseline also fails native replacement. The hash detects later edits;+it does not prove that independently authored JSON matches the SVG.Legacy `data-pptx-native*`, `data-pptx-visual-status`, and`data-pptx-route-status` spellings remain read-compatible. New importer outputdiff --git a/skills/ppt-master/scripts/docs/svg-pipeline.md b/skills/ppt-master/scripts/docs/svg-pipeline.mdindex 3a79164d..4acb6026 100644--- a/skills/ppt-master/scripts/docs/svg-pipeline.md+++ b/skills/ppt-master/scripts/docs/svg-pipeline.md@@ -367,8 +367,9 @@ The default run is a dry-run JSON report. `--inplace` atomically replaces onlychanged legacy SVG files. `--keep-native-frames` compacts `data-pptx-bounds`,translation values, rotation centers, and matrix `e/f`, while preserving canonicalauthored-preset or inline native frames. `svg_authoring_view.py` separately-compacts imported model-facing frames because unchanged mirror refs can recover-their exact coordinates from immutable lossless backing.+compacts imported model-facing frames because the compact authoring tree owns+visible coordinates; lossless backing only validates identity and recovers+supported non-visible semantics.The compactor never rounds path/points geometry, normalized crop or nested`viewBox` ratios, gradient offsets, opacity, scale arguments, rotation angles,@@ -442,20 +443,34 @@ not progressively extract their remaining parent or sibling geometry. Anin-place pass over an authoring bundle refreshes `authoring_summary.json`automatically.+## `stamp_native_fallbacks.py`++After an SVG-first Chart/Table fallback and its inline JSON projection are+updated together, validate and bind the visible subtree explicitly:++```bash+python3 scripts/stamp_native_fallbacks.py <svg-or-directory> --write+```++Omit `--write` for a read-only preview. The command prevalidates every direct+Chart/Table marker, skips JSON-first markers, and atomically adds/updates only+`data-pptx-fallback-sha256` without reformatting the document. The fingerprint+detects later visible edits; it is not a semantic-equivalence proof.+## `mirror_template_materialize.py`-Compile one Type A PPTX import workspace into a deterministic structured mirror-template after the layered authoring IR has been reviewed and edited:+Validate and publish one Type A PPTX import workspace as a deterministic+structured mirror after Template_Designer has reviewed/authored the new compact+layered SVG:```bashpython3 scripts/mirror_template_materialize.py \<import_workspace> <template_workspace>```-The command treats `<import_workspace>/authoring-svg/` as the sole editable-source. It reads the tool-only layered authoring manifest internally and-validates it against immutable lossless SVG-hashes, source PPTX hash, the source Slide roster and reachable Master/Layout+The command treats `<import_workspace>/authoring-svg/` as the sole visible+editable source. It reads the tool-only layered authoring manifest internally+and validates source SVG/PPTX hashes, known refs, the source Slide roster and reachable Master/Layoutgraph, inheritance visibility facts, source-ref closure, and extracted-vector inventory before itwrites anything. It accepts an absent/empty destination or a project`templates/` containing unique qualified Brand/Style specs plus, for a@@ -476,9 +491,10 @@ Theme bytes keyed by retained Master. Structured export validates that sidecaragainst the Master roster and installs one Theme per Master; it is not an SVGprototype or page-authoring input.It mechanically expands fixed Master/Layout group wrappers into direct atoms,-rehydrates only unchanged converter-supported Slide-local/slot refs, keeps the-current SVG fallback for edited refs, preserves explicit text hard breaks, and-removes every IR-only source ref. Imported axis-flipped groups retain their+publishes the current compact visible authoring tree for both changed and+unchanged refs, recovers only supported non-visible semantics such as explicit+text hard breaks, and removes every IR-only source ref. It never replaces an+ordinary visible subtree with lossless source XML. Imported axis-flipped groups retain theirgeometry reflection while descendant SVG text receives a matchingcounter-reflection, preserving PowerPoint's upright glyph appearance in browserpreviews. Supported opaque `p:txBody`,@@ -506,7 +522,9 @@ text/tspan topology and attributes. These records are deterministic tooldiagnostics, not page-authoring inputs. Page-context emits only the completeprototype's path and SHA for that reference, so the model reads the SVG onceper execution context and reuses it until the SHA changes. The model chooses-semantics and edits only existing visible text values, while checker and+semantics and edits only permitted visible text values; a direct JSON-first+Chart/Table may regenerate its derived preview children while keeping marker,+metadata, bounds, and structure. Checker andstructured export validate output attributes, text/tspan topology, andreferenced-resource hashes againstthe prototype.@@ -517,7 +535,7 @@ files to `native-payloads/imported/`. The JSON reportreports payload occurrence, native-record, unique-byte, and compressed-storecounts and is written to stdout only. The command intentionally does not create`templates/design_spec.md`; Template_Designer writes the package-specific rules-and page roster after materialization. This compiler is for Type A mirror materialization,+and page roster after publication. This validator/publisher is for Type A mirror,not `standard` / `fidelity`, loose Type B SVGs, ordinary generation, finalize,or export.diff --git a/skills/ppt-master/scripts/prompt_audit_manifest.json b/skills/ppt-master/scripts/prompt_audit_manifest.jsonindex 09128e22..d03b445f 100644--- a/skills/ppt-master/scripts/prompt_audit_manifest.json+++ b/skills/ppt-master/scripts/prompt_audit_manifest.json@@ -1807,12 +1807,6 @@"field": "page_charts","owner_fingerprint": "0edfe64300c1","projections": [- {- "path": "skills/ppt-master/references/executor-structured.md",- "role": "compatibility",- "fingerprint": "a6ae3dfb6e6a",- "reason": "This site documents a legacy or omission compatibility boundary."- },{"path": "skills/ppt-master/references/executor-visualization.md","role": "compatibility",@@ -1864,7 +1858,7 @@{"path": "skills/ppt-master/references/pptx-structure-interface.md","role": "reference",- "fingerprint": "60f4c8b8d08a",+ "fingerprint": "2db6a34d15d7","reason": "This reference mirrors the owner field grammar or ownership boundary."},{@@ -1894,7 +1888,7 @@{"path": "skills/ppt-master/references/artifact-ownership.md","role": "reference",- "fingerprint": "f91ef56378bb",+ "fingerprint": "ebe98e6a11a9","reason": "This reference mirrors the owner field grammar or ownership boundary."},{@@ -1906,7 +1900,7 @@{"path": "skills/ppt-master/references/pptx-structure-interface.md","role": "reference",- "fingerprint": "b4596417aeec",+ "fingerprint": "3061c1488d1d","reason": "This reference mirrors the owner field grammar or ownership boundary."},{@@ -1963,12 +1957,6 @@"field": "page_visualizations","owner_fingerprint": "b3cdf822635a","projections": [- {- "path": "skills/ppt-master/references/executor-structured.md",- "role": "consumer",- "fingerprint": "105f5e4ce2ce",- "reason": "This consumer needs the field contract for deterministic execution."- },{"path": "skills/ppt-master/references/executor-visualization.md","role": "consumer",@@ -2014,7 +2002,7 @@{"path": "skills/ppt-master/references/pptx-structure-interface.md","role": "reference",- "fingerprint": "6f93a0561460",+ "fingerprint": "f1339baac6db","reason": "This reference mirrors the owner field grammar or ownership boundary."},{@@ -2050,7 +2038,7 @@{"path": "skills/ppt-master/references/pptx-structure-interface.md","role": "reference",- "fingerprint": "92a978e5d229",+ "fingerprint": "d35af1a163ac","reason": "This reference mirrors the owner field grammar or ownership boundary."},{diff --git a/skills/ppt-master/workflows/create-template.md b/skills/ppt-master/workflows/create-template.mdindex ec28e852..7f992732 100644--- a/skills/ppt-master/workflows/create-template.md+++ b/skills/ppt-master/workflows/create-template.md@@ -122,18 +122,28 @@ below are Create Layout/Create Deck concerns.| Preserve provenance | Keep facts, explicit user decisions, and AI suggestions distinct. Surface contradictions in Step 2 instead of resolving them silently. || Protect mirror | Supplemental text, images, websites, or assets may explain the source but cannot alter a confirmed `mirror` graph or visuals. Use `standard` / `fidelity` when the user wants those inputs to change the resulting system. |-Type A is the canonical mirror path: `analysis/manifest.json`, `analysis/native_structure.json`, layered lossless `svg/`, and inheritance facts describe the native structure that still exists in the PPTX package. Optional `svg-flat/` files are complete-page verification views, never structure authority. In `standard` / `fidelity`, imported facts and visuals do not define output topology.+Type A is the canonical mirror path: analysis manifests/inheritance own surviving+native structure; `authoring-svg/` is new compact editable SVG projected from+that evidence. Lossless `svg/` is immutable validation/non-visible-payload+backing, never visible authoring. Optional flat files verify full pages only. In+`standard` / `fidelity`, imported facts/visuals do not define output topology.**Type B source normalization**: when the supplied root exposes any `templates/` Design Spec, use `<input>/templates/` as the SVG/spec source and resolve its workspace assets from sibling `<input>/images/` and `<input>/icons/`. Otherwise, treat the supplied directory only as a loose SVG evidence source. Directory flatness is not a semantic-structure signal and never makes it a reusable workspace.Type B is supported with caveats:-- **mirror on type B** — require a complete current explicit source contract. Preserve page count/order, literal visuals, each source Slide's declared Layout/Master chain, slot metadata, supported native-object metadata, and source ownership in the **new** workspace. Page type for `<NNN>_<page_type>.svg` is read from the source filename when it follows the PPT Master naming convention (`01_cover.svg` → `cover`, `03a_content_two_col.svg` → `content`); fall back to `content` otherwise. A loose visual-only SVG folder has no native structure to preserve and cannot use mirror. Unreferenced identities are not mirror output.+- **mirror on type B** — require a complete current explicit source contract. Preserve page count/order, similar presentation, each source Slide's declared Layout/Master chain, slot metadata, supported native-object metadata, and source ownership in the **new** workspace; SVG code and node identity need not match. Page type for `<NNN>_<page_type>.svg` is read from the source filename when it follows the PPT Master naming convention (`01_cover.svg` → `cover`, `03a_content_two_col.svg` → `content`); fall back to `content` otherwise. A loose visual-only SVG folder has no native structure to preserve and cannot use mirror. Unreferenced identities are not mirror output.- **fidelity on type B** — inspect the complete page roster as visual reference, then design a broader new roster and its own Master/Layout/slot system. Existing keys, families, and repeated source chrome are not output-topology inputs.- **legacy or unstructured type B** — old `baseline` / `preserve` / `layout_strategy: distill` / `data-pptx-layout-kind` / direct-atomic-placeholder inputs, and SVGs with no root Master identity, are visual/contextual reference for `standard` / `fidelity` only. Author a new current contract in the output workspace. Use the original PPTX Type A path when existing native Master/Layout facts must be mirrored; do not mutate the SVG source or claim topology recovery from incomplete metadata.- **selected free-design subset on type B** — ingest only the explicitly named pages as visual reference, then author a new current structured contract in the output workspace. Do not scan or copy the whole `svg_output/` directory or silently turn unselected pages into template variants.-**Internal creation-strategy boundary**: `standard`, `fidelity`, and `mirror` are derived implementation labels, not user-facing modes. `standard` and `fidelity` review the complete source structure, then author a compact Slide roster or broader useful source-aligned Slide coverage; each retained Layout has a Slide prototype. `mirror` validates and preserves source Slides plus only their reachable Layout/Master graph. It may complete inherited SVG context and normalize compiler transport without changing visible content, ownership, or intent. Create Layout mirror remains legal only for a retained brand-neutral, application-neutral contract; otherwise re-author a Layout or retain a Deck. Future decks do not inherit the source page count/order requirement.+**Internal creation-strategy boundary**: These three labels are internal.+`standard` / `fidelity` review all source structure, then author a compact or+broader source-aligned roster with one Slide prototype per retained Layout.+`mirror` authors compact parsed SVG for every source Slide, preserving reachable+graph, meaning, ownership, and similar presentation—not code identity. Create+Layout mirror requires a brand/application-neutral contract; otherwise re-author+a Layout or retain a Deck. Future decks need not keep source page count/order.### 1A. `.pptx` reference@@ -147,7 +157,7 @@ This produces, in one workspace:- `analysis/manifest.json` — source facts: slide size, theme colors, fonts, per-master theme summaries, resource inventory, placeholder metadata, SVG file paths, per-slide / per-layout / per-master metadata (including source-owned inherited-shape visibility), and page-type candidates- `analysis/native_structure.json` — stable Master/Layout keys, picker names, placeholder type/index/geometry, inherited-shape visibility, source hash, and source-graph quality facts-- `sources/source.pptx` — byte-preserved backing package for visual/package cross-checking and exact unchanged-source recovery; it is not copied into the final template package+- `sources/source.pptx` — byte-preserved backing package for visual/package cross-checking and source identity validation; it is not copied into the final template package or used to replace authored visible SVG- `images/` — PowerPoint image media, including raster images and SVG/EMF/WMF; `analysis/manifest.json` owns the asset-name mapping and SVG `href` values reuse it- `sounds/`, `audio/`, `video/`, and `native-payloads/` — conditional semantic resource directories; only populated directories are created- `validation/conversion-report.json` — source-recovery and fidelity diagnostics; retain it for audit because these warnings are not duplicated in the structural manifests@@ -169,17 +179,21 @@ Import fidelity rules:It is an analysis aid, not a final direct template conversion.-**Lossless payload backing + editable authoring IR**:--Keep `<import_workspace>/svg/` unchanged as lossless native-payload backing. If-the optional `<import_workspace>/svg-flat/` verification tree was requested,-keep it unchanged too. The same `pptx_template_import.py` transaction writes-the canonical compact `authoring-svg/` bundle before publishing the workspace;-`--inheritance-mode both` also writes `authoring-svg-flat/`. A successful Type A-import therefore never requires a second compaction/projection command before-the Template_Designer reads the authoring IR.--Each bundle contains editable SVGs, a model-readable `authoring_summary.json`, and a tool-only `authoring_manifest.json`. The projection removes opaque text payload, duplicate hidden geometry carriers, and import-only identity attributes while keeping visible shape intent, compact preset/frame metadata, structure markers, logical ids, valid asset references, and a reserved `data-pptx-source-ref` on each imported logical object. Model-facing `data-pptx-frame` values and safe transform page coordinates use at most two decimals; normalized crop ratios, path geometry, transform linear coefficients, and the immutable lossless source retain their required precision. The summary lists the current SVG roster plus per-file canvas, size, text, image, vector, placeholder, and source-ref counts. The machine manifest records relative source files, document hashes, source paths, and initial authoring-subtree hashes; it does not duplicate opaque payload and MUST NOT enter model context. Source refs are unique within one document and are interpreted by tools together with that document's manifest record.+**Immutable source evidence + compact editable authoring SVG**: Keep `svg/`+unchanged for validation and supported non-visible payload; it is never visible+template source. Keep optional `svg-flat/` unchanged. The import transaction+also writes canonical compact `authoring-svg/` and, with `both`, its flat view;+no second projection precedes Template_Designer review.++The bundle contains compact SVGs, model-readable `authoring_summary.json`, and+tool-only `authoring_manifest.json`. Projection removes opaque/duplicate/import-+only carriers while retaining visible intent, compact frame/preset and structure+markers, ids, assets, inline Chart/Table JSON, and per-object source refs.+Model-facing safe page coordinates use at most two decimals; crop/path/matrix+values and lossless evidence retain required precision. The summary indexes the+roster/counts. The manifest owns source paths/hashes and initial subtree hashes,+never duplicates opaque payload, and MUST NOT enter model context. Refs are+document-local and tool-resolved.In-place vector and picture normalization refreshes the summary automatically.After any other direct IR edit, refresh it before the next analysis pass:@@ -188,12 +202,17 @@ After any other direct IR edit, refresh it before the next analysis pass:python3 skills/ppt-master/scripts/svg_authoring_view.py "<import_workspace>/authoring-svg" --refresh-summary```-`authoring-svg/` is the canonical editable IR for template creation. The lossless trees are read only by materialization when an unchanged referenced object needs supported native payload or fallback evidence. Do not edit or copy the lossless SVGs directly. The IR is not a finished template directory and must be materialized into the active authoring workspace's validated `templates/*.svg` before preview or export.--For a Type A `mirror`, final materialization is owned by-`mirror_template_materialize.py`; never assemble the structured output by-copying lossless SVGs or `svg-flat/` pages into `templates/`. The command runs-only after the confirmed IR edits and vector-readability pass described below.+`authoring-svg/` is canonical visible authoring. Template_Designer inspects each+required document and may redraw/normalize it while preserving meaning,+structure, and similar presentation. Lossless trees support provenance and+non-visible/explicit-break recovery only; never edit/copy them or replace a+visible authored subtree. Validate/publish to `templates/*.svg` before+preview/export.++For Type A `mirror`, `mirror_template_materialize.py` validates/publishes but+does not author visible design. Run it only after Template_Designer review,+needed fidelity edits, and the vector-readability pass. Never copy lossless or+flat pages into `templates/`.`standard` / `fidelity` remain newly authored Template_Designer output and donot use this compiler.@@ -257,8 +276,9 @@ Master/Layout ownership. Do not apply it to placeholders, individual importednative shapes, native table/chart fallbacks, icon placeholders, or compactauthored presets. `mirror` must keep the source native group/picture identityand therefore must not use this normalization. The original lossless `svg/`-tree remains unchanged and authoritative. Any optional `svg-flat/` tree remains-unchanged but is verification-only.+tree remains immutable source/package evidence; the reviewed compact authoring+tree owns visible output. Any optional `svg-flat/` tree remains unchanged but+is verification-only.`extract_svg_assets.py` remains a different operation: it factors vectors outfor model readability and re-inlines them as native shapes before export. It@@ -269,7 +289,7 @@ does not turn those vectors into a picture.| Mode | Required read set ||---|---|| `standard` / `fidelity` | `analysis/manifest.json`, exported semantic resources, `svg/inheritance.json`, `authoring-svg/authoring_summary.json`, and every cleaned layered IR document (`authoring-svg/master_*.svg` / `layout_*.svg` / `slide_NN.svg`). Do not read `authoring_manifest.json`; it is compiler-only. The layered IR is the complete read surface: it covers Layouts unused by any sample slide (invisible in `svg-flat/` yet still template vocabulary), and per-page composition follows from `inheritance.json`. Cleaned flat pages are optional composition spot checks, not a required second pass over the same shapes. Source topology remains non-binding; the two modes differ in output design (`fidelity` designs a broader roster covering the useful visual range), not in read coverage. |-| `mirror` | `analysis/manifest.json`, `analysis/native_structure.json`, `svg/inheritance.json`, `authoring-svg/authoring_summary.json`, every cleaned source Slide IR document, and only the Master/Layout IR documents reachable from those Slides. Do not read `authoring_manifest.json`; `mirror_template_materialize.py` loads and validates the same reachable set internally. The layered `authoring-svg/` tree is the sole editable and materialization input. Cleaned `authoring-svg-flat/` slides are optional visual composition checks only; never edit or feed them into template materialization. Materialization may resolve unchanged refs against the matching lossless backing without placing opaque payload in model context. |+| `mirror` | Read both analysis manifests, inheritance, authoring summary, every source Slide SVG, and only reachable Master/Layout SVGs. Do not read the tool-only manifest; the publisher validates that set. Layered `authoring-svg/` is the sole visible edit/publication input and Template_Designer may redraw it. Flat views are optional checks; lossless backing validates facts and supplies supported non-visible semantics only. |Use the compact facts in `analysis/manifest.json` for orientation. Use screenshots or the original PPTX only for visual cross-checking. Do not bulk-read opaque lossless payload into model context.@@ -286,12 +306,11 @@ Interpretation rule (carries forward into Steps 2 and 4):- cleaned complete-page IR documents are optional composition spot checks for authored modes and verification views for mirror. They never replace the layered editable IR or immutable payload backing.- screenshots remain useful for judging composition and style, but should not override extracted factual metadata unless the import result is clearly incomplete-**Mirror reachable-graph gate**: compare every source Slide and its referenced-Layout/Master with the layered `authoring_summary.json` roster before offering-`mirror`. Missing reachable IR, payload backing, or unambiguous parentage is-blocking. Source identities unused by every Slide remain analysis evidence and-are omitted from mirror output. The compiler performs exact source-ref and hash-checks from `authoring_manifest.json`.+**Mirror reachable-graph gate**: Before offering `mirror`, compare every source+Slide and referenced Layout/Master with the authoring summary. Missing reachable+SVG/evidence or ambiguous parentage blocks. Omit unused identities. The+publisher verifies source SHA, refs, graph/assignment closure, and subtree hash+status; an authored change never triggers visible XML restoration.### Basic norm extraction (mandatory when reference content exists)@@ -322,9 +341,15 @@ Distinguish observed facts from template rules: "`slide_07` uses a left photo cr- `standard` / `fidelity`: read `authoring_summary.json`, every layered IR Master, Layout, and Slide, and the inheritance map; flat pages are optional spot checks- `mirror`: read `authoring_summary.json`, verify every source Slide and its referenced Layout/Master plus the inheritance map, report retained and omitted identities, and leave `authoring_manifest.json` to the compiler-Do not treat authoring IR documents as final template assets. `standard` / `fidelity` author new SVGs from the confirmed brief and IR references. Mirror edits the IR and materializes it with lossless native-payload backing.+Authoring SVGs are not installed assets. `standard` / `fidelity` author new+SVGs; mirror reviews/edits compact parsed SVG, then publishes it with source+validation and supported non-visible recovery only.-> **Mirror-mode materialization path** — `analysis/native_structure.json` and `svg/inheritance.json` own structure; cleaned layered IR is editable, lossless layered SVG is payload backing, and optional flat SVG is verification-only. `mirror_template_materialize.py` reads the machine manifest, emits only source Slide prototypes, and preserves their reachable graph. It completes inherited SVG context while preserving appearance, ownership, placeholders, supported native metadata, and fallbacks without synthesis.+> **Mirror authoring/publication** — Native structure/inheritance own structure;+> layered `authoring-svg/` owns compact editable visuals; lossless/flat trees are+> validation/non-visible backing only. Template_Designer owns visible fidelity;+> the publisher validates/composes the current tree and reachable graph without+> copying lossless visible subtrees.### 1B. Existing SVG assets@@ -550,7 +575,7 @@ When the bundle includes Type A, pass the following internal package to the role- exported `images/` and any other populated semantic resource directories- `*_vector_asset_inventory.json`, when the vector readability pass extracted assets, as an exact-id query surface only; do not load it or `icons/imported/*.svg` wholesale- `authoring-svg/authoring_summary.json` and editable layered IR documents; keep `authoring_manifest.json` bundled for compiler use but do not load it into the role context; optional `authoring-svg-flat/` is a visual cross-check only and never a template materialization input-- for `mirror` only, matching immutable `svg/` payload backing plus `svg/inheritance.json`; immutable `svg-flat/` remains an optional visual cross-check+- for `mirror` only, matching immutable `svg/` source/package evidence plus `svg/inheritance.json`; immutable `svg-flat/` remains an optional visual cross-check and never replaces authored visible SVG- optional screenshots, if availableWhen the bundle includes Type B, pass `authoring_summary.json`, the cleaned SVG file list from the analysis workspace, `*_vector_asset_inventory.json` as an exact-id query surface if extraction ran, any companion `design_spec.md` / `spec_lock.md`, and the analysis notes. Do not bulk-read the inventory or extracted vectors; open individual `icons/imported/*.svg` files only when needed.@@ -564,10 +589,10 @@ The role interprets the package according to the AI-derived internal creation st| Mode | Final SVG authority | Structure behavior ||---|---|---|| `standard` / `fidelity` | Newly authored SVGs from the brief and complete source evidence | Author a compact or broader useful Master/Layout/slot system; do not retain identities merely because they exist. |-| `mirror` | Editable IR plus native facts and lossless backing | Materialize source Slides and their reachable Layout/Master chains; resolve inherited context without changing ownership. |+| `mirror` | Reviewed compact authoring SVG plus inline native JSON and structure facts | Publish source Slides and their reachable Layout/Master chains from the current authored tree; resolve inherited context without changing ownership. Similar presentation is required, code isomorphism is not. |-For Type A `mirror`, materialize the reviewed layered IR into a workspace with-no existing roster, using the deterministic compiler:+For Type A `mirror`, publish the reviewed/authored layered compact SVG into a+workspace with no existing roster, using the deterministic validator/publisher:```bashpython3 skills/ppt-master/scripts/mirror_template_materialize.py \@@ -577,9 +602,11 @@ python3 skills/ppt-master/scripts/mirror_template_materialize.py \Destination `templates/` may be absent/empty or hold unique qualifiedBrand/Style specs; a Layout-over-Deck stage may also hold one qualified Deckspec without its roster. A bare spec, Layout spec, active roster, or other-payload blocks materialization. Before atomic publication, the command verifies-the layered manifest/source refs and lossless hashes for source Slides plus the-reachable native/inheritance graph and vector inventory. It emits source-ordered Slide+payload blocks publication. Before atomic publication, the command verifies+the layered manifest, source SHA/known refs, reachable native/inheritance graph,+assignments, closure, and vector inventory. Authoring subtree hash changes are+classified as legitimate edits; the command never rehydrates an ordinary+visible lossless subtree. It emits source-ordered SlideSVGs only, plus `icons/imported/`, referenced`images/`, `audio/`, `video/`, or`native-payloads/imported/` resources as applicable, and one@@ -618,11 +645,12 @@ construction needs a Boolean result over supported shape/text operands, Templatedecides whether to use `shape_boolean_svg.py` under[`native-shape-authoring.md`](../references/native-shape-authoring.md) §6; abrief/reference suggestion does not lock the operation. `mirror` preserves the-source structure ownership, visible result, and supported semantics in a new-workspace while spelling them in the same compact authoring contract used by-other modes. It may normalize equivalent inheritance, safe page-space metadata,-and compiler transport without changing object meaning. Mirror never performs-semantic synthesis, merge/split, promotion/demotion, renaming, or re-parenting.+source structure ownership, meaning, similar visible result, and supported+native facts in a new workspace while spelling them in the same compact+authoring contract used by other modes. It may redraw/normalize visible SVG,+equivalent inheritance, safe page-space metadata, and compiler transport+without changing object meaning. Mirror never performs semantic synthesis,+promotion/demotion, renaming, or re-parenting.**Hard rule — multi-Master package boundary**: More than one Master is valid only when `mirror` preserves an existing source graph in the new workspace or an authored template intentionally defines distinct reusable design families. `standard` / `fidelity` must not create one Master per Layout or duplicate equivalent Masters merely for organization. Every declared Master must own at least one emitted Layout, and every declared Layout must be selected by at least one prototype SVG so the complete graph can be compiled and verified.@@ -635,16 +663,18 @@ semantic synthesis, merge/split, promotion/demotion, renaming, or re-parenting.SVG authors own the semantic roster, parentage, picker names, direct atoms, and slots. The exporter owns OOXML part cloning, Theme isolation, relationship registration, and package identity. Do not encode package repair workarounds in individual template SVGs.-Do not package `analysis/native_structure.json` or `sources/source.pptx` as template inputs. In `standard` / `fidelity`, author Master/Layout direct semantic atoms and bounded slot groups deliberately from the intended reusable behavior. A validated compact canonical authored-preset `<g>` compiles to one native shape and therefore counts as one semantic atom; it may own a Master/Layout fixed layer or serve as the one direct carrier of an `object` slot. Ordinary groups are not structural atoms or single-object carriers. In `mirror`, edit the layered authoring IR and use inheritance/native facts to preserve source ownership; the lossless trees remain payload backing. Recursively expand fixed Master/Layout group wrappers only because the structured contract requires semantic atoms; preserve transforms, styles, paint order, and appearance, and never flatten or regroup by semantic judgment.+Do not package `analysis/native_structure.json` or `sources/source.pptx` as template inputs. In `standard` / `fidelity`, author Master/Layout direct semantic atoms and bounded slot groups deliberately from the intended reusable behavior. A validated compact canonical authored-preset `<g>` compiles to one native shape and therefore counts as one semantic atom; it may own a Master/Layout fixed layer or serve as the one direct carrier of an `object` slot. Ordinary groups are not structural atoms or single-object carriers. In `mirror`, edit the layered compact authoring SVG and use inheritance/native facts to preserve source ownership; the lossless trees remain immutable validation/non-visible-payload backing. Recursively expand fixed Master/Layout group wrappers only because the structured contract requires semantic atoms; keep comparable paint order and presentation, but do not require identical SVG transforms/styles/nodes or regroup by semantic judgment.`<design_spec_path> §V` records every emitted Slide. Mirror adds the [required Source Preservation Map](../references/template-designer.md) for source-Slide assignments and, when relevant, one sentence that unreferenced source identities exist but were not materialized. Do not add per-identity analysis or model-authored synthesis rationale.**Native-shape metadata boundary**: The authoring IR removes opaque payloadfrom model context while retaining stable source refs. `standard` / `fidelity`use helper-generated compact canonical preset groups and project SVG/assets-rather than copied source payload. `mirror` materialization rehydrates only-native metadata already supported by the converter when a referenced-Slide-local/slot object's initial authoring hash still matches. Fixed layers are normalized to semantic atoms;+rather than copied source payload. `mirror` publication validates known refs+and may recover only non-visible native metadata already supported by the+converter. It always keeps the current compact visible authoring tree; matching+hashes never authorize lossless visible-subtree replacement. Fixed layers are+normalized to semantic atoms;unsupported or edited objects keep the current SVG fallback and are reportedrather than silently replaced by stale metadata. Do not reproduce the presetsyntax here; its single authority is@@ -653,14 +683,14 @@ usage guidance in the native-shape reference.Downstream, Strategist inspects the installed workspace and current content, then derives an internal application plan. The plan may use the full roster or a subset, repeat or reorder prototypes, and choose literal reuse, structural reuse, or visual-reference-only behavior. For exporter compatibility it records `template_reuse_scope` and, when structured, `template_adherence`; these are machine execution values, not user choices. `page_layouts` selects one complete authoring prototype per generated page, `pptx_masters` / `pptx_layouts` declare unique reusable definitions, and `page_pptx_layouts` assigns generated pages. No internal value forces a future generated deck to keep the source page count or order.-**Apply the confirmed natural-language intent to authored output**: in `standard` / `fidelity`, reproduce reference geometry and decoration where the request calls for close preservation, and adapt compositions where it calls for a reusable redesign. Mirror preserves every supported source visual represented by the validated IR and does not use this authored-page distinction.+**Apply the confirmed natural-language intent to authored output**: in `standard` / `fidelity`, reproduce reference geometry and decoration where the request calls for close preservation, and adapt compositions where it calls for a reusable redesign. Mirror authors compact SVG from every supported source visual represented by the parsed evidence, keeping a similar presentation without requiring the same code or nodes.**Sprite-sheet preservation (do NOT simplify away)**: PPTX-exported assets are often sprite sheets — a single tall/large image referenced from multiple slides, each cropping a different region via nested `<svg ... viewBox="...">` wrappers around `<image width="1" height="1">`. This nesting is **load-bearing geometry**, not redundant structure. When rebuilding, preserve the exact `viewBox` crop and the outer `<svg>` placement for every image; do not flatten to a single `<image>` with direct `x/y/width/height`. Verify by sampling: if any asset's pixel dimensions don't match the on-page display aspect, it is a sprite and the wrapper must stay.-**Mirror materialization contract** (type A or B): when the derived implementation writes `replication_mode: mirror`, the Template_Designer role:+**Mirror authoring/publication contract** (type A or B): when the derived implementation writes `replication_mode: mirror`, the Template_Designer role:-1. **Materializes one output SVG per source Slide** in `<authoring_workspace>/templates/`. Edit and normalize the matching `authoring-svg/` IR document, then run `mirror_template_materialize.py`; the compiler consumes the tool-only authoring manifest together with native structure facts and immutable payload backing. Do not hand-copy or independently rebuild its graph. Preserve each Slide's reachable Master/Layout keys and picker names, Layout parentage, assignment, placeholder type/index/bounds, inherited-shape visibility, ownership, paint order, and supported native metadata. Mechanical context completion plus namespace, root-declaration, asset-path, bounds, and fixed-layer group normalization is allowed only when source ownership and appearance remain unchanged.- - Type A model-facing source: `<import_workspace>/authoring-svg/authoring_summary.json` plus the editable SVGs; `<import_workspace>/svg/`, `svg/inheritance.json`, and `analysis/native_structure.json` provide payload and structural backing. The compiler alone reads `<import_workspace>/authoring-svg/authoring_manifest.json`. Optional `<import_workspace>/svg-flat/` is verification-only.+1. **Authors and publishes one output SVG per source Slide** in `<authoring_workspace>/templates/`. Inspect every matching `authoring-svg/` document, redraw/normalize where useful for compactness while keeping similar presentation and source meaning, refresh its summary, then run `mirror_template_materialize.py`. The publisher consumes the tool-only authoring manifest together with native structure facts and immutable source evidence; it validates/composes the current authored tree and never restores ordinary visible source XML. Do not hand-copy the lossless tree or independently rebuild the graph. Preserve each Slide's reachable Master/Layout keys and picker names, Layout parentage, assignment, placeholder type/index/bounds, inherited-shape visibility, ownership, and supported native facts. Code/node identity is not required.+ - Type A model-facing source: `<import_workspace>/authoring-svg/authoring_summary.json` plus the editable compact SVGs; `<import_workspace>/svg/`, `svg/inheritance.json`, and `analysis/native_structure.json` provide immutable source/non-visible payload and structural backing. The publisher alone reads `<import_workspace>/authoring-svg/authoring_manifest.json`. Optional `<import_workspace>/svg-flat/` is verification-only.- Type B model-facing source: `<svg_analysis_workspace>/authoring-svg/authoring_summary.json` plus its editable SVGs; the complete explicit source SVG contract is immutable backing- Each source Slide SVG resolves Master + Layout + Slide context and keeps layer markers explicit. Source Master/Layout identities unused by every Slide produce no file; use `standard` / `fidelity` to re-author useful ones as complete Slide prototypes.2. **Renames each file** using the source-order-first convention `<NNN>_<page_type>.svg`, where `<NNN>` is the source-order index zero-padded to 3 digits and `<page_type>` is typically `cover` / `toc` / `chapter` / `content` / `ending` (fall back to `content` when the type cannot be confidently classified). Examples: `001_cover.svg`, `002_toc.svg`, `003_content.svg`, ..., `050_ending.svg`.@@ -673,7 +703,7 @@ Downstream, Strategist inspects the installed workspace and current content, the4. **Copies decoration-only imported vector assets once** to `<authoring_workspace>/icons/imported/` and rewrites their placeholders to `<use data-icon="imported/<name>" data-pptx-asset-role="decoration"/>`. Semantic authoring objects stay inline. Never place a second copy under `templates/icons/`. Other explicitly adopted icon-library references keep their existing library namespace. Do not inline these assets manually in the template working SVGs; template validation, preview, and final export all resolve icons from the workspace-root `icons/` directory.5. Writes `<design_spec_path>` per [template-designer.md](../references/template-designer.md) §1. The §V Page Roster remains a factual prototype index; explicit SVG metadata is the native Master/Layout contract. `replication_mode: mirror` records how the workspace was created and only makes literal downstream reuse technically possible; it never selects that behavior or forces a 1:1 slide sequence.-Mirror mode does not simplify the visual target or synthesize layer ownership. The sprite-sheet preservation rule applies because crop wrappers carry visible geometry; preserve those wrappers and their source scope faithfully.+Mirror mode may simplify SVG code but does not redesign the visual target or synthesize layer ownership. The sprite-sheet preservation rule applies because crop wrappers carry visible geometry; preserve their crop behavior and source scope faithfully.**Expected outputs from this step** (full spec → [template-designer.md](../references/template-designer.md)):@@ -784,12 +814,12 @@ This checker validates the authoring contract, not the compiled OOXML package. T- [ ] In review output, authored placeholder prompts remain readable; `template_preview_pptx.py` uses preview-only sample text and leaves every canonical source marker and carrier style unchanged- [ ] `standard` / `fidelity` output SVGs and their Master/Layout/slot contracts were newly authored without preserving or distilling source topology- [ ] Every additional authored Master represents a distinct reusable design family, not one Layout or an equivalent duplicate; every declared Master owns at least one emitted Layout and every declared Layout has at least one emitted prototype-- [ ] Mirror output preserves source slide order, the full identity and parentage of every retained Master/Layout, placeholder facts, and ownership; context completion and fixed-layer group expansion are mechanical and pixel-equivalent, and the Source Preservation Map lists every source slide+- [ ] Mirror output preserves source slide order, the full identity and parentage of every retained Master/Layout, placeholder facts, ownership, source meaning, and similar presentation; SVG code/node identity is not required, and the Source Preservation Map lists every source slide- [ ] Mirror materialization wrote one compact `ppt-master.template-execution-manifest.v1` roster and one linked `ppt-master.template-text-slots.v2-min` diagnostic sidecar per prototype; each slot has only `selector`, `role`, `current_text`, `text_segments`, and `tspan_count`; neither artifact is injected into page authoring, while validation/export check the complete prototype- [ ] Mirror roots preserve source inherited-shape visibility with canonical lowercase `data-pptx-show-master-shapes` and `data-pptx-show-inherited-shapes`; same-key Layouts agree on the former, while each Slide retains its own latter value- [ ] Mirror preflight covered every source Slide and its reachable Layout/Master chain; unreferenced source identities produced no SVG and are reported as omitted- [ ] For `standard` / `fidelity`, no duplicate-Layout-contract warning remains; mirror may keep equivalent source Layout identities when the preservation map explains them-- [ ] All template-creation edits used the authoring IR; Type A mirror used `mirror_template_materialize.py`, validated its manifest/hash/graph/source-ref closure before atomic publication, reused only converter-supported payload for hash-matching Slide-local/slot refs, deduplicated supported opaque payload and repeated native restoration attributes into `templates/native_payloads.json.gz`, stripped IR-only source-ref metadata, and kept fixed Master/Layout visuals as direct atoms+- [ ] All template-creation edits used the compact authoring SVG; Type A mirror used `mirror_template_materialize.py` only after Template_Designer review, validated source SHA/known refs/manifest/graph/assignment closure before atomic publication, published the current visible tree without lossless subtree rehydration, recovered only supported non-visible semantics, kept authoritative Chart/Table JSON inline, deduplicated supported opaque payload and repeated native restoration attributes into `templates/native_payloads.json.gz`, stripped IR-only source refs, and kept fixed Master/Layout visuals as direct atoms- [ ] If any SVG references an extracted vector, it uses `data-icon="imported/<name>" data-pptx-asset-role="decoration"`; the v2 inventory and sole SVG asset under `<authoring_workspace>/icons/imported/` declare the same role; no semantic object or descendant is externalized, `templates/icons/` does not exist, and no separate illustration embedding script was added- [ ] For `fidelity` mode: every sprite-sheet asset retains its nested `<svg viewBox=...>` crop wrapper; no image whose file aspect differs from its on-page aspect was flattened to a bare `<image>`- [ ] For `mirror` mode: SVG count equals source Slide count, filenames follow `<NNN>_<page_type>.svg`, no standalone Master/Layout SVG exists, and **no new `{{...}}` authoring placeholders were inserted**; §V lists every emitted Slide prototype@@ -815,6 +845,17 @@ creates `exports/` on demand. Copy a requested/required successful reviewartifact into the target project's `exports/` during the same atomic install.The script consumes `templates/*.svg` directly, compiles the declared structured Master/Layout contract, and reopens the result. For `standard` / `fidelity`, it uses ephemeral SVG copies with concise preview-only placeholder samples so long `{{...}}` markers stay readable; canonical source SVGs and placeholder semantics are not modified. It does not require a project `spec_lock.md`, does not create a persistent intermediate project, and does not infer or distill structure.+The default review keeps visible SVG Chart/Table fallbacks. Marker presence or+template origin never activates native replacement. When JSON-first capability+must also be verified, write a second, distinctly named review explicitly:++```bash+python3 skills/ppt-master/scripts/template_preview_pptx.py \+ "<authoring_workspace>" \+ --native-charts-and-tables \+ -o "<authoring_workspace>/exports/<template_id>_template_preview_native.pptx"+```+The first export refuses an existing output. After intentionally fixing the template and replacing its prior review deck, rerun with `--force`; never rely on a silent overwrite:```bashdiff --git a/skills/ppt-master/workflows/generate-pptx.md b/skills/ppt-master/workflows/generate-pptx.mdindex 3d32c085..00847e5c 100644--- a/skills/ppt-master/workflows/generate-pptx.md+++ b/skills/ppt-master/workflows/generate-pptx.md@@ -683,7 +683,7 @@ sidecars, or guessed family paths.**Visual Construction Phase**: generate SVG pages sequentially, one at a time, in one continuous pass → `<project_path>/svg_output/`-Each completed SVG MUST be a standalone, complete representation of that slide's visible design. Template SVGs and locked planning artifacts may guide construction, but export must not reach back to them to add visible objects omitted from `svg_output/`. Speaker notes, animation, narration, transitions, and direct native-PPTX workflows remain separately owned artifacts/capabilities. Native shapes are Executor-local authoring capabilities, not planned resources: follow [`native-shape-authoring.md`](../references/native-shape-authoring.md), read the complete current preset vocabulary before the first page, choose page-fit contours before their authoring forms, keep exact native atoms independent when possible, materialize a Merge Shapes Boolean result only where contour semantics require it, and use necessary freeform last. Diagram relationships follow the same Shape-first gate; do not infer a preset from contour similarity.+Each completed SVG MUST contain the slide's complete visible design; export never reaches back to templates or planning artifacts for omitted visible objects. A Chart/Table marked `data-pptx-native-authority="json"` is the sole object-local exception: its inline JSON is authoritative and its visible subtree is an approximate derived preview. Notes, animation, narration, transitions, and direct native-PPTX workflows remain separate. Native shapes are Executor-local capabilities: follow [`native-shape-authoring.md`](../references/native-shape-authoring.md), read the full preset vocabulary before page one, prefer independent native atoms, use Merge Shapes only when contour semantics require it, and use freeform last. Diagram relationships follow the same Shape-first gate; never infer a preset from contour similarity.**Motion-ready image composition**: Only when an explicit user motioninstruction, the effective Custom Animations outcome in `design_spec.md §I` is@@ -702,9 +702,17 @@ custom animation. A page-transition-only request requires no extra visiblelayer; deterministic Morph still needs the continuing object as a direct-rootgroup on both pages.-`template_reuse_scope: mirror|layout` pages MUST start from the complete `page_layouts` SVG, keep inherited visible objects, and preserve root Master/Layout identity plus stable atoms/slots. Strict preserves that reusable contract; under `layout`, the once-loaded Design Spec's `Template Application` may still authorize carrier text/tspan reflow inside unchanged slot bounds. Adaptive uses the current or new Layout key/name already declared by Strategist. If construction proves that fixed atoms or slot topology/bounds must change, stop and return upstream for Strategist to repair the owning plan and lock, validate and read back the affected fragments, then resume; Executor never mutates `spec_lock.md`. `mirror` changes only visible text values while preserving text/tspan topology and attributes. `style` follows the flat paragraph below without structure metadata.+`template_reuse_scope: mirror|layout` pages MUST start from the complete `page_layouts` SVG and preserve inherited visuals, root Master/Layout identity, atoms, and slots. Strict keeps that contract; `layout` may apply authorized carrier text/tspan reflow within unchanged slot bounds. Adaptive uses a Strategist-declared Layout. If construction requires fixed-atom or slot topology/bounds changes, return upstream for plan/lock repair and validation; Executor never edits `spec_lock.md`. `mirror` changes only permitted text while preserving ordinary text/tspan topology/attributes. A JSON-first Chart/Table preserves marker id/kind/authority, metadata schema/bounds, and structure; its preview children may regenerate from the same JSON. `style` follows the flat rule below.-`template_reuse_scope: style`, Style-only, free-design, and brand-only pages use `pptx_structure.mode: flat`. A Style-only workspace always derives `template_reuse_scope: style`; Style never supplies prototype mappings. When installed alongside Layout/Deck, Style changes only Direction / method and follows the selected non-Style structure plan. On a flat page, draw the complete page directly: keep backgrounds, repeated chrome, headings, text, images, and decoration as ordinary Slide-local SVG content. Do not plan `pptx_masters` / `pptx_layouts` / `page_pptx_layouts`, do not add root Master/Layout identity, and do not add `data-pptx-layer` or `data-pptx-placeholder` metadata. Group logical content normally with top-level `<g id>` elements. Export materializes one clean project-owned Master plus one Blank Layout, applies the locked theme colors/fonts/title-body defaults, removes stock content placeholders and unused built-in Layouts, and retains only the standard date/footer/slide-number capability hooks. It does not promote or deduplicate page content.+`template_reuse_scope: style`, Style-only, free-design, and brand-only pages use+`pptx_structure.mode: flat`. Style supplies no prototype mappings; beside+Layout/Deck it changes only Direction/method and follows that structure plan.+Draw the complete flat page as ordinary Slide-local SVG. Omit+`pptx_masters` / `pptx_layouts` / `page_pptx_layouts`, root Master/Layout+identity, layers, and placeholders; group logical content with top-level+`<g id>`. Export creates one project Master plus Blank Layout, applies locked+theme defaults, removes stock placeholders/Layouts, retains standard+date/footer/slide-number hooks, and never promotes/deduplicates page content.Do not duplicate specialized identity with `data-pptx-role`. Add it only to structural page-frame objects whose package, page-number, or animation behavior is not already expressed by `data-pptx-layer`, `data-pptx-placeholder`, or `data-pptx-replace-with`; such an element needs a stable unique `id`. Do not add generic content roles to ordinary titles, body text, cards, KPIs, diagrams, charts, icons, or images. Full contract: [`references/semantic-svg.md`](../references/semantic-svg.md).@@ -737,6 +745,7 @@ python3 ${SKILL_DIR}/scripts/svg_quality_checker.py <project_path> \--canonical-authoring --stage final --json```- **MUST**: Before this gate, every §IX `Native-ready` entry `<object-key>=yes` already has one matching draw-time marker group and JSON metadata child; `=no` and incidental microvisuals remain ordinary SVG. A legacy bare `yes|no` is readable only when that page has exactly one eligible object; it never derives from §VII.+- **Authority gate**: JSON-first Chart/Table validates inline schema/bounds; its preview has no freshness authority. SVG-first native-ready markers require a current `data-pptx-fallback-sha256`, stamped after SVG/JSON synchronization. Missing/stale baselines block canonical/native export, not fallback export.- Run the command unfiltered—do not pipe it through `tail`, `head`, `grep`, or another output truncator. One invocation already scans every page and reports the complete issue set.- On failure, review all `blocking` errors and all advisory warnings from that run before editing. Choose which warnings merit work, fix every blocking error and the selected warnings in one consolidated edit pass, then perform one verification rerun. If it still fails, its complete output begins the next batch cycle; never run the checker between individual fixes or use repeated invocations to discover one next issue at a time. If terminal output is truncated, extract only `categories.blocking.issues` and, when needed, `categories.introduced.issues` from the report written by that same run.- Every `warning` is advisory and non-blocking: do not return the page for mandatory modification, do not auto-normalize user-authored compatible syntax, and do not require an acknowledgement/disposition line. Recommendation warnings identify the generated-SVG default; fidelity/quality warnings may be reported when material, but the existing input may ship unchanged. If a condition must be corrected before release, the checker must classify it as an `error`, not a `warning`.@@ -835,6 +844,11 @@ Choose exactly one notes mode:| Speaker Notes `enabled` | `python3 ${SKILL_DIR}/scripts/svg_to_pptx.py <project_path>` || Speaker Notes `disabled` | `python3 ${SKILL_DIR}/scripts/svg_to_pptx.py <project_path> --no-notes` |+Append `--native-charts-and-tables` only for an explicit editable PowerPoint+Chart/Table delivery decision. Templates, markers, semantic tables, and imported+charts never activate it. Without the flag, Chart/Table uses its SVG fallback;+formula native behavior remains intrinsic.+For deck-wide motion settings, append the resolved flags from[`animations.md`](../references/animations.md). When the conditional customstage preserves or produces `<project_path>/animations.json`, keep the base command above:diff --git a/skills/ppt-master/workflows/profiles/quick-generate.md b/skills/ppt-master/workflows/profiles/quick-generate.mdindex a2d8dc59..865d0faa 100644--- a/skills/ppt-master/workflows/profiles/quick-generate.md+++ b/skills/ppt-master/workflows/profiles/quick-generate.md@@ -766,7 +766,10 @@ python3 ${SKILL_DIR}/scripts/svg_to_pptx.py <project_path> \project-local assets referenced by those SVGs. It infers one consistent canvas,uses a lockless flat PowerPoint package, and does not force-disable ordinaryexport options. Notes, Custom Animations, and narration remain off unless-selected by the agent or required by the Quick video rule above. Do not run+selected by the agent or required by the Quick video rule above. Append+`--native-charts-and-tables` only when the effective delivery decision+explicitly requires native Chart/Table objects; marker presence, imported+origin, and semantic tables never activate replacement implicitly. Do not run`finalize_svg.py`. After the validated base export, run[`generate-audio`](../stages/generate-audio.md) when Narration Audio is enabled;it owns page audio/SRT, narrated PPTX, the optional raw native MP4, and thediff --git a/skills/ppt-master/workflows/stages/apply-template-workspace.md b/skills/ppt-master/workflows/stages/apply-template-workspace.mdindex 629d4a39..e9e2e0ca 100644--- a/skills/ppt-master/workflows/stages/apply-template-workspace.md+++ b/skills/ppt-master/workflows/stages/apply-template-workspace.md@@ -109,7 +109,10 @@ leave the rest of the document untouched. An in-place root is not rewritten:- If the root contributes the effective structural owner, copy its declaredSVG roster and other non-bitmap structural files once, including mirror`source_themes.json` when present. Do not copy a Deck roster when Layout is- selected; its structure is shadowed by design.+ selected; its structure is shadowed by design. Preserve inline+ `<metadata type="application/json">` and+ `data-pptx-native-authority="json"` exactly; semantic Chart/Table JSON never+ moves into a sidecar during installation.- Copy the root's real package-owned `images/` and `icons/` files once. AStyle-only root has none; reject a Style-only library package carrying assetor review payloads.@@ -151,6 +154,14 @@ Template SVGs are complete Slide authoring prototypes, not export-time overlays.Quick instead realizes the selected prototypes into complete flat, Slide-localSVGs and never writes `page_layouts` or Master/Layout/placeholder metadata.+For a template-owned Chart/Table carrying+`data-pptx-native-authority="json"`, the installed inline JSON remains the+object's data/native authority. A generated page may retain its existing compact+preview or regenerate an approximate preview from updated JSON, but it must not+derive replacement JSON from that preview. Keep the authority marker and JSON+inside the generated SVG so default fallback and explicit native export remain+two renderings of one object contract.+## 5. Segment Precedence Is Resolved While Reading