Compose a collaborative runbook authoring platform with live incident context,…
- User
Compose a collaborative runbook authoring platform with live incident context, simulation mode, and knowledge checks.
Assistant
The user wants a collaborative runbook authoring platform with:
- Live incident context - showing current incident details
- Simulation mode - ability to simulate/run through runbook steps
- Knowledge checks - quizzes/validation during the runbook
This is a complex operational tool. Let me think about the design:
Core Features:
- Runbook editor with steps/procedures
- Live incident panel showing current incident details
- Simulation mode to walk through steps
- Knowledge check questions embedded in steps
- Collaborative indicators (multiple users editing)
Design Direction:
- Technical/industrial aesthetic - this is for ops/engineers
- Dark theme with high contrast for incident response scenarios
- Status colors: green (success), amber (warning), red (critical), blue (info)
- Monospace for code/commands, clean sans-serif for UI
Layout:
- Left sidebar: Runbook list/tree
- Center: Main editor with steps
- Right panel: Live incident context (collapsible)
- Bottom: Knowledge check panel when in simulation mode
Interactions:
- Create/edit/delete runbook steps
- Toggle simulation mode
- Complete knowledge checks
- Live incident updates (simulated)
- Step completion tracking
- Collaborative cursors (simulated)
Typography:
- Display: JetBrains Mono or Space Mono for that technical feel
- UI: DM Sans or IBM Plex Sans
Let me build this with a strong technical aesthetic, real functionality, and meaningful interactions.
Collaborative Runbook Platform
A technical operations tool for authoring, simulating, and validating incident response procedures.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>RunbookOps — Collaborative Incident Response Platform</title> <script src="https://cdn.tailwindcss.com"></script> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap" rel="stylesheet"> <style> :root { --bg-primary: #0a0c10; --bg-secondary: #12151c; --bg-tertiary: #1a1e28; --fg-primary: #e8eaed; --fg-secondary: #9aa0a8; --fg-muted: #5c6370; --accent-primary: #00d992; --accent-secondary: #0099ff; --critical: #ff4757; --warning: #ffa502; --border: #2a2f3a; --card: #161a22; } * { box-sizing: border-box; } body { font-family: 'Space Grotesk', sans-serif; background: var(--bg-primary); color: var(--fg-primary); } .font-mono { font-family: 'JetBrains Mono', monospace; } .bg-grid { background-image: linear-gradient(rgba(0, 217, 146, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 217, 146, 0.03) 1px, transparent 1px); background-size: 24px 24px; } .glow-accent { box-shadow: 0 0 20px rgba(0, 217, 146, 0.15); } .glow-critical { box-shadow: 0 0 20px rgba(255, 71, 87, 0.25); } .step-card { transition: all 0.2s ease; } .step-card:hover { border-color: var(--accent-primary); transform: translateX(4px); } .step-card.completed { border-left: 3px solid var(--accent-primary); } .step-card.active { border-left: 3px solid var(--accent-secondary); background: rgba(0, 153, 255, 0.05); } .pulse-dot { animation: pulse 2s infinite; } @keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } } @keyframes slideIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } @keyframes fadeSlide { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } } .animate-slide-in { animation: slideIn 0.4s ease forwards; } .animate-fade-slide { animation: fadeSlide 0.3s ease forwards; } .stagger-1 { animation-delay: 0.05s; } .stagger-2 { animation-delay: 0.1s; } .stagger-3 { animation-delay: 0.15s; } .stagger-4 { animation-delay: 0.2s; } .stagger-5 { animation-delay: 0.25s; } @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } } .scrollbar-thin::-webkit-scrollbar { width: 6px; } .scrollbar-thin::-webkit-scrollbar-track { background: var(--bg-secondary); } .scrollbar-thin::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; } .scrollbar-thin::-webkit-scrollbar-thumb:hover { background: var(--fg-muted); } .incident-severity-critical { border-left: 3px solid var(--critical); } .incident-severity-warning { border-left: 3px solid var(--warning); } .incident-severity-info { border-left: 3px solid var(--accent-secondary); } .toggle-switch { position: relative; width: 44px; height: 24px; background: var(--bg-tertiary); border-radius: 12px; cursor: pointer; transition: background 0.2s; } .toggle-switch.active { background: var(--accent-primary); } .toggle-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: var(--fg-primary); border-radius: 50%; transition: transform 0.2s; } .toggle-switch.active::after { transform: translateX(20px); } .knowledge-option { transition: all 0.2s; } .knowledge-option:hover { background: var(--bg-tertiary); border-color: var(--accent-secondary); } .knowledge-option.selected { background: rgba(0, 153, 255, 0.1); border-color: var(--accent-secondary); } .knowledge-option.correct { background: rgba(0, 217, 146, 0.15); border-color: var(--accent-primary); } .knowledge-option.incorrect { background: rgba(255, 71, 87, 0.15); border-color: var(--critical); } .collaborator-cursor { position: absolute; width: 2px; height: 20px; animation: cursorBlink 1s infinite; } @keyframes cursorBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } } </style> </head> <body class="min-h-screen bg-grid overflow-hidden"> <!-- Header --> <header class="fixed top-0 left-0 right-0 z-50 border-b border-[var(--border)] bg-[var(--bg-primary)]/95 backdrop-blur-sm"> <div class="flex items-center justify-between px-4 h-14"> <div class="flex items-center gap-6"> <div class="flex items-center gap-2"> <div class="w-8 h-8 rounded bg-[var(--accent-primary)] flex items-center justify-center"> <svg class="w-5 h-5 text-[var(--bg-primary)]" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/> </svg> </div> <span class="font-semibold text-lg">RunbookOps</span> </div> <nav class="hidden md:flex items-center gap-1"> <button class="px-3 py-1.5 rounded text-sm bg-[var(--bg-tertiary)] text-[var(--fg-primary)]">Editor</button> <button class="px-3 py-1.5 rounded text-sm text-[var(--fg-secondary)] hover:text-[var(--fg-primary)] transition-colors">History</button> <button class="px-3 py-1.5 rounded text-sm text-[var(--fg-secondary)] hover:text-[var(--fg-primary)] transition-colors">Templates</button> </nav> </div> <div class="flex items-center gap-4"> <!-- Collaborators --> <div class="hidden sm:flex items-center -space-x-2"> <div class="w-8 h-8 rounded-full bg-[#6366f1] flex items-center justify-center text-xs font-medium border-2 border-[var(--bg-primary)]" title="Sarah Chen">SC</div> <div class="w-8 h-8 rounded-full bg-[#ec4899] flex items-center justify-center text-xs font-medium border-2 border-[var(--bg-primary)]" title="Marcus Webb">MW</div> <div class="w-8 h-8 rounded-full bg-[#f59e0b] flex items-center justify-center text-xs font-medium border-2 border-[var(--bg-primary)]" title="Alex Rivera">AR</div> <div class="w-8 h-8 rounded-full bg-[var(--bg-tertiary)] flex items-center justify-center text-xs font-medium border-2 border-[var(--bg-primary)]">+2</div> </div> <!-- Simulation Mode Toggle --> <div class="flex items-center gap-3 px-3 py-1.5 rounded-lg bg-[var(--bg-secondary)] border border-[var(--border)]"> <span class="text-sm text-[var(--fg-secondary)]">Simulation</span> <div id="simulationToggle" class="toggle-switch" role="switch" aria-checked="false" tabindex="0"></div> </div> <button class="p-2 rounded-lg bg-[var(--accent-primary)] text-[var(--bg-primary)] font-medium text-sm hover:opacity-90 transition-opacity"> Publish </button> </div> </div> </header> <main class="flex pt-14 h-screen"> <!-- Sidebar - Runbook List --> <aside class="w-64 border-r border-[var(--border)] bg-[var(--bg-secondary)] flex flex-col hidden lg:flex"> <div class="p-4 border-b border-[var(--border)]"> <div class="relative"> <svg class="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--fg-muted)]" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/> </svg> <input type="text" placeholder="Search runbooks..." class="w-full pl-10 pr-4 py-2 bg-[var(--bg-tertiary)] border border-[var(--border)] rounded-lg text-sm focus:outline-none focus:border-[var(--accent-primary)] transition-colors"> </div> </div> <div class="flex-1 overflow-y-auto scrollbar-thin p-3 space-y-1"> <div class="text-xs font-medium text-[var(--fg-muted)] uppercase tracking-wider px-3 py-2">Active Runbooks</div> <button class="runbook-item w-full text-left px-3 py-2 rounded-lg bg-[var(--bg-tertiary)] border border-[var(--accent-primary)]" data-id="1"> <div class="flex items-center justify-between"> <span class="font-medium text-sm">Database Failover</span> <span class="w-2 h-2 rounded-full bg-[var(--critical)] pulse-dot"></span> </div> <span class="text-xs text-[var(--fg-muted)]">Last edited 2m ago</span> </button> <button class="runbook-item w-full text-left px-3 py-2 rounded-lg hover:bg-[var(--bg-tertiary)] transition-colors" data-id="2"> <div class="flex items-center justify-between"> <span class="font-medium text-sm">API Rate Limit Response</span> <span class="w-2 h-2 rounded-full bg-[var(--warning)]"></span> </div> <span class="text-xs text-[var(--fg-muted)]">Last edited 15m ago</span> </button> <button class="runbook-item w-full text-left px-3 py-2 rounded-lg hover:bg-[var(--bg-tertiary)] transition-colors" data-id="3"> <div class="flex items-center justify-between"> <span class="font-medium text-sm">CDN Cache Purge</span> <span class="w-2 h-2 rounded-full bg-[var(--accent-secondary)]"></span> </div> <span class="text-xs text-[var(--fg-muted)]">Last edited 1h ago</span> </button> <div class="text-xs font-medium text-[var(--fg-muted)] uppercase tracking-wider px-3 py-2 mt-4">Templates</div> <button class="runbook-item w-full text-left px-3 py-2 rounded-lg hover:bg-[var(--bg-tertiary)] transition-colors" data-id="4"> <span class="font-medium text-sm">Service Restart</span> <span class="text-xs text-[var(--fg-muted)] block">Standard template</span> </button> <button class="runbook-item w-full text-left px-3 py-2 rounded-lg hover:bg-[var(--bg-tertiary)] transition-colors" data-id="5"> <span class="font-medium text-sm">Incident Escalation</span> <span class="text-xs text-[var(--fg-muted)] block">Standard template</span> </button> </div> <div class="p-3 border-t border-[var(--border)]"> <button class="w-full flex items-center justify-center gap-2 px-4 py-2 rounded-lg border border-dashed border-[var(--border)] text-[var(--fg-secondary)] hover:text-[var(--fg-primary)] hover:border-[var(--fg-muted)] transition-colors"> <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/> </svg> <span class="text-sm">New Runbook</span> </button> </div> </aside> <!-- Main Editor --> <section class="flex-1 flex flex-col overflow-hidden"> <div class="flex-1 overflow-y-auto scrollbar-thin p-6"> <!-- Runbook Header --> <div class="mb-6 animate-slide-in opacity-0"> <div class="flex items-start justify-between mb-4"> <div> <div class="flex items-center gap-3 mb-2"> <h1 class="text-2xl font-bold">Database Failover Procedure</h1> <span class="px-2 py-0.5 text-xs font-mono bg-[var(--critical)]/20 text-[var(--critical)] rounded">v2.4</span> </div> <p class="text-[var(--fg-secondary)]">PostgreSQL primary/replica failover with zero data loss</p> </div> <div class="flex items-center gap-2"> <button class="p-2 rounded-lg border border-[var(--border)] hover:bg-[var(--bg-tertiary)] transition-colors" aria-label="Settings"> <svg class="w-5 h-5 text-[var(--fg-secondary)]" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/> </svg> </button> </div> </div> <!-- Metadata --> <div class="flex flex-wrap gap-4 text-sm"> <div class="flex items-center gap-2 text-[var(--fg-secondary)]"> <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/> </svg> <span>Est. 12 min</span> </div> <div class="flex items-center gap-2 text-[var(--fg-secondary)]"> <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"/> </svg> <span>6 steps</span> </div> <div class="flex items-center gap-2 text-[var(--fg-secondary)]"> <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/> </svg> <span>3 knowledge checks</span> </div> </div> </div> <!-- Steps Container --> <div id="stepsContainer" class="space-y-4"> <!-- Steps will be rendered here --> </div> <!-- Add Step Button --> <button id="addStepBtn" class="w-full mt-4 p-4 rounded-lg border-2 border-dashed border-[var(--border)] text-[var(--fg-secondary)] hover:text-[var(--fg-primary)] hover:border-[var(--fg-muted)] transition-colors flex items-center justify-center gap-2"> <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/> </svg> <span>Add Step</span> </button> </div> <!-- Knowledge Check Panel (shown during simulation) --> <div id="knowledgeCheckPanel" class="hidden border-t border-[var(--border)] bg-[var(--bg-secondary)] p-6"> <div class="max-w-2xl mx-auto"> <div class="flex items-center justify-between mb-4"> <h3 class="font-semibold text-lg">Knowledge Check</h3> <span id="checkProgress" class="text-sm text-[var(--fg-secondary)]">Question 1 of 3</span> </div> <div id="checkContent"> <!-- Knowledge check content rendered here --> </div> </div> </div> <!-- Simulation Progress Bar --> <div id="simulationProgress" class="hidden border-t border-[var(--border)] bg-[var(--bg-secondary)]"> <div class="flex items-center gap-4 px-6 py-3"> <span class="text-sm text-[var(--fg-secondary)]">Simulation Progress</span> <div class="flex-1 h-2 bg-[var(--bg-tertiary)] rounded-full overflow-hidden"> <div id="progressBar" class="h-full bg-[var(--accent-primary)] transition-all duration-300" style="width: 0%"></div> </div> <span id="progressText" class="text-sm font-mono text-[var(--fg-primary)]">0%</span> <button id="exitSimulation" class="px-3 py-1.5 text-sm rounded border border-[var(--border)] hover:bg-[var(--bg-tertiary)] transition-colors">Exit</button> </div> </div> </section> <!-- Live Incident Context Panel --> <aside id="incidentPanel" class="w-80 border-l border-[var(--border)] bg-[var(--bg-secondary)] flex flex-col hidden xl:flex"> <div class="p-4 border-b border-[var(--border)] flex items-center justify-between"> <h2 class="font-semibold">Live Incident Context</h2> <button id="toggleIncidentPanel" class="p-1 rounded hover:bg-[var(--bg-tertiary)] transition-colors" aria-label="Collapse panel"> <svg class="w-5 h-5 text-[var(--fg-secondary)]" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/> </svg> </button> </div> <div class="flex-1 overflow-y-auto scrollbar-thin"> <!-- Incident Status --> <div class="p-4 border-b border-[var(--border)]"> <div class="p-3 rounded-lg bg-[var(--critical)]/10 border border-[var(--critical)]/30 glow-critical"> <div class="flex items-center gap-2 mb-2"> <span class="w-2 h-2 rounded-full bg-[var(--critical)] pulse-dot"></span> <span class="text-sm font-medium text-[var(--critical)]">Active Incident</span> </div> <h3 class="font-semibold mb-1">PostgreSQL Primary Unresponsive</h3> <p class="text-sm text-[var(--fg-secondary)]">Database connectivity lost at 14:32 UTC</p> <div class="flex items-center gap-4 mt-3 text-xs text-[var(--fg-muted)]"> <span>Duration: 18m</span> <span>SEV-1</span> </div> </div> </div> <!-- Metrics --> <div class="p-4 border-b border-[var(--border)]"> <h3 class="text-sm font-medium text-[var(--fg-muted)] uppercase tracking-wider mb-3">Key Metrics</h3> <div class="grid grid-cols-2 gap-3"> <div class="p-3 rounded-lg bg-[var(--bg-tertiary)]"> <div class="text-xs text-[var(--fg-muted)] mb-1">Connections</div> <div class="text-xl font-mono font-semibold text-[var(--critical)]">0</div> <div class="text-xs text-[var(--critical)]">-100%</div> </div> <div class="p-3 rounded-lg bg-[var(--bg-tertiary)]"> <div class="text-xs text-[var(--fg-muted)] mb-1">Replication Lag</div> <div class="text-xl font-mono font-semibold text-[var(--warning)]">847ms</div> <div class="text-xs text-[var(--warning)]">+720ms</div> </div> <div class="p-3 rounded-lg bg-[var(--bg-tertiary)]"> <div class="text-xs text-[var(--fg-muted)] mb-1">Disk I/O</div> <div class="text-xl font-mono font-semibold">0 MB/s</div> <div class="text-xs text-[var(--fg-muted)]">idle</div> </div> <div class="p-3 rounded-lg bg-[var(--bg-tertiary)]"> <div class="text-xs text-[var(--fg-muted)] mb-1">CPU</div> <div class="text-xl font-mono font-semibold">2%</div> <div class="text-xs text-[var(--fg-muted)]">system</div> </div> </div> </div> <!-- Recent Events --> <div class="p-4 border-b border-[var(--border)]"> <h3 class="text-sm font-medium text-[var(--fg-muted)] uppercase tracking-wider mb-3">Event Timeline</h3> <div class="space-y-3"> <div class="flex gap-3"> <div class="flex flex-col items-center"> <div class="w-2 h-2 rounded-full bg-[var(--critical)]"></div> <div class="w-0.5 h-full bg-[var(--border)]"></div> </div> <div class="pb-3"> <div class="text-sm font-medium">Connection timeout</div> <div class="text-xs text-[var(--fg-muted)]">14:32:15 UTC</div> </div> </div> <div class="flex gap-3"> <div class="flex flex-col items-center"> <div class="w-2 h-2 rounded-full bg-[var(--warning)]"></div> <div class="w-0.5 h-full bg-[var(--border)]"></div> </div> <div class="pb-3"> <div class="text-sm font-medium">Replication lag spike</div> <div class="text-xs text-[var(--fg-muted)]">14:32:08 UTC</div> </div> </div> <div class="flex gap-3"> <div class="flex flex-col items-center"> <div class="w-2 h-2 rounded-full bg-[var(--accent-secondary)]"></div> <div class="w-0.5 h-full bg-[var(--border)]"></div> </div> <div class="pb-3"> <div class="text-sm font-medium">Health check failed</div> <div class="text-xs text-[var(--fg-muted)]">14:31:45 UTC</div> </div> </div> <div class="flex gap-3"> <div class="flex flex-col items-center"> <div class="w-2 h-2 rounded-full bg-[var(--fg-muted)]"></div> </div> <div> <div class="text-sm font-medium">Last successful query</div> <div class="text-xs text-[var(--fg-muted)]">14:31:30 UTC</div> </div> </div> </div> </div> <!-- Related Resources --> <div class="p-4"> <h3 class="text-sm font-medium text-[var(--fg-muted)] uppercase tracking-wider mb-3">Related Resources</h3> <div class="space-y-2"> <a href="#" class="flex items-center gap-2 p-2 rounded hover:bg-[var(--bg-tertiary)] transition-colors group"> <svg class="w-4 h-4 text-[var(--fg-muted)]" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"/> </svg> <span class="text-sm group-hover:text-[var(--accent-primary)] transition-colors">pg-failover-check.sh</span> </a> <a href="#" class="flex items-center gap-2 p-2 rounded hover:bg-[var(--bg-tertiary)] transition-colors group"> <svg class="w-4 h-4 text-[var(--fg-muted)]" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"/> </svg> <span class="text-sm group-hover:text-[var(--accent-primary)] transition-colors">Monitoring Dashboard</span> </a> <a href="#" class="flex items-center gap-2 p-2 rounded hover:bg-[var(--bg-tertiary)] transition-colors group"> <svg class="w-4 h-4 text-[var(--fg-muted)]" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"/> </svg> <span class="text-sm group-hover:text-[var(--accent-primary)] transition-colors">#incidents Slack Channel</span> </a> </div> </div> </div> </aside> </main> <script> // Data const runbookSteps = [ { id: 1, order: 1, title: 'Verify Primary Status', description: 'Check if the primary database is truly unresponsive or experiencing high load.', type: 'verification', estimatedTime: '2 min', commands: [ 'kubectl exec -it pg-primary-0 -- pg_isready', 'kubectl exec -it pg-primary-0 -- ps aux | grep postgres' ], hasKnowledgeCheck: true, knowledgeCheck: { question: 'What should you check before initiating a failover?', options: [ { id: 'a', text: 'Replication lag between primary and replica', correct: true }, { id: 'b', text: 'Disk space on the backup server', correct: false }, { id: 'c', text: 'Network latency to external APIs', correct: false }, { id: 'd', text: 'CPU usage on the monitoring server', correct: false } ] }, completed: false }, { id: 2, order: 2, title: 'Check Replica Status', description: 'Verify the replica is healthy and ready to accept write traffic.', type: 'verification', estimatedTime: '2 min', commands: [ 'kubectl exec -it pg-replica-0 -- pg_isready', 'kubectl exec -it pg-replica-0 -- psql -c "SELECT pg_is_in_recovery();"' ], hasKnowledgeCheck: false, completed: false }, { id: 3, order: 3, title: 'Stop Application Writes', description: 'Put the application into maintenance mode to prevent split-brain scenarios.', type: 'action', estimatedTime: '1 min', commands: [ 'kubectl annotate namespace production maintenance=true', 'kubectl scale deployment api-server --replicas=0' ], hasKnowledgeCheck: true, knowledgeCheck: { question: 'Why is it important to stop application writes before failover?', options: [ { id: 'a', text: 'To save CPU resources', correct: false }, { id: 'b', text: 'To prevent data loss from split-brain writes', correct: true }, { id: 'c', text: 'To reduce network traffic', correct: false }, { id: 'd', text: 'To speed up the failover process', correct: false } ] }, completed: false }, { id: 4, order: 4, title: 'Promote Replica to Primary', description: 'Execute the failover command to promote the replica.', type: 'action', estimatedTime: '3 min', commands: [ 'kubectl exec -it pg-replica-0 -- pg_ctl promote -D /var/lib/postgresql/data', 'kubectl exec -it pg-replica-0 -- psql -c "SELECT pg_is_in_recovery();"' ], hasKnowledgeCheck: false, completed: false }, { id: 5, order: 5, title: 'Update Connection Strings', description: 'Update service discovery and connection pooling to point to the new primary.', type: 'action', estimatedTime: '2 min', commands: [ 'kubectl patch service pg-primary -p \'{"spec":{"selector":{"statefulset.kubernetes.io/pod-name":"pg-replica-0"}}}\'', 'kubectl rollout restart deployment api-server' ], hasKnowledgeCheck: true, knowledgeCheck: { question: 'After promoting the replica, what should return false from pg_is_in_recovery()?', options: [ { id: 'a', text: 'The old primary server', correct: false }, { id: 'b', text: 'The newly promoted primary (former replica)', correct: true }, { id: 'c', text: 'All database servers', correct: false }, { id: 'd', text: 'The connection pooler', correct: false } ] }, completed: false }, { id: 6, order: 6, title: 'Verify and Resume Traffic', description: 'Confirm the new primary is accepting writes and restore application traffic.', type: 'verification', estimatedTime: '2 min', commands: [ 'kubectl exec -it pg-replica-0 -- psql -c "INSERT INTO health_check (ts) VALUES (now());"', 'kubectl scale deployment api-server --replicas=3' ], hasKnowledgeCheck: false, completed: false } ]; // State let simulationMode = false; let currentStep = 0; let knowledgeCheckActive = false; let currentKnowledgeCheck = 0; let knowledgeCheckResults = []; // DOM Elements - initialized after DOMContentLoaded let stepsContainer = null; let simulationToggle = null; let simulationProgress = null; let progressBar = null; let progressText = null; let knowledgeCheckPanel = null; let checkContent = null; let checkProgress = null; let exitSimulationBtn = null; let addStepBtn = null; // Initialize when DOM is ready document.addEventListener('DOMContentLoaded', () => { // Get DOM elements stepsContainer = document.getElementById('stepsContainer'); simulationToggle = document.getElementById('simulationToggle'); simulationProgress = document.getElementById('simulationProgress'); progressBar = document.getElementById('progressBar'); progressText = document.getElementById('progressText'); knowledgeCheckPanel = document.getElementById('knowledgeCheckPanel'); checkContent = document.getElementById('checkContent'); checkProgress = document.getElementById('checkProgress'); exitSimulationBtn = document.getElementById('exitSimulation'); addStepBtn = document.getElementById('addStepBtn'); // Initialize renderSteps(); setupEventListeners(); observeSteps(); }); function renderSteps() { if (!stepsContainer) return; stepsContainer.innerHTML = runbookSteps.map((step, index) => ` <div class="step-card p-4 rounded-lg border border-[var(--border)] bg-[var(--card)] animate-fade-slide opacity-0 stagger-${Math.min(index + 1, 5)} ${step.completed ? 'completed' : ''} ${simulationMode && index === currentStep ? 'active' : ''}" data-step-id="${step.id}"> <div class="flex items-start justify-between mb-3"> <div class="flex items-center gap-3"> <div class="w-8 h-8 rounded-lg ${step.completed ? 'bg-[var(--accent-primary)]' : getTypeColor(step.type)} flex items-center justify-center text-sm font-mono font-semibold ${step.completed ? 'text-[var(--bg-primary)]' : ''}"> ${step.completed ? '✓' : step.order} </div> <div> <h3 class="font-semibold">${step.title}</h3> <span class="text-xs text-[var(--fg-muted)]">${step.type} · ${step.estimatedTime}</span> </div> </div> ${step.hasKnowledgeCheck ? ` <span class="px-2 py-0.5 text-xs rounded bg-[var(--accent-secondary)]/20 text-[var(--accent-secondary)]">Knowledge Check</span> ` : ''} </div> <p class="text-sm text-[var(--fg-secondary)] mb-3">${step.description}</p> <div class="space-y-2"> ${step.commands.map(cmd => ` <div class="flex items-center gap-2 p-2 rounded bg-[var(--bg-primary)] font-mono text-sm"> <span class="text-[var(--fg-muted)]">$</span> <code class="flex-1 text-[var(--accent-primary)]">${cmd}</code> <button class="p-1 rounded hover:bg-[var(--bg-tertiary)] transition-colors copy-cmd" data-cmd="${cmd}" aria-label="Copy command"> <svg class="w-4 h-4 text-[var(--fg-muted)]" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"/> </svg> </button> </div> `).join('')} </div> ${simulationMode ? ` <div class="mt-4 pt-3 border-t border-[var(--border)] flex items-center justify-between"> <span class="text-xs text-[var(--fg-muted)]">${index === currentStep ? 'Current step' : step.completed ? 'Completed' : 'Pending'}</span> ${index === currentStep ? ` <button class="complete-step-btn px-3 py-1.5 text-sm rounded bg-[var(--accent-primary)] text-[var(--bg-primary)] font-medium hover:opacity-90 transition-opacity"> Mark Complete </button> ` : ''} </div> ` : ''} </div> `).join(''); // Add event listeners to new elements document.querySelectorAll('.copy-cmd').forEach(btn => { btn.addEventListener('click', (e) => { const cmd = e.currentTarget.dataset.cmd; navigator.clipboard.writeText(cmd); const icon = e.currentTarget.querySelector('svg'); icon.innerHTML = '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/>'; setTimeout(() => { icon.innerHTML = '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"/>'; }, 1500); }); }); document.querySelectorAll('.complete-step-btn').forEach(btn => { btn.addEventListener('click', completeCurrentStep); }); } function getTypeColor(type) { const colors = { verification: 'bg-[var(--accent-secondary)]/20 text-[var(--accent-secondary)]', action: 'bg-[var(--warning)]/20 text-[var(--warning)]', decision: 'bg-[var(--accent-primary)]/20 text-[var(--accent-primary)]' }; return colors[type] || colors.verification; } function setupEventListeners() { if (!simulationToggle) return; simulationToggle.addEventListener('click', toggleSimulation); simulationToggle.addEventListener('keydown', (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); toggleSimulation(); } }); if (exitSimulationBtn) { exitSimulationBtn.addEventListener('click', () => { simulationMode = false; updateSimulationUI(); }); } if (addStepBtn) { addStepBtn.addEventListener('click', addNewStep); } // Runbook selection document.querySelectorAll('.runbook-item').forEach(item => { item.addEventListener('click', (e) => { document.querySelectorAll('.runbook-item').forEach(i => { i.classList.remove('bg-[var(--bg-tertiary)]', 'border', 'border-[var(--accent-primary)]'); }); e.currentTarget.classList.add('bg-[var(--bg-tertiary)]', 'border', 'border-[var(--accent-primary)]'); }); }); } function toggleSimulation() { simulationMode = !simulationMode; currentStep = 0; knowledgeCheckActive = false; currentKnowledgeCheck = 0; knowledgeCheckResults = []; // Reset all steps runbookSteps.forEach(step => step.completed = false); updateSimulationUI(); } function updateSimulationUI() { if (!simulationToggle) return; simulationToggle.classList.toggle('active', simulationMode); simulationToggle.setAttribute('aria-checked', simulationMode); if (simulationProgress) { simulationProgress.classList.toggle('hidden', !simulationMode); } renderSteps(); updateProgress(); if (simulationMode && runbookSteps[currentStep]?.hasKnowledgeCheck && !knowledgeCheckActive) { showKnowledgeCheck(); } } function showKnowledgeCheck() { const step = runbookSteps[currentStep]; if (!step || !step.knowledgeCheck) return; knowledgeCheckActive = true; if (knowledgeCheckPanel) { knowledgeCheckPanel.classList.remove('hidden'); } if (checkProgress) { checkProgress.textContent = `Question ${currentKnowledgeCheck + 1} of ${runbookSteps.filter(s => s.hasKnowledgeCheck).length}`; } const check = step.knowledgeCheck; if (checkContent) { checkContent.innerHTML = ` <p class="text-[var(--fg-primary)] mb-4">${check.question}</p> <div class="space-y-2"> ${check.options.map(opt => ` <button class="knowledge-option w-full text-left p-3 rounded-lg border border-[var(--border)] transition-all" data-option-id="${opt.id}" data-correct="${opt.correct}"> <span class="font-mono text-[var(--fg-muted)] mr-2">${opt.id.toUpperCase()}.</span> <span>${opt.text}</span> </button> `).join('')} </div> `; document.querySelectorAll('.knowledge-option').forEach(opt => { opt.addEventListener('click', handleKnowledgeAnswer); }); } } function handleKnowledgeAnswer(e) { const selected = e.currentTarget; const isCorrect = selected.dataset.correct === 'true'; const optionId = selected.dataset.optionId; // Disable all options document.querySelectorAll('.knowledge-option').forEach(opt => { opt.disabled = true; opt.classList.remove('selected'); if (opt.dataset.correct === 'true') { opt.classList.add('correct'); } else if (opt.dataset.optionId === optionId && !isCorrect) { opt.classList.add('incorrect'); } }); selected.classList.add('selected'); knowledgeCheckResults.push({ stepId: runbookSteps[currentStep].id, question: runbookSteps[currentStep].knowledgeCheck.question, correct: isCorrect }); // Show feedback and continue setTimeout(() => { if (knowledgeCheckPanel) { knowledgeCheckPanel.classList.add('hidden'); } knowledgeCheckActive = false; currentKnowledgeCheck++; }, 1500); } function completeCurrentStep() { runbookSteps[currentStep].completed = true; currentStep++; if (currentStep >= runbookSteps.length) { // Simulation complete showCompletionSummary(); } else { updateProgress(); renderSteps(); if (runbookSteps[currentStep]?.hasKnowledgeCheck) { setTimeout(showKnowledgeCheck, 500); } } } function updateProgress() { const completed = runbookSteps.filter(s => s.completed).length; const total = runbookSteps.length; const percentage = Math.round((completed / total) * 100); if (progressBar) { progressBar.style.width = `${percentage}%`; } if (progressText) { progressText.textContent = `${percentage}%`; } } function showCompletionSummary() { if (!stepsContainer) return; const correctAnswers = knowledgeCheckResults.filter(r => r.correct).length; const totalChecks = knowledgeCheckResults.length; stepsContainer.innerHTML = ` <div class="text-center py-12 animate-slide-in"> <div class="w-20 h-20 rounded-full bg-[var(--accent-primary)]/20 flex items-center justify-center mx-auto mb-6"> <svg class="w-10 h-10 text-[var(--accent-primary)]" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/> </svg> </div> <h2 class="text-2xl font-bold mb-2">Simulation Complete</h2> <p class="text-[var(--fg-secondary)] mb-6">You have successfully completed the Database Failover runbook</p> <div class="grid grid-cols-2 gap-4 max-w-md mx-auto mb-8"> <div class="p-4 rounded-lg bg-[var(--bg-tertiary)]"> <div class="text-3xl font-mono font-bold text-[var(--accent-primary)]">${runbookSteps.length}</div> <div class="text-sm text-[var(--fg-muted)]">Steps Completed</div> </div> <div class="p-4 rounded-lg bg-[var(--bg-tertiary)]"> <div class="text-3xl font-mono font-bold ${correctAnswers === totalChecks ? 'text-[var(--accent-primary)]' : 'text-[var(--warning)]'}">${correctAnswers}/${totalChecks}</div> <div class="text-sm text-[var(--fg-muted)]">Knowledge Checks</div> </div> </div> <button id="restartSimulation" class="px-6 py-2 rounded-lg bg-[var(--accent-primary)] text-[var(--bg-primary)] font-medium hover:opacity-90 transition-opacity"> Run Again </button> </div> `; document.getElementById('restartSimulation')?.addEventListener('click', () => { currentStep = 0; currentKnowledgeCheck = 0; knowledgeCheckResults = []; runbookSteps.forEach(s => s.completed = false); renderSteps(); updateProgress(); }); } function addNewStep() { const newStep = { id: runbookSteps.length + 1, order: runbookSteps.length + 1, title: 'New Step', description: 'Add a description for this step...', type: 'action', estimatedTime: '1 min', commands: ['echo "Add your command here"'], hasKnowledgeCheck: false, completed: false }; runbookSteps.push(newStep); renderSteps(); } function observeSteps() { const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.style.opacity = '1'; } }); }, { threshold: 0.1 }); document.querySelectorAll('.step-card').forEach(card => { observer.observe(card); }); } </script> </body> </html>Key Features
1. Live Incident Context Panel
- Real-time incident status with severity indicators
- Key metrics dashboard (connections, replication lag, disk I/O, CPU)
- Event timeline with chronological incident data
- Related resources for quick access to scripts and dashboards
2. Simulation Mode
- Toggle switch to enter/exit simulation
- Step-by-step progression with completion tracking
- Visual indicators for current, completed, and pending steps
- Progress bar showing overall completion percentage
3. Knowledge Checks
- Embedded questions at critical steps
- Multiple choice format with immediate feedback
- Color-coded answers (green for correct, red for incorrect)
- Summary of performance at simulation completion
4. Collaborative Features
- User avatars showing active collaborators
- Version control indicator (v2.4)
- Last edited timestamps on runbooks
- Real-time editing simulation capability
5. Interactions
- Copy commands: One-click copy to clipboard with visual feedback
- Collapsible panels: Incident context panel can be toggled
- Runbook switching: Click to switch between different runbooks
- Add new steps: Dynamic step addition to runbooks
Design Decisions
- Technical aesthetic: JetBrains Mono for code, Space Grotesk for UI
- Dark theme: Optimized for ops teams working in low-light environments
- Status colors: Critical (red), Warning (amber), Info (blue), Success (green)
- Grid background: Subtle depth without distraction
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.