Classic WoW Spec Detection

Would using the amount of incoming damage or damage taken help at all? Or maybe be used as an additional deciding factor? Amount of healing taken?

I’m only really familiar with Druids, but as Zolvolt suggested, tracking the different roles based on time spent in a specific form might be the quickest way of differentiating between them. That could pose a problem if you have an off-tank that swaps to cat form or caster form once their target is dead, though.

Otherwise, bears will primarily use Maul, Swipe, Faerie Fire Feral, and, when possible, Growl.

One potential problem with #3 is that warriors use more non-traditional specs now like Fury/Prot and dual wield Fury/Prot for tanking. So relying on a threshold of shield-requiring abilities might not work very well.