Dharmaśāstra (Sanskrit: धर्मशास्त्र) are Sanskrit Puranic Smriti texts on law and conduct, and refer to treatises (śāstras) on Dharma. Like the Dharmasūtras which are based upon the Vedas, these texts are also elaborate law commentaries based on the Vedas, and evolved from Dharmasutras. There are many Dharmaśāstras, variously estimated to number from 18 to over 100. Each of these texts exists in many different versions, and each is rooted in Dharmasutra texts dated to the 1st millennium BCE that emerged from Kalpa (Vedanga) studies in the Vedic era.
The textual corpus of Dharmaśāstra were composed in poetic verse, and are part of the Hindu Smritis, constituting divergent commentaries and treatises on ethics particularly duties, and responsibilities to oneself and family as well as those required as a member of society. The texts include discussion of ashrama (stages of life), varna (social classes), purushartha (proper goals of life), personal virtues and duties such as ahimsa (non-violence) against all living beings, rules of just war, and other topics.