I spent part of the day digging topsoil for planting, and was wondering what the best way to clean dirt out of the groves in my shoes would be.
I have no idea what is truly 'the best way'.
I simply remove my shoes/boots and holding one in each hand, clap the soles together a few times. Then I leave them in the garage (or let's say in the mud room) overnight. By morning, residual mud has dried and shrunk enough that repeating the sole clapping effectively removes all the remaining soil. When I need to be really thorough, I then apply a dry scrub brush.
However, I suspect you are wanting a more immediate solution and some fashion of washing and clapping the soles seems to be required. With hiking boots, I look for a shallow puddle to step in, then stomp out - repeat. Then I look for a patch of moss of 'lawn' to use like a door mat. Logically, one could fill a plastic tub with about an inch of water and follow the same wade & stomp process.