private static Node serializeBuildInfo(PluginContext context) {
        BuildInfo info = new BuildInfo();
        info.setProjectionName(context.getProjectionName());
        info.setProjection(context.getProjection().orElse(null));
        info.setValidationEvents(context.getEvents());
        Set<ShapeId> traitIds = getTraitShapeIds(context.getModel());
        info.setTraitNames(findTraitNames(context.getModel(), traitIds));
        info.setTraitDefNames(new ArrayList<>(traitIds));
        info.setServiceShapeIds(findShapeIds(context.getModel(), ServiceShape.class));
        info.setOperationShapeIds(findShapeIds(context.getModel(), OperationShape.class));
        info.setResourceShapeIds(findShapeIds(context.getModel(), ResourceShape.class));
        info.setMetadata(context.getModel().getMetadata());
        NodeMapper mapper = new NodeMapper();
        return mapper.serialize(info);
    }
Writes a build info file for each projection. This file contains the
projection name, the filters, mappers, and validation events encountered
while building the model.

<p>This plugin is invoked regardless of whether or not the model contains
error or unsuppressed validation events.

<p>This plugin is only invoked if the projection and original model are
configured on the provided PluginContext.
smithy-build/src/main/java/software/amazon/smithy/build/plugins/BuildInfoPlugin.java