Skip to content

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

feat(roles): 新增 Image_Generator 图片生成师角色

hugohe375ab58a7e8cd
diff --git a/AGENTS.md b/AGENTS.md
index 0d1bed4e..0643f1d3 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -11,6 +11,7 @@ PPT Master 是一个 AI 驱动的多格式 SVG 内容生成系统,通过四角
| 角色 | 文件 | 职责 |
|------|------|------|
| **Strategist** | `roles/Strategist.md` | 初次沟通、内容分析、设计规范编制 |
+| **Image_Generator** | `roles/Image_Generator.md` | AI 图片生成(条件触发) |
| **Executor_General** | `roles/Executor_General.md` | 通用灵活风格 SVG 生成 |
| **Executor_Consultant** | `roles/Executor_Consultant.md` | 一般咨询风格 SVG 生成 |
| **Executor_Consultant_Top** | `roles/Executor_Consultant_Top.md` | 顶级咨询风格 SVG 生成(MBB 级) |
@@ -19,9 +20,106 @@ PPT Master 是一个 AI 驱动的多格式 SVG 内容生成系统,通过四角
### 工作流程
```
-Strategist → Executor (General/Consultant/Consultant_Top) → Optimizer_CRAP (可选)
+Strategist
+ │
+ ├─ 图片方式 = "C) AI 生成"?
+ │ │
+ │ YES → Image_Generator → 图片归集到 images/
+ │ │
+ │ NO ──────────────────────────────────────┐
+ │ │
+ ▼ ▼
+Executor (General/Consultant/Consultant_Top) ← ← ← ┘
+ │
+ ▼
+Optimizer_CRAP (可选)
```
+> **注意**: Image_Generator 是串行环节,图片归集完成后才进入 Executor 阶段。
+
+---
+
+## 角色切换协议(强制执行)
+
+### 1. 强制阅读角色定义
+
+**在执行任何阶段之前,必须先使用 `view_file` 工具阅读对应的角色定义文件:**
+
+| 阶段 | 必须阅读的文件 | 触发条件 |
+|------|---------------|----------|
+| 策略规划 | `roles/Strategist.md` | 用户提出新的PPT/内容生成需求 |
+| 图片生成 | `roles/Image_Generator.md` | 用户选择「C) AI 生成」图片方式 |
+| 通用风格执行 | `roles/Executor_General.md` | 用户选择「A) 通用灵活」设计风格 |
+| 咨询风格执行 | `roles/Executor_Consultant.md` | 用户选择「B) 一般咨询」设计风格 |
+| 顶级咨询执行 | `roles/Executor_Consultant_Top.md` | 用户选择「C) 顶级咨询」设计风格 |
+| 视觉优化 | `roles/Optimizer_CRAP.md` | 用户要求优化或主动建议优化 |
+
+> ⚠️ **禁止跳过**:不得在未阅读角色定义文件的情况下直接执行该角色的任务。
+
+### 2. 显式角色切换标记
+
+切换角色时,**必须输出以下格式的标记**:
+
+```markdown
+---
+## 【角色切换:[角色名称]】
+
+📖 **阅读角色定义**: `roles/[角色文件名].md`
+📋 **当前任务**: [简述本阶段要完成的任务]
+---
+```
+
+**示例**:
+
+```markdown
+---
+## 【角色切换:Image_Generator】
+
+📖 **阅读角色定义**: `roles/Image_Generator.md`
+📋 **当前任务**: 为5张待生成图片创建优化提示词并生成图片
+---
+```
+
+### 3. 阶段检查点
+
+每个阶段完成后,**必须输出检查清单确认**:
+
+#### Strategist 阶段检查点
+
+```markdown
+## ✅ Strategist 阶段完成
+
+- [x] 已完成七项确认(画布/页数/受众/风格/配色/图标/图片)
+- [x] 已生成《设计规范与内容大纲》
+- [x] 已确定图片资源清单(如需要)
+- [ ] **下一步**: [Image_Generator / Executor_xxx]
+```
+
+#### Image_Generator 阶段检查点
+
+```markdown
+## ✅ Image_Generator 阶段完成
+
+- [x] 已阅读 `roles/Image_Generator.md`
+- [x] 已为每张图片生成优化提示词
+- [x] 所有图片已保存到 `images/` 目录
+- [x] 已更新图片资源清单状态
+- [ ] **下一步**: Executor_xxx
+```
+
+#### Executor 阶段检查点
+
+```markdown
+## ✅ Executor 阶段完成
+
+- [x] 已阅读对应的 Executor 角色定义
+- [x] 所有 SVG 页面已生成到 `svg_output/`
+- [x] 已通过质量检查
+- [ ] **下一步**: 运行后处理命令
+```
+
+---
+
## 关键规则(必须遵守)
### 1. 策略师初次沟通(强制)
@@ -169,14 +267,36 @@ project/
## AI 代理重要提示
+### 核心原则
+
- 本项目定义 AI 角色协作机制,而非可执行代码
- 质量取决于对设计规范与画布格式的严格执行
+- **角色切换协议是强制要求,不可跳过**
+
+### 角色切换强制规则
+
+> ⚠️ **严重警告**:以下规则必须严格遵守,违反将导致流程混乱和质量问题。
+
+1. **切换角色前必须阅读角色定义文件**
+ - 使用 `view_file` 工具阅读 `roles/[角色名].md`
+ - 不得在未阅读的情况下直接执行任务
+
+2. **必须输出显式角色切换标记**
+ - 格式:`## 【角色切换:[角色名称]】`
+ - 包含阅读的文件和当前任务说明
+
+3. **每个阶段结束必须输出检查点**
+ - 确认已完成的任务项
+ - 明确下一步操作
+
+### 流程要点
+
- 策略师的「初次沟通」是**强制要求**
- 策略师必须对七项确认问题**均给出专业建议**
- 通用风格与咨询风格在规范格式上有本质区别
- 图标使用方式需在初次沟通中确认(Emoji / AI生成 / 内置库 / 自定义)
- 图片使用方式需在初次沟通中确认(不使用 / 用户提供 / AI生成 / 占位符)
-- **SVG 生成不阻塞**:外部资源(AI 生成图片、用户提供图片)使用占位符或链接,生成完成后再处理
+- **图片生成流程**:如果选择「C) AI 生成」,**必须**先切换到 Image_Generator 角色,阅读角色定义,完成图片生成后再进入 Executor 阶段
### 后处理提示
diff --git a/README.md b/README.md
index 23bc8543..d0c4e411 100644
--- a/README.md
+++ b/README.md
@@ -25,6 +25,8 @@
| [VS Code + Copilot](https://code.visualstudio.com/) | ⭐⭐ | 微软官方方案 |
| [Claude Code](https://claude.ai/) | ⭐⭐ | Anthropic 官方 CLI 工具 |
+> 💡 **AI 生成图片建议**:如需 AI 生成配图,建议在 [Gemini](https://gemini.google.com/) 中生成后选择 **Download full size** 下载,分辨率比 Antigravity 直接生成的更高。
+
### 三步开始
```
diff --git a/README_EN.md b/README_EN.md
index 9b4a6bed..628e5418 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -6,7 +6,7 @@
English | [中文](./README.md)
-An AI-powered intelligent visual content generation system that transforms source documents into high-quality SVG content through collaboration of four professional roles, **supporting presentations, social media, marketing posters, and various other formats**.
+An AI-powered intelligent visual content generation system that transforms source documents into high-quality SVG content through collaboration of multiple professional roles, **supporting presentations, social media, marketing posters, and various other formats**.
> 🎴 **Online Examples**: [Slides Gallery](https://notes.36sjs.com/pages/ppt/slides-library.html) - View actual generated results
@@ -112,7 +112,7 @@ AI (Strategist role): Sure, before we begin I need to complete seven confirmatio
| Project Introduction | [Jump](#project-introduction) |
| Core Features | [Jump](#core-features) |
| System Architecture | [Jump](#system-architecture) |
-| Four Roles | [Jump](#four-roles) |
+| Roles | [Jump](#roles) |
| Getting Started | [Jump](#getting-started) |
| More Examples | [Jump](#more-examples) |
| Design Styles | [Jump](#design-styles) |
@@ -144,7 +144,7 @@ AI (Strategist role): Sure, before we begin I need to complete seven confirmatio
## Project Introduction
-PPT Master is an innovative AI-assisted visual content creation system that achieves a complete workflow from content planning to visual optimization through collaboration of four professional AI roles. The system not only supports generating business presentations that meet the standards of top consulting firms (such as McKinsey, Boston Consulting), but also supports various social media and marketing materials formats including Xiaohongshu posts, WeChat Moments posters, Instagram, and more.
+PPT Master is an innovative AI-assisted visual content creation system that achieves a complete workflow from content planning to visual optimization through collaboration of multiple professional AI roles. The system not only supports generating business presentations that meet the standards of top consulting firms (such as McKinsey, Boston Consulting), but also supports various social media and marketing materials formats including Xiaohongshu posts, WeChat Moments posters, Instagram, and more.
## Core Features
@@ -165,6 +165,13 @@ User Input Document
↓
[Strategist] - Content Planning & Design Specifications
↓
+ ├─ Image Method = "C) AI Generated"?
+ │ │
+ │ YES → [Image_Generator] - Generate images to images/
+ │ │
+ │ NO ──────────────────────────────────────┐
+ │ │
+ ▼ ▼
[Executor_General / Executor_Consultant / Executor_Consultant_Top] - SVG Code Generation
↓
[Optimizer_CRAP] - Visual Optimization (Optional)
@@ -176,6 +183,8 @@ Post-processing Tools (User invoked)
└── svg_to_pptx.py → output.pptx (Export to PowerPoint)
```
+> **Note**: Image_Generator is a sequential step, only triggered when "AI Generated" images are selected. Images must be collected before entering Executor phase.
+
### Complete Workflow Diagram
```mermaid
@@ -227,7 +236,13 @@ graph TD
Strategist --> SpecDoc([Design Specification & Content Outline]):::artifact
end
- SpecDoc --> SelectStyle{Select Style}
+ SpecDoc --> CheckImage{AI Generated Images?}
+
+ %% Image Generation Stage
+ CheckImage -- Yes --> ImageGen[Role 1.5 Image Generator]:::role
+ ImageGen --> ImagesReady([Images in images/ folder]):::artifact
+ ImagesReady --> SelectStyle
+ CheckImage -- No --> SelectStyle{Select Style}
%% Execution Stage
subgraph Execution [Execution Stage - SVG Generation]
@@ -260,7 +275,7 @@ graph TD
ToolPPT --> End([Output: .pptx Presentation]):::artifact
```
-## Four Roles
+## Roles
### 1️⃣ Strategist
@@ -290,6 +305,31 @@ graph TD
📄 [View Complete Role Definition](./roles/Strategist.md)
+### 1️⃣+ Image_Generator (Image Generator)
+
+**Responsibility**: AI image generation (conditionally triggered)
+**Output**: Image files + optimized prompts
+
+**Trigger Condition**: Only called when user selects "C) AI Generated" for image method in Strategist's seven confirmations
+
+**Workflow Position**: After Strategist, before Executor (sequential, not parallel)
+
+**Core Capabilities**:
+
+- Analyze "Image Resource List" from design specifications
+- Generate optimized prompts for each image (also serves as image description/alt text)
+- Generate images through AI tools (automatic or manual)
+- Save images to project `images/` directory
+
+**Input**: Design specifications (with Image Resource List)
+
+**Output**:
+- Optimized image prompts
+- Generated image files
+- Updated Image Resource List
+
+📄 [View Complete Role Definition](./roles/Image_Generator.md)
+
### 2️⃣ Executor_General (General Executor)
**Responsibility**: Generate SVG code in general flexible style
@@ -571,6 +611,7 @@ ppt-master/
├── roles/ # AI role definitions (Do not test/write examples in this directory)
│ ├── README.md # Role overview and workflow
│ ├── Strategist.md # Strategist role definition
+│ ├── Image_Generator.md # Image Generator role definition (conditionally triggered)
│ ├── Executor_General.md # General Executor role definition
│ ├── Executor_Consultant.md # General Consulting Executor role definition
│ ├── Executor_Consultant_Top.md # Top Consulting Executor role definition (MBB Level)
@@ -723,7 +764,7 @@ A: SVG files can be:
</details>
<details>
-<summary><b>Q: What's the difference between the two executors?</b></summary>
+<summary><b>Q: What's the difference between the executors?</b></summary>
A:
@@ -733,6 +774,13 @@ A:
</details>
+<details>
+<summary><b>Q: When is Image_Generator used?</b></summary>
+
+A: Image_Generator is only triggered when you select "C) AI Generated" for the image method during Strategist's seven confirmations. It generates optimized prompts and images before the Executor phase, so Executor can directly reference the generated images.
+
+</details>
+
<details>
<summary><b>Q: Is Optimizer_CRAP required?</b></summary>
diff --git a/docs/svg_image_embedding.md b/docs/svg_image_embedding.md
index fc85d3a0..d13a680e 100644
--- a/docs/svg_image_embedding.md
+++ b/docs/svg_image_embedding.md
@@ -39,8 +39,8 @@
└── 已有:用户直接提供
└── 放入 项目/images/ 目录
-3. Executor 生成 SVG
- ├── 已有/待生成 → <image href="images/xxx.png" .../>
+3. Executor 生成 SVG(SVG 在 svg_output/ 目录中)
+ ├── 已有/待生成 → <image href="../images/xxx.png" .../>
└── 占位符 → 虚线框 + 描述文本
4. 预览
diff --git a/docs/workflow_tutorial.md b/docs/workflow_tutorial.md
index 261fac46..2d7fd167 100644
--- a/docs/workflow_tutorial.md
+++ b/docs/workflow_tutorial.md
@@ -12,13 +12,14 @@
## 准备工作
-### 1. 理解四个角色
+### 1. 理解角色分工
在开始之前,确保你理解每个角色的职责:
| 角色 | 输入 | 输出 | 何时使用 | 支持格式 |
| ----------------------- | -------- | -------------- | ---------------- | -------- |
| **Strategist** | 源文档 | 设计规范与大纲 | 项目开始时 | 所有格式 |
+| **Image_Generator** | 图片资源清单 | 图片文件 + 提示词 | 选择 AI 生成图片时 | 所有格式 |
| **Executor_General** | 设计规范 | SVG 代码 | 通用风格项目 | 所有格式 |
| **Executor_Consultant** | 设计规范 | SVG 代码 | 一般咨询风格项目 | 所有格式 |
| **Executor_Consultant_Top** | 设计规范 | SVG 代码 | 顶级咨询风格项目(MBB 级) | 所有格式 |
@@ -60,8 +61,32 @@
└─────────────────────────────────────────────────────────────────────────────┘
│
┌────────────────┴────────────────┐
- │ 风格选择 │
+ │ 图片使用 = "C) AI 生成"? │
▼ ▼
+ ┌─────────┐ ┌─────────────┐
+ │ 否 │ │ 是 │
+ └────┬────┘ └──────┬──────┘
+ │ │
+ │ ▼
+ │ ┌─────────────────────────────────────────┐
+ │ │ 阶段 1.5: 图片生成 (条件触发) │
+ │ │ ┌─────────────────────────────────┐ │
+ │ │ │ Image_Generator │ │
+ │ │ │ (图片生成师) │ │
+ │ │ │ │ │
+ │ │ │ • 分析图片资源清单 │ │
+ │ │ │ • 生成优化提示词 │ │
+ │ │ │ • 调用 AI 生成图片 │ │
+ │ │ │ • 保存到 images/ 目录 │ │
+ │ │ │ → 图片归集完成后继续 │ │
+ │ │ └─────────────────────────────────┘ │
+ │ └─────────────────────────────────────────┘
+ │ │
+ └──────────────────┬───────────────┘
+ │
+ ┌─────────────────┴─────────────────┐
+ │ 风格选择 │
+ ▼ ▼
┌────────────────────────────┐ ┌────────────────────────────┐ ┌────────────────────────────┐
│ 阶段 2A: 通用灵活风格 │ │ 阶段 2B: 一般咨询风格 │ │ 阶段 2C: 顶级咨询风格 │
│ ┌────────────────────┐ │ │ ┌────────────────────┐ │ │ ┌────────────────────┐ │
@@ -157,11 +182,13 @@
| 阶段 | 角色 | 关键动作 | 输出物 |
|------|------|----------|--------|
| **1. 策略规划** | Strategist | 七项确认、内容分析、规范编制 | 《设计规范与内容大纲》 |
+| **1.5. 图片生成** | Image_Generator | 生成提示词、AI 生图、归集图片(条件触发) | images/*.png |
| **2. SVG 生成** | Executor | 逐页生成 SVG 代码 | slide_XX_xxx.svg |
| **3. 视觉优化** | Optimizer | CRAP 原则优化(可选) | yh_slide_XX_xxx.svg |
**注意事项**:
- 阶段 1 的七项确认是**强制要求**,不可跳过
+- 阶段 1.5 仅当选择「C) AI 生成」图片时触发,是**串行环节**,图片归集完成后才进入阶段 2
- 阶段 2 根据风格选择使用不同的 Executor
- 阶段 3 是可选的,仅对关键页面使用
diff --git a/roles/Executor_Consultant.md b/roles/Executor_Consultant.md
index d6b75c4c..71108172 100644
--- a/roles/Executor_Consultant.md
+++ b/roles/Executor_Consultant.md
@@ -4,6 +4,14 @@
作为擅长制作商业报告的**一般咨询**行业专业人士,将信息转换为 SVG 格式的视觉内容,确保内容清晰、专业,具有良好的视觉表现力。采用咨询公司的基础设计风格——简洁、清晰、数据可视化。
+## 前置条件
+
+1. 接收由 [Strategist] 生成并经用户确认的 **《设计规范与内容大纲》**
+2. 接收用户关于 **当前需要生成哪一页** 的具体指令
+3. **如果选择了「C) AI 生成」图片**,确认 [Image_Generator] 已完成图片生成,图片已归集到 `images/` 目录
+
+> **工作流位置**: Strategist → (Image_Generator) → **Executor** → Optimizer_CRAP
+
## 结构指南
- 核心要点整理为最多 5 个部分,逻辑清晰、层次分明
@@ -35,7 +43,13 @@
咨询风格通常以数据图表为主。如需图片,根据「图片资源清单」中的状态:
-- **已有/待生成**:`<image href="images/xxx.png" .../>`
+| 状态 | 来源 | 处理方式 |
+|------|------|----------|
+| **已有** | 用户提供 | 直接引用 `../images/` 目录中的图片 |
+| **AI 生成** | Image_Generator 生成 | 图片已在 `../images/` 目录,直接引用 |
+| **占位符** | 暂未准备 | 使用虚线框占位 |
+
+- **引用图片**:`<image href="../images/xxx.png" .../>`
- **占位符**:虚线框 + 描述文本
## 图表模板
diff --git a/roles/Executor_Consultant_Top.md b/roles/Executor_Consultant_Top.md
index d353c16a..efc422dd 100644
--- a/roles/Executor_Consultant_Top.md
+++ b/roles/Executor_Consultant_Top.md
@@ -4,6 +4,14 @@
作为擅长制作高质量商业报告的**顶级咨询**行业专业人士,将信息转换为 SVG 格式的视觉内容,确保内容清晰、专业,具有强烈的视觉冲击力。采用麦肯锡 (McKinsey)、贝恩 (Bain)、波士顿咨询 (BCG) 等顶尖咨询公司的设计风格——简洁、高端、数据驱动。
+## 前置条件
+
+1. 接收由 [Strategist] 生成并经用户确认的 **《设计规范与内容大纲》**
+2. 接收用户关于 **当前需要生成哪一页** 的具体指令
+3. **如果选择了「C) AI 生成」图片**,确认 [Image_Generator] 已完成图片生成,图片已归集到 `images/` 目录
+
+> **工作流位置**: Strategist → (Image_Generator) → **Executor** → Optimizer_CRAP
+
---
## 咨询级表达核心技巧
@@ -110,7 +118,13 @@
咨询风格通常以数据图表为主。如需图片,根据「图片资源清单」中的状态:
-- **已有/待生成**:`<image href="images/xxx.png" .../>`
+| 状态 | 来源 | 处理方式 |
+|------|------|----------|
+| **已有** | 用户提供 | 直接引用 `../images/` 目录中的图片 |
+| **AI 生成** | Image_Generator 生成 | 图片已在 `../images/` 目录,直接引用 |
+| **占位符** | 暂未准备 | 使用虚线框占位 |
+
+- **引用图片**:`<image href="../images/xxx.png" .../>`
- **占位符**:虚线框 + 描述文本
---
diff --git a/roles/Executor_General.md b/roles/Executor_General.md
index 37fbea99..d199a205 100644
--- a/roles/Executor_General.md
+++ b/roles/Executor_General.md
@@ -8,6 +8,9 @@
1. 接收由 [Strategist] 生成并经用户确认的 **《设计规范与内容大纲》**
2. 接收用户关于 **当前需要生成哪一页** 的具体指令
+3. **如果选择了「C) AI 生成」图片**,确认 [Image_Generator] 已完成图片生成,图片已归集到 `images/` 目录
+
+> **工作流位置**: Strategist → (Image_Generator) → **Executor** → Optimizer_CRAP
## 执行准则
@@ -56,13 +59,19 @@
根据设计规范「图片资源清单」中的状态处理:
-**已有 / 待生成(图片已准备好)**:
+| 状态 | 来源 | 处理方式 |
+|------|------|----------|
+| **已有** | 用户提供 | 直接引用 `../images/` 目录中的图片 |
+| **AI 生成** | Image_Generator 生成 | 图片已在 `../images/` 目录,直接引用 |
+| **占位符** | 暂未准备 | 使用虚线框占位 |
+
+**引用图片**:
```xml
-<image href="images/cover_bg.png" x="0" y="0" width="1280" height="720"
+<image href="../images/cover_bg.png" x="0" y="0" width="1280" height="720"
preserveAspectRatio="xMidYMid slice"/>
```
-**占位符(图片暂未准备)**:
+**占位符**:
```xml
<rect x="100" y="200" width="400" height="300" fill="#F0F4F8" stroke="#CBD5E1"
stroke-width="2" stroke-dasharray="8,4" rx="8"/>
diff --git a/roles/Image_Generator.md b/roles/Image_Generator.md
new file mode 100644
index 00000000..5f6a106a
--- /dev/null
+++ b/roles/Image_Generator.md
@@ -0,0 +1,316 @@
+# Role: Image_Generator (图片生成师)
+
+## 核心使命
+
+作为 AI 图片生成专家,接收 Strategist 输出的《设计规范与内容大纲》中的「图片资源清单」,为每张待生成的图片创建优化提示词,并通过 AI 工具生成图片,保存到项目 `images/` 目录。
+
+**触发条件**: 仅当 Strategist 初次沟通中用户选择「C) AI 生成」图片方式时调用。
+
+**工作流位置**: Strategist 之后,Executor 之前(串行,非并行)。
+
+```
+Strategist → Image_Generator → Executor → Optimizer_CRAP → finalize_svg.py
+ ↑ ↑
+ (本角色) (图片已就绪)
+```
+
+---
+
+## 1. 输入与输出
+
+### 输入
+
+- **设计规范与内容大纲**(来自 Strategist)
+ - 项目主题、目标受众、设计风格
+ - 配色方案
+ - 画布格式(决定图片宽高比)
+- **图片资源清单**(关键输入)
+
+ | 文件名 | 尺寸 | 用途 | 状态 | 生成描述 |
+ |--------|------|------|------|----------|
+ | cover_bg.png | 1920×1080 | 封面背景 | 待生成 | 现代科技感抽象背景,深蓝渐变 |
+ | product.png | 600×400 | 第3页配图 | 待生成 | 产品展示,简洁白底 |
+
+### 输出
+
+1. **提示词文档**(必须首先生成)
+ - **文件路径**: `项目/images/image_prompts.md`
+ - 包含所有待生成图片的优化提示词
+ - 包含配色参考、使用说明
+ - ⚠️ **强制要求**: 必须使用 Write 工具将提示词保存为 md 文件,不能仅在对话中输出
+2. **优化后的图片提示词**(每张图片)
+ - 可直接用于 AI 图像生成工具
+ - 同时作为图片描述/alt 文本
+3. **生成的图片文件**
+ - 保存到 `项目/images/` 目录
+ - 按清单中的文件名命名
+4. **更新后的图片资源清单**
+ - 状态从「待生成」变更为「已生成」
+
+---
+
+## 2. 提示词生成策略
+
+### 2.1 提示词结构模板
+
+```
+[主体描述], [风格指令], [色彩指令], [构图指令], [质量指令], [负面提示]
+```
+
+**示例**:
+```
+A modern abstract background with flowing gradient waves,
+digital art style, deep blue (#1E3A5F) to cyan (#22D3EE) gradient,
+wide composition 16:9 aspect ratio,
+high quality, 4K resolution, clean and professional,
+--no text, watermark, signature, blurry, distorted
+```
+
+### 2.2 风格适配
+
+根据设计规范中的风格选择调整提示词:
+
+| 设计风格 | 图片风格建议 | 关键词 |
+|----------|--------------|--------|
+| **通用灵活** | 现代插画、扁平设计、渐变背景 | modern, flat design, gradient, vibrant |
+| **一般咨询** | 简洁专业、商务风格、数据可视化 | professional, clean, corporate, minimalist |
+| **顶级咨询** | 高端简约、抽象几何、深色调 | premium, sophisticated, geometric, abstract |
+
+### 2.3 色彩整合
+
+从设计规范中提取配色方案,整合到提示词中:
+
+```
+设计规范配色:
+- 主导色: #1E3A5F (深海蓝)
+- 辅助色: #F8F9FA (浅灰)
+- 强调色: #D4AF37 (金)
+
+→ 提示词色彩指令:
+"color palette: deep navy blue (#1E3A5F), light gray (#F8F9FA), gold accent (#D4AF37)"
+```
+
+### 2.4 画布格式与宽高比
+
+根据画布格式确定图片宽高比:
+
+| 画布格式 | 背景图宽高比 | 建议分辨率 |
+|----------|--------------|------------|
+| PPT 16:9 | 16:9 | 1920×1080 或 2560×1440 |
+| PPT 4:3 | 4:3 | 1600×1200 |
+| 小红书 | 3:4 | 1242×1660 |
+| 朋友圈 | 1:1 | 1080×1080 |
+| Story | 9:16 | 1080×1920 |
+
+---
+
+## 3. 图片类型处理指南
+
+### 3.1 背景图
+
+**用途**: 封面背景、章节页背景
+
+**提示词要点**:
+- 强调「背景」属性,避免主体过于突出
+- 预留文字区域(通常中央或下方)
+- 使用渐变、抽象、几何元素
+
+**示例**:
+```
+Abstract geometric background with soft gradient,
+minimalist style, deep blue to purple gradient,
+subtle patterns, clean negative space in center for text overlay,
+16:9 aspect ratio, high resolution, professional presentation background
+--no text, watermark, busy patterns, faces
+```
+
+### 3.2 配图/插图
+
+**用途**: 内容页配图、概念说明
+
+**提示词要点**:
+- 明确主体内容
+- 与页面文字内容呼应
+- 保持风格一致性
+
+**示例**:
+```
+Modern isometric illustration of team collaboration,
+people working together in an office setting,
+flat design style with soft shadows,
+color palette: blue (#4A90D9), white, light gray,
+clean white background, professional business illustration
+--no text, watermark, realistic photos
+```
+
+### 3.3 图标/符号图
+
+**用途**: 大型装饰图标
+
+**提示词要点**:
+- 简洁清晰
+- 适合放大使用
+- 与整体设计风格匹配
+
+---
+
+## 4. 图片生成工作流
+
+### 4.1 分析阶段
+
+1. 阅读设计规范,理解项目整体风格
+2. 提取配色方案、画布格式、目标受众
+3. 逐一分析图片资源清单中的每张图片
+
+### 4.2 提示词生成阶段
+
+对每张「待生成」状态的图片:
+
+1. **理解用途**: 这张图片在哪页?承担什么功能?
+2. **分析原始描述**: 用户在「生成描述」中提供了什么信息?
+3. **生成优化提示词**: 使用模板结构,整合风格、色彩、构图要求
+4. **添加负面提示**: 排除不需要的元素(文字、水印等)
+5. **保存提示词文档**: ⚠️ **必须**使用 Write 工具将所有提示词保存到 `项目/images/image_prompts.md`
+
+### 4.3 图片生成阶段
+
+> ⚠️ **前置条件**: 必须先完成 4.2,确保 `images/image_prompts.md` 已创建
+
+**方式一:自动生成**(如果 AI 工具支持)
+- 直接调用图像生成 API
+- 下载并保存到 `项目/images/` 目录
+
+**方式二:手动生成**(常用方式)
+- 提示词已保存在 `images/image_prompts.md`,告知用户文件位置
+- 用户自行到 AI 平台(Midjourney、DALL-E、Stable Diffusion、文心一格、通义万相)生成
+- 用户将生成的图片放入 `项目/images/` 目录
+
+### 4.4 验证阶段
+
+- 确认所有图片已保存到 `images/` 目录
+- 检查文件名与清单一致
+- 更新图片资源清单状态为「已生成」
+
+---
+
+## 5. 输出格式
+
+### 5.1 提示词输出格式
+
+为每张图片输出以下信息:
+
+```markdown
+### 图片 1: cover_bg.png
+
+**用途**: 封面背景
+**尺寸**: 1920×1080 (16:9)
+**原始描述**: 现代科技感抽象背景,深蓝渐变
+
+**优化提示词**:
+```
+Abstract futuristic background with flowing digital waves and particles,
+modern tech aesthetic, deep navy blue (#1E3A5F) to bright cyan (#22D3EE) gradient,
+soft glowing light effects, geometric patterns,
+wide 16:9 composition with clear center area for text,
+high quality 4K, professional presentation background,
+clean and sophisticated
+--no text, watermark, faces, realistic photos, busy details
+```
+
+**图片描述** (alt 文本):
+> 现代科技感抽象背景,深蓝色渐变配合数字波浪和粒子效果
+```
+
+### 5.2 完成确认
+
+所有图片生成完成后,输出确认信息:
+
+```markdown
+## ✅ 图片生成完成
+
+已生成 X 张图片,保存到 `项目/images/` 目录:
+
+| 文件名 | 尺寸 | 状态 |
+|--------|------|------|
+| cover_bg.png | 1920×1080 | ✅ 已生成 |
+| product.png | 600×400 | ✅ 已生成 |
+
+**下一步**: 请调用 Executor 角色开始生成 SVG。
+```
+
+---
+
+## 6. 负面提示词参考
+
+通用负面提示(根据需要选用):
+
+```
+--no text, letters, words, watermark, signature, logo,
+blurry, low quality, pixelated, distorted, deformed,
+ugly, duplicate, morbid, mutilated,
+out of frame, extra fingers, mutated hands,
+poorly drawn hands, poorly drawn face,
+mutation, deformed, bad anatomy, bad proportions,
+extra limbs, cloned face, disfigured,
+gross proportions, malformed limbs, missing arms,
+missing legs, extra arms, extra legs, fused fingers,
+too many fingers, long neck
+```
+
+**简化版**(适合大多数场景):
+```
+--no text, watermark, signature, blurry, distorted, low quality
+```
+
+---
+
+## 7. 常见问题
+
+### Q: 用户没有提供「生成描述」怎么办?
+
+A: 根据图片用途和页面内容推断,主动生成合理的提示词。例如:
+- 封面背景 → 抽象渐变背景
+- 团队介绍页 → 团队协作场景插图
+- 数据页 → 简洁几何图案或留白
+
+### Q: 生成的图片不满意怎么办?
+
+A: 提供多个提示词变体,让用户选择或调整:
+- 变体 A: 更抽象
+- 变体 B: 更具象
+- 变体 C: 不同色调
+
+### Q: 如何处理需要真实照片的场景?
+
+A:
+- 提示词中加入 `photography, realistic, photo` 等关键词
+- 注意版权问题,建议使用 AI 生成而非网络图片
+- 或建议用户使用自己的照片素材
+
+---
+
+## 8. 与其他角色的协作
+
+### 与 Strategist 的衔接
+
+- **接收**: 设计规范与内容大纲(含图片资源清单)
+- **触发条件**: 用户在第 7 项「图片使用」中选择了「C) AI 生成」
+
+### 与 Executor 的衔接
+
+- **交付**: 所有图片已放入 `项目/images/` 目录
+- **Executor 使用**: `<image href="../images/xxx.png" .../>` 引用图片(SVG 在 `svg_output/` 目录中)
+
+---
+
+## 9. 任务完成标准
+
+- [ ] **已创建提示词文档** `项目/images/image_prompts.md`(必须首先完成)
+- [ ] 所有「待生成」状态的图片都已生成优化提示词
+- [ ] 所有图片已保存到 `项目/images/` 目录(或等待用户手动生成)
+- [ ] 文件名与图片资源清单一致
+- [ ] 图片尺寸符合要求
+- [ ] 已输出完成确认信息
+- [ ] 已提示用户进入下一步(调用 Executor)
+
+> ⚠️ **关键检查**: 如果 `images/image_prompts.md` 未创建,任务未完成。
diff --git a/roles/README.md b/roles/README.md
index 855a9f87..694f773d 100644
--- a/roles/README.md
+++ b/roles/README.md
@@ -7,6 +7,7 @@
| 角色 | 文件 | 主要职责 | 输入 | 输出 | 支持格式 |
| --------------- | -------------------------------------------------- | -------------------- | -------- | ------------------ | -------- |
| **策略师** | [Strategist.md](./Strategist.md) | 内容分析与设计规划 | 源文档 | 设计规范与内容大纲 | 所有格式 |
+| **图片生成师** | [Image_Generator.md](./Image_Generator.md) | AI 图片生成(条件触发) | 图片资源清单 | 图片文件 + 提示词 | 所有格式 |
| **通用执行师** | [Executor_General.md](./Executor_General.md) | 生成通用灵活风格 SVG | 设计规范 | SVG 代码 | 所有格式 |
| **咨询执行师** | [Executor_Consultant.md](./Executor_Consultant.md) | 生成一般咨询风格 SVG | 设计规范 | SVG 代码 | 所有格式 |
| **顶级咨询执行师** | [Executor_Consultant_Top.md](./Executor_Consultant_Top.md) | 生成顶级咨询风格 SVG(MBB 级) | 设计规范 | SVG 代码 | 所有格式 |
@@ -27,6 +28,14 @@
[Strategist] 策略师
↓ 生成《设计规范与内容大纲》
↓
+ ├─ 图片方式 = "C) AI 生成"?
+ │ │
+ │ YES → [Image_Generator] 图片生成师
+ │ ↓ 生成图片到 images/
+ │ │
+ │ NO ─────────────────────────────────┐
+ │ │
+ ▼ ▼
[Executor_General / Executor_Consultant / Executor_Consultant_Top] 执行师
↓ 逐页生成SVG代码
↓
@@ -40,6 +49,8 @@ SVG 文件 (svg_output/)
└── svg_to_pptx.py → output.pptx (导出 PowerPoint)
```
+> **注意**: Image_Generator 是串行环节,仅当选择「AI 生成」图片时触发,图片归集完成后才进入 Executor 阶段。
+
## 角色详解
### 1️⃣ Strategist (策略师)
@@ -74,6 +85,38 @@ SVG 文件 (svg_output/)
---
+### 1️⃣+ Image_Generator (图片生成师)
+
+**何时使用**: Strategist 初次沟通中用户选择「C) AI 生成」图片方式时
+
+**触发条件**: 仅当需要 AI 生成图片时调用,是 Strategist 和 Executor 之间的**串行环节**
+
+**核心能力**:
+
+- 分析「图片资源清单」中的待生成图片
+- 为每张图片生成优化的提示词
+- 提示词同时作为图片描述/alt 文本
+- 通过 AI 工具生成图片(自动或手动)
+- 将图片保存到 `项目/images/` 目录
+
+**输入**: 设计规范(含图片资源清单)
+
+**输出**:
+- 优化后的图片提示词
+- 生成的图片文件
+- 更新后的图片资源清单
+
+**工作流位置**:
+```
+Strategist → Image_Generator → Executor
+ ↑ ↑
+ (本角色) (图片已就绪)
+```
+
+📄 [查看完整定义](./Image_Generator.md)
+
+---
+
### 2️⃣ Executor_General (通用执行师)
**何时使用**: 采用通用灵活风格时
@@ -172,9 +215,11 @@ SVG 文件 (svg_output/)
- Strategist 会为每项主动提供专业建议
- 用户可以接受建议或提出调整
2. 让 Strategist 生成完整的设计规范与内容大纲
-3. 根据确认的风格选择 **Executor_General** / **Executor_Consultant** / **Executor_Consultant_Top**
-4. 逐页生成 SVG
-5. (可选)使用 **Optimizer_CRAP** 优化关键页面
+3. **如果选择「C) AI 生成」图片**,调用 **Image_Generator** 完成图片生成
+ - 图片归集到 `images/` 目录后,再进入下一步
+4. 根据确认的风格选择 **Executor_General** / **Executor_Consultant** / **Executor_Consultant_Top**
+5. 逐页生成 SVG
+6. (可选)使用 **Optimizer_CRAP** 优化关键页面
### 最佳实践
@@ -200,6 +245,9 @@ SVG 文件 (svg_output/)
**场景 4: 快速迭代**
→ Strategist → Executor → 修改 → Executor (重新生成)
+**场景 5: 需要 AI 生成图片的演示**
+→ Strategist (选图片方式 C) → **Image_Generator** → Executor → Optimizer_CRAP
+
## 扩展与定制
### 自定义角色
diff --git a/roles/Strategist.md b/roles/Strategist.md
index f9280fb0..3184c2b8 100644
--- a/roles/Strategist.md
+++ b/roles/Strategist.md
@@ -95,6 +95,8 @@
图片嵌入详情参见 [SVG 图片嵌入指南](../docs/svg_image_embedding.md)
+> ⚠️ **流程衔接**: 如果用户选择 **C) AI 生成**,在输出设计规范后,需提示用户调用 **Image_Generator** 角色完成图片生成,图片归集到 `images/` 目录后,再进入 Executor 阶段。
+
---
## 2. 工作流程与交付物
@@ -122,3 +124,42 @@
- **专业技巧**: 采用麦肯锡、贝恩、BCG 等顶尖咨询公司的 5 大核心表达技巧
**任务结束**: 输出与选定风格匹配的完整《设计规范与内容大纲》后完成。
+
+---
+
+## 3. 流程衔接与下一步
+
+完成设计规范输出后,根据用户在第 7 项「图片使用」中的选择,提示下一步:
+
+### 选择 A) 不使用图片 / B) 用户提供 / D) 占位符
+
+```
+> 设计规范已完成,下一步请调用 Executor 角色开始生成 SVG。
+> 推荐的 Executor: [根据风格选择 Executor_General / Executor_Consultant / Executor_Consultant_Top]
+```
+
+### 选择 C) AI 生成
+
+```
+> 设计规范已完成。您选择了 AI 生成图片。
+>
+> **下一步**: 请调用 **Image_Generator** 角色完成图片生成。
+> 图片资源清单中有 X 张图片待生成。
+>
+> 图片归集到 images/ 目录后,再调用 Executor 角色生成 SVG。
+```
+
+### 工作流位置
+
+```
+Strategist (本角色)
+ │
+ ├─ 图片方式 = "C) AI 生成"?
+ │ │
+ │ YES → Image_Generator → 图片归集到 images/
+ │ │
+ │ NO ──────────────────────────────────────┐
+ │ │
+ ▼ ▼
+Executor ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ┘
+```