> the patch's behaviour depends on the
layout
Arr ... that's right !!!
Still, it doesn't mean that the layout is mandatory. It just means that those infos should be extracted and saved somehow.
This should be pretty simple ... for example, if I think of inlets in a abstraction, I guess pd infers that inlets are numbered from left to right.
So what's the problem !? Inlets can be saved with their id :
{"type": "inlet", "id": 0}
What else do you have in mind ?