Package cmdregistry provides a self-registration mechanism for Cobra
subcommands. New command packages call Register (typically from init()) so
they appear in the root command without editing root.go.
The package exposes both an instance-based Registry (useful for testing) and
a package-level global (used by production init() registrations).
All returns all commands registered in the package-level global registry,
sorted alphabetically by Use. Called once from root.go after the fixed
AddCommand block.
All applies every registered builder to f and returns the resulting commands
sorted alphabetically by Use. The sort is deterministic regardless of init()
order, which varies across build systems and test binaries.