Bake a rules builder

Generating the rules checker. Refs https://github.com/cakephp/cakephp/pull/5296
Yeah, that is not the best alternative we have