Hi,
The X-Plane .afl file format is not protected by any patents or legal protection that requires a license - you are free to write code that reads and writes .afl files.
The .afl file is "proprietary" to X-plane _in that_ it is a format specific to X-plane, defined and controlled by LR for the purpose of X-Plane. Therefore it is appropriate for you to read and write .afl files for import/export purposes, but it is a _bad_ idea to use it as your own internal file format, as any "extensions" you define to .afl will not be supported by X-Plane, resulting in massive incompatibility.
I do not think we have any file spec for the format.
I hope that answered your question!