In some of my positions, I try to make one/both sides have limited tempo...
For my other positions, the illegality is more focused on certain pieces and pawn structures...
You've also created some tricky positions where the solver has to prove a required castling would not be legal. I wonder if the same thing could be done for an en passant capture. I don't recall seeing one like that.
Guys can I ask how to you come up with these so random yet so hard positions? They're almost impossible to figure out let alone create.
I usually start with a main idea/structure that I want to implement on the board. For example, I had this pawn structure which featured a narrow bishop passage in one of my previous positions (#8765), and the idea was to prevent the bishops from swapping places. After this, I fill the board with pieces to limit the number of captures for each side, tightening the inventory.
In some of my positions, I try to make one/both sides have limited tempo - in this case, I trap the other pieces on the board to prevent them from providing tempo moves. Here, the closest tries to legality typically require certain "events" to occur when retracting moves (e.g. un-capturing a certain piece, retracting a pawn back a certain distance).
For my other positions, the illegality is more focused on certain pieces and pawn structures. This often involves some moves that must precede others (e.g. b3 or d3 must be played to free wBc1), creating a chain of moves one before another. The illegality would then be caused when the chain circles back on itself, creating the paradox of "which came first".