There have been a number of posts on related questions, such as: Geometric interpretation of Cartan's structure equations, What is the geometric significance of Cartan's structure equations? and Maurer-Cartan structure equation derivation.

While my question is related, it is I hope a bit more specific. I am trying to learn some of Cartan's methods, and getting a little confused, because they all seem to be closely related, so that differentiating between them is difficult for me.

I would like to think of Cartan's structure equations this way. You start with an adapted co-frame and apply d, then express the results in terms of old data (the co-frame), but while respecting the Lie algebra. This gives 2 new things, the connection 1-form, and torsion. We then apply d again, and express the results in terms of "old" data (maybe while respecting an underlying Lie algebra).

I am trying to make sense of this. It seems that this is the same process than the one used in Cartan's equivalence method. Am I right? So torsion is the first "invariant", which could be used to compare 2 different geometric structures locally, while curvature would be the next "invariant".

But what is the relevant EDS perhaps? It seems that we are building something recursively, so I am a little confused. Perhaps we need to go to infinity, to see the whole structure, right? As in, using infinity-structures, like Urs Schreiber seems to be suggesting, in the second link above. Can someone please comment or answer my questions?

Edit: after some thinking, and reading a good chunk of Olver's book "Equivalence, Invariants and Symmetry", here is my current understanding of Cartan's structure equations. Let's say you have a Riemannian manifold $(M,g)$, and let $(\theta^i)$, for $1 \leq i \leq m$, with $m=\dim M$, be a smooth local orthonormal coframe. Applying $d$ to the coframe gives our first set of "invariants" (or perhaps I should write $O(m)$-invariants). That the first set of "invariants" is nothing but the Levi-Civita connection is the meaning of the first structure equations. We then apply $d$ a second time, and get a second set of "invariants". That this second set of invariants can be broken in 2 parts, the first quadratic in the Levi-Civita connection and the second one nothing but the curvature of $g$, is the content of Cartan's second structure equation.