As promised now some suggestions on how shading for sidar can be programmed so it works for AI and makes sense gameplaywise (at least i think it could work that way having no knowledge of modding myself.):
1st: If it doesn't create to much recources slowdown restrict the Wane spell to be usable only in cities.
That whould prevent AI shading their Units in the field without any clue how to settle them and exposing them to be killed on their way back to a city (don't know if it has a clue but even if it whould be easier for AI if Wane whould just be usable in cities with the possibility to settle on the spot.).
Also that whould be no real nerf for the spell itself / perhaps even help new players to cope or not accidently cast Wane.
Secondly Sidar should spam cheap units on start (Warriors are always nice) to ramp up enough XP to attain Level 6(a shade is so much better than most buildings buildable at the start that bothering with them is a waste until at least some shades are gained. Excluded are buildings which offer a cheap specialist or percentage bonuses). If Level 6 is attained those units should be given an AI to send them home to a city in need a free greath specialist / a nearby city (depending on the situation if possible somehow).
Because of so many throwaway units they shouldn't bother with odds to much until those units are at least Level 4/5. 35%-50% are fine odds for fresh troops (Level 1 and 2 + to a lesser extent Level 3) yielding tons of xp in case of sucessful battle. Level 4 Units should be a bit more hesitant with odds above 75%/80% beeing allright while units of Level 5 should be treasured and not fight unless odds are at least 90% maybe even as good as 95% (with those units beeing so close to shading it whould be a real waste to lose them. Those 2 or 3 battles needed can wait and will occur).
Its allright if only roughly one third of those cheap fodder reaches shade-level. Even one fourth might be a very solid quota.
As an additional option it might be wise to have Level 4/5 Units roam Sidar territory to hunt for the remaining xp neccesary because of proximity to a city to shade (lower chance of the unit beeing picked off on its way home) as well as utilizing the homeland promotion to its fullest which further helps finding battles with good odds to ramp up the last xp needed for Level 6. Fresh units can go out hunting for the xp needed to attain level 4 and above. Because for them average odds at times are more desirable then good odds all the time.
(So one AI for fresh troops on the hunt which should run around in chunks of units so wounded oponents from lost battles can be finished for at least some xp and another one for experienced ones on homeland defense duty which should still not walk alone if possible but needn't to go around in stacks of 3+/4+ Units to really work best.)
Because of tier 1 and early tier 2 units getting much more xp from fights albeit with worse chances to win Sidar should continue to build larger chunks of low tier units then usual for a longer timeframe (depending on the lowest time to produce one unit. With the most powerful unit beeing able to be produced in one turn in a given city beeing the optimum. No need to spam warriors / scouts when rangers / horse archers or war charriots take the same fast time to build.

) and keep high tier units (especially tier 4) for the battlefield mostly.
That spam of cheap units shouldn't! repalce the building of a regular military but rather replace part of the standart building routine. (so that the heap of low tier Units comes in addition to the usual Tier late 2 / early tier 3 army for wars).
With shades beeing more valuable than most economic buildings (bar those with percentage bonuses to gold and science mostly and unit enablers.) and beeing viable as a direct replacement of said buildings.
Units with Level 8 / 9 (with level 8 seeming a most reasonable limit to me) or above should not be set to walk to a city and shade but switch back to another AI since they are more valuable in the field / for upgrading to higher-tier units usually. So the slayers of Orthus and Acheron shouldn't shade with them beeing more valuable in the field.
So that there is a corridor of 2 / 3 Levels where a given unit is in shade-mode and tries to reach home to go for immortality. Tier 3 + units should perhaps have that corridor reduced to just Level 6. With them beeing rather powerful within that margins of experience allready.
In times of war units on campaign (like in oposing territory or on their way to invasion) shouldn't be set to shade until the war with said party is finished so they are not sent home / vanish when they are most badly needed.
The same goes for units that are on city-defense duty especially in times of war or if the city is sparsely defended (perhaps with the unit beeing the only defender).
Shades with channeling 1 / 2 / 3 should still opt to shade at times but set not settle (beeing additional national units a strength of the sidar is to have "additional" slots of national spellcasters of the divine and arcane lot) unless there are more then 2 / 3 shades around allready (2 beeing the safe option that should not create big issues even if AI gets messy but 3 should still work even if perhaps it might create some issues with odd AI plans) shades in which case the shade with the lowest chanelling / ammount of promotions / levels should settle first.
Also if the sidar have religious heroes and are about to change / lose the hero thereby they should send their hero to a city and shade him instead of losing / having him abandon the sidar (if enough XP are available to do so). Chances are said unit has channeling and is kept as a shade. Which is a stong way to play imo.
Regarding settling: it should be done via specialisation if possible.
With capital under god king or cities with other good gold bonusses beeing a good place for greath merchants (also when unit upkeep is high a greath merchant in the right city can be a godsend. Also enhances the limit for said city to grow further / run additional specialists thanks to one free food.).
Cities with academies and other buildings boosting science are good places to settle a greath scientist.
Because of the very solid and balanced yield from greath engineers for sidar (4 Hammers 3 Science) those can be put anywhere and some of these should be part of the mix whenever possible and early.
New cities are very nice spots for 1 greath bard
(popping said city to 500 culture in a very short time and utilizing the fat cross instantly which 1.) replaces obelisks which saves a lot of time which can be better used to produce more fodder for shading and other interesting things 2.) enhances the cities defense quite considerably, 3.) largely enhances your territory / homeland for your experienced units to roam and very importantly: 4) also offers a considerable income (3 base gold equals a free market without the negative science and build-time) offsetting a good chunk of city upkeep + helps with unit upkeep).)
More then one is only needed in times of culture war or if a cultural victory is an aim (in which case the bards should replace merchants for upkeep and be strongly prioritised. As should be culture boosting buildings / civics + the Theatre of Dreams and the lyre as well as the overcouncil because of early acess to liberty.)
Thanks to that easy and early and constant acess to large ammounts of culture as well as some good income to offset upkeep sidar should rather scatter their cities instead of packing them closely with a 3 tile resource consideration (so they could use kuoritate city-placement once that one is written.

With the fat cross beeing not such a big deal for them anyways thanks to the many specialists.)
Also Sidar should focus on getting techs, building wonders and adopting civics which grant free XP in the beginning (with global effects on all units to be prefered but taking other opportunities along the way should the option present itself).
So a techpath / flavor setting more or less beelining Military Strategy might be a good idea (with agriculture, apprenticeship, god king, conquest, form of the Titan and a command post to fetch as well as axemen + copper weapons which are really good for them especially combined with lots of starting XP and enchant weapons + courage on KotE which should be taken early as well). Seems as one of the best tech paths available to them at the start (with the greath commander beeing set to be settled as a command post in a city with solid production / presumably the capital)
That makes getting shades much easier (with 8 free XP upon building if all early sources of free xp can be attained.)
(with writing for libraries the greath library + Horseback riding for animal subdual as well as high-withdrawl cavalry beeing other quite powerful options at the beginning of the game. All depending on resources and the situation in game.)
After that Poisons, Priesthood, Religion and especially Warhorses (for ride of the nine kings which must be one of the most powerful wonders for sidar) are very interesting options depending on situation in game and options.
Theocracy might not be an early option but its still nice and provides unlimited priest slots for getting some greath prophets which can build the altar which yields nice additional free XP to get shades fast. (hence despite sidar having no unusual bonus from priests unlike any other specialist those are still worth getting, with the altar providing enough of a bonus to those to make them worth the effort.)
If possible different cities should be set up for beeing centers of production for mounted (ride of the nine kings, best with a command post and shrine of the champion as well in my experience), recon (Nox Nocturnis, Aneron's Bounty) and divine (Altar of the Luonotar, Deis Dei) units so the free XP is used as good as possible. Putting all of those in one city whould be a waste of sorts.
Wonders which boost specialist yield (Theatre of Dreams, Guild of Hammers and the Greath Library) beeing other good wonders to somewhat prioritize. Since said Wonders will help a Sidar much more than the usual civs thanks to the abundance of specialists in Sidar cities, normal and greath.
Hope that helps a bit with providing my favorite civ with a solid AI at least regarding the shading part.