Generate rig produces a "bugged" controller
I looked into your file and noticed the problem. I looked to the knee of the metarig and it looks like your knee is facing backwards. You can see that because the pole is backwards. I posted several pics explaining this. That is why the IK is snapping weirdly when rotating the foot. I removed the rig and generated a new one using your metarig and it seems to have fixed the snapping issue. But there are several other issues with this rig.

While I'm a it, I would suggest you to move the kneecaps a bit to the front, so you're knees won't bend to the back when lifting the IK Foot.


Hope this helps!