Reading this thread it seems to me that AI is a threat for "boilerplate-heavy" programming like website frontends, I can't really imagine pre-singularity AI being able to replace a programmer in the general case.
Helping devs go through "boring", repetitive code faster seems like a good way to increase our productivity and make us more valuable, not less.
Sure, if AI evolves to the point where it reaches human-level coding abilities we're in trouble, but that's the case this is going to revolutionize humanity as a whole (for better or worse), not merely our little niche.
I mean, we already have? Use Django Rest Framework and simple business models and you're pretty much declaratively writing API endpoints by composing behavior. Almost nothing in a DRF endpoint definition is boilerplate.
The hard part has always been writing an API that models external behavior correctly.
Helping devs go through "boring", repetitive code faster seems like a good way to increase our productivity and make us more valuable, not less.
Sure, if AI evolves to the point where it reaches human-level coding abilities we're in trouble, but that's the case this is going to revolutionize humanity as a whole (for better or worse), not merely our little niche.