Ali said, "We did not write down anything from the Prophet ﷺ except the Quran and what is in this document."The Prophet ﷺ said, "Madinah is sacred territory, from Air to such-and-such. Whoever introduces an innovation in it or shelters one who does so, upon him is the curse of Allah, the angels, and all people. No ransom or substitute will be accepted from him. The protection granted by the Muslims is one, extended even by the lowest of them. Whoever betrays a Muslim's pledge of protection, upon him is the curse of Allah, the angels, and all people..." The hadith continues.
ما كتبنا عن النبي ﷺ إلا القرآن وما في هذه الصحيفة، قال النبي ﷺ: المدينة حرام ما بين عائر إلى كذا. فمن أحدث حدثا أو آوى محدثا فعليه لعنة الله والملائكة والناس أجمعين، لا يقبل منه عدل ولا صرف، وذمة المسلمين واحدة، يسعى بها أدناهم، فمن أخفر مسلما فعليه لعنة الله والملائكة والناس أجمعين… الحديث.
Bukhari narrated it in "Jizya and Truce" (3179) and Muslim in "Hajj" (1370: 468), both by way of Amash, from Ibrahim Taymi, from his father, from Ali, and Ishaq mentioned it, with the wording being Bukhari's.His saying, "akhfara," means he broke his covenant.