עַל־פִּ֨י הַתּוֹרָ֜ה אֲשֶׁ֣ר יוֹר֗וּךָ וְעַל־הַמִּשְׁפָּ֛ט אֲשֶׁר־יֹאמְר֥וּ לְךָ֖ תַּעֲשֶׂ֑ה לֹ֣א תָס֗וּר מִן־הַדָּבָ֛ר אֲשֶׁר־יַגִּ֥ידֽוּ לְךָ֖ יָמִ֥ין וּשְׂמֹֽאל׃
You shall act in accordance with the instructions given you and the ruling handed down to you; you must not deviate from the verdict that they announce to you either to the right or to the left.
Torah Temimah points to Sanhedrin / Sifrei.
על פי התורה. מלמד שתורה שבעל פה בכלל.
English: According to the Torah — this teaches that the Oral Torah is included.
The phrase encompasses both the Written and the Oral Torah as the basis of the court’s instruction.
Derash on the verse (Bavli / Sifrei) — not a formal named middah of the 13.
The binding ruling of the high court rests on both the Written Torah and the Oral Torah.