I am a graduate of the New York City Police Academy, spending about 8 months in that puzzling place of hell so I will tell you what NYPD recruits are taught about stop, question, and frisk. At least what they were taught 13 years ago.
First of all, it was emphasized that it is really "stop, question, and possibly frisk". A frisk is not automatic.
A police officer within his geographical area of employment, may stop and question someone when he has reasonable suspicion that the subject has committed or is about to commit a felony or Penal Law misdemeanor. I won't get into reasonable suspicion - you can look it up.
A frisk is not a search - it is a pat down of the outer-most clothing for officer and bystander safety and it is specifically for the purpose of finding weapons - NOT contraband. A frisk is not automatic when stopping someone. Generally if the crime involved is a violent one (burglary, robbery, assault, etc) then a frisk can pretty much be conducted without articulating any particular reason. Otherwise there must be a clear reason.
For instance, if I see a bulge under the subject's shirt which resembles a pistol, I certainly have the right to frisk that area. Or if I stop someone who, say, is wearing an empty holster it would be fair to assume that they may have removed pistol or revolver from the holster and placed it somewhere else on their person to try to avoid detection. I'd be justified in frisking the entire person.
If I have legitimate reason for the frisk, and during the course of the frisk I feel something soft that I think might be drugs, I cannot remove that object from the person to examine it unless I can articulate a pretty strong reason that I KNEW what it was based on the feel. Otherwise, I move on - a soft object is obviously not a weapon - and that is the point of a frisk.
Other than the above, I am not aware of any "policy" that the NYPD has on the subject, other than to prepare a "UF-250" (Stop Question and Frisk Report) each time someone is stopped for investigation.
Like with many things with the NYPD they shoot themselves in the foot. Officers are pushed for numbers. What those numbers are usually varies by precinct and even squad. Officers are required to have a certain number of arrests per month or per quarter. Officers are required to write a number of certain types of summonses each month. By "required" I'm referring to what most would consider a "quota" although it's not referred to as that and these "numbers" are not in writing anywhere.They are often referred to as "performance goals". Often included in those "goals" are a certain number of UF-250's.
The end result is that officers feel pressured to take enforcement action when none may be warranted, or where "justice" would best be served by issuing a warning.