Monsignor Ronald Knox drew up some rules for the Detective Club of the 1930s that included "No Chinamen, no ghosts, no identical twins". But perhaps we need a new set.
1. Do not make your female central character "deep" by giving her a drink problem.
2. Do not broaden your male central character by making him like post-1950 jazz.
3. Gawd blimey oh Reilly, guv, nobody shall talk in dialect, begorrah.
4. Give your detective a very dull, mainstream car.
5. Your single central character's orphaned, rebellious nephew/niece can be packed off to boarding school.
6. Your central character is a bit of a computer whiz, instead of leaving this stuff to a 20+ ex-Borstal boy or girl. Take the opportunity to educate your audience about saving their files in a folder on their hard disk and thence in the Cloud. "Still keeping 30 tabs open instead of using bookmarks, Sarge?"
7. Substitute a row of asterisks for sex scenes. *****
8. Never let your central character quote poetry to themselves. ("Those words of Keats came into her mind...")
9. Be as snobbish as you like about food and interior decor – the info will prove invaluable to future historians.
10. Whatever you do, don't try to be "timeless": be as specific as possible about this years's clothes, debates, psychological theories and intellectual fads. They'll prove invaluable to future comedians.
(I'd junk the interior monologue and tragic back stories, too. Your hero can claim he's too shallow to be depressed. Adopt the "I am a camera" mode of narration. Any autistic character must not be diagnosed with, and then cured of, PTSD. Plots must not be powered by historic witchcraft persecutions. Nobody "grows" or learns lessons. The book isn't an excuse to display your knowledge of Lebanese cuisine or Icelandic poetry. But I'd like a complicated booby trap as the murder weapon.)
Here are Knox's rules from the 1920s:
The criminal must be someone mentioned in the early part of the story, but must not be anyone whose thoughts the reader has been allowed to follow.
All supernatural or preternatural agencies are ruled out as a matter of course.
Not more than one secret room or passage is allowable.
No hitherto undiscovered poisons may be used, nor any appliance which will need a long scientific explanation at the end.
No Chinaman must figure in the story.
No accident must ever help the detective, nor must he ever have an unaccountable intuition which proves to be right.
The detective must not himself commit the crime.
The detective must not light on any clues which are not instantly produced for the inspection of the reader.
The stupid friend of the detective, the Watson, must not conceal any thoughts which pass through his mind; his intelligence must be slightly, but very slightly, below that of the average reader.
Twin brothers, and doubles generally, must not appear unless we have been duly prepared for them.