https://scholar.harvard.edu/files/antras/files/gvc_ag_latest_draft.pdf Uses a Bellman equation. Could be a complement to Coase's theory of the firm lecture.