Add documentation for writing rules in README