{
  "nodes": [
    {
      "id": "extract-content",
      "type": "llm",
      "position": {
        "x": -400,
        "y": 200
      },
      "config": {
        "file_variables": "input.source_documents",
        "is_terminal": false,
        "live_search": 0,
        "model": "google-claude-46-sonnet",
        "persona": 1,
        "temperature": 0.3,
        "prompt_template": "You are a content analyst preparing material for a PowerPoint presentation.\n\n**User-Provided Presentation Topic:** {{input.presentation_topic}}\n**User-Provided Target Audience:** {{input.audience_context}}\n\n---\n\n## YOUR FIRST TASK: Determine Presentation Topic & Audience\n\nIf the user has provided a presentation topic above (not blank), use that as the definitive topic.\nIf the presentation topic is blank or not provided, analyze the source documents and:\n- Identify the most logical presentation topic based on the content\n- Suggest a compelling presentation title\n\nIf the user has provided a target audience above (not blank), use that as the definitive audience.\nIf the target audience is blank or not provided, analyze the source documents and:\n- Identify the intended or most appropriate audience based on the content, tone, and complexity\n- Consider clues like: technical depth, business terminology, executive summaries, etc.\n\n---\n\n## EXTRACTED/CONFIRMED PRESENTATION PARAMETERS\n\n### Presentation Topic\n[State the presentation topic - either from user input or extracted from documents]\n\n### Target Audience\n[State the target audience - either from user input or extracted from documents]\n\n### Rationale (if extracted from documents)\n[If you determined the topic or audience from the documents, briefly explain your reasoning]\n\n---\n\n## CONTENT EXTRACTION\n\nNow analyze the provided documents and extract the following:\n\n### 1. KEY THEMES & MESSAGES\nWhat are the 3-5 main themes or messages relevant to the presentation topic?\n\n### 2. CRITICAL DATA POINTS\nList any statistics, metrics, numbers, or quantifiable information that should be highlighted.\nFormat as bullet points with the specific data and its context.\n\n### 3. SUPPORTING EVIDENCE\nIdentify quotes, case studies, examples, or proof points that strengthen the narrative.\nInclude the source context for each piece of evidence.\n\n### 4. VISUAL OPPORTUNITIES\nNote any content that would work well as:\n- **Charts or graphs:** [Describe data that could be visualized]\n- **Diagrams or process flows:** [Describe processes or relationships]\n- **Comparison tables:** [Describe comparative information]\n- **Timeline graphics:** [Describe chronological information]\n- **Images or icons:** [Suggest visual themes]\n\n### 5. KEY STAKEHOLDERS & QUOTES\nList any named individuals, their roles, and notable quotes or positions mentioned in the documents.\n\n### 6. TERMINOLOGY & DEFINITIONS\nList any key terms, acronyms, or concepts that may need explanation for the target audience.\n\n### 7. GAPS IDENTIFIED\nWhat important information seems to be missing from the source documents that would strengthen the presentation? Be specific about what additional information would be valuable.\n\n---\n\nFormat your response with clear headers and organized bullet points."
      },
      "label": "Extract Source Content",
      "key": ""
    },
    {
      "id": "save-extracted",
      "type": "variable_assignment",
      "position": {
        "x": -50,
        "y": 200
      },
      "config": {
        "source": "extract-content.response",
        "variable_name": "extracted_content"
      },
      "label": "Save Extracted Content",
      "key": ""
    },
    {
      "id": "suggest-enhancements",
      "type": "llm",
      "position": {
        "x": 300,
        "y": 200
      },
      "config": {
        "file_variables": "",
        "is_terminal": false,
        "live_search": 0,
        "model": "google-claude-46-sonnet",
        "persona": 1,
        "temperature": 0.3,
        "prompt_template": "You are a presentation strategist helping to create an impactful PowerPoint.\n\n**Presentation Topic:** {{input.presentation_topic}}\n**Target Audience:** {{input.audience_context}}\n**Style Preferences:** {{input.style_preferences}}\n**Desired Slide Count:** {{input.slide_count}}\n**User's Additional Instructions:** {{input.additional_instructions}}\n\n**Extracted Content from Source Documents:**\n{{extracted_content}}\n\n---\n\nBased on your analysis, provide **Suggested Enhancements** the user should consider:\n\n### 1. RECOMMENDED PRESENTATION STRUCTURE\nSuggest the optimal flow/structure for this presentation (e.g., Problem \u2192 Solution \u2192 Benefits \u2192 Call to Action).\n\n### 2. MISSING INFORMATION SUGGESTIONS\nBased on gaps identified, what additional information would strengthen this presentation? Be specific:\n- \"Consider adding [X] to support the claim about [Y]\"\n- \"A case study demonstrating [Z] would be valuable\"\n\n### 3. AUDIENCE-SPECIFIC RECOMMENDATIONS\nGiven the target audience, suggest:\n- Appropriate level of technical detail\n- Key concerns this audience likely has\n- Persuasion angles that would resonate\n\n### 4. VISUAL ENHANCEMENT IDEAS\nRecommend specific visuals that would elevate the presentation:\n- Suggested chart types for the data\n- Diagram concepts for processes\n- Icon themes that fit the topic\n\n### 5. TALKING POINTS ADVISORY\nSuggest 2-3 key talking points per major section that the presenter should emphasize.\n\n### 6. RISK FLAGS\nNote any potential issues:\n- Claims that need stronger evidence\n- Sensitive topics requiring careful framing\n- Areas where the audience might push back\n\n---\n\nFormat as actionable recommendations the user can accept, modify, or decline.\n\nEnhancement Suggestions:"
      },
      "label": "Suggest Enhancements",
      "key": ""
    },
    {
      "id": "save-suggestions",
      "type": "variable_assignment",
      "position": {
        "x": 650,
        "y": 200
      },
      "config": {
        "source": "suggest-enhancements.response",
        "variable_name": "enhancement_suggestions"
      },
      "label": "Save Suggestions",
      "key": ""
    },
    {
      "id": "generate-outline",
      "type": "llm",
      "position": {
        "x": 1000,
        "y": 200
      },
      "config": {
        "file_variables": "",
        "is_terminal": false,
        "live_search": 0,
        "model": "google-claude-46-sonnet",
        "persona": 1,
        "temperature": 0.3,
        "prompt_template": "You are a professional presentation designer creating a detailed outline.\n\n**Presentation Topic:** {{input.presentation_topic}}\n**Target Audience:** {{input.audience_context}}\n**Desired Slide Count:** {{input.slide_count}} (if not specified or blank, aim for 10-12 slides)\n**Style Preferences:** {{input.style_preferences}}\n**Additional Instructions:** {{input.additional_instructions}}\n\n**Extracted Content:**\n{{extracted_content}}\n\n**Enhancement Suggestions:**\n{{enhancement_suggestions}}\n\n---\n\nCreate a comprehensive slide-by-slide outline.\n\nFor EACH slide, provide:\n\n### Slide [Number]: [Slide Title]\n- **Purpose:** Why this slide exists in the flow\n- **Header Text:** The main headline (keep under 10 words)\n- **Key Points:** 3-5 bullet points (concise, action-oriented)\n- **Visual Element:** Describe what visual should appear (chart, image, diagram, icon)\n- **Speaker Notes:** 2-3 sentences of what the presenter should say\n- **Data/Evidence:** Specific facts or figures to include (from source documents)\n\n**Outline Requirements:**\n1. Start with a compelling title slide\n2. Include an agenda/overview slide\n3. Build a logical narrative flow\n4. End with clear next steps or call-to-action\n5. Consider a Q&A or appendix slide if appropriate\n\nEnsure the outline directly incorporates content from the source documents and addresses the enhancement suggestions where appropriate.\n\n---\n\nPresentation Outline:"
      },
      "label": "Generate Outline",
      "key": ""
    },
    {
      "id": "save-outline",
      "type": "variable_assignment",
      "position": {
        "x": 1350,
        "y": 200
      },
      "config": {
        "source": "generate-outline.response",
        "variable_name": "presentation_outline"
      },
      "label": "Save Outline",
      "key": ""
    },
    {
      "id": "generate-pptx",
      "type": "llm",
      "position": {
        "x": 1700,
        "y": 200
      },
      "config": {
        "file_variables": "",
        "is_terminal": false,
        "live_search": 0,
        "model": "google-claude-46-sonnet",
        "persona": 1,
        "temperature": 0.2,
        "prompt_template": "You are an expert at generating PptxGenJS code for professional presentations.\n\n**Presentation Topic:** {{input.presentation_topic}}\n**Style Preferences:** {{input.style_preferences}}\n\n**Presentation Outline:**\n{{presentation_outline}}\n\n---\n\nGenerate complete PptxGenJS code to create this presentation.\n\n**CRITICAL REQUIREMENTS:**\n\n1. **Code Structure:**\n   - Wrap all code in a function called `generatePptx`\n   - Create a PptxGenJS instance called `pptx`\n   - End with `return pptx`\n\n2. **Slide Master:**\n   - Create a professional slide master using `defineSlideMaster`\n   - Use full slide width for the header\n   - Apply a cohesive color scheme (use style preferences if provided, otherwise use professional blues/grays)\n   - Do NOT add slide numbers in footers\n\n3. **Bullet Points:**\n   - Use ONLY `{ text: 'Your text', options: { bullet: true } }` format\n   - NEVER manually add bullet characters when using `bullet: true`\n\n4. **Text Alignment:**\n   - Set `valign: \"top\"` for ALL text elements\n   - Ensure consistent positioning across slides\n\n5. **Visual Elements:**\n   - Include placeholder comments for charts/images where the outline specifies them\n   - Use shapes and colors to create visual interest\n   - Add simple shapes (rectangles, lines) to enhance visual appeal\n\n6. **Professional Formatting:**\n   - Consistent font sizes (titles: 24-32pt, body: 14-18pt)\n   - Adequate margins and spacing\n   - Readable contrast between text and backgrounds\n\n7. **Slide Layout:**\n   - Title slide should be visually distinct\n   - Content slides should follow the master template\n   - Maintain consistent margins (x: 0.5, width: 9.0 for full-width content)\n\n---\n\nGenerate the complete code wrapped in a markdown code block starting with ```javascript-pptx and ending with ```.\n\nPptxGenJS Code:"
      },
      "label": "Generate PPTX Code",
      "key": ""
    },
    {
      "id": "save-pptx-code",
      "type": "variable_assignment",
      "position": {
        "x": 2050,
        "y": 200
      },
      "config": {
        "source": "generate-pptx.response",
        "variable_name": "pptx_code"
      },
      "label": "Save PPTX Code",
      "key": ""
    },
    {
      "id": "return-response",
      "type": "flat_response",
      "position": {
        "x": 2400,
        "y": 200
      },
      "config": {
        "response_type": "text",
        "response_template": "# PowerPoint Presentation: {{input.presentation_topic}}\n\n---\n\n## Enhancement Suggestions\n\nThe following suggestions were identified based on your source documents. Consider incorporating these to strengthen your presentation:\n\n{{enhancement_suggestions}}\n\n---\n\n## Presentation Outline\n\nHere is the detailed slide-by-slide outline for your presentation:\n\n{{presentation_outline}}\n\n---\n\n## Generated PowerPoint Code\n\nThe following PptxGenJS code will generate your PowerPoint file:\n\n{{pptx_code}}\n\n---\n\n## Next Steps\n\n1. **Review the suggestions above** - Consider adding any missing information identified\n2. **Validate the outline** - Ensure the flow matches your intended narrative\n3. **Download the PowerPoint** - Use the generated code to create your .pptx file\n4. **Customize further** - Add your organization's logo, adjust colors to brand guidelines, and refine content as needed\n\n---\n\n*This presentation was generated from your source documents. Please verify all facts and figures before presenting.*"
      },
      "label": "Return Response",
      "key": ""
    }
  ],
  "edges": [
    {
      "id": "edge-1",
      "source": "extract-content",
      "target": "save-extracted",
      "sourceHandle": "out",
      "targetHandle": "in"
    },
    {
      "id": "edge-2",
      "source": "save-extracted",
      "target": "suggest-enhancements",
      "sourceHandle": "out",
      "targetHandle": "in"
    },
    {
      "id": "edge-3",
      "source": "suggest-enhancements",
      "target": "save-suggestions",
      "sourceHandle": "out",
      "targetHandle": "in"
    },
    {
      "id": "edge-4",
      "source": "save-suggestions",
      "target": "generate-outline",
      "sourceHandle": "out",
      "targetHandle": "in"
    },
    {
      "id": "edge-5",
      "source": "generate-outline",
      "target": "save-outline",
      "sourceHandle": "out",
      "targetHandle": "in"
    },
    {
      "id": "edge-6",
      "source": "save-outline",
      "target": "generate-pptx",
      "sourceHandle": "out",
      "targetHandle": "in"
    },
    {
      "id": "edge-7",
      "source": "generate-pptx",
      "target": "save-pptx-code",
      "sourceHandle": "out",
      "targetHandle": "in"
    },
    {
      "id": "edge-8",
      "source": "save-pptx-code",
      "target": "return-response",
      "sourceHandle": "out",
      "targetHandle": "in"
    }
  ],
  "agent_config": {
    "version": 1,
    "agent": {
      "name": "PowerPoint Generator",
      "description": "",
      "agent_mode": "single",
      "primary_workflow_uuid": null,
      "system_prompt": "",
      "model": "auto",
      "temperature": 1,
      "variables": {
        "additional_instructions": {
          "default": "Include a slide on Zero Trust Architecture progress. Reference the DoD Zero Trust Strategy and the agency's migration timeline. Ensure all metrics reference FY2026 Q1 data. Add a risk heat map concept slide. End with a clear \"Decisions Required\" slide for leadership action.",
          "type": "text"
        },
        "audience_context": {
          "default": "Agency senior leadership and ISSO community (GS-14 and above), including the CISO, Deputy CISO, and Division Chiefs. Audience is familiar with cybersecurity concepts but expects executive-level summaries with actionable recommendations.",
          "type": "text"
        },
        "presentation_topic": {
          "default": "Cybersecurity Posture Review \u2013 Q1 FY2026",
          "type": "text"
        },
        "slide_count": {
          "default": "12",
          "type": "text"
        },
        "source_documents": {
          "default": "",
          "type": "file"
        },
        "style_preferences": {
          "default": "Professional government style. Use navy blue (#003366), white, and accent gold (#C5A030). Clean, minimal design. Use sans-serif fonts. Avoid overly corporate or flashy visuals.",
          "type": "text"
        }
      }
    }
  }
}
