agent_docs/documentation.md
Rules for writing docstrings, comments, user-facing documentation, and maintaining documentation accuracy
When to check: When writing or updating documentation, comments, or docstrings
##, ###, ####) instead of bold text for sections — preserves semantic structure and document hierarchy — Proper heading levels enable navigation, accessibility, and consistent documentation structure across all .md filesai.pydantic.dev), and API references — Prevents documentation drift that misleads users about actual behavior, limitations, or API contractsdocs/ files in mkdocs.yml nav section — Ensures documentation files are discoverable in the generated site navigation; orphaned files won't appear in the docs sitefreeform vs free-form, messages vs last message) — prevents user confusion and makes codebase searchable — Inconsistent terminology fragments documentation searches, confuses users trying to map concepts between docs and code, and signals poor API design qualityTODO: and link workarounds to upstream/internal issues — enables tracking and cleanup when conditions change — Explicit markers with tracking links prevent abandoned workarounds and make technical debt actionable and removable when upstream fixes land