The Democratic party is currently presented with both a crisis and an opportunity, and its unfolding primary is about how best to respond.

The crisis is the Trump presidency. But so is the opportunity. Trump is a historically unpopular president who has galvanized the left to an extent unseen in multiple generations. Enthusiastic liberals and Trump-wary centrists propelled Democrats to a convincing win in the House of Representatives in 2018, and many are convinced that they can win the mandate for a program of sweeping progressive change in 2020.

Over the weekend, Barack Obama offered some advice on how Democrats can maximize their chances. In the most-quoted part of his remarks, the former president warned liberals against being overly rigid and setting up “circular firing squads” which took aim at other Democrats who strayed from “purity on the issues”.

As a clear warning to the party’s progressive wing, this section of his remarks made most of the headlines. But Obama didn’t stop there. He also warned progressives of the risk of giving too much away. What was also needed, he said, was “reflection and deliberation” on which principles were too important to be compromised. Rather than counseling timidity, his remarks were most of all a call for progressives to set priorities and plan realistically for how to obtain them.

Democrats need to heed both parts of Obama’s warning. We are currently in what has been called the “Twitter primary”, in which the candidates are trying to appeal to (and fundraise from) a relatively small number of highly connected and ideologically motivated voters. To do so, they have laid out a stunning array of progressive policy proposals, from Medicare for All to abolishing the electoral college. These policies are excellent at motivating the party base, and the achievement of any of them would be a major progressive achievement. But these policies aren’t all guaranteed to appeal to the wider electorate, and they are also far too ambitious to all be accomplished in a single presidency.

Because the candidates in the primary mostly agree on principles, the setting of priorities is how we can expect them to differentiate themselves from each other. This is where the risks of Obama’s “circular firing squads” become real. In three broad areas – identity, policy substance and political process – it will be hard for the party to avoid painful fractures which weaken its electoral prospects.

On the first issue, identity, the party is in the danger zone. Although conservatives love to pretend that the Democratic party has become completely consumed by identity politics, the two leading contenders right now are elderly white men. Female and minority candidates are struggling to break through. Women were vital to Democrats in the midterms, and Hillary Clinton’s failure to turn out African Americans in 2016 was a key reason for her loss. Whoever the nominee is must be convincing on gender and race without turning away the white male voters who the party also needs to win the presidency.

The second area, policy substance, matters less to the average voter than to the sort who is highly engaged in the Twitter primary. It is also the area in which what presidents can actually accomplish is most determined by political reality, particularly the composition of Congress. This means that while candidates should be judged on broad policy priorities, it is unwise to set up what Obama called purity tests in which candidates become anathema to segments of the party’s base for refusing to label themselves “socialist” or to endorse one particular variant of Medicare-for-all.

The final area, political process, is shaping up to play an unexpectedly large role in the primary. Trump’s election was a sure sign that many Americans have grown disillusioned with the way politics works in their country. Yet the Trump administration itself has been a den of corruption and scandal which has offered little respite. The space this creates for reform is exciting, and the nominee should push hard in this area.

Some candidates are already advocating abolishing the electoral college or getting rid of the filibuster in the Senate. Goals such of these are highly controversial and largely beyond the power of presidents to carry out on their own, and so – as with policy – candidates should not be punished for refusing to promise the impossible. But the nominee ought to endorse proposals similar to those contained in the proposed For the People Act of 2019 on campaign finance reform, ethics, and voting rights.

Of course, the political reality in which presidents operate is also in part a product of their own campaigns. An approach which is too timid risks throwing away what may be a rare chance to build a movement for progressive change. But too much inflexibility risks the same mistake.

Given the damage that Trump is doing to the country – and the likelihood that the Republican party will double down on Trumpism as a viable political strategy if the president is re-elected – the Democrats’ core priority, the thing they refuse to compromise on, has to be winning. It is too early to say which exact route will lead to victory. But to make sure they find it, the Democrats need a candidate who has the courage and political skill to build a movement around the goals which are achievable, the forbearance and credibility with the party’s base to drop those which are not – and the wisdom to know the difference.