Skip to content

Commit 4519746

Browse files
Merge branch 'agentsmd' into 'main'
improve comment directions in AGENTS.md See merge request lightspeedrtx/dxvk-remix-nv!2333
2 parents 730eb4d + 6f4206f commit 4519746

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,15 @@ Full guide: `documentation/CONTRIBUTING-style-guide.md`
4343
- **Includes**: Standard library first, then third-party, then local. Separate groups with blank lines.
4444
- **Memory**: Prefer smart pointers (`std::unique_ptr`, `std::shared_ptr`). Use `Rc<T>` for GPU resources.
4545
- **Profiling**: Use `ScopedCpuProfileZone()` / `ScopedGpuProfileZone(ctx, "name")` for performance-critical code.
46-
- **Comments**: Describe the code as it is now. Do not write comments that contrast the current state with a previous one, or that explain a change rather than the code — wording like "now shared", "no longer", "instead of", "unified" and similar reads as a changelog entry, and it goes stale as soon as the next change lands. A reader has the code in front of them, not its history; put the rationale for a change in the commit message or MR description, not in the source.
46+
- **Comments**:
47+
- Be as concise as you reasonably can. Most comments should fit into a single line.
48+
- Describe the code as it is now. Do not contrast the current state with a previous one, or explain a change.
49+
- Do not explain things that can easily understood from reading class, function, or variable names.
50+
- Focus on recording non-obvious interactions and pitfalls.
51+
- If a long plain-english explanation of how a complicated set of systems interact is needed, that should go in a .md file in the `documentation/` folder.
52+
- Documentation about how to use a feature should be clearly separated from technical documenation about how a feature works.
53+
- In code comments should reference sections of that .md file, rather than repeating or trying to summarize.
54+
- Rational for why a change is needed should go into commit messages or MR descriptions, not the code.
4755

4856
### Changes to Core DXVK Files (Applies to code files outside of `rtx_render`)
4957

0 commit comments

Comments
 (0)