  Building on our automated framework that uses ring diagrams for classifying
CP basis invariants [1], this paper broadens the application of the methodology
with more extensive examples and a wider scope of theoretical frameworks. Here,
we showcase its versatility through detailed analyses in the Standard Model
Effective Field Theory (SMEFT) up to dim-2n, and SMEFT with sterile neutrinos
({\nu}SMEFT) up to dimension-7. By integrating the ring-diagram technique with
the Cayley-Hamilton theorem, we have developed a system that not only
simplifies the process of identifying basic and joint invariants but also
enables the automatic differentiation between CP-even and CP-odd invariants
from the lowest orders. Additionally, this work presents a comparison of our
results with those derived using the traditional Hilbert-Poincar\'e series and
its Plethystic logarithm. While these conventional approaches primarily yield
the numerical count of invariants, our framework provides a complete structure
of invariants, thereby surpassing the limitations of these traditional methods.
