The structural question
Charring that penetrates framing reduces its capacity; an engineer evaluates whether members can be sistered or must be replaced. Roof systems, floor systems and headers near the fire are the usual concerns. Heat can damage concrete foundations and masonry chimneys.
The smoke question
Smoke penetration that reaches every cavity, the attic and the crawl space is cleaned and sealed selectively up to the point where removal and replacement is cheaper. Older houses with layered finishes and plaster hold smoke in ways that tip the balance.
The code question
Repairs generally restore what was there; substantial reconstruction triggers current code for the rebuilt portions and sometimes for more. Energy code, electrical, fire-rated assemblies and detection are the common items; ordinance-or-law coverage pays them up to its limit.
The cost comparison
The adjuster compares cost to repair against cost to replace and the policy limits. Where repair approaches replacement, a rebuild is often approved. Where the policy pays actual cash value if you do not rebuild, that shapes the choice.
Your choice
Within what the policy pays, you decide. Rebuilding allows changes at your cost. Not rebuilding may reduce the payment to actual cash value. Rebuilding elsewhere has its own rules. Ask the adjuster for each scenario in writing.

