Nicola Sturgeon took the SNP in a direction that was “really not going to work out” and became “obsessed with ideology, equality and gender form” during the period that Greens were part of the Scottish Government, one of her former cabinet secretaries has claimed.