It turns out that even though I put in a lot of work on tests just now, I didn't make much numerical progress. Basically, I had the type definitions for the ECS package spread out among the various modules, which turns out to not work well when they have all sorts of interdependencies. When I tried to actually import and test some of the new modules, it crashed repeatedly, and in weirder ways as I tried to work around it.
So, after I added some basic tests, I moved the type definitions to a single module, and tried to get them to mostly build on each other linearly.
That seems to have done the trick, so I'll try to polish off the rest later. Hopefully there'll be no weird hurdles waiting for me in the morning.