In 2016, the then civil service chief Sir Jeremy Heywood gave evidence to the Chilcot inquiry into the Iraq war. He challenged a committee of MPs with a question: “Do you have a culture in which senior officials, ministers and external experts feel it is possible to offer an alternative view to the prevailing wisdom so to avoid groupthink?” Four years later, the answer to that seems to be: no, we don’t.

Heywood died in 2018 aged 56, saluted by politicians of every stripe as the pre-eminent public servant of his generation. I have no doubt that if he’d been in the room last week with Boris Johnson’s fledgling cabinet, he too would have joined the chorus of dismay gurgling through Whitehall.

What’s changed since 2016? Aside from parliament (twice) and the cabinet (almost everyone), the civil service has been portrayed – particularly by Dominic Cummings – as on the point of collapse: necrotic, hopelessly old-fashioned – a blob run by “hollow men”.

It’s no accident that a sudden centralisation of power has taken place almost immediately after a narrowing of cabinet diversity

Some old hands say that Cummings isn’t entirely wrong here, although that last bit needs correcting: one-third of the top jobs in the civil service are occupied by women. But if the past 18 months has proved anything, it’s that Cummings’ characterisation of civil servants comes straight from the Vote Leave playbook. Though Brexit is far from over, the UK civil service has responded to recent political and economic angst with surprising resilience.

If you don’t take my word for it, listen to the victims of last week’s reshuffle, many of whom (including Sajid Javid, Andrea Leadsom and Theresa Villiers) took the time, even in the very act of shuffling out of the ministerial spotlight, to recognise the work of their civil servants. Times are tough, but we’re no less committed to the job.

That job, more than ever, must include giving impartial and objective advice to ministers, based on the premise – uncontroversial until relatively recently – that facts and expertise must be at the heart of government. What likely concerns civil servants about Johnson’s recent reshuffle isn’t that the prime minister is showing his strength. It’s the very opposite: an awareness that Johnson’s fetishisation of loyalty over competence may be a sign of crippling insecurity.

Combined with Johnson’s power grab of the Treasury, which has long been an important check on where and how much the government should spend, the executive’s apparent surrender of cost-benefit analysis and evidence-based policy is a worrisome trend.

Take HS2, possibly the most egregious example of the sunk-cost fallacy in living memory, which owes its green light more to a ministerial display of populist chauvinism than due consideration of value for money. Or the vast and so far vague spending pledges associated with “levelling up” of the regions, which the Financial Times says may be practically impossible. Let’s not even get into the lunacy of the Scotland-Northern Ireland bridge.

Those of us who have been around government since the Blair years understand why the state has tried so hard to make the civil service more diverse, and why the civil service needs a diverse cabinet: to counteract the deadly groupthink that usually prefigures major policy disasters. It’s no accident that a sudden centralisation of power has taken place almost immediately after a narrowing of cabinet diversity.

No 10 under pressure to say whether it vetted 'racist' Andrew Sabisky Read more

No administration is immune to groupthink. But the current one seems intent on political conformity. Civil servants across Whitehall have been chilled by the symbolism of the reshuffle, which sent a clear message that anyone who dared criticise or query the progress of Johnson’s government had no place at the top table.

Meanwhile, Cummings’ plan to hire legions of disruptive geniuses, weirdos and data wonks to transform the delivery of the “people’s priorities” has resulted in the hiring of Andrew Sabisky, an adviser with an interest in pseudo-scientific theories that have become fashionable among certain parts of the right.

It’s true that we need fresh talent. But what good will a dazzling new cohort of advisers do if they are working in a culture that makes poor use of the talent already there? Or if they’re scared of being sacked? Or if the government can’t (or won’t) distinguish between crackerjacks and crackpots?

As always, the civil service must be ready to work with any minister sent our way. But a combative and ideologically conformist approach is spreading fear in Whitehall – and may eventually derail this government’s towering ambitions.

• The civil servant works in a Whitehall department and was part of Operation Yellowhammer