Move command generator to rules namespace