Skip to content

techdebt

Identifies and resolves code quality issues and maintenance concerns.

Category: code-gen
Field: general
License: Other (see repo)
Updated: 2026
Stages: code-generation

Technical Debt Finder

Identify and fix technical debt in the codebase.

What to Look For

Code Duplication

  • Functions with similar logic that could be consolidated
  • Copy-pasted code blocks
  • Repeated patterns that should be abstracted

Dead Code

  • Unused imports
  • Unused functions or classes
  • Commented-out code blocks
  • Unreachable code paths

Outdated Patterns

  • Deprecated API usage
  • Old-style string formatting (% or .format) vs f-strings
  • Type hints using typing.List instead of list
  • Missing type hints on public functions

Code Smells

  • Functions longer than 50 lines
  • Too many parameters (more than 5)
  • Deep nesting (more than 3 levels)
  • Magic numbers without constants
  • Overly complex conditionals

Missing Best Practices

  • Missing docstrings on public functions
  • Missing error handling
  • Hardcoded values that should be config
  • Missing tests for critical paths

Workflow

  1. Scan the Codebase
  2. Look for patterns matching the issues above
  3. Prioritize by impact and ease of fix

  4. Report Findings

  5. List issues by category
  6. Include file paths and line numbers
  7. Estimate severity (high/medium/low)

  8. Fix Issues

  9. Start with high-severity, easy fixes
  10. Create atomic commits for each fix
  11. Run tests after each change

  12. Verify

  13. Run linter: ruff check .
  14. Run tests: pytest
  15. Ensure no new issues introduced

Arguments

Optionally specify a directory or file to focus on.

Usage: - /techdebt - Scan entire project - /techdebt src/ - Scan specific directory - /techdebt src/utils.py - Scan specific file

Output

Provide a summary of: - Issues found (by category) - Issues fixed - Remaining items for future sessions