For example. A person who does frontend sadly is more affected by it. The advice for him to learn more in depth backends and where they connect and maybe connecting that cross domain knowledge and orchestrating AI where others could fail could be more relevant than further specialization in it itself.
But on the other hand, suppose there's an employee who is working with an quant company. Maybe you can say that they should generalize, maybe not. I have the personal opinion of saying that even if AI can write such hyper-efficient code, the ability/depth of him to verify (because verification can mean A LOT more in quant than in frontend generally speaking*)
Suppose there's a student who is just starting out, you can give them generalist advice to learn things and find what they like and learn it more in depth.
Suppose there's a employee who has a family life (wife, kids etc.) and is simply unable to have so so much free time as that student and its genuinely okay. Then there could be a different advice for them.
There are different advice for different people. My optimistic opinion is that maybe AI can help both specialize in a particular thing and teach you it or it can teach you multiple domains. It is still an impressive tech that you can get such a good teacher.
I also have an pessimistic opinion but enough nuance for today as I am gonna go late for a class. I don't think that there's one right answer to this question (maybe)