Age of reasoning:  In one of the sub stories of the Mahabharata, is the story of Ani Mandavya.  It is a story of a Sage Mandavya who was mistaken for a thief and punished by impalement by the king of the time.    He was quickly found not guilty and the king begged forgiveness to the sage who by his yogic powers managed to survive the impalement.  Eventually the sage forgave the king. Unfortunately  the spike lodged on his torso was not easy to remove.  While the spike was eventually cut, a small part of it remained wedged in his body, giving him untold pain.  Eventually he died and went to Lord Yama the god of justice and death.  He demanded to know his sin for which he suffered this great injustice and pain when he lived. Yama told him that when the sage was a small child he harmed an insect and hence he suffered.  The sage grew angry at the punishment being greater than the sin, especially one of a child who was not emotional mature to know good from bad. He claimed that before the age of reasoning (emotional maturity-any were from 6 to 12 years) a child’s crime should not be considered.  He cursed Yama to be born a mortal and suffer through humanity to understand his act of unjust.  He is also said to have created a treatise which became important in juvenile justice in Hindu laws.