In ancient times a lot of things could get you killed, including building a house. For example, the law created by the Babylonians known as the Code of Hammurabi included some stiff penalties for builders of unsound homes:
“If a builder builds a house for someone, and does not construct it properly, and the house which he built falls in and kills its owner, then that builder shall be put to death”.
But what if the materials sold to the builder, who thought they were sound, were the problem? Kill the material supplier, or the builder, or both?
The Hebrew Bible also addresses home building, in what might be the earliest construction health and safety requirement: “If you build a new house, you shall make a parapet for your roof, so that you do not bring blood guilt on your house if anyone should fall from it.” Deuteronomy, chapter 22 verse 8.
This would seem to be an owner-builder requirement, for the benefit of anyone who goes up on the roof, but has trouble staying there. I guess the punishment for violating this rule could mostly occur to the owner after his death.

ancient book+rule