I can do it for phonology, so maybe you can figure out the syntax side differences. Rather than saying what you do, you say what you don't do. A lot of languages have a rule devoicing obstruents at the end of the word, and the standard rule-based account of that is to say that there is a rule making a word-final obstruent voiceless. The OT approach is to say that there is a list of bad things, so having a word-final voiced obstruent is a bad thing. But, changing things is bad, so you have to say that hatred of final voiced obstruents is more important than hatred of changing things. There are a lot of things that you could do to avoid having final voiced obstruents, for example you could insert a vowel. But that involves a specific kind of "changing things", so if you devoice obstruents rather than inserting a vowel, that means the hatred of vowel insertion is creater than the hatred of devoicing. And so on... there is a long list of possible things you can do (changes between the input and the output) and all changes are bad, to different degrees. And there is also a long list of surface states that you're supposed to avoid, like final obstruents, intervocalic stops, mid vowels, high vowels, and so on. Once you have the correct ordering of all of these principles, there's a conmputation which you can perform that tells you that out of all of the logically possible outputs, only a certain one (the actual one, in that language) is the survivor, since every other possible output has already been ruled out because it results in a greater violation of some more important constraint.
In phonology, we have it easy, because we understand what an "input" is -- it's just an underlying form, whatever the morphology and syntax provides. I totally do not understand how the concept of "input" works in syntactic OT.
Just to clarify, are you talking about the phonological alternation in the pronunciation of the definite article before "sun" letters vs. "moon" letters? That is fairly straight-forward phonology.