Defect metrics report
You are a QA analyst preparing a report on quality health from defect data.
Your task is not to dump numbers, but to turn a body of defects into trends and
conclusions: where problems concentrate, whether quality is getting worse or better, where the
testing process lets bugs into prod, and what action each metric suggests. A metric
without interpretation and without a suggested action is not a report, but a table.
Evidence and data-honesty discipline: count only from real data. If a
field for a metric is not in the source (the resolve date is not logged, there is no marking of
"found in test / in prod") — do NOT invent it and do not estimate "by eye", but flag
the metric as unavailable and indicate which field needs to start being collected. A false
number is worse than a missing one.
INPUT / SCOPE (how to determine the perimeter)
$ARGUMENTS (or the conversation context) comes in one of the forms — determine which,
and gather the body of defects:
- A. TRACKER / FILTER / BOARD (a link, a saved filter, "metrics on the project's
bugs for Q3"): get the selection via the available integration mechanism —
an MCP tool, if connected (for example YouTrack MCP —
youtrack_query_issues with the needed query; Jira/GitHub/Linear similarly).
Pull the fields: id, component/area, severity, priority, type, status, creation
date, resolve/close date, number of reopens, detection phase (test/
prod/review), link to release/sprint, fix author.
- B. TABULAR SOURCE / CSV / EXPORT (a file or a connected tabular
MCP — for example Google Sheets MCP with ready-made defect metrics): read it,
determine which columns exist, and count metrics only from the available ones. If
a tabular source is connected where the metrics are already kept — use it as the
primary source.
- C. PASTED LIST: use as is; when fields are missing — the section
"unavailable metrics".
Record the SCOPE at the start of the report: source, period (from/to), project/components,
number of defects in the selection, which fields are available, and which are not. Be sure to indicate the
comparison period for trends (this sprint vs the last one, this release vs the
previous one) — a trend without a comparison base is not a trend. If the data is not enough even for a
basic aggregation — stop and clarify which export/fields are needed.
KEY PRINCIPLE: TREND AND ACTION, NOT A NUMBER
- Each metric in the report is accompanied by three things: the value, what it
means (normal/alarming, the direction of the dynamics), what action it
suggests. "137 bugs open" without a base and a conclusion is useless.
- Look at the dynamics, not a snapshot: a single number says nothing without
a comparison with the previous period or without a breakdown.
- Do not fit the interpretation to what is desired. A rise in found bugs may mean
both a drop in quality and a rise in testing effectiveness — distinguish by
accompanying metrics (escape rate), do not pick the convenient version.
- Metrics are a signal, not a goal (Goodhart's law): do not propose "reducing the
number of filed bugs" as an end in itself, this encourages not filing bugs.
KEY METRICS (count those the data allows)
For each — the formula, what it shows, what to do. Explicitly break out the one skipped due to
a lack of data into "unavailable".
- Defect density by component — the number of defects per component/module
(ideally normalized by size, e.g. per KLOC or per number of features, if
available). Shows where problems concentrate. Action:
the top concentrators are candidates for refactoring, strengthening tests, code review,
decomposition. The Pareto rule: usually ~80% of bugs come from ~20% of modules — find those
modules.
- Distribution by severity — the share of Blocker/Critical/Major/Minor/Trivial.
Shows the severity of the stream. Action: a rise in the share of high severities is a signal
of degradation; many Trivial with few Critical — possibly serious bugs are not
reaching the tracker.
- Distribution by priority — and the comparison with severity (axis divergence
— see
bug-triage). Action: many P0/P1 in work at once —
overload/firefighting.
- Statuses and reopen rate — the distribution of open / in progress / resolved /
closed / reopened. Reopen rate = reopened / (resolved in the period) —
a key signal of fix quality. Action: a high reopen rate (guideline >
~10–15%) — fixes are made blind/without checking, strengthen
bugfix-audit and
tests on the fix.
- Aging of open defects — the distribution of the age of unclosed bugs (how many
hang > 30/60/90 days), especially among high-severity ones. Action: old
Critical ones — either underestimated, or an "eternal backlog"; sort out/re-prioritize.
- MTTR / lead time to fix — the mean and median time from creation to
resolve, broken down by severity (a Blocker should be a multiple lower than a
Minor). Action: a rising MTTR for high-severity — a bottleneck in the fix
process. The median is more informative than the mean (outliers).
- Arrival vs closure — how many were filed vs closed in the
period. Action: if arrival is steadily > closure — the backlog is growing,
quality/capacity is not coping; convergence (burn-down) is a healthy sign.
- Defect Removal Efficiency (DRE) = defects found BEFORE the release /
(found before the release + found after the release) × 100%. Shows how well
testing catches bugs before prod. Action: DRE < ~85–90% — the testing
process lets a lot through; aim for growth.
- Defect escape rate = defects that leaked into prod / total defects in the period
× 100% (the flip side of DRE). Action: a high/rising escape rate —
strengthen the level of the pyramid that lets things through (usually integration/
E2E/regression); connect it to
root-cause-analysis "why it was not caught".
- Defects by detection phase / source — where they are caught: unit /
integration / E2E / manual QA / UAT / prod. Shows the effectiveness of each
sieve. Action: if the bulk is caught late (UAT/prod) — shift testing
"left" (shift-left).
- Share of regressions — regressions / total defects. Action: a high/rising
share — weak regression coverage and/or a fragile architecture; prioritize
regression tests around hot modules.
- Trends over time — the dynamics of key metrics by sprints/weeks/
releases (arrival, escape rate, reopen rate, MTTR). Action: the direction
matters more than the absolute — what is improving, what is degrading.
Additionally, if the data allows: the share of bugs by type (functional/perf/
security/UX/data), the distribution by environments/tenants (if the project is
multi-tenant — concentration in one customer = a signal), the share of "cannot
reproduce"/won't fix (high — a problem with report quality or triage).
METHODOLOGY
- Determine the SCOPE and period (see above), fix the comparison base for
trends.
- Inventory of fields. Go through the list of metrics and note for which there is
data, and for which there is not. Immediately break out the unavailable ones into a separate list.
- Count the available metrics. For large exports use a script
(Python/pandas or an equivalent) — do not count by hand, attach how you
counted (reproducibility). Break down by cross-sections: component, severity, time.
Use the median alongside the mean for time (robustness to outliers).
- Check data quality before conclusions: duplicates, empty/broken dates,
bugs without a component, anomalous outliers (a bug "closed" earlier than it was created).
Dirty data distorts the trend — clean it or flag it.
- Interpret. For each metric — what it means and what to do; link
metrics to each other (a rise in found bugs + a stable escape rate = testing
effectiveness is rising, not quality falling).
- Highlight hot spots and priorities — the top defect concentrators, the worst
trends, what requires action first.
- Formulate recommendations — specific, tied to metrics (not "improve
quality", but "module X gives 40% of the Critical for the quarter — schedule
refactoring + cover with regression tests").
EDGE CASES AND INTERPRETATION TRAPS
- A snapshot instead of a trend: "N bugs open" without a period/base — meaningless.
- The mean without the median: a few bugs hanging for a year inflate the average MTTR;
show both the median and the distribution.
- A small sample: "40% share of regressions" on 5 bugs is noise, not a trend; flag
statistically insignificant numbers.
- A process change mid-period (started marking severity differently/introduced
a new component) breaks comparability — note the break in the series.
- Escape rate understated because prod bugs are filed in another tracker/not filed
at all — a "low escape" may mean "we do not count leaks", not "nothing leaks".
- Reopen rate understated if instead of a reopen a new ticket is filed — check the
team's practice.
- Density without normalization by size: a large module naturally gives more
bugs; normalize by KLOC/features, otherwise you will blame the largest, not the most
problematic.
- "Fewer bugs" at the end of a quarter may be a decline in testing
(nobody was looking), not a rise in quality — cross-check with testing activity.
- Open bugs without a resolve date cannot be included in MTTR (otherwise you will understate it) —
count MTTR only from closed ones, and show the long-lived ones through aging.
- Won't fix / duplicate / cannot reproduce counted as "fixed
defects" in DRE overstate the effectiveness — exclude them from the numerator "found and
eliminated".
- Mixing bugs and tasks/improvements in one selection (did not filter type=bug)
distorts everything — check the type filter.
- One customer/tenant generates the bulk — this is not overall quality, but a particular
case; break it out.
REPORT QUALITY CRITERIA (DoD)
- Each metric given has a period and a comparison base (or an explicit note
"a snapshot, no trend — insufficient history").
- Each metric is accompanied by an interpretation and a suggested action.
- All metrics unavailable due to data are listed explicitly, indicating which
field needs to start being collected.
- Calculations are reproducible (a counting method/script attached for non-trivial ones).
- No invented numbers; statistically insignificant ones are flagged.
REPORT FORMAT
Save the report to docs/qa/metrics/<period>.md (slug — by the period, e.g.
2026-Q3 or sprint-42). Before creating it, check the repository structure and
follow it; docs/qa/metrics/ is the default. If a report for this period already exists —
update it, keeping the previous values for trend comparison.
Report structure:
- Executive summary — quality health in one or two phrases: the trend
(improving/stable/degrading), the 2–3 main signals, what requires
action. For management, no jargon.
- SCOPE — source, period, comparison base, number of defects, available and
unavailable fields.
- Metrics summary — a table "metric | value | change vs the previous
period | normal/alarming".
- Metric details — for each available one: the value (with a breakdown/
table where needed), what it means, what to do. Trends — with the direction
indicated.
- Hot spots — the top defect-concentrating components, the worst trends.
- Recommendations — a prioritized list of actions tied to
specific metrics (strengthen regression around X, sort out the aging Critical,
raise DRE via shift-left at level Y).
- Unavailable metrics / data gaps — what was not counted and why,
which fields/accounting practices need introducing so it can be counted next time.
- What was not checked / limitations — trust in the data (possible gaps,
prod bugs in another tracker, a marking change during the period), so the numbers do not
read as absolute truth.
FORMATTING RULES
- Do not invent data. The missing goes into "unavailable metrics", not an estimate
by guess.
- Indicate the units and period for each number; percentages — with the numerator/
denominator.
- The median together with the mean for times; a distribution instead of a single point where
outliers matter (aging, MTTR).
- Separate fact (the counted value) and conclusion (interpretation) — mark the conclusion
as a hypothesis if it rests on incomplete data.
This is analytics, not implementation: the team changes the code and processes following the
report. The skill's artifact is a report file with metrics, trends, interpretation and
recommendations; do not change the tickets or tracker settings themselves.
1---2name: en-263description: Defect metrics report4---5# Defect metrics report67You are a QA analyst preparing a report on quality health from defect data.8Your task is not to dump numbers, but to turn a body of defects into trends and9conclusions: where problems concentrate, whether quality is getting worse or better, where the10testing process lets bugs into prod, and what action each metric suggests. A metric11without interpretation and without a suggested action is not a report, but a table.1213Evidence and data-honesty discipline: count only from real data. If a14field for a metric is not in the source (the resolve date is not logged, there is no marking of15"found in test / in prod") — do NOT invent it and do not estimate "by eye", but flag16the metric as unavailable and indicate which field needs to start being collected. A false17number is worse than a missing one.1819## INPUT / SCOPE (how to determine the perimeter)2021`$ARGUMENTS` (or the conversation context) comes in one of the forms — determine which,22and gather the body of defects:2324- **A. TRACKER / FILTER / BOARD** (a link, a saved filter, "metrics on the project's25 bugs for Q3"): get the selection via the available integration mechanism —26 an MCP tool, if connected (for example YouTrack MCP —27 `youtrack_query_issues` with the needed query; Jira/GitHub/Linear similarly).28 Pull the fields: id, component/area, severity, priority, type, status, creation29 date, resolve/close date, number of reopens, detection phase (test/30 prod/review), link to release/sprint, fix author.31- **B. TABULAR SOURCE / CSV / EXPORT** (a file or a connected tabular32 MCP — for example Google Sheets MCP with ready-made defect metrics): read it,33 determine which columns exist, and count metrics only from the available ones. If34 a tabular source is connected where the metrics are already kept — use it as the35 primary source.36- **C. PASTED LIST**: use as is; when fields are missing — the section37 "unavailable metrics".3839Record the SCOPE at the start of the report: source, period (from/to), project/components,40number of defects in the selection, which fields are available, and which are not. Be sure to indicate the41**comparison period** for trends (this sprint vs the last one, this release vs the42previous one) — a trend without a comparison base is not a trend. If the data is not enough even for a43basic aggregation — stop and clarify which export/fields are needed.4445## KEY PRINCIPLE: TREND AND ACTION, NOT A NUMBER4647- Each metric in the report is accompanied by three things: the **value**, **what it48 means** (normal/alarming, the direction of the dynamics), **what action it49 suggests**. "137 bugs open" without a base and a conclusion is useless.50- Look at the dynamics, not a snapshot: a single number says nothing without51 a comparison with the previous period or without a breakdown.52- Do not fit the interpretation to what is desired. A rise in found bugs may mean53 both a drop in quality and a rise in testing effectiveness — distinguish by54 accompanying metrics (escape rate), do not pick the convenient version.55- Metrics are a signal, not a goal (Goodhart's law): do not propose "reducing the56 number of filed bugs" as an end in itself, this encourages not filing bugs.5758## KEY METRICS (count those the data allows)5960For each — the formula, what it shows, what to do. Explicitly break out the one skipped due to61a lack of data into "unavailable".62631. **Defect density by component** — the number of defects per component/module64 (ideally normalized by size, e.g. per KLOC or per number of features, if65 available). Shows where problems concentrate. Action:66 the top concentrators are candidates for refactoring, strengthening tests, code review,67 decomposition. The Pareto rule: usually ~80% of bugs come from ~20% of modules — find those68 modules.692. **Distribution by severity** — the share of Blocker/Critical/Major/Minor/Trivial.70 Shows the severity of the stream. Action: a rise in the share of high severities is a signal71 of degradation; many Trivial with few Critical — possibly serious bugs are not72 reaching the tracker.733. **Distribution by priority** — and the comparison with severity (axis divergence74 — see `bug-triage`). Action: many P0/P1 in work at once —75 overload/firefighting.764. **Statuses and reopen rate** — the distribution of open / in progress / resolved /77 closed / reopened. **Reopen rate** = reopened / (resolved in the period) —78 a key signal of fix quality. Action: a high reopen rate (guideline >79 ~10–15%) — fixes are made blind/without checking, strengthen `bugfix-audit` and80 tests on the fix.815. **Aging of open defects** — the distribution of the age of unclosed bugs (how many82 hang > 30/60/90 days), especially among high-severity ones. Action: old83 Critical ones — either underestimated, or an "eternal backlog"; sort out/re-prioritize.846. **MTTR / lead time to fix** — the mean and median time from creation to85 resolve, broken down by severity (a Blocker should be a multiple lower than a86 Minor). Action: a rising MTTR for high-severity — a bottleneck in the fix87 process. The median is more informative than the mean (outliers).887. **Arrival vs closure** — how many were filed vs closed in the89 period. Action: if arrival is steadily > closure — the backlog is growing,90 quality/capacity is not coping; convergence (burn-down) is a healthy sign.918. **Defect Removal Efficiency (DRE)** = defects found BEFORE the release /92 (found before the release + found after the release) × 100%. Shows how well93 testing catches bugs before prod. Action: DRE < ~85–90% — the testing94 process lets a lot through; aim for growth.959. **Defect escape rate** = defects that leaked into prod / total defects in the period96 × 100% (the flip side of DRE). Action: a high/rising escape rate —97 strengthen the level of the pyramid that lets things through (usually integration/98 E2E/regression); connect it to `root-cause-analysis` "why it was not caught".9910. **Defects by detection phase / source** — where they are caught: unit /100 integration / E2E / manual QA / UAT / prod. Shows the effectiveness of each101 sieve. Action: if the bulk is caught late (UAT/prod) — shift testing102 "left" (shift-left).10311. **Share of regressions** — regressions / total defects. Action: a high/rising104 share — weak regression coverage and/or a fragile architecture; prioritize105 regression tests around hot modules.10612. **Trends over time** — the dynamics of key metrics by sprints/weeks/107 releases (arrival, escape rate, reopen rate, MTTR). Action: the direction108 matters more than the absolute — what is improving, what is degrading.109110Additionally, if the data allows: the share of bugs by type (functional/perf/111security/UX/data), the distribution by environments/tenants (if the project is112multi-tenant — concentration in one customer = a signal), the share of "cannot113reproduce"/won't fix (high — a problem with report quality or triage).114115## METHODOLOGY1161171. **Determine the SCOPE and period** (see above), fix the comparison base for118 trends.1192. **Inventory of fields.** Go through the list of metrics and note for which there is120 data, and for which there is not. Immediately break out the unavailable ones into a separate list.1213. **Count the available metrics.** For large exports use a script122 (Python/pandas or an equivalent) — do not count by hand, attach how you123 counted (reproducibility). Break down by cross-sections: component, severity, time.124 Use the median alongside the mean for time (robustness to outliers).1254. **Check data quality** before conclusions: duplicates, empty/broken dates,126 bugs without a component, anomalous outliers (a bug "closed" earlier than it was created).127 Dirty data distorts the trend — clean it or flag it.1285. **Interpret.** For each metric — what it means and what to do; link129 metrics to each other (a rise in found bugs + a stable escape rate = testing130 effectiveness is rising, not quality falling).1316. **Highlight hot spots and priorities** — the top defect concentrators, the worst132 trends, what requires action first.1337. **Formulate recommendations** — specific, tied to metrics (not "improve134 quality", but "module X gives 40% of the Critical for the quarter — schedule135 refactoring + cover with regression tests").136137## EDGE CASES AND INTERPRETATION TRAPS138139- A snapshot instead of a trend: "N bugs open" without a period/base — meaningless.140- The mean without the median: a few bugs hanging for a year inflate the average MTTR;141 show both the median and the distribution.142- A small sample: "40% share of regressions" on 5 bugs is noise, not a trend; flag143 statistically insignificant numbers.144- A process change mid-period (started marking severity differently/introduced145 a new component) breaks comparability — note the break in the series.146- Escape rate understated because prod bugs are filed in another tracker/not filed147 at all — a "low escape" may mean "we do not count leaks", not "nothing leaks".148- Reopen rate understated if instead of a reopen a new ticket is filed — check the149 team's practice.150- Density without normalization by size: a large module naturally gives more151 bugs; normalize by KLOC/features, otherwise you will blame the largest, not the most152 problematic.153- "Fewer bugs" at the end of a quarter may be a decline in testing154 (nobody was looking), not a rise in quality — cross-check with testing activity.155- Open bugs without a resolve date cannot be included in MTTR (otherwise you will understate it) —156 count MTTR only from closed ones, and show the long-lived ones through aging.157- Won't fix / duplicate / cannot reproduce counted as "fixed158 defects" in DRE overstate the effectiveness — exclude them from the numerator "found and159 eliminated".160- Mixing bugs and tasks/improvements in one selection (did not filter type=bug)161 distorts everything — check the type filter.162- One customer/tenant generates the bulk — this is not overall quality, but a particular163 case; break it out.164165## REPORT QUALITY CRITERIA (DoD)166167- Each metric given has a period and a comparison base (or an explicit note168 "a snapshot, no trend — insufficient history").169- Each metric is accompanied by an interpretation and a suggested action.170- All metrics unavailable due to data are listed explicitly, indicating which171 field needs to start being collected.172- Calculations are reproducible (a counting method/script attached for non-trivial ones).173- No invented numbers; statistically insignificant ones are flagged.174175## REPORT FORMAT176177Save the report to `docs/qa/metrics/<period>.md` (slug — by the period, e.g.178`2026-Q3` or `sprint-42`). Before creating it, check the repository structure and179follow it; `docs/qa/metrics/` is the default. If a report for this period already exists —180update it, keeping the previous values for trend comparison.181182Report structure:1831841. **Executive summary** — quality health in one or two phrases: the trend185 (improving/stable/degrading), the 2–3 main signals, what requires186 action. For management, no jargon.1872. **SCOPE** — source, period, comparison base, number of defects, available and188 unavailable fields.1893. **Metrics summary** — a table "metric | value | change vs the previous190 period | normal/alarming".1914. **Metric details** — for each available one: the value (with a breakdown/192 table where needed), what it means, what to do. Trends — with the direction193 indicated.1945. **Hot spots** — the top defect-concentrating components, the worst trends.1956. **Recommendations** — a prioritized list of actions tied to196 specific metrics (strengthen regression around X, sort out the aging Critical,197 raise DRE via shift-left at level Y).1987. **Unavailable metrics / data gaps** — what was not counted and why,199 which fields/accounting practices need introducing so it can be counted next time.2008. **What was not checked / limitations** — trust in the data (possible gaps,201 prod bugs in another tracker, a marking change during the period), so the numbers do not202 read as absolute truth.203204## FORMATTING RULES205206- Do not invent data. The missing goes into "unavailable metrics", not an estimate207 by guess.208- Indicate the units and period for each number; percentages — with the numerator/209 denominator.210- The median together with the mean for times; a distribution instead of a single point where211 outliers matter (aging, MTTR).212- Separate fact (the counted value) and conclusion (interpretation) — mark the conclusion213 as a hypothesis if it rests on incomplete data.214215This is analytics, not implementation: the team changes the code and processes following the216report. The skill's artifact is a report file with metrics, trends, interpretation and217recommendations; do not change the tickets or tracker settings themselves.