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

docs(executor): harden chart calibration enforcement

hugohe366196abbc267
diff --git a/skills/ppt-master/SKILL.md b/skills/ppt-master/SKILL.md
index 2e7d1af3..61ab1d39 100644
--- a/skills/ppt-master/SKILL.md
+++ b/skills/ppt-master/SKILL.md
@@ -267,9 +267,16 @@ python3 ${SKILL_DIR}/scripts/svg_quality_checker.py <project_path>
- `warning` entries (e.g., low-resolution image, non-PPT-safe font tail) should be reviewed and fixed when straightforward; may be acknowledged and released otherwise.
- Running the checker against `svg_output/` is required — running it only after `finalize_svg.py` is too late (finalize rewrites SVG and some violations get masked).
-**Chart Coordinate Calibration** — after quality check passes, BEFORE Logic Construction:
+**Chart Coordinate Calibration (Mandatory)** — after quality check passes, BEFORE Logic Construction:
-For pages containing calculator-supported chart types (`bar`, `pie`/`donut`, `line`/`area`, `radar`), run `svg_position_calculator.py` to verify and correct data-driven coordinates. See `executor-base.md §5.1` for the full workflow. Do NOT skip this step — AI models routinely introduce 10-50px coordinate errors.
+1. Enumerate chart pages:
+ ```bash
+ grep -l "chart-plot-area" <project_path>/svg_output/*.svg
+ ```
+2. If non-empty: run `svg_position_calculator.py` per page and update SVG marks (see `executor-base.md §5.1`).
+3. If empty AND the deck contains any `bar` / `pie` / `donut` / `line` / `area` / `radar` visual: those pages are missing the REQUIRED `<!-- chart-plot-area: x_min,y_min,x_max,y_max -->` marker — go back, add the marker, then calibrate.
+
+> AI models routinely introduce 10-50 px coordinate errors. Do NOT skip.
**Logic Construction Phase**:
- Generate speaker notes → `<project_path>/notes/total.md`
@@ -279,6 +286,7 @@ For pages containing calculator-supported chart types (`bar`, `pie`/`donut`, `li
## ✅ Executor Phase Complete
- [x] All SVGs generated to svg_output/
- [x] svg_quality_checker.py passed (0 errors)
+- [x] Chart calibration completed (or no calculator-supported charts present)
- [x] Speaker notes generated at notes/total.md
```
diff --git a/skills/ppt-master/references/executor-base.md b/skills/ppt-master/references/executor-base.md
index b1cfdd6f..056274df 100644
--- a/skills/ppt-master/references/executor-base.md
+++ b/skills/ppt-master/references/executor-base.md
@@ -78,7 +78,7 @@ Before drawing each page, look up its entry in `page_rhythm` (key format `P<NN>`
- **Main-agent ownership**: SVG generation must run in the main agent (not sub-agents) — pages share upstream context for cross-page visual continuity
- **Generation rhythm**: lock global design context first, then generate pages sequentially in one continuous context. No batched groups (e.g., 5 at a time).
- **Phased batch generation** (recommended):
- 1. **Visual Construction Phase**: generate all SVG pages sequentially for visual consistency. Do NOT run `svg_position_calculator.py` during the initial draft — use layout judgment for chart marks.
+ 1. **Visual Construction Phase**: generate all SVG pages sequentially for visual consistency. Do NOT run `svg_position_calculator.py` during the initial draft — use layout judgment for chart marks. On every page that draws a `bar` / `pie` / `donut` / `line` / `area` / `radar` chart, embed the REQUIRED `<!-- chart-plot-area: x_min,y_min,x_max,y_max -->` marker so §5.1 calibration can enumerate the page.
2. **Quality Check Gate** (between phases): run `python3 scripts/svg_quality_checker.py <project_path>` on `svg_output/`. Any `error` (banned features, viewBox mismatch, spec_lock drift, non-PPT-safe font, etc.) MUST be fixed on the offending page before proceeding — regenerate and re-check. Address `warning`s when straightforward. After passing, run §5.1 chart coordinate calibration for calculator-supported chart types. Do NOT defer to after `finalize_svg.py` — finalize rewrites SVG and masks some violations.
3. **Logic Construction Phase**: after SVGs pass, batch-generate speaker notes for narrative continuity.
- **Technical specs**: see [shared-standards.md](shared-standards.md) for SVG/PPT constraints
@@ -191,7 +191,7 @@ When the Design Spec includes **VII. Visualization Reference List**, read the re
2. **Identify the plot area** — the data drawing rectangle only; excludes title, legend, axis labels, footnotes, annotations.
- Recommended SVG marker when generating chart pages:
+ REQUIRED SVG marker on every calculator-supported chart page (added during initial Visual Construction, not retrofitted later) — calibration enumerates pages by `grep -l "chart-plot-area"`:
```xml
<!-- chart-plot-area: x_min,y_min,x_max,y_max -->
```