Last time I research about lock and key gameplay, something zelda is famous about (permanent key who open new area or small consumable key that open any locked door). We found out what was the basic rules so you never are block from carelessly placing keys. Both rule being sum up by the obvious "key to a locked an area must precede it in a reachable area" assuming area are organize in a tree with path being traverse in all direction, it's a tree because cycle degenerate with those traversal condition into duplicate path.
Another popular puzzle in zelda is flow control puzzle, either implemented explicitly (change what a path connect to as in the water dungeon in TP) or indirectly (time travel) but still functionally the same (you can only access one option at a time, you need to trigger between the two).
So I put a diagram above of all the case I found out: S being starting point, T the trigger to select a path (or selector), key represent action or item that open a lock, lock represent a passage blocked off and which need a key. Dotted line represent potential path, heavy line represent exit and plain line represent current path (the double dotted and plain is just a fail dotted). All graph represent the starting advised design pattern, 3rd graph is a synthesis of 1 and 2.
The resulting rules is simply that all area serviced by the trigger must have a possibility for the player to activate the graph else the player is blocked in that area (for example you activate the trigger and its now out of reach should not happen, considering that you never want the player blocked, however it can be used if for example it's a fail state in a puzzle or this is the last room with the exit and there is reason for not going back). It's useful to set up rules for procedural generation.
Is there pattern I missed? consideration I forgot?