מִצְוַת עֲשֵׂה לַעֲשׂוֹת אָדָם מַעֲקֶה לְגַגּוֹ שֶׁנֶּאֱמַר (דברים כב ח) "וְעָשִׂיתָ מַעֲקֶה לְגַגֶּךָ". וְהוּא שֶׁיִּהְיֶה בֵּית דִּירָה. אֲבָל בֵּית הָאוֹצָרוֹת וּבֵית הַבָּקָר וְכַיּוֹצֵא בָּהֶן אֵינוֹ זָקוּק לוֹ. וְכָל בַּיִת שֶׁאֵין בּוֹ אַרְבַּע אַמּוֹת עַל אַרְבַּע אַמּוֹת פָּטוּר מִן הַמַּעֲקֶה:
It is a positive commandment for a man to build a guardrail for his roof, as Deuteronomy 22:8 says: "And you shall make a guardrail for your roof." This applies with regard to a building used as a dwelling. But for a warehouse or a cattle barn and the like, there is no necessity. Similarly, any building that is not four cubits by four cubits does not require a guardrail.
