diff --git a/sync-gbrain/SKILL.md b/sync-gbrain/SKILL.md index 45dc07ce8..48f003b22 100644 --- a/sync-gbrain/SKILL.md +++ b/sync-gbrain/SKILL.md @@ -1104,6 +1104,10 @@ if [ -f ~/.gbrain/config.json ] && \ fi fi gbrain delete "$SLUG" 2>/dev/null || true +# #2503: on worktree-pinned brains `gbrain put` can materialize the page as +# .md in the CURRENT directory (the user's repo), and `gbrain delete` +# removes the page, not the file. Remove the litter explicitly. +rm -f "./${SLUG}.md" 2>/dev/null || true ``` Then update CLAUDE.md based on capability state: diff --git a/sync-gbrain/SKILL.md.tmpl b/sync-gbrain/SKILL.md.tmpl index fa8becfd5..11471deb1 100644 --- a/sync-gbrain/SKILL.md.tmpl +++ b/sync-gbrain/SKILL.md.tmpl @@ -336,6 +336,10 @@ if [ -f ~/.gbrain/config.json ] && \ fi fi gbrain delete "$SLUG" 2>/dev/null || true +# #2503: on worktree-pinned brains `gbrain put` can materialize the page as +# .md in the CURRENT directory (the user's repo), and `gbrain delete` +# removes the page, not the file. Remove the litter explicitly. +rm -f "./${SLUG}.md" 2>/dev/null || true ``` Then update CLAUDE.md based on capability state: