mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-08-20 09:48:00 +00:00
chore(agents): load AGENTS.md in Claude Code and guard its rules
Claude Code discovers CLAUDE.md but not AGENTS.md, so the contributor instructions were loading for nobody. The import shim is what our own docs already recommend to users in docs/edge/en/guides/coding-tools/agents-md.mdx. The PreToolUse guard enforces only rules already written in CONTRIBUTING.md and AGENTS.md, so it adds no policy of its own. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ASfWmW3RGy4qAQm6s8U9jH
This commit is contained in:
@@ -61,6 +61,18 @@ repos:
|
||||
language: system
|
||||
pass_filenames: false
|
||||
stages: [pre-push, manual]
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: agent-guard-hook
|
||||
name: agent-guard-hook
|
||||
# --confcutdir keeps the root conftest out: it assumes every test lives
|
||||
# under lib/<package>/tests/, which these do not.
|
||||
entry: >-
|
||||
bash -c 'source .venv/bin/activate && uv run pytest
|
||||
.claude/hooks/test_guard.py -q --confcutdir=.claude/hooks'
|
||||
language: system
|
||||
pass_filenames: false
|
||||
files: ^\.claude/hooks/
|
||||
- repo: https://github.com/commitizen-tools/commitizen
|
||||
rev: v4.10.1
|
||||
hooks:
|
||||
|
||||
Reference in New Issue
Block a user