Lead Time#

Lead time is the total elapsed time from issue creation to closure. It includes time in backlog, waiting for prioritization, blocked by dependencies, in active development, in review, and waiting for release.

Definition#

lead_time = issue.closed_at - issue.created_at

Start signal: issue-created -- the timestamp when the GitHub issue was opened.

End signal: issue-closed -- the timestamp when the issue was closed (by any means: a merged PR, manual close, or bot).

Lead time is always measured on issues, regardless of cycle_time.strategy.

What it tells you#

A long lead time does not necessarily mean slow development -- it often means slow prioritization or long backlog queues. An issue in "Backlog" for 60 days that takes 2 days to implement has a 62-day lead time but only a 2-day cycle time.

A large gap between lead time and cycle time indicates process bottlenecks outside development.

Signals used#

SignalSourceDescription
issue-createdissue.created_atGitHub issue creation timestamp
issue-closedissue.closed_atGitHub issue closure timestamp

Both timestamps come from the GitHub REST Search API and are precise to the second.

Open issues#

If an issue is still open (closed_at is null), lead time has a start event but no end event or duration. JSON output: lead_time_seconds is null. Pretty output: "N/A".

Statistical aggregation#

When computed across multiple issues (e.g., in a release report):

  • Count: Number of issues with a valid lead time
  • Mean: Average lead time
  • Median: Middle value (less sensitive to outliers than mean)
  • Std Dev: Sample standard deviation (requires 2+ data points)
  • P90 / P95: 90th and 95th percentile (requires 5+ data points)
  • Outlier cutoff: Q3 + 1.5 * IQR (requires 4+ data points)
  • Outlier count: Issues exceeding the cutoff

Negative durations are filtered from statistics and counted separately.

Configuration that affects lead time#

Lead time requires no configuration -- it uses only the issue's creation and closure timestamps. Other config fields affect which issues are included:

Config fieldEffect
scope.queryFilters which issues are analyzed
quality.categoriesClassifies issues but does not change lead time values
exclude_usersExcludes issues authored by specified users
lifecycle.done.queryDetermines which issues qualify as "done" for bulk queries

Example output#

Pretty format#

Lead Time
  Start:    issue-created  2026-01-15T10:30:00Z
  End:      issue-closed   2026-02-02T14:15:00Z
  Duration: 18d 3h 45m

JSON format#

{
  "lead_time": {
    "start": {
      "time": "2026-01-15T10:30:00Z",
      "signal": "issue-created"
    },
    "end": {
      "time": "2026-02-02T14:15:00Z",
      "signal": "issue-closed"
    },
    "duration_seconds": 1567500
  }
}

Aggregate statistics (release report)#

{
  "aggregates": {
    "lead_time": {
      "count": 17,
      "mean_seconds": 24271200,
      "median_seconds": 5248800,
      "stddev_seconds": 43981056,
      "p90_seconds": 134236800,
      "p95_seconds": 138499200,
      "outlier_cutoff_seconds": 119448000,
      "outlier_count": 2
    }
  }
}

Commands that report lead time#

  • gh velocity flow lead-time <issue> -- single-issue lead time
  • gh velocity quality release <tag> -- per-issue and aggregate lead time within a release
  • gh velocity report -- aggregate lead time across a time window

Insights#

Automated observations generated in the lead time section:

InsightWhen it firesWhat it means
Noise detection3+ issues closed in under 60 secondsSpam, duplicates, or bot closures are distorting metrics. Regenerate config with preflight --write to auto-exclude noise labels.
Low medianMedian under 1 hour with 10+ items (and no noise detected)Similar to noise detection but subtler — fast closures are pulling the median down.
Outlier detection2+ items exceed the IQR-based cutoffA few slow items are much longer than typical. Often old issues finally closed alongside recent work.
PredictabilityCV > 0.5Delivery times vary significantly. CV > 1.0 means the median is a more reliable estimate than the mean.
Skew warningMean > 3x medianThe distribution is right-skewed — a few very slow items inflate the average.
Extreme medianMedian exceeds 1 yearLikely a backlog cleanup rather than normal delivery. Consider narrowing the time window.
Fastest/slowest3+ itemsLinks to the fastest and slowest issues for quick investigation.
Category comparison2+ categories with dataCompares median duration across categories (e.g., bugs vs features).

See also#