Breaking Down Extract Magic Numbers Into Named
Magic numbers still hide in codebases like unmarked debt - creeping into pipelines without explanation. From 1_200 budgets to 0.8 pattern thresholds, these values shape behavior but often go unnoticed. nnIn ir-tree.ts, 14 caps max depth; in generator-a11y.ts, 4.5 is AA contrast and 20 font size sets readability. These numbers aren’t arbitrary - they’re cultural artifacts of past decisions. nnBehind the scenes, subtle thresholds govern design systems and accessibility. For example, a 0.8 Jaccard similarity favors meaningful pattern matching, while 8 spacing base sets visual rhythm. Even 120×80 defines card footprints - small but critical micro-decisions. nnBut here’s the blind spot: developers treat these thresholds as natural, not crafted. Without naming, they risk being changed inconsistently or forgotten. This breeds technical debt and inconsistent UX. nnThe elephant in the