Those would be Gideon the Ninth and Harrow the Ninth by Tamsyn Muir.
For the last couple of years now, I’ve been telling everyone I can get my hands on that they should read Gideon the Ninth. It’s a story about space necromancers solving a locked room mystery and so much more. Also, the sword fighting is tops.
Harrow the Ninth is a much more difficult book to recommend. First, because it’s a sequel and Gideon is very much a prerequisite to reading it. (Although, now that I think about it, it might be an easier book to understand if you don’t have to wade through the murk of your Gideon preconceptions…)
Still, I’ve been more fascinated by these books, as experiments in fiction, than almost anything I’ve read in the last several years. Also, the writing is just stellar, if you’re into reading sentences of pure delight.
Am I gushing too much? Maybe. You’ll have to read and find out for yourself.