The wig-wag (rightly called the "control magnet assembly"), sits atop the tranny's sector gear. Whenever the motor runs, the transmission runs, which oscillates the sector gear, and thusly the wig-wag.
For agitation, the agitate solenoid energizes, which pulls the guide and pin upward. At the far-rear limit of its travel, the pin moves upward in the cam bar slot and then pushes the bar forward when the wig-wag oscillates forward. This performs two actions: 1) flips the flapper valve in the pump to seal the drain port (and opens the recirculate port for those machines that have a recirculation-type filter); and 2) moves a mechanism inside the tranny to engage agitation. Throughout agitation, the guide and pin ride in the upper slot of the agitate cam bar. When agitation ends, the process "reverses" to allow drain and disengage agitation.
For spin, the spin solenoid engages and pushes the spin cam bar back, to engage the spin clutch and disengage the basket brake.
So, there are three operational modes.
Neutral Drain: Both solenoids de-energized, both guides/pins ride in the lower slots of their respective cam bars, no spin, no agitate, the pump drains.
Agitate: Spin solenoid de-energized, guide/pin rides in the lower slot of the spin cam bar. Agitate solenoid energized, guide/pin rides in the upper slot of the agitate cam bar, pushing bar forward to engage agitation inside the tranny and switch the pump to recirculate mode (no drain).
Spin: Agitate solenoid de-energized, guide/pin rides in the lower slot of the agitate cam bar, tranny disengaged, pump in drain mode. Spin solenoid energized, guide/pin rides in the upper slot of the spin cam bar, pushing the bar back to release the brake and engage the clutch.