With the end result being either the diffed output to a log or image, possibly outputting a list of the individual elements (channels, layers, etc.) and whether the histograms of each element match.
Example:
1. Document A is a TIF or PSD with multiple channels (RGB or CMYK/Spot color), multiple layers, text layers, etc.
2. Document B is expected to be an exact copy of Document A, but may have been slightly tweaked/adjusted.
3. Compare/Diff Doc A and Doc B down to the various elements:
- Color Channels, Alpha Channels, Spot Color
Or
- Layers, Text Layers, Etc.
4. Logging whether Doc A and Doc B are exact matches or have differences, and where the differences were found (channels, layers, etc.)
(I have written a jsx to diff Doc A and Doc B, but only if they have been flattened and diffed (blend mode) and then can either stop/alert or after running through a group of compared documents, logging which one are not exact matches.)