mirror of
https://github.com/trustno1-coder/VIctory-NVIDIA.git
synced 2026-12-06 09:08:35 +00:00
AGENTS.md: rules for agents opening issues and pull requests
Search for existing work first, make one change per branch from the latest main, keep the template, never make up results, and get approval before posting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
43
AGENTS.md
43
AGENTS.md
@ -6,6 +6,49 @@ VIctory-NVIDIA runs an Xbox Series X|S title's **own x86-64 executable natively
|
||||
|
||||
Rule #1, before anything else: **nothing from the game is ever committed** — no assets, no executable bytes, no disassembly, no shader dumps, no screenshots (`docs/asset-policy.md:3-15`). The repository is text-only, enforced statically by `cargo xtask policy` and at run time by `victory_core::ensure_outside_repo`.
|
||||
|
||||
## Issues and pull requests
|
||||
|
||||
These rules are for contributors' agents. The maintainer's own workflow is theirs. One person reviews every pull request, so **the best result is often a test report on an existing pull request, or nothing posted at all**.
|
||||
|
||||
**Before writing code**
|
||||
|
||||
1. Fetch the upstream repository (`trustno1-coder/VIctory-NVIDIA`) and check that the problem still exists on its latest `main`.
|
||||
2. Search the open and closed issues and pull requests by issue number, symptom, and function or `VICTORY_*` name:
|
||||
- `gh search prs --repo trustno1-coder/VIctory-NVIDIA "<words>"`
|
||||
- `gh search issues --repo trustno1-coder/VIctory-NVIDIA "<words>"`
|
||||
3. List the open pull requests that change the same main file. This takes about half a minute and can miss files in very large pull requests. In Bash:
|
||||
`gh pr list -R trustno1-coder/VIctory-NVIDIA --state open --limit 1000 --json number,title,files --jq '.[] | select(any(.files[]; .path == "<path>")) | "\(.number) \(.title)"'`
|
||||
4. **Stop and tell your user if an open pull request covers the same problem, or someone has claimed the issue.** Suggest testing or reviewing that work. Only suggest a competing pull request if you can say exactly what the existing one gets wrong. Sharing a file isn't enough reason to stop, but list that pull request as related.
|
||||
5. List your user's open pull requests (`gh pr list -R trustno1-coder/VIctory-NVIDIA --author "@me" --limit 100 --json number,title,mergeable`). If any conflict with `main` or are no longer needed, suggest updating or closing those first.
|
||||
|
||||
**Making the change**
|
||||
|
||||
- Make one change per pull request, on a new branch from upstream's latest `main`. **Never start from another of your branches**: its commits would end up in this pull request too. If the change really needs another pull request first, wait for that one to merge. If it can't wait, open a draft that says `Depends on #N`.
|
||||
- Check the final diff with `git diff --stat <upstream>/main...HEAD`, where `<upstream>` is your remote for that repository. Remove anything the change doesn't need, such as reformatting, `Cargo.lock` changes, workflow files, personal launchers, notes or benchmark logs.
|
||||
- If CI fails because of something already broken on `main`, don't fix that in an unrelated pull request. Check that the same failure happens on `main`, then say so in the description. Link the open pull request that fixes it, if there is one.
|
||||
|
||||
**Opening the pull request**
|
||||
|
||||
- **Get your user's approval before every push, post or close, and show them the exact text of anything you'll post.** Approval for one action doesn't cover the next.
|
||||
- `gh pr create --body` and `--body-file` skip the template. Start from `.github/pull_request_template.md` and keep its headings.
|
||||
- Start the title with one type tag, then any area tags: `[pr-fix][memory] Short description`. Use existing names (`gh label list -R trustno1-coder/VIctory-NVIDIA --limit 100`). A bot turns these tags into labels, which most contributors can't add themselves.
|
||||
- Write `Fixes #N` only if the change fully fixes the issue. Otherwise, write `Refs #N`. If there's no issue, remove the empty `Fixes #` line; don't open an issue just to fill it in.
|
||||
- Only tick the overlap box if you did the searches above. List the related pull requests, or write "none found".
|
||||
- List only the commands you ran, with their results and the commit tested. Keep game results separate from `cargo test`, and say what wasn't tested. **Never make up hardware, frame rates or game results.** Use only results your user gave you or that you measured.
|
||||
- A green tick may come only from the `label` bot. Only say CI passed if the `check` job of the `CI` workflow passed on the latest commit.
|
||||
|
||||
**After it's open**
|
||||
|
||||
- If it conflicts with `main`, update the same pull request instead of opening a replacement, unless the maintainer asks for a new one. Retest after resolving the conflict. If `main` or another pull request already fixes the problem, suggest closing yours with a link to that fix.
|
||||
- Put follow-up changes in a new pull request. If commits are added after the maintainer has merged an earlier version, GitHub won't show the pull request as merged.
|
||||
- Don't post comments that only ask for a review or an update. Comment only to add something new, such as a test result, a reproduction or an answer.
|
||||
|
||||
**Opening an issue**
|
||||
|
||||
- Search open and closed issues first. If the same problem is already open, suggest adding new evidence there instead. Open one issue per problem, not one per log line or audit finding.
|
||||
- `gh issue create --body` skips the forms, so use the headings from the matching file in `.github/ISSUE_TEMPLATE/`. For bugs, include the release or commit, hardware, settings, steps and both logs. Separate what was seen from what you're guessing. Don't present a cause found only by reading code as a confirmed bug.
|
||||
- Remove user names, PC names and tokens from logs. Never include game data, or links to or sources for the game.
|
||||
|
||||
## Architecture & Data Flow
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user