@Override
    public List<ValidationEvent> evaluate(Differences differences) {
        List<ValidationEvent> events = new ArrayList<>();

        differences.changedShapes().forEach(changedShape -> {
            changedShape.getTraitDifferences().forEach((traitId, oldTraitNewTraitPair) -> {
                Trait oldTrait = oldTraitNewTraitPair.left;
                Trait newTrait = oldTraitNewTraitPair.right;
                // Use the breaking changes rules of the new trait.
                differences.getNewModel().getShape(traitId).ifPresent(traitShape -> {
                    List<TraitDefinition.BreakingChangeRule> rules = traitShape
                            .expectTrait(TraitDefinition.class)
                            .getBreakingChanges();
                    for (TraitDefinition.BreakingChangeRule rule : rules) {
                        PathChecker checker = new PathChecker(differences.getNewModel(),
                                traitShape,
                                changedShape.getNewShape(),
                                rule,
                                events);
                        checker.check(Node.from(oldTrait), Node.from(newTrait));
                    }
                });
            });
        });

        return events;
    }
Finds breaking changes related to when a trait is added, removed, or
updated based on the breakingChanges property of traits.
smithy-diff/src/main/java/software/amazon/smithy/diff/evaluators/TraitBreakingChange.java