I slopped up my own basic version of this a few weeks ago that deduplicates Copy on Write usage on APFS - and with very similar ideas in a few places [albeit mine has MCP suggestions rather than a rule engine], but yours looks much prettier. https://github.com/timkrins/apdu