This is just a "complex real world app code" extension of the stdlib Diagnostics pattern.
% rg Diagnostics zig/lib/std | wc -l
165
The zig stdlib kind of has it easy because, for example, the json module can have one schema for error diagnostics. An app that stitches together a bunch of libraries and has a few internal modules is going to want some different Diagnostics schemas for different errors, and sharing those schemas and bubbling them up, so that's just what this is.