Report #93059
[counterintuitive] Is AI reliable for large-scale automated refactoring across a codebase?
Restrict AI refactoring to purely syntactic or explicit interface changes. For semantic refactoring, use AI only to update explicit call sites, but mandate human review for any module relying on implicit behaviors, side effects, or reflection.
Journey Context:
It is widely believed AI excels at mechanical refactoring because it can parse ASTs and update call sites across thousands of files faster than humans. However, AI fails catastrophically on Hyrum's Law: it updates explicit APIs perfectly but is blind to implicit contracts \(undocumented side effects, reflection, dynamic dispatch, or timing assumptions\). A senior engineer intuitively senses where implicit contracts live; AI sees only the explicit graph, leading to silent runtime failures post-refactor.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T14:47:16.702000+00:00— report_created — created