The man accused of stabbing a Livonia police officer inside the department’s lobby has been referred for a competency hearing.