I was reading someone else's post on comparing some of the wsp building tools when someone stated you could reverse engineer something like a .stp file created site into source files (for example the fab-40 application templates). I would really like to know how to do this as there are a few of the templates that are like 80% of what I need to build a solution. I think it would have been awesome had MS released the source files for all 40 of the templates!
There's a component in WSeWSS called Solution Generator which may get you there with this. If I remember correctly you point it at an actual site (URL), and it tries to do the reverse engineering for you. Note that MS never claimed it offered "full fidelity", but it may help you get most of the bits to take further.
Jeremy Thake's SPSource tool could also help you here - it does similar reverse engineering. Suggest checking it out.