Why This Matters at Engineering Leadership Scale
Within six weeks of rolling out AI coding tools, many orgs hit a paradox: local drafting speeds up 30% to 50% and PR counts jump, yet delivery feels slower and incidents rise. Story points and commit counts hide this because points inflate rapidly while bottlenecks shift downstream into giant PR reviews, flaky CI, and rollbacks.
Instrumenting the 4 DORA Metrics across squads baselines real delivery throughput and production stability, and breaking Lead Time by stage pinpoints the exact hour where work stalls.
Core Mental Model & Architecture
DORA pairs two Throughput metrics (Deployment Frequency, Lead Time for Changes) with two Stability metrics (Change Failure Rate, Mean Time to Recovery). Track both sides together: doubling deploys while Change Failure Rate jumps from 5% to 18% is reckless shipping, not engineering maturity.
| Metric | What It Measures | Medium Team | High Performer | Elite Target |
|---|---|---|---|---|
| Deployment Frequency (DF) | How often code reaches production | Weekly to monthly | Daily to weekly | Multiple times/day (on-demand) |
| Lead Time for Changes (LT) | Commit/PR open to running in production | 1 week to 1 month | 1 day to 1 week | < 1 day (< 4 hrs review + CI) |
| Change Failure Rate (CFR) | % of prod deploys causing rollback/hotfix/incident | 16% to 30% | 5% to 15% | < 5% |
| Mean Time to Recovery (MTTR) | Incident detection to service restoration | 1 day to 1 week | < 1 day | < 1 hour (< 15 min rollback/flags) |
To make DORA actionable, decompose Lead Time for Changes into four timestamp stages:
- Coding Time: First commit to PR Ready for Review.
- Pickup Wait: PR Ready to first human review.
- Review & CI Cycle: First review to merge (captures review ping-pong and CI retries).
- Deploy Time: Merge to
mainuntil live in production.
In AI-era slowdowns, Coding Time drops while Pickup Wait + Review/CI Cycle accounts for 60% to 75% of total Lead Time.
Step-by-Step Implementation Tutorial
- Pull Four Lightweight Event Streams: Sync metadata from GitHub/Bitbucket (PR open, ready, first review, merge), CI/CD (deploy timestamp, SHA, rollback flag), and incident logs (PagerDuty/Opsgenie detection and resolution times). No heavy vendor tool is required to start.
- Standardize Definitions Across Squads: Lock consistent boundaries (Lead Time starts at PR Ready; CFR counts any deploy triggering a SEV1/SEV2 incident, revert, or hotfix within 24 hours).
- Run a Stage-Level DORA SQL Baseline: Compute weekly medians per squad so outliers never skew trends, and chart the four Lead Time stages side by side.
- Observe a 30-Day Baseline Without Targets: Use month one purely to diagnose bottlenecks (review queues, flaky CI, manual release gates) before setting improvement goals.
- Review Biweekly & Pair With SPACE: Inspect DORA alongside a quarterly SPACE developer friction check so teams never hit speed numbers via late-night burnout.
-- Weekly Stage-Level DORA Baseline Query (PostgreSQL / Warehouse)
WITH pr_stages AS (
SELECT
p.squad_name,
date_trunc('week', d.deployed_at) AS week,
d.deploy_id,
d.caused_incident_or_rollback,
EXTRACT(EPOCH FROM (p.first_review_at - p.ready_at)) / 3600.0 AS pickup_hrs,
EXTRACT(EPOCH FROM (p.merged_at - p.first_review_at)) / 3600.0 AS review_ci_hrs,
EXTRACT(EPOCH FROM (d.deployed_at - p.ready_at)) / 3600.0 AS total_lt_hrs
FROM git_pull_requests p
JOIN ci_production_deploys d ON p.merge_commit_sha = d.commit_sha
WHERE d.deployed_at >= NOW() - INTERVAL '12 weeks' AND p.is_bot = FALSE
),
mttr AS (
SELECT squad_name, date_trunc('week', detected_at) AS week,
PERCENTILE_CONT(0.5) WITHIN GROUP (
ORDER BY EXTRACT(EPOCH FROM (resolved_at - detected_at)) / 60.0
) AS med_mttr_mins
FROM prod_incidents
WHERE severity IN ('SEV1', 'SEV2') AND detected_at >= NOW() - INTERVAL '12 weeks'
GROUP BY 1, 2
)
SELECT
s.squad_name, s.week::date,
COUNT(DISTINCT s.deploy_id) AS deploys_per_week,
ROUND(PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY s.pickup_hrs)::numeric, 1) AS med_pickup_hrs,
ROUND(PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY s.review_ci_hrs)::numeric, 1) AS med_review_ci_hrs,
ROUND(PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY s.total_lt_hrs)::numeric, 1) AS med_lead_time_hrs,
ROUND(100.0 * AVG(CASE WHEN s.caused_incident_or_rollback THEN 1 ELSE 0 END), 1) AS cfr_pct,
ROUND(COALESCE(m.med_mttr_mins, 0)::numeric, 1) AS med_mttr_mins
FROM pr_stages s
LEFT JOIN mttr m ON s.squad_name = m.squad_name AND s.week = m.week
GROUP BY 1, 2, m.med_mttr_mins ORDER BY 1, 2 DESC;Worked Production Scenario: Before vs. After
Context: Three squads (24 engineers) in an enterprise market-tech SaaS org rolled out AI coding tools. Within 6 weeks, PR creation jumped 45%, yet Lead Time degraded and incidents rose.
Before (No Stage-Level Visibility): Leadership questioned whether AI tools failed, and one manager suggested inserting a 3-day manual QA regression pass before every release.
After (Stage-Level DORA Baseline): Instrumenting GitHub, CI, and incident timestamps exposed the AI-Era DORA Paradox: Lead Time worsened from 2.1 days to 4.8 days and CFR jumped from 6% to 16%, because 68% of Lead Time sat waiting 29 hours for review on 600 to 900 line PRs or retrying a 28-minute flaky CI build. Targeting those exact bottlenecks (<300-line PRs, 4-hour review SLA, <10-min sharded CI) transformed all four metrics inside 8 weeks.
| DORA Metric | Pre-AI Baseline | Post-AI Unmanaged (Wk 6) | Post-Fix (Wk 14) |
|---|---|---|---|
| Lead Time for Changes (Median) | 2.1 days | 4.8 days | 14 hours (Elite) |
| Pickup Wait (Time to First Review) | 11 hours | 29 hours (68% delay) | 2.6 hours |
| Change Failure Rate (CFR) | 6.0% | 16.0% | 4.2% (Elite) |
| Deployment Frequency | 4/week/squad | 3/week/squad | 14/week/squad |
Common Failure Modes & Anti-Patterns
- Tracking DORA per Individual Engineer: Turning flow telemetry into developer rankings rewards fake 1-line PRs and kills collaboration. Structural Fix: Aggregate strictly at the squad/service level and ban DORA from individual performance reviews.
- Skipping Stage Breakdown: Knowing overall Lead Time is 4 days hides whether the constraint is giant PRs, slow reviews, flaky CI, or weekly release trains. Structural Fix: Always break Lead Time into Coding, Pickup, Review/CI, and Deploy.
- Celebrating Speed While Ignoring CFR: Pushing deploy counts while rollbacks climb burns out on-call engineers. Structural Fix: Render Throughput and Stability side by side on every dashboard view.
How to Handle Pushback in the Room
Pushback 1 (Director / VP): "We spent real budget on AI coding tools, yet Lead Time got worse and CFR doubled. Did the rollout fail?"
Calm Response: "AI accelerated local drafting by over 40 percent, which exposed downstream bottlenecks in our pipeline. Stage-level DORA data shows 68 percent of Lead Time is now waiting 29 hours for reviews on oversized PRs and retrying a 28-minute flaky CI build. Fixing those three downstream stages over the next month unlocks the full ROI of our AI spend."
Pushback 2 (Senior Engineer): "DORA dashboards turn into micromanagement and pressure us to rush merges."
Calm Response: "We never track DORA by individual developer, and Change Failure Rate sits right beside Lead Time so rushing merges shows up immediately as a red flag. The dashboard exists to give us hard evidence to fix slow CI and review queues."
Key Takeaways & This Week's Action Rep
- Replace story points with the 4 DORA metrics: Track throughput (DF, LT) directly beside stability (CFR, MTTR).
- Instrument Lead Time by stage: Split
Coding -> Pickup -> Review/CI -> Deployto find the real bottleneck. - Solve the AI-Era DORA Paradox downstream: Faster typing worsens delivery until PR size, review queues, and CI speed scale up.
- Keep DORA squad-level and paired with SPACE: Protect trust and human sustainability.
This Week's Action Rep: Pull the last 30 days of PR and production deploy timestamps for one squad using the SQL baseline above. Calculate median Pickup Wait, Review/CI Time, total Lead Time, and CFR, and bring the #1 stage bottleneck to your next retro.