Is the file format for the .lyx files published anywhere? We might want to do our own automatic generation and manipulation of LyX files - so far I've just been going by the examples I can generate and that's gone fairly well, but if we someday want to implement a better parser it would probably be nicer to build up a proper specification from a friendly document instead of just looking through the source, especially with regard to hints as to what might change!
-- Mark