a)should have PP carries the idea of reproach or regret about an event that did not happen
you should have opened the window
b)should have PP in structures that express astonishment, irritation about a fact that happened in the past
It's wonderful that you should have thought of me for the job !
should have PP used for supposition upon an event that is positively expected
She should have recovered by now
could have pp used for an event which did not happen -an opportunity that was not taken . The speaker had the ability or the opportunity to do something but did not ( there are some flavour of regret or reproach)
I could have been a doctor
She could have bought a car!