What is Technical Debt?
Think of technical debt like a house that was never properly maintained. Over decades:
In government software, this means:
Alberta's Scale of the Problem:
| Metric | Number |
|---|---|
| Applications maintained | 1,280 |
| Code repositories | 3,400 |
| Lines of code | 466 million |
| Estimated cost of technical debt | Billions of dollars |
Key Insight: This isn't unique to Alberta — virtually every government worldwide faces this same challenge.
Why Traditional Methods Fall Short
Traditionally, reviewing code for security vulnerabilities requires:
The Math Problem:
Think of it this way: Traditional security review is like having one person check every book in a massive library for misprints. AI is like having 50 people checking simultaneously, with a system that already knows common misprint patterns.
Alberta used Claude Code (an AI coding assistant) with two specific AI models:
Stage 1: Rules Engine Scan
Stage 2: Intelligent Review
Why Two Stages?
Stage 1 = Speed (catch obvious problems fast)
Stage 2 = Accuracy (confirm and locate precisely)
Key Advantage: Found issues that traditional automated tools completely missed
What is a Multi-Agent System?
Instead of one AI doing everything sequentially, Alberta deployed ~50 AI agents working autonomously and in parallel.
Analogy:
Imagine auditing a 50-story building for fire hazards. You could send one inspector floor by floor (slow), or send 50 inspectors simultaneously, one per floor (fast). Multi-agent AI works like the second approach.
How the Agents Were Organized:
Result: What would take 6.5 years compressed into 20 hours
Finding a vulnerability is only half the job. Alberta used Claude to fix them too.
The Fix Process Had Three Scenarios:
Scenario A — Standard Fix:
Find vulnerability → Generate fix → Test fix → Deploy fix
Scenario B — Missing Tests:
Find vulnerability → Write tests first → Generate fix → Verify fix passes tests → Deploy
(Some old systems had no automated tests to confirm patches were safe)
Scenario C — Code Too Old to Patch:
Find vulnerability → Rebuild entire system in modern language → Deploy
Real Example:
Critical Safety Point: Every single fix was reviewed and approved by human engineers before deployment. AI assisted; humans decided.
Alberta didn't just do a one-time scan. They built ongoing security agents that run throughout development.
Red Team Agent 🔴
Blue Team Agent 🔵
Additional Agents:
Coverage:
Every application is checked against ~95 security controls on each pass
Analogy:
Red team = someone trying to break into your house to find weaknesses Blue team = a security consultant assessing your locks, alarms, and doors
Beyond security, Alberta is using this approach to modernize outdated systems.
The Legacy Application Problem:
The Plan:
185 separate legacy applications → 16 reusable modern applications
How AI Helps:
Benefits:
A critical concept throughout Alberta's approach is that AI augments humans, it doesn't replace them.
The Partnership Model:
| Task | Who Does It |
|---|---|
| Scanning code | AI (autonomous) |
| Flagging vulnerabilities | AI |
| Generating fixes | AI |
| Writing tests | AI |
| Reviewing fixes | Human engineers |
| Approving deployment | Human engineers |
| Strategic decisions | Human leadership |
Key Principle: Speed and scale come from AI. Accountability and judgment remain with humans.
Alberta recognized that tools alone aren't enough. People need to know how to use them.
Alberta AI Academy:
Why This Matters:
A powerful tool in untrained hands is either wasted or dangerous. Training ensures the approach scales beyond one team.
PROBLEM: 466M lines of old, insecure, undocumented government code
SOLUTION FRAMEWORK:
├── Step 1: Scan (50 parallel AI agents, 20 hours)
├── Step 2: Fix (AI generates patches, humans approve)
├── Step 3: Continuous monitoring (Red/Blue team agents)
├── Step 4: Modernize (consolidate 185 apps → 16)
└── Step 5: Scale (train people, publish blueprints)
RESULT: 6.5 years of work → 20 hours
Human oversight maintained throughout
Blueprint shared with other governments
Alberta's case teaches us that AI's greatest value in complex systems is:
The technical debt problem exists in governments worldwide. Alberta has essentially created a reusable playbook — and published it — for any government willing to follow the same approach.