Why a patch beats a side-by-side diff
A textual diff of two JSON files is noisy — reordered keys, reindented blocks, and trailing commas all light up even when no data changed. A JSON Patch diff compares the parsed data, so formatting differences vanish and only real changes remain: each one an operation with a precise path like /goals/1/target. The output is also executable — every mainstream language has an RFC 6902 library (fast-json-patch in JavaScript, jsonpatch in Python), so the same document that explains a change in a pull request can apply it in a migration script.
How arrays are compared
Array elements are matched by index: element 0 against element 0, and so on, with removals and additions emitted for length differences. That means inserting an item at the front of a list reads as a chain of replaces plus one add — technically correct and fully applicable, just more verbose than a human would write. This generator emits add, remove, and replace; it does not synthesize move or copy operations, which are optional optimizations under the RFC and are never required for a valid patch.