Papa and punya are best read as quantities rather than as verdicts. An act leaves a residue on the person who does it, and the residue ripens, in this life or in a later one. Nothing in that description requires a judge; it is the karmic mechanism doing the work, and the vocabulary belongs to that mechanism rather than to a court.
The legal literature nonetheless produced something that behaves very like a code. Dharmasastra uses pataka for a sin and mahapataka for the gravest class, and the Laws of Manu name five great sins: killing a brahmin, drinking liquor, stealing a brahmin's gold, violating the bed of one's teacher, and associating with anyone who has done these things. Below them sits a much longer class of secondary offences, the upapatakas, and the texts sort them with care.
The remedy is prayaschitta, expiation, and it is administered as a tariff. Particular fasts, recitations, gifts, austerities and pilgrimages discharge particular offences, graded to what was done and to who did it. The lunar fast, the candrayana, in which the day's food is reduced and increased with the waning and waxing of the moon, is among the best known of the prescribed penances. What such a rite restores is standing, ritual and social, and the point of the literature is the matching of remedy to offence rather than any appeal to mercy.
The system is explicitly caste-inflected and does not conceal it. The weight of an act varies with the varna of the person committing it and of the person against whom it is committed, and the five great sins are themselves framed around offences involving brahmins. That is a fact about the texts and it belongs in any account of them.