What provoked you?
I read somewhere the advice to give kids a bit of advance warning when you want them to do things. They need a little time to adjust to having to stop playing and come and eat, or finish up what they're doing because it's time for bed etc. So I'd say "It's nearly time for bed, so you can play for a little bit more then we have to tidy up and get ready for bed".
The other main bit of advice I took on, was to let them know you are about to get annoyed. Advance warning again. So you say something maybe twice "come on, it's time for your bath now". Then you say "it's time for your bath, if I have to tell you again, I'll start to get annoyed/feel angry". After that, mine would RUN to do whatever it was, every time.
A couple of times, she'd ask "are you angry already mummy?" and I'd say, "no, not yet but I will get angry if I need to tell you again." Worked like magic for us. I've never had to shout at her to do anything or punish her for not doing anything. Thing is though, you have to speak loudly and clearly but with a nice friendly voice. If you sound annoyed or angry already when you're saying it, there's no incentive for the child to do what you're saying.
Another little trick I use is to let them bargain a bit. I quite like it when they make an attempt (can I have 3 not 1?), so I'll make a great show of considering it and then tell dd I think that sounds reasonable. Let them think they have something to say, just a little hint of power where it isn't important. Then they don't feel as much urge to fight you all the time.