Quality debt is a quality gap with a continuing cost or risk. Analysis should identify the item and its origin, show the observed effect, and compare repayment with containment or an explicitly accepted risk. Old work is not automatically debt, and age alone is not a priority.
Separate debt from nearby issues
Classify each item before estimating its “interest.” A product defect, an unreliable test asset, a temporary exception, and missing evidence require different actions.
| Record type | What to capture | Boundary |
|---|---|---|
| Active product defect | Observed behavior, affected users, source, and current controls | Track the defect itself; do not relabel it as test debt |
| Test or architecture debt | Asset, origin, recurring effort or exposure, age, and dependencies | Show the evidence that the gap keeps costing the team |
| Temporary exception | Authorized scope, owner, reason, controls, and expiry | Acceptance needs authority and a review date |
| Evidence gap | Missing or stale data needed to assess an item | Keep the conclusion unassessed rather than treating absence as proof |
A ticket, old test, or unfinished task is not enough to establish debt. The source Skill asks for the item, origin, impact, age, priority, ownership, and paydown tradeoff.
Measure the ongoing effect
Show how the gap compounds using observed maintenance effort, exposure, or detection delay. For example, reruns and triage may consume time, but a monetary estimate needs a sourced rate. If frequency or cost data are missing, use a qualitative or conditional range and state what evidence would narrow it.
Rank by business impact, exposure, detectability, dependencies, and repayment effort or benefit. Age is one signal among these. A newer gap with serious exposure can outrank an older, low-impact item.
Audit the evidence
Before assigning a priority, check evidence completeness, credibility, recency, and comparability. Record known, missing, conflicting, stale, out_of_scope, and assumptions. Confirm that evidence covers a comparable time period, the relevant build, and the asset being discussed.
- known: cite the issue, run, incident, effort record, or control that supports the claim.
- missing: request the smallest log, time window, impact source, or ownership detail needed.
- conflicting: preserve both accounts of cause or impact until an owner resolves them.
- stale: keep older history but do not present it as current rate or control status.
- out_of_scope: identify related product defects or release choices excluded from this pass.
- assumptions: state the validation that would keep the provisional ranking in place.
Separate facts, evidence-backed inferences, candidate recommendations, and Human decisions. Do not convert correlation between a flaky suite and escaped defects into a confirmed cause.
Worked example: rank by ongoing risk, not age
The source Skill includes a sanitized synthetic fixture. Its items and decisions are examples, not real project records or business approvals.
| Item | Supplied evidence | Fixture decision |
|---|---|---|
| Q-1 | A 180-day-old duplicate helper costs 1 hour per month and has no high-risk protection gap | LOWER_PRIORITY; age alone does not outrank current impact |
| Q-2 | A one-day-old refund test mocks the subject, missed a duplicate debit yesterday, and still leaves loss exposure | HIGHER_PRIORITY; the newer item has greater stated exposure, but the mock is not proven to be the cause |
| Q-3 | A confirmed production duplicate-debit defect remains unfixed | PRODUCT_DEFECT; track it as an active defect, not test debt |
| Q-4 | A helper-refactor ticket is closed, but there is no behavior-regression or maintenance-impact evidence | NOT_CLOSED; the ticket alone does not show that the debt effect is gone |
| Q-5 | Refactored code, an independent regression, a maintenance sample, and owner acceptance are recorded | CLOSED; the fixture contains the required closure evidence |
QDA-01 candidate: assess the refund-test gap
| Finding field | Example record |
|---|---|
| Finding field | Example record |
| --- | --- |
| Object and source | Q-2, the refund test described in the sanitized fixture; no live test ID or repository history is supplied |
| Trigger and concern | The test mocks its subject, while the fixture reports a missed duplicate debit and continuing loss exposure. This warrants checking the test boundary; it does not establish that the mock caused the miss. |
| Evidence state | known for the synthetic fixture; live test history, defect linkage, and production scope remain UNASSESSED |
| Impact, priority, and owner | HIGHER_PRIORITY relative to Q-1 in the fixture. The live owner and impact rubric are unknown; identify the responsible test owner before ranking project work. |
| Validation and stop condition | Compare the test definition, execution history, and duplicate-debit evidence over an agreed window. If an active production defect is confirmed, stop the debt ranking and route it through the product-defect or incident process. |
| Close condition | Change the relevant asset, independently check the intended behavior, show that the recurring exposure or detection gap is removed, and record accountable acceptance. |
This example keeps the test gap separate from the active product defect. Any accepted residual risk needs an authorized owner and an expiry or review date.
Choose repayment, containment, or acceptance
For each item, compare the smallest repayment action with containment, monitoring, or a time-bounded acceptance. Record dependencies, owner, target date, residual risk, and the evidence that will show the effect changed.
| Option | When it fits | Record and exit condition |
|---|---|---|
| Repay | The ongoing cost or risk justifies the repair effort | Name the asset to change, an independent behavior check, evidence that the effect changed, and the accepting owner |
| Contain | Repayment is not feasible soon, but exposure or impact can be limited | Record containment scope, compensating controls, monitoring signal, owner, and review date; define escalation if the control fails |
| Accept | An authorized owner chooses to carry the residual risk for a bounded scope | State the reason, scope, compensating controls, residual risk, approver, and expiry or review date; renewal requires a new approval |
A debt item is not repaid when a ticket closes or a document is written. The source contract requires a changed asset, an independent check of the intended behavior, evidence that the debt effect is gone, and accountable acceptance. If those conditions are not met, keep it open or record an authorized exception.
Put debt treatment inside the quality loop
AI-generated tests can suggest missing cases, but generation alone does not repay debt. Review and deduplicate candidates, connect accepted tests to the affected requirement, execute them, then check independently that the original debt effect has changed. Feed escapes, maintenance effort, detection delay, and unresolved evidence back into the next review.
Prepare a reviewable record
Provide the item identifier, origin evidence, impact and controls, age, comparable observation period, effort or exposure data, dependencies, and repayment options. Mark each amount and rate as observed, estimated, or unknown. Keep current defects and decisions outside the debt record unless their relationship is sourced. For CSV, JSON, or ticket output, agree the schema, enums, required fields, and evidence sources first.
Work with related Skills
- Test Maintenance Cost Analysis: https://inaodeng.com/en/qaskills/test-maintenance-cost-analysis/ measures recurring test effort.
- Test Suite Health Analysis: https://inaodeng.com/en/qaskills/test-suite-health-analysis/ reviews reliability and test value.
- Quality Risk Analysis: https://inaodeng.com/en/qaskills/quality-risk-analysis/ prioritizes work by product impact.
Common mistakes
- Calling every old test a debt item.
- Ranking by age while ignoring exposure, detectability, and repayment cost.
- Assigning a root cause from correlation.
- Closing the ticket without evidence that the debt effect disappeared.
Best practices
- Separate active product defects, test or architecture debt, temporary exceptions, and evidence gaps before ranking.
- Estimate ongoing cost or risk from observed effort, exposure, or detection delay. Without a sourced rate, keep the estimate qualitative or conditional.
- Rank by impact, exposure, detectability, dependencies, and repayment effort or benefit. Use age as one signal.
- Close debt only after the asset changes, an independent check passes, the ongoing effect is gone, and an accountable owner accepts the result.
First use: assess one debt item
- Pick one test, architecture asset, or exception and identify its source and current control.
- Provide a comparable observation period, evidence of impact or effort, age, dependencies, and possible repayment actions.
- Ask the Skill to classify the item, state what is known or missing, and name the smallest validation step. Keep the priority unscored if impact evidence or an owner is missing.
Install and invoke
npx skills add https://github.com/naodeng/awesome-qa-skills/tree/main/skills/en --skill quality-debt-analysis
Invoke quality-debt-analysis with scoped evidence, comparable time periods, and the asset or exception under review.
FAQ
Can quality debt be accepted?
Yes, when an authorized owner records the impact, controls, residual risk, and an expiry or review date.
How do I show that debt was repaid?
Use the original evidence measure, show the relevant asset changed, independently verify the intended behavior, and confirm the debt effect is gone.
Can an AI-generated test close a debt item?
No. Treat it as a candidate until it is reviewed and run. Closure still needs a changed asset, an independent behavior check, evidence that the debt effect is gone, and accountable acceptance.
References
The Quality Debt Analysis prompt: https://github.com/naodeng/awesome-qa-skills/tree/main/skills/en/testing-types/quality-debt-analysis/prompts/quality-debt-analysis.md defines QDA-## fields, debt classification, priority considerations, and closure evidence. The worked decisions come from its sanitized synthetic fixture: https://github.com/naodeng/awesome-qa-skills/blob/main/skills/en/testing-types/quality-debt-analysis/references/domain-decision-example.md. Source directory: https://github.com/naodeng/awesome-qa-skills/tree/main/skills/en/testing-types/quality-debt-analysis.
- Awesome QA Skills: https://github.com/naodeng/awesome-qa-skills
- Quality Debt Analysis details: https://inaodeng.com/en/qaskills/quality-debt-analysis/
More Resources
- Personal website: https://inaodeng.com/en/
- AI-generated test detection project: https://github.com/AI-Native-QA-Lab/ai-test-auditor
- DeepSeek QA Workbench: https://github.com/naodeng/dsh-qa
- More AI testing skills: https://inaodeng.com/en/qaskills/
- More testing wiki: https://inaodeng.com/en/wiki/
- More AI Wiki: https://inaodeng.com/en/AIWiki/