A Wizard's Guide to Defensive Baking is a 2020 young adult fantasy novel by Ursula Vernon, under her pseudonym T. Kingfisher.
When teenage bread wizard Mona discovers a corpse in her family's bakery, it triggers a chain of events that leads to her managing the city's defense against military assault, with the aid of animate gingerbread men and her familiar — a sourdough starter.
James Nicoll called A Wizard's Guide to Defensive Baking "an entertaining YA diversion that will encourage younger readers to consider just how easily they might be scapegoated by an ambitious politician," and emphasized that he would "enjoy" reading a sequel.
[1] Locus commended Vernon's "ability to craft engagingly quirky characters", and her portrayal of "a Pratchettian world where magic makes for a mostly amusing background, except when it doesn't.
"[2] In 2020, Locus named A Wizard's Guide to Defensive Baking among the best young adult novels of the year.