The specs can be found at https://www.freedesktop.org/software/appstream/docs/
Relevant are:
``
2.1. Generic Component
2.2. Desktop Applications
``
It can be validated with
```
LANG=CC appstream-util validate-strict build/resources/0ad.appdata.xml
```
or probably better
```
appstreamcli validate build/resources/0ad.appdata.xml
```
The appstream version used is very crucial, as I tested with three versions and all of them complain about different things.
I'm not sure about the `id` and `launchable` tag and the filename of the desktop file.