All I have are ideas, not an airtight solution.
I think that law enforcement officers need to be retrained as servants of the people, not as their keepers.
I think that the penal codes should be simplified and minimized. I think that a lot of nonviolent "crimes" need to be completely reconsidered and possibly decriminalized.
I think that judges should be more accountable to the people and that they should demonstratively express their dispassionate objectivity and fairness every day.
I think that prisons shouldn't be cost centers, which are just an extension of the military industrial complex.
I think that quality legal representation should be available to everyone who's charged with a crime, not just the ones who can afford it.
I think that charging and sentencing guidelines should be rewritten to counteract the effects of discrimination related to race, skin color, religion, socioeconomic condition, and education.
I think that we should deeply study and consider the effects of isolation and anonymity encouraged by online activity and urban design.
Is that a good start?