#2 add a script to automatically generate doc for rules.