Yeah Mark this is a tough one, I am working on a redo of the artifact internals:
Unstable edits have also annoyed me to no end. Still deciding how many knobs to provide.
I moved the system to an aider like Architect approach, the tool calls an LLM to perform the updates so it is able to do so far more reliably and there is no drift problem anymore. The downside though is that the new system can use more tokens cause there is a level of unavoidable duplication.
I may allow you to start with an existing artifact (have it clone it) if the artifact was shared publicly… will have a think about how we can swing this, need to be extra careful about security.