Respectfully, this isn’t how these things work. I sense you are misunderstanding how prototypes work. But, we have established to want aliases, not copies, and this helps.
Let us assume you have a prototype called ‘X’ for simplicity. Is your task that you want an alias of every note using prototype ‘X’? Or all such notes but only if within certain container(s)?
Without rushing to a—possibly wrong—solution, it sounds like you need an agent to generate aliases. Agents are containers and their children are aliases of any note matching the agent’s query.
The confusing part is how you describe the relationship with the prototype. The role of a prototype is, in simple terms is to customise various attributes for easy application to larger numbers of notes. Prototypes don’t ‘have’ agents.
But, here is a very simple example of the above:
We have a container of projects, ‘aa’, ‘bb’, etc. WE have two user prototypes ‘X’ and ‘Y’. Here the only customisation is a badge. You can see the of the 4 projects, 2 use prototype ‘X’, 1 prototype ‘Y’ and one uses no prototype.
Now an agent, totally unconnected with any prototype uses the query:
$Prototype=="X"
to create an alias of any note (in the whole document†) that uses the prototype ‘X’. As expected, it has just 2 aliases. They currently don’t sort in the same order as their original notes but that can easily be resolved by configuring the agent some more. The aim here is to the main idea.
Here is my test file: simple-agent1.tbx (131.0 KB)
†. By adding extra query terms, the scope could be narrowed, e.g. to only match notes inside the ‘Projects’ container.