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

feat(confirm-ui): deepen reading-mode confirmation

hugohe31f4a84ac7348
diff --git a/docs/technical-design.md b/docs/technical-design.md
index 25944d21..9ede3821 100644
--- a/docs/technical-design.md
+++ b/docs/technical-design.md
@@ -336,7 +336,7 @@ PPT Master uses **role switching within one main agent** rather than parallel su
**Why role-specialized references, not one mega prompt.** Strategist runs in "negotiate with user" mode (open-ended, conversational, willing to back up); Executor runs in "produce strict XML" mode (no improvisation, no missing attributes). Mixing both into one prompt forces the model to hold incompatible discipline in the same turn — every prompt-engineering pathology of mode-mixing shows up. Splitting into per-role files lets each role load only what it needs and discard the rest.
-**Strategist confirmation stage as the only blocking gate.** Strategist ends with one gate delivered in three dependency-ordered stages. Stage 1 confirms an open communication contract and canvas. Its prose boxes contain editable recommendations, but none requires a non-empty answer: confirmation persists the current text exactly, and a cleared value stays empty instead of falling back to the recommendation. Stage 2 derives and confirms the complete deck solution: reading mode, narrative mode, page count, template strategy, coordinated visual system, image sources, and generated-image rendering. Stage 3 contains production mechanics only: conditional AI acquisition, formula policy, generation mode, and spec refinement. The compatibility key `delivery_purpose` means reading mode. Generated images inherit the selected deck color roles directly; there is no independent image-palette choice. The final `confirm_ui/result.json` is authoritative, and project validation requires the six contract key lines under `spec_lock.md ## communication` (any prose value may be blank) plus an `Audience move` in every §IX Slide block.
+**Strategist confirmation stage as the only blocking gate.** Strategist ends with one gate delivered in three dependency-ordered stages. Stage 1 confirms an open communication contract and canvas. Its prose boxes contain editable recommendations, but none requires a non-empty answer: confirmation persists the current text exactly, and a cleared value stays empty instead of falling back to the recommendation. Stage 2 is authored once from that contract and confirms the complete deck solution: reading mode, narrative mode, page count, template strategy, coordinated visual system, image sources, and generated-image rendering. Reading mode decides how meaning is carried by page, visuals, presenter, and notes; its cards do not present px values. The browser may apply the deterministic `reading mode → body baseline → unpinned role sizes` dependency locally, while manual size edits pin visible values. It never regenerates Stage 2. Stage 3 is authored once and contains production mechanics only: conditional AI acquisition, formula policy, generation mode, and spec refinement. The compatibility key `delivery_purpose` means reading mode. Generated images inherit the selected deck color roles directly; there is no independent image-palette choice. The final visible state in `confirm_ui/result.json` is authoritative—there is no hidden post-confirm repair—and project validation requires the six contract key lines under `spec_lock.md ## communication` (any prose value may be blank) plus an `Audience move` in every §IX Slide block.
**Image analysis goes through regenerated metadata, not pixels.** When images exist, Strategist and Executor use `analyze_images.py` output (`analysis/image_analysis.csv`) rather than directly opening image files. The CSV is a regenerated view over the live `images/` folder, not a durable cache. Re-running it before image-sensitive decisions is the staleness strategy: user images, extracted images, web images, AI outputs, formulas, and sliced elements all converge into the same measured fact table.
diff --git a/docs/zh/technical-design.md b/docs/zh/technical-design.md
index 5f2f22e6..f60388d5 100644
--- a/docs/zh/technical-design.md
+++ b/docs/zh/technical-design.md
@@ -338,7 +338,7 @@ PPT Master 用的是**单主代理内的角色切换**,不是并行子代理
**为什么是角色专属 reference 而不是一个超大 prompt。** Strategist 跑的是「跟用户协商」模式(开放式、对话式、可以回退),Executor 跑的是「产出严格 XML」模式(不准即兴、不准漏属性)。把两者塞进同一个 prompt,强迫模型在同一个 turn 里持守相互矛盾的纪律——所有混合模式的 prompt 工程病灶都会出现。按角色拆开,每个角色只加载它需要的、扔掉其他。
-**策略师确认阶段是唯一的阻塞 gate。** Strategist 阶段以一个按依赖排序的三阶段 gate 作为核心决策点。第一阶段确认开放式沟通契约与画布。其中的文本框承载可编辑推荐,但没有任何一项要求非空:确认时按当前文本原样保存,清空后的值保持为空,不会回退到推荐内容。第二阶段从契约推导并确认完整 PPT 方案:阅读模式、叙事 mode、页数、模板策略、成套视觉系统、图片来源和生成图渲染。第三阶段只处理生产机制:条件式 AI 图片获取路径、公式策略、生成模式与规范精修。JSON 为兼容保留 `delivery_purpose` 键,但用户侧统一称为阅读模式。生成图直接继承已选 PPT 色彩角色,不再单设图片调色选择。最终 `confirm_ui/result.json` 是权威输入;项目校验还会要求 `spec_lock.md ## communication` 下存在六个沟通契约键(任一文本值都允许留空),并要求 §IX 每个 Slide block 都有 `Audience move`。
+**策略师确认阶段是唯一的阻塞 gate。** Strategist 阶段以一个按依赖排序的三阶段 gate 作为核心决策点。第一阶段确认开放式沟通契约与画布。其中的文本框承载可编辑推荐,但没有任何一项要求非空:确认时按当前文本原样保存,清空后的值保持为空,不会回退到推荐内容。第二阶段只从该契约计算一次并确认完整 PPT 方案:阅读模式、叙事 mode、页数、模板策略、成套视觉系统、图片来源和生成图渲染。阅读模式决定信息由页面、视觉、讲者和备注如何共同承担,其选项卡不展示 px 数值。浏览器可以在本地执行确定性的「阅读模式 → 正文基准 → 未锁定角色字号」联动;手动编辑字号即锁定可见值,不会重新计算第二阶段。第三阶段也只计算一次,并且只处理生产机制:条件式 AI 图片获取路径、公式策略、生成模式与规范精修。JSON 为兼容保留 `delivery_purpose` 键,但用户侧统一称为阅读模式。生成图直接继承已选 PPT 色彩角色,不再单设图片调色选择。最终 `confirm_ui/result.json` 中的可见状态是权威输入,不存在确认后的隐藏修正;项目校验还会要求 `spec_lock.md ## communication` 下存在六个沟通契约键(任一文本值都允许留空),并要求 §IX 每个 Slide block 都有 `Audience move`。
**图片分析走重算元数据,不读像素。** 当项目里存在图片时,Strategist 和 Executor 使用 `analyze_images.py` 的输出(`analysis/image_analysis.csv`),而不是直接打开图片文件。这个 CSV 是基于当前 `images/` 目录重算出来的视图,不是持久缓存。每次做图片敏感决策前重跑分析,就是它的防陈旧策略:用户图、抽取图、网络图、AI 图、公式图和切片图最终都会汇入同一张可度量事实表。
diff --git a/skills/ppt-master/SKILL.md b/skills/ppt-master/SKILL.md
index f9d5f221..e916fc00 100644
--- a/skills/ppt-master/SKILL.md
+++ b/skills/ppt-master/SKILL.md
@@ -38,7 +38,7 @@ description: >
> 5. **NO SPECULATIVE EXECUTION** — "Pre-preparing" content for subsequent Steps is FORBIDDEN (e.g., writing SVG code during the Strategist phase)
> 6. **NO SUB-AGENT SVG GENERATION** — Executor Step 6 SVG generation is context-dependent and MUST be completed by the current main agent end-to-end. Delegating page SVG generation to sub-agents is FORBIDDEN
> 7. **SEQUENTIAL PAGE GENERATION ONLY** — In Executor Step 6, after the global design context is confirmed, SVG pages MUST be generated sequentially page by page in one continuous pass. Grouped page batches (for example, 5 pages at a time) are FORBIDDEN
-> 8. **SPEC_LOCK RE-READ PER PAGE** — Before generating each SVG page, Executor MUST `read_file <project_path>/spec_lock.md`. Re-read the global `communication` contract and use only the locked colors / fonts / icons / images — no values from memory or invented on the fly. Executor MUST also read `pptx_structure.mode`, `template_reuse_scope`, the current page's `page_rhythm` (`anchor` / `dense` / `breathing`), and `page_charts`; pair the global contract with the current §IX `Core message` + `Audience move`. `template_reuse_scope: mirror|layout` uses `mode: structured` and looks up `page_layouts` (the input template SVG), `page_pptx_layouts` (the page assignment), `pptx_masters`, `pptx_layouts` (the unique reusable roster), and `template_adherence`; `template_reuse_scope: style`, free-design, and brand-only routes use `mode: flat` and omit those sections. This rule exists to resist both purpose drift and visual drift on long decks
+> 8. **SPEC_LOCK RE-READ PER PAGE** — Before generating each SVG page, Executor MUST `read_file <project_path>/spec_lock.md`. Re-read the global `communication` contract, including `consumption_mode`, and use only the locked colors / fonts / icons / images — no values from memory or invented on the fly. Executor MUST also read `pptx_structure.mode`, `template_reuse_scope`, the current page's `page_rhythm` (`anchor` / `dense` / `breathing`), and `page_charts`; pair the global contract with the current §IX `Core message` + `Audience move`. `template_reuse_scope: mirror|layout` uses `mode: structured` and looks up `page_layouts` (the input template SVG), `page_pptx_layouts` (the page assignment), `pptx_masters`, `pptx_layouts` (the unique reusable roster), and `template_adherence`; `template_reuse_scope: style`, free-design, and brand-only routes use `mode: flat` and omit those sections. This rule exists to resist both purpose drift and visual drift on long decks
> 9. **SVG MUST BE HAND-WRITTEN, NOT SCRIPT-GENERATED** — Every SVG page is written by the main agent directly, one page at a time (see rules 6 and 7). Writing or running a Python / Node / shell script that produces the SVG files in batch — looping over pages, templating from data, or emitting them via a generator — is FORBIDDEN, including under "save tokens", "quick draft", or "user is in a hurry" pretexts. The script-generation path was tried on a feature branch and abandoned: cross-page visual consistency depends on per-page authoring with full upstream context, which a generator script cannot reproduce. **Narrow exception**: `preset_shape_svg.py` may print one deterministic stock-shape fragment to stdout after the main agent has selected its semantic role, frame, and paint. It cannot write `svg_output/`, choose layout, batch shapes, or generate a page; the main agent reads the fragment and inserts it through the normal hand-authored page edit
> 10. **FOLLOW DETERMINISTIC ROUTING RULES** — Do not add blocking routing questions when this skill defines a route. If the user request violates a route precondition, state the required prerequisite and stop that route instead of asking the user to choose around the rule. Ordinary finite options, stylistic preferences, and recoverable details are surfaced with a recommended value plus alternatives at the next existing confirmation gate.
@@ -418,19 +418,19 @@ Read references/strategist.md
4. Complete deck solution — reading mode (JSON compatibility key `delivery_purpose`); narrative mode; page count; visual / template direction; color; icons; typography; image sources and generated-image rendering
5. Production plan — conditional AI-image acquisition path; formula rendering policy; execution mode; optional spec-refinement toggle
-**Confirm UI Auto-Launch (Mandatory — default visual confirmation surface)**: by default the Strategist confirmation stage is presented through an interactive local page in **three stages within one browser session**. Stage 1 confirms the scene and communication contract before asking the user to select tools. The AI then derives Stage 2's **complete deck solution** from the user's actual contract: argument structure, reading density, template use, visual system, and image direction are judged together. After Stage 2 is confirmed, Stage 3 asks only how to produce the already-decided solution. Color swatches, live font previews, icon samples, rendering references, and coordinated direction candidates appear where they help judgment; the chat path is the always-valid fallback. [`scripts/docs/confirm_ui.md`](scripts/docs/confirm_ui.md) owns the schema, server lifecycle, port strategy, and fallback details; this section keeps the orchestration contract. The split:
+**Confirm UI Auto-Launch (Mandatory — default visual confirmation surface)**: by default the Strategist confirmation stage is presented through an interactive local page in **three stages within one browser session**. Stage 1 confirms the scene and communication contract before asking the user to select tools. The AI then authors Stage 2's **complete deck solution once** from the user's actual contract: argument structure, reading density, template use, visual system, and image direction are judged together. After Stage 2 is confirmed, Stage 3 is authored once and asks only how to produce the already-decided solution. A change inside the current page never asks the AI or server to regenerate that stage. Color swatches, live font previews, icon samples, rendering references, and coordinated direction candidates appear where they help judgment; the chat path is the always-valid fallback. [`scripts/docs/confirm_ui.md`](scripts/docs/confirm_ui.md) owns the schema, server lifecycle, port strategy, and fallback details; this section keeps the orchestration contract. The split:
| Stage | Confirms | Driven by |
|---|---|---|
| **1 — communication contract** | audience · open-ended `communication_intent` (may combine several purposes) · `audience_outcome` · `core_message` / delivery context / artifact afterlife · `content_divergence` (all prose fields may be blank) · canvas | the source + user intent |
-| **2 — complete deck solution** (re-derived from Stage 1) | reading mode (`delivery_purpose`, PPT only) · narrative `mode` · page count · `visual_style` · conditional template reuse / adherence · color · typography · icons · image usage · generated-image rendering | the confirmed communication contract |
-| **3 — resources / production** (re-derived from Stage 1 + Stage 2) | conditional AI-image acquisition path · formula policy · generation mode · refine-spec toggle | the confirmed solution |
+| **2 — complete deck solution** (derived once from Stage 1) | reading mode (`delivery_purpose`, PPT only) · narrative `mode` · page count · `visual_style` · conditional template reuse / adherence · color · typography · icons · image usage · generated-image rendering | the confirmed communication contract |
+| **3 — resources / production** (derived once from Stage 1 + Stage 2) | conditional AI-image acquisition path · formula policy · generation mode · refine-spec toggle | the confirmed solution |
-> **Why three stages.** A presentation may serve several purposes at once (for example, report progress, expose risk, and request a decision), so Stage 1 uses open prose rather than a purpose enum. Every editable Stage-1 prose field is non-blocking: the user may retain, revise, or clear the recommendation, and confirmation makes the field's current value authoritative, including an empty string. Blank means no explicit user constraint; derive downstream defaults from the source and request without writing the old recommendation back into `result.json`. Stage 2 chooses tools only after that contract is known and keeps mutually dependent choices together: `mode` is the argument strategy, template reuse is the inheritance strategy, reading mode sets density, and the visual / image fields form one deck system. `delivery_purpose` remains the compatibility key for **reading mode**, not communication purpose. Page count is derived from content volume × audience outcome × reading mode. Generated images inherit the chosen deck color roles directly; the user confirms rendering, not a second image palette. Stage 3 therefore contains production mechanics only, never another aesthetic decision.
+> **Why three stages.** A presentation may serve several purposes at once (for example, report progress, expose risk, and request a decision), so Stage 1 uses open prose rather than a purpose enum. Every editable Stage-1 prose field is non-blocking: the user may retain, revise, or clear the recommendation, and confirmation makes the field's current value authoritative, including an empty string. Blank means no explicit user constraint; derive downstream defaults from the source and request without writing the old recommendation back into `result.json`. Stage 2 chooses tools only after that contract is known and keeps mutually dependent choices together: `mode` is the argument strategy, template reuse is the inheritance strategy, and reading mode decides how meaning is divided among the page, visuals, and presenter. It therefore drives content grammar, page granularity, density / rhythm, speaker-note burden, and the body baseline; the visual / image fields form the remaining deck system. `delivery_purpose` remains the compatibility key for **reading mode**, not communication purpose. Page count is derived from content volume × audience outcome × reading mode. Generated images inherit the chosen deck color roles directly; the user confirms rendering, not a second image palette. Stage 3 therefore contains production mechanics only, never another aesthetic decision. Each stage is authored once; documented deterministic UI dependencies may update visible values locally, but there is no same-stage AI recomputation.
Steps:
-> ⛔ **Steps 2 → 3 → 4 are ONE uninterrupted run — do NOT yield to the user mid-flow.** When an intermediate `--wait` returns, the AI **immediately and autonomously** re-derives and writes the next stage in the **same turn**: do **not** summarize, ask a question, report progress, or end the turn in between. The browser is sitting on a "deriving…" spinner polling for the next stage you must write — stopping here strands the page and the user must prod you in chat to finish (a bug, not the intended flow). **Stage-1 and Stage-2 confirmations are intermediate machine handoffs, not stopping points.** The single ⛔ BLOCKING wait is the **final** confirmation at the end of step 4. (Chat-fallback path — only when the page never opened — is the exception: there you do present each stage in chat and wait for a reply.)
+> ⛔ **Steps 2 → 3 → 4 are ONE uninterrupted run — do NOT yield to the user mid-flow.** When an intermediate `--wait` returns, the AI **immediately and autonomously** derives and writes the next stage once in the **same turn**: do **not** summarize, ask a question, report progress, or end the turn in between. The browser is sitting on a "deriving…" spinner polling for the next stage you must write — stopping here strands the page and the user must prod you in chat to finish (a bug, not the intended flow). **Stage-1 and Stage-2 confirmations are intermediate machine handoffs, not stopping points.** The single ⛔ BLOCKING wait is the **final** confirmation at the end of step 4. (Chat-fallback path — only when the page never opened — is the exception: there you do present each stage in chat and wait for a reply.)
1. **Write Stage 1** to `<project_path>/confirm_ui/recommendations.json` with `"stage": "stage1"` and only the communication-contract fields. New recommendations MUST use the canonical `stage` selector. Put only the recommended `canvas` id in `recommend`. Write `audience`, `communication_intent`, `audience_outcome`, `core_message`, `delivery_context`, `artifact_afterlife`, and `content_divergence` as `{ "value": "<free text>" }`. Seed concrete editable recommendations where the source and request support them; all seven prose values may be blank and none blocks confirmation. The submitted current value is the sole truth: preserve a user-cleared field as `""` through every later stage and the final `result.json`; never restore the earlier recommendation. `communication_intent` is deliberately open prose: it may combine several purposes and state their priority or sequence; the nine common paths are prompt examples only and MUST NOT become a checkbox / enum. `content_divergence` asks how closely to follow the source vs how freely to reshape it (blank = balanced; facts stay sourced at every level); it is consumed while authoring `§IX`, recorded in `design_spec.md §I`, and is not written to `spec_lock.md`. A profile may make this field read-only with `{ "value": "...", "locked": true }`; Beautify uses that contract and is the only exception to user editing. Do **not** include reading mode, `mode`, `visual_style`, page count, template, color, typography, icon, or image fields in Stage 1. Set `lang` to the page language (`zh` / `en` / `ja`); visible text matches `lang`, or provide multilingual name / note variants as documented by the Confirm UI.
2. **Launch + wait for Stage 1.** Background launch; the parent returns when the page writes the stage-1 `result.json`. **Long tool timeout — 600000 ms** (the `--wait` ≈590 s budget):
@@ -438,18 +438,18 @@ Steps:
python3 ${SKILL_DIR}/scripts/confirm_ui/server.py <project_path> --daemon --wait
```
Page opens at the launch-log URL such as `http://127.0.0.1:5050` — the **same port as the Step 6 live preview** (they never run at once: this page shuts down at the end of Step 4). If 5050 is held, the launcher **auto-advances** (5051, …) — read the actual URL from the launch log and report it. The page does **not** close after Stage 1: it shows a "deriving…" state and polls for Stage 2. **Launch or wait failure is non-fatal**: if it fails or times out (flask missing, port blocked, no GUI / remote / web host), do **NOT** troubleshoot — **on any non-zero exit, re-check `result.json` once** for a fresh `status: stage1-confirmed` before dropping to the chat fallback. **On success (exit 0 with a stage-1 result), do not pause or report — go straight to step 3 in the same turn.**
-3. **Re-derive Stage 2 from the confirmed communication contract, write it, then wait for the solution handoff — immediately, same turn (the page is polling for it).** Read the stage-1 `result.json` (`status: stage1-confirmed`). Using the user's **actual** contract (not your originals), **overwrite** `recommendations.json` with `"stage": "stage2"` and author the complete deck solution:
- - Recommend PPT-only reading mode through the compatibility key `recommend.delivery_purpose` (`text` / `balanced` / `presentation`), one narrative `mode`, and page count from source volume × desired audience outcome × reading mode.
+3. **Derive Stage 2 once from the confirmed communication contract, write it, then wait for the solution handoff — immediately, same turn (the page is polling for it).** Read the stage-1 `result.json` (`status: stage1-confirmed`). Using the user's **actual** contract (not your originals), **overwrite** `recommendations.json` with `"stage": "stage2"` and author the complete deck solution:
+ - Recommend PPT-only reading mode through the compatibility key `recommend.delivery_purpose` (`text` / `balanced` / `presentation`) from the confirmed audience, delivery context, and artifact afterlife. `text` makes the page self-contained with complete prose and detail; `balanced` shares meaning between page and presenter; `presentation` uses one idea, concise claims, and visual evidence per page while speech / notes carry explanation. Then recommend one narrative `mode` and page count from source volume × desired audience outcome × reading mode. Reading mode governs content grammar and page granularity as well as the body baseline; it is not a font-size preset. The page applies `reading mode → body baseline → unpinned role sizes` as a deterministic browser-only dependency. This never calls the backend, and a manually edited size is pinned against later reading-mode changes.
- When Step 3 loaded a deck/layout template, recommend `template_reuse_scope` now: `mirror`, `layout`, or `style`; `mirror` is legal only for `replication_mode: mirror`. Include `template_adherence: strict|adaptive` only for `mirror|layout`; `style` hides it and later writes `pptx_structure.mode: flat`. Select from scenario fit: literal recurring artifact → consider `mirror`; reusable structure with new content → `layout`; identity only or a contract that needs a different structure → `style`. Omit both fields for free design and brand-only templates.
- Author `design_directions` with ≥3 coordinated candidates (safe / shifted / bold; honest-shortfall exception unchanged). Each candidate carries one compatible `visual_style`, color object, typography object, icon id, and—when `image_usage` includes `ai`—one generated-image **rendering** object. The page applies a candidate as one coherent starting point and then exposes the component fields for deliberate override. Do not generate Cartesian combinations or random mix-and-match defaults.
- - Color candidates carry background / secondary_bg / primary / accent / secondary_accent / body_text. Typography splits CJK + Latin for heading/body, includes topic-matched sample text, and uses one fixed body baseline per reading mode (`text` 20 / `balanced` 24 / `presentation` 32 on PPT). Recommend one or more `image_usage` source ids (`["ai"]`, `["ai","provided"]`, `["web","placeholder"]`, or `["none"]`; `none` is exclusive) and keep mixed-source / page-role guidance in `image_notes`. When AI is included, each direction's `image_strategy` contains rendering / visual / mood only; **never offer or submit a separate image palette**. Image HEX and role behavior come directly from that direction's deck color object. Spot-illustration lean remains rationale, not a field.
+ - Color candidates carry background / secondary_bg / primary / accent / secondary_accent / body_text. Typography splits CJK + Latin for heading/body, includes topic-matched sample text, and uses one fixed body baseline per reading mode (`text` 20 / `balanced` 24 / `presentation` 32 on PPT). Font and direction cards change font character while preserving the current reading-mode sizing state. Recommend one or more `image_usage` source ids (`["ai"]`, `["ai","provided"]`, `["web","placeholder"]`, or `["none"]`; `none` is exclusive) and keep mixed-source / page-role guidance in `image_notes`. When AI is included, each direction's `image_strategy` contains rendering / visual / mood only; **never offer or submit a separate image palette**. Image HEX and role behavior come directly from that direction's deck color object. Spot-illustration lean remains rationale, not a field.
**Stage 2 is never skipped** — an installed template is an input to the decision, not a substitute for deciding how it serves the contract. Never jump `recommendations.json` from `stage1` to `stage3`: the server refuses to render a skipped stage. The still-open page polls, renders Stage 2, and preserves Stage 1. Then attach to the already-running page; if Windows cleaned up the server, `--wait-only` auto-recovers it on the recorded/default port so the browser reconnects:
```bash
python3 ${SKILL_DIR}/scripts/confirm_ui/server.py <project_path> --wait-only --wait-stage stage2
```
This returns when the page writes the stage-2 `result.json` (`status: stage2-confirmed`). On a non-zero exit, re-check `result.json` once before falling back to chat — except a `stage skip detected` error, which is not a page failure: you wrote a stage out of order; rewrite `recommendations.json` with the stage the error names and re-attach.
-4. **Re-derive Stage 3 from the confirmed solution, then wait for the final confirmation.** Read the stage-2 `result.json`. **Do not reopen aesthetic choices.** Overwrite `recommendations.json` with `"stage": "stage3"` and recommend only production mechanics: enumerable `formula_policy`; conditional `image_ai_path` when confirmed `image_usage` includes `ai`; `generation_mode`; and `refine_spec`. The page shows the confirmed image-source summary as read-only context. Then attach to the already-running page; `--wait-only` auto-recovers a dead server as above (same 600000 ms budget):
+4. **Derive Stage 3 once from the confirmed solution, then wait for the final confirmation.** Read the stage-2 `result.json`. **Do not reopen aesthetic choices.** Overwrite `recommendations.json` with `"stage": "stage3"` and recommend only production mechanics: enumerable `formula_policy`; conditional `image_ai_path` when confirmed `image_usage` includes `ai`; `generation_mode`; and `refine_spec`. The page shows the confirmed image-source summary as read-only context. Then attach to the already-running page; `--wait-only` auto-recovers a dead server as above (same 600000 ms budget):
```bash
python3 ${SKILL_DIR}/scripts/confirm_ui/server.py <project_path> --wait-only
```
@@ -479,19 +479,21 @@ When the confirmed `image_usage` does not include `ai` (and no legacy custom pro
**Small spot illustrations are a Strategist judgment, not a confirmation field.** The user chooses image *source* through `image_usage`; whether the deck leans into decorative illustrations is anchored by the locked `visual_style`'s **illustration propensity** (`core` / `supportive` / `sparse`), expressed only in the `image_notes` rationale — never a new confirmation control. An explicit user request to use or skip illustrations overrides that default either way; `image_usage: none` still wins (write no illustration rows); and source still comes from `image_usage` — a `core` style does not silently generate AI spots when the user did not pick AI. They are ordinary §VIII image rows (`Type: Illustration` / `Illustration Sheet`) using normal `Acquire Via` values. If the plan needs ≥3 same-family AI spot illustrations, use the `ai` Illustration Sheet + `slice` workflow by default; do not generate one AI image per spot. Full rule + precedence: [`references/strategist.md`](references/strategist.md) §h. Use them on suitable pages and omit them where they would weaken clarity.
-**Upstream override → re-derive untouched downstream (Mandatory).** The staged page normally handles this by deriving Stage 2 from the confirmed contract and Stage 3 from the confirmed solution. Re-derivation is still required when mutually dependent Stage-2 fields are changed in the same pass (including an advanced override after applying a direction bundle), a collapsed chat bundle, or a legacy single-pass `result.json`. "Confirmed value wins" governs each field's own value — never recompute a value the user set. Re-derive only untouched dependent fields that still carry the old recommendation.
+**One authored recommendation per stage; final visible state wins (Mandatory).** Author each stage exactly once. A user edit inside Stage 2 MUST NOT trigger AI / backend re-recommendation, and confirmation MUST NOT be followed by a hidden repair pass that changes any displayed field. The page may apply only documented deterministic local dependencies: reading mode sets the default body baseline, body sets unpinned role sizes, and manual size edits pin those values. Font / direction changes preserve the current sizing state. No other advanced override silently rewrites a sibling choice.
-| Anchor the user changed | Re-derive (only the downstream fields the user left at your recommendation) |
+Writing `design_spec.md` / `spec_lock.md` and later pages is **consumption of the confirmed state**, not another confirmation-stage calculation. Preserve every confirmed field verbatim and use it as an execution constraint:
+
+| Confirmed anchor | Consume it in |
|---|---|
-| `communication_intent` / `audience_outcome` / `core_message` | narrative mode, page-count rationale, template fit, outline obligations, visual / image tone |
-| `delivery_context` / `artifact_afterlife` | reading mode recommendation, standalone completeness, notes / citation depth, hand-off structure |
-| `visual_style` (§d Layer 2 — anchors e–h) | color neutral tiers (§e), icon library / stroke (§f), typography character (§g), image rendering (§h.5) |
-| `mode` (§d Layer 1) | outline structure + register (§IX) |
-| `delivery_purpose` compatibility key (reading mode, §g) | body baseline + per-page density / rhythm (§6.1) |
-| `audience` (§c) | tone across e–h, evidence depth, outline emphasis (§IX) |
-| `color` HEX (§e) | AI prompt color-role instructions (use the new deck colors directly; never restore an image-palette choice) |
+| `communication_intent` / `audience_outcome` / `core_message` | outline obligations, argument emphasis, and audience moves |
+| `delivery_context` / `artifact_afterlife` | page-vs-presenter information load, standalone completeness, notes / citation depth, and hand-off structure |
+| `visual_style` (§d Layer 2) | layout treatment, shape language, and visual rhythm while preserving the separately confirmed color / icon / typography values |
+| `mode` (§d Layer 1) | outline structure and register (§IX) |
+| `delivery_purpose` compatibility key (reading mode, §g) | content grammar, page granularity, notes burden, and per-page density / rhythm (§6.1); use the already-confirmed body / role sizes verbatim |
+| `audience` (§c) | tone, evidence depth, and outline emphasis (§IX) |
+| `color` HEX (§e) | exact deck roles and AI prompt color-role instructions; never invent or restore an image-palette choice |
-Reconcile **without a new blocking wait** — fold the coherent values into `design_spec.md` / `spec_lock.md` and state the adjustment in the §8 next-step handoff (e.g. "you switched to `dark-tech`; the light palette you had left no longer fit, so background / accent were re-derived — tell me if you wanted the original"). Canvas is the explicit exception: font sizes are deliberately **not** rescaled on a canvas change (see strategist §g).
+If a deliberately mixed set of advanced overrides is unusual, honor it rather than silently “fixing” it. Canvas remains the explicit exception only in the sense that changing canvas does not rescale font sizes (see strategist §g); it still does not trigger a second stage calculation.
**Opt-out**: if the user has said they don't want the page (e.g. "不要网页" / "just confirm in chat" / "纯聊天确认"), skip the launch entirely (step 2) and present the Strategist confirmation stage in chat as before — steps 1, 3, 4 still apply (recommendations summary in chat; wait; take chat values).
@@ -655,7 +657,7 @@ python3 ${SKILL_DIR}/scripts/svg_editor/server.py <project_path> --live --daemon
> Image facts: trust the `analysis/image_analysis.csv` regenerated at the end of Step 5. If `images/` changed since (the user swapped or added files), re-run `python3 ${SKILL_DIR}/scripts/analyze_images.py <project_path>/images` before laying images out — facts are re-derived on use, never a stale store (Step 4 image-facts note).
-**Per-page spec_lock re-read (Mandatory)**: before **each** SVG page, `read_file <project_path>/spec_lock.md`; check the global `communication` contract against the current §IX `Core message` + `Audience move`, and use only the lock's colors / fonts / icons / images, plus `pptx_structure.mode`, `template_reuse_scope`, and the per-page `page_rhythm` / `page_charts` lookups. Read `page_layouts` / `page_pptx_layouts` / `pptx_masters` / `pptx_layouts` only on a structured `template_reuse_scope: mirror|layout` route; they are absent in flat `style`, free-design, and brand-only projects. Resists purpose and design drift on long decks. See executor-base.md §2.1.
+**Per-page spec_lock re-read (Mandatory)**: before **each** SVG page, `read_file <project_path>/spec_lock.md`; check the global `communication` contract, including `consumption_mode`, against the current §IX `Core message` + `Audience move`, and use only the lock's colors / fonts / icons / images, plus `pptx_structure.mode`, `template_reuse_scope`, and the per-page `page_rhythm` / `page_charts` lookups. Read `page_layouts` / `page_pptx_layouts` / `pptx_masters` / `pptx_layouts` only on a structured `template_reuse_scope: mirror|layout` route; they are absent in flat `style`, free-design, and brand-only projects. Resists purpose and design drift on long decks. See executor-base.md §2.1.
> ⚠️ **Main-agent only**: SVG generation MUST stay in the current main agent — page design depends on full upstream context. Do NOT delegate to sub-agents.
> ⚠️ **Generation rhythm**: generate pages sequentially, one at a time, in the same continuous context. Do NOT batch (e.g., 5 per group).
diff --git a/skills/ppt-master/references/executor-base.md b/skills/ppt-master/references/executor-base.md
index a81aaf6e..38df7752 100644
--- a/skills/ppt-master/references/executor-base.md
+++ b/skills/ppt-master/references/executor-base.md
@@ -147,6 +147,16 @@ Before the first SVG page, output a confirmation listing: the compact communicat
**Per-page communication trace**: Read the current §IX `Core message` and `Audience move` before choosing composition. The page must advance at least one purpose named in `communication.communication_intent` and move the audience toward `communication.audience_outcome`; `communication.core_message` remains the deck-wide north star. A page that cannot state this movement is an upstream outline defect — surface `warning: P<NN> has no communication move` instead of compensating with decorative layout. Do not invent a new purpose, ask, or outcome at execution time. Structural pages may advance the contract by establishing relevance / tension / decision frame or by completing the final commitment; they are not exempt from having a reason to exist.
+**Per-page reading-mode check**: Read `communication.consumption_mode` before choosing the page's composition. Apply it together with the authored §IX block texture and `page_rhythm`:
+
+| `consumption_mode` | Page execution |
+|---|---|
+| `text` | Make the visible page independently understandable. Preserve complete prose, explicit labels / captions / sources, tables, and necessary detail; use bullets only for genuinely parallel or ordered items. |
+| `balanced` | Keep the primary claim and its evidence on the page; let notes add interpretation and transitions. Mix prose, structured evidence, and necessary lists according to their semantic relationship. |
+| `presentation` | Make one claim and one dominant visual expression legible at projection distance. Keep visible copy concise; put explanation and transitions in notes instead of creating paragraph dumps or compressed bullet prose. |
+
+The §IX wording and sourced facts remain authoritative. Do not rewrite, drop, or invent content to force a mode at execution time. When the authored texture materially conflicts with the lock, render the least-destructive faithful composition and surface `warning: P<NN> content texture conflicts with consumption_mode <value>` as an upstream outline issue; do not encode this subjective judgment in the checker.
+
**Per-block expression**: render each `design_spec.md §IX Content` block in its written texture — a full-sentence block as wrapped prose, a fragment/label block as bullets/keywords. **Never split a full-sentence block into a bullet list** — splitting loses the information that the block was continuous reasoning, not a set of parallel points; not because a bullet lays out easier, and not because an inherited template slot is shaped as a list. If a block carries no clear texture, infer the mode from its wording and the page layout.
- **Prose render recipe**: one `<text>` per paragraph; wrap lines with sibling `<tspan>` where the first line uses `dy="0"` and every subsequent line repeats the parent `<text>`'s **exact `x`** and the **same positive relative `dy`** (the line-height). Equal relative `dy` + matching `x` + the same effective `font-size` lets lines flow inside one PowerPoint paragraph; a font-size change preserves a new paragraph inside the same text frame, while a growing/cumulative `dy`, an irregular gap, or a mismatched `x` (e.g. `x="0"` under `<text x="60">`) may split them into separate single-line boxes. Set the line-height `dy` from the font size × a line-height factor. **Default — line-height by density (may override per content fit)**: ~1.4–1.5× for dense / small-body blocks (CLReq comfortable minimum), 1.6–2.0× for large-type, sparse, or `breathing` blocks. Fit about width ÷ font-size CJK glyphs per line (Latin fits roughly twice that); the last line runs short. Use the body ramp size, not a new one.
@@ -558,6 +568,14 @@ After all SVG pages are finalized, enter Logic Construction Phase and write the
**Per-page structure**: `# <number>_<page_title>` heading (the `#` heading line is the only thing stripped before TTS), pages separated by `---`. Body is 2–5 natural sentences carrying the page's core message. Page-to-page transitions live inside the opening sentence as natural prose ("接下来……" / "Having framed X, let's turn to Y") — no bracketed `[过渡]` / `[Transition]` tags.
+**Reading-mode note burden**:
+
+| `consumption_mode` | Notes emphasis |
+|---|---|
+| `text` | Add interpretation or transition without reading the already self-contained page aloud. |
+| `balanced` | Connect the visible claim and evidence, explain the trade-off, and bridge to the next page. |
+| `presentation` | Carry the reasoning, context, and supporting detail intentionally omitted from the sparse projected surface. |
+
**Concrete examples** — same shape applies to any language; just write naturally in that language.
中文 deck:
diff --git a/skills/ppt-master/references/strategist.md b/skills/ppt-master/references/strategist.md
index 335ee1a2..603ae0e4 100644
--- a/skills/ppt-master/references/strategist.md
+++ b/skills/ppt-master/references/strategist.md
@@ -29,10 +29,10 @@ As a top-tier AI presentation strategist, receive source documents, perform cont
| Stage | Items | Role |
|---|---|---|
| **1 — communication contract** | `c` audience · open-ended communication intent · audience outcome · core message / delivery context / artifact afterlife · `content_divergence` (all prose fields may be blank) · `a` canvas | confirmed first |
-| **2 — complete deck solution** (re-derived from the user's *actual* Stage 1) | reading mode (`delivery_purpose`, PPT only) · `d` mode + visual style · `b` page count · template reuse / adherence · `e` color · `f` icon · `g` typography · `h` image source + generated-image rendering | derived from the confirmed contract |
-| **3 — resources / production** (re-derived from the user's *actual* Stage 1 + Stage 2) | formula policy · conditional AI-image acquisition path · generation mode · refine-spec toggle | derived from the confirmed solution |
+| **2 — complete deck solution** (authored once from the user's *actual* Stage 1) | reading mode (`delivery_purpose`, PPT only) · `d` mode + visual style · `b` page count · template reuse / adherence · `e` color · `f` icon · `g` typography · `h` image source + generated-image rendering | derived from the confirmed contract |
+| **3 — resources / production** (authored once from the user's *actual* Stage 1 + Stage 2) | formula policy · conditional AI-image acquisition path · generation mode · refine-spec toggle | derived from the confirmed solution |
-Do not force communication intent into one catalog label. A deck may report progress, expose risk, and request a decision in the same artifact; Stage 1 records that relationship in prose. Its editable prose fields are recommendation drafts, not required inputs: confirmation accepts the current text exactly, including blanks, and a cleared field must not be repopulated later. Stage 2 then confirms one complete solution: narrative spine, reading density, page budget, template strategy, visual system, and image direction. Present ≥3 coordinated design directions (safe / shifted / bold) so color, type, icons, and generated-image rendering begin coherent; the user may still override each component. Generated images inherit the selected deck colors directly—there is no second image-palette confirmation. Stage 3 asks only how to produce the locked solution. **Page count is derived, not an anchor**—it follows content volume × desired audience outcome × reading mode. The launch / re-derive / wait mechanics live in [SKILL.md Step 4](../SKILL.md); the item specs below keep their `a`–`h` letters.
+Do not force communication intent into one catalog label. A deck may report progress, expose risk, and request a decision in the same artifact; Stage 1 records that relationship in prose. Its editable prose fields are recommendation drafts, not required inputs: confirmation accepts the current text exactly, including blanks, and a cleared field must not be repopulated later. Stage 2 then confirms one complete solution: narrative spine, reading density, page budget, template strategy, visual system, and image direction. Present ≥3 coordinated design directions (safe / shifted / bold) so color, type, icons, and generated-image rendering begin coherent; the user may still override each component. Generated images inherit the selected deck colors directly—there is no second image-palette confirmation. Stage 3 asks only how to produce the locked solution. **Page count is derived, not an anchor**—it follows content volume × desired audience outcome × reading mode. Author each stage once: same-stage edits update only visible browser state through documented deterministic dependencies and never trigger a new AI / backend recommendation. The launch / derive / wait mechanics live in [SKILL.md Step 4](../SKILL.md); the item specs below keep their `a`–`h` letters.
> **Execution discipline**: This is the last BLOCKING checkpoint in the pipeline. After confirmation, complete the Design Spec and proceed to image generation / SVG / post-processing without further pauses.
>
@@ -67,7 +67,7 @@ Seed the following as open-prose recommendations when the source and user reques
The contract is not the narrative mode. `communication_intent` says what change is needed; `mode` is one Stage-2 strategy for organizing the argument. Several intents may share one dominant mode, and one intent may support several possible modes.
-**Reading mode** (PPT only) is a closed Stage-2 design-density axis: `text` (read-close) / `balanced` (business, default) / `presentation`. Keep the existing `recommend.delivery_purpose` / `result.json.delivery_purpose` key for compatibility, but label and reason about it as reading mode—never as communication purpose. It sets the §g body size to one fixed value, plus page density and the §b page-count recommendation.
+**Reading mode** (PPT only) is a closed Stage-2 information-carriage axis: `text` (read-close) / `balanced` (business, default) / `presentation`. Keep the existing `recommend.delivery_purpose` / `result.json.delivery_purpose` key for compatibility, but label and reason about it as reading mode—never as communication purpose. It decides how meaning is divided among the page, visuals, presenter, and notes, driving page grammar, granularity, density / rhythm, and the §b page-count recommendation. The §g body baseline is a downstream typography default, not the label or definition shown in the reading-mode control.
**Material divergence** — a **free-text** source-treatment intent in the Stage-1 delivery section: 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 plainly (in the confirm UI it appears after the delivery-context fields); leave it for the user to fill. Blank = a balanced default.
@@ -307,7 +307,7 @@ See [`../templates/icons/README.md`](../templates/icons/README.md) for the curre
> **Unit boundary (HARD rule).** The system is **px-only**. `recommendations.json`, the Confirm UI, `result.json`, `design_spec.md`, `spec_lock.md`, and SVG **all carry unitless px** — there is no pt layer anywhere, and no pt→px conversion step. pt exists only as the size PowerPoint happens to show *after export* (`px × 0.75`, rounded to 1 decimal); it is never an input, a confirmation value, or a provenance field (no `body_size_pt` / `sizes_pt`). Never write `pt` / `px` / `em` units; every layer carries bare px numbers. Geometry — margins, gaps, card sizes — is px too. (The beautify profile reads a source deck's pt at intake but converts to px **before** any recommendation — see [`beautify-pptx.md`](../workflows/profiles/beautify-pptx.md); pt never re-enters the contract.)
-**Baseline — one fixed value per reading mode, not a range.** Reading mode is confirmed in Stage 2 (compatibility key `delivery_purpose`). It is the primary body-size driver because the same canvas reads differently when read close vs. projected. It is a deck-wide technical axis—beyond the body baseline it drives density / count / rhythm; it never replaces the open-ended communication intent. Here, with the mode confirmed, it sets one baseline:
+**Baseline — one fixed initial value per reading mode, not a range.** Reading mode is confirmed in Stage 2 (compatibility key `delivery_purpose`). Its user-facing definition is information carriage (§6.1), not font size. Once selected, the browser uses it as the initial body-size driver because the same canvas reads differently when read close vs. projected. This deterministic local dependency does not regenerate Stage 2. Here it seeds one baseline:
| Reading mode (PPT 16:9) | Body (px) | Reads as |
|---|---:|---|
@@ -315,7 +315,7 @@ See [`../templates/icons/README.md`](../templates/icons/README.md) for the curre
| `balanced` · business (presented **and** read; roadshow, review) — **default** | 24px | mixed projection + reading |
| `presentation` (projected, sparse; keynote, launch, classroom) | 32px | room projection, glance from the back |
-The body baseline is **purely a function of reading mode**—density and visual style do **not** nudge it within a range. Body size is the reading-distance proxy; density is orthogonal and shows in **how much text per page, page count, and `page_rhythm`** (§6.1), the *other* roles, and decoration—never in growing or shrinking the body baseline. One mode → one body size, identical across the deck. (The user may still override the value in confirmation; absent an override, this fixed value is the recommendation.)
+Absent a user override, the initial body baseline is **purely a function of reading mode**—density and visual style do **not** nudge it within a range. Body size is the reading-distance proxy; density is orthogonal and shows in **how much text per page, page count, and `page_rhythm`** (§6.1), the *other* roles, and decoration—never in growing or shrinking the body baseline. One mode → one default body size. The browser derives unpinned role sizes from it locally; editing body or a role pins that visible value, and later reading-mode changes preserve the pin.
| Canvas | Height | Body baseline | Unit |
|---|---|---|---|
@@ -327,7 +327,7 @@ The body baseline is **purely a function of reading mode**—density and visual
> **Every canvas authors px directly.** PPT and social / print alike—the body baseline is a px number (PPT by reading mode above; social / print by the per-canvas value). No pt confirmation, no conversion step on any canvas.
-> **Confirmed values win — never recompute over them.** The user's confirmed sizes are authoritative. **Confirm UI path**: take `result.json` `typography.body_size` / `sizes` (already px) **verbatim**—do **not** re-derive from the canvas even if the user changed it. The page deliberately does not auto-rescale font sizes when the canvas changes (it only updates the recommended-value hint), so `result.json` already reflects the user's intent; recomputing here would silently override their choice. **Chat-fallback path** (no `result.json`): take the px body baseline for the confirmed canvas + reading mode directly from the table above (no conversion). The `body_size` in `recommendations.json` is only a stale hint once the canvas changes—use the confirmed value, not the recommendation.
+> **Confirmed values win — never recompute over them.** The user's confirmed sizes are authoritative. **Confirm UI path**: take `result.json` `typography.body_size` / `sizes` (already px) **verbatim**. Inside Stage 2, changing reading mode updates the body and unpinned roles locally; manually edited sizes stay pinned. Changing canvas deliberately does not rescale sizes. The visible state is therefore the final state—never perform a hidden post-confirm repair. **Chat-fallback path** (no `result.json`): take the px body baseline for the confirmed canvas + reading mode directly from the table above (no conversion).
| Level | Ratio to body | 32px baseline (`presentation`) | 24px baseline (`balanced`) |
|-------|---------------|---------------|---------------|
@@ -834,17 +834,19 @@ Templates are starting points. The Strategist may adjust based on content and au
Content-outline and speaker-notes strategy follow the deck's locked **mode** — see [`modes/_index.md`](./modes/_index.md) and the locked mode's file. The guidance below applies within any mode:
-**Consumption mode drives density, not communication intent.** `result.json delivery_purpose` is retained as the compatibility key for `text` (read-close) / `balanced` (business, default) / `presentation`, confirmed with the complete deck solution in Stage 2. It seeds the body baseline (§g) **and** governs how content is distributed, but it does not answer why the deck exists:
+**Reading mode controls information carriage, not communication intent.** `result.json delivery_purpose` is retained as the compatibility key for `text` (read-close) / `balanced` (business, default) / `presentation`, confirmed with the complete deck solution in Stage 2. It decides how meaning is divided among the page, visuals, presenter, and notes. The body baseline (§g) is one consequence, not the definition:
-| Consumption mode | Per-page density & treatment | §IX content per page | page_rhythm lean |
-|---|---|---|---|
-| `text` · read-close | dense — pack more per page, fuller layouts | prose paragraphs, more blocks, tables / fine detail; complete sentences | leans `dense` |
-| `balanced` · business (default) | balanced | one primary + supporting points; moderate text | mixed |
-| `presentation` | sparse — one idea per page, generous whitespace | keywords / short phrases, a single core message, large visual; never paragraph dumps | leans `anchor` / `breathing` |
+| Reading mode | Primary carrier | §IX page grammar | Granularity / rhythm | Speaker notes |
+|---|---|---|---|---|
+| `text` · read-close | page / document | complete assertions, short prose paragraphs, captions, tables, and necessary detail; bullets only for genuinely parallel or ordered items | fewer, fuller pages; leans `dense` | supplemental context, not a substitute for missing page logic |
+| `balanced` · business (default) | page + presenter | one primary claim with concise explanation, structured evidence, or a necessary list | moderate granularity; mixed rhythm | interpretation and transitions |
+| `presentation` | presenter + visuals | one claim per page, keywords / short phrases, a large visual or hero number; no paragraph dumps or prose compressed into bullet fragments | more, sparser pages; leans `anchor` / `breathing` | carries explanation, transitions, and supporting detail |
+
+**Recommendation signals**: derive the initial reading mode from the confirmed `audience`, `delivery_context`, and `artifact_afterlife`. Asynchronous review, reference, approval, audit, and leave-behind use lean `text`; presenter-led projection, large-room delivery, launch, or classroom explanation lean `presentation`; hybrid review / roadshow use leans `balanced`. When live projection and durable afterlife both matter, recommend `balanced` unless the contract clearly prioritizes one. If the user confirms `presentation`, support afterlife through notes, appendix pages, captions, and visible sources instead of crowding every slide.
-This is what makes the axis meaningful: a `presentation` deck and a `text` deck built from the **same source and communication contract** must differ in per-page text volume, layout density, and rhythm—not only in font size. Page count stays the user's call; reading mode governs density and treatment and informs the recommendation when the user has not fixed one. Record it as **Reading Mode** in `design_spec.md §I` (compatibility key `delivery_purpose`, lock key `consumption_mode`). Separately, `communication_intent` / `audience_outcome` determine what the outline must accomplish, `delivery_context` determines presenter dependence and pacing, and `artifact_afterlife` determines how self-contained, attributable, and reusable the file must remain after the event. The `page_rhythm` leans are a bias, not a quota. Preservation paths keep source structure verbatim: honor reading mode only in styling, never to re-paginate.
+**Per-block expression**: let the semantic relationship choose the form. Causal explanation, argument, interpretation, and narrative continuity use prose. Truly parallel, ordered, or enumerable items may use bullets / numbers. Never create bullets merely because copy is long or a template exposes a list slot. In `presentation`, distill one assertion and move its explanation into notes rather than turning every sentence into a fragment. Source texture remains a secondary cue: an article / transcript / talk leans prose, while a data sheet or inventory may lean structured labels. Write the final phrasing into §IX itself; do not leave skeleton points for Executor to expand.
-**Per-block expression**: phrase each §IX content block in the mode that fits it — prose, bullet, keyword, or any phrasing the content calls for — not a default bullet. Take the cue from the source's texture: a narrative source (article / transcript / talk) leans prose — resist compressing its argument pages into fragments; a data sheet leans bullet/keyword. Write the real sentence into §IX itself, not a skeleton point to expand later. One page mixes modes; let layout pull each (narrative → prose, structural/chart → bullets/keywords).
+This is what makes the axis meaningful: a `presentation` deck and a `text` deck built from the **same source and communication contract** must differ in page grammar, page count recommendation, per-page text volume, visual burden, layout density, rhythm, and notes—not only in font size. Page count stays the user's call; reading mode informs the recommendation when the user has not fixed one. Record it as **Reading Mode** in `design_spec.md §I` (compatibility key `delivery_purpose`, lock key `consumption_mode`). Separately, `communication_intent` / `audience_outcome` determine what the outline must accomplish, while `delivery_context` and `artifact_afterlife` help select the reading mode and still remain independent constraints after selection. The `page_rhythm` leans are a bias, not a quota. Preservation paths keep source wording and structure verbatim: honor reading mode only in styling and notes, never by rephrasing or re-paginating.
> Note: §IX is the only content copy the Executor re-reads after context compression — what you write there is what survives.
diff --git a/skills/ppt-master/scripts/confirm_ui/server.py b/skills/ppt-master/scripts/confirm_ui/server.py
index 08ee78fa..3641ada7 100644
--- a/skills/ppt-master/scripts/confirm_ui/server.py
+++ b/skills/ppt-master/scripts/confirm_ui/server.py
@@ -1023,7 +1023,7 @@ def create_app(
data.pop('template_reuse_scope', None)
data.pop('template_adherence', None)
# The page polls this endpoint after a stage-1 confirm until the AI
- # overwrites the file with the re-derived stage-2 recommendations, so it
+ # overwrites the file with the once-authored stage-2 recommendations, so it
# must never be served from a cache.
resp = jsonify(data)
resp.headers['Cache-Control'] = 'no-store'
diff --git a/skills/ppt-master/scripts/confirm_ui/static/app.js b/skills/ppt-master/scripts/confirm_ui/static/app.js
index c53cc39d..5b8e1164 100644
--- a/skills/ppt-master/scripts/confirm_ui/static/app.js
+++ b/skills/ppt-master/scripts/confirm_ui/static/app.js
@@ -98,7 +98,7 @@
body_size_hint_purpose: "This reading mode recommends {def}px — one fixed size, not a range.",
body_size_hint_oor: "(Current value is outside the usual range for this canvas — check the unit is right and that it fits.)",
delivery_purpose: "Reading mode",
- delivery_purpose_hint: "Read-close decks can run smaller; projected decks need larger type.",
+ delivery_purpose_hint: "Choose where the meaning lives: read-close decks explain themselves with complete sentences and detail; presenter-led decks use one idea, concise claims, and visual evidence.",
size_override: "Per-role size override:",
size_role_title: "title",
size_role_subtitle: "subtitle",
@@ -231,7 +231,7 @@
body_size_hint_purpose: "この閲覧モードの推奨は{def}px — 範囲ではなく固定値です。",
body_size_hint_oor: "(現在の値はこのキャンバスの通常範囲外です — 単位とサイズ感を確認してください。)",
delivery_purpose: "閲覧モード",
- delivery_purpose_hint: "手元で読む資料は小さめでOK、投影する資料は大きめの文字が必要です。",
+ delivery_purpose_hint: "情報を主にページと話者のどちらに担わせるかを決めます。近距離閲覧は完全な文と細部で自立させ、プレゼン型は1枚1メッセージで短い主張と視覚的根拠を中心にします。",
size_override: "役割ごとのサイズ上書き:",
size_role_title: "タイトル",
size_role_subtitle: "サブタイトル",
@@ -364,7 +364,7 @@
body_size_hint_purpose: "该阅读模式推荐 {def}px(单一固定值,非区间)。",
body_size_hint_oor: "(当前数值超出该画布的常用范围——请确认单位无误、是否合适。)",
delivery_purpose: "阅读模式",
- delivery_purpose_hint: "近读型可以小一点;投影型需要更大的字。",
+ delivery_purpose_hint: "决定信息主要由页面还是讲者承担:近读型用完整句、短段落和细节自洽;演讲型一页一意,以简短主张和视觉证据为主。",
size_override: "逐角色字号覆盖:",
size_role_title: "标题",
size_role_subtitle: "副标题",
@@ -808,8 +808,8 @@
}
// Render an enumerable field: ALL options from the catalog, recommended one
// badged, current selection from STATE, plus a trailing Custom box. Callers
- // may place Custom on its own row when it represents a qualitatively
- // different path rather than another preset.
+ // may place Custom or selected sentinel options on their own rows when they
+ // represent qualitatively different paths rather than another preset.
// `list` is either a flat array of {id,label,desc,dim,viewbox} or a grouped array
// of {group, items:[...]}.
function enumField(parent, list, recommendedId, getVal, setVal, opts2) {
@@ -901,9 +901,17 @@
}
} else {
var wrap = el("div", chipsClass);
- flat.forEach(function (o) { wrap.appendChild(makeChip(o)); });
+ var ownRowIds = opts2.ownRowIds || [];
+ flat.filter(function (o) { return ownRowIds.indexOf(o.id) === -1; })
+ .forEach(function (o) { wrap.appendChild(makeChip(o)); });
if (allowCustom && !opts2.customOnOwnRow) wrap.appendChild(buildCustomChip());
parent.appendChild(wrap);
+ flat.filter(function (o) { return ownRowIds.indexOf(o.id) >= 0; })
+ .forEach(function (o) {
+ var ownRow = el("div", "chips standalone-chip-row");
+ ownRow.appendChild(makeChip(o));
+ parent.appendChild(ownRow);
+ });
if (allowCustom && opts2.customOnOwnRow) {
var customRow = el("div", "chips custom-chip-row");
customRow.appendChild(buildCustomChip());
@@ -1234,7 +1242,10 @@
function () { return STATE.delivery_purpose; },
function (v) {
STATE.delivery_purpose = v;
- refreshBodySizeHint();
+ // Same-stage dependency, resolved entirely in the browser: do
+ // not ask the backend to author Stage 2 again. Manual size
+ // overrides remain authoritative.
+ syncUnpinnedTypographySizes(true);
});
host.appendChild(sec);
}
@@ -1251,12 +1262,16 @@
}
if (candidate.typography) {
var typography = normTypography(candidate.typography);
+ var previousTypography = STATE.typography || {};
STATE.typography = {
name: localized(typography, "name") || typography.name || "",
heading: typography.heading || {},
body: typography.body || {},
- body_size: typography.body_size || defaultBodySizeForCanvas(STATE.canvas, STATE.delivery_purpose),
- sizes: Object.assign({}, typography.sizes || {})
+ // A direction changes font character, not the already-visible
+ // reading-mode sizing state.
+ body_size: previousTypography.body_size ||
+ defaultBodySizeForCanvas(STATE.canvas, STATE.delivery_purpose),
+ sizes: Object.assign({}, previousTypography.sizes || {})
};
}
if (candidate.icons) STATE.icons = normalizeRecId("icons", candidate.icons);
@@ -1415,13 +1430,13 @@
// Replaced when the combined color+typography preview mounts; the color and
// typography sections call it after every change so the preview stays live.
var refreshStylePreview = function () {};
- // Replaced when a generated-image preview mounts.
+ // Replaced when the selected generated-image preview mounts.
var refreshImageStrategyPreview = function () {};
// Replaced when the typography section mounts; the canvas section calls it so
// the body-size hint tracks the chosen canvas height.
var refreshBodySizeHint = function () {};
- // Replaced when the typography section mounts; body-size / delivery changes
- // call it so the per-role size overrides the user hasn't pinned re-derive.
+ // Replaced when the typography section mounts; body-size / reading-mode
+ // changes call it so unpinned per-role values update locally.
var refreshSizeInputs = function () {};
// Per-role size slots the user can edit directly (parallel to color roles).
@@ -1429,6 +1444,19 @@
// values are px (the system's only unit).
var SIZE_ROLES = ["title", "subtitle", "annotation"];
var SIZE_RATIO = { title: 1.75, subtitle: 1.35, annotation: 0.78 };
+ var TYPOGRAPHY_SIZE_OVERRIDES = {
+ body: false,
+ title: false,
+ subtitle: false,
+ annotation: false
+ };
+
+ function resetTypographySizeOverrides() {
+ Object.keys(TYPOGRAPHY_SIZE_OVERRIDES).forEach(function (role) {
+ TYPOGRAPHY_SIZE_OVERRIDES[role] = false;
+ });
+ }
+
function deriveSize(role, bodyVal) {
var raw = (bodyVal || 0) * (SIZE_RATIO[role] || 1);
// All px. On PPT, snap the recommended role size to a clean even number so
@@ -1489,6 +1517,31 @@
return Math.round(h * (band.lo + band.hi) / 2);
}
+ // Resolve the only deterministic same-stage size dependency locally. The
+ // backend authors Stage 2 once; changing reading mode or body size updates
+ // only unpinned values already visible in this page.
+ function syncUnpinnedTypographySizes(resetBodyFromReadingMode) {
+ if (!STATE.typography) STATE.typography = { name: "", heading: {}, body: {} };
+ if (!STATE.typography.sizes) STATE.typography.sizes = {};
+ if (resetBodyFromReadingMode && !TYPOGRAPHY_SIZE_OVERRIDES.body) {
+ STATE.typography.body_size = defaultBodySizeForCanvas(
+ STATE.canvas, STATE.delivery_purpose
+ );
+ }
+ var body = parseFloat(STATE.typography.body_size);
+ if (!isFinite(body)) {
+ body = defaultBodySizeForCanvas(STATE.canvas, STATE.delivery_purpose);
+ }
+ SIZE_ROLES.forEach(function (role) {
+ if (!TYPOGRAPHY_SIZE_OVERRIDES[role]) {
+ STATE.typography.sizes[role] = deriveSize(role, body);
+ }
+ });
+ refreshSizeInputs();
+ refreshBodySizeHint();
+ refreshStylePreview();
+ }
+
function roundSize(value) {
return Math.round(value * 100) / 100;
}
@@ -1655,7 +1708,7 @@
var sec = section(6, "sec_icons");
enumField(sec, CAT.icons, recOrFirst("icons", CAT.icons),
function () { return STATE.icons; }, function (v) { STATE.icons = v; refreshStylePreview(); },
- { allowCustom: true });
+ { allowCustom: true, customOnOwnRow: true, ownRowIds: ["none"] });
host.appendChild(sec);
}
@@ -1692,15 +1745,18 @@
customInput.placeholder = t("custom_typography_placeholder");
customInput.style.display = "none";
- function selectFont(idx, preserveSizing) {
+ function selectFont(idx) {
var c = normTypography(cands[idx] || {});
var prev = STATE.typography || {};
STATE.typography = {
name: localized(c, "name") || c.name || "",
heading: c.heading || {},
body: c.body || {},
- body_size: (preserveSizing && prev.body_size) ? prev.body_size : (c.body_size || prev.body_size || ""),
- sizes: (preserveSizing && prev.sizes) ? Object.assign({}, prev.sizes) : Object.assign({}, c.sizes || {})
+ // Font cards choose family and character. Reading mode and
+ // explicit size inputs own the sizing state.
+ body_size: prev.body_size ||
+ defaultBodySizeForCanvas(STATE.canvas, STATE.delivery_purpose),
+ sizes: Object.assign({}, prev.sizes || {})
};
if (sizeInput) sizeInput.value = STATE.typography.body_size || "";
customInput.style.display = "none";
@@ -1735,7 +1791,6 @@
top.appendChild(el("span", "font-card-name", localized(c, "name") || (t("option_prefix") + " " + (idx + 1))));
var meta = t("font_heading") + " " + t("cjk") + ":" + (head.cjk || "—") + " / " + t("latin") + ":" + (head.latin || "—")
+ " · " + t("font_body") + " " + t("cjk") + ":" + (body.cjk || "—") + " / " + t("latin") + ":" + (body.latin || "—");
- if (c.body_size) meta += " · " + t("font_body_size") + ":" + c.body_size + "px";
top.appendChild(el("span", "font-card-meta", meta));
card.appendChild(top);
var hbox = el("div", "font-sample-heading-box"); fontSample(hbox, head, head.css, "heading"); card.appendChild(hbox);
@@ -1766,22 +1821,22 @@
sizeInput.max = "96";
sizeInput.step = "1";
sizeInput.value = (STATE.typography && STATE.typography.body_size) || "";
- sizeInput.placeholder = isPptCanvas(STATE.canvas) ? "16 / 20 / 24" : "40 / 48";
+ sizeInput.placeholder = isPptCanvas(STATE.canvas) ? "20 / 24 / 32" : "40 / 48";
sizeInput.addEventListener("input", function () {
if (!STATE.typography) STATE.typography = { name: "", heading: {}, body: {} };
- // Independent input — body never auto-changes the role sizes (no
- // interlinking); the role inputs carry their own values.
STATE.typography.body_size = sizeInput.value;
- refreshBodySizeHint(); // hint text only (e.g. out-of-range flag) — no value cascade
- refreshStylePreview();
+ TYPOGRAPHY_SIZE_OVERRIDES.body = sizeInput.value !== "";
+ // Body is an explicit local anchor. Recompute only role values the
+ // user has not edited; no request leaves the browser.
+ syncUnpinnedTypographySizes(false);
});
sizeRow.appendChild(sizeInput);
sizeRow.appendChild(el("span", "font-size-unit", "px"));
var sizePtHint = el("div", "toggle-desc body-size-pt");
var sizeHint = el("div", "toggle-desc body-size-hint");
- // Hint only — the user's value is never overwritten; downstream §g
- // re-derives if ignored. PPT body is one fixed px value per delivery
- // purpose (not a range); non-PPT canvases scale px to canvas height.
+ // PPT body is one fixed px value per reading mode (not a range); non-PPT
+ // canvases scale px to canvas height. A manually pinned value is never
+ // overwritten by later reading-mode changes.
// Everything is px — lo/hi are only a sanity envelope for the OOR flag.
refreshBodySizeHint = function () {
var txt = t("font_body_size_hint");
@@ -1799,7 +1854,7 @@
.replace("{lo}", lo).replace("{hi}", hi);
}
}
- // Flag (hint only — never auto-corrected) a value far outside the
+ // Flag (hint only) a value far outside the
// canvas's usual px range, so an accidental extreme value is visible
// instead of silently submitting it.
var cur = parseFloat(STATE.typography && STATE.typography.body_size);
@@ -1816,8 +1871,9 @@
sizeField.appendChild(sizePtHint);
sizeField.appendChild(sizeHint);
- // Reading mode is confirmed in Stage 2 before typography is edited. Its
- // compatibility key remains delivery_purpose, and it drives this hint.
+ // Reading mode and typography are both confirmed in Stage 2. Its
+ // compatibility key remains delivery_purpose; the dependency is a local
+ // deterministic update, not a second Stage-2 recommendation.
sec.appendChild(sizeField);
// Per-role size override (parallel to color's per-role HEX override): the
@@ -1844,8 +1900,8 @@
inp.addEventListener("input", function () {
if (!STATE.typography) STATE.typography = { name: "", heading: {}, body: {} };
if (!STATE.typography.sizes) STATE.typography.sizes = {};
- // Independent input — each role holds its own value; no cascade.
STATE.typography.sizes[role] = inp.value;
+ TYPOGRAPHY_SIZE_OVERRIDES[role] = true;
refreshRolePtHint(role);
refreshStylePreview();
});
@@ -1860,14 +1916,12 @@
sizeOverride.appendChild(srow);
sec.appendChild(sizeOverride);
- // Inputs are independent — this only **fills a role that has no value yet**
- // (a one-time starting suggestion from the ramp) and reflects the current
- // value into the input. It never overwrites an existing value, so editing
- // body / purpose / canvas does not cascade into the role sizes, and a
- // re-render (canvas / language switch) preserves exactly what the user sees.
+ // Reflect state into the controls. Derivation itself happens only through
+ // syncUnpinnedTypographySizes(); a re-render preserves the visible state.
refreshSizeInputs = function () {
if (!STATE.typography) STATE.typography = { name: "", heading: {}, body: {} };
if (!STATE.typography.sizes) STATE.typography.sizes = {};
+ sizeInput.value = STATE.typography.body_size || "";
var bodyVal = parseFloat(STATE.typography.body_size) ||
(isPptCanvas(STATE.canvas) ? deliveryBodyPx(STATE.delivery_purpose).def : 40);
SIZE_ROLES.forEach(function (role) {
@@ -1886,7 +1940,7 @@
if (STATE.typography && STATE.typography.name) cands.forEach(function (c, i) {
if ((localized(c, "name") || c.name) === STATE.typography.name) selIdx = i;
});
- if (selIdx >= 0) selectFont(selIdx, true);
+ if (selIdx >= 0) selectFont(selIdx);
else if (STATE.typography && STATE.typography.name === "custom") {
customInput.value = STATE.typography.custom || "";
customCard.classList.add("selected");
@@ -2013,7 +2067,10 @@
if (!row) visual.appendChild(el("div", "toggle-desc", t("image_strategy_no_reference")));
title.textContent = strategy.name || t("image_strategy_manual");
var parts = [];
- if (strategy.rendering) parts.push(t("image_strategy_rendering") + ": " + comparisonValueLabel("rendering", strategy.rendering));
+ if (strategy.rendering) {
+ parts.push(t("image_strategy_rendering") + ": " +
+ comparisonValueLabel("rendering", strategy.rendering));
+ }
if (strategy.custom) parts.push(strategy.custom);
desc.textContent = parts.join(" · ") || t("image_strategy_reference_hint");
}
@@ -2080,7 +2137,7 @@
var strategySub = el("div", "subfield image-strategy-subfield");
strategySub.appendChild(el("div", "subfield-label", t("image_strategy")));
strategySub.appendChild(el("div", "toggle-desc", t("image_strategy_reference_hint")));
- var strategyGrid = el("div", "font-grid");
+ var strategyGrid = el("div", "font-grid image-strategy-grid");
var strategyCands = imageStrategyRecommendationCandidates();
function markStrategyCard(selectedCard) {
@@ -2132,6 +2189,8 @@
});
if (!strategyCands.length) strategyGrid.appendChild(el("div", "toggle-desc", t("image_strategy_empty")));
+ // Custom is a separate full-width path below the three recommended
+ // thumbnails, not a fourth visual recommendation.
var manualCard = el("div", "font-card image-strategy-manual-card");
var manualTop = el("div", "font-card-head");
manualTop.appendChild(el("span", "font-card-name", t("image_strategy_manual")));
@@ -2420,9 +2479,10 @@
// Stage-2 fields are (re-)read from the recommendations. At boot they come from
// whatever recommendations.json carried; after a stage-1 confirm enterStage()
- // calls this again with the re-derived candidates. Stage-1 STATE is preserved
+ // calls this again with the newly authored candidates. Stage-1 STATE is preserved
// across the single-session transition — this never resets the contract.
function initStage2State() {
+ resetTypographySizeOverrides();
// Reading mode is a design-density tool, not part of the communication
// purpose. Keep the legacy delivery_purpose key for JSON compatibility.
STATE.delivery_purpose = recId("delivery_purpose") ||
@@ -2470,6 +2530,10 @@
if (STATE.typography && !STATE.typography.body_size) {
STATE.typography.body_size = defaultBodySizeForCanvas(STATE.canvas, STATE.delivery_purpose);
}
+ // A freshly authored Stage 2 starts from one deterministic reading-mode
+ // baseline. Stage 3 carries the confirmed Stage-2 values and must not
+ // normalize them again.
+ if (stageNumber(REC) === 2) syncUnpinnedTypographySizes(true);
var rawImageUsage = recValue("image_usage") || directionField("image_usage");
STATE.image_usage = selectedImageUsageIds(rawImageUsage);
if (!STATE.image_usage.length) {
@@ -2508,7 +2572,7 @@
ov.style.display = "flex";
}
- // ---- staged submit + re-derive transitions --------------------------
+ // ---- staged submit + next-stage transitions -------------------------
function communicationPayload() {
return {
canvas: STATE.canvas,
@@ -2602,7 +2666,7 @@
// Poll session state first. It is derived from recommendations.json and
// result.json, so a recovered server can tell the existing page exactly when
- // the next re-derived stage is ready.
+ // the next once-authored stage is ready.
function pollForStage(nextStage) {
fetchJson("/api/session", "session")
.then(function (session) {
diff --git a/skills/ppt-master/scripts/confirm_ui/static/catalogs.json b/skills/ppt-master/scripts/confirm_ui/static/catalogs.json
index b5036a7d..14f2d704 100644
--- a/skills/ppt-master/scripts/confirm_ui/static/catalogs.json
+++ b/skills/ppt-master/scripts/confirm_ui/static/catalogs.json
@@ -616,9 +616,9 @@
"label_zh": "文字型 · 近读",
"label_en": "text / read-close",
"label_ja": "文書型・近距離閲覧",
- "desc_zh": "当文件读、近距离看(报告、数据密集 brief、留底材料)。正文 20px。",
- "desc_en": "Read close as a file (report, data-dense brief, leave-behind). Body 20px.",
- "desc_ja": "資料として手元で読む用途(報告書、データ密度の高いブリーフ、配布資料)。本文20px。"
+ "desc_zh": "页面脱离讲者也能独立读懂:使用完整句、短段落、图注、表格和必要细节;bullet 只用于真正并列的项目。",
+ "desc_en": "The page stands alone without a presenter: use complete sentences, short prose, captions, tables, and necessary detail; reserve bullets for genuinely parallel items.",
+ "desc_ja": "話者なしでもページ単体で理解できる構成。完全な文、短い段落、注釈、表、必要な細部を用い、箇条書きは本当に並列な項目だけに使う。"
},
{
"id": "balanced",
@@ -626,9 +626,9 @@
"label_zh": "均衡 · 商务",
"label_en": "balanced / business",
"label_ja": "バランス型・ビジネス",
- "desc_zh": "既投影也阅读(路演、业务评审)。默认档,正文 24px。",
- "desc_en": "Both projected and read (roadshow, business review). The default option, body 24px.",
- "desc_ja": "投影でも閲覧でも使う用途(ロードショー、事業レビュー)。デフォルトの選択、本文24px。"
+ "desc_zh": "页面与讲者共同承担信息:一条主结论配合简短说明、结构化证据或必要列表,适合路演和业务评审。",
+ "desc_en": "The page and presenter share the load: pair one primary claim with concise explanation, structured evidence, or a necessary list. Best for roadshows and business reviews.",
+ "desc_ja": "ページと話者で情報を分担する構成。主張を一つ置き、短い説明、構造化した根拠、または必要なリストを組み合わせる。ロードショーや事業レビュー向け。"
},
{
"id": "presentation",
@@ -636,9 +636,9 @@
"label_zh": "展示型 · 演讲",
"label_en": "presentation / keynote",
"label_ja": "プレゼン型・講演",
- "desc_zh": "投影、远距离扫一眼、内容稀疏(keynote、发布、课堂)。正文 32px。",
- "desc_en": "Projected, glanced from the back, sparse (keynote, launch, classroom). Body 32px.",
- "desc_ja": "投影用で後方からも一目で分かる、情報量を絞った構成(キーノート、発表会、講義)。本文32px。"
+ "desc_zh": "讲者与视觉承担主要表达:一页一意,以简短主张、关键词、大图或大数字为主,解释进入讲述或备注,避免段落堆积。",
+ "desc_en": "The presenter and visuals carry the explanation: use one idea per page, concise claims, keywords, large visuals, or hero numbers; move detail into speech or notes and avoid paragraph dumps.",
+ "desc_ja": "話者とビジュアルが主に説明を担う構成。1枚1メッセージで、短い主張、キーワード、大きな図や数値を中心にし、詳細は話者またはノートに置いて段落の詰め込みを避ける。"
}
]
}
diff --git a/skills/ppt-master/scripts/confirm_ui/static/style.css b/skills/ppt-master/scripts/confirm_ui/static/style.css
index 42556be3..89b330e4 100644
--- a/skills/ppt-master/scripts/confirm_ui/static/style.css
+++ b/skills/ppt-master/scripts/confirm_ui/static/style.css
@@ -480,6 +480,19 @@ textarea.text-input { resize: vertical; line-height: 1.5; }
gap: 8px;
margin: 8px 0 10px;
}
+.image-strategy-grid {
+ display: grid;
+ grid-template-columns: repeat(3, minmax(0, 1fr));
+ align-items: stretch;
+}
+.image-strategy-grid > .font-card:not(.image-strategy-manual-card) {
+ min-width: 0;
+ padding: 10px;
+}
+.image-strategy-grid > .image-strategy-manual-card,
+.image-strategy-grid > .toggle-desc {
+ grid-column: 1 / -1;
+}
.image-strategy-preview {
position: relative;
aspect-ratio: 16 / 9;
@@ -545,9 +558,6 @@ textarea.text-input { resize: vertical; line-height: 1.5; }
min-height: 34px;
padding: 6px 8px;
}
-.image-strategy-manual-preview-host > .image-strategy-previews {
- margin-bottom: 0;
-}
.font-sample-heading { font-size: 24px; font-weight: 700; line-height: 1.3; }
.font-sample-body { font-size: 14px; color: #333; margin-top: 4px; }
.custom-typography-input { margin-top: 8px; min-height: 58px; resize: vertical; }
@@ -605,7 +615,8 @@ textarea.text-input { resize: vertical; line-height: 1.5; }
/* ---- custom input ---- */
.custom-input { margin-top: 8px; }
-.custom-chip-row { margin-top: 8px; }
+.custom-chip-row,
+.standalone-chip-row { margin-top: 8px; }
/* ---- recommended chip + group labels ---- */
.chip.recommended {
diff --git a/skills/ppt-master/scripts/docs/confirm_ui.md b/skills/ppt-master/scripts/docs/confirm_ui.md
index 49cf8334..0f8709a6 100644
--- a/skills/ppt-master/scripts/docs/confirm_ui.md
+++ b/skills/ppt-master/scripts/docs/confirm_ui.md
@@ -50,7 +50,7 @@ pip install flask
## Two kinds of field
-- **Enumerable + custom** — canvas / mode / visual_style / icons. The page lists common options from `static/catalogs.json`, badges the AI's recommendation, and still offers a Custom box for edge cases.
+- **Enumerable + custom** — canvas / mode / visual_style / icons. The page lists common options from `static/catalogs.json`, badges the AI's recommendation, and still offers a Custom box for edge cases. In the icon field, concrete libraries stay together while **No icons** and **Custom** each occupy a separate row because they are distinct paths, not additional library styles.
- **Visual examples for hard-to-name choices** — the full-screen confirmation page loads real SVG page samples from `static/style_previews/` for `visual_style`, and renders real sample SVGs from `templates/icons` for `icons`. These thumbnails make style and icon-library choices visually comparable before the user locks them. Preview copy is fixed role text (big title / section title / body / points), not project content from `recommendations.json`, so users compare visual treatment rather than copywriting. These previews are a confirmation aid only: they do not add fields to `recommendations.json` or `result.json`, and they do not replace the later Step 6 live preview.
- **Image usage multi-select** — image sources are selected as one or more catalog ids: `ai` = AI-generated, `web` = Web-sourced, `provided` = User-provided, `placeholder` = Placeholder, `none` = No images. `none` is exclusive. Recommendation and result values may be a legacy single string, but new files should use an array. When several sources are recommended, write the source ids to `recommend.image_usage` and write the actual usage strategy to `image_notes`, not a custom prose value.
- **Closed enumerable** — PPT reading mode (`delivery_purpose` compatibility key), template reuse scope + adherence (conditional), formula policy / generation mode / refine spec, plus AI source only when image usage includes `ai`. These have no Custom box; out-of-catalog values snap back to the recommended option.
@@ -82,7 +82,7 @@ The page runs as a **three-stage wizard in one browser session**. `recommendatio
| `"stage3"` | production only — confirmed image-source summary, conditional AI acquisition path, formula policy, generation mode, refine spec | **Confirm** | writes `result.json` `{ stage: "final", status: "confirmed", <all fields> }`, then shuts the page down |
| *(absent)* | legacy single-pass — every section on one page | **Confirm** | single final write (`status: "confirmed"`) — backward-compatible |
-The AI launches Stage 1, derives the complete Stage-2 solution from the user's actual contract, then derives Stage-3 production mechanics from the confirmed solution. The page preserves earlier answers across transitions. `GET /api/session` is the waiting-state endpoint; `GET /api/recommendations` is `no-store`, and the server folds confirmed earlier-stage choices back into later payloads so refresh / reopen restores the user's actual values—including Stage-2 color, typography, icon, image-source, and rendering choices.
+The AI launches Stage 1, authors the complete Stage-2 solution once from the user's actual contract, then authors Stage-3 production mechanics once from the confirmed solution. An edit inside the current stage never requests another recommendation. The page preserves earlier answers across transitions. `GET /api/session` is the waiting-state endpoint; `GET /api/recommendations` is `no-store`, and the server folds confirmed earlier-stage choices back into later payloads so refresh / reopen restores the user's actual values—including Stage-2 color, typography, icon, image-source, and rendering choices.
**Stage progression guard.** Stages confirm strictly in order — a staged `recommendations.json` may only run **one** stage past the last confirmed result. A file that skips ahead (e.g. `"stage3"` while only Stage 1 is confirmed) is never rendered: `/api/session` keeps reporting `waiting_agent` with `stage_skip: true`, and `--wait` / `--wait-only` exit `2` with a directive log line naming the expected stage to rewrite. An active deck/layout template does not exempt Stage 2: template capability is an input to the scenario-fit decision, not a reason to skip it. Legacy single-pass files (no `stage`) are not staged and bypass the guard.
@@ -192,11 +192,11 @@ After Stage 2 is confirmed, overwrite it with Stage-3 production recommendations
- When confirmed Stage-2 `image_usage` includes `ai`, Stage 3 sets `recommend.image_ai_path` to one of `auto` / `api` / `host-native` / `manual`. Stage 2 never asks for the acquisition mechanism while the user is still deciding the image role.
- **Color candidates carry the user-facing core `palette`**: `background`, `secondary_bg`, `primary`, `accent`, `secondary_accent`, and `body_text`. The page renders labelled swatches and offers per-role override inputs for precise single-role edits, plus a **Custom color card with a free-text box** (parallel to the custom typography box) — the user can describe the palette in words or paste HEX values instead of filling each role; this writes `color: { "name": "custom", "custom": "<text>" }` to `result.json` for the AI to interpret. Legacy `text` is accepted as an alias for `body_text`, but new files should write `body_text`. Strategist derives secondary text, borders, state colors, and visual-style neutral tiers later when writing `design_spec.md` / `spec_lock.md`; those are not user-facing confirmation choices.
- **Candidate display text may be multilingual**: color / typography candidates can provide `name_zh` / `name_en` / `name_ja` and `note_zh` / `note_en` / `note_ja`; the page falls back to legacy `name` / `note`. Labels resolve in the page language first, then fall back across the others (a `ja` page: ja → en → zh; zh/en pages keep their zh↔en fallback and try `_ja` last), so when `lang` is `ja` always include the `_ja` variants — otherwise the candidate labels render in English.
-- **Typography candidates split CJK and Latin** for both `heading` and `body`; `css` is the fallback preview stack. Each candidate includes topic-matched sample text and `body_size` in px. The initial value follows the Stage-2 reading mode: `text` 20 · `balanced` 24 · `presentation` 32. The page writes px directly and never silently rewrites a visible value. `delivery_purpose` remains the compatibility key only.
-- **Per-role size override** (parallel to color's per-role HEX override): besides `body_size`, the page exposes **independent** editable inputs for `title` / `subtitle` / `annotation`. Each role is pre-filled **once** with a starting value — the candidate's `typography.sizes[role]` if provided, otherwise a one-time ramp suggestion (`body × ` mid-band ratio) — and then holds its own value. **There is no cross-field cascade**: changing `body_size`, `delivery_purpose`, or canvas updates only the recommended-value hint, never the role values; a re-render preserves exactly what the user sees. Each role input is labelled as px and shows an approximate pt equivalent (`1px = 0.75pt`) for orientation. The final values are written to `result.json` as `typography.sizes: { "title", "subtitle", "annotation" }` in **px** — every canvas, no pt and no `sizes_pt` provenance. Seeding `sizes` in a candidate is optional — omit it and each role gets its one-time ramp suggestion.
-- **`delivery_purpose` compatibility key / Reading mode** (enumerable, PPT only) drives the body baseline: `text` (read-close), `balanced` (business, default), `presentation`. It is surfaced in Stage 2 beside the visual system, separate from communication intent. `recommend.delivery_purpose` pre-selects one; `result.json` retains the key, while `spec_lock.md` uses canonical `consumption_mode`. Non-PPT canvases omit it.
+- **Typography candidates split CJK and Latin** for both `heading` and `body`; `css` is the fallback preview stack. Each candidate includes topic-matched sample text. Stage 2 is authored once with a reading-mode baseline of `text` 20 · `balanced` 24 · `presentation` 32 px on PPT. Font cards choose family / character and preserve the current sizing state; they do not introduce a competing size recommendation. The page writes px directly. `delivery_purpose` remains the compatibility key only.
+- **Per-role size override** (parallel to color's per-role HEX override): besides `body_size`, the page exposes editable inputs for `title` / `subtitle` / `annotation`. The browser applies one documented deterministic dependency chain: `reading mode → body baseline → unpinned role sizes` (role ramp: `body ×` the §g ratios). Changing reading mode updates the body and all unpinned roles locally; changing body updates unpinned roles locally. Editing body or a role pins that value, so later reading-mode changes do not overwrite it. Font / direction-card selection preserves all current sizes. This is a browser-only state update: it performs no fetch, asks the backend to author no new recommendations, and a re-render preserves exactly what the user sees. Each role input is labelled as px and shows an approximate pt equivalent (`1px = 0.75pt`) for orientation. The final values are written to `result.json` as `typography.sizes: { "title", "subtitle", "annotation" }` in **px** — every canvas, no pt and no `sizes_pt` provenance. Candidate `sizes` remain accepted for compatibility, but the fresh Stage-2 baseline is normalized through the same local ramp before first render.
+- **`delivery_purpose` compatibility key / Reading mode** (enumerable, PPT only) decides where meaning is carried, not merely how large type is: `text` makes pages self-contained with complete sentences, short prose, captions, tables, and necessary detail; `balanced` shares explanation between page and presenter; `presentation` uses one idea, concise claims, and visual evidence while speech / notes carry the detail. It therefore governs page grammar, granularity, density / rhythm, and note burden. Reading-mode cards intentionally show **no px value**; the typography section owns the separately visible body / role sizes and applies any local default. It is surfaced in Stage 2 beside the visual system, separate from communication intent. `recommend.delivery_purpose` pre-selects one; `result.json` retains the key, while `spec_lock.md` uses canonical `consumption_mode`. Non-PPT canvases omit it.
- **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 direction** is a rendering decision inside each `design_directions` candidate and is shown only when `image_usage` includes `ai`. Each object records `rendering` plus short `visual` / `mood` prose. The UI derives up to three rendering cards and one Custom card, displays rendering reference PNGs only, and writes no `palette` or `color` field. Final image colors come directly from the selected deck `color.palette`. Legacy `image_strategy.palette` input is accepted but ignored for color and stripped from new submissions.
+- **Generated-image direction** is a rendering decision inside each `design_directions` candidate and is shown only when `image_usage` includes `ai`. Each object records `rendering` plus short `visual` / `mood` prose. The right-side image section renders up to three recommended cards with one reference thumbnail each in a single row; Custom occupies a separate full-width row below them. The left preview simultaneously shows the currently selected generated-image rendering at a larger size, updating immediately when the user changes the right-side selection. The UI writes no `palette` or `color` field: final image colors come directly from the selected deck `color.palette`. Legacy `image_strategy.palette` input is accepted but ignored for color and stripped from new submissions.
- **`design_directions`** is the canonical Stage-2 personality spectrum. Each candidate carries localized name / note, `visual_style`, `color`, `typography`, `icons`, and conditional `image_strategy`. Author ≥3 spanning safe / shifted / bold (honest-shortfall exception applies). Selecting one applies the whole bundle; the component controls below are advanced overrides. The bundle itself is presentation-only—`result.json` stores the actual selected components, not a direction id.
- `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** Stage-1 source-treatment field. Blank means a balanced default; facts stay sourced at every level. Strategist consumes it while authoring §IX and records it in `design_spec.md §I`; it is not written to `spec_lock.md`. Beautify sends `{ "value": "keep source wording and page structure verbatim", "locked": true }`, so the UI displays it read-only and the server restores it on every staged submit. Template-fill does not use this confirmation flow and does not surface it.
@@ -240,7 +240,7 @@ The shape above is the **final** result: Stage 1 owns the communication contract
- Any option field may instead hold a **free-text custom string** (the user picked **Custom**); `color` / `typography` custom entries set `name: "custom"`. Image usage is not a custom string in new results: it is a source-id array, with free-text strategy captured in `image_notes`.
- `image_ai_path` and `image_strategy` are omitted from `result.json` unless `image_usage` includes `ai`. Both are honored downstream as confirmed choices — and the page is only a convenience surface over the **canonical chat channel**: the same choices made in chat are honored identically when no `result.json` exists. `image_ai_path` drives the Step 5 generation path (`image-generator.md` §7 — `host-native` forces the host tool even when `IMAGE_BACKEND` is set); the chosen `image_strategy` candidate is locked verbatim by Strategist h.5 (no re-pick).
-- After the user clicks the **final Confirm** (Stage 3, or single-pass), the page saves `result.json` and shuts the server down (auto-close). Stage-1 **Confirm contract & continue** and Stage-2 **Confirm solution & continue** keep the page open while it polls for the re-derived downstream stage. In the default flow, the first `--daemon --wait` returns on the stage-1 result, `--wait-only --wait-stage stage2` returns on the stage-2 result, and the final `--wait-only` returns on the final result; the AI reads each immediately — no extra chat confirmation is required. Chat confirmation remains the fallback when the page cannot be used. Either way, Step 4 ends with a `--shutdown` cleanup so a never-confirmed page cannot keep holding port 5050 ahead of the Step 6 live preview.
+- After the user clicks the **final Confirm** (Stage 3, or single-pass), the page saves `result.json` and shuts the server down (auto-close). Stage-1 **Confirm contract & continue** and Stage-2 **Confirm solution & continue** keep the page open while it polls for the once-authored downstream stage. In the default flow, the first `--daemon --wait` returns on the stage-1 result, `--wait-only --wait-stage stage2` returns on the stage-2 result, and the final `--wait-only` returns on the final result; the AI reads each immediately — no extra chat confirmation is required. Chat confirmation remains the fallback when the page cannot be used. Either way, Step 4 ends with a `--shutdown` cleanup so a never-confirmed page cannot keep holding port 5050 ahead of the Step 6 live preview.
## Scope
diff --git a/skills/ppt-master/templates/design_spec_reference.md b/skills/ppt-master/templates/design_spec_reference.md
index feb03c1c..6640aea4 100644
--- a/skills/ppt-master/templates/design_spec_reference.md
+++ b/skills/ppt-master/templates/design_spec_reference.md
@@ -17,7 +17,7 @@
| **Core Message / Ask / Action** | [The claim(s), decision request(s), or action(s) that must land; preserve their relationship when several coexist.] |
| **Delivery Context** | [Presenter-led / reader-led / hybrid / recorded; occasion, time constraint, and interaction context.] |
| **Artifact Afterlife** | [Review / approval / audit / archive / hand-off / reuse / none planned; state what the file must support after the event.] |
-| **Reading Mode** | [`text` read-close / `balanced` business / `presentation`; Confirm UI compatibility key: `delivery_purpose`, execution-lock key: `consumption_mode`. Drives per-page density, page-count recommendation, page_rhythm lean, and the body baseline (px), but does not define communication intent. See strategist.md §6.1.] |
+| **Reading Mode** | [`text` read-close / `balanced` business / `presentation`; Confirm UI compatibility key: `delivery_purpose`, execution-lock key: `consumption_mode`. Defines how meaning is divided among the page, visuals, presenter, and notes; therefore drives page grammar, granularity, density / rhythm, page-count recommendation, and note burden. The body baseline is a downstream typography default, not the definition shown to the user. See strategist.md §6.1.] |
| **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.] |
| **Design Style** | {design_style} |
| **Template Reuse Scope** | [`mirror` / `layout` / `style` — include only when Step 3 loaded a deck/layout template; omit for free design and brand-only templates. `mirror` requires a mirror-capable workspace; `style` uses the flat route.] |
@@ -103,7 +103,7 @@
**Typography direction**: [Fill in one phrase, e.g., "modern CJK sans" / "academic serif" / "brand-specific: McKinsey Bower (requires font install)"]
-> Step 4 Confirm UI: present **≥3** typography candidates (creative recommendations always offer real choice — same rule as h.5; fewer only on the honest-shortfall exception, with a stated reason), each splitting CJK + Latin for `heading` and `body` (with `css` preview stacks) and declaring `body_size` as the body baseline in **px** (the system's only unit, every canvas), in `confirm_ui/recommendations.json`; the confirmed `result.json` carries px directly — no conversion. Schema: [`scripts/docs/confirm_ui.md`](../scripts/docs/confirm_ui.md).
+> Step 4 Confirm UI: present **≥3** typography candidates (creative recommendations always offer real choice — same rule as h.5; fewer only on the honest-shortfall exception, with a stated reason), each splitting CJK + Latin for `heading` and `body` (with `css` preview stacks), in `confirm_ui/recommendations.json`. The Stage-2 reading mode supplies one shared initial `body_size` baseline in **px** (the system's only unit, every canvas); switching font / direction cards preserves the current sizing state. The confirmed `result.json` carries px directly — no conversion. Schema: [`scripts/docs/confirm_ui.md`](../scripts/docs/confirm_ui.md).
Two views on the same font decisions — fill both, keep them consistent:
@@ -136,9 +136,9 @@ Two views on the same font decisions — fill both, keep them consistent:
> **Ramp discipline, not a fixed menu.** `body` is the single anchor; every other size is a ratio of it. Each row below gives the role's allowed ratio band. **Structural roles (page title / body / subtitle / annotation / footnote) resolve to one size each and stay that size deck-wide** — pick the value once, lock it, reuse it on every page; same-role drift is what makes a deck look unprofessional. The in-band freedom to use an intermediate value without pre-declaring is for **special / feature elements** (hero number, cover / section display headline, one-off emphasis); if such a size recurs, declare it as its own slot so it too stays consistent.
> **Unit boundary (HARD rule).** Author this section in **unitless px** — the system's only unit, every canvas. There is no pt layer and no conversion: the confirmed value is already px. Never write `pt`, `px`, `em`, or any unit in `spec_lock.md` or SVG. Geometry (margins / gaps / card sizes) is px everywhere.
-> **Baseline selection**: **reading mode** (Confirm UI compatibility key `delivery_purpose`) sets the body baseline to **one fixed value** (not a range); communication intent, content density, and visual style drive page treatment / rhythm / the *other* roles, **not** the body size.
+> **Baseline selection**: after reading mode has made the information-carriage decision, the Confirm UI uses it to seed one fixed body baseline and derives unpinned role sizes locally. This is a typography default, not part of the reading-mode label or card description. Communication intent, content density, and visual style drive page treatment / rhythm / the *other* roles, **not** the body size.
-**Baseline (unitless px)**: Body font size = [fill in]. For PPT 16:9, the confirmed reading mode gives **one fixed px value, not a range**: **`text` / read-close** `20`, **`balanced` / business** `24` (default), **`presentation`** `32`. The body baseline is purely a function of reading mode—communication intent, density, and visual style drive page treatment / rhythm / the other roles, never the body size. The user may also pin individual role sizes (`title` / `subtitle` / `annotation`) directly in the Confirm UI—a confirmed per-role value (`result.json typography.sizes`) is already px and becomes the locked slot for that role; the rest derive from the ramp. For non-PPT canvases, author px from the confirmed canvas scale (see [strategist.md §g](../references/strategist.md) per-canvas table).
+**Baseline (unitless px)**: Body font size = [fill in]. For PPT 16:9, the initial typography default is **`text`** `20`, **`balanced`** `24` (default), **`presentation`** `32`. The browser applies `reading mode → body baseline → unpinned role sizes` locally without regenerating Stage 2. A user-edited body or role value is pinned; every confirmed `result.json typography.body_size` / `sizes` value is already px and becomes the locked slot verbatim. For non-PPT canvases, author px from the confirmed canvas scale (see [strategist.md §g](../references/strategist.md) per-canvas table).
| Purpose | Ratio to body | Example @ body=32 (`presentation`) | Example @ body=24 (`balanced`) | Weight |
| ------- | ------------- | --------------------------- | ------------------------- | ------ |
diff --git a/skills/ppt-master/templates/spec_lock_reference.md b/skills/ppt-master/templates/spec_lock_reference.md
index 14289bfd..178575e8 100644
--- a/skills/ppt-master/templates/spec_lock_reference.md
+++ b/skills/ppt-master/templates/spec_lock_reference.md
@@ -21,7 +21,7 @@
- artifact_afterlife: Approval record, project hand-off reference, and quarterly audit trail
- consumption_mode: balanced
-> Strategist: copy the confirmed Stage-1 prose plus Stage-2 reading mode. All keys above remain present; any Stage-1 prose value may be empty after explicit confirmation. Do not restore recommendation text into an empty value. `communication_intent` is open prose and may preserve several purposes plus priority / sequence; never replace it with one enum label. `consumption_mode` is the canonical execution name for the Confirm UI compatibility key `delivery_purpose`; use `text` / `balanced` / `presentation` on PPT canvases and omit it on non-PPT canvases. Do not copy `content_divergence` here—its effect is already authored into §IX. Executor checks this global contract against every page's `Audience move`.
+> Strategist: copy the confirmed Stage-1 prose plus Stage-2 reading mode. All keys above remain present; any Stage-1 prose value may be empty after explicit confirmation. Do not restore recommendation text into an empty value. `communication_intent` is open prose and may preserve several purposes plus priority / sequence; never replace it with one enum label. `consumption_mode` is the canonical execution name for the Confirm UI compatibility key `delivery_purpose`; use `text` / `balanced` / `presentation` on PPT canvases and omit it on non-PPT canvases. It is an execution constraint on page grammar, granularity, density / rhythm, and note burden—not a font-size label. Typography sizes remain separately locked below. Do not copy `content_divergence` here—its effect is already authored into §IX. Executor checks this global contract against every page's `Audience move`.
## mode
- mode: pyramid