Impromptu formations without a thorough briefing beforehand and a clear definition of the roles and responsibilities of all participating pilots are not legal.
Naz, do you have a legal basis for that statement?
....the only legal requirement is for all commanders to agree.
So the real answer to the question is, errr, No. The fact is that, in the UK at least, 'impromptu formations without a thorough briefing beforehand and a clear definition of the roles and responsibilities of all participating pilots' are legal, unless and until the resulting mid-air justifies a charge of reckless endangerment.