AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He
feat(confirm_ui): add custom prompt notes to image strategy card
hugohe3e008ed388866
diff --git a/skills/ppt-master/references/strategist.md b/skills/ppt-master/references/strategist.mdindex 39fcfbe3..798b2fa1 100644--- a/skills/ppt-master/references/strategist.md+++ b/skills/ppt-master/references/strategist.md@@ -424,6 +424,8 @@ After the candidates, append one line:**Confirm UI packaging**: when writing `recommendations.json` Stage 3, put **exactly three non-custom** generated-image recommendations in `image_strategy.candidates`. The page appends one built-in **Custom** card after those three recommendations, so do not use a `custom` candidate as a fourth option or as a slot filler in the UI payload.+**Confirmed Custom card prose**: when `result.json.image_strategy.custom` is non-empty, treat it as a confirmed deck-wide image-direction constraint. Write the prose into `design_spec.md §III` image direction notes and carry it into every `Acquire Via: ai` prompt brief / `images/image_prompts.json` prompt guidance that it applies to. It augments the locked `rendering` + `palette` ids; preserve those ids for catalog / comparison-reference behavior, and use the custom prose for subject, composition, texture, avoidance, or other prompt specifics.+**Hard rules for candidate construction**:| Rule | Behavior |diff --git a/skills/ppt-master/scripts/confirm_ui/static/app.js b/skills/ppt-master/scripts/confirm_ui/static/app.jsindex 79c000d0..d2109bd1 100644--- a/skills/ppt-master/scripts/confirm_ui/static/app.js+++ b/skills/ppt-master/scripts/confirm_ui/static/app.js@@ -56,6 +56,8 @@image_strategy_mood: "Mood",image_strategy_manual: "Custom",image_strategy_manual_desc: "Choose a rendering and palette manually, or use custom prose.",+ image_strategy_custom_prompt: "Custom prompt notes",+ image_strategy_custom_placeholder: "Describe the exact generated-image direction, subjects, composition, style cues, or things to avoid.",image_strategy_reference_hint: "Reference images show rendering / color-behavior only. Final AI images use the color scheme selected above.",image_strategy_color_follow: "Uses the color scheme selected above; the palette only controls color behavior.",image_strategy_no_reference: "No reference image for this custom choice.",@@ -161,6 +163,8 @@image_strategy_mood: "ムード",image_strategy_manual: "カスタム",image_strategy_manual_desc: "レンダリングとパレットを手動で選ぶか、カスタム記述を使います。",+ image_strategy_custom_prompt: "カスタム指示",+ image_strategy_custom_placeholder: "生成画像の方向性、被写体、構図、スタイル要素、避けたい要素を具体的に入力してください。",image_strategy_reference_hint: "参照画像はレンダリング/色の使い方だけを示します。最終AI画像の色は上で選んだ配色に従います。",image_strategy_color_follow: "上で選んだ配色を使用します。パレットは色の使い方だけを制御します。",image_strategy_no_reference: "このカスタム選択には参照画像がありません。",@@ -266,6 +270,8 @@image_strategy_mood: "情绪",image_strategy_manual: "自定义",image_strategy_manual_desc: "手动选择渲染风格和图像调色,也可以使用自定义描述。",+ image_strategy_custom_prompt: "自定义提示要求",+ image_strategy_custom_placeholder: "描述生成图的具体方向、主体、构图、风格关键词或需要避免的内容。",image_strategy_reference_hint: "参考图只展示渲染风格 / 用色行为;最终 AI 图片颜色跟随上方色彩方案。",image_strategy_color_follow: "使用上方已选色彩方案;图像调色只控制用色比例和行为。",image_strategy_no_reference: "自定义选择没有参考图。",@@ -1652,6 +1658,7 @@var parts = [];if (strategy.rendering) parts.push(t("image_strategy_rendering") + ": " + comparisonValueLabel("rendering", strategy.rendering));if (strategy.palette) parts.push(t("image_strategy_palette") + ": " + comparisonValueLabel("palette", strategy.palette));+ if (strategy.custom) parts.push(strategy.custom);desc.textContent = parts.join(" · ") || t("image_strategy_reference_hint");}refreshImageStrategyPreview = paint;@@ -1747,6 +1754,24 @@markStrategyCard(selectedCard || strategyGrid.querySelector('[data-strategy-index="' + idx + '"]'));refreshImageStrategyPreview();}+ function imageStrategyCandidateIndex(strategy) {+ if (!strategy) return -1;+ for (var i = 0; i < strategyCands.length; i += 1) {+ if (strategyCands[i] &&+ strategyCands[i].rendering === strategy.rendering &&+ strategyCands[i].palette === strategy.palette) {+ return i;+ }+ }+ return -1;+ }+ function isManualImageStrategy(strategy) {+ if (!strategy) return false;+ return Object.prototype.hasOwnProperty.call(strategy, "custom") ||+ strategy.rendering === "custom" ||+ strategy.palette === "custom" ||+ imageStrategyCandidateIndex(strategy) < 0;+ }strategyCands.forEach(function (c, idx) {var card = el("div", "font-card");card.setAttribute("data-strategy-index", String(idx));@@ -1787,16 +1812,26 @@manualControls.appendChild(renderingWrap);manualControls.appendChild(paletteWrap);manualCard.appendChild(manualControls);+ var customWrap = el("label", "image-strategy-custom-wrap");+ customWrap.appendChild(el("span", "image-strategy-select-label", t("image_strategy_custom_prompt")));+ var customInput = el("textarea", "text-input image-strategy-custom-input");+ customInput.rows = 3;+ customInput.placeholder = t("image_strategy_custom_placeholder");+ customInput.value = (STATE.image_strategy && STATE.image_strategy.custom) || "";+ customWrap.appendChild(customInput);+ manualCard.appendChild(customWrap);function selectManualImageStrategy() {var rendering = renderingSelect.value;var palette = paletteSelect.value;+ var custom = customInput.value || "";STATE.image_strategy = {name: t("image_strategy_manual"),rendering: rendering,palette: palette,visual: comparisonLabel(comparisonItem("rendering", rendering), "rendering") || comparisonValueLabel("rendering", rendering),color: t("image_strategy_color_follow"),- mood: t("image_strategy_manual_desc")+ mood: t("image_strategy_manual_desc"),+ custom: custom};markStrategyCard(manualCard);refreshImageStrategyPreview();@@ -1807,6 +1842,8 @@selectManualImageStrategy();});});+ customInput.addEventListener("click", function (e) { e.stopPropagation(); });+ customInput.addEventListener("input", selectManualImageStrategy);manualCard.addEventListener("click", selectManualImageStrategy);strategyGrid.appendChild(manualCard);strategySub.appendChild(strategyGrid);@@ -1853,8 +1890,18 @@function () { return STATE.image_ai_path; }, function (v) { STATE.image_ai_path = v; });sec.appendChild(sub);sec.appendChild(strategySub);- if (strategyCands.length) selectImageStrategy(imageStrategySelectedIndex());- else selectManualImageStrategy();+ if (isManualImageStrategy(STATE.image_strategy)) {+ renderingSelect.value = firstComparisonId("rendering", STATE.image_strategy.rendering || renderingSelect.value);+ paletteSelect.value = firstComparisonId("palette", STATE.image_strategy.palette || paletteSelect.value);+ customInput.value = STATE.image_strategy.custom || "";+ selectManualImageStrategy();+ } else if (STATE.image_strategy && imageStrategyCandidateIndex(STATE.image_strategy) >= 0) {+ selectImageStrategy(imageStrategyCandidateIndex(STATE.image_strategy));+ } else if (strategyCands.length) {+ selectImageStrategy(imageStrategySelectedIndex());+ } else {+ selectManualImageStrategy();+ }refreshUsageChips();host.appendChild(sec);}diff --git a/skills/ppt-master/scripts/confirm_ui/static/style.css b/skills/ppt-master/scripts/confirm_ui/static/style.cssindex e82c65c7..fb9f4cb3 100644--- a/skills/ppt-master/scripts/confirm_ui/static/style.css+++ b/skills/ppt-master/scripts/confirm_ui/static/style.css@@ -500,6 +500,7 @@ body {.font-sample-body { font-size: 14px; color: #333; margin-top: 4px; }.custom-typography-input { margin-top: 8px; min-height: 58px; resize: vertical; }.custom-color-input { margin-top: 8px; min-height: 58px; resize: vertical; }+.image-strategy-custom-input { margin-top: 8px; min-height: 72px; resize: vertical; }.image-usage-notes-input { min-height: 64px; resize: vertical; }.font-size-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }.font-size-input { width: 96px; }diff --git a/skills/ppt-master/scripts/docs/confirm_ui.md b/skills/ppt-master/scripts/docs/confirm_ui.mdindex 17d0d06b..59a24cb5 100644--- a/skills/ppt-master/scripts/docs/confirm_ui.md+++ b/skills/ppt-master/scripts/docs/confirm_ui.md@@ -159,7 +159,7 @@ The AI launches Stage 1 (`--daemon --wait`), reads the stage-1 result, **re-deri- **Per-role size override** (parallel to color's per-role HEX override): besides `body_size`, the page exposes **independent** editable inputs for `title` / `subtitle` / `annotation`. Each role is pre-filled **once** with a starting value — the candidate's `typography.sizes[role]` if provided, otherwise a one-time ramp suggestion (`body × ` mid-band ratio) — and then holds its own value. **There is no cross-field cascade**: changing `body_size`, `delivery_purpose`, or canvas updates only the recommended-value hint, never the role values; a re-render preserves exactly what the user sees. The final values are written to `result.json` as `typography.sizes: { "title", "subtitle", "annotation" }` in **px** — every canvas, no pt and no `sizes_pt` provenance. Seeding `sizes` in a candidate is optional — omit it and each role gets its one-time ramp suggestion.- **`delivery_purpose`** (enumerable, PPT only) is the primary driver of the body baseline: `text` (read-close), `balanced` (business, the default), `presentation`. It is surfaced in the **§c key-information area** (beside audience, Stage 1) as a consumption-mode choice; the Stage-2 typography section then reads the confirmed value for the recommended body px — the pick itself does not rewrite the body field (inputs are independent). `recommend.delivery_purpose` pre-selects one (default `balanced`); the user's pick writes back to `result.json.delivery_purpose` as a plain id. Strategist uses it to set the px body baseline — **one fixed px per purpose (`text` 20 · `balanced` 24 · `presentation` 32), not a range** (see [strategist.md §g](../../references/strategist.md)). Non-PPT canvases omit it.- **Combined style preview** — a compact live "overall impression" strip sits just above the color section and is **sticky**: it pins under the topbar so it stays visible while the user scrolls through the color / icon / typography sections, keeping the picking controls and their combined effect on screen together. It applies the currently selected color palette **and** typography (heading sample in `primary` over `background`, body sample in `body_text`, an `accent` bar, a `secondary_bg` chip) and repaints on every color / HEX-override / font / `body_size` change. It does not replace the per-candidate swatches or font samples (those stay for picking); it is deliberately an abstract style chip, **not** a slide-layout preview — page layout preview remains the live-preview server's job (Step 6). No schema field; it derives entirely from the existing color + typography selections.-- **Generated image style candidates** live in `image_strategy.candidates` and are shown only when `image_usage` includes `ai`. Each candidate records `rendering`, `palette`, and short `visual` / `color` / `mood` lines from Strategist h.5. Author **exactly three non-custom recommendation candidates** here; the page displays those three, then appends one built-in **Custom** card. If extra candidates are present, the page shows only the first three non-custom entries. When `rendering` / `palette` match files under `references/ai-image-comparison/`, the left preview pane displays those reference PNGs for the selected candidate; when AI image generation is not selected, that left preview is hidden. The right-side option cards stay text-first and do not duplicate the gallery. The **Custom** card lists all reference-gallery `rendering` and `palette` ids from `ai-image-comparison/*/_manifest.json`, plus `custom` as a prose-only tail choice. If either selected dimension is `custom`, the preview intentionally falls back to prose and shows no reference image. `palette` means color behavior only — final AI image HEX values follow the confirmed `color` choice above. The chosen value is written to `result.json.image_strategy`; it is omitted when generated images are not part of the plan.+- **Generated image style candidates** live in `image_strategy.candidates` and are shown only when `image_usage` includes `ai`. Each candidate records `rendering`, `palette`, and short `visual` / `color` / `mood` lines from Strategist h.5. Author **exactly three non-custom recommendation candidates** here; the page displays those three, then appends one built-in **Custom** card. If extra candidates are present, the page shows only the first three non-custom entries. When `rendering` / `palette` match files under `references/ai-image-comparison/`, the left preview pane displays those reference PNGs for the selected candidate; when AI image generation is not selected, that left preview is hidden. The right-side option cards stay text-first and do not duplicate the gallery. The **Custom** card lists all reference-gallery `rendering` and `palette` ids from `ai-image-comparison/*/_manifest.json`, plus `custom` as a prose-only tail choice and a free-text prompt box; that prose is written to `result.json.image_strategy.custom`. If either selected dimension is `custom`, the preview intentionally falls back to prose and shows no reference image. `palette` means color behavior only — final AI image HEX values follow the confirmed `color` choice above. The chosen value is written to `result.json.image_strategy`; it is omitted when generated images are not part of the plan.- **`visual_style_spectrum`** (optional) lets the AI surface the deck's aesthetic as a **personality spectrum** instead of one badged style. Each entry is `{ "id", "tag_zh"/"tag_en"/"tag_ja", "note_zh"/"note_en"/"note_ja" }` (include the `_ja` variants when `lang` is `ja`) where `id` is a real `visual_styles` catalog id; the page badges those chips with their temperament `tag` (replacing the single ★) and appends the `note` (a real-world analogy) inline. The full grouped style list and Custom box stay visible below, and `recommend.visual_style` is still the pre-selected default (it should equal the spectrum's safe pick). Author **≥3** spanning safe / shifted / bold (mirrors h.5; honest-shortfall exception applies — fewer only when the constraints genuinely cannot yield 3). The user's pick still writes back to `result.json.visual_style` as a plain id; the spectrum is presentation-only. Omit the field to fall back to the single-recommendation badge.- `recommend.generation_mode` and `refine_spec` mirror the two mandatory notes in SKILL.md Step 4. Confirmed `generation_mode: "split"` / `refine_spec: true` are explicit user choices, equivalent to opting in through chat.- `content_divergence` is a **free-text** field shown right under the audience box in §c — the user states in their own words how closely to follow the source vs how freely to reshape it (e.g. "stick closely to the document" / "freely restructure and expand within the source"). It is **not** a fixed-option field; blank means a balanced default. Whatever the level, facts stay sourced — reshaping develops what is in the source, never imports facts from outside it. The Strategist consumes the prose when authoring the §IX outline and records it in `design_spec.md §I`; it is **not** written to `spec_lock.md` (the Executor never reads it). It carries no page-count coupling and no source-signal recommendation — it is purely the user's stated intent. Beautify / template-fill keep content verbatim and do not surface this field.