diff --git a/PROGRESS.md b/PROGRESS.md index 15ece98..4bcd7d1 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -21,6 +21,9 @@ ## 已完成关键能力 +### 2026-07-03 / ppt 模板 zongyuan_red 逆向重建为真实 中国建材总院 身份(bump 0.38.2) +用户给官方 `总院模板.pptx`(中国建筑材料科学研究总院有限公司)要求"统一按这个来,zongyuan_red"。原 `layouts/zongyuan_red/` 是手搓的红条结构版(深蓝 #1F2A44 + 顶部红条 + 55/45 封面 + PART 章节),与真实文件 DNA 完全不符。PowerPoint COM 渲出 3 档真页(封面/内容/尾页)+ 解 pptx 抽实测:主红 `#D7000E`、目录红 `#D52C24`、近黑 `#181717`、辅灰 `#6F6F6F`/`#BCBDBD`;字体 微软雅黑 + Arial + 方正兰亭黑;八边形品牌 logo(EMF→PNG 透明底)+ 总部大楼灰度实景 + 材料马赛克实景(TIFF→压缩 JPG)。重写 5 页 SVG 忠实还原:封面(实景铺底+顶左 logo&机构全称+居中主红块+白标题)/目录(左上实景+右下大红斜三角+目录标题+白字方块序号,承集团规范斜向分割)/章节(八边形品牌水印+红 PART 胶囊+大标题,原件缺、按八边形 DNA 合成)/内容(左缘红方块+标题+灰分隔线+右上 logo+4 列灰底红顶条卡片+底部红条+页码)/尾页(材料马赛克+"材料创造美好世界"红+Thanks)。打包 logo.png/cover_bg.jpg/ending_bg.jpg 三资产,改写 design_spec.md 反映真实身份,补登记进 layouts_index.json(此前 dir 在但未注册)。质检 --template-mode 5 页零 error;finalize 内嵌 8 图 + svg_preview 全量渲图逐页过目确认与原件一致。**并加主动提示**:strategist.md §e + SKILL.md 默认主题段各补一条 —— 受众/素材/用户机构指向 中国建材总院·CNBM 系(汇报/立项/评审/职称评审/品牌宣讲)时,策略阶段**主动**把 `zongyuan_red` 整套模板作为候选点名给用户(区别于 business-red 仅配色预设),用户点头再按明确路径套入;这是唯一鼓励主动提模板的场景,其余仍等明确路径,不模糊匹配。 + ### 2026-07-03 / web 进度 dock 展开遮挡最新内容(贴底时补触底,bump 0.38.1) 用户报:对话「拉到底部但仍有内容被遮挡看不到」。根因:`#task-progress-dock` 是 `#chat-stream` 上方的 flex 兄弟(`flex-shrink:0`),dock 一展开/长高,`chat-stream` 可视高度就被从顶部挤掉那么多——`scrollTop` 据置不变,原本贴底的内容被推到视口折线以下看不见。而 `chat.js` 直播态 `task_progress` 事件在重渲 dock(=长高)后**早 return,跳过了末尾第 1684 行的贴底兜底**,所以底部不会自动回滚。修:在 `task_progress` 分支 `setTaskProgress` 后补一句 `if (nearBottom) stream.scrollTop = stream.scrollHeight`(与其余事件分支同款贴底逻辑),dock 涨高时把最新内容重新钉到底。只动 `web/static/js/chat.js` 直播路径一处,历史渲染/其他事件不受影响。 diff --git a/core/__init__.py b/core/__init__.py index ba71bfa..4b877ab 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -1,3 +1,3 @@ # zcbot 版本号单一事实源:web/app.py 的 FastAPI version、/healthz 返回、前端展示都引这里。 # 改版本只动这一行。 -__version__ = "0.38.1" +__version__ = "0.38.2" diff --git a/skills/ppt/SKILL.md b/skills/ppt/SKILL.md index 21ff6f4..ec4e379 100644 --- a/skills/ppt/SKILL.md +++ b/skills/ppt/SKILL.md @@ -72,6 +72,7 @@ description: 生成 PowerPoint 演示文稿 (.pptx) 文件。✅ 触发:用户 - 商务红 `#C00000` / 中建材等品牌色,作为**候选之一**;**中文政企/集团/科研商务汇报默认就把商务红列进 ≥3 配色候选**(见 strategist.md §e)。用户点名("做成蓝色 / 用我们公司紫色")或素材里有 brand guideline → 按其锁定。 - 现成一款 **`business-red` 商务红品牌预设**(`templates/brands/business-red/`:#C00000 全色表 + 宋体标题 + 实心图标);用户说"红色 / 商务红 / 中建材风"→ 指给他按路径 opt-in,或直接锁其配色。其它品牌/模板同理:**用户给 `templates/` 下明确路径才触发**(见 strategist.md 模板分发),不主动猜、不模糊匹配。 +- **例外(主动提示):中国建材总院系汇报** —— 受众/素材/用户机构指向 **中国建筑材料科学研究总院 · 中国建材(CNBM)系**(工作汇报/立项/项目评审/**职称评审**/品牌宣讲)时,策略阶段**主动**把整套品牌模板 `templates/layouts/zongyuan_red/`(八边形 logo + 品牌红 `#D7000E` + 总部大楼实景铺底,5 页齐)作为候选点名给用户,用户点头再按明确路径套入(见 strategist.md §e "中国建材总院" 提示)。这是唯一鼓励主动提模板的场景;其余仍等明确路径。 --- diff --git a/skills/ppt/references/strategist.md b/skills/ppt/references/strategist.md index c112b33..3e01876 100644 --- a/skills/ppt/references/strategist.md +++ b/skills/ppt/references/strategist.md @@ -123,6 +123,8 @@ Proactively provide a color scheme (HEX values) based on content characteristics > **商务红 default candidate.** For Chinese state-enterprise / group / research-institute business decks (工作汇报 / 述职 / 方案评审 / 年度总结 / 科技成果), offer **商务红 `#C00000`** as one of the ≥3 color candidates by default — it is the conventional, expected business color in this context. Anchor a red-dominant scheme on it: pair with a 鎏金 `#BF9B5F` *or* 沉靛蓝 `#2B4C7E` accent (red-gold or red-blue, pick one as the point accent), warm off-white surface (`#FBF5F5`), and reserve solid `#C00000` for headings / key data / one color block — never a full-canvas red. A ready-made bundle of exactly this (palette + serif-title typography + filled-icon style) ships as the **`business-red` brand preset** (`templates/brands/business-red/`); when the user wants "红色 / 商务红 / 中建材风" point them at it (apply by explicit path per Step 3) or lock its palette inline. +> **中国建材总院 → 主动提 `zongyuan_red` 整套模板.** 当受众 / 素材 / 用户机构指向 **中国建筑材料科学研究总院 · 中国建材(CNBM)系**(工作汇报 / 述职 / 立项 / 项目评审 / **职称评审** / 品牌宣讲)时,除商务红候选外,**主动在 a–h 预览里把 `templates/layouts/zongyuan_red/` 作为一个候选点名给用户**(一句话:"你们总院有现成品牌模板 `zongyuan_red`(八边形 logo + 品牌红 `#D7000E` + 总部大楼实景铺底,封面/目录/章节/内容/尾页 5 页齐),要不要直接套?")。与 `business-red` 的区别:business-red 只是**配色+字体身份预设**(自由设计上皮用);zongyuan_red 是**带真实 logo/实景照片的整套 5 页版式**,要品牌一致、省事就用它。仍是 opt-in —— 用户点头后按 Step 3 以**明确路径**套入锁定其 identity+structure;用户要另起风格 / 换配色就走自由设计,不强推。 + **Color rules**: 60-30-10 rule (primary 60%, secondary 30%, accent 10%); text contrast ratio >= 4.5:1; no more than 4 colors per page. **Lock the full neutral set the visual style implies** — not just primary / secondary / accent / border. Predict the extra neutral tiers the locked `visual_style` (§d Layer 2) needs and lock them now; `spec_lock.colors` must be complete before generation, and the Executor draws only from it (never invents a tone mid-deck). diff --git a/skills/ppt/templates/layouts/layouts_index.json b/skills/ppt/templates/layouts/layouts_index.json index 4c56ab5..9462ad0 100644 --- a/skills/ppt/templates/layouts/layouts_index.json +++ b/skills/ppt/templates/layouts/layouts_index.json @@ -83,5 +83,17 @@ "content", "ending" ] + }, + "zongyuan_red": { + "summary": "中国建筑材料科学研究总院/中国建材集团品牌汇报:政企科研汇报、专项立项、项目评审、职称评审、品牌宣讲。", + "canvas_format": "ppt169", + "page_count": 5, + "page_types": [ + "cover", + "toc", + "chapter", + "content", + "ending" + ] } -} +} \ No newline at end of file diff --git a/skills/ppt/templates/layouts/zongyuan_red/01_cover.svg b/skills/ppt/templates/layouts/zongyuan_red/01_cover.svg index 810ee4b..60fe229 100644 --- a/skills/ppt/templates/layouts/zongyuan_red/01_cover.svg +++ b/skills/ppt/templates/layouts/zongyuan_red/01_cover.svg @@ -1,87 +1,26 @@ - - - - - - - - - - - + + - - + + + - - + + + - - + + + 中国建筑材料科学研究总院有限公司 + China Building Materials Academy - - - + + + {{TITLE}} - - - - - - - - - - - - - - - - - - - - - - - - REPORT · 2026 - - - {{TITLE}} - - - {{SUBTITLE}} - - - - - - - 汇报人 - {{AUTHOR}} - - 汇报日期 - {{DATE}} - - - - - 01 - - COVER PAGE - - - - - - CHINA · RESEARCH INSTITUTE - - - - - - - + + {{SUBTITLE}} + {{AUTHOR}} · {{DATE}} diff --git a/skills/ppt/templates/layouts/zongyuan_red/02_chapter.svg b/skills/ppt/templates/layouts/zongyuan_red/02_chapter.svg index eb7c7d0..366cd5e 100644 --- a/skills/ppt/templates/layouts/zongyuan_red/02_chapter.svg +++ b/skills/ppt/templates/layouts/zongyuan_red/02_chapter.svg @@ -1,66 +1,24 @@ - - - - - - - + + - - + + + - - + + + - - + + + PART {{CHAPTER_NUM}} - - - + + {{CHAPTER_TITLE}} + - - - - - - - - - - - - {{CHAPTER_NUM}} - - - - - PART 0{{CHAPTER_NUM}} - - - - - - - {{CHAPTER_TITLE}} - - - - - - - - - - - - - - - - CHAPTER DIVIDER - - - - 0{{CHAPTER_NUM}} + + diff --git a/skills/ppt/templates/layouts/zongyuan_red/02_toc.svg b/skills/ppt/templates/layouts/zongyuan_red/02_toc.svg index 0273e0b..997fe2f 100644 --- a/skills/ppt/templates/layouts/zongyuan_red/02_toc.svg +++ b/skills/ppt/templates/layouts/zongyuan_red/02_toc.svg @@ -1,74 +1,35 @@ - - - + + - - + + + - - - + + + + + 目 录 + + CONTENTS + + + + + {{TOC_ITEM_1_TITLE}} + + + {{TOC_ITEM_2_TITLE}} + + + {{TOC_ITEM_3_TITLE}} + + + {{TOC_ITEM_4_TITLE}} - - - - - - CONTENTS - - - - - 02 - - - - - - 01 - - {{TOC_ITEM_1_TITLE}} - PART ONE - - - - - 02 - - {{TOC_ITEM_2_TITLE}} - PART TWO - - - - - 03 - - {{TOC_ITEM_3_TITLE}} - PART THREE - - - - - 04 - - {{TOC_ITEM_4_TITLE}} - PART FOUR - - - - - 05 - - {{TOC_ITEM_5_TITLE}} - PART FIVE - - - - - - - 02 - 总院品牌红模板 · CONTENTS - + + diff --git a/skills/ppt/templates/layouts/zongyuan_red/03_content.svg b/skills/ppt/templates/layouts/zongyuan_red/03_content.svg index 46d6f1c..ec6afe0 100644 --- a/skills/ppt/templates/layouts/zongyuan_red/03_content.svg +++ b/skills/ppt/templates/layouts/zongyuan_red/03_content.svg @@ -1,56 +1,48 @@ - - - - - - - - - - - - - + + - - + - - + + - - - + + {{PAGE_TITLE}} + + {{PAGE_SUBTITLE}} + + + + + + + + + + + 要点一 + 说明文字占位 + + + + 要点二 + 说明文字占位 + + + + 要点三 + 说明文字占位 + + + + 要点四 + 说明文字占位 - - - - {{PAGE_TITLE}} - - - - - - - - 核心结论 / KEY TAKEAWAY - 这里放一句断言式的核心观点,用户可替换或删除本区域 - - - - - - - {{CONTENT_AREA}} - 主要内容区:文字 / 图表 / 卡片 / 流程 等 - - - - - - - {{PAGE_NUM}} - 总院品牌红模板 · CONTENT - + + + {{PAGE_NUM}} diff --git a/skills/ppt/templates/layouts/zongyuan_red/04_ending.svg b/skills/ppt/templates/layouts/zongyuan_red/04_ending.svg index f2fc376..8830d14 100644 --- a/skills/ppt/templates/layouts/zongyuan_red/04_ending.svg +++ b/skills/ppt/templates/layouts/zongyuan_red/04_ending.svg @@ -1,57 +1,19 @@ - - - - - - - - + + - - + + + - - + + - - - + + 材料创造美好世界 + {{THANK_YOU}} - - - - - - - - - - - - - - - {{THANK_YOU}} - - - THANK YOU - - - - - - - - Q & A - - - - - - {{CONTACT_INFO}} - CHINA · RESEARCH INSTITUTE - - - - + + {{CONTACT_INFO}} diff --git a/skills/ppt/templates/layouts/zongyuan_red/cover_bg.jpg b/skills/ppt/templates/layouts/zongyuan_red/cover_bg.jpg new file mode 100644 index 0000000..73598f2 Binary files /dev/null and b/skills/ppt/templates/layouts/zongyuan_red/cover_bg.jpg differ diff --git a/skills/ppt/templates/layouts/zongyuan_red/design_spec.md b/skills/ppt/templates/layouts/zongyuan_red/design_spec.md index 34bd82e..c399b47 100644 --- a/skills/ppt/templates/layouts/zongyuan_red/design_spec.md +++ b/skills/ppt/templates/layouts/zongyuan_red/design_spec.md @@ -1,102 +1,93 @@ -# 总院品牌红模板 (zongyuan_red) +# 中国建材总院模板 (zongyuan_red) ## Template Overview - **Template ID**: `zongyuan_red` -- **Display Name**: 总院品牌红 -- **Category**: `brand` / `government` +- **Display Name**: 中国建材总院 +- **Category**: `brand` / `government` / `research-institute` - **Canvas Format**: `ppt169` (1280×720) -- **Applicable Scenarios**: 政府/科研院所汇报、专项立项、项目评审、品牌宣讲 -- **Tone**: 严谨权威、政务正式、品牌辨识度强 -- **Theme Mode**: Light theme (white background + brand red accents + dark navy text) -- **Source**: Adapted from 总院 (China Research Institute) corporate PPT template +- **Applicable Scenarios**: 政企/科研院所汇报、专项立项、项目评审、职称评审、品牌宣讲 +- **Tone**: 严谨权威、政务正式、品牌辨识度强、简洁淡雅 +- **Theme Mode**: Light theme(白/浅灰底 + 品牌红强调 + 近黑文字) +- **Source**: 逆向自 中国建筑材料科学研究总院有限公司(China Building Materials Academy)官方 PPT 模板 `总院模板.pptx`(封面/内容/尾页三档实测,章节/目录页按同一八边形+红斜三角 DNA 合成) ## Color Palette | Role | HEX | Usage | |------|-----|-------| -| Primary (Brand Red) | `#D6000F` | 顶部色条、标题、强调、logo、关键数字 | -| Dark Navy | `#1F2A44` | 副标题、图表主色、深色文字 | -| Neutral Body | `#333333` | 正文文字 | -| Neutral Muted | `#666666` | 辅助/说明文字 | -| Background | `#F5F5F7` | 页面背景(可选白底) | -| Surface | `#FFFFFF` | 卡片/内容面板 | -| Divider | `#E0E0E0` | 分隔线、描边 | -| Takeaway Bg | `#D6000F` @ 0.08 opacity | 结论框浅底 | -| Alert / Emphasis | `#D6000F` | 红色强调(与主色同) | -| Success | `#2E7D32` | 正向指标 | +| Primary(品牌红) | `#D7000E` | logo、主红块、内容页底部红条、卡片红顶条、关键强调 | +| Primary(目录标题红) | `#D52C24` | 目录页"目 录"标题(略哑,与主红区分) | +| Dark Text(近黑) | `#181717` | 机构名、主标题、内容页标题、卡片标题 | +| Neutral Gray | `#6F6F6F` | 副标题、日期、说明文字、页码 | +| Divider Gray | `#BCBDBD` | 内容页标题分隔线、副标题 | +| Card Surface | `#ECECEC` | 卡片底、封面顶/底细边带 | +| Background | `#FFFFFF` | 页面底色 | -> 避免过度使用红色——红色仅用于品牌色条、标题、关键数字;大面积背景保持白/浅灰。 +> 红仅用于 logo / 主红块 / 底部红条 / 卡片红顶条 / 关键数字;大面积保持白与浅灰,红灰为主、简洁淡雅。 ## Typography -- **Primary Font**: Microsoft YaHei -- **Title**: 32px bold, color `#1F2A44` (or `#D6000F` for chapter/emphasis) -- **Subtitle**: 18-20px regular, color `#666666` -- **Body**: 15-16px regular, color `#333333` -- **Data/Number**: Arial Bold, color `#D6000F` -- **Footer**: 12-14px, color `#999999` +- **Primary Font(CJK)**: 微软雅黑(Microsoft YaHei);栈尾 `sans-serif` +- **Latin / 数字**: Arial +- **可选标题体**: 方正兰亭黑(FZLanTingHei-M-GBK,原件封面标题用;未装则回退微软雅黑) +- **Title**: 44–46px bold(封面白字 / 章节近黑) +- **Content Title**: 26px bold `#181717` +- **Subtitle / Body**: 14–20px,`#6F6F6F` / `#BCBDBD` +- **Number / Footer**: Arial,`#6F6F6F` + +## Logo(bundled) + +- **File**: `logo.png` — 红色八边形(八角星镂空)+ "中国建材" 字标,透明底 +- **Usage**: 封面顶左(octagon + 机构全称并排)、内容页右上角、章节/目录白色区角标 +- **禁忌**: 不可置于红底之上(红字标会与红底同色不可见)——红区内改用反白或留白区放置 + +## Bundled Assets + +| File | 用途 | +|------|------| +| `logo.png` | 八边形品牌字标(封面/内容/尾页角标) | +| `cover_bg.jpg` | 总部大楼灰度实景(封面/目录页铺底,配白罩淡化) | +| `ending_bg.jpg` | 材料应用马赛克灰度实景(尾页铺底) | ## Layout Conventions ### Universal Rules -- 顶部 6px 红色品牌色条(内容页通用) -- 右上角 logo 占位区(80×50,距右边 40px) -- 底部页脚(30px 浅灰背景)含页码(右下 arial)和模板信息(左下微软雅黑灰字) +- 画布 16:9(1280×720 / 13.33×7.5 in,英寸×96 = px) +- 实景铺底页(封面/目录/尾页)统一压白罩(`#FFFFFF` fill-opacity 0.30–0.48)让文字浮起 +- 内容页右上角八边形 logo、底部品牌红条为品牌识别核心,禁省略 +- 卡片网格:4 列 × 266px 宽,间距 ≈22px,内容区 y≈150 起 ### Page Structure -1. **Cover (01_cover.svg)** - - 左侧白色主标题区(占 55%) - - 右侧深色/图片区(占 45%,可换图) - - 顶部细红条 + logo 区 - - 底部副标题/日期/作者 - -2. **TOC (02_toc.svg)** - - 左侧"目录"超大红色字 - - 右侧章节列表:红色序号 + 章节标题 - - 顶部红色品牌色条 - -3. **Chapter (02_chapter.svg)** - - 超大背景数字(PART 01,淡红 0.08 透明) - - 红色小胶囊标签 "PART 0N" - - 中央大标题 - - 下方副标题 - -4. **Content (03_content.svg)** - - 顶部:6px 红条 + 标题(32px)+ 分隔线 - - 可选:"Takeaway/结论" 浅红底色条(结论先行) - - 主内容区 40-620 高度 - - 底部页脚 - -5. **Ending (04_ending.svg)** - - 深色渐变背景(`#1F2A44` → `#8B0010`) - - 中央"谢 谢!"超大字 - - "Thank You" 英文副标 - - Q&A 胶囊 - - 底部信息区 +1. **Cover (01_cover.svg)** — 总部大楼灰度铺底 + 顶左 logo & 机构全称(近黑)+ 居中主红块(右满出血)+ 白色主标题 + 副标题/作者/日期 +2. **TOC (02_toc.svg)** — 左上实景区 + 右下大红斜三角 + "目 录"红标题(`#D52C24`)+ 白字方块序号章节条目 + 左下 logo +3. **Chapter (02_chapter.svg)** — 白底 + 右侧八边形品牌水印(呼应 logo)+ 左侧红 PART 胶囊 + 章节大标题 + 红下划线 + 左下 logo +4. **Content (03_content.svg)** — 左缘红方块 + 标题(26px 近黑)+ 灰分隔线 + 右上 logo + 灰底红顶条卡片 + 底部红条 + 页码 +5. **Ending (04_ending.svg)** — 材料马赛克灰度铺底 + 集团口号"材料创造美好世界"(红)+ Thanks + 结束信息 + 右上 logo ## Placeholder Contract | Page | Placeholders | |------|-------------| -| Cover | `{{TITLE}}`, `{{SUBTITLE}}`, `{{DATE}}`, `{{AUTHOR}}` | -| TOC | `{{TOC_ITEM_1_TITLE}}`, `{{TOC_ITEM_2_TITLE}}`, `{{TOC_ITEM_3_TITLE}}`, `{{TOC_ITEM_4_TITLE}}`, `{{TOC_ITEM_5_TITLE}}` | +| Cover | `{{TITLE}}`, `{{SUBTITLE}}`, `{{AUTHOR}}`, `{{DATE}}` | +| TOC | `{{TOC_ITEM_1_TITLE}}` … `{{TOC_ITEM_4_TITLE}}` | | Chapter | `{{CHAPTER_NUM}}`, `{{CHAPTER_TITLE}}` | -| Content | `{{PAGE_TITLE}}`, `{{CONTENT_AREA}}`, `{{PAGE_NUM}}` | -| Ending | `{{THANK_YOU}}`, `{{CONTACT_INFO}}` | +| Content | `{{PAGE_TITLE}}`, `{{PAGE_SUBTITLE}}`, `{{PAGE_NUM}}`(内容区卡片按本页内容重排) | +| Ending | `{{THANK_YOU}}`(默认 "Thanks"), `{{CONTACT_INFO}}` | ## Design Principles -1. **Brand consistency** — 红色色条和顶栏是品牌识别核心,禁止省略 -2. **Conclusion-first** — 内容页优先使用 assertion headline(断言式标题)+ takeaway 条 -3. **Whitespace** — 大面积留白,只让红色出现在关键位置 -4. **Structure clarity** — 清晰的分隔线、统一的 padding(40/60/80 栅格) -5. **Data visibility** — 关键数字用红色 Arial Bold 放大显示 +1. **Brand consistency** — 八边形 logo + 品牌红是识别核心,禁省略/换色 +2. **Restraint** — 红灰为主,红仅点在 logo/红块/红条/红顶条/关键数字;大面积白与浅灰 +3. **Conclusion-first** — 内容页优先断言式标题 + 结论先行 +4. **Whitespace** — 大面积留白,实景铺底页压白罩保持淡雅 +5. **Structure clarity** — 统一分隔线、4 列卡片网格、40/49px 左缘栅格 ## SVG Technical Constraints -严格遵守 PPT Master 全局技术约束: -- 禁用 `mask` / `