Raymond Chandler’s 10 rules for writing a detective novel:
- It must be credibly motivated, both as to the original situation and the dénouement.
- It must be technically sound as to the methods of murder and detection.
- It must be realistic in character, setting and atmosphere. It must be about real people in a real world.
- It must have a sound story value apart from the mystery element: i.e., the investigation itself must be an adventure worth reading.
- It must have enough essential simplicity to be explained easily when the time comes.
- It must baffle a reasonably intelligent reader.
- The solution must seem inevitable once revealed.
- It must not try to do everything at once. If it is a puzzle story operating in a rather cool, reasonable atmosphere, it cannot also be a violent adventure or a passionate romance.
- It must punish the criminal in one way or another, not necessarily by operation of the law. … If the detective fails to resolve the consequences of the crime, the story is an unresolved chord and leaves irritation behind it.
- It must be honest with the reader.
That’s from Chandler’s notebooks. As it happens, Dashiell Hammett, Ronald Knox, and S.S. Van Dine all came up with similar lists. Mystery writers must be very methodical people.