Add Documentation DO/DON'T section in agents.md#1103
Conversation
There was a problem hiding this comment.
Pull request overview
Adds contributor guidance to keep Rust documentation focused on durable semantics rather than duplicating rustdoc output, helping prevent module/item docs from drifting into manually maintained type/signature listings.
Changes:
- Adds a new “Documentation” DO/DON’T section to
agents.md. - Encourages using
cargo doc --no-depsto rely on rustdoc-generated structure (signatures, listings, re-exports, links). - Codifies specific anti-patterns to avoid (manual type/function lists, signature restatements, unnecessary docs for internal visibility items).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1103 +/- ##
=======================================
Coverage 89.49% 89.49%
=======================================
Files 479 479
Lines 90337 90337
=======================================
+ Hits 80844 80847 +3
+ Misses 9493 9490 -3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
| ### Documentation | ||
|
|
||
| Less is more. Documentation goes out of date; rustdoc-generated output | ||
| doesn't. Build with `cargo doc --no-deps` and read the rendered page to see |
There was a problem hiding this comment.
Not sure this is advice we want to be giving agents as it introduces another thing to build, output to read, and potentially bloats context. Perhaps reword as "don't duplicate what rustdoc already does".
Adds a
DocumentationDO/DON'T section toagents.mdalongside the existingTest Patternsblock.Surfaced during review of #1027 and other PRs, where module- and item-level docs drifted toward manually-maintained type listings and signature restatements. New section captures the "less is more" framing, points at
cargo doc --no-deps, and codifies the three patterns the reviewer called out as noise.