fix(lint): resolve E005 long functions, E331 redundant prefixes, and E010 deep nesting
Extract helper functions to reduce long function lengths across cwt, jsonwt,
ltp, matter, mbr, json-logs, and initramfs. Remove redundant find_/make_
prefixes in discovery.ml. Extract nested rm closure to reduce nesting depth.