Well, it looks like Paul Ryan can keep his job as Speaker after all

House Speaker Paul Ryan woke up Wednesday morning with a new chance to effectively remain in office and even expand his influence. What a difference from last week, when I wrote that Ryan would probably be better off stepping down as Speaker whether Donald Trump won or lost. Then Tuesday night happened, and not only did Trump win, but Republicans retained majorities in both houses of Congress. And most importantly for the Speaker, one of the states Trump surprisingly won was Ryan's home state of Wisconsin. That proved Trump and Ryan can be winners simultaneously, even in the same battleground state.

And both Trump and Ryan were not surprisingly all smiles when they met on Capitol Hill Thursday afternoon. Afterward, they spoke about all the work they're going to do together. And that makes sense, since a contrite and experienced Ryan is still a lot more useful as a partner than some neophyte Speaker no matter his or her level of Trump loyalty.

Ryan remains the best man on Capitol Hill to do some more behind the scenes politicking and push Trump's corporate tax plan. This is a signature policy Trump is relying on to create millions of jobs and even reduce the deficit. It is perhaps the last vestige of Ronald Reagan's legacy, and that makes it so important to what's left of the establishment Republican Party in Washington. If Trump can get this cut passed with Ryan's help, an essential healing process within the GOP will succeed.

But Ryan is going to need to do something else: endorse a Trump policy he has previously opposed. That's likely to be something connected to trade and/or immigration. Ryan has always spoken in favor of stronger border security, but now he's going to need to craft a real plan to "build that wall." Trump even mentioned immigration during a brief photo op with the news media after his Capitol Hill meeting with Ryan.

Helping Trump follow through on renegotiated trade deals and spiking the Trans Pacific Partnership for good will be harder pills for Ryan to swallow, but as they say, "elections have consequences."

And then there's the hardest job of all for Ryan: Winning over Trump supporters still angry with him for his weak and late support for the presidential nominee. These are the people Ryan is going to need even more than Trump does when the midterm elections roll around in 2018.

Ryan first addressed this issue during a news conference Wednesday when he vowed to make sure the GOP Congress hits the ground running as soon as Trump completes the Oath of Office. The anti-Ryan resentment along the Trump Train is real, but a lot of it will disappear over the course of two years if those years are dotted with some legislative accomplishments.

The conciliatory spirit Trump launched in his acceptance speech seems to have provided Ryan with that opening he needed to keep his job. And he's done everything right in the hours that followed by showing his eagerness to get things done. But doing an effective job relies more on Ryan remaining cordial with the White House.

The new power base in the Democratic Party is led by Senators Elizabeth Warren and Bernie Sanders, who aren't likely to join in any of the Ryan-Trump agenda when it comes to taxes and immigration. Sanders and Warren are, however, now both talking about how they look forward to working with Trump on trade and banking reforms like possibly repealing Glass-Steagall.

There's a danger in all of that for Ryan if Trump finds he can achieve his goals via a partnership with Senate Democrats that leaves the Speaker behind. But the Speaker does have the advantage of setting the legislative calendar, as opposed to minority party senators who will have to pick their issues on someone else's timetable.

But Ryan has to be one of the point people in finding some kind of common ground with that progressive Democratic wing. He might want to start with those trade policies and deals that Warren, Sanders, and Trump actually all oppose. Perhaps they can then move on to raising the minimum wage, another goal Trump has shown some interest in reaching across the aisle to achieve. But Ryan has to do something to avoid two or four years of filibustered gridlock in Washington.

Trump's clear victory and the almost equally as surprising GOP retention of the Congress have provided a deeply divided Republican Party with the perfect chance to start over with Ryan in a prominent role. Incredibly, given the historically nasty nature of this election, we might actually be seeing the ingredients of historic bipartisan cooperation and accomplishments on Capitol Hill.

Commentary by Jake Novak, CNBC.com senior columnist. Follow him on Twitter @jakejakeny.

For more insight from CNBC contributors, follow @CNBCopinion on Twitter.