Robert,
The Performance Standards of the TRCC (Texas Residential Construction Commission) are only applicable in Texas but here is what it has to say about the matter.
"RULE §304.11 Performance Standards for Framing
...(2) Walls shall be level, plumb and square to all adjoining openings or other walls within 3/8 of an inch in any 32-inch measurement. If a wall does not meet the standard stated in this paragraph, the builder shall take such action as is necessary to bring the variance within the standard."
and also regarding doors...
"RULE §304.18 Performance Standards for Doors and Windows
...(8) When a door is placed in an open position, it shall remain in the position it was placed, unless the movement is caused by airflow. If a door fails to perform in accordance with the standard stated in this paragraph, the builder shall take such action as is necessary to bring the variance within the standard."