zcbot/skills/ppt/templates/layouts
caoqianming 941554f9d7 feat(ppt): zongyuan_red 逆向重建为真实中国建材总院模板 + 主动提示(bump 0.38.2)
按官方 总院模板.pptx(中国建筑材料科学研究总院)把手搓的 zongyuan_red
重建为真实品牌模板:PowerPoint COM 渲真页 + 解 pptx 抽实测色/字/资产。

- 打包 logo.png(八边形字标,EMF→PNG)/ cover_bg.jpg(总部大楼灰度)/
  ending_bg.jpg(材料马赛克);TIFF→压缩 JPG、EMF→透明 PNG
- 重写 5 页 SVG 忠实还原:封面(实景铺底+红块)/目录(红斜三角)/
  章节(八边形水印,原件缺按 DNA 合成)/内容(灰底红顶条卡片+底部红条)/
  尾页(材料创造美好世界+Thanks)
- 实测身份:主红 #D7000E、目录红 #D52C24、近黑 #181717、辅灰 #6F6F6F/#BCBDBD;
  微软雅黑+Arial+方正兰亭黑
- 改写 design_spec.md;补登记 layouts_index.json(此前 dir 在但未注册)
- 质检 --template-mode 5 页零 error;finalize 内嵌 8 图 + 全量渲图逐页确认

主动提示:strategist.md §e + SKILL.md 默认主题段各补一条 —— 指向
中国建材总院·CNBM 系汇报(含职称评审)时策略阶段主动把 zongyuan_red
整套模板作为候选点名给用户,点头再按明确路径套入;唯一鼓励主动提模板的
场景,其余仍等明确路径。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 15:18:06 +08:00
..
academic_defense feat(ppt): skill 重构为 SVG-first(移植 ppt-master,弃 python-pptx 版式件)(bump 0.33.0) 2026-06-29 16:38:58 +08:00
ai_ops feat(ppt): skill 重构为 SVG-first(移植 ppt-master,弃 python-pptx 版式件)(bump 0.33.0) 2026-06-29 16:38:58 +08:00
government_blue feat(ppt): skill 重构为 SVG-first(移植 ppt-master,弃 python-pptx 版式件)(bump 0.33.0) 2026-06-29 16:38:58 +08:00
government_red feat(ppt): skill 重构为 SVG-first(移植 ppt-master,弃 python-pptx 版式件)(bump 0.33.0) 2026-06-29 16:38:58 +08:00
medical_university feat(ppt): skill 重构为 SVG-first(移植 ppt-master,弃 python-pptx 版式件)(bump 0.33.0) 2026-06-29 16:38:58 +08:00
pixel_retro feat(ppt): skill 重构为 SVG-first(移植 ppt-master,弃 python-pptx 版式件)(bump 0.33.0) 2026-06-29 16:38:58 +08:00
psychology_attachment feat(ppt): skill 重构为 SVG-first(移植 ppt-master,弃 python-pptx 版式件)(bump 0.33.0) 2026-06-29 16:38:58 +08:00
zongyuan_red feat(ppt): zongyuan_red 逆向重建为真实中国建材总院模板 + 主动提示(bump 0.38.2) 2026-07-03 15:18:06 +08:00
README.md fix(ppt): 修生成 PPT 缺图标(图标管线四层断点)+ 沙箱 SVG 预览渲染(bump 0.33.3) 2026-06-30 13:59:00 +08:00
layouts_index.json feat(ppt): zongyuan_red 逆向重建为真实中国建材总院模板 + 主动提示(bump 0.38.2) 2026-07-03 15:18:06 +08:00

README.md

Layout Templates

Layout = structure-only template. Captures canvas, page structure, page types, and SVG roster — but no identity segment (color / typography / logo / voice / icon style). Layered identity comes from templates/brands/ or is decided per-deck in Strategist's Eight Confirmations. For full-identity replicas of specific PPTs, see templates/decks/ instead.

Single source of truth for what layouts exist: layouts_index.json (layout_id → { summary, canvas_format, page_count, page_types }). This README explains the kind; it does not enumerate layouts.

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


Trigger rule

Layout selection is opt-in by explicit path. The main workflow defaults to free design. A layout is only used when the user gives an explicit directory path in their initial message (e.g. skills/ppt/templates/layouts/academic_defense/). Bare names do not trigger. See SKILL.md Step 3.

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


design_spec.md schema

Layouts write structure-only segments. Identity sections (Color Scheme / Typography / Logo / Voice / Icon Style) are forbidden — those belong to brands and decks. Minimum schema:

---
layout_id: <slug>
kind: layout
summary: <one-line use cases>
canvas_format: ppt169
page_count: 5
page_types: [cover, toc, chapter, content, ending]
---

# [Template Name] - Design Specification

## I. Template Overview         # Use cases / Design intent
## II. Canvas Specification     # Format / Dimensions / viewBox / Margins
## III. Page Structure          # Layout grid / Decorative DNA / Navigation
## IV. Page Types               # Per-page role descriptions
## V. SVG Page Roster           # File list + per-file purpose

Layouts may include additional supporting sections (Layout Patterns, Spacing Guidelines, SVG Technical Constraints, Placeholder Specification, Usage Notes). Do not include Color Scheme or Typography sections — those are identity-segment fields owned by templates/brands/ and templates/decks/.


Standard file set per layout directory

Filename Required Purpose
design_spec.md Yes Layout schema spec (frontmatter + structure sections)
01_cover.svg Yes Cover page
02_toc.svg Optional Table of contents
02_chapter.svg Yes Chapter page
03_content.svg Yes Content page
04_ending.svg Yes Ending page

All SVGs use viewBox="0 0 1280 720" for ppt169.


Placeholder convention

Templates use {{PLACEHOLDER}} to mark replaceable content. New layouts should use the canonical placeholder set documented in references/template-designer.md. Templates with intentionally different vocabulary declare a placeholders: block in design_spec.md frontmatter to silence advisory warnings.


Creating a new layout

  1. Run workflows/create-template.md (default produces a deck; explicit "structure only / no identity" option produces a layout)
  2. Resulting directory lands under templates/layouts/<id>/
  3. Validate: python3 skills/ppt/scripts/svg_quality_checker.py templates/layouts/<id> --template-mode --format ppt169
  4. Register: python3 skills/ppt/scripts/register_template.py <id> --kind layout

The register step updates layouts_index.json — the single source of truth for layout discovery.


SVG technical constraints

See shared-standards.md for the authoritative ban list (PPT incompatibilities, raw-character rules, clipPath conditional allowance, etc.). Layouts must comply.