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(template-system): 完善模板系统与角色协作文档
hugohe39287070b7d01
diff --git a/AGENTS.md b/AGENTS.mdindex d3684484..ec21bc47 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -11,7 +11,7 @@ PPT Master 是一个 AI 驱动的多格式 SVG 内容生成系统,通过多角| 角色 | 文件 | 职责 || --------------------------- | ---------------------------------- | ----------------------------------------- || **Strategist** | `roles/Strategist.md` | 初次沟通、内容分析、设计规范编制 |-| **Template_Designer** | `roles/Template_Designer.md` | 页面模板生成(用户选择「B) 生成新模板」) |+| **Template_Designer** | `roles/Template_Designer.md` | 页面模板生成(用户选择「C) 生成新模板」) || **Image_Generator** | `roles/Image_Generator.md` | AI 图片生成(条件触发) || **Executor_General** | `roles/Executor_General.md` | 通用灵活风格 SVG 生成 || **Executor_Consultant** | `roles/Executor_Consultant.md` | 一般咨询风格 SVG 生成 |@@ -27,38 +27,53 @@ PPT Master 是一个 AI 驱动的多格式 SVG 内容生成系统,通过多角源内容转换工具(如需要)│▼+【创建项目文件夹】← ← ← ← ← 第一步!+ python3 tools/project_manager.py init+ │+ ▼┌─────────────────────────────────────────┐-│ Strategist(策略规划) │-│ • 八项确认 │-│ • 生成《设计规范与内容大纲》 │+│ 询问模板选项(三选一) │└─────────────────────────────────────────┘│- ▼-【创建项目文件夹】← ← ← ← ← 关键步骤- python3 tools/project_manager.py init+ ├─────────────────────────────────────────┐+ │ │+ A) 使用已有模板 │+ │ │+ ├→ 用户提供模板或从示例库选择 │+ │ 复制到项目 templates/ 目录 │+ │ (来源:用户自备/其他项目/示例库等) │+ │ │+ │ B) 不使用模板+ │ │+ │ │+ │ │+ C) 生成新模板 │+ │ │+ │ │+ │ │+ ├─────────────────────────────────────────┘│▼-保存设计规范到项目文件夹+┌─────────────────────────────────────────┐+│ Strategist(策略规划)← 必须,不可跳过 │+│ • 八项确认 │+│ • 生成《设计规范与内容大纲》 │+│ • 保存设计规范到项目文件夹 │+└─────────────────────────────────────────┘│- ├─ 模板选项(三选一)────────────────────┐- │ │ │- │ A) 使用已有模板 │- │ │ └→ 从 templates/layouts/ 选择│- │ │ 复制到项目 templates/ │- │ │ │- │ B) 生成新模板 │- │ │ └→ Template_Designer 生成 │- │ ▼ 保存到项目 templates/ │- │ ┌──────────────────────────────────┐ │- │ │ Template_Designer(选项 B) │ │- │ │ • 生成页面模板到 templates/ │ │- │ │ • 用户确认后继续 │ │- │ └──────────────────────────────────┘ │- │ │ │- │ C) 不使用模板 ───────────────────┤- │ └→ Executor 自由生成 │- │ │- └────────────────────────────────────────┘+ ├─ 模板选项 = C(生成新模板)?+ │ │+ │ YES ────────────────────────────┐+ │ │+ │ ┌──────────────────────────────────┐+ │ │ Template_Designer(选项 C) │+ │ │ • 生成页面模板到 templates/ │+ │ │ • 用户确认后继续 │+ │ └──────────────────────────────────┘+ │ │+ │ ┌──────────────────────────────────┘+ │ │+ ├───────┘│├─ 图片方式包含「C) AI 生成」?│ │@@ -90,8 +105,10 @@ Optimizer_CRAP (可选优化)> **注意**:>+> - **项目文件夹必须在用户输入内容后立即创建**(第一步)+> - 模板选项在创建项目后立即询问,选项 C 需要策略师先完成大纲+> - **策略师的「八项确认」是强制要求,无论模板选项如何都不可跳过**> - Image_Generator 是串行环节,图片归集完成后才进入 Executor 阶段-> - 项目文件夹必须在 Strategist 完成设计规范后立即创建> - 后处理和导出步骤由 AI 自动执行---@@ -105,7 +122,7 @@ Optimizer_CRAP (可选优化)| 阶段 | 必须阅读的文件 | 触发条件 || ------------ | ---------------------------------- | -------------------------------------------- || 策略规划 | `roles/Strategist.md` | 用户提出新的 PPT/内容生成需求 |-| 模板设计 | `roles/Template_Designer.md` | 用户选择「B) 生成新模板」 |+| 模板设计 | `roles/Template_Designer.md` | 用户选择「C) 生成新模板」且策略师完成大纲后 || 图片生成 | `roles/Image_Generator.md` | 图片方式包含「C) AI 生成」(如 C、B+C、C+D) || 通用风格执行 | `roles/Executor_General.md` | 用户选择「A) 通用灵活」设计风格 || 咨询风格执行 | `roles/Executor_Consultant.md` | 用户选择「B) 一般咨询」设计风格 |@@ -149,10 +166,9 @@ Optimizer_CRAP (可选优化)- [x] 已完成八项确认(画布/页数/受众/风格/配色/图标/图片/排版)- [x] 已生成《设计规范与内容大纲》-- [x] 已创建项目文件夹:projects/<项目名>_<格式>_<日期>/- [x] 设计规范已保存到项目文件夹- [x] 已确定图片资源清单(如需要)-- [ ] **下一步**: [Image_Generator / Executor_xxx]+- [ ] **下一步**: [根据模板选项: Template_Designer(若选 C)/ Image_Generator / Executor_xxx]```#### Image_Generator 阶段检查点@@ -218,6 +234,12 @@ python3 tools/svg_to_pptx.py <项目路径> -s final└─ Markdown → 使用 view_file 读取内容│▼+ 创建项目文件夹(python3 tools/project_manager.py init)+ │+ ▼+ 询问模板选项(A 使用已有 / B 不使用 / C 生成新模板)+ │+ ▼切换到 Strategist 角色,开始八项确认```@@ -229,8 +251,8 @@ python3 tools/svg_to_pptx.py <项目路径> -s final### 正确行为-> ✅ **正确**:识别到 PDF/URL 后,立即调用工具转换,然后切换到 Strategist 开始内容分析-> ✅ **正确**:工具执行完成后,读取转换结果,自动进入八项确认流程+> ✅ **正确**:识别到 PDF/URL 后,立即调用工具转换,然后创建项目文件夹+> ✅ **正确**:工具执行完成后,读取转换结果,询问模板选项,再进入八项确认流程---@@ -494,11 +516,15 @@ project/### 流程要点-- 策略师的「初次沟通」是**强制要求**+- **项目文件夹必须在用户输入内容后立即创建**(第一步)+- **创建项目后立即询问模板选项**(A 使用已有 / B 不使用 / C 生成新模板)— 这是流程步骤,非策略师职责+- 如用户选择 A(使用已有模板),需将模板拷贝到项目 `templates/` 目录(来源:用户自备/其他项目/示例库等)+- 如用户选择 C(生成新模板),策略师先完成大纲后再调用模板设计师+- **策略师的「八项确认」是强制要求,无论模板选项如何都不可跳过**- 策略师必须对八项确认问题**均给出专业建议**- 通用风格与咨询风格在规范格式上有本质区别-- 图标使用方式需在初次沟通中确认(Emoji / AI 生成 / 内置库 / 自定义)-- 图片使用方式需在初次沟通中确认(不使用 / 用户提供 / AI 生成 / 占位符)+- 图标使用方式需在八项确认中确认(Emoji / AI 生成 / 内置库 / 自定义)+- 图片使用方式需在八项确认中确认(不使用 / 用户提供 / AI 生成 / 占位符)- **图片生成流程**:如果图片方式**包含**「C) AI 生成」(如 C、B+C、C+D),**必须**先切换到 Image_Generator 角色,阅读角色定义,完成图片生成后再进入 Executor 阶段### 后处理提示diff --git a/README.md b/README.mdindex f67fa023..792eccaa 100644--- a/README.md+++ b/README.md@@ -171,15 +171,21 @@ PPT Master 是一个创新的 AI 辅助视觉内容创作系统,通过多角├─ URL → web_to_md.py / web_to_md.cjs└─ MD → 直接读取↓-[Strategist] 策略师 - 八项确认与设计规范+[创建项目文件夹] project_manager.py init+ ↓+[模板选项] 询问用户选择(流程步骤,非策略师职责)+ │+ ├─ A) 使用已有模板 → 复制模板到项目 templates/ → 进入策略师+ ├─ B) 不使用模板 → 进入策略师+ └─ C) 生成新模板 → 进入策略师(大纲完成后调用 Template_Designer)+ ↓+[Strategist] 策略师 - 八项确认与设计规范(必须,不可跳过)│- ├─ 模板选项(三选一)+ ├─ 模板选项 = C(生成新模板)?│ │- │ A) 使用已有模板 → 复制到项目 templates/- │ B) 生成新模板 → [Template_Designer] 模板设计师- │ C) 不使用模板 → 直接进入下一阶段- │ │- ├─────────────────────────────────────────────────────────────┤+ │ YES → [Template_Designer] 模板设计师+ │ │+ │ NO ─────────────────────────────────────────────┤│ │├─ 图片方式包含「AI 生成」? ││ │ │diff --git a/README_EN.md b/README_EN.mdindex 7b2d089d..ab447abd 100644--- a/README_EN.md+++ b/README_EN.md@@ -18,12 +18,12 @@ An AI-powered intelligent visual content generation system that transforms sourc### Recommended Tools-| Tool | Rating | Description |-|------|:------:|------|-| **[Antigravity](https://antigravity.dev/)** | ⭐⭐⭐ | **Highly Recommended**! Free Opus 4.5 access, integrated Banana image generation, can generate images directly in the repository |-| [Cursor](https://cursor.sh/) | ⭐⭐ | Mainstream AI editor, supports multiple models |-| [VS Code + Copilot](https://code.visualstudio.com/) | ⭐⭐ | Microsoft official solution |-| [Claude Code](https://claude.ai/) | ⭐⭐ | Anthropic official CLI tool |+| Tool | Rating | Description |+| --------------------------------------------------- | :----: | -------------------------------------------------------------------------------------------------------------------------------- |+| **[Antigravity](https://antigravity.dev/)** | ⭐⭐⭐ | **Highly Recommended**! Free Opus 4.5 access, integrated Banana image generation, can generate images directly in the repository |+| [Cursor](https://cursor.sh/) | ⭐⭐ | Mainstream AI editor, supports multiple models |+| [VS Code + Copilot](https://code.visualstudio.com/) | ⭐⭐ | Microsoft official solution |+| [Claude Code](https://claude.ai/) | ⭐⭐ | Anthropic official CLI tool |> 💡 **AI Image Generation Tip**: For AI-generated images, we recommend generating them in [Gemini](https://gemini.google.com/) and selecting **Download full size** for higher resolution than Antigravity's direct generation. Gemini images have a star watermark in the bottom right corner, which can be removed using [gemini-watermark-remover](https://github.com/journey-ad/gemini-watermark-remover) or this project's `tools/gemini_watermark_remover.py`.@@ -62,23 +62,23 @@ AI (Strategist role): Sure, before we begin I need to complete eight confirmatio### Example Projects Overview-| Category | Project | Pages | Features |-|------|------|:----:|------|-| 🏢 **Consulting Style** | [Attachment in Psychotherapy](./examples/ppt169_顶级咨询风_心理治疗中的依恋/) | 32 | Top consulting style, largest scale example |-| | [Building Effective AI Agents](./examples/ppt169_顶级咨询风_构建有效AI代理_Anthropic/) | 15 | Anthropic engineering blog, AI Agent architecture |-| | [Chongqing Regional Report](./examples/ppt169_顶级咨询风_重庆市区域报告_ppt169_20251213/) | 20 | Regional fiscal analysis, Enterprise Alert data 🆕 |-| | [Ganzi Prefecture Economic Analysis](./examples/ppt169_顶级咨询风_甘孜州经济财政分析/) | 17 | Government fiscal analysis, Tibetan cultural elements |-| | [Nam Ou River Hydropower Strategic Assessment](./examples/ppt169_高端咨询风_南欧江水电站战略评估/) | 20 | "Basin Crisis" design language |-| | [Automotive Certification 5-Year Strategic Plan](./examples/ppt169_高端咨询风_汽车认证五年战略规划/) | 20 | McKinsey/BCG style |-| | [McKinsey Style Customer Loyalty](./examples/ppt169_麦肯锡风_kimsoong_customer_loyalty/) | 8 | Classic McKinsey MECE principles |-| | [Google Annual Work Report](./examples/ppt169_谷歌风_google_annual_report/) | 10 | Google brand design language |-| 🎨 **General Flexible** | [Debug Six-Step Method](./examples/ppt169_通用灵活+代码_debug六步法/) | 10 | Dark tech style |-| | [Chongqing University Thesis Format](./examples/ppt169_通用灵活+学术_重庆大学论文格式标准/) | 11 | Academic standards guide |-| | [AI Programming Tools Comparison](./examples/ppt169_通过灵活+代码_三大AI编程神器横向对比/) | 11 | Tech review style |-| ✨ **Creative Style** | [I Ching Qian Hexagram Study](./examples/ppt169_易理风_地山谦卦深度研究/) | 20 | I Ching aesthetics, Yin-Yang design |-| | [Diamond Sutra Chapter 1 Study](./examples/ppt169_禅意风_金刚经第一品研究/) | 15 | Zen academic, ink wash whitespace |-| | [Git Introduction Guide](./examples/ppt169_像素风_git_introduction/) | 10 | Pixel retro game style |-| | [PPT Master Introduction](./examples/demo_project_intro_ppt169_20251211/) | 10 | Fresh tech style |+| Category | Project | Pages | Features |+| ----------------------- | ---------------------------------------------------------------------------------------------------- | :---: | ----------------------------------------------------- |+| 🏢 **Consulting Style** | [Attachment in Psychotherapy](./examples/ppt169_顶级咨询风_心理治疗中的依恋/) | 32 | Top consulting style, largest scale example |+| | [Building Effective AI Agents](./examples/ppt169_顶级咨询风_构建有效AI代理_Anthropic/) | 15 | Anthropic engineering blog, AI Agent architecture |+| | [Chongqing Regional Report](./examples/ppt169_顶级咨询风_重庆市区域报告_ppt169_20251213/) | 20 | Regional fiscal analysis, Enterprise Alert data 🆕 |+| | [Ganzi Prefecture Economic Analysis](./examples/ppt169_顶级咨询风_甘孜州经济财政分析/) | 17 | Government fiscal analysis, Tibetan cultural elements |+| | [Nam Ou River Hydropower Strategic Assessment](./examples/ppt169_高端咨询风_南欧江水电站战略评估/) | 20 | "Basin Crisis" design language |+| | [Automotive Certification 5-Year Strategic Plan](./examples/ppt169_高端咨询风_汽车认证五年战略规划/) | 20 | McKinsey/BCG style |+| | [McKinsey Style Customer Loyalty](./examples/ppt169_麦肯锡风_kimsoong_customer_loyalty/) | 8 | Classic McKinsey MECE principles |+| | [Google Annual Work Report](./examples/ppt169_谷歌风_google_annual_report/) | 10 | Google brand design language |+| 🎨 **General Flexible** | [Debug Six-Step Method](./examples/ppt169_通用灵活+代码_debug六步法/) | 10 | Dark tech style |+| | [Chongqing University Thesis Format](./examples/ppt169_通用灵活+学术_重庆大学论文格式标准/) | 11 | Academic standards guide |+| | [AI Programming Tools Comparison](./examples/ppt169_通过灵活+代码_三大AI编程神器横向对比/) | 11 | Tech review style |+| ✨ **Creative Style** | [I Ching Qian Hexagram Study](./examples/ppt169_易理风_地山谦卦深度研究/) | 20 | I Ching aesthetics, Yin-Yang design |+| | [Diamond Sutra Chapter 1 Study](./examples/ppt169_禅意风_金刚经第一品研究/) | 15 | Zen academic, ink wash whitespace |+| | [Git Introduction Guide](./examples/ppt169_像素风_git_introduction/) | 10 | Pixel retro game style |+| | [PPT Master Introduction](./examples/demo_project_intro_ppt169_20251211/) | 10 | Fresh tech style |📖 [View Complete Examples Documentation](./examples/README.md)@@ -107,27 +107,27 @@ AI (Strategist role): Sure, before we begin I need to complete eight confirmatio<details><summary><b>📋 Table of Contents (Click to expand)</b></summary>-| Section | Link |-|------|------|-| 🚀 Quick Start Guide | [Jump](#-quick-start-guide) |-| 🎴 Featured Examples | [Jump](#-featured-examples) |-| Project Introduction | [Jump](#project-introduction) |-| Core Features | [Jump](#core-features) |-| System Architecture | [Jump](#system-architecture) |-| Roles | [Jump](#roles) |-| Getting Started | [Jump](#getting-started) |-| More Examples | [Jump](#more-examples) |-| Design Styles | [Jump](#design-styles) |+| Section | Link |+| ------------------------ | --------------------------------- |+| 🚀 Quick Start Guide | [Jump](#-quick-start-guide) |+| 🎴 Featured Examples | [Jump](#-featured-examples) |+| Project Introduction | [Jump](#project-introduction) |+| Core Features | [Jump](#core-features) |+| System Architecture | [Jump](#system-architecture) |+| Roles | [Jump](#roles) |+| Getting Started | [Jump](#getting-started) |+| More Examples | [Jump](#more-examples) |+| Design Styles | [Jump](#design-styles) || Technical Specifications | [Jump](#technical-specifications) |-| Project Structure | [Jump](#project-structure) |-| Best Practices | [Jump](#best-practices) |-| FAQ | [Jump](#faq) |-| Contributing Guide | [Jump](#contributing-guide) |-| Roadmap | [Jump](#roadmap) |-| 🛠️ Toolset | [Jump](#️-toolset) |-| 📄 License | [Jump](#-license) |-| 🙏 Acknowledgments | [Jump](#-acknowledgments) |-| 📮 Contact | [Jump](#-contact) |+| Project Structure | [Jump](#project-structure) |+| Best Practices | [Jump](#best-practices) |+| FAQ | [Jump](#faq) |+| Contributing Guide | [Jump](#contributing-guide) |+| Roadmap | [Jump](#roadmap) |+| 🛠️ Toolset | [Jump](#️-toolset) |+| 📄 License | [Jump](#-license) |+| 🙏 Acknowledgments | [Jump](#-acknowledgments) |+| 📮 Contact | [Jump](#-contact) |</details>@@ -171,15 +171,29 @@ User Input (PDF/URL/Markdown)├─ URL → web_to_md.py / web_to_md.cjs└─ MD → Direct read↓-[Strategist] - Eight Confirmations & Design Specifications+[Create Project Folder] project_manager.py init+ ↓+[Template Option] Ask user (workflow step, not Strategist's responsibility)+ │+ ├─ A) Use existing template → Copy to project templates/ → Proceed to Strategist+ ├─ B) No template → Proceed to Strategist+ └─ C) Generate new template → Proceed to Strategist (Template_Designer after outline)+ ↓+[Strategist] - Eight Confirmations & Design Specifications (Required, cannot skip)│- ├─ Image Method = "C) AI Generated"?+ ├─ Template Option = C (Generate new)?│ │- │ YES → [Image_Generator] - Generate images to images/+ │ YES → [Template_Designer] - Generate templates│ ││ NO ──────────────────────────────────────────┐- │ │- ▼ ▼+ │ │+ ├─ Image Method = "C) AI Generated"? │+ │ │ │+ │ YES → [Image_Generator] - Generate to images/│+ │ │ │+ │ NO ──────────────────────────────────────────┤+ │ │+ ▼ ▼[Executor_General / Executor_Consultant / Executor_Consultant_Top] - SVG Code Generation↓[Optimizer_CRAP] - Visual Optimization (Optional)@@ -191,7 +205,7 @@ Post-processing Tools (Auto-executed)└── svg_to_pptx.py → output.pptx (Export to PowerPoint + Embed speaker notes)```-> **Note**: Source content conversion is mandatory - tools must be called immediately upon detecting PDF/URL. Image_Generator is a sequential step, images must be collected before entering Executor phase.+> **Note**: Source content conversion is mandatory - tools must be called immediately upon detecting PDF/URL. Template option is a workflow step, not Strategist's responsibility. Image_Generator is a sequential step, images must be collected before entering Executor phase.### Complete Workflow Diagram@@ -211,10 +225,10 @@ graph TDsubgraph Preparation [Preparation Stage - Resources Prep]PDFConvert -- Native PDF --> PyMuPDF[pdf_to_md.py Local Conversion]:::toolPDFConvert -- Scanned/Complex Layout --> Mineru[MinerU Cloud AI Conversion]:::tool-+PyMuPDF -- Extract Text & Structure --> MD([Basic Markdown Document]):::artifactMineru -- Extract Text & Structure --> MD-+%% Image Processing Flowsubgraph ImageFlow [Image Resources]LocalImgs(Required Image Files) --> ImgFolder[Store in images/ folder]:::userAction@@ -235,19 +249,19 @@ graph TD%% Planning Stagesubgraph Planning [Planning Stage - Content & Design]Strategist[Role 1 Strategist: Content & Specifications]:::role-+%% Interactive ConfirmationStrategist -.-> Confirm1[Interactive Confirmation: 8 Key Elements]:::userActionConfirm1 -- Confirm Scope --> Strategist-+%% Notesnote1>Confirm: Image paths/Icon needs/Style] -.-> Confirm1-+Strategist --> SpecDoc([Design Specification & Content Outline]):::artifactendSpecDoc --> CheckImage{AI Generated Images?}-+%% Image Generation Stage (conditionally triggered)subgraph ImageGenStage [Image Generation Stage - Conditionally Triggered]CheckImage -- Yes --> ImageGen[Role 2 Image Generator]:::role@@ -262,11 +276,11 @@ graph TDSelectStyle -- General Flexible --> ExecGen[Role 3 General Executor]:::roleSelectStyle -- General Consulting --> ExecCon[Role 4 Consulting Executor]:::roleSelectStyle -- Top Consulting --> ExecTop[Role 4+ Top Consulting Executor]:::role-+ExecGen --> GenerateLoopExecCon --> GenerateLoopExecTop --> GenerateLoop-+GenerateLoop[Generate SVG Page by Page]:::userActionend@@ -277,9 +291,9 @@ graph TDCheckQA -- Yes --> Optimizer[Role 5 CRAP Optimizer]:::roleOptimizer --> OptimizedSVG([Optimized SVG]):::artifactOptimizedSVG --> CheckQA-+CheckQA -- No --> RawOutput[SVG Files svg_output/]:::artifact-+RawOutput --> ToolFinal[finalize_svg.py Finalization]:::toolToolFinal -- Embed images and icons --> FinalSVG[Final SVG svg_final/]:::artifactFinalSVG --> ToolPPT[svg_to_pptx.py PPTX Conversion]:::tool@@ -310,7 +324,6 @@ graph TD6. 🔣 **Icon Method**: A) Emoji B) AI Generated C) Built-in Icon Library D) Custom Path7. 🖼️ **Image Usage**: A) No images B) User provided C) AI Generated D) Placeholder reserved8. 📝 **Typography**: Font combination (P1-P5 preset or custom) + body font size baseline (14-20pt)-- **Template Options**: Provide three template strategies (use existing template / generate new template / no template)- **Intelligent Deconstruction**: Break down and reorganize source documents into clear page sequences- **Color Scheme**: Propose complete color scheme (primary, secondary, base tones)- **Layout Planning**: Plan page sequences and recommend layout solutions@@ -340,6 +353,7 @@ graph TD**Input**: Design Specification and Content Outline**Output**:+- 4 core template SVG files- Optional: Table of contents template- Saved to project `templates/` directory@@ -365,6 +379,7 @@ graph TD**Input**: Design specifications (with Image Resource List)**Output**:+- Optimized image prompts- Generated image files- Updated Image Resource List@@ -433,19 +448,16 @@ graph TD**Four Core Principles**:1. **Alignment**:-- Check and correct element alignment relationships- Create powerful invisible visual connection lines- Ensure every element has clear alignment relationship with others2. **Contrast**:-- Enhance visual hierarchy, highlight key information- Increase size, font weight or color differences- Create clear visual focus3. **Repetition**:-- Unify visual style of similar elements- Repeatedly use colors, fonts, rounded corners and other visual elements- Create organization and unity@@ -461,21 +473,20 @@ graph TD### Basic Workflow-1. **Prepare Source Document**-+1. **Prepare Source Document**+Convert raw reference materials to AI-readable format:-- | Step | Description |- |------|------|++ | Step | Description |+ | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- || 📄 **Document Conversion** | **Prefer** `python3 tools/pdf_to_md.py <PDF_file>` for local conversion (fast, free, privacy-safe). For scanned PDFs, complex multi-column layouts, or math formulas, use [MinerU](https://github.com/opendatalab/MinerU) cloud AI conversion |- | 🖼️ **Image Resources** | Store required images in the project's `images/` folder and add image descriptions in the Markdown |- | 🔣 **Icon Resources** | For custom icons, download from [SVG Repo](https://www.svgrepo.com/), or use the built-in 640+ icon library (`templates/icons/`) |-+ | 🖼️ **Image Resources** | Store required images in the project's `images/` folder and add image descriptions in the Markdown |+ | 🔣 **Icon Resources** | For custom icons, download from [SVG Repo](https://www.svgrepo.com/), or use the built-in 640+ icon library (`templates/icons/`) |+> 💡 **PDF Conversion Strategy**: PyMuPDF first (local, instant), MinerU as fallback (cloud AI). See [Tools Usage Guide](./tools/README.md)2. **Initial Communication (Eight Confirmations)**Conduct scope confirmation with Strategist, who will provide professional recommendations on these eight items:-1. **Canvas Format**: PPT/Xiaohongshu/WeChat Moments/Story, etc. (recommend based on usage scenario)2. **Page Count**: Suggest reasonable page count based on content volume analysis3. **Target Audience & Scenario**: Pre-judge based on document characteristics@@ -500,6 +511,7 @@ graph TDUse Optimizer_CRAP for CRAP principle optimization6. **Post-processing** (Recommended)+```bashpython3 tools/finalize_svg.py <project_path> # Execute all post-processing```@@ -607,11 +619,11 @@ I will analyze page 2 and apply CRAP principles:To ensure consistent results after PPT export, transparency must use standard notation:-| ❌ Prohibited | ✅ Correct |-|--------|--------|-| `fill="rgba(255,255,255,0.1)"` | `fill="#FFFFFF" fill-opacity="0.1"` |-| `<g opacity="0.2">...</g>` | Set transparency individually for each child element |-| `<image opacity="0.3"/>` | Add mask layer after image `<rect fill="background-color" opacity="0.7"/>` |+| ❌ Prohibited | ✅ Correct |+| ------------------------------ | -------------------------------------------------------------------------- |+| `fill="rgba(255,255,255,0.1)"` | `fill="#FFFFFF" fill-opacity="0.1"` |+| `<g opacity="0.2">...</g>` | Set transparency individually for each child element |+| `<image opacity="0.3"/>` | Add mask layer after image `<rect fill="background-color" opacity="0.7"/>` |> 📌 **Remember**: PPT doesn't recognize rgba, group opacity, or image opacity@@ -786,6 +798,7 @@ projects/```**Important Naming Rules**:+- Project folder name format: `{project_name}_{format}_{YYYYMMDD}`- format: `ppt169`, `ppt43`, `wechat`, `xiaohongshu`, `story`, etc.- Date uses 8-digit format, e.g., `20251116` for November 16, 2025@@ -954,6 +967,7 @@ python3 tools/finalize_svg.py <project_path>```**Processing Steps**:+1. Embed icons - Replace `<use data-icon="..."/>` with actual icons2. Fix image aspect ratio - Prevent image stretching when converting to shapes in PPT ✨3. Embed images - Convert external images to Base64@@ -1016,7 +1030,7 @@ But you must:Thanks to the following open source projects:- [SVG Repo](https://www.svgrepo.com/) - Beautiful open source icon library (640+ icons included in this project)-- [Robin Williams](https://en.wikipedia.org/wiki/Robin_Williams_(author)) - Creator of CRAP design principles+- [Robin Williams](<https://en.wikipedia.org/wiki/Robin_Williams_(author)>) - Creator of CRAP design principles- McKinsey, Boston Consulting, Bain and other top consulting firms - Design inspiration sources## 📮 Contactdiff --git a/docs/workflow_tutorial.md b/docs/workflow_tutorial.mdindex b3c8a030..edd1869a 100644--- a/docs/workflow_tutorial.md+++ b/docs/workflow_tutorial.md@@ -47,6 +47,22 @@│ │ (微信/高防站点用 node tools/web_to_md.cjs <URL>) │ ││ │ MD → 直接读取 │ ││ └──────────────────────────────────────────────────────────────────────┘ │+└─────────────────────────────────────────────────────────────────────────────┘+ │+ ▼+ ┌────────────────────────┐+ │ 创建项目文件夹 (必须) │+ │ project_manager.py init│+ └────────────┬───────────┘+ │+ ▼+┌─────────────────────────────────────────────────────────────────────────────┐+│ 模板选项 (三选一) - 流程步骤,非策略师职责 │+│ ┌──────────────────────────────────────────────────────────────────────┐ │+│ │ A) 使用已有模板 → 复制模板到项目 templates/ → 进入策略师 │ │+│ │ B) 不使用模板 → 进入策略师 │ │+│ │ C) 生成新模板 → 进入策略师(大纲完成后 Template_Designer 生成) │ │+│ └──────────────────────────────────────────────────────────────────────┘ │└─────────────────────────────────────────────────────────────────────────────┘│▼@@ -70,27 +86,15 @@│ ▼ ││ ┌────────────────────────┐ ││ │ 《设计规范与内容大纲》 │ │+│ │ 保存到项目文件夹 │ ││ └────────────────────────┘ │└─────────────────────────────────────────────────────────────────────────────┘│▼- ┌────────────────────────┐- │ 创建项目文件夹 (必须) │- │ project_manager.py init│- └────────────┬───────────┘- │- ▼- ┌────────────────────────┐- │ 保存设计规范到项目文件夹 │- └────────────┬───────────┘- │- ▼┌─────────────────────────────────────────────────────────────────────────────┐-│ 阶段 1.5: 模板选项 (三选一) │+│ 阶段 1.5: 模板生成 (仅模板选项 C 触发) ││ ┌──────────────────────────────────────────────────────────────────────┐ │-│ │ A) 使用已有模板 → 复制到项目 templates/ 目录 │ │-│ │ B) 生成新模板 → Template_Designer 生成模板 → 用户确认 │ │-│ │ C) 不使用模板 → 直接进入下一阶段 │ │+│ │ Template_Designer 生成模板 → 用户确认 → 保存到项目 templates/ │ ││ └──────────────────────────────────────────────────────────────────────┘ │└─────────────────────────────────────────────────────────────────────────────┘│diff --git a/roles/README.md b/roles/README.mdindex cdf47a3c..8fec17f7 100644--- a/roles/README.md+++ b/roles/README.md@@ -26,16 +26,22 @@```用户输入文档↓-[策略师 Strategist]- ↓ 生成《设计规范与内容大纲》+[创建项目文件夹] project_manager.py init+ ↓+[模板选项] 询问用户选择(流程步骤,非策略师职责)+ │+ ├─ A) 使用已有模板 → 复制模板到项目 templates/ → 进入策略师+ ├─ B) 不使用模板 → 进入策略师+ └─ C) 生成新模板 → 进入策略师(大纲完成后调用 Template_Designer)↓- ├─ 模板选项(三选一)+[策略师 Strategist](八项确认必须完成,不可跳过)+ ↓ 生成《设计规范与内容大纲》+ │+ ├─ 模板选项 = C(生成新模板)?│ │- │ A) 使用已有模板 → 复制到项目 templates/- │ B) 生成新模板 → [Template_Designer] 模板设计师- │ C) 不使用模板 → 直接进入下一阶段- │ │- ├───────────────────────────────────────────┤+ │ YES → [Template_Designer] 模板设计师+ │ │+ │ NO ─────────────────────────────────┤│ │├─ 图片方式包含「C) AI 生成」? ││ │ │@@ -86,7 +92,6 @@ SVG 文件 (svg_output/)**核心能力**:- **初始沟通**: 完成八项确认(画布格式、页数、受众场景、风格、配色、图标、图片、排版)-- **模板选项**: 提供三种模板策略(使用已有模板 / 生成新模板 / 不使用模板)- 智能解构源文档内容- 确定设计风格(通用灵活 / 一般咨询 / 顶级咨询)- 制定完整的色彩方案diff --git a/roles/Strategist.md b/roles/Strategist.mdindex 9ea4664f..6772197b 100644--- a/roles/Strategist.md+++ b/roles/Strategist.md@@ -259,51 +259,40 @@ projects/<项目名>_<格式>_<YYYYMMDD>/设计规范与内容大纲.md## 4. 完成设计规范并提示下一步-完成设计规范输出后,**先询问模板选项**,再根据图片使用选择提示下一步。+完成设计规范输出后,根据**已确认的模板选项**和图片使用选择提示下一步。-### 4.1 询问模板选项(必须)+> **注意**:模板选项(A 使用已有 / B 不使用 / C 生成新模板)在流程启动时已确认,策略师根据该选项决定后续流程。-```-✅ 设计规范已完成并保存到项目文件夹。--**模板选项**(三选一):-模板可以确保页面风格统一,请选择您的模板策略:--A) **使用已有模板** - 使用现有的模板文件- └→ 适合:已有模板资源、快速启动- └→ 来源:用户自备模板 或 参考 templates/layouts/ 示例库+### 4.1 根据模板选项提示下一步-B) **生成新模板** - 由 Template_Designer 根据设计规范全新生成- └→ 适合:需要定制化风格、品牌个性化设计- └→ 将生成封面、目录页、章节页、内容页、结束页等模板+#### 模板选项 A(使用已有模板)-C) **不使用模板** - Executor 根据设计规范自由生成每一页- └→ 适合:页面较少、布局差异大、简单快速生成+如果用户在流程开始时选择了「A) 使用已有模板」且模板已复制到项目 `templates/` 目录:-推荐: [根据项目复杂度和页数给出建议]```+✅ 设计规范已完成。模板已就绪。-### 4.2 根据选择提示下一步+**下一步**: [根据图片选项决定]+- 图片包含 AI 生成 → 调用 Image_Generator+- 图片不包含 AI 生成 → 调用 Executor+```-#### 选择 A(使用已有模板)+#### 模板选项 B(不使用模板)```-**下一步**: 将已有模板复制到项目 `templates/` 目录。--模板来源:-- 用户自备模板(从其他项目或外部来源获取)-- 参考示例库:templates/layouts/[general|consultant|consultant_top]/+✅ 设计规范已完成。-操作:-1. 将模板文件复制到项目 `templates/` 目录-2. 根据【设计规范】调整模板配色和文字-3. [后续流程...]+**下一步**: [根据图片选项决定]+- 图片包含 AI 生成 → 调用 Image_Generator+- 图片不包含 AI 生成 → 调用 Executor(自由生成每一页)```-#### 选择 B(生成新模板)+#### 模板选项 C(生成新模板)```-**下一步**: 请调用 **Template_Designer** 角色生成页面模板。+✅ 设计规范已完成。++**下一步**: 调用 **Template_Designer** 角色生成页面模板。模板将包含:- 01_cover.svg - 封面模板@@ -315,39 +304,24 @@ C) **不使用模板** - Executor 根据设计规范自由生成每一页模板生成并确认后,再进入后续流程。```-#### 选择 C(不使用模板)+ 图片不包含 C--```-**下一步**: 请调用 Executor 角色开始生成 SVG。-推荐的 Executor: [根据风格选择 Executor_General / Executor_Consultant / Executor_Consultant_Top]-```--#### 选择 C(不使用模板)+ 图片包含 C--```-您选择了不使用模板,但包含 AI 生成图片。--**下一步**: 请调用 **Image_Generator** 角色完成图片生成。-图片资源清单中有 X 张图片待生成。--图片归集到 images/ 目录后,再调用 Executor 角色生成 SVG。-Executor 将根据《设计规范》自由生成每一页,无模板约束。-```-### 工作流位置+> 策略师在模板选项确认之后执行,负责八项确认和设计规范生成。+```-Strategist (本角色)+创建项目文件夹│- ├─ 模板选项(三选一)- │ │- │ A) 使用已有模板 → 从 templates/layouts/ 复制 → 项目 templates/+ ▼+询问模板选项(流程步骤,非策略师职责)+ │+ ▼+Strategist (本角色) ← 八项确认 + 设计规范+ │+ ├─ 模板选项 = C(生成新模板)?│ │- │ B) 生成新模板 → Template_Designer → 项目 templates/+ │ YES → Template_Designer → 项目 templates/│ │- │ C) 不使用模板 → 直接进入下一阶段- │ │- ├───────────────────────────────────────────────┤+ │ NO ─────────────────────────────────────┤│ │├─ 图片方式包含「C) AI 生成」? ││ │ │diff --git a/roles/Template_Designer.md b/roles/Template_Designer.mdindex a5d6db7e..1f52a47a 100644--- a/roles/Template_Designer.md+++ b/roles/Template_Designer.md@@ -140,13 +140,20 @@ projects/<项目名>_<格式>_<日期>/## 使用预置模板库(可选)-如果 `templates/layouts/` 中存在适合的预置模板,可以:+如果已有适合的模板资源,可以直接使用而非生成新模板。模板来源包括:-1. **复制预置模板**: 将预置模板复制到项目 `templates/` 目录+1. **用户自备模板**: 已有的模板文件+2. **其他项目模板**: 从现有项目复制+3. **外部来源模板**: 网络下载、设计师提供等+4. **示例库参考**: `templates/layouts/` 目录下的预置模板++**使用步骤**:++1. **复制模板**: 将模板文件复制到项目 `templates/` 目录2. **调整配色**: 根据项目设计规范修改颜色3. **自定义修改**: 根据项目特点进行个性化调整-**预置模板库结构**:+**示例库结构**(仅供参考):```templates/layouts/diff --git a/templates/README.md b/templates/README.mdindex b199b2a3..7efd0a0a 100644--- a/templates/README.md+++ b/templates/README.md@@ -1,5 +1,27 @@# 模板资源+++## 📝 设计规范与大纲参考++`design_spec_reference.md` 是一个全能型的参考模板,用于定义项目的:+1. **视觉规范**:画布尺寸、配色方案、字体字号、布局原则+2. **内容大纲**:具体的页面结构规划(Slide by Slide)+3. **技术约束**:SVG 生成和 PPT 兼容性的硬性要求++[查看设计规范与大纲参考](./design_spec_reference.md)++## 📄 页面布局模板++`layouts/` 目录包含预置的页面布局模板,按设计风格分类:++- **General**: 通用灵活风格,现代简洁+- **Consultant**: 咨询风格,专业严谨+- **Consultant Top**: 顶级咨询风格(MBB级)+- **Academic Defense**: 学术答辩风格,专业科研(新增 ✨)++[查看布局模板说明](./layouts/README.md)+## 📊 图表模板`charts/` 目录包含 13 种常用图表模板:diff --git a/templates/layouts/README.md b/templates/layouts/README.mdindex 0f75edfe..4be6791e 100644--- a/templates/layouts/README.md+++ b/templates/layouts/README.md@@ -8,7 +8,8 @@templates/layouts/├── general/ # 通用灵活风格├── consultant/ # 咨询风格-└── consultant_top/ # 顶级咨询风格(MBB级)+├── consultant_top/ # 顶级咨询风格(MBB级)+└── academic_defense/ # 学术答辩风格```## 4 个核心模板 + 1 个可选模板@@ -27,11 +28,12 @@ templates/layouts/## 风格特点-| 风格 | 配色 | 特点 |-| ------------------ | -------------------------- | ---------------------------- |-| **general** | 深蓝渐变 + 靛蓝紫 | 现代简洁,适合商业演示 |-| **consultant** | 深蓝 + 金色线 + 左侧装饰条 | 专业严谨,咨询报告风格 |-| **consultant_top** | 渐变顶条 + 网格 + 金色点缀 | MBB级,核心观点区 + 机密标识 |+| 风格 | 配色 | 特点 |+| -------------------- | -------------------------- | ---------------------------- |+| **general** | 深蓝渐变 + 靛蓝紫 | 现代简洁,适合商业演示 |+| **consultant** | 深蓝 + 金色线 + 左侧装饰条 | 专业严谨,咨询报告风格 |+| **consultant_top** | 渐变顶条 + 网格 + 金色点缀 | MBB级,核心观点区 + 机密标识 |+| **academic_defense** | 深蓝 + 红色装饰 + 清晰层次 | 专业学术,适合毕业答辩/汇报 |## 占位符规范@@ -59,9 +61,21 @@ templates/layouts/## 使用方式-Template_Designer 角色可从此处复制模板到项目 `templates/` 目录,并根据设计规范调整配色。+用户选择「A) 使用已有模板」时,可从以下来源获取模板:++1. **用户自备模板**: 已有的模板文件+2. **其他项目模板**: 从现有项目复制+3. **外部来源模板**: 网络下载、设计师提供等+4. **本示例库**: 从此目录复制(如下所示)++**从示例库复制**:```bash# 复制通用风格模板到项目cp templates/layouts/general/* projects/<项目>/templates/++# 复制咨询风格模板到项目+cp templates/layouts/consultant/* projects/<项目>/templates/```++复制后根据项目《设计规范》调整配色和文字。diff --git a/templates/layouts/academic_defense/01_cover.svg b/templates/layouts/academic_defense/01_cover.svgnew file mode 100644index 00000000..602ae7e7--- /dev/null+++ b/templates/layouts/academic_defense/01_cover.svg@@ -0,0 +1,49 @@+<?xml version="1.0" encoding="UTF-8"?>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <!-- 背景 -->+ <rect width="1280" height="720" fill="#FFFFFF"/>++ <!-- ==================== 顶部装饰区域 ==================== -->+ <!-- 深蓝色主横条 -->+ <rect x="0" y="0" width="1280" height="120" fill="#003366"/>+ <!-- 左侧红色竖条装饰 -->+ <rect x="0" y="0" width="6" height="120" fill="#CC0000"/>++ <!-- 右上角 Logo 区域占位 -->+ <rect x="1080" y="30" width="160" height="60" fill="none" stroke="#FFFFFF" stroke-width="1" stroke-opacity="0.3" rx="4"/>+ <text x="1160" y="68" text-anchor="middle" fill="#FFFFFF" font-family="Microsoft YaHei, Arial, sans-serif" font-size="18" font-weight="bold">+ {{LOGO}}+ </text>++ <!-- ==================== 主内容区域 ==================== -->+ <!-- 主标题 -->+ <text x="640" y="320" text-anchor="middle" fill="#003366" font-family="Microsoft YaHei, Arial, sans-serif" font-size="48" font-weight="bold">+ {{TITLE}}+ </text>++ <!-- 副标题 -->+ <text x="640" y="380" text-anchor="middle" fill="#666666" font-family="Microsoft YaHei, Arial, sans-serif" font-size="24">+ {{SUBTITLE}}+ </text>++ <!-- 装饰分割线 -->+ <line x1="440" y1="420" x2="840" y2="420" stroke="#0066CC" stroke-width="2"/>+ <circle cx="640" cy="420" r="4" fill="#0066CC"/>++ <!-- ==================== 答辩人信息区域 ==================== -->+ <text x="640" y="500" text-anchor="middle" fill="#333333" font-family="Microsoft YaHei, Arial, sans-serif" font-size="20">+ 答辩人:{{AUTHOR}}+ </text>+ <text x="640" y="540" text-anchor="middle" fill="#666666" font-family="Microsoft YaHei, Arial, sans-serif" font-size="18">+ 指导老师:{{ADVISOR}}+ </text>+ <text x="640" y="580" text-anchor="middle" fill="#666666" font-family="Microsoft YaHei, Arial, sans-serif" font-size="16">+ {{INSTITUTION}}+ </text>++ <!-- ==================== 底部信息 ==================== -->+ <rect x="0" y="660" width="1280" height="60" fill="#F5F7FA"/>+ <text x="640" y="695" text-anchor="middle" fill="#999999" font-family="Microsoft YaHei, Arial, sans-serif" font-size="14">+ {{DATE}}+ </text>+</svg>diff --git a/templates/layouts/academic_defense/02_chapter.svg b/templates/layouts/academic_defense/02_chapter.svgnew file mode 100644index 00000000..aab6fb82--- /dev/null+++ b/templates/layouts/academic_defense/02_chapter.svg@@ -0,0 +1,36 @@+<?xml version="1.0" encoding="UTF-8"?>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <!-- 背景:全屏深蓝,营造过渡感和沉浸感 -->+ <rect width="1280" height="720" fill="#003366"/>++ <!-- 背景装饰:右侧几何图形,增加层次 -->+ <path d="M800 0 L1280 0 L1280 720 L600 720 Z" fill="#004080" fill-opacity="0.3"/>+ <rect x="1200" y="0" width="80" height="720" fill="#002244" fill-opacity="0.2"/>++ <!-- 左侧红色装饰条 -->+ <rect x="0" y="240" width="12" height="240" fill="#CC0000"/>++ <!-- ==================== 章节信息区域 ==================== -->+ <!-- 章节编号:超大号数字,半透明背景字 -->+ <text x="160" y="480" fill="#FFFFFF" fill-opacity="0.1" font-family="Microsoft YaHei, Arial, sans-serif" font-size="400" font-weight="bold">+ {{CHAPTER_NUM}}+ </text>++ <!-- 章节标题:醒目白色 -->+ <text x="400" y="340" fill="#FFFFFF" font-family="Microsoft YaHei, Arial, sans-serif" font-size="64" font-weight="bold">+ {{CHAPTER_TITLE}}+ </text>++ <!-- 章节描述/摘要:浅灰色 -->+ <text x="400" y="420" fill="#E8F4FC" font-family="Microsoft YaHei, Arial, sans-serif" font-size="28">+ {{CHAPTER_DESC}}+ </text>++ <!-- 装饰线条 -->+ <line x1="400" y1="260" x2="500" y2="260" stroke="#CC0000" stroke-width="6"/>++ <!-- 底部信息 -->+ <text x="1240" y="680" text-anchor="end" fill="#FFFFFF" fill-opacity="0.4" font-family="Microsoft YaHei, Arial, sans-serif" font-size="16">+ {{TITLE}}+ </text>+</svg>diff --git a/templates/layouts/academic_defense/02_toc.svg b/templates/layouts/academic_defense/02_toc.svgnew file mode 100644index 00000000..02fbc748--- /dev/null+++ b/templates/layouts/academic_defense/02_toc.svg@@ -0,0 +1,63 @@+<?xml version="1.0" encoding="UTF-8"?>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <!-- 背景 -->+ <rect width="1280" height="720" fill="#FFFFFF"/>++ <!-- ==================== 页眉区域 ==================== -->+ <rect x="0" y="0" width="1280" height="60" fill="#003366"/>+ <rect x="0" y="0" width="6" height="60" fill="#CC0000"/>++ <!-- 页面标题 -->+ <text x="40" y="40" fill="#FFFFFF" font-family="Microsoft YaHei, Arial, sans-serif" font-size="24" font-weight="bold">+ 目 录+ </text>++ <!-- 右上角 Logo -->+ <text x="1200" y="40" text-anchor="end" fill="#FFFFFF" font-family="Microsoft YaHei, Arial, sans-serif" font-size="16" font-weight="bold">+ {{LOGO}}+ </text>++ <!-- ==================== 目录内容区域 ==================== -->+ <!-- 目录项容器 -->+ <rect x="80" y="100" width="1120" height="520" fill="none"/>++ <!-- 目录项 01 -->+ <rect x="80" y="120" width="520" height="80" fill="#E8F4FC" rx="8"/>+ <rect x="80" y="120" width="6" height="80" fill="#003366" rx="3"/>+ <text x="120" y="155" fill="#003366" font-family="Microsoft YaHei, Arial, sans-serif" font-size="32" font-weight="bold">01</text>+ <text x="180" y="155" fill="#003366" font-family="Microsoft YaHei, Arial, sans-serif" font-size="20" font-weight="bold">{{TOC_ITEM_1_TITLE}}</text>+ <text x="120" y="180" fill="#666666" font-family="Microsoft YaHei, Arial, sans-serif" font-size="14">{{TOC_ITEM_1_DESC}}</text>++ <!-- 目录项 02 -->+ <rect x="680" y="120" width="520" height="80" fill="#E8F4FC" rx="8"/>+ <rect x="680" y="120" width="6" height="80" fill="#003366" rx="3"/>+ <text x="720" y="155" fill="#003366" font-family="Microsoft YaHei, Arial, sans-serif" font-size="32" font-weight="bold">02</text>+ <text x="780" y="155" fill="#003366" font-family="Microsoft YaHei, Arial, sans-serif" font-size="20" font-weight="bold">{{TOC_ITEM_2_TITLE}}</text>+ <text x="720" y="180" fill="#666666" font-family="Microsoft YaHei, Arial, sans-serif" font-size="14">{{TOC_ITEM_2_DESC}}</text>++ <!-- 目录项 03 -->+ <rect x="80" y="240" width="520" height="80" fill="#E8F4FC" rx="8"/>+ <rect x="80" y="240" width="6" height="80" fill="#0066CC" rx="3"/>+ <text x="120" y="275" fill="#003366" font-family="Microsoft YaHei, Arial, sans-serif" font-size="32" font-weight="bold">03</text>+ <text x="180" y="275" fill="#003366" font-family="Microsoft YaHei, Arial, sans-serif" font-size="20" font-weight="bold">{{TOC_ITEM_3_TITLE}}</text>+ <text x="120" y="300" fill="#666666" font-family="Microsoft YaHei, Arial, sans-serif" font-size="14">{{TOC_ITEM_3_DESC}}</text>++ <!-- 目录项 04 -->+ <rect x="680" y="240" width="520" height="80" fill="#E8F4FC" rx="8"/>+ <rect x="680" y="240" width="6" height="80" fill="#0066CC" rx="3"/>+ <text x="720" y="275" fill="#003366" font-family="Microsoft YaHei, Arial, sans-serif" font-size="32" font-weight="bold">04</text>+ <text x="780" y="275" fill="#003366" font-family="Microsoft YaHei, Arial, sans-serif" font-size="20" font-weight="bold">{{TOC_ITEM_4_TITLE}}</text>+ <text x="720" y="300" fill="#666666" font-family="Microsoft YaHei, Arial, sans-serif" font-size="14">{{TOC_ITEM_4_DESC}}</text>++ <!-- 目录项 05(可选) -->+ <rect x="80" y="360" width="520" height="80" fill="none" stroke="#D0D7E0" stroke-width="1" stroke-dasharray="4,4" rx="8"/>+ <text x="300" y="405" text-anchor="middle" fill="#999999" font-family="Microsoft YaHei, Arial, sans-serif" font-size="14">{{TOC_ITEM_5}}</text>++ <!-- 目录项 06(可选) -->+ <rect x="680" y="360" width="520" height="80" fill="none" stroke="#D0D7E0" stroke-width="1" stroke-dasharray="4,4" rx="8"/>+ <text x="900" y="405" text-anchor="middle" fill="#999999" font-family="Microsoft YaHei, Arial, sans-serif" font-size="14">{{TOC_ITEM_6}}</text>++ <!-- ==================== 页脚区域 ==================== -->+ <line x1="40" y1="670" x2="1240" y2="670" stroke="#E8F4FC" stroke-width="1"/>+ <text x="1220" y="700" text-anchor="end" fill="#999999" font-family="Microsoft YaHei, Arial, sans-serif" font-size="12">{{PAGE_NUM}}</text>+</svg>diff --git a/templates/layouts/academic_defense/03_content.svg b/templates/layouts/academic_defense/03_content.svgnew file mode 100644index 00000000..fd92a281--- /dev/null+++ b/templates/layouts/academic_defense/03_content.svg@@ -0,0 +1,58 @@+<?xml version="1.0" encoding="UTF-8"?>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <!-- 背景 -->+ <rect width="1280" height="720" fill="#FFFFFF"/>++ <!-- ==================== 页眉区域 ==================== -->+ <!-- 深蓝色页眉背景 -->+ <rect x="0" y="0" width="1280" height="60" fill="#003366"/>+ <!-- 左侧红色竖条装饰 -->+ <rect x="0" y="0" width="6" height="60" fill="#CC0000"/>++ <!-- 章节编号 + 页面标题 -->+ <text x="40" y="40" fill="#FFFFFF" font-family="Microsoft YaHei, Arial, sans-serif" font-size="24" font-weight="bold">+ {{SECTION_NUM}} {{PAGE_TITLE}}+ </text>++ <!-- 右上角 Logo -->+ <rect x="1100" y="15" width="140" height="30" fill="none"/>+ <text x="1220" y="40" text-anchor="end" fill="#FFFFFF" font-family="Microsoft YaHei, Arial, sans-serif" font-size="16" font-weight="bold">+ {{LOGO}}+ </text>++ <!-- ==================== 核心观点条(可选) ==================== -->+ <rect x="0" y="60" width="1280" height="55" fill="#E8F4FC"/>+ <rect x="0" y="60" width="6" height="55" fill="#0066CC"/>+ <text x="40" y="95" fill="#333333" font-family="Microsoft YaHei, Arial, sans-serif" font-size="16">+ {{KEY_MESSAGE}}+ </text>++ <!-- ==================== 内容区域 ==================== -->+ <!--+ AI 灵活布局区+ 可用空间: x=40, y=130, width=1200, height=520+ AI 根据实际内容自由安排布局(单栏、双栏、图文混排等)+ -->+ <rect x="40" y="130" width="1200" height="520" fill="#FFFFFF" rx="4"/>+ <rect x="40" y="130" width="1200" height="520" fill="none" stroke="#D0D7E0" stroke-width="1" rx="4" stroke-dasharray="8,4"/>+ <text x="640" y="400" text-anchor="middle" fill="#CBD5E1" font-family="Microsoft YaHei, Arial, sans-serif" font-size="14">+ {{CONTENT_AREA}}+ </text>++ <!-- 内容区域说明(仅模板展示用,实际生成时替换) -->+ <text x="640" y="430" text-anchor="middle" fill="#CBD5E1" font-family="Microsoft YaHei, Arial, sans-serif" font-size="12">+ 可用布局:单栏、双栏、图文混排、卡片网格、时间线等+ </text>++ <!-- ==================== 页脚区域 ==================== -->+ <line x1="40" y1="670" x2="1240" y2="670" stroke="#E8F4FC" stroke-width="1"/>+ <text x="40" y="700" fill="#999999" font-family="Microsoft YaHei, Arial, sans-serif" font-size="10">+ 数据来源:{{SOURCE}}+ </text>+ <text x="640" y="700" text-anchor="middle" fill="#999999" font-family="Microsoft YaHei, Arial, sans-serif" font-size="10">+ {{SECTION_NAME}}+ </text>+ <text x="1220" y="700" text-anchor="end" fill="#666666" font-family="Microsoft YaHei, Arial, sans-serif" font-size="12">+ {{PAGE_NUM}}+ </text>+</svg>diff --git a/templates/layouts/academic_defense/04_ending.svg b/templates/layouts/academic_defense/04_ending.svgnew file mode 100644index 00000000..d3e5ae87--- /dev/null+++ b/templates/layouts/academic_defense/04_ending.svg@@ -0,0 +1,52 @@+<?xml version="1.0" encoding="UTF-8"?>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <!-- 背景 -->+ <rect width="1280" height="720" fill="#FFFFFF"/>++ <!-- ==================== 顶部装饰区域 ==================== -->+ <rect x="0" y="0" width="1280" height="120" fill="#003366"/>+ <rect x="0" y="0" width="6" height="120" fill="#CC0000"/>++ <!-- 右上角 Logo -->+ <text x="1200" y="70" text-anchor="end" fill="#FFFFFF" font-family="Microsoft YaHei, Arial, sans-serif" font-size="18" font-weight="bold">+ {{LOGO}}+ </text>++ <!-- ==================== 主内容区域 ==================== -->+ <!-- 感谢语 -->+ <text x="640" y="300" text-anchor="middle" fill="#003366" font-family="Microsoft YaHei, Arial, sans-serif" font-size="56" font-weight="bold">+ {{THANK_YOU}}+ </text>++ <!-- 副标语 -->+ <text x="640" y="360" text-anchor="middle" fill="#666666" font-family="Microsoft YaHei, Arial, sans-serif" font-size="20">+ {{TAGLINE}}+ </text>++ <!-- 装饰分割线 -->+ <line x1="480" y1="400" x2="800" y2="400" stroke="#0066CC" stroke-width="2"/>+ <circle cx="640" cy="400" r="4" fill="#CC0000"/>++ <!-- ==================== 联系信息区域 ==================== -->+ <rect x="400" y="440" width="480" height="120" fill="#F5F7FA" rx="8"/>++ <!-- 联系方式 -->+ <text x="640" y="480" text-anchor="middle" fill="#333333" font-family="Microsoft YaHei, Arial, sans-serif" font-size="16">+ {{CONTACT_INFO}}+ </text>+ <text x="640" y="510" text-anchor="middle" fill="#666666" font-family="Microsoft YaHei, Arial, sans-serif" font-size="14">+ {{EMAIL}}+ </text>+ <text x="640" y="540" text-anchor="middle" fill="#666666" font-family="Microsoft YaHei, Arial, sans-serif" font-size="14">+ {{INSTITUTION}}+ </text>++ <!-- ==================== 底部信息 ==================== -->+ <rect x="0" y="660" width="1280" height="60" fill="#F5F7FA"/>+ <text x="640" y="695" text-anchor="middle" fill="#999999" font-family="Microsoft YaHei, Arial, sans-serif" font-size="12">+ {{COPYRIGHT}}+ </text>+ <text x="1220" y="695" text-anchor="end" fill="#999999" font-family="Microsoft YaHei, Arial, sans-serif" font-size="12">+ {{PAGE_NUM}}+ </text>+</svg>diff --git a/templates/layouts/academic_defense/design_spec.md b/templates/layouts/academic_defense/design_spec.mdnew file mode 100644index 00000000..50d86362--- /dev/null+++ b/templates/layouts/academic_defense/design_spec.md@@ -0,0 +1,246 @@+# 学术答辩风格 (Academic Defense) - 设计规范++> 适用于学术论文答辩、研究汇报、毕业设计展示等场景。++---++## 一、风格概述++| 属性 | 描述 |+| ------------------ | ------------------------------------------ |+| **风格名称** | academic_defense(学术答辩风格) |+| **适用场景** | 毕业答辩、学术汇报、研究进展报告、课题申请 |+| **设计调性** | 专业、严谨、科研感、清晰层次 |+| **主题模式** | 亮色主题(白色背景 + 深蓝标题条) |++---++## 二、画布规范++| 属性 | 值 |+| -------------------- | ---------------------------------------- |+| **格式** | 标准 16:9 |+| **尺寸** | 1280 × 720 px |+| **viewBox** | `0 0 1280 720` |+| **页面边距** | 左右 40px,上 0px(顶部标题条),下 30px |+| **内容安全区** | x: 40-1240, y: 80-690 |++---++## 三、配色方案++### 主色系++| 角色 | 色值 | RGB | 用途 |+| ------------------ | ----------- | --------------- | ---------------------------- |+| **主导深蓝** | `#003366` | (0, 51, 102) | 页眉背景、章节标题、主要标题 |+| **辅助蓝** | `#0066CC` | (0, 102, 204) | 卡片边框、图标、次级装饰 |+| **强调红** | `#CC0000` | (204, 0, 0) | 重点高亮、关键词强调 |+| **浅蓝灰** | `#E8F4FC` | (232, 244, 252) | 核心观点背景条、卡片内区块 |++### 中性色++| 角色 | 色值 | 用途 |+| ---------------- | ----------- | -------------------- |+| **背景白** | `#FFFFFF` | 页面主背景 |+| **卡片灰** | `#F5F7FA` | 卡片内背景、信息区块 |+| **边框灰** | `#D0D7E0` | 卡片边框、分割线 |+| **正文黑** | `#333333` | 主要正文文字 |+| **次要灰** | `#666666` | 说明文字、标注 |+| **弱灰** | `#999999` | 页脚、辅助信息 |++### 辅助标识色++| 角色 | 色值 | 用途 |+| ---------------- | ----------- | ------------------ |+| **成功绿** | `#28A745` | 正向指标、完成状态 |+| **警示橙** | `#FFA500` | 提醒、中等优先级 |+| **信息蓝** | `#17A2B8` | 信息提示、引用 |++---++## 四、排版体系++### 字体方案++| 角色 | 中文字体 | 英文字体 | 回退字体 |+| -------------- | ------------- | ---------- | ---------- |+| **标题** | 微软雅黑 Bold | Arial Bold | sans-serif |+| **正文** | 微软雅黑 | Arial | sans-serif |+| **强调** | 微软雅黑 Bold | Arial Bold | sans-serif |+| **数据** | - | Arial | Consolas |++**字体栈**: `"Microsoft YaHei", "微软雅黑", Arial, "Helvetica Neue", sans-serif`++### 字号层级++> 基准:正文 = 16pt++| 层级 | 用途 | 字号 | 字重 | 行高 |+| ----- | ------------------- | ---- | ------- | ---- |+| H1 | 封面主标题 | 48pt | Bold | 1.2 |+| H2 | 章节标题 / 页面标题 | 28pt | Bold | 1.3 |+| H3 | 卡片标题 / 小节标题 | 20pt | Bold | 1.4 |+| H4 | 标签 / 强调文字 | 16pt | Bold | 1.4 |+| P | 正文内容 | 16pt | Regular | 1.6 |+| Small | 注释 / 来源 | 12pt | Regular | 1.5 |+| XS | 页码 / 版权 | 10pt | Regular | 1.4 |++---++## 五、页面结构++### 通用结构++```+┌─────────────────────────────────────────────────────────┐+│ ▌章节编号 + 页面标题 [Logo区域] │ ← 页眉 (0-60)+├─────────────────────────────────────────────────────────┤+│ │+│ ┌─────────────────────────────────────────────────┐ │+│ │ 核心观点/摘要区域(可选) │ │ ← 观点条 (60-115)+│ └─────────────────────────────────────────────────┘ │+│ │+│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │+│ │ │ │ │ │ │ │+│ │ 内容卡片 │ │ 内容卡片 │ │ 内容卡片 │ │ ← 内容区 (115-670)+│ │ │ │ │ │ │ │+│ └──────────────┘ └──────────────┘ └──────────────┘ │+│ │+├─────────────────────────────────────────────────────────┤+│ [页脚信息] [页码/导航] │ ← 页脚 (670-720)+└─────────────────────────────────────────────────────────┘+```++### 页眉设计++- **背景**:深蓝色 `#003366` 横条,高度 60px+- **章节编号**:白色粗体,格式如 `1.1`、`3.2`+- **页面标题**:白色粗体,与编号间隔 1em+- **右上角**:品牌 Logo(像素答辩图标 + 文字)+- **装饰**:红色竖条 4px 宽,位于最左侧++### 核心观点条(可选)++- **背景**:浅蓝灰 `#E8F4FC`+- **高度**:55px+- **内边距**:左右 40px+- **文字**:正文黑 `#333333`,重点词用红色 `#CC0000` 加下划线++### 内容卡片++- **边框**:辅助蓝 `#0066CC`,1px 实线+- **圆角**:8px+- **内边距**:20px+- **标题区**:+ - 蓝底白字标签 `#0066CC`,圆角 4px+ - 或左侧 4px 蓝色竖条 + 深蓝标题文字+- **内容区**:白色或浅灰 `#F5F7FA` 背景++---++## 六、组件规范++### 1. 标签 (Tag)++```xml+<!-- 蓝底白字标签 -->+<rect x="40" y="150" width="80" height="28" fill="#0066CC" rx="4"/>+<text x="80" y="170" text-anchor="middle" fill="#FFFFFF" font-size="14" font-weight="bold">内容详解</text>++<!-- 红底白字标签(强调) -->+<rect x="40" y="150" width="80" height="28" fill="#CC0000" rx="4"/>+<text x="80" y="170" text-anchor="middle" fill="#FFFFFF" font-size="14" font-weight="bold">核心目标</text>+```++### 2. 流程箭头++```xml+<!-- 水平流程箭头 -->+<line x1="200" y1="300" x2="350" y2="300" stroke="#0066CC" stroke-width="2"/>+<polygon points="350,295 360,300 350,305" fill="#0066CC"/>+<text x="275" y="290" text-anchor="middle" fill="#0066CC" font-size="12">→</text>+```++### 3. 时间轴++```xml+<!-- 时间轴节点 -->+<circle cx="100" cy="400" r="8" fill="#0066CC"/>+<text x="100" y="430" text-anchor="middle" fill="#333333" font-size="14" font-weight="bold">2018</text>+<line x1="108" y1="400" x2="192" y2="400" stroke="#0066CC" stroke-width="2"/>+```++### 4. 数据高亮框++```xml+<!-- 重要数据区块 -->+<rect x="40" y="400" width="200" height="80" fill="#FFFFFF" stroke="#CC0000" stroke-width="2" rx="8"/>+<text x="140" y="445" text-anchor="middle" fill="#CC0000" font-size="24" font-weight="bold">30%</text>+<text x="140" y="470" text-anchor="middle" fill="#666666" font-size="12">关键指标</text>+```++---++## 七、图标使用规范++### 推荐图标颜色++- **主要图标**:深蓝 `#003366` 或辅助蓝 `#0066CC`+- **强调图标**:强调红 `#CC0000`+- **中性图标**:正文灰 `#666666`++### 图标尺寸++- **大图标**:48 × 48 px(封面、章节页)+- **中图标**:32 × 32 px(卡片标题旁)+- **小图标**:20 × 20 px(列表项、标注)++---++## 八、技术约束++### SVG 生成规则++1. **viewBox**: `0 0 1280 720`+2. **背景**:使用 `<rect>` 元素填充+3. **文本换行**:使用 `<tspan>` 实现,禁止 `<foreignObject>`+4. **透明度**:使用 `fill-opacity` / `stroke-opacity`,禁止 `rgba()`+5. **禁止元素**:`clipPath`、`mask`、`filter`、`<style>`、`class`、`foreignObject`、`textPath`、`animate*`、`script`、`marker`++### PPT 兼容性++- 禁止 `<g opacity="...">`(组透明度)+- 图片透明度使用遮罩层+- 仅使用内联样式++---++## 九、页面类型模板清单++| 序号 | 文件名 | 用途 | 说明 |+| ---- | ------------------ | -------- | -------------------------- |+| 01 | `01_cover.svg` | 封面 | 主标题、副标题、答辩人信息 |+| 02 | `02_toc.svg` | 目录 | 章节列表、页码索引 |+| 03 | `02_chapter.svg` | 章节过渡 | 醒目章节编号、标题 |+| 04 | `03_content.svg` | 内容页 | 灵活布局,定义页眉页脚 |+| 05 | `04_ending.svg` | 结束页 | 致谢、联系方式 |++---++## 十、设计检查清单++### 生成前++- [ ] 内容是否适合当前页布局+- [ ] 配色是否符合规范+- [ ] 字号层级是否正确++### 生成后++- [ ] viewBox = `0 0 1280 720`+- [ ] 无禁止元素+- [ ] 文本可读(≥12px)+- [ ] 内容在安全区域内+- [ ] 元素对齐整齐+- [ ] 样式一致性检查通过