--- name: oh-my-ppt-layout description: Must be read before creating, relaying out, or repairing Oh My PPT slide layouts. Defines the per-page decision path, the named layout pattern catalog, canvas budgeting, collision avoidance, chart overpack guardrails, and title readability rules. --- # Oh My PPT Layout This skill is the decision backbone for slide structure. Deep examples live in the references: - `references/catalog.md` — canonical 1600×900 zone skeletons and named layout patterns (the structure-choice layer you pick from before writing HTML). - `references/layout.md` — collision-avoidance code comparison and height-budget walkthroughs. - `references/checklist.md` — P0/P1/P2 structural self-check. ## When to use - Creating a new slide or rewriting a whole slide - Choosing a slide composition or layout intent (cover, data-focus, comparison, etc.) - Repairing overflow, collision, or content exceeding the canvas ## When not to use - Tiny text/style edits that do not affect layout (color, wording, single element) ## 1. The per-page decision path Before writing HTML, answer these in order. The first three decide the role and density; the rest decide structure and budget. 0. **PPT message** — what is the one sentence this page should make the audience remember within 3 seconds? Source material is evidence; the slide is an edited message. 1. **Role** — what is this slide? (cover / data exhibit / comparison / timeline / concept / process / summary / quote / image-focus) 2. **Reading path** — what does the audience see first → understand second → remember last? 3. **Content shape** — which source facts support the message, which can be grouped, and which becomes compact secondary detail? A slide is a designed argument, not a document dump. - If the page feels over-dense or would exceed 1600×900, pause before writing HTML and self-summarize: one message + a content-appropriate set of support groups/evidence rails. Only place that distilled structure on the slide; merge minor facts into labels, notes, annotations, or omitted speaker-context. 4. **Density** — low (one hero or primary visual with limited support), medium (main + 1–2 support), or high (grid/table/matrix only when the content truly demands it)? 5. **Pattern + skeleton** — use a named layout pattern from `references/catalog.md` when it clarifies the reading path or solves a known density risk; if the page risks becoming top-heavy, a canonical 1600×900 zone skeleton is a useful starting point. These are references, not a closed menu: create a fresh composition when the page thesis or style calls for it, while keeping the same semantic anchor and readable budget. 6. **Height budget** — calculate the height budget so the chart and modules fit within 900px while preserving actual gaps between independent modules (see §4). 7. **Self-check width/height**: Before calling the write tool, estimate the final layout. Width must fit 1600px and height must fit 900px, including padding, title/subtitle, rows, gaps, chart frames, footnotes, and likely text wrapping. If either dimension exceeds the canvas, redesign the composition and check again. Then **sketch the layout before writing** (kept in your head, not emitted to the page). Picture the page as zones — what sits in each zone, roughly how tall, and how the zones balance across the full 1600×900. Confirm the sketch has a clear primary focus, actual gaps between independent modules, and no accidental large empty band; only then write the HTML. A quick shape for the sketch: ```text role: data-focus density: medium pattern: trend-exhibit skeleton: chart-plus-insight-stack zones: title/claim (~80, top) · dominant chart/visual middle (~420-500) · 1-2 metric chips or one insight band attached to chart · optional footnote — balanced, no accidental empty band balance check: 3-second message visible, clear primary focus, actual gaps between independent modules, no crowded second support row density check: if the source has too many facts, summarize before writing; do not turn every fact into a visible card image policy: standard mode, no image request slot ``` The sketch is a thinking aid, not a template — keep the composition creative; just make sure the planned zones have clear hierarchy and actual gaps between independent modules before you write. The chosen pattern and skeleton are what you check against the structure recipe in `catalog.md`. ## 2. Layout pattern catalog entry The catalog is advisory — patterns and skeletons are structure choices, not templates. Any pattern is re-visualized by the current style; the structure stays the same while style owns the look. Canonical 1600×900 skeletons and full four-part pattern definitions (input shape / structure recipe / budget rule / failure signs) are in `references/catalog.md`. Intent → pattern quick lookup: | Intent | Patterns | | --- | --- | | `cover` | hero-title-center · hero-title-asymmetric · hero-big-number · section-divider | | `quote` | hero-quote | | `summary` | summary-takeaways · executive-brief | | `data-focus` | kpi-hero · metric-band · trend-exhibit · chart-annotated | | `comparison` | compare-two-zone · compare-options · decision-matrix | | `concept` | concept-center-satellites · framework-2x2 · framework-pyramid | | `process` | process-linear · process-loop | | `timeline` | timeline-strip | | `image-focus` | asset-image-hero · asset-text-visual-split | The same role and density can produce several valid patterns — pick the one whose reading path and module count best match the content. ## 3. Canvas and spacing - Design for 16:9 canvas: 1600×900. The runtime page root has no default padding. - Full-bleed backgrounds may use the entire 1600×900 canvas. Authored content must still use a conservative safe content budget with 24-40px spare height. - Use Tailwind grid/flex layout. The root container usually uses `w-full h-full`; avoid fixed pixel values on the root. - All content must be fully visible within the canvas. When space is tight, preserve the information by changing the composition: asymmetric split, bento grid, evidence rail, timeline strip, layered callout, compact table, grouped labels, or side-by-side zones. If a bounded content module still does not fit after restructuring, scale that module and compensate its grid/flex footprint; never scale the page root or hide overflow. - Background fills the entire canvas, defined on the outermost container. - Body copy, ordinary labels, and card descriptions are at least `text-lg` (18px) by default. Only a genuinely high-density bounded module may use 16px after restructuring; mark that module `data-ppt-density="high"` and compensate its layout when scaling it. - Every heading must be at least `text-2xl` (24px); this is a floor, not a cap. Enlarge headings when hierarchy and the available canvas call for it. - Annotations, footers, page numbers, source/citation lines, and other genuinely auxiliary text may be smaller than 18px, but must remain at least 12px. Use semantic `