I guess if there's any mod that can do this, it's K-Mod, as it includes a number of AI tweaks, including automatic city governors. That said, in most cases they're decidedly not stupid, they just can't read your mind. The AI doesn't know if you want production or food, so it hires specialists because they appear to be more efficient than creating commerce in another way. I wouldn't suggest you waste time "fixing" this unless you want K-Mod's general AI overhaul.That's a general problem of all of CIV. Via SDK, which controls all of the AI, you could change that; but i think that this is a too big task for one man.
Unless you know a mod/modcomp that i could copy the code from, i rather let it be the way it is before i wreck the whole code.