Below is the CALIFORNIA BUILDING CODE requirements regarding alterations and repairs of the existing structures. I remember either ASCE or IBC has the similar requirements.
3405A.1 General
Buildings and structures, and parts thereof, shall be repaired in compliance with Section 3405A and 3401A.2. Work on nondamaged components that is necessary for the required repair of damaged components shall be considered part of the repair and shall not be subject to the requirements for alterations in this chapter. Routine maintenance required by Section 3401A.2, ordinary repairs exempt from permit in accordance with Section 105.2, and abatement of wear due to normal service conditions shall not be subject to the requirements for repairs in this section.
3405A.3 Substantial Structural Damage to Gravity Load- Carrying Components
Gravity load-carrying components that have sustained substantial structural damage shall be rehabilitated to comply with the applicable provisions of this code for dead and live loads. Snow loads shall be considered if the substantial structural damage was caused by or related to snow load effects. Existing gravity load-carrying structural elements shall be permitted to be designed for live loads approved prior to the damage. If the approved live load is less than that required by Section 1607A, the area designed for the nonconforming live load shall be posted with placards of approved design, indicating the approved live load. Nondamaged gravity load-carrying components that receive dead, live or snow loads from rehabilitated components shall also be rehabilitated or shown to have the capacity to carry the design loads of the rehabilitation design. New structural members and connections required by this rehabilitation design shall comply with the detailing provisions of this code for new buildings of similar structure, purpose and location.
3405A.4 Less Than Substantial Structural Damage
For damage less than substantial structural damage, repairs shall be allowed that restore the building to its pre-damage state. New structural members and connections used for this repair shall comply with the detailing provisions of this code for new buildings of similar structure, purpose and location.