This US based definition fits perfectly with what I’ve always believed it to be:
Definition. Formation flight. A flight consisting of more than one aircraft which, by prior arrangement between the pilots, operates as a single aircraft with regard to navigation and position reporting, as well as clearances issued by ATC.
What I would like to know is if you pull up behind /near someone you know or don’t know, what distance is the legal minimum for separation?