Monday 30 July 2012 05.50 EDT
First published on Monday 30 July 2012 05.50 EDT

It's the morning after the opening ceremony. For two years I've felt constipated with secrets, but last night was a pyrotechnic act of confession, and I feel elated. At last I don't have to talk about "Betty" any more. Betty was the code name for Thomas Heatherwick's beautiful, delicate Olympic cauldron. She was named after the executive producer's dog. And so we were liable to get strange messages about "going to visit Betty" and "what to do if Betty malfunctions" and even "burning Betty". For the last two years I've been going round bragging about being the writer on Danny Boyle's opening ceremony. The usual response is: "Wow!" followed by: "Errrm, what do you mean?" Which is what I asked Danny when he first asked me. "I don't really know," he answered.

But he did know who he wanted. He put together a little team – including the designer Mark Tildesley, the costume designer Suttirat Larlarb, the visual effects wizard Adam Gascoyne. He'd worked with them all before and over the next two years they all worked on Frankensteinat the National Theatre and shot a film, Trance, together. They worked so closely they were practically a hive mind. My job was to join up the ideas in a way that the non-hive dweller could understand.

Danny created a room where no one was afraid to speak, no one had to stick to their own specialism, no one was afraid of sounding stupid or talking out of turn. He restored us to the people we were before we made career choices – to when we were just wondering.

We shared the things we loved about Britain – the Industrial Revolution, the digital revolution, the NHS, pop music, children's literature, genius engineers. I bought Danny a copy of Humphrey Jennings's astonishing book Pandemonium for Christmas and soon everyone seemed to have it. The show's opening section ended up named "Pandemonium".

On a trip to the House of Commons Danny was enthralled by the memorial plaque to the suffragette Emily Wilding Davison (it's on the back of the broom cupboard door where she once hid). The sash that she was trying to drape around the king's horse when she died ended up in the show. As did, bizarrely, the town motto of St Helens, where I was educated (it's "Ex Terra Lucem" – "out of the ground comes light").

If you're trying to celebrate a nation's identity, you have to take things that are familiar parts of the landscape and make them wonderful. On to the wall went GK Chesteron's great aphorism: "The world shall perish not for lack of wonders, but for lack of wonder."

Danny's blistering opening unleashed the energy and genius of the revolution – factories rising like fireworks. Suttirat Larlarb's beautiful dove bikes made me – and hopefully you – recall the thrill of first learning to ride, and how like flight that felt. There was a strangely carefree atmosphere. Because it was hard to imagine that this was really going to happen, it was easy to suggest the impossible – floating trees, a parachuting Queen, Voldemort versus Poppins.

Sometimes we exceeded our brief. I remember us discussing whether the ceremony couldn't start all over London and somehow converge on the stadium. I wrote a passionate plea to grow brambles and ivy over the outside of the stadium and create the hanging gardens of Stratford.

I see now that this was outside my job description. It was an oddly carefree time because it was impossible to accept that it was real. Trips to the site to see the work in progress – acres of dereliction, mountains of raw materials – only made it harder to imagine that it would ever really happen.

The end result of that first phase was an animated movie of what the ceremony would look like. To help keep it secret, there was only one copy. If you wanted to see it, you had to come to our studios. Even if you were Seb Coe. Or Boris. Or the prime minister.

And then it did get real. More people came on board – the galvanising presence of the musical director Rick Smith, the director Paulette Randall, the formidable producer Tracey Seaward, then the choreographers, and the thousands of volunteers. We all ended up back in our original disciplines – and I found myself writing everything… the brochure, even the stadium announcements. Danny was bringing it all to life and taking on the brunt of the bureaucracy. And he became Prospero – presiding over rehearsals that looked like huge raves.

With reality comes responsibility. Pretty well everyone feels some reservation about the Games – the money, the missiles, the McDonald's. For me, the issue was Dow's sponsorship of the stadium wrap. Dow are – to use a value-neutral word – connected to the terrible Bhopal disaster. Whatever the legal position, it was insensitive and tawdry to take their money. This isn't the place or the day – given the gorgeous experience we've been through – to go into the details of why this seemed so very wrong. You can look it up.

Danny set a meeting with Sebastian Coe, who graciously fixed up for Amnesty to speak to Locog's lawyers. But time was accelerating, and everyone was busy. Besides, something else was happening now: the volunteers.

Back in our studio, we had imagined flying bikes and rocketing chimneys. We never imagined the power of the volunteers. They were creative, courageous, convivial, generous. The press was full of stories of the greed and incompetence of our leaders, but our studio was full of people doing things brilliantly for nothing – for the hell of it, for London, for their country, for each other.

On a night of incredible rain, Danny got up and said: "I can't bear to ask you this but Rick needs to record a massive shout. Can some of you stay behind?" Hundreds stayed behind. When the press was trying to get some hint of what the ceremony would be like, they didn't breathe a word. Tens of thousands saw the technical rehearsals.

Danny could have asked for camera phones to be banned from the stadium or for people to sign confidentiality agreements. Instead he asked people nicely to save the surprise. "The volunteers are the best of us," he said. "This show belongs to them. This country belongs to them."

There's a dystopian aspect to the Olympic Park – the security, the Orwellian notices ("We are proud to accept only Visa") – but in the heart of it, Danny had built some kind of Utopia, a society run on goodwill. Which is of course how Olympic sports work. For every superstar Usain Bolt there are hundreds who have been carried there by the kindness and loyalty of family and friends. My nephew Alex – a prospect for 2016 – is one of them. As Danny wrote in his introduction to the brochure: "We can build Jerusalem, and it will be for everyone." He'll hate me for saying this but he has a very Catholic sense that yes, this is a fallen world, but you can find grace and beauty in its darkest corners – even if you chop off your arm to do so.

It made me remember the first carefree days when I blithely exceeded my job description, so I sat down and wrote a political invitation that pulls together some of the things I'd seen over the last few years – respecting a secret, tolerance of mistakes, the creation of a space where you can leave behind your roles. I've called it "The Dangerous Conversation". Danny said it was naive. I said: "That's what they said about the bikes, the Queen, save the surprise." "OK," he conceded. I've sent a copy to the Department for Culture, Media and Sport, Dow, the IOC. Like the audience in the stadium, I'm waiting to see what will happen.