What is the general rule for classifying factor that only shift one supply/demand curve or two supply/demand curve? What is the general rule in words/mathematical description for a factor that only shifts one supply/demand curve or two supply/demand curves simultaneously?

It is pretty confusing to me, because no single textbook I found had such a rule.
Treating supply and demand as functions that relate the price and quantity for a good, a variable that appears as a parameter in both functions will shift both curves. In macro and micro theories, the details of the model will determine what these are.

When we consider supply and demand with econometrics, the fact that prices and quantities affect each other through two processes (are jointly determined)  results in endogeneity problems. Wooldridge's Introductory Econometrics has an excellent chapter on simultaneous equations models.