Devarim (Deuteronomy): Shoftim > Ch 17
Animals for sacrifices must not have blemishes
You shall not sacrifice to the Lord, your G-d, an ox or a sheep that has in it a blemish or any bad thing, for that is an abomination to the Lord, your G-d.
Idolworshippers among you should be stoned to death, but not by word of just one witness
If there will be found among you, within one of your cities which the Lord, your G-d is giving you, a man or woman who does evil in the eyes of the Lord, your G-d, to transgress His covenant, and who will go and worship other G-ds and prostrate himself before them, or to the sun, the moon, or any of the host of the heavens, which I have not commanded; and it will be told to you, and you will hear it, and investigate thoroughly, and behold, the matter coincides; this abomination has been perpetrated in Israel. Then you shall bring out that man or that woman who has committed this evil thing, to your cities, the man or the woman, and you shall pelt them with stones, and they shall die. By the mouth of two witnesses, or three witnesses, shall the one liable to death be put to death; he shall not be put to death by the mouth of one witness. The hand of the witnesses shall be first upon him to put him to death, and afterwards the hand of all the people, and you shall abolish evil from among you.
If you can’t make judgement then it must be made by the kohen judge in the Temple
If a matter eludes you in judgment, between blood and blood, between judgment and judgment, or between lesion and lesion, words of dispute in your cities, then you shall rise and go up to the place the Lord, your G-d, chooses. And you shall come to the Levitic kohanim and to the judge who will be in those days, and you shall inquire, and they will tell you the words of judgment. And you shall do according to the word they tell you, from the place the Lord will choose, and you shall observe to do according to all they instruct you. According to the law they instruct you and according to the judgment they say to you, you shall do; you shall not divert from the word they tell you, either right or left.
Disobeying the kohen judge is punishable by death
And the man who acts intentionally, not obeying the kohen who stands there to serve the Lord, your G-d, or to the judge that man shall die, and you shall abolish evil from Israel. And all the people shall listen and fear, and they shall no longer act wantonly.
Israelite king can’t be a foreigner, can’t aquire riches, and must read the Torah daily
When you come to the land the Lord, your G-d, is giving you, and you possess it and live therein, and you say, "I will set a king over myself, like all the nations around me," you shall set a king over you, one whom the Lord, your G-d, chooses; from among your brothers, you shall set a king over yourself; you shall not appoint a foreigner over yourself, one who is not your brother. Only, he may not acquire many horses for himself, so that he will not bring the people back to Egypt in order to acquire many horses, for the Lord said to you, "You shall not return that way any more." And he shall not take many wives for himself, and his heart must not turn away, and he shall not acquire much silver and gold for himself. And it will be, when he sits upon his royal throne, that he shall write for himself two copies of this Torah on a scroll from [that Torah which is] before the Levitic kohanim. And it shall be with him, and he shall read it all the days of his life, so that he may learn to fear the Lord, his G-d, to keep all the words of this Torah and these statutes, to perform them, so that his heart will not be haughty over his brothers, and so that he will not turn away from the commandment, either to the right or to the left, in order that he may prolong [his] days in his kingdom, he and his sons, among Israel.