I had an idea of generating random missions by:
Generating a goal(fetch a flag), adding some preconditions (you cannot step on a flower), adding some world state (bunnies are hyper aggressive), and then perhaps adding additional segments to the quest.