Working with page types programatically

Where is the documentation that covers how to do everything on this page programmatically? Putting it All Together Create the Page Type :: Concrete CMS

For example, what if we want to do everything here on upgrade instead of install? Also, using the migration tool to generate the CIF that should be used on install doesn’t even work since the migration tool can’t be installed.

This entire page infuriates me. Nearly everything on this page belongs in the User Guide, not the dev docs. The user guide should document everything that can be done in the gui. Developers need to know how to do it with code, not the gui. This entire page is completely useless if it doesn’t tell you how to do it on upgrade and if it doesn’t explain how to do it as a developer.

Also, the screenshots do not even match the look of the current admin gui so that part needs to be updated.