When a sports franchise falls apart, everybody spots it immediately. If guns are pulled in a locker room, feel free to draw an arrow pointing straight down. If a coach decides he needs to mortify a $100 million free agent who can’t pass a fitness test, that’s probably a symbol of systemic problems. If a team misspells its own name on its uniform, cover your eyes.

But when a team comes together, when a franchise that was recently awful is on the verge of becoming good — as the Washington Nationals are doing right now — that transformation is tougher to spot. Many factors must complement each other over a number of years. All of them together sneak up on you.

At a restaurant on Saturday, someone asked, “So, how good are the Nationals?”

“They’re even-money to be in a World Series in the next five years,” I heard myself say. Was that the drink in my hand doing the talking?

“How did that happen?” my friend said, shaking his head.

Well, it hasn’t happened yet, nor has an actual winning season. And the state of Stephen Strasburg in those years will change the odds on optimism. But many things, none monumental, but all essential, have conspired to give the Nats a fascinating future. The most important factor has been the collision of good decisions with amazing good luck. To rise from the worst team in baseball to possible contender, you need it all.

In three years, the Nats have been stunned by the sudden resignations of their general manager, team president and manager. All three times, the Nats ended up stronger, but in ways that were totally unplanned and unexpected.

Who knew Mike Rizzo had a master plan for team-building, even though he’d never articulated it, never formulated it, until he had the job?

Who thought the Lerners would spend more after Stan Kasten quit as team president than they had in all the years he lobbied and cajoled for much higher payrolls?

What Kasten could seldom sell to Ted Lerner, Rizzo has charted, graphed, argued and sometimes (respectfully) ranted until he, sometimes, gets his way. Under Rizzo, the Lerners signed contracts worth more than $300 million with Jayson Werth, Ryan Zimmerman, Gio Gonzalez, Edwin Jackson, Michael Morse and four over-slot amateur draft picks last June.

Who imagined that, just as Davey Johnson’s private life — including heart surgery — allowed him to consider returning to managing, Jim Riggleman would quit the job in a huff with his team on an 11-1 run?

Baseball is a culture that believes in mythology, momentum and a bit of magic. How’s this? The Nats traded Jonathan Albaladejo, Ryan Langerhans and Matt Capps — with a net present value of very little — for obscure players who ended up being all-star reliever Tyler Clippard, cleanup hitter Morse and catcher-in-perpetuity Wilson Ramos.

The Nats hoped that two of their middle infielders — any two, please — would somehow equal one double-play combination to erase memories of Cristian Guzman and Ronnie Belliard. Now, with Ian Desmond and 21-homer rookie Danny Espinosa entrenched in the jobs, they have to figure out what to do with Steve Lombardozzi and 2011 draft pick Anthony Rendon.

In three straight amateur drafts, they had stunning good fortune. When they tried to be lousy to get the No. 1 overall pick (’07), they were half-decent. When they wanted to improve (’08 and ’09), they were awful. The net result: They accidentally avoided players who might’ve been busts and instead ended up with Drew Storen, Stephen Strasburg and Bryce Harper.

Two seasons in a row, their best pitcher blew out his elbow and needed elbow ligament replacement surgery. Most recover, but plenty don’t. Jordan Zimmermann returned better than he had left: a top-10 ERA pitcher. And Strasburg returned to the mound in a year and touched 100 mph.

The Nats entered last off-season coveting aging free agent Mark Buerhle. Because they were outbid, they were still in a market for a staff ace when Gonzalez, far younger and with better stuff, was available. At the very moment the Nats’ farm system went from atrocious to top-ranked, they had exactly the four prospects they needed to land Gonzalez.

Just as the Nats thought their winter was finished, World Series starterEdwin Jackson, seeking a five-year $75 million contract, found himself alone in a buyer’s market, in need of a soft place to land for one year. His agent, Scott Boras, on fine terms with the Nats, did a quick $11 million deal and, suddenly, Washington’s staff went from strong to “contender worthy.”

The Nats even took a long shot chance on Chien-Ming Wang, who twice won 19 games for the Yankees, hoping he’d make an unprecedented recovery from experimental shoulder surgeries that left him with a dozen pins, screws and whatnot in his shoulder. It took two years and what looked like $3 million in wasted money. But, for now, Wang’s back and in the rotation.

How did all this happen? At least we know where it started.

Three years ago, GM Jim Bowden resigned under fire. Hamstrung by low budgets, he’d been reduced to dumpster diving. Rizzo took over — spotlight-shy, unschooled in negotiating with famous agents such as Boras and unaccustomed to the Bad Cop truth-teller role he would frequently be forced to play from the locker room to the manager’s office to the owner’s box.

But Rizzo was the first piece of a new foundation because he had unshakable confidence in his one area of expertise: scouting. The son of a career scout, he believed what he saw with his own eyes. And he knew everybody in baseball whose eye might be as good or better than his own.

Nothing beats simplicity — if it’s the right simplicity for the time and place. Bowden could talk you deaf. Kasten was polished. But Rizzo knew what he wanted: power arms on the mound, athletes up the middle of the diamond and “guys who can bang” on the corners. And he knew what he despised: selfish players, dumb players and anybody who lacked confidence.

Just as vital, he knew how he was going to get what he wanted. Eight months into the job, just a few days after teams were allowed to sign employees of other clubs, Rizzo announced that he had raided — sorry, signed — 17 people to fill 11 new full-time slots in his front office.

“We just had a great offseason,” he said. The future started there.

That rebuilt front office, with Roy Clark as right-hand man, has been the cornerstone of trades, over-slot amateur signings and free agent deals. Almost all have worked, except the biggest: Werth (so far).

To the general fan, a fast-rising team often looks suspect. The structure hasn’t passed its first weight-bearing test. It might collapse, right?

Fundamentally sound construction, of a home or a building, starts with a foundation, built below grade, which is easy to overlook. Yet it sets the stage for walls and a roof to leap upward so quickly it seems to happen overnight. The finishing work takes time, and will for the Nats, too. But the shape of the house is clear. Move-in day is three weeks away.