Preprocessing and postprocessing of project files

Hello,

 

I would like to develop an application/plugin which is meant to preprocess project files before starting the project and postprocess them again after the  project has completed.

Could you suggest me the preferred architecture for such solution?

 

Regards,

Bartosz