The Shulchan Aruch · Orach Chayim
אורח חיים תק״מOrach Chayim 540
Siman 540 of 697 in Orach Chayim — 8 se'ifim
הלכות חול המועדLaws of Chol HaMoed· siman 540
Se’if 1א׳
בִּנְיָן, אֲפִלּוּ כָּל שֶׁהוּא, אָסוּר; וְאִם נִפְרַץ גֶּדֶר גִּנָּתוֹ אוֹ כֹּתֶל חֲצֵרוֹ שֶׁבֵּינוֹ לַחֲבֵרוֹ (מָרְדְּכַי פ"ק דמ"ק וְהַגָּהוֹת מַיְמוֹנִי פ"ח), בּוֹנֶהוּ מַעֲשֵׂה הֶדְיוֹט דְּהַיְנוּ שֶׁמַּנִּיחַ אֲבָנִים זוֹ עַל זוֹ וְאֵינוֹ טָח בַּטִּיט; אוֹ גּוֹדֵר אוֹתוֹ בְּקָנִים וְגוּמָא וְכַיּוֹצֵא בָּהֶם. וְכֵן אִם עָשָׂה מַעֲקֶה לַגַּג, בּוֹנֶה אוֹתוֹ מַעֲשֵׂה הֶדְיוֹט; אֲבָל כֹּתֶל חָצֵר הַסָמוּךְ לִרְשׁוּת הָרַבִּים שֶׁנָּפַל, בּוֹנֶהוּ כְּדַרְכּוֹ; וְאִם הָיָה נוֹטֶה לִפֹּל, סוֹתְרוֹ מִפְּנֵי הַסַכָּנָה וּבוֹנֶה כְּדַרְכּוֹ. הַגָּה: וַאֲפִלּוּ אֵינוֹ נוֹטֶה רַק לֶחָצֵר אוֹ לַמָּבוֹי, מֻתָּר לְסָתְרוֹ מִפְּנֵי הַסַּכָּנָה וְלַחֲזֹר וְלִבְנוֹתוֹ; וְכֵן בִּשְׁאָר דְּבָרִים דְּאִיכָּא לְמֵיחַשׁ לְסַכָּנָה, בּוֹנֶה וְסוֹתְרוֹ כְּדַרְכּוֹ (בֵּית יוֹסֵף בְּשֵׁם רַבֵּנוּ יְרוּחָם בנ"י).
1. Laws of Building and Demolishing on Chol HaMoed, in it is 8 paragraphs. Building even a bit is forbidden. If there was a breach in the fence of his orchard [or the wall of his courtyard that is between him and his friend - (Mordechai, 1st Chapter of Moed Katan & Hagaaos Maimoni Chapter 8], build an act of an amateur that is place rocks on top of each other or plaster mud or fence (the breach) with reeds, papyrus, and like those. Similarly, if making a railing for a roof, build in an act of an amateur; however, if building a wall for his courtyard that is near the public thoroughfare that fell, build as normal, and if it is leaning to fall, demolish because of danger and build normally. Note (Rema): Even if it is only leaning to the courtyard or alley, it is allowed to demolish because of danger and return and rebuild. Similar with other matters that there is a concern of danger, build and demolish as usual (Bais Yosef in the name of Reb Yerucham BN'Y)
Se’if 2ב׳
מֻתָּר לִטֹּל גַּבְשׁוּשִׁית שֶׁבַּבַּיִת.
2. It is permitted to take from a pile (of dirt or stone) in one's house (on Chol HaMoed).
Se’if 3ג׳
סְדָקִים שֶׁבַּגַּג, מֻתָּר לְסָתְמָן בַּיָּד וּבָרֶגֶל, אֲבָל לֹא בִּכְלֵי אֻמָּנוּת.
3. Holes in the roof are permitted to close with one's hand or feet, but not with a professional implement.
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0