Why not just take the existing law, and have a machine execute it in the style of a computer program?
We wouldn’t need judges juries or lawyers. You’d just type the specifics of your case and any supporting documents/evidence into the computer and a verdict would pop out.
Of course, the system could be used for other stuff too, like checking building code compliance or engineering soundness, signing off on military and police action, setting the executive branch’s priorities, and so on.