Things that worked for us (or at least seemed to work, maybe it was just a stage that she would have gotten through in any case) were:
1. When DD was having trouble following directions from DH, that meant DH needed to put in a lot more one-on-one play time with her, just having fun together.
2. I tried my hardest to avoid the negative, e.g., avoiding just telling her to stop doing something (like, "Water belongs in the tub). It worked better to try to join in the flow, redirecting the activity ("Let's squirt the water on the walls!") or changing the direction completely ("I'll blow some bubbles for you in the tub").
3. I tried to be playful. With the pebbles in the shirt thing, for example, I would say, "You can't catch me!" and we'd end up in a game of chase. If I was too tired for that and there weren't other kids around, I'd hand up piles of pebbles for her to let roll down the slide (she sat at the top).
I think at this age its more important that power struggles are avoided rather than the child learning to "obey." I also think its better to put your energy into a joyful, harmonious relationship than establishing control. At age 4, DD can better understand the reason for rules, and its a lot easier to explain why something isn't a good idea than it was to try to get her to stop before she understood the reasons.
If she simply couldn't do something or be redirected at that age and I found myself having to resort to threats or punishment, we would avoid that particular activity. An example would be walking on the busy sidewalks in our town. DD just couldn't do it at 3, so rather than try to teach her how to walk safely downtown, we didn't walk downtown.