Narrative causality as a detection technique
If you watch TV detective shows (CSI, NCIS, Law & Order, ...) then very often you can figure out who did it - or who actually did it, that quite often only being fully revealed after a lot of effort chasing/questioning/prosecuting/etc the ‘obvious’ suspect - simply by knowing the conventions of the show - sometimes as simply as counting characters and figuring out that the only point of a particular character's presence is to be the guilty party.
My suggestion, then: a story about a detective who knows that some such set of conventions apply to the world they're in and can therefore use them to figure out whodunnit (though of course, they would still have to find and interpret evidence, use interrogation skills, etc to actually construct a winnable case) simply by applying these rules.