AI-generated code is rewriting the rules of software engineering, pushing firms to choose reinvention and repair.