Move rule files into category folders and add a build step to output each category as its own file.