--- name: ppt-design description: Design presentation slides, infographic pages, and PPT-style visuals as 1600x900 HTML slides with optional PPT export. Use when the agent needs to pick or explain a slide style, recommend styles based on content, generate one or more static HTML slides, support `background_mode` paper or white for compatible light styles, or render finished slides into a high-fidelity image-based PPTX. version: 0.3.0 --- # PPT Design Design each slide as a standalone 1600x900 HTML file, then export to PPT only when the user asks for it. In this repo, the executable slide contract lives in `./scripts/slide_engine/`. The shared JS manifest and shared renderers are the runtime source of truth. Files in `./styles/style_[a-j].md` remain human-facing design references and must stay manually aligned with that executable manifest. ## Workflow 1. Identify the topic, audience, and deliverable. 2. If the user provides a Markdown document, treat each `Page X` section as one slide unless the document clearly indicates a different page structure. 3. Read [style-selector.md](./references/style-selector.md) before choosing a style. 4. If the deck is in Chinese or mixed Chinese and English, read [bilingual-typography.md](./references/bilingual-typography.md). 5. Recommend 2-3 styles when the user has not already chosen one. 6. Explain each recommended style in plain language: - style name - one-line visual description - what kind of content it fits best - use English by default for these style explanations and recommendations 7. Confirm or infer `background_mode`: - default to `paper` - allow `white` only for compatible light styles - if the chosen style does not support `white`, say so and keep `paper` or recommend a compatible style 8. Read [background-modes.md](./references/background-modes.md). 9. Read [presentation-layout-rules.md](./references/presentation-layout-rules.md). 10. Read [html-review-checklist.md](./references/html-review-checklist.md). 11. When the deck is `client-facing` or `public-stage`, read [presentation-quality-rubric.md](./references/presentation-quality-rubric.md). 12. Read [layout-prototypes.md](./references/layout-prototypes.md). Classify each slide's content role and select a layout prototype before writing HTML. Do not repeat the same layout on consecutive slides. 13. Read [safe-zone.md](./references/safe-zone.md). Enforce content boundaries on every slide: all primary content must live inside the main frame area (`y = 108px` to `y = 804px`). Include chrome labels only on cover and closing slides when `chrome=bookend`. 14. If a slide contains strict tables, org charts, framework diagrams, or other geometry-sensitive structures, read [geometry-preserve.md](./references/geometry-preserve.md) before writing that slide. 15. Read the chosen style file in `./styles/style_[a-j].md` before writing HTML. Treat it as the design reference for mood, typography, and ornament logic; runtime behavior is enforced by the shared slide engine. 16. Preserve the chosen style's native whitespace, ornament density, contrast, and pacing. Do not normalize all styles toward the same layout density. 17. When the slide copy is Chinese or bilingual, follow the style's Chinese and English pairing guidance rather than reusing the English display font everywhere. 18. Recompose page content into slide hierarchy instead of preserving raw Markdown formatting literally, except when geometry-sensitive structure should be preserved. 19. Generate one HTML file per slide in `./outputs/html/`. 20. Review every generated HTML slide before delivery. Treat this as mandatory, not optional. 21. Fix layout, spacing, typography, hierarchy, and geometry issues found in review using the smallest change that keeps the slide true to the chosen style. 22. When `speaker_notes_mode` is enabled, generate a sidecar notes file for presenter use. 23. If the user wants PPT, render the HTML slides to PNG and package them into a PPTX. For `public-stage` work, treat the flow as a task pipeline: 1. draft generation 2. polish pass 3. audit gate 4. render / export Do not skip the polish pass and do not export before the audit gate passes. ## Inputs Use these fields when the user provides them or when you need to make them explicit in your own reasoning: - `input_markdown`: the source Markdown for the deck, ideally grouped by `Page 1`, `Page 2`, and so on - `style`: `A-J` or a named style - `background_mode`: `paper` or `white` - `chrome`: `all`, `bookend`, or `none` - `geometry_mode`: `auto`, `preserve`, or `recompose` - `presentation_scenario`: `brand-launch`, `investor-board`, `client-pitch`, or `research-brief` - `quality_tier`: `internal`, `client-facing`, or `public-stage` - `speaker_notes_mode`: `none`, `outline`, or `full` - `brand_profile`: brand lock settings for logo, footer, palette, and font policy - `deliverable`: `html`, `ppt`, or `both` Default behavior: - `input_markdown`: infer page structure from headings when possible - `style`: recommend candidates first when unspecified - `background_mode`: `paper` - `chrome`: `bookend` - `geometry_mode`: `auto` - `presentation_scenario`: `brand-launch` - `quality_tier`: `public-stage` - `speaker_notes_mode`: `outline` - `deliverable`: `html` Repo note: - The bundled demo builders in `./scripts/build_template_style_cases.mjs` and `./scripts/build_twitter_style_cases.mjs` are fixed internal benchmark pipelines. - They currently render with `chrome=bookend` and validate HTML before PNG/PPT export. - They do not expose every skill input as a CLI flag. ## Style Selection Read [style-selector.md](./references/style-selector.md) first. When the user has not chosen a style: - Recommend only 2-3 styles, not all 10. - Match the recommendation to the content rather than to arbitrary taste words like "nice" or "cool". - Explain what the style looks like and what kind of material it suits. - Default the style recommendation language to English, even when the working conversation is in another language. - Keep generated slide copy in the user's source language unless the user explicitly asks for translation. Examples: - Business report, finance, policy, research summary: bias toward `A`, `D`, or `I`. - Brand story, culture, exhibition, philosophy, editorial: bias toward `B`, `E`, or `F`. - Creative proposal, event, youth brand, campaign, entertainment: bias toward `C`, `G`, `H`, or `J`. ## Background Modes Read [background-modes.md](./references/background-modes.md). Apply these rules: - `paper` keeps paper grain, print texture, and warm off-white stock when the style supports it. - `white` switches the slide canvas to clean white and removes paper-specific texture, fold marks, and stock simulation. - `white` does not remove style identity. Keep the typography, grid, ornament, contrast system, and non-paper decorative devices. - `white` is supported only by styles `A`, `B`, `C`, `D`, `E`, `G`, and `J`. - Styles `F`, `H`, and `I` are dark-native. Do not whitewash them. ## HTML Rules - Create one file per slide: `slide_01.html`, `slide_02.html`, and so on. - Keep the canvas fixed at `1600x900`. - Use static HTML, CSS, and inline SVG only. - Do not use JavaScript in the slide files. - Do not use external images other than Google Fonts. - Save outputs in `./outputs/html/`. - Design for projection and presentation first, not for dense document reading. Use this base structure unless the style file overrides a specific detail: ```html