An unpublished report commissioned by Labour to explain its general election defeat savages its performance in the last parliament and implies the party may be heading in the wrong direction under Jeremy Corbyn if it wants to be re-elected.

The report - obtained by ITV's Political Editor Robert Peston and called "Emerging from the Darkness" - says "Labour negatives are deep and powerful".

It says crucial swing voters see the party as "nice" but "in thrall to the undeserving", "in denial" about its "appalling" track record on the economy, and with a former leader in Ed Miliband who was "weak and bumbling".

To rebuild Labour's reputation, it would need to "atone for its past", the report says, "redefine and revitalise its brand", "be for middle class voters, not just down and outs", "above all, be competent, especially on the economy" and "show it takes Scotland seriously".

Among so-called "quick wins", it recommends commissioning an independent review of the party's economic performance in government, "ideally headed by a Tory",

Or to put it another way, the report appears to say - though it does not express itself in precisely those words - that Labour needs to move back to the centre ground of politics, whereas Jeremy Corbyn has shifted it leftwards.

The report was commissioned by Labour's interim leader, Harriet Harman, from Deborah Mattinson and her Britainthinks polling consultancy.

Mattinson, who has provided advice to Labour for years, including to the former prime minister Gordon Brown, was asked to investigate the "underlying reasons for Labour's failure" in the election, identity "broad strategic remedies" and "develop a short term 'holding' strategy...to begin recovery".

Based on focus-group discussions with former Labour supporters who had switched allegiance to the Tories in England and the SNP in Scotland, it contains many troubling headlines for Labour, notably that "voters in England and Scotland alike decry Labour's 'dismal' track record on the economy".

These switchers saw it as "incontrovertible truth" that Labour in government had been "wasting money and spending money on wrong things", focussing "on people on benefits rather than hard-working families" and "bailing out banks with taxpayers' hard-earned money'".

They liked Labour's values, but they struggled "to say what those values mean in practice". In one particularly stark summary of views, the report says "nowadays Labour is the party for down and outs, not 'people like me'".

As for SNP converts, they saw Labour as "an incompetent version of the Tories".

The report contrasts how voters in Scotland "adored" Nicola Sturgeon - who they see as "different from all other politicians", as "someone they can relate to, who they can understand, and who tells it like it is" - with "weak and bumbling" Ed Miliband.

The report says - in a phrase that may have relevance to Jeremy Corbyn's current predicament - that swing voters saw Miliband's "top team being polite but raising eyebrows behind his back".

Among important long term aims set out by the report are for the party to establish new robust spending rules for government, "show Labour is not being taken for a ride by scroungers" and "have a clear and credible line on immigration".

For Scotland, it needs a "BIG leader" and should "consider rebranding Scottish Labour as independent".

The Mattinson report reminds me of a document I obtained in 1994 when working at the FT, the notorious Maples memorandum, which was also based on focus group analysis, on that occasion with disillusioned Tory voters. Written by the then Conservative deputy chairman, the late John Maples, it captured the growing disillusionment with the Tory party that would keep the party out of office for 13 years.

Mattinson's report was carried out in June, before Jeremy Corbyn was elected, and was based on interviews with 10 focus groups in Watford, Croydon, Nuneaton, Edinburgh and Glasgow.

All the interviewees were 30 to 50, in the C1/C2 class of lower management and skilled manual workers, and - importantly - in England they were Tory voters who had voted Labour in 2015, and in Scotland they were SNP voters who backed Labour in 2005 and 2010.

In other words, they represented the groups whose switch of allegiance made Labour unelectable in 2015 - and who need to be wooed back if the party is to reclaim power.

Last week Labour published its official analysis, carried out by the former cabinet minister Margaret Beckett, of what went wrong for the party.

It said that Jeremy Corbyn and his team should "approach with caution" some theories for the party's defeat, such as that the party had moved too much to the left, that it was out of tune with voters on deficit reduction, or that the party had become anti-business and anti-aspiration.

But Beckett acknowledged the party had failed had failed to "shake off the myth that we were responsible for the financial crash", that it failed "to convince on benefits and immigration" and that Ed Miliband "wasn't judged to be as strong a leader as David Cameron".

Broadly the Beckett report says that perceptions of Labour were wrong, rather than that it had the wrong approach and policies - and to an extent it blames media distortions.

Deborah Mattinson's evidence was given to the Beckett enquiry, but was not published - even though one of Mattinson's recommendations was that a version of her report should be put in the public domain,

Yesterday Mattinson told the BBC she saw Beckett's report as a whitewash and missed opportunity.