Firstly, I don't know if these are properly working (if the implementation was even completed), but scroll down a bit further on
XML/Commands and there's the description. But to quote:
A GAE only alternative method of specifying the attack skill, this allows the attacks to be chosen based on the target. This uses a system of flags such as <whenever-possible /> or <at-max-range /> to specify circumstances in which to choose different skills. This is read from the top down (so the first one will be followed if the tag evaluates as true, even if the second one does too) and allows the AI to, for example, use a long ranged bow when the foe is far away, but otherwise use a short ranged sword.
Possible flags are: <whenever-possible />, <at-max-range />, <on-large />, <on-building />, and <when-damaged />. The attack-skill value is the attack skill to use when that flag is active. There can be multiple flags per attack-skill.
I never tested them myself, but they were on a page created by daniel some time back and was written as though they were implemented (I didn't record the ones that were stated as "not implemented", namely the undead flag -- which would be better done with tags anyway).