Code health
This codebase scores 6.2 out of 10 for code health, which we rate fair. It also scores maintainability 8.5 and static performance 9.9 out of 10. The three are scored separately and never blended into one number. Risk is concentrated, as it usually is: 203 of 1,052 files are git hotspots, and they average 5.0 — which is where the fixes pay off most.
5 things worth doing this quarter.
Flatten the nesting in handleSend
dashboard/src/pages/MessageTester.tsx:332
handleSend nests its control flow deeply, and part of it is duplicated, so splitting it also removes a copy; 2 files import it, changed 10 times in 90 days.
Break up validateEnv (CCN 45, 154 lines)
src/config/env.validation.ts:50
validateEnv is long, branchy and widely depended on, and part of it is duplicated, so splitting it also removes a copy; 8 files import it, changed 22 times in 90 days.
Update the decision “Preload environment variables before importing application modules”: the code it governs has moved on
Agents and reviewers still follow it, so they are steered by a rule the code no longer keeps.
Delete 21 unused symbols and files (241 lines)
Nothing in the graph reaches them, across 6 files; every reader and agent pays to skip them.
Break up bootstrap (CCN 37, 224 lines)
src/main.ts:45
bootstrap is long, branchy and widely depended on, and part of it is duplicated, so splitting it also removes a copy; 17 files import it, changed 36 times in 90 days.
Every detector's open count by area, each with its worst example. An inventory, not a to-do list: the actions above are the part worth doing.