File size: 6,869 Bytes
9c06673 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | """
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: # INVESTOR mode
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") |