Skip to content

Conversation

@armenzg
Copy link
Member

@armenzg armenzg commented Jan 19, 2026

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

Even 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:

  • 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 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:

  • Wasted time in common command execution errors
  • Always visible to AI agents
  • Single source of truth for command execution
  • Better separation: commands in main file, patterns in domain files

…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
@armenzg armenzg self-assigned this Jan 19, 2026
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jan 19, 2026
@armenzg armenzg requested review from a team, JoshFerge and scttcper January 19, 2026 14:48
@armenzg armenzg removed the Scope: Frontend Automatically applied to PRs that change frontend components label Jan 19, 2026
@armenzg armenzg marked this pull request as ready for review January 19, 2026 14:49
@armenzg armenzg requested a review from a team as a code owner January 19, 2026 14:49
devenv sync

# Activate the Python virtual environment (required for running tests and Python commands)
direnv allow
Copy link
Member

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?

Copy link
Member Author

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?

Copy link
Member

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

Copy link
Member Author

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

Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants