The best TBS AI I've ever seen is GalCiv2's AI. If you need inspiration, just look there.
In particular, the latest version of GalCiv2 has a system where other races start ganging up on the most powerful race, usually you. Well, they don't simply gang up on you - they just start distrusting your intentions more and are much more likely to form an alliance against you. This "checks and balances" system is desparately needed in Civ4.
The other major AI blunder is more of a tactical one. The AI seems to always streams units to the front lines. This isn't so bad, until the front line collapses, in which case the units streaming in a slaughtered one-by-one. I'm not playing a hard difficulty, so maybe the AI doesn't stream at high difficulties. Nonetheless, this is one area the AI needs to focus on.
As for making the AI use spells intelligently, I don't envy your task

Many spells are very tactical, and AIs make pretty bad tacticians.
If you really want the AI to be good, perhaps you should follow one of GalCiv2's design mottos: "only implement features that the AI can take advantage as well", or more concisely, "if the AI can't use a feature, don't implement it".