For 162 games the Yankees were a Transformer. Constructed by a chameleon. Painted by Jackson Pollock.

You could have played a near daily game of “Who is here today?” Is that Cory Gearrin or Tyler Lyons? Is Jonathan Loaisiga coming so the team could gauge where he is in his rehab or to start against the Blue Jays? I’ll take Kendrys Morales for $500, Alex.

Through 39 injured list stints covering an MLB-record 30 different players, Aaron Boone orchestrated chaos into cohesion. The cast changed, but not the focus, expectations or ambitions. The Yankees were a six-month fire drill, but Boone maneuvered the best out of the A-to-Z of his 54 players — from the Aarons to Zack.

So, of course, here in Month 7, Boone has become Joe Torre, circa the dynasty years. You remember the good old days when the Yankees lineup was as familiar as who was sitting at the stools in “Cheers.” This was back when starters started and relievers lined up in mostly anticipated roles.

After never deploying the same lineup for more than two straight games in the regular season, Boone — in ink, not pencil — offered the same nine names in the same nine slots at the same nine positions for the three-game Division Series sweep of the Twins. The only deviation played very much like Luis Sojo defending late for Chuck Knoblauch, with Cameron Maybin replacing Giancarlo Stanton.

So what can we learn from stability as the Yankees move to the ALCS?

1. Defense matters. The Yankees led the majors in runs. They brutalized pitchers with their ever-changing cast. But in the postseason defense is being prioritized. DJ LeMahieu is at first, Gio Urshela at third and Luke Voit anchored to the bench. Maybin is in late when the Yankees have a lead — though I bet this is a time when the Yanks wish they had the defensively excellent Mike Tauchman.

And the gloves mattered. The fundamentally adept LeMahieu, of all people, dropped a pop up in the second inning of Game 1. The Yanks then played the final 25 innings of this series error-free. But it went beyond that. The Yanks stole hits (Aaron Judge particularly was brilliant) and overall played their best defensive game in Monday’s clincher.

With no Dellin Betances, Domingo German or even CC Sabathia against the Twins, the Yanks were down to eight pitchers they trusted. Boone was aggressive in using his pen. So the fine glove-work limited the number of pitches/outs needed, which made having the shortened pitching staff more workable.

2. About that shortened staff, this is not going to work if Adam Ottavino does not get righties out. During the season, Boone would try to find whole innings with mainly righty hitters for Ottavino and lefties for Tommy Kahnle and his changeup. But the faith in Ottavino vs. lefties right now seems limited, and therefore his role is ever smaller. If he does not get outs, he leaves more for others and the jigsaw puzzle becomes tougher for Boone to assemble.

Boston manager Alex Cora came perilously close to running out of trustworthy pitching a few times last postseason, but never did and won a World Series. Boone is tempting that this year, especially pulling Ottavino so quickly. Ottavino walked Nelson Cruz in Games 1 and 3 and was gone.

The roles are defined. Rotation two times through a lineup and then use Ottavino for righties, Kahnle for heavily lefty portions, Chad Green as a jack of all trades to extinguish a threat or give an inning or give length, before Zack Britton and Aroldis Chapman finish. That Boone skillfully avoided overworking his main relievers during the season has him ready to use them every game, with a willingness to extend Britton and Chapman beyond the one-inning comfort zone. Think Torre with Mariano Rivera in October.

3. The starters are plenty important. There was wonder about openers. But James Paxton, Masahiro Tanaka and Luis Severino did Job 1 for these Yankees: Make sure no game gets away early. And really they were better than that. But Tanaka only got 15 outs in a game, Paxton registered 14, Severino 12. Every out is so precious this time of year, in part to lessen the burden on the pen.

Plus, pitching coach Larry Rothschild noted that with a best-of-seven now coming in the ALCS, the Yanks likely will have to deploy a fourth starter or opener at least once, so J.A. Happ’s importance is about to grow, and perhaps Sabathia will make it back from shoulder problems to provide outs.

About that stable lineup: It provided defense without conceding offense. In fact, this was an idealized lineup. The Yanks hit homers, but not at the expense of average (.297) or becoming overly strikeout prone. The top five of LeMahieu, Judge, Brett Gardner, Edwin Encarnacion and Gleyber Torres were most productive.

But the lineup got longer with Didi Gregorius’ bat awakening. Stanton had limited impact, but was not a flail machine, accepting walks when they were available. Gary Sanchez had just one hit in eight at-bats, but his plate appearances got better and often longer as the series progressed.

It was only three games. It was against the Twins, the Yankees’ personal piñata. But there was a steadiness to the Yankees’ work in every facet. After a season of personnel chaos, steadiness felt transformational.