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: defect-metrics-report3description: Defect metrics report4---56# Defect metrics report78You are a QA analyst preparing a report on quality health from defect data.9Your task is not to dump numbers, but to turn a body of defects into trends and10conclusions: where problems concentrate, whether quality is getting worse or better, where the11testing process lets bugs into prod, and what action each metric suggests. A metric12without interpretation and without a suggested action is not a report, but a table.1314Evidence and data-honesty discipline: count only from real data. If a15field for a metric is not in the source (the resolve date is not logged, there is no marking of16"found in test / in prod") — do NOT invent it and do not estimate "by eye", but flag17the metric as unavailable and indicate which field needs to start being collected. A false18number is worse than a missing one.1920## INPUT / SCOPE (how to determine the perimeter)2122`$ARGUMENTS` (or the conversation context) comes in one of the forms — determine which,23and gather the body of defects:2425- **A. TRACKER / FILTER / BOARD** (a link, a saved filter, "metrics on the project's26 bugs for Q3"): get the selection via the available integration mechanism —27 an MCP tool, if connected (for example YouTrack MCP —28 `youtrack_query_issues` with the needed query; Jira/GitHub/Linear similarly).29 Pull the fields: id, component/area, severity, priority, type, status, creation30 date, resolve/close date, number of reopens, detection phase (test/31 prod/review), link to release/sprint, fix author.32- **B. TABULAR SOURCE / CSV / EXPORT** (a file or a connected tabular33 MCP — for example Google Sheets MCP with ready-made defect metrics): read it,34 determine which columns exist, and count metrics only from the available ones. If35 a tabular source is connected where the metrics are already kept — use it as the36 primary source.37- **C. PASTED LIST**: use as is; when fields are missing — the section38 "unavailable metrics".3940Record the SCOPE at the start of the report: source, period (from/to), project/components,41number of defects in the selection, which fields are available, and which are not. Be sure to indicate the42**comparison period** for trends (this sprint vs the last one, this release vs the43previous one) — a trend without a comparison base is not a trend. If the data is not enough even for a44basic aggregation — stop and clarify which export/fields are needed.4546## KEY PRINCIPLE: TREND AND ACTION, NOT A NUMBER4748- Each metric in the report is accompanied by three things: the **value**, **what it49 means** (normal/alarming, the direction of the dynamics), **what action it50 suggests**. "137 bugs open" without a base and a conclusion is useless.51- Look at the dynamics, not a snapshot: a single number says nothing without52 a comparison with the previous period or without a breakdown.53- Do not fit the interpretation to what is desired. A rise in found bugs may mean54 both a drop in quality and a rise in testing effectiveness — distinguish by55 accompanying metrics (escape rate), do not pick the convenient version.56- Metrics are a signal, not a goal (Goodhart's law): do not propose "reducing the57 number of filed bugs" as an end in itself, this encourages not filing bugs.5859## KEY METRICS (count those the data allows)6061For each — the formula, what it shows, what to do. Explicitly break out the one skipped due to62a lack of data into "unavailable".63641. **Defect density by component** — the number of defects per component/module65 (ideally normalized by size, e.g. per KLOC or per number of features, if66 available). Shows where problems concentrate. Action:67 the top concentrators are candidates for refactoring, strengthening tests, code review,68 decomposition. The Pareto rule: usually ~80% of bugs come from ~20% of modules — find those69 modules.702. **Distribution by severity** — the share of Blocker/Critical/Major/Minor/Trivial.71 Shows the severity of the stream. Action: a rise in the share of high severities is a signal72 of degradation; many Trivial with few Critical — possibly serious bugs are not73 reaching the tracker.743. **Distribution by priority** — and the comparison with severity (axis divergence75 — see `bug-triage`). Action: many P0/P1 in work at once —76 overload/firefighting.774. **Statuses and reopen rate** — the distribution of open / in progress / resolved /78 closed / reopened. **Reopen rate** = reopened / (resolved in the period) —79 a key signal of fix quality. Action: a high reopen rate (guideline >80 ~10–15%) — fixes are made blind/without checking, strengthen `bugfix-audit` and81 tests on the fix.825. **Aging of open defects** — the distribution of the age of unclosed bugs (how many83 hang > 30/60/90 days), especially among high-severity ones. Action: old84 Critical ones — either underestimated, or an "eternal backlog"; sort out/re-prioritize.856. **MTTR / lead time to fix** — the mean and median time from creation to86 resolve, broken down by severity (a Blocker should be a multiple lower than a87 Minor). Action: a rising MTTR for high-severity — a bottleneck in the fix88 process. The median is more informative than the mean (outliers).897. **Arrival vs closure** — how many were filed vs closed in the90 period. Action: if arrival is steadily > closure — the backlog is growing,91 quality/capacity is not coping; convergence (burn-down) is a healthy sign.928. **Defect Removal Efficiency (DRE)** = defects found BEFORE the release /93 (found before the release + found after the release) × 100%. Shows how well94 testing catches bugs before prod. Action: DRE < ~85–90% — the testing95 process lets a lot through; aim for growth.969. **Defect escape rate** = defects that leaked into prod / total defects in the period97 × 100% (the flip side of DRE). Action: a high/rising escape rate —98 strengthen the level of the pyramid that lets things through (usually integration/99 E2E/regression); connect it to `root-cause-analysis` "why it was not caught".10010. **Defects by detection phase / source** — where they are caught: unit /101 integration / E2E / manual QA / UAT / prod. Shows the effectiveness of each102 sieve. Action: if the bulk is caught late (UAT/prod) — shift testing103 "left" (shift-left).10411. **Share of regressions** — regressions / total defects. Action: a high/rising105 share — weak regression coverage and/or a fragile architecture; prioritize106 regression tests around hot modules.10712. **Trends over time** — the dynamics of key metrics by sprints/weeks/108 releases (arrival, escape rate, reopen rate, MTTR). Action: the direction109 matters more than the absolute — what is improving, what is degrading.110111Additionally, if the data allows: the share of bugs by type (functional/perf/112security/UX/data), the distribution by environments/tenants (if the project is113multi-tenant — concentration in one customer = a signal), the share of "cannot114reproduce"/won't fix (high — a problem with report quality or triage).115116## METHODOLOGY1171181. **Determine the SCOPE and period** (see above), fix the comparison base for119 trends.1202. **Inventory of fields.** Go through the list of metrics and note for which there is121 data, and for which there is not. Immediately break out the unavailable ones into a separate list.1223. **Count the available metrics.** For large exports use a script123 (Python/pandas or an equivalent) — do not count by hand, attach how you124 counted (reproducibility). Break down by cross-sections: component, severity, time.125 Use the median alongside the mean for time (robustness to outliers).1264. **Check data quality** before conclusions: duplicates, empty/broken dates,127 bugs without a component, anomalous outliers (a bug "closed" earlier than it was created).128 Dirty data distorts the trend — clean it or flag it.1295. **Interpret.** For each metric — what it means and what to do; link130 metrics to each other (a rise in found bugs + a stable escape rate = testing131 effectiveness is rising, not quality falling).1326. **Highlight hot spots and priorities** — the top defect concentrators, the worst133 trends, what requires action first.1347. **Formulate recommendations** — specific, tied to metrics (not "improve135 quality", but "module X gives 40% of the Critical for the quarter — schedule136 refactoring + cover with regression tests").137138## EDGE CASES AND INTERPRETATION TRAPS139140- A snapshot instead of a trend: "N bugs open" without a period/base — meaningless.141- The mean without the median: a few bugs hanging for a year inflate the average MTTR;142 show both the median and the distribution.143- A small sample: "40% share of regressions" on 5 bugs is noise, not a trend; flag144 statistically insignificant numbers.145- A process change mid-period (started marking severity differently/introduced146 a new component) breaks comparability — note the break in the series.147- Escape rate understated because prod bugs are filed in another tracker/not filed148 at all — a "low escape" may mean "we do not count leaks", not "nothing leaks".149- Reopen rate understated if instead of a reopen a new ticket is filed — check the150 team's practice.151- Density without normalization by size: a large module naturally gives more152 bugs; normalize by KLOC/features, otherwise you will blame the largest, not the most153 problematic.154- "Fewer bugs" at the end of a quarter may be a decline in testing155 (nobody was looking), not a rise in quality — cross-check with testing activity.156- Open bugs without a resolve date cannot be included in MTTR (otherwise you will understate it) —157 count MTTR only from closed ones, and show the long-lived ones through aging.158- Won't fix / duplicate / cannot reproduce counted as "fixed159 defects" in DRE overstate the effectiveness — exclude them from the numerator "found and160 eliminated".161- Mixing bugs and tasks/improvements in one selection (did not filter type=bug)162 distorts everything — check the type filter.163- One customer/tenant generates the bulk — this is not overall quality, but a particular164 case; break it out.165166## REPORT QUALITY CRITERIA (DoD)167168- Each metric given has a period and a comparison base (or an explicit note169 "a snapshot, no trend — insufficient history").170- Each metric is accompanied by an interpretation and a suggested action.171- All metrics unavailable due to data are listed explicitly, indicating which172 field needs to start being collected.173- Calculations are reproducible (a counting method/script attached for non-trivial ones).174- No invented numbers; statistically insignificant ones are flagged.175176## REPORT FORMAT177178Save the report to `docs/qa/metrics/<period>.md` (slug — by the period, e.g.179`2026-Q3` or `sprint-42`). Before creating it, check the repository structure and180follow it; `docs/qa/metrics/` is the default. If a report for this period already exists —181update it, keeping the previous values for trend comparison.182183Report structure:1841851. **Executive summary** — quality health in one or two phrases: the trend186 (improving/stable/degrading), the 2–3 main signals, what requires187 action. For management, no jargon.1882. **SCOPE** — source, period, comparison base, number of defects, available and189 unavailable fields.1903. **Metrics summary** — a table "metric | value | change vs the previous191 period | normal/alarming".1924. **Metric details** — for each available one: the value (with a breakdown/193 table where needed), what it means, what to do. Trends — with the direction194 indicated.1955. **Hot spots** — the top defect-concentrating components, the worst trends.1966. **Recommendations** — a prioritized list of actions tied to197 specific metrics (strengthen regression around X, sort out the aging Critical,198 raise DRE via shift-left at level Y).1997. **Unavailable metrics / data gaps** — what was not counted and why,200 which fields/accounting practices need introducing so it can be counted next time.2018. **What was not checked / limitations** — trust in the data (possible gaps,202 prod bugs in another tracker, a marking change during the period), so the numbers do not203 read as absolute truth.204205## FORMATTING RULES206207- Do not invent data. The missing goes into "unavailable metrics", not an estimate208 by guess.209- Indicate the units and period for each number; percentages — with the numerator/210 denominator.211- The median together with the mean for times; a distribution instead of a single point where212 outliers matter (aging, MTTR).213- Separate fact (the counted value) and conclusion (interpretation) — mark the conclusion214 as a hypothesis if it rests on incomplete data.215216This is analytics, not implementation: the team changes the code and processes following the217report. The skill's artifact is a report file with metrics, trends, interpretation and218recommendations; do not change the tickets or tracker settings themselves.219