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(workflows): harden range syntax and layout ownership
hugohe37940a9cf3675
diff --git a/skills/ppt-master/scripts/prompt_audit_manifest.json b/skills/ppt-master/scripts/prompt_audit_manifest.jsonindex 2deaa978..679cdcbd 100644--- a/skills/ppt-master/scripts/prompt_audit_manifest.json+++ b/skills/ppt-master/scripts/prompt_audit_manifest.json@@ -31,7 +31,7 @@"skills/ppt-master/references/strategist.md": 13450,"skills/ppt-master/references/strategist-image.md": 2100,"skills/ppt-master/references/strategist-template.md": 2100,- "skills/ppt-master/templates/design_spec_reference.md": 2750,+ "skills/ppt-master/templates/design_spec_reference.md": 2850,"skills/ppt-master/templates/spec_lock_reference.md": 2350,"skills/ppt-master/workflows/generate-pptx.md": 12450,"skills/ppt-master/workflows/stages/apply-template-workspace.md": 1800@@ -306,7 +306,7 @@"stage.generate.executor.notes"],"files": [],- "max_tokens": 82100+ "max_tokens": 82200},"route.generate.flat-ai-two-types": {"description": "Generate-PPTX context with AI images, representative multi-source custom rendering, and two local types.",@@ -319,7 +319,7 @@"stage.generate.image.ai-two-types"],"files": [],- "max_tokens": 122300+ "max_tokens": 122350},"route.generate.flat-in-hand-image": {"description": "Generate-PPTX context with provided, placeholder, or formula images and no acquisition role.",@@ -331,7 +331,7 @@"stage.generate.executor.notes"],"files": [],- "max_tokens": 95600+ "max_tokens": 95650},"route.generate.flat-web-image": {"description": "Generate-PPTX context with web image acquisition.",@@ -344,7 +344,7 @@"stage.generate.image.web"],"files": [],- "max_tokens": 102850+ "max_tokens": 102950},"route.enhance-native-pptx.audio": {"description": "Enhance Native PPTX with the shared narration-audio stage.",@@ -364,7 +364,7 @@"profile.generate.beautify-pptx"],"files": [],- "max_tokens": 88950+ "max_tokens": 89050},"route.generate.flat-no-image-chart": {"description": "Default flat Generate-PPTX path with chart authoring, native-data replacement, and verification.",@@ -377,7 +377,7 @@"stage.generate.verify-charts"],"files": [],- "max_tokens": 106100+ "max_tokens": 106200},"route.generate.brand-flat-no-image": {"description": "Brand-preset flat Generate-PPTX path without image acquisition.",@@ -389,7 +389,7 @@"stage.generate.template.brand"],"files": [],- "max_tokens": 89150+ "max_tokens": 89200},"route.generate.deck-structured-no-image": {"description": "Deck-preset structured Generate-PPTX path without image acquisition.",@@ -401,7 +401,7 @@"stage.generate.template.deck"],"files": [],- "max_tokens": 99050+ "max_tokens": 99100},"route.generate.layout-structured-no-image": {"description": "Layout-preset structured Generate-PPTX path without image acquisition.",@@ -413,7 +413,7 @@"stage.generate.template.layout"],"files": [],- "max_tokens": 99500+ "max_tokens": 99600},"route.generate.topic-only-flat-no-image": {"description": "Topic research followed by the default flat no-image Generate-PPTX path.",@@ -423,7 +423,7 @@"route.generate.flat-no-image"],"files": [],- "max_tokens": 83500+ "max_tokens": 83600},"stage.generate.executor.flat": {"description": "Incremental flat Executor core with representative multi-source custom mode/style execution.",@@ -565,7 +565,7 @@"files": ["skills/ppt-master/workflows/stages/verify-charts.md"],- "max_tokens": 6200+ "max_tokens": 6250},"stage.generate.chart-authoring": {"description": "Conditional visualization-library authoring guidance.",@@ -661,7 +661,7 @@"stage.generate.strategist.template"],"files": [],- "max_tokens": 59900+ "max_tokens": 60000},"route.generate.planning-template-ai": {"description": "Explicit template workspace plus confirmed AI-image planning.",@@ -671,7 +671,7 @@"route.generate.planning-ai"],"files": [],- "max_tokens": 72100+ "max_tokens": 72200},"stage.generate.executor.chart": {"description": "Conditional chart/table page execution rules.",diff --git a/skills/ppt-master/templates/design_spec_reference.md b/skills/ppt-master/templates/design_spec_reference.mdindex edb3a9f8..4afed77c 100644--- a/skills/ppt-master/templates/design_spec_reference.md+++ b/skills/ppt-master/templates/design_spec_reference.md@@ -197,6 +197,8 @@ Write one ordered Slide block per page. Slide count and order must equal §I `PaAdd `Visualization` and `Images` to a Slide block when it consumes §VII/§VIII rows or uses a page-local visualization. State whether `Visualization` is data-driven when source values determine geometry; this page-level declaration remains authoritative even when no catalog reference fits. Add `Native-ready: yes|no` only for independent data charts or pure text-grid tables. Add `Fact IDs` for sourced claims and `Data class: scenario` for invented demo values. Add `Cover impact` to P01 except on preservation paths; add `Closing impact` only when the final page genuinely resolves the deck. Roster ids/count/order and final content are authoritative. Layout, cover/closing composition, and image/chart patterns are References whose selected semantics remain fixed while Executor realizes their geometry, hierarchy, treatment, and sparse local garnish.+For free-design pages, describe `Layout` through relationships, hierarchy, regions, and column spans; do not prescribe element-level `x`, `y`, `width`, or `height` or duplicate the global geometry in §II/§V. Exact coordinates belong to Executor SVG authoring. Preserve literal geometry only when the user explicitly requires it or a mirror/template preservation contract owns it.+---## 3. Machine validationdiff --git a/skills/ppt-master/workflows/stages/verify-charts.md b/skills/ppt-master/workflows/stages/verify-charts.mdindex aebbd9da..db2b3ea0 100644--- a/skills/ppt-master/workflows/stages/verify-charts.md+++ b/skills/ppt-master/workflows/stages/verify-charts.md@@ -65,7 +65,7 @@ For each page in the Step 1 list:- Preferred: `<!-- chart-plot-area: ... -->` marker placed by Executor (see [executor-chart.md §2.1](../../references/executor-chart.md)). Read coordinates directly.- If missing: derive the plot area from the SVG's axis lines (rectangular charts) or center/radius elements (radial charts). Then **add the marker back to the SVG** so future runs are not paying this cost again.3. Read the data series from the SVG's `<text>` label/value elements.-4. **Read axis tick labels for every axis-based chart.** Locate the `<text>` elements along the value axis — X-axis labels for horizontal bars, Y-axis labels for vertical bars, and Y-axis labels for line-like charts. Extract the first and last tick values to determine the axis range (e.g. `0%` to `120%` → range `0,120`). Pass this range as `--value-range`, `--y-range`, or `--x-range` as appropriate. Radar uses `--max-value` instead of a range: read the outermost ring's tick value and pass it as `--max-value`. If the SVG has no explicit tick labels (data labels only, no grid), omit the range and let the calculator auto-normalize — but flag the receipt as `scale=auto (no ticks)`.+4. **Read axis tick labels for every axis-based chart.** Locate the `<text>` elements along the value axis — X-axis labels for horizontal bars, Y-axis labels for vertical bars, and Y-axis labels for line-like charts. Extract the first and last tick values to determine the axis range (e.g. `0%` to `120%` → range `0,120`). Pass this range as `--value-range`, `--y-range`, or `--x-range` as appropriate. Use the attached `--*-range=min,max` form, which also keeps a negative minimum from being parsed as another option. Radar uses `--max-value` instead of a range: read the outermost ring's tick value and pass it as `--max-value`. If the SVG has no explicit tick labels (data labels only, no grid), omit the range and let the calculator auto-normalize — but flag the receipt as `scale=auto (no ticks)`.**Local vs absolute coordinates.** Many chart templates wrap chart content in `<g transform="translate(cx, cy)">` or similar, so child `<circle>`/`<polygon>`/`<rect>` coords are relative to that origin (e.g. radar polygon at `0,-198`, donut paths starting from `0,0` inside a translated `<g>`, dumbbell circles at `cy="0"` inside a per-row translated `<g>`). The calculator outputs **absolute** SVG coordinates. Before comparing, either add the wrapping translate's offset to the SVG coords or subtract it from the calculator's output — pick one direction and apply it consistently.5. Run the matching calculator command:@@ -75,11 +75,11 @@ For each page in the Step 1 list:# IMPORTANT: always pass --value-range from axis tick labels (step 4)python3 skills/ppt-master/scripts/svg_position_calculator.py calc bar \--data "Label1:Value1,Label2:Value2" --area "x_min,y_min,x_max,y_max" \- --bar-width 120 --value-range "0,axis_max"+ --bar-width 120 --value-range=0,axis_max# line_chart / area_chart / scatter_chart — area uses line output as the top boundary, then closes to y_maxpython3 skills/ppt-master/scripts/svg_position_calculator.py calc line \- --data "x1:y1,x2:y2,..." --area "x_min,y_min,x_max,y_max" --y-range "0,max"+ --data "x1:y1,x2:y2,..." --area "x_min,y_min,x_max,y_max" --y-range=0,max# pie_chart — default start angle is -90 (12 o'clock); pass --start-angle only if the SVG starts elsewherepython3 skills/ppt-master/scripts/svg_position_calculator.py calc pie \@@ -121,11 +121,11 @@ python3 skills/ppt-master/scripts/svg_quality_checker.py <project_path># Run 1 — bottom segment (origin = baseline)python3 skills/ppt-master/scripts/svg_position_calculator.py calc bar \--data "Q1:30,Q2:..." --area "x_min,100,x_max,500" \- --bar-width 80 --value-range "0,axis_max"+ --bar-width 80 --value-range=0,axis_max# Run 2 — top segment (origin shifted up by bottom segment's height in pixels)python3 skills/ppt-master/scripts/svg_position_calculator.py calc bar \--data "Q1:20,Q2:..." --area "x_min,100,x_max,<500 - bottom_height_px>" \- --bar-width 80 --value-range "0,axis_max"+ --bar-width 80 --value-range=0,axis_max```**Stacked area** — for N stacked series, run `calc line` N times on **cumulative** y-values (series 1 raw; series 2 = series1+series2; …). Each call yields the top boundary of one band. Each band's SVG path closes to the **previous** band's top boundary (not to `y_max`).@@ -140,7 +140,7 @@ Use these recipes for `decomposable-calc` and `partial-calc` pages. Each recipe**Dumbbell chart** — for before/after or two-state values across categories. The two endpoints are **points**, not bar ends — `calc bar --horizontal` always anchors at `x_min`, which only matches the right endpoint. Use `calc line` × 2 instead, treating category index as the y axis:-1. Number categories `0.5, 1.5, …, N-0.5` so each row's y lands on its band center; set `--y-range "0,N"`. The same convention applies to vertical dumbbells with the axes swapped.+1. Number categories `0.5, 1.5, …, N-0.5` so each row's y lands on its band center; set `--y-range=0,N`. The same convention applies to vertical dumbbells with the axes swapped.2. Set `--x-range` to the shared value-axis range read from ticks.3. Run `calc line` once per endpoint series with identical `--area`, `--x-range`, `--y-range`. Each output `(SVG_X, SVG_Y)` is the matching endpoint circle's `(cx, cy)`.4. Compare both endpoint circles and the connector line (`x1=cx_left, x2=cx_right, y1=y2=cy`) against the two calculated point sets.@@ -150,17 +150,17 @@ Use these recipes for `decomposable-calc` and `partial-calc` pages. Each recipe# Encode category index as the y value: row 1 → 0.5, row 2 → 1.5, row 3 → 2.5.python3 skills/ppt-master/scripts/svg_position_calculator.py calc line \--data "42:0.5,55:1.5,37:2.5" --area "100,100,700,460" \- --x-range "0,100" --y-range "0,3"+ --x-range=0,100 --y-range=0,3python3 skills/ppt-master/scripts/svg_position_calculator.py calc line \--data "68:0.5,71:1.5,49:2.5" --area "100,100,700,460" \- --x-range "0,100" --y-range "0,3"+ --x-range=0,100 --y-range=0,3```**Pareto chart** — split into descending bars plus cumulative line:1. Run `calc bar` on the descending category values with the bar axis range from ticks.2. Precompute cumulative percentages in category order.-3. Run `calc line` on `0.5:cum1,1.5:cum2,...,N-0.5:cumN` with `--x-range "0,N"`, the right-side percentage axis as `--y-range` (usually `0,100`), and the same `--area` as the bars. The `n - 0.5` offset puts each cumulative point on the matching bar's center; using `1,2,…,N` shifts the polyline left by half a bar width.+3. Run `calc line` on `0.5:cum1,1.5:cum2,...,N-0.5:cumN` with `--x-range=0,N`, the right-side percentage axis as `--y-range` (usually `--y-range=0,100`), and the same `--area` as the bars. The `n - 0.5` offset puts each cumulative point on the matching bar's center; using `1,2,…,N` shifts the polyline left by half a bar width.4. Compare bar rects, cumulative line path, and cumulative markers separately.**Dual-axis line chart** — split by axis: