Skip to content

Add Documentation DO/DON'T section in agents.md#1103

Open
suri-kumkaran wants to merge 1 commit into
mainfrom
users/suryangupta/agents-docs-guidance
Open

Add Documentation DO/DON'T section in agents.md#1103
suri-kumkaran wants to merge 1 commit into
mainfrom
users/suryangupta/agents-docs-guidance

Conversation

@suri-kumkaran
Copy link
Copy Markdown
Contributor

Adds a Documentation DO/DON'T section to agents.md alongside the existing Test Patterns block.

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-deps to 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-commenter
Copy link
Copy Markdown

codecov-commenter commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.49%. Comparing base (e3139b4) to head (1f7d7e1).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1103   +/-   ##
=======================================
  Coverage   89.49%   89.49%           
=======================================
  Files         479      479           
  Lines       90337    90337           
=======================================
+ Hits        80844    80847    +3     
+ Misses       9493     9490    -3     
Flag Coverage Δ
miri 89.49% <ø> (+<0.01%) ⬆️
unittests 89.14% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread agents.md
### 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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants