It's kind of been one of my main critiques of companies like Palantir. You really can't just dump a company's data into the big ML tumbler and expect useful/sellable products to just pop out. Take a random use case like, I don't know, Pepsi. Maybe Pepsi can get some insights about their supply chain and customer preferences. Alright? Okay. Did the world end because that happened? Not really.
Shifting gears back to programmers - AI will be a super smart programmer that will write a bunch of your code. I worked with some super smart programmers, and they can manage to write a lot of super smart code that eventually becomes a clusterfuck too.
We'll just go from unwrapping human shit code, to unwrapping AI shit code (or even better, unwrapping a mix of human shit and AI shit). The job prospects here are even greater than you imagine.
Long as you maintain the belief in the fundamental truth, that anything in existence is capable of writing shit code, then the world will never end for programmers.