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
refactor(prompts): trim the Strategist planning set to what planning reads
hugohe3f0b5e7fdd095
diff --git a/skills/ppt-master/references/confirm-surface.md b/skills/ppt-master/references/confirm-surface.mdnew file mode 100644index 00000000..89d061fb--- /dev/null+++ b/skills/ppt-master/references/confirm-surface.md@@ -0,0 +1,108 @@+# Confirmation Surface and Payloads++What the Strategist needs to run the two-stage confirmation: the surface decision, the in-run switch, and the exact shape of the three files it authors or reads. Server lifecycle, port/lock behavior, the template-selection sidecar, catalogs, and the progression guard live in [`confirm_ui.md`](../scripts/docs/confirm_ui.md); the launch/wait/shutdown commands live in [`generate-pptx.md`](../workflows/generate-pptx.md) Step 4.++## 1. Surface decision++**Mandatory — before any UI command**: resolve the most recent explicit confirmation-surface instruction for this run. Unrelated later messages do not reset the branch; once confirmation starts in chat or UI switches to chat, keep chat for the rest of the run.++| Most recent explicit surface instruction | Branch |+|---|---|+| The user explicitly delegates confirmation | Make the combined Stage-1 communication/template decision, install it, then present one complete final summary. Do not launch the page or fabricate UI receipts. |+| The user asks for or agrees to personally confirm in chat, or declines the page | Use chat for both stages; Stage 1 includes the template/free-design choice. Do not launch the page, run `--wait-only`, or require UI-authored results. |+| No explicit instruction | Use the page. |++Interpret the instruction semantically — "confirm here", "use the chat window", "do not open the confirmation page" are sufficient; a chat-question tool by itself selects nothing. Both branches preserve the same Stage-1 decision, installation handoff, and template-aware Stage 2, and the chat branch records the same `design_spec_depth` in its summary.++**Chat/delegated Stage-1 listing**: author the communication recommendation before reading the four template indexes, then present it together with an explicit free-design/template-mode choice; only template mode expands registered candidates and supplied exact roots and requires at least one selection. Ordinary requests initialize free design; explicit template intent or any supplied exact root initializes template mode, and exactly one supplied root may seed that candidate.++**Always-on Stage-1 chat handoff (UI branch)**: after writing `template_options.json` and `recommendations.stage1.json`, launch the daemon, then immediately post its actual URL plus one compact localized summary of the recommendation and template-choice state (audience, communication intent, audience outcome, core message, delivery context, artifact afterlife, `content_divergence`, canvas, free-design vs template default and any sole preselected root; blank prose shown as "not specified"), ending with a localized line that the same items may be confirmed or revised in chat if the page did not open. Only then run `--wait-only --wait-stage stage1`. The handoff is context, not confirmation; silence confirms nothing.++**In-run UI → chat switch (any stage)**: when the user explicitly selects chat after launch — interrupt an active wait and confirm its process exited (that deliberate interruption is the only expected non-zero return), run `server.py <project_path> --shutdown` and require it to succeed, re-check the active receipt once (Stage 1: `result.json` plus `template_selection.json` from the same submission; Stage 2: `result.json`; an unsubmitted browser draft is not confirmed), then continue everything remaining in chat without relaunching or waiting again. After launch failure/timeout, re-check the receipts once the same way and present the same items as open chat questions.++## 2. `recommendations.stage1.json`++Author before reading any candidate index, spec, prototype, asset, or template canvas. All seven prose values may be blank; `primary_language` is canonical BCP-47 (`und` and Chinese without script/region are rejected); `lang` is the UI language only. The intent paths (inform / explain / persuade / decide / align / teach / report and account / mobilize / record and hand off) are help text, never a `primary_job` field.++```json+{+ "stage": "stage1",+ "lang": "zh",+ "primary_language": "zh-CN",+ "recommend": { "canvas": "ppt169" },+ "audience": { "value": "公司管理层,包括财务与产品负责人" },+ "communication_intent": { "value": "先汇报进展并暴露交付风险,再推动管理层决定下一阶段投入" },+ "audience_outcome": { "value": "管理层能比较三个选项、接受风险判断,并选定一条获得预算的路径" },+ "core_message": { "value": "现在为方案 B 增加投入,能以可接受的成本守住发布时间" },+ "delivery_context": { "value": "主要为有主讲的 20 分钟管理层现场评审;次要为会后独立阅读的审批材料" },+ "artifact_afterlife": { "value": "作为审批记录、项目交接依据和季度审计材料" },+ "content_divergence": { "value": "" }+}+```++## 3. `recommendations.stage2.json`++Create only after the Stage-1 receipts and the `--complete-template-selection` handoff exist, leaving Stage 1 unchanged. Required: `recommend.generation_mode`, boolean `refine_spec.value`, `design_spec_depth.value` as `brief` or `complete` (`brief` is rejected with `split` mode or `refine_spec: true`), and `recommend.image_ai_path` (`auto` / `api` / `host-native` / `manual`) whenever `image_usage` includes `ai`. `image_usage` is an array of source ids (`ai`, `web`, `provided`, `placeholder`; `none` is exclusive). `design_directions` carries exactly three complete candidates with unique stable ids; `selected` is the zero-based index chosen after all three are complete. Candidate display text is written once in the confirmed UI language using the plain keys (`name`, `note`, `mode_behavior`, `visual_style_behavior`, `visual`, `mood`, `behavior`; a single locale suffix such as `_zh` is accepted). Typography carries concrete heading/body `primary` plus `english` only for non-English decks and a positive `body_size`; color carries the six-role `palette`. For a confirmed templates-mode handoff, add top-level `template_application.value` — one editable prose paragraph on how to use the installed template. Never write `recommend.template_reuse_scope` or `template_adherence`.++```json+{+ "stage": "stage2",+ "lang": "zh",+ "recommend": {+ "delivery_purpose": "balanced",+ "mode": "custom",+ "visual_style": "custom",+ "image_strategy": "custom",+ "image_usage": ["ai", "provided"],+ "image_ai_path": "auto",+ "generation_mode": "continuous"+ },+ "page_count": { "value": "12-15" },+ "image_notes": { "value": "封面和章节页用 AI 主视觉;产品页优先用户素材。" },+ "proactive_speaker_notes": { "value": true },+ "proactive_custom_animations": { "value": false },+ "proactive_narration_audio": { "value": false },+ "refine_spec": { "value": false },+ "design_spec_depth": { "value": "brief" },+ "template_application": { "value": "选用封面、章节页和数据页原型;跳过示例内容页。品牌标识和页脚保留,正文可按当前材料重组。" },+ "design_directions": {+ "selected": 1,+ "candidates": [+ {+ "id": "executive-clarity",+ "name": "稳妥专业",+ "note": "以瑞士极简为主,融合柔和圆角与编辑出版风格。",+ "mode": "custom",+ "mode_behavior": "以 pyramid 作为唯一目录基底,为当前风险决策材料定制两次结论闸门;标题保持判断句,每章先给判断,再用证据展开并以可执行结论收束。",+ "visual_style": "custom",+ "visual_style_behavior": "由 swiss-minimal 负责精确栅格和大留白,soft-rounded 负责少量关键容器的轮廓与轻微抬升,editorial 负责细规则、边注与证据层级;标题锐利,正文中性。",+ "icons": "tabler-outline",+ "color": { "name": "冷静专业", "palette": {+ "background": "#FFFFFF", "secondary_bg": "#F4F6F8",+ "primary": "#1A3A6B", "accent": "#E8A317",+ "secondary_accent": "#4A7BB5", "body_text": "#1D2430"+ } },+ "typography": {+ "name": "微软雅黑 + Arial",+ "heading": { "primary": "Microsoft YaHei", "english": "Arial", "css": "sans-serif" },+ "body": { "primary": "Microsoft YaHei", "english": "Arial", "css": "sans-serif" },+ "body_size": 24+ },+ "image_strategy": {+ "name": "编辑式证据图",+ "rendering": "custom",+ "visual": "简化矢量主体配合编辑式注释与局部材质对比",+ "mood": "审慎、可信,像调查报道中的证据插图",+ "behavior": "由 vector-illustration 负责清晰轮廓,minimalist-swiss 负责留白构图,screen-print 负责克制的半调纹理;三者服从同一平面主体和当前演示文稿颜色角色。"+ }+ }+ ]+ }+}+```++The array repeats that candidate shape exactly three times. `template_application` appears only in templates mode.++## 4. `result.json`++Written by the user's submission; Generate Step 4 reads the final object (`stage: final`, `status: confirmed`) exactly once and retains it through Design Spec authoring. It carries the Stage-1 prose fields, `primary_language`, `canvas`, `page_count`, the confirmed `mode` / `visual_style` with their `_behavior` siblings, `color`, `icons`, `typography` (including `body_size`, optional per-role `sizes`), `delivery_purpose`, `image_usage`, `image_notes`, conditional `image_ai_path` and `image_strategy`, the three flat proactive booleans, `generation_mode`, `refine_spec`, and `design_spec_depth`. It contains no template-selection field — `template_selection.json` and the installed project-local state own that decision. Legacy results without `design_spec_depth` read as `complete`; results that omit the proactive booleans resolve to `true / false / false`.diff --git a/skills/ppt-master/references/strategist-image.md b/skills/ppt-master/references/strategist-image.mdindex bcc523db..2393a44d 100644--- a/skills/ppt-master/references/strategist-image.md+++ b/skills/ppt-master/references/strategist-image.md@@ -55,9 +55,7 @@ When a subject crosses a native title, panel, frame, or shape, the prepared path## 2. AI Image Strategy — always propose three; lock only for confirmed `ai`-Before any rendering detail, use the already-loaded [`image-renderings/_index.md`](./image-renderings/_index.md) as the sole rendering-basis catalog authority. First author exactly three complete, project-fit solution intents; use the index to freeze each intent's exact rendering bases, then read once only the deduplicated referenced sibling files. Project one complete `image_strategy` into each direction regardless of `recommend.image_usage`. Every candidate carries `name`, `rendering: custom`, `visual`, `mood`, and non-empty `behavior`, each written once in the confirmed UI language. Mood includes a recognizable real-world analogy. All three must credibly serve their owning whole solution; rendering treatments and bases may coincide when other components express the direction difference. Do not force artificial safe / shifted / bold extremes. Image colors always inherit that direction's deck HEX roles; never add an image palette or alter deck colors to rescue a rendering.--Every direction is a `custom` rendering, unconstrained by how it relates to the catalog. It may use catalog material in any way or none, including carrying one complete preset treatment unchanged. Name every actual id in the visible behavior and read only those files after selection; when several are named, each owns a distinct line, texture, depth, material, or mood contribution. Reference count has no fixed cap, and a second basis is never required. With no catalog basis, name none and read none. Under a template it obeys inherited identity and application. Only a confirmed custom locks its edited behavior as `image_rendering_behavior`; when catalog material is actually used, also project the exact ids as `image_rendering_references`, otherwise omit that field. Unselected candidates remain recommendation-only. Do not write a separate fourth `custom_candidates.image_strategy`; ignore legacy `image_palette`.+Project one complete `image_strategy` into each of the three directions authored under [`strategist.md`](./strategist.md) §d, regardless of `recommend.image_usage`, using the already-loaded [`image-renderings/_index.md`](./image-renderings/_index.md) as the sole rendering-basis authority: freeze each direction's exact bases, then read once only the deduplicated referenced sibling files. Every candidate carries `name`, `rendering: custom`, `visual`, `mood` (with a recognizable real-world analogy), and non-empty `behavior`, written once in the confirmed UI language; it may use catalog material in any way or none, names every basis it actually uses (each owning a distinct line, texture, depth, material, or mood contribution), and inherits the direction's deck HEX roles — never a second image palette. Rendering treatments may coincide when other components carry the direction difference; do not force safe / shifted / bold extremes. Only a confirmed custom locks `image_rendering_behavior` plus, when catalog material is used, `image_rendering_references`; unselected candidates remain recommendation-only, and legacy `image_palette` / a fourth `custom_candidates.image_strategy` are not written.The UI hides these candidates while AI is not selected. If the user adds AI, it reveals the already-authored three without another backend recommendation; source selection never creates or rewrites rendering candidates. After confirmation, Image_Generator reads only the selected preset or exact custom references and must not blend unselected candidate identities.diff --git a/skills/ppt-master/references/strategist.md b/skills/ppt-master/references/strategist.mdindex 52dd41a0..d825650f 100644--- a/skills/ppt-master/references/strategist.md+++ b/skills/ppt-master/references/strategist.md@@ -36,7 +36,7 @@ solution + production gate:| **1 — communication contract + template choice** | `primary_language` · `c` audience · open-ended communication intent · audience outcome · core message / delivery context (primary + optional secondary) / artifact afterlife · `content_divergence` (all prose fields may be blank) · `a` canvas · explicit `free_design` or `templates` choice and selected roots | confirmed together; candidate workspaces do not influence the communication recommendation || **2 — final solution + production** (authored once from the user's *actual* Stage 1) | reading mode (`delivery_purpose`, PPT only) · `d` mode + visual style · `b` page count · `e` color · `f` icon · `g` typography · `h` image source + generated-image rendering · conditional natural-language template application · conditional AI-image acquisition path · generation mode · refine-spec toggle · `design_spec_depth` · proactive speaker notes / custom animations / narration audio | derived as one coherent plan from the confirmed contract; internal template exporter modes remain hidden |-Do not force communication intent into one catalog label; Stage 1 records composite intent in prose. Editable prose fields are recommendation drafts, not required inputs: confirmation preserves current text and blanks; never repopulate a cleared field. Stage 2 confirms narrative spine, reading density, page budget, visual system, image direction, production mechanics, and how any installed template should be used. It never chooses or installs a template. Inspect only project-local template spec/prototypes, present one editable application plan, and keep exporter reuse/adherence internal. First author exactly three complete, project-fit solution directions from the confirmed contract and source; only then project each direction into mode, visual style, color, type, icons, and generated-image rendering for lower-level adjustment. Every direction projects a project-specific `custom` mode, `custom` visual style, and `custom` generated-image rendering; the fixed catalogs remain conservative lower-level single-select alternatives. Each direction is one complete design authored top-down within the confirmed contract, never assembled bottom-up from catalog picks; three exist so a single recommendation cannot lock the user in, and the fixed catalogs stay the manual lower layer. Its custom projections are unrestricted by catalog relationship and may carry one preset unchanged. The three directions are plainly different designs at the whole-deck level before any field is written; that difference lives in the solutions, not in one designated field. Whichever components a direction's own design requires carry it — mode, visual style, rendering, color, type, or icons — any of them may, and none is required to differ. A different name, note, or reference count alone is not a difference, and projections identical on every component are not three solutions. Do not force safe / shifted / bold archetypes or artificial extremes. After all three bundles are complete, choose the strongest overall fit when no template is installed; with installed template state, choose the viable direction that most strongly expresses its resolved context under [`strategist-template.md`](./strategist-template.md). Write its actual zero-based index as `design_directions.selected` (`0`, `1`, or `2`); array order never determines preference. Every direction carries a complete generated-image rendering candidate even when AI imagery is not recommended; `recommend.image_usage` independently decides whether AI is proposed. Generated images inherit deck colors—there is no second image palette. Proactive defaults are speaker notes `true`, custom animations `false`, and narration audio `false`; a prior explicit user instruction overrides the matching recommendation, and effective narration audio requires effective speaker notes. Recommend `design_spec_depth: brief` — the same author draws the pages, so full page copy in the spec is duplicated work; recommend `complete` only when `split` mode, `refine_spec: true`, or a preservation profile forces it, or the user asked for a hand-off document others will read. Author each stage once; same-stage edits update only visible browser state through documented deterministic dependencies, without another AI/backend recommendation. Launch/derive/wait mechanics live in [`generate-pptx.md`](../workflows/generate-pptx.md) Step 4; item specs keep `a`–`h`.+Do not force communication intent into one catalog label; Stage 1 records composite intent in prose. Editable prose fields are recommendation drafts, not required inputs: confirmation preserves current text and blanks; never repopulate a cleared field. Stage 2 confirms narrative spine, reading density, page budget, visual system, image direction, production mechanics, and how any installed template should be used. It never chooses or installs a template. Inspect only project-local template spec/prototypes, present one editable application plan, and keep exporter reuse/adherence internal. Author the three whole-deck solution directions under §d below — complete designs first, catalog projections second. After all three bundles are complete, choose the strongest overall fit when no template is installed; with installed template state, choose the viable direction that most strongly expresses its resolved context under [`strategist-template.md`](./strategist-template.md). Write its actual zero-based index as `design_directions.selected` (`0`, `1`, or `2`); array order never determines preference. Every direction carries a complete generated-image rendering candidate even when AI imagery is not recommended; `recommend.image_usage` independently decides whether AI is proposed. Generated images inherit deck colors—there is no second image palette. Proactive defaults are speaker notes `true`, custom animations `false`, and narration audio `false`; a prior explicit user instruction overrides the matching recommendation, and effective narration audio requires effective speaker notes. Recommend `design_spec_depth: brief` — the same author draws the pages, so full page copy in the spec is duplicated work; recommend `complete` only when `split` mode, `refine_spec: true`, or a preservation profile forces it, or the user asked for a hand-off document others will read. Author each stage once; same-stage edits update only visible browser state through documented deterministic dependencies, without another AI/backend recommendation. Launch/derive/wait mechanics live in [`generate-pptx.md`](../workflows/generate-pptx.md) Step 4; item specs keep `a`–`h`.**Default — continuity-aware whole solution (may override when a scene reset communicates better)**: Within active-profile invariants and before recommending page count or production mechanics, judge whether adjacent explanation beats can remain within one recognizable mental map while a visible state changes. Where that choice lowers cognitive switching and motion has a named communication job, let it shape the solution's narrative spine, page rhythm, visual approach, and enabled notes/narration segmentation, and recommend the existing `proactive_custom_animations: true`. This is one positive signal, not the only reason to enable animation; absent it, retain the existing default or other valid evidence. Topic or wording repetition alone is insufficient. A `Motion suggestion` remains optional advice and never changes the effective outcome.@@ -46,7 +46,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.** Before the first actual confirmation phase, 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, `template_options.json` and `recommendations.stage1.json` open one Stage-1 page; its single submission writes the pure Strategist `result.json` plus the sidecar `template_selection.json`. After installation/free-design closure, `template_handoff.json` gates `.stage2.json`. The chat/delegated branch keeps equivalent state without fabricating those receipts. Replace only the active unconfirmed stage and print the URL plus combined 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 exactly three immutable `design_directions`, each with a unique stable id, `custom` mode, `custom` visual style, six-role HEX palette, primary-language heading/body typography plus an English companion only for non-English decks, icons, and `custom` generated-image rendering. Its `selected` index marks the Strategist's post-comparison preference and initializes the whole bundle. An inactive direction card applies its bundle; lower controls may then diverge through the three projected custom candidates or the fixed single-select catalogs, and the adjusted active card exposes an explicit restore action. The final result stores only the current component values, never the direction id as execution authority. Step 4 retains final confirmation from the selected channel for Design Spec authoring. `confirm_ui.md` owns selection-surface and staged-confirmation lifecycle.+> **Default presentation surface — Confirm UI.** Before the first confirmation phase, apply the sticky per-run surface decision in [`confirm-surface.md`](./confirm-surface.md) and author the Stage-1 and Stage-2 payloads in the shapes it defines; the chat/delegated branch keeps equivalent state without fabricating UI receipts. Stage 1 writes canonical BCP-47 `primary_language`; Stage 2 carries exactly three immutable `design_directions`, and the final result stores only the current component values, never a direction id as execution authority. Server lifecycle and the template-selection sidecar: [`confirm_ui.md`](../scripts/docs/confirm_ui.md).**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:@@ -225,10 +225,9 @@ supplied or `simple-icons` mark. This requires no extra user-facing option.> **After the Strategist confirmation stage is approved — when writing `design_spec.md` §VI / `spec_lock.md`**, materialize a curated project icon pool:>> 3. A confirmed bundled library is materialized as a synced project pool before Executor starts; Executor cannot sync. Which prepared icons a page uses is realization, never a preassignment.-> 4. Put known basenames in the final batch. For an uncertain one, search the chosen style library — or `simple-icons` for a real brand mark — with `rg --files "skills/ppt-master/templates/icons/<library>" -g '*<drawable-object>*.svg'`. Abstract concept words return nothing; translate the semantic into a drawable object first, per [`../templates/icons/README.md`](../templates/icons/README.md). Do not enumerate broad keyword families.-> 5. **Copy and validate in one batch** — run `python3 skills/ppt-master/scripts/icon_sync.py <project_path> <lib/name> [<lib/name> …]`. This both validates and materializes `<project>/icons/<lib>/`; skip per-file prechecks.-> 6. Keep each successful, case-sensitive `lib/name`: bundled basenames are lowercase (`tabler-outline/award`, never `tabler-outline/Award`); custom icons retain exact case.-> 7. Record each synced bundled path with broad suitable scenarios in `design_spec.md` §VI; record the same curated pool, its primary stylistic library, and any stroke-library `stroke_width` in `spec_lock.md icons`. Keep actually needed `simple-icons/*` ids in the same inventory without treating them as a second stylistic library or user-facing selection. `inventory` indexes the synced pool; other prepared project-local icons remain usable.+> 4. Put known basenames in the final batch; search an uncertain one only inside the chosen library (or `simple-icons` for a real brand mark) by the drawable object, never the abstract concept — [`../templates/icons/README.md`](../templates/icons/README.md) § Searching for Icons.+> 5. Copy and validate in one batch: `python3 skills/ppt-master/scripts/icon_sync.py <project_path> <lib/name> [<lib/name> …]` materializes `<project>/icons/<lib>/`; keep each successful case-sensitive `lib/name` (bundled basenames are lowercase).+> 6. Record each synced path with broad suitable scenarios in `design_spec.md` §VI and the same curated pool, primary library, and any stroke-library `stroke_width` in `spec_lock.md icons`; `simple-icons/*` ids join that inventory without becoming a second library. `inventory` indexes the synced pool; other prepared project-local icons remain usable.>> 🚧 **GATE — missing icon = re-pick now**: on non-zero exit, search a missing generic concept only in the chosen stylistic library, or a missing real brand mark in `simple-icons`; re-pick and rerun the final batch until clean. Never carry a missing icon forward or switch among the four stylistic libraries to fill the gap.>@@ -482,13 +481,7 @@ Confirmation `d` locks two independent catalog items:- **Mode** — narrative skeleton: [`modes/_index.md`](./modes/_index.md) → `pyramid` / `narrative` / `instructional` / `showcase` / `briefing`.- **Visual style** — aesthetic: [`visual-styles/_index.md`](./visual-styles/_index.md) → presets + `custom`.-Strategist first loads the fixed planning-capability batch. For-mode/style/rendering basis selection it uses only the three corresponding-indexes, freezes the bases for the three whole directions, then reads only the-deduplicated referenced detail files before authoring their custom behaviors.-Executor reads one locked preset file or the exact references of a selected-custom; neither role globs a detail catalog (see-[`generate-pptx`](../workflows/generate-pptx.md) Step 6).+The three indexes are the only basis selectors: freeze each direction's bases from them, then read only the deduplicated referenced detail files; Executor later reads one locked preset file or a custom's exact references (see [`generate-pptx`](../workflows/generate-pptx.md) Step 6).---@@ -591,22 +584,19 @@ includes transitions.⛔ **GATE 2 — lock context fidelity.** After Gate 1 closes, author machine-relevant anchors/routing into `spec_lock.md`. The lock may normalize syntax and add justified recurring roles, but must not change identity, discard a refinement, introduce a direction, or become a field copy/allowlist. On contradiction, return to Gate 1 using retained confirmation by default or the approved revised Design Spec after refinement; fresh recovery reads persisted final evidence once only when active state is absent.-**Execution lock content**: `spec_lock.md` compactly carries communication, stable color/type anchors, icons, images, page rhythm, Chart/Table references, and route-specific PowerPoint structure; qualitative relationships stay only in §IX. Name every recurring typography role; a planned short non-structural Hero/Display size may stay omitted only while the same value appears at most twice, and its third occurrence requires a named role. Never re-derive a confirmed anchor. New locks keep `font_family` as the body/default compatibility stack and also write explicit `title_family` + `body_family`; every additional recurring Design Spec role projects to `<role>_family`. Collapsing distinct Design Spec stacks into `font_family`, or dropping an extra role, fails Gate 2. Keep core fonts/palette roles stable; page authoring varies treatment and may add sparse local garnish. Project every placed §VIII image's source, layout suggestion, and crop policy; omit unplaced sheets and planning provenance. Free-design, brand-only, and `template_reuse_scope: style` use `pptx_structure.mode: flat`; the template module owns structured mappings. Executor context policy lives in [executor-base.md](executor-base.md) §2.1. Repair from Gate 2's active decision authority, then re-author affected lock rows.+**Execution lock content**: `spec_lock.md` carries communication, stable color/type anchors, icons, images, page rhythm, Chart/Table references, and route-specific PowerPoint structure; qualitative relationships stay only in §IX. Its section grammar, typography projection (`title_family` + `body_family` + every `<role>_family` and size anchor), `page_visualizations`, and the flat/structured `pptx_structure` sections are defined in [`spec_lock_reference.md`](../templates/spec_lock_reference.md) §2–4 — never re-derive a confirmed anchor, collapse distinct stacks into `font_family`, or drop a recurring role. Executor context policy lives in [executor-base.md](executor-base.md) §2.1. Repair from Gate 2's active decision authority, then re-author affected lock rows.**Contextual extension**: derived paint or sparse local font/color garnish may stay in one SVG while non-structural and non-recurring. New base/semantic colors, structural/recurring fonts, resources, or recurring cross-page identity patterns require upstream repair; a page-local §VIII preferred image pattern follows [`executor-image.md`](./executor-image.md) and may change during realization. Executor never reverse-projects a local choice as planning fact. Promote recurring garnish upstream before reuse, read back and validate the affected planning fragments, and never add values to silence a comparison.- **Communication trace is mandatory**: Keep the full confirmed communication contract in `design_spec.md §I`, then project only `audience`, `objective`, `core_message`, and canonical `consumption_mode` into `spec_lock.md communication`. Write `objective` as one concise execution sentence that preserves both the confirmed `communication_intent` and the success condition in `audience_outcome`; do not copy `delivery_context`, `artifact_afterlife`, dates, provenance, or conflict-resolution commentary into the lock. Before finalizing §IX, check that every named purpose has at least one outline obligation and **every Slide block**, including cover / divider / closing pages, has an `Audience move` that advances the global outcome. A page that advances no purpose or outcome should be merged, rewritten, or cut. `project_manager.py validate` and `svg_quality_checker.py` enforce the compact lock fields and per-page move presence, not their subjective quality.- - **Custom behavior is concise and executable**: For confirmed `custom` mode or visual style, project one resolved `mode_behavior` / `visual_style_behavior` sentence or short paragraph. When the direction actually uses catalog entries, also project the exact, comma-separated `mode_references` / `visual_style_references`; omit the field when it uses none and never fabricate a nearby reference. Preserve the confirmed direction, reference locked role names such as `colors.primary` when needed, and omit selection history, contradictions, precedence explanations, or other Design Spec provenance. Executor reads these fields from the retained lock and loads every referenced catalog entry once per valid context.+ - **Custom behavior is concise and executable**: for confirmed `custom` mode or visual style, project one resolved `mode_behavior` / `visual_style_behavior` sentence or short paragraph plus the exact `*_references` only when catalog entries are actually used; omit selection history and provenance.- **page_rhythm is mandatory**: Based on the page list in §IX Content Outline, assign each page one of `anchor` / `dense` / `breathing`. This is what breaks the uniform "every page is a card grid" feel. New locks may not omit the section; consumer omission behavior is owned by [`executor-base.md`](executor-base.md) §2.1.- **Fact IDs and scenario labels are mandatory when applicable**: Read any `sources/*.facts.json`. For each §IX page, list the stable IDs actually used; never cite an ID whose claim is absent from the page. Mark invented KPIs/targets/internal ratios as `Data class: scenario` and state which values are scenario data. Executor carries external sources into notes/footnotes and renders a visible scenario label for scenario figures.- **Mandatory — whole-roster rhythm check**: During the same §IX composition, compare neighbors and section arcs to judge whether chapter entries visibly reset, extended same-density runs are intentional, extended same-carrier or same-topology runs form an intentional semantic sub-arc, repeated dominant geometry carries a continuity job, any qualifying §6.1 visible-state sequence preserves a recognizable mental map while making its next semantic change legible, each section follows a mode-fitting progression—including framework → explanation/evidence → judgment/action when it serves the objective—and the final arc resolves the communication objective before a genuine ending lowers information load. Same section, equal weight or density, one style, and prior-page precedent do not establish a semantic sub-arc. Repair the existing roster, `Layout` recommendations, and `page_rhythm` choices in place. This is judgment, not quota; preserve intentional continuity, legitimately all-`dense` material, and 1:1/literal order. Do not invent filler pages to manufacture rhythm; a `breathing` page marks a meaningful pause—chapter transition, standalone emphasis, or SCQA bridge—and must stand alone. Create no field, lock row, artifact, or second review/execution pass.- **Cover impact is mandatory**: In `design_spec.md §IX`, give `P01` one concrete hook from the source's strongest claim, metaphor, number, moment, or conflict plus a recommended composition. **Reference — not a constraint**: composition starting points include full-bleed image with floating title, typographic poster, hero object, data hook, editorial scene, and high-contrast abstract geometry; a fresh composition the subject suggests is equally valid — these are starting points rather than the allowed set. A distilled display phrase taken from the deck's own subject may carry the cover as the dominant mark while the complete title stays as a native subtitle. The hook binds; Executor may adopt, adapt, or decline the composition while preserving the hook and explicit constraints. With no suitable image, recommend a native-SVG hook instead of a generic title treatment. Beautify preservation paths are exempt.- **Cover rhythm lock**: `P01` remains `anchor`. Default away from generic content-page templates; a card grid, agenda, or equal-weight columns remains valid when content, user direction, or the template makes it the clearest cover.- **Closing impact (only when the deck closes)**: For a genuine conclusion / CTA / final takeaway, name the binding takeaway plus a recommended composition; Executor may adopt, adapt, or decline the latter while preserving the takeaway and explicit constraints. Do not default to an information-empty "Thank you", contact-only slide, or cover reprise; an explicit contact/event CTA may serve the purpose. **Do NOT invent a closing page to satisfy this**. Preservation paths are exempt.- - **pptx_structure is mandatory**: Free-design, brand-only, and `template_reuse_scope: style` routes write `mode: flat`; a style-reference route may also record `template_reuse_scope: style` but omits every structure mapping and `template_adherence`. `template_reuse_scope: mirror|layout` writes `mode: structured` plus `template_adherence: strict|adaptive`. Do not write legacy `baseline`, `template`, `preserve`, `layout_strategy`, or Layout-kind rows into a new project.- - **Flat-route boundary**: With `mode: flat`, omit `pptx_masters`, `pptx_layouts`, `page_pptx_layouts`, and `page_layouts`. Do not plan native Master/Layout families or reusable placeholder slots. Every generated SVG object remains Slide-local: omit root Master/Layout identity, `data-pptx-layer`, and `data-pptx-placeholder*` metadata. Export materializes one clean project-owned Master plus one Blank Layout from the current color/typography lock, removes stock content placeholders/Layout inventory, and retains only the standard date/footer/slide-number capability hooks.- - **Structured template route**: When [`strategist-template.md`](./strategist-template.md) is active and reuse is `mirror|layout`, follow its complete Master/Layout/slot/prototype mapping rules.- - **page_visualizations**: project at most one §VII `P<NN>: <chart|table>/<key>` per page. Usage/children/qualitative relationships stay in the Design Spec; omit empty/no-match. It locks no geometry/native output. New locks never write legacy `page_charts`.+ - **pptx_structure and page_visualizations**: free-design, brand-only, and `template_reuse_scope: style` routes write `mode: flat` and omit every structured mapping section; `mirror|layout` writes `mode: structured` with `template_adherence` and the four mapping sections under [`strategist-template.md`](./strategist-template.md). Project at most one §VII `P<NN>: <chart|table>/<key>` per page; usage, children, and qualitative relationships stay in the Design Spec. Grammar: [`spec_lock_reference.md`](../templates/spec_lock_reference.md) §3–4.---diff --git a/skills/ppt-master/scripts/docs/confirm_ui.md b/skills/ppt-master/scripts/docs/confirm_ui.mdindex c1c2425a..ebf6b31a 100644--- a/skills/ppt-master/scripts/docs/confirm_ui.md+++ b/skills/ppt-master/scripts/docs/confirm_ui.md@@ -26,77 +26,7 @@**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.-**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 | Make the combined Stage-1 communication/template decision, install it, then present one complete final summary. Do not launch the page or fabricate UI receipts. |-| Otherwise, the user asks for or agrees to personally confirm in chat, or declines the confirmation page | Use chat for both Strategist stages; Stage 1 includes the template/free-design choice. Do not launch the page, run `--wait-only`, or require UI-authored receipts. |-| 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-Stage-1 communication/template decision, installation handoff, and template-aware-final Stage 2; the chat branch records the same `design_spec_depth` value in its-confirmation summary.--**Chat/delegated Stage-1 listing**: Author the communication recommendation-before reading the four indexes, then present that recommendation together with-an explicit free-design/template-mode choice. Only template mode expands the-registered candidates and supplied exact roots, and it requires at least one-selection. Ordinary requests initialize free design; explicit template intent-or any supplied exact root initializes template mode. Exactly one supplied root-may also seed that candidate, while multiple roots remain unselected. Under-explicit delegation, make the same decision, install-it, and only then derive Stage 2. Do not launch the page or fabricate receipts.--**Fallback rule**: When no surface was selected before launch, the page is the-default. Use chat when the user answers either always-on handoff in chat, or-after launch failure/timeout and one re-check of `result.json` plus the-Stage-1-sidecar `template_selection.json` when Stage 1 is active. A chat-question-tool alone is not a launch failure. Preserve the combined Stage-1 decision and-keep communication prompts open-ended.--**In-run UI → chat switch — any phase or 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 the active receipt once. During Stage 1, require both `result.json`- and `template_selection.json` from the same submission; during Stage 2, check- `result.json`. Retain only values persisted before shutdown; an unsubmitted- browser draft is not confirmed.-4. Continue the unresolved current phase/stage and everything remaining in chat. Do- not call `--wait-only` again, recover the server, or relaunch the page during- this run.--**Always-on Stage-1 chat handoff**: After writing `template_options.json` and-template-independent `recommendations.stage1.json`, launch the healthy daemon-without `--wait`. Immediately post its actual URL plus one compact localized-summary of the current communication recommendation and template choice state:-audience, communication intent, audience outcome, core message, delivery-context, artifact afterlife, `content_divergence`, canvas, and whether the-default is free design or template mode, including any sole preselected root. Explain-that template mode expands the registered-kind and supplied-root selectors.-Show a blank prose value as “not specified” without changing it. End with an-explicit localized line saying that, if the page did not open, the user may-confirm or revise the same communication and template choices in chat. Only-then run `--wait-only --wait-stage stage1`. A chat-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 combined Stage-1 items as open chat questions and wait explicitly.+**Model-facing procedure lives elsewhere**: the surface decision, chat/delegated listing, always-on Stage-1 chat handoff, in-run UI → chat switch, and the authoring shapes of `recommendations.stage1.json`, `recommendations.stage2.json`, and `result.json` are owned by [`confirm-surface.md`](../../references/confirm-surface.md), which the Strategist reads. This document keeps the server lifecycle, the template-selection sidecar, catalogs, the progression guard, and the complete field semantics that the server validates.## `confirm_ui/server.py`diff --git a/skills/ppt-master/scripts/prompt_audit_manifest.json b/skills/ppt-master/scripts/prompt_audit_manifest.jsonindex ddbfe20c..e673a525 100644--- a/skills/ppt-master/scripts/prompt_audit_manifest.json+++ b/skills/ppt-master/scripts/prompt_audit_manifest.json@@ -43,7 +43,8 @@"skills/ppt-master/templates/tables/table-vocabulary.md": 500,"skills/ppt-master/templates/sounds/sound-vocabulary.md": 6250,"skills/ppt-master/workflows/generate-pptx.md": 16000,- "skills/ppt-master/workflows/stages/apply-template-workspace.md": 3500+ "skills/ppt-master/workflows/stages/apply-template-workspace.md": 3500,+ "skills/ppt-master/references/confirm-surface.md": 3000},"load_sets": {"bootstrap.routing": {@@ -159,7 +160,6 @@],"files": ["skills/ppt-master/workflows/generate-pptx.md",- "skills/ppt-master/references/artifact-ownership.md","skills/ppt-master/references/strategist.md","skills/ppt-master/references/strategist-image.md","skills/ppt-master/references/canvas-formats.md",@@ -170,7 +170,7 @@"skills/ppt-master/references/modes/_index.md","skills/ppt-master/references/visual-styles/_index.md","skills/ppt-master/references/image-renderings/_index.md",- "skills/ppt-master/scripts/docs/confirm_ui.md",+ "skills/ppt-master/references/confirm-surface.md","skills/ppt-master/templates/icons/README.md","skills/ppt-master/templates/charts/chart-vocabulary.md","skills/ppt-master/templates/tables/table-vocabulary.md",@@ -212,7 +212,6 @@],"files": ["skills/ppt-master/workflows/profiles/quick-generate.md",- "skills/ppt-master/references/artifact-ownership.md","skills/ppt-master/references/shared-standards-core.md","skills/ppt-master/references/executor-base.md","skills/ppt-master/references/svg-effects.md",@@ -863,8 +862,7 @@],"files": ["skills/ppt-master/workflows/generate-pptx.md",- "skills/ppt-master/workflows/stages/resume-execute.md",- "skills/ppt-master/references/artifact-ownership.md"+ "skills/ppt-master/workflows/stages/resume-execute.md"],"max_tokens": 115000},@@ -1152,6 +1150,14 @@"skills/ppt-master/references/svg-effects.md"],"max_tokens": 16000+ },+ "governance.artifact-ownership": {+ "description": "Global artifact ownership matrix, invariants, and regeneration rules; read on an ownership question, a recovery/resume, or a route that edits existing artifacts.",+ "scope": "incremental",+ "files": [+ "skills/ppt-master/references/artifact-ownership.md"+ ],+ "max_tokens": 6000}},"duplicates": {@@ -1895,12 +1901,6 @@"fingerprint": "d937b965024b","reason": "This consumer needs the field contract for deterministic execution."},- {- "path": "skills/ppt-master/references/strategist.md",- "role": "producer",- "fingerprint": "4c133143e2f2",- "reason": "This producer projects the owner field into the planning contract."- },{"path": "skills/ppt-master/templates/spec_lock_reference.md","role": "reference",@@ -1949,12 +1949,6 @@"fingerprint": "b0f9494f710a","reason": "This site documents a legacy or omission compatibility boundary."},- {- "path": "skills/ppt-master/references/strategist.md",- "role": "compatibility",- "fingerprint": "ba50ab71bc88",- "reason": "This site documents a legacy or omission compatibility boundary."- },{"path": "skills/ppt-master/templates/spec_lock_reference.md","role": "compatibility",@@ -2090,7 +2084,7 @@{"path": "skills/ppt-master/references/strategist.md","role": "producer",- "fingerprint": "1c8aa960c9e4",+ "fingerprint": "841748c7d17e","reason": "This producer projects the owner field into the planning contract."},{@@ -2192,7 +2186,7 @@{"path": "skills/ppt-master/references/strategist.md","role": "producer",- "fingerprint": "46405fcad30f",+ "fingerprint": "7deac145d181","reason": "This producer projects the owner field into the planning contract."},{@@ -2321,6 +2315,10 @@{"glob": "skills/ppt-master/scripts/docs/svg-contract.md","reason": "Closed SVG grammar reference for checker/exporter behavior; the always-read core carries the canonical forms, and generation roles open this file only when a check fails."+ },+ {+ "glob": "skills/ppt-master/scripts/docs/confirm_ui.md",+ "reason": "Confirm UI server/schema reference; the Strategist reads references/confirm-surface.md for the surface decision and authoring payloads."}]}diff --git a/skills/ppt-master/workflows/generate-pptx.md b/skills/ppt-master/workflows/generate-pptx.mdindex 59b37663..abe1818e 100644--- a/skills/ppt-master/workflows/generate-pptx.md+++ b/skills/ppt-master/workflows/generate-pptx.md@@ -36,7 +36,7 @@ request does not explicitly select Quick.| Main pipeline sequencing | This file | Owns Step 1–7 order, gates, role switching, and mandatory commands || Artifact ownership | [`artifact-ownership.md`](../references/artifact-ownership.md) | Owns fact channels, source/derived artifact boundaries, and regeneration rules || Failure recovery | [`failure-recovery.md`](./governance/failure-recovery.md) | Owns stop/continue policy and resume pointers |-| Confirm UI details | [`confirm_ui.md`](../scripts/docs/confirm_ui.md) | Owns the JSON schema, launcher behavior, staged-result contract, port strategy, and chat fallback details |+| Confirmation surface | [`confirm-surface.md`](../references/confirm-surface.md) | Owns the surface decision, in-run switch, and the Stage-1/Stage-2/result payload shapes; [`confirm_ui.md`](../scripts/docs/confirm_ui.md) owns server lifecycle and the template-selection sidecar || Confirmed template application | [`apply-template-workspace.md`](./stages/apply-template-workspace.md) | Owns validation and installation after Stage 1 confirms library or explicit workspace roots; skip for confirmed free design |## Workflow@@ -174,7 +174,7 @@ root remains `explicit`. Candidate provenance never changes later validation,installation, or precedence.Resolve the confirmation surface under-[`confirm_ui.md`](../scripts/docs/confirm_ui.md). In the UI branch, run+[`confirm-surface.md`](../references/confirm-surface.md). In the UI branch, run`--reset-template-selection`, then write`<project_path>/confirm_ui/template_options.json` with schema version `1`,`phase: "template"`, the UI language, and all supplied exact roots as absolute@@ -272,7 +272,7 @@ is confirmed; a bare template/style name does not.**Fact channels** (owned by [`artifact-ownership.md`](../references/artifact-ownership.md) §1–2): before Stage 1, read the compact machine facts already in `<project_path>/analysis/` — `source_profile.json`'s `decks[]` digests (canvas, chart/table/SmartArt structure per source deck), opening a deck's `<stem>.identity.json` / `<stem>.slide_library.json` only when its raw facts are needed. Content — text, tables, chart values, SmartArt wording — comes from the content-type files in `sources/` (`<stem>.md` and any archived `.txt` / `.csv` / `.json` / `.yaml`), never from the structural digest; `*.conversion_profile.json` and `*_files/image_manifest.json` are sidecars, not content. A source deck's palette, typography, and visual identity are reference, not constraint: inherit where they fit the content and confirmed style, design fresh where they do not. `analysis/image_analysis.csv` arrives at the image step below and is a regenerated view of `images/`, not a durable store.-**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.+**Confirmation orchestration**: field meaning and recommendation logic belong to the active Strategist modules; [`confirm-surface.md`](../references/confirm-surface.md) owns the surface decision and payload shapes, and [`confirm_ui.md`](../scripts/docs/confirm_ui.md) the server lifecycle and sidecar contract.⛔ **BLOCKING**: The two-stage Strategist confirmation is the always-on usergate unless explicitly delegated. Stage 1 confirms the communication contract@@ -287,7 +287,7 @@ unusual overrides—are authoritative.**Confirmation ownership and surface**: Only the user confirms. Before anyconfirmation server command, apply-`confirm_ui.md`'s surface+`confirm-surface.md`'s surfacedecision to this run's most recent explicit surface instruction and retain thatbranch as the owner specifies. A natural-language request or agreement topersonally confirm in chat, or to avoid the page, selects the chat branch without@@ -306,7 +306,7 @@ Stage-2 summary without fabricating UI results. Silence confirms nothing.**UI branch only** — Step 3 wrote `template_options.json` but did not launch orwait. Create `confirm_ui/recommendations.stage1.json` without reading templatecandidate content, then launch the combined Stage-1 page and post-`confirm_ui.md`'s required communication + template-choice summary/fallback:+`confirm-surface.md`'s required communication + template-choice summary/fallback:```bashpython3 ${SKILL_DIR}/scripts/confirm_ui/server.py <project_path> --daemon@@ -366,7 +366,7 @@ or `templates` with at least one server-resolved root.```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+apply `confirm-surface.md`'s in-run switch procedure. Continue the unresolved currentstage and all remaining stages in chat; do not enter UI interruption recoveryor relaunch the server.