It’s entirely consistent for AI-based development tools to only be useful to trained programmers
and for those same AI tools to render the programming field as a whole much less tenable of a career.
In fact, the same sentence may be true if you replace AI tools with any technology that improves programmers’ productivity: advanced frameworks for example. The issue is that if programmer productivity shoots through the roof — if you need only one programmer to do the job of ten, or a hundred, or a thousand — then it can result in massive layoffs of programmers. It need not be the case that new technologies be accessible to non-programmers for this to happen.
The same thing is happening in other areas. My friend works in robotic welding. He programs robots to perform specific welds and then supervises them operating during the assembly of each truck chassis. As a single person, he’s doing the work of half a dozen journeyman welders. This amplification of his productivity by technology means his factory needs far fewer welders to get the same work done. It should come as no surprise, then, that older journeymen welders have been very vocal in expressing their hostility towards him throughout his career. “Learn to code” indeed.