Skip to content

claude-md: cross-file conflicts + dead-rule checks; CLAUDE.local.md leak guard (0.13.0)#6

Merged
illinigirl merged 1 commit into
mainfrom
claude-md-conflicts-and-guards
Jun 22, 2026
Merged

claude-md: cross-file conflicts + dead-rule checks; CLAUDE.local.md leak guard (0.13.0)#6
illinigirl merged 1 commit into
mainfrom
claude-md-conflicts-and-guards

Conversation

@illinigirl

Copy link
Copy Markdown
Owner

The two remaining ideas from the memory-docs review — both folded into the existing claude-md pair (no new hook), per the earlier recommendation.

Curator hook — leak guard

When CLAUDE.local.md is edited but isn't gitignored, warn: that file is meant for personal/secret content (sandbox URLs, test data) and would be committed as-is. Uses git check-ignore, once per session, fails quiet outside a repo. (Refactored the debounce to be multi-key so the leak and budget warnings don't clobber each other's state.)

/claude-md-audit — cross-file checks

The audit now reads the whole loaded instruction set (root + parent + nested CLAUDE.md + .claude/rules + ~/.claude), not just one file, and flags two silent failures that live between files:

  • Contradictions — two instructions disagree (e.g. "use pnpm" vs "use npm"), so Claude picks one arbitrarily. Reports the conflicting pairs + a resolution.
  • Dead .claude/rules globs — a rule whose paths: glob matches nothing silently never loads (an expiring contract). Flags globs that no longer match.

Catalog

  • conflicting-instructions (judgment) — the docs warn about it explicitly.
  • dead-rule-scope (flag-for-review) — cousin of stated-not-derived-doc-facts.

Verification

  • claude-md-curator 18/18, including real git-repo fixtures (not-gitignored → warns; gitignored → silent; outside a repo → fails quiet).
  • All 6 hook suites green; ruff clean; manifests valid; claude plugin validate passes.

🤖 Generated with Claude Code

…ak guard (0.13.0)

The two remaining ideas from the memory-docs review, both folded into the
existing claude-md pair (no new hook).

- claude-md-curator hook: LEAK GUARD — when CLAUDE.local.md is edited but isn't
  gitignored, warn (it holds personal/secret content and would be committed).
  Uses `git check-ignore`, once per session, fails quiet outside a repo.
  Refactored the debounce to be multi-key so leak + budget warnings coexist.
- /claude-md-audit skill: CROSS-FILE checks over the whole loaded set —
  contradictions (CLAUDE.md / nested / .claude/rules disagreeing -> Claude picks
  arbitrarily) and dead .claude/rules globs (paths: matches nothing -> rule
  silently never loads). Reads the full instruction set, not just one file.
- catalog: conflicting-instructions (judgment) + dead-rule-scope (flag-for-review).
- README + plugin/marketplace -> 0.13.0.

Verified: claude-md-curator 18/18 (incl. real git-repo leak-guard fixtures);
all 6 hook suites green; ruff clean; manifests valid; claude plugin validate ok.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D6pwpBdoug4tJRxxVrNNeL
@illinigirl illinigirl merged commit 3403415 into main Jun 22, 2026
6 checks passed
@illinigirl illinigirl deleted the claude-md-conflicts-and-guards branch June 22, 2026 15:01
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.

1 participant