Refactoring made right: how program analysis makes AI agents safe and reliable | EngBrief