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
fix(confirm-ui): honor chat-selected confirmation flow
hugohe3ccb179fbe21d
diff --git a/skills/ppt-master/references/strategist.md b/skills/ppt-master/references/strategist.mdindex d2ff2cb2..d0acc4d0 100644--- a/skills/ppt-master/references/strategist.md+++ b/skills/ppt-master/references/strategist.md@@ -38,7 +38,7 @@ Do not force communication intent into one catalog label; Stage 1 records compos>> **One opt-in exception**: present the refinement line with the split-mode note ([`generate-pptx.md`](../workflows/generate-pptx.md) Step 4). Only explicit opt-in runs [`refine-spec`](../workflows/stages/refine-spec.md): write the Design Spec once, pass Gate 1, then stop before the lock for unrestricted chat revision. Never enter it unprompted.-> **Default presentation surface — Confirm UI.** Use `<project>/confirm_ui/recommendations.stage1.json`, `.stage2.json`, and `.stage3.json`; launch per Generate Step 4. Stage 1 writes canonical BCP-47 `primary_language` apart from UI `lang`; the server normalizes legacy English/Chinese/Japanese/Korean names, rejecting `und` and Chinese without script/region; Strategist projects it through Design Spec §I to lock communication. Replace only the active unconfirmed stage; preserve confirmed files. Stage 2 carries ≥3 safe / shifted / bold `design_directions`; each bundles visual style, a six-role HEX palette, primary-language heading/body typography plus an English companion only for non-English decks, icons, and conditional image rendering. Print the URL, Stage-1 summary, and `confirm_ui.md` chat fallback; this is not confirmation. Skip launch only for explicit chat-only use; chat-question tools are no substitute. Step 4 reads final confirmed `result.json` once for Design Spec authoring. [`confirm_ui.md`](../scripts/docs/confirm_ui.md) owns schema and lifecycle.+> **Default presentation surface — Confirm UI.** Before launch, apply [`confirm_ui.md`](../scripts/docs/confirm_ui.md)'s sticky per-run surface decision; its explicit chat branch skips every UI command, and a chat selection after UI launch follows its in-run switch procedure. Chat-question tools alone do not select a branch. In the UI branch, use `<project>/confirm_ui/recommendations.stage1.json`, `.stage2.json`, and `.stage3.json`; replace only the active unconfirmed stage, preserve confirmed files, and print the URL plus Stage-1 summary/fallback without treating that handoff as confirmation. Stage 1 writes canonical BCP-47 `primary_language` apart from UI `lang`; Strategist projects it through Design Spec §I to lock communication. Stage 2 carries ≥3 safe / shifted / bold `design_directions`, each bundling visual style, a six-role HEX palette, primary-language heading/body typography plus an English companion only for non-English decks, icons, and conditional image rendering. Step 4 retains final confirmation from the selected channel for Design Spec authoring. `confirm_ui.md` owns schema and lifecycle.**Confirmed-value semantics**: confirmation preserves both the value and the owning field's semantic type. Apply the type to the affected property, not automatically to the whole object:diff --git a/skills/ppt-master/scripts/docs/confirm_ui.md b/skills/ppt-master/scripts/docs/confirm_ui.mdindex 42f6654d..620e14b7 100644--- a/skills/ppt-master/scripts/docs/confirm_ui.md+++ b/skills/ppt-master/scripts/docs/confirm_ui.md@@ -16,7 +16,46 @@**Hard rule**: Keep detailed Confirm UI behavior here. The Generate route may summarize orchestration, but it should not duplicate the full JSON schema, catalog behavior, or launcher lifecycle.-**Fallback rule**: The page is default. Use chat on an explicit chat-only request, when the user answers the always-on handoff in chat, or after launch failure/timeout and one `result.json` re-check; a chat-question tool alone is not a launch failure. Preserve all three stages and keep Stage-1 prompts open-ended.+**Mandatory surface decision — before any UI command**: Resolve the most recent+explicit confirmation-surface instruction for this run before running+`--daemon` or `--wait-only`. Unrelated later messages do not reset the selected+branch. A new explicit selection may change it before launch; once confirmation+starts in chat or UI switches to chat, keep chat for the rest of this run.++| Most recent explicit surface instruction | Branch |+|---|---|+| The user explicitly delegates confirmation | Present one complete delegated three-stage summary in chat. Do not launch the page or fabricate `result.json`. |+| Otherwise, the user asks for or agrees to personally confirm in chat, or declines the confirmation page | Use chat for all three stages. Do not launch the page, run `--wait-only`, or require a UI-authored `result.json`. |+| No explicit confirmation-surface instruction exists for this run | Use the page as the default. |++Interpret the instruction semantically: “confirm here”, “use the chat window”, or+“do not open the confirmation page” are sufficient; no literal `chat-only`+keyword is required. Invoking a chat-question tool by itself does not select the+chat branch—the user's instruction does. Both branches preserve the same three+stages and confirmed-value semantics.++**Fallback rule**: When no surface was selected before launch, the page is the+default. Use chat when the user answers the always-on handoff in chat, or after+launch failure/timeout and one `result.json` re-check. A chat-question tool+alone is not a launch failure. Preserve all three stages and keep Stage-1+prompts open-ended.++**In-run UI → chat switch — any stage**: If the user explicitly selects chat+after the UI server has launched—while `--wait-only` is active, before that wait+starts, or after it times out while the server remains live:++1. If a wait is active, interrupt it and confirm that its process has exited.+ Only the return code from this deliberate wait interruption is expected to+ be non-zero.+2. Run `server.py <project_path> --shutdown` and require that cleanup to+ succeed. The browser tab may remain open, but its stopped server makes it+ inactive.+3. Re-check `result.json` once for the current stage. Retain only values whose+ confirmation was persisted before shutdown; an unsubmitted browser draft is+ not confirmed.+4. Continue the unresolved current stage and every remaining stage in chat. Do+ not call `--wait-only` again, recover the server, or relaunch the page during+ this run.**Always-on Stage-1 chat handoff**: Launch the healthy daemon without `--wait`.After it returns, immediately post its actual URL plus one compact, localized@@ -27,13 +66,15 @@ changing its value. End with an explicit localized line saying that, if thepage did not open or cannot be reached, the user may reply “continue with theserecommendations” or revise the same items directly in chat; the same three-stageflow will continue. Only then run `--wait-only --wait-stage stage1`. A chat-reply selects the chat path without waiting for timeout. The handoff is context,-not confirmation, and silence confirms nothing. After launch failure/timeout-and the required result re-check, present the same items as open Stage-1 chat-questions and wait for an explicit response.+reply to that handoff applies the in-run switch above without waiting for+timeout. The handoff is context, not confirmation, and silence confirms+nothing. After launch failure/timeout and the required result re-check, present+the same items as open Stage-1 chat questions and wait for an explicit response.## `confirm_ui/server.py`+The following launch and wait commands belong to the **UI branch only**:+```bashpython3 scripts/confirm_ui/server.py <project_path> --daemon # healthy launch; return for chat handoffpython3 scripts/confirm_ui/server.py <project_path> --wait-only --wait-stage stage1 # Stage 1diff --git a/skills/ppt-master/scripts/prompt_audit_manifest.json b/skills/ppt-master/scripts/prompt_audit_manifest.jsonindex 96ff9fdf..35ffbecf 100644--- a/skills/ppt-master/scripts/prompt_audit_manifest.json+++ b/skills/ppt-master/scripts/prompt_audit_manifest.json@@ -12,7 +12,7 @@"skills/ppt-master/templates/schemas/*.json"],"exclude": [],- "max_tokens": 394933+ "max_tokens": 395804},"file_budgets": {"AGENTS.md": 2400,@@ -170,7 +170,7 @@"registry": "visual-styles"}],- "max_tokens": 62475+ "max_tokens": 62962},"route.generate.quick-generate": {"description": "Explicit non-interactive Generate path with conditional source/resource preparation and the complete SVG visual-construction authorities.",@@ -186,7 +186,7 @@"skills/ppt-master/references/svg-effects.md","skills/ppt-master/references/native-shape-authoring.md"],- "max_tokens": 53797+ "max_tokens": 53885},"route.generate.quick-generate.topic-research": {"description": "Quick Generate with gap-targeted factual research before direct resource preparation and SVG authoring.",@@ -196,7 +196,7 @@"stage.generate.topic-research"],"files": [],- "max_tokens": 55297+ "max_tokens": 55397},"route.generate.quick-generate.icon": {"description": "Quick Generate with project-local bundled icon selection and synchronization.",@@ -207,7 +207,7 @@"files": ["skills/ppt-master/templates/icons/README.md"],- "max_tokens": 55697+ "max_tokens": 55797},"route.generate.quick-generate.in-hand-image": {"description": "Quick Generate with supplied, extracted, or placeholder image resources prepared before SVG authoring.",@@ -217,7 +217,7 @@"stage.generate.executor.image"],"files": [],- "max_tokens": 63744+ "max_tokens": 63930},"route.generate.quick-generate.formula": {"description": "Quick Generate with manifest-driven formula rendering and formula-image realization.",@@ -229,7 +229,7 @@"files": ["skills/ppt-master/scripts/docs/image.md"],- "max_tokens": 66946+ "max_tokens": 67116},"route.generate.quick-generate.ai-two-types": {"description": "Quick Generate with AI resource preparation, representative rendering inputs, and two local image types.",@@ -240,7 +240,7 @@"stage.generate.executor.image"],"files": [],- "max_tokens": 86871+ "max_tokens": 87035},"route.generate.quick-generate.web-image": {"description": "Quick Generate with web resource preparation, provenance, attribution, and image execution.",@@ -251,7 +251,7 @@"stage.generate.executor.web-image"],"files": [],- "max_tokens": 71521+ "max_tokens": 71683},"route.generate.planning-image": {"description": "Generate-PPTX planning context after a non-none image source is proposed or confirmed, including the compact layout math and vocabulary.",@@ -261,7 +261,7 @@"stage.generate.strategist.image"],"files": [],- "max_tokens": 70575+ "max_tokens": 71244},"route.generate.planning-formula": {"description": "Formula-only planning context, including the shared image/formula layout math and vocabulary.",@@ -271,7 +271,7 @@"stage.generate.strategist.image"],"files": [],- "max_tokens": 70575+ "max_tokens": 71244},"route.generate.planning-ai": {"description": "Generate-PPTX planning when AI image direction is available, including representative multi-source custom rendering synthesis.",@@ -291,7 +291,7 @@"registry": "image-renderings"}],- "max_tokens": 74825+ "max_tokens": 75486},"stage.generate.apply-template-workspace": {"description": "Conditional Step 3 workspace validation, installation, and fusion framework.",@@ -403,7 +403,7 @@"stage.generate.executor.notes"],"files": [],- "max_tokens": 104598+ "max_tokens": 105262},"route.generate.flat-ai-two-types": {"description": "Generate-PPTX context with AI images, representative multi-source custom rendering, and two local types.",@@ -461,7 +461,7 @@"profile.generate.beautify-pptx"],"files": [],- "max_tokens": 111523+ "max_tokens": 112269},"route.generate.flat-no-image-chart": {"description": "Default flat Generate-PPTX path with chart authoring, native-data replacement, and verification.",@@ -474,7 +474,7 @@"stage.generate.verify-charts"],"files": [],- "max_tokens": 128923+ "max_tokens": 129598},"route.generate.brand-flat-no-image": {"description": "Brand-preset flat Generate-PPTX path without image acquisition.",@@ -486,7 +486,7 @@"stage.generate.template.brand"],"files": [],- "max_tokens": 111623+ "max_tokens": 112294},"route.generate.deck-structured-no-image": {"description": "Deck-preset structured Generate-PPTX path without image acquisition.",@@ -498,7 +498,7 @@"stage.generate.template.deck"],"files": [],- "max_tokens": 121573+ "max_tokens": 122231},"route.generate.layout-structured-no-image": {"description": "Layout-preset structured Generate-PPTX path without image acquisition.",@@ -510,7 +510,7 @@"stage.generate.template.layout"],"files": [],- "max_tokens": 122023+ "max_tokens": 122680},"route.generate.topic-only-flat-no-image": {"description": "Topic research followed by the default flat no-image Generate-PPTX path.",@@ -520,7 +520,7 @@"route.generate.flat-no-image"],"files": [],- "max_tokens": 106098+ "max_tokens": 106774},"stage.generate.executor.flat": {"description": "Incremental flat Executor core with complete visual-construction authorities and representative multi-source custom mode/style execution.",@@ -622,7 +622,7 @@"skills/ppt-master/workflows/stages/resume-execute.md","skills/ppt-master/references/artifact-ownership.md"],- "max_tokens": 67448+ "max_tokens": 67622},"stage.generate.resume-execute-image": {"description": "Fresh-session resume when the locked resource plan contains image rows.",@@ -648,7 +648,7 @@"files": ["skills/ppt-master/workflows/profiles/beautify-pptx.md"],- "max_tokens": 6950+ "max_tokens": 7007},"stage.generate.refine-spec": {"description": "Explicit post-confirmation spec refinement runbook.",@@ -734,7 +734,7 @@"files": ["skills/ppt-master/workflows/governance/failure-recovery.md"],- "max_tokens": 2725+ "max_tokens": 2829},"stage.shared.conversion-reference": {"description": "Conditional source-conversion and import compatibility reference.",@@ -768,7 +768,7 @@"stage.generate.strategist.template"],"files": [],- "max_tokens": 64550+ "max_tokens": 65038},"route.generate.planning-template-ai": {"description": "Explicit template workspace plus confirmed AI-image planning.",diff --git a/skills/ppt-master/workflows/generate-pptx.md b/skills/ppt-master/workflows/generate-pptx.mdindex f55bbc7d..7fe96ffe 100644--- a/skills/ppt-master/workflows/generate-pptx.md+++ b/skills/ppt-master/workflows/generate-pptx.md@@ -190,9 +190,23 @@ The core chooses proposed Stage 2 source ids first. Load this bundle for a non-`**Confirmation orchestration**: field meaning and recommendation logic belong to the active Strategist modules; [`confirm_ui.md`](../scripts/docs/confirm_ui.md) owns the JSON schema, server lifecycle, staged-result contract, port behavior, and equivalent chat fallback.-⛔ **BLOCKING**: Unless explicitly delegated, final confirmation is the single always-on user gate. An enabled `refine_spec` adds the one conditional chat gate after Design Spec Gate 1. Keep Stage 1/2 handoffs in one turn; after each wait, author the next stage without chat. Author each stage once; submitted values—including blanks or unusual overrides—are authoritative.--**Confirmation ownership and surface**: Only the user confirms. Fresh Stage 1 launches, posts the required chat handoff, then waits. Use chat on explicit chat-only/delegation, explicit handoff confirmation/revision, or launch failure/timeout plus one `result.json` re-check. Chat tools do not replace the default launch. The agent may write recommendations, operate the server, and read state, but MUST NOT call `/api/confirm`, automate submission, synthesize a payload, or write/replace `result.json`. Delegation applies only to this run: show the complete three-stage summary and never fabricate UI results. Silence confirms nothing.+⛔ **BLOCKING**: Unless explicitly delegated, the three-stage Strategist confirmation is the single always-on user gate. An enabled `refine_spec` adds the one conditional chat gate after Design Spec Gate 1. In the UI branch, keep Stage 1/2 handoffs in one turn and author the next stage after each wait. In the chat branch, wait for an explicit user response at each stage. Author each stage once; submitted values—including blanks or unusual overrides—are authoritative.++**Confirmation ownership and surface**: Only the user confirms. Before any+server command, apply `confirm_ui.md`'s surface decision to this run's most+recent explicit surface instruction and retain that branch as the owner+specifies. A natural-language request or agreement to personally confirm in+chat, or to avoid the page, selects the chat branch without a magic keyword;+skip `--daemon`, every `--wait-only`, and UI `result.json`. Explicit delegation+is a separate higher-priority branch. With no surface instruction, fresh Stage+1 uses the default UI branch: launch, post the required chat handoff, then wait.+A chat-question tool alone does not replace that default. The agent may write+recommendations, operate the server, and read state, but MUST NOT call+`/api/confirm`, automate submission, synthesize a payload, or write/replace+`result.json`. Delegation applies only to this run: show the complete+three-stage summary and never fabricate UI results. Silence confirms nothing.++**UI branch files and completion evidence:**| Stage file (the active unconfirmed stage may be overwritten) | Strategist writes | Completion evidence ||---|---|---|@@ -202,7 +216,9 @@ The core chooses proposed Stage 2 source ids first. Load this bundle for a non-`If the user rejects the current recommendation before confirming it, regenerate by overwriting that same stage file and have the page refresh; do not create revision-suffixed files. This never authorizes one stage file to carry another stage's payload.-1. Create `confirm_ui/recommendations.stage1.json`, then run in order:+**UI branch only** — create `confirm_ui/recommendations.stage1.json`, then:++1. Run in order:```bashpython3 ${SKILL_DIR}/scripts/confirm_ui/server.py <project_path> --daemon@@ -230,7 +246,18 @@ If the user rejects the current recommendation before confirming it, regeneratepython3 ${SKILL_DIR}/scripts/confirm_ui/server.py <project_path> --shutdown```-If the user opted out of the page but did not delegate confirmation, skip launch and run the same three stages in chat with explicit user responses. If the user explicitly delegated confirmation, consolidate the same three stages into one AI-authored summary and proceed without `result.json`. Otherwise use the always-on Stage-1 chat handoff; it keeps the current contract and direct-chat fallback visible without replacing UI confirmation.+If the user selects chat any time after the UI server launches, immediately+apply `confirm_ui.md`'s in-run switch procedure. Continue the unresolved current+stage and all remaining stages in chat; do not enter UI interruption recovery+or relaunch the server.++**Chat branch** — run the same three stages in chat with explicit user+responses, retaining one visible cumulative confirmation summary as the+equivalent final state; do not create or require a UI result. If the user+explicitly delegated confirmation, consolidate the same three stages into one+AI-authored summary. Otherwise the no-selection UI branch uses the always-on+Stage-1 chat handoff, which keeps direct-chat fallback visible without replacing+UI confirmation.⛔ **GATE — final state → Design Spec → conditional review → lock.** Consume every present final value once into the complete, audited `design_spec.md` under [`strategist.md`](../references/strategist.md) §6.2. Preserve each owning semantic type and all production, typography, image-source, and `image_notes` obligations; acceptance never turns a Reference/Permission into a Literal. Do not reopen `result.json`.diff --git a/skills/ppt-master/workflows/governance/failure-recovery.md b/skills/ppt-master/workflows/governance/failure-recovery.mdindex 1adb269b..f240ffa0 100644--- a/skills/ppt-master/workflows/governance/failure-recovery.md+++ b/skills/ppt-master/workflows/governance/failure-recovery.md@@ -16,7 +16,8 @@ Global stop/continue rules for all four top-level routes, plus concrete failure|---|---:|---|---|---|| Confirm UI launch failure | No | Re-check `confirm_ui/result.json` once, then use chat fallback | No | [`generate-pptx`](../generate-pptx.md) Step 4 chat confirmation || Confirm UI wait timeout | No, if no final result yet | Re-check `result.json` once; keep server cleanup mandatory | Only if user still wants the page | Step 4 same stage or chat fallback |-| Confirm UI Stage 1 completed then interrupted | Yes until Stage 2 is written/confirmed | Read existing Stage 1 `result.json`, create `recommendations.stage2.json` without changing Stage 1, then `--wait-only --wait-stage stage2` | Usually no | Step 4 Stage 2 write/wait |+| User explicitly switches from Confirm UI to chat during any stage | Yes until the unresolved current stage is confirmed | Follow [`confirm_ui.md`](../../scripts/docs/confirm_ui.md)'s in-run switch, retain persisted confirmed stages, then continue the current and remaining stages in chat; never relaunch UI | Confirm in chat unless explicitly delegated | Step 4 current chat stage |+| Confirm UI Stage 1 completed then unexpectedly interrupted while UI remains selected | Yes until Stage 2 is written/confirmed | Read existing Stage 1 `result.json`, create `recommendations.stage2.json` without changing Stage 1, then `--wait-only --wait-stage stage2` | Usually no | Step 4 Stage 2 write/wait || Missing final confirmation | Yes | None | User must confirm or change the values | Step 4 final confirmation || Final confirmed value or a later explicit user override is missing, changed, substituted, or weakened in `design_spec.md` | Yes | Repair from the retained final-confirmation object plus any newer explicit instruction; only a fresh recovery turn with no retained state reads persisted final evidence once | Only when the effective value genuinely cannot be honored | Step 4 Gate 1 — confirmation fidelity || `spec_lock.md` changes confirmed identity or omits a required execution anchor/routing decision | Yes | Re-author the affected lock rows from the completed Design Spec and current context; do not enumerate page-local literals | No unless the Design Spec itself is incomplete | Step 4 Gate 2 — lock context fidelity |@@ -72,10 +73,14 @@ outcomes/provenance only in Design Spec §I, never the lock.Here, **final confirmation evidence** means either the explicit final confirmation in the current chat or `<project>/confirm_ui/result.json` with `status: confirmed` and `stage: final`. Planning artifacts alone do not prove that the user confirmed their values. After that gate, a newer explicit user instruction may update only its effective production outcome and provenance in the durable Design Spec; resume from the owning step without reopening Confirm UI.+The UI wait resume entries below apply only while UI remains the selected+surface. A newer explicit chat-surface instruction follows `confirm_ui.md`'s+in-run switch and resumes the unresolved stage in chat without relaunching UI.+| Last good state | Resume from ||---|---|-| Stage 1 confirmation exists, Stage 2 missing | Create `recommendations.stage2.json` without changing Stage 1, then `confirm_ui/server.py <project> --wait-only --wait-stage stage2` |-| Stage 2 confirmation exists, final confirmation missing | Resume [`generate-pptx`](../generate-pptx.md) Step 4 confirmation orchestration at Stage 3: derive production mechanics from the confirmed solution, create `recommendations.stage3.json` without changing earlier stages, then perform the final wait. |+| Stage 1 confirmation exists, Stage 2 missing, and UI remains selected | Create `recommendations.stage2.json` without changing Stage 1, then `confirm_ui/server.py <project> --wait-only --wait-stage stage2` |+| Stage 2 confirmation exists, final confirmation missing, and UI remains selected | Resume [`generate-pptx`](../generate-pptx.md) Step 4 confirmation orchestration at Stage 3: derive production mechanics from the confirmed solution, create `recommendations.stage3.json` without changing earlier stages, then perform the final wait. || Final confirmation evidence exists; `design_spec.md` is missing, with or without a surviving `spec_lock.md` | Return to Generate Step 4 and [`strategist.md`](../../references/strategist.md) §6.2; read final evidence once into the fresh context, read [`design_spec_reference.md`](../../templates/design_spec_reference.md), author the complete `design_spec.md` from scratch using that state plus source analysis, and pass Gate 1. Then read [`spec_lock_reference.md`](../../templates/spec_lock_reference.md) and re-author the complete `spec_lock.md` from the audited Design Spec plus current context, replacing any orphan lock. Never reconstruct the Design Spec from an orphan lock or retain orphan-lock choices as authority. || Final confirmation evidence exists; `design_spec.md` exists and `spec_lock.md` missing | Return to Generate Step 4; in this fresh recovery context read final evidence once to audit the existing Design Spec, then read [`spec_lock_reference.md`](../../templates/spec_lock_reference.md) and author the complete lock from the audited Design Spec plus current context. || Final confirmation evidence and both planning artifacts exist, but Gate 1 fails | In a fresh recovery context read final evidence once, repair `design_spec.md`, then re-author every affected lock row. Do not reopen recommendations or infer a replacement from the current lock. |diff --git a/skills/ppt-master/workflows/profiles/beautify-pptx.md b/skills/ppt-master/workflows/profiles/beautify-pptx.mdindex d6cc644b..1512c251 100644--- a/skills/ppt-master/workflows/profiles/beautify-pptx.md+++ b/skills/ppt-master/workflows/profiles/beautify-pptx.md@@ -139,15 +139,15 @@ If `images/image_manifest.json` does not exist because the source deck has no ex## 5. Beautify Plan — Recommend & Confirm-⛔ **BLOCKING**: the scope is not hard-coded — same spirit as the Strategist confirmation stage. Recommend each item below from what the deck actually contains (the Step 4 inventory), present the plan, and **wait for the user to confirm or adjust** before writing any spec. Chat is the canonical channel; the confirm UI below is the visual convenience surface over it for the palette + typography review (its result is honored identically to a chat reply).+⛔ **BLOCKING**: the scope is not hard-coded — same spirit as the Strategist confirmation stage. Recommend each item below from what the deck actually contains (the Step 4 inventory), present the plan, and **wait for the user to confirm or adjust** before writing any spec. Use Generate Step 4's selected surface for the full visual confirmation; keep the structural-scope decisions in chat. Values confirmed through either channel are honored identically.This step has two halves:-- **Visual re-confirm via the confirm UI** — the **full** Step 4 confirm page (below), seeded from the source so every targeted-confirmation field (canvas, mode, visual style, palette, icons, typography incl. body baseline, image strategy, generation mode) is **pre-filled with the inherited / source-derived default and left editable**. Beautify *recommends* keeping the source's identity, but never removes the user's place to override any field — you may choose not to change a value, but you must not deny the place to change it. This is also where the deck's text size is confirmed: `<stem>.identity.json` now carries size hints — `observed.sizes_pt` (the point sizes the deck actually renders at) and `theme.sizes` (the declared placeholder defaults) — so the `body_size` recommendation **follows the source's own font size** rather than a blind canvas default; the user still confirms or overrides it here.+- **Visual re-confirm via the selected confirmation surface** — the **full** Step 4 field set (below), seeded from the source so every targeted-confirmation field (canvas, mode, visual style, palette, icons, typography incl. body baseline, image strategy, generation mode) is **pre-filled with the inherited / source-derived default and left editable**. Beautify *recommends* keeping the source's identity, but never removes the user's place to override any field — you may choose not to change a value, but you must not deny the place to change it. This is also where the deck's text size is confirmed: `<stem>.identity.json` now carries size hints — `observed.sizes_pt` (the point sizes the deck actually renders at) and `theme.sizes` (the declared placeholder defaults) — so the `body_size` recommendation **follows the source's own font size** rather than a blind canvas default; the user still confirms or overrides it here.- **Structural scope** — the inventory-driven list decisions below (ignored, reuse, needs-confirmation, verification level) stay in **chat**; they have no confirm-UI widget.| Plan item | Recommend from | Default lean ||---|---|---|-| Identity source | `<stem>.identity.json` `theme` vs `observed` | present **both as color / typography candidates in the confirm UI** so the user picks the one that looks right (theme first when the deck is theme-driven; observed first when slides override heavily) — recommend a default ordering and say why |+| Identity source | `<stem>.identity.json` `theme` vs `observed` | present **both as color / typography candidates in the selected confirmation surface** so the user picks the one that looks right (theme first when the deck is theme-driven; observed first when slides override heavily) — recommend a default ordering and say why || Preserve scope | inventory `text_blocks` / `images` / `charts` / `tables` / `diagrams` | all text verbatim; data values and SmartArt relationships frozen; pictures reused || Ignored | inventory `ignored` | name them so the user sees what drops (hidden / master-only text / image crop / rotation) || Needs confirmation | inventory `needs_confirmation` | flag complex charts + overcrowded pages explicitly; ask how to handle |@@ -163,9 +163,19 @@ This step has two halves:| Paste-back into the original | regenerated elements share the inherited palette + fonts, so they **blend visually** when pasted. v1 does **not** guarantee a seamless coordinate-level drop-in (slide coordinates, master placeholders, font availability are the original deck's, not ours) || Complex charts / merged-cell tables | best-effort from the captured data; combo / dual-axis / waterfall lose the un-captured plots — flagged for the user |-**Visual re-confirm — full confirm UI seeded from the source**:+**Visual re-confirm — full confirmation seeded from the source**:-Use the three `<project_path>/confirm_ui/recommendations.stageN.json` files at the same staged handoffs as [`generate-pptx`](../generate-pptx.md) Step 4 and launch the same confirm server. The active, unconfirmed stage may be overwritten for a requested regeneration; normal progression leaves confirmed earlier stages intact. Do **not** hide fields: seed **every** targeted-confirmation field with the inherited / source-derived default so the user sees the recommendation and keeps the place to change it. Schema → [`scripts/docs/confirm_ui.md`](../../scripts/docs/confirm_ui.md).+Apply [`generate-pptx`](../generate-pptx.md) Step 4's surface decision first. In+the default UI branch, use the three+`<project_path>/confirm_ui/recommendations.stageN.json` files at the same staged+handoffs and launch the same confirm server. In the chat branch, present the+same three stages and fields without launching the server or requiring+`result.json`. The active, unconfirmed UI stage may be overwritten for a+requested regeneration; normal progression leaves confirmed earlier stages+intact. Do **not** hide fields: seed **every** targeted-confirmation field with+the inherited / source-derived default so the user sees the recommendation and+keeps the place to change it. Schema →+[`scripts/docs/confirm_ui.md`](../../scripts/docs/confirm_ui.md).The typography rows below show the non-English shape; omit `english` for an English source.@@ -203,14 +213,18 @@ The typography rows below show the non-English shape; omit `english` for an Engl- **Recommend keep, allow override**: pre-fill the open communication contract from the source's apparent audience and purpose, preserving composite purposes in prose; also pre-fill canvas / mode / visual style / icons / image strategy with the source-faithful default (canvas = Step 3 format, mode = `briefing`, image_usage = `provided`). The purpose examples are hints, never a `primary_job` selector. Beautify's only true non-choices are frozen text and strict 1:1 page count (changing either means routing to the main pipeline). Seed `content_divergence` to verbatim preservation with `locked: true`; the Confirm UI renders it read-only and the server restores the locked value on every staged submit. A request to reshape wording or page structure routes to the main pipeline instead of weakening this profile.- **Our recommendation is the pre-selected default = the source replica**: for color and typography, author **several candidates** like the from-scratch flow. The pre-selected default (`selected: 0`, the first card) is what beautify recommends — the candidate that **best replicates the source deck's style** (the truest reading of `theme` / `observed`). Replicate-by-default.- **Judge the other alternatives exactly as the from-scratch flow does — fonts as much as colors**: don't invent a beautify-specific rule. Author each non-replica candidate with the **same content-driven judgment the Strategist uses when generating from scratch** (color §e, typography §g), applied to the material this project provides — the source document's content and subject, the company's own theme colors, and any brand signal. Pick the palette **and** the font pairing by what fits *this* deck's content; fonts are chosen by content fit, not just defaulted to a safe face. Reach **≥3 candidates total with distinct heading/body combinations** (PPT-safe stacks; the same creative-choice rule used elsewhere) so a user who departs from the replica still lands on a considered, content-fitting direction. `primary` always follows the source deck's main language; include `english` only when that language is not English.-- **`body_size` is the load-bearing field, and the replica follows the source's own size**: seed the replica candidate's `body_size` from the source's actual body size — take the dominant `observed.sizes_pt` value (the most frequent run-level size, the **body proxy**) and **convert it to px (`× 4/3`)** before seeding, since the system is px-only and the source measures in pt: a source 20pt body becomes `26.67`px, so the replica renders at the source's true size (seeding the bare `20` as px would shrink it ~25% — the pt-as-px trap). Whichever source value you land on below (observed mode, or `theme.sizes.body`) gets the same `× 4/3` conversion. The confirm page (and chat fallback) then writes that px to `result.json` (`body_size`) **directly — no further conversion, no `body_size_pt` provenance** (pt never enters the contract). The "most frequent = body" read is a proxy, not a guarantee — `observed.sizes_pt` counts every explicit run size (titles, captions, footnotes, chart/label text included, no placeholder-type resolution), so a deck dense with small labels can let a caption size outrank true body; cross-check the proxy against the page's actual body blocks and the sanity range below before trusting it, and prefer the size the body paragraphs visibly render at over the raw mode when the two disagree. Fall back to `theme.sizes.body` (the declared placeholder size) when `observed.sizes_pt` is empty, and to a PPT consumption-mode baseline (`text` 20 / `balanced` 24 / `presentation` 32 px — one fixed value per mode) only when neither is present. Note `theme.sizes.body` is the master `bodyStyle` **level-1 declared default** — a coarse value that commonly **over-reads** the real body density (decks often render body at a deeper outline level or override it smaller), so when you land on this fallback treat it as an upper-ish guess and run it through the sanity check below, never as a precise body size. `theme.sizes.body_levels` and `layout_sizes_pt` are **reference context, not extra fallback tiers**: consult them to judge a saner body value when the deck is theme-driven (`observed` empty) — e.g. a deeper `body_levels` entry or a `layout_sizes_pt` hint may read truer than level-1 — but do not auto-seed from them; the seed chain stays `observed → theme.sizes.body → consumption-mode baseline`, and a theme-driven deck whose body size genuinely can't be pinned cleanly is exactly the case the sanity check is for. The canvas hint stays a **sanity range**, not the seed: if the source's own size lands far outside it (a dense source doc reads tiny on a projection canvas), surface that to the user rather than silently snapping — the replica recommendation is the source's size, the user confirms or overrides. Non-replica alternatives may use the consumption-mode baseline. This is what prevents the deck from exporting at an unintentionally small size while still honoring the source.+- **`body_size` is the load-bearing field, and the replica follows the source's own size**: seed the replica candidate's `body_size` from the source's actual body size — take the dominant `observed.sizes_pt` value (the most frequent run-level size, the **body proxy**) and **convert it to px (`× 4/3`)** before seeding, since the system is px-only and the source measures in pt: a source 20pt body becomes `26.67`px, so the replica renders at the source's true size (seeding the bare `20` as px would shrink it ~25% — the pt-as-px trap). Whichever source value you land on below (observed mode, or `theme.sizes.body`) gets the same `× 4/3` conversion. The confirm page writes that px to `result.json` (`body_size`); the chat branch retains the same px in its visible final summary. Neither path performs another conversion or adds `body_size_pt` provenance (pt never enters the contract). The "most frequent = body" read is a proxy, not a guarantee — `observed.sizes_pt` counts every explicit run size (titles, captions, footnotes, chart/label text included, no placeholder-type resolution), so a deck dense with small labels can let a caption size outrank true body; cross-check the proxy against the page's actual body blocks and the sanity range below before trusting it, and prefer the size the body paragraphs visibly render at over the raw mode when the two disagree. Fall back to `theme.sizes.body` (the declared placeholder size) when `observed.sizes_pt` is empty, and to a PPT consumption-mode baseline (`text` 20 / `balanced` 24 / `presentation` 32 px — one fixed value per mode) only when neither is present. Note `theme.sizes.body` is the master `bodyStyle` **level-1 declared default** — a coarse value that commonly **over-reads** the real body density (decks often render body at a deeper outline level or override it smaller), so when you land on this fallback treat it as an upper-ish guess and run it through the sanity check below, never as a precise body size. `theme.sizes.body_levels` and `layout_sizes_pt` are **reference context, not extra fallback tiers**: consult them to judge a saner body value when the deck is theme-driven (`observed` empty) — e.g. a deeper `body_levels` entry or a `layout_sizes_pt` hint may read truer than level-1 — but do not auto-seed from them; the seed chain stays `observed → theme.sizes.body → consumption-mode baseline`, and a theme-driven deck whose body size genuinely can't be pinned cleanly is exactly the case the sanity check is for. The canvas hint stays a **sanity range**, not the seed: if the source's own size lands far outside it (a dense source doc reads tiny on a projection canvas), surface that to the user rather than silently snapping — the replica recommendation is the source's size, the user confirms or overrides. Non-replica alternatives may use the consumption-mode baseline. This is what prevents the deck from exporting at an unintentionally small size while still honoring the source.Run Generate Step 4's confirmation orchestration unchanged, including its-pre-wait Stage-1 chat handoff.+pre-launch surface decision and the UI branch's pre-wait Stage-1 chat handoff.-After the final wait returns, read `<project_path>/confirm_ui/result.json` exactly once and retain the complete confirmed object through Design Spec authoring. Always run `--shutdown` on exit (page-confirm or chat-fallback) so port 5050 is free for Step 6 live preview.+In the UI branch, after the final wait returns, read+`<project_path>/confirm_ui/result.json` exactly once. In the chat or delegated+branch, retain the visible final summary instead and require no UI result. After+any launched UI path, run `--shutdown` so port 5050 is free for Step 6 live+preview.-On confirmation, enter [`generate-pptx`](../generate-pptx.md) Step 4 as Strategist with the plan pre-resolved. The two beautify invariants always hold: the content-faithful clause ([`strategist.md`](../../references/strategist.md) §d Layer 1) and page count = source slide count (strict 1:1). Write the retained confirmed object completely into `design_spec.md` — `mode` (recommended `briefing`), canvas, `visual_style`, color (e) + typography (g) incl. `body_size` (the reviewed values; skip both recommendation flows) — honoring whatever the user kept or overrode. Do not reopen `result.json` afterward. §VII contains only `Page | Template | Usage` rows for selected catalog references; unmatched chart/table plans stay in their §IX page blocks. §VIII contains source pictures for re-layout.+On confirmation, enter [`generate-pptx`](../generate-pptx.md) Step 4 as Strategist with the plan pre-resolved. The two beautify invariants always hold: the content-faithful clause ([`strategist.md`](../../references/strategist.md) §d Layer 1) and page count = source slide count (strict 1:1). Write the retained final confirmation state completely into `design_spec.md` — `mode` (recommended `briefing`), canvas, `visual_style`, color (e) + typography (g) incl. `body_size` (the reviewed values; skip both recommendation flows) — honoring whatever the user kept or overrode. Do not reopen UI evidence afterward. §VII contains only `Page | Template | Usage` rows for selected catalog references; unmatched chart/table plans stay in their §IX page blocks. §VIII contains source pictures for re-layout.**Hard rule — §IX is verbatim and 1:1**: each source slide becomes exactly one page, in source order, its text transcribed word-for-word from `sources/<stem>.md`. Do not merge, split, drop, or rewrite. Complete and audit `design_spec.md` first, then author `spec_lock.md` from that Design Spec plus the source/page/template context per `strategist.md` §6 before handing off to the Executor.