ai-agents-metrics

ARCH-011: Integrate radon for code complexity metrics

Status: done
Priority: medium
Complexity: low

Rationale

Automated code quality metrics help identify overly complex functions and modules early. radon provides:

Current state: No automated complexity tooling beyond pylint and mypy.

Implementation

  1. Add radon to dev dependencies in pyproject.toml
  2. Add radon check to Makefile (under a new quality target or extended verify)
  3. Configure radon threshold in pyproject.toml or .radon.ini:
    • Cyclomatic complexity warning threshold: 10 (flag “complex” functions)
    • Maintainability Index warning: < 40 (flag hard-to-maintain modules)
  4. Integrate into CI/CD: fail on complexity violations or add to pre-push hook
  5. Document in CLAUDE.md how to run locally: radon mi src/ -s

Acceptance Criteria