Chef currently loads all libraries, then all providers, then all resources, then all attributes, then all definitions.
This makes it awkward, difficult, and sometimes impossible for code in Cookbook A to depend on Cookbook B. For example, if Cookbook B defines a provider, and Cookbook A wishes to inherit the provider defined in Cookbook B, to make a subclass provider, that cannot be done in general.
The cookbooks should be sorted topologically first. Then the parts of any given cookbook should be loaded only after the entirety of all cookbooks it depends on have already been loaded.
The load order should look like this instead (pseuducode for Chef::RunContext#load):
let sorted-cookbooks = topologically-sort-cookbooks(cookbooks)
for each cookbook in sorted-cookbooks:
for each recipe in run-list-expansion: