Add Spec library
state machine