The strange affair of Angus Taylor and the allegedly doctored document of dubious provenance he used to try to discredit Sydney's lord mayor Clover Moore and her council over climate change is replete with lessons for political players.
One: avoid gratuitous point scoring, but if you must do it, make sure of your facts.
Two: when you're caught out in a mistake, make a clean breast of things, and as quickly as possible.
Three: if you are the prime minister, and your embattled minister is facing a police investigation, do nothing that might suggest, even if wrongly, that you are intervening in the course of justice.
Four: when, as PM, you are defending your man or woman in Parliament, make sure the material you use has been triple-checked.
Failure to observe these obvious and sensible practices has created a distracting issue for the government and then damagingly escalated it. In the process, Taylor has been discredited, and Scott Morrison has been embroiled and embarrassed - or embarrassed himself. Every twist and turn has been entirely self-created by the government. The whole thing was avoidable.
Taylor's self-image and the political reality of his career have sharply diverged since he was elected to Parliament in 2013, with the hope, indeed the expectation in his own mind, of eventually becoming prime minister.
It did not seem at the time an unreasonable aspiration. A Rhodes scholar and a McKinsey man who became a director at Port Jackson Partners, Taylor presented well and looked the part.
Belying this early promise, Taylor has been plagued by controversy (including over his interest in a family company investigated about land clearing), and since becoming Energy Minister under Morrison he has performed poorly in what's admittedly a very challenging portfolio.
In general, Taylor has fallen victim to a combination of hubris and stubbornness.
His response to the City of Sydney's declaration of a climate emergency was to point to what he claimed were the councillors' huge travel costs - and thus large carbon footprint - with the imputation of hypocrisy. His letter to Moore was given to The Daily Telegraph just to hype his attack. But the figures he used were wildly wrong.
When the error was inevitably revealed, Taylor insisted the document providing the basis for his claim "was drawn directly from the City of Sydney website". He said his office on September 9 accessed a report on that site.
But the council report on the site contained the correct figures, and the evidence so far - notably the City of Sydney metadata - indicates that report was not altered.
So where did Taylor's allegedly doctored and certainly inaccurate document come from?
The most likely explanation appears to be that Taylor's office somehow accessed a draft, and then a staffer misread that draft, inflating the very modest travel costs into the millions of dollars that Taylor claimed. But why, if something like that is what happened, Taylor did not 'fess up with the full story immediately is inexplicable.
This week's announcement of a NSW Police investigation took the affair to a new level, raising the question of whether Taylor should be stood aside while that proceeds. This can be argued both ways: in my view there's a reasonable case for not standing him aside. There are precedents, and anyway the probe will be finished quickly.
What was not reasonable was for Morrison to ring NSW Police Commissioner Mick Fuller to ask about the investigation. Not least because he and Fuller are well acquainted personally - they previously lived near each other.
Apart from the proprieties, a leader with any appreciation of process should know that by directly contacting the commissioner he was opening himself to attack.
To do so was a misjudgment. Then Morrison added carelessness when, raising Labor examples of people not standing aside while under police investigation, he attributed the words of radio presenter Ben Fordham to a Victorian detective. This was another instance of somebody being sloppy.
With one week of the parliamentary year remaining, Labor has decided to deny Taylor a pair next Wednesday and Thursday for him to go to the International Energy Agency conference in Paris. It could be another rough few days for the minister, unless he gets a very quick all-clear from the NSW police.
By late Thursday the government was hoping its very difficult week would finish with an important win - the passage of its Ensuring Integrity legislation to crack down on recalcitrant unions and officials. But there things went horribly wrong.
Pauline Hanson, despite securing concessions, voted with Labor, and the legislation was lost on a tie. The government was shocked and furious.
Hanson said she was firing a warning shot across the bows of both union bosses and the government - the former should get their act together and the latter should clean up white-collar crime. The appalling revelations about Westpac obviously came at a very bad time for a government pressing its case for action on unions.
On Friday ministers were venting angrily about Hanson having misled them. The Hanson camp claims the government read the situation wrongly, believing that because she worked with it on her amendments, this amounted to support for the bill. Rather, she wanted the amendments to soften its impact if the bill did get through.
Hanson says at no time did the government have a guarantee from her - "they took me for granted".
Now the government plans to reintroduce the legislation next week, but it won't be considered until the New Year.
As it looks to the final sitting week, the government is desperately trying to wrangle Jacqui Lambie, who's playing hardball, into voting for the repeal of medevac. Another rebuff on what it regards as critical legislation would be deeply humiliating.
- Michelle Grattan is a press gallery journalist and former editor of The Canberra Times. She is a professorial fellow at the University of Canberra and writes for The Conversation, where this column appears.