Where is TaskPaper's file format defined?

The Getting Started section of the users guide does a good job of describing that for users.

Unfortunately if you are a developer trying to write a TaskPaper parser I don’t have a good formal definition. But I have open sourced TaskPaper’s model layer. That project will enable you to parse, process, and save TaskPaper files anywhere that you have access to JavaScript using the same code that TaskPaper uses.