Resources, producibility and economic dynamics: a framework