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
fix: template-mode checks carrier baselines and mirror text targets; translucent full-canvas rects are not backgrounds; CJK literal font names never occupy the Latin slot; layout-fixed atoms leave the sparse display-size quota; mirror skeleton names follow scope
hugohe3be8089296767
diff --git a/skills/ppt-master/references/executor-structured.md b/skills/ppt-master/references/executor-structured.mdindex d23add97..0eff6d85 100644--- a/skills/ppt-master/references/executor-structured.md+++ b/skills/ppt-master/references/executor-structured.md@@ -16,7 +16,7 @@ Conditional Executor authority for `template_reuse_scope: mirror|layout` with `p|---|---|| Installed `templates/design_spec.<kind>.<id>.md` files | Every installed spec, segments owned per [`apply-template-workspace.md`](../workflows/stages/apply-template-workspace.md) §5; reuse in a valid context and after invalidation read them once with the planning artifacts || Current page mapping | The retained `spec_lock.md page_layouts` row; a page change needs no file load |-| Selected prototype SVG | Read the complete `templates/<basename>.svg` once per valid context and reuse it until a known change |+| Selected prototype SVG | Read the complete `<project_path>/templates/<basename>.svg` (the installed project-local copy, never the source workspace) once per valid context and reuse it until a known change |**Hard rule**: the complete Slide prototype SVG is authoritative and already resolves its Master + Layout; standalone Master/Layout definition SVGs are invalid; never author from a roster, manifest, sidecar, filename, or summary (manifest/text-slot files are tool metadata whose absence neither invalidates a legacy workspace nor permits text-topology changes). Resolve each page's prototype directly from its `page_layouts` row — `mirror` → §1.1 (the workspace must support `replication_mode: mirror`); `layout` → resolve `P<NN>: <basename>`, retain the structure system, apply the re-skin/reflow rules below; a missing row stops (adaptive mode still needs one selected input prototype, and there is no filename/page-type fallback). A mapping change stops and returns to Strategist to update the plan, read back and validate, then load the new prototype.diff --git a/skills/ppt-master/references/strategist-template.md b/skills/ppt-master/references/strategist-template.mdindex f3cf2273..0e16d7ce 100644--- a/skills/ppt-master/references/strategist-template.md+++ b/skills/ppt-master/references/strategist-template.md@@ -38,13 +38,13 @@ Conditional extension for applying an installed Brand/Style/Layout/Deck workspac**Plan wording**: for Layout/Deck, state prototype use/order, what stays literal, and what may change, naming exact SVG basenames for prototype-specific exceptions rather than roles such as "cover". For Brand/Style, state identity or Direction / method constraints and free composition unless structure comes from another workspace.-**Two-stage boundary**: an installed template changes the content of final Stage 2, never the confirmation sequence. Run Stage 1 → Stage 2 in order in both Confirm UI and chat fallback; template inspection is not user confirmation. On browser timeout, return to the same stage in chat.+**Two-stage boundary**: an installed template changes the content of final Stage 2, never the confirmation sequence. Run Stage 1 → Stage 2 in order in both Confirm UI and chat fallback; template inspection is not user confirmation.---## 2. Scenario Fit and Inherited Design-**Mandatory — decide from the §1 inspection**: for `kind: deck`, compare the retained Template Overview with the confirmed audience, intent, outcome, delivery context, afterlife, and source obligations, and its Page Roster and SVG roster with required narrative roles, content shapes, slots, and capacity; Deck application is reusable context, never the current contract or an override. For `kind: layout`, compare only structural roles, slots, and capacity. For an active Style segment, compare its communication method with the current contract and its composition requirements with any selected Layout/Deck structure. Surface a material incompatibility; never silently weaken one segment to make it fit. Reopen a resource only when its path + SHA changed.+**Mandatory — decide from the §1 inspection**: for `kind: deck`, compare the retained Template Overview with the confirmed audience, intent, outcome, delivery context, afterlife, and source obligations, and its Page Roster and SVG roster with required narrative roles, content shapes, slots, and capacity; Deck application is reusable context, never the current contract or an override. For `kind: layout`, compare only structural roles, slots, and capacity. For an active Style segment, compare its communication method with the current contract and its composition requirements with any selected Layout/Deck structure. Surface a material incompatibility; never silently weaken one segment to make it fit.| Internal scope | Appropriate when ||---|---|@@ -72,7 +72,7 @@ A Style installed alongside Layout/Deck changes only Direction / method and neve- **Master roster**: one `pptx_masters` row per Master as `<master_key>: <picker name>`, copied from the workspace roster. Keys are 1–64 ASCII letters/digits/dots/underscores/hyphens starting with a letter or digit; spaces belong only in the picker name. Master visuals are root-level atoms, never `<g>`.- **Registered Layouts**: list used keys and only deliberately retained unused keys once as `<layout_key>: <master_key> | <PowerPoint layout name> | <prototype source>`. An unused Layout uses `template:<basename>`; a new adaptive Layout uses its first generated `P<NN>`. Reuse keys only for identical fixed atoms and slot ids/types/indices/bounds/bindings. Name authored keys after composition, never topic. Zero-slot Layouts are valid; never invent an empty `utility` kind or full-page fake slot.- **Page assignment**: 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 fit**: consult the advisory [capacity report](../scripts/docs/template-tools.md#advisory-slot-capacity), then measure actual page text at the planned family/anchor size (`text_measure.py`). If it does not fit, revise expression, choose another prototype, or declare an adaptive Layout; never go below a role band or widen slots in Executor. Slot syntax and `object` + `proxy`: [`pptx-structure-interface.md`](./pptx-structure-interface.md) §2.+- **Slot fit**: consult the advisory [capacity report](../scripts/docs/template-tools.md#advisory-slot-capacity), then measure actual page text at the planned family/anchor size (`text_measure.py`) and check each prototype carrier's baseline stays inside its frame (`top + 0.85×size ≤ baseline ≤ bottom − 0.35×size`). If either fails, revise expression, fix the carrier baseline, choose another prototype, or declare an adaptive Layout; never go below a role band or widen slots in Executor. Slot syntax and `object` + `proxy`: [`pptx-structure-interface.md`](./pptx-structure-interface.md) §2.- **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 the contract; export only compiles declared structure.- **Input prototypes**: 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 authored visuals and text-node topology; a JSON-first Chart/Table may regenerate only its derived preview children.diff --git a/skills/ppt-master/scripts/docs/project.md b/skills/ppt-master/scripts/docs/project.mdindex 1191c27c..76b101f0 100644--- a/skills/ppt-master/scripts/docs/project.md+++ b/skills/ppt-master/scripts/docs/project.md@@ -26,7 +26,8 @@ Notes:- `import-sources --no-image-propagation` keeps extracted companion assets andtheir Markdown references in `sources/`, skipping their copy/manifest mergeinto the runtime `images/` pool. Create Template project-scope reference- intake uses this switch; Generate keeps the default propagation. It covers+ intake requires this switch; see [Create Template §1A](../../workflows/create-template.md#1a-pptx-reference).+ Generate keeps the default propagation. It coversnew conversions and existing companion Markdown. Explicit bitmap inputsstill enter `images/`; the switch does not clean up images imported earlier.- A moved topic-research pair `projects/<slug>.md` takes its siblingdiff --git a/skills/ppt-master/scripts/docs/svg-pipeline.md b/skills/ppt-master/scripts/docs/svg-pipeline.mdindex 543ff1e3..c2422de0 100644--- a/skills/ppt-master/scripts/docs/svg-pipeline.md+++ b/skills/ppt-master/scripts/docs/svg-pipeline.md@@ -653,7 +653,11 @@ counts and is written to stdout only. It also writes a factual Design Specskeleton by default (kind `deck`; choose `--kind layout` for a neutral Layoutpublication). The skeleton records canvas, source slide count, Master/Layout keys,picker names, slots, and a Source Preservation Map. Identity and design prose-remain TODOs; finish them before registration. See [template-tools.md](template-tools.md#mirror-publication). This validator/publisher is for Type A mirror,+remain TODOs; finish them before registration. Resolved workspaces under+`skills/ppt-master/templates/<kind_dir>/` use `templates/design_spec.md`;+all other workspaces use `templates/design_spec.<kind>.TODO.md`, even when their+`templates/` is empty. The `spec_skeleton` receipt records that path.+See [template-tools.md](template-tools.md#mirror-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/docs/template-tools.md b/skills/ppt-master/scripts/docs/template-tools.mdindex 142615e5..a04495b1 100644--- a/skills/ppt-master/scripts/docs/template-tools.md+++ b/skills/ppt-master/scripts/docs/template-tools.md@@ -36,10 +36,10 @@ Type A mirror is a tool publication path. Run these commands serially on theimporter's unchanged output:```bash-python3 scripts/pptx_template_import.py "<source.pptx>" -o "<import_workspace>" --inheritance-mode both-python3 scripts/mirror_template_materialize.py "<import_workspace>" "<template_workspace>" [--kind deck|layout]-python3 scripts/svg_quality_checker.py "<template_workspace>/templates" --template-mode --canonical-authoring-python3 scripts/template_preview_pptx.py "<template_workspace>" -o "<preview.pptx>"+python3 skills/ppt-master/scripts/pptx_template_import.py "<source.pptx>" -o "<import_workspace>" --inheritance-mode both+python3 skills/ppt-master/scripts/mirror_template_materialize.py "<import_workspace>" "<template_workspace>" [--kind deck|layout]+python3 skills/ppt-master/scripts/svg_quality_checker.py "<template_workspace>/templates" --template-mode --canonical-authoring+python3 skills/ppt-master/scripts/template_preview_pptx.py "<template_workspace>" -o "<preview.pptx>"```Only `pptx_template_import.py` workspaces with layered IR,@@ -51,8 +51,10 @@ The materializer writes the Design Spec skeleton in the same publicationtransaction. It defaults to Deck because its factual roster is one prototypeper source slide; `--kind layout` records a previously chosen neutral Layouttarget. The default skeleton is necessary for the next checker/preview commands,-so it needs no separate enable flag. It uses `templates/design_spec.md`, or a-qualified `design_spec.<kind>.TODO.md` beside existing qualified specs. It+so it needs no separate enable flag. A workspace whose resolved path lies under+`skills/ppt-master/templates/<kind_dir>/` uses `templates/design_spec.md`;+every other workspace uses `templates/design_spec.<kind>.TODO.md`, including an+empty project workspace. The `spec_skeleton` receipt records that path. Itrecords exact canvas dimensions/viewBox (`custom` if no registered size matches),source page count, Master/Layout keys, picker names, text slots and a SourcePreservation Map. The identity and Overview/Color Scheme/Typography/other design@@ -101,7 +103,14 @@ declared `line-height`, explicit tspan baselines, or a clearly labeled 1.2emestimate. If visible text uses tspans, it reads the first visible run and reportsmixed family/size variants separately. The estimate assumes uniform carrier typography and does not promisea fixed capacity across fonts, mixed runs, languages or wrapping choices.-Invalid bounds are reported as unavailable data, never as checker findings.+It also reports `baseline_allowed: [top + 0.85 * size, bottom - 0.35 * size]`+and the current `baseline` (plus `baselines` for multiple lines). Template-mode+validation applies the existing vertical overflow severity to placeholder+carriers even when their text is a `{{...}}` marker; marker length has no content-width contract.+Mirror workspaces also read `template_execution/<prototype>.text-slots.json`:+each selector produces a `source: mirror-text-slot` row using the source text+frame or measured geometry and effective typography. Empty results include a+`note`. Invalid bounds are reported as unavailable data, never as checker findings.## `template_preview_pptx.py`@@ -121,7 +130,7 @@ Runs the install half of [`apply-template-workspace.md`](../../workflows/stages/The installer stages complete `templates/`, `images/`, and `icons/` trees on the target filesystem, verifies every mapped file and the final spec/roster/asset set, then publishes by directory rename. A publication failure rolls back all earlier renames, including removed Deck files and any previous receipt. If rollback itself fails, the error identifies retained backups for recovery. This is exception rollback across directories, not a single filesystem transaction or a process-crash recovery protocol.-Successful installation also writes `<project>/template_install.json` in that transaction. Its version-1 object records `project`, `roots` (canonical roots, source labels, kinds, spec paths/identities, and source SHA-256 fingerprints), `installed_specs`, `active_roster` (root, kind, and structural file paths, or `null`), and `files` (installed relative paths → SHA-256). `selection_sha256` binds a UI installation to its frozen Stage-1 snapshot; it is `null` for installations without a UI selection. If `confirm_ui/template_selection.json` exists, the supplied roots and their bytes must match it before installation. Confirm UI checks this machine receipt and installed content before exposing or accepting Stage 2; a textual provenance line is insufficient.+Successful installation also writes `<project>/template_install.json` in that transaction. Its version-1 object records `project`, `roots` (canonical roots, source labels, kinds, spec paths/identities, and source SHA-256 fingerprints), `installed_specs`, `active_roster` (root, kind, and structural file paths, or `null`), and `files` (installed relative paths → SHA-256). A spec's source and installed fingerprints differ by design because installation inserts one provenance line under its H1. `selection_sha256` binds a UI installation to its frozen Stage-1 snapshot; it is `null` for installations without a UI selection. If `confirm_ui/template_selection.json` exists, the supplied roots and their bytes must match it before installation. Confirm UI checks this machine receipt and installed content before exposing or accepting Stage 2; a textual provenance line is insufficient.## `register_template.py`diff --git a/skills/ppt-master/scripts/mirror_template_materialize.py b/skills/ppt-master/scripts/mirror_template_materialize.pyindex 58b66aef..7035841c 100644--- a/skills/ppt-master/scripts/mirror_template_materialize.py+++ b/skills/ppt-master/scripts/mirror_template_materialize.py@@ -2958,7 +2958,9 @@ def _spec_skeleton(native: dict, pages: list[tuple[Path, ET.Element]], kind: strcells = [f"`{path.name}`", root.get("data-pptx-master", ""),root.get("data-pptx-layout", ""), root.get("data-pptx-layout-name", ""), slots]lines.append("| " + " | ".join(c.replace("|", "\\|").replace("\n", " ") for c in cells) + " |")- lines += ["", "### Source Preservation Map", "",+ lines += ["", "Slots `none` means the source package declared no PowerPoint placeholder; "+ "editable text targets are listed in `template_execution/<prototype>.text-slots.json`.",+ "", "### Source Preservation Map", "",f"Source package SHA-256: `{native['source']['sha256']}`", "","| Source slide | Template | Master | Layout |", "| --- | --- | --- | --- |"]for slide, (path, root) in zip(sorted(native["slides"], key=lambda item: int(item["index"])), pages):@@ -3243,11 +3245,13 @@ def materialize_mirror_template(_source_geometry_is_unchanged(documents),))- spec_name = (- f"design_spec.{kind}.TODO.md"- if list((template_workspace / "templates").glob("design_spec.*.md"))- else "design_spec.md"+ library_root = Path(__file__).resolve().parent.parent / "templates"+ resolved_workspace = template_workspace.resolve()+ library_scope = any(+ (library_root / directory).resolve() in resolved_workspace.parents+ for directory in ("brands", "styles", "layouts", "decks"))+ spec_name = "design_spec.md" if library_scope else f"design_spec.{kind}.TODO.md"files.append(MaterializedFile(Path("templates") / spec_name,_spec_skeleton(native, materialized_roots, kind).encode("utf-8"),diff --git a/skills/ppt-master/scripts/pptx_template_import.py b/skills/ppt-master/scripts/pptx_template_import.pyindex 017a84f8..4f44e1de 100644--- a/skills/ppt-master/scripts/pptx_template_import.py+++ b/skills/ppt-master/scripts/pptx_template_import.py@@ -376,7 +376,7 @@ def main() -> int:print("Source structure assessment: "f"{native_structure['strategy']['recommendedMode']}; "- "create-template rebuilds explicit SVG structure"+ "create-template supports authored structure or unchanged mirror publication")return 0finally:diff --git a/skills/ppt-master/scripts/svg_quality/checker.py b/skills/ppt-master/scripts/svg_quality/checker.pyindex 9ae3f243..67f1b424 100644--- a/skills/ppt-master/scripts/svg_quality/checker.py+++ b/skills/ppt-master/scripts/svg_quality/checker.py@@ -1507,6 +1507,7 @@ class SVGQualityChecker:returnexcept (OSError, ValueError, TypeError):return+ result['info']['mirror_source_unchanged'] = Truesource_import = manifest.get('source_import')if isinstance(source_import, dict):self._source_import_summary = source_import@@ -4520,10 +4521,15 @@ class SVGQualityChecker:if self._is_hidden_element(text_element, parent_by_id):continuevisible_text = ''.join(text_element.itertext())- if (- not visible_text.strip()- or ('{{' in visible_text and '}}' in visible_text)- ):+ marker_text = '{{' in visible_text and '}}' in visible_text+ slot = parent_by_id.get(id(text_element))+ template_carrier = (+ self.template_mode+ and text_element.get('data-pptx-carrier') == 'true'+ and slot is not None+ and slot.get('data-pptx-placeholder') is not None+ )+ if not visible_text.strip() or (marker_text and not template_carrier):continueestimated = self._estimated_text_bounds(text_element,@@ -4532,11 +4538,19 @@ class SVGQualityChecker:letter_spacings,include_headroom=True,)+ if estimated is not None and marker_text:+ # A token has no content-width contract, but its carrier still+ # has the same baseline/line-box contract as a generated page.+ resolved_slot = self._resolved_root_module_bounds(slot)+ if resolved_slot is not None:+ boundary = resolved_slot[1]+ estimated = (boundary[0], estimated[1], boundary[2], estimated[3])if estimated is not None:estimated_by_id[id(text_element)] = estimatedif (- canvas is None+ marker_text+ or canvas is Noneor self._has_zero_opacity(text_element, parent_by_id)):continue@@ -6290,6 +6304,8 @@ class SVGQualityChecker:if local_name in definition_containers:returnif local_name == 'text':+ if element.get('data-pptx-layer') in {'master', 'layout'}:+ returncounts.update(collect_text_object_sizes(element))returnfor child in element:@@ -9445,6 +9461,10 @@ class SVGQualityChecker:def _print_provenance_category_summary(self):"""Print compact JSON-equivalent counts for token-safe gate handling."""categories = self._provenance_categories()+ unchanged_mirror = self.template_mode and self.results and all(+ result.get('info', {}).get('mirror_source_unchanged')+ for result in self.results+ )rows = (('blocking',@@ -9454,7 +9474,8 @@ class SVGQualityChecker:('introduced',len(categories['introduced']),- 'advisory; new or changed',+ ('advisory; mirror: source-authored spellings, workspace unmodified'+ if unchanged_mirror else 'advisory; new or changed'),),('inherited',diff --git a/skills/ppt-master/scripts/svg_quality/cli.py b/skills/ppt-master/scripts/svg_quality/cli.pyindex 3c4c97cd..2d6aec33 100644--- a/skills/ppt-master/scripts/svg_quality/cli.py+++ b/skills/ppt-master/scripts/svg_quality/cli.py@@ -192,7 +192,7 @@ def main() -> None:sys.exit(1)try:print(json.dumps(slot_capacity_report(files), ensure_ascii=False, indent=2))- except (OSError, ET.ParseError) as exc:+ except (OSError, ValueError, KeyError, TypeError, ET.ParseError) as exc:print(f"[ERROR] Cannot read template slots: {exc}", file=sys.stderr)sys.exit(1)sys.exit(0)diff --git a/skills/ppt-master/scripts/svg_quality/slot_capacity.py b/skills/ppt-master/scripts/svg_quality/slot_capacity.pyindex 7c7f8218..158b512f 100644--- a/skills/ppt-master/scripts/svg_quality/slot_capacity.py+++ b/skills/ppt-master/scripts/svg_quality/slot_capacity.py@@ -10,13 +10,19 @@ Dependencies:from __future__ import annotations+import jsonimport mathfrom pathlib import Pathfrom xml.etree import ElementTree as ETfrom text_measure import measure_text+from template_text_slots import analyze_template_text_slots+from svg_to_pptx.drawingml.text_properties import (+ resolve_project_font_sizes,+ resolve_project_letter_spacings,+)-from .checker import _effective_presentation_value, _parse_positive_bounds+from .checker import SVGQualityChecker, _effective_presentation_value, _parse_positive_boundsdef _number(value: str | None, default: float) -> float:@@ -51,31 +57,91 @@ def _capacity(width: float, height: float, size: float, family: str,}+def _mirror_text_bounds(carrier, parents, font_sizes, spacings):+ """Use the source text frame, falling back to measured text geometry."""+ owner = carrier+ while owner is not None:+ for name in ('data-pptx-bounds', 'data-pptx-frame'):+ raw = owner.get(name)+ if raw is None:+ continue+ try:+ bounds = _parse_positive_bounds(raw)+ except ValueError:+ continue+ if bounds is not None:+ return bounds, name+ owner = parents.get(id(owner))+ estimated = SVGQualityChecker._estimated_text_bounds(carrier, parents, font_sizes, spacings)+ if estimated is None:+ return None, 'unresolved text geometry'+ left, top, right, bottom = estimated+ return (left, top, right - left, bottom - top), 'estimated text geometry'+++def _text_targets(path, root, parents, font_sizes, spacings):+ for slot in root.iter():+ placeholder = slot.get('data-pptx-placeholder')+ if not placeholder:+ continue+ carriers = [child for child in slot+ if child.tag.rsplit('}', 1)[-1] == 'text'+ and child.get('data-pptx-carrier') == 'true']+ if not carriers:+ continue+ try:+ bounds = _parse_positive_bounds(slot.get('data-pptx-bounds', ''))+ except ValueError:+ bounds = None+ yield {'file': str(path), 'slot_id': slot.get('id'), 'source': 'placeholder',+ 'placeholder': placeholder, 'bounds': bounds}, carriers[0]++ manifest = path.parent / 'template_execution_manifest.json'+ sidecar = path.parent / 'template_execution' / f'{path.stem}.text-slots.json'+ if not manifest.is_file() or not sidecar.is_file():+ return+ manifest_data = json.loads(manifest.read_text(encoding='utf-8'))+ if not isinstance(manifest_data, dict):+ raise ValueError(f'{manifest}: expected a manifest object')+ if manifest_data.get('replication_mode') != 'mirror':+ return+ text_elements = [element for element in root.iter() if element.tag.rsplit('}', 1)[-1] == 'text']+ by_selector = {+ selector: element+ for slot, element in zip(analyze_template_text_slots(root), text_elements)+ for selector in (slot.selector, slot.legacy_selector)+ }+ sidecar_data = json.loads(sidecar.read_text(encoding='utf-8'))+ if not isinstance(sidecar_data, dict) or not isinstance(sidecar_data.get('text_slots'), list):+ raise ValueError(f'{sidecar}: expected a text_slots array')+ for slot in sidecar_data['text_slots']:+ if not isinstance(slot, dict) or not isinstance(slot.get('selector'), str):+ raise ValueError(f'{sidecar}: each text slot requires a selector string')+ selector = slot['selector']+ carrier = by_selector.get(selector)+ row = {'file': str(path), 'slot_id': selector, 'selector': selector,+ 'source': 'mirror-text-slot', 'placeholder': None, 'bounds': None}+ if carrier is None:+ yield {**row, 'unavailable': 'selector does not resolve to a text element'}, None+ continue+ row['bounds'], row['bounds_source'] = _mirror_text_bounds(carrier, parents, font_sizes, spacings)+ yield row, carrier++def slot_capacity_report(svg_files: list[Path]) -> dict:- """Read text placeholders without adding checker issues or changing files."""+ """Read placeholder and mirror text targets without changing files or gates."""slots = []for path in svg_files:root = ET.parse(path).getroot()parents = {id(child): parent for parent in root.iter() for child in parent}- for slot in root.iter():- placeholder = slot.get('data-pptx-placeholder')- if not placeholder:- continue- carriers = [child for child in slot- if child.tag.rsplit('}', 1)[-1] == 'text'- and child.get('data-pptx-carrier') == 'true']- if not carriers:- continue- try:- bounds = _parse_positive_bounds(slot.get('data-pptx-bounds', ''))- except ValueError:- bounds = None- row = {'file': str(path), 'slot_id': slot.get('id'),- 'placeholder': placeholder, 'bounds': bounds}+ font_sizes = resolve_project_font_sizes(root)+ spacings = resolve_project_letter_spacings(root, font_sizes)+ for row, carrier in _text_targets(path, root, parents, font_sizes, spacings):+ bounds = row['bounds']if bounds is None:- slots.append({**row, 'unavailable': 'missing or invalid slot bounds'})+ row.setdefault('unavailable', 'missing or invalid slot bounds')+ slots.append(row)continue- carrier = carriers[0]# Imported paragraphs can put all visible text and typography on# tspans. Use the first visible run, and expose mixed-run conditions.runs = [node for node in carrier.iter() if (node.text or '').strip()]@@ -83,16 +149,10 @@ def slot_capacity_report(svg_files: list[Path]) -> dict:def value(name: str) -> str | None:return _effective_presentation_value(first_run, name, parents)- size = _number(value('font-size'), 16.0)+ size = font_sizes[id(first_run)]family = value('font-family') or 'Calibri'weight = value('font-weight') or 'normal'- spacing_raw = value('letter-spacing') or '0'- try:- spacing = float(spacing_raw.removesuffix('px'))- if not math.isfinite(spacing):- spacing = 0.0- except ValueError:- spacing = 0.0+ spacing = spacings[id(first_run)]raw_line_height = value('line-height')line_height = size * 1.2line_height_source = 'estimated 1.2em'@@ -132,9 +192,24 @@ def slot_capacity_report(svg_files: list[Path]) -> dict:'cjk': _capacity(bounds[2], bounds[3], size, family, weight,spacing, line_height, '汉'),})+ ascent, descent = SVGQualityChecker._text_line_vertical_extent([], size)+ row['baseline_allowed'] = [bounds[1] + ascent, bounds[1] + bounds[3] - descent]+ lines = SVGQualityChecker._resolved_text_lines(carrier, parents, font_sizes, spacings)+ row['baseline'] = lines[0][2] if lines else None+ if not lines:+ # Source paragraph models may have a known first baseline even+ # when the estimator cannot resolve every subsequent line.+ try:+ baseline = float((value('y') or '0').removesuffix('px'))+ except ValueError:+ baseline = math.nan+ if math.isfinite(baseline):+ row['baseline'] = baseline+ if lines and len(lines) > 1:+ row['baselines'] = [line[2] for line in lines]variants = sorted({(_effective_presentation_value(run, 'font-family', parents) or family,- _number(_effective_presentation_value(run, 'font-size', parents), size))+ font_sizes[id(run)])for run in runs})if len(variants) > 1:@@ -143,10 +218,14 @@ def slot_capacity_report(svg_files: list[Path]) -> dict:]row['estimate_scope'] = 'first visible run; measure mixed content separately'slots.append(row)- return {+ report = {'schema': 'ppt-master.slot-capacity.v1', 'advisory': True,'assumptions': 'Uniform carrier typography; Latin sample distribution and CJK full-width glyphs. ''Line count uses declared/baseline pitch or an explicit 1.2em estimate. ''Measure actual content before locking typography; these are not limits.','slots': slots,}+ if not slots:+ report['note'] = ('No text placeholder carriers or mirror text-slot targets were found. '+ 'Mirror targets are listed in template_execution/*.text-slots.json.')+ return reportdiff --git a/skills/ppt-master/scripts/svg_to_pptx/drawingml/utils.py b/skills/ppt-master/scripts/svg_to_pptx/drawingml/utils.pyindex 22c1cef1..1e296561 100644--- a/skills/ppt-master/scripts/svg_to_pptx/drawingml/utils.py+++ b/skills/ppt-master/scripts/svg_to_pptx/drawingml/utils.py@@ -95,6 +95,7 @@ SYSTEM_FONTS = {'system-ui', '-apple-system', 'BlinkMacSystemFont'}# macOS/Linux-only fonts -> Windows equivalentsFONT_FALLBACK_WIN = {+ '微软雅黑': 'Microsoft YaHei','PingFang SC': 'Microsoft YaHei','PingFang TC': 'Microsoft JhengHei','PingFang HK': 'Microsoft JhengHei',@@ -154,6 +155,11 @@ GENERIC_FONT_MAP = {'serif': 'Times New Roman',}+_FONT_CANONICAL_NAMES = {+ name.casefold(): name+ for name in EA_FONTS | SYSTEM_FONTS | FONT_FALLBACK_WIN.keys() | GENERIC_FONT_MAP.keys()+}+# When the latin font is serif and no EA font is specified,# prefer SimSun (serif CJK) over Microsoft YaHei (sans-serif CJK)._SERIF_LATIN = {@@ -3249,6 +3255,7 @@ def parse_font_family(ea_font = Nonefor font in fonts:+ font = _FONT_CANONICAL_NAMES.get(font.casefold(), font)if font in SYSTEM_FONTS:continueif font in GENERIC_FONT_MAP:@@ -3262,7 +3269,7 @@ def parse_font_family(win_font = (_JA_FONT_FALLBACK_WIN.get(font) if is_japanese else None) or FONT_FALLBACK_WIN.get(font, font)- if font in EA_FONTS:+ if font in EA_FONTS or win_font in EA_FONTS:ea_font = ea_font or win_fontelse:latin_font = latin_font or win_fontdiff --git a/skills/ppt-master/scripts/svg_to_pptx/pptx_package/template_structure.py b/skills/ppt-master/scripts/svg_to_pptx/pptx_package/template_structure.pyindex 068507d6..f0f18125 100644--- a/skills/ppt-master/scripts/svg_to_pptx/pptx_package/template_structure.py+++ b/skills/ppt-master/scripts/svg_to_pptx/pptx_package/template_structure.py@@ -37,6 +37,8 @@ from pptx_to_svg.preset_authoring import (from ..drawingml.utils import (is_picture_effect_carrier,+ parse_inline_style,+ parse_opacity,parse_project_geometry_length,project_geometry_length_errors,)@@ -454,6 +456,8 @@ def _svg_canvas(root: ET.Element) -> tuple[float, float, float, float]:def _is_full_canvas_solid_rect(elem: ET.Element,canvas: tuple[float, float, float, float],+ *,+ root: ET.Element | None = None,) -> bool:"""Return whether a direct rect is eligible for scoped p:bg compilation."""if canvas[2] <= 0 or canvas[3] <= 0:@@ -462,6 +466,24 @@ def _is_full_canvas_solid_rect(return Falseif any(elem.get(attr) for attr in ("transform", "filter", "clip-path")):return False+ style = parse_inline_style(elem.get("style"))+ root_style = parse_inline_style(root.get("style")) if root is not None else {}++ def root_value(name: str) -> str | None:+ return root_style.get(name, root.get(name)) if root is not None else None++ try:+ fill_opacity = style.get("fill-opacity", elem.get("fill-opacity"))+ if fill_opacity in {None, "inherit"}:+ fill_opacity = root_value("fill-opacity")+ opacity = style.get("opacity", elem.get("opacity"))+ if opacity == "inherit":+ opacity = root_value("opacity")+ if any(parse_opacity(value, allow_percentage=True) < 1+ for value in (fill_opacity, opacity, root_value("opacity"))):+ return False+ except ValueError:+ return Falsetry:geometry = (parse_project_geometry_length(elem.get("x", "0"), "x"),@@ -1631,7 +1653,7 @@ def parse_template_slide(binding_raw = elem.get("data-pptx-binding")carrier_raw = elem.get("data-pptx-carrier")editable_raw = elem.get("data-pptx-editable")- is_background = _is_full_canvas_solid_rect(elem, canvas)+ is_background = _is_full_canvas_solid_rect(elem, canvas, root=root)effective_layer = layer or ("slide" if is_background else None)if (@@ -1725,7 +1747,8 @@ def parse_template_slide(raise TemplateStructureError(f"{svg_path.name}: {element_id or tag} violates template paint order; ""use Master background, Layout background, Slide background, "- "Master shapes, Layout shapes, then Slide content/placeholders"+ "Master shapes, Layout shapes, then Slide content/placeholders. "+ "Full-canvas solid rects are treated as backgrounds; translucent overlays are not backgrounds")last_order_rank = order_rank@@ -3691,7 +3714,7 @@ def _placement_lint_errors(svg_path: Path) -> list[str]:layer = (elem.get("data-pptx-layer") or "").strip().lower() or Noneif layer not in _LAYERS:layer = None- is_background = _is_full_canvas_solid_rect(elem, canvas)+ is_background = _is_full_canvas_solid_rect(elem, canvas, root=root)effective_layer = layer or ("slide" if is_background else None)if is_background and effective_layer is not None:order_rank = {"master": 0, "layout": 1, "slide": 2}[effective_layer]@@ -3705,7 +3728,8 @@ def _placement_lint_errors(svg_path: Path) -> list[str]:errors.append(f"{svg_path.name}: {elem.get('id') or tag} violates template paint ""order; use Master background, Layout background, Slide background, "- "Master shapes, Layout shapes, then Slide content/placeholders"+ "Master shapes, Layout shapes, then Slide content/placeholders. "+ "Full-canvas solid rects are treated as backgrounds; translucent overlays are not backgrounds")continuelast_order_rank = order_rankdiff --git a/skills/ppt-master/scripts/tests/test_template_flow_batch4.py b/skills/ppt-master/scripts/tests/test_template_flow_batch4.pynew file mode 100644index 00000000..3b4f7883--- /dev/null+++ b/skills/ppt-master/scripts/tests/test_template_flow_batch4.py@@ -0,0 +1,207 @@+#!/usr/bin/env python3+"""Regressions for dogfood template publication, typography and geometry.++Usage:+ python3 -m unittest tests.test_template_flow_batch4++Dependencies:+ Standard library and the script runtime dependencies.+"""++from __future__ import annotations++import contextlib+import io+import json+import sys+import tempfile+import unittest+import zipfile+from pathlib import Path+from unittest.mock import patch+from xml.etree import ElementTree as ET++SCRIPTS = Path(__file__).resolve().parents[1]+if str(SCRIPTS) not in sys.path:+ sys.path.insert(0, str(SCRIPTS))++import mirror_template_materialize as mirror # noqa: E402+import pptx_template_import # noqa: E402+from svg_quality.checker import SVGQualityChecker # noqa: E402+from svg_quality.slot_capacity import slot_capacity_report # noqa: E402+from svg_to_pptx.drawingml.utils import parse_font_family, unsafe_exported_font_faces # noqa: E402+from svg_to_pptx.drawingml.theme_fonts import MasterTextStyleSpec # noqa: E402+from svg_to_pptx.pptx_package.builder import create_pptx_with_native_svg # noqa: E402+from svg_to_pptx.pptx_package.template_structure import parse_template_slide # noqa: E402+from template_text_slots import analyze_template_text_slots # noqa: E402++SVG_NS = 'http://www.w3.org/2000/svg'+NS = {'a': 'http://schemas.openxmlformats.org/drawingml/2006/main',+ 'p': 'http://schemas.openxmlformats.org/presentationml/2006/main'}+PNG = ('data:image/png;base64,'+ 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4z8AAAAMBAQDJ/pLvAAAAAElFTkSuQmCC')+++def _page(body: str, attributes: str = '') -> str:+ return (f'<svg xmlns="{SVG_NS}" viewBox="0 0 1280 720" font-family="Arial" '+ 'data-pptx-master="m" data-pptx-master-name="Master" '+ f'data-pptx-layout="l" data-pptx-layout-name="Layout" {attributes}>{body}</svg>')+++class TemplateFlowBatch4Tests(unittest.TestCase):+ def setUp(self) -> None:+ temporary = tempfile.TemporaryDirectory()+ self.addCleanup(temporary.cleanup)+ self.root = Path(temporary.name)++ def _write(self, name: str, content: str) -> Path:+ path = self.root / name+ path.parent.mkdir(parents=True, exist_ok=True)+ path.write_text(content, encoding='utf-8')+ return path++ def test_s1_materializer_uses_resolved_workspace_scope(self) -> None:+ svg = self._write('source.svg', _page(+ '<text x="100" y="100" font-size="24">Source</text>'))+ pptx = self.root / 'source.pptx'+ with contextlib.redirect_stdout(io.StringIO()):+ self.assertTrue(create_pptx_with_native_svg(+ [svg], pptx, resource_root=self.root, verbose=False, use_compat_mode=False,+ master_text_style_spec=MasterTextStyleSpec(3000, 1800)))+ imported = self.root / 'imported'+ with patch.object(sys, 'argv', ['pptx_template_import.py', str(pptx),+ '-o', str(imported), '--inheritance-mode', 'both']):+ self.assertEqual(pptx_template_import.main(), 0)+ fake_script = self.root / 'skill/scripts/mirror_template_materialize.py'+ library = self.root / 'skill/templates/decks'+ library.mkdir(parents=True)+ outside = self.root / 'outside'+ outside.mkdir()+ (library / 'escaped').symlink_to(outside, target_is_directory=True)+ with patch.object(mirror, '__file__', str(fake_script)):+ for destination, kind, expected in (+ (self.root / 'project', 'deck', 'design_spec.deck.TODO.md'),+ (self.root / 'project-layout', 'layout', 'design_spec.layout.TODO.md'),+ (library / 'example', 'deck', 'design_spec.md'),+ (library.parent / 'layouts/example', 'layout', 'design_spec.md'),+ (library / 'escaped/project', 'deck', 'design_spec.deck.TODO.md'),+ ):+ with self.subTest(destination=destination):+ receipt = mirror.materialize_mirror_template(imported, destination, kind=kind)+ self.assertEqual(receipt['spec_skeleton'], f'templates/{expected}')+ self.assertTrue((destination / 'templates' / expected).is_file())++ def test_s2_mirror_capacity_resolves_sidecar_selectors_and_effective_fonts(self) -> None:+ path = self._write('templates/01.svg', _page(+ '<g id="source" data-pptx-bounds="20 40 320 100" font-size="40">'+ '<text x="20" y="80"><tspan font-family="Microsoft YaHei">中文</tspan></text></g>'+ '<text id="unlisted" x="500" y="80">Unlisted</text>'))+ slots = analyze_template_text_slots(ET.parse(path).getroot())+ self._write('templates/template_execution_manifest.json', json.dumps({+ 'replication_mode': 'mirror', 'source_geometry_unchanged': True,+ }))+ self._write('templates/template_execution/01.text-slots.json', json.dumps({+ 'text_slots': [slots[0].model_payload()],+ }))+ before = {p: p.read_bytes() for p in self.root.rglob('*') if p.is_file()}+ rows = slot_capacity_report([path])['slots']+ self.assertEqual(len(rows), 1)+ self.assertEqual(rows[0]['selector'], '#source>text')+ self.assertEqual(rows[0]['source'], 'mirror-text-slot')+ self.assertEqual(rows[0]['bounds'], (20, 40, 320, 100))+ self.assertEqual(rows[0]['font_size'], 40)+ self.assertEqual(rows[0]['font_family'], 'Microsoft YaHei')+ self.assertGreater(rows[0]['cjk']['characters_per_line'], 0)+ self.assertEqual(before, {p: p.read_bytes() for p in self.root.rglob('*') if p.is_file()})+ empty = self._write('empty.svg', _page('<rect width="5" height="5"/>'))+ report = slot_capacity_report([empty])+ self.assertEqual(report['slots'], [])+ self.assertIn('note', report)+ sidecar = self._write('templates/template_execution/01.text-slots.json', json.dumps({+ 'text_slots': [{'selector': '#missing'}],+ }))+ self.assertIn('unavailable', slot_capacity_report([path])['slots'][0])+ sidecar.write_text('[]')+ with self.assertRaisesRegex(ValueError, 'text_slots array'):+ slot_capacity_report([path])++ def test_s3_translucent_canvas_rect_stays_a_master_shape(self) -> None:+ self._write('design_spec.md', '---\nkind: deck\nnative_structure_mode: structured\n---\n# Spec\n')+ for opacity in ('fill-opacity="0.8"', 'opacity="0.8"',+ 'style="fill-opacity:0.8"', 'style="opacity:80%"'):+ with self.subTest(opacity=opacity):+ path = self._write('scrim.svg', _page(+ '<rect id="m-bg" data-pptx-layer="master" width="1280" height="720" fill="#FFFFFF"/>'+ f'<image id="m-field" data-pptx-layer="master" href="{PNG}" width="1280" height="720"/>'+ '<rect id="m-scrim" data-pptx-layer="master" width="1280" height="720" '+ f'fill="#FFFFFF" {opacity}/>'))+ result = SVGQualityChecker(template_mode=True).check_file(str(path))+ self.assertFalse(any('paint order' in issue for issue in result['errors']), result['errors'])+ parse_template_slide(path, 1)+ # Export an attribute-based case and inspect the native shape alpha.+ path.write_text(path.read_text().replace('style="opacity:80%"', 'fill-opacity="0.8"'))+ pptx = self.root / 'scrim.pptx'+ with contextlib.redirect_stdout(io.StringIO()):+ self.assertTrue(create_pptx_with_native_svg(+ [path], pptx, resource_root=self.root, verbose=False, use_compat_mode=False,+ master_text_style_spec=MasterTextStyleSpec(3000, 1800)))+ with zipfile.ZipFile(pptx) as package:+ master = ET.fromstring(package.read('ppt/slideMasters/slideMaster1.xml'))+ self.assertEqual(len(master.findall('./p:cSld/p:bg', NS)), 1)+ self.assertIsNone(master.find('./p:cSld/p:bg//a:alpha', NS))+ self.assertEqual(master.find('.//p:sp/p:spPr/a:solidFill/a:srgbClr/a:alpha', NS).get('val'), '80000')+ opaque = path.read_text().replace('fill-opacity="0.8"', 'fill-opacity="1"')+ path.write_text(opaque)+ self.assertTrue(any('paint order' in issue for issue in+ SVGQualityChecker(template_mode=True).check_file(str(path))['errors']))+ for inherited in ('fill-opacity="0.8"', 'style="opacity:0.8"'):+ with self.subTest(inherited=inherited):+ path.write_text(opaque.replace('fill-opacity="1"', '').replace(+ 'data-pptx-layout="l"', f'data-pptx-layout="l" {inherited}'))+ self.assertFalse(any('paint order' in issue for issue in+ SVGQualityChecker(template_mode=True).check_file(str(path))['errors']))+ parse_template_slide(path, 1)++ def test_s4_cjk_alias_does_not_claim_the_named_latin_slot(self) -> None:+ for family in ('微软雅黑', 'Microsoft YaHei', 'microsoft yahei', 'noto sans sc'):+ for stack in (f'{family}, Arial', f'"{family}", Arial, sans-serif'):+ with self.subTest(stack=stack):+ self.assertEqual(parse_font_family(stack), {'latin': 'Arial', 'ea': 'Microsoft YaHei'})+ self.assertEqual(unsafe_exported_font_faces(stack), {})+ for stack in ('微软雅黑', 'Microsoft YaHei, SimHei, sans-serif'):+ self.assertEqual(parse_font_family(stack), {'latin': 'Microsoft YaHei', 'ea': 'Microsoft YaHei'})+ self.assertEqual(parse_font_family('Arial, sans-serif')['latin'], 'Arial')+ self.assertEqual(parse_font_family('serif, Microsoft YaHei')['latin'], 'Times New Roman')+ self.assertEqual(parse_font_family('Arial', 'ja-JP')['ea'], 'Yu Gothic')++ def test_s5_template_marker_checks_baseline_with_existing_severity(self) -> None:+ for baseline, bucket in ((272, 'errors'), (268.4, 'warnings'), (262.4, None), (257.6, None)):+ with self.subTest(baseline=baseline):+ path = self._write('chapter.svg', _page(+ '<g id="chapter-num-slot" data-pptx-placeholder="body" data-pptx-bounds="160 176 320 120">'+ f'<text id="chapter-num-carrier" data-pptx-carrier="true" x="160" y="{baseline}" '+ 'font-size="96">{{CHAPTER_NUM}}</text></g>'))+ result = SVGQualityChecker(template_mode=True).check_file(str(path))+ findings = {key: [issue for issue in result[key] if 'exceeds' in issue]+ for key in ('errors', 'warnings')}+ if bucket:+ self.assertEqual(len(findings[bucket]), 1, result)+ self.assertIn('vertical axis', findings[bucket][0])+ else:+ self.assertEqual(findings, {'errors': [], 'warnings': []})+ slot = slot_capacity_report([path])['slots'][0]+ self.assertEqual(slot['baseline_allowed'], [257.6, 262.4])+ self.assertEqual(slot['baseline'], baseline)++ def test_s6_fixed_layers_do_not_consume_sparse_display_quota(self) -> None:+ self._write('spec_lock.md', '<!-- ppt-master-schema: spec-lock/v1 -->\n'+ '# Lock\n\n## typography\n- body: 24\n\n## pptx_structure\n- mode: structured\n')+ for layer in ('master', 'layout', None):+ with self.subTest(layer=layer):+ metadata = f'data-pptx-layer="{layer}" data-pptx-editable="false"' if layer else ''+ path = self._write('svg_output/01.svg', _page(''.join(+ f'<text id="index-{i}" {metadata} x="140" y="{250 + i * 90}" font-size="40">0{i}</text>'+ for i in range(4))))+ result = SVGQualityChecker().check_file(str(path))+ recurrence = [issue for issue in result['errors'] if 'typography-size recurrence:' in issue]+ self.assertEqual(bool(recurrence), layer is None, result)diff --git "a/skills/ppt-master/templates/decks/\344\270\255\345\233\275\347\224\265\344\277\241/templates/03_chapter.svg" "b/skills/ppt-master/templates/decks/\344\270\255\345\233\275\347\224\265\344\277\241/templates/03_chapter.svg"index 7c494a4e..ff5cb47d 100644--- "a/skills/ppt-master/templates/decks/\344\270\255\345\233\275\347\224\265\344\277\241/templates/03_chapter.svg"+++ "b/skills/ppt-master/templates/decks/\344\270\255\345\233\275\347\224\265\344\277\241/templates/03_chapter.svg"@@ -40,9 +40,9 @@href="../images/skyline_bg.png" preserveAspectRatio="xMidYMid meet"data-pptx-layer="layout" data-pptx-editable="false"/><g id="section-number-slot" data-pptx-placeholder="body" data-pptx-idx="1"- data-pptx-bounds="96 148 300 116">+ data-pptx-bounds="96 120 300 140"><text id="section-number-carrier" data-pptx-carrier="true"- x="96" y="242" fill="#C00000" fill-opacity="0.14"+ x="96" y="218" fill="#C00000" fill-opacity="0.14"font-family="Arial, sans-serif" font-size="112" font-weight="700">{{CHAPTER_NUM}}</text></g><g id="section-title-slot" data-pptx-placeholder="title"diff --git a/skills/ppt-master/templates/layouts/editorial_bleed/templates/05_chapter_full.svg b/skills/ppt-master/templates/layouts/editorial_bleed/templates/05_chapter_full.svgindex 16a53099..84aa1a3f 100644--- a/skills/ppt-master/templates/layouts/editorial_bleed/templates/05_chapter_full.svg+++ b/skills/ppt-master/templates/layouts/editorial_bleed/templates/05_chapter_full.svg@@ -21,7 +21,7 @@<g id="chapter-full-number-slot" data-pptx-placeholder="body" data-pptx-idx="2"data-pptx-bounds="80 232 320 72"><text id="chapter-full-number-carrier" data-pptx-carrier="true"- x="80" y="292" fill="#64748B" font-family="Arial, Microsoft YaHei, sans-serif"+ x="80" y="282" fill="#64748B" font-family="Arial, Microsoft YaHei, sans-serif"font-size="56" font-weight="700">{{CHAPTER_NUM}}</text></g><g id="chapter-full-title-slot" data-pptx-placeholder="title"diff --git a/skills/ppt-master/templates/layouts/report_core/templates/02_section_divider.svg b/skills/ppt-master/templates/layouts/report_core/templates/02_section_divider.svgindex 03363ca0..3ab9271a 100644--- a/skills/ppt-master/templates/layouts/report_core/templates/02_section_divider.svg+++ b/skills/ppt-master/templates/layouts/report_core/templates/02_section_divider.svg@@ -9,7 +9,7 @@<g id="section-divider-number-slot" data-pptx-placeholder="body" data-pptx-idx="1"data-pptx-bounds="48 200 200 72"><text id="section-divider-number-carrier" data-pptx-carrier="true"- x="48" y="260" fill="#64748B" font-family="Arial, Microsoft YaHei, sans-serif"+ x="48" y="250" fill="#64748B" font-family="Arial, Microsoft YaHei, sans-serif"font-size="56" font-weight="700">{{CHAPTER_NUM}}</text></g><g id="section-divider-title-slot" data-pptx-placeholder="title"diff --git a/skills/ppt-master/workflows/create-template.md b/skills/ppt-master/workflows/create-template.mdindex 78f4da67..0ef4095d 100644--- a/skills/ppt-master/workflows/create-template.md+++ b/skills/ppt-master/workflows/create-template.md@@ -302,7 +302,7 @@ This step is a **hard gate**: no review PPTX, registration, staged install, or h### Step 5.1: Prototype Review Round-Layout/Deck only; Brand and Style skip it. Step 3 confirmed scope from a brief, not from the new design, so show the validated prototypes before they become durable: list the roster with one line per prototype (basename, role, slots) and point to the files or the Step 6 review PPTX, then wait for the user's reaction. Feedback revises prototypes or the spec inside the confirmed brief; a change to scope, kind, canvas, or replication intent returns to Step 2. After any revision rerun Step 5 (and Step 6 when triggered) before Step 7. Under explicit delegation, record `Prototype review: delegated` in the completion summary and continue.+Layout/Deck only; Brand and Style skip it. Step 3 confirmed scope from a brief, not from the new design, so show the validated prototypes before they become durable: list the roster with one line per prototype (basename, role, slots) and point to the files or the Step 6 review PPTX, then wait for the user's reaction. Feedback revises prototypes or the spec inside the confirmed brief; a change to scope, kind, canvas, or replication intent returns to Step 2; `mirror` prototypes are hash-preserved, so feedback lands only in the spec or returns to Step 2. After any revision rerun Step 5 (and Step 6 when triggered) before Step 7. Under explicit delegation, perform the review yourself — the roster line, the advisory capacity report, every prototype's slot carriers (baseline inside the frame, a font stack with Latin and EA faces), and roster ↔ §V agreement — then record `Prototype review: delegated` with the items checked and any revision in the completion summary.---diff --git a/skills/ppt-master/workflows/profiles/quick-generate.md b/skills/ppt-master/workflows/profiles/quick-generate.mdindex 711ac1aa..f1b8c6dd 100644--- a/skills/ppt-master/workflows/profiles/quick-generate.md+++ b/skills/ppt-master/workflows/profiles/quick-generate.md@@ -88,7 +88,7 @@ A file taken from another project's tree is copied unless `--move` is explicit;**Installed templates**: run `apply-template-workspace` against the preflighted roots only; the request is the selection authority, with no receipt or handoff, and every later read uses the installed state. Before P01 read each installed spec once and, for Layout/Deck, every SVG prototype. Apply Brand identity, Style direction, the structure owner's prototype geometry, and Deck context under the stage's §5 segment precedence: an owner's instruction on how a value dominates, recedes, or stays rare binds as strongly as the value, and a Style tendency never demotes a Brand's dominant color.-**Template Application paragraph**: freeze one in context — explicit user instructions first, otherwise the fit of the content to the complete roster, defaulting to reference-led use (redesign after full-roster study; other readings such as augment-only or replacement-only are examples, not a menu). It names which prototypes may be used, skipped, repeated, reordered, or adapted, what stays fixed, and any exception by exact SVG basename. When a detail is later uncertain, reread the installed SVG.+**Template Application paragraph**: freeze one in context — explicit user instructions first, otherwise the fit of the content to the complete roster, defaulting to reference-led use (redesign after full-roster study; other readings such as augment-only or replacement-only are examples, not a menu). It names which prototypes may be used, skipped, repeated, reordered, or adapted, what stays fixed, and any exception by exact SVG basename. When a detail is later uncertain, reread the installed SVG. When the structure owner records `replication_mode: mirror`, say explicitly whether pages reuse the prototypes literally (text values only, topology frozen) or redesign from them — Quick has no `template_reuse_scope`, so this sentence is the only record of that choice.Read the planning-capability batch in one pass — a capability map, not a usage checklist: