2 of 3 Narrowed the scope of this question to only target the ancient period.

What was the legal framework in Ancient India?

We all know the immense contribution ancient Roman, medieval Roman (or Byzantine), and pre-modern HRE cannon law has made to the modern world. These empires relied on a written constitution (or code) and trained magistrates, lawyers, and notaries [cf. Judith Herrin, Byzantium: The Surprising Life of a Medieval Empire; Peter H. Wilson, Europe's Tragedy: A New History of the Thirty Years War]. Much of today's European civil law can trace its origin to those cannons and much of our current legal framework (courts, judges, constitution, senate, and lawyers) are a direct copy of their ideas.

I know that India also has a long tradition of its own legal principles. For example, we know from John Keay: India --A History that during the Mughal period, the administration was uniform and structured and that there existed courts (known as kotwaalis) and magistrates (or kotwaals) [cf, ]. But how did this law function and how was it administered? Where did it originate --did the Mughals bring it with them or was it indigenous to India?

I have four targeted questions for India's ancient period and early middle kingdom period (i.e., 2nd century BCE - 7th century CE):

  1. Was there a (more or less) uniform law?
  2. Was this law (or these laws) documented?
  3. Were there lawyers and trained magistrates?
  4. How effective were these courts? (less being outright civil violence and highly being close to the standards observed in the 15th century HRE)?