Dynamic Integration between AI and Labor - A coordination framework for AI and human specialists making decisions together within state machines