Build a Python CLI tool named stack with two commands: stack load to read a JSON array of resources and store them in-memory organized by scope and type, and stack list <scope?> output-format=json to emit a JSON array of all resources of the given type from the specified scope and all deeper scopes (scope-collapsed view). Scopes are global, host, environment, os, appliance in that order, and omitting the scope means global.