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): stage the eight confirmations into three passes with visual previews
hugohe3c77f6a3a1c0b
diff --git a/skills/ppt-master/SKILL.md b/skills/ppt-master/SKILL.mdindex f8310e15..34f7b277 100644--- a/skills/ppt-master/SKILL.md+++ b/skills/ppt-master/SKILL.md@@ -339,7 +339,7 @@ Read references/strategist.md**Eight Confirmations** (full template: `templates/design_spec_reference.md`):-⛔ **BLOCKING**: present the Eight Confirmations and **wait for explicit user confirmation or modification** before outputting Design Specification & Content Outline. This is the single core confirmation gate — once the final confirmation lands, all subsequent steps proceed automatically. The default Confirm UI delivers the gate in **two tiers** (anchors → re-derive → realization; see below); the chat fallback mirrors the same two steps.+⛔ **BLOCKING**: present the Eight Confirmations and **wait for explicit user confirmation or modification** before outputting Design Specification & Content Outline. This is the single core confirmation gate — once the final confirmation lands, all subsequent steps proceed automatically. The default Confirm UI delivers the gate in **three stages** (direction → design system → images / execution; see below); the chat fallback mirrors the same staged order.1. Canvas format2. Page count range@@ -350,38 +350,43 @@ Read references/strategist.md7. Typography plan, including formula rendering policy8. Image usage approach-**Confirm UI Auto-Launch (Mandatory — default visual confirmation surface)**: by default the Eight Confirmations are presented through an interactive local page in **two tiers within one browser session** — Tier 1 confirms the *anchors*; the AI then re-derives the realization layer from the **user's actual** anchors; Tier 2 confirms that layer. Color swatches, live font previews, candidate picks; 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 Eight Confirmations are presented through an interactive local page in **three stages within one browser session** — Stage 1 confirms the direction anchors; the AI then re-derives the design-system layer from the **user's actual** anchors; Stage 2 confirms that layer; the AI then re-derives image and execution choices from the confirmed direction + design system; Stage 3 confirms the final operational layer. Color swatches, live font previews, icon samples, image-style reference previews, and candidate picks 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:-| Tier | Confirms | Driven by |+| Stage | Confirms | Driven by ||---|---|---|-| **1 — anchors** | canvas · audience + core message + `content_divergence` + `delivery_purpose` *(PPT only — omitted on non-PPT canvases)* (all §c key info) · `mode` + `visual_style` | the source + user intent |-| **2 — realization** (re-derived from Tier 1) | page count · color · typography (font + size) · icons · formula policy · image usage + generated-image style · generation mode · refine-spec toggle | the confirmed Tier 1 |+| **1 — direction anchors** | canvas · audience + core message + `content_divergence` + `delivery_purpose` *(PPT only — omitted on non-PPT canvases)* (all §c key info) · `mode` + `visual_style` | the source + user intent |+| **2 — design system** (re-derived from Stage 1) | page count · color · typography (font + size) · icons · formula policy | the confirmed Stage 1 |+| **3 — images / execution** (re-derived from Stage 1 + Stage 2) | image usage · generated-image style · AI-image generation path · generation mode · refine-spec toggle | the confirmed direction + design system |-> **Why two tiers.** Every realization field is anchored by the same few choices (`visual_style` anchors color / icon / typography / image; `delivery_purpose` sets the body size, page density, **and** the page-count recommendation). Confirming anchors first, then re-deriving, means Tier 2's candidates fit the user's *real* anchors instead of your originals — the coherence reconciliation below is done by construction on this path. Page count is a **derived** field (content volume × `delivery_purpose`), which is why it lives in Tier 2, not up front.+> **Why three stages.** Design-system fields are anchored by the same few choices (`visual_style` anchors color / icon / typography; `delivery_purpose` sets the body size, page density, **and** the page-count recommendation). Image strategy depends on both the confirmed visual direction and the confirmed color system — its palette is color behavior only, while final HEX values follow Stage 2. Confirming direction first, then design system, then image / execution choices means each downstream stage fits the user's *real* choices instead of the AI's original assumptions. Page count is a **derived** field (content volume × `delivery_purpose`), which is why it lives in Stage 2, not up front.Steps:-> ⛔ **Steps 2 → 3 → 4 are ONE uninterrupted run — do NOT yield to the user mid-flow.** When the tier-1 `--wait` (step 2) returns, the AI **immediately and autonomously** continues to step 3 (re-derive + write Tier 2) and step 4 (`--wait-only`) 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 Tier 2 you must write next — stopping here strands the page and the user must prod you in chat to finish (a bug, not the intended flow). **The tier-1 confirmation is an intermediate machine handoff, not a stopping point.** 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 tier 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** 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.)-1. **Write Tier 1** to `<project_path>/confirm_ui/recommendations.json` with `"tier": 1` and only the anchor fields. Enumerable anchors (`canvas` / `mode` / `visual_style` / `delivery_purpose`) name a recommended canonical `id` in a `recommend` block (the page lists common options from `confirm_ui/static/catalogs.json`); `visual_style` also carries the ≥3-style `visual_style_spectrum` (safe / shifted / bold — same hard rule as h.5). `audience` and `content_divergence` are plain `{ "value": "<free text>" }`. `content_divergence` is the **free-text** field shown under audience in §c — how closely to follow the source vs how freely to reshape it (blank = balanced; facts stay sourced at every level); it is consumed by Strategist when authoring `§IX`, recorded in `design_spec.md §I`, carries no page-count coupling, and is **not** written to `spec_lock.md`. Set `lang` to the page language (`zh` / `en` / `ja`); visible text matches `lang`, or provide multilingual `name_zh` / `name_en` / `name_ja` + `note_zh` / `note_en` / `note_ja` — when the user's language is Japanese, set `lang: "ja"` and always include the `_ja` variants (labels resolve in the page language first — a `ja` page falls back ja → en → zh, so missing `_ja` labels silently render in English; zh/en pages keep their zh↔en fallback and only try `_ja` last).-2. **Launch + wait for Tier 1.** Background launch; the parent returns when the page writes the tier-1 `result.json`. **Long tool timeout — 600000 ms** (the `--wait` ≈590 s budget):+1. **Write Stage 1** to `<project_path>/confirm_ui/recommendations.json` with `"tier": 1` and only the anchor fields. `tier` is the internal JSON stage selector retained for compatibility; user-facing documentation and UI call these stages. Enumerable anchors (`canvas` / `mode` / `visual_style` / `delivery_purpose`) name a recommended canonical `id` in a `recommend` block (the page lists common options from `confirm_ui/static/catalogs.json`); `visual_style` also carries the ≥3-style `visual_style_spectrum` (safe / shifted / bold — same hard rule as h.5). `audience` and `content_divergence` are plain `{ "value": "<free text>" }`. `content_divergence` is the **free-text** field shown under audience in §c — how closely to follow the source vs how freely to reshape it (blank = balanced; facts stay sourced at every level); it is consumed by Strategist when authoring `§IX`, recorded in `design_spec.md §I`, carries no page-count coupling, and is **not** written to `spec_lock.md`. Set `lang` to the page language (`zh` / `en` / `ja`); visible text matches `lang`, or provide multilingual `name_zh` / `name_en` / `name_ja` + `note_zh` / `note_en` / `note_ja` — when the user's language is Japanese, set `lang: "ja"` and always include the `_ja` variants (labels resolve in the page language first — a `ja` page falls back ja → en → zh, so missing `_ja` labels silently render in English; zh/en pages keep their zh↔en fallback and only try `_ja` last).+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):```bashpython3 ${SKILL_DIR}/scripts/confirm_ui/server.py <project_path> --daemon --wait```- Page opens at `http://localhost: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 Tier 1: it shows a "deriving…" state and polls for Tier 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** (a fresh `status: tier1-confirmed`) before dropping to the chat fallback. **On success (exit 0 with a tier-1 result), do not pause or report — go straight to step 3 in the same turn.**-3. **Re-derive Tier 2 from the confirmed anchors, then write it — immediately, same turn (the page is polling for it).** Read the tier-1 `result.json` (`status: tier1-confirmed`). Using the user's **actual** confirmed anchors (not your originals), author the realization candidates and **overwrite** `recommendations.json` with `"tier": 2`: page count (content volume × `delivery_purpose`); color, typography, and generated-image style as **generative ≥3-candidate** fields (creative recommendations always offer real choice — same rule as h.5; fewer than 3 only on the honest-shortfall exception, with a stated reason; color: core `palette` with background/secondary_bg/primary/accent/secondary_accent/body_text; typography: CJK + Latin for `heading` and `body` with `css` preview stacks + `body_size` as the body baseline in **px** (every canvas) — **one fixed value per confirmed `delivery_purpose`** (`text` 20 / `balanced` 24 / `presentation` 32), not a range; each typography candidate must include topic-matched `sample_heading` / `sample_heading_latin` / `sample_body` / `sample_body_latin` preview text, never a fixed unrelated industry sample; images: `image_strategy.candidates` rendering × palette from h.5); enumerable `icons` / `formula_policy` / `generation_mode` (recommended `id`); `image_usage` as one or more source ids (`["ai"]`, `["ai","provided"]`, `["web","placeholder"]`, or `["none"]`; `none` is exclusive). If the recommendation involves several sources, keep the source list structured in `recommend.image_usage` and write the usage rationale / page-role guidance into `image_notes` (for example, "封面和章节页用 AI 主视觉,产品页优先用户素材,行业背景页可用网络参考"). Write `image_ai_path` only when `image_usage` includes `ai`. Spot-illustration lean is **not** a candidate field here: it derives from the locked `visual_style`'s illustration propensity and is expressed only in the recommendation rationale / `image_notes`, never as a new confirmation field. The still-open page polls, renders Tier 2, and preserves the user's Tier 1 picks. Closed fields (`image_ai_path`, `formula_policy`, `generation_mode`, `refine_spec`) stay finite; open fields (`icons`, typography custom text, image notes) expose free-text controls.-4. **Wait for the final confirmation** — attach to the already-running page, do **not** relaunch (same 600000 ms budget):+ Page opens at `http://localhost: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** (a fresh `status: tier1-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 anchors, write it, then wait for the design-system handoff — immediately, same turn (the page is polling for it).** Read the stage-1 `result.json` (`status: tier1-confirmed`). Using the user's **actual** confirmed anchors (not your originals), author the design-system candidates and **overwrite** `recommendations.json` with `"tier": 2`: page count (content volume × `delivery_purpose`); color and typography as **generative ≥3-candidate** fields (creative recommendations always offer real choice; fewer than 3 only on the honest-shortfall exception, with a stated reason; color: core `palette` with background/secondary_bg/primary/accent/secondary_accent/body_text; typography: CJK + Latin for `heading` and `body` with `css` preview stacks + `body_size` as the body baseline in **px** (every canvas) — **one fixed value per confirmed `delivery_purpose`** (`text` 20 / `balanced` 24 / `presentation` 32), not a range; each typography candidate must include topic-matched `sample_heading` / `sample_heading_latin` / `sample_body` / `sample_body_latin` preview text, never a fixed unrelated industry sample); enumerable `icons` / `formula_policy` (recommended `id`). The still-open page polls, renders Stage 2, and preserves the user's Stage 1 picks. Then attach to the already-running page, do **not** relaunch:+ ```bash+ python3 ${SKILL_DIR}/scripts/confirm_ui/server.py <project_path> --wait-only --wait-stage tier2+ ```+ This returns when the page writes the tier-2 `result.json` (`status: tier2-confirmed`). On a non-zero exit, re-check `result.json` once before falling back to chat.+4. **Re-derive Stage 3 from the confirmed anchors + design system, then wait for the final confirmation.** Read the stage-2 `result.json`. Author the image and execution recommendations and **overwrite** `recommendations.json` with `"tier": 3`: `image_usage` as one or more source ids (`["ai"]`, `["ai","provided"]`, `["web","placeholder"]`, or `["none"]`; `none` is exclusive); `image_strategy.candidates` as **exactly three non-custom** rendering × palette recommendations from h.5 when `image_usage` includes `ai` (the page adds the fourth Custom card itself); enumerable `image_ai_path` / `generation_mode` and `refine_spec` (recommended `id` / boolean). If the recommendation involves several image sources, keep the source list structured in `recommend.image_usage` and write the usage rationale / page-role guidance into `image_notes` (for example, "封面和章节页用 AI 主视觉,产品页优先用户素材,行业背景页可用网络参考"). Write `image_ai_path` only when `image_usage` includes `ai`. Spot-illustration lean is **not** a candidate field here: it derives from the locked `visual_style`'s illustration propensity and is expressed only in the recommendation rationale / `image_notes`, never as a new confirmation field. Generated-image style palettes are **color behavior only**; final image colors follow the confirmed Stage-2 `color`. Custom image-strategy dimensions are handled by the built-in Custom card, are prose-only, and should not promise a gallery reference image. Then attach to the already-running page, do **not** relaunch (same 600000 ms budget):```bashpython3 ${SKILL_DIR}/scripts/confirm_ui/server.py <project_path> --wait-only```- This is the ⛔ BLOCKING completion: returns when the page writes the final `result.json` (`status: confirmed`, `stage: final`, carrying all Tier 1 + Tier 2 fields). On a non-zero exit, re-check `result.json` once. Confirmed sizes are **already px** (the system is px-only — no pt anywhere, no conversion): write `result.json` `typography.body_size` / `sizes` into `design_spec.md` / `spec_lock.md` / SVG verbatim. `generation_mode: "split"` / `refine_spec: true` are explicit user choices.+ This is the ⛔ BLOCKING completion: returns when the page writes the final `result.json` (`status: confirmed`, `stage: final`, carrying Stage 1 + Stage 2 + Stage 3 fields). On a non-zero exit, re-check `result.json` once. Confirmed sizes are **already px** (the system is px-only — no pt anywhere, no conversion): write `result.json` `typography.body_size` / `sizes` into `design_spec.md` / `spec_lock.md` / SVG verbatim. `generation_mode: "split"` / `refine_spec: true` are explicit user choices.5. **Close the confirm page (Mandatory cleanup — every path).** Shut the server down before leaving Step 4 so it cannot keep holding port 5050 (which Step 6 live preview reuses):```bashpython3 ${SKILL_DIR}/scripts/confirm_ui/server.py <project_path> --shutdown```**Idempotent and required regardless of whether Confirm was clicked**: clicking the final Confirm already shuts the page down (then a no-op); the chat-fallback path leaves it running. Run it after reading the confirmation, before Step 5.-**Always also print each tier's recommendations + URL in chat** as the always-valid fallback. **The chat fallback is two-step too**: if the page never opens or a wait times out with no fresh result, present Tier 1 in chat → get confirmation → re-derive → present Tier 2 → get confirmation → take those values. Either path converges.+**Always also print each stage's recommendations + URL in chat** as the always-valid fallback. **The chat fallback is staged too**: if the page never opens or a wait times out with no fresh result, present Stage 1 in chat → get confirmation → re-derive → present Stage 2 → get confirmation → re-derive → present Stage 3 → get confirmation → take those values. Either path converges.**Honoring the confirmation (result.json is authoritative — Mandatory)**: the confirmed values **override your own recommendations** when you write `design_spec.md` / `spec_lock.md`. A user who changed any field changed it on purpose. In particular, map `image_usage` to §VIII `Acquire Via` (its value names differ from §h options — translate). `image_usage` may be either a legacy single string or a Confirm UI multi-select array; for arrays, apply every selected source. `image_notes`, when present, is a user-authored image intent note that Strategist must honor while assigning per-page §VIII rows:@@ -398,7 +403,7 @@ 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 — chat-fallback / single-pass path).** On the **two-tier page path this is already handled** (Step 3 re-derives Tier 2 from the user's actual anchors). It still applies whenever anchors and realization are confirmed **together** — the two-step chat fallback collapsed into one bundle, or a legacy single-pass `result.json`. "Confirmed value wins" governs each field's *own* value — never recompute a value the user set (a size, canvas, or palette they edited stays verbatim). But a single-pass `result.json` can carry a changed **anchor** beside downstream fields still holding your original — now incoherent — recommendation (e.g. switched to `dark-tech` while the light palette you proposed is untouched). Before writing the spec, reconcile: when the user changed an anchor, re-derive the downstream fields the user did **not** themselves edit so they realize the new anchor; fields the user pinned stay as confirmed.+**Upstream override → re-derive untouched downstream (Mandatory — chat-fallback / single-pass path).** On the **three-stage page path this is already handled** (Step 3 re-derives Stage 2 from the user's actual anchors; Step 4 re-derives Stage 3 from the confirmed anchors + design system). It still applies whenever anchors and downstream fields are confirmed **together** — the staged chat fallback collapsed into one bundle, or a legacy single-pass `result.json`. "Confirmed value wins" governs each field's *own* value — never recompute a value the user set (a size, canvas, or palette they edited stays verbatim). But a single-pass `result.json` can carry a changed **anchor** beside downstream fields still holding your original — now incoherent — recommendation (e.g. switched to `dark-tech` while the light palette you proposed is untouched). Before writing the spec, reconcile: when the user changed an anchor, re-derive the downstream fields the user did **not** themselves edit so they realize the new anchor; fields the user pinned stay as confirmed.| Anchor the user changed | Re-derive (only the downstream fields the user left at your recommendation) ||---|---|diff --git a/skills/ppt-master/references/strategist.md b/skills/ppt-master/references/strategist.mdindex edbf05d7..d1074ad7 100644--- a/skills/ppt-master/references/strategist.md+++ b/skills/ppt-master/references/strategist.md@@ -24,14 +24,15 @@ As a top-tier AI presentation strategist, receive source documents, perform cont⛔ **BLOCKING**: After the read, present professional recommendations for the eight items below and wait for explicit user confirmation.-**Two-tier confirmation (the default Confirm UI flow; chat mirrors it).** The eight items split into a dependency order, confirmed in two passes:+**Three-stage confirmation (the default Confirm UI flow; chat mirrors it).** The eight items split into a dependency order, confirmed in three passes:-| Tier | Items | Role |+| Stage | Items | Role ||---|---|---|-| **1 — anchors** | `a` canvas · `c` key info — audience + `content_divergence` + **delivery purpose** *(PPT only)* (promoted out of `g`) · `d` mode + visual_style | confirmed first |-| **2 — realization** (re-derived from the user's *actual* Tier 1) | `b` page count · `e` color · `f` icon · `g` typography (font + size) · `h` image | derived from Tier 1 |+| **1 — direction anchors** | `a` canvas · `c` key info — audience + `content_divergence` + **delivery purpose** *(PPT only)* (promoted out of `g`) · `d` mode + visual_style | confirmed first |+| **2 — design system** (re-derived from the user's *actual* Stage 1) | `b` page count · `e` color · `f` icon · `g` typography (font + size, formula policy) | derived from Stage 1 |+| **3 — images / execution** (re-derived from the user's *actual* Stage 1 + Stage 2) | `h` image source + generated-image style · generation mode · refine-spec toggle | derived from confirmed direction + design system |-The realization items are anchored by Tier 1 — `visual_style` governs `e` / `f` / `g` / `h` (§d Layer 2), and delivery purpose sets the §g body size (one fixed value per purpose), page density, **and** the `b` page-count recommendation. So author Tier 2 *after* Tier 1 is confirmed, against the user's real choices. **Page count is derived, not an anchor** — it follows content volume × delivery purpose, which is why it is Tier 2. The launch / re-derive / wait mechanics live in [SKILL.md Step 4](../SKILL.md); the item specs below keep their `a`–`h` letters.+The design-system items are anchored by Stage 1 — `visual_style` governs `e` / `f` / `g` (§d Layer 2), and delivery purpose sets the §g body size (one fixed value per purpose), page density, **and** the `b` page-count recommendation. So author Stage 2 *after* Stage 1 is confirmed, against the user's real choices. Image strategy is anchored by both Stage 1 and Stage 2: h.5 rendering follows the locked visual direction, while h.5 palette is color behavior only and must follow the confirmed §e colors. So author Stage 3 *after* Stage 2 is confirmed. **Page count is derived, not an anchor** — it follows content volume × delivery purpose, which is why it is Stage 2. The launch / re-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.>@@ -45,13 +46,13 @@ Recommend format based on scenario (see [`canvas-formats.md`](canvas-formats.md)### b. Page Count Confirmation-**Tier-2 (derived).** Page count is not an anchor — recommend it only after the Tier-1 delivery purpose is confirmed, since the same source yields a different count by purpose. Provide a specific page count recommendation based on source document content volume **and the confirmed delivery purpose** (`text` packs denser → the same source fits in fewer pages; `presentation` is one-idea-per-page → the same source may need more) — see §6.1 Content Planning Strategy. The user's confirmed count still wins; delivery purpose governs density and per-page treatment within it.+**Stage-2 (derived).** Page count is not an anchor — recommend it only after the Stage-1 delivery purpose is confirmed, since the same source yields a different count by purpose. Provide a specific page count recommendation based on source document content volume **and the confirmed delivery purpose** (`text` packs denser → the same source fits in fewer pages; `presentation` is one-idea-per-page → the same source may need more) — see §6.1 Content Planning Strategy. The user's confirmed count still wins; delivery purpose governs density and per-page treatment within it.### c. Key Information ConfirmationConfirm target audience, usage occasion, and core message; provide initial assessment based on document nature.-**Delivery purpose** (PPT only) is confirmed here, beside audience, as part of the key information — the deck's consumption mode: `text` (read-close) / `balanced` (business, default) / `presentation`. It is a Tier-1 anchor: it sets the §g body size to one fixed value per purpose, plus the type character, page density, and the §b page-count recommendation (the size and page count re-derived in Tier 2). Recommend one (`recommend.delivery_purpose`, default `balanced`) and let the user confirm. The fixed body value per purpose lives in §g; the density / treatment side lives in §6.1 — here it is surfaced as a key-information choice, not a separate typography step.+**Delivery purpose** (PPT only) is confirmed here, beside audience, as part of the key information — the deck's consumption mode: `text` (read-close) / `balanced` (business, default) / `presentation`. It is a Stage-1 anchor: it sets the §g body size to one fixed value per purpose, plus the type character, page density, and the §b page-count recommendation (the size and page count re-derived in Stage 2). Recommend one (`recommend.delivery_purpose`, default `balanced`) and let the user confirm. The fixed body value per purpose lives in §g; the density / treatment side lives in §6.1 — here it is surfaced as a key-information choice, not a separate typography step.**Material divergence** — a **free-text** intent the user states beside audience (same content-strategy cluster): in their own words, how closely the deck should follow the source vs how freely it may reshape it. This is the user's own call — a free prose field (`content_divergence`), **not** a fixed set of options and **not** something you recommend from analyzing the source. Surface the question (in the confirm UI it is a text box under audience; in chat, ask it plainly); leave it for the user to fill. Blank = a balanced default.@@ -240,7 +241,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. (Beautify reads a source deck's pt at intake but converts to px **before** any recommendation — see [`beautify-pptx.md`](../workflows/beautify-pptx.md); pt never re-enters the contract.)-**Baseline — one fixed value per delivery purpose, not a range.** Delivery purpose is a **Tier-1 anchor confirmed in §c key information** (beside audience, not as a separate typography step — see §1 Two-tier confirmation); it is the primary driver because the same canvas reads very differently when read close vs. projected. It is a **deck-wide** axis — beyond the body baseline it also drives page density / count / rhythm; see §6.1 for that side. Here, with the purpose confirmed, it sets the body baseline to a single value:+**Baseline — one fixed value per delivery purpose, not a range.** Delivery purpose is a **Stage-1 anchor confirmed in §c key information** (beside audience, not as a separate typography step — see §1 Three-stage confirmation); it is the primary driver because the same canvas reads very differently when read close vs. projected. It is a **deck-wide** axis — beyond the body baseline it also drives page density / count / rhythm; see §6.1 for that side. Here, with the purpose confirmed, it sets the body baseline to a single value:| Delivery purpose (PPT 16:9) | Body (px) | Reads as ||---|---:|---|@@ -419,6 +420,8 @@ After the candidates, append one line:> Reference images: see references/ai-image-comparison/ for matching PNGs by name.```+**Confirm UI packaging**: when writing `recommendations.json` Stage 3, put **exactly three non-custom** generated-image recommendations in `image_strategy.candidates`. The page appends one built-in **Custom** card after those three recommendations, so do not use a `custom` candidate as a fourth option or as a slot filler in the UI payload.+**Hard rules for candidate construction**:| Rule | Behavior |@@ -792,7 +795,7 @@ Templates are starting points. The Strategist may adjust based on content and auContent-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:-**Delivery purpose drives the whole plan, not just type size.** `result.json delivery_purpose` — `text` (read-close) / `balanced` (business, default) / `presentation`, confirmed as a Tier-1 anchor (§1) — is a **deck-wide consumption mode**. It seeds the body baseline (§g) **and** governs how content is distributed:+**Delivery purpose drives the whole plan, not just type size.** `result.json delivery_purpose` — `text` (read-close) / `balanced` (business, default) / `presentation`, confirmed as a Stage-1 anchor (§1) — is a **deck-wide consumption mode**. It seeds the body baseline (§g) **and** governs how content is distributed:| Delivery purpose | Per-page density & treatment | §IX content per page | page_rhythm lean ||---|---|---|---|diff --git a/skills/ppt-master/scripts/confirm_ui/server.py b/skills/ppt-master/scripts/confirm_ui/server.pyindex c29511b7..6c10efdd 100644--- a/skills/ppt-master/scripts/confirm_ui/server.py+++ b/skills/ppt-master/scripts/confirm_ui/server.py@@ -33,6 +33,7 @@ import atexitimport jsonimport loggingimport os+import reimport signalimport subprocessimport sys@@ -75,6 +76,14 @@ RESULT_NAME = 'result.json'# Static option universe served at /api/catalogs (canvas synced live from config)._CATALOGS_PATH = Path(__file__).resolve().parent / 'static' / 'catalogs.json'+_ICON_LIBRARY_DIR = Path(__file__).resolve().parents[2] / 'templates' / 'icons'+_AI_IMAGE_COMPARISON_DIR = Path(__file__).resolve().parents[2] / 'references' / 'ai-image-comparison'+_ICON_PREVIEW_SAMPLES = {+ 'chunk-filled': ('home', 'chart-line', 'users', 'target'),+ 'tabler-filled': ('home', 'chart-dots', 'user', 'bulb'),+ 'tabler-outline': ('home', 'chart-line', 'users', 'bulb'),+ 'phosphor-duotone': ('house', 'chart-line', 'users', 'target'),+}# Shares port 5050 with the live preview server (svg_editor/server.py). The two# never run at once: confirm is Step 4 and shuts down on confirm (or idle),@@ -128,7 +137,7 @@ def _wait_for_result(def _result_stage(result_file: Path) -> Optional[str]:- """Return the ``stage`` field of result.json (``tier1`` / ``final``), or None."""+ """Return the ``stage`` field of result.json, or None."""try:data = json.loads(result_file.read_text(encoding='utf-8'))except (OSError, json.JSONDecodeError):@@ -136,18 +145,18 @@ def _result_stage(result_file: Path) -> Optional[str]:return data.get('stage') if isinstance(data, dict) else None-# Tier-1 anchors. On the Tier-2 page these sections are not rendered (they were-# confirmed in Tier 1), so their values live only in browser STATE — lost on a-# refresh. Folding them from result.json into the served Tier-2 recommendations-# lets the page re-initialize them from the user's actual choices.+# Stage-1 anchors and Stage-2 design-system choices. On later pages these sections+# are not rendered (they were already confirmed), so their values live only in+# browser STATE — lost on a refresh. Folding them from result.json into the+# served recommendations lets a refresh / reopen re-initialize from the user's+# actual choices instead of catalog defaults._ANCHOR_RECOMMEND_KEYS = ('canvas', 'mode', 'visual_style', 'delivery_purpose')_ANCHOR_VALUE_KEYS = ('audience', 'content_divergence')+_DESIGN_RECOMMEND_KEYS = ('icons', 'formula_policy')-def _merge_confirmed_anchors(data: dict, result_file: Path) -> None:- """Fold the Tier-1 anchors confirmed in result.json into a Tier-2- recommendations payload, so a refresh / reopen re-initializes them. The- confirmed value is truth — it overrides any stale recommend entry."""+def _merge_confirmed_choices(data: dict, result_file: Path) -> None:+ """Fold already-confirmed choices into later-stage recommendations."""try:res = json.loads(result_file.read_text(encoding='utf-8'))except (OSError, json.JSONDecodeError):@@ -163,42 +172,56 @@ def _merge_confirmed_anchors(data: dict, result_file: Path) -> None:for key in _ANCHOR_VALUE_KEYS:if key in res:data[key] = {'value': res.get(key) or ''}+ try:+ tier = int(data.get('tier') or 0)+ except (TypeError, ValueError):+ tier = 0+ if tier < 3:+ return+ for key in _DESIGN_RECOMMEND_KEYS:+ if res.get(key) not in (None, ''):+ recommend[key] = res[key]+ if 'page_count' in res:+ data['page_count'] = {'value': res.get('page_count') or ''}+ if isinstance(res.get('color'), dict):+ data['color'] = {'selected': 0, 'candidates': [res['color']]}+ if isinstance(res.get('typography'), dict):+ typography = {'selected': 0, 'candidates': [res['typography']]}+ if res.get('formula_policy') not in (None, ''):+ typography['formula_policy'] = {'value': res['formula_policy']}+ data['typography'] = typographydef _wait_only_for_result(result_file: Path,lock_file: Path,timeout: int,+ target_stage: str = 'final',) -> int:- """Attach to an already-running confirm server and wait for the **final**- (tier-2) result.json — the second leg of the two-tier flow. No child is- launched here: the page is still open from the first ``--wait`` launch, so- liveness is tracked via the recorded pid, not a ``proc`` handle. Only the- ``stage == 'final'`` guard is used (no mtime gate): this run's tier-1 confirm- already left result.json at stage ``tier1``, so any ``final`` is the tier-2- submit, and a mtime gate would race-miss a user who confirms before this wait.+ """Attach to an already-running confirm server and wait for a target stage.++ No child is launched here: the page is still open from the first ``--wait``+ launch, so liveness is tracked via the recorded pid, not a ``proc`` handle.+ Only the stage guard is used (no mtime gate), because intermediate submits+ may happen before this wait command is issued."""- logger.info('waiting for tier-2 browser confirmation...')+ logger.info('waiting for browser confirmation stage=%s...', target_stage)deadline = None if timeout <= 0 else time.time() + timeoutwhile True:- # `stage == 'final'` alone is the signal: this run's tier-1 confirm already- # overwrote result.json to stage 'tier1', so any 'final' here is the tier-2- # submit we are waiting for. Gating on mtime >= started_at would race-miss a- # user who confirms tier 2 before this wait is even issued.- if _result_stage(result_file) == 'final':- logger.info('tier-2 confirmation received: %s', result_file)+ if _result_stage(result_file) == target_stage:+ logger.info('confirmation stage=%s received: %s', target_stage, result_file)return 0lock = _read_lock(lock_file)pid = int((lock or {}).get('pid', 0) or 0)if not pid or not _process_alive(pid):- logger.error('confirm server is no longer running before tier 2 was confirmed')+ logger.error('confirm server is no longer running before stage=%s was confirmed', target_stage)return 1if deadline is not None and time.time() >= deadline:logger.error(- 'timed out waiting for tier-2 confirmation — the page may still '- 'be open; re-check %s before falling back to chat', result_file,+ 'timed out waiting for confirmation stage=%s — the page may still '+ 'be open; re-check %s before falling back to chat', target_stage, result_file,)return 124@@ -285,6 +308,61 @@ def _build_catalogs() -> dict:return data+def _icon_preview_svg(library: str, name: str) -> str:+ """Read a trusted sample SVG from the bundled icon templates."""+ icon_path = _ICON_LIBRARY_DIR / library / f'{name}.svg'+ raw = icon_path.read_text(encoding='utf-8')+ raw = re.sub(r'<\?xml[^>]*>\s*', '', raw)+ raw = re.sub(r'<!--.*?-->\s*', '', raw, flags=re.S)+ return raw.strip()+++def _build_icon_previews() -> dict:+ previews = {}+ for library, names in _ICON_PREVIEW_SAMPLES.items():+ items = []+ for name in names:+ try:+ items.append({'name': name, 'svg': _icon_preview_svg(library, name)})+ except OSError as exc:+ logger.warning('icon preview sample missing: %s/%s (%s)', library, name, exc)+ previews[library] = items+ return previews+++def _ai_comparison_items(kind: str) -> list[dict[str, str]]:+ manifest = _AI_IMAGE_COMPARISON_DIR / kind / '_manifest.json'+ if not manifest.exists():+ return []+ data = json.loads(manifest.read_text(encoding='utf-8'))+ items = []+ for item in data.get('items', []):+ filename = item.get('filename')+ if not isinstance(filename, str) or not filename.endswith('.png'):+ continue+ if not re.fullmatch(r'[A-Za-z0-9_.-]+\.png', filename):+ continue+ if not (_AI_IMAGE_COMPARISON_DIR / kind / filename).exists():+ continue+ item_id = Path(filename).stem+ items.append({+ 'id': item_id,+ 'label': item.get('type') or item_id,+ 'filename': filename,+ 'purpose': item.get('purpose') or '',+ 'alt_text': item.get('alt_text') or '',+ })+ return items+++def _build_ai_image_comparison() -> dict:+ return {+ 'rendering': _ai_comparison_items('rendering'),+ 'palette': _ai_comparison_items('palette'),+ 'type': _ai_comparison_items('type'),+ }++# --- app --------------------------------------------------------------------def create_app(@@ -352,6 +430,32 @@ def create_app(except (OSError, json.JSONDecodeError) as exc:return jsonify({'error': f'invalid catalogs.json: {exc}'}), 500+ @app.route('/api/icon-previews')+ def get_icon_previews():+ """Serve real sample icons from templates/icons for the icon chooser."""+ resp = jsonify(_build_icon_previews())+ resp.headers['Cache-Control'] = 'no-store'+ return resp++ @app.route('/api/ai-image-comparison')+ def get_ai_image_comparison_manifest():+ """Serve generated-image reference options from ai-image-comparison."""+ try:+ resp = jsonify(_build_ai_image_comparison())+ resp.headers['Cache-Control'] = 'no-store'+ return resp+ except (OSError, json.JSONDecodeError) as exc:+ return jsonify({'error': f'invalid ai-image-comparison manifest: {exc}'}), 500++ @app.route('/ai-image-comparison/<kind>/<filename>')+ def get_ai_image_comparison(kind: str, filename: str):+ """Serve reference images for generated-image strategy candidates."""+ if kind not in {'rendering', 'palette', 'type'}:+ return jsonify({'error': 'invalid comparison kind'}), 404+ if not re.fullmatch(r'[A-Za-z0-9_.-]+\.png', filename or ''):+ return jsonify({'error': 'invalid comparison filename'}), 404+ return send_from_directory(_AI_IMAGE_COMPARISON_DIR / kind, filename)+@app.route('/api/recommendations')def get_recommendations():"""Serve the Strategist-authored recommendations for this project."""@@ -365,14 +469,17 @@ def create_app(# Report whether a result already exists (re-open after confirm).result_file = confirm_dir / RESULT_NAMEdata['_already_confirmed'] = result_file.exists()- # Tier 2 renders only realization sections, so fold the confirmed Tier-1- # anchors from result.json back in — a refresh / reopen then re-inits- # canvas / audience / mode / visual_style / delivery_purpose from the- # user's choices instead of catalog defaults.- if data.get('tier') == 2 and result_file.exists():- _merge_confirmed_anchors(data, result_file)- # The page polls this endpoint after a tier-1 confirm until the AI- # overwrites the file with the re-derived tier-2 recommendations, so it+ # Later stages render only downstream sections, so fold earlier confirmed+ # choices from result.json back in. A refresh / reopen then re-inits from+ # the user's choices instead of catalog defaults.+ try:+ tier = int(data.get('tier') or 0)+ except (TypeError, ValueError):+ tier = 0+ if tier >= 2 and result_file.exists():+ _merge_confirmed_choices(data, result_file)+ # 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# must never be served from a cache.resp = jsonify(data)resp.headers['Cache-Control'] = 'no-store'@@ -386,12 +493,11 @@ def create_app(return jsonify({'error': 'invalid payload'}), 400confirm_dir.mkdir(parents=True, exist_ok=True)result = dict(payload)- # Two-tier flow: a tier-1 submit records the anchor choices but does NOT- # close the page (the AI re-derives tier 2, the same browser session- # renders it). Only a final submit is a full confirmation. A payload with- # no stage is a single-pass confirmation (chat-opt-out parity).+ # Staged flow: stage-1 / stage-2 submits record intermediate choices but do+ # NOT close the page. Only a final submit is a full confirmation. A+ # payload with no stage is a single-pass confirmation (chat-opt-out parity).stage = result.get('stage')- result['status'] = 'tier1-confirmed' if stage == 'tier1' else 'confirmed'+ result['status'] = f'{stage}-confirmed' if stage in {'tier1', 'tier2'} else 'confirmed'result['confirmed_at'] = time.strftime('%Y-%m-%dT%H:%M:%S')result_file = confirm_dir / RESULT_NAMEresult_file.write_text(@@ -426,9 +532,12 @@ def build_parser() -> argparse.ArgumentParser:parser.add_argument('--wait-only', action='store_true',help='Do not launch. Attach to the already-running confirm server for '- 'this project and wait for the final (tier-2) result.json. Used for '- 'the second leg of the two-tier flow after the tier-2 '- 'recommendations have been re-derived and written.',+ 'this project and wait for an already-open page to write result.json.',+ )+ parser.add_argument(+ '--wait-stage', choices=('tier2', 'final'), default='final',+ help='With --wait-only, wait for this result.json stage (default: final). '+ 'Use tier2 for the middle handoff in the three-stage flow.',)parser.add_argument('--wait-timeout', type=int, default=WAIT_TIMEOUT_DEFAULT,@@ -468,13 +577,14 @@ def main(argv: Optional[list[str]] = None) -> int:if args.shutdown:return _shutdown_existing(project_path / LOCK_FILE_NAME)- # Tier-2 wait: attach to the server already serving this project (launched by+ # Stage-2 wait: attach to the server already serving this project (launched by# the first --wait) and block until the page writes the final result.json.if args.wait_only:return _wait_only_for_result(project_path / CONFIRM_DIR_NAME / RESULT_NAME,project_path / LOCK_FILE_NAME,args.wait_timeout,+ args.wait_stage,)rec_file = project_path / CONFIRM_DIR_NAME / RECOMMENDATIONS_NAMEdiff --git a/skills/ppt-master/scripts/confirm_ui/static/app.js b/skills/ppt-master/scripts/confirm_ui/static/app.jsindex 327f4c74..1ad01fa4 100644--- a/skills/ppt-master/scripts/confirm_ui/static/app.js+++ b/skills/ppt-master/scripts/confirm_ui/static/app.js@@ -13,6 +13,10 @@en: {page_title: "PPT Master - Confirm Design",topbar_hint: "Pick or type your choices, then click Confirm — the page closes and you return to the chat.",+ stage_anchors: "Stage 1 · Direction",+ stage_design: "Stage 2 · Design system",+ stage_images: "Stage 3 · Images & execution",+ stage_realization: "Stage 2 · Design system",loading: "Loading…",load_error: "Could not load recommendations.json. The AI must write it before launch.",btn_confirm: "Confirm",@@ -51,6 +55,11 @@image_strategy_visual: "Visual",image_strategy_color: "Color",image_strategy_mood: "Mood",+ image_strategy_manual: "Custom",+ image_strategy_manual_desc: "Choose a rendering and palette manually, or use custom prose.",+ image_strategy_reference_hint: "Reference images show rendering / color-behavior only. Final AI images use the color scheme selected above.",+ image_strategy_color_follow: "Uses the color scheme selected above; the palette only controls color behavior.",+ image_strategy_no_reference: "No reference image for this custom choice.",image_usage_notes: "Additional image requirements",image_usage_notes_placeholder: "e.g. realistic handwashing scenes; avoid cartoon germs; keep product photos untouched.",image_usage_required: "Select at least one image usage option.",@@ -84,8 +93,20 @@sample_heading_latin: "Presentation Title",sample_body_cjk: "关键信息摘要",sample_body_latin: "Key message summary",- style_preview_label: "Overall impression (color + typography)",+ style_preview_label: "Overall impression (color + typography + icons)",style_preview_body: "· rough feel only, not the actual slide layout",+ no_icons: "No icons",+ preview_big_title: "Big Title",+ preview_section_title: "Section Title",+ preview_latin_title: "Section Title",+ preview_body_intro: "Body copy shows the baseline text rhythm and contrast.",+ preview_latin_body: "Body text sample for checking Latin typography.",+ preview_point_1_title: "Body content",+ preview_point_1_text: "Use this area to judge paragraph density and line spacing.",+ preview_point_2_title: "Key point",+ preview_point_2_text: "Icons are placed next to real text instead of floating alone.",+ preview_point_3_title: "Conclusion",+ preview_point_3_text: "The combination should stay readable at presentation scale.",mode_continuous_desc: "Generate the whole deck in one pass.",mode_split_desc: "Stop after the spec; resume SVG generation in a fresh window.",refine_off_desc: "Spec is written in one go; the pipeline auto-proceeds.",@@ -98,6 +119,10 @@ja: {page_title: "PPT Master - デザイン確認",topbar_hint: "各項目を選択または入力して「確定」を押してください。ページが閉じたらチャットに戻ります。",+ stage_anchors: "ステージ 1 · 方向性",+ stage_design: "ステージ 2 · デザインシステム",+ stage_images: "ステージ 3 · 画像と実行方法",+ stage_realization: "ステージ 2 · デザインシステム",loading: "読み込み中…",load_error: "recommendations.json を読み込めませんでした。起動前にAIが書き込む必要があります。",btn_confirm: "確定",@@ -136,6 +161,11 @@image_strategy_visual: "ビジュアル",image_strategy_color: "カラー",image_strategy_mood: "ムード",+ image_strategy_manual: "カスタム",+ image_strategy_manual_desc: "レンダリングとパレットを手動で選ぶか、カスタム記述を使います。",+ image_strategy_reference_hint: "参照画像はレンダリング/色の使い方だけを示します。最終AI画像の色は上で選んだ配色に従います。",+ image_strategy_color_follow: "上で選んだ配色を使用します。パレットは色の使い方だけを制御します。",+ image_strategy_no_reference: "このカスタム選択には参照画像がありません。",image_usage_notes: "画像に関する補足要件",image_usage_notes_placeholder: "例:リアルな手洗いシーンを優先、漫画調の菌のイラストは避ける、製品写真はそのまま使う。",image_usage_required: "画像の使用方法を少なくとも1つ選択してください。",@@ -169,8 +199,20 @@sample_heading_latin: "Presentation Title",sample_body_cjk: "キーメッセージの要約",sample_body_latin: "Key message summary",- style_preview_label: "全体の印象(配色 + タイポグラフィ)",+ style_preview_label: "全体の印象(配色 + タイポグラフィ + アイコン)",style_preview_body: "· 雰囲気の確認用で、実際のレイアウトではありません",+ no_icons: "アイコンなし",+ preview_big_title: "大見出し",+ preview_section_title: "章タイトル",+ preview_latin_title: "Section Title",+ preview_body_intro: "本文の基準サイズとコントラストを確認するための文です。",+ preview_latin_body: "Body text sample for checking Latin typography.",+ preview_point_1_title: "本文内容",+ preview_point_1_text: "段落密度と行間の見え方をここで確認します。",+ preview_point_2_title: "要点説明",+ preview_point_2_text: "アイコンは単独ではなく、実際の文章の横に配置します。",+ preview_point_3_title: "結論・提案",+ preview_point_3_text: "投影時にも読みやすい組み合わせかを判断します。",mode_continuous_desc: "デッキ全体を一気に生成します。",mode_split_desc: "設計仕様の作成後に停止し、別ウィンドウでSVG生成を再開します。",refine_off_desc: "設計仕様を一度で書き上げ、パイプラインは自動で進みます。",@@ -183,11 +225,15 @@zh: {page_title: "确认设计方案",topbar_hint: "选择或自定义各项后点「确认」;页面会关闭,请回到聊天窗口。",+ stage_anchors: "第一阶段 · 方向确认",+ stage_design: "第二阶段 · 设计系统",+ stage_images: "第三阶段 · 图片与执行方式",+ stage_realization: "第二阶段 · 设计系统",loading: "加载中…",load_error: "无法加载推荐文件,需在启动前写入。",btn_confirm: "确认",btn_next: "下一步 →",- deriving: "正在据你的选择生成下游选项…",+ deriving: "正在根据你的选择生成下游选项…",already_confirmed: "已确认过一次,重新提交会覆盖之前的选择。",confirmed_title: "✓ 已确认",confirmed_hint: "选择已保存,可关闭此页并回到聊天窗口。",@@ -221,6 +267,11 @@image_strategy_visual: "视觉",image_strategy_color: "色彩",image_strategy_mood: "情绪",+ image_strategy_manual: "自定义",+ image_strategy_manual_desc: "手动选择渲染风格和图像调色,也可以使用自定义描述。",+ image_strategy_reference_hint: "参考图只展示渲染风格 / 用色行为;最终 AI 图片颜色跟随上方色彩方案。",+ image_strategy_color_follow: "使用上方已选色彩方案;图像调色只控制用色比例和行为。",+ image_strategy_no_reference: "自定义选择没有参考图。",image_usage_notes: "图片补充要求",image_usage_notes_placeholder: "例如:优先真实洗手场景;不要卡通病菌;产品照片保持原样。",image_usage_required: "请至少选择一种图片使用方式。",@@ -254,8 +305,20 @@sample_heading_latin: "Presentation Title",sample_body_cjk: "关键信息摘要",sample_body_latin: "Key message summary",- style_preview_label: "整体形象(配色 + 字体)",+ style_preview_label: "整体形象(配色 + 字体 + 图标)",style_preview_body: "· 仅大致形象,非实际版式",+ no_icons: "无图标",+ preview_big_title: "大标题",+ preview_section_title: "章节标题",+ preview_latin_title: "Section Title",+ preview_body_intro: "正文内容用于判断基础字号、行距和颜色对比。",+ preview_latin_body: "Body text sample for checking Latin typography.",+ preview_point_1_title: "正文内容",+ preview_point_1_text: "这里展示普通段落的密度和阅读节奏。",+ preview_point_2_title: "要点说明",+ preview_point_2_text: "图标和文字放在一起,判断真实使用效果。",+ preview_point_3_title: "结论建议",+ preview_point_3_text: "组合效果需要在演示场景下保持清晰可读。",mode_continuous_desc: "一次性连续生成整份演示文稿。",mode_split_desc: "写完设计规范后停止,另开窗口继续生成页面。",refine_off_desc: "设计规范一次写完,流程自动继续。",@@ -286,6 +349,46 @@// Fallback stays LANG-relative: zh/en users never see Japanese labels,// ja pages fall back ja → en → zh.var LANG_FALLBACK = { zh: ["zh", "en", "ja"], en: ["en", "zh", "ja"], ja: ["ja", "en", "zh"] };+ var IMAGE_COMPARISON_LABELS = {+ rendering: {+ "vector-illustration": { zh: "矢量插画", en: "Vector illustration", ja: "ベクターイラスト" },+ flat: { zh: "扁平插画", en: "Flat illustration", ja: "フラットイラスト" },+ "3d-isometric": { zh: "3D 等距", en: "3D isometric", ja: "3Dアイソメトリック" },+ "digital-dashboard": { zh: "数字仪表盘", en: "Digital dashboard", ja: "デジタルダッシュボード" },+ "corporate-photo": { zh: "企业摄影", en: "Corporate photo", ja: "企業写真" },+ blueprint: { zh: "蓝图线稿", en: "Blueprint", ja: "ブループリント" },+ editorial: { zh: "编辑杂志", en: "Editorial", ja: "エディトリアル" },+ "sketch-notes": { zh: "手绘笔记", en: "Sketch notes", ja: "スケッチノート" },+ "ink-notes": { zh: "墨线笔记", en: "Ink notes", ja: "インクノート" },+ chalkboard: { zh: "粉笔黑板", en: "Chalkboard", ja: "チョークボード" },+ watercolor: { zh: "水彩", en: "Watercolor", ja: "水彩" },+ "warm-scene": { zh: "暖调场景", en: "Warm scene", ja: "暖色シーン" },+ "screen-print": { zh: "丝网印刷", en: "Screen print", ja: "スクリーンプリント" },+ "fantasy-animation": { zh: "幻想动画", en: "Fantasy animation", ja: "ファンタジーアニメ" },+ "pixel-art": { zh: "像素艺术", en: "Pixel art", ja: "ピクセルアート" },+ nature: { zh: "自然有机", en: "Nature", ja: "自然・オーガニック" },+ "minimalist-swiss": { zh: "瑞士极简", en: "Minimalist Swiss", ja: "スイスミニマル" },+ glassmorphism: { zh: "玻璃拟态", en: "Glassmorphism", ja: "グラスモーフィズム" },+ "vintage-poster": { zh: "复古海报", en: "Vintage poster", ja: "ヴィンテージポスター" },+ "paper-cut": { zh: "剪纸拼贴", en: "Paper cut", ja: "ペーパーカット" }+ },+ palette: {+ "cool-corporate": { zh: "冷静企业色", en: "Cool corporate", ja: "クール企業色" },+ "warm-earth": { zh: "暖土色", en: "Warm earth", ja: "ウォームアース" },+ "tech-neon": { zh: "科技霓虹", en: "Tech neon", ja: "テックネオン" },+ "editorial-classic": { zh: "经典编辑色", en: "Editorial classic", ja: "エディトリアルクラシック" },+ macaron: { zh: "马卡龙", en: "Macaron", ja: "マカロン" },+ "mono-ink": { zh: "单色墨线", en: "Mono ink", ja: "モノインク" },+ "vivid-launch": { zh: "高饱和发布", en: "Vivid launch", ja: "ビビッドローンチ" },+ "dark-cinematic": { zh: "暗色电影感", en: "Dark cinematic", ja: "ダークシネマティック" },+ duotone: { zh: "双色调", en: "Duotone", ja: "デュオトーン" },+ "nature-organic": { zh: "自然有机色", en: "Nature organic", ja: "自然オーガニック色" },+ "jewel-tone": { zh: "宝石色", en: "Jewel tone", ja: "ジュエルトーン" },+ "frost-ice": { zh: "霜冰浅色", en: "Frost ice", ja: "フロストアイス" },+ "sunset-gradient": { zh: "日落渐变", en: "Sunset gradient", ja: "サンセットグラデーション" },+ "earthy-dusty": { zh: "尘土大地色", en: "Earthy dusty", ja: "ダスティアース" }+ }+ };function localized(obj, base) {if (!obj) return "";@@ -320,6 +423,28 @@return localized(group, "group");}+ function humanizeId(value) {+ return String(value || "")+ .replace(/[_-]+/g, " ")+ .replace(/\b[a-z]/g, function (match) { return match.toUpperCase(); });+ }++ function langMappedLabel(kind, id) {+ if (!id) return "";+ if (id === "custom") return t("custom");+ var entry = IMAGE_COMPARISON_LABELS[kind] && IMAGE_COMPARISON_LABELS[kind][id];+ if (!entry) return "";+ var order = LANG_FALLBACK[LANG] || LANG_FALLBACK.en;+ for (var i = 0; i < order.length; i += 1) {+ if (entry[order[i]]) return entry[order[i]];+ }+ return entry.en || "";+ }++ function comparisonValueLabel(kind, id) {+ return langMappedLabel(kind, id) || humanizeId(id);+ }+function applyStaticTranslations() {document.documentElement.setAttribute("lang", LANG === "zh" ? "zh-CN" : (LANG === "ja" ? "ja" : "en"));document.querySelectorAll("[data-i18n]").forEach(function (node) {@@ -344,6 +469,8 @@// ---- state -----------------------------------------------------------var CAT = null; // catalogs.json — finite option universevar REC = null; // recommendations.json — AI picks + candidates+ var ICON_PREVIEWS = {}; // /api/icon-previews — real SVG samples from templates/icons+ var AI_IMAGE_COMPARISON = {}; // /api/ai-image-comparison — reference PNG optionsvar STATE = {};var REC_ALIASES = {icons: {@@ -368,9 +495,157 @@return node;}- // Section numbers run 1..N within the tier currently rendered; the counter is+ function previewNode(kind, id) {+ var node = el("div", "option-preview option-preview-" + kind);+ node.setAttribute("aria-hidden", "true");+ if (kind === "visual_style") {+ appendVisualStyleImage(node, id);+ return node;+ }+ var markup = kind === "icons" ? iconStylePreview(id) : "";+ if (!markup) return null;+ node.innerHTML = markup;+ return node;+ }++ function visualStylePreviewSrc(id) {+ return "/static/style_previews/" + encodeURIComponent(id || "") + ".svg";+ }++ function appendVisualStyleImage(parent, id) {+ var img = document.createElement("img");+ img.alt = "";+ img.loading = "lazy";+ img.src = visualStylePreviewSrc(id);+ img.onerror = function () {+ parent.innerHTML = visualStylePreview(id);+ };+ parent.appendChild(img);+ }++ function escapeHtml(value) {+ return String(value == null ? "" : value)+ .replace(/&/g, "&")+ .replace(/</g, "<")+ .replace(/>/g, ">")+ .replace(/"/g, """);+ }++ function visualStylePreview(id) {+ var label = escapeHtml(humanizeId(id) || t("sub_visual"));+ var fallback = escapeHtml(t("error_retry"));+ return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">' ++ '<rect width="1280" height="720" fill="#F8FAFC"/>' ++ '<path d="M0 160H1280M0 360H1280M0 560H1280M220 0V720M640 0V720M1060 0V720" stroke="#E2E8F0" stroke-width="2"/>' ++ '<rect x="116" y="96" width="1048" height="528" rx="28" fill="#FFFFFF" stroke="#CBD5E1" stroke-width="3"/>' ++ '<rect x="164" y="148" width="360" height="34" rx="17" fill="#111827"/>' ++ '<rect x="164" y="228" width="520" height="20" rx="10" fill="#CBD5E1"/>' ++ '<rect x="164" y="274" width="440" height="20" rx="10" fill="#E2E8F0"/>' ++ '<rect x="760" y="188" width="292" height="236" rx="22" fill="#EFF6FF" stroke="#BFDBFE" stroke-width="3"/>' ++ '<path d="M808 378L874 308L942 348L1012 258" fill="none" stroke="#2563EB" stroke-width="18" stroke-linecap="round" stroke-linejoin="round"/>' ++ '<circle cx="1012" cy="258" r="22" fill="#0F172A"/>' ++ '<rect x="164" y="464" width="220" height="24" rx="12" fill="#94A3B8"/>' ++ '<text x="164" y="548" fill="#475569" font-family="Arial, sans-serif" font-size="34">' + label + '</text>' ++ '<text x="164" y="594" fill="#94A3B8" font-family="Arial, sans-serif" font-size="24">' + fallback + '</text>' ++ '</svg>';+ }++ function iconStylePreview(id) {+ var common = 'xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 100"';+ var samples = ICON_PREVIEWS[id] || [];+ if (samples.length) {+ var sample = samples[0] || {};+ return '<div class="real-icon-preview real-icon-preview-' + escapeHtml(id) + '">' ++ '<div class="real-icon-sample"><div class="real-icon-mark">' ++ (sample.svg || "") ++ '</div><span class="real-icon-label">' + escapeHtml(sample.name || "") + '</span></div>' ++ '</div>';+ }+ if (id === "emoji") return '<svg ' + common + '><rect width="160" height="100" rx="10" fill="#FFF7ED"/><text x="80" y="60" text-anchor="middle" font-size="34">📊</text></svg>';+ if (id === "none") return '<svg ' + common + '><rect width="160" height="100" rx="10" fill="#FFFFFF"/><rect x="22" y="20" width="116" height="9" rx="4.5" fill="#111827"/><rect x="22" y="42" width="90" height="6" rx="3" fill="#CBD5E1"/><rect x="22" y="56" width="104" height="6" rx="3" fill="#CBD5E1"/><rect x="22" y="70" width="70" height="6" rx="3" fill="#CBD5E1"/><path d="M118 42l24 24M142 42l-24 24" stroke="#94A3B8" stroke-width="3" stroke-linecap="round"/></svg>';+ return "";+ }++ function comparisonImageUrl(kind, id) {+ var value = String(id || "").trim();+ if (!value || value === "custom") return "";+ if (!/^[A-Za-z0-9_.-]+$/.test(value)) return "";+ return "/ai-image-comparison/" + kind + "/" + encodeURIComponent(value) + ".png";+ }++ function appendImageStrategyPreviews(card, candidate) {+ if (candidate.rendering === "custom" || candidate.palette === "custom") return;+ var previews = [+ [t("image_strategy_rendering"), comparisonImageUrl("rendering", candidate.rendering)],+ [t("image_strategy_palette"), comparisonImageUrl("palette", candidate.palette)]+ ].filter(function (item) { return item[1]; });+ if (!previews.length) return;+ var row = el("div", "image-strategy-previews");+ previews.forEach(function (item) {+ var frame = el("div", "image-strategy-preview");+ var img = document.createElement("img");+ img.alt = item[0];+ img.loading = "lazy";+ img.src = item[1];+ img.onerror = function () {+ frame.remove();+ if (!row.childElementCount) row.remove();+ };+ frame.appendChild(img);+ frame.appendChild(el("span", "image-strategy-preview-label", item[0]));+ row.appendChild(frame);+ });+ card.appendChild(row);+ return row;+ }++ function comparisonItems(kind) {+ return (AI_IMAGE_COMPARISON && AI_IMAGE_COMPARISON[kind]) || [];+ }++ function comparisonItem(kind, id) {+ var items = comparisonItems(kind);+ for (var i = 0; i < items.length; i += 1) {+ if (items[i] && items[i].id === id) return items[i];+ }+ return null;+ }++ function comparisonLabel(item, kind) {+ return item ? (comparisonValueLabel(kind, item.id) || item.label || item.id || "") : "";+ }++ function firstComparisonId(kind, fallback) {+ var items = comparisonItems(kind);+ if (fallback === "custom") return fallback;+ if (fallback && comparisonItem(kind, fallback)) return fallback;+ return items.length ? items[0].id : (fallback || "");+ }++ function comparisonSelect(kind, value) {+ var select = el("select", "text-input image-strategy-select");+ comparisonItems(kind).forEach(function (item) {+ var option = document.createElement("option");+ option.value = item.id;+ option.textContent = comparisonLabel(item, kind);+ select.appendChild(option);+ });+ var customOption = document.createElement("option");+ customOption.value = "custom";+ customOption.textContent = t("custom");+ select.appendChild(customOption);+ select.value = firstComparisonId(kind, value);+ return select;+ }++ function imageStrategyColorSummary(candidate) {+ var behavior = localized(candidate || {}, "color");+ return t("image_strategy_color_follow") + (behavior ? " " + behavior : "");+ }++ // Section numbers run 1..N within the stage currently rendered; the counter is// reset at the top of renderForTier. The legacy `num` arg is ignored so each- // tier numbers its own sections cleanly (tier 2 is not a continuation of 1).+ // stage numbers its own sections cleanly (stage 2 is not a continuation of 1).var _secCounter = 0;function section(num, titleKey, noteText) {_secCounter += 1;@@ -479,6 +754,13 @@var desc = optionDesc(o);var spec = specById[o.id];var chip = el("div", "chip");+ var preview = previewNode(opts2.preview, o.id);+ if (preview) {+ chip.classList.add("chip-with-preview");+ chip.classList.add("chip-preview-" + opts2.preview);+ chip.appendChild(preview);+ }+ var copy = el("div", "chip-copy");if (o.viewbox) {label = label + (o.dim ? " · " + o.dim : "");} else {@@ -486,15 +768,16 @@if (desc) label += (LANG === "zh" || LANG === "ja" ? ":" : " — ") + desc;if (spec && spec.note) label += " · " + spec.note;}- chip.appendChild(el("span", "chip-text", label));+ copy.appendChild(el("span", "chip-text", label));if (spec) {// spectrum pick: badge shows its temperament tag, not the generic ★chip.classList.add("recommended");- chip.appendChild(el("span", "rec-badge", "★ " + (spec.tag || t("recommended"))));+ copy.appendChild(el("span", "rec-badge", "★ " + (spec.tag || t("recommended"))));} else if (!spectrum && o.id === recommendedId) {chip.classList.add("recommended");- chip.appendChild(el("span", "rec-badge", "★ " + t("recommended")));+ copy.appendChild(el("span", "rec-badge", "★ " + t("recommended")));}+ chip.appendChild(copy);if (!isCustom && o.id === cur) chip.classList.add("selected");chip.addEventListener("click", function () {deselect();@@ -642,6 +925,12 @@return spec.candidates || spec.options || [];}+ function imageStrategyRecommendationCandidates() {+ return imageStrategyCandidates().filter(function (candidate) {+ return candidate && candidate.rendering !== "custom" && candidate.palette !== "custom";+ }).slice(0, 3);+ }+function usesCustomImagePlanValue(value) {var ids = (CAT.image_usage || []).map(function (item) { return item.id; });if (Array.isArray(value)) return false;@@ -649,7 +938,7 @@}function customImagePlanHasAiSignal() {- return imageStrategyCandidates().length > 0 || !!recId("image_ai_path");+ return imageStrategyRecommendationCandidates().length > 0 || !!recId("image_ai_path");}function needsGeneratedImagesForUsage(value) {@@ -680,7 +969,7 @@function imageStrategySelectedIndex() {var spec = imageStrategySpec();var idx = spec.selected || 0;- return Math.min(idx, Math.max(imageStrategyCandidates().length - 1, 0));+ return Math.min(idx, Math.max(imageStrategyRecommendationCandidates().length - 1, 0));}// ---- section renderers ----------------------------------------------@@ -724,8 +1013,8 @@sec.appendChild(subDiv);// Delivery purpose (PPT only) lives in the §c key-information confirmation,// beside audience — it is part of "who / how this deck is consumed". It is a- // Tier-1 anchor: its value sets the body size (one fixed value per purpose), page- // density, and the re-derived Tier-2 page-count recommendation. Non-PPT+ // Stage-1 anchor: its value sets the body size (one fixed value per purpose), page+ // density, and the re-derived Stage-2 page-count recommendation. Non-PPT// canvases scale the body by canvas height instead, so the axis does not apply.if (isPptCanvas(STATE.canvas)) {var purposeField = el("div", "subfield");@@ -747,7 +1036,7 @@var sub2 = el("div", "subfield");sub2.appendChild(el("div", "subfield-label", t("sub_visual")));enumField(sub2, CAT.visual_styles, recOrFirst("visual_style", CAT.visual_styles),- function () { return STATE.visual_style; }, function (v) { STATE.visual_style = v; },+ function () { return STATE.visual_style; }, function (v) { STATE.visual_style = v; refreshDirectionPreview(); },{ allowCustom: true, spectrum: REC && REC.visual_style_spectrum });sec.appendChild(sub2);host.appendChild(sec);@@ -773,6 +1062,10 @@// 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 the Stage-1 visual-style preview mounts.+ var refreshDirectionPreview = function () {};+ // Replaced when the Stage-3 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 () {};@@ -997,7 +1290,8 @@function renderIcons(host) {var sec = section(6, "sec_icons");enumField(sec, CAT.icons, recOrFirst("icons", CAT.icons),- function () { return STATE.icons; }, function (v) { STATE.icons = v; }, { allowCustom: true });+ function () { return STATE.icons; }, function (v) { STATE.icons = v; refreshStylePreview(); },+ { allowCustom: true });host.appendChild(sec);}@@ -1007,35 +1301,15 @@return primary + ", " + fallback;}- function sampleCandidate(role, script) {- var sample = (REC && REC.sample_text) || (REC && REC.samples) || {};- var isHeading = role === "heading";- var isLatin = script === "latin";- var keys = isHeading- ? (isLatin ? ["heading_latin", "sample_heading_latin", "title_latin", "title_en"] : ["heading_cjk", "sample_heading", "sample_heading_cjk", "title_zh", "title"])- : (isLatin ? ["body_latin", "sample_body_latin", "summary_latin", "summary_en"] : ["body_cjk", "sample_body", "sample_body_cjk", "summary_zh", "summary"]);- for (var i = 0; i < keys.length; i += 1) {- if (sample[keys[i]]) return sample[keys[i]];- if (REC && REC[keys[i]]) {- if (typeof REC[keys[i]] === "object" && REC[keys[i]].value) return REC[keys[i]].value;- if (typeof REC[keys[i]] === "string") return REC[keys[i]];- }- }- return "";- }-- function sampleText(role, script, explicit) {- if (explicit) return explicit;- var fromRec = sampleCandidate(role, script);- if (fromRec) return fromRec;- if (role === "heading") return t(script === "latin" ? "sample_heading_latin" : "sample_heading_cjk");- return t(script === "latin" ? "sample_body_latin" : "sample_body_cjk");+ function sampleText(role, script) {+ if (role === "heading") return t(script === "latin" ? "preview_latin_title" : "preview_big_title");+ return t(script === "latin" ? "preview_latin_body" : "preview_body_intro");}function fontSample(box, slot, css, role) {var line = el("div", "font-sample-line");- var cjk = el("span", "fs-cjk", sampleText(role, "cjk", slot.sample_cjk));- var lat = el("span", "fs-latin", sampleText(role, "latin", slot.sample_latin));+ var cjk = el("span", "fs-cjk", sampleText(role, "cjk"));+ var lat = el("span", "fs-latin", sampleText(role, "latin"));var cjkStack = previewFontStack(slot.cjk, css);var latinStack = previewFontStack(slot.latin, css);if (cjkStack) cjk.style.fontFamily = cjkStack;@@ -1172,8 +1446,8 @@refreshBodySizeHint();sizeField.appendChild(sizeRow);- // Delivery purpose is a Tier-1 anchor confirmed inside renderAudience (§c) —- // it is set before this Tier-2 section exists, so its value drives the+ // Delivery purpose is a Stage-1 anchor confirmed inside renderAudience (§c) —+ // it is set before this Stage-2 section exists, so its value drives the// body-size hint here via STATE.delivery_purpose (preserved across the// single-session transition). The control itself no longer lives here.sec.appendChild(sizeField);@@ -1239,8 +1513,8 @@}}- // Combined color + typography preview — not a ninth confirmation, just a- // live "overall impression" of the two style choices made above. Kept+ // Combined color + typography + icon preview — not a ninth confirmation, just a+ // live "overall impression" of the style choices made above. Kept// deliberately abstract (a style chip, not a slide layout); page layout// preview is the live-preview server's job (Step 6).function renderStylePreview(host) {@@ -1266,17 +1540,17 @@bodyWrap.appendChild(bodyCjk); bodyWrap.appendChild(bodyLat);bodyRow.appendChild(accentBar); bodyRow.appendChild(bodyWrap);textcol.appendChild(title); textcol.appendChild(bodyRow);+ var content = el("div", "sp-content");var chip = el("div", "sp-chip");var chipDot = el("span", "sp-chip-dot");var chipLabel = el("span", "sp-chip-label");chip.appendChild(chipDot); chip.appendChild(chipLabel);- card.appendChild(textcol); card.appendChild(chip);+ card.appendChild(textcol); card.appendChild(content); card.appendChild(chip);wrap.appendChild(card);host.appendChild(wrap);- // Pin the strip just under the sticky topbar so it stays visible while- // the user scrolls through the color / icon / typography sections.- var topbar = document.getElementById("topbar");- if (topbar) wrap.style.top = topbar.offsetHeight + "px";+ // The strip is mounted inside the top bar on Stage 2, so it stays visible+ // while the center form scrolls.+ wrap.style.top = "0px";function paint() {var pal = (STATE.color && STATE.color.palette) || {};@@ -1297,21 +1571,23 @@var bodyLatStack = previewFontStack(body.latin, body.css);card.style.background = bg;- titleCjk.textContent = sampleText("heading", "cjk", head.sample_cjk);- titleLat.textContent = sampleText("heading", "latin", head.sample_latin);+ titleCjk.textContent = t("preview_big_title");+ titleLat.textContent = t("preview_section_title");title.style.color = pri;title.style.fontSize = Math.round(bodyPx * 1.7) + "px";titleCjk.style.fontFamily = headStack || "";titleLat.style.fontFamily = headLatStack || "";// CJK and Latin previewed with their own stacks (mirrors the title// and the per-card font samples) so each script's font is visible.- bodyCjk.textContent = sampleText("body", "cjk", body.sample_cjk);- bodyLat.textContent = sampleText("body", "latin", body.sample_latin);+ bodyCjk.textContent = t("preview_body_intro");+ bodyLat.textContent = "";bodyWrap.style.color = txt;bodyWrap.style.fontSize = bodyPx + "px";bodyCjk.style.fontFamily = bodyStack || "";bodyLat.style.fontFamily = bodyLatStack || "";accentBar.style.background = acc;+ content.style.color = txt;+ content.innerHTML = stylePreviewContentMarkup(STATE.icons);chip.style.background = sbg;chipDot.style.background = sacc;chipLabel.textContent = t("role_secondary_bg");@@ -1321,6 +1597,115 @@paint();}+ function renderDirectionPreview(host) {+ var wrap = el("div", "style-preview direction-preview");+ var label = el("div", "style-preview-label");+ label.appendChild(el("span", "spl-title", t("sub_visual")));+ label.appendChild(el("span", "spl-note", t("style_preview_body")));+ wrap.appendChild(label);+ var card = el("div", "style-preview-card direction-preview-card");+ var visual = el("div", "direction-preview-visual");+ var copy = el("div", "direction-preview-copy");+ var title = el("div", "direction-preview-title");+ var desc = el("div", "direction-preview-desc");+ copy.appendChild(title);+ copy.appendChild(desc);+ card.appendChild(visual);+ card.appendChild(copy);+ wrap.appendChild(card);+ host.appendChild(wrap);+ function paint() {+ var option = findCatalogOption(CAT.visual_styles, STATE.visual_style);+ visual.innerHTML = "";+ appendVisualStyleImage(visual, STATE.visual_style);+ title.textContent = option ? optionLabel(option) : (STATE.visual_style || "");+ desc.textContent = option ? optionDesc(option) : "";+ }+ refreshDirectionPreview = paint;+ paint();+ }++ function renderImageStrategyPreview(host) {+ var wrap = el("div", "style-preview image-strategy-left-preview");+ var label = el("div", "style-preview-label");+ label.appendChild(el("span", "spl-title", t("image_strategy")));+ label.appendChild(el("span", "spl-note", t("image_strategy_reference_hint")));+ wrap.appendChild(label);+ var card = el("div", "style-preview-card image-strategy-preview-card");+ var visual = el("div", "image-strategy-preview-visual");+ var copy = el("div", "direction-preview-copy");+ var title = el("div", "direction-preview-title");+ var desc = el("div", "direction-preview-desc");+ copy.appendChild(title);+ copy.appendChild(desc);+ card.appendChild(visual);+ card.appendChild(copy);+ wrap.appendChild(card);+ host.appendChild(wrap);+ function paint() {+ var show = needsGeneratedImagesForUsage(STATE.image_usage);+ wrap.hidden = !show;+ if (!show) return;+ var strategy = STATE.image_strategy || {};+ visual.innerHTML = "";+ var row = appendImageStrategyPreviews(visual, strategy);+ visual.classList.toggle("image-strategy-preview-empty", !row);+ 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.palette) parts.push(t("image_strategy_palette") + ": " + comparisonValueLabel("palette", strategy.palette));+ desc.textContent = parts.join(" · ") || t("image_strategy_reference_hint");+ }+ refreshImageStrategyPreview = paint;+ paint();+ }++ function findCatalogOption(list, id) {+ var flat = [];+ (list || []).forEach(function (item) {+ if (item && item.items) flat = flat.concat(item.items);+ else flat.push(item);+ });+ for (var i = 0; i < flat.length; i += 1) {+ if (flat[i] && flat[i].id === id) return flat[i];+ }+ return null;+ }++ function stylePreviewRows() {+ return [+ [t("preview_point_1_title"), t("preview_point_1_text")],+ [t("preview_point_2_title"), t("preview_point_2_text")],+ [t("preview_point_3_title"), t("preview_point_3_text")]+ ];+ }++ function stylePreviewContentMarkup(iconId) {+ var rows = stylePreviewRows();+ var icons = stylePreviewIconSamples(iconId, rows.length);+ return rows.map(function (row, idx) {+ return '<div class="sp-content-row">' ++ '<span class="sp-content-icon">' + icons[idx] + '</span>' ++ '<span class="sp-content-copy"><b>' + escapeHtml(row[0]) + '</b><small>' + escapeHtml(row[1]) + '</small></span>' ++ '</div>';+ }).join("");+ }++ function stylePreviewIconSamples(iconId, count) {+ if (iconId === "emoji") return ["📊", "💡", "✅"].slice(0, count).map(function (x) {+ return '<span class="sp-icon-emoji">' + x + '</span>';+ });+ if (iconId === "none") return new Array(count).fill('<span class="sp-icon-none-dot"></span>');+ var samples = ICON_PREVIEWS[iconId] || [];+ var out = [];+ for (var i = 0; i < count; i += 1) {+ var sample = samples[i % Math.max(samples.length, 1)];+ out.push(sample ? '<span class="sp-icon-mark" title="' + escapeHtml(sample.name || "") + '">' + (sample.svg || "") + '</span>' : '<span class="sp-icon-none-dot"></span>');+ }+ return out;+ }+function renderImages(host) {var sec = section(8, "sec_images");var usageChips = el("div", "chips");@@ -1335,8 +1720,9 @@sub.appendChild(el("div", "subfield-label", t("image_ai_path")));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 strategyCands = imageStrategyCandidates();+ var strategyCands = imageStrategyRecommendationCandidates();function needsGeneratedImages() {return needsGeneratedImagesForUsage(STATE.image_usage);}@@ -1344,39 +1730,88 @@var needsAiPath = needsGeneratedImages();sub.style.display = needsAiPath ? "block" : "none";strategySub.style.display = needsAiPath ? "block" : "none";+ refreshImageStrategyPreview();}- function selectImageStrategy(idx) {+ function markStrategyCard(selectedCard) {+ strategyGrid.querySelectorAll(".font-card").forEach(function (card) {+ card.classList.toggle("selected", card === selectedCard);+ });+ }+ function selectImageStrategy(idx, selectedCard) {var c = strategyCands[idx] || {};STATE.image_strategy = {name: localized(c, "name") || c.name || "",rendering: c.rendering || "",palette: c.palette || "",visual: localized(c, "visual") || "",- color: localized(c, "color") || "",+ color: imageStrategyColorSummary(c),mood: localized(c, "mood") || ""};- strategyGrid.querySelectorAll(".font-card").forEach(function (card, i) { card.classList.toggle("selected", i === idx); });+ markStrategyCard(selectedCard || strategyGrid.querySelector('[data-strategy-index="' + idx + '"]'));+ refreshImageStrategyPreview();}strategyCands.forEach(function (c, idx) {var card = el("div", "font-card");+ card.setAttribute("data-strategy-index", String(idx));var top = el("div", "font-card-head");top.appendChild(el("span", "font-card-name", localized(c, "name") || (t("option_prefix") + " " + (idx + 1))));var meta = [];- if (c.rendering) meta.push(t("image_strategy_rendering") + ":" + c.rendering);- if (c.palette) meta.push(t("image_strategy_palette") + ":" + c.palette);+ if (c.rendering) meta.push(t("image_strategy_rendering") + ":" + comparisonValueLabel("rendering", c.rendering));+ if (c.palette) meta.push(t("image_strategy_palette") + ":" + comparisonValueLabel("palette", c.palette));if (meta.length) top.appendChild(el("span", "font-card-meta", meta.join(" · ")));card.appendChild(top);[["image_strategy_visual", localized(c, "visual")],- ["image_strategy_color", localized(c, "color")],+ ["image_strategy_color", imageStrategyColorSummary(c)],["image_strategy_mood", localized(c, "mood")]].forEach(function (row) {if (row[1]) card.appendChild(el("div", "color-note", t(row[0]) + ":" + row[1]));});- card.addEventListener("click", function () { selectImageStrategy(idx); });+ card.addEventListener("click", function () { selectImageStrategy(idx, card); });strategyGrid.appendChild(card);});if (!strategyCands.length) strategyGrid.appendChild(el("div", "toggle-desc", t("image_strategy_empty")));+ 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")));+ manualTop.appendChild(el("span", "font-card-meta", t("image_strategy_manual_desc")));+ manualCard.appendChild(manualTop);+ var manualControls = el("div", "image-strategy-manual-controls");+ var manualRendering = firstComparisonId("rendering", (STATE.image_strategy && STATE.image_strategy.rendering) || (strategyCands[0] && strategyCands[0].rendering));+ var manualPalette = firstComparisonId("palette", (STATE.image_strategy && STATE.image_strategy.palette) || (strategyCands[0] && strategyCands[0].palette));+ var renderingWrap = el("label", "image-strategy-select-wrap");+ renderingWrap.appendChild(el("span", "image-strategy-select-label", t("image_strategy_rendering")));+ var renderingSelect = comparisonSelect("rendering", manualRendering);+ renderingWrap.appendChild(renderingSelect);+ var paletteWrap = el("label", "image-strategy-select-wrap");+ paletteWrap.appendChild(el("span", "image-strategy-select-label", t("image_strategy_palette")));+ var paletteSelect = comparisonSelect("palette", manualPalette);+ paletteWrap.appendChild(paletteSelect);+ manualControls.appendChild(renderingWrap);+ manualControls.appendChild(paletteWrap);+ manualCard.appendChild(manualControls);+ function selectManualImageStrategy() {+ var rendering = renderingSelect.value;+ var palette = paletteSelect.value;+ STATE.image_strategy = {+ name: t("image_strategy_manual"),+ rendering: rendering,+ palette: palette,+ visual: comparisonLabel(comparisonItem("rendering", rendering), "rendering") || comparisonValueLabel("rendering", rendering),+ color: t("image_strategy_color_follow"),+ mood: t("image_strategy_manual_desc")+ };+ markStrategyCard(manualCard);+ refreshImageStrategyPreview();+ }+ [renderingSelect, paletteSelect].forEach(function (select) {+ select.addEventListener("click", function (e) { e.stopPropagation(); });+ select.addEventListener("change", function () {+ selectManualImageStrategy();+ });+ });+ manualCard.addEventListener("click", selectManualImageStrategy);+ strategyGrid.appendChild(manualCard);strategySub.appendChild(strategyGrid);var recommendedIds = selectedImageUsageIds(recValue("image_usage"));if (!recommendedIds.length) recommendedIds = [defaultImageUsageId()];@@ -1422,6 +1857,7 @@sec.appendChild(sub);sec.appendChild(strategySub);if (strategyCands.length) selectImageStrategy(imageStrategySelectedIndex());+ else selectManualImageStrategy();refreshUsageChips();host.appendChild(sec);}@@ -1450,44 +1886,67 @@host.appendChild(sec);}- // Stage of the two-tier confirm flow: 1 = anchors, 2 = re-derived realization,+ // Stage of the staged confirm flow:+ // 1 = direction anchors, 2 = design system, 3 = images/execution,// "all" = legacy single-pass (recommendations.json carried no `tier`).var STAGE = 1;+ function stageTitle(tier) {+ if (tier === 1) return t("stage_anchors");+ if (tier === 2) return t("stage_design");+ if (tier === 3) return t("stage_images");+ return t("page_title");+ }+function renderForTier(tier) {var host = document.getElementById("sections");host.innerHTML = "";_secCounter = 0;+ var heading = document.querySelector("#topbar .topbar-titles h1");+ if (heading) heading.textContent = stageTitle(tier);// Detach the previous preview's repaint closures before the sections// re-render: color/typography auto-select would otherwise call them and// write to now-detached nodes until renderStylePreview remounts them.refreshStylePreview = function () {};+ refreshDirectionPreview = function () {};+ refreshImageStrategyPreview = function () {};refreshBodySizeHint = function () {};refreshSizeInputs = function () {};+ var previewHost = document.getElementById("topbar-preview");+ if (previewHost) previewHost.innerHTML = "";if (tier === 1) {- // Anchors — decided first; Tier 2 is re-derived from these.+ if (previewHost) renderDirectionPreview(previewHost);+ // Direction anchors — Stage 2 is re-derived from these.// Delivery purpose rides inside renderAudience (§c key info).renderCanvas(host);renderAudience(host);renderStyle(host);- } else {- // Tier 2 (realization) or single-pass: page count + visual treatment.- // Single-pass also shows the anchors up front on the same page.- if (tier === "all") {- renderCanvas(host);- renderAudience(host);- renderStyle(host);- }+ } else if (tier === 2) {+ if (previewHost) renderStylePreview(previewHost);renderPages(host);- // Group the preview with the three sections it reflects so its sticky- // scope ends when typography scrolls past — it does not linger over the- // image / mode / refine sections below.+ // Group the three sections reflected by the fixed preview strip.var styleGroup = el("div", "style-group");- renderStylePreview(styleGroup);renderColor(styleGroup);renderIcons(styleGroup);renderTypography(styleGroup);host.appendChild(styleGroup);+ } else if (tier === 3) {+ if (previewHost) renderImageStrategyPreview(previewHost);+ renderImages(host);+ renderMode(host);+ renderRefine(host);+ } else {+ // Legacy single-pass: show every section on one page.+ if (previewHost) renderStylePreview(previewHost);+ renderCanvas(host);+ renderAudience(host);+ renderStyle(host);+ renderPages(host);+ var legacyStyleGroup = el("div", "style-group");+ renderColor(legacyStyleGroup);+ renderIcons(legacyStyleGroup);+ renderTypography(legacyStyleGroup);+ host.appendChild(legacyStyleGroup);renderImages(host);renderMode(host);renderRefine(host);@@ -1500,8 +1959,8 @@function updateActionBar(tier) {var btn = document.getElementById("btn-confirm");btn.disabled = false;- // Tier 1 advances to the re-derived Tier 2; Tier 2 / single-pass confirm.- btn.textContent = (tier === 1) ? t("btn_next") : t("btn_confirm");+ // Stage 1/2 advance; Stage 3 / single-pass confirm.+ btn.textContent = (tier === 1 || tier === 2) ? t("btn_next") : t("btn_confirm");}// ---- state init (once) ----------------------------------------------@@ -1525,9 +1984,9 @@STATE.delivery_purpose = recId("delivery_purpose") || "balanced";}- // Tier-2 fields are (re-)read from the recommendations. At boot they come from- // whatever recommendations.json carried; after a tier-1 confirm enterTier2()- // calls this again with the re-derived candidates. Tier-1 STATE is preserved+ // Stage-2 fields are (re-)read from the recommendations. At boot they come from+ // whatever recommendations.json carried; after a stage-1 confirm enterTier()+ // calls this again with the re-derived candidates. Stage-1 STATE is preserved// across the single-session transition — this never resets the anchors.function initTier2State() {STATE.page_count = (REC.page_count && REC.page_count.value != null) ? String(REC.page_count.value) : (STATE.page_count || "");@@ -1551,6 +2010,15 @@};STATE.formula_policy = pick("formula_policy", CAT.formula_policy);+ // Guarantee a body baseline even when a candidate omitted body_size, on+ // any canvas (PPT → px default by purpose, non-PPT → px from canvas height),+ // so role sizes never derive from an empty anchor.+ if (STATE.typography && !STATE.typography.body_size) {+ STATE.typography.body_size = defaultBodySizeForCanvas(STATE.canvas, STATE.delivery_purpose);+ }+ }++ function initTier3State() {var rawImageUsage = recValue("image_usage");STATE.image_usage = selectedImageUsageIds(rawImageUsage);if (!STATE.image_usage.length) {@@ -1561,17 +2029,12 @@STATE.generation_mode = pick("generation_mode", CAT.generation_mode);STATE.refine_spec = !!((REC.refine_spec && REC.refine_spec.value) || (REC.recommend && REC.recommend.refine_spec));- // Guarantee a body baseline even when a candidate omitted body_size, on- // any canvas (PPT → px default by purpose, non-PPT → px from canvas height),- // so role sizes never derive from an empty anchor.- if (STATE.typography && !STATE.typography.body_size) {- STATE.typography.body_size = defaultBodySizeForCanvas(STATE.canvas, STATE.delivery_purpose);- }}function initState() {initTier1State();initTier2State();+ initTier3State();}// ---- confirm + close -------------------------------------------------@@ -1582,11 +2045,8 @@ov.style.display = "flex";}- // ---- tier-1 submit + re-derive transition ---------------------------- function submitTier1() {- var btn = document.getElementById("btn-confirm");- // Anchors only — the page stays open; the AI re-derives Tier 2 and the- // same browser session renders it (STATE is preserved across the poll).+ // ---- staged submit + re-derive transitions --------------------------+ function tier1Payload() {var payload = {stage: "tier1",canvas: STATE.canvas,@@ -1596,28 +2056,50 @@visual_style: STATE.visual_style};// Delivery purpose is PPT-only and rendered only on PPT canvases (§c).- // On a non-PPT canvas the control is never shown, so STATE holds an unseen- // default — do NOT write it as a confirmed anchor, or it would steer the- // Tier-2 page-count / density re-derivation behind the user's back. (The- // final submit drops it for non-PPT the same way, via normalizeTypographyForSubmit.)- if (isPptCanvas(STATE.canvas)) {- payload.delivery_purpose = STATE.delivery_purpose;- }+ if (isPptCanvas(STATE.canvas)) payload.delivery_purpose = STATE.delivery_purpose;+ return payload;+ }++ function tier2Payload() {+ var payload = {+ stage: "tier2",+ canvas: STATE.canvas,+ audience: STATE.audience,+ content_divergence: STATE.content_divergence,+ mode: STATE.mode,+ visual_style: STATE.visual_style,+ page_count: STATE.page_count,+ color: STATE.color,+ icons: STATE.icons,+ typography: STATE.typography,+ formula_policy: STATE.formula_policy+ };+ if (isPptCanvas(STATE.canvas)) payload.delivery_purpose = STATE.delivery_purpose;+ normalizeTypographyForSubmit(payload);+ return payload;+ }++ function submitStage(payload, nextTier) {+ var btn = document.getElementById("btn-confirm");btn.disabled = true;fetch("/api/confirm", {method: "POST",headers: { "Content-Type": "application/json" },body: JSON.stringify(payload)}).then(function (r) {- if (!r.ok) throw new Error("tier1 failed");+ if (!r.ok) throw new Error("stage submit failed");showDeriving();- pollForTier2();+ pollForTier(nextTier);}).catch(function () {btn.disabled = false;document.getElementById("confirm-status").textContent = t("error_retry");});}+ function submitTier1() { submitStage(tier1Payload(), 2); }++ function submitTier2() { submitStage(tier2Payload(), 3); }+function showDeriving() {document.getElementById("sections").style.display = "none";document.getElementById("actionbar").style.display = "none";@@ -1627,26 +2109,30 @@}// Poll the recommendations endpoint (no-store) until the AI overwrites it with- // the re-derived Tier 2, then render Tier 2 in the same session.- function pollForTier2() {+ // the next re-derived tier, then render it in the same session.+ function pollForTier(nextTier) {fetch("/api/recommendations", { cache: "no-store" }).then(function (r) { if (!r.ok) throw new Error("poll failed"); return r.json(); }).then(function (data) {- if (data && data.tier === 2) { enterTier2(data); }- else { setTimeout(pollForTier2, 1200); }- })- .catch(function () { setTimeout(pollForTier2, 1500); });+ if (data && String(data.tier) === String(nextTier)) { enterTier(data, nextTier); }+ else { setTimeout(function () { pollForTier(nextTier); }, 1200); }+ }).catch(function (err) {+ var l = document.getElementById("loading");+ if (l) l.textContent = t("load_error") + " " + (err && err.message ? err.message : "");+ setTimeout(function () { pollForTier(nextTier); }, 1500);+ });}- function enterTier2(data) {+ function enterTier(data, tier) {REC = data;- initTier2State(); // re-read realization fields; tier-1 STATE preserved- STAGE = 2;+ if (tier === 2) initTier2State();+ if (tier === 3) initTier3State();+ STAGE = tier;document.getElementById("loading").style.display = "none";document.getElementById("sections").style.display = "block";document.getElementById("actionbar").style.display = "flex";document.getElementById("confirm-status").textContent = "";- renderForTier(2);+ renderForTier(tier);}function confirm() {@@ -1702,6 +2188,18 @@.catch(function () { return fetch("/static/catalogs.json").then(function (r) { return r.json(); }); });}+ function loadIconPreviews() {+ return fetch("/api/icon-previews")+ .then(function (r) { if (r.ok) return r.json(); throw new Error("no icon preview api"); })+ .catch(function () { return {}; });+ }++ function loadAiImageComparison() {+ return fetch("/api/ai-image-comparison")+ .then(function (r) { if (r.ok) return r.json(); throw new Error("no ai image comparison api"); })+ .catch(function () { return {}; });+ }+function boot() {applyStaticTranslations();var toggleBtn = document.getElementById("btn-lang-toggle");@@ -1779,23 +2277,30 @@if (!langMenu.hidden) setMenuOpen(false);});document.getElementById("btn-confirm").addEventListener("click", function () {- if (STAGE === 1) { submitTier1(); } else { confirm(); }+ if (STAGE === 1) submitTier1();+ else if (STAGE === 2) submitTier2();+ else confirm();});Promise.all([loadCatalogs(),- fetch("/api/recommendations").then(function (r) { if (!r.ok) throw new Error("load failed"); return r.json(); })+ fetch("/api/recommendations").then(function (r) { if (!r.ok) throw new Error("load failed"); return r.json(); }),+ loadIconPreviews(),+ loadAiImageComparison()]).then(function (res) {CAT = res[0];REC = res[1];+ ICON_PREVIEWS = res[2] || {};+ AI_IMAGE_COMPARISON = res[3] || {};if (REC.lang === "zh" || REC.lang === "en" || REC.lang === "ja") {var hasStored = false;try { hasStored = !!window.localStorage.getItem("ppt_lang"); } catch (e) { /* ignore */ }if (!hasStored) { LANG = REC.lang; applyStaticTranslations(); refreshLangToggle(toggleBtn); }}initState();- // tier 1 / 2 from the recommendations; absent → legacy single-pass.- STAGE = (REC.tier === 1) ? 1 : (REC.tier === 2 ? 2 : "all");+ // tier 1 / 2 / 3 from the recommendations; absent → legacy single-pass.+ STAGE = (String(REC.tier) === "1") ? 1 :+ (String(REC.tier) === "2" ? 2 : (String(REC.tier) === "3" ? 3 : "all"));document.getElementById("loading").style.display = "none";document.getElementById("sections").style.display = "block";document.getElementById("actionbar").style.display = "flex";diff --git a/skills/ppt-master/scripts/confirm_ui/static/index.html b/skills/ppt-master/scripts/confirm_ui/static/index.htmlindex 6c3fd4fa..d442e88b 100644--- a/skills/ppt-master/scripts/confirm_ui/static/index.html+++ b/skills/ppt-master/scripts/confirm_ui/static/index.html@@ -7,33 +7,47 @@<link rel="stylesheet" href="/static/style.css"></head><body>- <header id="topbar">- <div id="topbar-inner">- <div class="topbar-titles">- <h1 data-i18n="page_title">PPT Master - Confirm Design</h1>- <p id="topbar-hint" data-i18n="topbar_hint">After confirming, return to the chat and say “done”.</p>+ <div id="app">+ <aside id="preview-panel" aria-label="Design preview">+ <div class="brand-block">+ <div class="brand-mark">PM</div>+ <div>+ <div class="panel-kicker">PPT Master</div>+ <div class="panel-title" data-i18n="page_title">PPT Master - Confirm Design</div>+ </div></div>- <div class="lang-select">- <button id="btn-lang-toggle" class="lang-select-btn" type="button" title="Switch language" aria-haspopup="listbox" aria-expanded="false"><span id="lang-current"></span><span class="lang-caret" aria-hidden="true">▾</span></button>- <ul id="lang-menu" class="lang-menu" role="listbox" hidden>- <li role="option" tabindex="0" aria-selected="false" data-lang="zh">中文</li>- <li role="option" tabindex="0" aria-selected="false" data-lang="en">English</li>- <li role="option" tabindex="0" aria-selected="false" data-lang="ja">日本語</li>- </ul>- </div>- </div>- </header>+ <div id="topbar-preview"></div>+ </aside>- <main id="form">- <div id="loading" data-i18n="loading">Loading recommendations…</div>- <div id="error" style="display:none;"></div>- <div id="sections" style="display:none;"></div>- </main>+ <section id="control-panel">+ <header id="topbar">+ <div id="topbar-inner">+ <div class="topbar-titles">+ <h1 data-i18n="page_title">PPT Master - Confirm Design</h1>+ <p id="topbar-hint" data-i18n="topbar_hint">After confirming, return to the chat and say “done”.</p>+ </div>+ <div class="lang-select">+ <button id="btn-lang-toggle" class="lang-select-btn" type="button" title="Switch language" aria-haspopup="listbox" aria-expanded="false"><span id="lang-current"></span><span class="lang-caret" aria-hidden="true">▾</span></button>+ <ul id="lang-menu" class="lang-menu" role="listbox" hidden>+ <li role="option" tabindex="0" aria-selected="false" data-lang="zh">中文</li>+ <li role="option" tabindex="0" aria-selected="false" data-lang="en">English</li>+ <li role="option" tabindex="0" aria-selected="false" data-lang="ja">日本語</li>+ </ul>+ </div>+ </div>+ </header>- <footer id="actionbar" style="display:none;">- <span id="confirm-status"></span>- <button id="btn-confirm" data-i18n="btn_confirm">Confirm</button>- </footer>+ <main id="form">+ <div id="loading" data-i18n="loading">Loading recommendations…</div>+ <div id="error" style="display:none;"></div>+ <div id="sections" style="display:none;"></div>+ </main>+ <footer id="actionbar" style="display:none;">+ <span id="confirm-status"></span>+ <button id="btn-confirm" data-i18n="btn_confirm">Confirm</button>+ </footer>+ </section>+ </div><div id="confirmed-overlay" style="display:none;"><div class="cf-card">diff --git a/skills/ppt-master/scripts/confirm_ui/static/style.css b/skills/ppt-master/scripts/confirm_ui/static/style.cssindex 966a734c..e82c65c7 100644--- a/skills/ppt-master/scripts/confirm_ui/static/style.css+++ b/skills/ppt-master/scripts/confirm_ui/static/style.css@@ -1,38 +1,107 @@:root {- --bg: #f4f5f7;+ --bg: #12121f;--card: #ffffff;--ink: #1d2430;--muted: #6b7280;--line: #e3e6ea;- --accent: #2f6df0;- --accent-soft: #eaf1fe;- --radius: 12px;- --shadow: 0 1px 3px rgba(20, 30, 50, 0.08), 0 4px 16px rgba(20, 30, 50, 0.05);+ --accent: #4a9eff;+ --accent-soft: #eaf4ff;+ --shell: #16162a;+ --shell-2: #12121f;+ --shell-line: #2a2a4a;+ --shell-ink: #e0e0e0;+ --shell-muted: #8a8aaa;+ --shell-hover: #2a2a4a;+ --warning: #f5c542;+ --radius: 10px;+ --shadow: 0 4px 24px rgba(0, 0, 0, 0.22);}* { box-sizing: border-box; }+html { height: 100%; }+body {margin: 0;- background: var(--bg);+ height: 100%;+ background: #1a1a2e;color: var(--ink);font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei","PingFang SC", "Hiragino Sans GB", sans-serif;line-height: 1.5;- padding-bottom: 88px;+ overflow: hidden;+}++/* ---- fullscreen shell ---- */+#app {+ display: flex;+ width: 100vw;+ height: 100vh;+ min-width: 0;+}+#preview-panel {+ flex: 0 0 clamp(360px, 38vw, 560px);+ min-width: 0;+ background: var(--shell);+ color: var(--shell-ink);+ border-right: 1px solid var(--shell-line);+ display: flex;+ flex-direction: column;+ gap: 18px;+ padding: 0;+ overflow: hidden;+}+#control-panel {+ flex: 1;+ min-width: 0;+ height: 100vh;+ display: flex;+ flex-direction: column;+ background: var(--shell-2);+}+.brand-block {+ display: flex;+ align-items: center;+ gap: 12px;+ padding: 14px 16px;+ border-bottom: 1px solid var(--shell-line);+ flex: none;+}+.brand-mark {+ flex: none;+ width: 38px;+ height: 38px;+ border-radius: 9px;+ display: grid;+ place-items: center;+ background: #1e3a5f;+ color: #fff;+ font-weight: 760;+ letter-spacing: .03em;+}+.panel-kicker {+ font-size: 11px;+ letter-spacing: .08em;+ text-transform: uppercase;+ color: var(--shell-muted);+}+.panel-title {+ margin-top: 2px;+ font-size: 14px;+ font-weight: 650;+ line-height: 1.35;}/* ---- top bar ---- */#topbar {- position: sticky;- top: 0;+ flex: none;z-index: 10;- background: var(--card);- border-bottom: 1px solid var(--line);+ background: var(--shell);+ border-bottom: 1px solid var(--shell-line);}#topbar-inner {- max-width: 880px;- margin: 0 auto;+ max-width: none;+ margin: 0;padding: 16px 24px;display: flex;align-items: center;@@ -40,24 +109,80 @@ body {gap: 16px;}.topbar-titles h1 { margin: 0; font-size: 18px; font-weight: 650; }-.topbar-titles p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }+.topbar-titles h1 { color: var(--shell-ink); }+.topbar-titles p { margin: 2px 0 0; font-size: 13px; color: var(--shell-muted); }+#topbar-preview:empty { display: none; }+#topbar-preview {+ flex: 1;+ min-height: 0;+ overflow-y: auto;+ padding: 0 16px 16px;+}+#topbar-preview .style-preview {+ position: static;+ background: transparent;+ padding: 0;+ margin: 0;+ color: var(--ink);+}+#topbar-preview .style-preview-label {+ margin-bottom: 10px;+}+#topbar-preview .style-preview-card {+ box-shadow: none;+ flex-direction: column;+ align-items: stretch;+ gap: 14px;+ padding: 18px;+ min-height: 260px;+ background: #ffffff;+}+#topbar-preview .spl-title {+ color: var(--shell-ink);+}+#topbar-preview .spl-note {+ color: var(--shell-muted);+}+#topbar-preview .sp-title,+#topbar-preview .sp-body-wrap {+ white-space: normal;+}+#topbar-preview .sp-chip {+ align-self: stretch;+ justify-content: flex-start;+}+#topbar-preview .sp-icon-mark {+ width: 34px;+ height: 34px;+}+#topbar-preview .sp-icon-mark svg {+ width: 30px;+ height: 30px;+ max-width: 30px;+ max-height: 30px;+}-.lang-select { position: relative; flex: none; }+.lang-select {+ position: relative;+ flex: none;+}.lang-select-btn {display: flex;align-items: center;+ justify-content: space-between;gap: 6px;height: 38px;+ min-width: 118px;padding: 0 12px;- border-radius: 10px;- border: 1px solid var(--line);- background: var(--card);- color: var(--ink);+ border-radius: 4px;+ border: 1px solid #3a3a5a;+ background: #1e1e3a;+ color: #c0c0d8;font-size: 14px;cursor: pointer;}-.lang-select-btn:hover { background: var(--bg); }-.lang-caret { font-size: 10px; color: var(--muted); }+.lang-select-btn:hover { color: #ffffff; background: var(--shell-hover); border-color: #5a5a7a; }+.lang-caret { font-size: 10px; color: #8a8aa8; }.lang-menu {position: absolute;right: 0;@@ -66,26 +191,37 @@ body {padding: 4px;list-style: none;min-width: 110px;- background: var(--card);- border: 1px solid var(--line);- border-radius: 10px;- box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);+ background: #1e1e3a;+ border: 1px solid #3a3a5a;+ border-radius: 6px;+ box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);z-index: 60;}.lang-menu li {padding: 8px 12px;border-radius: 6px;font-size: 14px;- color: var(--ink);+ color: #c0c0d8;cursor: pointer;}.lang-menu li:hover,-.lang-menu li:focus { background: var(--bg); }-.lang-menu li.selected { font-weight: 650; }+.lang-menu li:focus { background: var(--shell-hover); color: #ffffff; }+.lang-menu li.selected { color: #ffffff; font-weight: 650; }/* ---- form ---- */-#form { max-width: 880px; margin: 0 auto; padding: 24px; }-#loading, #error { padding: 40px 0; text-align: center; color: var(--muted); }+#form {+ flex: 1;+ min-height: 0;+ max-width: none;+ margin: 0;+ padding: 24px 32px;+ overflow-y: auto;+}+#sections {+ max-width: 1220px;+ margin: 0 auto;+}+#loading, #error { padding: 40px 0; text-align: center; color: var(--shell-muted); }#error { color: #b42318; }.section {@@ -108,7 +244,7 @@ body {width: 22px; height: 22px;border-radius: 50%;background: var(--accent-soft);- color: var(--accent);+ color: #1e4fa3;font-size: 12px; font-weight: 700;display: grid; place-items: center;}@@ -137,6 +273,92 @@ body {font-weight: 600;}.chip-text { min-width: 0; }+.chip-copy { min-width: 0; }+.chip-with-preview {+ width: 230px;+ padding: 9px;+ display: flex;+ flex-direction: column;+ gap: 8px;+ align-items: stretch;+ text-align: left;+}+.chip-with-preview .chip-text {+ display: block;+ font-size: 12.8px;+}+.chip-with-preview .rec-badge {+ display: inline-block;+ margin: 4px 0 0;+}+.chip-preview-visual_style {+ width: 320px;+}+.option-preview {+ width: 100%;+ aspect-ratio: 16 / 9;+ border: 1px solid var(--line);+ border-radius: 7px;+ overflow: hidden;+ background: #fff;+}+.option-preview svg {+ display: block;+ width: 100%;+ height: 100%;+}+.option-preview img {+ display: block;+ width: 100%;+ height: 100%;+ object-fit: cover;+}+.option-preview-icons { aspect-ratio: 16 / 7; }+.real-icon-preview {+ height: 100%;+ display: flex;+ align-items: center;+ justify-content: center;+ padding: 8px;+ background: #fff;+ color: #2563eb;+}+.real-icon-sample {+ min-width: 0;+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ gap: 6px;+}+.real-icon-mark {+ width: 38px;+ height: 38px;+ display: grid;+ place-items: center;+ color: currentColor;+}+.real-icon-mark svg {+ display: block;+ width: 34px;+ height: 34px;+ max-width: 34px;+ max-height: 34px;+ overflow: visible;+}+.real-icon-preview-chunk-filled .real-icon-mark svg {+ shape-rendering: crispEdges;+}+.real-icon-label {+ max-width: 100%;+ color: #64748b;+ font-size: 9px;+ line-height: 1.1;+ text-align: center;+ white-space: nowrap;+ overflow: hidden;+ text-overflow: ellipsis;+}.text-input, .num-input {width: 100%;@@ -200,6 +422,80 @@ body {}.font-card-name { font-size: 13.5px; font-weight: 600; }.font-card-meta { font-size: 11.5px; color: var(--muted); }+.image-strategy-previews {+ display: grid;+ grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));+ gap: 8px;+ margin: 8px 0 10px;+}+.image-strategy-preview {+ position: relative;+ aspect-ratio: 16 / 9;+ border: 1px solid var(--line);+ border-radius: 8px;+ overflow: hidden;+ background: #fff;+}+.image-strategy-preview img {+ display: block;+ width: 100%;+ height: 100%;+ object-fit: cover;+}+.image-strategy-preview-label {+ position: absolute;+ left: 6px;+ bottom: 6px;+ padding: 2px 6px;+ border-radius: 999px;+ background: rgba(17, 24, 39, 0.74);+ color: #fff;+ font-size: 10.5px;+ line-height: 1.4;+}+.image-strategy-preview-card {+ flex-direction: column;+ align-items: stretch;+}+.image-strategy-preview-visual {+ width: 100%;+}+.image-strategy-preview-visual .image-strategy-previews {+ grid-template-columns: 1fr;+ margin: 0 0 12px;+}+.image-strategy-preview-visual .image-strategy-preview {+ min-height: 150px;+}+.image-strategy-preview-empty {+ padding: 14px 0 4px;+}+.image-strategy-manual-card {+ background: var(--card);+}+.image-strategy-manual-controls {+ display: grid;+ grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));+ gap: 10px;+ margin: 10px 0;+}+.image-strategy-select-wrap {+ display: flex;+ flex-direction: column;+ gap: 5px;+}+.image-strategy-select-label {+ font-size: 11.5px;+ color: var(--muted);+}+.image-strategy-select {+ width: 100%;+ 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; }@@ -217,31 +513,34 @@ body {/* ---- action bar ---- */#actionbar {- position: fixed;- bottom: 0; left: 0; right: 0;- background: var(--card);- border-top: 1px solid var(--line);+ flex: none;+ background: var(--shell);+ border-top: 1px solid var(--shell-line);padding: 14px 24px;display: flex;align-items: center;justify-content: flex-end;gap: 16px;- z-index: 10;}-#confirm-status { font-size: 13px; color: var(--muted); }+#confirm-status {+ min-height: 20px;+ font-size: 13px;+ color: var(--shell-muted);+}#confirm-status.done { color: #067647; font-weight: 600; }#btn-confirm {border: none;- background: var(--accent);- color: #fff;+ background: var(--warning);+ color: #1a1a2e;font-size: 14.5px;font-weight: 600;+ min-width: 132px;padding: 10px 26px;border-radius: 9px;cursor: pointer;}-#btn-confirm:hover { background: #2459cf; }-#btn-confirm:disabled { background: #9db4e8; cursor: default; }+#btn-confirm:hover { background: #e5b532; }+#btn-confirm:disabled { background: #6d6450; color: #b8b0a0; cursor: default; }/* ---- custom input ---- */.custom-input { margin-top: 8px; }@@ -312,7 +611,7 @@ body {#confirmed-overlay {position: fixed;inset: 0;- background: rgba(244, 245, 247, 0.94);+ background: rgba(17, 18, 29, 0.86);display: flex;align-items: center;justify-content: center;@@ -335,7 +634,7 @@ body {.style-preview {position: sticky;z-index: 5;- background: var(--bg);+ background: var(--shell-2);padding: 8px 0;margin-bottom: 16px;}@@ -378,6 +677,42 @@ body {text-overflow: ellipsis;}.sp-body-lat { margin-left: 10px; opacity: 0.92; }+.sp-content {+ display: grid;+ gap: 10px;+}+.sp-content-row {+ display: flex;+ align-items: flex-start;+ gap: 10px;+ padding: 10px;+ border: 1px solid rgba(0, 0, 0, 0.07);+ border-radius: 8px;+ background: rgba(255, 255, 255, 0.68);+}+.sp-content-icon {+ flex: none;+ width: 32px;+ height: 32px;+ display: grid;+ place-items: center;+ color: currentColor;+}+.sp-content-copy {+ min-width: 0;+ display: flex;+ flex-direction: column;+ gap: 3px;+}+.sp-content-copy b {+ font-size: 13px;+ line-height: 1.3;+}+.sp-content-copy small {+ color: #64748b;+ font-size: 11.5px;+ line-height: 1.45;+}.sp-chip {flex: none;display: inline-flex;@@ -389,3 +724,104 @@ body {}.sp-chip-dot { width: 12px; height: 12px; border-radius: 50%; }.sp-chip-label { font-size: 12.5px; }+.sp-icon-mark {+ width: 24px;+ height: 24px;+ display: grid;+ place-items: center;+ color: currentColor;+}+.sp-icon-mark svg {+ display: block;+ width: 22px;+ height: 22px;+ max-width: 22px;+ max-height: 22px;+ overflow: visible;+}+.sp-icon-emoji {+ font-size: 20px;+ line-height: 1;+}+.sp-icon-none {+ color: #64748b;+ font-size: 11px;+ white-space: nowrap;+}+.sp-icon-none-dot {+ width: 8px;+ height: 8px;+ border-radius: 50%;+ background: currentColor;+ opacity: .55;+}+.direction-preview-card {+ gap: 14px;+}+.direction-preview-visual {+ overflow: hidden;+ border: 1px solid var(--line);+ border-radius: 9px;+ background: #fff;+}+.direction-preview-visual svg,+.direction-preview-visual img {+ display: block;+ width: 100%;+ aspect-ratio: 16 / 9;+ object-fit: cover;+}+.direction-preview-title {+ color: var(--ink);+ font-size: 16px;+ font-weight: 700;+}+.direction-preview-desc {+ margin-top: 4px;+ color: var(--muted);+ font-size: 12.5px;+ line-height: 1.55;+}++@media (max-width: 1040px) {+ body {+ height: auto;+ overflow: auto;+ background: var(--shell-2);+ }+ #app {+ display: block;+ width: auto;+ height: auto;+ min-height: 100vh;+ }+ #preview-panel {+ width: auto;+ border: 0;+ border-bottom: 1px solid var(--shell-line);+ overflow: visible;+ padding: 0;+ }+ #control-panel {+ height: auto;+ min-height: 0;+ }+ #form {+ overflow: visible;+ padding: 20px;+ }+ #actionbar {+ position: sticky;+ bottom: 0;+ padding: 14px 20px;+ }+ .chip-with-preview {+ width: min(100%, 230px);+ }+ .chip-preview-visual_style {+ width: min(100%, 320px);+ }+ .style-preview-card {+ flex-wrap: wrap;+ }+}diff --git a/skills/ppt-master/scripts/confirm_ui/static/style_previews/blueprint.svg b/skills/ppt-master/scripts/confirm_ui/static/style_previews/blueprint.svgnew file mode 100644index 00000000..34155ad2--- /dev/null+++ b/skills/ppt-master/scripts/confirm_ui/static/style_previews/blueprint.svg@@ -0,0 +1,39 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <defs>+ <pattern id="bp-grid" width="40" height="40" patternUnits="userSpaceOnUse">+ <path d="M40 0H0V40" fill="none" stroke="#2E6EA8" stroke-width="0.8" opacity="0.55"/>+ </pattern>+ <pattern id="bp-grid5" width="200" height="200" patternUnits="userSpaceOnUse">+ <path d="M200 0H0V200" fill="none" stroke="#5AA0D6" stroke-width="1.2" opacity="0.5"/>+ </pattern>+ </defs>+ <rect width="1280" height="720" fill="#0C3A63"/>+ <rect width="1280" height="720" fill="url(#bp-grid)"/>+ <rect width="1280" height="720" fill="url(#bp-grid5)"/>+ <text x="80" y="108" font-family="Consolas, monospace" font-size="24" letter-spacing="3" fill="#CFE8FF">DWG / SECTION-04</text>+ <text x="78" y="198" font-family="Helvetica Neue, Arial, sans-serif" font-size="76" font-weight="700" fill="#EAF4FF">Lorem ipsum</text>+ <text x="80" y="248" font-family="Consolas, monospace" font-size="21" fill="#9CC9EC">DARK LINEWORK · ISOMETRIC · ANNOTATED</text>+ <g stroke="#BAE0FF" stroke-width="2" fill="none">+ <path d="M520 470L720 560L920 470L720 380Z"/>+ <path d="M520 470L520 320L720 230L720 380M920 470L920 320L720 230M720 380L720 560M520 320L720 410L920 320M720 410L720 560"/>+ </g>+ <g stroke="#7FC4FF" stroke-width="1.5">+ <path d="M520 620H920"/>+ <path d="M520 610V630M920 610V630"/>+ <path d="M520 620l16 -6v12zM920 620l-16 -6v12z" fill="#7FC4FF"/>+ </g>+ <text x="700" y="612" font-family="Consolas, monospace" font-size="20" fill="#CFE8FF">400.0</text>+ <circle cx="720" cy="230" r="6" fill="#FBBF24"/>+ <path d="M720 230L1010 156" stroke="#FBBF24" stroke-width="1.5"/>+ <text x="1020" y="162" font-family="Consolas, monospace" font-size="18" fill="#FBBF24">NODE A-01</text>+ <path d="M980 320H1120" stroke="#7FC4FF" stroke-width="1.5"/>+ <text x="1000" y="308" font-family="Consolas, monospace" font-size="17" fill="#CFE8FF">R = 120</text>+ <g stroke="#7FC4FF" stroke-width="1.5" fill="none">+ <rect x="960" y="600" width="240" height="80"/>+ <path d="M960 640H1200M1080 600V680"/>+ </g>+ <text x="972" y="628" font-family="Consolas, monospace" font-size="15" fill="#CFE8FF">SCALE 1:50</text>+ <text x="1092" y="628" font-family="Consolas, monospace" font-size="15" fill="#CFE8FF">REV 04</text>+ <text x="972" y="666" font-family="Consolas, monospace" font-size="15" fill="#CFE8FF">BLUEPRINT</text>+ <text x="1092" y="666" font-family="Consolas, monospace" font-size="15" fill="#CFE8FF">SHT 1/3</text>+</svg>diff --git a/skills/ppt-master/scripts/confirm_ui/static/style_previews/brutalist.svg b/skills/ppt-master/scripts/confirm_ui/static/style_previews/brutalist.svgnew file mode 100644index 00000000..f0fd59bc--- /dev/null+++ b/skills/ppt-master/scripts/confirm_ui/static/style_previews/brutalist.svg@@ -0,0 +1,31 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <defs>+ <pattern id="bru-half" width="14" height="14" patternUnits="userSpaceOnUse">+ <circle cx="4" cy="4" r="2.4" fill="#111"/><circle cx="11" cy="11" r="2.4" fill="#111"/>+ </pattern>+ </defs>+ <rect width="1280" height="720" fill="#EDEAE0"/>+ <rect x="40" y="40" width="1200" height="640" fill="none" stroke="#111" stroke-width="7"/>+ <rect x="40" y="40" width="1200" height="118" fill="#111"/>+ <text x="66" y="124" font-family="Arial Black, Arial, sans-serif" font-size="62" font-weight="900" fill="#EDEAE0">LOREM IPSUM</text>+ <text x="1214" y="112" text-anchor="end" font-family="Courier New, monospace" font-size="20" fill="#EDEAE0">VOL.04</text>+ <text x="1214" y="140" text-anchor="end" font-family="Courier New, monospace" font-size="20" fill="#EDEAE0">RAW/FLAT</text>+ <path d="M40 300H1240M40 470H1240M470 158V680M820 158V680" stroke="#111" stroke-width="5"/>+ <text x="66" y="208" font-family="Courier New, monospace" font-size="19" fill="#111">NEWSPAPER DENSITY · HEAVY RULES · NO SOFT CHROME</text>+ <text x="66" y="252" font-family="Georgia, serif" font-size="21" fill="#111">Lorem ipsum dolor sit amet, consectetur</text>+ <text x="66" y="282" font-family="Georgia, serif" font-size="21" fill="#111">adipiscing elit — a content page, not a poster.</text>+ <rect x="490" y="180" width="310" height="270" fill="url(#bru-half)"/>+ <rect x="490" y="180" width="310" height="270" fill="none" stroke="#111" stroke-width="5"/>+ <rect x="510" y="330" width="270" height="100" fill="#EDEAE0"/>+ <text x="524" y="410" font-family="Arial Black, Arial, sans-serif" font-size="82" font-weight="900" fill="#111">72</text>+ <text x="662" y="410" font-family="Arial Black, Arial, sans-serif" font-size="42" fill="#DC2626">%</text>+ <rect x="840" y="180" width="360" height="270" fill="#DC2626"/>+ <text x="864" y="268" font-family="Arial Black, Arial, sans-serif" font-size="56" font-weight="900" fill="#fff">ONE</text>+ <text x="864" y="328" font-family="Arial Black, Arial, sans-serif" font-size="56" font-weight="900" fill="#fff">LOUD</text>+ <text x="864" y="388" font-family="Arial Black, Arial, sans-serif" font-size="56" font-weight="900" fill="#fff">SPOT</text>+ <text x="66" y="514" font-family="Courier New, monospace" font-size="19" fill="#111">INDEX ------------------- VALUE -- TREND</text>+ <text x="66" y="550" font-family="Courier New, monospace" font-size="19" fill="#111">A LOREM 124 UP</text>+ <text x="66" y="586" font-family="Courier New, monospace" font-size="19" fill="#111">B IPSUM 092 FLAT</text>+ <text x="66" y="622" font-family="Courier New, monospace" font-size="19" fill="#111">C DOLOR 051 DOWN</text>+ <text x="66" y="658" font-family="Courier New, monospace" font-size="19" fill="#111">D AMET 148 UP</text>+</svg>diff --git a/skills/ppt-master/scripts/confirm_ui/static/style_previews/chalkboard.svg b/skills/ppt-master/scripts/confirm_ui/static/style_previews/chalkboard.svgnew file mode 100644index 00000000..78c055f1--- /dev/null+++ b/skills/ppt-master/scripts/confirm_ui/static/style_previews/chalkboard.svg@@ -0,0 +1,23 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <defs>+ <filter id="ck-rough"><feTurbulence type="fractalNoise" baseFrequency="0.04 0.09" numOctaves="2" result="n"/><feDisplacementMap in="SourceGraphic" in2="n" scale="3"/></filter>+ </defs>+ <rect width="1280" height="720" fill="#23423C"/>+ <rect width="1280" height="720" fill="#1C3833" opacity="0.5"/>+ <text x="96" y="172" font-family="'Segoe Print',Arial,sans-serif" font-size="78" font-weight="700" fill="#F4F7EF" filter="url(#ck-rough)">Lorem ipsum</text>+ <path d="M96 198q220 -10 420 2" stroke="#F4F7EF" stroke-width="4" fill="none" opacity="0.8" filter="url(#ck-rough)"/>+ <text x="98" y="252" font-family="Arial,sans-serif" font-size="26" fill="#BEE3D0">Dark slate · chalk strokes · pastel emphasis</text>+ <g filter="url(#ck-rough)">+ <circle cx="300" cy="480" r="90" fill="none" stroke="#FDE68A" stroke-width="4"/>+ <text x="300" y="494" text-anchor="middle" font-family="'Segoe Print',sans-serif" font-size="40" fill="#FDE68A">72%</text>+ <path d="M410 480h150" stroke="#F4F7EF" stroke-width="4" fill="none"/>+ <path d="M560 480l-24 -10v20z" fill="#F4F7EF"/>+ <rect x="580" y="420" width="190" height="120" rx="6" fill="none" stroke="#93C5FD" stroke-width="4"/>+ <text x="602" y="490" font-family="'Segoe Print',sans-serif" font-size="26" fill="#93C5FD">Ipsum</text>+ </g>+ <g filter="url(#ck-rough)" stroke="#F4F7EF" stroke-width="3" fill="none">+ <path d="M900 560h280M900 560v-200"/>+ </g>+ <g fill="#F9A8D4" opacity="0.85"><rect x="930" y="482" width="40" height="76"/><rect x="990" y="442" width="40" height="116"/><rect x="1050" y="402" width="40" height="156"/><rect x="1110" y="462" width="40" height="96"/></g>+ <g fill="#F4F7EF" opacity="0.14"><circle cx="200" cy="640" r="3"/><circle cx="240" cy="650" r="2"/><circle cx="1000" cy="605" r="2"/><circle cx="700" cy="300" r="2"/></g>+</svg>diff --git a/skills/ppt-master/scripts/confirm_ui/static/style_previews/dark-tech.svg b/skills/ppt-master/scripts/confirm_ui/static/style_previews/dark-tech.svgnew file mode 100644index 00000000..57fd5983--- /dev/null+++ b/skills/ppt-master/scripts/confirm_ui/static/style_previews/dark-tech.svg@@ -0,0 +1,31 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <defs>+ <filter id="neon" x="-60%" y="-60%" width="220%" height="220%">+ <feGaussianBlur stdDeviation="6" result="b"/><feMerge><feMergeNode in="b"/><feMergeNode in="SourceGraphic"/></feMerge>+ </filter>+ <linearGradient id="dt-fill" x1="0" y1="0" x2="0" y2="1">+ <stop offset="0" stop-color="#22D3EE" stop-opacity="0.4"/><stop offset="1" stop-color="#22D3EE" stop-opacity="0"/>+ </linearGradient>+ </defs>+ <rect width="1280" height="720" fill="#070B16"/>+ <g stroke="#16324D" stroke-width="1" opacity="0.6">+ <path d="M0 180H1280M0 360H1280M0 540H1280M160 0V720M400 0V720M640 0V720M880 0V720M1120 0V720"/>+ </g>+ <text x="96" y="118" font-family="Consolas, monospace" font-size="24" letter-spacing="4" fill="#22D3EE">// SYSTEM.OVERVIEW_04</text>+ <text x="94" y="248" font-family="Helvetica Neue, Arial, sans-serif" font-size="94" font-weight="700" fill="#F1F5F9">Lorem ipsum</text>+ <text x="98" y="306" font-family="Arial, sans-serif" font-size="27" fill="#7DD3FC">Dark canvas · glowing accents · precise geometry</text>+ <g transform="translate(96 360)">+ <path d="M0 220L120 170L240 190L360 110L480 140L600 60L720 90L840 20" fill="none" stroke="#22D3EE" stroke-width="4" filter="url(#neon)" stroke-linecap="round" stroke-linejoin="round"/>+ <path d="M0 220L120 170L240 190L360 110L480 140L600 60L720 90L840 20L840 240L0 240Z" fill="url(#dt-fill)"/>+ <circle cx="600" cy="60" r="8" fill="#A3E635" filter="url(#neon)"/>+ <circle cx="840" cy="20" r="8" fill="#A3E635" filter="url(#neon)"/>+ </g>+ <g transform="translate(980 360)">+ <rect x="0" y="0" width="200" height="240" rx="10" fill="#0C1526" stroke="#1E3A5F"/>+ <text x="24" y="92" font-family="Helvetica Neue, Arial, sans-serif" font-size="74" font-weight="700" fill="#22D3EE" filter="url(#neon)">72%</text>+ <text x="24" y="130" font-family="Consolas, monospace" font-size="18" fill="#64748B">UPTIME</text>+ <rect x="24" y="162" width="152" height="10" rx="5" fill="#12233B"/>+ <rect x="24" y="162" width="110" height="10" rx="5" fill="#A3E635"/>+ <text x="24" y="214" font-family="Consolas, monospace" font-size="16" fill="#7DD3FC">+18% QoQ</text>+ </g>+</svg>diff --git a/skills/ppt-master/scripts/confirm_ui/static/style_previews/data-journalism.svg b/skills/ppt-master/scripts/confirm_ui/static/style_previews/data-journalism.svgnew file mode 100644index 00000000..842e0ed2--- /dev/null+++ b/skills/ppt-master/scripts/confirm_ui/static/style_previews/data-journalism.svg@@ -0,0 +1,41 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <rect width="1280" height="720" fill="#FFFFFF"/>+ <text x="72" y="86" font-family="Georgia, serif" font-size="20" letter-spacing="3" fill="#C2410C">DATA DESK · ANALYSIS</text>+ <text x="70" y="150" font-family="Georgia, 'Times New Roman', serif" font-size="58" font-weight="700" fill="#111827">Lorem ipsum dolor</text>+ <text x="72" y="192" font-family="Arial, sans-serif" font-size="23" fill="#6B7280">Multi-column microcharts, sidebars and source lines</text>+ <path d="M72 220H1208" stroke="#111827" stroke-width="2"/>+ <g transform="translate(72 250)">+ <rect x="0" y="0" width="560" height="260" fill="#F8FAFC" stroke="#E2E8F0"/>+ <text x="16" y="30" font-family="Arial, sans-serif" font-size="18" font-weight="700" fill="#111827">Trend · 2019–2026</text>+ <g stroke="#E2E8F0"><path d="M16 210H544M16 160H544M16 110H544M16 60H544"/></g>+ <path d="M16 190L100 170L184 176L268 120L352 130L436 70L520 40" fill="none" stroke="#2563EB" stroke-width="3"/>+ <path d="M16 190L100 170L184 176L268 120L352 130L436 70L520 40L520 210L16 210Z" fill="#2563EB" opacity="0.08"/>+ <circle cx="520" cy="40" r="5" fill="#C2410C"/>+ </g>+ <g transform="translate(660 250)">+ <rect x="0" y="0" width="250" height="122" fill="#F8FAFC" stroke="#E2E8F0"/>+ <text x="14" y="26" font-family="Arial, sans-serif" font-size="15" font-weight="700" fill="#111827">Share</text>+ <g fill="#2563EB"><rect x="16" y="96" width="26" height="14"/><rect x="56" y="78" width="26" height="32"/><rect x="96" y="58" width="26" height="52"/><rect x="136" y="70" width="26" height="40"/><rect x="176" y="44" width="26" height="66"/><rect x="216" y="86" width="26" height="24"/></g>+ </g>+ <g transform="translate(940 250)">+ <rect x="0" y="0" width="268" height="122" fill="#F8FAFC" stroke="#E2E8F0"/>+ <text x="14" y="26" font-family="Arial, sans-serif" font-size="15" font-weight="700" fill="#111827">Mix</text>+ <circle cx="70" cy="74" r="34" fill="none" stroke="#E2E8F0" stroke-width="16"/>+ <circle cx="70" cy="74" r="34" fill="none" stroke="#2563EB" stroke-width="16" stroke-dasharray="150 214" transform="rotate(-90 70 74)"/>+ <circle cx="70" cy="74" r="34" fill="none" stroke="#C2410C" stroke-width="16" stroke-dasharray="55 214" stroke-dashoffset="-150" transform="rotate(-90 70 74)"/>+ <text x="132" y="62" font-family="Arial, sans-serif" font-size="16" fill="#2563EB">68% a</text>+ <text x="132" y="92" font-family="Arial, sans-serif" font-size="16" fill="#C2410C">24% b</text>+ </g>+ <g transform="translate(660 396)">+ <rect x="0" y="0" width="250" height="114" fill="#111827"/>+ <text x="16" y="54" font-family="Georgia, serif" font-size="46" font-weight="700" fill="#fff">72%</text>+ <text x="16" y="88" font-family="Arial, sans-serif" font-size="16" fill="#CBD5E1">Consectetur elit</text>+ </g>+ <g transform="translate(940 396)">+ <rect x="0" y="0" width="268" height="114" fill="#F8FAFC" stroke="#E2E8F0"/>+ <path d="M14 96L60 80L106 88L152 60L198 70L254 40L254 104L14 104Z" fill="#2563EB" opacity="0.15"/>+ <path d="M14 96L60 80L106 88L152 60L198 70L254 40" fill="none" stroke="#2563EB" stroke-width="2.5"/>+ </g>+ <path d="M72 548H1208" stroke="#E2E8F0" stroke-width="1"/>+ <text x="72" y="576" font-family="Arial, sans-serif" font-size="16" fill="#9CA3AF">Source: lorem ipsum operating data (2019–2026) · Chart: PM Data Desk</text>+</svg>diff --git a/skills/ppt-master/scripts/confirm_ui/static/style_previews/editorial.svg b/skills/ppt-master/scripts/confirm_ui/static/style_previews/editorial.svgnew file mode 100644index 00000000..e45afd57--- /dev/null+++ b/skills/ppt-master/scripts/confirm_ui/static/style_previews/editorial.svg@@ -0,0 +1,22 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <rect width="1280" height="720" fill="#FBFAF7"/>+ <text x="80" y="76" font-family="Georgia, serif" font-size="24" letter-spacing="8" fill="#111827">THE REVIEW</text>+ <text x="1200" y="76" text-anchor="end" font-family="Georgia, serif" font-size="22" fill="#8A8377">FEATURE · No.04</text>+ <path d="M80 96H1200" stroke="#111827" stroke-width="3"/>+ <path d="M80 103H1200" stroke="#111827" stroke-width="1"/>+ <text x="80" y="216" font-family="Georgia, 'Times New Roman', serif" font-size="98" font-weight="700" fill="#111827">Lorem ipsum</text>+ <text x="80" y="272" font-family="Georgia, serif" font-size="30" font-style="italic" fill="#6B7280">A serif / sans-serif hierarchy set in columns</text>+ <path d="M80 308H1200" stroke="#111827" stroke-width="1"/>+ <path d="M450 336V648M820 336V648" stroke="#D8D2C4" stroke-width="1.5"/>+ <text x="80" y="452" font-family="Georgia, serif" font-size="118" font-weight="700" fill="#B45309">L</text>+ <g fill="#CFC9BC"><rect x="196" y="356" width="222" height="11" rx="2"/><rect x="196" y="384" width="222" height="11" rx="2"/><rect x="196" y="412" width="205" height="11" rx="2"/><rect x="80" y="470" width="338" height="11" rx="2"/><rect x="80" y="498" width="338" height="11" rx="2"/><rect x="80" y="526" width="300" height="11" rx="2"/><rect x="80" y="554" width="338" height="11" rx="2"/><rect x="80" y="582" width="250" height="11" rx="2"/></g>+ <text x="490" y="404" font-family="Georgia, serif" font-size="33" font-style="italic" fill="#111827">“Lorem ipsum</text>+ <text x="490" y="446" font-family="Georgia, serif" font-size="33" font-style="italic" fill="#111827">dolor sit amet,</text>+ <text x="490" y="488" font-family="Georgia, serif" font-size="33" font-style="italic" fill="#111827">consectetur.”</text>+ <g fill="#CFC9BC"><rect x="490" y="536" width="300" height="11" rx="2"/><rect x="490" y="564" width="300" height="11" rx="2"/><rect x="490" y="592" width="230" height="11" rx="2"/></g>+ <g fill="#CFC9BC"><rect x="860" y="356" width="340" height="11" rx="2"/><rect x="860" y="384" width="340" height="11" rx="2"/><rect x="860" y="412" width="300" height="11" rx="2"/><rect x="860" y="440" width="340" height="11" rx="2"/><rect x="860" y="468" width="270" height="11" rx="2"/></g>+ <rect x="860" y="506" width="340" height="110" fill="#EDE9DF"/>+ <text x="882" y="558" font-family="Georgia, serif" font-size="46" font-weight="700" fill="#111827">72%</text>+ <text x="882" y="594" font-family="Georgia, serif" font-size="20" fill="#6B7280">dolor sit amet</text>+ <text x="80" y="686" font-family="Georgia, serif" font-size="20" font-style="italic" fill="#8A8377">By Strategy Desk · Illustration by PM</text>+</svg>diff --git a/skills/ppt-master/scripts/confirm_ui/static/style_previews/glassmorphism.svg b/skills/ppt-master/scripts/confirm_ui/static/style_previews/glassmorphism.svgnew file mode 100644index 00000000..52a918b0--- /dev/null+++ b/skills/ppt-master/scripts/confirm_ui/static/style_previews/glassmorphism.svg@@ -0,0 +1,31 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <defs>+ <linearGradient id="g-bg" x1="0" y1="0" x2="1" y2="1">+ <stop offset="0" stop-color="#4F46E5"/><stop offset="0.5" stop-color="#7C3AED"/><stop offset="1" stop-color="#EC4899"/>+ </linearGradient>+ <filter id="g-blur" x="-60%" y="-60%" width="220%" height="220%"><feGaussianBlur stdDeviation="44"/></filter>+ <linearGradient id="g-panel" x1="0" y1="0" x2="1" y2="1">+ <stop offset="0" stop-color="#FFFFFF" stop-opacity="0.38"/><stop offset="1" stop-color="#FFFFFF" stop-opacity="0.12"/>+ </linearGradient>+ </defs>+ <rect width="1280" height="720" fill="url(#g-bg)"/>+ <circle cx="240" cy="180" r="150" fill="#22D3EE" filter="url(#g-blur)" opacity="0.85"/>+ <circle cx="1080" cy="560" r="185" fill="#F472B6" filter="url(#g-blur)" opacity="0.9"/>+ <circle cx="980" cy="150" r="95" fill="#FDE68A" filter="url(#g-blur)" opacity="0.75"/>+ <rect x="150" y="150" width="640" height="420" rx="36" fill="url(#g-panel)" stroke="#FFFFFF" stroke-opacity="0.55" stroke-width="1.5"/>+ <rect x="200" y="205" width="150" height="48" rx="24" fill="#FFFFFF" fill-opacity="0.25" stroke="#fff" stroke-opacity="0.5"/>+ <text x="224" y="238" font-family="Arial, sans-serif" font-size="24" fill="#fff">GLASS 04</text>+ <text x="200" y="362" font-family="Helvetica Neue, Arial, sans-serif" font-size="80" font-weight="700" fill="#FFFFFF">Lorem ipsum</text>+ <text x="202" y="414" font-family="Arial, sans-serif" font-size="26" fill="#EDE9FE">Translucent panels · gradient light · depth</text>+ <rect x="200" y="452" width="270" height="92" rx="20" fill="#FFFFFF" fill-opacity="0.2" stroke="#fff" stroke-opacity="0.4"/>+ <rect x="490" y="452" width="270" height="92" rx="20" fill="#FFFFFF" fill-opacity="0.2" stroke="#fff" stroke-opacity="0.4"/>+ <text x="228" y="512" font-family="Arial, sans-serif" font-size="42" font-weight="700" fill="#fff">72%</text>+ <text x="360" y="512" font-family="Arial, sans-serif" font-size="20" fill="#EDE9FE">dolor</text>+ <text x="518" y="512" font-family="Arial, sans-serif" font-size="42" font-weight="700" fill="#fff">1.8x</text>+ <text x="652" y="512" font-family="Arial, sans-serif" font-size="20" fill="#EDE9FE">amet</text>+ <rect x="830" y="205" width="260" height="310" rx="26" fill="#FFFFFF" fill-opacity="0.16" stroke="#fff" stroke-opacity="0.4"/>+ <circle cx="960" cy="308" r="54" fill="none" stroke="#fff" stroke-opacity="0.55" stroke-width="13"/>+ <path d="M960 254a54 54 0 0 1 47 81" fill="none" stroke="#FDE68A" stroke-width="13" stroke-linecap="round"/>+ <rect x="870" y="400" width="180" height="16" rx="8" fill="#fff" fill-opacity="0.55"/>+ <rect x="870" y="432" width="130" height="14" rx="7" fill="#fff" fill-opacity="0.4"/>+</svg>diff --git a/skills/ppt-master/scripts/confirm_ui/static/style_previews/ink-notes.svg b/skills/ppt-master/scripts/confirm_ui/static/style_previews/ink-notes.svgnew file mode 100644index 00000000..d1caa2f2--- /dev/null+++ b/skills/ppt-master/scripts/confirm_ui/static/style_previews/ink-notes.svg@@ -0,0 +1,16 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <rect width="1280" height="720" fill="#FAFAF7"/>+ <text x="100" y="150" font-family="'Segoe Script','Bradley Hand',cursive" font-size="30" fill="#111827">04 —</text>+ <text x="100" y="252" font-family="Georgia, serif" font-size="88" font-weight="700" fill="#111827">Lorem ipsum</text>+ <path d="M100 278q200 -14 380 -2" fill="none" stroke="#111827" stroke-width="4" stroke-linecap="round"/>+ <text x="100" y="332" font-family="Arial, sans-serif" font-size="26" fill="#4B5563">Light ground · handwritten ink · sparse emphasis</text>+ <text x="100" y="432" font-family="Arial, sans-serif" font-size="30" fill="#1F2937">— Lorem ipsum dolor</text>+ <text x="100" y="492" font-family="Arial, sans-serif" font-size="30" fill="#1F2937">— Sit amet</text>+ <path d="M182 464q120 -22 210 6q34 42 -10 62q-150 26 -214 -8q-32 -34 14 -60Z" fill="none" stroke="#DC2626" stroke-width="4"/>+ <text x="100" y="552" font-family="Arial, sans-serif" font-size="30" fill="#1F2937">— Consectetur adipiscing</text>+ <path d="M820 170q120 40 60 160t80 210" fill="none" stroke="#111827" stroke-width="11" stroke-linecap="round" opacity="0.85"/>+ <path d="M900 250q80 -10 140 40" fill="none" stroke="#111827" stroke-width="5" stroke-linecap="round" opacity="0.55"/>+ <path d="M760 548q120 -30 250 -72" fill="none" stroke="#DC2626" stroke-width="4" stroke-linecap="round"/>+ <path d="M1010 476l-30 4l16 24z" fill="#DC2626"/>+ <text x="1030" y="600" text-anchor="end" font-family="Georgia, serif" font-size="64" font-weight="700" fill="#111827">72%</text>+</svg>diff --git a/skills/ppt-master/scripts/confirm_ui/static/style_previews/ink-wash.svg b/skills/ppt-master/scripts/confirm_ui/static/style_previews/ink-wash.svgnew file mode 100644index 00000000..d36a2a04--- /dev/null+++ b/skills/ppt-master/scripts/confirm_ui/static/style_previews/ink-wash.svg@@ -0,0 +1,18 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <defs>+ <radialGradient id="iw-paper" cx="50%" cy="40%" r="75%"><stop offset="0" stop-color="#FBF8EF"/><stop offset="1" stop-color="#EEE6D2"/></radialGradient>+ </defs>+ <rect width="1280" height="720" fill="url(#iw-paper)"/>+ <path d="M620 470C700 300 800 250 900 300C860 340 900 380 980 360C920 420 1000 460 1080 430C1000 500 900 520 800 500C720 486 660 500 620 470Z" fill="#1F2937" opacity="0.16"/>+ <path d="M700 480C780 360 860 330 940 370C900 400 940 430 1010 418C960 470 1030 496 1110 470C1030 520 940 528 860 512C790 498 740 508 700 480Z" fill="#1F2937" opacity="0.3"/>+ <path d="M640 560C760 500 900 540 1160 470" fill="none" stroke="#1F2937" stroke-width="14" stroke-linecap="round" opacity="0.85"/>+ <path d="M660 600C820 560 980 588 1140 548" fill="none" stroke="#1F2937" stroke-width="5" stroke-linecap="round" opacity="0.4"/>+ <text x="120" y="176" font-family="Georgia, serif" font-size="28" letter-spacing="4" fill="#7F1D1D">SCROLL · IV</text>+ <text x="118" y="288" font-family="'Songti SC','STSong',Georgia,serif" font-size="90" font-weight="700" fill="#1F2937">Lorem ipsum</text>+ <text x="120" y="346" font-family="Arial,sans-serif" font-size="24" fill="#4B5563">Rice-paper whitespace · brushwork · seal · calm</text>+ <text x="120" y="446" font-family="Georgia,serif" font-size="30" fill="#374151">I. Lorem ipsum dolor</text>+ <text x="120" y="500" font-family="Georgia,serif" font-size="30" fill="#374151">II. Sit amet consectetur</text>+ <text x="120" y="554" font-family="Georgia,serif" font-size="30" fill="#374151">III. Adipiscing elit sed</text>+ <rect x="470" y="474" width="72" height="72" rx="6" fill="#B91C1C"/>+ <g stroke="#FBEAEA" stroke-width="6" stroke-linecap="round"><path d="M490 496h32M490 512h32M506 496v34"/></g>+</svg>diff --git a/skills/ppt-master/scripts/confirm_ui/static/style_previews/memphis.svg b/skills/ppt-master/scripts/confirm_ui/static/style_previews/memphis.svgnew file mode 100644index 00000000..f111d61f--- /dev/null+++ b/skills/ppt-master/scripts/confirm_ui/static/style_previews/memphis.svg@@ -0,0 +1,25 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <rect width="1280" height="720" fill="#FFF6EC"/>+ <g stroke="#111827" stroke-width="6">+ <circle cx="150" cy="140" r="52" fill="#FDE047"/>+ <rect x="1050" y="90" width="110" height="110" transform="rotate(12 1105 145)" fill="#F472B6"/>+ <path d="M1080 470l70 -96l70 96z" fill="#34D399"/>+ <path d="M90 560h58M90 590h58M90 620h58" fill="none" stroke-linecap="round"/>+ <path d="M980 610q26 -34 52 0t52 0" fill="none"/>+ <circle cx="1180" cy="360" r="30" fill="#60A5FA"/>+ <path d="M60 330q26 -30 52 0t52 0t52 0" fill="none"/>+ </g>+ <g fill="#F97316"><circle cx="620" cy="90" r="9"/><circle cx="660" cy="90" r="9"/><circle cx="700" cy="90" r="9"/><circle cx="620" cy="130" r="9"/><circle cx="660" cy="130" r="9"/><circle cx="700" cy="130" r="9"/></g>+ <rect x="150" y="230" width="640" height="200" rx="18" fill="#FFFFFF" stroke="#111827" stroke-width="7"/>+ <text x="186" y="326" font-family="Arial Black, Arial, sans-serif" font-size="72" font-weight="900" fill="#111827">Lorem</text>+ <text x="186" y="392" font-family="Arial, sans-serif" font-size="24" fill="#111827">Color blocks · geometric scraps · bold outlines</text>+ <circle cx="980" cy="300" r="130" fill="#A78BFA" stroke="#111827" stroke-width="7"/>+ <text x="980" y="292" text-anchor="middle" font-family="Arial Black, Arial, sans-serif" font-size="72" font-weight="900" fill="#111827">72%</text>+ <text x="980" y="338" text-anchor="middle" font-family="Arial, sans-serif" font-size="22" fill="#111827">dolor</text>+ <g stroke="#111827" stroke-width="7">+ <rect x="150" y="500" width="90" height="120" fill="#60A5FA"/>+ <rect x="270" y="470" width="90" height="150" fill="#FDE047"/>+ <rect x="390" y="510" width="90" height="110" fill="#34D399"/>+ <rect x="510" y="450" width="90" height="170" fill="#F472B6"/>+ </g>+</svg>diff --git a/skills/ppt-master/scripts/confirm_ui/static/style_previews/paper-cut.svg b/skills/ppt-master/scripts/confirm_ui/static/style_previews/paper-cut.svgnew file mode 100644index 00000000..374146dc--- /dev/null+++ b/skills/ppt-master/scripts/confirm_ui/static/style_previews/paper-cut.svg@@ -0,0 +1,16 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <defs>+ <filter id="pc-sh" x="-20%" y="-45%" width="140%" height="190%"><feDropShadow dx="0" dy="-8" stdDeviation="10" flood-color="#1E3A5F" flood-opacity="0.18"/></filter>+ <filter id="pc-sh2" x="-20%" y="-45%" width="140%" height="190%"><feDropShadow dx="0" dy="-11" stdDeviation="14" flood-color="#0F2A44" flood-opacity="0.2"/></filter>+ </defs>+ <rect width="1280" height="720" fill="#EAF3FB"/>+ <circle cx="980" cy="220" r="112" fill="#FBBF6E" filter="url(#pc-sh)"/>+ <path d="M0 430C220 370 420 470 660 420C900 370 1080 450 1280 400V720H0Z" fill="#BFE0F5" filter="url(#pc-sh)"/>+ <path d="M0 520C260 460 460 560 720 500C980 440 1120 520 1280 480V720H0Z" fill="#7FBEE8" filter="url(#pc-sh2)"/>+ <path d="M0 610C280 555 520 640 800 580C1060 525 1160 600 1280 570V720H0Z" fill="#3E8FCB" filter="url(#pc-sh2)"/>+ <path d="M560 470l64 -30l-8 44z" fill="#F87171" filter="url(#pc-sh)"/>+ <rect x="90" y="150" width="540" height="200" rx="18" fill="#FFFFFF" filter="url(#pc-sh)"/>+ <text x="128" y="238" font-family="Arial, sans-serif" font-size="62" font-weight="800" fill="#1E4E79">Lorem ipsum</text>+ <text x="130" y="292" font-family="Arial, sans-serif" font-size="24" fill="#5B7A94">Layered cut paper · soft shadows · handmade</text>+ <rect x="130" y="316" width="120" height="12" rx="6" fill="#FBBF6E"/>+</svg>diff --git a/skills/ppt-master/scripts/confirm_ui/static/style_previews/photo-editorial.svg b/skills/ppt-master/scripts/confirm_ui/static/style_previews/photo-editorial.svgnew file mode 100644index 00000000..df8255cc--- /dev/null+++ b/skills/ppt-master/scripts/confirm_ui/static/style_previews/photo-editorial.svg@@ -0,0 +1,27 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <defs>+ <linearGradient id="pe-sky" x1="0" y1="0" x2="0" y2="1">+ <stop offset="0" stop-color="#1B2A4A"/><stop offset="0.5" stop-color="#7C4A6B"/><stop offset="0.78" stop-color="#E08A63"/><stop offset="1" stop-color="#F3B77E"/>+ </linearGradient>+ <radialGradient id="pe-sun" cx="72%" cy="72%" r="36%">+ <stop offset="0" stop-color="#FFE7B8"/><stop offset="0.35" stop-color="#FBC26B" stop-opacity="0.8"/><stop offset="1" stop-color="#FBC26B" stop-opacity="0"/>+ </radialGradient>+ <linearGradient id="pe-grad" x1="0" y1="0" x2="0" y2="1">+ <stop offset="0" stop-color="#000" stop-opacity="0"/><stop offset="1" stop-color="#000" stop-opacity="0.78"/>+ </linearGradient>+ </defs>+ <rect width="1280" height="720" fill="url(#pe-sky)"/>+ <rect width="1280" height="720" fill="url(#pe-sun)"/>+ <circle cx="922" cy="516" r="72" fill="#FFEFC8" opacity="0.95"/>+ <path d="M0 470L220 420L470 500L720 430L980 500L1280 440V720H0Z" fill="#5A4A6E" opacity="0.55"/>+ <path d="M0 540L260 500L520 560L780 505L1040 570L1280 520V720H0Z" fill="#3E3352" opacity="0.72"/>+ <path d="M0 610L300 575L600 630L900 580L1280 625V720H0Z" fill="#241C33"/>+ <path d="M300 250q14 -12 28 0q14 -12 28 0" fill="none" stroke="#1B2A4A" stroke-width="3"/>+ <path d="M362 286q10 -9 20 0q10 -9 20 0" fill="none" stroke="#1B2A4A" stroke-width="2.5"/>+ <rect x="0" y="440" width="1280" height="280" fill="url(#pe-grad)"/>+ <rect x="80" y="560" width="8" height="96" fill="#F3B77E"/>+ <text x="112" y="548" font-family="Helvetica Neue, Arial, sans-serif" font-size="22" letter-spacing="5" fill="#F3B77E">FIELD NOTES · 04</text>+ <text x="108" y="622" font-family="Helvetica Neue, Arial, sans-serif" font-size="76" font-weight="700" fill="#fff">Lorem ipsum</text>+ <text x="112" y="666" font-family="Helvetica Neue, Arial, sans-serif" font-size="24" fill="#E7DCD2">Full-bleed photography with light text and captions</text>+ <rect x="20" y="20" width="1240" height="680" fill="none" stroke="#fff" stroke-opacity="0.6" stroke-width="2"/>+</svg>diff --git a/skills/ppt-master/scripts/confirm_ui/static/style_previews/pixel-art.svg b/skills/ppt-master/scripts/confirm_ui/static/style_previews/pixel-art.svgnew file mode 100644index 00000000..638c70cc--- /dev/null+++ b/skills/ppt-master/scripts/confirm_ui/static/style_previews/pixel-art.svg@@ -0,0 +1,28 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" shape-rendering="crispEdges">+ <rect width="1280" height="720" fill="#1A1C2C"/>+ <rect x="0" y="600" width="1280" height="120" fill="#2A2F4A"/>+ <rect x="0" y="600" width="1280" height="20" fill="#3B4670"/>+ <text x="80" y="182" font-family="'Courier New',monospace" font-size="92" font-weight="700" fill="#FFCD75" letter-spacing="2">LOREM IPSUM</text>+ <text x="84" y="238" font-family="'Courier New',monospace" font-size="27" fill="#41A6F6">STRICT PIXEL GRID · LIMITED PALETTE</text>+ <g>+ <rect x="160" y="340" width="160" height="40" fill="#EF7D57"/>+ <rect x="200" y="300" width="80" height="40" fill="#FFCD75"/>+ <rect x="200" y="380" width="120" height="120" fill="#41A6F6"/>+ <rect x="160" y="420" width="40" height="80" fill="#41A6F6"/>+ <rect x="320" y="420" width="40" height="80" fill="#41A6F6"/>+ <rect x="200" y="500" width="40" height="60" fill="#38213A"/>+ <rect x="280" y="500" width="40" height="60" fill="#38213A"/>+ <rect x="220" y="320" width="16" height="16" fill="#1A1C2C"/>+ <rect x="252" y="320" width="16" height="16" fill="#1A1C2C"/>+ </g>+ <g>+ <rect x="640" y="480" width="60" height="80" fill="#38B764"/>+ <rect x="720" y="420" width="60" height="140" fill="#38B764"/>+ <rect x="800" y="360" width="60" height="200" fill="#FFCD75"/>+ <rect x="880" y="440" width="60" height="120" fill="#38B764"/>+ <rect x="960" y="300" width="60" height="260" fill="#EF7D57"/>+ </g>+ <path d="M620 560H1060" stroke="#94B0C2" stroke-width="8"/>+ <g fill="#FFCD75"><rect x="1120" y="120" width="24" height="24"/><rect x="1096" y="144" width="72" height="24"/><rect x="1120" y="168" width="24" height="24"/></g>+ <text x="1250" y="470" text-anchor="end" font-family="'Courier New',monospace" font-size="84" font-weight="700" fill="#FFCD75">72%</text>+</svg>diff --git a/skills/ppt-master/scripts/confirm_ui/static/style_previews/sketch-notes.svg b/skills/ppt-master/scripts/confirm_ui/static/style_previews/sketch-notes.svgnew file mode 100644index 00000000..1af659fe--- /dev/null+++ b/skills/ppt-master/scripts/confirm_ui/static/style_previews/sketch-notes.svg@@ -0,0 +1,20 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <rect width="1280" height="720" fill="#FFFBEF"/>+ <rect x="86" y="118" width="430" height="48" rx="8" fill="#FDE68A" opacity="0.8" transform="rotate(-1 300 142)"/>+ <text x="96" y="172" font-family="'Comic Sans MS','Segoe Print',cursive" font-size="70" font-weight="700" fill="#1F2937">Lorem ipsum</text>+ <text x="98" y="220" font-family="'Comic Sans MS',cursive" font-size="26" fill="#6B7280">Warm paper · doodle lines · soft color blocks</text>+ <path d="M96 280q220 -8 300 0q6 90 0 150q-160 8 -300 2q-6 -80 0 -154Z" fill="#FEE2E2" stroke="#1F2937" stroke-width="3" stroke-linejoin="round"/>+ <text x="128" y="342" font-family="'Comic Sans MS',cursive" font-size="30" font-weight="700" fill="#1F2937">Lorem</text>+ <path d="M128 372h230M128 400h180" stroke="#9CA3AF" stroke-width="3" stroke-linecap="round"/>+ <path d="M430 360q90 -30 150 10" fill="none" stroke="#2563EB" stroke-width="4" stroke-linecap="round"/>+ <path d="M580 370l-22 -6l14 20z" fill="#2563EB"/>+ <path d="M600 300q210 -8 290 4q6 80 0 140q-150 8 -290 0q-6 -74 0 -144Z" fill="#DBEAFE" stroke="#1F2937" stroke-width="3" stroke-linejoin="round"/>+ <text x="632" y="358" font-family="'Comic Sans MS',cursive" font-size="30" font-weight="700" fill="#1F2937">Ipsum</text>+ <circle cx="652" cy="394" r="8" fill="#34D399" stroke="#1F2937" stroke-width="2"/>+ <circle cx="692" cy="394" r="8" fill="#FBBF24" stroke="#1F2937" stroke-width="2"/>+ <path d="M1000 200l14 40l42 2l-33 26l12 41l-35 -24l-35 24l12 -41l-33 -26l42 -2z" fill="#FDE047" stroke="#1F2937" stroke-width="3" stroke-linejoin="round"/>+ <g stroke="#1F2937" stroke-width="3" fill="none"><path d="M120 560v120h520" stroke-linecap="round"/></g>+ <path d="M150 640q90 -60 180 -20t180 -70" fill="none" stroke="#EC4899" stroke-width="4" stroke-linecap="round"/>+ <circle cx="510" cy="530" r="6" fill="#EC4899"/>+ <text x="1000" y="300" font-family="'Comic Sans MS',cursive" font-size="40" font-weight="700" fill="#1F2937">72%!</text>+</svg>diff --git a/skills/ppt-master/scripts/confirm_ui/static/style_previews/soft-rounded.svg b/skills/ppt-master/scripts/confirm_ui/static/style_previews/soft-rounded.svgnew file mode 100644index 00000000..04b01cdd--- /dev/null+++ b/skills/ppt-master/scripts/confirm_ui/static/style_previews/soft-rounded.svg@@ -0,0 +1,32 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <defs>+ <filter id="sr-sh" x="-30%" y="-30%" width="160%" height="160%">+ <feDropShadow dx="0" dy="20" stdDeviation="28" flood-color="#1D4ED8" flood-opacity="0.16"/>+ </filter>+ <linearGradient id="sr-ic" x1="0" y1="0" x2="1" y2="1">+ <stop offset="0" stop-color="#60A5FA"/><stop offset="1" stop-color="#2563EB"/>+ </linearGradient>+ </defs>+ <rect width="1280" height="720" fill="#EAF1FB"/>+ <rect x="90" y="96" width="700" height="528" rx="48" fill="#FFFFFF" filter="url(#sr-sh)"/>+ <rect x="140" y="150" width="176" height="54" rx="27" fill="#DBEAFE"/>+ <text x="166" y="186" font-family="Arial, sans-serif" font-size="25" font-weight="600" fill="#2563EB">Overview 04</text>+ <circle cx="184" cy="300" r="48" fill="url(#sr-ic)"/>+ <path d="M162 300l16 16l28 -34" stroke="#fff" stroke-width="8" fill="none" stroke-linecap="round" stroke-linejoin="round"/>+ <text x="256" y="292" font-family="Arial, sans-serif" font-size="60" font-weight="700" fill="#0F172A">Lorem ipsum</text>+ <text x="258" y="344" font-family="Arial, sans-serif" font-size="26" fill="#64748B">Rounded cards · soft shadows · friendly</text>+ <rect x="140" y="424" width="290" height="152" rx="30" fill="#F1F6FE"/>+ <rect x="460" y="424" width="290" height="152" rx="30" fill="#F1F6FE"/>+ <text x="172" y="494" font-family="Arial, sans-serif" font-size="54" font-weight="700" fill="#2563EB">72%</text>+ <text x="172" y="536" font-family="Arial, sans-serif" font-size="22" fill="#64748B">dolor sit</text>+ <text x="492" y="494" font-family="Arial, sans-serif" font-size="54" font-weight="700" fill="#2563EB">1.8x</text>+ <text x="492" y="536" font-family="Arial, sans-serif" font-size="22" fill="#64748B">amet elit</text>+ <rect x="840" y="150" width="350" height="182" rx="40" fill="#FFFFFF" filter="url(#sr-sh)"/>+ <rect x="840" y="382" width="350" height="242" rx="40" fill="#2563EB" filter="url(#sr-sh)"/>+ <circle cx="905" cy="241" r="30" fill="#BFDBFE"/>+ <rect x="955" y="214" width="185" height="20" rx="10" fill="#E2E8F0"/>+ <rect x="955" y="250" width="120" height="16" rx="8" fill="#EDF2F8"/>+ <text x="885" y="474" font-family="Arial, sans-serif" font-size="32" font-weight="700" fill="#fff">Consectetur</text>+ <rect x="885" y="506" width="200" height="64" rx="32" fill="#fff"/>+ <text x="917" y="548" font-family="Arial, sans-serif" font-size="27" font-weight="600" fill="#2563EB">Get started →</text>+</svg>diff --git a/skills/ppt-master/scripts/confirm_ui/static/style_previews/swiss-minimal.svg b/skills/ppt-master/scripts/confirm_ui/static/style_previews/swiss-minimal.svgnew file mode 100644index 00000000..8adc64d9--- /dev/null+++ b/skills/ppt-master/scripts/confirm_ui/static/style_previews/swiss-minimal.svg@@ -0,0 +1,15 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <rect width="1280" height="720" fill="#FFFFFF"/>+ <g stroke="#ECEFF3" stroke-width="1.5">+ <path d="M96 0V720M448 0V720M800 0V720M1152 0V720"/>+ <path d="M0 96H1280M0 624H1280"/>+ </g>+ <path d="M96 96H1184" stroke="#0F172A" stroke-width="3"/>+ <text x="96" y="78" font-family="Helvetica Neue, Arial, sans-serif" font-size="27" letter-spacing="7" fill="#0F172A">SECTION 04</text>+ <text x="1184" y="78" text-anchor="end" font-family="Helvetica Neue, Arial, sans-serif" font-size="27" letter-spacing="3" fill="#9AA3AF">SWISS · GRID</text>+ <text x="94" y="322" font-family="Helvetica Neue, Arial, sans-serif" font-size="128" font-weight="700" fill="#0F172A" letter-spacing="-3">Lorem ipsum</text>+ <text x="98" y="396" font-family="Helvetica Neue, Arial, sans-serif" font-size="38" font-weight="300" fill="#475569">Grid-locked hierarchy, generous whitespace</text>+ <rect x="96" y="470" width="130" height="130" fill="#E4002B"/>+ <text x="1184" y="556" text-anchor="end" font-family="Helvetica Neue, Arial, sans-serif" font-size="200" font-weight="700" fill="#0F172A" letter-spacing="-4">72</text>+ <text x="1184" y="602" text-anchor="end" font-family="Helvetica Neue, Arial, sans-serif" font-size="30" fill="#64748B">aggregate index</text>+</svg>diff --git a/skills/ppt-master/scripts/confirm_ui/static/style_previews/vintage-poster.svg b/skills/ppt-master/scripts/confirm_ui/static/style_previews/vintage-poster.svgnew file mode 100644index 00000000..ee7a441f--- /dev/null+++ b/skills/ppt-master/scripts/confirm_ui/static/style_previews/vintage-poster.svg@@ -0,0 +1,18 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <defs>+ <pattern id="vp-half" width="12" height="12" patternUnits="userSpaceOnUse"><circle cx="6" cy="6" r="2.4" fill="#7C2D12" opacity="0.45"/></pattern>+ </defs>+ <rect width="1280" height="720" fill="#EFD9A8"/>+ <circle cx="890" cy="300" r="180" fill="#E07A3E"/>+ <rect x="710" y="300" width="360" height="180" fill="url(#vp-half)"/>+ <path d="M0 520L240 380L440 520Z" fill="#2E6E5E"/>+ <path d="M320 540L620 340L900 540Z" fill="#245A4C"/>+ <path d="M760 540L1020 400L1280 540V560H760Z" fill="#2E6E5E"/>+ <rect x="0" y="540" width="1280" height="180" fill="#C6612E"/>+ <rect x="0" y="540" width="1280" height="180" fill="url(#vp-half)"/>+ <text x="90" y="180" font-family="Georgia, serif" font-size="26" letter-spacing="8" fill="#7C2D12">EST. 04 · SERIES</text>+ <text x="86" y="296" font-family="Georgia, 'Times New Roman', serif" font-size="120" font-weight="900" fill="#7C2D12">Lorem</text>+ <text x="90" y="352" font-family="Georgia, serif" font-size="27" fill="#8A4B24">Mid-century flat blocks · halftone · warm geometry</text>+ <text x="90" y="628" font-family="Georgia, serif" font-size="40" font-weight="700" fill="#F3E4C4">72% · dolor sit amet</text>+ <rect x="28" y="28" width="1224" height="664" fill="none" stroke="#7C2D12" stroke-width="4"/>+</svg>diff --git a/skills/ppt-master/scripts/confirm_ui/static/style_previews/zine.svg b/skills/ppt-master/scripts/confirm_ui/static/style_previews/zine.svgnew file mode 100644index 00000000..add51977--- /dev/null+++ b/skills/ppt-master/scripts/confirm_ui/static/style_previews/zine.svg@@ -0,0 +1,26 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <defs>+ <pattern id="z-half" width="10" height="10" patternUnits="userSpaceOnUse"><circle cx="5" cy="5" r="2.6" fill="#EC4899"/></pattern>+ <filter id="z-grain" x="0" y="0" width="100%" height="100%">+ <feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="2" stitchTiles="stitch"/>+ <feColorMatrix type="saturate" values="0"/>+ </filter>+ </defs>+ <rect width="1280" height="720" fill="#F6F1E7"/>+ <text x="96" y="248" font-family="Arial Black, Arial, sans-serif" font-size="132" font-weight="900" fill="#2563EB">LOREM</text>+ <text x="86" y="240" font-family="Arial Black, Arial, sans-serif" font-size="132" font-weight="900" fill="#EC4899" opacity="0.85">LOREM</text>+ <circle cx="1010" cy="230" r="150" fill="url(#z-half)"/>+ <circle cx="1010" cy="230" r="150" fill="none" stroke="#2563EB" stroke-width="4"/>+ <circle cx="990" cy="212" r="150" fill="none" stroke="#EC4899" stroke-width="4" opacity="0.7"/>+ <rect x="96" y="322" width="560" height="70" fill="#EC4899"/>+ <rect x="88" y="314" width="560" height="70" fill="#2563EB" opacity="0.55"/>+ <text x="120" y="372" font-family="Courier New, monospace" font-size="30" font-weight="700" fill="#F6F1E7">RISO · 2-COLOR · No.04</text>+ <text x="96" y="466" font-family="Courier New, monospace" font-size="26" fill="#2563EB">Riso offsets · halftone dots</text>+ <text x="96" y="508" font-family="Courier New, monospace" font-size="26" fill="#EC4899">limited colors · print grain</text>+ <g stroke="#111827" stroke-width="4"><path d="M96 556h120M96 592h90"/></g>+ <rect x="760" y="440" width="420" height="200" fill="url(#z-half)" opacity="0.9"/>+ <rect x="752" y="432" width="420" height="200" fill="none" stroke="#2563EB" stroke-width="4"/>+ <text x="792" y="562" font-family="Arial Black, Arial, sans-serif" font-size="92" font-weight="900" fill="#2563EB">72</text>+ <text x="792" y="602" font-family="Courier New, monospace" font-size="22" fill="#111827">PERCENT</text>+ <rect width="1280" height="720" filter="url(#z-grain)" opacity="0.08"/>+</svg>diff --git a/skills/ppt-master/scripts/docs/confirm_ui.md b/skills/ppt-master/scripts/docs/confirm_ui.mdindex 2ecd17c6..48b4010c 100644--- a/skills/ppt-master/scripts/docs/confirm_ui.md+++ b/skills/ppt-master/scripts/docs/confirm_ui.md@@ -8,7 +8,7 @@|---|---|| Step 4 gate and pipeline order | `SKILL.md` || Confirm UI schema | This document |-| Tier 1 / Tier 2 field membership | This document |+| Stage 1 / Stage 2 / Stage 3 field membership | This document || Server launch / wait / shutdown behavior | This document || Port and lock behavior | This document || Chat fallback equivalence | This document |@@ -16,13 +16,14 @@**Hard rule**: Keep detailed Confirm UI behavior here. `SKILL.md` may summarize the orchestration, but it should not duplicate the full JSON schema, catalog behavior, or launcher lifecycle.-**Fallback rule**: Browser failure never cancels Step 4. Re-check `result.json` once, then use the chat confirmation path with the same two-tier semantics.+**Fallback rule**: Browser failure never cancels Step 4. Re-check `result.json` once, then use the chat confirmation path with the same three-stage semantics.## `confirm_ui/server.py````bash-python3 scripts/confirm_ui/server.py <project_path> --daemon --wait # launch + wait for Tier 1-python3 scripts/confirm_ui/server.py <project_path> --wait-only # Tier 2: attach to the running page, wait for the final result+python3 scripts/confirm_ui/server.py <project_path> --daemon --wait # launch + wait for Stage 1+python3 scripts/confirm_ui/server.py <project_path> --wait-only --wait-stage tier2 # Stage 2: wait for the design-system handoff+python3 scripts/confirm_ui/server.py <project_path> --wait-only # Stage 3: wait for the final resultpython3 scripts/confirm_ui/server.py <project_path> --daemonpython3 scripts/confirm_ui/server.py <project_path> --daemon --port 5051python3 scripts/confirm_ui/server.py <project_path> --no-browser@@ -33,7 +34,7 @@ python3 scripts/confirm_ui/server.py <project_path> --shutdown # Step 4 clean- Binds `127.0.0.1:5050` by default — or the next free port if another project already holds it (the launch log prints the actual URL) — and auto-opens the browser (suppress with `--no-browser`). `--port <other>` forces a specific port.- **Shares port 5050 with the live preview server** (`svg_editor/server.py`). The two never run at once: confirm is Step 4, live preview is Step 6, and Step 4 always shuts this server down on exit (see `--shutdown`) so the port is free. One port = one forward rule for the whole pipeline. They still keep **separate processes and locks** (`.confirm_ui.lock` vs `.live_preview.lock`).- `--daemon` starts the Flask process in the background; add `--wait` in the main pipeline so the parent command returns only after the page writes a fresh `result.json`. The `--wait` budget defaults to **590 s** (`--wait-timeout`), kept under the typical 600 s tool ceiling — run the launch with a long tool timeout (≈600000 ms). On timeout the parent returns non-zero but the detached server keeps running, so the caller must re-check `result.json` once before the chat fallback (a slow user may confirm just after the wait returns).-- `--wait-only` is the **second leg of the two-tier flow**: it does **not** launch a server — it attaches to the page already running from the first `--daemon --wait` and blocks until the page writes the **final** result (`stage: "final"`). It keys on the **stage alone** (no mtime gate): this run's tier-1 confirm already left result.json at `stage: "tier1"`, so any `final` is the tier-2 submit — and an mtime gate would race-miss a user who confirms tier 2 before this wait is issued. Same `--wait-timeout` budget; on timeout / server-gone it returns non-zero and the caller re-checks `result.json` once before the chat fallback.+- `--wait-only` does **not** launch a server — it attaches to the page already running from the first `--daemon --wait` and blocks until the page writes the requested stage. Use `--wait-stage tier2` for the middle design-system handoff, then the default `--wait-stage final` for the final Stage-3 confirmation. It keys on the **stage alone** (no mtime gate), because a user may submit before this wait command is issued. Same `--wait-timeout` budget; on timeout / server-gone it returns non-zero and the caller re-checks `result.json` once before the chat fallback.- `--shutdown` stops a confirm server left running for this project and exits — **idempotent** (a no-op when nothing is running). Tries a graceful `/api/shutdown`, falls back to killing the recorded pid, then clears the lock. SKILL.md Step 4 runs this on every path (page-confirm or chat-fallback) so the page never lingers on the shared port before live preview starts.- Refuses to start unless `<project_path>/confirm_ui/recommendations.json` exists (except `--shutdown`, which needs no recommendations).- Per-project lock at `<project_path>/.confirm_ui.lock` — duplicate launches are refused; stale locks (dead pid) are overwritten.@@ -48,6 +49,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 (custom canvas size, bespoke narrative mode, self-provided icon system, etc.). `visual_style` additionally honors an optional `visual_style_spectrum` that badges a 3-pick personality spectrum (safe / shifted / bold, each with a temperament tag + analogy) in place of the single recommendation — see the schema below.+- **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** — 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. Use pipeline vocabulary: icon ids are actual library ids such as `tabler-outline`, or `emoji` for system emoji.- **Generative (open)** — color, typography, generated-image style. No finite catalog; the AI authors **≥3 candidates** the page renders as cards (never a single option — creative fields must offer real choice; fewer than 3 only on the honest-shortfall exception). `page_count`, `audience`, and `content_divergence` are free inputs (`content_divergence` is a free-text intent shown under audience in §c, not a fixed-option field).@@ -64,17 +66,18 @@ The front-end loads `/api/catalogs` (served by the confirm server) and falls bacBoth files live under `<project_path>/confirm_ui/`.-### Two-tier flow+### Three-stage flow-The page runs as a **two-tier wizard in one browser session**. `recommendations.json` carries a top-level `"tier"`:+The page runs as a **three-stage wizard in one browser session**. `recommendations.json` carries a top-level `"tier"` as the internal stage selector retained for backward compatibility:-| `tier` | Page renders | Button | On submit |+| Internal `tier` | Page renders | Button | On submit ||---|---|---|---|-| `1` | anchors — canvas, audience + `content_divergence` + `delivery_purpose` *(PPT only — omitted on non-PPT canvases, not written to the result)* (all in the §c key-info area), mode + visual_style | **Next** | writes `result.json` `{ stage: "tier1", status: "tier1-confirmed", <anchors> }`; the page does **not** close — it shows a "deriving…" state and polls `GET /api/recommendations` |-| `2` | realization — page count, color, typography, icons, formula, image usage + generated-image style, generation mode, refine spec | **Confirm** | writes `result.json` `{ stage: "final", status: "confirmed", <all fields> }`, then shuts the page down |+| `1` | direction anchors — canvas, audience + `content_divergence` + `delivery_purpose` *(PPT only — omitted on non-PPT canvases, not written to the result)*, mode + visual_style | **Next** | writes `result.json` `{ stage: "tier1", status: "tier1-confirmed", <anchors> }`; the page does **not** close — it shows a "deriving…" state and polls `GET /api/recommendations` |+| `2` | design system — page count, color, icons, typography, formula policy | **Next** | writes `result.json` `{ stage: "tier2", status: "tier2-confirmed", <anchors + design system> }`; the page stays open and polls for Stage 3 |+| `3` | images and execution — image usage + generated-image style, 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 Tier 1 (`--daemon --wait`), reads the tier-1 result, **re-derives** the realization candidates from the user's actual anchors, overwrites `recommendations.json` with `"tier": 2` (realization fields only — it need not echo the anchors), and re-attaches with `--wait-only`. The page preserves the user's Tier 1 selections across the transition (single JS session). `GET /api/recommendations` is served `no-store` so the poll sees the tier-2 overwrite, and when `tier == 2` the server **folds the confirmed anchors from `result.json` back into the payload** (`recommend.canvas` / `mode` / `visual_style` / `delivery_purpose`, plus `audience` / `content_divergence` values) — so a **page refresh / reopen on Tier 2 re-initializes the anchors from the user's choices** instead of catalog defaults, even though those sections are not rendered on the Tier-2 page.+The AI launches Stage 1 (`--daemon --wait`), reads the stage-1 result, **re-derives** the design-system candidates from the user's actual anchors, overwrites `recommendations.json` with `"tier": 2`, and re-attaches with `--wait-only --wait-stage tier2`. After the Stage-2 result, it **re-derives** image and execution recommendations from the confirmed anchors + design system, overwrites `recommendations.json` with `"tier": 3`, and re-attaches with `--wait-only` for the final result. The page preserves earlier selections across transitions (single JS session). `GET /api/recommendations` is served `no-store` so polls see overwrites; on later stages the server folds already-confirmed choices from `result.json` back into the payload so a refresh / reopen re-initializes from the user's actual choices even though those sections are no longer rendered.### Input — `recommendations.json` (written by Strategist before launch)@@ -143,7 +146,7 @@ The AI launches Tier 1 (`--daemon --wait`), reads the tier-1 result, **re-derive}```-> Each `candidates` array above shows **one** entry for brevity — the creative fields (`color`, `typography`, `image_strategy`) must each carry **≥3** in a real file (see the rule above); `selected` indexes the recommended default.+> Each `candidates` array above shows **one** entry for brevity — `color` and `typography` must each carry **≥3** in a real file, while `image_strategy.candidates` should carry **exactly 3 non-custom recommendation** entries when AI image generation is offered. The UI adds the fourth **Custom** card itself; `selected` indexes the recommended default among the recommendation entries.- `recommend.*` names the recommended `id` for each enumerable field (must match a `catalogs.json` id, or be a free string for a recommended custom value). The page badges and pre-selects it. **Guarantee**: if a `recommend.*` is omitted, the page falls back to the first catalog option so every enumerable field always shows one badged recommendation — but the AI should still set them for a meaningful default. Legacy aliases are accepted for old files (`line` → `tabler-outline`, `filled` → `tabler-filled`, `monochrome` → `chunk-filled`, `search` → `web`, `default` → `auto`, `builtin` → `host-native`), but new files should write canonical ids.- `recommend.image_usage` should be an array of source ids when more than one source applies, e.g. `["ai", "provided"]`. A single string is still accepted for backward compatibility. Do not write bare `"custom"` and do not encode a mixed-source plan as prose here; write the prose to top-level `image_notes.value`.@@ -153,9 +156,9 @@ The AI launches Tier 1 (`--daemon --wait`), reads the tier-1 result, **re-derive- **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 `font-family` stack. The page previews CJK sample text with `cjk + css` and Latin sample text with `latin + css`, so the two script choices are visible independently. Each candidate should include topic-matched `sample_heading`, `sample_heading_latin`, `sample_body`, and `sample_body_latin`; do not reuse unrelated fixed examples such as a digital-transformation headline for a travel, education, product, or brand deck. Each candidate should also include `body_size` — the body baseline in **px** (the system's only unit, every canvas). The initial value comes from the candidate's `body_size`, sized for the recommended delivery purpose: `text` ~20 · `balanced` ~24 · `presentation` ~32. On submit the page writes `typography.body_size` as px directly — no pt conversion, no `body_size_pt` provenance. The page exposes `body_size` as an editable numeric field whose hint shows the recommended size — **one fixed px per delivery purpose on PPT (`text` 20 · `balanced` 24 · `presentation` 32), not a range** (non-PPT ≈2.5–3.3% of height in px). The user may still edit it; an out-of-range flag only warns if the value strays far (e.g. a unit mistake). **Inputs are independent — the hint updates with canvas / delivery purpose but never rewrites a value the user can see.** It also offers a custom typography text box so the user is not limited to the proposed candidates.- **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. 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`** (enumerable, PPT only) is the primary driver of the body baseline: `text` (read-close), `balanced` (business, the default), `presentation`. It is surfaced in the **§c key-information area** (beside audience, Tier 1) as a consumption-mode choice; the Tier-2 typography section then reads the confirmed value for the recommended body px — the pick itself does not rewrite the body field (inputs are independent). `recommend.delivery_purpose` pre-selects one (default `balanced`); the user's pick writes back to `result.json.delivery_purpose` as a plain id. Strategist uses it to set the px body baseline — **one fixed px per purpose (`text` 20 · `balanced` 24 · `presentation` 32), not a range** (see [strategist.md §g](../../references/strategist.md)). Non-PPT canvases omit it.+- **`delivery_purpose`** (enumerable, PPT only) is the primary driver of the body baseline: `text` (read-close), `balanced` (business, the default), `presentation`. It is surfaced in the **§c key-information area** (beside audience, Stage 1) as a consumption-mode choice; the Stage-2 typography section then reads the confirmed value for the recommended body px — the pick itself does not rewrite the body field (inputs are independent). `recommend.delivery_purpose` pre-selects one (default `balanced`); the user's pick writes back to `result.json.delivery_purpose` as a plain id. Strategist uses it to set the px body baseline — **one fixed px per purpose (`text` 20 · `balanced` 24 · `presentation` 32), not a range** (see [strategist.md §g](../../references/strategist.md)). 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 style candidates** live in `image_strategy.candidates` and are shown only when `image_usage` includes `ai`. Each candidate records `rendering`, `palette`, and short `visual` / `color` / `mood` lines from Strategist h.5. The chosen value is written to `result.json.image_strategy`; it is omitted when generated images are not part of the plan.+- **Generated image style candidates** live in `image_strategy.candidates` and are shown only when `image_usage` includes `ai`. Each candidate records `rendering`, `palette`, and short `visual` / `color` / `mood` lines from Strategist h.5. Author **exactly three non-custom recommendation candidates** here; the page displays those three, then appends one built-in **Custom** card. If extra candidates are present, the page shows only the first three non-custom entries. When `rendering` / `palette` match files under `references/ai-image-comparison/`, the left preview pane displays those reference PNGs for the selected candidate; when AI image generation is not selected, that left preview is hidden. The right-side option cards stay text-first and do not duplicate the gallery. The **Custom** card lists all reference-gallery `rendering` and `palette` ids from `ai-image-comparison/*/_manifest.json`, plus `custom` as a prose-only tail choice. If either selected dimension is `custom`, the preview intentionally falls back to prose and shows no reference image. `palette` means color behavior only — final AI image HEX values follow the confirmed `color` choice above. The chosen value is written to `result.json.image_strategy`; it is omitted when generated images are not part of the plan.- **`visual_style_spectrum`** (optional) lets the AI surface the deck's aesthetic as a **personality spectrum** instead of one badged style. Each entry is `{ "id", "tag_zh"/"tag_en"/"tag_ja", "note_zh"/"note_en"/"note_ja" }` (include the `_ja` variants when `lang` is `ja`) where `id` is a real `visual_styles` catalog id; the page badges those chips with their temperament `tag` (replacing the single ★) and appends the `note` (a real-world analogy) inline. The full grouped style list and Custom box stay visible below, and `recommend.visual_style` is still the pre-selected default (it should equal the spectrum's safe pick). Author **≥3** spanning safe / shifted / bold (mirrors h.5; honest-shortfall exception applies — fewer only when the constraints genuinely cannot yield 3). The user's pick still writes back to `result.json.visual_style` as a plain id; the spectrum is presentation-only. Omit the field to fall back to the single-recommendation badge.- `recommend.generation_mode` and `refine_spec` mirror the two mandatory notes in SKILL.md Step 4. Confirmed `generation_mode: "split"` / `refine_spec: true` are explicit user choices, equivalent to opting in through chat.- `content_divergence` is a **free-text** field shown right under the audience box in §c — the user states in their own words how closely to follow the source vs how freely to reshape it (e.g. "stick closely to the document" / "freely restructure and expand within the source"). It is **not** a fixed-option field; blank means a balanced default. Whatever the level, facts stay sourced — reshaping develops what is in the source, never imports facts from outside it. The Strategist consumes the prose when authoring the §IX outline and records it in `design_spec.md §I`; it is **not** written to `spec_lock.md` (the Executor never reads it). It carries no page-count coupling and no source-signal recommendation — it is purely the user's stated intent. Beautify / template-fill keep content verbatim and do not surface this field.@@ -188,11 +191,11 @@ The AI launches Tier 1 (`--daemon --wait`), reads the tier-1 result, **re-derive}```-The shape above is the **final** (Tier 2) result, carrying all Tier 1 + Tier 2 fields. The intermediate **Tier 1** write carries only the anchor fields plus `"stage": "tier1"`, `"status": "tier1-confirmed"`; the AI reads it to re-derive Tier 2 and never treats it as the final confirmation. A legacy single-pass write has no `stage` (or `stage: "final"`) and `status: "confirmed"`.+The shape above is the **final** (Stage 3) result, carrying Stage 1 anchors, Stage 2 design-system fields, and Stage 3 image / execution fields. The intermediate **Stage 1** write carries only the anchor fields plus `"stage": "tier1"`, `"status": "tier1-confirmed"`; the AI reads it to re-derive Stage 2 and never treats it as the final confirmation. The intermediate **Stage 2** write carries anchors + design-system fields plus `"stage": "tier2"`, `"status": "tier2-confirmed"`; the AI reads it to re-derive Stage 3 and never treats it as final. A legacy single-pass write has no `stage` (or `stage: "final"`) and `status: "confirmed"`.- 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** (Tier 2, or single-pass), the page saves `result.json` and shuts the server down (auto-close). A Tier-1 **Next** instead keeps the page open (it polls for the re-derived Tier 2). In the default flow, the first `--daemon --wait` returns on the tier-1 result and the second `--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 and Stage-2 **Next** 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 tier2` 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