Either wrap will work, in front of-or behind the foam board, because of the stucco. If a normal wall, H.W. behind the foam helps protect it from construction damage of the cladding (siding) installation, secondary; it helps keep it from billowing due to pressure differences in/out-side the cavity. pp. 5; http://www.buildingscience.com/docum...ding-enclosure
Some stucco has a broom finish that could direct any moisture to drain at a window/door, but with the foam over the stucco, highly unlikely --unless a major flying projectile (piece of another house) in a high wind area. Then you would other things more important to worry/be concerned about. Use regular Tyvek outside the f.b. My previous post was presuming the stucco leaked
in the first place, hence the precautions.
My question as to how thick the foam, depends on the Zone you live in, NY has 3 Zones, find the closest city below the map in the State listings; http://publicecodes.cyberregs.com/ic..._11_par002.htm
Then you know the minimum thickness foam board for your weather, based on that Zone; http://www.buildingscience.com/docum...r-requirements
More on foam and joints opening-up, click on pics at the bottom; http://www.greenbuildingadvisor.com/...istive-barrier
How are you integrating the window head flashing?
P.S. You are not being dense, I didn't know it till I learned it also! LOL