WIP / RFC: Modules

This is a WIP branch to work out a design for https://phabricator.wikimedia.org/T76883. Do not merge just yet.