Lets remote the alloy.core dependency, instead lets create a command handler for upgrade that the command handler takes one parameter which is the project to upgrade.  Then have the upgrade action from the project.core invoke this handler by ID instead of using API.