Heegard, Little and Saints introduced in [8] an encoding algorithm for a class of AG codes via Gröbner
 basis more compact compared with the usual encoding via generator matrix. So, knowing that the
 main drawback of Gröbner basis is the high computational cost required for its calculation, in [12],
 the same authors introduced the concept of root diagram that allows the construction of an algorithm
 for computing a Gröbner basis with a lower complexity for one-point Hermitian codes. In [4], Farrán,
 Munuera, Tizziotti and Torres extended the results obtained in [12] for codes on norm-trace curves.
 In this work we generalize these results by constructing the root diagram for codes arising from certain
 curves with separated variables that has certain special automorphism and a Weierstrass semigroup
 generated by two elements. Such family of curves includes the norm-trace curve, among other curves
 with recent applications in coding theory.