We usually think of constitutions as mechanisms for constraining and limiting power. They say what governments and parliaments cannot do. They declare fundamental rights that cannot be infringed. They prohibit the arbitrary dismissal of judges, protect the civil service from being turned into an instrument of partisan patronage, and stop the governing majority unilaterally changing the basic ground-rules on which a functioning democracy depends. The government cannot delay elections indefinitely, or abolish the Electoral Commission, or gerrymander constituency boundaries, because there are constitutional rules to prevent them.

These are important functions of a constitution, but before power can be constrained it must first be created. The first function of a constitution is therefore to constitute the state – to put it together – as an entity able to exercise public authority.

Constitutions establish the ‘publicness of power’: they ensure that power does not belong to any particular person, party or interest, to be used for private benefit, but belongs instead to the public, to be used for the public good.

This is incredibly hard to do. It is difficult to find a basis on which broadly accepted claims to public authority can rest. That is why constitution-building has to be an inclusive and consensual process; it is an attempt to find some secure common-ground, in terms of the basic democratic rules, even if we disagree about policies and priorities.

The countries that succeed in finding this common ground this are able to maintain institutional stability and integrity, even in the face of divisive, polarised politics. Countries that fail to do so may be trapped in a cycle of repression, revolution, coups and civil wars.

Aside from any electoral calculations, this is one reason why the SNP’s longstanding policy of keeping the monarchy in an independent Scotland makes sense. The Crown is a symbol of authority, continuity and identity that commands the loyalty of Unionists and can help reconcile them to the idea of a Scottish state. It will be very hard for Billy with his drum to reject the authority of the Scottish state when the Queen attends the State Opening of Parliament at Holyrood.

It also reassures people that there will be no destabilising rejection of all that has gone before. Keeping the Crown – albeit with the Crown prerogatives constrained by a written Constitution and the pomp suitably toned down – represents a seamless, peaceful and orderly transition from devolution to independence.

All this presumes, however, that the monarchy is willing to play its part. If the recent claims of royal intervention in the 2014 referendum are substantiated, and if the Queen cannot remain strictly neutral in a future vote, then the Crown might fall with the Union.

That leads to the question of who should replace the Queen as head of state of an independent Scotland. That there must be a replacement is beyond doubt. The separation of duties between a prime minister and a ceremonial head of state is necessary, not only because it saves the prime minister from having to waste time on merely formal and ceremonial duties, but also because it embodies the publicness of power. The prime minister is necessarily the leader of a party, whose political fortunes may wax and wane, and whose policies some may vigorously oppose. The state-as-a-whole – the res publica – should be represented by someone who symbolises unity, above partisan politics.

In Ireland, the president is directly elected by the people. Successive Irish presidents have performed their duties with decorum and self-restraint. Elsewhere, however, popularly elected presidents have behaved in crudely ]partisan ways, using their public platform to stray beyond their figurehead role and encroach upon matters of policy.

Most republics with Westminster-derived constitutions have opted for a president who is chosen by parliament, either appointed by a resolution of parliament (as in Malta and Samoa) or elected by the members of parliament (as in Bangladesh and Trinidad & Tobago).

This prevents the president from claiming their own popular mandate, but does not prevent the selection of a merely partisan figure. The presidency is a useful consolation prize for an also-ran Cabinet Minister. President Michael Gove is a truly horrifying thought.

To ensure the selection of a respected, unifying, non-partisan figure, the process should incorporate a degree of cross-party approval. The proposal in Australia, at the time of the 1999 republic referendum, was for a joint nomination by the prime minister and the leader of the opposition, followed by approval by a two-thirds majority vote in parliament.

This ‘bi-partisan appointment’ model was ultimately rejected by Australian voters, but the idea had merit. It is worth considering if we are ever in the position of trying to establish a Scottish republic.

Democracy is full of paradoxes. One of these is that the direct election of the head of state, far from strengthening democracy, could easily weaken and destabilise it. If we must have a republic, it should be one in which the head of state is strictly limited to ceremonial and constitutional duties, cannot claim a popular mandate, and does not owe allegiance to any party.

This column welcomes questions from readers

Gerry Hassan is this week’s guest on the TNT show. Join us at 7pm on Wednesday.