Skip to content

chore: exclude more local AI agent files from source and build artifacts - #21

Merged
ronag merged 1 commit into
nxtedition:masterfrom
ronag:claude/ignore-agent-local-files
Nov 8, 2026
Merged

ronag merged 1 commit into
nxtedition:masterfrom
ronag:claude/ignore-agent-local-files

Conversation

@ronag

@ronag ronag commented Nov 8, 2026

Copy link
Copy Markdown
Member

Follow-up to #19. Adds three more agent-local paths to the local AI workspace ignores:

  • CLAUDE.local.md: Claude Code's per-developer memory file
  • .gemini: Gemini CLI project state
  • .specstory: SpecStory's saved agent chat history

Apiiro's study of Claude Code's "Don't ask again" leak names agent folders and memory files like these as places that hold secrets, and found them leaking through npm packages and Docker images as well as git (summary). .claude/settings.local.json, the file at the center of that study, is already excluded here by the .claude rules from the earlier PR.

Changed: .gitignore, .dockerignore. No tracked file matches the new patterns, so source, package and image contents stay the same.

Validation on 20875f5a3b:

  • Root and nested copies of eight agent paths (the three above plus .claude/settings.local.json, .claude/worktrees/, .*-private, .cursor and .aider*) are excluded by git check-ignore in 39 directories and a real docker buildx context copy for 1 ignore file.
  • git diff --check passes.

🤖 Generated with Claude Code

Add CLAUDE.local.md, .gemini and .specstory to the local AI workspace
ignores in .gitignore, .dockerignore, .npmignore and package files
allowlists. Agent-local files like these can hold secrets that would
otherwise reach git, npm packages and Docker images.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified in the ignore-rule updates for the additional local AI-agent files.

No open issues 🎉

What changed in this PR

Updates Git and Docker ignore rules to exclude additional local AI-agent state from source and build artifacts.

Changes:

  • Adds .gemini, .specstory, and CLAUDE.local.md to .gitignore.
  • Adds recursive Docker exclusions for the same paths.
  • Preserves existing agent-workspace exclusions.
File Description
.gitignore Excludes the additional local AI workspace files from Git tracking.
.dockerignore Excludes the same paths recursively from Docker build contexts.

Review effort: Lite

@ronag
ronag marked this pull request as ready for review November 8, 2026 13:21
@ronag
ronag merged commit 02447e4 into nxtedition:master Nov 8, 2026
6 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants