The Duties of the Heart, by Rabbi Bachye, tr. by Edwin Collins, [1909], at sacred-texts.com
The whole of human conduct may be divided into acts that are commanded and acts that are prohibited, and acts that are necessary to the maintenance of physical existence and that are just sufficient for human needs, such as eating, drinking, sufficient speech for the conduct of worldly affairs, and so forth. For every act that passes the boundary line of what is just sufficient, either tending to superfluity or to insufficiency, cannot escape from inclusion among acts commanded by Reason or by Scripture, if its intention be for the sake of God; or among prohibited acts, if its passing of the border line be not for the sake of God. * When, however, we examine more closely the kind of actions described as being neither commanded nor forbidden, but merely necessary to human life and the order of the world, we discover that it belongs to the category of things commanded from the very beginning of creation (here again
[paragraph continues] Scripture and Reason—Ethics, properly so-called—are in agreement), for in Genesis we find:—"And God blessed them and said, be fruitful and multiply, and fill the earth and subdue it; and later on, "Thus behold I have given unto you every herb bearing seed which is upon the face of the earth for food." Thus the eating of sufficient food is also commanded in the Law, and since this is so, it is clear that every possible [intentional] action of the sons of men is either commanded or forbidden, and that he who does anything commanded (by Reason or Scripture) is performing a good deed, and if he leaves it undone, he has failed in his duty. And, in like manner, to do anything that Reason or Scripture forbids is sinful, and to refrain from doing it, if he refrain from doing it from reverence for the Eternal One, it is righteous. And to do things that are not prohibited in an even and proper way, is righteous.
Behold, then, all the actions of mankind are, without exception, either good or bad: and the intelligent man is he who weighs all his actions, before he does them, in this balance, and tests them with his best thought and the whole strength of his intellect, and chooses the best of them and forsakes all others. The sage (Ecclesiastes xii.) classifies all works as either good or bad. "For all works God will bring into judgment, over every hidden thing whether good or bad."
30:* Note that not the act but its motive determines its ethical significance.