| """ |
| Demo orchestration and presenter guidance |
| """ |
|
|
| from typing import Dict, List, Optional |
| from enum import Enum |
| from core.data_models import DemoMode, DemoStep |
|
|
| class DemoOrchestrator: |
| """Guide presenter through optimal demo flow""" |
| |
| def __init__(self, mode: DemoMode = DemoMode.INVESTOR): |
| self.mode = mode |
| self.current_step = 0 |
| self.steps = self._get_steps_for_mode() |
| |
| def _get_steps_for_mode(self) -> List[DemoStep]: |
| """Get demo steps based on mode""" |
| if self.mode == DemoMode.QUICK: |
| return [ |
| DemoStep( |
| title="Show Crisis", |
| scenario="Cache Miss Storm", |
| action="metrics", |
| message="Highlight the critical metrics - this is happening right now", |
| icon="๐" |
| ), |
| DemoStep( |
| title="OSS Analysis", |
| scenario="Cache Miss Storm", |
| action="oss", |
| message="Perfect analysis but requires manual work", |
| icon="๐ค" |
| ), |
| DemoStep( |
| title="Enterprise Magic", |
| scenario="Cache Miss Storm", |
| action="enterprise", |
| message="Watch ARF fix it automatically in minutes", |
| icon="โก" |
| ) |
| ] |
| else: |
| return [ |
| DemoStep( |
| title="Problem Statement", |
| scenario="Cache Miss Storm", |
| action="metrics", |
| message="This critical incident costs $8,500/hour right now", |
| icon="๐ฐ" |
| ), |
| DemoStep( |
| title="Current Solution (OSS)", |
| scenario="Cache Miss Storm", |
| action="oss", |
| message="Our free edition gives perfect analysis but manual work", |
| icon="๐" |
| ), |
| DemoStep( |
| title="ARF Solution (Enterprise)", |
| scenario="Cache Miss Storm", |
| action="enterprise", |
| message="Autonomous healing with enterprise safety controls", |
| icon="๐" |
| ), |
| DemoStep( |
| title="Business Impact", |
| scenario=None, |
| action="dashboard", |
| message="Show how ARF transforms cost centers to profit engines", |
| icon="๐" |
| ), |
| DemoStep( |
| title="Custom ROI Analysis", |
| scenario=None, |
| action="roi_calc", |
| message="Calculate their specific potential savings", |
| icon="๐งฎ" |
| ) |
| ] |
| |
| def get_next_guidance(self) -> Dict: |
| """Get next guidance step""" |
| if self.current_step >= len(self.steps): |
| return self._create_completion_guidance() |
| |
| step = self.steps[self.current_step] |
| self.current_step += 1 |
| |
| return { |
| "title": step.title, |
| "scenario": step.scenario, |
| "action": step.action, |
| "message": step.message, |
| "icon": step.icon, |
| "html": self._create_guidance_html(step) |
| } |
| |
| def _create_guidance_html(self, step: DemoStep) -> str: |
| """Create HTML guidance for presenter""" |
| action_desc = self._get_action_description(step.action) |
| |
| return f""" |
| <div style=' |
| padding: 20px; |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); |
| color: white; |
| border-radius: 10px; |
| margin: 15px 0; |
| border-left: 5px solid #4ECDC4; |
| box-shadow: 0 4px 6px rgba(0,0,0,0.1); |
| '> |
| <div style='display: flex; align-items: center; margin-bottom: 10px;'> |
| <span style='font-size: 24px; margin-right: 10px;'>{step.icon}</span> |
| <h3 style='margin: 0;'>Step {self.current_step}: {step.title}</h3> |
| </div> |
| <p style='margin: 0 0 10px 0; font-size: 16px;'><b>What to say:</b> "{step.message}"</p> |
| <div style=' |
| background: rgba(255,255,255,0.1); |
| padding: 10px; |
| border-radius: 5px; |
| margin-top: 10px; |
| '> |
| <span style='font-size: 14px; opacity: 0.9;'>๐ <b>Action:</b> {action_desc}</span> |
| </div> |
| </div> |
| """ |
| |
| def _create_completion_guidance(self) -> Dict: |
| """Create completion guidance""" |
| return { |
| "title": "Demo Complete", |
| "scenario": None, |
| "action": "complete", |
| "message": "Ready for investor Q&A", |
| "icon": "๐", |
| "html": """ |
| <div style=' |
| padding: 25px; |
| background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%); |
| color: white; |
| border-radius: 10px; |
| text-align: center; |
| margin: 20px 0; |
| box-shadow: 0 4px 6px rgba(0,0,0,0.1); |
| '> |
| <h2 style='margin: 0 0 15px 0;'>๐ Demo Complete!</h2> |
| <p style='margin: 0; font-size: 18px;'>Ready for investor Q&A</p> |
| <div style=' |
| margin-top: 20px; |
| padding: 15px; |
| background: rgba(255,255,255,0.1); |
| border-radius: 8px; |
| text-align: left; |
| '> |
| <h4 style='margin: 0 0 10px 0;'>Key Metrics Demonstrated:</h4> |
| <div style='display: grid; grid-template-columns: 1fr 1fr; gap: 10px;'> |
| <div>โข 85% faster incident resolution</div> |
| <div>โข 5.2ร average ROI</div> |
| <div>โข 81.7% auto-heal rate</div> |
| <div>โข 2-3 month payback</div> |
| </div> |
| </div> |
| </div> |
| """ |
| } |
| |
| def _get_action_description(self, action: str) -> str: |
| """Get description for action""" |
| actions = { |
| "metrics": "Show crisis metrics (already displayed)", |
| "oss": "Click 'Run OSS Analysis' button", |
| "enterprise": "Click 'Execute Enterprise Healing' (toggle approval)", |
| "dashboard": "Switch to Business Impact tab", |
| "roi_calc": "Adjust sliders and calculate custom ROI", |
| "complete": "Proceed to Q&A" |
| } |
| return actions.get(action, "Continue with demo") |