Add AGENTS.md agent guidance#52
Conversation
|
👋 Hello @glenn-jocher, thank you for submitting a
For more guidance, please refer to our Contributing Guide. Don't hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀 |
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review
Made with ❤️ by Ultralytics Actions
The guidance file is generally useful and matches the repo structure/CI details, but two documentation/process issues need attention: the PR body does not satisfy the newly introduced Deleted: gate, and the license-header convention is currently overbroad for Markdown files in this repo.
💬 Posted 2 inline comments
| 3. **Search the repo before creating anything.** Before building a helper, search the whole repo — it likely exists (`utils/general.py` holds the shared helpers). If two scripts grow the same logic, consolidate into `utils/` and delete the duplicates. Avoid premature abstraction — three similar lines beat a helper nobody else calls. | ||
| 4. **Deletion beats caution.** Zero regression means understanding the code you remove, not leaving it in place as insurance. Keeping broken or duplicated code "to be safe" is itself the regression: it is how repos rot. All changes must still ship debugged, validated, and production ready. | ||
|
|
||
| **Output gate:** every PR body must contain a `Deleted:` line naming the code removed (functions, branches, files, config). Features must name what they reused or consolidated. `Deleted: nothing` demands the rule-2 justification. |
There was a problem hiding this comment.
💡 MEDIUM: This PR introduces a hard output gate requiring every PR body to include a Deleted: line, but the current PR body in the description does not include one. Please update the PR body to satisfy the new gate, or this change blocks its own merge criteria.
|
|
||
| ## Conventions | ||
|
|
||
| - Every file starts with `# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license` — Ultralytics Actions adds headers automatically; don't add or revert them manually. |
There was a problem hiding this comment.
📝 LOW: This convention is too broad for the repository as-is: README.md does not start with the Ultralytics license header, and this new AGENTS.md also starts with # AGENTS.md. As written, future agents may try to add headers to Markdown files that intentionally do not have them. Please scope this to the file types where the convention actually applies.
Suggested change:
| - Every file starts with `# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license` — Ultralytics Actions adds headers automatically; don't add or revert them manually. | |
| - Python and workflow files start with `# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license` — Ultralytics Actions adds headers automatically; don't add or revert them manually. |
|
🚀 Merged — thank you @glenn-jocher! “Give me six hours to chop down a tree and I will spend the first four sharpening the axe.” — Abraham Lincoln This PR sharpens the tools for everyone working in Appreciate the thoughtful improvement to contributor experience and long-term project quality! |
Summary
Adds
AGENTS.md(withCLAUDE.mdas a relative symlink) documenting how AI coding agents should work in this repo: Core Principles, PR workflow, verified commands, architecture, and conventions. Every command, path, workflow trigger, and test name was checked against the actual repo files.Details
ci.yml(ubuntu-latest, Python 3.11,uv pip install,compileall,pytest -q, daily cron),format.yml,requirements.txt,flickr_scraper.py,utils/, andtests/.AGENTS.md(committed as mode 120000).README.md; there is only one README (no translations). All install/run commands, flags (--search/--n/--download/--page/--key/--secret), the./images/<search>/output path, and the Compatibility Notes match the current code. No factual drift found, so no README changes were needed.Notable verified gotcha captured in AGENTS.md:
utils/clean_images.pyimports OpenCV, which is not inrequirements.txt.Deleted: nothing — this PR only adds agent-guidance docs and a symlink; there is no prior agent-guidance file or duplicated content to remove or consolidate.
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Adds AI-agent contribution guidance for
ultralytics/flickr_scraper, plus aCLAUDE.mdsymlink for Claude Code compatibility 🤖📊 Key Changes
AGENTS.mdfile documenting repository-specific rules, workflow, commands, architecture, and conventions 📘flickr_scraper.py, shared utilities, standalone scripts, and test behavior 🧪CLAUDE.mdas a symlink toAGENTS.mdfor Claude Code and compatible AI tooling 🔗🎯 Purpose & Impact