The code for rapid fire autocast is already in there, you just have to enable it.
I'm not really for making Stampede auto cast, it's stupid to have your long cooldown abilities on auto, especially when you can just align them with trinkets+pot for more damage.
However you are welcome to modify the code to suit your own needs.