docs(agents): add setup, checks, and agent gotchas to AGENTS.md#6543
docs(agents): add setup, checks, and agent gotchas to AGENTS.md#6543Zandereins wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughAGENTS.md adds contributor guidance for AI-generated changes, local environment setup, required validation commands, network-blocked tests, Conventional Commits titles, and branch naming. ChangesContributor Guidance
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@AGENTS.md`:
- Around line 27-32: Update the documented ruff formatting command in the
command list to use check-only mode, matching CI, while leaving the pytest,
lint, and mypy commands unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| ```bash | ||
| uv run pytest lib/crewai/tests/ -x -q # tests for the core package | ||
| uv run ruff check lib/ # lint | ||
| uv run ruff format lib/ # format (CI runs it with --check) | ||
| uv run mypy lib/ # type check, strict mode | ||
| ``` |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use the CI-equivalent format check.
Line 30 runs formatting in write mode, while CI validates with ruff format --check lib/. Replace it with the check-only command to avoid modifying files during validation.
-uv run ruff format lib/ # format (CI runs it with --check)
+uv run ruff format --check lib/ # format check📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ```bash | |
| uv run pytest lib/crewai/tests/ -x -q # tests for the core package | |
| uv run ruff check lib/ # lint | |
| uv run ruff format lib/ # format (CI runs it with --check) | |
| uv run mypy lib/ # type check, strict mode | |
| ``` |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@AGENTS.md` around lines 27 - 32, Update the documented ruff formatting
command in the command list to use check-only mode, matching CI, while leaving
the pytest, lint, and mypy commands unchanged.
What
Adds the operational information an agent needs to work in this repo to
AGENTS.md: setup, the CI-enforced checks, and three gotchas that are easy to hit blind.Why
AGENTS.mdis the file coding agents load on startup, but today it carries only style guidance — the commands and constraints live in.github/CONTRIBUTING.md, which an agent doesn't read by default.The sharpest example: the
llm-generatedlabel requirement is a rule aimed specifically at AI agents, and it is currently invisible to them. An agent following onlyAGENTS.mdtoday cannot install the workspace, cannot run the tests, and will open a PR that gets closed unlabeled.Everything added is taken from this repo's own sources, not invented:
.github/CONTRIBUTING.mdand thetests,linter,type-checkerworkflows--block-network/ VCR cassettes —[tool.pytest.ini_options] addoptsinpyproject.toml.github/workflows/pr-title.yml.github/CONTRIBUTING.mdAdditive only: nothing existing was removed or reworded, and no build command was invented (this workspace doesn't have one).
Note
This PR was authored by an AI agent (Claude Code). Per CONTRIBUTING it needs the
llm-generatedlabel; outside contributors can't apply labels, so flagging it here for a maintainer.Context: I found this while running a deterministic quality survey of AGENTS.md files across major agent repos — crewAI scored 55/100, almost entirely for missing operational content. Happy to share the method if it's useful.