In November 2014, an email pinged into Luke Martineau’s inbox from Alice Peterson, someone he had never heard of. Peterson explained that she was a writer and had been inspired by the life of Luke’s sister, also called Alice, who had died in 2003. She wanted to make Alice the subject of her next novel, to recreate her in fictional form – although, obviously, she couldn’t touch this without the blessing of Alice’s family. Would they be prepared to meet?

Naturally, the Martineaus were a little wary. “I wasn’t sure. I couldn’t imagine it,” admits Liz, Luke and Alice’s mother. “My first thought was: ‘Would I like it?’”

Luke says: “I did need to know who this Alice Peterson was and what her books were like, but mainly I thought: ‘Wouldn’t that be wonderful?’”

Alice Martineau was born in 1972 with cystic fibrosis – her parents, Liz and David, were told that her life expectancy was about 10 years.

Cystic fibrosis causes a build up of thick, sticky mucus in the lungs, digestive system and other organs, and leads to lung infections and reduced lung function – as well as a long list of other debilitating conditions. It’s inherited – if both parents carry the gene, as Liz and David did, their children have a 25% chance of having the condition. (Luke, born two years earlier, does not have it.) Although Alice enjoyed a happy and relatively normal childhood in west London – albeit with vast quantities of medication, a special diet and daily physiotherapy – by her late teens and early 20s, her illness was escalating, encroaching, fighting for space.

Despite her regime of nebulisers, intravenous antibiotics and physio, as well as regular stays at the Brompton hospital, Alice powered on, refusing to give her condition a minute more than she had to. She was unable to live independently, but her parents converted the basement into a separate flat. She studied English literature at King’s College London, graduated with a first, then pursued a singer-songwriter career, finally landing a record deal with Sony in 2002. By then, she was on the waiting list for a triple transplant – heart, lungs and liver. Alice died the following year, aged 30, shortly after the release of her album Daydreams.

Back then, Peterson, just two years younger than Alice Martineau, had followed her story, bought her album and been saddened by her death. Fast-forward 11 years, and she was an established writer searching for a subject when the name Alice Martineau had suddenly re-entered her head.

Alice’s parents, Liz and David, and her brother, Luke. Photograph: Graeme Robertson/The Guardian

After meeting Peterson and reading some of her books, the family agreed to share their daughter’s life. “We had many happy hours chatting around the table. Entire mornings would go by,” says Liz. “Taking my mind back all those years almost brought back things I had forgotten.” David, a retired judge, says: “That’s why we supported it so strongly. We could bring Alice back into our lives again.”

Parts were painful. The family gave Peterson old photo albums, scrapbooks and camcorder footage they had not looked at for years. “There was one scene on the camcorder that’s recreated in the book, where Alice spent a few days in Claridge’s to celebrate her record contract, partying like a rock star,” says Liz. “She really was very poorly by then. Goodness knows what Claridge’s thought when she arrived with her entourage – her boyfriend, her wheelchair, her oxygen cylinders and full-time physiotherapist paid for by Sony.”

Luke says: “The illness is so gradual, like your children growing up. You get used to it, it’s almost normalised. Looking at the footage now, you cannot fail to be struck by how ill she was. That was hard to see.”

The family also handed Peterson Alice’s lyric book – handwritten, almost like a diary. “That was very raw,” says Luke. “All Alice’s songs were quite personal – about not being able to breathe, or being worried about death, or feeling alone. Music was her way of expressing some very dark thoughts because, generally, Alice was positive, funny, upbeat, even though this horrible illness was dragging her down physically all the time.”

The next stage was to put Peterson in touch with everyone else from Alice’s world – her friends, her consultant at the Brompton, her physiotherapist, her nurse, her voice coach and, key to the book, her boyfriend, Al. They were together for the last four years of Alice’s life and their relationship forms the beating heart of the book.

Alice and her mum.

Al – Tom in the novel – had fallen in love with someone with a very uncertain future when both of them were in their 20s. Their friends were getting engaged and beginning their adult lives. Tom had a dream of living by the sea and one day being a dad, but the couple lived in the shadow of cystic fibrosis. On top of that were the regular – almost routine – life-and-death dashes to hospital and, on a good day, the sheer time and effort it took before Alice could leave the house.

“They did separate for a while and that’s in the book,” says Liz. “Alice was absolutely devastated but I really appreciate how hard it was for Al – imagine taking on all that. Gradually, he realised he couldn’t be without her.”

Happily, Al has since married (and lives by the sea) but remains close to the Martineaus – Luke is godfather to one of his children. “Through the whole process of this book, I’ve been most anxious about Al,” says Luke. “For us, the book is a lovely way of remembering Alice because our relationship with her hasn’t changed. Al has a different life, a family, and we’ve tried to be sensitive to the fact that he might not want to bang on about Alice in the way we do. He has been so generous and so has his wife – and I’m very pleased he did agree to it. It’s a love story – more about Al than any of us.”

Peterson worked on the project for 18 months, weaving her research into a narrative, before presenting the family with a manuscript.

“I was nervous,” says Luke. “I’m an artist and paint portraits – among other things – for a living. It’s a slightly strange moment when it’s time for the subject to see themselves as handled by someone else. You always worry. It’s a painting in the end – it’s not the person.

“I knew there would be things that Alice would never have said, there are composite characters, and parts that are entirely fiction. But the main body was completely true. I wanted to know it was recognisable of us and of Alice – and it was. She got the tenderness of my relationship with her, and our closeness as a family. The novel form makes it readable, more involving than a factual biography. It’s emotionally gripping.”

A Song for Tomorrow is packed with real details – from Alice’s family nickname (“Leech”), to her favourite foods, real conversations and remembered scenes.

What’s striking, though, is her sheer lifeforce. Although the reader can sense time running out, cystic fibrosis is in the background. Alice doesn’t dwell on it. There’s no self-pity, just forging forward.

“That was Alice,” says Luke. “She was feisty – people with cystic fibrosis have to fight for breath from the beginning, so it’s absolutely ingrained. She didn’t talk about death or ‘the end’, there were no ‘big conversations’ and she hated being called ‘brave’. The only way you can live in those conditions is to maintain the sense of life going on. For us, the book is another way to help keep her alive. But if just one person with cystic fibrosis reads it and thinks: ‘I’m going to bloody well be an actress – or do my thing, whatever it is’ – then it has made a difference.”

In A Song for Tomorrow, Alice’s death is sudden. There’s no build up – it’s one March morning like any other. Tom has stayed the night and gone to work. The builders are in, her mum has brought breakfast on a tray, Alice’s mind is on a magazine interview scheduled for later that day. Suddenly, she’s coughing up blood, losing sensation, fighting for breath. The end is very quick.

“It was like that,” says Luke. “A shock but not a surprise. The death bit of the book was the part I was most anxious about. But I have to say, reading it was the only time I cried.”

David says: “I think it’s the best bit of the book actually. It’s the most emotional, quite poetic.”

Peterson ends with an incident from Alice and Luke’s childhood as a metaphor – a bird being set free. “It happened on holiday in Portugal,” remembers Liz. “Luke was eight, Alice six, and this sobbing Luke came into our room in the night and said: ‘Mummy, there’s an eagle in our bedroom!’ I went in and it was quite a big owl above the door – Luke could just see its claws. Alice wasn’t frightened at all! Somehow I got this poor thing wrapped in a towel, we went to the balcony and I released it. We watched it sail off down the valley.”

Luke says: “I’m so glad it was included because that image has always stayed with me. It showed how good Mum was at handling a difficult situation – and in my mind, it was very connected to a lovely letter a friend wrote to Mum after Alice died.

“She wrote: ‘The most amazing thing you did for Alice was to allow her her freedom. It must have been so instinctive to want to protect her and keep her wrapped up in cottonwool, but you really allowed her to fly. And how she flew.’”

• A Song for Tomorrow by Alice Peterson is published by Simon & Schuster, £7.99.

Cystic Fibrosis Trust helplines: 0300 373 1000 or 020 3795 2184