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(charts): add mandatory chart-plot-area markers to all svg templates
hugohe33b70b2c251b0
diff --git a/skills/ppt-master/SKILL.md b/skills/ppt-master/SKILL.mdindex 308804cc..0f6673e2 100644--- a/skills/ppt-master/SKILL.md+++ b/skills/ppt-master/SKILL.md@@ -266,14 +266,17 @@ python3 ${SKILL_DIR}/scripts/svg_quality_checker.py <project_path>> **STOP — This is a separate gate, not part of the quality check. Do NOT skip.**-1. Enumerate chart pages:+1. **Scan-1 — find marked chart pages**:```bashgrep -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.+2. **Scan-2 — independently verify chart-like structures exist** (catches pages where the marker was forgotten):+ ```bash+ grep -l "barGrad\|bar-[0-9]\|groupGrad\|stackShadow\|donut-sectors\|sector-[0-9]\|pieChart\|radarChart\|areaGrad\|lineGrad\|dotShadow\|pointShadow\|hbarGrad\|waterfallGrad\|paretoGrad" <project_path>/svg_output/*.svg+ ```+3. **If scan-2 finds pages NOT in scan-1**: those pages contain chart visuals but are MISSING the `<!-- chart-plot-area -->` marker. Go back, read the SVG's axis coordinates, add the marker per `executor-base.md §3.1`, then proceed to step 4.+4. **If scan-1 is non-empty**: run `svg_position_calculator.py` per page and update SVG coordinates (see `executor-base.md §5.1`).+5. **If both scans are empty**: no chart pages exist. Confirm and proceed.**Logic Construction Phase**: generate speaker notes → `<project_path>/notes/total.md`diff --git a/skills/ppt-master/references/executor-base.md b/skills/ppt-master/references/executor-base.mdindex a65b3609..c4ce5542 100644--- a/skills/ppt-master/references/executor-base.md+++ b/skills/ppt-master/references/executor-base.md@@ -78,10 +78,49 @@ 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. 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.+ 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. **MUST embed calibration markers** per §3.1 below on every chart page.2. **Quality Check Gate**: 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. Do NOT defer to after `finalize_svg.py` — finalize rewrites SVG and masks some violations.3. **Chart Calibration Gate** ⚠️ (MANDATORY, do NOT skip): after quality check passes, run `svg_position_calculator.py` for every page containing a `<!-- chart-plot-area -->` marker. See §5.1 for the full workflow: `grep → calc → compare → update SVG`. AI models routinely introduce 10–50 px coordinate errors; this gate eliminates that class of error. If no calculator-supported charts exist, explicitly confirm skip.4. **Logic Construction Phase**: after SVGs pass quality check AND calibration, batch-generate speaker notes for narrative continuity.++### 3.1 Chart Plot-Area Marker (MANDATORY on every chart page)++> ⚠️ **Without this marker, the Chart Calibration Gate (§5.1) cannot enumerate chart pages and calibration is silently skipped. This is the #1 root cause of inaccurate chart coordinates.**++Every SVG page that contains a data visualization chart MUST include a calibration marker inside `<g id="chartArea">`, placed **after axis lines** and **before the first data element** (bar, line, area, point).++**Rectangular plot area** (bar / horizontal_bar / grouped_bar / stacked_bar / line / area / stacked_area / scatter / waterfall / pareto / butterfly):++```xml+<!-- chart-plot-area: x_min,y_min,x_max,y_max -->+```++**Radial charts** (pie / donut / radar):++```xml+<!-- chart-plot-area: pie | center: cx,cy | radius: r -->+<!-- chart-plot-area: donut | center: cx,cy | outer-radius: r1 | inner-radius: r2 -->+<!-- chart-plot-area: radar | center: cx,cy | radius: r -->+```++**How to determine coordinate values**:++| Value | Derivation |+|-------|------------|+| `x_min` | X coordinate of the Y-axis line (leftmost data boundary) |+| `y_min` | Y coordinate of the topmost grid line (highest data boundary) |+| `x_max` | X coordinate of the rightmost axis endpoint or grid line |+| `y_max` | Y coordinate of the X-axis baseline |+| `cx, cy` | Center point of pie/donut/radar (accounting for `transform="translate()"`) |+| `r` | Outer radius of the chart |++**Per-page verification** — after writing each chart SVG, confirm the marker exists:++```bash+grep "chart-plot-area" <project_path>/svg_output/<current_page>.svg+```++> All chart templates in `templates/charts/` include this marker as a reference. If you are drawing a chart and the marker is absent, you have a bug.- **Technical specs**: see [shared-standards.md](shared-standards.md) for SVG/PPT constraints- **Visual depth — through restraint**: layered depth comes from rhythm (flat vs lifted, dense vs spacious), not from shadows everywhere. Apply shadow to at most 2-3 genuinely floating elements per page (cards on photos, primary CTA, overlays); keep peer-grid cards, dividers, body containers flat. Reach for typography weight, spacing, accent bars, subtle tints **before** shadow. Full rules in shared-standards.md §6.diff --git a/skills/ppt-master/templates/charts/CHART_STYLE_GUIDE.md b/skills/ppt-master/templates/charts/CHART_STYLE_GUIDE.mdindex b9e13c85..ccd85259 100644--- a/skills/ppt-master/templates/charts/CHART_STYLE_GUIDE.md+++ b/skills/ppt-master/templates/charts/CHART_STYLE_GUIDE.md@@ -435,6 +435,12 @@ font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Micr- [ ] 已加入 `categories.<group>.charts[]` 中合适的类别- [ ] 若服务于高频意图,已加入 `quickLookup.<intent>[]`+### 坐标校准标记(calculator-supported 图表必填)+- [ ] 矩形坐标系图表(bar / horizontal_bar / grouped_bar / stacked_bar / line / area / stacked_area / scatter / waterfall / pareto / butterfly)包含 `<!-- chart-plot-area: x_min,y_min,x_max,y_max -->` 标记+- [ ] Pie / donut / radar 图表包含 `<!-- chart-plot-area: <type> | center: cx,cy | radius: r -->` 标记+- [ ] 标记位于 `<g id="chartArea">` 内、坐标轴之后、数据元素之前+- [ ] 坐标值与轴线的实际 SVG 坐标一致+### 验证命令```bash# 一键校验diff --git a/skills/ppt-master/templates/charts/area_chart.svg b/skills/ppt-master/templates/charts/area_chart.svgindex 834ea1e4..08fa76d4 100644--- a/skills/ppt-master/templates/charts/area_chart.svg+++ b/skills/ppt-master/templates/charts/area_chart.svg@@ -95,6 +95,7 @@font-size="14" fill="#64748B" text-anchor="middle">Nov</text><text x="1155" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"font-size="14" fill="#64748B" text-anchor="middle">Dec</text>+ <!-- chart-plot-area: 120,160,1200,560 --><!--Data Points Calculation:X: 165, 255, 345, 435, 525, 615, 705, 795, 885, 975, 1065, 1155diff --git a/skills/ppt-master/templates/charts/bar_chart.svg b/skills/ppt-master/templates/charts/bar_chart.svgindex 5e8d9d3d..f69f20f2 100644--- a/skills/ppt-master/templates/charts/bar_chart.svg+++ b/skills/ppt-master/templates/charts/bar_chart.svg@@ -60,6 +60,7 @@<!-- X and Y axes --><line x1="140" y1="150" x2="140" y2="550" stroke="#94A3B8" stroke-width="2"/><line x1="140" y1="550" x2="1160" y2="550" stroke="#94A3B8" stroke-width="2"/>+ <!-- chart-plot-area: 140,150,1160,550 --><!-- Bar Data (Bar width 50px, gap 130px, total gap 180px) --><!-- Bar 1: East - 185M (370px height, 100M=200px) --><g id="bar-1">diff --git a/skills/ppt-master/templates/charts/butterfly_chart.svg b/skills/ppt-master/templates/charts/butterfly_chart.svgindex c44124e3..40270354 100644--- a/skills/ppt-master/templates/charts/butterfly_chart.svg+++ b/skills/ppt-master/templates/charts/butterfly_chart.svg@@ -83,6 +83,7 @@Male data: 3%, 8%, 15%, 18%, 16%, 12%, 6%, 2%Female data: 4%, 10%, 17%, 15%, 14%, 10%, 5%, 3%-->+ <!-- chart-plot-area: 120,160,1160,620 --><!-- Age Group 1: 60+ --><g id="row-1" transform="translate(0, 168)"><rect x="528" y="0" width="72" height="50" rx="4" fill="url(#leftGrad)" filter="url(#barShadow)"/>diff --git a/skills/ppt-master/templates/charts/donut_chart.svg b/skills/ppt-master/templates/charts/donut_chart.svgindex 83072994..ca3c1457 100644--- a/skills/ppt-master/templates/charts/donut_chart.svg+++ b/skills/ppt-master/templates/charts/donut_chart.svg@@ -23,6 +23,7 @@font-size="34" font-weight="bold" fill="#0F172A">Product Line Revenue Share</text><text x="60" y="115" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"font-size="18" fill="#64748B">Q3 2025 · Total Revenue $520M</text>+ <!-- chart-plot-area: donut | center: 400,410 | outer-radius: 180 | inner-radius: 100 --><!-- Donut Chart Center --><g id="donutChart" transform="translate(400, 410)"><!--diff --git a/skills/ppt-master/templates/charts/grouped_bar_chart.svg b/skills/ppt-master/templates/charts/grouped_bar_chart.svgindex cc696039..54d9ba59 100644--- a/skills/ppt-master/templates/charts/grouped_bar_chart.svg+++ b/skills/ppt-master/templates/charts/grouped_bar_chart.svg@@ -71,6 +71,7 @@<!-- Axes --><line x1="140" y1="165" x2="140" y2="570" stroke="#94A3B8" stroke-width="2"/><line x1="140" y1="570" x2="1180" y2="570" stroke="#94A3B8" stroke-width="2"/>+ <!-- chart-plot-area: 140,165,1180,570 --><!-- Q1 Group --><!-- Q1 Div A: 120M (Height 216px) --><rect x="170" y="354" width="60" height="216" rx="4" fill="url(#groupGrad1)" filter="url(#cardShadow)"/>diff --git a/skills/ppt-master/templates/charts/horizontal_bar_chart.svg b/skills/ppt-master/templates/charts/horizontal_bar_chart.svgindex 440d363d..0cd9e7be 100644--- a/skills/ppt-master/templates/charts/horizontal_bar_chart.svg+++ b/skills/ppt-master/templates/charts/horizontal_bar_chart.svg@@ -60,6 +60,7 @@<!-- Y-Axis Baseline --><line x1="300" y1="140" x2="300" y2="620" stroke="#94A3B8" stroke-width="2"/><line x1="300" y1="620" x2="1200" y2="620" stroke="#94A3B8" stroke-width="2"/>+ <!-- chart-plot-area: 300,140,1200,620 --><!-- Bar Data (Height 36px, Spacing 24px, Total 60px) --><!-- Bar 1: Brand A - 92% (Rank 1, Blue) --><text x="290" y="178" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"diff --git a/skills/ppt-master/templates/charts/line_chart.svg b/skills/ppt-master/templates/charts/line_chart.svgindex f25e7c6f..aa475d4d 100644--- a/skills/ppt-master/templates/charts/line_chart.svg+++ b/skills/ppt-master/templates/charts/line_chart.svg@@ -78,6 +78,7 @@<text x="990" y="585" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="14" font-weight="600" fill="#64748B" text-anchor="middle">Oct</text><text x="1075" y="585" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="14" font-weight="600" fill="#64748B" text-anchor="middle">Nov</text><text x="1160" y="585" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="14" font-weight="600" fill="#64748B" text-anchor="middle">Dec</text>+ <!-- chart-plot-area: 140,150,1160,550 --><!-- Area 1 (Revenue) --><path d="M 225,422 L 310,398 L 395,370 L 480,342 L 565,318 L 650,302 L 735,278 L 820,250 L 905,238 L 990,222 L 1075,198 L 1160,182 L 1160,550 L 225,550 Z"fill="url(#areaGrad1)"/>diff --git a/skills/ppt-master/templates/charts/pareto_chart.svg b/skills/ppt-master/templates/charts/pareto_chart.svgindex 59f8e48d..defcaac5 100644--- a/skills/ppt-master/templates/charts/pareto_chart.svg+++ b/skills/ppt-master/templates/charts/pareto_chart.svg@@ -62,6 +62,7 @@<line x1="660" y1="130" x2="660" y2="580" stroke="#94A3B8" stroke-width="1.5" stroke-dasharray="6 4" stroke-opacity="0.8"/><text x="645" y="150" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="13" font-weight="800" fill="#64748B" text-anchor="end">VITAL FEW (84%)</text><text x="675" y="150" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="13" font-weight="800" fill="#94A3B8" text-anchor="start">TRIVIAL MANY (16%)</text>+ <!-- chart-plot-area: 130,130,1150,580 --><!-- ==================== Bar Data ==================== --><!-- 1. Function Error: 350 (35%) - Cumulative 35% --><rect x="180" y="230" width="80" height="350" fill="url(#vitalGrad)" rx="4"/>diff --git a/skills/ppt-master/templates/charts/pie_chart.svg b/skills/ppt-master/templates/charts/pie_chart.svgindex 84724f05..0bba6bd3 100644--- a/skills/ppt-master/templates/charts/pie_chart.svg+++ b/skills/ppt-master/templates/charts/pie_chart.svg@@ -23,6 +23,7 @@font-size="32" font-weight="800" fill="#0F172A">Market Share Distribution</text><text x="60" y="115" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"font-size="14" font-weight="700" fill="#64748B" letter-spacing="1.5">Q3 2025 · TOTAL INDUSTRY MARKET SIZE: $12B</text>+ <!-- chart-plot-area: pie | center: 420,400 | radius: 200 --><!-- ==================== Pie Chart Graphic ==================== --><g id="pieChart" transform="translate(420, 400)" filter="url(#softShadow)"><!--diff --git a/skills/ppt-master/templates/charts/radar_chart.svg b/skills/ppt-master/templates/charts/radar_chart.svgindex 421a2efb..d5e52614 100644--- a/skills/ppt-master/templates/charts/radar_chart.svg+++ b/skills/ppt-master/templates/charts/radar_chart.svg@@ -33,6 +33,7 @@<!-- ==================== Header ==================== --><text x="60" y="70" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="32" font-weight="800" fill="#0F172A">Comprehensive Capability Assessment</text><text x="60" y="100" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="14" font-weight="700" fill="#64748B" letter-spacing="1">PRODUCT A VS PRODUCT B · SIX-DIMENSIONAL ANALYSIS</text>+ <!-- chart-plot-area: radar | center: 500,380 | radius: 220 --><!-- ==================== Radar Chart ==================== --><g id="radarChart" transform="translate(500, 380)"><!-- Concentric Background Grids (Zebra filled for contrast) -->diff --git a/skills/ppt-master/templates/charts/scatter_chart.svg b/skills/ppt-master/templates/charts/scatter_chart.svgindex d760b852..684cc2d0 100644--- a/skills/ppt-master/templates/charts/scatter_chart.svg+++ b/skills/ppt-master/templates/charts/scatter_chart.svg@@ -71,6 +71,7 @@<!-- Main Axes Lines --><line x1="120" y1="160" x2="120" y2="560" stroke="#94A3B8" stroke-width="2.5" stroke-linecap="round"/><line x1="120" y1="560" x2="1020" y2="560" stroke="#94A3B8" stroke-width="2.5" stroke-linecap="round"/>+ <!-- chart-plot-area: 120,160,1020,560 --><!-- Confidence Interval Areas --><polygon points="210,483 975,207 975,257 210,533" fill="#4F46E5" fill-opacity="0.08"/><polygon points="228,456 1002,288 1002,328 228,496" fill="#E11D48" fill-opacity="0.08"/>diff --git a/skills/ppt-master/templates/charts/stacked_area_chart.svg b/skills/ppt-master/templates/charts/stacked_area_chart.svgindex 38f71851..283e738a 100644--- a/skills/ppt-master/templates/charts/stacked_area_chart.svg+++ b/skills/ppt-master/templates/charts/stacked_area_chart.svg@@ -96,6 +96,7 @@<text x="955" y="580" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="13" font-weight="600" fill="#64748B" text-anchor="middle">Oct</text><text x="1045" y="580" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="13" font-weight="600" fill="#64748B" text-anchor="middle">Nov</text><text x="1135" y="580" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="13" font-weight="600" fill="#64748B" text-anchor="middle">Dec</text>+ <!-- chart-plot-area: 100,150,1180,550 --><!-- ==================== Stacked Areas ==================== --><!-- Series 4: Other (Amber - Top) --><path d="M 145,550 L 145,382.6 L 235,370 L 325,352 L 415,339.4 L 505,321.4 L 595,303.4 L 685,274.6 L 775,258.4 L 865,271 L 955,283.6 L 1045,253 L 1135,217 L 1135,249.4 L 1045,280 L 955,308.8 L 865,296.2 L 775,285.4 L 685,301.6 L 595,325 L 505,343 L 415,357.4 L 325,370 L 235,384.4 L 145,397 Z" fill="url(#stackGrad4)"/>diff --git a/skills/ppt-master/templates/charts/stacked_bar_chart.svg b/skills/ppt-master/templates/charts/stacked_bar_chart.svgindex 637f197f..502f1057 100644--- a/skills/ppt-master/templates/charts/stacked_bar_chart.svg+++ b/skills/ppt-master/templates/charts/stacked_bar_chart.svg@@ -56,6 +56,7 @@<!-- Main Axes Lines --><line x1="140" y1="150" x2="140" y2="550" stroke="#94A3B8" stroke-width="2.5" stroke-linecap="round"/><line x1="140" y1="550" x2="1080" y2="550" stroke="#94A3B8" stroke-width="2.5" stroke-linecap="round"/>+ <!-- chart-plot-area: 140,150,1080,550 --><!-- ==================== Stacked Bars ==================== --><!-- Q1'24 (Total: 300) --><g filter="url(#stackShadow)">diff --git a/skills/ppt-master/templates/charts/waterfall_chart.svg b/skills/ppt-master/templates/charts/waterfall_chart.svgindex 3d643491..a353ed2e 100644--- a/skills/ppt-master/templates/charts/waterfall_chart.svg+++ b/skills/ppt-master/templates/charts/waterfall_chart.svg@@ -66,6 +66,7 @@<text x="120" y="165" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="14" font-weight="600" fill="#94A3B8" text-anchor="end">500</text><!-- Y-Axis Vertical Line --><line x1="140" y1="130" x2="140" y2="560" stroke="#CBD5E1" stroke-width="2"/>+ <!-- chart-plot-area: 140,130,1200,560 --><!-- Connection Lines --><line x1="265" y1="336" x2="305" y2="336" stroke="#94A3B8" stroke-width="2" stroke-dasharray="4,4"/><line x1="395" y1="240" x2="435" y2="240" stroke="#94A3B8" stroke-width="2" stroke-dasharray="4,4"/>