AI should build up fleets PRIOR to declaration of war and send those fleets out at you immediately post-declaration.
Your sentence order is wrong. I think you meant "AI should build up fleets and send those fleets out at you PRIOR to declaration of war." The "immediately post-declaration" is the part when you attack and invade. 
More seriously, the AI and/or the supporting strategy scripts ought to understand and use planetary specialization. I think, that's the biggest issue crippling the AI currently. Lots of other things are simply the consequence of that as the AI's economy and production simply can't keep up with that of the player. There's some effort at specialization from the build queues but most of that is wasted because the AI insists on running on global economy settings.
I'd suggest killing two birds with one stone: Implement planetary governors. If done right both the human player and the AI could use them, and this would simultaneously solve the problems of micro-management and poor AI economy.
However, the "done right" part is the crucial thing. Here the key is to notice that simple really is better. A planetary governor, as its name suggests, needs only to think about his singular planet and he needs have no other goal than "maximize target within set limits". In fact, he should never think about anything else than that one planet and how to optimize it for a given target. He shouldn't even think about build orders leaving that part to the player whether human or AI. The governor gets a "mostly ready" colony handed over to him and his one and only concern after that should be: "maximize target within set limits"
The basic principle is thus quite simple:
- The human or AI player builds a colony up to some level he thinks is "sufficient for now" and sets specialization target (manufacturing, research, economy, people, influence) for that particular world as well as putting the social/military slider to a level the governor will use as the "normal" level.
- The planetary governor would then each turn adjust the production wheel, social/military slider, and project so that it maximizes the specialization target output.
The output is a smooth continuous function of the wheel setting, and usually with just one peak, meaning that the max optimization can be found with simply just moving towards increasing value provided you try it with all available projects (if the build queue is empty). The projects are needed because in some situations "max production + project" gives a better result than "max wheel setting". The limit to the max optimization comes from the social/military slider's "normal" setting (from the player or upper-level AI) but the governor is allowed to shift it if production (whether planetary or yard) is overflowing a "built in 1 turn" situation.
It's simple and brutal but would be vastly more effective than the current AI planetary setup plus it would also eliminate about 95% of micro-management that the human player currently does in the "Govern Planet" screen.