The Celtics were not happy when Doc Rivers left in 2013.

Danny Ainge had hit the detonator on the club’s veteran foundation, an explosion that sent Paul Pierce and Kevin Garnett flying to Brooklyn. But the president of basketball operations had hoped he could accelerate the reconstruction project, and that plan leaned heavily on Rivers. If the Celts could strike a little gold in the lottery with their own picks and those of the Nets, then Doc’s reputation as a star-friendly coach might help lure some key free agents to town.

So even though Ainge was pleased to get a good basketball mind to replace Rivers, one key element of the rebuild had been lost.

Four years later, however, that notion has proven a colossal fallacy. A summer after Al Horford came aboard as a free agent and cited the presence of Brad Stevens in his decision, Kyrie Irving was pouring even more praise on his new coach in an introductory press conference with Gordon Hayward yesterday at the Garden.

Irving was not a free agent, of course, but he had to forgo a trade kicker in the range of $6 million to make his trade from Cleveland work.

He spoke of wanting to start working with Stevens, who cracked up his new point guard by interjecting, “I coached you in a game where we gave up 197 points.”

Actually, the East All-Stars surrendered a relatively paltry 192 in their 10-point loss to the West in New Orleans last February, but, be that as it may, Irving went on after he finished laughing.

“But now that I get to experience it firsthand, just how intelligent I’ve heard that he is as a coach — as well as his coaching staff — to understand how maniacal he is in terms of the finite details of maximizing what you can out of the players on the floor and looking at it scheme-wise,” he said.

Irving got a clue when he played against the Celtics, saying, “I picked that up in about two minutes that we were out in the game by the way they were running their plays. They were always two, three steps of, I’m going to give them credit, four steps ahead, because it’s a constant wave in the game. It can go up, and it can go down. And to understand those frequencies and to understand how you still exist in all that and get the maximum potential out of who you have on the floor, I mean, that’s coach Stevens. And that’s just from an observer standpoint.

“So the appreciation I have for his knowledge of the game, I just can’t wait to steal some stuff and honestly learn and grow with a guy like that, as well as the other coaches that he has that I can’t wait to meet. So this is an exciting time to have an outstanding coach like that.”

Hayward already had a strong idea of Stevens’ abilities, having played for him at Butler. But the free agent noted that while Stevens was something of a father figure back then, he now has two children of his own and things are a bit different. Still, he recalled Stevens’ part in a key point in his career.

“You know, I always had a dream to play in the NBA, but he was the first person that I think made me realize I could maybe get there one day,” Hayward said. “And so to be back and reunited with him again, I’m just beyond excited and can’t wait to get to work.”

Having done his part to help lure talent to the Celtics, Stevens now has to make it all work. He had gotten the club to 53 wins and a conference finals appearance last year, and Ainge discovered some leftover explosives. The scaffolding on the roster may not be entirely ready for removal, but as of now just four players remain from that team.

So Stevens has been running over rotations in his head all summer.

“That’s what you do all offseason is you’re thinking about it non-stop,” he said. “Usually a lot of your stuff you’re finalizing in early August, and there’s not that much significant change after that. But it’s a great challenge.

“This is part of the challenge of coaching, and probably the most exciting thing about coaching is the opportunity to put a team together. And it can only happen if your best players are guys that really want to be a part of something special as a group and appreciate in value what everybody brings to the table. And you’ve already heard the answers up here. So we’re starting off with a great foundation, and I think with these guys and Al and with some of our young players, I think it’s going to be a fun growth process.”

And though Stevens is, day to day, more about the improvement than results, he now has a team that will be expected to compete for the East title and achieve in ways more tangible than simply getting better.

“I think that that’s one of the things we talk about all the time is that each team’s its own entity,” he said. “And even when we’ve had more guys back and more continuity in the last couple of years, you’re still going into the season having to work on all the important things, all the things that add up to ultimately giving yourself just the chance to win. And I thought Kyrie’s answer was really good. We haven’t met yet. Obviously we’re still in the offseason where we’re limited in what we can do, and when we have our first team meeting when training camp begins, that’s going to be important, because we need to set the tone for building a foundation on both ends of the floor.

“As you know, the most important thing to me over the last few years is we all know in Boston what we’re shooting for. You know, that’s a given, right? That’s what you’re playing under, both in this facility and at the practice facility,” Stevens said, referencing the 17 championship banners that stare down at each court. “But ultimately the path is, are you getting better? And so the good news about our opportunity is that we’ve got a chance to go to work. We should be excited about our opportunities ahead. We’ve got a lot of good players in the room, and we’re all going to have to find out what role we can play in order to help us get better.”

It’s doubtful that any other coach could have done more than Stevens to get the Celtics where they are now.