However, future modders should not confuse building flavors to event flavors. Event Flavors magnify stronger decision-making to their respective event choices than buildings.
Even in vanilla version of the game, building flavors did not actually stop the AI from building something. You can easily test this by saying settlers are a -9999999999999999 to your heart's desire to every flavor and the AI will still build settlers if it NEEDS to expand.
Flavors only act as encouragement and discouragement. If you want to add flavor to how the AI want to train. Take a look at what they already train. If an Archer has a flavor of defense and the AI actually wants to go on a grand defensive strategy, it will spam archers. If you want to add an "elite" unit with a much higher flavor at the same time that Archer is unlocked, it will also spam this elite unit. However, it also takes into consideration of the production cost as well. If this elite unit cost 300 hammers, but the archer cost 50 hammer despite the elite's defense flavor is 1000 compared to an archer's defense flavor of 5. It will nevertheless build the archer if it needs defense asap. However when variables like hammer cost are of little concern to an AI's city such as that it can train elite and archer in 1 turn or it does not need to build a defense now, but can build it later. It will train the elite unit. (It also does advanced calculations to decide when to train this elite unit or archer, but this example is a simplification)
Basically, flavors to AI are what suggestions are to humans. Let's say you're a dude that loves your Mongolian horde. You would spam cavalry no matter what. The game even suggests hey you are lacking in ranged units why don't you build some? Even against a horde of spearmen, you decide you would rather overflank them and overwhelm them with your superior tactics. This is what your "grand strategy" is to the AI grand strategy.