Evidently, during the "We're partners!" "NO, I'm your PARTNER, not SERVANT!" banter between Megs and Sentinel, SP was supposed to overthrow Megatron as leader (by literally throwing him off the building).
Going by the first two movies, Starscream is the #2 (he does quite a bit of troop commanding).
Soundwave takes orders directly from Megatron himself, but doesn't command any troops -- rather just his "pets" and human liaisons.
Shockwave seems to carry out certain missions he presumably specializes in (like Blackout, Barricade, Frenzy, and Devastator before him), but was relegated to basic grunt work in Chicago. The only one I see him having command over would be the Driller (again similar to Blackout and Barricade).
As far as I could tell, Barricade was just venting on the nearest Con about the whole prisoner escape thing, not really giving orders.
I'm not sure if there's any strict hierarchy going on. Decepticons seem willing to listen to anyone else around them (the Fallen, Megatron, Starscream, Soundwave, and Sentinel at least have all issued orders), so many of them have minions of their own, and commands don't come from any clear source.
"If you accidentally eat the prize that comes inside your cereal, does that make you
a specially marked box?"My Art Website -- Redbubble Shop