You should look into how we figure out where the plugins should come from today. We already have code that figures out the plugin location order and your new plugin system should do the same.