Refactor baseline metrics

August 12, 2026 ยท View on GitHub

Generated from the current tree on 2026-08-11. This is a navigation aid, not an architectural contract; line counts change continuously.

Largest production Python modules

Tests and generated files are excluded.

LinesModule
1,555backend/cli/tui/widgets/scan_line/cards.py
1,393backend/context/prompt/prompt_window.py
1,314backend/execution/aes/helpers.py
1,270backend/context/memory/conversation_memory.py
1,264backend/execution/aes/file_operations.py
1,250backend/context/compactor/pre_condensation_snapshot.py
1,177backend/inference/catalog/catalog_loader.py
1,173backend/utils/lsp/lsp_client.py
1,165backend/integrations/mcp/mcp_utils.py
1,144backend/engine/executor_mixins/_executor_streaming_mixin.py
1,132backend/ledger/stream/event_stream.py
1,098backend/execution/server/base.py
1,097backend/engine/planner.py
1,039backend/execution/io_mixins/_aes_io_terminal_mixin.py
1,028backend/utils/runtime_detect.py

Large modules are review signals, not automatic split requirements. Check public imports in docs/internals/import-manifest.json before moving symbols.

Refresh command

$rows = Get-ChildItem backend -Recurse -Filter *.py |
  Where-Object { $_.FullName -notmatch '[\\/]tests[\\/]' } |
  ForEach-Object {
    [pscustomobject]@{
      Lines = (Get-Content -LiteralPath $_.FullName).Count
      Path = (Resolve-Path -Relative $_.FullName) -replace '^.\\', ''
    }
  }
$rows | Sort-Object Lines -Descending | Select-Object -First 20

For current package boundaries, use ARCHITECTURE.md and CONTRIBUTOR_MAP.md, not older refactor plans.