Establishing a new law should resemble the development of software.
I mean, first there is a problem to solve, then it's decided it would be solved by a new law. The specifications and test cases are collected, the law designed and written down. After reviews and corrections it's uploaded into a working system, where accountable administrators monitor it's efficiency and side effects.
The intention is that the letter of law would follow it's spirit clearly stated in easily - understandable words (handling a given problem and nothing else).
Any side effects (backdoors, loopholes) would be debugged out by accountable entities.
It might be possible to create and apply law codification standards to speed up the process and make it transparent to the public.