Investigator
https://docs.google.com/document/d/1uamjFPi0PDc3jfm8aQGbDv4tqQ-6xFXP/edit
https://www.reddit.com/r/Pathfinder2e/comments/n2ozem/investigator_archetype_martial_artist_or_assassin/ https://www.reddit.com/r/Pathfinder2e/comments/sl1tbn/what_is_the_best_build_around_the_assassinate/ https://www.reddit.com/r/Pathfinder2e/comments/slexz1/does_the_investigator_do_poorly_in_some_kinds_of/
https://rpgbot.net/p2/characters/classes/investigator/
https://www.reddit.com/r/Pathfinder2e/comments/slexz1/comment/hvrb7jn/?utm_source=share&utm_medium=web2x&context=3
It's a surprisingly solid class even ignoring Leads and Clue In completely. I'm not going to touch on the necessity of player and GM cooperation, because it seems like others have already gone over that.
One thing I haven't seen others mention is that it's the only class that becomes combat capable without any Dex or Str investment. Using Intelligence to attack, even if it takes an extra action allows your character to invest in some whacky stuff.
It's also perhaps the only class for which you can completely ignore the class feats. Pick up a Dedication at level 2 such as Pistol Phenom, Assassin, Wizard/Witch, Magus, Gunslinger, Beastmaster, etc.
Devise a Stratagem can be used to ensure a Spellstrike always hits, or any weapon with a reload doesn't miss. If your DaS rolls poorly, just don't shoot. Or, if your DaS rolls poorly just cast a spell instead.
The plethora of skill feats and increases ensures you're always going to be relevant out of combat as well.
And on this note:
What about a railroady pre-written adventure without any mystery? Can the investigator find its place there?
This is actually where the investigator shines most particularly because That's Odd and Red Herring are effectively just "don't let the GM get off track" cards.