Skip to content

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: round-trip export accepts collapsed placeholder geometry and keeps the native-restore placeholder of a full-canvas picture out of background promotion; checker measures imported text models row by row, exempts source-identical moved text from re-estimation, and warns on edited unsupported tables

hugohe3650912985ff4
diff --git a/skills/ppt-master/references/native-hyperlinks.md b/skills/ppt-master/references/native-hyperlinks.md
index e16b7502..aaddce0b 100644
--- a/skills/ppt-master/references/native-hyperlinks.md
+++ b/skills/ppt-master/references/native-hyperlinks.md
@@ -40,7 +40,7 @@ Authoring contract for PowerPoint-native click hyperlinks on complete objects an
Inline links become `a:rPr/a:hlinkClick`, whole-object links `p:cNvPr/a:hlinkClick` on each clickable leaf, each with an external hyperlink relationship; slide jumps add an internal slide relationship and `ppaction://hlinksldjump`. Supported PPTX import reconstructs the same canonical `<a href>` form.
-**Hard rule — Edit Native PPTX preservation**: unchanged round-trip pages keep their hyperlink XML and relationships byte-for-byte; external links are preserved. With a `page_plan.json`, a same-deck jump is retargeted only when its source target maps unambiguously to one output page — omitted or repeated targets make `svg_to_pptx.py --roundtrip` fail rather than link to an orphan or wrong slide. New links on an edited page use this contract.
+**Hard rule — Edit Native PPTX preservation**: unchanged round-trip pages keep their hyperlink XML and relationships byte-for-byte; external links are preserved. With a `page_plan.json`, a same-deck jump is retargeted only when its source target maps unambiguously to one output page — omitted or repeated targets make `svg_to_pptx.py --roundtrip` fail rather than link to an orphan or wrong slide. New links on an edited page use this contract. Wrapping an object that a source animation targets in an anchor keeps both; only a `trigger_shape` conflicts.
---
diff --git a/skills/ppt-master/scripts/docs/svg-pipeline.md b/skills/ppt-master/scripts/docs/svg-pipeline.md
index 5edf9ec9..31b2b977 100644
--- a/skills/ppt-master/scripts/docs/svg-pipeline.md
+++ b/skills/ppt-master/scripts/docs/svg-pipeline.md
@@ -162,7 +162,7 @@ Omitting a source slide deliberately drops its private video, audio, or opaque
native payloads; a kept slide still fails if rebuilding it would discard such
relationships.
With a plan present, presentation-level `sectionLst` and custom-show rosters
-are dropped, show/range playback selections reset to all output slides, output
+are dropped, show/range playback selections reset to all output slides, every Master and Layout part is retained, output
`p:sldId` values are renumbered, and the slide count in `docProps/app.xml` is
updated. A retained action targeting a removed custom show fails with its
slide/part and show ID; delivery checking also verifies this semantic closure.
diff --git a/skills/ppt-master/scripts/svg_quality/checker.py b/skills/ppt-master/scripts/svg_quality/checker.py
index 658b7e88..4c5c3e89 100644
--- a/skills/ppt-master/scripts/svg_quality/checker.py
+++ b/skills/ppt-master/scripts/svg_quality/checker.py
@@ -1722,12 +1722,43 @@ class SVGQualityChecker:
included_text_ids,
unchanged_text_ids,
)
+ self._check_roundtrip_unsupported_table_edits(
+ root,
+ result,
+ included_text_ids,
+ )
result['passed'] = len(result['errors']) == 0
except Exception as exc:
result['errors'].append(f"Failed to read file: {exc}")
result['passed'] = False
return self._record_result(result)
+ @staticmethod
+ def _check_roundtrip_unsupported_table_edits(
+ root: ET.Element,
+ result: Dict,
+ included_text_ids: set[int],
+ ) -> None:
+ """Warn when an edited page rewrites a table the importer could not
+ carry natively: it exports as shapes and a baked grid, not ``a:tbl``."""
+ if not included_text_ids:
+ return
+ for frame in root.iter(f'{{{SVG_NS}}}g'):
+ status = frame.get('data-pptx-replacement-status') or ''
+ if not status.startswith('unsupported-table'):
+ continue
+ if not any(
+ id(text) in included_text_ids
+ for text in frame.iter(f'{{{SVG_NS}}}text')
+ ):
+ continue
+ result['warnings'].append(
+ f"{_element_label(frame)}: edited text belongs to a source table "
+ f"the importer marked {status}; this page exports the table as "
+ "positioned text over a baked grid, not a native a:tbl. Leave the "
+ "table unchanged to restore the original, or accept shape output"
+ )
+
@staticmethod
def _check_semantic_shape_text(
root: ET.Element,
@@ -1790,6 +1821,12 @@ class SVGQualityChecker:
for child in list(parent)
}
unchanged_by_owner: Dict[int, bool] = {}
+ baseline_signatures: Dict[int, Counter] = {}
+ baseline_parent_by_id = {
+ id(child): parent
+ for parent in baseline_root.iter()
+ for child in list(parent)
+ }
included: set[int] = set()
unchanged_text: set[int] = set()
for text_element in root.iter(f'{{{SVG_NS}}}text'):
@@ -1836,9 +1873,71 @@ class SVGQualityChecker:
if unchanged:
unchanged_text.add(id(text_element))
continue
+ # The owner changed, but this text may be one of the owner's
+ # source texts moved vertically or left alone while a sibling
+ # was edited: same runs, same x, same anchor. The source deck
+ # already proved that it fits its frame, so it calibrates the
+ # estimator instead of being re-estimated against it.
+ baseline_owner = baseline_by_ref.get(source_ref)
+ if baseline_owner is not None:
+ pool = baseline_signatures.get(owner_key)
+ if pool is None:
+ pool = Counter(
+ SVGQualityChecker._roundtrip_text_signature(
+ baseline_text,
+ baseline_parent_by_id,
+ )
+ for baseline_text in baseline_owner.iter(
+ f'{{{SVG_NS}}}text'
+ )
+ )
+ baseline_signatures[owner_key] = pool
+ signature = SVGQualityChecker._roundtrip_text_signature(
+ text_element,
+ parent_by_id,
+ )
+ if pool[signature] > 0:
+ pool[signature] -= 1
+ unchanged_text.add(id(text_element))
+ continue
included.add(id(text_element))
return included, unchanged_text
+ @staticmethod
+ def _roundtrip_text_signature(
+ text_element: ET.Element,
+ parent_by_id: Dict[int, ET.Element],
+ ) -> Tuple:
+ """Width-relevant identity of one text: runs, style, x, anchor."""
+ clone = copy.deepcopy(text_element)
+ for node in clone.iter():
+ for name in ('y', 'dy', 'id'):
+ node.attrib.pop(name, None)
+ if node is not clone:
+ node.attrib.pop('x', None)
+ clone.attrib.pop('x', None)
+ effective = tuple(
+ (
+ name,
+ _effective_presentation_value(text_element, name, parent_by_id)
+ if _effective_presentation_value is not None
+ else text_element.get(name),
+ )
+ for name in (
+ 'font-family',
+ 'font-size',
+ 'font-weight',
+ 'font-style',
+ 'letter-spacing',
+ 'text-anchor',
+ )
+ )
+ return (
+ text_element.get('x'),
+ effective,
+ ET.tostring(clone, encoding='unicode'),
+ )
+
@staticmethod
def _roundtrip_edited_text_ids(
root: ET.Element,
@@ -3631,6 +3730,88 @@ class SVGQualityChecker:
parent_by_id,
)
+ @classmethod
+ def _imported_model_text_lines(
+ cls,
+ text_el: ET.Element,
+ parent_by_id: Dict[int, ET.Element],
+ font_sizes: Dict[int, float],
+ letter_spacings: Dict[int, float],
+ ) -> List[Tuple[ET.Element, float, float, List[Dict], float]] | None:
+ """Measure an imported ``lines`` / ``paragraphs`` text one row per tspan.
+
+ ``pptx_to_svg.py --roundtrip`` projects multi-line source text as
+ nested ``<tspan>`` rows without ``x`` / ``dy`` and records the row
+ advance in ``data-paragraph-line-height``; the exporter reads that
+ model, so the estimator must not measure the rows as one line.
+ """
+ if text_el.get('data-pptx-text-model') not in {'lines', 'paragraphs'}:
+ return None
+ if _parse_project_geometry_length is None:
+ return None
+ try:
+ base_x = _parse_project_geometry_length(text_el.get('x') or '0', 'x')
+ base_y = _parse_project_geometry_length(text_el.get('y') or '0', 'y')
+ except ValueError:
+ return None
+ source_runs: List[Tuple[ET.Element, str]] = []
+
+ def collect(element: ET.Element) -> None:
+ if element.text and element.text.strip():
+ source_runs.append((element, re.sub(r'\s+', ' ', element.text)))
+ for child in list(element):
+ if _local_name(child) not in {'tspan', 'a'}:
+ continue
+ collect(child)
+ if child.tail and child.tail.strip():
+ source_runs.append((element, re.sub(r'\s+', ' ', child.tail)))
+
+ collect(text_el)
+ if not source_runs:
+ return None
+
+ def row_of(owner: ET.Element) -> ET.Element | None:
+ current: ET.Element | None = owner
+ while current is not None and current is not text_el:
+ parent = parent_by_id.get(id(current))
+ if parent is text_el:
+ return current
+ current = parent
+ return None
+
+ rows: List[Tuple[ET.Element | None, List[Tuple[ET.Element, str]]]] = []
+ for owner, text in source_runs:
+ row = row_of(owner)
+ if rows and rows[-1][0] is row:
+ rows[-1][1].append((owner, text))
+ else:
+ rows.append((row, [(owner, text)]))
+ try:
+ line_height = float(text_el.get('data-paragraph-line-height') or 0)
+ except ValueError:
+ line_height = 0.0
+ lines: List[Tuple[ET.Element, float, float, List[Dict], float]] = []
+ y = base_y
+ try:
+ for index, (row, row_runs) in enumerate(rows):
+ resolved = cls._resolved_text_runs(
+ row_runs,
+ parent_by_id,
+ font_sizes,
+ letter_spacings,
+ )
+ if not resolved:
+ continue
+ size = max(float(run['font_size']) for run in resolved)
+ if index > 0:
+ y += line_height if line_height > 0 else size * 1.2
+ if row is not None:
+ y += float(row.get('data-paragraph-space-before') or 0)
+ lines.append((row if row is not None else text_el, base_x, y, resolved, size))
+ except (KeyError, TypeError, ValueError):
+ return None
+ return lines or None
+
@classmethod
def _resolved_text_lines(
cls,
@@ -3641,6 +3822,14 @@ class SVGQualityChecker:
) -> List[Tuple[ET.Element, float, float, List[Dict], float]] | None:
"""Resolve one text carrier into the lines used by width estimation."""
lines: List[Tuple[ET.Element, float, float, List[Dict], float]] | None
+ model_lines = cls._imported_model_text_lines(
+ text_el,
+ parent_by_id,
+ font_sizes,
+ letter_spacings,
+ )
+ if model_lines:
+ return model_lines
try:
runs = cls._resolved_single_line_text_runs(
text_el,
diff --git a/skills/ppt-master/scripts/svg_to_pptx/drawingml/converter.py b/skills/ppt-master/scripts/svg_to_pptx/drawingml/converter.py
index 4fe85259..b0804223 100644
--- a/skills/ppt-master/scripts/svg_to_pptx/drawingml/converter.py
+++ b/skills/ppt-master/scripts/svg_to_pptx/drawingml/converter.py
@@ -1593,6 +1593,11 @@ def _extract_background_candidate(
return '', None
if child.get('transform') or child.get('filter') or child.get('clip-path'):
return '', None
+ if child.get('data-pptx-shape-id') is not None:
+ # A source-identified object (including the round-trip
+ # native-restore placeholder for an unchanged full-canvas picture)
+ # must stay a shape so its native original can take its place.
+ return '', None
style_overrides = _extract_inheritable_styles(child)
local_opacity = get_element_opacity(child)
child_ctx = ctx.child(
diff --git a/skills/ppt-master/scripts/svg_to_pptx/pptx_package/template_structure.py b/skills/ppt-master/scripts/svg_to_pptx/pptx_package/template_structure.py
index f0f18125..f171e62f 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
@@ -1171,8 +1171,12 @@ def _native_geometry(raw: Any, context: str) -> tuple[float, float, float, float
values = tuple(float(raw[key]) for key in ("x", "y", "width", "height"))
except (KeyError, TypeError, ValueError) as exc:
raise TemplateStructureError(f"{context} geometry is invalid") from exc
- if not all(math.isfinite(value) for value in values) or values[2] <= 0 or values[3] <= 0:
- raise TemplateStructureError(f"{context} geometry must be finite and positive")
+ if not all(math.isfinite(value) for value in values) or values[2] < 0 or values[3] < 0:
+ raise TemplateStructureError(f"{context} geometry must be finite and non-negative")
+ if values[2] == 0 or values[3] == 0:
+ # PowerPoint writes <a:ext cx="0" cy="0"/> for a collapsed placeholder
+ # (built-in vertical-text layouts do this); it carries no usable box.
+ return None
return values
@@ -1236,7 +1240,7 @@ def load_native_structure_contract(
layouts: list[NativeLayoutSpec] = []
seen_keys: set[str] = set()
seen_parts: set[str] = set()
- for index, item in enumerate(raw_layouts, start=1):
+ for index, item in enumerate(raw_layouts):
context = f"{contract_path.name} layouts[{index}]"
if not isinstance(item, dict):
raise TemplateStructureError(f"{context} must be an object")
@@ -1269,7 +1273,7 @@ def load_native_structure_contract(
if not isinstance(raw_placeholders, list):
raise TemplateStructureError(f"{context} placeholders must be a list")
placeholders: list[NativePlaceholderSpec] = []
- for ph_index, placeholder in enumerate(raw_placeholders, start=1):
+ for ph_index, placeholder in enumerate(raw_placeholders):
ph_context = f"{context} placeholders[{ph_index}]"
if not isinstance(placeholder, dict):
raise TemplateStructureError(f"{ph_context} must be an object")
diff --git a/skills/ppt-master/scripts/tests/test_dogfood_edit_native_p3_fixes.py b/skills/ppt-master/scripts/tests/test_dogfood_edit_native_p3_fixes.py
new file mode 100644
index 00000000..0ee34a49
--- /dev/null
+++ b/skills/ppt-master/scripts/tests/test_dogfood_edit_native_p3_fixes.py
@@ -0,0 +1,190 @@
+"""Regression tests for the Edit Native P3 regression round (2026-09-16)."""
+
+from __future__ import annotations
+
+import sys
+import unittest
+from pathlib import Path
+
+SCRIPTS_DIR = Path(__file__).resolve().parents[1]
+if str(SCRIPTS_DIR) not in sys.path:
+ sys.path.insert(0, str(SCRIPTS_DIR))
+
+from svg_to_pptx.drawingml.converter import ( # noqa: E402
+ convert_svg_to_slide_shapes,
+)
+from svg_quality.checker import SVGQualityChecker # noqa: E402
+from svg_quality.checker import ( # noqa: E402
+ _resolve_project_font_sizes,
+ _resolve_project_letter_spacings,
+)
+from xml.etree import ElementTree as ET # noqa: E402
+
+SVG_NS = "http://www.w3.org/2000/svg"
+from svg_to_pptx.pptx_package.template_structure import ( # noqa: E402
+ TemplateStructureError,
+ _native_geometry,
+)
+
+
+class NativeGeometryTests(unittest.TestCase):
+ """A collapsed built-in placeholder must not block the whole export."""
+
+ def test_zero_extent_placeholder_reads_as_no_geometry(self) -> None:
+ # PowerPoint writes <a:ext cx="0" cy="0"/> for the vertical-text
+ # placeholder of its built-in "Title and Vertical Text" layout.
+ self.assertIsNone(
+ _native_geometry({"x": 0, "y": 0, "width": 0, "height": 0}, "layouts[12]")
+ )
+ self.assertIsNone(
+ _native_geometry({"x": 10, "y": 10, "width": 100, "height": 0}, "layouts[12]")
+ )
+
+ def test_negative_or_non_finite_geometry_still_fails(self) -> None:
+ with self.assertRaisesRegex(TemplateStructureError, "non-negative"):
+ _native_geometry({"x": 0, "y": 0, "width": -1, "height": 5}, "layouts[0]")
+ with self.assertRaisesRegex(TemplateStructureError, "non-negative"):
+ _native_geometry({"x": 0, "y": 0, "width": float("nan"), "height": 5}, "layouts[0]")
+
+ def test_positive_geometry_round_trips(self) -> None:
+ self.assertEqual(
+ _native_geometry({"x": 1, "y": 2, "width": 3, "height": 4}, "layouts[0]"),
+ (1.0, 2.0, 3.0, 4.0),
+ )
+
+
+class NativeRestorePlaceholderTests(unittest.TestCase):
+ """The materializer's placeholder for an unchanged full-canvas picture is a
+ full-canvas rect inside a source-identified group; background promotion
+ used to swallow it, so the round-trip overlay found no shape for it."""
+
+ def test_source_identified_full_canvas_group_is_not_promoted(self) -> None:
+ import tempfile
+
+ svg = (
+ '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 540">'
+ '<g id="shape-1257" data-pptx-object="group" data-pptx-shape-id="1257" '
+ 'data-pptx-shape-scope="slide">'
+ '<rect x="0" y="0" width="960" height="540.1" fill="#000000"/></g>'
+ '<g id="shape-1258" data-pptx-object="group" data-pptx-shape-id="1258" '
+ 'data-pptx-shape-scope="slide">'
+ '<rect x="10" y="10" width="100" height="50" fill="#FF0000"/></g>'
+ '</svg>'
+ )
+ with tempfile.TemporaryDirectory() as tmp:
+ path = Path(tmp) / "slide_57.svg"
+ path.write_text(svg, encoding="utf-8")
+ shapes_xml = convert_svg_to_slide_shapes(
+ path, resource_root=Path(tmp), slide_num=1, slide_count=1,
+ )[0]
+ self.assertIn('data-pptx-shape-id', svg)
+ self.assertNotIn('<p:bg>', shapes_xml)
+ self.assertEqual(shapes_xml.count('name="shape-1257"'), 1)
+ self.assertEqual(shapes_xml.count('name="shape-1258"'), 1)
+
+
+def _parse(svg: str) -> tuple[ET.Element, dict[int, ET.Element]]:
+ root = ET.fromstring(svg)
+ parents = {id(child): parent for parent in root.iter() for child in parent}
+ return root, parents
+
+
+class ImportedTextModelMeasurementTests(unittest.TestCase):
+ """Imported ``paragraphs`` / ``lines`` texts are measured row by row."""
+
+ def _bounds(self, svg: str):
+ root, parents = _parse(svg)
+ text = next(root.iter(f"{{{SVG_NS}}}text"))
+ sizes = _resolve_project_font_sizes(root)
+ spacings = _resolve_project_letter_spacings(root, sizes)
+ return SVGQualityChecker._estimated_text_bounds(
+ text, parents, sizes, spacings, include_headroom=False,
+ )
+
+ def test_paragraph_rows_stack_instead_of_concatenating(self) -> None:
+ row = "这是一个很长很长的段落文字用来测试宽度估算是否按行进行"
+ model = (
+ '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 540">'
+ '<g data-pptx-frame="0 0 960 200"><text x="10" y="40" font-size="20" '
+ 'data-pptx-text-model="paragraphs" data-paragraph-line-height="30">'
+ f'<tspan>{row}</tspan><tspan data-paragraph-space-before="6">{row}</tspan>'
+ f'<tspan>{row}</tspan></text></g></svg>'
+ )
+ single = (
+ '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 540">'
+ f'<g data-pptx-frame="0 0 960 200"><text x="10" y="40" font-size="20">{row}</text>'
+ '</g></svg>'
+ )
+ stacked = self._bounds(model)
+ one_row = self._bounds(single)
+ self.assertIsNotNone(stacked)
+ self.assertIsNotNone(one_row)
+ # Same right edge as one row, three rows tall (two advances + spacing).
+ self.assertAlmostEqual(stacked[2], one_row[2], delta=1.0)
+ self.assertGreater(stacked[3] - one_row[3], 60.0)
+
+ def test_lines_model_without_positions_is_still_measurable(self) -> None:
+ model = (
+ '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 540">'
+ '<g data-pptx-frame="0 0 400 200"><text x="10" y="40" font-size="20" '
+ 'data-pptx-text-model="lines" data-paragraph-line-height="24">'
+ '<tspan>first row</tspan>'
+ '<tspan data-paragraph-line-break="1">second row is longer</tspan>'
+ '</text></g></svg>'
+ )
+ bounds = self._bounds(model)
+ self.assertIsNotNone(bounds)
+ self.assertGreater(bounds[3], 40 + 24 - 5)
+
+
+class _Record:
+ representation = "shape"
+
+
+class _Document:
+ def __init__(self, refs):
+ self.source_refs = {ref: _Record() for ref in refs}
+
+
+class RoundtripTextDiffTests(unittest.TestCase):
+ """Inside an edited owner, a source text that only moved vertically keeps
+ its source-proven width instead of being re-estimated as edited text."""
+
+ OWNER = (
+ '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 540">'
+ '<g id="shape-3" data-pptx-source-ref="slide:3" data-pptx-frame="0 0 900 400">'
+ '<text x="20" y="{y1}" font-size="16">{t1}</text>'
+ '<text x="20" y="80" font-size="16">{t2}</text>'
+ '</g></svg>'
+ )
+
+ def _diff(self, current: str, baseline: str):
+ root, _ = _parse(current)
+ baseline_root, _ = _parse(baseline)
+ return SVGQualityChecker._roundtrip_text_diff_ids(
+ root, _Document(["slide:3"]), baseline_root, {}, {},
+ )
+
+ def test_moved_row_and_untouched_sibling_stay_unchanged(self) -> None:
+ baseline = self.OWNER.format(y1="40", t1="原文一", t2="原文二")
+ current = self.OWNER.format(y1="41", t1="原文一", t2="原文二")
+ included, unchanged = self._diff(current, baseline)
+ self.assertEqual(len(included), 0)
+ self.assertEqual(len(unchanged), 2)
+
+ def test_edited_row_is_included_and_sibling_is_not(self) -> None:
+ baseline = self.OWNER.format(y1="40", t1="原文一", t2="原文二")
+ current = self.OWNER.format(y1="40", t1="改过的文字", t2="原文二")
+ included, unchanged = self._diff(current, baseline)
+ self.assertEqual(len(included), 1)
+ self.assertEqual(len(unchanged), 1)
+
+ def test_horizontal_move_counts_as_edited(self) -> None:
+ baseline = self.OWNER.format(y1="40", t1="原文一", t2="原文二")
+ current = baseline.replace('x="20" y="80"', 'x="600" y="80"')
+ included, unchanged = self._diff(current, baseline)
+ self.assertEqual(len(included), 1)
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/skills/ppt-master/workflows/edit-native-pptx.md b/skills/ppt-master/workflows/edit-native-pptx.md
index 5c61071f..677d4f80 100644
--- a/skills/ppt-master/workflows/edit-native-pptx.md
+++ b/skills/ppt-master/workflows/edit-native-pptx.md
@@ -44,8 +44,8 @@ python3 skills/ppt-master/scripts/pptx_to_svg.py "<source.pptx>" -o "projects/<s
| `authoring-svg-flat/slide_NN.svg` | One compact editable SVG per source slide, in order | Open only pages you will edit or must judge for reuse |
| `authoring-svg-flat/authoring_summary.json` | Roster plus per-page canvas, text, image, vector, placeholder, source-ref, and proxy counts | Read first; plan from it before opening any SVG |
| `images/`, `icons/imported/`, `audio/`, `video/`, `sounds/` | Source media and imported vectors | Keep names; changed bytes rebuild every output page whose source graph references that part, and a format mismatch fails export |
-| `notes/slide_NN.md` | Source speaker notes | Edit, delete, or add per output page (§6) |
-| `native-payloads/`, `analysis/` | Immutable native backing and tool-owned contracts | Do not read, edit, or quote the tool-written files; your own notes may sit beside them |
+| `notes/slide_NN.md` | Source speaker notes, when the source has any | Edit, delete, or add per output page (§6) |
+| `native-payloads/`, `analysis/` | Immutable native backing and tool-owned contracts | Tool-written; do not read, edit, or quote them |
| `sources/source.pptx` | Exact source package | Read only through `source_to_md/ppt_to_md.py "<workspace>/sources/source.pptx" -o "<workspace>/validation/source_readback.md"` when you need page text without opening every SVG |
| `validation/`, `exports/` | Diagnostics and published decks | Tool-written |
@@ -73,7 +73,7 @@ Write `page_plan.json` at the workspace root only when the output differs from t
}
```
-`pages` is the complete non-empty output order; `source_slide` is the one-based source index whose native slide backs the page; `svg` is the authoring filename inside `authoring-svg-flat/`, omitted to use that page's `slide_NN.svg` — to reuse a source page twice, copy its SVG under a new name and list the copy, since every output page needs a distinct file and every extra file must appear in the plan. Only these fields are accepted. **Forbidden — plans the exporter refuses**: a same-deck slide jump whose destination is omitted or repeated; unknown, duplicated, or cross-owned `svg` filenames; `source_slide` out of range. Omitting a slide drops the audio, video, or undecodable payloads only it owns (export prints a note). With a plan, presentation-level sections, custom shows, and a playback selection naming one are dropped and slide ids renumbered.
+`pages` is the complete non-empty output order; `source_slide` is the one-based source index whose native slide backs the page; `svg` is the authoring filename inside `authoring-svg-flat/`, omitted to use that page's `slide_NN.svg` — to reuse a source page twice, copy its SVG under a new name and list the copy, since every output page needs a distinct file and every extra file must appear in the plan. Only these fields are accepted. **Forbidden — plans the exporter refuses**: a same-deck slide jump whose destination is omitted or repeated; unknown, duplicated, or cross-owned `svg` filenames; `source_slide` out of range. Omitting a slide drops the audio, video, or undecodable payloads only it owns (export prints a note). With a plan, presentation-level sections, custom shows, and a playback selection naming one are dropped and slide ids renumbered; every Master and Layout stays.
**Combining pages**: one output page has exactly one skeleton (`source_slide`). To merge, pick the page whose layout carries the result, then bring objects from other pages only through the adopt command — never pasted raw SVG, because source refs are page-local. The adopted object materializes its effective inherited presentation attributes and ancestor transforms, loses native identity, and makes the page `rebuilt`; a source proxy cannot leave its page, so a merge that needs one keeps that page as the skeleton. The object lands at the end of the target page for normal editing.
@@ -110,9 +110,9 @@ Load [`shared-standards-core.md`](../references/shared-standards-core.md) before
|---|---|
| Text replacement | Fit the slot's visual capacity from its geometry and font size, not the old placeholder length; resolve overflow by rewriting shorter → splitting across another selected page → choosing a larger source layout; shrinking type is last and never deck-wide |
| Cover / chapter pages | Replace title, subtitle, author, section label only |
-| Imported multi-line text | Arrives in one of two exporter-read models: `data-pptx-text-model="lines"` with continuation `<tspan data-paragraph-line-break>` lacking `x` / `dy` (ordinary renderers stack them on one baseline and the checker flags edited text as unresolved geometry — give each line its own `x` and `dy`; export ignores them), or `data-pptx-text-model="paragraphs"` with one nested `<tspan>` per paragraph and `data-paragraph-line-height`. Edit the text inside either model, or replace the whole `<text>` with canonical positioned lines and drop the import-side attributes |
+| Imported multi-line text | Arrives as `data-pptx-text-model="lines"` (continuation `<tspan data-paragraph-line-break>`) or `"paragraphs"` (one nested `<tspan>` per paragraph) with `data-paragraph-line-height`; the rows carry no `x` / `dy` and both the exporter and the checker read the model. Edit the text inside it, or replace the whole `<text>` with canonical positioned lines and drop the import-side attributes |
| Dense content pages | Compress to the slot count the page has; move overflow to another selected page |
-| Native tables / charts | Imported objects carry `data-pptx-native-authority="json"`: edit cell text or categories/series values in the inline JSON, keep structure and formatting from the source, and export with `--native-charts-and-tables` — without it the source chart object ships unchanged with its original data |
+| Native tables / charts | Imported objects carry `data-pptx-native-authority="json"`: edit cell text or categories/series values in the inline JSON, keep structure and formatting from the source, and export with `--native-charts-and-tables` — without it the source chart object ships unchanged with its original data. A table the importer marked `unsupported-table-*` is positioned text over a baked grid: editing it exports shapes, not `a:tbl` (the checker warns); leave it unchanged to keep the native table |
| Images | Point the existing `<image>` at a new file under `images/`; keep the frame |
| New elements | Canonical compact SVG per shared standards; icons via `icon_sync.py "<workspace>" <lib/name>`; AI images via `image_gen.py --manifest` when wanted |
| Objects from another page | `--adopt-object` only (§4.1); proxies cannot move |
@@ -125,7 +125,7 @@ python3 skills/ppt-master/scripts/svg_authoring_view.py "projects/<slug>_<YYYYMM
python3 skills/ppt-master/scripts/svg_quality_checker.py "projects/<slug>_<YYYYMMDD>" --roundtrip --json
```
-🚧 **GATE**: `--roundtrip` estimates edited text against its frame and canvas; errors block export until the text is rewritten, split, or moved to a larger layout, warnings are fixed or accepted with a stated reason. Width calibration samples unchanged text on the same page, so a fully rewritten page reports `0%` calibration and uses the default estimator — not an error. The exporter remains the final gate and fails closed on a page it cannot restore or convert.
+🚧 **GATE**: `--roundtrip` estimates edited text against its frame and canvas; errors set `quality_gate=failed` on the export receipt — clear them by rewriting, splitting, or moving the text to a larger layout; warnings are fixed or accepted with a stated reason. Width calibration samples unchanged text on the same page, so a fully rewritten page reports `0%` calibration and uses the default estimator — not an error. The exporter remains the final gate and fails closed on a page it cannot restore or convert.
---
@@ -155,7 +155,7 @@ Round-trip export summary: output_pages=N passthrough=P cloned_passthrough=C pat
`passthrough` = identity page with original XML (referenced, no plan, no overlay); `cloned_passthrough` = planned referenced page on a cloned part; `patched` = source shape XML kept while order, notes, transitions, animation, or narration timing changed; `rebuilt` = visible authoring or a referenced materialized resource changed — exactly the pages marked edited in §4.3 plus pages referencing a changed resource, and a delivery-only job must show `rebuilt=0`.
-**Revision round**: every count is measured against `sources/source.pptx`, so a second round on a delivered deck — more edits or delivery only — starts by importing that delivered PPTX as a new workspace (re-exporting an edited workspace untouched repeats its earlier `rebuilt`); a delivery-only round targets `rebuilt=0`, and narration already embedded in the delivered deck is source media that a new narration pass replaces rather than stacks.
+**Revision round**: every count is measured against `sources/source.pptx`, so a second round on a delivered deck — more edits or delivery only — starts by importing that delivered PPTX as a new workspace; a delivery-only round targets `rebuilt=0`, and a new narration pass replaces embedded narration rather than stacking it.
**Validation**: `pptx_delivery_check.py "<printed_output.pptx>" > ".../validation/<output_stem>.delivery.json"` (no structural errors; review advisories) and `source_to_md/ppt_to_md.py "<printed_output.pptx>" -o ".../validation/readback.md"` — slide count equals the plan length (or source count), key titles and replaced text present, notes count matches, receipt buckets match the confirmed roster.