Poland had "Neminem captivabimus" about 1430/nobody could be imprisoned without trial/
And it was both for gentry and townspeople/nobody cared about peasants/
In OTL cities never used it,becouse mayors liked their law to imptison anybody in town who offended them without trial.And towns become...