-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
docs(agents): Consolidate critical instructions into main AGENTS.md #106515
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: master
Are you sure you want to change the base?
Conversation
…ENTS.md Critical command execution instructions were scattered across subdirectory AGENTS.md files, leading to AI agents making common mistakes like: - Running pytest without activating virtualenv - Missing required pytest flags (-svv --reuse-db) - Forgetting CI=true flag for frontend tests - Not using proper pre-commit commands This consolidation ensures agents always see these critical instructions since the main AGENTS.md is always loaded, regardless of which file is being edited. Changes: - Added "Command Execution Guide" section to main AGENTS.md with: * Python virtualenv requirements for AI agents vs humans * Backend commands (setup, linting, testing, database) * Frontend commands (dev, typechecking, linting, testing) - Removed duplicate command sections from src/AGENTS.md, tests/AGENTS.md, and static/AGENTS.md - Updated all references to point to the consolidated guide - Subdirectory files now focus on domain-specific patterns only Benefits: - Single source of truth for command execution - Prevents common command execution errors - Always visible to AI agents - Better separation: commands in main file, patterns in domain files
| devenv sync | ||
|
|
||
| # Activate the Python virtual environment (required for running tests and Python commands) | ||
| direnv allow |
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.
so this still instructs the agent to run direnv allow, but i don't think direnv works within cursor properly. Further down there's a bare pytest. can we get rid of this and use uv run pytest further down?
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.
Right! Let me get rid of it.
Do we install uv by default?
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.
uv is used to manage python deps, so yeah
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.
I have removed the note about the commands for humans but I would like to leave switching to uv outside of this PR.
Please propose it in #discuss-backend
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.
I may have figured out switching to uv locally. I will open a different PR for it.
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.
Critical command execution instructions were scattered across subdirectory AGENTS.md files, leading to AI agents making common mistakes like:
pytestwithout activating virtualenvEven though #105426 helped, if you are not viewing a file that matches and load the sub-directory AGENTS.md, you will not benefit from that change.
This consolidation ensures agents always see these critical instructions since the main AGENTS.md is always loaded, regardless of which file is being edited.
Changes:
src/AGENTS.md,tests/AGENTS.md, andstatic/AGENTS.mdBenefits: