don't go to town on a system before you know what you want
This is a classic and expensive failure. Private contractors should not be expensively involved in such developments prior to wider policy agreement on what the specifications should be. Clearly some incompetent civil servants are not up to their job due to lack of systems awareness skills. Or maybe these failures are down to private ambition and inter-departmental back stabbing. Who knows ?
If you are developing public architecture you have an open competition and you have design proposers make and throw away a few cardboard models before choosing the one you want to spend real money on. That should cost much less than 5% of your total design and build budget. And I don't see why a similar approach can't be adopted in relation to computer systems.