Two years into the coronavirus pandemic, at a time when local government meetings descend into shouting matches and teachers and public servants face threats on the job, some writers for young readers have taken up the question of repair.

What would it mean to restore a sense of community? To repair our civic life? To pull us out of this fractious and dangerous chasm that seems to widen by the week?

That question animates Minneapolis writer Kelly Barnhill's new middle-grade novel, "The Ogress and the Orphans."

The town of Stone-in-the-Glen was once a marvel. Its streets were lined with fruit trees, its civic life vibrant, its residents quick to help anyone in need.

But then a terrible fire destroyed the town's library. Not long after, the town's school also burned down, families began to flee and others began to hoard what little they had left.

At the town's Orphan House, four young people try to make sense of the loss. Anthea solves problems methodically, Bartleby is a philosopher, Elijah a storyteller and Cass a quiet fixer of what needs mending.

They have an anonymous ally, an ogress who has moved into an abandoned farm, who senses she's found a town where people need her and delivers treats to residents' doorsteps in the middle of the night.

But the town also has a mayor who speaks in glittering generalities, who basks in the worship of the crowd, who seeks problems that he alone can fix, and continually drums up donations for himself.

As the needs of the Orphan House and the town become more urgent, the mayor whips the crowd into a frenzy that leads them to target the ogress as a threat.

Barnhill tells her story in loops and layers, delighting in invention and magic, in the preening personalities of crows, the mysterious knowledge of cats, in oak trees that tell stories and libraries that hold an infinite number of books.

"I read once that books bend both space and time, and the more books you have in one place, the more space and time will bend and twist and fold over itself. I'm not sure if that's true, but it feels true. Of course, I read that in a book and maybe the book was just bragging," Elijah tells Anthea at one point.

At the heart of the novel is a question of good: neighborly good, civic good, the nature of good itself. Is good innate? Or does good depend on actions? And what if your actions overlook those you are helping?

Just as scarcity creates a spiral of suspicion and fear, the orphans — and townspeople — discover that good is also expandable, that the more they give, the more they have to offer.

Unlike the mayor, no one person has the answers, the orphans learn. But sometimes many small acts of kindness together can help chart a path forward.

Trisha Collopy is a Star Tribune copy editor.

The Ogress and the Orphans

By: Kelly Barnhill.

Publisher: Algonquin, 400 pages, $19.95.

Events: Book launch 6 p.m. March 8, Red Balloon, St. Paul, $24, register at https://bit.ly/3Me3sU7