He has to have a legitimate reason for patting you down.He can't do a full search but can a pat for weapons.
He can stop them and ask question in while conducting an investigation. If the person stopped refuses to answer questions and/or cooperate in that investigation, that person is likely to become a suspect, and the police can hold them for a period of time while they investigate further.
But, I agree that they cannot be searched other than a pat down for weapons (SCOTUS ruled it was not unreasonable to pat for weapons for the safety of all involved).
A huge majority of these police shoot/brutality issue start with the belief that police do not have the authority to stop people and investigate, LIKE WE AS A SOCIETY HAVE ASKED THEM TO DO.
But I ask you the same question--fuck tha police and we all protect ourselves?
What's it gonna be?
I am good either way.