At the moment, {{GRAMMAR}} can be said to take two parameters: the name of the rule, and the word to transform.
The problem with this is that sometimes the string that comes in as a parameter is not exactly the same string that should be transformed. An example of this is when the string that comes in is a link, which is always in the form [[title]], and the square brackets get in the way of analyzing the first and the last characters of the title. Something like {{GRAMMAR:rule|$1|[[$1|{{GRAMMARRESULT}}]]}} could be more appropriate in such cases.
This is just a report to float the existence of the problem; as you can see, I haven't thought the whole syntax through yet ;)