-
-
Notifications
You must be signed in to change notification settings - Fork 607
Add AGENTS.md #4094
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add AGENTS.md #4094
Conversation
Reviewer's GuideAdds an AGENTS.md file documenting project setup, commands, code style, structure, and PR requirements specifically to guide AI coding agents and contributors. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - I've left some high level feedback:
- Double-check that the listed commands and tools (poetry, mypy strict, ruff, test markers, etc.) exactly match the current project setup and config files so AGENTS.md doesn’t drift from reality.
- Ensure the PR requirements in AGENTS.md (RELEASE.md requirement, release types, test expectations) are consistent with any existing CONTRIBUTING or release process docs to avoid conflicting guidance.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Double-check that the listed commands and tools (poetry, mypy strict, ruff, test markers, etc.) exactly match the current project setup and config files so AGENTS.md doesn’t drift from reality.
- Ensure the PR requirements in AGENTS.md (RELEASE.md requirement, release types, test expectations) are consistent with any existing CONTRIBUTING or release process docs to avoid conflicting guidance.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| - Include `RELEASE.md` file describing changes | ||
| - Release types: patch/minor/major | ||
| - Tests required for all code changes with full coverage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we add an example of release file too? 😊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's also add a CLAUDE.md with @AGENTS.md 😊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we add an example of release file too? 😊
would be cool to make this a skill
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same thing goes for schema tests for a new skill, think of a new /generate-tests command which generates the test file structure, schema, query inputs and expected outputs.
|
I'd recommend making the AGENTS.md significantly more detailed Eg. Almost 90% of the file tree. This helps CLAUDE and other agents gather all the needed context right out of the bat. It's important not to go overboard and use up too much context at the same time by being too wordy. Including the I'd also recommend a .serena folder with memories of important incomplete tasks and possibly a |
|
@XChikuX I'd avoid serena, I haven't found it to be that useful, do you have an example CLAUDE.md? |
|
Full Stack Application Example You may want to adjust for tools available to opensource as well as pure python project structure like strawberry. Caveat: this is only one way in a vast amount of ways you can structure your
It aids LLMs that are not as good with tool calling as Claude. I've found it noticeably reduces context bloat when I prompt agents as well in exchange for some accuracy loss. Of course, your mileage may vary. |
|
@XChikuX i'm strongly in favour of the most minimal AGENTS.md/CLAUDE.md file possible. These instructions get added to the context window and added to every prompt. Token space is at a premium. Information that is already easily discernible is redundant (such as the directory layout, general intent of certain files). I would reserve the token count for common stumbling blocks on the most common actions. (and I would expect the need for such instructions to diminish over time too as the models improve!) |
Co-authored-by: Thiago Bellini Ribeiro <hackedbellini@gmail.com>
I'd argue more context get's used in searching for files, understanding file structure and repeat API calls that lack much needed context. I assumed the same as you in the beginning, but my real world use has been counter intuitive. The only time CLAUDE didn't waste precious tokens by creating new unnecessary files was when it already knew the file existed and exactly what that file did.
We can always edit it when that time comes. In fact, I recommend we do. :) EDIT: Keeping AGENTS.md small would sacrifice input token context in exchange for lower quality output tokens (which cost x10+) because of the extra tool calls and the unnecessary Now I will figure out what this file does outputs. Although it will help free tiers, it will not help Claude from my experience. Instead of pointing CLAUDE.md - > AGENTS.md consider keeping both separate since Claude more or less ignores the latter, you can find the issue on their github that proves this. Larger input context for Claude. Smaller context for free tier LLMs would be the way to go. Just a suggestion @patrick91 |
|
I'm with @magicmark and @patrick91 on this one. However, we should think about adding some knowledge on structure:
This is what we need. however, that's something we need to add piece by piece when we actually identify the stumbling blocks. So maybe we all add whatever we frequently see misinterpreted by claude code. For the rest, claude's plan / explore agents do an exceptional job at understanding the codebase nowadays. |
erikwrede
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome!
| - Include `RELEASE.md` file describing changes | ||
| - Release types: patch/minor/major | ||
| - Tests required for all code changes with full coverage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same thing goes for schema tests for a new skill, think of a new /generate-tests command which generates the test file structure, schema, query inputs and expected outputs.
https://agents.md/ is now a standard supported by most coding agents.
Seems worth adding - e.g. my instance of claude keeps trying to run things with uv, so this would teach it we're using poetry atm.
wdyt?
Summary by Sourcery
Documentation: