Summary
Workspaces that still have legacy full-file root docs, especially AGENTS.md, can end up with duplicated DevClaw-managed content when newer tagged-block bootstrap logic normalizes those files.
This is a distinct migration bug: the file is no longer simply being overwritten, but the legacy managed content can be preserved and re-inserted as a tagged managed section, leaving duplicate instructions in the same root document.
Why this matters
The workspace-root guidance files are operator-facing and are loaded by OpenClaw. Duplicated managed instructions make the live guidance ambiguous and can cause validation checks like grep "You are" AGENTS.md to show duplicated policy lines where only one canonical managed section should exist.
Actual behavior
When DevClaw encounters a legacy full-file root doc and applies tagged-block normalization, the resulting file can contain both:
- the old legacy managed content, and
- the new tagged managed content
That leaves one document with duplicated DevClaw guidance instead of one normalized managed section.
Expected behavior
Legacy managed root docs should be normalized into a single managed section without duplicating the managed content. Existing user-owned content outside the managed section should remain intact.
Notes
Summary
Workspaces that still have legacy full-file root docs, especially
AGENTS.md, can end up with duplicated DevClaw-managed content when newer tagged-block bootstrap logic normalizes those files.This is a distinct migration bug: the file is no longer simply being overwritten, but the legacy managed content can be preserved and re-inserted as a tagged managed section, leaving duplicate instructions in the same root document.
Why this matters
The workspace-root guidance files are operator-facing and are loaded by OpenClaw. Duplicated managed instructions make the live guidance ambiguous and can cause validation checks like
grep "You are" AGENTS.mdto show duplicated policy lines where only one canonical managed section should exist.Actual behavior
When DevClaw encounters a legacy full-file root doc and applies tagged-block normalization, the resulting file can contain both:
That leaves one document with duplicated DevClaw guidance instead of one normalized managed section.
Expected behavior
Legacy managed root docs should be normalized into a single managed section without duplicating the managed content. Existing user-owned content outside the managed section should remain intact.
Notes