morph-ppt
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOfficeCLI Morph-PPT Skill
OfficeCLI Morph-PPT 技能
This skill is a scene layer on top of . Every pptx hard rule — visual delivery floor (title ≥ 36pt / body ≥ 18pt / title ≥ 2× body), 12-column grid on 33.87×19.05cm, canonical palettes, chart-choice decision table, connector canon, shell escape, resident + batch, Delivery Gate 1–5a — is inherited, not re-taught. This file adds only what Morph needs on top: cross-slide shape-name binding, Scene Actors vs content prefixing, ghost discipline, CLI quirks, 52-style visual library lookup, and a morph-specific fresh-eyes Gate 5b extension.
officecli-pptxtransition=morphWhen the pptx base rules cover it, the text here says . Read first if you have not.
→ see pptx v2 §Xskills/officecli-pptx/SKILL.md此技能是基于的场景层。 所有pptx硬性规则——视觉交付基准(标题≥36pt / 正文≥18pt / 标题字号≥正文2倍)、33.87×19.05cm画布上的12列网格、标准调色板、图表选择决策表、连接器规范、Shell转义、常驻模式+批量操作、交付关卡1–5a——均已继承,不再重复说明。本文件仅添加Morph所需的额外内容:跨幻灯片形状名称绑定、场景角色与内容前缀规则、隐藏元素规范、 CLI特性、52种视觉样式库查询,以及针对Morph的全新交付关卡5b扩展。
officecli-pptxtransition=morph当pptx基础规则已覆盖相关内容时,本文会标注。若未阅读过,请先阅读该文档。
→ 参见pptx v2 §Xskills/officecli-pptx/SKILL.mdSetup
安装配置
If is missing:
officecli- macOS / Linux:
curl -fsSL https://d.officecli.ai/install.sh | bash - Windows (PowerShell):
irm https://d.officecli.ai/install.ps1 | iex
Verify with (open a new terminal if PATH hasn't picked up). If install fails, download a binary from https://github.com/iOfficeAI/OfficeCLI/releases.
officecli --version若未安装:
officecli- macOS / Linux:
curl -fsSL https://d.officecli.ai/install.sh | bash - Windows (PowerShell):
irm https://d.officecli.ai/install.ps1 | iex
通过验证安装(若PATH未更新,需打开新终端)。若安装失败,可从https://github.com/iOfficeAI/OfficeCLI/releases下载二进制文件。
officecli --version⚠️ Help-First Rule
⚠️ 优先查阅帮助规则
This skill teaches the Morph workflow — when shape names must match, when to ghost, when the CLI auto-prefixes — not every command flag. When a prop name, enum, or preset is uncertain, consult help BEFORE guessing.
bash
officecli help pptx slide # authoritative for: transition, advanceTime, advanceClick, background
officecli help pptx transition # transition / transitionDuration / transitionSpeed (Parent: slide)
officecli help pptx shape # name, preset, x/y/width/height, fill, rotation, opacity, animation
officecli help pptx animation # preset + trigger + duration values
officecli help pptx <element> --json # machine-readable schemaHelp reflects the installed CLI version. When skill and help disagree, help wins. Every in this file is grep-verified against . Specific confirmations: is a listed value on ; / are valid. is a real element (, Parent: slide, set/get) — it exposes , , and . Set the transition with the high-level path ; tune speed/duration with the combined shorthand (or , or ). Speed/duration are set only via that shorthand on the prop, not as independent sub-props. Both round-trip on readback: / reads back as /, and (e.g. ) reads back as .
--prop X=officecli help pptx <element>transition=morphslideadvanceTimeadvanceClicktransitionofficecli help pptx transitiontransitiontransitionDurationtransitionSpeedset <slide> --prop transition=morphtransition=morph-slow-fasttransition=morph-<DUR_MS>transitiontransition=morph-slow-fasttransitionSpeed=slowfasttransition=morph-<DUR_MS>morph-1500transitionDuration=1500本技能仅教授Morph工作流——包括形状名称何时必须匹配、何时需隐藏元素、CLI何时自动添加前缀——而非所有命令参数。 若不确定属性名、枚举值或预设,请先查阅帮助再尝试。
bash
officecli help pptx slide # 权威参考:transition、advanceTime、advanceClick、background
officecli help pptx transition # transition / transitionDuration / transitionSpeed(父元素:slide)
officecli help pptx shape # name、preset、x/y/width/height、fill、rotation、opacity、animation
officecli help pptx animation # preset + trigger + duration参数值
officecli help pptx <element> --json # 机器可读的 schema帮助内容与已安装的CLI版本同步。若技能文档与帮助内容冲突,以帮助内容为准。本文中所有均已通过验证。具体确认项:是的有效取值;/为合法属性;是真实元素(,父元素为slide,支持设置/获取)——它包含、和。通过高级路径设置过渡效果;通过组合简写(或,或)调整速度/时长。速度/时长仅能通过属性的简写设置,无法作为独立子属性设置。两种方式均可反向读取:/读取为/,(如)读取为。
--prop X=officecli help pptx <element>transition=morphslideadvanceTimeadvanceClicktransitionofficecli help pptx transitiontransitiontransitionDurationtransitionSpeedset <slide> --prop transition=morphtransition=morph-slow-fasttransition=morph-<DUR_MS>transitiontransition=morph-slow-fasttransitionSpeed=slowfasttransition=morph-<DUR_MS>morph-1500transitionDuration=1500Mental Model & Inheritance
核心模型与继承规则
Inherits pptx v2. You should have read first. This skill assumes you know how to: add slides + shapes + charts + connectors; address by / ; quote paths; use heredocs; use on flow connectors; run the Delivery Gate 1–5a; attribute vs vs . If any of those are unfamiliar, read pptx v2 first.
skills/officecli-pptx/SKILL.md@name=@id=batchtailEnd=triangle[AGENT-ERROR][RENDERER-BUG][SKILL gap]Inherited from pptx v2 (do NOT re-teach):
- Visual delivery floor — title ≥ 36pt / body ≥ 18pt / title ≥ 2× body, cover-richness, contrast floor, no literals, ≤ 1 animation per slide / ≤ 600ms.
\$\t\n - Grid math — 33.87 × 19.05cm, edge margin ≥ 1.27cm, inter-block gap ≥ 0.76cm, ≥ 20% negative space. For N-card grids: .
col = (33.87 − 2·margin − (N−1)·gap) / N - Four canonical palettes (Executive navy / Forest & moss / Warm terracotta / Charcoal minimal) — morph decks may pick a different mood from , but contrast rules still apply.
reference/styles/ - Chart-choice table — column vs bar vs line vs pie vs scatter vs large-text KPI; = split.
> 3 series + > 8 categories - Connector canon — ,
shape=straight|elbow|curvefor from/to (C-P-6),@id=on every flow.tailEnd=triangle - Shell escape 3-layer — single-quoted, heredocs for batch,
$for real newlines.<a:br/> - Resident mode + batch ≤ 12 ops, single-quoted delimiter.
<<'EOF' - Delivery Gate 1-5a (schema, token grep, hyperlink rPr, slide-order, dark-on-dark) — every gate prints OK before declaring done.
- Known Issues C-P-1..7 (hyperlink rPr, chart spPr warning, animation duration readback, animation remove, connector enum, connector , chart color renderer normalization).
@name= - Attribution triage — vs
[AGENT-ERROR]vs[RENDERER-BUG].[SKILL gap]
Morph identity — what this skill owns (delta on top of pptx v2):
- Cross-slide shape-name binding. PowerPoint's Morph engine pairs shapes by identical across adjacent slides and interpolates their position / size / rotation / fill / opacity. No matching name ⇒ no animation, silent fade. This is a workflow discipline, not a CLI feature.
name= - Namespace prefixes: (persistent decoration, never ghosted) /
!!scene-*(content that evolves then exits) /!!actor-*(per-slide content, ghosted on slide N+1). Plan the names BEFORE you#sN-*.add - Ghost position (off the right edge of the 33.87cm canvas). Never delete a
x=36cm-prefixed shape — move it off-canvas so the morph exit animation still plays.!! - auto-prefix quirk. The CLI auto-prepends
transition=morphto every shape on a morph slide (!!is stored as#s1-title).!!#s1-titlepath selectors still resolve —@name=returns the shape (matching is suffix/prefix-tolerant). The name you read back is the prefixed form. See §Known Issues.get .../shape[@name=#s1-title] - Adjacent-slide spatial variety. Displacement ≥ 5cm or rotation ≥ 15° between pairs — otherwise morph interpolates nothing visible.
- Renderer reality. Morph renders in PowerPoint 365 / Keynote / WPS. LibreOffice and many web viewers render as plain fade (runtime feature). Not a skill defect — .
[RENDERER-BUG]
继承自pptx v2。你应已阅读。本技能默认你已掌握:添加幻灯片/形状/图表/连接器;通过/定位元素;路径引用;使用 heredocs;为流程连接器设置;执行交付关卡1–5a;区分//。若对以上内容不熟悉,请先阅读pptx v2文档。
skills/officecli-pptx/SKILL.md@name=@id=batchtailEnd=triangle[AGENT-ERROR][RENDERER-BUG][SKILL gap]从pptx v2继承的内容(不再重复说明):
- 视觉交付基准——标题≥36pt / 正文≥18pt / 标题字号≥正文2倍、封面丰富度、对比度基准、禁止字面量、单幻灯片≤1个动画/时长≤600ms。
\$\t\n - 网格计算——33.87×19.05cm画布、边缘边距≥1.27cm、模块间距≥0.76cm、留白≥20%。对于N卡片网格:。
col = (33.87 − 2·margin − (N−1)·gap) / N - 四种标准调色板(行政海军蓝/森林苔藓绿/暖陶土色/极简炭灰色)——Morph演示文稿可从选择不同风格,但仍需遵循对比度规则。
reference/styles/ - 图表选择表——柱状图/条形图/折线图/饼图/散点图/大文本KPI;需拆分。
>3个系列 + >8个类别 - 连接器规范——、通过
shape=straight|elbow|curve指定连接目标(C-P-6)、所有流程连接器设置@id=。tailEnd=triangle - Shell三层转义——用单引号包裹、批量操作使用heredocs、用
$表示真实换行。<a:br/> - 常驻模式+批量操作≤12个步骤、单引号分隔符。
<<'EOF' - 交付关卡1-5a(schema、令牌检查、超链接rPr、幻灯片顺序、暗底暗字)——所有关卡显示OK后方可完成交付。
- 已知问题C-P-1..7(超链接rPr、图表spPr警告、动画时长读取、移除动画、连接器枚举、连接器、图表颜色渲染归一化)。
@name= - 问题分类——/
[AGENT-ERROR]/[RENDERER-BUG]。[SKILL gap]
Morph专属特性(在pptx v2基础上新增):
- 跨幻灯片形状名称绑定。PowerPoint的Morph引擎通过相邻幻灯片间**完全相同的**匹配形状,并插值其位置/大小/旋转/填充/透明度。无匹配名称则无动画,仅显示默认淡入淡出。这是工作流规范,而非CLI功能。
name= - 命名空间前缀:(持久装饰元素,永不隐藏)/
!!scene-*(动态变化后退出的内容)/!!actor-*(单幻灯片内容,在第N+1张幻灯片隐藏)。添加元素前需规划好名称。#sN-* - 隐藏位置(超出33.87cm画布右边缘)。切勿删除
x=36cm前缀的形状——将其移至画布外,以确保Morph退出动画正常播放。!! - 自动前缀特性。CLI会自动为Morph幻灯片上的所有形状添加
transition=morph前缀(!!存储为#s1-title)。!!#s1-title路径选择器仍可正常解析——@name=可返回对应形状(匹配时忽略前缀/后缀)。读取到的名称为带前缀的形式。参见§已知问题。get .../shape[@name=#s1-title] - 相邻幻灯片空间差异。配对形状的位移≥5cm或旋转≥15°——否则Morph无法生成可见的插值动画。
- 渲染环境限制。Morph可在PowerPoint 365/Keynote/WPS中正常渲染。LibreOffice及多数网页查看器仅渲染为普通淡入淡出(运行时特性)。这不属于技能缺陷——标记为。
[RENDERER-BUG]
Reverse handoff — when to go BACK to pptx base (or sibling skills)
反向移交规则——何时回归pptx基础版(或同类技能)
Stay in pptx v2 base for any deck without cross-slide motion (board reviews, sales decks, all-hands, training). Stay in officecli-pitch-deck for fundraising narrative arcs without morph. Use this skill only when the user explicitly asks for "morph" / "smooth transitions" / "continuous animation" AND ≥ 2 consecutive slides share a visual element that transforms. "Animated deck" meaning one-off entrance animations → pptx v2 §Animations, not morph.
无跨幻灯片动效的演示文稿(董事会评审、销售演示、全员大会、培训材料)请使用pptx v2基础版。无Morph效果的筹款叙事文稿请使用officecli-pitch-deck。仅当用户明确要求"morph"/"smooth transitions"/"continuous animation"且≥2张连续幻灯片共享需变换的视觉元素时,方可使用本技能。若"动画演示文稿"指单张幻灯片的入场动画,请使用pptx v2 §Animations,而非本技能。
Shell & Execution Discipline
Shell与执行规范
Shell quoting, incremental execution, convention → see pptx v2 §Shell & Execution Discipline. Same rules verbatim.
$FILEMorph-specific additions:
- in shell values — single-quote. Bash / zsh history expansion eats unquoted
!!. Always use!!foo(single quotes). In Python--prop 'name=!!scene-ring'lists, no quoting needed — passsubprocess.run([...])as a plain string."name=!!scene-ring" - in prop text — single-quote (price tokens).
$and--prop text='$9/mo'— NEVER--prop text='$199/yr'(zsh/bash eat--prop text="$9/mo"as empty var → text rendered as$9/ stray period). Same for.,${VAR},$USER,\n,\rinside a double-quoted prop. Gate 2 morph addendum below greps for the leak signature.\t - in shell values — safe, but quote anyway.
#is a comment leader only at the start of a shell word.#works, but--prop name=#s1-titleis the habit that stops you guessing.--prop 'name=#s1-title' - Batch heredoc is the cleanest path for multi-shape slides. disables all shell expansion — safe for
<<'EOF' | officecli batch $FILE,$,!!,#inside the JSON body.' - responses wrap the payload in
--json. Both.data.results[]andqueryreturn agetarray. A single node's.data.results[]sits atformat; that node's children sit at.data.results[0].format.X(each child's format at.data.results[0].children[]). Always go through.data.results[0].children[].format.X— bare.data.results[0]or.data.children[]returns null silently..data.format - Variable: at the top of every build script; every example below uses
FILE="deck.pptx".$FILE - Gate shell pattern — COUNT, then if/else. Never write — when grep exits 1 (0 matches), the
grep … && echo LEAK || echo OKbranch fires with empty stdout and prints "OK" confusingly (or prints "LEAK" from prior pipes). Canonical form:||.COUNT=$(cmd | wc -l); if [ "$COUNT" -gt 0 ]; then echo "LEAK: …"; else echo "OK"; fi
Shell引用、增量执行、约定 → 参见pptx v2 §Shell & Execution Discipline。规则完全一致。
$FILEMorph专属补充规则:
- Shell值中的——使用单引号。Bash/zsh历史扩展会解析未加引号的
!!。请始终使用!!foo(单引号)。在Python--prop 'name=!!scene-ring'列表中无需引号——直接传递subprocess.run([...])作为字符串。"name=!!scene-ring" - 属性文本中的——使用单引号(价格令牌)。
$和--prop text='$9/mo'——切勿使用--prop text='$199/yr'(zsh/bash会将--prop text="$9/mo"解析为空变量,导致文本渲染为$9或孤立点)。双引号属性中的/mo、${VAR}、$USER、\n、\r同理。下文的关卡2 Morph补充规则会检查此类泄漏特征。\t - Shell值中的——安全但仍建议加引号。
#仅在Shell语句开头时作为注释符。#可正常工作,但--prop name=#s1-title是更稳妥的习惯,避免判断失误。--prop 'name=#s1-title' - 批量操作heredocs是多形状幻灯片的最佳方式。会禁用所有Shell扩展——可安全处理JSON体中的
<<'EOF' | officecli batch $FILE、$、!!、#。' - 响应将负载包裹在
--json中。.data.results[]和query均返回get数组。单个节点的.data.results[]位于format;该节点的子元素位于.data.results[0].format.X(每个子元素的.data.results[0].children[]位于format)。请始终通过.data.results[0].children[].format.X访问——直接使用.data.results[0]或.data.children[]会静默返回null。.data.format - 变量约定:每个构建脚本顶部定义;下文所有示例均使用
FILE="deck.pptx"。$FILE - Shell关卡模式——计数后判断。切勿编写——当grep返回1(无匹配)时,
grep … && echo LEAK || echo OK分支会触发并输出空内容,导致错误显示"OK"(或显示之前管道的"LEAK")。标准形式:||。COUNT=$(cmd | wc -l); if [ "$COUNT" -gt 0 ]; then echo "LEAK: …"; else echo "OK"; fi
Two primitives this skill owns
本技能核心的两个概念
- Scene Actors = persistent -named shapes (decoration or content) paired by identical name across adjacent slides so Morph can interpolate them. Every
!!/!!scene-*shape is a scene actor.!!actor-* - Choreography = the plan for how actors evolve — who moves where, who enters, who exits, on which slide pair. Written BEFORE code in the §Morph Pair Planning table.
Use this skill when the user asks for morph motion AND ≥ 2 consecutive slides share a visual element that transforms. Target-viewer caveat: morph needs PowerPoint 365 / Keynote / WPS — if the user is LibreOffice-only, warn first (see §Renderer honesty).
Speaker notes rule. Every content slide (non-cover, non-closing) MUST carry speaker notes via . Missing notes = not shippable — inherits pptx v2 §Hard rules (H7). Morph decks tend to be visually minimal, so notes carry the narration.
officecli add "$FILE" /slide[N] --type notes --prop text='…'- 场景角色 = 带前缀的持久形状(装饰或内容),通过相同名称在相邻幻灯片间配对,使Morph可插值动画。所有
!!/!!scene-*形状均为场景角色。!!actor-* - 编排 = 规划角色的演变方式——谁移动到何处、谁入场、谁退场、在哪些幻灯片对中执行。需在§Morph配对规划表中提前编写,再进行代码实现。
仅当用户要求Morph动效且≥2张连续幻灯片共享需变换的视觉元素时,方可使用本技能。目标查看器注意事项:Morph需要PowerPoint 365/Keynote/WPS——若用户仅使用LibreOffice,请提前告知(参见§渲染环境说明)。
演讲备注规则。所有内容幻灯片(非封面、非结尾)必须通过添加演讲备注。缺失备注则不可交付——继承自pptx v2 §硬性规则(H7)。Morph演示文稿通常视觉简洁,备注需承载叙事内容。
officecli add "$FILE" /slide[N] --type notes --prop text='…'What is Morph? (core mechanics)
Morph是什么?(核心机制)
PowerPoint's Morph transition creates smooth motion by interpolating shape properties between adjacent slides, matched by identical shape names.
Slide 1: shape name="!!scene-ring" x=5cm width=8cm fill=E94560 opacity=0.3
Slide 2: shape name="!!scene-ring" x=20cm width=12cm fill=E94560 opacity=0.6
↓ transition=morph on slide 2
Result: Ring smoothly moves, grows, and fades darker over ~1 secondMorph only runs if slide N+1 carries . Apply it via on creation, or after the fact. Slides 2+ that omit this prop fall back to whatever the master defines (usually no transition) — motion dies silently.
transition=morphofficecli add / --type slide --prop transition=morphofficecli set "/slide[N]" --prop transition=morphThree-prefix naming system (non-negotiable):
| Prefix | Role | Lifecycle | Example |
|---|---|---|---|
| Background / decoration — persists across the entire deck | Set once, adjust position/size to create motion; rarely ghosted | |
| Content / foreground — evolves across a section | Introduced on slide N, modified on slide N+1, N+2…, ghosted to | |
| Per-slide content (titles, bullets, captions) | Added fresh on slide N, ghosted to | |
Hard rule: and names must NEVER collide (e.g., + in the same deck — morph engine confuses them). Disambiguate: vs .
!!scene-*!!actor-*!!scene-card!!actor-card!!scene-card-bg!!actor-card-contentCharts can be morph-paired. accepts (the name reads back), so a chart with an identical -name on adjacent slides participates in shape-name morph pairing — the chart frame interpolates position / size. Note morph cannot interpolate the plotted data inside the chart frame. For bar-grow / line-grow narratives where the bars themselves must animate: (a) accept plain fade-in of the chart as-is, OR (b) build N rectangles manually sized to the values and morph those — each rect carries the same name across adjacent slides while width / height / fill evolves.
officecli add … --type chart--prop name=!!…!!!!actor-bar-K!!actor-bar-KGhost accumulation is silent. Once a -prefixed shape appears on any slide, it stays visible on every subsequent morph slide unless explicitly moved to . helper does NOT detect shapes lingering in the visible area — only Gate 5b screenshot audit does. Plan every actor's exit slide in the pair table BEFORE coding.
!!x=36cmfinal-check!!Spatial variety rule. Adjacent slides must have noticeably different compositions — displacement ≥ 5cm OR rotation ≥ 15° OR size delta ≥ 30% on at least 3 morph-paired shapes. Without this, morph interpolates nothing visible and the transition collapses to a fade (silent-fail).
Simultaneous-timing constraint. All shapes in one morph pair animate simultaneously. To stagger shape A before shape B, insert an intermediate keyframe slide — there is no per-shape delay knob.
!!Paired vs enter vs exit — three behaviors, one rule. Same mechanism (shape-name match) produces three outcomes:
| Behavior | Source slide A | Target slide B | Who carries |
|---|---|---|---|
| Paired morph (interpolate) | has | has | both slides, identical name |
| Enter (fade / morph-in) | — (no counterpart) | has | target only — new shape |
| Exit via ghost (slide off) | has | has | both — same name, B is off-canvas |
Outgoing content (not incoming) is what gets -prefixed + ghosted. shapes silently "disappear" when you forget them — their name going missing on slide B reads as an unpaired exit (plain fade). Always explicit-ghost to so the exit animation slides off the right edge visibly. One runnable example:
!!!!actor-*x=36cmbash
undefinedPowerPoint的Morph过渡通过插值相邻幻灯片间形状的属性,创建平滑动效,匹配依据为完全相同的形状名称。
幻灯片1:shape name="!!scene-ring" x=5cm width=8cm fill=E94560 opacity=0.3
幻灯片2:shape name="!!scene-ring" x=20cm width=12cm fill=E94560 opacity=0.6
↓ 幻灯片2设置transition=morph
结果: 圆环在约1秒内平滑移动、放大并加深透明度仅当第N+1张幻灯片设置时,Morph才会生效。可在创建幻灯片时通过设置,或通过事后修改。未设置该属性的第2+张幻灯片会使用母版默认过渡(通常无过渡)——动效会静默失效。
transition=morphofficecli add / --type slide --prop transition=morphofficecli set "/slide[N]" --prop transition=morph三前缀命名系统(不可协商):
| 前缀 | 作用 | 生命周期 | 示例 |
|---|---|---|---|
| 背景/装饰——贯穿整个演示文稿 | 仅设置一次,调整位置/大小实现动效;极少隐藏 | |
| 内容/前景——在某章节内动态变化 | 在第N张幻灯片引入,在第N+1、N+2…张幻灯片修改,在退场幻灯片移至 | |
| 单幻灯片内容(标题、项目符号、说明文字) | 在第N张幻灯片新增,在第N+1张幻灯片移至 | |
硬性规则:和名称绝对不可冲突(例如,同一演示文稿中同时存在和——Morph引擎会混淆两者)。需明确区分: vs 。
!!scene-*!!actor-*!!scene-card!!actor-card!!scene-card-bg!!actor-card-content图表可进行Morph配对。支持(名称可被读取),因此相邻幻灯片中带相同前缀名称的图表可参与形状名称Morph配对——图表框架会插值位置/大小。注意Morph无法插值图表框架内的绘制数据。若需实现条形图增长/折线图增长的叙事效果(条形本身需动画):(a) 接受图表默认淡入,或(b) 手动创建N个矩形,按数值调整大小,并在相邻幻灯片中使用相同名称,同时调整宽度/高度/填充。
officecli add … --type chart--prop name=!!…!!!!actor-bar-K!!actor-bar-K隐藏元素累积是静默的。一旦某张幻灯片出现前缀的形状,它会在后续所有Morph幻灯片中保持可见,除非明确移至。助手无法检测形状是否停留在可见区域——仅能通过关卡5b截图审核检测。请在编码前于配对表中规划每个角色的退场幻灯片。
!!x=36cmfinal-check!!空间差异规则。相邻幻灯片的布局必须明显不同——至少3个Morph配对形状的位移≥5cm或旋转≥15°或尺寸变化≥30%。若无此差异,Morph无法生成可见的插值动画,过渡效果会退化为淡入淡出(静默失效)。
同步时序限制。同一Morph配对中的所有形状会同时动画。若需让形状A先于形状B动画,需插入中间关键帧幻灯片——CLI中无单形状延迟参数。
!!配对/入场/退场——三种效果,同一规则。同一机制(形状名称匹配)可产生三种结果:
| 效果 | 源幻灯片A | 目标幻灯片B | 哪张幻灯片带 |
|---|---|---|---|
| 配对Morph(插值) | 包含 | 包含 | 两张幻灯片均包含,名称完全相同 |
| 入场(淡入/Morph入场) | —(无对应形状) | 包含 | 仅目标幻灯片——新增形状 |
| 隐藏退场(滑出) | | | 两张幻灯片均包含——名称相同,B中形状位于画布外 |
需隐藏退场的是 outgoing 内容(而非 incoming)。若忘记处理形状,它们会静默"消失"——第B张幻灯片中缺失该名称会被视为未配对退场(普通淡入淡出)。请始终明确移至隐藏,以实现可见的右侧滑出退场动画。可运行示例:
!!actor-*x=36cmbash
undefinedSlide 2: actor is visible at x=5cm — Slide 3: same name, ghosted off-canvas → visible slide-off motion
幻灯片2:角色位于x=5cm可见位置 —— 幻灯片3:同一名称,移至画布外隐藏 → 可见滑出动效
officecli add "$FILE" "/slide[3]" --type shape --prop 'name=!!actor-metric'
--prop text="42%" --prop x=36cm --prop y=8cm --prop width=6cm --prop height=3cm
--prop text="42%" --prop x=36cm --prop y=8cm --prop width=6cm --prop height=3cm
**Content (`#sN-*`) is added fresh per slide.** Because text changes every slide, Morph has no meaningful pairing to do on titles / body — it cross-fades them. This is why `#sN-*` get different names per slide (they are intentionally unpaired) and must be ghosted on slide N+1. Scene actors (`!!`) carry the continuity; content (`#`) carries the message.officecli add "$FILE" "/slide[3]" --type shape --prop 'name=!!actor-metric'
--prop text="42%" --prop x=36cm --prop y=8cm --prop width=6cm --prop height=3cm
--prop text="42%" --prop x=36cm --prop y=8cm --prop width=6cm --prop height=3cm
**内容(`#sN-*`)每张幻灯片新增**。由于每张幻灯片的文本不同,Morph无法对标题/正文进行有意义的配对——仅会交叉淡入淡出。因此`#sN-*`每张幻灯片使用不同名称(故意不配对),且必须在第N+1张幻灯片隐藏。场景角色(`!!`)保证视觉连续性;内容(`#`)传递信息。Morph Pair Planning (pre-code, REQUIRED)
Morph配对规划(编码前必备)
Before planning morph pairs, if the deck's audience / purpose / narrative is underspecified, run the planning prompt in to emit a first — a morph arc without a narrative spine collapses into "slide with motion", not "story with motion".
reference/decision-rules.mdbrief.mdPlan every transition in a table inside before writing any . Renaming shapes mid-build is the #1 cause of ghost accumulation bugs.
brief.mdofficecli add| Pair | Slide A (start) | Slide B (end) | Actors in play | Ghost on Slide B |
|---|---|---|---|---|
| 1→2 | | Ring shifts to x=20cm, grows 8→12cm; | | |
| 2→3 | | Feature box small (6cm), | | |
| 3→4 | Content section A | Section B divider | — | |
Planning rules:
- Decide ALL names up front — each morph-paired shape must use the exact same name on both slides.
!! - Classify every shape as
!!or!!scene-*. Scene shapes persist; actors must have a planned exit slide.!!actor-* - Section-transition boundary: when moving into a new topic section, ghost ALL previous-section on the first slide of the new section. Only
!!actor-*(whole-deck decoration) remains.!!scene-* - Do NOT start building until the table is complete. If the plan changes mid-build, redraw the table and re-verify affected slides.
规划Morph配对前,若演示文稿的受众/用途/叙事未明确,请运行中的规划提示,生成——无叙事主线的Morph弧会沦为"带动效的幻灯片",而非"带动效的故事"。
reference/decision-rules.mdbrief.md编写任何命令前,需在的表格中规划所有过渡效果。构建过程中重命名形状是导致隐藏元素累积bug的首要原因。
officecli addbrief.md| 配对 | 幻灯片A(起始) | 幻灯片B(结束) | 参与的角色 | 幻灯片B中隐藏的元素 |
|---|---|---|---|---|
| 1→2 | | 圆环移至x=20cm,尺寸从8→12cm; | | |
| 2→3 | | 功能框缩小至6cm, | | |
| 3→4 | 内容章节A | 章节B分隔页 | — | |
规划规则:
- 提前确定所有名称——每个Morph配对形状在两张幻灯片中必须使用完全相同的名称。
!! - 将每个形状分类为
!!或!!scene-*。场景形状持续存在;角色必须规划退场幻灯片。!!actor-* - 章节过渡边界: 进入新主题章节时,在新章节的第一张幻灯片中隐藏所有前一章节的。仅保留
!!actor-*(全演示文稿装饰元素)。!!scene-* - 表格完成前请勿开始构建。若中途更改规划,请重新绘制表格并验证受影响的幻灯片。
Morph Recipes (4 patterns)
Morph示例(4种模式)
Four patterns cover ~95% of morph decks. throughout. Each block is self-contained and ≤ 20 lines.
$FILE="deck.pptx"4种模式可覆盖约95%的Morph演示文稿。下文均使用。每个代码块独立且≤20行。
$FILE="deck.pptx"(a) Single-element morph — size / position
(a) 单元素Morph——尺寸/位置变化
Visual outcome. A hero title centered on slide 1 (size 48pt at y=8cm), then slide 2 shrinks it to 32pt and shifts it to the top-left corner (x=1.5cm, y=1cm) — letting fresh slide-2 content take center stage. One shape, clean motion, no actors.
bash
FILE="deck.pptx"
officecli create "$FILE"; officecli open "$FILE"视觉效果。幻灯片1居中显示大标题(48pt,y=8cm),幻灯片2将其缩小至32pt并移至左上角(x=1.5cm,y=1cm)——让幻灯片2的新内容占据中心。仅一个形状,动效简洁,无额外角色。
bash
FILE="deck.pptx"
officecli create "$FILE"; officecli open "$FILE"Slide 1 — hero
幻灯片1——主标题
officecli add "$FILE" / --type slide --prop layout=blank --prop background=1E2761
officecli add "$FILE" /slide[1] --type shape --prop 'name=!!actor-headline'
--prop text="The one idea" --prop x=4cm --prop y=8cm --prop width=26cm --prop height=3cm
--prop font=Georgia --prop size=48 --prop bold=true --prop color=FFFFFF --prop align=center --prop fill=none
--prop text="The one idea" --prop x=4cm --prop y=8cm --prop width=26cm --prop height=3cm
--prop font=Georgia --prop size=48 --prop bold=true --prop color=FFFFFF --prop align=center --prop fill=none
officecli add "$FILE" / --type slide --prop layout=blank --prop background=1E2761
officecli add "$FILE" /slide[1] --type shape --prop 'name=!!actor-headline'
--prop text="核心观点" --prop x=4cm --prop y=8cm --prop width=26cm --prop height=3cm
--prop font=Georgia --prop size=48 --prop bold=true --prop color=FFFFFF --prop align=center --prop fill=none
--prop text="核心观点" --prop x=4cm --prop y=8cm --prop width=26cm --prop height=3cm
--prop font=Georgia --prop size=48 --prop bold=true --prop color=FFFFFF --prop align=center --prop fill=none
Slide 2 — headline shrinks + moves; new body takes stage
幻灯片2——标题缩小并移动;新正文显示
officecli add "$FILE" / --type slide --prop layout=blank --prop background=1E2761 --prop transition=morph
officecli add "$FILE" /slide[2] --type shape --prop 'name=!!actor-headline'
--prop text="The one idea" --prop x=1.5cm --prop y=1cm --prop width=12cm --prop height=1.5cm
--prop font=Georgia --prop size=24 --prop bold=true --prop color=FFFFFF --prop align=left --prop fill=none officecli add "$FILE" /slide[2] --type shape --prop 'name=#s2-body'
--prop text="Here is the supporting evidence." --prop x=1.5cm --prop y=5cm --prop width=30cm --prop height=2cm
--prop font=Calibri --prop size=20 --prop color=CADCFC --prop fill=none
--prop text="The one idea" --prop x=1.5cm --prop y=1cm --prop width=12cm --prop height=1.5cm
--prop font=Georgia --prop size=24 --prop bold=true --prop color=FFFFFF --prop align=left --prop fill=none officecli add "$FILE" /slide[2] --type shape --prop 'name=#s2-body'
--prop text="Here is the supporting evidence." --prop x=1.5cm --prop y=5cm --prop width=30cm --prop height=2cm
--prop font=Calibri --prop size=20 --prop color=CADCFC --prop fill=none
officecli close "$FILE"; officecli validate "$FILE"
undefinedofficecli add "$FILE" / --type slide --prop layout=blank --prop background=1E2761 --prop transition=morph
officecli add "$FILE" /slide[2] --type shape --prop 'name=!!actor-headline'
--prop text="核心观点" --prop x=1.5cm --prop y=1cm --prop width=12cm --prop height=1.5cm
--prop font=Georgia --prop size=24 --prop bold=true --prop color=FFFFFF --prop align=left --prop fill=none officecli add "$FILE" /slide[2] --type shape --prop 'name=#s2-body'
--prop text="以下是支撑论据。" --prop x=1.5cm --prop y=5cm --prop width=30cm --prop height=2cm
--prop font=Calibri --prop size=20 --prop color=CADCFC --prop fill=none
--prop text="核心观点" --prop x=1.5cm --prop y=1cm --prop width=12cm --prop height=1.5cm
--prop font=Georgia --prop size=24 --prop bold=true --prop color=FFFFFF --prop align=left --prop fill=none officecli add "$FILE" /slide[2] --type shape --prop 'name=#s2-body'
--prop text="以下是支撑论据。" --prop x=1.5cm --prop y=5cm --prop width=30cm --prop height=2cm
--prop font=Calibri --prop size=20 --prop color=CADCFC --prop fill=none
officecli close "$FILE"; officecli validate "$FILE"
undefined(b) Multi-element coordinated morph — Actors / Choreography
(b) 多元素协同Morph——角色/编排
Visual outcome. Three scene actors (, , ) repositioned across 3 slides to feel like a camera pan. Fresh per-slide titles fade in / out via the ghost pattern. Use this when the narrative has a continuous visual backdrop.
!!scene-ring!!scene-dot!!scene-band#sN-*bash
undefined视觉效果。三个场景角色(, , )在3张幻灯片中重新定位,模拟镜头平移效果。单幻灯片标题通过隐藏模式淡入/淡出。适用于叙事需连续视觉背景的场景。
!!scene-ring!!scene-dot!!scene-band#sN-*bash
undefinedSlide 1 — anchor composition (already built via recipe a; here we add actors)
幻灯片1——锚定布局(已通过示例a构建;此处添加角色)
officecli add "$FILE" /slide[1] --type shape --prop 'name=!!scene-ring' --prop preset=ellipse
--prop fill=E94560 --prop opacity=0.3 --prop x=5cm --prop y=3cm --prop width=8cm --prop height=8cm officecli add "$FILE" /slide[1] --type shape --prop 'name=!!scene-dot' --prop preset=ellipse
--prop fill=0F3460 --prop x=28cm --prop y=15cm --prop width=1cm --prop height=1cm
--prop fill=E94560 --prop opacity=0.3 --prop x=5cm --prop y=3cm --prop width=8cm --prop height=8cm officecli add "$FILE" /slide[1] --type shape --prop 'name=!!scene-dot' --prop preset=ellipse
--prop fill=0F3460 --prop x=28cm --prop y=15cm --prop width=1cm --prop height=1cm
officecli add "$FILE" /slide[1] --type shape --prop 'name=!!scene-ring' --prop preset=ellipse
--prop fill=E94560 --prop opacity=0.3 --prop x=5cm --prop y=3cm --prop width=8cm --prop height=8cm officecli add "$FILE" /slide[1] --type shape --prop 'name=!!scene-dot' --prop preset=ellipse
--prop fill=0F3460 --prop x=28cm --prop y=15cm --prop width=1cm --prop height=1cm
--prop fill=E94560 --prop opacity=0.3 --prop x=5cm --prop y=3cm --prop width=8cm --prop height=8cm officecli add "$FILE" /slide[1] --type shape --prop 'name=!!scene-dot' --prop preset=ellipse
--prop fill=0F3460 --prop x=28cm --prop y=15cm --prop width=1cm --prop height=1cm
Slide 2 — morph: ring moves + grows, dot slides left (spatial variety ≥ 5cm on both)
幻灯片2——Morph:圆环移动并放大,圆点向左滑动(两者空间差异≥5cm)
officecli set "$FILE" "/slide[2]" --prop transition=morph
officecli add "$FILE" /slide[2] --type shape --prop 'name=!!scene-ring' --prop preset=ellipse
--prop fill=E94560 --prop opacity=0.6 --prop x=20cm --prop y=2cm --prop width=12cm --prop height=12cm officecli add "$FILE" /slide[2] --type shape --prop 'name=!!scene-dot' --prop preset=ellipse
--prop fill=0F3460 --prop x=3cm --prop y=16cm --prop width=1.5cm --prop height=1.5cm
--prop fill=E94560 --prop opacity=0.6 --prop x=20cm --prop y=2cm --prop width=12cm --prop height=12cm officecli add "$FILE" /slide[2] --type shape --prop 'name=!!scene-dot' --prop preset=ellipse
--prop fill=0F3460 --prop x=3cm --prop y=16cm --prop width=1.5cm --prop height=1.5cm
officecli set "$FILE" "/slide[2]" --prop transition=morph
officecli add "$FILE" /slide[2] --type shape --prop 'name=!!scene-ring' --prop preset=ellipse
--prop fill=E94560 --prop opacity=0.6 --prop x=20cm --prop y=2cm --prop width=12cm --prop height=12cm officecli add "$FILE" /slide[2] --type shape --prop 'name=!!scene-dot' --prop preset=ellipse
--prop fill=0F3460 --prop x=3cm --prop y=16cm --prop width=1.5cm --prop height=1.5cm
--prop fill=E94560 --prop opacity=0.6 --prop x=20cm --prop y=2cm --prop width=12cm --prop height=12cm officecli add "$FILE" /slide[2] --type shape --prop 'name=!!scene-dot' --prop preset=ellipse
--prop fill=0F3460 --prop x=3cm --prop y=16cm --prop width=1.5cm --prop height=1.5cm
Ghost slide-1 content (name path still resolves after morph — see Known Issues)
隐藏幻灯片1内容(Morph后名称路径仍可解析——参见已知问题)
officecli set "$FILE" "/slide[2]/shape[@name=#s1-title]" --prop x=36cm 2>/dev/null || true
officecli set "$FILE" "/slide[2]/shape[@name=#s1-title]" --prop x=36cm 2>/dev/null || true
Verify morph pair: identical names on slides 1 & 2
验证Morph配对:幻灯片1和2中的名称完全相同
officecli get "$FILE" /slide[1] --depth 1 --json | jq -r '.data.results[0].children[]?.format.name // empty'
officecli get "$FILE" /slide[2] --depth 1 --json | jq -r '.data.results[0].children[]?.format.name // empty'
officecli get "$FILE" /slide[1] --depth 1 --json | jq -r '.data.results[0].children[]?.format.name // empty'
officecli get "$FILE" /slide[2] --depth 1 --json | jq -r '.data.results[0].children[]?.format.name // empty'
Compare — !!scene-ring
and !!scene-dot
MUST appear on both, byte-identical.
!!scene-ring!!scene-dot对比——!!scene-ring
和!!scene-dot
必须同时出现在两张幻灯片中,名称完全一致。
!!scene-ring!!scene-dotNote: morph stores names with a !!
prefix; compare the prefixed forms.
!!注意:Morph存储名称时会添加!!
前缀;请对比带前缀的名称。
!!undefinedundefined(c) Continuous multi-slide morph (story arc) — use helpers
(c) 连续多幻灯片Morph(叙事弧)——使用助手工具
Visual outcome. A 5-slide arc telling one continuous story: same 2 scene actors drift across the canvas as the narrative progresses; content () refreshes per slide and is ghosted on the next. Building this by hand is ~60 commands — use to keep the build script short and auto-verified.
#sN-*reference/morph-helpers.pypython
#!/usr/bin/env python3视觉效果。5张幻灯片组成的连续叙事:2个场景角色在画布上移动,配合叙事推进;内容()每张幻灯片更新,并在下一张幻灯片隐藏。手动构建需约60条命令——使用可简化脚本并自动验证。
#sN-*reference/morph-helpers.pypython
#!/usr/bin/env python3Invoke the provided helper library for clone + ghost + verify
调用提供的助手库进行克隆+隐藏+验证
import subprocess, sys, os
SCRIPT_DIR = os.path.dirname(os.path.abspath(file))
HELPERS = os.path.join(SCRIPT_DIR, "reference", "morph-helpers.py")
FILE = "deck.pptx"
def helper(*args):
subprocess.run([sys.executable, HELPERS, *[str(a) for a in args]], check=True)
import subprocess, sys, os
SCRIPT_DIR = os.path.dirname(os.path.abspath(file))
HELPERS = os.path.join(SCRIPT_DIR, "reference", "morph-helpers.py")
FILE = "deck.pptx"
def helper(*args):
subprocess.run([sys.executable, HELPERS, *[str(a) for a in args]], check=True)
... assume slide 1 is built with 2 scene actors (!!scene-ring, !!scene-dot) + #s1-title
... 假设幻灯片1已构建完成,包含2个场景角色(!!scene-ring, !!scene-dot)+ #s1-title
Helper builds slide 2–5 with: clone from previous + apply transition=morph + ghost previous #sN- content
助手工具构建幻灯片2–5:克隆前一张幻灯片 + 设置transition=morph + 隐藏前一张的#s(n-1)-内容
clone
prints the cloned slide's shape list — read it to pick which shape indices carry the
cloneclone
会打印克隆幻灯片的形状列表——读取列表以确定哪些形状索引对应前一张幻灯片的#s(n-1)-内容,然后将这些索引传递给ghost
。
cloneghostprevious slide's #s(n-1)- content, then pass those explicit indices to ghost
.
ghost—
for n in range(2, 6):
helper("clone", FILE, n - 1, n) # clone + set transition=morph + list shapes (note the #s(n-1)- indices)
helper("ghost", FILE, n, 1, 2) # ghost the #s(n-1)- content shapes by index (here shapes 1 & 2)
# …then add THIS slide's #sN- content via officecli add as normal…
helper("final-check", FILE) # structural pass; DOES NOT catch !! lingering in visible area
Helper signatures and source: `reference/morph-helpers.py` (`clone`, `ghost`, `verify`, `final-check`). The shell equivalent is `reference/morph-helpers.sh` — pick one per platform; do not mix.
**When to use helpers vs raw `officecli`.** For 2-3 slide decks, raw commands (recipes a, b) are clearer. For 5+ slides with repeating clone/ghost/verify cadence, helpers save ~40% of commands and provide built-in verification. Every slide is still closed by `officecli validate` before delivery.for n in range(2, 6):
helper("clone", FILE, n - 1, n) # 克隆 + 设置transition=morph + 列出形状(记录#s(n-1)-内容的索引)
helper("ghost", FILE, n, 1, 2) # 通过索引隐藏#s(n-1)-内容形状(此处为形状1和2)
# …然后通过officecli add添加当前幻灯片的#sN-内容…
helper("final-check", FILE) # 结构检查;无法检测!!形状是否停留在可见区域
助手工具签名及源码:`reference/morph-helpers.py`(`clone`, `ghost`, `verify`, `final-check`)。Shell版本为`reference/morph-helpers.sh`——根据平台选择其一,请勿混合使用。
**何时使用助手工具 vs 原生`officecli`**。对于2-3张幻灯片的演示文稿,原生命令(示例a、b)更清晰。对于5+张幻灯片且需重复克隆/隐藏/验证的场景,助手工具可减少约40%的命令,并提供内置验证。每张幻灯片仍需通过`officecli validate`验证后交付。(d) Morph + fade hybrid — entrance on morph slide
(d) Morph+淡入混合——Morph幻灯片入场
Visual outcome. A morph pair where moves continuously while a NEW per-slide card fades in simultaneously. Used when a morph-paired backdrop carries the eye and fresh foreground content needs a softer entrance than a raw appearance.
!!scene-ringbash
undefined视觉效果。Morph配对中连续移动,同时新的单幻灯片卡片淡入。适用于Morph配对背景引导视线,而新前景内容需较柔和入场效果的场景。
!!scene-ringbash
undefinedSlide 2 already has transition=morph and !!scene-ring. Add a new card with fade-entrance.
幻灯片2已设置transition=morph和!!scene-ring。添加带淡入入场效果的新卡片。
officecli add "$FILE" /slide[2] --type shape --prop 'name=#s2-card' --prop preset=roundRect
--prop fill=F5F7FA --prop line=none --prop x=2cm --prop y=12cm --prop width=10cm --prop height=5cm
--prop fill=F5F7FA --prop line=none --prop x=2cm --prop y=12cm --prop width=10cm --prop height=5cm
officecli add "$FILE" /slide[2] --type shape --prop 'name=#s2-card' --prop preset=roundRect
--prop fill=F5F7FA --prop line=none --prop x=2cm --prop y=12cm --prop width=10cm --prop height=5cm
--prop fill=F5F7FA --prop line=none --prop x=2cm --prop y=12cm --prop width=10cm --prop height=5cm
Apply simultaneous-with-morph fade entrance to the new card.
为新卡片设置与Morph同步的淡入入场效果。
'fade-entrance-300-with' = fade in, 300ms, trigger=withPrevious (plays with the morph transition).
'fade-entrance-300-with' = 淡入,300ms,触发时机=withPrevious(与Morph过渡同时播放)。
officecli set "$FILE" "/slide[2]/shape[@name=#s2-card]" --prop animation=fade-entrance-300-with
officecli get "$FILE" "/slide[2]/shape[@name=#s2-card]" --json | jq '.data.results[0].format.animation' # readback sanity — drops the trigger suffix, reads back as "fade-entrance-300"
**Why this works.** Morph animates the `!!scene-*` shapes only (they have a pair on slide 1); the new `#s2-card` has no slide-1 counterpart, so morph would default-fade it — `fade-entrance-300-with` makes that fade explicit and timed. Keep the animation per pptx v2 floor: ≤ 600ms, no bounce / swivel / fly-from-edge (`officecli help pptx animation` for the canonical preset list).officecli set "$FILE" "/slide[2]/shape[@name=#s2-card]" --prop animation=fade-entrance-300-with
officecli get "$FILE" "/slide[2]/shape[@name=#s2-card]" --json | jq '.data.results[0].format.animation' # 读取验证——会移除触发后缀,读取为"fade-entrance-300"
**原理**。Morph仅动画`!!scene-*`形状(它们在幻灯片1中有配对);新的`#s2-card`在幻灯片1中无对应形状,因此Morph会默认淡入——`fade-entrance-300-with`使淡入效果明确并同步时序。动画需遵循pptx v2基准:时长≤600ms,无弹跳/旋转/边缘飞入效果(`officecli help pptx animation`可查看标准预设列表)。Choreography — animation types + staggered timing
编排——动画类型+交错时序
How morph animates multiple shapes determines what the audience sees. Pick the right mechanism for each pair:
| Animation type | How to achieve it (between Slide A and Slide B) |
|---|---|
| Simple move | Same |
| Scale transform | Same name, different |
| Move + scale | Different |
| Color / opacity shift | Same name, different |
| Rotation | Same name, different |
| Font size change | Same name, different |
| Enter (fade in) | Shape exists only on Slide B (no counterpart on A) — morph fades it in |
| Exit (fade out) | Shape exists only on Slide A (no counterpart on B) — morph fades it out |
Multi-shape timing constraint. All shapes in one morph pair animate simultaneously — there is no per-shape delay / duration knob in the CLI (help confirms: no / on slide). To stagger shape A before shape B, split the transition into two pairs with an intermediate slide:
!!morph.durationmorph.delaySlide 2 → Slide 3: !!actor-A moves (!!actor-B stays put)
Slide 3 → Slide 4: !!actor-B moves (!!actor-A stays put or ghosts)Slide 3 is an explicit intermediate keyframe. Do NOT attempt to fake staggering via timing props on the shape's prop — Morph runs before per-shape animations.
animation=Good-enough variety heuristic (Best Practice — creative flexibility). For a morph to read as "motion", change at least 3 of {x, y, width, height, rotation, fill, opacity} on the dominant paired shape, with displacement ≥ 5cm OR rotation ≥ 15° OR size delta ≥ 30%. One shape × 3 props is a valid creative pattern (focus on one hero element).
Delivery Gate 5b-morph-2 is stricter. The gate hard-asserts ≥ 3 DIFFERENT -prefixed shapes each vary by ≥ 1 of {x, y, width, height, rotation, font-size} across the pair — integrity check for "is this really a morph or a pretend-morph". Heuristic informs creative intent; Gate decides delivery. Brand-constant scenery (pinned header strip, footer bar, logo badge) does NOT count toward the 3-shape quota — these are supposed to stay put; motion must come from 3 other named shapes. When in doubt, satisfy the stricter Gate.
!!Deck-length rhythm. Filling every transition with morph reads as anxious, not cinematic. Pace morph moments to deck length:
- 8-10 slides (dense): 3-5 morph moments; motion can cluster.
- 12-18 slides (ceremonial): 3-5 TOTAL morphs, spaced every 4-6 slides; use at section dividers so the animation reads as chapter punctuation, not continuous agitation.
transition=morph - 18+ slides (Act-based): structure into 3 acts with 1 long section-divider morph between acts (5-10s of deliberate motion with a brief hold), plus 2-3 quieter morphs inside each act. Lean heavier on continuity than per-slide
!!scene-*churn.!!actor-*
Morph对多形状的动画方式决定了受众的视觉感受。为每个配对选择合适的机制:
| 动画类型 | 实现方式(幻灯片A与B之间) |
|---|---|
| 简单移动 | 两张幻灯片中形状名称相同,尺寸相同, |
| 缩放变换 | 名称相同, |
| 移动+缩放 | 同时改变 |
| 颜色/透明度变化 | 名称相同, |
| 旋转 | 名称相同, |
| 字号变化 | 名称相同,文本形状的 |
| 入场(淡入) | 形状仅存在于幻灯片B(幻灯片A中无对应)——Morph淡入 |
| 退场(淡出) | 形状仅存在于幻灯片A(幻灯片B中无对应)——Morph淡出 |
多形状时序限制。同一Morph配对中的所有形状会同时动画——CLI中无单形状延迟/时长参数(帮助内容确认:slide无/属性)。若需让形状A先于形状B动画,需将过渡拆分为两个配对,插入中间幻灯片:
!!morph.durationmorph.delay幻灯片2 → 幻灯片3: !!actor-A移动(!!actor-B保持不动)
幻灯片3 → 幻灯片4: !!actor-B移动(!!actor-A保持不动或隐藏)幻灯片3为明确的中间关键帧。请勿尝试通过形状属性的时序参数模拟交错——Morph会在单形状动画前运行。
animation=足够差异的启发式规则(最佳实践——创意灵活性)。为使Morph呈现为"动效",主导配对形状需至少改变{x, y, width, height, rotation, fill, opacity}中的3项,且位移≥5cm或旋转≥15°或尺寸变化≥30%。单个形状×3个属性是有效的创意模式(聚焦一个核心元素)。
交付关卡5b-morph-2更严格。该关卡硬性要求:每个配对中至少3个不同的前缀形状需在{x, y, width, height, rotation, font-size}中至少有一项差异——用于验证"这是否真的是Morph效果,而非伪Morph"。启发式规则指导创意意图;关卡决定是否可交付。品牌固定元素(固定页眉、页脚、Logo徽章)不计入3个形状的配额——这些元素应保持不动;动效应来自其他3个命名形状。若有疑问,请遵循更严格的关卡要求。
!!演示文稿长度节奏。每个过渡都使用Morph会显得过于繁琐,而非具有电影感。需根据演示文稿长度调整Morph的使用频率:
- 8-10张幻灯片(内容密集):3-5次Morph;动效可集中使用。
- 12-18张幻灯片(正式场合):总计3-5次Morph,每4-6张幻灯片使用一次;在章节分隔处使用,使动画作为章节标点,而非持续干扰。
transition=morph - 18+张幻灯片(分幕结构):分为3幕,幕间使用1次长章节分隔Morph(5-10秒的刻意动效,短暂停顿),每幕内使用2-3次较柔和的Morph。更多依赖的连续性,而非单幻灯片
!!scene-*的频繁变化。!!actor-*
Scene-actor spatial rule
场景角色空间规则
Scene actors and actors moving across the canvas MUST stay in predictable zones during morph — otherwise they cross over content and read as clutter.
Safe zones (prefer for scene actor rest positions and morph paths):
Top-right corner: x ≥ 24cm, y ≤ 6cm
Bottom-right: x ≥ 24cm, y ≥ 12cm
Bottom-left: x ≤ 2cm, y ≥ 12cm
Off-canvas (ghost): x ≥ 33.87cm (canvas right edge; use x=36cm for explicit ghost)Avoid resting actors in the content core: . Actors may pass through the core during morph (that's the motion), but they should not end a slide parked there with high opacity unless they are content themselves ( carrying the slide's message).
x = 2~28cm, y = 3~16cm!!actor-*Before placing any scene actor, inspect existing shape bounds:
bash
officecli get "$FILE" "/slide[$N]" --depth 1 --json | \
jq -r '.data.results[0].children[]? | "\(.format.name // .path) x=\(.format.x) y=\(.format.y) w=\(.format.width) h=\(.format.height)"'Confirm the actor's target position does not overlap any content shape's bounding box ( to , to ). If it would overlap, lower actor ≤ 0.15 OR move it to a safe zone.
#sN-*xx + widthyy + heightopacity场景角色和跨画布移动的角色在Morph过程中必须位于可预测区域——否则会与内容重叠,显得杂乱。
安全区域(优先用于场景角色静止位置和Morph路径):
右上角: x ≥ 24cm, y ≤ 6cm
右下角: x ≥ 24cm, y ≥ 12cm
左下角: x ≤ 2cm, y ≥ 12cm
画布外(隐藏): x ≥ 33.87cm (画布右边缘;使用x=36cm明确隐藏)避免将角色停留在内容核心区:。角色在Morph过程中可穿过核心区(这是动效的一部分),但除非它们是内容本身(承载幻灯片信息),否则不应在高透明度下停留在核心区。
x = 2~28cm, y = 3~16cm!!actor-*放置任何场景角色前,请检查现有形状边界:
bash
officecli get "$FILE" "/slide[$N]" --depth 1 --json | \
jq -r '.data.results[0].children[]? | "\(.format.name // .path) x=\(.format.x) y=\(.format.y) w=\(.format.width) h=\(.format.height)"'确认角色目标位置不与任何内容形状的边界框(至,至)重叠。若重叠,需将角色降低至≤0.15,或移至安全区域。
#sN-*xx + widthyy + heightopacityStyle library lookup workflow
样式库查询工作流
reference/styles/Why lookup, not copy. Each of the 52 files is a complete style demo — but the coordinates were hand-tuned for that specific demo's content length. Copying them verbatim into a deck with different content produces overlaps and misalignment (flagged in L5-11). The library's value is the design logic: palette choice for a mood, signature shape, choreography pattern. Apply that logic to your own grid math.
build.shINDEX.mdFour-step lookup:
- Browse INDEX. groups all 52 styles by palette category and mood (e.g.
reference/styles/INDEX.md= authoritative / refined;dark--premium-navy= organic / grounded). The Quick Lookup table also shows each style's primary hex trio (bg / fg / accent) — if the user specified a brand color, scan the hex column to find the nearest match without opening everywarm--earth-organic. Pick 1 style that matches the topic mood OR aligns with the user-specified hex.style.md - Read philosophy. Open for design intent — type pairing, color logic, signature elements.
reference/styles/<style-id>/style.md - Glance technique. Open ONLY for technique reference (signature shapes, palette hex codes, choreography ideas) — coordinates are known-buggy per
reference/styles/<style-id>/build.shL5-11; do not copy them.INDEX.md - Apply on your own canvas. Build your deck using pptx v2 grid math + visual floor; borrow only the palette and the signature gesture.
Pointer: — never inline-copy coordinates from a style build.sh.
→ see reference/styles/<style-id>/reference/styles/为何查询而非复制。每个文件都是完整的样式演示——但坐标是针对该演示的内容长度手动调整的。直接复制到内容不同的演示文稿中会导致重叠和对齐问题( L5-11已标记)。库的价值在于设计逻辑:针对风格的调色板选择、标志性形状、编排模式。将该逻辑应用到自己的网格计算中。
build.shINDEX.md四步查询法:
- 浏览索引。按调色板类别和风格分组所有52种样式(例如
reference/styles/INDEX.md= 权威/精致;dark--premium-navy= 自然/沉稳)。快速查询表还显示每种样式的主色调三元组(背景/前景/强调色)——若用户指定了品牌颜色,可扫描十六进制列找到最匹配的样式,无需打开每个warm--earth-organic。选择1种匹配主题风格或用户指定颜色的样式。style.md - 阅读设计理念。打开查看设计意图——字体搭配、颜色逻辑、标志性元素。
reference/styles/<style-id>/style.md - 查看技术实现。仅打开参考技术实现(标志性形状、调色板十六进制代码、编排思路)——坐标存在已知问题(
reference/styles/<style-id>/build.shL5-11);请勿复制。INDEX.md - 应用到自己的画布。使用pptx v2网格计算+视觉基准构建演示文稿;仅借鉴调色板和标志性设计手法。
提示:——切勿直接复制样式build.sh中的坐标。
→ 参见reference/styles/<style-id>/Delivery Gate (inherits pptx v2 + morph additions)
交付关卡(继承pptx v2 + Morph补充)
Gate 1–5a: full port from pptx v2. → see pptx v2 §Delivery Gate. Schema (whitelisting C-P-2 chart spPr), token grep ( / / / / ), hyperlink rPr (C-P-1), slide-order sanity, dark-on-dark contrast (Gate 5a). Refuse to declare done until every pptx Gate 1–5a prints its OK message. Morph decks have the same token / schema / order risks as any pptx.
$…${{…}}\$\t\n()[]关卡1–5a:完全继承自pptx v2。→ 参见pptx v2 §Delivery Gate。Schema(白名单C-P-2图表spPr)、令牌检查(////)、超链接rPr(C-P-1)、幻灯片顺序合理性、暗底暗字对比度(关卡5a)。所有pptx关卡1–5a显示OK后方可完成交付。Morph演示文稿与普通pptx存在相同的令牌/schema/顺序风险。
$…${{…}}\$\t\n()[]Gate 2 morph addendum — price / metric tokens eaten by zsh
关卡2 Morph补充——zsh解析价格/度量令牌
Pptx v2 Gate 2 covers , , literals, empty / . Morph decks add a class of leaks: price / metric tokens (, , ) written in double-quoted — the shell eats as an empty variable and the CLI stores or a stray period. Run this in addition to pptx Gate 2:
$…${{…}}\$\t\n()[]$9/mo$29/month$199/yr--prop text="…"$9/mobash
undefinedpptx v2关卡2覆盖、、字面量、空/。Morph演示文稿新增一类泄漏:价格/度量令牌(、、)使用双引号——Shell会将解析为空变量,CLI存储为或孤立点。除pptx关卡2外,还需运行以下检查:
$…${{…}}\$\t\n()[]$9/mo$29/month$199/yr--prop text="…"$9/mobash
undefinedGate 2 morph — price / metric token leaks + stray-period placeholders
关卡2 Morph——价格/度量令牌泄漏+孤立点占位符
Pattern hits: bare prices ($9, $29, $9.99), /unit suffix ($9/mo, $199/yr), ${VAR}, \n/\r/\t, lone period
匹配模式:裸价格($9, $9.99)、/单位后缀($9/mo, $199/yr)、${VAR}、\n/\r/\t、孤立点
LEAKS=$(officecli view "$FILE" text | grep -nE '$[0-9]+(.[0-9]+)?(/(mo|month|yr|year|day|wk|week|hr|hour))?|${[A-Z_]+}|\[nrt]|^.$' || true)
if [ -z "$LEAKS" ]; then echo "Gate 2 morph OK"; else echo "LEAK: $LEAKS"; fi
Covers: `$9` `$9.99` `$29/month` `$199/yr` `$1/day` `${VAR}` `\n`/`\r`/`\t` literals + stray `.` placeholders. Fix: single-quote the prop (`--prop text='$9/mo'`).LEAKS=$(officecli view "$FILE" text | grep -nE '$[0-9]+(.[0-9]+)?(/(mo|month|yr|year|day|wk|week|hr|hour))?|${[A-Z_]+}|\[nrt]|^.$' || true)
if [ -z "$LEAKS" ]; then echo "Gate 2 morph OK"; else echo "LEAK: $LEAKS"; fi
覆盖:`$9` `$9.99` `$29/month` `$199/yr` `$1/day` `${VAR}` `\n`/`\r`/`\t`字面量 + 孤立点占位符。修复方法:使用单引号包裹属性(`--prop text='$9/mo'`)。Gate 5b — Visual audit via HTML preview (MANDATORY) — extended for morph
关卡5b——HTML预览视觉审核(必填)——针对Morph扩展
Run and Read the returned HTML path. For every slide, answer the pptx v2 Gate 5b questions (overlap / dark-on-dark / divider overlap / order sanity / missing arrowheads) PLUS these four morph-specific checks:
officecli view "$FILE" htmlImportant: selectors with prefix match. only supports operators , , , , , , — there is NO prefix operator. A selector like returns an error. For "starts-with" filtering, use a loop + as shown below.
officecli query=!=~=>=<=><^=shape[name^=!!actor-]invalid_selectorget --depth 1jq startswith()-
5b-morph-1 —leak into visible area after its section ends. For every
!!actor-*that should have exited, confirm!!actor-*(canvas right edge). Loop + filter (selector-safe):x ≥ 33.87cmbashNSLIDES=$(officecli query "$FILE" slide --json | jq '.data.results | length') for N in $(seq 1 $NSLIDES); do officecli get "$FILE" "/slide[$N]" --depth 1 --json | \ jq -r --arg n "$N" '.data.results[0].children[]? | select(.format.name? // "" | startswith("!!actor-")) | select((.format.x // "0cm" | rtrimstr("cm") | tonumber) < 33.87) | "slide \($n) leak: \(.format.name) stuck at x=\(.format.x)"' doneAny line printed = actor stuck visible.misses this — only the loop + Read HTML do.final-check -
5b-morph-2 — Adjacent slides have identical spatial composition (no motion). Hard rule: between every morph pair, ≥ 3 DIFFERENT-prefixed shapes must each differ by ≥ 1 of {x, y, width, height, rotation, font-size}. Proof loop (dump both slides, diff same-name shapes, count differing shapes):
!!bashfor K in 1 2 3 4; do A=$(officecli get "$FILE" "/slide[$K]" --depth 1 --json | \ jq -r '.data.results[0].children[]? | select(.format.name? // "" | startswith("!!")) | "\(.format.name)|\(.format.x)|\(.format.y)|\(.format.width)|\(.format.height)|\(.format.rotation // 0)"') B=$(officecli get "$FILE" "/slide[$((K+1))]" --depth 1 --json | \ jq -r '.data.results[0].children[]? | select(.format.name? // "" | startswith("!!")) | "\(.format.name)|\(.format.x)|\(.format.y)|\(.format.width)|\(.format.height)|\(.format.rotation // 0)"') VARIES=$(diff <(echo "$A") <(echo "$B") | grep -c '^[<>]') if [ "$VARIES" -lt 6 ]; then echo "pair $K→$((K+1)) FLAT: only $VARIES diff-lines (need ≥ 6 = 3 shapes × 2 sides)"; fi done -
5b-morph-3 — Morph-pair name mismatches. Adjacent slides must share at least 2-prefixed names exactly. Proof (note: children live at
!!— bare.data.results[0].children[]returns null):.data.children[]bashfor N in 1 2 3 4 5; do echo "--- slide $N ---" officecli get "$FILE" "/slide[$N]" --depth 1 --json | \ jq -r '.data.results[0].children[]? | select(.format.name? // "" | startswith("!!")) | .format.name' doneVisually compare sequential blocks — sharednames between N and N+1 are the morph pairs. Zero overlap = the pair is a plain fade.!! -
5b-morph-4 —lingering on slide N+1 (ghost leak). Per-slide content MUST be ghosted (
#sN-*) on the NEXT slide. Loop + filter per N≥2:x=36cmbashNSLIDES=$(officecli query "$FILE" slide --json | jq '.data.results | length') for N in $(seq 2 $NSLIDES); do PREV=$((N-1)) officecli get "$FILE" "/slide[$N]" --depth 1 --json | \ jq -r --arg n "$N" --arg p "$PREV" '.data.results[0].children[]? | select(.format.name? // "" | startswith("#s\($p)-")) | select((.format.x // "0cm" | rtrimstr("cm") | tonumber) < 33.87) | "slide \($n) leak: \(.format.name) stuck at x=\(.format.x)"' doneAny line printed = ashape stayed visible on slide N. Ghost it.#s(N-1)-*
REJECT the delivery if any 5b-morph-1..4 loop prints a line. Collect stdout from all four loops into one stream and enforce with the COUNT pattern: .
LEAK_COUNT=$(...all four loops... | wc -l); if [ "$LEAK_COUNT" -gt 0 ]; then echo "REJECT: $LEAK_COUNT morph leaks"; else echo "Gate 5b-morph OK"; fi运行并读取返回的HTML路径。对每张幻灯片,除回答pptx v2关卡5b的问题(重叠/暗底暗字/分隔符重叠/顺序合理性/缺失箭头)外,还需完成以下四项Morph专属检查:
officecli view "$FILE" html重要:前缀匹配选择器。仅支持运算符、、、、、、——无前缀运算符。这类选择器会返回错误。如需"前缀匹配"过滤,请使用循环 + ,如下所示。
officecli query=!=~=>=<=><^=shape[name^=!!actor-]invalid_selectorget --depth 1jq startswith()-
5b-morph-1 —在章节结束后仍停留在可见区域。对于所有应退场的
!!actor-*,确认!!actor-*(画布右边缘)。循环+过滤(选择器安全):x ≥ 33.87cmbashNSLIDES=$(officecli query "$FILE" slide --json | jq '.data.results | length') for N in $(seq 1 $NSLIDES); do officecli get "$FILE" "/slide[$N]" --depth 1 --json | \ jq -r --arg n "$N" '.data.results[0].children[]? | select(.format.name? // "" | startswith("!!actor-")) | select((.format.x // "0cm" | rtrimstr("cm") | tonumber) < 33.87) | "slide \($n) leak: \(.format.name) stuck at x=\(.format.x)"' done任何输出行均表示角色停留在可见区域。无法检测此问题——仅能通过循环+查看HTML检测。final-check -
5b-morph-2 — 相邻幻灯片空间布局完全相同(无动效)。硬性规则:每个Morph配对中,至少3个不同的前缀形状需在{x, y, width, height, rotation, font-size}中至少有一项差异。验证循环(导出两张幻灯片,对比同名形状,统计差异形状数量):
!!bashfor K in 1 2 3 4; do A=$(officecli get "$FILE" "/slide[$K]" --depth 1 --json | \ jq -r '.data.results[0].children[]? | select(.format.name? // "" | startswith("!!")) | "\(.format.name)|\(.format.x)|\(.format.y)|\(.format.width)|\(.format.height)|\(.format.rotation // 0)"') B=$(officecli get "$FILE" "/slide[$((K+1))]" --depth 1 --json | \ jq -r '.data.results[0].children[]? | select(.format.name? // "" | startswith("!!")) | "\(.format.name)|\(.format.x)|\(.format.y)|\(.format.width)|\(.format.height)|\(.format.rotation // 0)"') VARIES=$(diff <(echo "$A") <(echo "$B") | grep -c '^[<>]') if [ "$VARIES" -lt 6 ]; then echo "pair $K→$((K+1)) FLAT: only $VARIES diff-lines (need ≥ 6 = 3 shapes × 2 sides)"; fi done -
5b-morph-3 — Morph配对名称不匹配。相邻幻灯片必须至少共享2个完全相同的前缀名称。验证方法(注意:子元素位于
!!——直接使用.data.results[0].children[]会返回null):.data.children[]bashfor N in 1 2 3 4 5; do echo "--- slide $N ---" officecli get "$FILE" "/slide[$N]" --depth 1 --json | \ jq -r '.data.results[0].children[]? | select(.format.name? // "" | startswith("!!")) | .format.name' done直观对比连续块——N和N+1之间的共享名称即为Morph配对。无重叠则配对为普通淡入淡出。!! -
5b-morph-4 —在幻灯片N+1中残留(隐藏泄漏)。单幻灯片内容必须在下一张幻灯片中隐藏(
#sN-*)。循环+过滤(N≥2):x=36cmbashNSLIDES=$(officecli query "$FILE" slide --json | jq '.data.results | length') for N in $(seq 2 $NSLIDES); do PREV=$((N-1)) officecli get "$FILE" "/slide[$N]" --depth 1 --json | \ jq -r --arg n "$N" --arg p "$PREV" '.data.results[0].children[]? | select(.format.name? // "" | startswith("#s\($p)-")) | select((.format.x // "0cm" | rtrimstr("cm") | tonumber) < 33.87) | "slide \($n) leak: \(.format.name) stuck at x=\(.format.x)"' done任何输出行均表示形状在幻灯片N中仍可见。需隐藏该形状。#s(N-1)-*
若5b-morph-1..4循环输出任何内容,拒绝交付。将四个循环的标准输出合并为一个流,并使用计数模式强制执行:。
LEAK_COUNT=$(...all four loops... | wc -l); if [ "$LEAK_COUNT" -gt 0 ]; then echo "REJECT: $LEAK_COUNT morph leaks"; else echo "Gate 5b-morph OK"; fiRenderer honesty
渲染环境说明
Morph renders in: PowerPoint 365 (Windows/Mac), Keynote, WPS, PowerPoint Online.
Morph does NOT render in: LibreOffice Impress (renders static, sometimes as fade), Google Slides web viewer (loses interpolation), most HTML / SVG viewers, (structural only — morph is runtime). This is , not a skill defect. Tell the user explicitly: "Open in PowerPoint 365 / Keynote / WPS to see the morph motion; other viewers will show static or plain fade."
officecli view html[RENDERER-BUG]Static screenshots from any renderer cannot verify morph motion (the motion only exists at runtime). Use Gate 5b queries above to prove pair correctness; use a live viewer to prove motion quality.
Morph支持的渲染环境: PowerPoint 365(Windows/Mac)、Keynote、WPS、PowerPoint Online。
Morph不支持的渲染环境: LibreOffice Impress(渲染为静态,有时为淡入淡出)、Google Slides网页查看器(丢失插值效果)、多数HTML/SVG查看器、(仅显示结构——Morph是运行时特性)。这属于,而非技能缺陷。请明确告知用户:"请在PowerPoint 365/Keynote/WPS中打开以查看Morph动效;其他查看器会显示静态或普通淡入淡出。"
officecli view html[RENDERER-BUG]任何渲染环境的静态截图无法验证Morph动效(动效仅在运行时存在)。使用上述关卡5b查询验证配对正确性;使用实时查看器验证动效质量。
Ghost Discipline & Actor Lifecycle
隐藏元素规范与角色生命周期
Every and shape must be managed across EVERY slide, not just its "exit" slide.
!!actor-*#sN-*每个和形状必须在每张幻灯片中管理,而非仅在其"退场"幻灯片中。
!!actor-*#sN-*The Per-Slide Ghosting Rule
单幻灯片隐藏规则
When building a multi-slide morph deck:
- Slide N: Introduce (visible at x=0cm)
!!actor-ring - Slide N+1: Add new content. Before finishing, ghost to
!!actor-ring.x=36cm - Slide N+2: Add more content. Re-ghost to
!!actor-ringagain. (Not optional — even though it was already off-screen, each slide is a fresh canvas.)x=36cm - Slide N+3: If should be visible again, move it back to x=0cm or its new position.
!!actor-ring
Why: Each slide's shape list is independent. Moving a shape off-canvas on slide N does NOT carry over to slide N+1 — if you forget to re-ghost it, it will re-appear at its original position on N+1.
构建多幻灯片Morph演示文稿时:
- 幻灯片N:引入(位于x=0cm可见位置)
!!actor-ring - 幻灯片N+1:添加新内容。完成前,将移至x=36cm隐藏。
!!actor-ring - 幻灯片N+2:添加更多内容。再次将移至x=36cm隐藏。(并非可选——即使已在画布外,每张幻灯片都是独立的画布。)
!!actor-ring - 幻灯片N+3:若需再次可见,移回x=0cm或新位置。
!!actor-ring
原因: 每张幻灯片的形状列表是独立的。在幻灯片N中将形状移至画布外不会延续到幻灯片N+1——若忘记再次隐藏,它会在N+1中回到原始位置。
Workflow Pattern (Bash)
工作流模式(Bash)
bash
undefinedbash
undefinedAfter adding new content shapes to slide $SLIDE:
向幻灯片$SLIDE添加新内容形状后:
for ACTOR in "!!actor-ring" "!!actor-dot" "!!actor-accent-bar"; do
officecli set "$FILE" "/slide[$SLIDE]/shape[@name=$ACTOR]" --prop x=36cm || true
done
Or in a build loop:
```bash
for SLIDE_NUM in 3 4 5 6 7 8 9 10 11; do
# Add content specific to this slide
officecli add "$FILE" "/slide[$SLIDE_NUM]" --type shape ...
# IMMEDIATELY ghost all old actors (M-2 prevention)
officecli set "$FILE" "/slide[$SLIDE_NUM]/shape[@name=!!actor-ring]" --prop x=36cm || true
officecli set "$FILE" "/slide[$SLIDE_NUM]/shape[@name=!!actor-dot]" --prop x=36cm || true
donefor ACTOR in "!!actor-ring" "!!actor-dot" "!!actor-accent-bar"; do
officecli set "$FILE" "/slide[$SLIDE]/shape[@name=$ACTOR]" --prop x=36cm || true
done
或在构建循环中:
```bash
for SLIDE_NUM in 3 4 5 6 7 8 9 10 11; do
# 添加当前幻灯片的内容
officecli add "$FILE" "/slide[$SLIDE_NUM]" --type shape ...
# 立即隐藏所有旧角色(防止M-2问题)
officecli set "$FILE" "/slide[$SLIDE_NUM]/shape[@name=!!actor-ring]" --prop x=36cm || true
officecli set "$FILE" "/slide[$SLIDE_NUM]/shape[@name=!!actor-dot]" --prop x=36cm || true
doneDetection: Ghost Count Gate
检测:隐藏元素计数关卡
morph-helpers.py final-checkx ≥ 34cmREJECT: Found 135 accumulated ghosts — likely M-2 ghost accumulation.
Run: officecli query deck.pptx 'shape[x>=34cm]' --json | jq '.data.results | length'
Expected ≤ 50 (roughly 4–5 active actors × 10–12 slides).Fix: Review the build log, ensure every slide re-ghosts all actors that should not appear in it. Re-run final-check. If still > 50, use (see reference section).
morph-helpers.py clean-accumulation deck.pptxmorph-helpers.py final-checkx ≥ 34cmREJECT: Found 135 accumulated ghosts — likely M-2 ghost accumulation.
Run: officecli query deck.pptx 'shape[x>=34cm]' --json | jq '.data.results | length'
Expected ≤ 50 (roughly 4–5 active actors × 10–12 slides).修复: 查看构建日志,确保每张幻灯片都重新隐藏了所有不应显示的角色。重新运行final-check。若仍>50,使用(参见参考部分)。
morph-helpers.py clean-accumulation deck.pptxCommon Morph Pitfalls (design + workflow traps)
常见Morph陷阱(设计+工作流误区)
Base pptx pitfalls (shell quoting, zsh globbing, hex prefix, in prop text) → see pptx v2 §Common Pitfalls. These are the morph-specific traps:
[N]#\n| Pitfall | Correct approach |
|---|---|
| Names must be unique across prefixes. Rename: |
| Renaming shapes mid-build after some slides are already done | Ghost accumulation bug waiting to happen. Stop, redraw the §Morph Pair Planning table, rerun affected slides |
Placing | Every |
Ghost accumulation (M-2): forgetting to re-ghost | CRITICAL: When you add new content to slide N+1, ALL |
Forgetting | Silent fade. Gate 5b-morph-2 (no motion) catches it; fix via |
Assuming | They do not — |
| Adjacent slides visually identical | Morph has nothing to interpolate — collapses to plain fade. Apply §Scene-actor spatial rule and move ≥ 3 shapes by ≥ 5cm / ≥ 15° |
| Trying to stagger 2 shapes via per-shape timing | Not supported — split the pair into two transitions with an intermediate keyframe slide |
| Testing morph motion in LibreOffice or a browser | |
Deleting a | Deletion breaks morph pairing — the shape vanishes without animation. Always ghost to |
Writing | Shell eats |
Using | Stored as 7 literal characters, not a line break. Use |
Using | |
基础pptx陷阱(Shell引用、zsh globbing、十六进制前缀、属性文本中的)→ 参见pptx v2 §Common Pitfalls。以下是Morph专属陷阱:
[N]#\n| 陷阱 | 正确做法 |
|---|---|
同一演示文稿中存在 | 前缀间名称必须唯一。重命名为: |
| 部分幻灯片完成后中途重命名形状 | 会导致隐藏元素累积bug。停止构建,重新绘制§Morph配对规划表,重新运行受影响的幻灯片 |
将 | 每个 |
隐藏元素累积(M-2):忘记在后续幻灯片中重新隐藏 | 关键: 向幻灯片N+1添加新内容后,必须将幻灯片N中所有不应显示的 |
忘记在幻灯片上设置 | 动效静默失效。关卡5b-morph-2(无动效)会检测到;通过 |
假设Morph幻灯片上的 | 不会失效—— |
| 相邻幻灯片视觉完全相同 | Morph无内容可插值——退化为普通淡入淡出。遵循§场景角色空间规则,将至少3个形状移动≥5cm/旋转≥15° |
| 尝试通过单形状时序参数交错两个形状 | 不支持——将配对拆分为两个过渡,插入中间关键帧幻灯片 |
| 在LibreOffice或浏览器中测试Morph动效 | 属于 |
退场时删除 | 删除会破坏Morph配对——形状会无动画消失。始终移至x=36cm隐藏 |
使用双引号编写 | Shell会将 |
在 | 会存储为7个字面字符,而非换行符。受众会看到 |
使用 | |
Known Issues & Pitfalls
已知问题与陷阱
Base pptx bugs C-P-1..7 (hyperlink rPr, chart ChartShapeProperties warning, animation duration readback, animation remove, connector enum, connector , chart-color renderer normalization) all apply. → see pptx v2 §Known Issues C-P-1..7 for workarounds.
@name=Morph-specific (M-1..5):
| # | Symptom | Workaround |
|---|---|---|
| M-1 | After | |
| M-2 🚨 | Ghost accumulation — | MANDATORY per-slide rule: After you add new content to a slide, immediately set ALL active |
| M-3 | Section-transition boundary — on the first slide of a new topic section, previous-section | On every section-start slide, explicitly ghost ALL |
| M-4 | Agents sometimes invent | Use the combined shorthand on the |
| M-5 | | Test in PowerPoint 365 / Keynote / WPS. Not a skill defect — do not chase. |
| M-6 | | For multi-line bullets / captions, add one paragraph per line: |
M-4 example — slow down all morph transitions, raw-set fallback (prefer ; use this only for control beyond the shorthand). Note matches both and on a morph slide, yielding :
transition=morph-slow//p:transitionmc:Choicemc:Fallback2 element(s) affectedbash
undefined基础pptx bug C-P-1..7(超链接rPr、图表ChartShapeProperties警告、动画时长读取、移除动画、连接器枚举、连接器、图表颜色渲染归一化)均适用。→ 参见pptx v2 §Known Issues C-P-1..7获取解决方法。
@name=Morph专属问题(M-1..5):
| # | 症状 | 解决方法 |
|---|---|---|
| M-1 | 设置 | |
| M-2 🚨 | 隐藏元素累积——幻灯片3引入的 | 每张幻灯片必填规则: 向幻灯片添加新内容后,立即将之前幻灯片中所有活跃的 |
| M-3 | 章节过渡边界——新主题章节的第一张幻灯片中,前一章节的 | 在每个章节起始幻灯片中,明确将所有前一章节的 |
| M-4 | 有时会生成 | 使用 |
| M-5 | | 在PowerPoint 365/Keynote/WPS中测试。不属于技能缺陷——无需修复。 |
| M-6 | 在 | 对于多行项目符号/说明文字,逐行添加段落: |
M-4示例——减慢所有Morph过渡,回退到raw-set(优先使用;仅在需要超出简写的控制时使用)。注意会匹配Morph幻灯片上的和,导致:
transition=morph-slow//p:transitionmc:Choicemc:Fallback2 element(s) affectedbash
undefinedPer-slide: add spd="slow" to every transition element on slide N (2 XML hits per morph slide)
单幻灯片:为幻灯片N上的所有transition元素添加spd="slow"(每个Morph幻灯片有2个XML匹配项)
for N in 2 3 4; do
officecli raw-set "$FILE" "/slide[$N]" --xpath "//p:transition" --action setattr --xml 'spd=slow'
done
officecli validate "$FILE"
Readback: `officecli query "$FILE" slide --json | jq '.data.results[].format | select(.transition=="morph") | .transitionSpeed'` prints `"slow"` for each affected slide.for N in 2 3 4; do
officecli raw-set "$FILE" "/slide[$N]" --xpath "//p:transition" --action setattr --xml 'spd=slow'
done
officecli validate "$FILE"
读取验证:`officecli query "$FILE" slide --json | jq '.data.results[].format | select(.transition=="morph") | .transitionSpeed'`会为每个受影响的幻灯片输出`"slow"`。Outputs & delivery
输出与交付
Every morph deck ships with three artifacts, each as a standalone file:
- — the deck, closed +
<topic>.pptxclean (Delivery Gate 1 OK).officecli validate - or
build.sh— the re-runnable script (bash for shell-native builds; Python for multi-slide arcs usingbuild.py). Must recreate the deck from a freshmorph-helpers.pycall.officecli create - — standalone file, NOT embedded in anything else. Contains:
brief.md- Section 1: topic / audience / purpose / narrative / style direction (1 named style from )
reference/styles/INDEX.md - Section 2: slide-by-slide outline (page type + one-sentence argument per slide)
- Section 3: §Morph Pair Planning table (Pair / Slide A / Slide B / Actors / Ghosts) — the design record the reviewer needs to audit choreography
- Section 1: topic / audience / purpose / narrative / style direction (1 named style from
Pre-deliver reminder to the user (verbatim-safe wording):
- "The deck is ready with morph transitions. Open it in PowerPoint 365 / Keynote / WPS to see the motion — LibreOffice and web viewers render static."
- "While the build script is running, the may be rewritten several times. If you want to preview progress, use
.pptxand open the live preview in AionUi — do NOT click 'Open with system app' during the build, or you'll hit a file lock."officecli watch "$FILE"
每个Morph演示文稿需交付三个独立文件:
- —— 演示文稿,已关闭且
<topic>.pptx验证通过(交付关卡1 OK)。officecli validate - 或
build.sh—— 可重新运行的脚本(Shell原生构建使用bash;使用build.py的多幻灯片弧使用Python)。需能从morph-helpers.py重新创建演示文稿。officecli create - —— 独立文件,不嵌入任何内容。包含:
brief.md- 第1节:主题/受众/用途/叙事/风格方向(来自的1种命名风格)
reference/styles/INDEX.md - 第2节:幻灯片大纲(每页类型+单句论点)
- 第3节:§Morph配对规划表(配对/幻灯片A/幻灯片B/角色/隐藏元素)——审核编排所需的设计记录
- 第1节:主题/受众/用途/叙事/风格方向(来自
交付前提醒用户(可直接使用的措辞):
- "演示文稿已完成,包含Morph过渡效果。请在PowerPoint 365/Keynote/WPS中打开以查看动效——LibreOffice和网页查看器会显示静态内容。"
- "构建脚本运行时,可能会被多次重写。若需预览进度,请使用
.pptx并在AionUi中打开实时预览——构建过程中请勿点击'使用系统应用打开',否则会触发文件锁定。"officecli watch "$FILE"
Adjustments after creation
创建后调整
Standard adjustments table → see pptx v2 §Common Pitfalls / / / / . Morph caveat: after any or that reorders morph-paired slides, re-verify the adjacency of shared names. Run Gate 5b-morph-3 query above on the affected pairs — if the swap broke a pair, either rename shapes or re-choreograph the transition.
swapmoveremovesetswapmove!!Final sanity check before delivery. Run the full Delivery Gate (1 through 5b-morph-1..4), open the in PowerPoint 365 / Keynote / WPS, watch one full slide-to-slide morph to confirm motion is visible. If any Gate prints REJECT, fix and re-run — never deliver with a known-open gate.
.pptx标准调整表 → 参见pptx v2 §Common Pitfalls / / / / 。Morph注意事项:任何或重新排序Morph配对幻灯片后,需重新验证共享名称的相邻性。对受影响的配对运行上述关卡5b-morph-3查询——若交换破坏了配对,需重命名形状或重新编排过渡。
swapmoveremovesetswapmove!!交付前最终检查。运行完整交付关卡(1至5b-morph-1..4),在PowerPoint 365/Keynote/WPS中打开,完整查看一次幻灯片间的Morph过渡,确认动效可见。若任何关卡输出REJECT,修复后重新运行——切勿交付已知存在问题的演示文稿。
.pptxReferences
参考资料
- — Pyramid Principle, SCQA, page-type menu,
reference/decision-rules.mdschema. Read during §Morph Pair Planning to decide narrative arc before writing commands.brief.md - — residual design notes (Scene Actors mechanics, page-type table, choreography patterns). Canvas / fonts / colors live in pptx v2 — this file covers only the morph-unique material.
reference/pptx-design.md - — Cross-platform (Mac / Windows / Linux) Python helpers for clone + ghost + verify + final-check. Import as a library or call via CLI args. Preferred for 5+ slide arcs.
reference/morph-helpers.py - — Bash equivalent. Pick one per project; do not mix.
reference/morph-helpers.sh - — 52-style visual library, grouped by palette (dark / light / warm / vivid / bw / mixed) and mood. Lookup workflow in §Style library lookup workflow above.
reference/styles/INDEX.md - — base pptx v2 rules (visual floor, grid, canonical palettes, chart-choice, connector canon, Delivery Gate 1–5a, Known Issues C-P-1..7, Shell escape 3-layer).
skills/officecli-pptx/SKILL.md
- —— 金字塔原理、SCQA、页面类型菜单、
reference/decision-rules.mdschema。§Morph配对规划阶段阅读,以在编写命令前确定叙事弧。brief.md - —— 剩余设计说明(场景角色机制、页面类型表、编排模式)。画布/字体/颜色规则在pptx v2中——本文件仅覆盖Morph专属内容。
reference/pptx-design.md - —— 跨平台(Mac/Windows/Linux)Python助手工具,用于克隆+隐藏+验证+final-check。可作为库导入或通过CLI参数调用。适用于5+张幻灯片的弧。
reference/morph-helpers.py - —— Bash版本。每个项目选择其一,请勿混合使用。
reference/morph-helpers.sh - —— 52种视觉样式库,按调色板(深色/浅色/暖色/鲜艳/黑白/混合)和风格分组。查询工作流参见上文§样式库查询工作流。
reference/styles/INDEX.md - —— 基础pptx v2规则(视觉基准、网格、标准调色板、图表选择、连接器规范、交付关卡1–5a、已知问题C-P-1..7、Shell三层转义)。
skills/officecli-pptx/SKILL.md