>
Size the floor opening your stair passes through so headroom is maintained all the way up.
The opening in the upper floor must be long enough that a climber clears the floor edge with full headroom, and wide enough to frame the stair with a small allowance each side.
Long enough to maintain the code headroom (80 inches under the IRC) as the climber passes the floor edge, and about 1 inch wider than the stair on each side for framing.
The framed hole in the upper floor that the staircase rises through, sized before finishes.
A short opening pinches headroom at the top of the flight. Lengthen the opening or reduce the stair pitch.