Patrol Operations and Vehicle Stops
The stop has three phases
Vehicle in motion, personal contact, and the decision to act. Your legal justification must exist at the instant of the seizure, so note the violation before you hit the blue lights. Whren v. United States holds that an officer's subjective motive does not invalidate a stop supported by an observed violation; Michigan v. Sitz permits properly run checkpoints using neutral, programmatic criteria.
Control of the encounter
Pennsylvania v. Mimms lets you order the driver out of the car, and Maryland v. Wilson extends that to passengers - no extra justification needed. But Rodriguez v. United States holds the stop ends when the traffic mission is complete; a dog sniff, unrelated questioning, or a request to search cannot extend the stop without independent reasonable suspicion. Consent must come from someone with authority, and a passenger's consent does not reach the driver's belongings.
Approach discipline
Park offset to protect the lane, angle your vehicle, use the spotlight at the mirror, approach along the passenger side when the roadside is dangerous, watch hands before faces, and run the plate and license before stepping out so you know whether you are dealing with a stolen car or a wanted person. On a high-risk or felony stop, wait for backup, stay at cover, designate one officer to give commands, and treat the vehicle as a threat until every occupant is out and controlled.
Traps
Believing a pretextual stop is unlawful; assuming a stop can be stretched to "look for drugs"; assuming the frisk of a vehicle follows automatically from a frisk of the driver; forgetting that a passenger may be ordered out but cannot be required to identify absent separate grounds.
Rule of thumb
Your stop justification is frozen at the moment of seizure. Write the violation, the indicator, or the broadcast that put you behind that car before you get out.