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: multi-deck PPTX intake + material-divergence confirmation field
hugohe363ee66ef12a9
diff --git a/docs/roadmap.md b/docs/roadmap.mdindex f0afd499..7494f8dd 100644--- a/docs/roadmap.md+++ b/docs/roadmap.md@@ -54,7 +54,15 @@ The past two months' structural capability growth. Single flags / incremental po- **mode / visual-style system validated on real decks + four calibration tightenings landed** — the 5 modes + 18 visual-styles + the `custom` escape hatch were exercised on five covering decks (briefing×data-journalism / narrative×photo-editorial / instructional×chalkboard / showcase×glassmorphism / custom×zine, with the narrative deck going through the AI-image branch): **zero selection misses** (all four Close-calls tie-breakers fired and held against the real grey-zone pulls), **discipline fully honored** (zero HEX / Reference strength / whole-page layout language), **the `custom` mechanism works** (a `mode_behavior` prose paragraph carried a 10-page generation and reads as plain language at confirmation, not a bare token), **mode ⟂ visual_style holds** (any combination without bleed, including a positive check of the "keynote/launch = mode not style" route), export 5/5 decks × every page with 0 failures. Tightened four spots from the real signal: `strategist §e` now locks the full neutral tier set the visual_style implies up front (killing the mid-deck color top-ups seen in three consecutive decks), `executor-base §1` re-skins chart/layout template gradients-shadows-fills to the deck's visual_style (templates supply structure, not skin; mirror templates stay verbatim per §1.1), `briefing §1` makes `core_message` state coverage rather than a claim (briefing-only; global §IX assertion semantics stay for narrative/instructional/pyramid), and `svg_quality_checker` fixes font-family drift false positives (delimiter-matched capture + stack normalization) and drops the font-size ceiling for showcase mode and poster visual-styles- **Optional spec-review checkpoint shipped** ([`workflows/refine-spec.md`](../skills/ppt-master/workflows/refine-spec.md)) — an opt-in pause after the Eight Confirmations: when the user explicitly asks (default OFF), the Strategist produces the full `design_spec.md` + `spec_lock.md`, then stops so the user can revise any part of the spec (outline / color / typography / layout / image strategy / page rhythm) before generation, keeping both files in sync. Same shape as the split-mode note — it never fires on its own, the default pipeline is unchanged, and it surfaces as one opt-in line inside the Eight Confirmations. Review lenses (logical clarity / information density / focus / register / emotional resonance / chapter balance + the design dimensions) give a direction only, never a numeric threshold (`Reference` strength). Prompted by [@cuberoocp](https://github.com/cuberoocp) in [issue #173](https://github.com/hugohe3/ppt-master/issues/173)- **Interactive visual Eight Confirmations page (Step 4)** ([`scripts/confirm_ui/server.py`](../skills/ppt-master/scripts/confirm_ui/server.py), field schema [`scripts/docs/confirm_ui.md`](../skills/ppt-master/scripts/docs/confirm_ui.md)) — the Eight Confirmations move from chat-only to a browser page that auto-launches by default at Step 4: enumerable fields (canvas / mode / visual_style / icons / image usage / formula & generation policy) list common options from `catalogs.json`, while generative fields present candidates — color swatches, live font previews (CJK / Latin previewed independently), and AI-image rendering × palette picks; plus live swatch feedback on custom HEX, a live combined color × typography preview, and a body-size range hinted from the chosen canvas. It **shares port `5050`** with the Step 6 Live Preview (they never run at once — the page auto-`--shutdown`s at the end of Step 4 to free the port; if the port is busy the launcher auto-advances to the next free one). On principle **chat stays the canonical channel and the page is a convenience layer**: the page's `result.json` is authoritative over the recommendations and is consumed in place downstream (image plan / `image_strategy` / fonts / the split and refine-spec toggles all read from it), and any failure to open / timeout / headless host degrades losslessly to the chat-summary fallback-- **A batch of source-conversion fidelity gains** — less information dropped as source material enters the pipeline: `doc_to_md` converts Word OMML / Office Math equations to inline LaTeX, `pdf_to_md` recognizes `Figure N |` pipe-delimited captions, and `ppt_to_md` preserves hyperlinks already in the source deck (run-level external `[text](url)` / slide-internal jumps `[text](#slide-N)` / shape-level clicks, with dangerous-scheme filtering and anchor-text Markdown escaping). Caption recognition is based on [@suay1113](https://github.com/suay1113)'s [PR #191](https://github.com/hugohe3/ppt-master/pull/191); hyperlink preservation is distilled from [@ZhaoZuohong](https://github.com/ZhaoZuohong)'s [PR #155](https://github.com/hugohe3/ppt-master/pull/155)+- **A batch of source-conversion fidelity gains** — less information dropped as source material enters the pipeline: `doc_to_md` converts Word OMML / Office Math equations to inline LaTeX, `pdf_to_md` recognizes `Figure N |` pipe-delimited captions, and `ppt_to_md` preserves hyperlinks already in the source deck (run-level external `[text](url)` / slide-internal jumps `[text](#slide-N)` / shape-level clicks, with dangerous-scheme filtering and anchor-text Markdown escaping) and transcribes native chart data into Markdown tables (values survive the conversion instead of collapsing to a single picture). Caption recognition is based on [@suay1113](https://github.com/suay1113)'s [PR #191](https://github.com/hugohe3/ppt-master/pull/191); hyperlink preservation is distilled from [@ZhaoZuohong](https://github.com/ZhaoZuohong)'s [PR #155](https://github.com/hugohe3/ppt-master/pull/155)++- **Content-faithful PPT beautification / re-layout shipped** ([`workflows/beautify-pptx.md`](../skills/ppt-master/workflows/beautify-pptx.md)) — mirror of `template-fill`: template-fill reuses a deck's design with new content, beautify keeps the content and redoes the layout. Given an existing PPTX, **every text string is preserved verbatim (nothing added / removed / reworded)**; it **extracts and inherits the source deck's visual identity (palette / fonts, `theme` or `observed` offered as two confirm-page candidates)** and redoes only layout / hierarchy / whitespace, strict 1:1 page count and order, with charts / tables regenerated natively from extracted data (values frozen) and source pictures re-laid-out. Technically still "generate a native, editable PPTX from scratch" (`ppt_to_md` extracts content → main pipeline → a brand-new deck), not a patch over the original, so it stays clear of Non-goals #53. Adds `beautify_identity.py` / `beautify_inventory.py`; the confirm page is seeded from the source for the user to review. Honest v1 ceiling: it does not relieve information overload (a crowded page improves within itself; true re-pagination is the main pipeline), does not guarantee coordinate-level paste-back, and combo / dual-axis / waterfall charts lose the un-captured plots++- **Multi-deck PPTX intake + `analysis/` source-name prefixing** — a main-pipeline project can now combine several source decks: each writes its own `<stem>.identity.json` / `<stem>.slide_library.json`, with every deck's digest inlined under `decks[]` in the single index `source_profile.json` (preserving the "Strategist must-read `source_profile.json`" single-entry contract — one entry for a one-deck project, several for a combined one; re-importing the same stem replaces its entry). `beautify` / `template-fill` stay single-deck (1:1) and read their own `<stem>.*` artifacts++- **Material divergence (a free-text field under §c Audience)** — a main-pipeline content-strategy question added as a **free-text box** under the audience field: the user states in their own words how closely to follow the source vs how freely to reshape it (blank = balanced default). Deliberately not a fixed set of options, not recommended from analyzing the source, and not coupled to page count — it is purely the user's stated intent. However freely they ask, facts **stay sourced** — reorganize / reframe / expand / connect what is in the source, never import facts from outside it (that is the `topic-research` job). The Strategist reads the prose when authoring the §IX outline and records it in `design_spec §I`; it is **not** written to `spec_lock` (the Executor never reads it). `mode` and divergence are orthogonal. Beautify / template-fill freeze content and do not surface this field++- **A batch of default-behavior and intake standardizations** — per-element entrance animation now defaults off (page transition `fade` only; element builds are opt-in via `-a auto` / `animations.json`), removing the auto-cascade "AI deck" tell; per-project `icons/` copies chosen icons into the project at selection time and embeds project-first; `analysis/` is established as the canonical must-read layer for machine-extracted facts (PPTX intake bundle + `image_analysis.csv`); the main pipeline treats a source deck's identity (palette / fonts / layout) as **reference, not constraint** (inherit or redesign by Strategist judgment, defaulting to fresh design); the confirm page gains a custom color input---@@ -62,8 +70,8 @@ The past two months' structural capability growth. Single flags / incremental poDirections actively underway or up next, with no committed timeline.-- **Content-faithful PPT beautification / re-layout (next direction)** — a new route that mirrors `template-fill-pptx`: where `template-fill` reuses a deck's design and swaps in new content, this one inverts it — keep a deck's content, redo its layout. Given an existing PPTX, **every piece of text is preserved verbatim (nothing added / removed / reworded)**; beautification happens only in layout, hierarchy, whitespace, pagination, and visual structure (an ugly deck is usually ugly in its density and hierarchy, not in its colors or fonts). It also **extracts and inherits the source deck's visual identity (palette / fonts / layout idiom)** so the newly generated native elements match the original — they can be copied straight back into the original PPT and still look coherent. Because of that, this route does *not* freely apply the `visual-style` catalog; it carries over the style lifted from the source deck (the existing [`create-brand`](../skills/ppt-master/workflows/create-brand.md) / `pptx_to_svg` theme extraction already does this). Technically it is still "generate a native, editable PPTX from scratch" (`ppt_to_md` extracts content → main pipeline → a brand-new deck), not a patch over the original file, so it stays clear of the #53 "text-only fill of an arbitrary template" line under Non-goals. The contract: **text untouched; visual identity taken from the source deck, not freely reskinned; all the freedom to beautify goes to layout and hierarchy.** Likely shape: a standalone workflow plus a content-faithful Strategist sub-mode. Open boundaries still to settle: strict pagination fidelity vs. allowing re-pagination, and how to handle tables / charts / existing images-- Otherwise: the mode / visual-style validation and calibration is settled (see "2026-06" above) — the structure (5 modes + 18 visual-styles + custom) is locked, the four adjacent pairs are consolidated into one Close-calls table, and the four calibration tightenings have landed. Apart from the direction above, future direction is driven by real usage signal and feedback; long-running improvements are under "Ongoing maintenance" below, and evaluated-out directions under "Non-goals"+- **Real-usage calibration of multi-deck intake and material divergence (just landed)** — multi-deck combined intake (`<stem>` prefixing + a `decks[]` merge index) and the material-divergence free-text field (under §c audience) both shipped (see "2026-06" above); next is calibration from real usage: same-stem collisions across decks currently let the later one overwrite the former — whether dedupe / numbering is needed awaits signal; and whether the Strategist reads the free-text intent accurately, and whether the "facts stay sourced" line holds when the user asks for free reshaping, awaits real generation. Neither gets a mechanical threshold added pre-emptively+- Otherwise: the mode / visual-style validation and calibration is settled (see "2026-06" above) — the structure (5 modes + 18 visual-styles + custom) is locked, the four adjacent pairs are consolidated into one Close-calls table, and the four calibration tightenings have landed. Future direction is driven by real usage signal and feedback; long-running improvements are under "Ongoing maintenance" below, and evaluated-out directions under "Non-goals"---diff --git a/docs/zh/roadmap.md b/docs/zh/roadmap.mdindex ed462ef4..2b22e859 100644--- a/docs/zh/roadmap.md+++ b/docs/zh/roadmap.md@@ -54,7 +54,15 @@- **mode / visual-style 体系真实 deck 验证完成 + 四项校准收紧落地** — 5 mode + 18 visual-style + `custom` 逃生舱在 5 份覆盖性 deck 上跑过验证(briefing×data-journalism / narrative×photo-editorial / instructional×chalkboard / showcase×glassmorphism / custom×zine,其中 narrative 一份走 AI 图生成分支):**选型零误判**(四对 Close-calls 灰区引力全被触发且全抗住)、**纪律全落实**(零 HEX / Reference 强度 / 整页版面语言)、**custom 机制可用**(`mode_behavior` 散文段落撑过 10 页生成、能讲成大白话让用户确认)、**mode ⟂ visual_style 正交成立**(任意组合无串味,含「keynote/发布会=mode 不是 style」路由正面验证)、导出 5/5 deck × 全页 0 失败。据真实信号收紧四处:`strategist §e` 按 visual_style 预判中性档位一次锁全(消除连续三份的 Executor 中途补色)、`executor-base §1` 套模板页重皮到当前 visual_style(模板供结构不供皮,镜像模板仍按 §1.1 逐字保留)、`briefing §1` 的 `core_message` = 本页覆盖什么而非证明什么(briefing 专属例外,全局 §IX 论断语义保留给 narrative/instructional/pyramid)、`svg_quality_checker` 修字体 drift 误报(按定界符匹配 + font-stack 归一化)+ 放宽 showcase mode 与 poster 类 visual-style 的字号上限- **可选 spec 复核环节上线**([`workflows/refine-spec.md`](../../skills/ppt-master/workflows/refine-spec.md)) — 八项确认后新增一个 opt-in 停顿点:用户明确要求时(默认 OFF),Strategist 先产出完整 `design_spec.md` + `spec_lock.md`,停下来让用户对 spec 任意部分(大纲 / 配色 / 排版 / 版式 / 图片策略 / page rhythm)深入讨论修改,改完同步两个文件再进生成。与 split-mode 同构——不主动触发、默认管线零变化,仅在八项确认里多一行 opt-in 提示。复核视角(逻辑清晰度 / 信息密度 / 焦点 / 口语化 / 感染力 / 章节配比 + 各设计维度)只给方向、不落任何数字阈值(`Reference` 强度)。启发自 [@cuberoocp](https://github.com/cuberoocp) [issue #173](https://github.com/hugohe3/ppt-master/issues/173)- **交互式可视化八项确认页(Step 4)**([`scripts/confirm_ui/server.py`](../../skills/ppt-master/scripts/confirm_ui/server.py),字段 schema [`scripts/docs/confirm_ui.md`](../../skills/ppt-master/scripts/docs/confirm_ui.md)) — 八项确认从纯聊天升级为浏览器可视化页面,Step 4 默认自动拉起:可枚举字段(canvas / mode / visual_style / 图标 / 图片用法 / 公式与生成策略)从 `catalogs.json` 出常用项、生成型字段摆候选——配色 swatch、字体实时预览(CJK / Latin 各自独立)、AI 图 rendering × palette 候选;并支持自定义 HEX 即时 swatch 反馈、配色 × 字体组合的实时合成预览、canvas 尺寸联动建议正文字号区间。与 Step 6 Live Preview **共用 `5050` 端口**(永不同时跑,确认页在 Step 4 末尾自动 `--shutdown` 让出端口;端口被占则自动顺延到下一个空闲口)。原则上**聊天始终是 canonical 通道、确认页只是便利层**:页面写出的 `result.json` 对推荐值具权威性、由下游就地消费(图片计划 / `image_strategy` / 字体 / split 与 refine-spec 开关都从中读取),任何打不开 / 超时 / 无 GUI 的情况都无损回退到聊天总结路径-- **源文档转换保真度提升一批** — 源材料进管线时更少丢信息:`doc_to_md` 把 Word 里的 OMML / Office Math 公式转成内联 LaTeX、`pdf_to_md` 识别 `Figure N |` 竖线分隔的图注、`ppt_to_md` 保留源 deck 已有的超链接(run 级外链 `[text](url)` / slide 内部跳转 `[text](#slide-N)` / shape 级点击,含危险 scheme 过滤与锚文本 Markdown 转义)。图注识别基于 [@suay1113](https://github.com/suay1113) [PR #191](https://github.com/hugohe3/ppt-master/pull/191),超链接保留提炼自 [@ZhaoZuohong](https://github.com/ZhaoZuohong) [PR #155](https://github.com/hugohe3/ppt-master/pull/155)+- **源文档转换保真度提升一批** — 源材料进管线时更少丢信息:`doc_to_md` 把 Word 里的 OMML / Office Math 公式转成内联 LaTeX、`pdf_to_md` 识别 `Figure N |` 竖线分隔的图注、`ppt_to_md` 保留源 deck 已有的超链接(run 级外链 `[text](url)` / slide 内部跳转 `[text](#slide-N)` / shape 级点击,含危险 scheme 过滤与锚文本 Markdown 转义)并把原生图表数据转写成 Markdown 表格(数值随转换存活,不再只剩一张图)。图注识别基于 [@suay1113](https://github.com/suay1113) [PR #191](https://github.com/hugohe3/ppt-master/pull/191),超链接保留提炼自 [@ZhaoZuohong](https://github.com/ZhaoZuohong) [PR #155](https://github.com/hugohe3/ppt-master/pull/155)++- **内容保真的 PPT 美化 / 重排版上线**([`workflows/beautify-pptx.md`](../../skills/ppt-master/workflows/beautify-pptx.md)) — 与 `template-fill` 互为镜像:template-fill 复用某份 deck 的设计换新内容,beautify 反过来保留内容、重做版面。给一份现成 PPTX,**全部文字逐字保留(不增 / 不删 / 不改写)**,从源 deck 提取并**继承其视觉身份(配色 / 字体,`theme` 或 `observed` 两套候选过确认页)**,只重做版面 / 层级 / 留白;严格 1:1 页数页序,图表 / 表格从抽取数据原生重绘(数据冻结)、源配图重新排布。技术上仍走从零生成原生 PPTX 管线(`ppt_to_md` 抽内容 → 主管线 → 全新 deck),不补丁原文件,因此不碰 Non-goals #53。新增 `beautify_identity.py` / `beautify_inventory.py`,confirm 页全字段按源 seed 后用户复核。v1 天花板(诚实标注):不缓解信息过载(挤页只在页内改,真要重排分页属主管线)、不保证坐标级 paste-back、combo / dual-axis / waterfall 图丢未捕获的绘图层++- **PPTX intake 多 deck 支持 + `analysis/` 源名前缀** — 主管线项目现在可把多份源 deck 合并进来:每份写 `<stem>.identity.json` / `<stem>.slide_library.json`,各自 digest 内联进单一索引 `source_profile.json` 的 `decks[]`(保住"Strategist 必读 `source_profile.json`"单入口契约,单 deck 即一条、多 deck 列多条;同 stem 重导覆盖该条)。`beautify` / `template-fill` 仍是 1:1 单 deck,按 stem 读自己那份 `<stem>.*`++- **材料发散度(§c 受众下的自由文字项)** — 主管线在 §c 受众文本框下加一个**纯文字**小问:用户用自己的话写要多贴源、还是多放开重塑(留空=平衡默认)。刻意不做固定档位、不按源信号替用户推荐、不联动页数——就是问用户本人意图。无论写得多放开都**事实守源**:只对源内内容重组 / 重框 / 展开 / 连结,绝不引入源外事实(那是 `topic-research` 的活)。Strategist 写 §IX 大纲时读这段 prose 消费、记 `design_spec §I`,**不进 spec_lock**(Executor 不读);`mode` 与发散度正交。beautify / template-fill 内容冻结,不暴露此项++- **一批默认行为与入口标准化** — 逐元素入场动画默认关(只留转场 `fade`;元素动画改 opt-in `-a auto` / `animations.json`),消除"自动级联入场"的 AI 味;per-project `icons/` 在选择时把选中图标复制进项目、嵌入优先本地;`analysis/` 确立为机器抽取事实的 canonical 必读层(PPTX intake bundle + `image_analysis.csv`);主管线把源 deck 的身份(配色 / 字体 / 版式)当**参考而非约束**(可继承可重设,由策略师判断,默认从零设计);confirm 页支持自定义配色输入---@@ -62,8 +70,8 @@明确在做或下一步要做的方向,不承诺时间窗口。-- **内容保真的 PPT 美化 / 重排版(下一步方向)** — 一条与 `template-fill-pptx` 互为镜像的新路线:`template-fill` 是「复用某份 deck 的设计、换上新内容」,这条反过来——「保留某份 deck 的内容、重做它的版面」。输入一份现成 PPTX,**逐字保留全部文字内容(不增 / 不删 / 不改写)**,美化只发生在版面、层级、留白、分页与视觉结构上(丑 deck 的丑通常在密度与层级,不在它的色与字)。同时**从原 deck 提取并继承其视觉身份(配色 / 字体 / 版面语汇)**,让新生成的原生元素与原 deck 风格一致——可以直接复制回原 PPT 模板、看上去仍然协调;也因此这条路线不自由套用 `visual-style` catalog,而是沿用从源 deck 抽取的风格(现有 [`create-brand`](../../skills/ppt-master/workflows/create-brand.md) / `pptx_to_svg` 主题提取已能做)。技术上仍是「从零生成原生可编辑 PPTX」(`ppt_to_md` 抽内容 → 主管线 → 全新 deck),不是在原文件上打补丁,因此不碰 Non-goals 里 #53 那条「读任意模板只填字」的红线。关键契约:**文字一字不动;视觉身份取自原 deck,不自由换皮;美化的自由度全部留给版面与层级**。落地形态预计为一条独立 workflow + Strategist 的内容保真子模式。仍待定的边界:严格分页保真 vs 允许重排分页、表格 / 图表 / 已有配图如何处理-- 其余:mode / visual-style 体系的验证与校准已收口(见上「2026-06」),结构(5 mode + 18 visual-style + custom)定型、四对近邻消歧并成一张 Close-calls 表、四项校准收紧已落地。除上面这条外,后续方向由真实使用信号与反馈驱动;长期改进见下「持续维护方向」,已评估不做的见「明确不做」+- **多 deck intake 与材料发散度的真实使用校准(刚落地)** — 多 deck 合并 intake(`<stem>` 前缀 + `decks[]` 合并索引)与材料发散度自由文字项(§c 受众下)均已上线(见上「2026-06」),接下来按真实使用信号校准:多份源 deck 同名(stem 冲突)的处理目前是后者覆盖前者,是否需要去重 / 加序号待信号;发散度的自由文字让 Strategist 判得准不准、放开写时「事实守源」边界守不守得住,待真实生成验证。两者都不预先加机械阈值+- 其余:mode / visual-style 体系的验证与校准已收口(见上「2026-06」),结构(5 mode + 18 visual-style + custom)定型、四对近邻消歧并成一张 Close-calls 表、四项校准收紧已落地。后续方向由真实使用信号与反馈驱动;长期改进见下「持续维护方向」,已评估不做的见「明确不做」---diff --git a/skills/ppt-master/SKILL.md b/skills/ppt-master/SKILL.mdindex e5b926e4..2f6d06ff 100644--- a/skills/ppt-master/SKILL.md+++ b/skills/ppt-master/SKILL.md@@ -170,9 +170,9 @@ For PPTX sources, `import-sources` automatically runs the standard intake enrichpython3 ${SKILL_DIR}/scripts/pptx_intake.py <project_path>/sources/<source.pptx> -o <project_path>/analysis```-It writes `identity.json` (canvas, theme palette/fonts, observed usage), `slide_library.json` (text slots, geometry, native tables, native chart caches), and `source_profile.json` (Strategist-facing digest). In the main generation path these are source facts and recommendation candidates, not replica constraints; beautify and template-fill workflows decide separately which fields become locked constraints.+For each PPTX it writes `<stem>.identity.json` (canvas, theme palette/fonts, observed usage) and `<stem>.slide_library.json` (text slots, geometry, native tables, native chart caches), and merges that deck's Strategist-facing digest into the single multi-deck index `analysis/source_profile.json` (`decks[]`, one self-contained entry per source deck, with prefixed artifact pointers). In the main generation path these are source facts and recommendation candidates, not replica constraints; beautify and template-fill workflows decide separately which fields become locked constraints.-Current boundary: PPTX intake is single-deck per project. If multiple PPTX files are imported, the first one writes `analysis/source_profile.json`; later PPTX files are still archived / converted to Markdown, but their intake analysis is skipped with a note rather than overwriting the first deck's facts.+Multi-deck: several PPTX files may be imported into one main-pipeline project — each gets its own `<stem>.*` artifacts and a deck entry in `source_profile.json`. `source_profile.json` stays the single must-read index (one entry for a one-deck project, several for a combined-source project). Stems must be distinct; re-importing the same stem replaces that deck's entry. The beautify / template-fill workflows remain single-deck (1:1 to one chosen source deck) and read that deck's `<stem>.*` artifacts.> ⚠️ **MUST use `--move`** (not copy): all source files — Step 1's generated Markdown, original PDFs / MDs / images — go into `sources/` via `import-sources --move`. After execution they no longer exist at the original location. Intermediate artifacts (e.g., `_files/`) are handled automatically.@@ -308,9 +308,9 @@ Read references/strategist.md> ⚠️ **Mandatory gate**: before writing `design_spec.md`, Strategist MUST `read_file templates/design_spec_reference.md` and follow its full I–XI section structure. See `strategist.md` Section 1.-**`<project_path>/analysis/` is the project's intermediate-analysis folder: the canonical home for machine-extracted source/asset facts — the PPTX intake bundle (`source_profile.json` + `identity.json` + `slide_library.json`) and `image_analysis.csv`. It holds facts, not design contracts — `design_spec.md` / `spec_lock.md` stay at the project root.** The MUST-read contract covers only the **compact structured data files (`.json` / `.csv`)**; other artifacts that may live under `analysis/` (e.g. a beautify `source_svg_import/` vector reference package) are NOT bulk-read — they are read selectively only when a specific workflow step calls for them. Before the Eight Confirmations, Strategist MUST read the auto-extracted fact files already in `analysis/` — currently `source_profile.json` (PPTX intake), when present. Use canvas / chart / table entries as **factual source context** (format default + content facts). The source's **palette / typography / visual identity are a reference, not a constraint**: the main pipeline may inherit them where they fit the content and the confirmed style, or design fresh where they don't — the Strategist's judgment, never an obligation to either keep or discard. (Template-fill preserves the native source design by editing cloned slides directly; beautify defaults to the source identity but still follows the confirmed values; the main pipeline treats source identity as reference only and defaults to fresh design.) (`image_analysis.csv` lands later, at the image-analysis step below, and is the authoritative image-fact source there.)+**`<project_path>/analysis/` is the project's intermediate-analysis folder: the canonical home for machine-extracted source/asset facts — the PPTX intake bundle (`source_profile.json` index + per-deck `<stem>.identity.json` / `<stem>.slide_library.json`) and `image_analysis.csv`. It holds facts, not design contracts — `design_spec.md` / `spec_lock.md` stay at the project root.** The MUST-read contract covers only the **compact structured data files (`.json` / `.csv`)**; other artifacts that may live under `analysis/` (e.g. a beautify `source_svg_import/` vector reference package) are NOT bulk-read — they are read selectively only when a specific workflow step calls for them. Before the Eight Confirmations, Strategist MUST read the auto-extracted fact files already in `analysis/` — currently `source_profile.json` (PPTX intake), when present. This file is the multi-deck index: read it once for the `decks[]` digests (canvas / chart / table entries per source deck), then open a specific deck's `<stem>.identity.json` / `<stem>.slide_library.json` only if you need its full raw facts. Use these entries as **factual source context** (format default + content facts); when several decks are present, synthesize across all of them. The source's **palette / typography / visual identity are a reference, not a constraint**: the main pipeline may inherit them where they fit the content and the confirmed style, or design fresh where they don't — the Strategist's judgment, never an obligation to either keep or discard. (Template-fill preserves the native source design by editing cloned slides directly; beautify defaults to the source identity but still follows the confirmed values; the main pipeline treats source identity as reference only and defaults to fresh design.) (`image_analysis.csv` lands later, at the image-analysis step below, and is the authoritative image-fact source there.)-**Channel ownership — read each fact once from its owning channel.** In the main pipeline the **content contract is the Markdown** (`sources/<stem>.md`): text, tables, and chart data values all come from there (`ppt_to_md` now transcribes native chart data into Markdown tables). The `analysis/` chart / table entries are a **structural digest** for outline decisions (which slides carried charts, type, series names) — not a second copy of the values; do NOT also pull chart values from `slide_library.json` in the main pipeline. `slide_library.json`'s full structured data is owned by the direct-PPTX workflows: template-fill uses it as the native fill contract; beautify uses it for native chart / table data while keeping slide text from the Markdown.+**Channel ownership — read each fact once from its owning channel.** In the main pipeline the **content contract is the Markdown** (`sources/<stem>.md`): text, tables, and chart data values all come from there (`ppt_to_md` now transcribes native chart data into Markdown tables). The `analysis/` chart / table entries are a **structural digest** for outline decisions (which slides carried charts, type, series names) — not a second copy of the values; do NOT also pull chart values from `<stem>.slide_library.json` in the main pipeline. The `<stem>.slide_library.json` full structured data is owned by the direct-PPTX workflows: template-fill uses it as the native fill contract; beautify uses it for native chart / table data while keeping slide text from the Markdown.**Eight Confirmations** (full template: `templates/design_spec_reference.md`):@@ -327,7 +327,7 @@ Read references/strategist.md**Confirm UI Auto-Launch (Mandatory — default visual confirmation surface)**: by default the Eight Confirmations are presented through an interactive local page (color swatches, live font previews, candidate picks); the chat path is the always-valid fallback. Steps:-1. Write the recommendations to `<project_path>/confirm_ui/recommendations.json` (full schema + field mapping: [`scripts/docs/confirm_ui.md`](scripts/docs/confirm_ui.md)). Two kinds of field: **enumerable** (canvas / mode / visual_style / icons / formula policy / generation mode; plus image usage with a Custom path; plus AI source only when image usage may include `ai`) — the page lists common options from `confirm_ui/static/catalogs.json`, so you only name the recommended canonical `id` in a `recommend` block (canvas may be a catalog id like `ppt169` or a custom size/prose; style = `mode` + `visual_style`, two independent picks; icon ids are real libraries such as `tabler-outline`, or `emoji` for system emoji; image usage uses `ai` / `web` / `provided` / `placeholder` / `none`, or a custom prose plan when several sources must be combined; never write bare `"custom"` for image usage — write the actual mixed plan, e.g. "AI cover + user product assets + web industry images"; write `image_ai_path` only when recommending `image_usage: "ai"` or a custom plan that includes AI); **generative** (color, typography, generated-image style) — author **≥3 candidates** each (creative recommendations always offer real choice, never a single silent option — same rule as strategist h.5; fewer than 3 only on the honest-shortfall exception, with a stated reason) (color: user-facing core `palette` with background/secondary_bg/primary/accent/secondary_accent/body_text; typography: CJK + Latin for `heading` and `body` with `css` preview stacks, plus `body_size` as the body baseline px; when recommending generated images, `image_strategy.candidates` with rendering × palette combinations from strategist h.5). `page_count` / `audience` are plain values. Only open fields show a Custom box: `canvas`, `mode`, `visual_style`, `icons`, `image_usage`, and typography custom text. Closed fields (`image_ai_path`, `formula_policy`, `generation_mode`, `refine_spec`) stay finite. Set `lang` to the page language; visible candidate text should match `lang`, or provide bilingual `name_zh` / `name_en` and `note_zh` / `note_en` fields. Reuse the same candidate thinking as strategist h.5.+1. Write the recommendations to `<project_path>/confirm_ui/recommendations.json` (full schema + field mapping: [`scripts/docs/confirm_ui.md`](scripts/docs/confirm_ui.md)). Two kinds of field: **enumerable** (canvas / mode / visual_style / icons / formula policy / generation mode; plus image usage with a Custom path; plus AI source only when image usage may include `ai`) — the page lists common options from `confirm_ui/static/catalogs.json`, so you only name the recommended canonical `id` in a `recommend` block (canvas may be a catalog id like `ppt169` or a custom size/prose; style = `mode` + `visual_style`, two independent picks; icon ids are real libraries such as `tabler-outline`, or `emoji` for system emoji; image usage uses `ai` / `web` / `provided` / `placeholder` / `none`, or a custom prose plan when several sources must be combined; never write bare `"custom"` for image usage — write the actual mixed plan, e.g. "AI cover + user product assets + web industry images"; write `image_ai_path` only when recommending `image_usage: "ai"` or a custom plan that includes AI); **generative** (color, typography, generated-image style) — author **≥3 candidates** each (creative recommendations always offer real choice, never a single silent option — same rule as strategist h.5; fewer than 3 only on the honest-shortfall exception, with a stated reason) (color: user-facing core `palette` with background/secondary_bg/primary/accent/secondary_accent/body_text; typography: CJK + Latin for `heading` and `body` with `css` preview stacks, plus `body_size` as the body baseline px; when recommending generated images, `image_strategy.candidates` with rendering × palette combinations from strategist h.5). `page_count` / `audience` / `content_divergence` are plain values (free text). Only open fields show a Custom box: `canvas`, `mode`, `visual_style`, `icons`, `image_usage`, and typography custom text. Closed fields (`image_ai_path`, `formula_policy`, `generation_mode`, `refine_spec`) stay finite. `content_divergence` is a **free-text** field shown under audience in §c — the user states in their own words how closely to follow the source vs how freely to reshape it (blank = balanced; facts stay sourced at every level). Write it as `content_divergence: { "value": "<prose or empty>" }`. It is consumed by Strategist when authoring `§IX`, recorded in `design_spec.md §I`, carries no page-count coupling, and is **not** written to `spec_lock.md`. Set `lang` to the page language; visible candidate text should match `lang`, or provide bilingual `name_zh` / `name_en` and `note_zh` / `note_en` fields. Reuse the same candidate thinking as strategist h.5.2. Launch the page **in the background and wait for the browser confirmation** (the child server runs detached; the parent command returns after `result.json` is freshly written). **Run this command with a long tool timeout — 600000 ms** — so the `--wait` (≈590 s budget) can complete:```bashpython3 ${SKILL_DIR}/scripts/confirm_ui/server.py <project_path> --daemon --waitdiff --git a/skills/ppt-master/references/strategist.md b/skills/ppt-master/references/strategist.mdindex fa788576..0b669252 100644--- a/skills/ppt-master/references/strategist.md+++ b/skills/ppt-master/references/strategist.md@@ -42,6 +42,14 @@ Provide specific page count recommendation based on source document content voluConfirm target audience, usage occasion, and core message; provide initial assessment based on document nature.+**Material divergence** — a **free-text** intent the user states beside audience (same content-strategy cluster): in their own words, how closely the deck should follow the source vs how freely it may reshape it. This is the user's own call — a free prose field (`content_divergence`), **not** a fixed set of options and **not** something you recommend from analyzing the source. Surface the question (in the confirm UI it is a text box under audience; in chat, ask it plainly); leave it for the user to fill. Blank = a balanced default.++Read the user's prose as a point on a spectrum and apply judgment — from *stay close* (track the source's structure and wording, tune only for clarity, no substantive add / drop) through the default *balanced* (re-architect and distill into a narrative under the locked `mode`, keeping all substance) to *free* (regroup, reframe, expand terse points, draw out connections latent in the source, invent section structure and transitions).++**Hard rule — facts stay sourced however free the user asks.** Divergence is freedom to *develop* what is in the source (reorganize / reframe / expand / connect), never licence to invent. Even the freest request must not introduce facts, figures, or claims from outside the source material — that is the `topic-research` job, not divergence. `mode` and divergence are orthogonal (e.g. a pyramid that hews to the source's own points vs. a pyramid built from freely synthesized themes).++**Consumption — outline-authoring only.** Apply the user's stated intent when authoring the `§IX` outline. Record the prose (or "balanced default") in `design_spec.md §I` (Content Strategy). Do **NOT** write it to `spec_lock.md` — it is baked into `§IX` at authoring time and the Executor never reads it. It carries no page-count coupling — the §b page count stays the user's separate call. The beautify / template-fill workflows keep content verbatim, so they do not surface this field.+### d. Style Objective ConfirmationTwo independent layers, each locks one catalog item. Output: `d. Mode: <mode> + Visual style: <visual_style>`.diff --git a/skills/ppt-master/scripts/README.md b/skills/ppt-master/scripts/README.mdindex 915c200b..604910e2 100644--- a/skills/ppt-master/scripts/README.md+++ b/skills/ppt-master/scripts/README.md@@ -80,9 +80,9 @@ Template fill (direct PPTX, no SVG conversion):```bashmkdir -p <project_path>/sources <project_path>/analysis <project_path>/exports <project_path>/validation-python3 scripts/template_fill_pptx.py analyze <project_path>/sources/<source.pptx> -o <project_path>/analysis/slide_library.json-python3 scripts/template_fill_pptx.py scaffold <project_path>/analysis/slide_library.json -o <project_path>/analysis/fill_plan.json --slides "1,3,4"-python3 scripts/template_fill_pptx.py check-plan <project_path>/analysis/slide_library.json <project_path>/analysis/fill_plan.json -o <project_path>/analysis/check_report.json+python3 scripts/template_fill_pptx.py analyze <project_path>/sources/<source.pptx> -o <project_path>/analysis/<stem>.slide_library.json+python3 scripts/template_fill_pptx.py scaffold <project_path>/analysis/<stem>.slide_library.json -o <project_path>/analysis/fill_plan.json --slides "1,3,4"+python3 scripts/template_fill_pptx.py check-plan <project_path>/analysis/<stem>.slide_library.json <project_path>/analysis/fill_plan.json -o <project_path>/analysis/check_report.jsonpython3 scripts/template_fill_pptx.py apply <project_path>/sources/<source.pptx> <project_path>/analysis/fill_plan.json -o <project_path>/exports/filled.pptx```diff --git a/skills/ppt-master/scripts/beautify_identity.py b/skills/ppt-master/scripts/beautify_identity.pyindex 31332769..af9f3c25 100644--- a/skills/ppt-master/scripts/beautify_identity.py+++ b/skills/ppt-master/scripts/beautify_identity.py@@ -14,7 +14,7 @@ Usage:Examples:python3 scripts/beautify_identity.py projects/x/sources/deck.pptx- python3 scripts/beautify_identity.py deck.pptx -o projects/x/analysis/identity.json+ python3 scripts/beautify_identity.py deck.pptx -o projects/x/analysis/deck.identity.jsonDependencies:None beyond the standard library (reuses scripts/pptx_to_svg/).diff --git a/skills/ppt-master/scripts/beautify_inventory.py b/skills/ppt-master/scripts/beautify_inventory.pyindex f6eeb4de..d9524cab 100644--- a/skills/ppt-master/scripts/beautify_inventory.py+++ b/skills/ppt-master/scripts/beautify_inventory.py@@ -13,7 +13,7 @@ Usage:python3 scripts/beautify_inventory.py <slide_library.json> [--images <image_manifest.json>] [-o inventory.json]Examples:- python3 scripts/beautify_inventory.py projects/x/analysis/slide_library.json \+ python3 scripts/beautify_inventory.py projects/x/analysis/<stem>.slide_library.json \--images projects/x/images/image_manifest.json -o projects/x/analysis/beautify_inventory.jsonDependencies:diff --git a/skills/ppt-master/scripts/confirm_ui/static/app.js b/skills/ppt-master/scripts/confirm_ui/static/app.jsindex e94b521c..3e1f98f7 100644--- a/skills/ppt-master/scripts/confirm_ui/static/app.js+++ b/skills/ppt-master/scripts/confirm_ui/static/app.js@@ -32,6 +32,8 @@sec_refine: "Refine spec first",sub_mode: "Narrative mode",sub_visual: "Visual style",+ sub_divergence: "Material divergence (how freely to reshape vs. stay close to the source)",+ placeholder_divergence: "In your words — e.g. \"stick closely to the document\" / \"freely restructure and expand within the source\". Leave blank for a balanced default.",custom: "Custom",custom_placeholder: "Type your own…",recommended: "Recommended",@@ -100,6 +102,8 @@sec_refine: "先精修设计规范",sub_mode: "叙事模式",sub_visual: "视觉风格",+ sub_divergence: "材料发散度(多大程度重塑,还是贴近源材料)",+ placeholder_divergence: "用你自己的话写,例如「严格贴着文档来」/「在源材料范围内自由重组并展开」。留空则按平衡处理。",custom: "自定义",custom_placeholder: "输入自定义内容…",recommended: "推荐",@@ -494,6 +498,15 @@var sec = section(3, "sec_audience");textField(sec, function () { return STATE.audience; },function (v) { STATE.audience = v; }, "placeholder_audience", false);+ // Material divergence — a distinct, free-text sub-question inside §c, shown+ // right under the audience box: the user states in their own words how+ // closely to follow the source vs. how freely to reshape it. Free prose, not+ // fixed options; no page-count coupling, no source-signal recommendation.+ var subDiv = el("div", "subfield");+ subDiv.appendChild(el("div", "subfield-label", t("sub_divergence")));+ textField(subDiv, function () { return STATE.content_divergence; },+ function (v) { STATE.content_divergence = v; }, "placeholder_divergence", false);+ sec.appendChild(subDiv);host.appendChild(sec);}@@ -1031,6 +1044,7 @@STATE.canvas = pick("canvas", CAT.canvas);STATE.page_count = (REC.page_count && REC.page_count.value != null) ? String(REC.page_count.value) : "";STATE.audience = (REC.audience && REC.audience.value) || "";+ STATE.content_divergence = (REC.content_divergence && REC.content_divergence.value) || ""; // free text; blank = balanced defaultSTATE.mode = pick("mode", CAT.modes);STATE.visual_style = pick("visual_style", CAT.visual_styles);diff --git a/skills/ppt-master/scripts/docs/confirm_ui.md b/skills/ppt-master/scripts/docs/confirm_ui.mdindex 57de82a1..20b39054 100644--- a/skills/ppt-master/scripts/docs/confirm_ui.md+++ b/skills/ppt-master/scripts/docs/confirm_ui.md@@ -31,7 +31,7 @@ pip install flask- **Enumerable + custom** — canvas / mode / visual_style / icons / image usage. The page lists common options from `static/catalogs.json`, badges the AI's recommendation, and still offers a Custom box for edge cases (custom canvas size, bespoke narrative mode, mixed image plan, self-provided icon system, etc.).- **Closed enumerable** — formula policy / generation mode / refine spec, plus AI source only when image usage may include `ai`. These have no Custom box; out-of-catalog values snap back to the recommended option. Use pipeline vocabulary: icon ids are actual library ids such as `tabler-outline`, or `emoji` for system emoji; image usage labels mirror Strategist terminology: `ai` = AI-generated, `web` = Web-sourced, `provided` = User-provided, `placeholder` = Placeholder, `none` = No images. Use custom prose only when several sources are mixed.-- **Generative (open)** — color, typography, generated-image style. No finite catalog; the AI authors **≥3 candidates** the page renders as cards (never a single option — creative fields must offer real choice; fewer than 3 only on the honest-shortfall exception). `page_count` and `audience` are free inputs.+- **Generative (open)** — color, typography, generated-image style. No finite catalog; the AI authors **≥3 candidates** the page renders as cards (never a single option — creative fields must offer real choice; fewer than 3 only on the honest-shortfall exception). `page_count`, `audience`, and `content_divergence` are free inputs (`content_divergence` is a free-text intent shown under audience in §c, not a fixed-option field).**Custom box** appears only on fields whose universe is genuinely open — `canvas`, `mode`, `visual_style`, `icons`, and `image_usage`. Fully closed sets — `image_ai_path`, `formula_policy`, `generation_mode`, `refine_spec` — have **no** Custom box; an out-of-catalog value there is snapped back to the recommended option.@@ -59,8 +59,9 @@ Both files live under `<project_path>/confirm_ui/`."formula_policy": "mixed","generation_mode": "continuous"},- "page_count": { "value": "12-15" },- "audience": { "value": "..." },+ "page_count": { "value": "12-15" },+ "audience": { "value": "..." },+ "content_divergence": { "value": "" },"color": {"selected": 0,"candidates": [@@ -112,6 +113,7 @@ Both files live under `<project_path>/confirm_ui/`.- **Combined style preview** — a compact live "overall impression" strip sits just above the color section and is **sticky**: it pins under the topbar so it stays visible while the user scrolls through the color / icon / typography sections, keeping the picking controls and their combined effect on screen together. It applies the currently selected color palette **and** typography (heading sample in `primary` over `background`, body sample in `body_text`, an `accent` bar, a `secondary_bg` chip) and repaints on every color / HEX-override / font / `body_size` change. It does not replace the per-candidate swatches or font samples (those stay for picking); it is deliberately an abstract style chip, **not** a slide-layout preview — page layout preview remains the live-preview server's job (Step 6). No schema field; it derives entirely from the existing color + typography selections.- **Generated image style candidates** live in `image_strategy.candidates` and are shown only when `image_usage` is `ai` or a custom image plan may include generated images. Each candidate records `rendering`, `palette`, and short `visual` / `color` / `mood` lines from Strategist h.5. The chosen value is written to `result.json.image_strategy`; it is omitted when generated images are not part of the plan.- `recommend.generation_mode` and `refine_spec` mirror the two mandatory notes in SKILL.md Step 4. Confirmed `generation_mode: "split"` / `refine_spec: true` are explicit user choices, equivalent to opting in through chat.+- `content_divergence` is a **free-text** field shown right under the audience box in §c — the user states in their own words how closely to follow the source vs how freely to reshape it (e.g. "stick closely to the document" / "freely restructure and expand within the source"). It is **not** a fixed-option field; blank means a balanced default. Whatever the level, facts stay sourced — reshaping develops what is in the source, never imports facts from outside it. The Strategist consumes the prose when authoring the §IX outline and records it in `design_spec.md §I`; it is **not** written to `spec_lock.md` (the Executor never reads it). It carries no page-count coupling and no source-signal recommendation — it is purely the user's stated intent. Beautify / template-fill keep content verbatim and do not surface this field.- `lang` is a soft default; an explicit user language choice in the page (persisted to `localStorage`) wins.### Output — `result.json` (written on submit, read by the AI)@@ -121,6 +123,7 @@ Both files live under `<project_path>/confirm_ui/`."canvas": "ppt169","page_count": "12-15","audience": "...",+ "content_divergence": "freely restructure and expand within the source","mode": "pyramid","visual_style": "swiss-minimal","color": { "name": "...", "palette": { "background": "#...", "secondary_bg": "#...", "primary": "#...", "accent": "#...", "secondary_accent": "#...", "body_text": "#..." } },diff --git a/skills/ppt-master/scripts/docs/conversion.md b/skills/ppt-master/scripts/docs/conversion.mdindex 5dd8ed60..cbbc559b 100644--- a/skills/ppt-master/scripts/docs/conversion.md+++ b/skills/ppt-master/scripts/docs/conversion.md@@ -144,12 +144,12 @@ artifacts provide source facts for Strategist and standalone PPTX workflows.python3 scripts/pptx_intake.py deck.pptx -o projects/demo/analysis```-Outputs:-- `identity.json` — canvas size/aspect, theme palette/fonts, observed colors/fonts-- `slide_library.json` — text slots, geometry, native tables, native chart display caches-- `source_profile.json` — compact Strategist-facing digest over identity, tables, charts, and page types+Outputs (per source deck, prefixed by file stem):+- `<stem>.identity.json` — canvas size/aspect, theme palette/fonts, observed colors/fonts+- `<stem>.slide_library.json` — text slots, geometry, native tables, native chart display caches+- `source_profile.json` — the single multi-deck index: a compact Strategist-facing digest per deck (over identity, tables, charts, and page types) under `decks[]`, with prefixed artifact pointers-`project_manager.py import-sources` runs this automatically for PPTX/PPTM/PPSX/PPSM/POTX/POTM inputs and stores the bundle directly under `analysis/`. The bundle is single-deck per project: importing a second PPTX keeps its Markdown source but skips intake rather than overwriting `analysis/source_profile.json`.+`project_manager.py import-sources` runs this automatically for PPTX/PPTM/PPSX/PPSM/POTX/POTM inputs and stores the bundle directly under `analysis/`. Multi-deck per project: importing several PPTX files gives each its own `<stem>.*` artifacts and a `decks[]` entry in the shared `source_profile.json` index (re-importing the same stem replaces its entry). The beautify / template-fill workflows stay single-deck and read one chosen deck's `<stem>.*` artifacts.Usage boundary:- Standard generation uses these fields as facts and recommendation candidates; it does not inherit source slide coordinates or page order by default.diff --git a/skills/ppt-master/scripts/docs/project.md b/skills/ppt-master/scripts/docs/project.mdindex 46ad2aaa..b31829d4 100644--- a/skills/ppt-master/scripts/docs/project.md+++ b/skills/ppt-master/scripts/docs/project.md@@ -23,10 +23,10 @@ Notes:Pass `--copy` to force a copy for in-repo sources instead.- `--move` and `--copy` are mutually exclusive.- PPTX-family inputs are enriched automatically under `analysis/` with- `identity.json`, `slide_library.json`, and `source_profile.json`.- Intake is currently single-deck per project: later PPTX imports are archived- and converted to Markdown, but skip intake rather than overwriting the first- deck's analysis.+ per-deck `<stem>.identity.json` / `<stem>.slide_library.json` plus the shared+ multi-deck index `source_profile.json` (`decks[]`).+ Multi-deck per project: several PPTX imports each get their own `<stem>.*`+ artifacts and a `decks[]` entry; re-importing the same stem replaces its entry.Common formats:- `ppt169`diff --git a/skills/ppt-master/scripts/pptx_intake.py b/skills/ppt-master/scripts/pptx_intake.pyindex 33b39f4f..94f1ae57 100644--- a/skills/ppt-master/scripts/pptx_intake.py+++ b/skills/ppt-master/scripts/pptx_intake.py@@ -91,10 +91,17 @@ def build_source_profile(pptx_path: Path,identity: dict[str, Any],slide_library: dict[str, Any],+ stem: str | None = None,) -> dict[str, Any]:- """Build the Strategist-facing digest over the raw intake artifacts."""+ """Build the Strategist-facing per-deck digest over the raw intake artifacts.++ `stem` is the source-file stem used to prefix the per-deck artifact files so+ several decks can coexist in one `analysis/` folder. Defaults to the pptx stem.+ """+ stem = stem or pptx_path.stemreturn {"schema": "pptx_intake_profile.v1",+ "stem": stem,"source_pptx": str(pptx_path),"slide_count": slide_library.get("slide_count", identity.get("slide_count", 0)),"usage_contract": {@@ -112,8 +119,8 @@ def build_source_profile(),},"artifacts": {- "identity": "identity.json",- "slide_library": "slide_library.json",+ "identity": f"{stem}.identity.json",+ "slide_library": f"{stem}.slide_library.json",},"canvas": identity.get("canvas", {}),"identity": {@@ -138,19 +145,53 @@ def build_source_profile(}+SOURCE_INDEX_NAME = "source_profile.json"+++def upsert_source_index(output_dir: Path, digest: dict[str, Any]) -> Path:+ """Merge one deck's digest into the single multi-deck index `source_profile.json`.++ The index stays the single must-read entry for the Strategist: it inlines every+ deck's digest under `decks[]`, so a one-deck project is a one-entry index and a+ multi-deck project lists each source deck self-containedly. Re-importing a deck+ with the same stem replaces its entry in place.+ """+ index_path = output_dir / SOURCE_INDEX_NAME+ index: dict[str, Any] = {}+ if index_path.is_file():+ try:+ loaded = json.loads(index_path.read_text(encoding="utf-8"))+ if isinstance(loaded, dict) and isinstance(loaded.get("decks"), list):+ index = loaded+ except (json.JSONDecodeError, OSError):+ index = {}+ stem = digest.get("stem")+ decks = [d for d in index.get("decks", []) if d.get("stem") != stem]+ decks.append(digest)+ decks.sort(key=lambda d: str(d.get("stem", "")))+ index = {+ "schema": "pptx_intake_index.v1",+ "deck_count": len(decks),+ "decks": decks,+ }+ _write_json(index_path, index)+ return index_path++def run_intake(pptx_path: Path, output_dir: Path) -> dict[str, Path]:- """Write `identity.json`, `slide_library.json`, and `source_profile.json`."""+ """Write `<stem>.identity.json`, `<stem>.slide_library.json`, and merge the+ deck's digest into the single multi-deck index `source_profile.json`."""output_dir.mkdir(parents=True, exist_ok=True)+ stem = pptx_path.stemidentity = extract_identity(pptx_path)slide_library = analyze_pptx(pptx_path)- profile = build_source_profile(pptx_path, identity, slide_library)+ digest = build_source_profile(pptx_path, identity, slide_library, stem)- identity_path = output_dir / "identity.json"- slide_library_path = output_dir / "slide_library.json"- profile_path = output_dir / "source_profile.json"+ identity_path = output_dir / f"{stem}.identity.json"+ slide_library_path = output_dir / f"{stem}.slide_library.json"_write_json(identity_path, identity)_write_json(slide_library_path, slide_library)- _write_json(profile_path, profile)+ profile_path = upsert_source_index(output_dir, digest)return {"identity": identity_path,"slide_library": slide_library_path,diff --git a/skills/ppt-master/scripts/project_manager.py b/skills/ppt-master/scripts/project_manager.pyindex f1c3ac49..6ff1e225 100644--- a/skills/ppt-master/scripts/project_manager.py+++ b/skills/ppt-master/scripts/project_manager.py@@ -282,11 +282,11 @@ class ProjectManager:])- def _import_pptx_intake(self, presentation_path: Path, project_dir: Path) -> Path | None:+ def _import_pptx_intake(self, presentation_path: Path, project_dir: Path) -> Path:+ # Multi-deck intake: each PPTX writes its own `<stem>.identity.json` /+ # `<stem>.slide_library.json` and is merged into the single multi-deck+ # index `analysis/source_profile.json` (one entry per source deck).analysis_dir = self._analysis_dir(project_dir)- profile_path = analysis_dir / "source_profile.json"- if profile_path.exists():- return Noneself._run_tool([sys.executable,@@ -666,13 +666,9 @@ class ProjectManager:canonical_markdown_path = sources_dir / f"{archived_path.stem}.md"try:intake_dir = self._import_pptx_intake(archived_path, project_dir)- if intake_dir is None:- summary["notes"].append(- f"{item}: skipped PPTX intake because analysis/source_profile.json already exists; "- "current intake is single-deck and keeps the first PPTX analysis"- )- else:- summary["analysis"].append(str(intake_dir))+ intake_str = str(intake_dir)+ if intake_str not in summary["analysis"]:+ summary["analysis"].append(intake_str)except Exception as exc: # pragma: no cover - summary pathsummary["notes"].append(f"{item}: PPTX intake analysis failed ({exc})")if archived_path.stem in explicit_markdown_stems:diff --git a/skills/ppt-master/scripts/template_fill_pptx.py b/skills/ppt-master/scripts/template_fill_pptx.pyindex df569060..22bea99a 100644--- a/skills/ppt-master/scripts/template_fill_pptx.py+++ b/skills/ppt-master/scripts/template_fill_pptx.py@@ -4,9 +4,9 @@Delegates to the template_fill_pptx package. Kept as the CLI entry point so thedocumented command paths keep working:- python3 scripts/template_fill_pptx.py analyze <deck.pptx> -o slide_library.json- python3 scripts/template_fill_pptx.py scaffold slide_library.json -o fill_plan.json- python3 scripts/template_fill_pptx.py check-plan slide_library.json fill_plan.json+ python3 scripts/template_fill_pptx.py analyze <deck.pptx> -o <stem>.slide_library.json+ python3 scripts/template_fill_pptx.py scaffold <stem>.slide_library.json -o fill_plan.json+ python3 scripts/template_fill_pptx.py check-plan <stem>.slide_library.json fill_plan.jsonpython3 scripts/template_fill_pptx.py apply <deck.pptx> fill_plan.json -o output.pptxImplementation lives in the template_fill_pptx/ package (ooxml, analyzer,diff --git a/skills/ppt-master/scripts/template_fill_pptx/cli.py b/skills/ppt-master/scripts/template_fill_pptx/cli.pyindex 5bcbf161..4ada454e 100644--- a/skills/ppt-master/scripts/template_fill_pptx/cli.py+++ b/skills/ppt-master/scripts/template_fill_pptx/cli.py@@ -69,10 +69,10 @@ def build_parser() -> argparse.ArgumentParser:analyze = subparsers.add_parser("analyze", help="Extract slide library JSON from a PPTX")analyze.add_argument("pptx_file", help="Source PPTX file")- analyze.add_argument("-o", "--output", required=True, help="Output slide_library.json path")+ analyze.add_argument("-o", "--output", required=True, help="Output <stem>.slide_library.json path")scaffold = subparsers.add_parser("scaffold", help="Create an editable fill plan skeleton")- scaffold.add_argument("library_json", help="slide_library.json from analyze")+ scaffold.add_argument("library_json", help="<stem>.slide_library.json from analyze")scaffold.add_argument("-o", "--output", required=True, help="Output fill_plan.json path")scaffold.add_argument("--slides",@@ -85,7 +85,7 @@ def build_parser() -> argparse.ArgumentParser:)check = subparsers.add_parser("check-plan", help="Check a fill plan against source slot capacity")- check.add_argument("library_json", help="slide_library.json from analyze")+ check.add_argument("library_json", help="<stem>.slide_library.json from analyze")check.add_argument("plan_json", help="Fill plan JSON")check.add_argument("-o", "--output", help="Optional JSON report output path")diff --git a/skills/ppt-master/templates/design_spec_reference.md b/skills/ppt-master/templates/design_spec_reference.mdindex 6136765e..005e7d35 100644--- a/skills/ppt-master/templates/design_spec_reference.md+++ b/skills/ppt-master/templates/design_spec_reference.md@@ -14,6 +14,7 @@| **Design Style** | {design_style} || **Target Audience** | [Filled by Strategist] || **Use Case** | [Filled by Strategist] |+| **Content Strategy** | [Material divergence — the user's free-text intent on how closely to follow the source vs how freely to reshape it (or "balanced default"); facts stay sourced however free. Confirmed at c; consumed when authoring §IX. Not in spec_lock.] || **Created Date** | {date_str} |---diff --git a/skills/ppt-master/workflows/beautify-pptx.md b/skills/ppt-master/workflows/beautify-pptx.mdindex 9c3c2865..a5266391 100644--- a/skills/ppt-master/workflows/beautify-pptx.md+++ b/skills/ppt-master/workflows/beautify-pptx.md@@ -68,7 +68,7 @@ python3 ${SKILL_DIR}/scripts/pptx_intake.py <project_path>/sources/<source.pptx>**Content + images — already produced by Step 3.** `import-sources` ran `ppt_to_md` on the deck, so the **frozen content contract** is `sources/<stem>.md` (one source slide per block, in order). If the source deck contains pictures, they are already propagated to `images/` with per-slide binding in `images/image_manifest.json` (`occurrences[].slide_index`). Do **not** re-run `ppt_to_md` — it would duplicate the conversion and write images to `analysis/<stem>_files/` instead of `images/`.-**Visual identity (theme + observed sample + canvas)**: read `<project_path>/analysis/identity.json`.+**Visual identity (theme + observed sample + canvas)**: read `<project_path>/analysis/<stem>.identity.json` (intake prefixes per-deck artifacts by source-file stem).| Field | Use ||---|---|@@ -79,16 +79,16 @@ python3 ${SKILL_DIR}/scripts/pptx_intake.py <project_path>/sources/<source.pptx>> Note: `theme` is what the deck declares; `observed` is a frequency sample of run-level overrides (not a complete style resolution — it misses `schemeClr` and master/layout inheritance, and counts chart/gradient fills). A hand-edited deck can diverge from `theme` — Step 5 recommends which to inherit and the user confirms.-**Chart + table data (for regeneration)**: read `<project_path>/analysis/slide_library.json`. It contains the source chart and table *data* so they can be redrawn natively in the inherited style:+**Chart + table data (for regeneration)**: read `<project_path>/analysis/<stem>.slide_library.json`. It contains the source chart and table *data* so they can be redrawn natively in the inherited style:-| `slide_library.json` field | Use |+| `<stem>.slide_library.json` field | Use ||---|---|| `slides[].charts[]` (`chart_type` / `categories` / `series[].values`) | regenerate as a native SVG chart via the `§VII` `templates/charts/` path || `slides[].tables[]` (`row_count` / `column_count` / cell text) | regenerate as a native SVG table |**Hard rule — regenerate visuals, do not carry them over**: charts / tables / images are rebuilt from their data in the inherited style, never spliced in byte-for-byte. This keeps the deck style-consistent and natively editable. **Data values are frozen** (categories / series / cell text / numbers unchanged); only their rendering is the deck's own. Pictures (`ppt_to_md`-extracted files) are reused but re-laid-out — position / crop / size follow the new layout, not the source slot. A user who wants an original element verbatim copies it across themselves.-**Optional source-SVG visual reference**: when the source deck has complex vector decoration, distinctive page chrome, or a visual language that cannot be captured by `identity.json` colors/fonts alone, create a read-only SVG reference package under `analysis/`. This is for understanding style only; it is not a carry-over asset path.+**Optional source-SVG visual reference**: when the source deck has complex vector decoration, distinctive page chrome, or a visual language that cannot be captured by `<stem>.identity.json` colors/fonts alone, create a read-only SVG reference package under `analysis/`. This is for understanding style only; it is not a carry-over asset path.```bashpython3 ${SKILL_DIR}/scripts/pptx_to_svg.py <project_path>/sources/<source.pptx> -o <project_path>/analysis/source_svg_import@@ -106,7 +106,7 @@ Optional reuse gate: if a candidate is a non-text brand/logo/motif/decorative as**Assemble the inventory** — the deterministic join into one per-slide ledger, `analysis/beautify_inventory.json`, the contract Step 5 confirms and Step 7 verifies against:```bash-python3 ${SKILL_DIR}/scripts/beautify_inventory.py <project_path>/analysis/slide_library.json \+python3 ${SKILL_DIR}/scripts/beautify_inventory.py <project_path>/analysis/<stem>.slide_library.json \--images <project_path>/images/image_manifest.json -o <project_path>/analysis/beautify_inventory.json```@@ -121,9 +121,9 @@ If `images/image_manifest.json` does not exist because the source deck has no ex## ✅ Extraction Complete- [x] `sources/<stem>.md` (from Step 3) holds every source slide's text, in order; extracted pictures, if any, are in `images/` + `images/image_manifest.json`-- [x] `analysis/identity.json` has theme + observed identity + canvas aspect-- [x] `analysis/slide_library.json` holds chart + table data for regeneration-- [x] `analysis/source_profile.json` summarizes the source facts+- [x] `analysis/<stem>.identity.json` has theme + observed identity + canvas aspect+- [x] `analysis/<stem>.slide_library.json` holds chart + table data for regeneration+- [x] `analysis/source_profile.json` (multi-deck index) summarizes the source facts in its `decks[]` entry- [x] `analysis/beautify_inventory.json` ledgers per-slide text / images / data + ignored + needs-confirmation- [ ] **Next**: Step 5 — Beautify Plan (recommend & confirm)```@@ -135,12 +135,12 @@ If `images/image_manifest.json` does not exist because the source deck has no ex⛔ **BLOCKING**: the scope is not hard-coded — same spirit as the Eight Confirmations. Recommend each item below from what the deck actually contains (the Step 4 inventory), present the plan, and **wait for the user to confirm or adjust** before writing any spec. Chat is the canonical channel; the confirm UI below is the visual convenience surface over it for the palette + typography review (its result is honored identically to a chat reply).This step has two halves:-- **Visual re-confirm via the confirm UI** — the **full** Step 4 confirm page (below), seeded from the source so every targeted-confirmation field (canvas, mode, visual style, palette, icons, typography incl. body baseline, image strategy, generation mode) is **pre-filled with the inherited / source-derived default and left editable**. Beautify *recommends* keeping the source's identity, but never removes the user's place to override any field — you may choose not to change a value, but you must not deny the place to change it. This is also where the deck's text size is set: `identity.json` carries fonts and palette but **no body font size** (source decks inherit sizes from master placeholders), so the body baseline is undetermined and must be chosen here, not silently defaulted to a small dense value.+- **Visual re-confirm via the confirm UI** — the **full** Step 4 confirm page (below), seeded from the source so every targeted-confirmation field (canvas, mode, visual style, palette, icons, typography incl. body baseline, image strategy, generation mode) is **pre-filled with the inherited / source-derived default and left editable**. Beautify *recommends* keeping the source's identity, but never removes the user's place to override any field — you may choose not to change a value, but you must not deny the place to change it. This is also where the deck's text size is set: `<stem>.identity.json` carries fonts and palette but **no body font size** (source decks inherit sizes from master placeholders), so the body baseline is undetermined and must be chosen here, not silently defaulted to a small dense value.- **Structural scope** — the inventory-driven list decisions below (ignored, reuse, needs-confirmation, verification level) stay in **chat**; they have no confirm-UI widget.| Plan item | Recommend from | Default lean ||---|---|---|-| Identity source | `identity.json` `theme` vs `observed` | present **both as color / typography candidates in the confirm UI** so the user picks the one that looks right (theme first when the deck is theme-driven; observed first when slides override heavily) — recommend a default ordering and say why |+| Identity source | `<stem>.identity.json` `theme` vs `observed` | present **both as color / typography candidates in the confirm UI** so the user picks the one that looks right (theme first when the deck is theme-driven; observed first when slides override heavily) — recommend a default ordering and say why || Preserve scope | inventory `text_blocks` / `images` / `charts` / `tables` | all text verbatim; data values frozen; pictures reused || Ignored | inventory `ignored` | name them so the user sees what drops (hidden / master-only text / image crop / rotation) || Needs confirmation | inventory `needs_confirmation` | flag complex charts + overcrowded pages explicitly; ask how to handle |@@ -184,7 +184,7 @@ Write `<project_path>/confirm_ui/recommendations.json` and launch the same confi}```-- **Recommend keep, allow override**: pre-fill canvas / mode / visual style / icons / image strategy with the source-faithful default (canvas = Step 3 format, mode = `briefing`, image_usage = `provided` since pictures are reused). Enumerable fields already list every catalog option with the source-faithful one badged, so the user can switch. Beautify's only true non-choices are the frozen text and the strict 1:1 page count (changing those means routing to the main pipeline instead — see CLAUDE.md).+- **Recommend keep, allow override**: pre-fill canvas / mode / visual style / icons / image strategy with the source-faithful default (canvas = Step 3 format, mode = `briefing`, image_usage = `provided` since pictures are reused). Enumerable fields already list every catalog option with the source-faithful one badged, so the user can switch. Beautify's only true non-choices are the frozen text and the strict 1:1 page count (changing those means routing to the main pipeline instead — see CLAUDE.md). The §c material-divergence field is therefore not surfaced here — beautify never reshapes content (text is verbatim).- **Our recommendation is the pre-selected default = the source replica**: for color and typography, author **several candidates** like the from-scratch flow. The pre-selected default (`selected: 0`, the first card) is what beautify recommends — the candidate that **best replicates the source deck's style** (the truest reading of `theme` / `observed`). Replicate-by-default.- **Judge the other alternatives exactly as the from-scratch flow does — fonts as much as colors**: don't invent a beautify-specific rule. Author each non-replica candidate with the **same content-driven judgment the Strategist uses when generating from scratch** (color §e, typography §g), applied to the material this project provides — the source document's content and subject, the company's own theme colors, and any brand signal. Pick the palette **and** the font pairing by what fits *this* deck's content; fonts are chosen by content fit, not just defaulted to a safe face. Reach **≥3 candidates total** (PPT-safe stacks; the same creative-choice rule used elsewhere) so a user who departs from the replica still lands on a considered, content-fitting direction — depart-by-choice.- **`body_size` is the load-bearing field**: seed it from a canvas-appropriate baseline (the page hints ≈2.5–3.3% of canvas height) — for a presentation / projection deck lean toward the relaxed end (e.g. `24` → 18pt), for a dense document deck the compact end (e.g. `18` → 13.5pt). The user sets the final value here; this is what prevents the deck from exporting at an unintentionally small size.@@ -224,7 +224,7 @@ python3 ${SKILL_DIR}/scripts/source_to_md/ppt_to_md.py <project_path>/exports/<o| Data fidelity | chart categories / series / table cells match the source exactly || Page count | output slide count equals the source slide count || Regenerated visuals | charts / tables are native SVG re-themed to the inherited palette |-| Identity | generated text / shapes use only `identity.json` colors + fonts |+| Identity | generated text / shapes use only `<stem>.identity.json` colors + fonts || Paste-back | copying a beautified element into the original deck looks native |```markdowndiff --git a/skills/ppt-master/workflows/template-fill-pptx.md b/skills/ppt-master/workflows/template-fill-pptx.mdindex b6c41eab..e8d9f2e4 100644--- a/skills/ppt-master/workflows/template-fill-pptx.md+++ b/skills/ppt-master/workflows/template-fill-pptx.md@@ -68,7 +68,7 @@ Run:python3 skills/ppt-master/scripts/pptx_intake.py "<project_dir>/sources/<source.pptx>" -o "<project_dir>/analysis"```-Read `<project_dir>/analysis/slide_library.json` and identify:+Read `<project_dir>/analysis/<stem>.slide_library.json` (intake prefixes per-deck artifacts by the template deck's file stem) and identify:| Field | Use ||---|---|@@ -83,7 +83,7 @@ Read `<project_dir>/analysis/slide_library.json` and identify:A page's layout already encodes a rhetorical shape — a single hero statement, a lead-then-detail split, a 2×2 comparison, a stepwise progression, a metric row. Match the source material's own logic to a page whose structure expresses that same logic; do not pour unrelated content into a slot just because it is empty. When no selected page fits a piece of content well, drop that page or that content rather than forcing it — a forced fill reads as stiff. It is fine to use fewer pages than the source deck has.-**Layout-first planning**: Treat `slide_library.json` as a layout inventory, not as an ordered deck outline. Before writing `fill_plan.json`, infer each reusable source page's affordance from JSON fields:+**Layout-first planning**: Treat `<stem>.slide_library.json` as a layout inventory, not as an ordered deck outline. Before writing `fill_plan.json`, infer each reusable source page's affordance from JSON fields:| JSON signal | Layout planning use ||---|---|@@ -104,14 +104,14 @@ A page's layout already encodes a rhetorical shape — a single hero statement,Create a scaffold:```bash-python3 skills/ppt-master/scripts/template_fill_pptx.py scaffold "<project_dir>/analysis/slide_library.json" -o "<project_dir>/analysis/fill_plan.json" --slides "1,3,4"+python3 skills/ppt-master/scripts/template_fill_pptx.py scaffold "<project_dir>/analysis/<stem>.slide_library.json" -o "<project_dir>/analysis/fill_plan.json" --slides "1,3,4"```Then edit `<project_dir>/analysis/fill_plan.json` by hand from the source material. The plan is the single execution contract.**Pages are reusable**: the output is the ordered `slides` list, not a one-to-one copy of the source deck. A source page is not single-use — list the same `source_slide` as many times as you need, each entry with its own `replacements`, to drive several output slides from one good layout (e.g., reuse a single content layout for five content pages). Likewise you may omit source pages entirely and put the selected ones in any order.-**Scaffold boundary**: `scaffold --slides` is only a convenience starter. If the final plan needs repeated source pages or a story order that differs from the template order, duplicate / reorder entries in `fill_plan.json` manually or generate the plan from `slide_library.json`; do not let scaffold output constrain the deck structure.+**Scaffold boundary**: `scaffold --slides` is only a convenience starter. If the final plan needs repeated source pages or a story order that differs from the template order, duplicate / reorder entries in `fill_plan.json` manually or generate the plan from `<stem>.slide_library.json`; do not let scaffold output constrain the deck structure.The plan structure:@@ -207,7 +207,7 @@ Example `notes` value for a Chinese content slide:Run the data-based capacity check before applying the plan:```bash-python3 skills/ppt-master/scripts/template_fill_pptx.py check-plan "<project_dir>/analysis/slide_library.json" "<project_dir>/analysis/fill_plan.json" -o "<project_dir>/analysis/check_report.json"+python3 skills/ppt-master/scripts/template_fill_pptx.py check-plan "<project_dir>/analysis/<stem>.slide_library.json" "<project_dir>/analysis/fill_plan.json" -o "<project_dir>/analysis/check_report.json"```Interpret the report:@@ -279,7 +279,7 @@ If the extracted text is correct but visual overflow is likely, reduce the text```markdown## ✅ Template Fill Complete-- [x] Standard PPTX intake extracted from the source deck, including `slide_library.json`+- [x] Standard PPTX intake extracted from the source deck, including `<stem>.slide_library.json`- [x] `fill_plan.json` selects only pages that fit the target story- [x] `check-plan` run and capacity warnings resolved or explicitly accepted- [x] Output PPTX generated through direct OOXML text replacement@@ -304,3 +304,4 @@ If the extracted text is correct but visual overflow is likely, reduce the text| Edit chart formatting / axes / legend layout | Not in v1 || Edit SmartArt deeply | Not in v1 || Automatic visual overflow detection | Not in v1; use text-capacity judgment from the library slots |+| Material-divergence reshaping (§c content strategy) | Not applicable — this workflow fills text into existing slots, it does not author an outline from a source, so the main pipeline's `content_divergence` free-text field has no role here |