The texts of Dharmaśāstra (treatises on Dharma, or moral and pious way of life) were composed in the second century B.C., on the basis of Dharmasūtra texts which emerged from the Kalpa (Vedanga) expositions of the four Vedas (Rig, Yajur, Sāma, and Atharva) during the Vedic age. It’s not clear how many Dharmaśāstra texts were composed in the second century B.C.—modern scholars estimate their number between eighteen and hundred, but only four texts, which include the sutras of Apastamba, Gautama, Baudhayana, and Vasistha, are extant.
The Dharmaśāstra texts acquired political significance in the eighteenth century, when the colonial administrators of the East India Company passed an order making Dharmaśāstra the law of the land for all Hindus in India. In 1772, Governor General Warren Hastings expressed the system of personal law for India in these words: “That in all suits regarding inheritance, marriage, caste and other religious usages or institutions, the law of the Koran with respect to Mohammedans, and those of the Shaster [Dharmaśāstra] with respect to Hindus shall be invariably be adhered to.”
The Sanskrit scholar Pandurang Vaman Kane (7 May 1880 – 8 May 1972) spent a significant part of his life researching the evolution of ethical, legal, and religious norms in ancient India—he examined the four extant Dharmaśāstra texts, and other ancient texts such as the Mahabharata, the Puranas, the Arthashastra. and the Manusmṛiti, and produced his magnum opus, a five volume work, consisting of around 6,500 pages, the History of Dharmaśāstra, subtitled Ancient and Mediaeval Religions and Civil Law in India—the first volume was published in 1930 and the fifth in 1962.
Kane believed that a constitution inspired from the code of conduct described in the ancient texts is necessary to make people aware of their ethical responsibilities.