Refactor project of task to rule