What the barrier and flashing establish
The weather-resistive barrier (WRB) is a sheet material, most often house wrap or building paper, applied over the wall sheathing before the siding, stucco or brick. Flashing around each window and door ties that barrier to the opening so water running down the wall is directed out, not in. Installed correctly, they establish a drainage plane: a surface behind the cladding that sheds whatever water gets past the outer layer. The International Code Council's technical note on rain management describes drainage and flashing as the key to controlling rain intrusion, and it notes that most common barrier products, such as #15 asphalt felt, Grade D building paper and most house wraps, are vapor-permeable so walls can dry.
The principle is shingling: every layer laps over the one below it, the way roof shingles do, so water always flows onto the outside face of the next layer.
How a window should be integrated
A typical sequence starts with a sill pan or sill flashing at the bottom of the rough opening, sloped or turned up at the back. Side flashing goes over the pan's ends. The window is set, and its nailing flange is lapped correctly: the side flanges over the side flashing, and a head flashing over the top flange, with the house wrap above folded down over the head flashing. Manufacturer instructions govern the details, and the window warranty may depend on them.
The single most common error reverses the top lap: house wrap tucked under the head flashing instead of over it. Water running down the wall is then guided behind the flashing and into the opening. The window can pass a visual inspection and still leak from the first storm.
The safety part: escape openings and glazing
This stage also sets two safety features that stay visible. Under Section R310 of the International Residential Code (IRC), every sleeping room needs at least one operable emergency escape and rescue opening with a net clear opening of at least 5.7 square feet, subject to height and width minimums and a maximum sill height above the floor. And glass in hazardous locations, such as next to doors, in tub and shower enclosures and near stairs, must be safety glazing, marked with a permanent label in a corner of the pane. Both can be checked at any time after completion.
Who checks it
In most jurisdictions no code inspector looks specifically at the house wrap and window flashing. Some areas add a WRB or sheathing inspection, but it is not part of the model inspection list. That leaves the work to the framing, window and siding crews and the builder's superintendent. A private inspection between dry-in and cladding is the only time an outside party can see it.
What gets hidden
On a brick house, the WRB and the window flashing sit behind the brick veneer and its air space. On a siding or stucco house, they are directly behind the cladding. Either way they are concealed for the life of the wall. Problems show up as effects: stains or swelling below window corners, damp drywall, or paint failure on interior sills.
Common mistakes
Reverse laps at the head flashing, torn wrap left unrepaired, missing sill pans, tape applied over dusty or wet surfaces, and gaps where the wrap stops short of the foundation or the roofline are the familiar list. So are penetrations, such as hose bibs, dryer vents and electrical boxes, cut through the wrap with nothing sealing them back in.
Where the rules come from
The International Code Council's rain and groundwater management note describes water-resistive barriers and flashing. The 5.7-square-foot escape opening is summarized on code handouts such as Warren County, Kentucky's slab-on-grade cross-section.