Classical Yang-Baxter equation and the $A_{\infty}$-constraint