The non-structural requirements are pretty simple for guard rails: if there's a fall hazard, make a guard, and keep it such that it will actually stop people from falling.
How to install pan flashing and jamb flashing on a window opening in a wall that will be thickened with 4 inches of foam—using regular, non-stretch peel-and-stick flashing tape.