Devarim / Deuteronomy 22:8
כִּי תִבְנֶה בַּיִת חָדָשׁ וְעָשִׂיתָ מַעֲקֶה לְגַגֶּךָ וְלֹא־תָשִׂים דָּמִים בְּבֵיתֶךָ כִּי־יִפֹּל הַנֹּפֵל מִמֶּנּוּ׃
When you build a new house, you shall make a parapet for your roof, so that you do not bring blood upon your house if anyone falls from it.
Pshat פְּשָׁט
Not through you
Rashi: the new house with a parapet is a reward for the bird you sent away, because one mitzvah draws another. The one who falls may have deserved to fall, but let his death not come through you. Sforno: do not be the cause of blood guilt resting on your house.
How Rashi and Sforno explain it
Remez רֶמֶז
A parapet of awe
Degel Machaneh Ephraim: the new house is the New Year, when the world is built anew. The word "parapet" (מַעֲקֶה) equals "might" (גְּבוּרָה) in number, and "your roof" (גַּגֶּךָ) equals the Name of the Eternal. Strictness is joined with mercy. Zera Kodesh: "parapet" equals "awe" (יִרְאָה) in number: without awe one who has risen will fall.
How Degel Machaneh Ephraim and Zera Kodesh explain it
Drash דְּרָשׁ
A vicious dog and a shaky ladder
Midrash Tannaim: the Almighty knows this person will fall, but does not want the harm to come through you. You are like a watchman set over the house. Rabbi Natan in the Talmud: from this verse, one may not keep a vicious dog or a shaky ladder at home. Midrash Aggadah: this person's fall was destined since the six days of creation.
How Midrash Tannaim, Talmud, Bava Kamma, and Midrash Aggadah explain it
Sod סוֹד
Reward as preparation
Shem MiShmuel: this world is a corridor, the world to come is the hall. The reward for a mitzvah is the goal, so it comes in the world of the goal. But if the reward is needed to fulfill more mitzvot, it becomes preparation itself and comes already here. So the new house comes for the sake of the parapet.
How Shem MiShmuel explain it