feat(gitignore): ignore Claude local artifacts in managed block#471
Merged
Conversation
Claude Code writes .claude/agent-memory/ and .claude/settings.local.json locally; agnostic-ai never emits them, so they had to be added by hand outside the managed block and a sync could drop the hand-added lines. Add an optional gitignoreHinter interface so an adapter can declare ignore-only paths it does not emit. The claude adapter contributes both paths (honoring outputs.claude.dir); sync folds them into the managed block for every enabled claude target. Target-scoped: a codex-only project never sees them. Closes #469
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #469
Problem
The managed
.gitignoreblock did not cover two machine-local Claude Code artifacts:/.claude/agent-memory/(agent memory store)/.claude/settings.local.json(per-user local settings)Both had to be added by hand outside the block, and a
agnostic-ai synccould drop the hand-added entries.Fix
gitignoreHinterinterface: an adapter declares ignore-only paths it creates but never emits. Mirrors the existingnativeOvervieweroptional-interface pattern.claudeadapter contributes both paths, honoring theoutputs.claude.diroverride.sync(text + JSON paths) folds the hints into the managed block. Target-scoped: a project that does not enableclaudenever sees them.Verification
GitignoreHints(defaults + dir override), hints folded into the block for claude, absent for codex/gemini.init+syncon a claude project emits both entries; a codex-only project emits neither.go test ./...),gofmtclean,go vetclean.Docs
docs/user/configuration.md: managed-block section documents target-contributed hints.CHANGELOG.md: entry under Unreleased / Added.