swamp repo upgrade replaces entire CLAUDE.md with generic template instead of merging
Opened by swampadmin · 7/4/2025
Description
Running swamp repo upgrade from 20260228.015056.0 to 20260305.174423.0 replaced a 359-line project-specific CLAUDE.md with a 33-line generic swamp boilerplate template, destroying all existing project documentation.
Steps to Reproduce
- Have a repo with a customized CLAUDE.md containing project-specific documentation (architecture, commands, troubleshooting, etc.) alongside swamp sections
- Run
swamp repo upgrade - Observe that CLAUDE.md is completely overwritten with the generic swamp template
Expected Behavior
swamp repo upgrade should merge new swamp-specific content (rules, skills sections) into the existing CLAUDE.md, preserving all project-specific documentation.
Actual Behavior
The entire CLAUDE.md is replaced with a minimal generic template containing only swamp boilerplate (rules, skills, getting started, commands sections). All project-specific content is lost.
Environment
- swamp version: upgraded from
20260228.015056.0to20260305.174423.0 - OS: macOS (Darwin 25.3.0)
- Tool: claude
Summary
This bug affects the repo upgrade logic that handles CLAUDE.md updates. The fix would involve detecting existing CLAUDE.md content and merging new swamp sections into it rather than performing a full file replacement. This could be done by identifying swamp-managed sections (e.g., via markers or known headings) and only updating those, leaving the rest of the file intact.
Closed
No activity in this phase yet.
Sign in to post a ripple.