-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
The Context Guard hooks (context-structural-change.sh, context-guard-stop.sh, context-commit-guard.sh) detect changes to .claude/rules/*.md as "structural changes" and trigger context drift warnings. However, only context-quality.md was excluded from detection — the other three ContextDocs/PitchDocs infrastructure rules fall through to the wildcard pattern and trigger false positives:
.claude/rules/context-awareness.md— context trigger map (ContextDocs infrastructure).claude/rules/docs-awareness.md— docs trigger map (PitchDocs infrastructure).claude/rules/doc-standards.md— doc quality standards (PitchDocs infrastructure)
Observed behaviour
In brand-copilot/main, the context-updater agent was launched to "fix drift" that was actually a false positive from modifying context-awareness.md.
Fix
Expand the exclusion patterns in all three hooks to cover all four infrastructure rule files. User-defined rules (e.g., .claude/rules/naming.md) continue to trigger reminders as expected.
Files affected
hooks/context-structural-change.shhooks/context-guard-stop.shhooks/context-commit-guard.shtests/test-hooks.sh(12 new test cases).claude/hooks/*(synced viascripts/update-installed-hooks.sh)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working