Port harness command to core

This isn't for merging (waiting on `diff`, at least) because it doesn't compile, but the main ideas of the rewrite are all here.