And this is the language of Rambam at the beginning of the first chapter of Hilkhot Shabbat: "Cessation from melakhah on the seventh day is a positive mitzvah as it says (Exodus 20:9) 'and on the Seventh Day you shall desist.' and all who do melakhah on the seventh day negate a positive mitzvah and violate a prohibition as it says 'do not do any melakhah.' And what is the liability for an act of melakhah? If one does it intentionally with malice aforethought he is liable for 'karet' and if there are two witnesses and a warning then he is liable to be stoned. And if he does the melakhah unintentionally then he brings a hatat sacrifice. And all places where the word 'exempt' appears in the context of Shabbat it means 'exempt' by the laws of the Torah but forbidden by rabbinic law and so said our Sages in the beginning of Massechet Shabbat 'all exemptions of Shabbat mean exempt but still forbidden except for these three exceptions...' unless it says 'permitted' or 'not liable whatsoever." And the category of exempt from punishment yet still forbidden when violated is punished by lashes for a rabbinic violation.
(א) שְׁבִיתָה בַּשְּׁבִיעִי מִמְּלָאכָה מִצְוַת עֲשֵׂה שֶׁנֶּאֱמַר (שמות לד כא) "וּבַיּוֹם הַשְּׁבִיעִי תִּשְׁבֹּת". וְכָל הָעוֹשֶׂה בּוֹ מְלָאכָה בִּטֵּל מִצְוַת עֲשֵׂה וְעָבַר עַל לֹא תַּעֲשֶׂה שֶׁנֶּאֱמַר (דברים ה יד) "לֹא תַעֲשֶׂה כָל מְלָאכָה". וּמַה הוּא חַיָּב עַל עֲשִׂיַּת מְלָאכָה. אִם עָשָׂה בִּרְצוֹנוֹ בְּזָדוֹן חַיָּב כָּרֵת. וְאִם הָיוּ שָׁם עֵדִים וְהַתְרָאָה נִסְקָל. וְאִם עָשָׂה בִּשְׁגָגָה חַיָּב קָרְבַּן חַטָּאת קְבוּעָה:
(ב) כָּל מָקוֹם שֶׁנֶּאֱמַר בְּהִלְכוֹת שַׁבָּת שֶׁהָעוֹשֶׂה דָּבָר זֶה חַיָּב הֲרֵי זֶה חַיָּב כָּרֵת. וְאִם הָיוּ שָׁם עֵדִים וְהַתְרָאָה חַיָּב סְקִילָה. וְאִם הָיָה שׁוֹגֵג חַיָּב חַטָּאת:
(ג) וְכָל מָקוֹם שֶׁנֶּאֱמַר שֶׁהָעוֹשֶׂה דָּבָר זֶה פָּטוּר הֲרֵי זֶה פָּטוּר מִן הַכָּרֵת וּמִן הַסְּקִילָה וּמִן הַקָּרְבָּן אֲבָל אָסוּר לַעֲשׂוֹת אוֹתוֹ דָּבָר בְּשַׁבָּת וְאִסּוּרוֹ מִדִּבְרֵי סוֹפְרִים וְהוּא הַרְחָקָה מִן הַמְּלָאכָה. וְהָעוֹשֶׂה אוֹתוֹ בְּזָדוֹן מַכִּין אוֹתוֹ מַכַּת מַרְדּוּת. וְכֵן כָּל מָקוֹם שֶׁנֶּאֱמַר אֵין עוֹשִׂין כָּךְ וְכָךְ אוֹ אָסוּר לַעֲשׂוֹת כָּךְ וְכָךְ בְּשַׁבָּת הָעוֹשֶׂה אוֹתוֹ דָּבָר בְּזָדוֹן מַכִּין אוֹתוֹ מַכַּת מַרְדּוּת:
(1) To rest on the seventh day of the week is a positive command, for it is written: "On the seventh day you shall rest" (Exodus 23:12). Anyone who works on it negates a positive command while transgressing a negative command, for it is written: "You shall do no work" (Exodus 20:10). What penalty does he deserve for doing work? If he did it voluntarily, willfully, he deserves kareth; if he acted in the presence of witnesses who forewarned him, he is stoned; if he acted unintentionally, he must bring a standard sin-offering.
(2) In Sabbath laws, wherever it is stated that someone deserves punishment for doing something, he deserves kareth; if he acted despite the forewarning of witnesses, he deserves stoning; if he committed the transgression inadvertently, he has to bring a sin-offering.
(3) And any place where it is stated that one who does this thing is exempt (patur), [it means] that he is exempt from excision, from stoning and from a sacrifice; but it is [still] forbidden to do this thing on Shabbat, the prohibition being rabbinic (literally, from the words of the scribes). And it is a distancing from forbidden work [forbidden by the Torah itself]. And one who does it volitionally is struck with lashes of rebellion. Likewise, any place where it is stated, “We do not do such and such,” or “It is forbidden to do such and such on Shabbat”; one who does it volitionally is struck with lashes of rebellion.
