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(svg-authoring): allow CSS alpha colors
hugohe3835ea0174316
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 78efca3e..98b22f65 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -93,7 +93,9 @@ If you're unsure, open an issue to ask — that's always welcome.If your contribution involves SVG files, follow the technical constraints documented in [CLAUDE.md](./CLAUDE.md):- Do not use: `mask`, `<style>`, `class`, external CSS, `<foreignObject>`, `<animate*>`, `<script>`, `<symbol>+<use>`-- Use `fill-opacity` / `stroke-opacity` instead of `rgba()`+- Paint colors may use supported CSS forms: named colors, `rgb()` / `rgba()`,+ `hsl()` / `hsla()`, and 3/4/6/8-digit HEX. Embedded alpha multiplies with+ `opacity`, `fill-opacity`, or `stroke-opacity` during native export- `marker-start` / `marker-end` are conditionally allowed — see `shared-standards.md` §1.1 (must live in `<defs>`, `orient="auto"`, shape must be triangle / diamond / oval)- `clipPath` on `<image>` is conditionally allowed — see `shared-standards.md` §1.2 (must live in `<defs>`, single shape child, only on `<image>` elements)- All SVGs must use the correct `viewBox` for the target canvas formatdiff --git a/docs/technical-design.md b/docs/technical-design.mdindex d19edeaf..b14f13f2 100644--- a/docs/technical-design.md+++ b/docs/technical-design.md@@ -352,7 +352,7 @@ The catalog of *how an image is placed on a slide* (full vocabulary in [`referen**Why composition flows through Strategist's resource list, not just Executor's improvisation.** The `Layout pattern` column in `§VIII Image Resource List` accepts a `#<id> + #<id> ...` expression — Primary id plus optional Modifier ids — so the composition is declared *before* SVG generation, audited by `svg_quality_checker`, and survives session re-entry. Pushing composition onto Executor alone would lose it on context compression in long decks; encoding it in the spec_lock-adjacent resource list makes it a piece of the design contract.-**Why true hard constraints stay upstream.** Cross-cutting technical constraints (`<clipPath>` only on `<image>`, `fill-opacity` instead of `rgba()`, no `<mask>`, alpha-effect routing) live exclusively in [`shared-standards.md`](../skills/ppt-master/references/shared-standards.md). The layout patterns file points at them with one-line references rather than restating — so when a constraint relaxes (e.g., a new DrawingML feature becomes reliable), only one file changes, and a stale duplicate in patterns can't silently keep enforcing the old rule.+**Why true hard constraints stay upstream.** Cross-cutting technical constraints (`<clipPath>` only on `<image>`, no `<mask>`, supported CSS paint grammar, alpha-effect routing) live exclusively in [`shared-standards.md`](../skills/ppt-master/references/shared-standards.md). The layout patterns file points at them with one-line references rather than restating — so when a constraint relaxes (e.g., a new DrawingML feature becomes reliable), only one file changes, and a stale duplicate in patterns can't silently keep enforcing the old rule.---diff --git a/docs/zh/technical-design.md b/docs/zh/technical-design.mdindex 2a924919..32f87120 100644--- a/docs/zh/technical-design.md+++ b/docs/zh/technical-design.md@@ -352,7 +352,7 @@ Strategist 阶段产出两份看起来冗余但服务不同对象的产物:**为什么组合走 Strategist 资源列表,不只交给 Executor 临场发挥。** `§VIII 图片资源列表` 的 `Layout pattern` 列接受 `#<id> + #<id> ...` 表达式——Primary id 加可选 Modifier id——所以组合在 SVG 生成**之前**就被声明、被 `svg_quality_checker` 审计、并能在 session 重入后存活。把组合责任只压在 Executor 身上,长 deck 上下文压缩时就会丢;把它编码进 spec_lock 旁的资源列表,组合就成为设计契约的一部分。-**为什么真正的硬约束留在上游。** 跨切的技术硬约束(`<clipPath>` 只能用在 `<image>` 上、用 `fill-opacity` 而非 `rgba()`、禁 `<mask>`、alpha 效果的路由表)独家住在 [`shared-standards.md`](../../skills/ppt-master/references/shared-standards.md)。版式词表只用一行指针指向它们,不复述——这样某条约束放开时(比如某个 DrawingML 特性变得可靠),只有一个文件要改,词表里也不会留下一份过期副本继续暗中强制旧规则。+**为什么真正的硬约束留在上游。** 跨切的技术硬约束(`<clipPath>` 只能用在 `<image>` 上、禁 `<mask>`、受支持的 CSS 颜色语法、alpha 效果的路由表)独家住在 [`shared-standards.md`](../../skills/ppt-master/references/shared-standards.md)。版式词表只用一行指针指向它们,不复述——这样某条约束放开时(比如某个 DrawingML 特性变得可靠),只有一个文件要改,词表里也不会留下一份过期副本继续暗中强制旧规则。---diff --git a/skills/ppt-master/references/image-layout-patterns.md b/skills/ppt-master/references/image-layout-patterns.mdindex 04bcbf7d..28d2224b 100644--- a/skills/ppt-master/references/image-layout-patterns.md+++ b/skills/ppt-master/references/image-layout-patterns.md@@ -252,7 +252,10 @@ Combine freely. The "AI-default" failure mode is the opposite: defaulting to bar## Hard Constraints- Long body copy, data points, numeric labels, and Chinese text always go in the SVG layer — never baked into the image.-- `<clipPath>` on `<image>` and transparency encoding (`fill-opacity` / `stop-opacity`, never `rgba()`) — authoritative form in [`shared-standards.md`](shared-standards.md) §1.2 and §2; do not restate or relax here.+- `<clipPath>` on `<image>` and transparency encoding (CSS alpha colors or+ explicit opacity attributes) — authoritative form in+ [`shared-standards.md`](shared-standards.md) §1.2 and §2; do not restate or+ relax here.- No `<mask>`, no `<feComposite>` for alpha compositing. Alpha-effect routing (gradient overlays, clipPath crops, filter shadows, baked-in source image) is the table in [`shared-standards.md`](shared-standards.md) §1.0.- `<feDropShadow>` / `<feGaussianBlur>` are accepted but PPT export is inconsistent — bake into the source image when fidelity is critical.diff --git a/skills/ppt-master/references/shared-standards.md b/skills/ppt-master/references/shared-standards.mdindex ace24290..91eeb978 100644--- a/skills/ppt-master/references/shared-standards.md+++ b/skills/ppt-master/references/shared-standards.md@@ -147,11 +147,17 @@ One offending character invalidates the file and aborts export. Numeric refs (`&----## 2. PPT Compatibility Alternatives--| Banned Syntax | Correct Alternative |-|---------------|---------------------|-| `fill="rgba(255,255,255,0.1)"` | `fill="#FFFFFF" fill-opacity="0.1"` |+## 2. PPT Compatibility Mappings++**Allowed — CSS paint colors**: fills, strokes, gradient stops, and supported+filter flood colors may use common named colors, `rgb()` / `rgba()` (legacy+comma or modern space/slash syntax), `hsl()` / `hsla()`, `#RGB`, `#RGBA`,+`#RRGGBB`, or `#RRGGBBAA`. Native export converts the color to DrawingML RGB+and multiplies any embedded alpha with `opacity`, `fill-opacity`,+`stroke-opacity`, `stop-opacity`, and supported effect alpha. Explicit opacity+attributes remain valid when keeping palette and transparency separate is+clearer. This guarantee applies to the SVG-derived DrawingML route; opt-in+native table/chart payload styling follows its narrower native-object contract.**Allowed — group opacity (approximate)**: `<g opacity="0.3">...</g>` maps thegroup alpha onto each descendant shape, text run, picture, and supported@@ -165,7 +171,7 @@ table/chart markers are rejected; omit that flag to export their SVG fallback.`1`; use an overlay only when the design needs a color wash rather than simpletransparency.-**Mnemonic**: image opacity is native; group opacity is a per-object approximation.+**Mnemonic**: color and image alpha are native; group opacity is a per-object approximation.> Arrows: prefer `marker-end` for connector lines (§1.1) — converter produces native auto-rotating arrow heads. For block/chunky arrows, use standalone closed shapes; see `templates/charts/chevron_process.svg` and `templates/charts/process_flow.svg`.@@ -207,7 +213,8 @@ metadata. See- **`<tspan>`** has two purposes: (1) manual line breaks (use `dy` or explicit `y`); (2) inline run formatting on the same line (color/weight/size). `<foreignObject>` is FORBIDDEN. See "Single logical line" rule below.- **Fonts**: every `font-family` stack MUST resolve to pre-installed exported Latin / EA typefaces (Microsoft YaHei / SimSun / Arial / Times New Roman / Consolas …); `@font-face` is FORBIDDEN. Full rule: [`strategist.md §g`](strategist.md).- **Styles**: inline only (`fill=""`, `font-size=""`); `<style>`/`class` FORBIDDEN (`id` inside `<defs>` is fine)-- **Colors**: HEX only; transparency via `fill-opacity`/`stroke-opacity`+- **Colors**: common named colors, `rgb()` / `rgba()`, `hsl()` / `hsla()`, or+ 3/4/6/8-digit HEX; embedded and explicit opacity values multiply- **Images**: `<image href="../images/xxx.png" preserveAspectRatio="xMidYMid slice"/>`; optional `opacity="0..1"` maps to native picture transparency- **Icons**: `<use data-icon="<library>/<name>" x="" y="" width="48" height="48" fill="#HEX"/>` (auto-embedded post-processing). Always include library prefix. One stylistic library per deck (`chunk-filled`/`tabler-filled`/`tabler-outline`/`phosphor-duotone`); `simple-icons` only for real brand marks. See [`../templates/icons/README.md`](../templates/icons/README.md).diff --git a/skills/ppt-master/scripts/config.py b/skills/ppt-master/scripts/config.pyindex 9f8ecc1d..622f7bca 100644--- a/skills/ppt-master/scripts/config.py+++ b/skills/ppt-master/scripts/config.py@@ -529,7 +529,6 @@ SVG_CONSTRAINTS = {# Forbidden patterns (regex matching)'forbidden_patterns': [r'@font-face', # Web fonts- r'rgba\s*\(', # rgba colors (PPT incompatible)r'<\?xml-stylesheet\b', # External CSSr'<link[^>]*rel\s*=\s*["\']stylesheet["\']',r'@import\s+', # External CSSdiff --git a/skills/ppt-master/scripts/docs/svg-pipeline.md b/skills/ppt-master/scripts/docs/svg-pipeline.mdindex 655a3cc9..038108e0 100644--- a/skills/ppt-master/scripts/docs/svg-pipeline.md+++ b/skills/ppt-master/scripts/docs/svg-pipeline.md@@ -222,11 +222,11 @@ Replaces `<use data-icon="chunk-filled/name" .../>`, `<use data-icon="tabler-fil## PPT Compatibility Rules-Use PowerPoint-safe transparency syntax:--| Avoid | Use instead |-|------|-------------|-| `fill=\"rgba(...)\"` | `fill=\"#hex\"` + `fill-opacity` |+Supported CSS paint colors include named colors, `rgb()` / `rgba()`, `hsl()` /+`hsla()`, and 3/4/6/8-digit HEX. Alpha embedded in the color multiplies with+`opacity`, `fill-opacity`, `stroke-opacity`, `stop-opacity`, or supported+effect alpha during native export. Explicit opacity attributes remain valid+when they make palette reuse clearer.`<g opacity="0..1">` is supported as a per-descendant alpha approximation.Nested values multiply; overlapping children may differ from isolated SVGdiff --git a/skills/ppt-master/scripts/error_helper.py b/skills/ppt-master/scripts/error_helper.pyindex 744478f0..1d7ccc7b 100644--- a/skills/ppt-master/scripts/error_helper.py+++ b/skills/ppt-master/scripts/error_helper.py@@ -201,15 +201,6 @@ class ErrorHelper:],'severity': 'error'},- 'rgba_detected': {- 'message': 'Forbidden rgba() color detected',- 'solutions': [- 'Replace rgba() with hex + opacity notation',- 'Example: fill="#FFFFFF" fill-opacity="0.1"',- 'Use stroke-opacity for strokes'- ],- 'severity': 'error'- },'event_attribute_detected': {'message': 'Forbidden event attribute detected','solutions': [diff --git a/skills/ppt-master/scripts/svg_quality_checker.py b/skills/ppt-master/scripts/svg_quality_checker.pyindex cc58b799..ea71b0b2 100644--- a/skills/ppt-master/scripts/svg_quality_checker.py+++ b/skills/ppt-master/scripts/svg_quality_checker.py@@ -48,9 +48,13 @@ except ImportError:try:from svg_to_pptx.drawingml.utils import (parse_font_family as _parse_export_font_family,+ parse_inline_style as _parse_inline_style,+ parse_svg_color as _parse_export_color,)except ImportError:_parse_export_font_family = None+ _parse_inline_style = None+ _parse_export_color = Nonetry:from svg_to_pptx.native_objects import (@@ -133,10 +137,26 @@ except ImportError:_unresolved_external_image_reference_path = None-HEX_VALUE_RE = re.compile(r"#[0-9A-Fa-f]{3,8}")+HEX_VALUE_RE = re.compile(+ r"#(?:[0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})"+)+_BARE_HEX_VALUE_RE = re.compile(+ r"(?:[0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})"+)SVG_NS = "http://www.w3.org/2000/svg"XLINK_NS = "http://www.w3.org/1999/xlink"++def _normalize_hex_rgb(value: str) -> str | None:+ """Normalize 3/4/6/8-digit HEX to alpha-free ``RRGGBB``."""+ if not HEX_VALUE_RE.fullmatch(value):+ return None+ color = value[1:]+ if len(color) in {3, 4}:+ color = ''.join(channel * 2 for channel in color)+ return color[:6].upper()++# Fonts that survive direct PPTX typeface assignment on a typical Windows /# macOS viewer without requiring a custom install. Keep this aligned with# strategist.md §g and drawingml/utils.py FONT_FALLBACK_WIN.@@ -616,27 +636,130 @@ class SVGQualityChecker:# Other discouraged elementsif 'iframe' in local_names:result['errors'].append("Detected <iframe> element (should not appear in SVG)")- # Paint grammar: rgba()/hsl()/alpha-hex all render in browser preview- # but come back as None from parse_hex_color, so the exporter writes- # <a:noFill/> — the fill silently disappears in PPTX. Named colors and- # rgb() export correctly and are deliberately not flagged.++ # Paint-server references must match the exact definitions consumed by+ # drawingml.converter.collect_defs: direct children of <defs> only.+ defs_by_id = {}+ for defs_elem in elems:+ if _local_name(defs_elem).lower() != 'defs':+ continue+ for child in defs_elem:+ child_id = child.get('id')+ if child_id:+ defs_by_id[child_id] = child+ pattern_descendant_ids = {+ id(descendant)+ for pattern in elems+ if _local_name(pattern).lower() == 'pattern'+ for descendant in pattern.iter()+ if descendant is not pattern+ }+ fill_shape_tags = {'rect', 'circle', 'ellipse', 'path', 'polygon', 'polyline'}+ stroke_shape_tags = fill_shape_tags | {'line'}+ paint_reference_errors = set()+ for elem in elems:+ style_values = (+ _parse_inline_style(elem.get('style'))+ if _parse_inline_style is not None else {}+ )+ for attr in ('fill', 'stroke'):+ value = style_values.get(attr) or elem.get(attr)+ match = re.fullmatch(r'url\(#([^)]+)\)', (value or '').strip())+ if match is None:+ continue+ ref_id = match.group(1)+ target = defs_by_id.get(ref_id)+ elem_tag = _local_name(elem)+ elem_tag_lower = elem_tag.lower()+ if target is None:+ paint_reference_errors.add(+ f"<{elem_tag}> {attr}=url(#{ref_id}) has no matching "+ "direct <defs> definition"+ )+ continue+ has_text_descendant = any(+ _local_name(descendant).lower() in {'text', 'tspan'}+ for descendant in elem.iter()+ if descendant is not elem+ )+ if id(elem) in pattern_descendant_ids:+ allowed_tags = ()+ elif attr == 'fill' and elem_tag_lower in fill_shape_tags:+ allowed_tags = ('lineargradient', 'radialgradient', 'pattern')+ elif attr == 'stroke' and elem_tag_lower in stroke_shape_tags:+ allowed_tags = ('lineargradient', 'radialgradient')+ elif attr == 'fill' and elem_tag_lower in {'text', 'tspan'}:+ allowed_tags = ('lineargradient', 'radialgradient')+ elif attr == 'fill' and elem_tag_lower == 'g':+ allowed_tags = (+ ('lineargradient', 'radialgradient')+ if has_text_descendant+ else ('lineargradient', 'radialgradient', 'pattern')+ )+ elif attr == 'stroke' and elem_tag_lower == 'g' and not has_text_descendant:+ allowed_tags = ('lineargradient', 'radialgradient')+ else:+ allowed_tags = ()+ target_tag = _local_name(target).lower()+ if not allowed_tags:+ paint_reference_errors.add(+ f"<{elem_tag}> {attr}=url(#{ref_id}) is not supported "+ "by native PPTX conversion in this context"+ )+ continue+ if target_tag not in allowed_tags:+ tag_labels = {+ 'lineargradient': 'linearGradient',+ 'radialgradient': 'radialGradient',+ 'pattern': 'pattern',+ }+ expected = '/'.join(+ tag_labels[tag] for tag in allowed_tags+ )+ paint_reference_errors.add(+ f"<{elem_tag}> {attr}=url(#{ref_id}) resolves to "+ f"<{_local_name(target)}>; expected {expected}"+ )+ result['errors'].extend(sorted(paint_reference_errors))++ # Paint grammar: use the exporter's parser so authoring validation and+ # native conversion accept the same CSS color subset.paint_values = [- value- for attr in ('fill', 'stroke', 'stop-color')+ (attr, value)+ for attr in (+ 'fill', 'stroke', 'stop-color', 'flood-color',+ 'data-pptx-fg', 'data-pptx-bg',+ )for value in self._svg_property_values(content, attr)]- if any('rgba' in value.lower() for value in paint_values):- result['errors'].append("Detected forbidden rgba() color (use fill-opacity/stroke-opacity instead)")- if any('hsl' in value.lower() for value in paint_values):- result['errors'].append(- "Detected hsl()/hsla() color (not exported to PPTX — fills become "- "invisible; use 6-digit HEX instead)")- alpha_hex_re = re.compile(r'^#[0-9A-Fa-f]{4}$|^#[0-9A-Fa-f]{8}$')- if any(alpha_hex_re.match(value.strip()) for value in paint_values):- result['errors'].append(- "Detected alpha-channel HEX color (#RGBA/#RRGGBBAA is not exported "- "to PPTX — fills become invisible; use 6-digit HEX plus "- "fill-opacity/stroke-opacity)")+ if _parse_export_color is None:+ result['warnings'].append(+ "Unable to import svg_to_pptx color parser; skipped paint syntax check"+ )+ else:+ invalid_paints = set()+ for attr, value in paint_values:+ normalized = value.strip()+ if attr in {'fill', 'stroke'} and (+ normalized.lower() == 'none'+ or re.fullmatch(r'url\(#[^)]+\)', normalized)+ ):+ continue+ if _BARE_HEX_VALUE_RE.fullmatch(normalized):+ invalid_paints.add(value)+ continue+ color, _alpha = _parse_export_color(normalized)+ if color is None:+ invalid_paints.add(value)+ if invalid_paints:+ shown = ', '.join(sorted(invalid_paints)[:5])+ more = len(invalid_paints) - 5+ suffix = f" (+{more} more)" if more > 0 else ""+ result['errors'].append(+ "Unsupported SVG paint value(s) for PPTX export: "+ f"{shown}{suffix}. Use a supported named color, rgb()/rgba(), "+ "hsl()/hsla(), or #RGB/#RGBA/#RRGGBB/#RRGGBBAA."+ )for elem in elems:tag = _local_name(elem).lower()if tag not in {'g', 'image'}:@@ -1158,7 +1281,8 @@ class SVGQualityChecker:def _check_spec_lock_drift(self, content: str, svg_path: Path, result: Dict):"""Detect values used in the SVG that fall outside spec_lock.md.- Covers colors (fill / stroke / stop-color), font-family, and font-size.+ Covers colors (fill / stroke / stop-color / flood-color / pattern+ metadata), font-family, and font-size.Emits per-file warnings summarising the drift counts; exact driftingvalues are accumulated in self._drift_summary for the end-of-runaggregation. When spec_lock.md is missing, silently skip (consistent@@ -1171,8 +1295,14 @@ class SVGQualityChecker:# Build allow-sets from the lockallowed_colors = set()for v in lock.get('colors', {}).values():- if HEX_VALUE_RE.fullmatch(v):- allowed_colors.add(v.upper())+ if _parse_export_color is not None:+ color, _alpha = _parse_export_color(v)+ if color:+ allowed_colors.add(color)+ else:+ color = _normalize_hex_rgb(v)+ if color:+ allowed_colors.add(color)typo = lock.get('typography', {})numeric_size_re = re.compile(r'^(?:\d+(?:\.\d+)?|\.\d+)$')@@ -1224,13 +1354,28 @@ class SVGQualityChecker:# Scan SVG for used valuescolor_drifts = set()- for attr in ('fill', 'stroke', 'stop-color'):+ for attr in (+ 'fill', 'stroke', 'stop-color', 'flood-color',+ 'data-pptx-fg', 'data-pptx-bg',+ ):for raw_value in self._svg_property_values(content, attr):- if not HEX_VALUE_RE.fullmatch(raw_value):+ normalized = raw_value.strip()+ if normalized.lower() in {'none', 'transparent'} or re.fullmatch(+ r'url\(#[^)]+\)', normalized+ ):+ continue+ if _BARE_HEX_VALUE_RE.fullmatch(normalized):continue- val = raw_value.upper()+ if _parse_export_color is not None:+ val, _alpha = _parse_export_color(normalized)+ if val is None:+ continue+ else:+ val = _normalize_hex_rgb(normalized)+ if val is None:+ continueif val not in allowed_colors:- color_drifts.add(val)+ color_drifts.add(f'#{val}')font_drifts = set()for val in self._font_family_values(content):diff --git a/skills/ppt-master/templates/charts/CHART_STYLE_GUIDE.md b/skills/ppt-master/templates/charts/CHART_STYLE_GUIDE.mdindex e5fd0a62..9e01ec7c 100644--- a/skills/ppt-master/templates/charts/CHART_STYLE_GUIDE.md+++ b/skills/ppt-master/templates/charts/CHART_STYLE_GUIDE.md@@ -296,11 +296,11 @@ font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Micr| `<script>` / event 属性 | 无 || `<iframe>` | 无 |-### 6.2 PPT 兼容性替代+### 6.2 PPT 颜色语法-| 禁止语法 | 正确替代 |-|---------|----------|-| `fill="rgba(255,255,255,0.1)"` | `fill="#FFFFFF" fill-opacity="0.1"` |+支持常用命名色、`rgb()` / `rgba()`、`hsl()` / `hsla()` 以及 3/4/6/8 位+HEX。颜色内嵌 alpha 会与 `opacity`、`fill-opacity`、`stroke-opacity`、+`stop-opacity` 继续相乘;需要复用同一色板时,也可继续采用独立透明度属性。### 6.3 条件允许@@ -420,7 +420,7 @@ font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Micr### 结构- [ ] 主要元素有语义化 `<g id="...">`-- [ ] 无 `<style>`、`class`、`<foreignObject>`、`mask`、`rgba()`+- [ ] 无 `<style>`、`class`、`<foreignObject>`、`mask`- [ ] `<g>` 标签无 `opacity` 属性- [ ] 文本字符为原生 Unicode(`—` `©` `→` NBSP 等),无 HTML 命名实体(` ` `—` `©` 等);裸 `& < >` 已转义为 `& < >`diff --git "a/skills/ppt-master/templates/decks/\344\270\255\345\233\275\347\224\265\344\277\241/design_spec.md" "b/skills/ppt-master/templates/decks/\344\270\255\345\233\275\347\224\265\344\277\241/design_spec.md"index 3afae042..0e5fd4f2 100644--- "a/skills/ppt-master/templates/decks/\344\270\255\345\233\275\347\224\265\344\277\241/design_spec.md"+++ "b/skills/ppt-master/templates/decks/\344\270\255\345\233\275\347\224\265\344\277\241/design_spec.md"@@ -183,9 +183,9 @@ primary_color: "#C00000"## X. SVG Technical Constraints1. `viewBox` must remain `0 0 1280 720`-2. Do not use `mask`, `<style>`, `class`, `foreignObject`, or `rgba()`. `clipPath` is allowed only on `<image>` under `shared-standards.md` §1.2+2. Do not use `mask`, `<style>`, `class`, or `foreignObject`. `clipPath` is allowed only on `<image>` under `shared-standards.md` §1.23. Use plain vector geometry and `<image>` references to packaged assets only-4. Transparency must use `fill-opacity` / `stroke-opacity`+4. CSS alpha colors and explicit `fill-opacity` / `stroke-opacity` are both supported; values multiply5. Text wrapping should be handled with `<tspan>` if needed6. Avoid PPT-fragile decorative complexity; simplify repeated motifs into reusable structuresdiff --git "a/skills/ppt-master/templates/decks/\344\270\255\345\233\275\347\224\265\345\273\272/design_spec.md" "b/skills/ppt-master/templates/decks/\344\270\255\345\233\275\347\224\265\345\273\272/design_spec.md"index 631dd2f3..62585cb0 100644--- "a/skills/ppt-master/templates/decks/\344\270\255\345\233\275\347\224\265\345\273\272/design_spec.md"+++ "b/skills/ppt-master/templates/decks/\344\270\255\345\233\275\347\224\265\345\273\272/design_spec.md"@@ -196,8 +196,6 @@ primary_color: "#00418D"- `textPath` (text on path)- `animate`, `animateTransform`, `set` (animations)-- `rgba()` color format (must use hex + opacity)----## XI. Placeholder Specificationdiff --git "a/skills/ppt-master/templates/decks/\344\270\255\346\261\275\347\240\224/design_spec.md" "b/skills/ppt-master/templates/decks/\344\270\255\346\261\275\347\240\224/design_spec.md"index 80d3b98a..ec7df49a 100644--- "a/skills/ppt-master/templates/decks/\344\270\255\346\261\275\347\240\224/design_spec.md"+++ "b/skills/ppt-master/templates/decks/\344\270\255\346\261\275\347\240\224/design_spec.md"@@ -190,7 +190,7 @@ primary_color: "#004098"1. viewBox: `0 0 1280 720`2. Use `<rect>` elements for backgrounds3. Text wrapping via `<tspan>` (no `<foreignObject>`)-4. Opacity via `fill-opacity` / `stroke-opacity`, no `rgba()`+4. CSS alpha colors and explicit `fill-opacity` / `stroke-opacity` are both supported; values multiply5. Forbidden: `mask`, `<style>`, `class`, `foreignObject`. `clipPath` is allowed only on `<image>` under `shared-standards.md` §1.26. Forbidden: `textPath`, `animate*`, `script`7. `marker-start` / `marker-end` conditionally allowed (marker in `<defs>`, `orient="auto"`, shape = triangle/diamond/oval) — see shared-standards.md §1.1diff --git "a/skills/ppt-master/templates/decks/\346\213\233\345\225\206\351\223\266\350\241\214/design_spec.md" "b/skills/ppt-master/templates/decks/\346\213\233\345\225\206\351\223\266\350\241\214/design_spec.md"index 0c81d9d2..aedbc19f 100644--- "a/skills/ppt-master/templates/decks/\346\213\233\345\225\206\351\223\266\350\241\214/design_spec.md"+++ "b/skills/ppt-master/templates/decks/\346\213\233\345\225\206\351\223\266\350\241\214/design_spec.md"@@ -144,7 +144,7 @@ Reference slides read before generation: `1, 2, 3, 4, 6, 9, 11, 13, 16, 18`.1. `viewBox` must stay `0 0 1280 720`2. No `mask`, `<style>`, `class`, `foreignObject`, `textPath`, or animation tags. `clipPath` is allowed only on `<image>` under `shared-standards.md` §1.2-3. Use plain hex colors with `fill-opacity` / `stroke-opacity`+3. Use supported CSS colors or HEX; embedded alpha multiplies with `fill-opacity` / `stroke-opacity`4. Keep image assets semantic and minimal5. Prefer vector reconstruction over embedding PPT-export fragmentsdiff --git "a/skills/ppt-master/templates/decks/\351\207\215\345\272\206\345\244\247\345\255\246/design_spec.md" "b/skills/ppt-master/templates/decks/\351\207\215\345\272\206\345\244\247\345\255\246/design_spec.md"index e0c0b594..f03b44c3 100644--- "a/skills/ppt-master/templates/decks/\351\207\215\345\272\206\345\244\247\345\255\246/design_spec.md"+++ "b/skills/ppt-master/templates/decks/\351\207\215\345\272\206\345\244\247\345\255\246/design_spec.md"@@ -224,7 +224,6 @@ Small circle elements representing the nighttime lights of the Mountain City:- `mask`, `<style>`, `class`; `clipPath` is allowed only on `<image>` under `shared-standards.md` §1.2- `foreignObject`, `textPath`, `animate*`-- `rgba()` color format---diff --git a/skills/ppt-master/templates/design_spec_reference.md b/skills/ppt-master/templates/design_spec_reference.mdindex ca14bcc6..1885b139 100644--- a/skills/ppt-master/templates/design_spec_reference.md+++ b/skills/ppt-master/templates/design_spec_reference.md@@ -81,7 +81,7 @@<stop offset="100%" stop-color="#[secondary accent]"/></linearGradient>-<!-- Background decorative gradient (note: rgba forbidden, use stop-opacity) -->+<!-- Background decorative gradient (explicit stop-opacity keeps the palette reusable) --><radialGradient id="bgDecor" cx="80%" cy="20%" r="50%"><stop offset="0%" stop-color="#[primary]" stop-opacity="0.15"/><stop offset="100%" stop-color="#[primary]" stop-opacity="0"/>@@ -359,7 +359,8 @@ One speaker note file per page, saved to `notes/`:1. viewBox: `{canvas_info['viewbox']}`2. Background uses `<rect>` elements3. Text wrapping uses `<tspan>` (`<foreignObject>` FORBIDDEN)-4. Transparency uses `fill-opacity` / `stroke-opacity`; `rgba()` FORBIDDEN+4. Colors may use named, `rgb()` / `rgba()`, `hsl()` / `hsla()`, or+ 3/4/6/8-digit HEX forms; embedded alpha multiplies with explicit opacity5. FORBIDDEN: `mask`, `<style>`, `class`, `foreignObject`6. FORBIDDEN: `textPath`, `animate*`, `script`7. Text characters: write typography & symbols as raw Unicode (em dash `—`, en dash `–`, `©`, `®`, `→`, NBSP, etc.); HTML named entities (` `, `—`, `©`, `®` …) are FORBIDDEN. XML reserved chars in text MUST be escaped as `&` `<` `>` `"` `'` (e.g. `R&D`, `error < 5%`). See shared-standards.md §1.0diff --git a/skills/ppt-master/templates/layouts/academic_defense/design_spec.md b/skills/ppt-master/templates/layouts/academic_defense/design_spec.mdindex ae4f7ebf..aa99cb0a 100644--- a/skills/ppt-master/templates/layouts/academic_defense/design_spec.md+++ b/skills/ppt-master/templates/layouts/academic_defense/design_spec.md@@ -149,7 +149,7 @@ page_types: [cover, toc, chapter, content, ending]1. viewBox: `0 0 1280 720`2. Use `<rect>` elements for backgrounds3. Use `<tspan>` for text wrapping (no `<foreignObject>`)-4. Use `fill-opacity` / `stroke-opacity` for transparency; no `rgba()`+4. CSS alpha colors and explicit `fill-opacity` / `stroke-opacity` are both supported; values multiply5. Prohibited: `mask`, `<style>`, `class`, `foreignObject`. `clipPath` is allowed only on `<image>` under `shared-standards.md` §1.26. Prohibited: `textPath`, `animate*`, `script`7. `marker-start` / `marker-end` conditionally allowed (marker in `<defs>`, `orient="auto"`, shape = triangle/diamond/oval) — see shared-standards.md §1.1diff --git a/skills/ppt-master/templates/layouts/ai_ops/design_spec.md b/skills/ppt-master/templates/layouts/ai_ops/design_spec.mdindex b350068d..4125de34 100644--- a/skills/ppt-master/templates/layouts/ai_ops/design_spec.md+++ b/skills/ppt-master/templates/layouts/ai_ops/design_spec.md@@ -263,7 +263,7 @@ This template emulates the visual language of telecom technical reports. The cor1. viewBox: `0 0 1280 720`2. Use `<rect>` elements for backgrounds3. Use `<tspan>` for text wrapping (**`<foreignObject>` is strictly prohibited**)-4. Use `fill-opacity` / `stroke-opacity` for transparency; `rgba()` is prohibited+4. CSS alpha colors and explicit `fill-opacity` / `stroke-opacity` are both supported; values multiply5. Prohibited: `mask`, `<style>`, `class`, `foreignObject` (`id` inside `<defs>` is allowed). `clipPath` is allowed only on `<image>` under `shared-standards.md` §1.26. Prohibited: `textPath`, `animate*`, `script`7. Prohibited: `<symbol>+<use>`, `<iframe>`, `@font-face`diff --git a/skills/ppt-master/templates/layouts/government_blue/design_spec.md b/skills/ppt-master/templates/layouts/government_blue/design_spec.mdindex b18c3ba5..90b08f38 100644--- a/skills/ppt-master/templates/layouts/government_blue/design_spec.md+++ b/skills/ppt-master/templates/layouts/government_blue/design_spec.md@@ -147,7 +147,7 @@ page_types: [cover, toc, chapter, content, ending]1. viewBox: `0 0 1280 720`2. Use `<rect>` elements for backgrounds3. Use `<tspan>` for text wrapping (no `<foreignObject>`)-4. Use `fill-opacity` / `stroke-opacity` for transparency; `rgba()` is prohibited+4. CSS alpha colors and explicit `fill-opacity` / `stroke-opacity` are both supported; values multiply5. Prohibited: `mask`, `<style>`, `class`, `foreignObject`. `clipPath` is allowed only on `<image>` under `shared-standards.md` §1.26. Prohibited: `textPath`, `animate*`, `script`7. `marker-start` / `marker-end` conditionally allowed (marker in `<defs>`, `orient="auto"`, shape = triangle/diamond/oval) — see shared-standards.md §1.1diff --git a/skills/ppt-master/templates/layouts/government_red/design_spec.md b/skills/ppt-master/templates/layouts/government_red/design_spec.mdindex f07dfb0f..d2a611cb 100644--- a/skills/ppt-master/templates/layouts/government_red/design_spec.md+++ b/skills/ppt-master/templates/layouts/government_red/design_spec.md@@ -142,7 +142,7 @@ page_types: [cover, toc, chapter, content, ending]1. viewBox: `0 0 1280 720`2. Use `<rect>` elements for backgrounds3. Use `<tspan>` for text wrapping (no `<foreignObject>`)-4. Use `fill-opacity` / `stroke-opacity` for transparency; `rgba()` is prohibited+4. CSS alpha colors and explicit `fill-opacity` / `stroke-opacity` are both supported; values multiply5. Prohibited: `mask`, `<style>`, `class`, `foreignObject`. `clipPath` is allowed only on `<image>` under `shared-standards.md` §1.26. Prohibited: `textPath`, `animate*`, `script`7. `marker-start` / `marker-end` conditionally allowed (marker in `<defs>`, `orient="auto"`, shape = triangle/diamond/oval) — see shared-standards.md §1.1diff --git a/skills/ppt-master/templates/layouts/medical_university/design_spec.md b/skills/ppt-master/templates/layouts/medical_university/design_spec.mdindex 72cfec7f..749b563e 100644--- a/skills/ppt-master/templates/layouts/medical_university/design_spec.md+++ b/skills/ppt-master/templates/layouts/medical_university/design_spec.md@@ -149,8 +149,8 @@ page_types: [cover, toc, chapter, content, ending]- viewBox fixed at `0 0 1280 720`- Use `<rect>` elements for backgrounds- Use `<tspan>` for text wrapping-- All colors in HEX format (no rgba)-- Use `fill-opacity` / `stroke-opacity` for transparency+- Use supported CSS colors or HEX; embedded alpha multiplies with+ `fill-opacity` / `stroke-opacity`### Prohibited Elements (PPT Incompatible)diff --git a/skills/ppt-master/templates/layouts/pixel_retro/design_spec.md b/skills/ppt-master/templates/layouts/pixel_retro/design_spec.mdindex bc1cb49c..237ac4a6 100644--- a/skills/ppt-master/templates/layouts/pixel_retro/design_spec.md+++ b/skills/ppt-master/templates/layouts/pixel_retro/design_spec.md@@ -199,7 +199,7 @@ Apply glow filters to key text/elements:1. viewBox: `0 0 1280 720`2. Use `<rect>` elements for backgrounds3. Use `<tspan>` for text wrapping (no `<foreignObject>`)-4. Use `fill-opacity` / `stroke-opacity` for transparency; `rgba()` is prohibited+4. CSS alpha colors and explicit `fill-opacity` / `stroke-opacity` are both supported; values multiply5. Prohibited: `mask`, `<style>`, `class`, `foreignObject`. `clipPath` is allowed only on `<image>` under `shared-standards.md` §1.26. Prohibited: `textPath`, `animate*`, `script`7. `marker-start` / `marker-end` conditionally allowed (marker in `<defs>`, `orient="auto"`, shape = triangle/diamond/oval) — see shared-standards.md §1.1diff --git a/skills/ppt-master/templates/layouts/psychology_attachment/design_spec.md b/skills/ppt-master/templates/layouts/psychology_attachment/design_spec.mdindex 740642e6..3191e0be 100644--- a/skills/ppt-master/templates/layouts/psychology_attachment/design_spec.md+++ b/skills/ppt-master/templates/layouts/psychology_attachment/design_spec.md@@ -291,10 +291,8 @@ Use `tabler-outline` as the stylistic icon library for this template. It matches### PPT Compatibility Rules-| Prohibited | Correct Alternative |-| ---------------------------------- | ------------------------------------------------------ |-| `fill="rgba(255,255,255,0.1)"` | `fill="#FFFFFF" fill-opacity="0.1"` |-| `stroke="rgba(0,0,0,0.5)"` | `stroke="#000000" stroke-opacity="0.5"` |+Supported CSS alpha colors and explicit `fill-opacity` / `stroke-opacity`+both export to DrawingML; when combined, their alpha values multiply.`<g opacity="0..1">` is supported as per-descendant alpha; overlappingchildren may composite differently from an isolated SVG group.diff --git a/skills/ppt-master/templates/spec_lock_reference.md b/skills/ppt-master/templates/spec_lock_reference.mdindex cbcd6218..38b28e5f 100644--- a/skills/ppt-master/templates/spec_lock_reference.md+++ b/skills/ppt-master/templates/spec_lock_reference.md@@ -191,6 +191,5 @@## forbidden- Mixing icon libraries-- rgba()- `<style>`, `class`, `<foreignObject>`, `textPath`, `@font-face`, `<animate*>`, `<script>`, `<iframe>`, `<symbol>`+`<use>`- HTML named entities in text (` `, `—`, `©`, `–`, `®`, `…`, `•` …) — write as raw Unicode (`—`, `©`, `→`, NBSP, etc.); XML reserved chars `& < > " '` must be escaped as `& < > " '`. See shared-standards.md §1.0