Implement a function to deep-compare two complex nested JSON objects representing annotation states, returning a minimal diff for HumanSignal.
Use def deep_diff(state_a, state_b):. Inputs contain only JSON values: objects, arrays, strings, numbers, booleans, and null. Return a list of operations with JSON Pointer paths. Emit one operation per changed object key or array index, recurse into matching objects and arrays, and replace a value when its JSON types differ. Each operation must contain path and operation, plus value for add or replace. Use remove without a value. Return operations deterministically.
def deep_diff(state_a, state_b):