By Zahi Raifer
Zahi Raifer is a software developer with 23 years of experience in AI development, Python, .NET and databases, and the founder of Orivox. His background is product development, not sales.
Disclosure: this article was drafted with the help of an AI assistant and reviewed by the author. All facts come from Orivox's own description of its system.
An AI website editor does not need to be creative about identity. Every heading, section, button and form field on a live page already has an address. In Orivox that address is a stable data-ai-id on the element. The model may propose operations that point at those ids. It may not invent new ones.
That rule sounds small. It is one of the reasons an edit can be replayed, rejected, or undone without guessing what the model meant. This article explains why generated ids are dangerous, how we refuse them, and what owners see when a plan refers to an element that does not exist.
Why a fresh id is not a harmless detail
When a language model rewrites HTML, it is natural for it to emit a tidy tree with new identifiers: hero-2, cta-new, section-about-v3. Those strings look organized. They are also unmoored from the page that is already stored.
A new id has no history. It does not match the previous Git commit. It does not match a later "change the heading of that same block" request. If the first turn invented hero-2 and the owner later says "make the hero shorter," the second turn has to rediscover the block by shape or wording. Shape and wording drift. Ids should not.
Invented ids also hide mistakes. A set_text aimed at a fabricated id can be implemented by creating a new element instead of editing the one the owner was looking at. The page gains a second heading. The original heading stays. The owner thinks the tool ignored them, or worse, does not notice until a customer does.
What the planner is allowed to do
The closed operation list in Orivox can insert, move, update and delete nodes, but insertion does not mean "invent an addressing scheme." When a new block is required, the editing service allocates the id. The model describes the operation and the target it already saw, not the identity of the new node.
In practice the contract is:
- Every id in a returned operation must already exist on the snapshot the planner was shown, or be a blank the server will fill in after validation.
- The model may not choose the value of a new
data-ai-id. - The model may not rename an existing id. Renames break later turns and any tests bound to that element.
- If an operation refers to an id that is not on the snapshot, the turn is rejected. Nothing is written.
That last point matters more than a pretty error. A rejected turn leaves the live site untouched. A turn that "helpfully" creates the missing id has already changed the page in a way the owner did not request.
How we check it
After the planner returns a list, Python loads the same snapshot the model was given and walks every operation.
For updates, moves and deletes, the target id must be present. For insertions, the parent or sibling id must be present, and any id field on the new node is stripped and replaced by the service. We also reject lists that reuse an id twice in a conflicting way, or that try to move an element under a parent that the same list has already deleted.
Only after that pass do we apply the operations in memory, run the usual structural checks, and, if they pass, write and commit. The allocated ids are part of the commit, so the next turn sees them as first-class addresses rather than as leftovers of a model's naming style.
What the owner sees
If the model points at an id that is not there, the owner is told that the plan did not match the current page and that nothing was changed. They can look at the site and send the request again. We do not silently retarget the operation to a "similar" element. Similarity is how a phone-number edit lands on a testimonial.
If the turn succeeds and new blocks were added, those blocks already have server-issued ids. The owner does not need to know that. The next sentence they type can refer to the new block in ordinary language, and the planner will see the real addresses.
A short test you can run
The useful cases are unfriendly ones:
1. Ask the planner for a change, then alter the prompt so it includes a made-up id. The turn must fail, and the stored HTML must be unchanged.
2. Ask it to insert a section. Confirm the new node's id was not chosen in the model output, and that a second turn can address that node.
3. Ask it to rename an existing id as part of a "cleanup." That operation must be refused.
4. Replay a successful insert on a fresh copy of the pre-edit page and confirm the allocated ids follow the same server rule, not whatever string the model happened to prefer that day.
If any of those cases produce a live element whose id originated in the model text, the guard is not doing its job.
The lesson
Identity belongs to the document store, not to the language model. Let the model decide what should happen to a node. Let the editor assign and preserve the ids that make later turns, tests and undos possible. A tidy invented identifier is not a gift. It is a break in the chain that the next request will have to guess its way across.
If you want a practical look at how a chat-based editor is supposed to work from the owner's side, see this guide. Orivox is a free AI website builder for Hebrew- and English-speaking small businesses.
No comments yet. Say something kind.