diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 25c30c4..12e411f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -126,6 +126,16 @@ repos: require_serial: true fail_fast: true + # apm compile (target claude), a tool's project init or a skill can create a CLAUDE.md, and + # the failure is silent: the agent gets no guidance and no error. + - id: refuse-claude-md + name: Refuse CLAUDE.md files + description: refuse CLAUDE.md, CLAUDE.local.md and .claude/CLAUDE.md at any depth + entry: a CLAUDE.md file makes Claude Code ignore every AGENTS.md; delete it + language: fail + files: (^|/)(\.claude/)?CLAUDE(\.local)?\.md$ + stages: ['pre-commit'] + - repo: meta hooks: - id: check-hooks-apply