In a photo taken on Boris Johnson’s first day in Downing Street, the cabinet secretary Mark Sedwill, plumply suited and pocket squared, greets the new prime minister. Johnson looks away from him, even as he shakes his hand. At the edge of the picture, leaning against a wall, is a wiry figure in T-shirt and combat trousers. At first you think it’s the IT guy, accidentally caught in shot. Look again and you see that it’s Dominic Cummings, Johnson’s de facto chief of staff, and scourge of the mandarins.

The casual clothes signal that this is an alien to Whitehall who is determined to remain so. Cummings is enthralled by Silicon Valley. The T-shirt he is wearing advertises OpenAI, a company founded by Elon Musk. Its aim is to make AI (artificial intelligence) a creative force, instead of the destructive one some fear it will be. In political terms, the same question hovers over Cummings. He moves fast and breaks things. Can he build them too?

He has certainly proved himself a brilliant destroyer. As adviser to Michael Gove at the Department for Education, Cummings took aim at what he believed was a cosy agreement between Whitehall bureaucrats and local councillors to make life easy for themselves at the expense of the nation’s children. He broke the grip of local authorities over schools, but left behind a fragmented non-system of independent state academies, with opaque rules and accountabilities, and no mechanism for scaling up or replicating instances of excellence.

During the Brexit referendum, he pulverised Remainers, as head of the Vote Leave campaign. This was his masterpiece. Those who worked for him talk of his galvanising energy, generosity to colleagues, and ability to make the right decision in the teeth of internal opposition. In a wobbly film taken on an iPhone in the hour of victory, Cummings stands on a table, pays tribute to his team, and punches a hole in the ceiling (a scene recreated by Benedict Cumberbatch in the Channel 4 drama Brexit: The Uncivil War).

But then he looked on from the sidelines as Theresa May’s government threw itself repeatedly against a wall. His blog posts from this period are radioactive with anger. Having spent years detailing his low opinion of everyone in “SW1” – politicians, civil servants, the whole complacent, stupid, lot of them – he seemed genuinely surprised when they didn’t deliver, to his satisfaction, on the toughest governmental challenge since the war.

For all his ruthlessness, there is a kind of naivety to Cummings. He has a boyish reverence for mathematicians and physicists. He romanticises entrepreneurialism but displays little interest in the concerns faced by most businesses. He rages against Whitehall’s preoccupation with process over problem-solving, yet helped to precipitate an event that will see Britain’s government tied up in almost nothing but process for half a decade or more.

In 2014, I saw Cummings speak about his time in government. His speech sprinted through a series of loosely connected ideas from neuroscience, complexity theory and geopolitics, like an Adam Curtis documentary played at triple speed. He talked of a political system that “selects for narcissists”.

“Look around parliament. Who are the kind of people that get ahead? People who are glib, who enjoy public speaking, who make jokes.” Government, he said, is overly dominated by arts graduates who have no experience of managing large organisations. It needs fewer people who care about climbing the greasy pole, and more who “just want to get things done”. It’s hard to see how the answer to this problem is Boris Johnson. But then, I suspect Cummings has long seen Johnson as a useful vehicle awaiting a driver.

I saw Cummings speak again in 2017, to ad executives. After a fascinating insider’s account of the Leave campaign, he was asked whether the bus-side NHS claim was dishonest. Sheepishly, and not altogether coherently, he explained that the promise seemed credible to him, at the time, because he thought Johnson would soon be prime minister. He recalled sitting down with Johnson on the day of victory, at the Vote Leave office, and telling him to deliver on the promise. “He smashed his fist on the table and said, ‘Absolutely.’”

Cummings isn’t a right-wing radical – he rails against private sector bonuses and despises Nigel Farage. Rather than being anti-government, he wants a different kind of government: faster, fitter, future-focused. He is now at the centre of power for the first time, courtesy of a man who embodies everything he despises about politics. If he is at peace with that it’s probably because he sees an opportunity to set fire to the system that overpromotes people like Johnson. In 2014, he noted that Britain’s centralised power structure means that “if a group of people take over a party… you could actually change an awful lot, very quickly”.

His immediate political aims are to rout the parliamentary Remainers, defeat Labour, neuter the Brexit Party, and break with the EU, using whatever means necessary, even if it entails chaos and destruction. Nobody should bet against him succeeding. Afterwards comes the grind of governing and the long process of reshaping the British state. I wonder how long he will stick around for that.