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

docs(technical-design): document AI image three-dimension lock and Primary+Modifier layout composition

hugohe325572db82b44
diff --git a/docs/technical-design.md b/docs/technical-design.md
index 0fd47d2d..f562162b 100644
--- a/docs/technical-design.md
+++ b/docs/technical-design.md
@@ -179,6 +179,25 @@ Two architectural decisions shape this phase:
**External refs during development, two divergent embedding strategies for delivery.** While editing in `svg_output/`, images are external file references — fast iteration, single-source-of-truth replacement. The two delivery artifacts then diverge: `svg_final/` Base64-inlines (a folder of self-contained SVGs that IDE preview, browser, and the preview pptx can all open without missing the bitmap dependencies); native pptx instead copies bitmaps into the PPTX media folder and uses `<a:srcRect>` to express the cropping. The split exists because Base64 inside DrawingML works but bloats file size 3-4×, while file-referenced bitmaps are PowerPoint's native idiom for which `<a:srcRect>` is the canonical crop expression — wrong tool in either direction would cost editability or file size.
+**Three-dimensional AI image lock at Strategist time.** When the deck includes AI-generated images, Strategist decides three orthogonal dimensions up front — `rendering` (visual style family: vector-illustration / editorial / 3d-isometric / sketch-notes / …), `palette` (how the deck's HEX values are *used*: proportion + role + temperament), `type` (per-image internal composition: background / hero / framework / comparison / …). The first two are deck-wide and written into `spec_lock.md`; Image_Generator then assembles every per-image prompt from the single locked rendering + palette plus a per-image type, instead of re-deciding style per image. Without this, every image gets its own style drift and the deck reads as a stack of unrelated illustrations. This is the visual-cohesion dual of `spec_lock`'s typography/color anti-drift mechanism, just one level upstream of pixels. Strategist surfaces ≥3 candidate `rendering × palette` combinations to the user during the Eight Confirmations — never auto-locking a single combination silently, because the choice has far-reaching deck-wide consequences and the user's taste is the only oracle for it.
+
+---
+
+## Image-Text Layout: Primary Structures + Modifier Layers
+
+The catalog of *how an image is placed on a slide* (full vocabulary in [`references/image-layout-patterns.md`](../skills/ppt-master/references/image-layout-patterns.md)) splits 72 numbered techniques into two layers that compose freely:
+
+- **Primary Structures** (container layouts / image-as-canvas + native overlay / multi-image compositions) — the page's bones. One or more per page; cross-Primary combinations like *side-by-side comparison + image-as-canvas annotation* are legitimate.
+- **Modifier Layers** (non-rectangular clips / overlays & masks / texture / special techniques) — finish. Any number per page, stacked on top of the Primary.
+
+**Why explicit composition, not "one primary per page".** The AI failure mode this catalog fights isn't *over-combining*, it's *under-using*: defaulting every image page to bare `#2 left-third` or `#48 side-by-side` with no Modifier on top, producing visually flat, "AI-default" layouts. The earlier rule "one primary layout per page; modifiers compose" sounded principled but reinforced the under-use — the AI read it as permission to skip the Modifier layer entirely. The current framing flips the encouragement: combining is normal, single-Primary-no-Modifier is the case that needs justification.
+
+**Why the layers are physically separated, not just tagged.** Patterns are reorganized so all Primary structures appear first, then all Modifiers — a Strategist or Executor reading the file once internalizes the two-layer mental model from the table of contents alone. Numbers are stable identifiers (`#38` is still image-as-canvas + annotation cards regardless of where it sits in the file), so existing references across `spec_lock.md`, `design_spec.md §VIII`, executor logs, and historical examples all keep resolving.
+
+**Why composition flows through Strategist's resource list, not just Executor's improvisation.** The `Layout pattern` column in `§VIII Image Resource List` accepts a `#<id> + #<id> ...` expression — Primary id plus optional Modifier ids — so the composition is declared *before* SVG generation, audited by `svg_quality_checker`, and survives session re-entry. Pushing composition onto Executor alone would lose it on context compression in long decks; encoding it in the spec_lock-adjacent resource list makes it a piece of the design contract.
+
+**Why true hard constraints stay upstream.** Cross-cutting technical constraints (`<clipPath>` only on `<image>`, `fill-opacity` instead of `rgba()`, no `<mask>`, alpha-effect routing) live exclusively in [`shared-standards.md`](../skills/ppt-master/references/shared-standards.md). The layout patterns file points at them with one-line references rather than restating — so when a constraint relaxes (e.g., a new DrawingML feature becomes reliable), only one file changes, and a stale duplicate in patterns can't silently keep enforcing the old rule.
+
---
## SVG Constraints: Banned Features and Conditional Allowances
@@ -272,4 +291,4 @@ The interesting design choice is the animation **anchor**, not the effect list.
## Standalone Workflows
-Five capabilities (`create-template`, `verify-charts`, `customize-animations`, `visual-edit`, `generate-audio`) live as standalone workflows rather than pipeline steps. Each is sparsely triggered — per-template, per-chart-deck, per-animation-tuning request, per-complaint, per-video-export — not per-deck. Folding any into the default pipeline would either run unnecessary steps for the majority of users (added latency and failure surface) or force a one-size-fits-all narrowing of the main flow. Keeping them opt-in lets the deck-generation pipeline stay tight and predictable while making the capability available when its trigger condition fires; each `workflows/<name>.md` is self-contained and loaded on demand, so paying the prompt-context cost is also opt-in.
+Five capabilities (`create-template`, `verify-charts`, `customize-animations`, `live-preview`, `generate-audio`) live as standalone workflows rather than pipeline steps. Each is sparsely triggered — per-template, per-chart-deck, per-animation-tuning request, per-complaint, per-video-export — not per-deck. Folding any into the default pipeline would either run unnecessary steps for the majority of users (added latency and failure surface) or force a one-size-fits-all narrowing of the main flow. Keeping them opt-in lets the deck-generation pipeline stay tight and predictable while making the capability available when its trigger condition fires; each `workflows/<name>.md` is self-contained and loaded on demand, so paying the prompt-context cost is also opt-in.
diff --git a/docs/zh/technical-design.md b/docs/zh/technical-design.md
index 97b82a20..461ae93c 100644
--- a/docs/zh/technical-design.md
+++ b/docs/zh/technical-design.md
@@ -179,6 +179,25 @@ Strategist 阶段产出两份看起来冗余但服务不同对象的产物:
**开发期外部引用,交付期分叉成两套嵌入策略。** 在 `svg_output/` 里编辑时,图片是外部文件引用——快速迭代、单点替换。两份交付产物随后分叉:`svg_final/` 走 Base64 内联(产出一组自包含 SVG,IDE 预览、浏览器、preview pptx 都能开而不丢位图依赖);native pptx 反过来把位图复制进 PPTX 的 media 文件夹,用 `<a:srcRect>` 表达裁剪。分叉的理由:在 DrawingML 里塞 Base64 能跑但文件膨胀 3-4 倍;文件引用的位图是 PowerPoint 原生表达方式,配 `<a:srcRect>` 的裁剪也是 DrawingML 的规范写法——任一方向用错工具都要付出可编辑性或文件大小的代价。
+**AI 图片三维系统:Strategist 阶段就锁定。** 当 deck 包含 AI 生成图片时,Strategist 在前置阶段一次性确定三个正交维度——`rendering`(视觉风格家族:vector-illustration / editorial / 3d-isometric / sketch-notes / ……)、`palette`(deck 的 HEX 在图里**怎么用**:比例 + 角色 + 气质)、`type`(每张图的内部构图:background / hero / framework / comparison / ……)。前两个是 deck 级、写进 `spec_lock.md`;Image_Generator 此后每张图的 prompt 都从同一份锁定的 rendering + palette 加上该图的 type 组装出来,而不是逐图重决风格。没有这层锁定,每张图都会自己风格漂移,整套 deck 读起来就是一摞互不相关的插画。这是 `spec_lock` 字体/色彩抗漂移机制在像素上游的对偶——同一思路,往前推一层。Strategist 在八项确认阶段会向用户呈现 **≥3 个 `rendering × palette` 候选**,绝不静默地自动锁定单一组合,因为这是一个会牵动全 deck 视觉的选择,唯一权威只有用户的品味。
+
+---
+
+## 图文版式:Primary 主结构 + Modifier 修饰层
+
+「图片**怎么放上幻灯片**」的词表(完整词汇在 [`references/image-layout-patterns.md`](../../skills/ppt-master/references/image-layout-patterns.md))把 72 条编号技法拆成两层、自由组合:
+
+- **Primary 主结构**(容器布局 / 图作画布 + 原生覆盖 / 多图组合)—— 页面的骨架。一页可一个也可多个;跨 Primary 的组合,如「侧边对比 + 图作画布的注解卡」,是合规的。
+- **Modifier 修饰层**(非矩形裁剪 / 遮罩与叠加 / 纹理 / 特殊技法)—— 装饰层。一页可叠任意多个,附着在 Primary 之上。
+
+**为什么显式鼓励复合,而不是「一页一个 primary」。** 这份词表对抗的 AI 失败模式不是「叠太多」,而是「用得太少」——把每页图片默认堆成裸的 `#2 左三分` 或 `#48 侧边对比`,Modifier 层完全不动,产出视觉扁平的「AI 默认感」版式。早先的规则「一页一个 primary,modifier 可叠」听起来有原则,实际上加剧了 Modifier 层的弃用——AI 把它读作「可以不叠」的许可。现在的措辞反过来:组合是常态,单 Primary + 无 Modifier 才需要解释。
+
+**为什么物理拆分两层,而不是只打标签。** 词表被重排成「Primary 全部在前,Modifier 全部在后」——Strategist 或 Executor 读一次目录,就能从结构上内化「两层」心智模型。编号是稳定 id(`#38` 永远是「图作画布 + 注解卡」,不论它在文件里的物理位置),所以 `spec_lock.md`、`design_spec.md §VIII`、历史 executor 输出、过往示例里所有 `#<id>` 引用照样解析。
+
+**为什么组合走 Strategist 资源列表,不只交给 Executor 临场发挥。** `§VIII 图片资源列表` 的 `Layout pattern` 列接受 `#<id> + #<id> ...` 表达式——Primary id 加可选 Modifier id——所以组合在 SVG 生成**之前**就被声明、被 `svg_quality_checker` 审计、并能在 session 重入后存活。把组合责任只压在 Executor 身上,长 deck 上下文压缩时就会丢;把它编码进 spec_lock 旁的资源列表,组合就成为设计契约的一部分。
+
+**为什么真正的硬约束留在上游。** 跨切的技术硬约束(`<clipPath>` 只能用在 `<image>` 上、用 `fill-opacity` 而非 `rgba()`、禁 `<mask>`、alpha 效果的路由表)独家住在 [`shared-standards.md`](../../skills/ppt-master/references/shared-standards.md)。版式词表只用一行指针指向它们,不复述——这样某条约束放开时(比如某个 DrawingML 特性变得可靠),只有一个文件要改,词表里也不会留下一份过期副本继续暗中强制旧规则。
+
---
## SVG 约束:禁用特性与条件允许
@@ -272,4 +291,4 @@ PowerPoint 的 DrawingML 是 SVG 表达力的严格子集。Executor 在一份
## Standalone Workflows(独立工作流)
-五个能力(`create-template`、`verify-charts`、`customize-animations`、`visual-edit`、`generate-audio`)作为独立工作流存在,而不是流水线步骤。每个都是稀疏触发的——按模板、按含图表的 deck、按一次动画微调、按一次具体抱怨、按一次视频导出,而不是按每个 deck。把任何一个塞进默认流水线,要么对大多数用户运行无意义的步骤(增加延迟和失败面),要么强制一刀切收窄主流程。保持 opt-in 让 deck 生成主流水线保持紧凑、可预期,同时在触发条件命中时仍提供这些能力;每个 `workflows/<name>.md` 是自包含的、按需加载——所以 prompt context 的开销也是 opt-in。
+五个能力(`create-template`、`verify-charts`、`customize-animations`、`live-preview`、`generate-audio`)作为独立工作流存在,而不是流水线步骤。每个都是稀疏触发的——按模板、按含图表的 deck、按一次动画微调、按一次具体抱怨、按一次视频导出,而不是按每个 deck。把任何一个塞进默认流水线,要么对大多数用户运行无意义的步骤(增加延迟和失败面),要么强制一刀切收窄主流程。保持 opt-in 让 deck 生成主流水线保持紧凑、可预期,同时在触发条件命中时仍提供这些能力;每个 `workflows/<name>.md` 是自包含的、按需加载——所以 prompt context 的开销也是 opt-in。