In short, if you ask a liar to tell you his story backwards, the extra effort and mental stress of having to reverse the order of events makes it much easier to tell from the usual 'tells' if the person is a liar. (Kind of like getting a drunk to say the alphabet backwards)I think this is a great tool against the yetzer hara, the trickiest of liars, especially in cases where we feel desires to do very holy things that actually are originating with the yetzer hara and not from a good place. [see Mystical Paths for a recent post on the topic]
Anyways, I bet if we reverse the desire, the situation becomes more straightforward. We can ask "Let's say I wanted to not do this, is it still appropriate to do it?" For example, if I were about to be late to say minha, but I was in the middle of writing a dvar Torah, is it my yetzer hara telling me I can take another couple of minutes to finish this up and then get to minha a little late, or is it my yetzer tov telling me that I'm involved in a mitzwah and should pass by it for another mitzwah? What if I didn't want to write the dvar Torah right then? would it be any question at all? No. Great. Now I know it isn't my yetzer tov.
The caveat: never trust yourself, there's no foolproof way to outwit the yetzer hara. Pray a lot for help in the battle.