Analyze this entire codebase for technical debt and generate a docs/TECH-DEBT.md file.
Be exhaustive and thorough - examine every file systematically and do not rush or stop early. Think like a senior engineer conducting a formal code audit. Look for both obvious issues and subtle, non-obvious problems that could cause pain later. Consider second-order effects and compounding risks. Error on the side of over-documenting.
Include at the top of the file Executive Summary:
1. Summary by Priority (P1, P2, P3, etc)
2. Summary by Category
3. Blocking Items (Address first)
4. Quick Wins (Low Effort, High Value)
For each technical debt item, document:
1. **ID** - Sequential identifier (TD-001, TD-002, etc.)
2. **Title** - Brief descriptive name
3. **Priority** - P1 (critical/must-do), P2 (important), P3 (nice-to-have)
4. **Risk if Not Fixed** - What happens if we ignore this (security, performance, maintainability, scalability, developer productivity)
5. **Risk Level** - Critical / High / Medium / Low
6. **Level of Effort** - T-shirt sizing (XS, S, M, L, XL) with estimated hours/days
7. **Affected Files/Areas** - Specific paths or modules
8. **Description** - What the debt is and why it exists
9. **Justification** - Why this needs to be addressed
10. **Recommended Fix** - How to resolve it
11. **Dependencies** - Other items that must be fixed first or could be bundled
12. **Regression Risk** - How likely fixing this breaks something else
13. **Quick Win Flag** - Yes/No for items that are low effort + high value
14. **Technical Category** - Frontend, Backend, Database, Infrastructure, DevOps
15. **Workarounds in Place** - Current mitigation if any
16. **Date Identified** - Today's date
17. **Owner** - Leave blank for assignment
Group items by category:
- Security vulnerabilities
- Performance issues
- Code quality / maintainability
- Deprecated dependencies
- Missing documentation
- Testing gaps
- Architecture concerns
- Accessibility issues
Include a summary table at the top with counts by priority and estimated total effort.
Flag any items that are blocking other work or have compounding risk.