Skip to content

Latest commit

 

History

History
240 lines (167 loc) · 7.72 KB

File metadata and controls

240 lines (167 loc) · 7.72 KB

Live Demo Script - Claude Code for NextEra Energy

Optimized for 20-Minute Execution


PRE-DEMO CHECKLIST (Do 15 minutes before meeting)

Environment Setup

  • Clone repo: git clone https://github.com/dhartman-bot/nextera-legacy-dotnet-demo.git
  • Open in VS Code or preferred IDE
  • Open Claude Code CLI in terminal
  • Test Claude Code is working: What files are in this repository?
  • Have both .cs files open in editor tabs
  • Clear terminal history for clean demo
  • Close unnecessary windows/apps
  • Turn off notifications
  • Have meeting outline open in separate window

Quick Validation

Test this prompt to ensure Claude Code is responsive:

List all the files in this repository and describe what this codebase does in one sentence.

Expected response time: < 5 seconds


DEMO EXECUTION (20 minutes)

OPENING (1 minute)

Say: "This is a realistic legacy .NET application from 2010 that monitors FPL power plants. The original developers retired in 2018-2019. Let me show you how Claude Code helps modernize this."

Show: Quickly scroll through PowerPlantMonitor.cs to show the code complexity


PHASE 1: Security Analysis (3 minutes)

Prompt 1A - Vulnerability Scan

Analyze PowerPlantMonitor.cs for security vulnerabilities. List them in priority order with line numbers.

Expected output:

  • SQL injection on lines 23, 33, 48, etc.
  • Hardcoded credentials line 17
  • Plaintext passwords line 68-69

Talking point: "Notice it immediately identifies SQL injection across all methods and hardcoded credentials."

Prompt 1B - Fix SQL Injection (Pick ONE method)

Fix the SQL injection vulnerability in the GetPlantReadings method using parameterized queries. Show me the complete updated method.

Expected output: Refactored method with SqlParameter usage

Talking point: "It systematically fixes the vulnerability while preserving business logic."

Time check: Should be at 4 minutes total


PHASE 2: Legacy Pattern Analysis (2 minutes)

Prompt 2 - Identify Outdated Patterns

What legacy .NET patterns and anti-patterns are present in this codebase? Focus on the top 5 issues.

Expected output:

  • No async/await
  • Manual connection management
  • DataTable usage
  • No dependency injection
  • File-based logging

Talking point: "Claude Code understands this is 2010-era .NET and identifies modernization opportunities. This same capability works with your COBOL and legacy Java."

Time check: Should be at 6 minutes total


PHASE 3: Modernization (8 minutes)

Prompt 3A - Async Conversion

Convert the CalculateCapacity method to use async/await. Include proper error handling.

Expected output: Async method with try-catch-finally

Wait for it to complete (30-45 seconds)

Talking point: "See how it converts synchronous code to modern async patterns - critical for performance at scale."

Prompt 3B - Add Dependency Injection

Refactor PowerPlantMonitor to use dependency injection. Create an interface and update the constructor to accept injected dependencies.

Expected output:

  • IPowerPlantMonitor interface
  • Constructor injection
  • Removal of hardcoded connection

Talking point: "Now this code is testable and follows modern SOLID principles."

Time check: Should be at 14 minutes total


PHASE 4: Testing & Documentation (4 minutes)

Prompt 4A - Generate Tests

Generate unit tests for the CheckMaintenanceRequired method. Include test cases for all threshold scenarios.

Expected output: XUnit or NUnit tests with multiple test cases

Talking point: "These tests document business logic and help your offshore contractors understand the code. Notice it understands the domain - temperature thresholds, pressure limits, etc."

Prompt 4B - Add Documentation

Add XML documentation comments to the OutageScheduler class explaining the business logic, including the revenue calculation methodology.

Expected output: Comprehensive XML docs

Talking point: "This captures tribal knowledge before it's lost. The original developer retired in 2018."

Time check: Should be at 18 minutes total


CLOSING (2 minutes)

Summarize: "In 18 minutes, Claude Code:

  1. Identified all security vulnerabilities proactively
  2. Understood legacy .NET patterns from 2010
  3. Modernized architecture systematically
  4. Generated tests and documentation for your team
  5. Demonstrated domain knowledge of power plant operations

This works the same way with your COBOL, legacy Java, and old .NET across 1,500 engineers."

Ask: "What questions do you have? Would you like me to show anything specific to your codebase?"


BACKUP PROMPTS (If demo goes too fast or they want more)

Backup A - Entity Framework Migration

Create Entity Framework Core models for the database tables referenced in this code (PlantReadings, ScheduledOutages, Plants). Include navigation properties.

Backup B - API Endpoint Creation

Create a REST API controller for the PowerPlantMonitor functionality using ASP.NET Core. Include endpoints for getting plant readings and checking maintenance status.

Backup C - Configuration Management

Create an appsettings.json configuration file for this application with proper sections for connection strings, SMTP settings, and threshold values. Update the code to read from configuration.

Backup D - Error Handling Strategy

Implement a global exception handling strategy for this application with custom exception types for different failure scenarios (database, external systems, validation).

TROUBLESHOOTING

If Claude Code is slow:

  • Use shorter prompts
  • Focus on single methods instead of entire files
  • Skip Prompt 3B (DI) if needed

If a prompt doesn't work as expected:

  • Rephrase: "Show me the complete updated [method name] with [specific change]"
  • Ask for explanation first: "Explain how you would [do thing]", then "Now implement it"

If they ask about Bedrock vs Direct:

"Both work. Bedrock integrates with your AWS infrastructure. Direct gives faster access to new features. Let's discuss your specific security requirements after the demo."

If they ask about COBOL:

"Same approach works. Claude Code understands COBOL business logic and can help migrate to modern languages. Want me to show an example after this?"

If they ask about pricing:

"Depends on usage patterns and deployment model. For 1,500 engineers, we can provide detailed ROI analysis. Typically 10-30% productivity gains."


SUCCESS METRICS

After the demo, you should have shown:

  • Security vulnerability detection
  • Legacy pattern recognition
  • Code modernization
  • Domain understanding (energy sector)
  • Test generation
  • Documentation generation

Next steps to propose:

  1. Analyze one of their actual legacy codebases (NDA session)
  2. Pilot with 50-100 engineers over 60 days
  3. Technical deep-dive with their architecture team
  4. ROI analysis for 1,500 engineers

TIMING GUIDE

Phase Time Cumulative
Opening 1 min 1 min
Security Analysis 3 min 4 min
Pattern Analysis 2 min 6 min
Modernization 8 min 14 min
Testing & Docs 4 min 18 min
Closing 2 min 20 min

Total: 20 minutes (leaves 10 min buffer in 30 min slot for Q&A)

KEY CUTS FROM 25-MIN VERSION

To fit 20 minutes, we removed:

  • Prompt 3C (Structured Logging) - can be shown as backup if time permits
  • Reduced opening from 2 min to 1 min
  • Reduced security analysis from 4 min to 3 min
  • Reduced pattern analysis from 3 min to 2 min
  • Reduced modernization from 10 min to 8 min

This maintains all core value props while giving you 10 minutes for Q&A.