From 12f3339972436a404e74666b4668552b51d40c40 Mon Sep 17 00:00:00 2001 From: Eduardo Speroni Date: Tue, 22 Sep 2026 16:16:09 -0300 Subject: [PATCH] chore: ignore AI agent local state and secrets Adds ignore rules for per-user AI coding agent files (Claude Code local settings and worktrees, Aider history, SpecStory transcripts, agent scratch space) and common secret files, while keeping shared agent configuration committable. --- .gitignore | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 96e627f0c8..2c4b2d2127 100644 --- a/.gitignore +++ b/.gitignore @@ -93,12 +93,41 @@ config/test-deps-versions-generated.json # build output /dist +# ============================================ +# AI agents: local / personal / ephemeral state +# ============================================ +# Keep committable: CLAUDE.md, AGENTS.md, GEMINI.md, +# .github/copilot-instructions.md, .claude/settings.json, +# .claude/commands/, .claude/agents/, .claude/skills/, +# .cursor/rules/, .cursorignore, .aiderignore, .aider.conf.yml, +# .mcp.json and .cursor/mcp.json (both expand env vars; keep tokens in env) + +# Claude Code +.claude/settings.local.json +.claude/worktrees/ +CLAUDE.local.md + +# Aider (listed individually so .aider.conf.yml can still be committed) +.aider.chat.history.md +.aider.input.history +.aider.llm.history +.aider.tags.cache*/ + +# SpecStory (writes full chat transcripts into the repo) +.specstory/ + +# Manually created worktrees +.worktrees/ + +# Agent scratch space (tell agents in CLAUDE.md/AGENTS.md to write temp files here) +.scratch/ +*.agent.log + +# ============================================ +# Secrets +# ============================================ # local secrets, filled in from .env.example .env .env.* !.env.example - -# Claude Code local state - worktrees and per-user settings. Ignoring the -# contents rather than the directory keeps shared settings.json committable. -.claude/* -!.claude/settings.json +.envrc