中期成果提交:PPT自动生成 Agent(感知-规划-行动-记忆闭环 + aura-ppt 渲染引擎 + Web 交互界面 + 测试用例 + AI 使用日志)

This commit is contained in:
T1-AISUYISIN
2026-08-31 09:53:11 +08:00
commit 883a89682b
50 changed files with 10355 additions and 0 deletions
+93
View File
@@ -0,0 +1,93 @@
# aura-ppt 技能包使用说明
> 本地AI演示文稿引擎 | 综合 Gamma 设计感 / WPS 中文理解 / 7牛 内容保真 / Beautiful.ai 无损导出
## 安装位置
```
C:\Users\xunhe\.config\opencode\skills\aura-ppt\
├── SKILL.md ← 技能指令(触发条件/工作流/内容保真规则)
├── references/
│ ├── chinese-typography.md ← 中文排版规范
│ ├── content-fidelity.md ← 内容保真规则(数据零改写)
│ └── design-system.md ← 设计系统 + 全局视觉规范
└── scripts/
└── engine.py ← 渲染引擎(1600+行,全部能力实现)
```
备份副本:`D:\AIDEPT\讯和能力知识库构建\aura-ppt\`(目录)+ `aura-ppt技能包.zip`
## 快速开始
```bash
# 1. 创建 plan.json(见下方结构)
# 2. 生成 PPT
python scripts/engine.py --plan plan.json --output out.pptx
# 3. 验证(必须执行)
python scripts/engine.py --verify out.pptx --plan plan.json
```
## 三种设计系统
| 系统名 | 风格 | 适用 | 比例 |
|---|---|---|---|
| `business-report` | 火焰蓝商务(白底+火焰蓝+红) | 中文管理层汇报 | 16:9 |
| `report-jp` | 日式商务(法人蓝+浅天蓝卡片+Meiryo UI | 日本客户/总部 | 10.83×7.5 |
| `aura-dark` | 深色高级(深蓝黑+电光青) | 科技感/发布会 | 16:9 |
plan.json 的 `design` 字段选择。
## 使用模板母版
```bash
python scripts/engine.py --plan plan.json --output out.pptx \
--template "公司模板.pptx" # 继承母版背景/页脚/Logo
```
## plan.json 结构
```json
{
"title": "标题",
"design": "business-report",
"notes_template": true,
"slides": [
{"type": "cover", "title": "主标题", "stats": [["70%", "说明"]]},
{"type": "toc", "content": ["01. 章节", "02. 章节"]},
{"type": "content", "content": ["**要点标题** 描述"]},
{"type": "table", "data": [[...]], "charts": [{"type":"bar","data":{}}]},
{"type": "two_table", "tables": [{"title":"表1","data":[[...]]}, {"title":"表2","data":[[...]]}]},
{"type": "chart", "chart": {"type": "bar", "data": {}}},
{"type": "flowchart", "rows": ["泳道1"], "content": [["步骤A", "步骤B"]]},
{"type": "timeline", "content": ["Phase 0\n描述"]},
{"type": "quote", "title": "引言"},
{"type": "end", "title": "谢谢"}
]
}
```
## 全部能力清单
- **封面大数字墙**(stats):右侧数字卡片(70%/6个/30-50%
- **要点卡片**content 中 `**标题** 描述` 自动渲染卡片网格
- **双表并排**(two_table):左右表格,表头/字号自适应
- **表格+图表混合**table 支持 chart/charts 字段
- **渐变柱体**:柱状图垂直渐变+网格线
- **卡片投影**:所有卡片柔和阴影
- **泳道流程图**:3层泳道 / 横向流程(窄卡自动缩字号)
- **时间线**:双圈节点
- **内容保真验证**:数字+术语+备注三合一
- **演讲者备注**:自动生成(主题/数据/要点/过渡)
## 常见问题
**Q1: 数据会被AI改写吗?** 不会。渲染引擎是纯代码,plan.json 中的数据逐字符保留,验证器强制校验。
**Q2: 能处理日文吗?** 能。report-jp 用 Meiryo UI,日文标题/表格自适应。
**Q3: 输出能编辑吗?** 能。python-pptx 输出标准 PPTX,全矢量可编辑。
**Q4: 需要网络/API吗?** 不需要。纯本地 Pythonpython-pptx)。
**Q5: 如何加新设计系统?** 在 engine.py 的 DESIGN_SYSTEMS 注册表扩展(继承 DesignSystem 覆写令牌)。