Oh, very interesting.
Have you, by any chance, looked at OpenBadges? It’s a great (technical) specification of a distributed and federated Badge-System created by Mozilla. The specs looks highly complicated though it is actually quite simple, but it makes some major remarks on the structure a badge-system needs to have (Issuer, Owner and “wallet”) and makes one focus on the really important question: Who’s issue Badges and for what? Is it automatic? On what grounds?
We were looking into how to do badges at OpenTechSchool, too. And found that is the actual issue one should be thinking about – because technically badges are trivial. And we found the way that P2Pu does badges, is by far the best (it is implemented on top of OpenBadges): you can submit a project to receive a badge and a peer reviews it. If the reviewer says, this proves you have the skills the Badge describes, you get awarded that badge. Which is a very great process and they have a great tool set developed for there.
Raising the question though: which part of the implementation do you want Discourse to be for? The simplest case would be to just display badges a user has at a third-party (similar like Gravatar works), another would be to have discourse also be the Wallet, where users can store their Badges and a third would be to also have Discourse be the Issuer/host of Badges. But the last one is also - use case and user experience-wise - the hardest to think of and get right.
Or short, yeah, I’d love to discuss with you, how to support badges in Discourse!