In The Name of Allaah, The Most Merciful, The Bestower of Mercy
Imaam as-Sa’di [rahimahullaah] said that Imaam Ahmad [rahimahullaah] said: ”The Usool [Fundamental Principles of Islaam] revolves around three ahaadeeth:
1.”The lawful is clear and the unlawful is clear…”
2. ”Indeed, actions are judged by intentions…”
3. ”Whoever performs an action that is not from our affair [i.e. the Qur’aan and the authentic Sunnah] will have it rejected…”
Deeds either fall under commandments or prohibitions. The first hadeeth- [The lawful is clear and the unlawful is clear] – is about unlawful actions. As for the second hadeeth– [Indeed, actions are judged by intention] – then commandments are either related to one’s intention and the aspiration of the heart, or the apparent physical actions, and thirdly these actions [i.e. acts of worship] are legislated in conformity with the Sunnah.
[Source: Tareequl Wusool Ilal Ilmul Mamool Bi-Marifatil Qawaa-id Wad-dawaabit Wal-Usool’ Page 23. Slightly paraphrased]