* [ ] Read through Phabricator and code bases for TODOs and previous attempts to rationalize sites.
* [ ] Read code for third-party wikifarm integrations, eg. Miraheze
* Miraheze has a custom extension https://github.com/miraheze/WikiDiscover as its source of truth. This manages a database table `cw_wikis`.
* They are running https://github.com/miraheze/MirahezeMagic/blob/main/maintenance/PopulateWikibaseSitesTable.php but would be happy to drop if unnecessary.
* Current working theory is that the WikiDiscover extension can provide a custom SiteLookup and configure that as the default sites service.
* [ ] Read MediaWiki-core sites code
* [ ] Read mediawiki-config wiki farm setup and scripts
* Source of truth are the dblist files which are modified using `composer manage-dblist`
* [ ] Read ext-Interwiki code
* [ ] Read ext-SiteMatrix code
* The source of truth comes from several places: `$wgSiteMatrixSites` defines the sister projects; languages come from mediawiki-config `langlist`, and whether or not a language-project (eg. "eswikibooks") actually exists is determined by whether it is listed in `all.dblist` which gets loaded into `$wgLocalDatabases`.
* [ ] Read ext-WikimediaMaintenance scripts