Sort:  

the dog alerted at the door, when she sat, that's why he patted her and said "good girl"

No the dog sat down at the door waiting to go inside. He was waging his tail because he could smell Adams dog.