Overview
Designs and generates a complete PowerPoint theme file (.pptx template) with a custom color scheme, typography hierarchy, multiple slide layouts (title, content, two-column, image-heavy, data/chart, section divider, quote, comparison, closing), and consistent visual language. Outputs a ready-to-use template with sample content demonstrating each layout and a style guide slide for reference.
Workflow
<Definition - Theme Specification> The complete design system for a presentation theme. Structure:
Colors:
- Primary: hex color for headings, emphasis, key shapes
- Secondary: hex color for accents, supporting elements
- Background: hex color or gradient for slide backgrounds
- Text Primary: hex color for body text
- Text Secondary: hex color for captions, notes
- Accent 1-3: hex colors for charts, callouts, highlights
Typography:
- Heading font: family, weight, style
- Body font: family, weight, style
- Size scale: H1, H2, Body, Caption (in points)
- Line spacing: multiplier
Visual Elements:
- Shape style: rounded, sharp, or organic
- Border usage: none, subtle, or bold
- Shadow: none, subtle, or dramatic
- Image treatment: full-bleed, framed, or masked
- White space: generous, moderate, or compact
Layout Grid:
- Margins: size in inches
- Content alignment: left, center, or varied </Definition - Theme Specification>
<Definition - Required Layouts> Every theme must include these slide layouts at minimum:
- Title Slide: brand name, presentation title, subtitle, date/presenter
- Section Divider: section title with visual accent
- Content (Text): heading + body text with optional bullet points
- Two Column: side-by-side content areas
- Image + Text: large image with adjacent text
- Data/Chart: space for charts with title and key takeaway
- Quote/Callout: featured quote or key statistic
- Comparison: side-by-side comparison layout
- Closing/CTA: thank you, contact info, next steps </Definition - Required Layouts>
<Definition - Safe Fonts> Fonts confirmed available across Windows, macOS, and PowerPoint Online:
Sans-serif: Calibri, Arial, Segoe UI, Verdana, Tahoma, Trebuchet MS Serif: Georgia, Times New Roman, Garamond, Cambria, Book Antiqua Monospace: Consolas, Courier New Display: Impact, Franklin Gothic Medium </Definition - Safe Fonts>
Each step includes:
- Validate: A condition that must be true for the step to succeed.
- If-fails: The recovery action when validation fails. </Agent Annotations>
<Workflow - Create Theme description="End-to-end workflow for generating a custom presentation theme" tools=[run_python, file_write, open_in_session_tab] triggers=["create a presentation theme", "design my slide template", "build a deck theme"]>
Step 1: Gather Style Direction
- [Ask user] Collect {{style_preferences}}. If not already provided, ask for: preferred colors (or mood/brand to derive from), font preferences (or adjectives like "modern", "classic", "playful"), and intended use case.
- [Agent] If {{brand_name}} is not provided, set brand_name to "custom".
- [Agent] If {{use_case}} is not provided, set use_case to "general purpose".
- Validate: At minimum, style_preferences contains either explicit color values or descriptive adjectives sufficient to derive a palette.
- If-fails: Ask the user for at least one color or a mood descriptor (e.g., "corporate blue", "warm and inviting", "dark and techy").
Step 2: Build Theme Specification
- [Agent] Translate the user's style preferences into a complete <Definition - Theme Specification>. Select colors, fonts (from <Definition - Safe Fonts>), and visual elements that form a cohesive system.
- [Agent] Verify contrast ratios: text primary on background must meet 4.5:1 minimum. Text secondary on background must meet 3:1 minimum.
- [Ask user] Present the complete theme specification for approval. Show color swatches as hex codes, font choices with rationale, and visual element decisions.
- Validate: User approves the specification. All contrast ratios pass. All fonts are in <Definition - Safe Fonts>.
- If-fails: If contrast fails, propose adjusted colors and explain the change. If user rejects fonts, present 2-3 alternatives from <Definition - Safe Fonts>. If user rejects colors, ask for specific direction.
Step 3: Design Slide Layouts
- [Agent] Define content zones, positions (in inches), sizes, text formatting, background treatment, and decorative elements for each layout in <Definition - Required Layouts>.
- [Agent] Ensure every layout has at minimum: a title placeholder and a body/content placeholder. Decorative elements must not overlap placeholder regions.
- [Ask user] Present a summary of all layouts with their key characteristics. List each layout name and its distinguishing feature.
- Validate: All 9 required layouts are defined. Each has functional placeholders. Layouts are visually distinct but share the theme's color/font system.
- If-fails: If fewer than 9 layouts are needed for the use case, confirm with user. Minimum is 5 (title, section, content, two-column, closing).
Step 4: Generate Theme PPTX
- [Agent] Using python-pptx, build the .pptx file with:
- Slide dimensions set to 16:9 widescreen (13.333 x 7.5 inches)
- Color scheme applied to shape fills, text colors, and backgrounds
- Font theme applied to all text placeholders at the defined size scale
- All layouts from Step 3 implemented as individual slides with functional placeholders
- Decorative shapes (color blocks, lines, accent shapes) per the theme specification
- Consistent header/footer elements across layouts
- Validate: The .pptx file is generated without errors. Each layout contains at least a title placeholder and a body/content area. Decorative elements do not overlap placeholder regions.
- If-fails: Simplify problematic layouts by removing decorative elements. Rebuild with basic color fills and text formatting only. Log which layouts were simplified.
Step 5: Add Sample Content
- [Agent] Create 1-2 sample slides per layout with realistic content relevant to {{use_case}}:
- Sales pitch: product features, metrics, testimonials
- Conference talk: topic content, key points, diagrams
- Internal update: project status, timelines, decisions
- Training: learning objectives, step-by-step content, assessments
- General purpose: professional placeholder content demonstrating hierarchy
- Validate: Sample content demonstrates each layout's strengths. Text is readable at the defined font sizes. Content fills the layout without overflow or excessive whitespace.
- If-fails: Fall back to generic professional content (lorem ipsum style but meaningful) that demonstrates text hierarchy and spacing.
Step 6: Create Style Guide Slide
- [Agent] Add a style guide slide to the end of the deck showing:
- Color palette with hex codes displayed as colored rectangles with labels
- Typography specimens showing each font at each scale level
- Layout options listed as a thumbnail index
- Validate: Style guide is legible and accurately represents the theme specification from Step 2.
- If-fails: Create a text-only style guide slide listing colors (as hex codes) and fonts (as names with sizes).
Step 7: Dark Mode Variant
- [Decide] If the use_case suggests screen-heavy viewing (conference talk, training) OR the user's style_preferences mention "dark", offer a dark mode variant.
- [Ask user] "Would you like a dark mode variant of this theme?"
- [Agent] If yes: duplicate the theme and adjust:
- Invert background to dark (near-black or deep brand color)
- Switch text primary to light (white or near-white)
- Reduce color saturation by 10-15% for accent colors
- Verify contrast ratios still pass with inverted scheme
- Save as theme-[brand-name]-dark.pptx
- Validate: Dark variant maintains readability. All contrast ratios pass. Visual hierarchy remains clear with inverted colors.
- If-fails: Skip dark variant. Inform user it can be generated on request with adjusted colors.
Step 8: Deliver Theme
- [Agent] Save the theme file to artifacts/theme-{{brand_name}}.pptx using file_write.
- [Agent] Open the file for the user using open_in_session_tab.
- [Agent] Present a delivery summary:
- Brand name
- Number of layouts included
- Number of sample slides
- Style description (one line)
- File path
- List of all included layouts by name
- [Ask user] Offer follow-up options: adjust colors or fonts, add additional layouts, create dark mode variant (if not already done), or populate with the user's actual content.
- Validate: File exists at the stated path and opens without error.
- If-fails: Re-run the python-pptx generation with simplified layouts. Report which elements caused the failure.