Goal Factoring is a rationality technique for planning which proceeds by first identifying the underlying goals motivating one or more behaviors and then searching for alternative sets of behaviors that better accomplish the goals. 

For example, someone might refactor the two behaviors of going to the gym and browsing Facebook into the single behavior of play tennis with my friend which more efficiently and effectively accomplishes the underlying goals of have social interaction and get exercise.