AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He
feat: Quick decks declare their language on the page root; export derives theme fonts from pages
hugohe30b06d190111f
diff --git a/skills/ppt-master/references/executor-chart.md b/skills/ppt-master/references/executor-chart.mdindex a857428e..240dcc6f 100644--- a/skills/ppt-master/references/executor-chart.md+++ b/skills/ppt-master/references/executor-chart.md@@ -20,7 +20,7 @@ Conditional Executor authority for value-driven SVG geometry, plot-area markers,Construct in this order: (1) resolve data domain, categories, units, baseline, scale, and any radius/color/bin mapping; (2) establish the plot frame, axes/grid or radial frame, and legend needed to decode them; (3) calculate marks from the values, including cumulative, derived, or hierarchical geometry; (4) add data labels, axis/category labels, annotations, units, source notes, and visible exceptions from the page contract; (5) apply project typography, palette, effects, and container treatment without changing the encoding.-**Perceptual reading**: choose the least ambiguous presentation of the same data. Preserve source or semantic order when it carries meaning; otherwise sort for the page's comparison task. Prefer direct series labels when legible; keep legends, grid lines, and ticks only when they materially reduce lookup effort. Comparable panels share domain, scale, and category order unless a disclosed difference is the message. Magnitude bars and columns start from zero; interval marks keep their authoritative domain; any non-zero baseline or axis break is explicit and never exaggerates. A dual-axis chart is valid only when both series share the exact time/category domain and units and identities stay unambiguous; otherwise separate the views.+**Perceptual reading**: choose the least ambiguous presentation of the same data. Preserve source or semantic order when it carries meaning; otherwise sort for the page's comparison task; a right-to-left deck sets `axes.category.reverse` so categories read the way the page does. Prefer direct series labels when legible; keep legends, grid lines, and ticks only when they materially reduce lookup effort. Comparable panels share domain, scale, and category order unless a disclosed difference is the message. Magnitude bars and columns start from zero; interval marks keep their authoritative domain; any non-zero baseline or axis break is explicit and never exaggerates. A dual-axis chart is valid only when both series share the exact time/category domain and units and identities stay unambiguous; otherwise separate the views.**Reference — chart color and annotation conventions**: a monochromatic depth scheme reads cleaner than rainbow — the primary series in the full theme color, a comparison series in the same hue at about 60% alpha, baselines as a gray dashed line, the accent color only on the key data points; positive / warning / negative trends use the deck's green / yellow / red polarity roles. Place direct data labels at bar ends or beside points instead of a legend where they stay legible; annotate genuine inflection points in words ("policy change", "product launch"); mark an industry average or target as a gray dashed comparison baseline; keep units and precision consistent within one chart; add a muted source note where attribution or provenance matters.diff --git a/skills/ppt-master/references/plan-core.md b/skills/ppt-master/references/plan-core.mdindex d8787278..b57e0ba7 100644--- a/skills/ppt-master/references/plan-core.md+++ b/skills/ppt-master/references/plan-core.md@@ -163,7 +163,7 @@ python3 skills/ppt-master/scripts/visualization_recall.py validate \**Family selection**: user/template typography is authoritative. Delivery target: an explicit user/template target first, otherwise Windows Microsoft PowerPoint (owner: [`shared-standards-core.md`](./shared-standards-core.md) §4.1) — the authoring host's installed fonts never select a face; name concrete faces installed or approved on that target; at most four families; a brand/web face leads only after user-confirmed installation, otherwise export a safe face and keep it as a Design Spec reference (fonts are not embedded; CSS tails are preview aids, not PowerPoint fallbacks). Avoid near-equivalent splits (YaHei↔PingFang, SimSun↔Songti, Arial↔Helvetica↔Segoe UI, Times↔Times New Roman). Fonts in one deck form contrast (different family, weight, or proportion) or concord (one family throughout); across the direction set include both a concord and a contrast pairing unless the user or template fixes the stack, and never default to title = body without a reason.-**Reference — PPT-safe faces (recall, not a whitelist; one concrete named face per script — a stack carries at most one Latin face and one CJK face and never a fallback list of alternatives, because export takes the first named face of each script)**: CJK sans `Microsoft YaHei` / `SimHei`, CJK serif `SimSun` / `FangSong` / `KaiTi` (their macOS counterparts `PingFang SC` / `Heiti SC` / `Songti SC` are preview aliases, never the named face; a CJK deck that also sets Latin lines pairs both in one stack — `SimSun, Cambria` — so the theme's latin and ea slots differ), Traditional Chinese sans `Microsoft JhengHei`, serif `PMingLiU` / `DFKai-SB`, Japanese sans `Yu Gothic` / `Meiryo`, serif `Yu Mincho`, Korean sans `Malgun Gothic`, serif `Batang` (text on another locale's CJK face takes that locale's glyph forms), Arabic `Segoe UI` / `Tahoma` / `Times New Roman` (one face carries both the Latin and Arabic text), Devanagari and other Indic scripts `Nirmala UI` / `Mangal`, Thai `Leelawadee UI` / `Tahoma`, Latin sans `Arial` / `Calibri` / `Segoe UI` / `Verdana` / `Trebuchet MS`, Latin serif `Times New Roman` / `Georgia` / `Cambria` / `Palatino` / `Garamond` (`Georgia` sets old-style figures whose digits sit at different heights — a hero-number or data role needs lining figures: `Times New Roman`, `Cambria`, or any listed sans or mono), mono `Consolas` / `Courier New`, math `Cambria Math` (formula preview runs only), display `Impact` / `Arial Black`. Let the locked style's character pick the axis and lead the title — `Microsoft YaHei` / `Arial` are the neutral members, never the automatic lead; a neutral sans title where the style asks for character is the failure to avoid. Non-pre-installed directions — retro/pixel Press Start 2P / VT323, rounded Nunito / Quicksand / OPPO Sans (safe substitute `Trebuchet MS` / `Verdana`), modern web Inter / HarmonyOS Sans / Source Han, calligraphic 隶书 / 华文行楷 / 华文新魏 (safe substitute `KaiTi` / `FangSong`, titles only), brand faces — need target installation or stay Design Spec references.+**Reference — PPT-safe faces (recall, not a whitelist; one concrete named face per script — a stack carries at most one Latin face and one CJK face and never a fallback list of alternatives, because export takes the first named face of each script)**: CJK sans `Microsoft YaHei` / `SimHei`, CJK serif `SimSun` / `FangSong` / `KaiTi` (their macOS counterparts `PingFang SC` / `Heiti SC` / `Songti SC` are preview aliases, never the named face; a CJK deck that also sets Latin lines pairs both in one stack — `SimSun, Cambria` — so the theme's latin and ea slots differ), Traditional Chinese sans `Microsoft JhengHei`, serif `PMingLiU` / `DFKai-SB`, Japanese sans `Yu Gothic` / `Meiryo`, serif `Yu Mincho`, Korean sans `Malgun Gothic`, serif `Batang` (text on another locale's CJK face takes that locale's glyph forms), Arabic `Segoe UI` / `Tahoma` / `Times New Roman` (one face carries both the Latin and Arabic text), Hebrew `Segoe UI` / `Arial` / `David` (one face carries both the Latin and Hebrew text), Devanagari and other Indic scripts `Nirmala UI` / `Mangal`, Thai `Leelawadee UI` / `Tahoma`, Latin sans `Arial` / `Calibri` / `Segoe UI` / `Verdana` / `Trebuchet MS`, Latin serif `Times New Roman` / `Georgia` / `Cambria` / `Palatino` / `Garamond` (`Georgia` sets old-style figures whose digits sit at different heights — a hero-number or data role needs lining figures: `Times New Roman`, `Cambria`, or any listed sans or mono), mono `Consolas` / `Courier New`, math `Cambria Math` (formula preview runs only), display `Impact` / `Arial Black`. Let the locked style's character pick the axis and lead the title — `Microsoft YaHei` / `Arial` are the neutral members, never the automatic lead; a neutral sans title where the style asks for character is the failure to avoid. Non-pre-installed directions — retro/pixel Press Start 2P / VT323, rounded Nunito / Quicksand / OPPO Sans (safe substitute `Trebuchet MS` / `Verdana`), modern web Inter / HarmonyOS Sans / Source Han, calligraphic 隶书 / 华文行楷 / 华文新魏 (safe substitute `KaiTi` / `FangSong`, titles only), brand faces — need target installation or stay Design Spec references.**Role extension after confirmation**: while composing the roster, add a lowercase snake_case role with an exact stack only for a recurring role that materially needs a different family (`annotation`, `footer`, `footnote`, `data`, `emphasis`, `quote`, `code`), coherent with the confirmed heading/body system and locked style; one-off garnish stays omitted and Default names any added role in one compact `Role rationale` line in §IV.diff --git a/skills/ppt-master/references/shared-standards-core.md b/skills/ppt-master/references/shared-standards-core.mdindex 9044a95a..96abef25 100644--- a/skills/ppt-master/references/shared-standards-core.md+++ b/skills/ppt-master/references/shared-standards-core.md@@ -245,7 +245,7 @@ Serial post-processing and export belong to [`generate-pptx.md`](../workflows/ge| Typography roles | Use the fewest semantic text roles that preserve hierarchy, and make their differences legible at slide-thumbnail scale. Consolidate near-neighbor sizes that serve the same role; otherwise distinguish roles through a deliberate combination of size, weight, color, position, and surrounding space. || Viewing-distance legibility | Resolve delivery context and viewing distance before fixing density and type scale. Preserve necessary text at a readable scale by applying only actions the active route's content and page invariants permit: restructure, shorten, split, or reflow. If none is permitted, surface the unresolved fit instead of silently miniaturizing it. Do not turn this into one universal font-size floor: captions and metadata may be smaller when their role and context remain legible. || Contrast and semantic encoding | Within the active profile's fidelity boundary, keep meaning-bearing text distinguishable from its actual background. For newly authored distinctions, combine luminance, weight, scale, shape, position, or explicit labeling; color may reinforce meaning but never carry a required distinction alone. When fidelity requires preserving source-only color encoding, reproduce it rather than inventing a cue. Reserve lower-contrast treatment for genuinely secondary metadata that remains legible. |-| Natural wrapping | Break at semantic phrase or punctuation boundaries where possible. An unspaced script (Thai, Lao, Khmer, Myanmar) breaks only at word boundaries the author chooses — never by inserting spaces or zero-width characters — takes leading toward the upper band for its stacked marks, and keeps native table cells single-line. Reflow the text frame or adjust neighboring geometry before using any permitted local size reduction. Let the final line run naturally shorter; avoid mechanically equal lines or a stranded single-character / single-word line when an earlier natural break preserves meaning. |+| Natural wrapping | Break at semantic phrase or punctuation boundaries where possible. An unspaced script (Thai, Lao, Khmer, Myanmar) breaks only at word boundaries the author chooses — never by inserting spaces or zero-width characters — and keeps native table cells single-line; it and any script with stacked marks (Vietnamese diacritics included) take leading toward the upper band. A right-to-left deck writes each line either in one direction or starting and ending with right-to-left letters — digits inside are safe, a leading digit, trailing neutral sign, or inline Latin run reorders between the left-to-right preview and PowerPoint. Reflow the text frame or adjust neighboring geometry before using any permitted local size reduction. Let the final line run naturally shorter; avoid mechanically equal lines or a stranded single-character / single-word line when an earlier natural break preserves meaning. || Content field | Establish the usable body frame before placing modules. Divide it into one or a small set of macro-regions from information weight and reading order: use unequal weight when the information differs, while true peers may share equal weight. Give each region its own local axes / micro-grid while retaining only the cross-region anchors the composition needs. On a dense page, let the planned content system organize that frame; create breathing room through gutters, module spacing, and intentional voids between semantic clusters. Unorganized residual space that leaves content stranded in one part of the frame is leftover blank, not negative space. || Alignment and proximity | Establish shared axes from the current composition. Align related titles, copy, labels, images, and diagram nodes to those edges, centers, or baselines; group related elements more tightly than unrelated groups so spacing carries hierarchy. Break an axis only when the offset performs hierarchy, direction, or tension. || Visual weight | Judge weight from area, darkness, saturation, density, stroke, image detail, and elevation together. Distribute it to support the focal path; symmetry is optional, and deliberate imbalance may create direction. |diff --git a/skills/ppt-master/scripts/docs/native-data.md b/skills/ppt-master/scripts/docs/native-data.mdindex 5455f6cd..66cca92c 100644--- a/skills/ppt-master/scripts/docs/native-data.md+++ b/skills/ppt-master/scripts/docs/native-data.md@@ -32,7 +32,7 @@ Cells accept `text`, `fill`, `fill_opacity`, `color`, `align`; no cell-level `foChart payloads carry no `schema` key: the marker's `data-pptx-replace-with` value selects the chart schema, and an invented key is rejected.- **Category charts** — `column`, `bar`, `line`, `area`, `pie`, `doughnut`, `pieOfPie`, `barOfPie`, `radar`: `categories` plus `series[].values`. Column, bar, line, and area values may be `null` for a gap (the workbook cell stays blank, the cache omits the point, `dispBlanksAs` is `gap`; at least one value per series is a number) — a fallback that breaks one line into segments is two series of the same colour with `null` outside their segment. Pie-family charts take exactly one series with per-slice colors; `hole_size` is doughnut-only, integer `10..90`, default `75`; no rotation field. Column/bar may set `series[].point_colors` (camelCase `pointColors` is read-compatible; length = values). Bar categories run top-down in payload order — the exporter reverses the category axis and moves the value-axis crossing so the value axis keeps its declared position; `axes.category.reverse: false` restores PowerPoint's bottom-up order (column charts stay left-to-right unless `reverse: true`). Bar/column spacing: root `gap_width` (`0..500`, the empty slot share as a percentage of one bar; PowerPoint default `150`; one category slot is the plot height (or width) divided by the category count and `bar = slot / (1 + gap_width / 100)`, so a chosen bar size converts back to `gap_width = (slot / bar - 1) × 100`) and clustered `overlap` (`-100..100`, the share of one bar the next series covers, negative for a gap); SVG-first export reads both from the fallback bars inside `plot_area` when the payload omits them, JSON-first uses the defaults.-- **Line markers** — `line_style: "lineMarker"` draws a circle at every point in the series colour; `marker_size` (root or per series, SVG px diameter, `2..72` pt after `×0.75`) sizes it. `series[].point_colors` on a line series marks single points: a colour draws that point's marker in that colour, `null` leaves it bare (with `line_style: "line"` only the coloured points carry markers), so an emphasised endpoint is `[null, …, "#C8102E"]`. Area series draw no markers; a line with markers over a fill is a `combo`. `data_labels` (column, bar, line, and area plots only, combo plots of those types included; pie-family, radar, scatter/bubble, stock, and ChartEx charts reject it — show their values through companion `notes`) is `true` or an object with `show_value`, `position`, `number_format`, `font_size`, `font_family`, `bold`, `color`, per-point `colors`, and `points` (zero-based `idx` plus optional overrides — with an explicit `show_*` flag every point keeps its label and `delete: true` hides one; without one only the listed points are labeled); positions: clustered column/bar `outside_end` / `inside_end` / `inside_base` / `center`, stacked `inside_end` / `inside_base` / `center`, line `above` / `center` / `best_fit`, area none; `series[].data_labels` takes the same object for one series, so two lines can label different points. Set `data_labels.number_format` to match the fallback (the parity gate reads `0`, `0.0`, `0.00`, `#,##0`, `#,##0.0`, their `%` forms — which scale the value by 100 — and a quoted literal prefix/suffix such as `"$"#,##0` or `0.0"%"`; other codes match only the literal value)'s rendered value labels.+- **Line markers** — `line_style: "lineMarker"` draws a circle at every point in the series colour; `marker_size` (root or per series, SVG px diameter, `2..72` pt after `×0.75`) sizes it. `series[].point_colors` on a line series marks single points: a colour draws that point's marker in that colour, `null` leaves it bare (with `line_style: "line"` only the coloured points carry markers), so an emphasised endpoint is `[null, …, "#C8102E"]`. Area series draw no markers; a line with markers over a fill is a `combo`. `data_labels` (column, bar, line, and area plots only, combo plots of those types included; pie-family, radar, scatter/bubble, stock, and ChartEx charts reject it — show their values through companion `notes`) is `true` or an object with `show_value`, `position`, `number_format`, `font_size`, `font_family`, `bold`, `color`, per-point `colors`, and `points` (zero-based `idx` plus optional overrides — with an explicit `show_*` flag every point keeps its label and `delete: true` hides one; without one only the listed points are labeled); positions: clustered column/bar `outside_end` / `inside_end` / `inside_base` / `center`, stacked `inside_end` / `inside_base` / `center`, line `above` / `center` / `best_fit`, area none; `series[].data_labels` takes the same object for one series, so two lines can label different points. Set `data_labels.number_format` to match the fallback (the parity gate reads `0`, `0.0`, `0.00`, `#,##0`, `#,##0.0`, their `%` forms — which scale the value by 100 — and a quoted literal prefix/suffix such as `"$"#,##0` or `0.0"%"`; other codes match only the literal value)'s rendered value labels. Rendered forms follow the en-US pattern (`.` decimal, `,` thousands); a deck written with locale separators (`1.234,5`) keeps such numbers out of the chart marker — integer ticks, no `data_labels`, the formatted figures in surrounding text or table cells.- **Combo** — shared `categories` plus `plots[]` (`type: "column" | "line" | "area"`, own `series`, optional `axis: "secondary"`, optionally own `categories` / `category_numeric` when caches genuinely differ, and `series_indices` for imported identity — same-length unique non-negative integers forming one contiguous `0..N-1` range across plots) or typed `series[]` with per-series `type` / `axis` (adjacent compatible series share a plot). Area series may set `fill_opacity` (`0..1`; `fillOpacity` read-compatible); a line plot with `area_fill: true` exports as an area chart; line/area series may set `line_width` in SVG px (`lineWidth` read-compatible); column plots take `gap_width` / `overlap`, line plots `line_style` / `marker_size`. An area series is a fill without an outline; `line_width` adds a same-colour outline around the whole region (baseline included), so a fallback that strokes only the top edge — or draws markers on it — is an area plot under a line plot with the same values. Export layers areas below columns and lines.- **Axes** — classic `axes` is a closed object of `category`, `value`, `secondary_category`, `secondary_value`, each with only `kind` (`text` / `date` / `value`), `position`, `visible`, `label_position` (`next_to` / `none` / `low` / `high`), `number_format`, `minimum`, `maximum`, `major_unit` (value axes), `reverse`, `major_gridlines`, `tick_marks` (`none` default / `out` / `in` / `cross`), tick-label `color` / `font_family` / `font_size` (SVG px) when one axis's labels differ from the chart-wide text style, and on value axes `cross_between` (`between` — points sit between ticks, the default written explicitly because renderers disagree when it is absent — or `mid_category` — the first point sits on the axis edge; SVG-first line/area export reads it from where the fallback line starts inside `plot_area`); single-plot `bar` takes `category` left/right and `value` bottom/top; pie-family rejects `axes`. For single-plot category charts, `kind: "date"` is supported only by `area`. Stock dates follow the separate Stock contract below. `position` is honoured through the axis crossing (`top` / `right` cross at the far category, and a reversed crossing axis swaps the ends). `scatter` / `bubble` use `x` and `y` roles only (`kind: "value"`; `x.position` bottom/top, `y.position` left/right) with the same fields. Logarithmic scales, minor units/gridlines, crossing values, display units, and tick skipping are unsupported.- **XY** — `scatter` and `bubble` use `series[].x` + `series[].y` (`bubble` adds one `series[].size` / `sizes` per point), or `series[].points` as `[x, y]` / `[x, y, size]` tuples or `{x, y, size}` objects.diff --git a/skills/ppt-master/scripts/docs/pptx-animations.md b/skills/ppt-master/scripts/docs/pptx-animations.mdindex a6d4c9a0..3160d710 100644--- a/skills/ppt-master/scripts/docs/pptx-animations.md+++ b/skills/ppt-master/scripts/docs/pptx-animations.md@@ -297,7 +297,7 @@ animation-to-video contract.| `order` | Page-wide order for ordinary rows; ties keep SVG group order, then `effects[]` index; an unlisted animated group inherits the order of the nearest listed group above it in SVG order (0 before the first); `trigger_shape` rows keep relative order in separate interactive sequences; SVG layer order never changes || `delay` | Row-specific seconds added to the resolved Start or shape trigger || `duration` | Per-row schedule duration; scalable native trees keep internal ratios, while `entrance_appear` and instantaneous presets keep their authored duration and use the value for `after-previous` spacing |-| `effect_options` | Effect-specific parameters (`direction`, `amount`, `color`, `font_name`, `relative`, `size`) limited to what the selected effect supports (`pptx_animations.py --describe <effect>`); requires an explicit canonical `effect` in the same block or row; `font_name` is one target-installed face |+| `effect_options` | Effect-specific parameters (`direction`, `amount`, `color`, `font_name`, `relative`, `size`) limited to what the selected effect supports (`pptx_animations.py --describe <effect>`; `direction` is the way the motion travels — PowerPoint names the origin edge, so `right` is its "From Left"); requires an explicit canonical `effect` in the same block or row; `font_name` is one target-installed face || `trigger_shape` | Different top-level group id for native **On Click of**; row-only, not inherited; implies `on-click` and accepts an explicit row `trigger` only when it is also `on-click` || `repeat_count` / `repeat_duration` | Repeat count or total repeat span; mutually exclusive || `auto_reverse`, `rewind` | Reverse each cycle and/or restore the pre-animation state |diff --git a/skills/ppt-master/scripts/docs/svg-pipeline.md b/skills/ppt-master/scripts/docs/svg-pipeline.mdindex b81192d4..8162853e 100644--- a/skills/ppt-master/scripts/docs/svg-pipeline.md+++ b/skills/ppt-master/scripts/docs/svg-pipeline.md@@ -756,7 +756,7 @@ Convert project SVGs into PPTX. EMF/WMF images referenced from `svg_output/` areEach exported object is named after `data-pptx-shape-name`, else its SVG `id` (or `data-name`), else a positional `Group N` / `TextBox N`; forced-Morph `!!` names still win. The PowerPoint Selection and Animation panes therefore read like the source SVG.-The lock's `primary_language` tags base-template default text (new text boxes, master and layout placeholders); a right-to-left language also makes those defaults right-to-left and right-aligned and points the theme's `Arab` / `Hebr` script font at the locked face.+The deck language — the lock's `primary_language`, else the first page's root `<svg lang="...">` (Quick's channel), else `--primary-language TAG` — tags base-template default text (new text boxes, master and layout placeholders) and docProps; a right-to-left language also makes those defaults right-to-left and right-aligned, and the theme's script font for that language (`Arab`, `Hebr`, `Thai`, `Deva`, ...) points at the locked face, which a lockless roster takes from its pages. A run of Latin letters inside a non-Latin deck is tagged `en-US`.Native formulas use the two markers owned by[`native-formula.md`](../../references/native-formula.md). A standalone blockdiff --git a/skills/ppt-master/scripts/pptx_animations.py b/skills/ppt-master/scripts/pptx_animations.pyindex 36c51c9a..598e847e 100644--- a/skills/ppt-master/scripts/pptx_animations.py+++ b/skills/ppt-master/scripts/pptx_animations.py@@ -3813,6 +3813,12 @@ def describe_animation_effect(effect: object) -> dict[str, Any]:}if raw_spec.get('type') == 'enum':spec['values'] = list(raw_spec['values'])+ if name == 'direction':+ spec['note'] = (+ 'the direction the motion travels; PowerPoint names the origin '+ 'edge, so right = "From Left", left = "From Right", down = '+ '"From Top", up = "From Bottom"'+ )option_contract[name] = specreturn {'input': effect,diff --git a/skills/ppt-master/scripts/source_to_md/web_to_md.py b/skills/ppt-master/scripts/source_to_md/web_to_md.pyindex 903f94a8..8c0d1442 100644--- a/skills/ppt-master/scripts/source_to_md/web_to_md.py+++ b/skills/ppt-master/scripts/source_to_md/web_to_md.py@@ -36,6 +36,7 @@ import ipaddressimport jsonimport osimport re+import unicodedataimport socketimport subprocessimport sys@@ -314,12 +315,25 @@ def clean_title(title: str) -> str:return clean.strip()+_FILENAME_TRANSLITERATIONS = str.maketrans({+ 'đ': 'd', 'Đ': 'D', 'ø': 'o', 'Ø': 'O', 'ł': 'l', 'Ł': 'L',+ 'ß': 'ss', 'æ': 'ae', 'Æ': 'AE', 'œ': 'oe', 'Œ': 'OE', 'ı': 'i',+})++def sanitize_filename(name: str) -> str:- """Sanitize a string for filesystem-safe filenames."""+ """Sanitize a string for filesystem-safe filenames.++ Accented Latin letters fold to their base letter (``Khát vọng`` ->+ ``Khat_vong``) instead of vanishing; letters of any script and digits+ stay, everything else is dropped.+ """+ folded = unicodedata.normalize('NFKD', name.translate(_FILENAME_TRANSLITERATIONS))+ folded = ''.join(ch for ch in folded if not unicodedata.combining(ch))# Replace whitespace with underscore first- clean = re.sub(r'\s+', '_', name)- # Remove all except Chinese, English, Numbers, Underscore, Hyphen- clean = re.sub(r'[^\u4e00-\u9fa5a-zA-Z0-9_-]', '', clean)+ clean = re.sub(r'\s+', '_', folded)+ # Keep letters and digits of any script, underscore, hyphen+ clean = ''.join(ch for ch in clean if ch.isalnum() or ch in '_-')# Collapse repeating underscoresclean = re.sub(r'_+', '_', clean)return clean[:80] # Truncatediff --git a/skills/ppt-master/scripts/svg_quality/checker.py b/skills/ppt-master/scripts/svg_quality/checker.pyindex a3b38aeb..5c9cad32 100644--- a/skills/ppt-master/scripts/svg_quality/checker.py+++ b/skills/ppt-master/scripts/svg_quality/checker.py@@ -1292,6 +1292,24 @@ class SVGQualityChecker:if hydrated_payloads:result['info']['native_payload_refs'] = hydrated_payloads+ if (+ self.quick_generate+ and svg_path.name == sorted(+ p.name for p in svg_path.parent.glob('*.svg')+ )[0]+ and not (+ root.get('lang')+ or root.get('{http://www.w3.org/XML/1998/namespace}lang')+ )+ ):+ result['warnings'].append(+ 'Quick roster declares no deck language: put '+ 'lang="<BCP-47>" (vi-VN, he-IL, ...) on the first '+ "page's root <svg>; export reads it for run proofing "+ 'language, right-to-left defaults, theme script slots '+ 'and docProps (advisory)'+ )+# 1. Check viewBoxself._check_viewbox(root,diff --git a/skills/ppt-master/scripts/svg_to_pptx/drawingml/theme_fonts.py b/skills/ppt-master/scripts/svg_to_pptx/drawingml/theme_fonts.pyindex becf09b3..9ed9619e 100644--- a/skills/ppt-master/scripts/svg_to_pptx/drawingml/theme_fonts.py+++ b/skills/ppt-master/scripts/svg_to_pptx/drawingml/theme_fonts.py@@ -206,6 +206,51 @@ def load_theme_font_spec()+def load_theme_font_spec_from_pages(+ project_path: Path,+ language: str | None = None,+) -> ThemeFontSpec | None:+ """Derive major/minor theme fonts from the first svg_output page.++ The page root's ``font-family`` is the minor (body) face; the family of+ the largest text on the page is the major (title) face.+ """+ pages = sorted((project_path / "svg_output").glob("*.svg"))+ if not pages:+ return None+ try:+ root = ET.parse(str(pages[0])).getroot()+ except ET.ParseError:+ return None+ minor_family = root.get("font-family") or _inline_style_property(+ root.get("style", ""), "font-family"+ )+ major_family = None+ largest = -1.0+ for element in root.iter():+ if not isinstance(element.tag, str) or element.tag.split("}")[-1] != "text":+ continue+ size = _svg_font_size_px(element)+ family = element.get("font-family") or _inline_style_property(+ element.get("style", ""), "font-family"+ )+ if not minor_family and family:+ minor_family = family+ if size is not None and size > largest and family:+ largest, major_family = size, family+ minor_family = minor_family or major_family+ major_family = major_family or minor_family+ if not major_family or not minor_family:+ return None+ return ThemeFontSpec(+ major=_font_face(major_family, language),+ minor=_font_face(minor_family, language),+ major_family=major_family,+ minor_family=minor_family,+ cs_scripts=_complex_theme_scripts(language),+ )++def _font_size_hpt(raw: str, field: str) -> int:try:px = float(raw)diff --git a/skills/ppt-master/scripts/svg_to_pptx/drawingml/utils.py b/skills/ppt-master/scripts/svg_to_pptx/drawingml/utils.pyindex 6313c785..362b870e 100644--- a/skills/ppt-master/scripts/svg_to_pptx/drawingml/utils.py+++ b/skills/ppt-master/scripts/svg_to_pptx/drawingml/utils.py@@ -177,6 +177,7 @@ PPT_SAFE_FONTS = frozenset({'malgun gothic', 'gulim', 'dotum', 'batang','nirmala ui', 'mangal', 'kokila', 'aparajita', 'utsaah','leelawadee ui', 'leelawadee', 'cordia new', 'angsana new', 'browallia new',+ 'david', 'miriam', 'frank ruehl', 'gisha', 'levenim mt', 'narkisim', 'aharoni','arial', 'arial black', 'calibri', 'segoe ui', 'verdana','helvetica', 'helvetica neue', 'tahoma', 'trebuchet ms','times new roman', 'times', 'georgia', 'cambria', 'cambria math', 'palatino',diff --git a/skills/ppt-master/scripts/svg_to_pptx/pptx_package/cli.py b/skills/ppt-master/scripts/svg_to_pptx/pptx_package/cli.pyindex 48b5f926..d1d3f573 100644--- a/skills/ppt-master/scripts/svg_to_pptx/pptx_package/cli.py+++ b/skills/ppt-master/scripts/svg_to_pptx/pptx_package/cli.py@@ -106,6 +106,7 @@ from ..drawingml.theme_fonts import (infer_master_text_style_spec,load_master_text_style_spec,load_theme_font_spec,+ load_theme_font_spec_from_pages,)from ..drawingml.utils import unsafe_exported_font_facesfrom .narration import (@@ -1631,26 +1632,53 @@ def _declared_canvas_viewbox(project_path: Path) -> str | None:return value.strip() if isinstance(value, str) and value.strip() else None+_XML_LANG_ATTR = '{http://www.w3.org/XML/1998/namespace}lang'+++def _svg_root_language(project_path: Path) -> str | None:+ """Return the ``lang`` / ``xml:lang`` the first svg_output page declares.++ Quick has no lock; its pages carry the deck language on the root+ ``<svg lang="...">`` instead.+ """+ pages = sorted((project_path / 'svg_output').glob('*.svg'))+ for page in pages[:1]:+ try:+ for _event, elem in ET.iterparse(str(page), events=('start',)):+ value = elem.get('lang') or elem.get(_XML_LANG_ATTR)+ if isinstance(value, str) and value.strip():+ try:+ return normalize_language_tag(value)+ except LanguageTagError as exc:+ raise LanguageTagError(+ f'{page.name} root lang is invalid: {exc}'+ ) from exc+ return None+ except ET.ParseError:+ return None+ return None++def _declared_primary_language(project_path: Path) -> str | None:- """Return the canonical content language declared by the execution lock."""+ """Return the canonical content language: the lock's, else the first page's root lang."""lock_path = project_path / 'spec_lock.md'try:from update_spec import parse_locklock = parse_lock(lock_path)except (OSError, ValueError):- return None+ lock = {}communication = lock.get('communication', {})value = communication.get('primary_language')- if not isinstance(value, str) or not value.strip():- return None- try:- return normalize_language_tag(value)- except LanguageTagError as exc:- raise LanguageTagError(- 'spec_lock.md communication.primary_language '- f'is invalid: {exc}'- ) from exc+ if isinstance(value, str) and value.strip():+ try:+ return normalize_language_tag(value)+ except LanguageTagError as exc:+ raise LanguageTagError(+ 'spec_lock.md communication.primary_language '+ f'is invalid: {exc}'+ ) from exc+ return _svg_root_language(project_path)def _print_structure_contract_error(@@ -1996,6 +2024,18 @@ Recorded narration:'complete SVG roster, and support normal export capabilities.'),)+ parser.add_argument(+ '--primary-language',+ type=str,+ default=None,+ metavar='TAG',+ help=(+ 'Deck language as a BCP-47 tag (vi-VN, he-IL). Overrides '+ 'spec_lock.md communication.primary_language and the root '+ '<svg lang="..."> of the first page; sets run proofing language, '+ 'right-to-left defaults, theme script slots, and docProps.'+ ),+ )parser.add_argument('--roundtrip',action='store_true',@@ -2392,19 +2432,26 @@ Recorded narration:else _declared_pptx_structure_mode(project_path))primary_language = None- if not lockless_export:- try:- primary_language = _declared_primary_language(project_path)- except LanguageTagError as exc:- print(f"Error: {exc}", file=sys.stderr)- return 1- if primary_language is None:- print(- "Warning: spec_lock.md has no "- "communication.primary_language; using legacy per-run "- "language detection.",- file=sys.stderr,+ try:+ primary_language = (+ normalize_language_tag(args.primary_language)+ if args.primary_language+ else _declared_primary_language(project_path)+ )+ except LanguageTagError as exc:+ print(f"Error: {exc}", file=sys.stderr)+ return 1+ if primary_language is None:+ print(+ "Warning: no deck language declared ("+ + (+ "root <svg lang=\"...\"> on the first page, or --primary-language"+ if lockless_export+ else "spec_lock.md communication.primary_language")+ + "); using legacy per-run language detection.",+ file=sys.stderr,+ )if (pptx_structure in _LEGACY_PPTX_STRUCTURE_MODESand not (args.roundtrip and pptx_structure == 'preserve')@@ -2639,6 +2686,10 @@ Recorded narration:" Quick PPTX structure: "f"{pptx_structure} (inferred from {len(native_files)} SVG page(s))")+ if primary_language is not None and theme_font_spec is None:+ # A lockless roster that declares its language still gets theme+ # fonts (and their script slots) from the faces its pages use.+ theme_font_spec = load_theme_font_spec_from_pages(project_path, primary_language)if quick_template_specs is not None:try:(diff --git a/skills/ppt-master/scripts/tests/test_dogfood_quick_language_fixes.py b/skills/ppt-master/scripts/tests/test_dogfood_quick_language_fixes.pynew file mode 100644index 00000000..036d71ca--- /dev/null+++ b/skills/ppt-master/scripts/tests/test_dogfood_quick_language_fixes.py@@ -0,0 +1,69 @@+"""Regressions from the Hebrew and Vietnamese Quick deck dogfoods (2026-09-12)."""++from __future__ import annotations++import sys+import tempfile+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))+if str(SCRIPTS_DIR / "source_to_md") not in sys.path:+ sys.path.insert(0, str(SCRIPTS_DIR / "source_to_md"))++import web_to_md # noqa: E402+from svg_to_pptx.drawingml.theme_fonts import load_theme_font_spec_from_pages # noqa: E402+from svg_to_pptx.drawingml.utils import unsafe_exported_font_faces # noqa: E402+from svg_to_pptx.pptx_package.cli import _declared_primary_language # noqa: E402++PAGE = (+ '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" lang="he-IL" font-family="Segoe UI">'+ '<text x="10" y="80" font-family="David" font-size="48">שלום</text>'+ '<text x="10" y="120" font-size="20">טקסט</text></svg>\n'+)+++class QuickLanguageChannelTests(unittest.TestCase):+ def test_root_lang_is_the_lockless_deck_language(self) -> None:+ with tempfile.TemporaryDirectory() as tmp:+ project = Path(tmp)+ (project / "svg_output").mkdir()+ (project / "svg_output" / "01_cover.svg").write_text(PAGE, encoding="utf-8")+ self.assertEqual(_declared_primary_language(project), "he-IL")+ spec = load_theme_font_spec_from_pages(project, "he-IL")+ self.assertIsNotNone(spec)+ self.assertEqual(spec.major_family, "David")+ self.assertEqual(spec.minor_family, "Segoe UI")+ self.assertEqual(spec.cs_scripts, ("Hebr",))++ def test_missing_root_lang_yields_none(self) -> None:+ with tempfile.TemporaryDirectory() as tmp:+ project = Path(tmp)+ (project / "svg_output").mkdir()+ (project / "svg_output" / "01_cover.svg").write_text(+ PAGE.replace(' lang="he-IL"', ''), encoding="utf-8"+ )+ self.assertIsNone(_declared_primary_language(project))+++class FilenameTransliterationTests(unittest.TestCase):+ def test_vietnamese_title_keeps_its_letters(self) -> None:+ self.assertEqual(+ web_to_md.sanitize_filename("Khát vọng từ Buôn Ma Thuột - Thành phố cà phê"),+ "Khat_vong_tu_Buon_Ma_Thuot_-_Thanh_pho_ca_phe",+ )++ def test_other_scripts_survive(self) -> None:+ self.assertEqual(web_to_md.sanitize_filename("中国 报告 2025"), "中国_报告_2025")+ self.assertEqual(web_to_md.sanitize_filename("מגילות ים המלח"), "מגילות_ים_המלח")+++class HebrewFaceTests(unittest.TestCase):+ def test_windows_hebrew_faces_are_safe(self) -> None:+ self.assertEqual(unsafe_exported_font_faces("David"), {})+++if __name__ == "__main__":+ unittest.main()diff --git a/skills/ppt-master/scripts/text_measure.py b/skills/ppt-master/scripts/text_measure.pyindex d832576c..f395c6b0 100644--- a/skills/ppt-master/scripts/text_measure.py+++ b/skills/ppt-master/scripts/text_measure.py@@ -856,7 +856,7 @@ def build_parser() -> argparse.ArgumentParser:default=[],metavar='TEXT',help='Planned text in a non-Latin, non-CJK script (Thai, Devanagari, '- 'Arabic, ...) measured as its own rate column; repeatable. The '+ 'Arabic, Hebrew, Cyrillic, ...) measured as its own rate column; repeatable. The ''design_spec.md outline is scanned for such scripts automatically.',)calibrate.add_argument(diff --git a/skills/ppt-master/workflows/profiles/quick-generate.md b/skills/ppt-master/workflows/profiles/quick-generate.mdindex 83e49cb4..fb6022b7 100644--- a/skills/ppt-master/workflows/profiles/quick-generate.md+++ b/skills/ppt-master/workflows/profiles/quick-generate.md@@ -110,7 +110,7 @@ Read ${SKILL_DIR}/templates/tables/table-vocabulary.md- **Beats and states**: narrative beats, mental-map arcs, candidate visible states and their deltas, and enabled notes segments; adopt continuity only when it clarifies, and never alter profile-fixed count/order/content to manufacture endpoints.- **Production outcomes**: effective Speaker Notes, Custom Animations, and Narration Audio. Narration requires notes; later recording alone forces neither audio nor object animation; recorded/self-running/video delivery follows `video-design.md` and enables Custom Animations before authoring; direct narrated video also decides before audio whether narration governs group timing.- **Roster**: the exact slide roster with one compact core message per page.-- **Reading and typography**: canvas, visual direction, wording, viewing distance, and reading mode (`presentation` for distance-first projected or recorded viewing, `balanced` for mixed, `text` for close content-heavy reading). Take the initial body anchor and sanity band from [`canvas-formats.md`](../../references/canvas-formats.md) § Typography Scale Start, then resolve one typography plan for the delivery target of [`shared-standards-core.md`](../../references/shared-standards-core.md) §4.1 — never the authoring host's fonts — with stable anchors for title, body, annotation, and every recurring role. When content does not fit, restructure, shorten, or split within the invariants; if none is permitted, surface the fit rather than shrinking a recurring role.+- **Reading and typography**: canvas, deck language written as `lang="<BCP-47>"` on every page's root `<svg>` (Quick's only language channel: export reads the first page's for run proofing language, right-to-left defaults, theme script slots, and docProps), visual direction, wording, viewing distance, and reading mode (`presentation` for distance-first projected or recorded viewing, `balanced` for mixed, `text` for close content-heavy reading). Take the initial body anchor and sanity band from [`canvas-formats.md`](../../references/canvas-formats.md) § Typography Scale Start, then resolve one typography plan for the delivery target of [`shared-standards-core.md`](../../references/shared-standards-core.md) §4.1 — never the authoring host's fonts — with stable anchors for title, body, annotation, and every recurring role. When content does not fit, restructure, shorten, or split within the invariants; if none is permitted, surface the fit rather than shrinking a recurring role.- **Color roles**: the semantic color roles the roster needs (background/surface, primary/secondary text, dominant/accent, status), each with a concrete anchor. Honor user, template/brand, fidelity, and resolved-style semantics before deriving the missing roles; decide which dominate, support, or stay rare; keep meaning-bearing text legible; pair any newly authored color-coded distinction with a label, symbol, line, or geometry cue.- **Density**: a body-content frame and a density judgment per page (`anchor`, `dense`, `breathing`) rather than one uniform fill.- **Relationships**: for each page, its semantic units and their source-stated relationship (`order` / `link` / `parent` / `membership` / `contrast` / `overlap`, or none), entry, and outcome — the input to §3's topology decision; zones, geometry, and carriers are §3 authoring decisions.@@ -188,11 +188,11 @@ Read the execution core together, never file by file: [`shared-standards-core.mdA Style never strips structure; only an explicit instruction to use the workspace as visual language permits flat output.-**Typography**: name a concrete target-installed/approved family under `shared-standards-core.md` §4.1, never a lock or the host's fonts. Before P01 run `python3 ${SKILL_DIR}/scripts/text_measure.py calibrate <project_path> --role <name>:<family>:<size>` for every recurring role (one command, repeatable `--role`) and keep its table — CJK and Latin ≈ chars per 100 px per role, the checker's own estimator with wrapping headroom — in context. Every later page sizes zones from that per-font arithmetic (a line mixing CJK with Latin words or digits adds the two parts: CJK chars ÷ CJK rate + other chars ÷ Latin rate, × 100): write the sentence first, fit the zone to it, and never trim wording to satisfy an estimate. Calibrate again only for a role or size never calibrated, and `wrap` only a genuinely long paragraph.+**Typography**: name a concrete target-installed/approved family under `shared-standards-core.md` §4.1, never a lock or the host's fonts. Before P01 run `python3 ${SKILL_DIR}/scripts/text_measure.py calibrate <project_path> --role <name>:<family>:<size>` for every recurring role (one command, repeatable `--role`; a deck in a script the CJK/Latin columns do not describe — Thai, Hebrew, Arabic, Devanagari, Cyrillic — adds `--sample "<one planned line>"` so its own rate column appears) and keep its table — CJK and Latin ≈ chars per 100 px per role, the checker's own estimator with wrapping headroom — in context. Every later page sizes zones from that per-font arithmetic (a line mixing CJK with Latin words or digits adds the two parts: CJK chars ÷ CJK rate + other chars ÷ Latin rate, × 100): write the sentence first, fit the zone to it, and never trim wording to satisfy an estimate. Calibrate again only for a role or size never calibrated, and `wrap` only a genuinely long paragraph.**Generation pacing (Mandatory)**: hand-write the roster in order with no confirmation stop. P01 calibrates visual identity and cover expression; the first ordinary content page calibrates content geometry and carrier integration; neither becomes a reusable template. A resolved motif follows its reuse mode (exact repetition for deliberate chrome, adaptive variation of scale, crop, density, position, or interaction otherwise).-**Cadence**: when the planned roster has seven or more pages, run the §4 final-check command with `--stage early` after P05 and before P06, repair under the consolidated-pass discipline of [`executor-base.md`](../../references/executor-base.md) §3, and continue; six or fewer pages skip the early gate. After every page exists, run the one final checker in §4. Every checker invocation follows a gate point (early or final, all covered pages written) or one consolidated repair pass; validating an authoring pattern early is not a reason. Use other stages only when their capability is needed.+**Cadence**: when the planned roster has seven or more pages, run the §4 final-check command with `--stage early` in place of `--stage final` (same flags otherwise) after P05 and before P06, repair under the consolidated-pass discipline of [`executor-base.md`](../../references/executor-base.md) §3, and continue; six or fewer pages skip the early gate. After every page exists, run the one final checker in §4. Every checker invocation follows a gate point (early or final, all covered pages written) or one consolidated repair pass; validating an authoring pattern early is not a reason. Use other stages only when their capability is needed.**Hard rule — page authoring stays with the main agent** ([`executor-base.md`](../../references/executor-base.md) §3). This is not a resume protocol: if the context is lost before delivery, start a clean Quick run.