improve prompt and scm detection