Before you write the first page, be clear about who did it, how and why. The novel the public reads is the investigation, but underneath is another story, the crime itself, which has to stand up on its own.
Write that hidden story in a note or on its own timeline, separate from the investigation. With both in view you can check that what your detective uncovers fits what actually happened.





