Entity classes, key fields, inputs, and outputs are defined in the game in a way that can be gathered programmatically. This could be used to find at least some definitions that are missing from an FGD file, or find FGD definitions not actually present in game. This could unfortunately not be used to generate the entire FGD, as some things would still require manual effort (spawnflags, and all entity/field descriptions, to name a few).