How to flash a window when using insulating boards with air barrier included?
You got it. Just install a piece of housewrap over your window, going past the window, maybe 4"+. Then seal thw housewrap to your foamboard using housewrap tape, or flashing tape. 

Then, refer back your drawing there and cut as necessary. 

Remember, you can hide all bad cuts with the tape.

Alternately, just flash the entire window frame in wide flashing tape and walk away. A tiny bit more expensive, but much better job.

Good luck with your project.