Add state machine doc and gitignore.