Skip to content

docs(optimize): remove references to .claudeignore (#61) - #68

Merged
AgentSeal merged 2 commits into
getagentseal:mainfrom
lfl1337:fix/remove-claudeignore-references
Apr 17, 2026
Merged

AgentSeal merged 2 commits into
getagentseal:mainfrom
lfl1337:fix/remove-claudeignore-references

Conversation

@lfl1337

@lfl1337 lfl1337 commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Closes #61.

Background

As reported by @cpennington, the optimizer references .claudeignore as if it were a Claude Code feature. It is not — Claude Code has no documented or undocumented .claudeignore mechanism as of 2026-04-17.

Changes

  • detectJunkReads finding stays (it's a legitimate signal — Claude reading into node_modules, .git, etc. is real waste). The fix action changes from "create a .claudeignore file" to a paste-style suggestion asking the user to append a short instruction to their CLAUDE.md telling Claude to avoid those directories. That mechanism actually exists and works.
  • detectMissingClaudeignore finding is removed entirely. The whole detector's premise was "you have node_modules but no .claudeignore" — checking for the presence of a non-existent file is not a signal. Removed the function, its call-site, its four fs-tests, and two unit tests.
  • Unused constants (ESTIMATED_READS_PER_MISSING_IGNORE, MISSING_IGNORE_HIGH_THRESHOLD, MISSING_IGNORE_PATHS_PREVIEW, JUNK_DIRS_IGNORE_PREVIEW) removed along with their single caller.

Test Coverage

npx vitest run — 192/192 pass (was 198 before; six tests removed along with the finding they covered).

One existing test was updated: builds .claudeignore content from detected + common extras → suggests CLAUDE.md advice listing detected and common junk dirs, now asserts against the new paste fix shape.

Also in this PR

Small chore: .claude/ added to .gitignore (second commit). Agent scratchpads land there when working in this tree and should not be staged. Matches the existing pattern for docs/superpowers/.

Compatibility

  • No public API change.
  • Users who previously saw the "Add .claudeignore" finding will no longer see it. Users who previously saw the "Claude is reading build/dependency folders" finding will see it with a different fix suggestion.
  • No new dependencies.

lfl1337 added 2 commits April 17, 2026 08:32
Claude Code does not document or implement a .claudeignore feature.
The junk-reads detector's fix is now a CLAUDE.md instruction asking
Claude to avoid generated/dependency directories. The separate
detectMissingClaudeignore finding and its tests are removed; checking
for the presence of a non-existent file has no signal.

Closes getagentseal#61.
Prevents agent-scratchpad files under .claude/ from being accidentally
staged by tooling. Matches the existing pattern for docs/superpowers/.
@AgentSeal
AgentSeal merged commit 77257bc into getagentseal:main Apr 17, 2026
2 checks passed
@lfl1337
lfl1337 deleted the fix/remove-claudeignore-references branch April 18, 2026 18:49
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.

.claudeignore is not a claude feature

2 participants