Then what is (and technically before the action) referring to?
If I understand what you are referencing, it has to do with the order of operations for resolving actions and any AoO that results from said actions. It's a game-ism that makes allowances for the fact that while "in reality" things are occuring simultaneously, in order for the game to run smoothly—an ironic statement considering the nature of the discussion, I do agree—things have to happen in a specified order so that we all don't go crazy trying to keep track of stuff.
In the case of casting a spell, "in reality" the AoO occurs while the caster is casting the spell; for the game, the player declares that a spell is being cast, the AoO happens, then the player casts the spell (after passing a possible concentration check).
In the case of a prone character, the player declares that they are going to stand up. The AoO happens, then the player stands up and removes the prone condition (this is why trip-locks arent possible—the prone condition isn't removed when the stand up is declared, it's removed after the character stands up.
In the case of moving, the player declares that they are moving. The AoO happens, then the player moves if able to do so. If tripped, no more movement is allowed if they've already moved any distance. If they haven't moved any distance, I personally would allow them to crawl 5 feet (which costs their entire movement rate, and would provoke its own AoO), otherwise they're stuck where they're at.