docs: AGENTS.md, the repository guidelines for AI coding assistants #820

Manually merged
github merged 1 commit from github-bot/gh-820 into main 2026-11-29 08:22:30 +00:00 AGit
Owner

@⁠abilliontokens on GitHub · 2026-11-28 07:02 UTC · original
abilliontokens:docs/repository-guidelines → main · +109 −0 · 1 files · 1 commits · merged 2026-11-29 08:16 UTC

What this adds

AGENTS.md at the root, titled "Repository Guidelines" (109 lines, documentation only): what an AI coding assistant needs before changing this tree — what the project is, how the crates fit together, the commands CI runs, the code conventions, the tooling constraints, the tests, and the asset policy as it meets a change. No source, manifest or lockfile is touched.

Why it says what it says

It is written for what an assistant would otherwise get wrong, not for what the directory listing already shows:

  • console "objects" are function-table structs, not COM objects (victory-gpu/src/object.rs);
  • VICTORY_* switches are read through toggled!/asked_for! and cached once per process (victory-gpu/src/switch.rs);
  • there is no cargo fmt gate and the tree is far from rustfmt-clean (3777 diff hunks), so a reflexive format buries a change;
  • cargo test --workspace never compiles victory-gpu/tests/replay*.rs (they need the diagnostics feature);
  • a Cargo.lock change empties every user's shader cache (VICTORY_TRANSLATOR);
  • adding a console import is hle_export! in the module's module(), and registering nothing is what routes an import to the host, a title DLL or a stub.

How it was checked

Seven parallel read-only passes over the tree (GPU object model, GPU host runtime, shader translator and formats, loader/HLE/CLI, tests, build and policy, scripts and docs), every claim tied to path:line. Before opening this PR, the line references, function names, counts and the HLE recipe were checked against the sources they cite. That corrected four statements that were wrong (the number of mod.rs files, the HLE function signature, the name of the host-failure function, the ShaderError derivation), three line references that were off, and a few phrased more strongly than the code supports.

The figures were measured on 63b902f, each with its command in the file:

Figure Command Result
distinct VICTORY_* names grep -rhoE 'VICTORY_[A-Z0-9_]+' crates apps --include='*.rs' | sort -u | wc -l 482
#[test] functions grep -rh '#\[test\]' crates apps xtask --include='*.rs' | wc -l 1233
// SAFETY: comments grep -rc '// SAFETY:' crates apps --include='*.rs' 2444
rustfmt diff hunks cargo fmt --all -- --check 3777
asset policy cargo xtask policy 295 files ok

Not run

The clippy and test gates were not run locally for this change: nothing they inspect changed. CI runs them here as on any pull request.

**@⁠abilliontokens** on GitHub · 2026-11-28 07:02 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/820) `abilliontokens:docs/repository-guidelines` → `main` · +109 −0 · 1 files · 1 commits · merged 2026-11-29 08:16 UTC ## What this adds `AGENTS.md` at the root, titled "Repository Guidelines" (109 lines, documentation only): what an AI coding assistant needs before changing this tree — what the project is, how the crates fit together, the commands CI runs, the code conventions, the tooling constraints, the tests, and the asset policy as it meets a change. No source, manifest or lockfile is touched. ## Why it says what it says It is written for what an assistant would otherwise get wrong, not for what the directory listing already shows: - console "objects" are function-table structs, not COM objects (`victory-gpu/src/object.rs`); - `VICTORY_*` switches are read through `toggled!`/`asked_for!` and cached once per process (`victory-gpu/src/switch.rs`); - there is no `cargo fmt` gate and the tree is far from rustfmt-clean (3777 diff hunks), so a reflexive format buries a change; - `cargo test --workspace` never compiles `victory-gpu/tests/replay*.rs` (they need the `diagnostics` feature); - a `Cargo.lock` change empties every user's shader cache (`VICTORY_TRANSLATOR`); - adding a console import is `hle_export!` in the module's `module()`, and registering nothing is what routes an import to the host, a title DLL or a stub. ## How it was checked Seven parallel read-only passes over the tree (GPU object model, GPU host runtime, shader translator and formats, loader/HLE/CLI, tests, build and policy, scripts and docs), every claim tied to `path:line`. Before opening this PR, the line references, function names, counts and the HLE recipe were checked against the sources they cite. That corrected four statements that were wrong (the number of `mod.rs` files, the HLE function signature, the name of the host-failure function, the `ShaderError` derivation), three line references that were off, and a few phrased more strongly than the code supports. The figures were measured on `63b902f`, each with its command in the file: | Figure | Command | Result | |---|---|---| | distinct `VICTORY_*` names | `grep -rhoE 'VICTORY_[A-Z0-9_]+' crates apps --include='*.rs' \| sort -u \| wc -l` | 482 | | `#[test]` functions | `grep -rh '#\[test\]' crates apps xtask --include='*.rs' \| wc -l` | 1233 | | `// SAFETY:` comments | `grep -rc '// SAFETY:' crates apps --include='*.rs'` | 2444 | | rustfmt diff hunks | `cargo fmt --all -- --check` | 3777 | | asset policy | `cargo xtask policy` | 295 files ok | ## Not run The clippy and test gates were not run locally for this change: nothing they inspect changed. CI runs them here as on any pull request.
- What the project is, how the crates fit together, the commands CI
  runs, the code conventions, and the asset policy as it meets a
  change, for an AI assistant's first read.
- It says what an assistant would otherwise get wrong: console objects
  are function-table structs, not COM; `VICTORY_*` switches are read
  through `toggled!`/`asked_for!`, once per process; there is no
  `cargo fmt` gate (3777 diff hunks today); `cargo test --workspace`
  never compiles the GPU replay tests; a `Cargo.lock` change empties
  every shader cache.
- Written from seven read-only passes over the tree; the line
  references, function names, counts and the HLE recipe were then
  checked against the sources they cite, and every figure is measured
  on this tree with its command beside it.
- Documentation only: no source, manifest or lockfile changes.

Co-Authored-By: GLM-5.4 via omp <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 07:03:51 +00:00
github manually merged commit a0de005edd into main 2026-11-29 08:22:30 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!820
No description provided.