EXTRACT TO A REUSABLE FUNCTION WHEN:
[ ] The same logic is used (or will be used) in 2 or more endpoints
[ ] The logic is complex enough to be worth isolating and testing independently
[ ] The logic represents a coherent unit: "check workspace permission", "format user object"
DO NOT EXTRACT WHEN:
[ ] It is only used once and is simple
[ ] It is one or two steps that read clearly inline
[ ] Extracting would require too many inputs, making it harder to understand