# Process: Technical Debt Management **Primary agent:** `.claude/agents/qa-tech-debt.md` ## When to run Continuously, whenever debt is discovered during execution or review. ## Steps 1. Classify the debt: unintentional (skill/experience gap), unavoidable (emergent learning or external change), or deliberate/strategic (a conscious, justified shortcut). 2. Log it as a new row in `logs/technical_debt_log.md` with its estimated impact ("interest rate" — how much it slows current work or raises defect risk). 3. Hand high-impact items to `product-owner` to add as a backlog item in the relevant epic under `backlog/epics/`; prefer incremental repayment blended into normal sprint work over dedicated "debt sprints." 4. When touching code near existing debt, apply "leave it better than you found it" and fix it incidentally where reasonable. 5. Explicitly flag any case where debt is knowingly left unpaid (e.g., end-of-life product, throwaway prototype) as a deliberate decision. ## Exit criteria - No debt is purely tribal knowledge; each item is visible in the backlog/issue tracker with an owner and priority signal. **On completion:** this is a continuous, triggered process — it does not advance `state.md`'s primary phase. No update needed unless a high-impact debt item is promoted into the backlog, in which case note it in `state.md`'s "Next action" as context for the next `backlog-refinement`/`sprint-planning` pass.