Android development received a major boost with the 8.0 (Oreo) release. To quote from this article about what Project Treble and the Generic System Image (GSI) has enabled,
For custom ROM fans, a single system image is now capable of booting on different devices with different processors. The prospect is that we may be edging closer to a time where Android software can be easily ported across a range of devices, much like how Windows can run on a huge range of hardware configurations with minimal effort. But that’s not the goal of Treble at the moment.
Piggybacking from the changes in the Android architecture and using the AOSP (Android Open Source Project), it will be easier to take cues from online resources to begin producing Agama Mobile default install custom Android ROMS. Even digital ocean provides a tutorial for building a custom Android ROM!
The following architecture diagrams come from Android Authority (linked above) and the XDA Developers on Project Treble device support early on.