Build mend, one patch tool for every AI edit format

@couotoo

mend: complete SPEC.md patch tool (4 formats, 3-tier matching, atomic writes); practice 100/100, 92 extra spec-sentence edge cases pass, Sent through the API