Add documentation for writing a Record generator