It’s not so much the paths that have diffuse or specular properties. It’s a property of the surfaces that the paths touch.
Have you considered what you want to output when a diffuse surface reflects in a specular surface or when a specular reflection refracts on a diffuse surface?
Since these things are intertwined I’m afraid it may not be as easy as rendering diffuse and specular to different buffers and adding them up afterwards.
What I imagine you could do is create two output buffers and based upon the first surface a path hits (depending on it being shaded diffurse or specular), have that whole path render to one of the two buffers, irrespective of the surfaces hit after that first bounce. However I’m not sure if that will give the result that you have in mind, since it will make the distintion based on the surface/object hit and not on a light effect.
Caustics especially are going to be hard. In a path tracer caustics are not a concept within the code. They aren’t added in separately, as they would be in a rasteriser, they just ‘happen’ as an effect of how light and geometry interact (as in the real world). Since each path is treated separately, there is no way for it to know that its light is contributing to a concentration of light that we humans experience as something that we call a caustic.
I must note that I have been working with path tracers for only a year. I’d be interested to know if anyone can correct or support what I’ve said above.
Let me close with a question: what is the effect that you would like to achieve by dissecting light?
Have a merry Christmas. :)