Now generates template rules