I don't have AI stuff, but I recommend making some sort of design flowchart detailing what the AI should do and when it should do it.