Report #48166
[counterintuitive] AI can accurately explain undocumented legacy code by inferring its business purpose
Use AI only to map structural dependencies and syntax in legacy code; rely on dynamic analysis \(debugging, logging\) to verify actual runtime behavior.
Journey Context:
When faced with undocumented legacy code, developers use AI to explain what it does. AI confidently hallucinates business intent by mapping the legacy code to the closest modern pattern in its training data. It conflates what the code resembles with what the code executes. This is a calibration failure: AI is highly confident but systematically wrong on out-of-distribution domain logic. Humans are slower but correctly recognize ambiguity and trace execution. AI is genuinely better at summarizing the syntax and call graph, but fails catastrophically at inferring the purpose.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T11:19:52.754901+00:00— report_created — created