DORA Metrics
Purpose
Compute the four DORA delivery-performance metrics (Deployment
Frequency, Lead Time for Changes, Change Failure Rate, and Time to
Restore Service) from local git history and the GitHub API. Classify
each metric into Elite, High, Medium, or Low using thresholds from
DORA's State of DevOps research, and surface the single weakest
dimension as the next improvement target.
When To Use
- Engineering management retrospectives and quarterly reviews.
- Auditing whether agentic workflows (AI-assisted PRs, automated
deploys) improve velocity and stability or quietly regress them.
- Feeding a tier signal into
minister:release-health-gates.
When Not to Use
- Single-team velocity tracking that needs story-point burndowns
rather than delivery-performance evidence.
- Repositories without a clear production branch or release cadence;
DORA assumes one.
Workflow
Run the helper script with the desired window:
python3 -m minister.dora_metrics --window 30 --branch main
Read the output: per-metric value, tier classification, and the
bottleneck pointer.
For agentic-workflow audits, run the same window twice. Once
filtering to AI-authored PRs (e.g., --failure-label ai-bug),
once across all PRs. Compare the CFR delta. See
modules/agentic-workflow-signals.md.
Optionally pipe --json into the tracker so trend data persists
alongside release-health-gates snapshots.
Optionally render trend charts with kuva when reviewing multiple
windows or comparing before/after an agentic-workflow change:
# Collect weekly snapshots into a TSV, then plot all four metrics
# week<TAB>metric<TAB>value
kuva line trends.tsv --x week --y value --color-by metric \
--title "DORA trends (30-day windows)" -o dora-trends.svg
# Quick terminal preview without writing a file
kuva line trends.tsv --x week --y value --color-by metric --terminal
kuva reads TSV/CSV from stdin or a file path. Install once:
cargo install kuva --features cli. No project source changes
required. See kuva for the
full plot-type reference.
Inputs
| Flag |
Default |
Meaning |
--window |
30 |
Measurement window in days |
--branch |
HEAD |
Production branch |
--failure-label |
bug |
GitHub label marking prod failures |
--json |
off |
Emit JSON instead of human-readable |
--repo-path |
cwd |
Repository directory |
Outputs
A short text report or JSON payload with:
- Per-metric numeric value (e.g.,
4.2/day, 2.1 hours, 8%).
- Per-metric tier (Elite, High, Medium, Low).
- Overall tier (the weakest of the four).
- Bottleneck key, identifying which metric to focus improvement on.
Tier Thresholds
See modules/thresholds.md for the complete table. Brief summary:
| Metric |
Elite |
High |
Medium |
Low |
| DF |
>= 1/day |
>= 1/week |
>= 1/month |
< 1/month |
| LT |
<= 1 day |
<= 1 week |
<= 1 month |
> 1 month |
| CFR |
<= 15% |
<= 30% |
<= 45% |
> 45% |
| TRS |
< 1 hour |
< 1 day |
< 1 week |
>= 1 week |
Verification
Confirm a DORA report is real by re-running the script over a
narrower window and checking that DF and LT scale predictably. For
CFR and TRS, sample two or three of the contributing GitHub issues
and verify the bug (or chosen) label is correct on each.
Testing
Unit tests are in
plugins/minister/tests/unit/test_dora_metrics.py. Each tier
boundary is exercised at the threshold, so future contributors who
adjust an inequality (> vs >=) trigger a failure rather than a
silent regression. Add new tests at the threshold when extending
classification logic.
Exit Criteria
1---2name: dora-metrics3description: Computes DORA delivery-performance metrics from git and GitHub API. Use when assessing deployment frequency, lead time, or change failure rate.4alwaysApply: false5category: governance6tags:7- dora8- metrics9- delivery10- engineering-management11- github12dependencies: []13tools: []14provides:15 governance:16 - dora-tier17 - delivery-bottleneck18 reporting:19 - dora-report20 - tier-classification21usage_patterns:22- delivery-retro23- agentic-pipeline-audit24- release-health-input25complexity: intermediate26estimated_tokens: 80027progressive_loading: true28modules:29- modules/thresholds.md30- modules/agentic-workflow-signals.md31metadata:32 source: https://skillmd.com/skills/athola/dora-metrics33---3435# DORA Metrics3637## Purpose3839Compute the four DORA delivery-performance metrics (Deployment40Frequency, Lead Time for Changes, Change Failure Rate, and Time to41Restore Service) from local git history and the GitHub API. Classify42each metric into Elite, High, Medium, or Low using thresholds from43DORA's State of DevOps research, and surface the single weakest44dimension as the next improvement target.4546## When To Use4748- Engineering management retrospectives and quarterly reviews.49- Auditing whether agentic workflows (AI-assisted PRs, automated50 deploys) improve velocity and stability or quietly regress them.51- Feeding a tier signal into `minister:release-health-gates`.5253## When Not to Use5455- Single-team velocity tracking that needs story-point burndowns56 rather than delivery-performance evidence.57- Repositories without a clear production branch or release cadence;58 DORA assumes one.5960## Workflow61621. Run the helper script with the desired window:6364 ```bash65 python3 -m minister.dora_metrics --window 30 --branch main66 ```67682. Read the output: per-metric value, tier classification, and the69 bottleneck pointer.70713. For agentic-workflow audits, run the same window twice. Once72 filtering to AI-authored PRs (e.g., `--failure-label ai-bug`),73 once across all PRs. Compare the CFR delta. See74 `modules/agentic-workflow-signals.md`.75764. Optionally pipe `--json` into the tracker so trend data persists77 alongside `release-health-gates` snapshots.78795. Optionally render trend charts with kuva when reviewing multiple80 windows or comparing before/after an agentic-workflow change:8182 ```bash83 # Collect weekly snapshots into a TSV, then plot all four metrics84 # week<TAB>metric<TAB>value85 kuva line trends.tsv --x week --y value --color-by metric \86 --title "DORA trends (30-day windows)" -o dora-trends.svg8788 # Quick terminal preview without writing a file89 kuva line trends.tsv --x week --y value --color-by metric --terminal90 ```9192 kuva reads TSV/CSV from stdin or a file path. Install once:93 `cargo install kuva --features cli`. No project source changes94 required. See [kuva](https://github.com/Psy-Fer/kuva) for the95 full plot-type reference.9697## Inputs9899| Flag | Default | Meaning |100|------|---------|---------|101| `--window` | 30 | Measurement window in days |102| `--branch` | HEAD | Production branch |103| `--failure-label` | bug | GitHub label marking prod failures |104| `--json` | off | Emit JSON instead of human-readable |105| `--repo-path` | cwd | Repository directory |106107## Outputs108109A short text report or JSON payload with:110111- Per-metric numeric value (e.g., `4.2/day`, `2.1 hours`, `8%`).112- Per-metric tier (Elite, High, Medium, Low).113- Overall tier (the weakest of the four).114- Bottleneck key, identifying which metric to focus improvement on.115116## Tier Thresholds117118See `modules/thresholds.md` for the complete table. Brief summary:119120| Metric | Elite | High | Medium | Low |121|--------|-------|------|--------|-----|122| DF | >= 1/day | >= 1/week | >= 1/month | < 1/month |123| LT | <= 1 day | <= 1 week | <= 1 month | > 1 month |124| CFR | <= 15% | <= 30% | <= 45% | > 45% |125| TRS | < 1 hour | < 1 day | < 1 week | >= 1 week |126127## Verification128129Confirm a DORA report is real by re-running the script over a130narrower window and checking that DF and LT scale predictably. For131CFR and TRS, sample two or three of the contributing GitHub issues132and verify the `bug` (or chosen) label is correct on each.133134## Testing135136Unit tests are in137`plugins/minister/tests/unit/test_dora_metrics.py`. Each tier138boundary is exercised at the threshold, so future contributors who139adjust an inequality (`>` vs `>=`) trigger a failure rather than a140silent regression. Add new tests at the threshold when extending141classification logic.142143## Exit Criteria144145- [ ] DORA report generated for the requested window.146- [ ] All four metrics classified into a tier.147- [ ] Bottleneck dimension surfaced.148- [ ] Output is readable in a terminal or as a PR comment.