We used to need this because the GitHub runner process was running under
Rosetta. GitHub Actions has supported native M1 runners for a few months
now, so I think it's time to remove this.
The main class you should look at is the {Formula} class (and classes linked from there). That's the class that's used to create Homebrew formulae (i.e. package descriptions). Assume anything else you stumble upon is private.