How to layer control rig with a state machine?

Thank you for the explanation,

I tried it out. it seems that XYZ translate and rotate on the Z are working, But rotating on the X or Y create strange offset from the middle, and i’m not sure if that is my wrong setup or expected behavior, and how to overcome this so i can later apply it on a character