Having generic attributes for any element, a SCRIPT which adds some elements could mark them with a special attribute.
This way, the same elements could be easily recognized as script artifacts, and so removed/changed by the same script running on any version of the board.
See for example, the TEARDROPS script: it could remove all added teardrops in a previous run in a previous version of the board, before adding the new ones.
(I am working on an enhanced version of teardrops to avoid track duplication, and I had this idea which wolud semplify it a lot).