docs: create AGENTS.md - #4494
Conversation
We have so much AI contributions incoming, but most of them are slops. We're here to prevent that.
| ### Unit tests | ||
|
|
||
| ```sh | ||
| ./unit-test.sh |
There was a problem hiding this comment.
Bug: The instruction to run ./unit-test.sh in AGENTS.md will fail for developers because it omits the required CI=true environment variable.
Severity: LOW
Suggested Fix
Update AGENTS.md to instruct developers to run the unit tests with the required environment variable, for example: CI=true ./unit-test.sh. Alternatively, modify the guard in unit-test.sh to allow developers to run it without setting CI=true.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: AGENTS.md#L29
Potential issue: The documentation in `AGENTS.md` instructs developers to run
`./unit-test.sh` to execute unit tests. However, the script contains a guard `if [[
"$CI" != "true" ]]; then ... exit 1; fi` which causes it to exit immediately unless the
`CI=true` environment variable is set. A developer following the documentation without
setting this variable will see the script fail with exit code 1, contrary to the
documentation's implication that it should work.
Did we get this right? 👍 / 👎 to inform future reviews.
There was a problem hiding this comment.
I do not think this is something that users should do on their system for opening PRs, this is destructive.
|
|
||
| ## Local Setup and Safety | ||
|
|
||
| Prerequisites: |
There was a problem hiding this comment.
These are not hard requirements for a contribution, an agent might start installing these on users system for every PR.
| AI assistance is welcome, but the human opening the PR is responsible for the diff. | ||
|
|
||
| - Review every generated change, understand what it does, and make sure it matches the project's intent. | ||
| - Write the PR description and problem statement in your own words; do not copy-paste raw LLM output. |
There was a problem hiding this comment.
I think this might help to prevent agents writing PR description.
| - Write the PR description and problem statement in your own words; do not copy-paste raw LLM output. | |
| - Ask the user to to write the PR description and problem statement in your own words; guide the user on how to write it, but do not write it completely for user and ask the user to write description themselves. |
| ### Unit tests | ||
|
|
||
| ```sh | ||
| ./unit-test.sh |
There was a problem hiding this comment.
I do not think this is something that users should do on their system for opening PRs, this is destructive.
| - `sentry/config.yml` (from `sentry/config.example.yml`) | ||
| - `relay/config.yml` (from `relay/config.example.yml`) | ||
| - `symbolicator/config.yml` (from `symbolicator/config.example.yml`) | ||
| - `.env` |
There was a problem hiding this comment.
This might get confusing for agents as this is not generated from install outputs, it's tracked in git.
We have so much AI contributions incoming, but most of them are slops. We're here to prevent that.