Relationship between swift-build, xcodebuild, and Xcode

By this, do you mean that swift-build (of SwiftPM) would build SwiftPM projects and that xcodebuild would build Xcode projects? Or can swift-build also build Xcode projects?

Do the higher-level clients store the PIF representation on disk, or is it stored only in memory?