From 2b63ced3f39917c86116d93663e0b5cfe45370d5 Mon Sep 17 00:00:00 2001 From: Joris Wouter Jonkers Date: Thu, 27 Aug 2026 12:17:45 +0200 Subject: [PATCH] chore: ignore agent worktrees so the repo is not permanently dirty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `.claude/worktrees//` is a full git worktree checked out beside the sources. It is machine-local agent scratch, several MB of it, and because it was untracked rather than ignored this repo showed as **dirty permanently** in `scripts/status.sh`. That matters less for the megabytes than for the signal: a workspace that is always dirty in the same places stops being a signal at all. It also produces phantom grep matches — a search across the workspace hits `.claude/worktrees/*/.github/workflows/*.yml`, which looks exactly like a real consumer. ## Why `.claude/worktrees/` and not `.claude/` Scoped deliberately. `agent-kit` and `personal-stack` both **track** `.claude/` content (Spec Kit commands, agent definitions — 32 and 22 files respectively). A blanket `.claude/` ignore would mean anything added there in future is silently dropped. Only the worktree subtree is machine-local. Refs JorisJonkers-dev/workspace#60 Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01PPnwbKr1Ex9iXAtv6TThAU --- .gitignore | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitignore b/.gitignore index 55b3611..55eccf8 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,10 @@ scratchpads/ .agents/skills/speckit*/ templates/**/.specify/ templates/**/.claude/commands/speckit*.md + +# Agent worktrees. `.claude/worktrees//` is a full git worktree checked +# out beside the sources; it is machine-local scratch, several MB, and being +# untracked rather than ignored it left this repo permanently dirty. +# Scoped to worktrees/ rather than all of .claude/ so tracked agent config +# elsewhere in the estate is not silently ignored. +.claude/worktrees/