zcbot/skills/ppt/templates/decks
caoqianming e3a432dcdd feat(ppt): skill 重构为 SVG-first(移植 ppt-master,弃 python-pptx 版式件)(bump 0.33.0)
旧 python-pptx 固定组合版式件是版面单调/AI 味的架构天花板。改为 SVG-first:
AI 逐页手写 SVG 设计稿 → 纯 Python 转换器逐元素译成原生可编辑 DrawingML。

- 搬引擎:svg_to_pptx/ 转换器 + finalize_svg/svg_finalize + svg_quality_checker + total_md_split + update_spec(依赖闭包干净,只需 python-pptx)
- 搬知识:references(shared-standards/executor-base/strategist/image-layout-*/canvas-formats)+ 5 叙事骨架 + 19 视觉风格
- 搬模板:templates(layouts/decks/brands/charts + 图标库 1.1w+ + spec 骨架)
- 换 GUI:浏览器 Confirm UI → 聊天 BLOCKING 八条确认;live preview → svg_preview.py(无头 Chrome 渲 SVG→PNG);配图走 zcbot imagegen skill
- 默认主题改自由设计(商务红降为候选之一)
- 修 Windows GBK 控制台 UnicodeEncodeError:6 个入口脚本加 sys.stdout.reconfigure(utf-8) shim
- 端到端验证通过:4 页材料领域 deck,质检 0 error → finalize 嵌图标 → 导出原生 pptx → 渲图肉眼验收(swiss-minimal 设计级,非 AI 味)

移植自 github.com/hugohe3/ppt-master (MIT),适配 zcbot task_dir/聊天确认/imagegen 工作流。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 16:38:58 +08:00
..
中国电信 feat(ppt): skill 重构为 SVG-first(移植 ppt-master,弃 python-pptx 版式件)(bump 0.33.0) 2026-06-29 16:38:58 +08:00
中国电建_常规 feat(ppt): skill 重构为 SVG-first(移植 ppt-master,弃 python-pptx 版式件)(bump 0.33.0) 2026-06-29 16:38:58 +08:00
中国电建_现代 feat(ppt): skill 重构为 SVG-first(移植 ppt-master,弃 python-pptx 版式件)(bump 0.33.0) 2026-06-29 16:38:58 +08:00
中汽研_商务 feat(ppt): skill 重构为 SVG-first(移植 ppt-master,弃 python-pptx 版式件)(bump 0.33.0) 2026-06-29 16:38:58 +08:00
中汽研_常规 feat(ppt): skill 重构为 SVG-first(移植 ppt-master,弃 python-pptx 版式件)(bump 0.33.0) 2026-06-29 16:38:58 +08:00
中汽研_现代 feat(ppt): skill 重构为 SVG-first(移植 ppt-master,弃 python-pptx 版式件)(bump 0.33.0) 2026-06-29 16:38:58 +08:00
招商银行 feat(ppt): skill 重构为 SVG-first(移植 ppt-master,弃 python-pptx 版式件)(bump 0.33.0) 2026-06-29 16:38:58 +08:00
重庆大学 feat(ppt): skill 重构为 SVG-first(移植 ppt-master,弃 python-pptx 版式件)(bump 0.33.0) 2026-06-29 16:38:58 +08:00
README.md feat(ppt): skill 重构为 SVG-first(移植 ppt-master,弃 python-pptx 版式件)(bump 0.33.0) 2026-06-29 16:38:58 +08:00
decks_index.json feat(ppt): skill 重构为 SVG-first(移植 ppt-master,弃 python-pptx 版式件)(bump 0.33.0) 2026-06-29 16:38:58 +08:00

README.md

Deck Templates

Deck = full-PPT replica. Each deck reverse-engineers a specific organization's branded presentation and bundles its identity + structure + middle segments into one atomic asset. Use a deck when you want the complete look of a particular institution (color, typography, logo, page structure, voice) preserved as a whole.

Single source of truth for what decks exist: decks_index.json (deck_id → { summary, canvas_format, page_count, primary_color }). This README explains the kind; it does not enumerate decks.

Full data model: docs/zh/templates-architecture.md.


Trigger rule

Deck selection is opt-in by explicit path. The main workflow defaults to free design. A deck is only used when the user gives an explicit directory path in their initial message (e.g. skills/ppt-master/templates/decks/招商银行/). Bare names do not trigger. See SKILL.md Step 3.

decks_index.json is a discovery aid, not a trigger — it lets the AI answer "what decks exist?" by listing ids and paths. Listing alone never advances the pipeline.


design_spec.md schema

Decks carry the full set of segments (identity + structure + middle). Minimum schema:

---
deck_id: <slug>
kind: deck
summary: <one-line use cases>
canvas_format: ppt169
page_count: 5
primary_color: "#XXXXXX"
---

# [Brand / Organization Name] - Design Specification

## I. Template Overview          # Middle — Use cases / Design intent
## II. Canvas Specification      # Structure
## III. Color Scheme             # Identity — role / HEX / provenance / notes
## IV. Typography                # Identity — role / family / weight
## V. Logo                       # Identity — file / form / usage rules (if logo bundled)
## VI. Page Structure            # Structure — layout grid / decorative DNA
## VII. Page Types               # Structure — per-page roles
## VIII. SVG Page Roster         # Structure — file list + per-file purpose

Decks may include additional supporting sections (Voice & Tone, Icon Style, Layout Modes, Spacing Specification, SVG Technical Constraints, Placeholder Specification, Asset Specification, Usage Notes). Use them when meaningful for the replica.


Fusion behavior at Step 3

When the user gives a deck path alone, Strategist locks all segments; Eight Confirmations narrows to deck-content fields (target audience / page count / outline / tone tweaks).

When the user gives a deck path with a brand path or layout path, identity / structure segments are overridden by the higher-priority source (brand wins on identity, layout wins on structure). See SKILL.md Step 3 fusion table.


Creating a new deck

  1. Run workflows/create-template.md (default kind is deck)
  2. Resulting directory lands under templates/decks/<id>/
  3. Validate: python3 skills/ppt-master/scripts/svg_quality_checker.py templates/decks/<id> --template-mode --format ppt169
  4. Register: python3 skills/ppt-master/scripts/register_template.py <id> --kind deck

The register step updates decks_index.json — the single source of truth for deck discovery.


See also