@wc_sumpton I considered having spy rules but I decided not to do so for the following reasons.
It would add considerable complexity to the XML.
The AI would have no idea what to do with spies and would take random user actions.
The one time I actually played this over the board, each player immediately countered whatever the enemy spy was doing.
Given that, I just made everything random, so the human and AI players need to adapt to the changing environment.
Feel free to take my mod and make your own mod from it.