  Recently an orthogonal basis of $\mathcal{W}_N$-algebra (AFLT basis) labeled
by $N$-tuple Young diagrams was found in the context of 4D/2D duality.
Recursion relations among the basis are summarized in the form of an algebra
SH$^c$ which is universal for any $N$. We show that it has an $\mathfrak{S}_3$
automorphism which is referred to as triality. We study the level-rank duality
between minimal models, which is a special example of the automorphism. It is
shown that the nonvanishing states in both systems are described by $N$ or $M$
Young diagrams with the rows of boxes appropriately shuffled. The reshuffling
of rows implies there exists partial ordering of the set which labels them. For
the simplest example, one can compute the partition functions for the partially
ordered set (poset) explicitly, which reproduces the Rogers-Ramanujan
identities. We also study the description of minimal models by SH$^c$. Simple
analysis reproduces some known properties of minimal models, the structure of
singular vectors and the $N$-Burge condition in the Hilbert space.
