I wrote this at work today. I hope it makes sense but this is how I would 'like' the Sector AI to work as well as a couple of my thoughts.
You need to decide if Sector automation / Planet Automation is an accessibility option for new players and should function reasonably well and be a player aid that can be relied upon and not mess up, it doesnt need to be optimal or work strictly to a "meta" (I hate that word) but it needs to be of a reasonable standard.
If it's not and is just a function to bring down micromanagement of planets, then you seriously need to bring it to a even higher standard of function because people will expect that much more.
I think the below is a good base line to go off and isn't horribly complex.
Sector AI feedback :-
What I think it should do (high level).
Balanced Build slots
The core (primary) sector should default to Balanced but be changeable (With consideration that the first planet of the core sector, the initial Capitol you cannot specify a designation anyway)
Additional planets in this sector should also try to get a healthy start with Gene clinics, Robot Assembly and buildings to counter low happiness as their priority.
And this should apply for any further Balanced sectors.
Then prioritise the buildings slots based on the following
1) Is the empire at/over the limit of Empire Sprawl? Yes? Build Admin offices
2) If ^ No, Is the food/mineral/CG production negative or close to for two repeated months for the sector? Yes? If there already more than 3 districts of the value thats low(energy/min/food) build the speciality bonus EC/min/food building. If CG is low, look at using a slot for creating more. (Limited to 2 per planet, on a Balanced setting)
3) If Research output in sector is below <some calculated value that grows on 'current year'> (maybe a average derived from the galaxy, per sector everywhere) and there is not more than 2 existing Research buildings, build a research building.
3) Is there a surplus of Minerals (e.g. 200+ and above conditions are not met e.g. No), build alloy foundries upto a limit of 3 per planet (It is a balanced setting remember)
Remaining slots to be used by other buildings including speciality resources.
District usage
[Balanced]Sector AI should correctly allocate a planet if it is to be energy/min/food focussed based on number of slots, whichever has the max (or if there are two very high maxes), use them and ensure the building slot used matches the "speciality". (e.g. Mineral Purification plants). If the planet itself is "roughly balanced" in max district distribution, then no priority for any type.
---
Unlike Balanced, these 3 "specialisations" should focus on 'specific' building slots until the need is 'met' then return to normal buildings to improve growth of the planet and increase pop growth/robot build speeds.
[Production] Sector AI setting is bogusly named / described and if it is, as described - its open to be misinterpreted. Since districts are not at all exclusive to a planet being "Manufacturing" or Balanced. A planet with significant alloy manufacturing can also be a planet that has 12 Mining districts and produce a large amount.
You could opt to simply remove this as an option, or, just better explain that it will prioritise buildings that enhance production along with districts, before defaulting to more normal "balanced building.
[Research] Sector AI setting should build Research buildings as long as it does not put the sector at a resource deficit, again it should use a baseline galaxy average on sector values and unlike the Balanced setting, aim to remain X above that value. Whilst maintaining than use a 'Balanced' build queue.
[Manufacturing] Sector AI setting simply needs to maximise the production of Alloys, followed by lesser priority items like CG. This should look at the Sectors +/- of Minerals and stop if it will plunge the Sector into a negative monthly value.
CG buildings should be limited to e.g. 3 per planet even with this specialisation whilst maintaining a healthy % EC surplus per month. When not building either, build normal 'Balanced' buildings.
When not building these buildings, create speciality resource buildings as the next priority (that are naturally occurring), before then creating a surplus of the manufactured type buildings.
^^ That would be the template I'd look to work with. And then when dealing with unique empires such as Lithoids/Machines, they need to deviate from this and exclude certain checks/buildings.