Midst Toil and Tribulation by David Weber
Synopsis from GoodReads:
WAR AND FAMINE
Once the Church of God Awaiting dominated all the kingdoms of Safehold. Then, after centuries of stasis, the island kingdom of Charis began to defy the edicts of Mother Church–egged on, some say, by the mysterious warrior-monk Merlin Athrawes, who enjoys the Charisian royal family’s absolute trust.
What vanishingly few people know is that Merlin is the cybernetic avatar of a young woman a thousand years dead, felled in the war in which aliens destroyed Earth…and that since awakening, his task has been to restart the history of the long-hidden human race.
Now, reeling from the wars and intrigues that have cascaded from Charis’s declaration of independence, the Republic of Siddermark slides into chaos. The Church has engineered a rebellion, and Siddermark’s all-important harvest is at risk. King Cayleb and Queen Sharleyan struggle to stabilize their ally, which will mean sending troops–but, even more importantly, preventing famine. For mass starvation in Safehold’s breadbasket is a threat even more ominous than civil war…