It seems like it wouldn't be that tough to code using a combination of tpc/mpc, pull ratings, the oppossing batter, the inning of the game, and the current game situation.
It gets to the 7th and the engine starts to recognize that its time to think about pulling the starter. Its a tied game, it looks at the batter at the plate. Is he a lefty? OK, you're starters pull rating is high (lets say 4) so the engine decides its time to pull him. He first checks for a a LHS specialist that is available in the 7th. If he's there, the engine calls on him. After that at bat, the engine looks again at the next batter. Is this guy a righty? Does the LHS have a high pull count (lets say 4 again)? Then he automatically gets pulled for either a RHS or a setup/A. However, lets say the batter is a lefty, now the engine looks at his pitch count to decide if he needs to be pulled. Lets say he's pitched 6 pitches. His pitch count settings are 5/5; he's automatically pulled. However, if his pitch count settings are 5/15, the engine lets him stay for one more batter and the game continues forward.
I've seen others allude to there being a way to setup your bullpen so that a LHS will work. I kind of think this is possible, but I think it in order for it to work like you envision, we'd have to setup our bullpen in a way that few of us do. How many put our best reliever as a setup/A guy, available to come in during the 7th and pitch an inning or two w/ a low pull count? Something like that would preclude using a specialist.