ONE year on from the clusterf***mageddon that was the Brexit referendum, we thought it couldn't get worse. It just did. “You have to be prepared to walk away,” said the Brexit Secretary, David Davis. It's the only language the Europeans understand. Now a humbled British Government is practically on its knees trying to cobble together a face-saving deal.

On day one of negotiations with the EU commission last week, Davis abandoned his “red line” that trade had to be negotiated simultaneously with the divorce bill (which of course we said we weren't going to pay) and issues of citizenship. But even before these trade talks have been scheduled the Chancellor, Philip Hammond, has started the great climbdown on the single market. He's asking Brussels to do a “transitional deal” that would involve Britain remaining subject to EU regulations until “at least” 2023 (and, whisper it, perhaps indefinitely). This is to avoid the “cliff edge” of hard Brexit. So much for Theresa May's insistence that “no deal is better than a bad deal”.

The Brexit shambles has been an object lesson in how not to negotiate departure from a free trade zone – or any organisation for that matter. Brexiteers like Boris Johnson said that the EU would come crawling to Britain because of their trade surplus with the UK. They need to sell us their wine, their cars and they need our expertise in financial services, he blustered. May even decided – against, we have learned, the advice of the Tory cabinet – to deny security to EU citizens living here because she didn't want to give away a “bargaining chip” in the negotiations.

Holding the security of three million people hostage was about as stupid an opening gambit in negotiations with 27 countries as it is possible to imagine. It particularly antagonised Eastern European nations like Poland, who were supposed to be Britain's allies in Europe. Theresa May has had to give in and accept that EU citizens can remain in Britain indefinitely. But she has already caused huge resentment and anxiety among those living here. They understandably want more security than the UK Government is prepared to concede. In particular, they want to be under the protection of the European Court of Justice, rather than the UK authorities, because they no longer trust us. Britain is again scoffing at this and saying: we are taking back our laws and our borders and you can jolly well accept the rulings of our courts. But since we're signalling that, for trading purposes, the UK will remain under the jurisdiction of the ECJ, EU citizens are understandably asking why their security should be less worthy of protection than wine or jam.

The economic damage is becoming clear. Polish net migration has all but ceased, meaning that to fill the jobs gap, Britain will have to try to secure increased immigration from non-EU countries like India, Pakistan, Latin America, the Philippines. That's going to go down wonderfully with Nigel Farage, and all those Ukip supporters who thought they were going to see fewer black and brown faces around their cities after Brexit. Why on earth would Britain want to prevent skilled and highly educated workers and students from advanced European countries coming here to study and help our economy grow? The absurdity of this is now beginning to dawn on UK voters, which is why there is a distinct air of buyer's remorse. According to YouGov, a clear majority of British voters think immigration is a price worth paying for free trade. Indeed, a majority want another referendum, and the way things are going, they might get one.

The delusion of the Brexiteers was derived from their post-imperial mindset. That joke about Brexit being “British Empire 2”, circulated around foreign office civil servants, betrayed a serious point. The strategy was officially called “Global Britain” by Theresa May. We were going to give up on the “declining” “sclerotic” European Union, with all its daft regulations, and join the rest of the world “where the future growth lies”. Remember how Donald Trump was going to put us “at the head of the queue” for a trade deal. That was until, er, he had a meeting with Angela Merkel and decided that the EU was already at the front of the queue.

It's not even clear that Brexiteers understood how the European Union actually works. The idea that EU membership makes it more difficult for Germany to sell cars to China is absurd – it sells far more there than we do. Far from hindering trade with non-EU countries, the EU has spent most of the last 30 years using its very considerable muscle to negotiate the best deals with the rest of the world on its members' behalf. It took Donald Trump about 10 minutes to realise this, but the Brexiteers still don't get it.

Britain has become a joke across the continent of Europe, where people are saying that the British offer of citizenship will have to be made compulsory to stop EU citizens leaving “wasteland Britain”. That image of a blackened Grenfell Tower hasn't helped, nor did the British newspapers claiming that it was caused by Brussels regulations on energy saving. In fact, the botched cladding shows what happens when EU health and safety standards are not adhered to.

EU commentators see an arrogant, post-imperial country with delusions of grandeur having a hard lesson in real world politics. Such is the dysfunctional condition of the UK Government, there seems little prospect of Britain taking a more constructive approach to the Brexit process – or even a coherent approach. Theresa May can't now get her legislative programme through the House of Commons without getting lost in parallel negotiations with her “friends and allies” in the DUP.

Britain faces many years of constitutional chaos as the Not-so-Great Repeal Bill grinds its incoherent way through Parliament, aways subject to the veto of the Democratic Unionist Party MPs. It is now accepted that Scotland will have to give legislative consent to the repatriation of powers over agriculture, fisheries, environment etc, to Westminster. It would have been a constitutional outrage not to have given Holyrood a say.

The Scottish Parliament has a unique status in the British constitution by virtue of its primary law-making powers. Every power not explicitly reserved to Westminster under the 1998 Scotland Act, is supposed to devolve to Holyrood. The devolution acts will have to be amended, or scrapped, in order for Westminster to take control, not just of agriculture and fisheries, but all of those responsibilities that Holyrood exercised on Europe's behalf.

It is most unfortunate that the Scottish Government's hand has been weakened on the eve of this process, following the loss of a third of SNP MPs in the General Election. Nicola Sturgeon's threats to call another independence referendum if Scotland is locked out of the single market now sound hollow – indeed she seems to have stopped making them and taken to defending the docking of puppy dogs' tails instead. Holyrood could have taken a lead in the growing campaign to keep the UK in the single market.

But this is now about much more than trade. If the Repeal Bill is handled as ineptly by the Scottish Government, as the UK has handled the Brexit process, then Scottish voters should fear for the very future of devolution. It looks as if clusterf***mageddon2 is infectious.