private/pkgcontains utility packages that are not Buf-company-specific. In theory, any of these packages could be split into a separate repository in the future, and not depend on Buf types or concepts.private/bufpkgcontains utility packages that are Buf-company-specific, but not specific to github.com/bufbuild/buf. These packages could be split into separate repositories in the future.private/bufcontains packages specific to github.com/bufbuild/buf. In other repositories, this should be named after that specific repository, for examplegithub.com/bufbuild/foowould containprivate/foo.
There's a strict dependency graph imposed at this level:
cmd/{binary}packages must bemainpackages, and any sub-packages must beinternal.cmd/{binary}packages can import from anyprivatepackage.private/bufpackages can import fromprivate/bufpkgandprivate/pkgpackages, but notcmdpackages.private/bufpkgpackages can import fromprivate/pkgpackages, but notcmdorprivate/bufpkgpackages.private/pkgpackages can only import from otherprivate/pkgpackages.
That is, the ordering is strictly cmd -> private/buf -> private/bufpkg -> private/pkg. This is enforced by linting tools.