Lewis Holden has drafted a Constitution (Executive Powers) Bill aimed at amending the Constitution Act 1986 to codify the powers of the head of state to appoint and dismiss governments. A clause-by-clause commentary is here.
The core of the bill is in sections 5B - 5F, which lay out the ground rules for the appointment and dismissal of the Prime Minister, the appointment of other Ministers, the dismissal of the government and the dissoolution of Parliament. Most of this codifies existing convention - the head of state must appoint a Prime Minister who commands the support of the House (though such support need not be explicit, so we can still have a government appointed on the promise of being able to win a confidence vote); Ministers may only be appointed on advice; and the PM must be dismissed if they lose the confidence of the House. The government can only be dismissed for contravening the Constitution Act or failing to obey a court order, and then only after an examination of the evidence by the Supreme Court. This is a safeguard to prevent an Australian-style Dismissal, and only one of numerous checks and balances to prevent constitutional shenanigans.
Section 5C (Dismissal of the Prime Minister) is the most interesting. While a Prime Minister who has lost the confidence of the House must resign or be dismissed, in most cases the bill allows for breathing space to allow a defeated Prime Minister a chance to put together an alternative coalition for confidence and supply (the sole exception being where the vote passes by an absolute majority and names a replacement Prime Minister). This is necessary due to the expected greater fludity of confidence under MMP (especially with Winston holding the balance of power) and the lack of convention in this area; while IIRC governments rose and fell quite frequently before the establishment of party politics in the 1890's, AFAIK there is no convention to guide the Governor-General on what to do if this happens under MMP. Should they call elections immediately, or wait to see if an alternative coalition can emerge? Having some ground rules in legislation provides clear guidance to all parties, while preventing an abuse of power by the head of state. The only problem IMHO is that the time window allowed is two short (I would consider two weeks to be appropriate), and that it is not explicit about the Prime Minister's caretaker role in such a situation (though given that the idea of a caretaker government exists only by convention, it would be difficult).
Section 5F also makes it clear that parliament can only be dissolved three years after the last election or if the government has lost a vote of confidence and no alternative Prime Minister has been named. Which would rule out a snap election designed to exploit high polling unless the government contrived to vote itself out of office (which would be a very public manipulation of the system).
The bill is deliberately envisioned as part of a wider republican program (which includes Keith Locke’s Head of State (Referenda) Bill), but this isn't actually necessary. Codifying the powers of the head of state in this way is useful regardless of whether we are a republic or not, and the bill should therefore be rewritten to fit in with the legislation as it stands. Though part of such a rewrite should be a global search and replace of "Governor-General" with "Head of State" and the insertion of a clause giving the title of the Head of State as "Governor-General" so it can more easily be twinked out later.