# Generation Protocol — oma-slide > Phase-by-phase workflow the oma-slide skill follows from first user message to final bundle. > Read this document before writing any slide HTML. ## CLI ⇄ Skill Boundary (recap) **Skill (this agent)** = judgment, creation, interaction. Writes 100% of the HTML. **CLI (`oma slide …`)** = determinism, reproducibility, testability. Operates only on written files. Call direction is one-way: **skill calls CLI. CLI never calls skill.** --- ## Phase 0 — Detect Mode **Goal:** identify which route and generation mode apply before doing anything else. 0. Select the route from the requested deliverable: | Request | Route | |---|---| | Editable PowerPoint / PPTX deliverable (편집 가능한 PPT) | `native-pptx` | | Fill or edit an existing PPTX while keeping its design | `native-pptx` | | PDF / DOCX / XLSX / URL to a deck delivered as PPTX | `native-pptx` | | Reusable brand / style / layout / deck template | `native-pptx` | | Narrated PPTX or MP4 authored from a deck | `native-pptx` | | Web, animated, or HTML deck; Canva; no format preference | HTML (steps 1–6) | Record the selected route with subject `slide.route-selection` per `../../_shared/runtime/route-selection.md` (route, the deliverable row that selected it, and the route not chosen). `native-pptx` follows `resources/native-pptx.md` and leaves this protocol. When the format is unknown and changes the route, add it to the single Phase 1 question instead of asking separately. 1. Inspect user input for one of four signals: - `new` — a topic, title, or free-text brief (no existing deck supplied). - `import-pptx` — user provides a `.pptx` file path. - `import-canva` — user provides a Canva design ID or URL. - `enhance` — user points to an existing workdir with `slide-NN.html` files. 2. Resolve the output directory before any scaffold/import: - Default: `.agents/results/slides//` - Prefer the active OMA workflow/session id exposed by the runtime. - If no runtime session id is available, create a timestamped id such as `session-YYYYMMDD-HHmmss`. - Store the deck title in `meta.json.title`; do not use the title as the directory name. 3. For `import-pptx`: run `oma slide import pptx --workspace `, skip Phase 1, and continue at Phase 2 so the user can choose the style applied to the extracted fragments in Phase 3. 4. For `import-canva`: probe Canva MCP with `search-designs` using the discovered tool schema. - If Canva MCP is not configured: offer auto-provisioning (see `resources/canva-integration.md` §Auto-Provisioning). Add the `canva` entry to project MCP config files and optionally the agy CLI global config (`~/.gemini/antigravity-cli/mcp_config.json`) with user approval. Notify that a session restart may be needed, then retry the probe. - If configured and authed: `export-design` (PPTX, using the discovered tool schema), then `oma slide import pptx` on the downloaded file. Skip Phase 1 and continue at Phase 2 for style selection. - If configured but unauthed: notify user about OAuth; skip to local import path. See `resources/canva-integration.md` for full pipeline details. 5. For `enhance`: skip to Phase 2 (style may already be set in `meta.json`). 6. For `new`: continue to Phase 1. --- ## Phase 1 — Content Discovery **Goal:** arrive at a concrete, agreed-upon outline before writing a single slide. ### 1a. Resolve missing content choices Reuse the purpose, length, content, and density already supplied. Ask one bundled question only for missing choices that materially affect the deck; otherwise select reasonable defaults and continue. Required dimensions: - **Purpose** — What is the deck for? (Pitch / report / talk / explainer / internal / external) - **Length** — Roughly how many slides? (Or let the skill decide from content scope.) - **Content** — What topics, data, or story should the deck cover? Any must-include points? - **Density** — How will the deck be used? (`meta.json.density` takes `sparse | balanced | dense`) - speaker-led deck → `sparse`: large statements, minimal text — speaker fills in detail verbally. - reading-first deck → `dense`: deck is read standalone; more text and detail per slide. - in between → `balanced` (the default). - **Format** — only when Phase 0 left it open: web/HTML deck, or editable PowerPoint (switches to `native-pptx`). Example combined question: > "To get started: what is this deck for (pitch, internal report, talk)? Roughly how many slides? What key topics or story should it cover? And will someone be presenting it live (sparse slides) or will it be read standalone (dense slides)?" ### 1b. User-Provided Asset Evaluation If the user has supplied images or video before or after the question: **Images:** For each image file: - Use multimodal Read to inspect the image. - Assess on three axes: `usable` (direct inclusion), `concept` (thematic inspiration only), `colors` (palette reference). - Record `{ file, role: usable|concept|colors, notes }` in working memory. **Video:** Run `oma slide asset fetch-video --workspace ` to download to `./assets/`. Record the local path. **Asset-driven outline:** Co-design the outline around BOTH text narrative and curated assets. Do not plan the outline first and attach assets afterward. If a photo defines the opening mood, build the opening slide around it. If a chart image exists, place it on the data slide. ### 1c. Output: Agreed Outline Produce a numbered outline: `slide N — [type] [title] [key content]`. Include which assets (if any) anchor which slides. Proceed under the existing deck-creation authorization; ask only if the outline introduces a material scope decision. --- ## Phase 2 — Style Discovery **Goal:** the user picks a visual style by seeing it, not reading about it. ### 2a. Read the Style Index Read `resources/style-presets.md` for the 12 vendored presets and `resources/selection-index.json` for the 34 bold template metadata. Use mood/tone/formality/density/scheme to shortlist candidates based on the deck's purpose and density. ### 2b. Style previews (when choosing a direction) When previews are needed, write three self-contained `preview-*.html` files (cover slide only, 1920×1080). Inline `resources/assets/viewport-base.css` in `
``` Key rules (full spec in `resources/fixed-stage.md`): - Author at exactly **1920 × 1080 px** — no `vw/vh`, no responsive reflowing units inside `.slide`. - Safe zones: left/right margin ≥ 80 px, top/bottom ≥ 60 px. - Body text ≥ 28 px; headings 64–120 px. - All spacing on the 8-px grid. - Keep every `
` inside `.deck-stage`: the validator measures each one as a 1920×1080 frame and runs all checks on it. No attribute switches a check off, so decorative or clipped text is checked like any other text. - Leave the `data-om-validate` marker as written; it labels the slide with the gate's check names and has no effect on what is checked. ### 3c. CJK Content Check Before writing any slide with Korean, Japanese, or Chinese characters: inject the Pretendard CDN `` into the slide ``. See `resources/fixed-stage.md` §7 for the exact markup and CSS variables. ### 3d. Image Handling - **New imagery needed:** invoke the `oma-image` skill. Reference the result as `./assets/`. Never call image generation APIs directly. - **Missing image API key:** insert `…` and add ``. - **No remote URLs** in ``, `