Poor-quality code from a teammate is a coaching problem first, not a blame problem. My approach is calm, specific, and early: diagnose the cause, give kind concrete feedback privately, set clear standards, support them in improving, and only escalate if nothing changes. The goal is growth, not a paper trail.
