Defect Density Tracking v3.1
Defect density measures code quality by tracking defects per thousand lines of code (KLOC).
Sources
Defects are ingested from:
- CI test failures — from automated test runs
- Code review comments — flagged as issues during PR review
- Demo rejections — rejected demo items auto-create defects
- Manual entry — issues in RAID marked as defects
Weekly Snapshots
A weekly snapshot calculates:
- Open defect count
- Defect density (open defects per KLOC)
- Test coverage average
- CI success rate
Industry Benchmarks
| Density | Rating |
|---|---|
| < 1 defect/KLOC | Excellent |
| 1-3 defects/KLOC | Acceptable |
| > 3 defects/KLOC | Concerning |
Alerts
- Defect density trending upward for 3+ weeks → amber alert
- Open critical defects > 5 → red alert
- CI success rate below 70% → amber alert