You ask an AI to refactor a module. At what point should the AI invoke the relevant refactoring skill?