diff --git a/lib/src/daemon/project_commands.dart b/lib/src/daemon/project_commands.dart index f50cebc3..30a1b117 100644 --- a/lib/src/daemon/project_commands.dart +++ b/lib/src/daemon/project_commands.dart @@ -84,7 +84,7 @@ void _writeScaffold(String dir, String name) { // Claude with an empty CLAUDE.md stub. No language/framework templates. Never // clobbers — safe to run over an existing folder (T-489). final gitignore = File('$dir/.gitignore'); - if (!gitignore.existsSync()) gitignore.writeAsStringSync('# clide\n.clide/\n'); + if (!gitignore.existsSync()) gitignore.writeAsStringSync('# clide\n.clide/\n.worktrees/\n'); final claudeMd = File('$dir/CLAUDE.md'); if (!claudeMd.existsSync()) claudeMd.writeAsStringSync('# $name\n\nGuidance for Claude Code in this project.\n'); } diff --git a/lib/src/files/ignore.dart b/lib/src/files/ignore.dart index 7d2d35e5..8c8c5157 100644 --- a/lib/src/files/ignore.dart +++ b/lib/src/files/ignore.dart @@ -162,5 +162,7 @@ class IgnoreSet { /// ignore files. Matches D-004's "walker magic: none except /// `.git/`" — but the tree-view UI benefits from hiding `.pql/` and /// `.dart_tool/` too since users never edit those by hand. - static IgnoreSet builtin() => IgnoreSet.parse(const ['.git/\n.pql/\n.clide/\n.dart_tool/\nbuild/\nnode_modules/\n']); + /// `.worktrees/` holds in-repo linked worktrees (D-106) — sibling + /// checkouts a user opens as their own workspaces, not tree content. + static IgnoreSet builtin() => IgnoreSet.parse(const ['.git/\n.pql/\n.clide/\n.dart_tool/\n.worktrees/\nbuild/\nnode_modules/\n']); }