Some examples of recent and older CSV rules files, working and otherwise, which should give some ideas. http://hledger.org/manual.html#csv-format describes the format.