directly generate rules and parts