Most of my work is in exterior remediation, both as a builder specializing in exterior work and (more and more these days) as a building consultant inspecting and advising owners and builders when moisture problems arise.
The through-wall flashing at the head and sill must be planned before the masons are even hired, and we have to be sure the masons follow our plans closely because getting the details wrong is a sure-fire path to water problems.
As Christine Williamson explains in a recent IG post, lots of builders confuse the cladding of a building with the building's water control layer, and, she surmises, this is the reason for a very common omission: Not installing through-wall flashing, the (usually) L-shaped piece of metal above an opening or at the base of a wall.
At the recent IIBEC 2020 Virtual International Convention and Trade Show, Jay H. Crandell, P.E. gave a presentation titled “Applying Recent Building and Energy Code Advancements for Durable and Energy-Efficient Building Enclosures".