It was meant as an idea how to avoid the problems. I haven't thought a lot about the puzzle itself.
I mean it might be impossible to find a ruleset which exactly fits to your idea, e.g. because of the multiple instances of a prime number. But if you weaken the ruleset, it probably allows multiple solutions. Then the puzzle could be made unique by some given clues.
Then it's not the wanted description of the configuration which you have in mind, but a solvable puzzle.
I mean it might be impossible to find a ruleset which exactly fits to your idea, e.g. because of the multiple instances of a prime number. But if you weaken the ruleset, it probably allows multiple solutions. Then the puzzle could be made unique by some given clues.
Then it's not the wanted description of the configuration which you have in mind, but a solvable puzzle.