Reviewer · Documentation
Keep documentation examples accurate
When editing or adding documentation, ensure code examples, inline comments, and surrounding prose stay fully consistent and self-explanatory. - If you change a parameter, import path, or object passed into an example, update the explanatory text/comments to match. Don't leave stale prose describing removed parameters (e.g. text claiming "runs for many...
When editing or adding documentation, ensure code examples, inline comments, and surrounding prose stay fully consistent and self-explanatory.
- If you change a parameter, import path, or object passed into an example, update the explanatory text/comments to match. Don’t leave stale prose describing removed parameters (e.g. text claiming “runs for many loops” when
loops_per_agentwas removed from the snippet) or tables referencing types/paths that no longer apply. - Document any non-obvious behavior introduced by the example. If a parameter is required for something to work (e.g.
streaming_on=Trueis needed for a streaming callback to fire) or if semantics are inferred implicitly (e.g. the last item in a list is treated as the “judge”), add a short inline comment or sentence stating this explicitly so readers don’t have to debug it themselves:# Agents must set streaming_on=True for streaming_callback to fire agent = Agent(..., streaming_on=True) - Prefer documenting the stable, public import path. If you must temporarily reference an internal/private module (e.g.
swarms.structs.planner_worker_swarminstead of a missing top-level export), call out that this is a workaround pending a fix, so users aren’t misled into treating it as the supported path. - When adding a new documentation page, verify it is registered in the site’s navigation/build config (e.g.
mkdocs.yml) so it is actually published and discoverable.
Treat documentation and its code examples as a single unit: any edit to one requires reviewing the other for consistency before merging.</description> </invoke>