Most states and townships have building codes that require means of egress on each floor sometimes including finished basements and attics.
Roof slope fire egress.
This means for every 12 horizontal units the roof must rise a minimum of 3 vertical units.
Paragraph 7 2 1 5 8 9 from nfpa 101 says that roof doors have to either allow free egress from the roof or be kept locked.
The occupant load number of dwelling units and common path of egress travel distance do not exceed the values in table 1006 3 2 1 or 1006 3 2 2.
Low or no slope roofs up to a 10 degree pitch can be installed without the need for any additional anchoring other than what is found in a flat roof system.
Roofs with slopes greater than 10 degrees and up to 30 degrees will require additional anchoring.
The minimum roof slope for metal roof panels depend on 3 different scenarios.
For example a fire escape is defined as a means of egress because it s a way for someone to exit a building in an emergency.
A single exit or access to a single exit shall be permitted from any story or occupied roof where one of the following conditions exists.
Lapped nonsoldered seam metal roofs without applied lap sealant must have a minimum roof slope of 3 12 25 slope.