Awesome Reviewers

Reviewer · Documentation

Self-contained explanatory comments

Whenever code's purpose, invariants, or derivation aren't obvious from the code itself, add a clear, self-contained comment or doc comment explaining it. Use doc comments (`///`) for public/`pub(crate)` items (functions, types, struct fields, type aliases) describing what they represent, not just repeating the name, e.g. document a type alias like...

Instruction

Whenever code’s purpose, invariants, or derivation aren’t obvious from the code itself, add a clear, self-contained comment or doc comment explaining it. Use doc comments (///) for public/pub(crate) items (functions, types, struct fields, type aliases) describing what they represent, not just repeating the name, e.g. document a type alias like UpgradeMap the same way existing types such as LockedMap are documented. For magic values, workarounds, or non-trivial algorithms, explain why the code is written that way and, if relevant, how to maintain or regenerate it (e.g. “this DLL list was generated via dumpbin /dependents; if the linker reports LNK4199 for an unused DLL, remove it from the list”). When behavior is platform- or format-specific, cite authoritative references (man pages, specs) inline rather than leaving the reader to guess, e.g. note that ru_maxrss is in KiB on Linux/FreeBSD but bytes on Darwin, linking to the relevant man pages. Comments must stand on their own over time: avoid relative/transient phrasing such as “old behavior” vs “new behavior”, and don’t rely solely on a link to a PR or issue as the explanation—summarize the reasoning directly in the comment, adding a link only as a supplementary reference if truly useful. For internal, unstable, or non-contractual APIs, state explicitly that the interface isn’t stable (e.g. “Not a stable interface, see PR #1234”) so future readers don’t mistake implementation details for guaranteed behavior.</description> </invoke>