Hi, we're planning to implement such a feature in our opsoro client. If you'd like to contribute such a feature there are the following steps:
define a rating content model (Perhaps there is somewhere an existing content model)
write two webscript, one to add a rating and another one to get current avg. rating of a document. Perhaps the getAvgRating-Script should have two ftl-templates. JSON for opsoro and html for integrating the script in the normal webclient.
Have you looked at the Alfresco tutorials by Jeff Potts? In one of them (I think this one) he develops a document rating system to explain web scripts.