The attorney general’s legal advice on the Brexit withdrawal agreement, prised from a clenched government fist by parliament, reveals no deficiencies in Theresa May’s plan that were not previously known. But the document, published today, does spell problems out in uncomfortably stark terms.

No one is surprised to learn that the UK would not have a power unilaterally to dissolve “backstop” arrangements designed to avoid a hard border in Northern Ireland. That is what the backstop always meant. Still, it aggravates Brexiter displeasure to see the government’s own lawyer write that rule-taking alignment with the EU would “endure indefinitely until a superseding agreement took its place”.

The published text makes the prime minister’s task in persuading MPs to back the deal that much harder, but that was no reason for it to have been secret. There is no constitutional principle that the prime minister must be spared embarrassment. Mrs May’s preference that the document not be shared was a point of self-serving political interest, not national interest. But there was, in the government’s resistance to publication, the kernel of a genuine dilemma. Parliamentary sovereignty can sometimes collide with the entitlement of ministers to receive advice in confidence that remains confidential.

Transparency makes for better government, but transparency is not necessarily improved by a requirement to publish everything under all circumstances. If ministers expect their every written word to be shared with the widest possible audience, they will stop writing things down. Informal, un-minuted policymaking is not healthy for a democracy that expects matters of significance to be recorded. Those records make politicians more accountable for their mistakes and misdeeds.

In this case, it was right that Mrs May’s government was held in contempt of parliament for refusing to publish that which the Commons had demanded to see. It should also never have required such an extreme measure. Labour’s Hilary Benn expressed succinctly the problem in the Commons – matters had escalated, the chair of the Brexit select committee said, as a result of “government’s marked reluctance to listen to the house, to trust the house and to share information with the house”. Last year, Mr Benn’s committee spent months trying to establish what risk assessments the government had made for different Brexit scenarios and then asking to see them. It met delay and denial. It is worth recalling that Mrs May did not initially think that parliament had a role in the activation of article 50 and was forced to seek Commons consent by a ruling of the supreme court. The provision of a “meaningful” parliamentary vote on final Brexit terms also had to be forced out of a reluctant Downing Street.

This pattern reflects the closed methods of a prime minister who avoids sharing much beyond a tight circle of advisers. It is also a function of her having no majority. Fear of humiliation in whipped votes led the government to stop contesting opposition day debates, the theory being that Labour victories on non-binding motions are less shaming if the Tories don’t put up a fight. That tactic has backfired. This week’s defeats express more than opposition among MPs to Mrs May’s approach to Brexit. They are the culmination of brewing anger at her systematic disrespect for the legislature. The contempt is now mutual, a state of affairs that would be damaging to any prime minister with a majority. For this prime minister in a hung parliament it could be fatal.