and doesn't require a developer to interpret the results,
[...]
We could also invent codes for things like "I'm doing a pg_usleep because I've exceeded max_spins_per_delay" and "I'm waiting for a cleanup lock on a buffer" and maybe a few others.
In addition to the codes themselves I think it would aid less-experienced operators if we would provide a meta-data categorization of the codes. Something like, I/O Sub-System; Storage Maintenance; Concurrency, etc..
There could be a section in the documentation with these topics as section headings and a listing and explanation of each of the possible code would then be described within.
The meta-information is already embedded within the code/descriptions but explicitly pulling them out would be, IMO, more user-friendly and likely also aid in triage and speed-of-recognition when reading the corresponding code/description.