Why not have an AI agent super-optimize with a Lean proof of equivalence to your baseline as the "specification"?